@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
@@ -45,10 +45,10 @@ class BaseTable extends EventTarget_1.EventTarget {
45
45
  }
46
46
  constructor(container, options = {}) {
47
47
  var _a, _b, _c, _d, _e, _f, _g;
48
- if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.15.0-alpha.3",
48
+ if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.15.0",
49
49
  this.id = `VTable${Date.now()}`, this.isReleased = !1, this.throttleInvalidate = (0,
50
50
  util_1.throttle2)(this.render.bind(this), 200), !container && "node" !== options.mode) throw new Error("vtable's container is undefined");
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, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, 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} = options;
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, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, 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} = options;
52
52
  this.container = container, this.options = options, this.options.container = container,
53
53
  this._widthMode = widthMode, this._heightMode = heightMode, this._autoFillWidth = autoFillWidth,
54
54
  this._autoFillHeight = autoFillHeight, this.customRender = customRender, this.padding = {
@@ -89,6 +89,7 @@ class BaseTable extends EventTarget_1.EventTarget {
89
89
  internalProps.bodyHelper = new body_helper_1.BodyHelper(this), internalProps.headerHelper = new header_helper_1.HeaderHelper(this),
90
90
  internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : internalProps.colCount,
91
91
  internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
92
+ internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
92
93
  this._vDataSet = new vdataset_1.DataSet, this.scenegraph = new scenegraph_1.Scenegraph(this),
93
94
  this.stateManeger = new state_1.StateManeger(this), this.eventManeger = new event_1.EventManeger(this),
94
95
  options.legends && (internalProps.legends = (0, create_legend_1.createLegend)(options.legends, this),
@@ -136,8 +137,8 @@ class BaseTable extends EventTarget_1.EventTarget {
136
137
  this.internalProps.colCount = colCount;
137
138
  }
138
139
  get frozenColCount() {
139
- var _a;
140
- return null !== (_a = this.internalProps.frozenColCount) && void 0 !== _a ? _a : 0;
140
+ var _a, _b, _c;
141
+ 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;
141
142
  }
142
143
  set frozenColCount(frozenColCount) {
143
144
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
@@ -156,22 +157,22 @@ class BaseTable extends EventTarget_1.EventTarget {
156
157
  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));
157
158
  }
158
159
  get frozenRowCount() {
159
- var _a;
160
- return null !== (_a = this.internalProps.frozenRowCount) && void 0 !== _a ? _a : 0;
160
+ var _a, _b, _c;
161
+ 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;
161
162
  }
162
163
  set frozenRowCount(frozenRowCount) {
163
164
  this.internalProps.frozenRowCount = frozenRowCount;
164
165
  }
165
166
  get rightFrozenColCount() {
166
- var _a;
167
- return null !== (_a = this.internalProps.rightFrozenColCount) && void 0 !== _a ? _a : 0;
167
+ var _a, _b, _c;
168
+ 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;
168
169
  }
169
170
  set rightFrozenColCount(rightFrozenColCount) {
170
171
  this.scenegraph.dealWidthRightFrozen(rightFrozenColCount);
171
172
  }
172
173
  get bottomFrozenRowCount() {
173
- var _a;
174
- return null !== (_a = this.internalProps.bottomFrozenRowCount) && void 0 !== _a ? _a : 0;
174
+ var _a, _b, _c;
175
+ 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;
175
176
  }
176
177
  set bottomFrozenRowCount(bottomFrozenRowCount) {
177
178
  this.scenegraph.dealWidthBottomFrozen(bottomFrozenRowCount);
@@ -374,8 +375,8 @@ class BaseTable extends EventTarget_1.EventTarget {
374
375
  return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
375
376
  }
376
377
  getColWidth(col) {
377
- var _a;
378
- const width = null !== (_a = this.colWidthsMap.get(col)) && void 0 !== _a ? _a : this.defaultColWidth;
378
+ var _a, _b;
379
+ 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;
379
380
  return "adaptive" === this.widthMode && "number" == typeof width || this.transpose && "number" == typeof width ? this._colWidthDefineToPxWidth(width) : this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
380
381
  }
381
382
  setColWidth(col, width, clearCache, skipCheckFrozen) {
@@ -667,14 +668,15 @@ class BaseTable extends EventTarget_1.EventTarget {
667
668
  this.release();
668
669
  }
669
670
  release() {
670
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
671
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
671
672
  const internalProps = this.internalProps;
672
673
  null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a),
673
674
  null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c),
674
675
  icons_1.IconCache.clearAll(), null === (_e = super.release) || void 0 === _e || _e.call(this),
675
676
  null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f),
676
677
  null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h),
677
- internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
678
+ null === (_k = internalProps.legends) || void 0 === _k || _k.release(), null === (_l = internalProps.title) || void 0 === _l || _l.release(),
679
+ internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
678
680
  var _a;
679
681
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
680
682
  })), internalProps.releaseList = null), this.scenegraph.stage.release();
