@visactor/vtable 0.15.0-alpha.3 → 0.15.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.
Files changed (217) hide show
  1. package/cjs/ListTable.d.ts +12 -0
  2. package/cjs/ListTable.js +127 -13
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +1 -0
  5. package/cjs/PivotChart.js +36 -26
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +5 -1
  8. package/cjs/PivotTable.js +109 -63
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/core/BaseTable.d.ts +1 -2
  11. package/cjs/core/BaseTable.js +72 -92
  12. package/cjs/core/BaseTable.js.map +1 -1
  13. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  14. package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
  15. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  16. package/cjs/data/DataSource.d.ts +7 -1
  17. package/cjs/data/DataSource.js +43 -8
  18. package/cjs/data/DataSource.js.map +1 -1
  19. package/cjs/dataset/dataset.d.ts +3 -1
  20. package/cjs/dataset/dataset.js +20 -15
  21. package/cjs/dataset/dataset.js.map +1 -1
  22. package/cjs/edit/edit-manager.d.ts +14 -0
  23. package/cjs/edit/edit-manager.js +72 -0
  24. package/cjs/edit/edit-manager.js.map +1 -0
  25. package/cjs/edit/editors.d.ts +5 -0
  26. package/cjs/edit/editors.js +10 -0
  27. package/cjs/edit/editors.js.map +1 -0
  28. package/cjs/event/event.d.ts +3 -1
  29. package/cjs/event/event.js +5 -1
  30. package/cjs/event/event.js.map +1 -1
  31. package/cjs/event/listener/container-dom.js +5 -1
  32. package/cjs/event/listener/container-dom.js.map +1 -1
  33. package/cjs/event/listener/table-group.d.ts +1 -0
  34. package/cjs/event/listener/table-group.js +41 -27
  35. package/cjs/event/listener/table-group.js.map +1 -1
  36. package/cjs/event/media-click.js +1 -2
  37. package/cjs/event/sparkline-event.js +2 -1
  38. package/cjs/index.d.ts +1 -1
  39. package/cjs/index.js +1 -1
  40. package/cjs/index.js.map +1 -1
  41. package/cjs/layout/pivot-header-layout.d.ts +8 -1
  42. package/cjs/layout/pivot-header-layout.js +47 -22
  43. package/cjs/layout/pivot-header-layout.js.map +1 -1
  44. package/cjs/layout/pivot-layout-helper.d.ts +11 -0
  45. package/cjs/layout/pivot-layout-helper.js +24 -2
  46. package/cjs/layout/pivot-layout-helper.js.map +1 -1
  47. package/cjs/layout/simple-header-layout.d.ts +3 -1
  48. package/cjs/layout/simple-header-layout.js +11 -9
  49. package/cjs/layout/simple-header-layout.js.map +1 -1
  50. package/cjs/register.d.ts +2 -0
  51. package/cjs/register.js +8 -3
  52. package/cjs/register.js.map +1 -1
  53. package/cjs/scenegraph/component/menu.d.ts +41 -0
  54. package/cjs/scenegraph/graphic/icon.js +5 -5
  55. package/cjs/scenegraph/graphic/icon.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
  57. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +30 -58
  58. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  59. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  60. package/cjs/scenegraph/group-creater/progress/proxy.js +1 -3
  61. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  62. package/cjs/scenegraph/icon/icon-update.js +4 -4
  63. package/cjs/scenegraph/icon/icon-update.js.map +1 -1
  64. package/cjs/scenegraph/layout/compute-col-width.d.ts +1 -1
  65. package/cjs/scenegraph/layout/compute-col-width.js +10 -8
  66. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  67. package/cjs/scenegraph/scenegraph.d.ts +1 -0
  68. package/cjs/scenegraph/scenegraph.js +19 -12
  69. package/cjs/scenegraph/scenegraph.js.map +1 -1
  70. package/cjs/scenegraph/select/update-select-border.js +5 -5
  71. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  72. package/cjs/state/resize/update-resize-column.js +15 -6
  73. package/cjs/state/resize/update-resize-column.js.map +1 -1
  74. package/cjs/state/state.js +5 -4
  75. package/cjs/state/state.js.map +1 -1
  76. package/cjs/themes/ARCO.js +1 -1
  77. package/cjs/themes/BRIGHT.js +1 -2
  78. package/cjs/themes/DARK.js +1 -1
  79. package/cjs/themes/DEFAULT.js +1 -1
  80. package/cjs/themes/SIMPLIFY.js +1 -1
  81. package/cjs/themes/theme.js +1 -1
  82. package/cjs/tools/LimitPromiseQueue.js +1 -1
  83. package/cjs/tools/NumberMap.js +1 -1
  84. package/cjs/tools/Rect.js +2 -1
  85. package/cjs/tools/calc.js +1 -1
  86. package/cjs/tools/debounce.js +1 -1
  87. package/cjs/tools/diff-cell.js +2 -2
  88. package/cjs/tools/dom.js +1 -1
  89. package/cjs/tools/env.js +1 -1
  90. package/cjs/tools/global.js +1 -1
  91. package/cjs/tools/helper.js +1 -1
  92. package/cjs/ts-types/base-table.d.ts +2 -2
  93. package/cjs/ts-types/base-table.js +1 -1
  94. package/cjs/ts-types/base-table.js.map +1 -1
  95. package/cjs/ts-types/common.d.ts +6 -0
  96. package/cjs/ts-types/common.js +1 -1
  97. package/cjs/ts-types/common.js.map +1 -1
  98. package/cjs/ts-types/component/title.d.ts +3 -3
  99. package/cjs/ts-types/component/title.js.map +1 -1
  100. package/cjs/ts-types/events.d.ts +12 -2
  101. package/cjs/ts-types/events.js.map +1 -1
  102. package/cjs/ts-types/list-table/define/basic-define.d.ts +5 -1
  103. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  104. package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -1
  105. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  106. package/cjs/ts-types/table-engine.d.ts +13 -1
  107. package/cjs/ts-types/table-engine.js.map +1 -1
  108. package/dist/vtable.js +9136 -25006
  109. package/dist/vtable.min.js +2 -2
  110. package/es/ListTable.d.ts +12 -0
  111. package/es/ListTable.js +111 -12
  112. package/es/ListTable.js.map +1 -1
  113. package/es/PivotChart.d.ts +1 -0
  114. package/es/PivotChart.js +36 -27
  115. package/es/PivotChart.js.map +1 -1
  116. package/es/PivotTable.d.ts +5 -1
  117. package/es/PivotTable.js +104 -61
  118. package/es/PivotTable.js.map +1 -1
  119. package/es/core/BaseTable.d.ts +1 -2
  120. package/es/core/BaseTable.js +74 -94
  121. package/es/core/BaseTable.js.map +1 -1
  122. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  123. package/es/core/TABLE_EVENT_TYPE.js +3 -1
  124. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  125. package/es/data/DataSource.d.ts +7 -1
  126. package/es/data/DataSource.js +44 -9
  127. package/es/data/DataSource.js.map +1 -1
  128. package/es/dataset/dataset.d.ts +3 -1
  129. package/es/dataset/dataset.js +20 -15
  130. package/es/dataset/dataset.js.map +1 -1
  131. package/es/edit/edit-manager.d.ts +14 -0
  132. package/es/edit/edit-manager.js +66 -0
  133. package/es/edit/edit-manager.js.map +1 -0
  134. package/es/edit/editors.d.ts +5 -0
  135. package/es/edit/editors.js +6 -0
  136. package/es/edit/editors.js.map +1 -0
  137. package/es/event/event.d.ts +3 -1
  138. package/es/event/event.js +5 -2
  139. package/es/event/event.js.map +1 -1
  140. package/es/event/listener/container-dom.js +5 -1
  141. package/es/event/listener/container-dom.js.map +1 -1
  142. package/es/event/listener/table-group.d.ts +1 -0
  143. package/es/event/listener/table-group.js +40 -24
  144. package/es/event/listener/table-group.js.map +1 -1
  145. package/es/event/media-click.js +1 -2
  146. package/es/event/sparkline-event.js +2 -1
  147. package/es/index.d.ts +1 -1
  148. package/es/index.js +1 -1
  149. package/es/index.js.map +1 -1
  150. package/es/layout/pivot-header-layout.d.ts +8 -1
  151. package/es/layout/pivot-header-layout.js +48 -23
  152. package/es/layout/pivot-header-layout.js.map +1 -1
  153. package/es/layout/pivot-layout-helper.d.ts +11 -0
  154. package/es/layout/pivot-layout-helper.js +21 -0
  155. package/es/layout/pivot-layout-helper.js.map +1 -1
  156. package/es/layout/simple-header-layout.d.ts +3 -1
  157. package/es/layout/simple-header-layout.js +11 -9
  158. package/es/layout/simple-header-layout.js.map +1 -1
  159. package/es/register.d.ts +2 -0
  160. package/es/register.js +6 -0
  161. package/es/register.js.map +1 -1
  162. package/es/scenegraph/component/menu.d.ts +41 -0
  163. package/es/scenegraph/graphic/icon.js +5 -5
  164. package/es/scenegraph/graphic/icon.js.map +1 -1
  165. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
  166. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +29 -57
  167. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  168. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  169. package/es/scenegraph/group-creater/progress/proxy.js +1 -3
  170. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  171. package/es/scenegraph/icon/icon-update.js +4 -4
  172. package/es/scenegraph/icon/icon-update.js.map +1 -1
  173. package/es/scenegraph/layout/compute-col-width.d.ts +1 -1
  174. package/es/scenegraph/layout/compute-col-width.js +10 -8
  175. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  176. package/es/scenegraph/scenegraph.d.ts +1 -0
  177. package/es/scenegraph/scenegraph.js +19 -12
  178. package/es/scenegraph/scenegraph.js.map +1 -1
  179. package/es/scenegraph/select/update-select-border.js +5 -5
  180. package/es/scenegraph/select/update-select-border.js.map +1 -1
  181. package/es/state/resize/update-resize-column.js +15 -6
  182. package/es/state/resize/update-resize-column.js.map +1 -1
  183. package/es/state/state.js +5 -4
  184. package/es/state/state.js.map +1 -1
  185. package/es/themes/ARCO.js +1 -1
  186. package/es/themes/BRIGHT.js +1 -2
  187. package/es/themes/DARK.js +1 -1
  188. package/es/themes/DEFAULT.js +1 -1
  189. package/es/themes/SIMPLIFY.js +1 -1
  190. package/es/themes/theme.js +1 -1
  191. package/es/tools/LimitPromiseQueue.js +1 -1
  192. package/es/tools/NumberMap.js +1 -1
  193. package/es/tools/Rect.js +2 -1
  194. package/es/tools/calc.js +1 -1
  195. package/es/tools/debounce.js +1 -1
  196. package/es/tools/diff-cell.js +1 -1
  197. package/es/tools/dom.js +1 -1
  198. package/es/tools/env.js +1 -1
  199. package/es/tools/global.js +1 -1
  200. package/es/tools/helper.js +1 -1
  201. package/es/ts-types/base-table.d.ts +2 -2
  202. package/es/ts-types/base-table.js +1 -1
  203. package/es/ts-types/base-table.js.map +1 -1
  204. package/es/ts-types/common.d.ts +6 -0
  205. package/es/ts-types/common.js +1 -1
  206. package/es/ts-types/common.js.map +1 -1
  207. package/es/ts-types/component/title.d.ts +3 -3
  208. package/es/ts-types/component/title.js.map +1 -1
  209. package/es/ts-types/events.d.ts +12 -2
  210. package/es/ts-types/events.js.map +1 -1
  211. package/es/ts-types/list-table/define/basic-define.d.ts +5 -1
  212. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  213. package/es/ts-types/list-table/layout-map/api.d.ts +1 -1
  214. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  215. package/es/ts-types/table-engine.d.ts +13 -1
  216. package/es/ts-types/table-engine.js.map +1 -1
  217. package/package.json +11 -7
