@visactor/vtable 0.23.4 → 0.24.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 (269) hide show
  1. package/cjs/ListTable.d.ts +5 -1
  2. package/cjs/ListTable.js +20 -5
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +1 -1
  5. package/cjs/PivotChart.js +5 -3
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +4 -1
  8. package/cjs/PivotTable.js +31 -14
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/body-helper/body-helper.d.ts +2 -1
  11. package/cjs/body-helper/body-helper.js +4 -1
  12. package/cjs/body-helper/body-helper.js.map +1 -1
  13. package/cjs/body-helper/style/RadioStyle.d.ts +45 -0
  14. package/cjs/body-helper/style/RadioStyle.js +111 -0
  15. package/cjs/body-helper/style/RadioStyle.js.map +1 -0
  16. package/cjs/body-helper/style.js +3 -3
  17. package/cjs/body-helper/style.js.map +1 -1
  18. package/cjs/core/BaseTable.d.ts +3 -1
  19. package/cjs/core/BaseTable.js +16 -6
  20. package/cjs/core/BaseTable.js.map +1 -1
  21. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
  22. package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
  23. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  24. package/cjs/dataset/dataset.js +1 -1
  25. package/cjs/dataset/dataset.js.map +1 -1
  26. package/cjs/dataset/flatDataToObject.d.ts +1 -0
  27. package/cjs/dataset/flatDataToObject.js +7 -1
  28. package/cjs/dataset/flatDataToObject.js.map +1 -1
  29. package/cjs/edit/edit-manager.js +2 -0
  30. package/cjs/edit/edit-manager.js.map +1 -1
  31. package/cjs/event/event.js +1 -1
  32. package/cjs/event/event.js.map +1 -1
  33. package/cjs/event/listener/table-group.js +42 -0
  34. package/cjs/event/listener/table-group.js.map +1 -1
  35. package/cjs/event/util.d.ts +1 -0
  36. package/cjs/event/util.js +3 -2
  37. package/cjs/event/util.js.map +1 -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 +2 -2
  42. package/cjs/layout/pivot-header-layout.js +8 -11
  43. package/cjs/layout/pivot-header-layout.js.map +1 -1
  44. package/cjs/layout/tree-helper.js +6 -6
  45. package/cjs/layout/tree-helper.js.map +1 -1
  46. package/cjs/render/jsx/index.d.ts +3 -1
  47. package/cjs/render/jsx/index.js +10 -2
  48. package/cjs/render/jsx/index.js.map +1 -1
  49. package/cjs/render/layout/index.d.ts +1 -0
  50. package/cjs/render/layout/index.js +20 -6
  51. package/cjs/render/layout/index.js.map +1 -1
  52. package/cjs/scenegraph/component/custom.js +3 -3
  53. package/cjs/scenegraph/component/custom.js.map +1 -1
  54. package/cjs/scenegraph/group-creater/cell-helper.js +13 -11
  55. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  57. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +20 -5
  58. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  59. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
  60. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +24 -9
  61. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  62. package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +5 -5
  63. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +21 -5
  64. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  65. package/cjs/scenegraph/group-creater/cell-type/radio-cell.d.ts +5 -0
  66. package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +148 -0
  67. package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -0
  68. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
  69. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +19 -4
  70. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  71. package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
  72. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +24 -8
  73. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  74. package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
  75. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +21 -5
  76. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  77. package/cjs/scenegraph/group-creater/column-helper.d.ts +1 -1
  78. package/cjs/scenegraph/group-creater/column-helper.js +12 -2
  79. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  80. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  81. package/cjs/scenegraph/layout/compute-col-width.js +26 -6
  82. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  83. package/cjs/scenegraph/layout/compute-row-height.js +12 -34
  84. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  85. package/cjs/scenegraph/layout/height-util.d.ts +5 -0
  86. package/cjs/scenegraph/layout/height-util.js +88 -0
  87. package/cjs/scenegraph/layout/height-util.js.map +1 -0
  88. package/cjs/scenegraph/layout/update-height.js +1 -1
  89. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  90. package/cjs/scenegraph/layout/update-width.js +1 -1
  91. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  92. package/cjs/scenegraph/scenegraph.js +1 -1
  93. package/cjs/scenegraph/utils/break-string.d.ts +2 -1
  94. package/cjs/scenegraph/utils/break-string.js +13 -30
  95. package/cjs/scenegraph/utils/break-string.js.map +1 -1
  96. package/cjs/scenegraph/utils/text-icon-layout.js +7 -7
  97. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  98. package/cjs/state/checkbox/checkbox.d.ts +9 -0
  99. package/cjs/state/checkbox/checkbox.js +108 -0
  100. package/cjs/state/checkbox/checkbox.js.map +1 -0
  101. package/cjs/state/radio/radio.d.ts +6 -0
  102. package/cjs/state/radio/radio.js +80 -0
  103. package/cjs/state/radio/radio.js.map +1 -0
  104. package/cjs/state/state.d.ts +3 -0
  105. package/cjs/state/state.js +15 -71
  106. package/cjs/state/state.js.map +1 -1
  107. package/cjs/themes/component.js +1 -1
  108. package/cjs/themes/theme.d.ts +2 -0
  109. package/cjs/themes/theme.js +10 -1
  110. package/cjs/themes/theme.js.map +1 -1
  111. package/cjs/ts-types/base-table.d.ts +4 -1
  112. package/cjs/ts-types/base-table.js.map +1 -1
  113. package/cjs/ts-types/column/style.d.ts +20 -0
  114. package/cjs/ts-types/column/style.js.map +1 -1
  115. package/cjs/ts-types/column/type.d.ts +1 -1
  116. package/cjs/ts-types/column/type.js.map +1 -1
  117. package/cjs/ts-types/events.d.ts +4 -0
  118. package/cjs/ts-types/events.js.map +1 -1
  119. package/cjs/ts-types/list-table/define/index.d.ts +4 -2
  120. package/cjs/ts-types/list-table/define/index.js.map +1 -1
  121. package/cjs/ts-types/list-table/define/radio-define.d.ts +11 -0
  122. package/cjs/ts-types/list-table/define/radio-define.js +6 -0
  123. package/cjs/ts-types/list-table/define/radio-define.js.map +1 -0
  124. package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -1
  125. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  126. package/cjs/ts-types/table-engine.d.ts +1 -1
  127. package/cjs/ts-types/table-engine.js.map +1 -1
  128. package/cjs/ts-types/theme.d.ts +2 -1
  129. package/cjs/ts-types/theme.js.map +1 -1
  130. package/cjs/vrender.js.map +1 -1
  131. package/dist/vtable.js +2286 -901
  132. package/dist/vtable.min.js +2 -2
  133. package/es/ListTable.d.ts +5 -1
  134. package/es/ListTable.js +23 -4
  135. package/es/ListTable.js.map +1 -1
  136. package/es/PivotChart.d.ts +1 -1
  137. package/es/PivotChart.js +5 -3
  138. package/es/PivotChart.js.map +1 -1
  139. package/es/PivotTable.d.ts +4 -1
  140. package/es/PivotTable.js +31 -14
  141. package/es/PivotTable.js.map +1 -1
  142. package/es/body-helper/body-helper.d.ts +2 -1
  143. package/es/body-helper/body-helper.js +5 -0
  144. package/es/body-helper/body-helper.js.map +1 -1
  145. package/es/body-helper/style/RadioStyle.d.ts +45 -0
  146. package/es/body-helper/style/RadioStyle.js +103 -0
  147. package/es/body-helper/style/RadioStyle.js.map +1 -0
  148. package/es/body-helper/style.js +4 -2
  149. package/es/body-helper/style.js.map +1 -1
  150. package/es/core/BaseTable.d.ts +3 -1
  151. package/es/core/BaseTable.js +16 -6
  152. package/es/core/BaseTable.js.map +1 -1
  153. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
  154. package/es/core/TABLE_EVENT_TYPE.js +1 -0
  155. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  156. package/es/dataset/dataset.js +1 -1
  157. package/es/dataset/dataset.js.map +1 -1
  158. package/es/dataset/flatDataToObject.d.ts +1 -0
  159. package/es/dataset/flatDataToObject.js +7 -1
  160. package/es/dataset/flatDataToObject.js.map +1 -1
  161. package/es/edit/edit-manager.js +2 -0
  162. package/es/edit/edit-manager.js.map +1 -1
  163. package/es/event/event.js +1 -1
  164. package/es/event/event.js.map +1 -1
  165. package/es/event/listener/table-group.js +41 -1
  166. package/es/event/listener/table-group.js.map +1 -1
  167. package/es/event/util.d.ts +1 -0
  168. package/es/event/util.js +2 -0
  169. package/es/event/util.js.map +1 -1
  170. package/es/index.d.ts +1 -1
  171. package/es/index.js +1 -1
  172. package/es/index.js.map +1 -1
  173. package/es/layout/pivot-header-layout.d.ts +2 -2
  174. package/es/layout/pivot-header-layout.js +8 -11
  175. package/es/layout/pivot-header-layout.js.map +1 -1
  176. package/es/layout/tree-helper.js +6 -6
  177. package/es/layout/tree-helper.js.map +1 -1
  178. package/es/render/jsx/index.d.ts +3 -1
  179. package/es/render/jsx/index.js +9 -1
  180. package/es/render/jsx/index.js.map +1 -1
  181. package/es/render/layout/index.d.ts +1 -0
  182. package/es/render/layout/index.js +2 -0
  183. package/es/render/layout/index.js.map +1 -1
  184. package/es/scenegraph/component/custom.js +3 -3
  185. package/es/scenegraph/component/custom.js.map +1 -1
  186. package/es/scenegraph/group-creater/cell-helper.js +12 -10
  187. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  188. package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  189. package/es/scenegraph/group-creater/cell-type/chart-cell.js +20 -5
  190. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  191. package/es/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
  192. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +23 -8
  193. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  194. package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +5 -5
  195. package/es/scenegraph/group-creater/cell-type/image-cell.js +21 -5
  196. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  197. package/es/scenegraph/group-creater/cell-type/radio-cell.d.ts +5 -0
  198. package/es/scenegraph/group-creater/cell-type/radio-cell.js +141 -0
  199. package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -0
  200. package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
  201. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +19 -4
  202. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  203. package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
  204. package/es/scenegraph/group-creater/cell-type/text-cell.js +24 -8
  205. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  206. package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
  207. package/es/scenegraph/group-creater/cell-type/video-cell.js +21 -5
  208. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  209. package/es/scenegraph/group-creater/column-helper.d.ts +1 -1
  210. package/es/scenegraph/group-creater/column-helper.js +13 -1
  211. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  212. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  213. package/es/scenegraph/layout/compute-col-width.js +22 -7
  214. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  215. package/es/scenegraph/layout/compute-row-height.js +12 -36
  216. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  217. package/es/scenegraph/layout/height-util.d.ts +5 -0
  218. package/es/scenegraph/layout/height-util.js +83 -0
  219. package/es/scenegraph/layout/height-util.js.map +1 -0
  220. package/es/scenegraph/layout/update-height.js +1 -1
  221. package/es/scenegraph/layout/update-height.js.map +1 -1
  222. package/es/scenegraph/layout/update-width.js +1 -1
  223. package/es/scenegraph/layout/update-width.js.map +1 -1
  224. package/es/scenegraph/scenegraph.js +1 -1
  225. package/es/scenegraph/utils/break-string.d.ts +2 -1
  226. package/es/scenegraph/utils/break-string.js +6 -27
  227. package/es/scenegraph/utils/break-string.js.map +1 -1
  228. package/es/scenegraph/utils/text-icon-layout.js +8 -8
  229. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  230. package/es/state/checkbox/checkbox.d.ts +9 -0
  231. package/es/state/checkbox/checkbox.js +99 -0
  232. package/es/state/checkbox/checkbox.js.map +1 -0
  233. package/es/state/radio/radio.d.ts +6 -0
  234. package/es/state/radio/radio.js +65 -0
  235. package/es/state/radio/radio.js.map +1 -0
  236. package/es/state/state.d.ts +3 -0
  237. package/es/state/state.js +18 -71
  238. package/es/state/state.js.map +1 -1
  239. package/es/themes/component.js +1 -1
  240. package/es/themes/theme.d.ts +2 -0
  241. package/es/themes/theme.js +9 -1
  242. package/es/themes/theme.js.map +1 -1
  243. package/es/ts-types/base-table.d.ts +4 -1
  244. package/es/ts-types/base-table.js.map +1 -1
  245. package/es/ts-types/column/style.d.ts +20 -0
  246. package/es/ts-types/column/style.js.map +1 -1
  247. package/es/ts-types/column/type.d.ts +1 -1
  248. package/es/ts-types/column/type.js.map +1 -1
  249. package/es/ts-types/events.d.ts +4 -0
  250. package/es/ts-types/events.js.map +1 -1
  251. package/es/ts-types/list-table/define/index.d.ts +4 -2
  252. package/es/ts-types/list-table/define/index.js.map +1 -1
  253. package/es/ts-types/list-table/define/radio-define.d.ts +11 -0
  254. package/es/ts-types/list-table/define/radio-define.js +2 -0
  255. package/es/ts-types/list-table/define/radio-define.js.map +1 -0
  256. package/es/ts-types/list-table/layout-map/api.d.ts +1 -1
  257. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  258. package/es/ts-types/table-engine.d.ts +1 -1
  259. package/es/ts-types/table-engine.js.map +1 -1
  260. package/es/ts-types/theme.d.ts +2 -1
  261. package/es/ts-types/theme.js.map +1 -1
  262. package/es/vrender.js.map +1 -1
  263. package/package.json +7 -7
  264. package/cjs/scenegraph/layout/auto-height.d.ts +0 -1
  265. package/cjs/scenegraph/layout/auto-height.js +0 -15
  266. package/cjs/scenegraph/layout/auto-height.js.map +0 -1
  267. package/es/scenegraph/layout/auto-height.d.ts +0 -1
  268. package/es/scenegraph/layout/auto-height.js +0 -11
  269. package/es/scenegraph/layout/auto-height.js.map +0 -1
