@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,103 @@
1
+ import { Style } from "./Style";
2
+
3
+ let defaultStyle;
4
+
5
+ export class RadioStyle extends Style {
6
+ static get DEFAULT() {
7
+ return defaultStyle || (defaultStyle = new RadioStyle);
8
+ }
9
+ constructor(style = {}, headerStyle = {}, radioThemeStyle = {}) {
10
+ 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;
11
+ 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,
12
+ 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,
13
+ 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,
14
+ 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,
15
+ 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,
16
+ 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,
17
+ 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,
18
+ 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,
19
+ 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,
20
+ 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,
21
+ 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,
22
+ 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;
23
+ }
24
+ get size() {
25
+ return this._size;
26
+ }
27
+ set size(size) {
28
+ this._size = size;
29
+ }
30
+ get spaceBetweenTextAndIcon() {
31
+ return this._spaceBetweenTextAndIcon;
32
+ }
33
+ set spaceBetweenTextAndIcon(spaceBetweenTextAndIcon) {
34
+ this._spaceBetweenTextAndIcon = spaceBetweenTextAndIcon;
35
+ }
36
+ get spaceBetweenRadio() {
37
+ return this._spaceBetweenRadio;
38
+ }
39
+ set spaceBetweenRadio(spaceBetweenRadio) {
40
+ this._spaceBetweenRadio = spaceBetweenRadio;
41
+ }
42
+ get innerRadius() {
43
+ return this._innerRadius;
44
+ }
45
+ set innerRadius(innerRadius) {
46
+ this._innerRadius = innerRadius;
47
+ }
48
+ get outerRadius() {
49
+ return this._outerRadius;
50
+ }
51
+ set outerRadius(outerRadius) {
52
+ this._outerRadius = outerRadius;
53
+ }
54
+ get defaultFill() {
55
+ return this._defaultFill;
56
+ }
57
+ set defaultFill(defaultFill) {
58
+ this._defaultFill = defaultFill;
59
+ }
60
+ get defaultStroke() {
61
+ return this._defaultStroke;
62
+ }
63
+ set defaultStroke(defaultStroke) {
64
+ this._defaultStroke = defaultStroke;
65
+ }
66
+ get disableFill() {
67
+ return this._disableFill;
68
+ }
69
+ set disableFill(disableFill) {
70
+ this._disableFill = disableFill;
71
+ }
72
+ get checkedFill() {
73
+ return this._checkedFill;
74
+ }
75
+ set checkedFill(checkedFill) {
76
+ this._checkedFill = checkedFill;
77
+ }
78
+ get checkedStroke() {
79
+ return this._checkedStroke;
80
+ }
81
+ set checkedStroke(checkedStroke) {
82
+ this._checkedStroke = checkedStroke;
83
+ }
84
+ get disableCheckedFill() {
85
+ return this._disableCheckedFill;
86
+ }
87
+ set disableCheckedFill(disableCheckedFill) {
88
+ this._disableCheckedFill = disableCheckedFill;
89
+ }
90
+ get disableCheckedStroke() {
91
+ return this._disableCheckedStroke;
92
+ }
93
+ set disableCheckedStroke(disableCheckedStroke) {
94
+ this._disableCheckedStroke = disableCheckedStroke;
95
+ }
96
+ getStyle(style) {
97
+ return new RadioStyle(style, this);
98
+ }
99
+ clone() {
100
+ return new RadioStyle(this);
101
+ }
102
+ }
103
+ //# sourceMappingURL=RadioStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/body-helper/style/RadioStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,IAAI,YAAwB,CAAC;AAE7B,MAAM,OAAO,UAAW,SAAQ,KAAK;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,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,uBAAuB,mCACpC,eAAe,aAAf,eAAe,uBAAf,eAAe,CA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9B,CAAC;CACF","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"]}
@@ -10,14 +10,16 @@ import { Style } from "./style/Style";
10
10
 
11
11
  import { CheckboxStyle } from "./style/CheckboxStyle";
12
12
 
13
+ import { RadioStyle } from "./style/RadioStyle";
14
+
13
15
  const {EVENT_TYPE: EVENT_TYPE} = Style;
14
16
 
15
17
  export { EVENT_TYPE, Style, NumberStyle, ImageStyle, TextStyle };
16
18
 
17
19
  export function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style, globalAutoWrapText, theme) {
18
- var _a;
20
+ var _a, _b;
19
21
  return columnStyle || bodyStyle ? columnStyle instanceof Style ? columnStyle : "function" == typeof columnStyle ? of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme) : (columnStyle || (columnStyle = {}),
20
22
  globalAutoWrapText && !isValid(columnStyle.autoWrapText) && (columnStyle.autoWrapText = !0),
21
- StyleClassDef === CheckboxStyle ? new 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;
23
+ StyleClassDef === CheckboxStyle ? new CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle ? new RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
22
24
  }
