@visactor/vtable 1.1.3-alpha.2 → 1.2.0-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.
Files changed (123) hide show
  1. package/cjs/core/BaseTable.d.ts +1 -0
  2. package/cjs/core/BaseTable.js +6 -3
  3. package/cjs/core/BaseTable.js.map +1 -1
  4. package/cjs/event/util.d.ts +1 -0
  5. package/cjs/event/util.js +3 -2
  6. package/cjs/event/util.js.map +1 -1
  7. package/cjs/index.d.ts +1 -1
  8. package/cjs/index.js +1 -1
  9. package/cjs/index.js.map +1 -1
  10. package/cjs/plugins/custom-cell-style.d.ts +1 -0
  11. package/cjs/plugins/custom-cell-style.js +6 -2
  12. package/cjs/plugins/custom-cell-style.js.map +1 -1
  13. package/cjs/scenegraph/animation/appear.d.ts +2 -0
  14. package/cjs/scenegraph/animation/appear.js +26 -0
  15. package/cjs/scenegraph/animation/appear.js.map +1 -0
  16. package/cjs/scenegraph/component/custom.d.ts +5 -2
  17. package/cjs/scenegraph/component/custom.js +36 -8
  18. package/cjs/scenegraph/component/custom.js.map +1 -1
  19. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +33 -22
  20. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  21. package/cjs/scenegraph/group-creater/cell-helper.js +6 -5
  22. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  23. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  24. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  25. package/cjs/scenegraph/layout/compute-col-width.js +2 -2
  26. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  27. package/cjs/scenegraph/layout/compute-row-height.js +1 -1
  28. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  29. package/cjs/scenegraph/layout/update-height.js +13 -3
  30. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  31. package/cjs/scenegraph/layout/update-width.js +13 -3
  32. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  33. package/cjs/scenegraph/scenegraph.js +8 -5
  34. package/cjs/scenegraph/scenegraph.js.map +1 -1
  35. package/cjs/scenegraph/utils/break-string.d.ts +4 -1
  36. package/cjs/scenegraph/utils/break-string.js +8 -4
  37. package/cjs/scenegraph/utils/break-string.js.map +1 -1
  38. package/cjs/scenegraph/utils/text-icon-layout.js +4 -2
  39. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  40. package/cjs/state/select/is-cell-select-highlight.d.ts +5 -0
  41. package/cjs/state/select/is-cell-select-highlight.js +51 -0
  42. package/cjs/state/select/is-cell-select-highlight.js.map +1 -0
  43. package/cjs/state/select/update-position.js +10 -5
  44. package/cjs/state/select/update-position.js.map +1 -1
  45. package/cjs/state/state.js +4 -3
  46. package/cjs/state/state.js.map +1 -1
  47. package/cjs/themes/DEFAULT.js +0 -2
  48. package/cjs/themes/DEFAULT.js.map +1 -1
  49. package/cjs/themes/theme.js +37 -1
  50. package/cjs/themes/theme.js.map +1 -1
  51. package/cjs/ts-types/animation/appear.d.ts +6 -0
  52. package/cjs/ts-types/animation/appear.js +6 -0
  53. package/cjs/ts-types/animation/appear.js.map +1 -0
  54. package/cjs/ts-types/base-table.d.ts +4 -0
  55. package/cjs/ts-types/base-table.js.map +1 -1
  56. package/cjs/ts-types/table-engine.d.ts +5 -1
  57. package/cjs/ts-types/table-engine.js.map +1 -1
  58. package/cjs/ts-types/theme.d.ts +6 -0
  59. package/cjs/ts-types/theme.js.map +1 -1
  60. package/cjs/vrender.js.map +1 -1
  61. package/dist/vtable.js +428 -96
  62. package/dist/vtable.min.js +2 -2
  63. package/es/core/BaseTable.d.ts +1 -0
  64. package/es/core/BaseTable.js +6 -3
  65. package/es/core/BaseTable.js.map +1 -1
  66. package/es/event/util.d.ts +1 -0
  67. package/es/event/util.js +1 -1
  68. package/es/event/util.js.map +1 -1
  69. package/es/index.d.ts +1 -1
  70. package/es/index.js +1 -1
  71. package/es/index.js.map +1 -1
  72. package/es/plugins/custom-cell-style.d.ts +1 -0
  73. package/es/plugins/custom-cell-style.js +6 -2
  74. package/es/plugins/custom-cell-style.js.map +1 -1
  75. package/es/scenegraph/animation/appear.d.ts +2 -0
  76. package/es/scenegraph/animation/appear.js +20 -0
  77. package/es/scenegraph/animation/appear.js.map +1 -0
  78. package/es/scenegraph/component/custom.d.ts +5 -2
  79. package/es/scenegraph/component/custom.js +38 -4
  80. package/es/scenegraph/component/custom.js.map +1 -1
  81. package/es/scenegraph/graphic/contributions/group-contribution-render.js +34 -21
  82. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  83. package/es/scenegraph/group-creater/cell-helper.js +5 -4
  84. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  85. package/es/scenegraph/group-creater/column-helper.js +1 -1
  86. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  87. package/es/scenegraph/layout/compute-col-width.js +2 -2
  88. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  89. package/es/scenegraph/layout/compute-row-height.js +1 -1
  90. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  91. package/es/scenegraph/layout/update-height.js +13 -4
  92. package/es/scenegraph/layout/update-height.js.map +1 -1
  93. package/es/scenegraph/layout/update-width.js +13 -4
  94. package/es/scenegraph/layout/update-width.js.map +1 -1
  95. package/es/scenegraph/scenegraph.js +9 -5
  96. package/es/scenegraph/scenegraph.js.map +1 -1
  97. package/es/scenegraph/utils/break-string.d.ts +4 -1
  98. package/es/scenegraph/utils/break-string.js +9 -3
  99. package/es/scenegraph/utils/break-string.js.map +1 -1
  100. package/es/scenegraph/utils/text-icon-layout.js +4 -2
  101. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  102. package/es/state/select/is-cell-select-highlight.d.ts +5 -0
  103. package/es/state/select/is-cell-select-highlight.js +46 -0
  104. package/es/state/select/is-cell-select-highlight.js.map +1 -0
  105. package/es/state/select/update-position.js +10 -5
  106. package/es/state/select/update-position.js.map +1 -1
  107. package/es/state/state.js +4 -3
  108. package/es/state/state.js.map +1 -1
  109. package/es/themes/DEFAULT.js +0 -2
  110. package/es/themes/DEFAULT.js.map +1 -1
  111. package/es/themes/theme.js +33 -1
  112. package/es/themes/theme.js.map +1 -1
  113. package/es/ts-types/animation/appear.d.ts +6 -0
  114. package/es/ts-types/animation/appear.js +2 -0
  115. package/es/ts-types/animation/appear.js.map +1 -0
  116. package/es/ts-types/base-table.d.ts +4 -0
  117. package/es/ts-types/base-table.js.map +1 -1
  118. package/es/ts-types/table-engine.d.ts +5 -1
  119. package/es/ts-types/table-engine.js.map +1 -1
  120. package/es/ts-types/theme.d.ts +6 -0
  121. package/es/ts-types/theme.js.map +1 -1
  122. package/es/vrender.js.map +1 -1
  123. package/package.json +2 -2