@@ -0,0 +1,45 @@
1
+ import type { RadioStyleOption, IStyleOption } from '../../ts-types';
2
+ import { Style } from './Style';
3
+ import type { RadioStyle as RadioStyleThemeOption } from '../../ts-types/column/style';
4
+ export declare class RadioStyle extends Style {
5
+ private _size;
6
+ private _spaceBetweenTextAndIcon;
7
+ private _spaceBetweenRadio;
8
+ private _outerRadius?;
9
+ private _innerRadius?;
10
+ private _defaultFill?;
11
+ private _defaultStroke?;
12
+ private _disableFill?;
13
+ private _checkedFill?;
14
+ private _checkedStroke?;
15
+ private _disableCheckedFill?;
16
+ private _disableCheckedStroke?;
17
+ static get DEFAULT(): RadioStyle;
18
+ constructor(style?: RadioStyleOption, headerStyle?: RadioStyleOption, radioThemeStyle?: RadioStyleThemeOption);
19
+ get size(): number;
20
+ set size(size: number);
21
+ get spaceBetweenTextAndIcon(): number;
22
+ set spaceBetweenTextAndIcon(spaceBetweenTextAndIcon: number);
23
+ get spaceBetweenRadio(): number;
24
+ set spaceBetweenRadio(spaceBetweenRadio: number);
25
+ get innerRadius(): number;
26
+ set innerRadius(innerRadius: number);
27
+ get outerRadius(): number;
28
+ set outerRadius(outerRadius: number);
29
+ get defaultFill(): string;
30
+ set defaultFill(defaultFill: string);
31
+ get defaultStroke(): string;
32
+ set defaultStroke(defaultStroke: string);
33
+ get disableFill(): string;
34
+ set disableFill(disableFill: string);
35
+ get checkedFill(): string;
36
+ set checkedFill(checkedFill: string);
37
+ get checkedStroke(): string;
38
+ set checkedStroke(checkedStroke: string);
39
+ get disableCheckedFill(): string;
40
+ set disableCheckedFill(disableCheckedFill: string);
41
+ get disableCheckedStroke(): string;
42
+ set disableCheckedStroke(disableCheckedStroke: string);
43
+ getStyle(style: IStyleOption): RadioStyle;
44
+ clone(): RadioStyle;
45
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.RadioStyle = void 0;
6
+
7
+ const Style_1 = require("./Style");
8
+
9
+ let defaultStyle;
10
+
11
+ class RadioStyle extends Style_1.Style {
12
+ static get DEFAULT() {
13
+ return defaultStyle || (defaultStyle = new RadioStyle);
14
+ }
15
+ constructor(style = {}, headerStyle = {}, radioThemeStyle = {}) {
16
+ 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;
17
+ super(style, headerStyle), this._size = (null !== (_b = null !== (_a = null == style ? void 0 : style.size) && void 0 !== _a ? _a : null == headerStyle ? void 0 : headerStyle.size) && void 0 !== _b ? _b : null == radioThemeStyle ? void 0 : radioThemeStyle.size) || 14,
18
+ this._spaceBetweenTextAndIcon = (null !== (_d = null !== (_c = null == style ? void 0 : style.spaceBetweenTextAndIcon) && void 0 !== _c ? _c : null == headerStyle ? void 0 : headerStyle.spaceBetweenTextAndIcon) && void 0 !== _d ? _d : null == radioThemeStyle ? void 0 : radioThemeStyle.spaceBetweenTextAndIcon) || 8,
19
+ this._spaceBetweenRadio = (null !== (_f = null !== (_e = null == style ? void 0 : style.spaceBetweenRadio) && void 0 !== _e ? _e : null == headerStyle ? void 0 : headerStyle.spaceBetweenRadio) && void 0 !== _f ? _f : null == radioThemeStyle ? void 0 : radioThemeStyle.spaceBetweenRadio) || 2,
20
+ this._innerRadius = null !== (_h = null === (_g = null == style ? void 0 : style.radioStyle) || void 0 === _g ? void 0 : _g.innerRadius) && void 0 !== _h ? _h : null == radioThemeStyle ? void 0 : radioThemeStyle.innerRadius,
21
+ this._outerRadius = null !== (_k = null === (_j = null == style ? void 0 : style.radioStyle) || void 0 === _j ? void 0 : _j.outerRadius) && void 0 !== _k ? _k : null == radioThemeStyle ? void 0 : radioThemeStyle.outerRadius,
22
+ this._defaultFill = null !== (_m = null === (_l = null == style ? void 0 : style.radioStyle) || void 0 === _l ? void 0 : _l.defaultFill) && void 0 !== _m ? _m : null == radioThemeStyle ? void 0 : radioThemeStyle.defaultFill,
23
+ this._defaultStroke = null !== (_p = null === (_o = null == style ? void 0 : style.radioStyle) || void 0 === _o ? void 0 : _o.defaultStroke) && void 0 !== _p ? _p : null == radioThemeStyle ? void 0 : radioThemeStyle.defaultStroke,
24
+ this._disableFill = null !== (_r = null === (_q = null == style ? void 0 : style.radioStyle) || void 0 === _q ? void 0 : _q.disableFill) && void 0 !== _r ? _r : null == radioThemeStyle ? void 0 : radioThemeStyle.disableFill,
25
+ this._checkedFill = null !== (_t = null === (_s = null == style ? void 0 : style.radioStyle) || void 0 === _s ? void 0 : _s.checkedFill) && void 0 !== _t ? _t : null == radioThemeStyle ? void 0 : radioThemeStyle.checkedFill,
26
+ this._checkedStroke = null !== (_v = null === (_u = null == style ? void 0 : style.radioStyle) || void 0 === _u ? void 0 : _u.checkedStroke) && void 0 !== _v ? _v : null == radioThemeStyle ? void 0 : radioThemeStyle.checkedStroke,
27
+ this._disableCheckedFill = null !== (_x = null === (_w = null == style ? void 0 : style.radioStyle) || void 0 === _w ? void 0 : _w.disableCheckedFill) && void 0 !== _x ? _x : null == radioThemeStyle ? void 0 : radioThemeStyle.disableCheckedFill,
28
+ this._disableCheckedStroke = null !== (_z = null === (_y = null == style ? void 0 : style.radioStyle) || void 0 === _y ? void 0 : _y.disableCheckedStroke) && void 0 !== _z ? _z : null == radioThemeStyle ? void 0 : radioThemeStyle.disableCheckedStroke;
29
+ }
30
+ get size() {
31
+ return this._size;
32
+ }
33
+ set size(size) {
34
+ this._size = size;
35
+ }
36
+ get spaceBetweenTextAndIcon() {
37
+ return this._spaceBetweenTextAndIcon;
38
+ }
39
+ set spaceBetweenTextAndIcon(spaceBetweenTextAndIcon) {
40
+ this._spaceBetweenTextAndIcon = spaceBetweenTextAndIcon;
41
+ }
42
+ get spaceBetweenRadio() {
43
+ return this._spaceBetweenRadio;
44
+ }
45
+ set spaceBetweenRadio(spaceBetweenRadio) {
46
+ this._spaceBetweenRadio = spaceBetweenRadio;
47
+ }
48
+ get innerRadius() {
49
+ return this._innerRadius;
50
+ }
51
+ set innerRadius(innerRadius) {
52
+ this._innerRadius = innerRadius;
53
+ }
54
+ get outerRadius() {
55
+ return this._outerRadius;
56
+ }
57
+ set outerRadius(outerRadius) {
58
+ this._outerRadius = outerRadius;
59
+ }
60
+ get defaultFill() {
61
+ return this._defaultFill;
62
+ }
63
+ set defaultFill(defaultFill) {
64
+ this._defaultFill = defaultFill;
65
+ }
66
+ get defaultStroke() {
67
+ return this._defaultStroke;
68
+ }
69
+ set defaultStroke(defaultStroke) {
70
+ this._defaultStroke = defaultStroke;
71
+ }
72
+ get disableFill() {
73
+ return this._disableFill;
74
+ }
75
+ set disableFill(disableFill) {
76
+ this._disableFill = disableFill;
77
+ }
78
+ get checkedFill() {
79
+ return this._checkedFill;
80
+ }
81
+ set checkedFill(checkedFill) {
82
+ this._checkedFill = checkedFill;
83
+ }
84
+ get checkedStroke() {
85
+ return this._checkedStroke;
86
+ }
87
+ set checkedStroke(checkedStroke) {
88
+ this._checkedStroke = checkedStroke;
89
+ }
90
+ get disableCheckedFill() {
91
+ return this._disableCheckedFill;
92
+ }
93
+ set disableCheckedFill(disableCheckedFill) {
94
+ this._disableCheckedFill = disableCheckedFill;
95
+ }
96
+ get disableCheckedStroke() {
97
+ return this._disableCheckedStroke;
98
+ }
99
+ set disableCheckedStroke(disableCheckedStroke) {
100
+ this._disableCheckedStroke = disableCheckedStroke;
101
+ }
102
+ getStyle(style) {
103
+ return new RadioStyle(style, this);
104
+ }
105
+ clone() {
106
+ return new RadioStyle(this);
107
+ }
108
+ }
109
+
110
+ exports.RadioStyle = RadioStyle;
111
+ //# sourceMappingURL=RadioStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/body-helper/style/RadioStyle.ts"],"names":[],"mappings":";;;AACA,mCAAgC;AAGhC,IAAI,YAAwB,CAAC;AAE7B,MAAa,UAAW,SAAQ,aAAK;IAgBnC,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,UAAU,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,YACE,QAA0B,EAAE,EAC5B,cAAgC,EAAE,EAClC,kBAAyC,EAAE;;QAE3C,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,CAAC,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,mCAAI,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QAC/E,IAAI,CAAC,wBAAwB;YAC3B,CAAC,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,uBAAuB,mCAC7B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I,CAAC,CAAC;IACrC,CAAC;IACD,KAAK;QACH,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF;AA3HD,gCA2HC","file":"RadioStyle.js","sourcesContent":["import type { RadioStyleOption, IStyleOption } from '../../ts-types';\nimport { Style } from './Style';\nimport type { RadioStyle as RadioStyleThemeOption } from '../../ts-types/column/style';\n\nlet defaultStyle: RadioStyle;\n\nexport class RadioStyle extends Style {\n private _size: number;\n private _spaceBetweenTextAndIcon: number;\n private _spaceBetweenRadio: number;\n\n private _outerRadius?: number;\n private _innerRadius?: number;\n\n private _defaultFill?: string;\n private _defaultStroke?: string;\n private _disableFill?: string;\n private _checkedFill?: string;\n private _checkedStroke?: string;\n private _disableCheckedFill?: string;\n private _disableCheckedStroke?: string;\n\n static get DEFAULT(): RadioStyle {\n return defaultStyle ? defaultStyle : (defaultStyle = new RadioStyle());\n }\n constructor(\n style: RadioStyleOption = {},\n headerStyle: RadioStyleOption = {},\n radioThemeStyle: RadioStyleThemeOption = {}\n ) {\n super(style, headerStyle);\n this._size = (style?.size ?? headerStyle?.size ?? radioThemeStyle?.size) || 14;\n this._spaceBetweenTextAndIcon =\n (style?.spaceBetweenTextAndIcon ??\n headerStyle?.spaceBetweenTextAndIcon ??\n radioThemeStyle?.spaceBetweenTextAndIcon) ||\n 8;\n this._spaceBetweenRadio =\n (style?.spaceBetweenRadio ?? headerStyle?.spaceBetweenRadio ?? radioThemeStyle?.spaceBetweenRadio) || 2;\n\n this._innerRadius = style?.radioStyle?.innerRadius ?? radioThemeStyle?.innerRadius;\n this._outerRadius = style?.radioStyle?.outerRadius ?? radioThemeStyle?.outerRadius;\n\n this._defaultFill = style?.radioStyle?.defaultFill ?? radioThemeStyle?.defaultFill;\n this._defaultStroke = style?.radioStyle?.defaultStroke ?? radioThemeStyle?.defaultStroke;\n this._disableFill = style?.radioStyle?.disableFill ?? radioThemeStyle?.disableFill;\n this._checkedFill = style?.radioStyle?.checkedFill ?? radioThemeStyle?.checkedFill;\n this._checkedStroke = style?.radioStyle?.checkedStroke ?? radioThemeStyle?.checkedStroke;\n this._disableCheckedFill = style?.radioStyle?.disableCheckedFill ?? radioThemeStyle?.disableCheckedFill;\n this._disableCheckedStroke = style?.radioStyle?.disableCheckedStroke ?? radioThemeStyle?.disableCheckedStroke;\n }\n get size(): number {\n return this._size;\n }\n set size(size: number) {\n this._size = size;\n }\n get spaceBetweenTextAndIcon(): number {\n return this._spaceBetweenTextAndIcon;\n }\n set spaceBetweenTextAndIcon(spaceBetweenTextAndIcon: number) {\n this._spaceBetweenTextAndIcon = spaceBetweenTextAndIcon;\n }\n get spaceBetweenRadio(): number {\n return this._spaceBetweenRadio;\n }\n set spaceBetweenRadio(spaceBetweenRadio: number) {\n this._spaceBetweenRadio = spaceBetweenRadio;\n }\n get innerRadius(): number {\n return this._innerRadius;\n }\n set innerRadius(innerRadius: number) {\n this._innerRadius = innerRadius;\n }\n get outerRadius(): number {\n return this._outerRadius;\n }\n set outerRadius(outerRadius: number) {\n this._outerRadius = outerRadius;\n }\n get defaultFill(): string {\n return this._defaultFill;\n }\n set defaultFill(defaultFill: string) {\n this._defaultFill = defaultFill;\n }\n get defaultStroke(): string {\n return this._defaultStroke;\n }\n set defaultStroke(defaultStroke: string) {\n this._defaultStroke = defaultStroke;\n }\n get disableFill(): string {\n return this._disableFill;\n }\n set disableFill(disableFill: string) {\n this._disableFill = disableFill;\n }\n get checkedFill(): string {\n return this._checkedFill;\n }\n set checkedFill(checkedFill: string) {\n this._checkedFill = checkedFill;\n }\n get checkedStroke(): string {\n return this._checkedStroke;\n }\n set checkedStroke(checkedStroke: string) {\n this._checkedStroke = checkedStroke;\n }\n get disableCheckedFill(): string {\n return this._disableCheckedFill;\n }\n set disableCheckedFill(disableCheckedFill: string) {\n this._disableCheckedFill = disableCheckedFill;\n }\n get disableCheckedStroke(): string {\n return this._disableCheckedStroke;\n }\n set disableCheckedStroke(disableCheckedStroke: string) {\n this._disableCheckedStroke = disableCheckedStroke;\n }\n getStyle(style: IStyleOption): RadioStyle {\n return new RadioStyle(style, this);\n }\n clone(): RadioStyle {\n return new RadioStyle(this);\n }\n}\n"]}
@@ -40,13 +40,13 @@ Object.defineProperty(exports, "Style", {
40
40
  }
41
41
  });