@@ -687,7 +689,7 @@ class BaseTable extends EventTarget_1.EventTarget {
687
689
  updateOption(options) {
688
690
  var _a, _b, _c, _d, _e;
689
691
  this.options = options;
690
- 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;
692
+ 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;
691
693
  pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
692
694
  padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding,
693
695
  this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top),
@@ -713,6 +715,7 @@ class BaseTable extends EventTarget_1.EventTarget {
713
715
  internalProps.theme = themes_1.default.of(null !== (_a = options.theme) && void 0 !== _a ? _a : themes_1.default.DEFAULT),
714
716
  internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_b = options.allowFrozenColCount) && void 0 !== _b ? _b : internalProps.colCount,
715
717
  internalProps.limitMaxAutoWidth = null !== (_c = options.limitMaxAutoWidth) && void 0 !== _c ? _c : 450,
718
+ internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
716
719
  this._vDataSet = new vdataset_1.DataSet, null === (_d = internalProps.legends) || void 0 === _d || _d.release(),
717
720
  null === (_e = internalProps.title) || void 0 === _e || _e.release(), internalProps.layoutMap.release(),
718
721
  this.scenegraph.clearCells(), this.stateManeger.initState(), this._updateSize(),
@@ -1046,31 +1049,6 @@ class BaseTable extends EventTarget_1.EventTarget {
1046
1049
  }
1047
1050
  return description;
1048
1051
  }
1049
- setRecords(records, sort) {
1050
- var _a, _b;
1051
- "undefined" != typeof window && window.performance.now();
1052
- if (this.scenegraph.clearCells(), void 0 !== sort && (this.internalProps.sortState = sort,
1053
- this.stateManeger.setSortState(this.sortState)), records) {
1054
- if ((0, tableHelper_1._setRecords)(this, records), this.sortState) {
1055
- let order, field, fieldKey;
1056
- 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),
1057
- order && field && "normal" !== order) {
1058
- const sortFunc = this._getSortFuncFromHeaderOption(void 0, field, fieldKey);
1059
- let hd;
1060
- hd = fieldKey ? this.internalProps.layoutMap.headerObjects.find((col => col && col.fieldKey === fieldKey)) : this.internalProps.layoutMap.headerObjects.find((col => col && col.field === field)),
1061
- (null === (_b = null == hd ? void 0 : hd.define) || void 0 === _b ? void 0 : _b.sort) && this.dataSource.sort(hd.field, order, null != sortFunc ? sortFunc : util_1.defaultOrderFn);
1062
- }
1063
- }
1064
- this.refreshRowColCount();
1065
- } else (0, tableHelper_1._setRecords)(this, records);
1066
- this.stateManeger.initCheckedState(records), this.internalProps.frozenColCount = this.options.frozenColCount || this.rowHeaderLevelCount,
1067
- this.scenegraph.createSceneGraph(), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(),
1068
- this.internalProps.title.resize(), this.scenegraph.resize()), this.render();
1069
- }
1070
- setRecord(record, col, row) {
1071
- const index = this.getRecordIndexByCell(col, row);
1072
- this.dataSource.setRecord(record, index);
1073
- }
1074
1052
  setDropDownMenuHighlight(cells) {
1075
1053
  this.stateManeger.setDropDownMenuHighlight(cells);
1076
1054
  }
@@ -1304,62 +1282,64 @@ class BaseTable extends EventTarget_1.EventTarget {
1304
1282
  this.render();
1305
1283
  }