@@ -20,7 +20,7 @@ import { NumberMap } from "../tools/NumberMap";
20
20
 
21
21
  import { Rect } from "../tools/Rect";
22
22
 
23
- import { defaultOrderFn, throttle2 } from "../tools/util";
23
+ import { throttle2 } from "../tools/util";
24
24
 
25
25
  import themes from "../themes";
26
26
 
@@ -46,7 +46,7 @@ import { getProp } from "../scenegraph/utils/get-prop";
46
46
 
47
47
  import { IconCache } from "../plugins/icons";
48
48
 
49
- import { _applyColWidthLimits, _getScrollableVisibleRect, _getTargetFrozenColAt, _getTargetFrozenRowAt, _setDataSource, _setRecords, _toPxWidth, createRootElement, getStyleTheme, updateRootElementPadding } from "./tableHelper";
49
+ import { _applyColWidthLimits, _getScrollableVisibleRect, _getTargetFrozenColAt, _getTargetFrozenRowAt, _setDataSource, _toPxWidth, createRootElement, getStyleTheme, updateRootElementPadding } from "./tableHelper";
50
50
 
51
51
  import { MenuHandler } from "../components/menu/dom/MenuHandler";
52
52
 
@@ -72,10 +72,10 @@ export class BaseTable extends EventTarget {
72
72
  }