23
25
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/body-helper/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAW3C,OAAO,EAAE,UAAU,EAAE,MAAM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,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","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 ?? {}) as any);\n }\n return StyleClassDef.DEFAULT;\n}\n"]}
1
+ {"version":3,"sources":["../src/body-helper/style.ts"],"names":[],"mappings":"AAAA,OAAO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AAC,MAAA,KAAK,CAAC,aAAa,mCAAI,EAAE,CAAQ,CAAC,CAAC;SAC3G;aAAM,IAAI,aAAa,KAAK,UAAU,EAAE;YACvC,OAAO,IAAI,UAAU,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","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);
@@ -82,7 +82,7 @@ export class BaseTable extends EventTarget {
82
82
  }
83
83
  constructor(container, options = {}) {
84
84
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
85
- if (super(), this.showFrozenIcon = !0, this.version = "0.23.4", this.id = `VTable${Date.now()}`,
85
+ if (super(), this.showFrozenIcon = !0, this.version = "0.24.0", this.id = `VTable${Date.now()}`,
86
86
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
87
87
  !container && "node" !== options.mode) throw new Error("vtable's container is undefined");
88
88
  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 = defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth} = options;
@@ -128,7 +128,8 @@ export class BaseTable extends EventTarget {
128
128
  this.options = options, internalProps.theme = themes.of(null !== (_c = options.theme) && void 0 !== _c ? _c : themes.DEFAULT),
129
129
  internalProps.theme.isPivot = this.isPivotTable(), internalProps.bodyHelper = new BodyHelper(this),
130
130
  internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this),
131
- internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : 0,
131
+ internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
132
+ internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : 0,
132
133
  internalProps.limitMaxAutoWidth = null !== (_e = options.limitMaxAutoWidth) && void 0 !== _e ? _e : 450,
133
134
  internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
134
135
  this._vDataSet = new DataSet, this.scenegraph = new Scenegraph(this), this.stateManager = new StateManager(this),
@@ -748,7 +749,7 @@ export class BaseTable extends EventTarget {
748
749
  return super.fireListeners(type, event);
749
750
  }
750
751
  updateOption(options) {
751
- var _a, _b, _c, _d, _e, _f, _g, _h;
752
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
752
753
  this.options = options;
753
754
  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;
754
755
  pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
@@ -778,7 +779,8 @@ export class BaseTable extends EventTarget {
778
779
  this.colContentWidthsMap = new NumberMap, this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(),
779
780
  internalProps.theme = themes.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes.DEFAULT),
780
781
  internalProps.theme.isPivot = this.isPivotTable(), this.scenegraph.updateStageBackground(),
781
- internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0,
782
+ internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
783
+ internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0,
782
784
  internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
783
785
  internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
784
786
  this._vDataSet = new DataSet, null === (_e = internalProps.legends) || void 0 === _e || _e.release(),
@@ -795,9 +797,11 @@ export class BaseTable extends EventTarget {
795
797
  }, options.tooltip), "html" !== internalProps.tooltip.renderMode || internalProps.tooltipHandler || (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine)),
796
798
  internalProps.menu = Object.assign({
797
799
  renderMode: "html"
798
- }, options.menu), "html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler(this)),
800
+ }, 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),
801
+ Array.isArray(null === (_j = options.menu) || void 0 === _j ? void 0 : _j.defaultHeaderMenuItems) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
802
+ "html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler(this)),
799
803
  this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(),
800
- internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin.updateCustomCell(null !== (_g = options.customCellStyle) && void 0 !== _g ? _g : [], null !== (_h = options.customCellStyleArrangement) && void 0 !== _h ? _h : []);
804
+ internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin.updateCustomCell(null !== (_k = options.customCellStyle) && void 0 !== _k ? _k : [], null !== (_l = options.customCellStyleArrangement) && void 0 !== _l ? _l : []);
801
805
  }
802
806
  renderWithRecreateCells() {
803
807
  const oldHoverState = {
@@ -1021,6 +1025,12 @@ export class BaseTable extends EventTarget {
1021
1025
  set autoWrapText(autoWrapText) {
1022
1026
  this.internalProps.autoWrapText = autoWrapText, this.options.autoWrapText = autoWrapText;
1023
1027
  }
1028
+ get enableLineBreak() {
1029
+ return this.internalProps.enableLineBreak;
1030
+ }
1031
+ set enableLineBreak(enableLineBreak) {
1032
+ this.internalProps.enableLineBreak = enableLineBreak, this.options.enableLineBreak = enableLineBreak;
1033
+ }
1024
1034
  updateAutoWrapText(autoWrapText) {
1025
1035
  this.internalProps.autoWrapText !== autoWrapText && (this.internalProps.autoWrapText = autoWrapText,
1026
1036
  this.options.autoWrapText = autoWrapText, this.scenegraph.clearCells(), this.clearCellStyleCache(),