42
42
 
43
- const CheckboxStyle_1 = require("./style/CheckboxStyle"), {EVENT_TYPE: EVENT_TYPE} = Style_1.Style;
43
+ const CheckboxStyle_1 = require("./style/CheckboxStyle"), RadioStyle_1 = require("./style/RadioStyle"), {EVENT_TYPE: EVENT_TYPE} = Style_1.Style;
44
44
 
45
45
  function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style_1.Style, globalAutoWrapText, theme) {
46
- var _a;
46
+ var _a, _b;
47
47
  return columnStyle || bodyStyle ? columnStyle instanceof Style_1.Style ? columnStyle : "function" == typeof columnStyle ? of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme) : (columnStyle || (columnStyle = {}),
48
48
  globalAutoWrapText && !(0, vutils_1.isValid)(columnStyle.autoWrapText) && (columnStyle.autoWrapText = !0),
49
- StyleClassDef === CheckboxStyle_1.CheckboxStyle ? new CheckboxStyle_1.CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
49
+ StyleClassDef === CheckboxStyle_1.CheckboxStyle ? new CheckboxStyle_1.CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle_1.RadioStyle ? new RadioStyle_1.RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
50
50
  }
51
51
 
52
52
  exports.EVENT_TYPE = EVENT_TYPE, exports.of = of;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/body-helper/style.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAW3C,mDAAgD;AAY9C,2FAZO,uBAAU,OAYP;AAXZ,mEAAuD;AAYrD,0FAZO,8BAAS,OAYP;AAXX,qDAAkD;AAShD,4FATO,yBAAW,OASP;AARb,yCAAsC;AAOpC,sFAPO,aAAK,OAOP;AALP,yDAAsD;AAEtD,MAAM,EAAE,UAAU,EAAE,GAAG,aAAK,CAAC;AAE3B,gCAAU;AAUZ,SAAgB,EAAE,CAChB,WAA8B,EAC9B,SAA4B,EAC5B,QAAkC,EAClC,gBAA8B,aAAK,EACnC,kBAA2B,EAC3B,KAAiB;;IAEjB,IAAI,WAAW,IAAI,SAAS,EAAE;QAC5B,IAAI,WAAW,YAAY,aAAK,EAAE;YAChC,OAAO,WAAW,CAAC;SACpB;aAAM,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE;YAC5C,OAAO,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;SACjG;QACD,IAAI,CAAC,WAAW,EAAE;YAChB,WAAW,GAAG,EAAE,CAAC;SAClB;QACD,IAAI,kBAAkB,IAAI,CAAC,IAAA,gBAAO,EAAE,WAAmB,CAAC,YAAY,CAAC,EAAE;YACpE,WAAmB,CAAC,YAAY,GAAG,IAAI,CAAC;SAC1C;QACD,IAAI,aAAa,KAAK,6BAAa,EAAE;YACnC,OAAO,IAAI,6BAAa,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,EAAE,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAQ,EAAE,CAAC,MAAA,KAAK,CAAC,aAAa,mCAAI,EAAE,CAAQ,CAAC,CAAC;SAC3G;QACD,OAAO,IAAI,aAAa,CAAC,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAQ,EAAE,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAQ,CAAC,CAAC;KAChF;IACD,OAAO,aAAa,CAAC,OAAO,CAAC;AAC/B,CAAC;AA1BD,gBA0BC","file":"style.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport type {\n ColumnStyle,\n ColumnStyleOption,\n FullExtendStyle,\n IImageStyleOption,\n ITextStyleOption,\n IStyleOption,\n StylePropertyFunctionArg\n} from '../ts-types';\n\nimport { ImageStyle } from './style/ImageStyle';\nimport { TextStyle } from './style/MultilineTextStyle';\nimport { NumberStyle } from './style/NumberStyle';\nimport { Style } from './style/Style';\nimport type { TableTheme } from '../themes/theme';\nimport { CheckboxStyle } from './style/CheckboxStyle';\n\nconst { EVENT_TYPE } = Style;\nexport {\n EVENT_TYPE,\n Style,\n NumberStyle,\n ImageStyle,\n TextStyle,\n // types\n IStyleOption,\n IImageStyleOption,\n ITextStyleOption\n};\nexport function of(\n columnStyle: ColumnStyleOption,\n bodyStyle: ColumnStyleOption,\n styleArg: StylePropertyFunctionArg,\n StyleClassDef: typeof Style = Style,\n globalAutoWrapText: boolean,\n theme: TableTheme\n): FullExtendStyle {\n if (columnStyle || bodyStyle) {\n if (columnStyle instanceof Style) {\n return columnStyle;\n } else if (typeof columnStyle === 'function') {\n return of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme);\n }\n if (!columnStyle) {\n columnStyle = {};\n }\n if (globalAutoWrapText && !isValid((columnStyle as any).autoWrapText)) {\n (columnStyle as any).autoWrapText = true;\n }\n if (StyleClassDef === CheckboxStyle) {\n return new CheckboxStyle(columnStyle ?? {}, (bodyStyle ?? {}) as any, (theme.checkboxStyle ?? {}) as any);\n }\n return new StyleClassDef((columnStyle ?? {}) as any, (bodyStyle ?? {})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AE;YACvC,OAAO,IAAI,uBAAU,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,EAAE,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAQ,EAAE,CAAC,MAAA,KAAK,CAAC,UAAU,mCAAI,EAAE,CAAQ,CAAC,CAAC;SACrG;QACD,OAAO,IAAI,aAAa,CAAC,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAQ,EAAE,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAQ,CAAC,CAAC;KAChF;IACD,OAAO,aAAa,CAAC,OAAO,CAAC;AAC/B,CAAC;AA5BD,gBA4BC","file":"style.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport type {\n ColumnStyle,\n ColumnStyleOption,\n FullExtendStyle,\n IImageStyleOption,\n ITextStyleOption,\n IStyleOption,\n StylePropertyFunctionArg\n} from '../ts-types';\n\nimport { ImageStyle } from './style/ImageStyle';\nimport { TextStyle } from './style/MultilineTextStyle';\nimport { NumberStyle } from './style/NumberStyle';\nimport { Style } from './style/Style';\nimport type { TableTheme } from '../themes/theme';\nimport { CheckboxStyle } from './style/CheckboxStyle';\nimport { RadioStyle } from './style/RadioStyle';\n\nconst { EVENT_TYPE } = Style;\nexport {\n EVENT_TYPE,\n Style,\n NumberStyle,\n ImageStyle,\n TextStyle,\n // types\n IStyleOption,\n IImageStyleOption,\n ITextStyleOption\n};\nexport function of(\n columnStyle: ColumnStyleOption,\n bodyStyle: ColumnStyleOption,\n styleArg: StylePropertyFunctionArg,\n StyleClassDef: typeof Style = Style,\n globalAutoWrapText: boolean,\n theme: TableTheme\n): FullExtendStyle {\n if (columnStyle || bodyStyle) {\n if (columnStyle instanceof Style) {\n return columnStyle;\n } else if (typeof columnStyle === 'function') {\n return of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme);\n }\n if (!columnStyle) {\n columnStyle = {};\n }\n if (globalAutoWrapText && !isValid((columnStyle as any).autoWrapText)) {\n (columnStyle as any).autoWrapText = true;\n }\n if (StyleClassDef === CheckboxStyle) {\n return new CheckboxStyle(columnStyle ?? {}, (bodyStyle ?? {}) as any, (theme.checkboxStyle ?? {}) as any);\n } else if (StyleClassDef === RadioStyle) {\n return new RadioStyle(columnStyle ?? {}, (bodyStyle ?? {}) as any, (theme.radioStyle ?? {}) as any);\n }\n return new StyleClassDef((columnStyle ?? {}) as any, (bodyStyle ?? {}) as any);\n }\n return StyleClassDef.DEFAULT;\n}\n"]}
@@ -284,7 +284,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
284
284
  abstract getRecordShowIndexByCell(col: number, row: number): number;
285
285
  abstract getCellOriginRecord(col: number, row: number): MaybePromiseOrUndefined;
286
286
  abstract getCellRawRecord(col: number, row: number): MaybePromiseOrUndefined;
287
- abstract getCellValue(col: number, row: number): FieldData;
287
+ abstract getCellValue(col: number, row: number, skipCustomMerge?: boolean): FieldData;
288
288
  abstract getCellOriginValue(col: number, row: number): FieldData;
289
289
  abstract getCellRawValue(col: number, row: number): FieldData;
290
290
  abstract getTableIndexByRecordIndex(recordIndex: number): number;
@@ -301,6 +301,8 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
301
301
  set dataSource(dataSource: DataSource | CachedDataSource);
302
302
  get autoWrapText(): boolean;
303
303
  set autoWrapText(autoWrapText: boolean);
304
+ get enableLineBreak(): boolean;
305
+ set enableLineBreak(enableLineBreak: boolean);
304
306
  updateAutoWrapText(autoWrapText: boolean): void;
305
307
  get theme(): TableTheme;
306
308
  set theme(theme: TableTheme);
@@ -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 = "0.23.4", this.id = `VTable${Date.now()}`,
48
+ if (super(), this.showFrozenIcon = !0, this.version = "0.24.0", 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, 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;
@@ -93,7 +93,8 @@ class BaseTable extends EventTarget_1.EventTarget {
93
93
  this.options = options, internalProps.theme = themes_1.default.of(null !== (_c = options.theme) && void 0 !== _c ? _c : themes_1.default.DEFAULT),
94
94
  internalProps.theme.isPivot = this.isPivotTable(), internalProps.bodyHelper = new body_helper_1.BodyHelper(this),
95
95
  internalProps.headerHelper = new header_helper_1.HeaderHelper(this), internalProps.rowSeriesNumberHelper = new row_series_number_helper_1.RowSeriesNumberHelper(this),
96
- internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : 0,
96
+ internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
97
+ internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : 0,
97
98
  internalProps.limitMaxAutoWidth = null !== (_e = options.limitMaxAutoWidth) && void 0 !== _e ? _e : 450,
98
99
  internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
99
100
  this._vDataSet = new vdataset_1.DataSet, this.scenegraph = new scenegraph_1.Scenegraph(this),
@@ -716,7 +717,7 @@ class BaseTable extends EventTarget_1.EventTarget {
716
717
  return super.fireListeners(type, event);
717
718
  }
718
719
  updateOption(options) {
719
- var _a, _b, _c, _d, _e, _f, _g, _h;
720
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
720
721
  this.options = options;
721
722
  const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, 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, widthAdaptiveMode: widthAdaptiveMode, heightAdaptiveMode: heightAdaptiveMode, customRender: customRender, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth} = options;
722
723
  pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
@@ -747,7 +748,8 @@ class BaseTable extends EventTarget_1.EventTarget {
747
748
  this.colContentWidthsMap = new NumberMap_1.NumberMap, this.colWidthsLimit = {},
748
749
  internalProps.stick.changedCells.clear(), internalProps.theme = themes_1.default.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes_1.default.DEFAULT),
749
750
  internalProps.theme.isPivot = this.isPivotTable(), this.scenegraph.updateStageBackground(),
750
- internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0,
751
+ internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
752
+ internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0,
751
753
  internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
752
754
  internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
753
755
  this._vDataSet = new vdataset_1.DataSet, null === (_e = internalProps.legends) || void 0 === _e || _e.release(),
@@ -764,9 +766,11 @@ class BaseTable extends EventTarget_1.EventTarget {
764
766
  }, options.tooltip), "html" !== internalProps.tooltip.renderMode || internalProps.tooltipHandler || (internalProps.tooltipHandler = new TooltipHandler_1.TooltipHandler(this, internalProps.tooltip.confine)),
765
767
  internalProps.menu = Object.assign({
766
768
  renderMode: "html"
767
- }, options.menu), "html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler_1.MenuHandler(this)),
769
+ }, options.menu), Array.isArray(null === (_g = options.menu) || void 0 === _g ? void 0 : _g.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_h = options.menu) || void 0 === _h ? void 0 : _h.dropDownMenuHighlight),
770
+ Array.isArray(null === (_j = options.menu) || void 0 === _j ? void 0 : _j.defaultHeaderMenuItems) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
771
+ "html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler_1.MenuHandler(this)),
768
772
  this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(),