73
73
  constructor(container, options = {}) {
74
74
  var _a, _b, _c, _d, _e, _f, _g;
75
- if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.15.0-alpha.3",
75
+ if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.15.0",
76
76
  this.id = `VTable${Date.now()}`, this.isReleased = !1, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
77
77
  !container && "node" !== options.mode) throw new Error("vtable's container is undefined");
78
- 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, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior} = options;
78
+ 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, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth} = options;
79
79
  this.container = container, this.options = options, this.options.container = container,
80
80
  this._widthMode = widthMode, this._heightMode = heightMode, this._autoFillWidth = autoFillWidth,
81
81
  this._autoFillHeight = autoFillHeight, this.customRender = customRender, this.padding = {
@@ -115,6 +115,7 @@ export class BaseTable extends EventTarget {
115
115
  internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this),
116
116
  internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : internalProps.colCount,
117
117
  internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
118
+ internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
118
119
  this._vDataSet = new DataSet, this.scenegraph = new Scenegraph(this), this.stateManeger = new StateManeger(this),
119
120
  this.eventManeger = new EventManeger(this), options.legends && (internalProps.legends = createLegend(options.legends, this),
120
121
  this.scenegraph.tableGroup.setAttributes({
@@ -161,8 +162,8 @@ export class BaseTable extends EventTarget {
161
162
  this.internalProps.colCount = colCount;
162
163
  }
163
164
  get frozenColCount() {
164
- var _a;
165
- return null !== (_a = this.internalProps.frozenColCount) && void 0 !== _a ? _a : 0;
165
+ var _a, _b, _c;
166
+ return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.frozenColCount) && void 0 !== _b ? _b : this.internalProps.frozenColCount) && void 0 !== _c ? _c : 0;
166
167
  }
167
168
  set frozenColCount(frozenColCount) {
168
169
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
@@ -181,22 +182,22 @@ export class BaseTable extends EventTarget {
181
182
  this.options.frozenColCount && (this.tableNoFrameWidth - this.getColsWidth(0, this.options.frozenColCount - 1) <= 120 ? this._setFrozenColCount(0) : this.frozenColCount !== this.options.frozenColCount && this._setFrozenColCount(this.options.frozenColCount));
182
183
  }
183
184
  get frozenRowCount() {
184
- var _a;
185
- return null !== (_a = this.internalProps.frozenRowCount) && void 0 !== _a ? _a : 0;
185
+ var _a, _b, _c;
186
+ return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.frozenRowCount) && void 0 !== _b ? _b : this.internalProps.frozenRowCount) && void 0 !== _c ? _c : 0;
186
187
  }
187
188
  set frozenRowCount(frozenRowCount) {
188
189
  this.internalProps.frozenRowCount = frozenRowCount;
189
190
  }
190
191
  get rightFrozenColCount() {
191
- var _a;
192
- return null !== (_a = this.internalProps.rightFrozenColCount) && void 0 !== _a ? _a : 0;
192
+ var _a, _b, _c;
193
+ return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.rightFrozenColCount) && void 0 !== _b ? _b : this.internalProps.rightFrozenColCount) && void 0 !== _c ? _c : 0;
193
194
  }