@@ -404,6 +404,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
404
404
  offVChartEvent(type: string, callback?: AnyFunction): void;
405
405
  _bindChartEvent(activeChartInstance: any): void;
406
406
  changeRecordOrder(source: number, target: number): void;
407
+ hasCustomCellStyle(customStyleId: string): boolean;
407
408
  registerCustomCellStyle(customStyleId: string, customStyle: ColumnStyleOption | undefined | null): void;
408
409
  arrangeCustomCellStyle(cellPos: {
409
410
  col?: number;
@@ -45,7 +45,7 @@ class BaseTable extends EventTarget_1.EventTarget {
45
45
  }
46
46
  constructor(container, options = {}) {
47
47
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48
- if (super(), this.showFrozenIcon = !0, this.version = "1.1.3-alpha.2", this.id = `VTable${Date.now()}`,
48
+ if (super(), this.showFrozenIcon = !0, this.version = "1.2.0-alpha.1", this.id = `VTable${Date.now()}`,
49
49
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
50
50
  !container && "node" !== options.mode) throw new Error("vtable's container is undefined");
51
51
  const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
@@ -759,7 +759,7 @@ class BaseTable extends EventTarget_1.EventTarget {
759
759
  null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c),
760
760
  icons_1.IconCache.clearAll(), null === (_e = super.release) || void 0 === _e || _e.call(this),
761
761
  null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f),
762
- null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h),
762
+ this.eventManager.release(), null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h),
763
763
  null === (_k = internalProps.legends) || void 0 === _k || _k.forEach((legend => {
764
764
  null == legend || legend.release();
765
765
  })), null === (_l = internalProps.title) || void 0 === _l || _l.release(), internalProps.title = null,
@@ -770,7 +770,7 @@ class BaseTable extends EventTarget_1.EventTarget {
770
770
  })), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
771
771
  const {parentElement: parentElement} = internalProps.element;
772
772
  parentElement && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p),
773
- this.isReleased = !0;
773
+ this.isReleased = !0, this.scenegraph = null, this.internalProps = null;
774
774
  }
775
775
  fireListeners(type, event) {
776
776
  return super.fireListeners(type, event);
@@ -1793,6 +1793,9 @@ class BaseTable extends EventTarget_1.EventTarget {
1793
1793
  }));
1794
1794
  }
1795
1795
  changeRecordOrder(source, target) {}
1796
+ hasCustomCellStyle(customStyleId) {
1797
+ return this.customCellStylePlugin.hasCustomCellStyle(customStyleId);
1798
+ }
1796
1799
  registerCustomCellStyle(customStyleId, customStyle) {
1797
1800
  this.customCellStylePlugin.registerCustomCellStyle(customStyleId, customStyle);
1798
1801
  }