769
- internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin.updateCustomCell(null !== (_g = options.customCellStyle) && void 0 !== _g ? _g : [], null !== (_h = options.customCellStyleArrangement) && void 0 !== _h ? _h : []);
773
+ internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin.updateCustomCell(null !== (_k = options.customCellStyle) && void 0 !== _k ? _k : [], null !== (_l = options.customCellStyleArrangement) && void 0 !== _l ? _l : []);
770
774
  }
771
775
  renderWithRecreateCells() {
772
776
  const oldHoverState = {
@@ -990,6 +994,12 @@ class BaseTable extends EventTarget_1.EventTarget {
990
994
  set autoWrapText(autoWrapText) {
991
995
  this.internalProps.autoWrapText = autoWrapText, this.options.autoWrapText = autoWrapText;
992
996
  }
997
+ get enableLineBreak() {
998
+ return this.internalProps.enableLineBreak;
999
+ }
1000
+ set enableLineBreak(enableLineBreak) {
1001
+ this.internalProps.enableLineBreak = enableLineBreak, this.options.enableLineBreak = enableLineBreak;
1002
+ }
993
1003
  updateAutoWrapText(autoWrapText) {
994
1004
  this.internalProps.autoWrapText !== autoWrapText && (this.internalProps.autoWrapText = autoWrapText,
995
1005
  this.options.autoWrapText = autoWrapText, this.scenegraph.clearCells(), this.clearCellStyleCache(),