194
195
  set rightFrozenColCount(rightFrozenColCount) {
195
196
  this.scenegraph.dealWidthRightFrozen(rightFrozenColCount);
196
197
  }
197
198
  get bottomFrozenRowCount() {
198
- var _a;
199
- return null !== (_a = this.internalProps.bottomFrozenRowCount) && void 0 !== _a ? _a : 0;
199
+ var _a, _b, _c;
200
+ return null !== (_c = null !== (_b = null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.bottomFrozenRowCount) && void 0 !== _b ? _b : this.internalProps.bottomFrozenRowCount) && void 0 !== _c ? _c : 0;
200
201
  }
201
202
  set bottomFrozenRowCount(bottomFrozenRowCount) {
202
203
  this.scenegraph.dealWidthBottomFrozen(bottomFrozenRowCount);
@@ -397,8 +398,8 @@ export class BaseTable extends EventTarget {
397
398
  return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
398
399
  }
399
400
  getColWidth(col) {
400
- var _a;
401
- const width = null !== (_a = this.colWidthsMap.get(col)) && void 0 !== _a ? _a : this.defaultColWidth;
401
+ var _a, _b;
402
+ const width = null !== (_a = this.colWidthsMap.get(col)) && void 0 !== _a ? _a : col < this.rowHeaderLevelCount ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_b = this.defaultHeaderColWidth[col]) && void 0 !== _b ? _b : this.defaultColWidth : this.defaultHeaderColWidth : this.defaultColWidth;
402
403
  return "adaptive" === this.widthMode && "number" == typeof width || this.transpose && "number" == typeof width ? this._colWidthDefineToPxWidth(width) : this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
403
404
  }