1306
1284
  getCopyValue() {
1307
- var _a;
1308
- if (!(null === (_a = this.stateManeger.select) || void 0 === _a ? void 0 : _a.ranges)) return null;
1309
- const ranges = this.stateManeger.select.ranges;
1310
- 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);
1311
- ranges.forEach((a => {
1312
- minCol = Math.min(minCol, a.start.col, a.end.col), maxCol = Math.max(maxCol, a.start.col, a.end.col),
1313
- minRow = Math.min(minRow, a.start.row, a.end.row), maxRow = Math.max(maxRow, a.start.row, a.end.row);
1314
- }));
1315
- const isExistDataInRow = r => {
1316
- let isExist = !1;
1317
- return ranges.forEach((range => {
1318
- const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row);
1319
- minRow <= r && maxRow >= r && (isExist = !0);
1320
- })), isExist;
1321
- }, isExistDataInCol = c => {
1322
- let isExist = !1;
1323
- return ranges.forEach((range => {
1324
- const minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
1325
- minCol <= c && maxCol >= c && (isExist = !0);
1326
- })), isExist;
1327
- }, getRangeExistDataInCell = (c, r) => {
1328
- let isExistRange;
1329
- return ranges.forEach((range => {
1330
- 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);
1331
- minCol <= c && maxCol >= c && minRow <= r && maxRow >= r && (isExistRange = range);
1332
- })), isExistRange;
1333
- }, getCopyCellValue = (col, row, range) => {
1334
- const cellRange = this.getCellRange(col, row);
1335
- let copyStartCol = cellRange.start.col, copyStartRow = cellRange.start.row;
1336
- if (range) {
1337
- const rangeMinCol = Math.min(range.start.col, range.end.col), rangeMinRow = Math.min(range.start.row, range.end.row);
1338
- copyStartCol = Math.max(rangeMinCol, cellRange.start.col), copyStartRow = Math.max(rangeMinRow, cellRange.start.row);
1339
- }
1340
- if (copyStartCol !== col || copyStartRow !== row) return "";
1341
- return this.getCellValue(col, row);
1342
- };
1343
- let copyValue = "";
1344
- for (let r = minRow; r <= maxRow; r++) {
1345
- if (isExistDataInRow(r)) {
1346
- for (let c = minCol; c <= maxCol; c++) {
1347
- if (isExistDataInCol(c)) {
1348
- const range = getRangeExistDataInCell(c, r);
1349
- if (range) {
1350
- const copyCellValue = getCopyCellValue(c, r, range);
1351
- if ("undefined" != typeof Promise && copyCellValue instanceof Promise) ; else {
1352
- const strCellValue = `${copyCellValue}`;
1353
- /^\[object .*\]$/.exec(strCellValue) || (copyValue += strCellValue);
1354
- }
1355
- (c < range.end.col || c < maxCol) && (copyValue += "\t");
1356
- } else copyValue += "\t";
1285
+ var _a, _b;
1286
+ if ((null === (_b = null === (_a = this.stateManeger.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0) {
1287
+ const ranges = this.stateManeger.select.ranges;
1288
+ 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);
1289
+ ranges.forEach((a => {
1290
+ minCol = Math.min(minCol, a.start.col, a.end.col), maxCol = Math.max(maxCol, a.start.col, a.end.col),
1291
+ minRow = Math.min(minRow, a.start.row, a.end.row), maxRow = Math.max(maxRow, a.start.row, a.end.row);
1292
+ }));
1293
+ const isExistDataInRow = r => {
1294
+ let isExist = !1;
1295
+ return ranges.forEach((range => {
1296
+ const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row);
1297
+ minRow <= r && maxRow >= r && (isExist = !0);
1298
+ })), isExist;
1299
+ }, isExistDataInCol = c => {
1300
+ let isExist = !1;
1301
+ return ranges.forEach((range => {
1302
+ const minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
1303
+ minCol <= c && maxCol >= c && (isExist = !0);
1304
+ })), isExist;
1305
+ }, getRangeExistDataInCell = (c, r) => {
1306
+ let isExistRange;
1307
+ return ranges.forEach((range => {
1308
+ 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);
1309
+ minCol <= c && maxCol >= c && minRow <= r && maxRow >= r && (isExistRange = range);
1310
+ })), isExistRange;
1311
+ }, getCopyCellValue = (col, row, range) => {
1312
+ const cellRange = this.getCellRange(col, row);
1313
+ let copyStartCol = cellRange.start.col, copyStartRow = cellRange.start.row;
1314
+ if (range) {
1315
+ const rangeMinCol = Math.min(range.start.col, range.end.col), rangeMinRow = Math.min(range.start.row, range.end.row);
1316
+ copyStartCol = Math.max(rangeMinCol, cellRange.start.col), copyStartRow = Math.max(rangeMinRow, cellRange.start.row);
1317
+ }
1318
+ if (copyStartCol !== col || copyStartRow !== row) return "";
1319
+ return this.getCellValue(col, row);
1320
+ };
1321
+ let copyValue = "";
1322
+ for (let r = minRow; r <= maxRow; r++) {
1323
+ if (isExistDataInRow(r)) {
1324
+ for (let c = minCol; c <= maxCol; c++) {
1325
+ if (isExistDataInCol(c)) {
1326
+ const range = getRangeExistDataInCell(c, r);
1327
+ if (range) {
1328
+ const copyCellValue = getCopyCellValue(c, r, range);
1329
+ if ("undefined" != typeof Promise && copyCellValue instanceof Promise) ; else {
1330
+ const strCellValue = `${copyCellValue}`;
1331
+ /^\[object .*\]$/.exec(strCellValue) || (copyValue += strCellValue);
1332
+ }
1333
+ (c < range.end.col || c < maxCol) && (copyValue += "\t");
1334
+ } else copyValue += "\t";
1335
+ }
1357
1336
  }
1337
+ copyValue += "\n";
1358
1338
  }
1359
- copyValue += "\n";
1360
1339
  }
1340
+ return copyValue;
1361
1341
  }
1362
- return copyValue;
1342
+ return "";
1363
1343
  }
1364
1344
  getSelectedCellInfos() {
1365
1345
  var _a;