404
405
  setColWidth(col, width, clearCache, skipCheckFrozen) {
@@ -688,14 +689,15 @@ export class BaseTable extends EventTarget {
688
689
  this.release();
689
690
  }
690
691
  release() {
691
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
692
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
692
693
  const internalProps = this.internalProps;
693
694
  null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a),
694
695
  null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c),
695
696
  IconCache.clearAll(), null === (_e = super.release) || void 0 === _e || _e.call(this),
696
697
  null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f),
697
698
  null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h),
698
- internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
699
+ null === (_k = internalProps.legends) || void 0 === _k || _k.release(), null === (_l = internalProps.title) || void 0 === _l || _l.release(),
700
+ internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
699
701
  var _a;
700
702
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
701
703
  })), internalProps.releaseList = null), this.scenegraph.stage.release();
@@ -708,7 +710,7 @@ export class BaseTable extends EventTarget {
708
710
  updateOption(options) {
709
711
  var _a, _b, _c, _d, _e;
710
712
  this.options = options;
711
- const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, pixelRatio: pixelRatio, widthMode: widthMode, heightMode: heightMode, autoFillWidth: autoFillWidth, autoFillHeight: autoFillHeight, customRender: customRender, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, overscrollBehavior: overscrollBehavior} = options;
713
+ const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, pixelRatio: pixelRatio, widthMode: widthMode, heightMode: heightMode, autoFillWidth: autoFillWidth, autoFillHeight: autoFillHeight, customRender: customRender, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth} = options;
712
714
  pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
713
715
  padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding,
714
716
  this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top),
@@ -732,6 +734,7 @@ export class BaseTable extends EventTarget {
732
734
  this.colContentWidthsMap = new NumberMap, this.colWidthsLimit = {}, internalProps.theme = themes.of(null !== (_a = options.theme) && void 0 !== _a ? _a : themes.DEFAULT),
733
735
  internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_b = options.allowFrozenColCount) && void 0 !== _b ? _b : internalProps.colCount,
734
736
  internalProps.limitMaxAutoWidth = null !== (_c = options.limitMaxAutoWidth) && void 0 !== _c ? _c : 450,
737
+ internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
735
738
  this._vDataSet = new DataSet, null === (_d = internalProps.legends) || void 0 === _d || _d.release(),
736
739
  null === (_e = internalProps.title) || void 0 === _e || _e.release(), internalProps.layoutMap.release(),
737
740
  this.scenegraph.clearCells(), this.stateManeger.initState(), this._updateSize(),
@@ -1064,31 +1067,6 @@ export class BaseTable extends EventTarget {
1064
1067
  }
1065
1068
  return description;
1066
1069
  }
1067
- setRecords(records, sort) {
1068
- var _a, _b;
1069
- "undefined" != typeof window && window.performance.now();
1070
- if (this.scenegraph.clearCells(), void 0 !== sort && (this.internalProps.sortState = sort,
1071
- this.stateManeger.setSortState(this.sortState)), records) {
1072
- if (_setRecords(this, records), this.sortState) {
1073
- let order, field, fieldKey;
1074
- if (Array.isArray(this.sortState) ? 0 !== this.sortState.length && ({order: order, field: field, fieldKey: fieldKey} = null === (_a = this.sortState) || void 0 === _a ? void 0 : _a[0]) : ({order: order, field: field, fieldKey: fieldKey} = this.sortState),
1075
- order && field && "normal" !== order) {
1076
- const sortFunc = this._getSortFuncFromHeaderOption(void 0, field, fieldKey);
1077
- let hd;
1078
- hd = fieldKey ? this.internalProps.layoutMap.headerObjects.find((col => col && col.fieldKey === fieldKey)) : this.internalProps.layoutMap.headerObjects.find((col => col && col.field === field)),
1079
- (null === (_b = null == hd ? void 0 : hd.define) || void 0 === _b ? void 0 : _b.sort) && this.dataSource.sort(hd.field, order, null != sortFunc ? sortFunc : defaultOrderFn);
1080
- }
1081
- }
1082
- this.refreshRowColCount();
1083
- } else _setRecords(this, records);
1084
- this.stateManeger.initCheckedState(records), this.internalProps.frozenColCount = this.options.frozenColCount || this.rowHeaderLevelCount,
1085
- this.scenegraph.createSceneGraph(), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(),
1086
- this.internalProps.title.resize(), this.scenegraph.resize()), this.render();
1087
- }
1088
- setRecord(record, col, row) {
1089
- const index = this.getRecordIndexByCell(col, row);
1090
- this.dataSource.setRecord(record, index);
1091
- }
1092
1070
  setDropDownMenuHighlight(cells) {
1093
1071
  this.stateManeger.setDropDownMenuHighlight(cells);
1094
1072
  }
@@ -1322,62 +1300,64 @@ export class BaseTable extends EventTarget {
1322
1300
  this.render();
1323
1301
  }
1324
1302
  getCopyValue() {
1325
- var _a;
1326
- if (!(null === (_a = this.stateManeger.select) || void 0 === _a ? void 0 : _a.ranges)) return null;
1327
- const ranges = this.stateManeger.select.ranges;
1328
- let minCol = Math.min(ranges[0].start.col, ranges[0].end.col), maxCol = Math.max(ranges[0].start.col, ranges[0].end.col), minRow = Math.min(ranges[0].start.row, ranges[0].end.row), maxRow = Math.max(ranges[0].start.row, ranges[0].end.row);
1329
- ranges.forEach((a => {
1330
- minCol = Math.min(minCol, a.start.col, a.end.col), maxCol = Math.max(maxCol, a.start.col, a.end.col),
1331
- minRow = Math.min(minRow, a.start.row, a.end.row), maxRow = Math.max(maxRow, a.start.row, a.end.row);
1332
- }));
1333
- const isExistDataInRow = r => {
1334
- let isExist = !1;
1335
- return ranges.forEach((range => {
1336
- const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row);
1337
- minRow <= r && maxRow >= r && (isExist = !0);
1338
- })), isExist;
1339
- }, isExistDataInCol = c => {
1340
- let isExist = !1;
1341
- return ranges.forEach((range => {
1342
- const minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
1343
- minCol <= c && maxCol >= c && (isExist = !0);
1344
- })), isExist;
1345
- }, getRangeExistDataInCell = (c, r) => {
1346
- let isExistRange;
1347
- return ranges.forEach((range => {
1348
- const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row), minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
1349
- minCol <= c && maxCol >= c && minRow <= r && maxRow >= r && (isExistRange = range);
1350
- })), isExistRange;
1351
- }, getCopyCellValue = (col, row, range) => {
1352
- const cellRange = this.getCellRange(col, row);
1353
- let copyStartCol = cellRange.start.col, copyStartRow = cellRange.start.row;
1354
- if (range) {
1355
- const rangeMinCol = Math.min(range.start.col, range.end.col), rangeMinRow = Math.min(range.start.row, range.end.row);
1356
- copyStartCol = Math.max(rangeMinCol, cellRange.start.col), copyStartRow = Math.max(rangeMinRow, cellRange.start.row);
1357
- }
1358
- if (copyStartCol !== col || copyStartRow !== row) return "";
1359
- return this.getCellValue(col, row);
1360
- };
1361
- let copyValue = "";
1362
- for (let r = minRow; r <= maxRow; r++) {
1363
- if (isExistDataInRow(r)) {
1364
- for (let c = minCol; c <= maxCol; c++) {
1365
- if (isExistDataInCol(c)) {
1366
- const range = getRangeExistDataInCell(c, r);
1367
- if (range) {
1368
- const copyCellValue = getCopyCellValue(c, r, range);
1369
- if ("undefined" != typeof Promise && copyCellValue instanceof Promise) ; else {
1370
- const strCellValue = `${copyCellValue}`;
1371
- /^\[object .*\]$/.exec(strCellValue) || (copyValue += strCellValue);
1372
- }
1373
- (c < range.end.col || c < maxCol) && (copyValue += "\t");
1374
- } else copyValue += "\t";
1303
+ var _a, _b;
1304
+ if ((null === (_b = null === (_a = this.stateManeger.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0) {
1305
+ const ranges = this.stateManeger.select.ranges;
1306
+ let minCol = Math.min(ranges[0].start.col, ranges[0].end.col), maxCol = Math.max(ranges[0].start.col, ranges[0].end.col), minRow = Math.min(ranges[0].start.row, ranges[0].end.row), maxRow = Math.max(ranges[0].start.row, ranges[0].end.row);
1307
+ ranges.forEach((a => {
1308
+ minCol = Math.min(minCol, a.start.col, a.end.col), maxCol = Math.max(maxCol, a.start.col, a.end.col),
1309
+ minRow = Math.min(minRow, a.start.row, a.end.row), maxRow = Math.max(maxRow, a.start.row, a.end.row);
1310
+ }));
1311
+ const isExistDataInRow = r => {
1312
+ let isExist = !1;
1313
+ return ranges.forEach((range => {
1314
+ const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row);
1315
+ minRow <= r && maxRow >= r && (isExist = !0);
1316
+ })), isExist;
1317
+ }, isExistDataInCol = c => {
1318
+ let isExist = !1;
1319
+ return ranges.forEach((range => {
1320
+ const minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
1321
+ minCol <= c && maxCol >= c && (isExist = !0);
1322
+ })), isExist;
1323
+ }, getRangeExistDataInCell = (c, r) => {
1324
+ let isExistRange;
1325
+ return ranges.forEach((range => {
1326
+ const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row), minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
1327
+ minCol <= c && maxCol >= c && minRow <= r && maxRow >= r && (isExistRange = range);
1328
+ })), isExistRange;
1329
+ }, getCopyCellValue = (col, row, range) => {
1330
+ const cellRange = this.getCellRange(col, row);
1331
+ let copyStartCol = cellRange.start.col, copyStartRow = cellRange.start.row;
1332
+ if (range) {
1333
+ const rangeMinCol = Math.min(range.start.col, range.end.col), rangeMinRow = Math.min(range.start.row, range.end.row);
1334
+ copyStartCol = Math.max(rangeMinCol, cellRange.start.col), copyStartRow = Math.max(rangeMinRow, cellRange.start.row);
1335
+ }
1336
+ if (copyStartCol !== col || copyStartRow !== row) return "";
1337
+ return this.getCellValue(col, row);
1338
+ };
1339
+ let copyValue = "";
1340
+ for (let r = minRow; r <= maxRow; r++) {
1341
+ if (isExistDataInRow(r)) {
1342
+ for (let c = minCol; c <= maxCol; c++) {
1343
+ if (isExistDataInCol(c)) {
1344
+ const range = getRangeExistDataInCell(c, r);
1345
+ if (range) {
1346
+ const copyCellValue = getCopyCellValue(c, r, range);
1347
+ if ("undefined" != typeof Promise && copyCellValue instanceof Promise) ; else {
1348
+ const strCellValue = `${copyCellValue}`;
1349
+ /^\[object .*\]$/.exec(strCellValue) || (copyValue += strCellValue);
1350
+ }
1351
+ (c < range.end.col || c < maxCol) && (copyValue += "\t");
1352
+ } else copyValue += "\t";
1353
+ }
1375
1354
  }
1355
+ copyValue += "\n";
1376
1356
  }
1377
- copyValue += "\n";
1378
1357
  }
1358
+ return copyValue;
1379
1359
  }
1380
- return copyValue;
1360
+ return "";
1381
1361
  }
1382
1362
  getSelectedCellInfos() {
1383
1363
  var _a;