@visactor/vtable 0.9.2 → 0.9.3-alpha.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 (647) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +17 -13
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +69 -0
  5. package/cjs/PivotChart.js +435 -0
  6. package/cjs/PivotChart.js.map +1 -0
  7. package/cjs/PivotTable.d.ts +2 -1
  8. package/cjs/PivotTable.js +18 -13
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
  11. package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
  12. package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
  13. package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
  14. package/cjs/body-helper/style/Style.d.ts +0 -1
  15. package/cjs/body-helper/style/Style.js +25 -28
  16. package/cjs/body-helper/style/Style.js.map +1 -1
  17. package/cjs/chartModule.js +14 -0
  18. package/cjs/chartModule.js.map +1 -0
  19. package/cjs/components/axis/axis.d.ts +45 -0
  20. package/cjs/components/axis/axis.js +146 -0
  21. package/cjs/components/axis/axis.js.map +1 -0
  22. package/cjs/components/axis/band-scale.d.ts +18 -0
  23. package/cjs/components/axis/band-scale.js +54 -0
  24. package/cjs/components/axis/band-scale.js.map +1 -0
  25. package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
  26. package/cjs/components/axis/get-axis-attributes.js +169 -0
  27. package/cjs/components/axis/get-axis-attributes.js.map +1 -0
  28. package/cjs/components/axis/label-overlap.d.ts +3 -0
  29. package/cjs/components/axis/label-overlap.js +46 -0
  30. package/cjs/components/axis/label-overlap.js.map +1 -0
  31. package/cjs/components/axis/linear-scale.d.ts +45 -0
  32. package/cjs/components/axis/linear-scale.js +120 -0
  33. package/cjs/components/axis/linear-scale.js.map +1 -0
  34. package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
  35. package/cjs/components/legend/get-legend-attributes.js +90 -0
  36. package/cjs/components/legend/get-legend-attributes.js.map +1 -0
  37. package/cjs/components/legend/legend.d.ts +23 -0
  38. package/cjs/components/legend/legend.js +94 -0
  39. package/cjs/components/legend/legend.js.map +1 -0
  40. package/{es → cjs/components}/menu/dom/BaseMenu.d.ts +2 -2
  41. package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
  42. package/cjs/components/menu/dom/Menu.js.map +1 -0
  43. package/cjs/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  44. package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
  45. package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
  46. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  47. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
  48. package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
  49. package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  50. package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
  51. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
  52. package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  53. package/cjs/components/title/title.d.ts +12 -0
  54. package/cjs/components/title/title.js +66 -0
  55. package/cjs/components/title/title.js.map +1 -0
  56. package/{es → cjs/components}/tooltip/BaseTooltip.d.ts +3 -3
  57. package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
  58. package/cjs/components/tooltip/Tooltip.js.map +1 -0
  59. package/cjs/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  60. package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
  61. package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
  62. package/{es → cjs/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  63. package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
  64. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  65. package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  66. package/cjs/components/util/orient.d.ts +3 -0
  67. package/cjs/components/util/orient.js +14 -0
  68. package/cjs/components/util/orient.js.map +1 -0
  69. package/cjs/components/util/register.d.ts +3 -0
  70. package/cjs/components/util/register.js +15 -0
  71. package/cjs/components/util/register.js.map +1 -0
  72. package/cjs/components/util/tick-data/config.d.ts +1 -0
  73. package/cjs/components/util/tick-data/config.js +6 -0
  74. package/cjs/components/util/tick-data/config.js.map +1 -0
  75. package/cjs/components/util/tick-data/continuous.d.ts +2 -0
  76. package/cjs/components/util/tick-data/continuous.js +39 -0
  77. package/cjs/components/util/tick-data/continuous.js.map +1 -0
  78. package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
  79. package/cjs/components/util/tick-data/discrete/linear.js +66 -0
  80. package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
  81. package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  82. package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
  83. package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  84. package/cjs/components/util/tick-data/index.d.ts +2 -0
  85. package/cjs/components/util/tick-data/index.js +17 -0
  86. package/cjs/components/util/tick-data/index.js.map +1 -0
  87. package/cjs/components/util/tick-data/util.d.ts +21 -0
  88. package/cjs/components/util/tick-data/util.js +115 -0
  89. package/cjs/components/util/tick-data/util.js.map +1 -0
  90. package/cjs/components/util/transform.d.ts +5 -0
  91. package/cjs/components/util/transform.js +45 -0
  92. package/cjs/components/util/transform.js.map +1 -0
  93. package/cjs/core/BaseTable.d.ts +18 -5
  94. package/cjs/core/BaseTable.js +115 -41
  95. package/cjs/core/BaseTable.js.map +1 -1
  96. package/cjs/core/TABLE_EVENT_TYPE.d.ts +5 -0
  97. package/cjs/core/TABLE_EVENT_TYPE.js +6 -1
  98. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  99. package/cjs/core/style.js +1 -1
  100. package/cjs/core/style.js.map +1 -1
  101. package/cjs/core/tableHelper.js +1 -2
  102. package/cjs/data/CachedDataSource.js +2 -1
  103. package/cjs/data/DataSource.js +2 -2
  104. package/cjs/data/DataSource.js.map +1 -1
  105. package/cjs/dataset/dataset-pivot-table.d.ts +60 -0
  106. package/cjs/dataset/dataset-pivot-table.js +387 -0
  107. package/cjs/dataset/dataset-pivot-table.js.map +1 -0
  108. package/cjs/dataset/dataset.d.ts +14 -19
  109. package/cjs/dataset/dataset.js +183 -200
  110. package/cjs/dataset/dataset.js.map +1 -1
  111. package/cjs/dataset/statistics-helper.d.ts +68 -0
  112. package/cjs/dataset/statistics-helper.js +173 -0
  113. package/cjs/dataset/statistics-helper.js.map +1 -0
  114. package/cjs/dataset/util/zero-align.d.ts +10 -0
  115. package/cjs/dataset/util/zero-align.js +119 -0
  116. package/cjs/dataset/util/zero-align.js.map +1 -0
  117. package/cjs/event/EventHandler.js.map +1 -1
  118. package/cjs/event/EventTarget.d.ts +5 -5
  119. package/cjs/event/EventTarget.js +2 -2
  120. package/cjs/event/EventTarget.js.map +1 -1
  121. package/cjs/event/VChartEventProxy.d.ts +1 -0
  122. package/cjs/event/VChartEventProxy.js +1 -0
  123. package/cjs/event/VChartEventProxy.js.map +1 -0
  124. package/cjs/event/event.js +7 -4
  125. package/cjs/event/event.js.map +1 -1
  126. package/cjs/event/listener/table-group.js +8 -6
  127. package/cjs/event/listener/table-group.js.map +1 -1
  128. package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
  129. package/cjs/event/pivot-chart/axis-click.js +42 -0
  130. package/cjs/event/pivot-chart/axis-click.js.map +1 -0
  131. package/cjs/event/pivot-chart/axis-hover.d.ts +2 -0
  132. package/cjs/event/pivot-chart/axis-hover.js +41 -0
  133. package/cjs/event/pivot-chart/axis-hover.js.map +1 -0
  134. package/cjs/event/scroll.js +4 -3
  135. package/cjs/event/scroll.js.map +1 -1
  136. package/cjs/event/sparkline-event.js +1 -2
  137. package/cjs/event/sparkline-event.js.map +1 -1
  138. package/cjs/header-helper/header-helper.js +1 -1
  139. package/cjs/header-helper/header-helper.js.map +1 -1
  140. package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  141. package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  142. package/cjs/header-helper/style/Style.d.ts +0 -1
  143. package/cjs/header-helper/style/Style.js +25 -28
  144. package/cjs/header-helper/style/Style.js.map +1 -1
  145. package/cjs/index.d.ts +4 -3
  146. package/cjs/index.js +11 -2
  147. package/cjs/index.js.map +1 -1
  148. package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
  149. package/cjs/layout/chart-helper/get-axis-config.js +118 -0
  150. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -0
  151. package/cjs/layout/chart-helper/get-chart-spec.d.ts +7 -0
  152. package/cjs/layout/chart-helper/get-chart-spec.js +135 -0
  153. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -0
  154. package/cjs/layout/index.js +2 -1
  155. package/cjs/layout/pivot-header-layout.d.ts +13 -5
  156. package/cjs/layout/pivot-header-layout.js +50 -14
  157. package/cjs/layout/pivot-header-layout.js.map +1 -1
  158. package/cjs/layout/pivot-layout.d.ts +54 -8
  159. package/cjs/layout/pivot-layout.js +399 -91
  160. package/cjs/layout/pivot-layout.js.map +1 -1
  161. package/cjs/layout/simple-header-layout.d.ts +10 -0
  162. package/cjs/layout/simple-header-layout.js +43 -2
  163. package/cjs/layout/simple-header-layout.js.map +1 -1
  164. package/cjs/plugins/{chartTypes.js → chartModules.js} +1 -1
  165. package/cjs/plugins/chartModules.js.map +1 -0
  166. package/cjs/register.d.ts +1 -1
  167. package/cjs/register.js +6 -6
  168. package/cjs/register.js.map +1 -1
  169. package/cjs/render/layout/text.d.ts +33 -4
  170. package/cjs/render/layout/text.js +9 -3
  171. package/cjs/render/layout/text.js.map +1 -1
  172. package/cjs/scenegraph/component/custom.js +17 -16
  173. package/cjs/scenegraph/component/custom.js.map +1 -1
  174. package/cjs/scenegraph/component/menu.d.ts +41 -0
  175. package/cjs/scenegraph/component/table-component.js +3 -3
  176. package/cjs/scenegraph/component/table-component.js.map +1 -1
  177. package/cjs/scenegraph/graphic/chart.d.ts +4 -1
  178. package/cjs/scenegraph/graphic/chart.js +29 -17
  179. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  180. package/cjs/scenegraph/graphic/contributions/chart-render.js +22 -3
  181. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  182. package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  183. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  184. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  185. package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  186. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  187. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  188. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  189. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  190. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  191. package/cjs/scenegraph/graphic/text.d.ts +15 -0
  192. package/cjs/scenegraph/group-creater/cell-helper.js +9 -3
  193. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  194. package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  195. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  196. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  197. package/cjs/scenegraph/group-creater/column.js.map +1 -1
  198. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  199. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
  200. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  201. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  202. package/cjs/scenegraph/group-creater/progress/proxy.js +29 -35
  203. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  204. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
  205. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  206. package/cjs/scenegraph/layout/compute-col-width.js +23 -15
  207. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  208. package/cjs/scenegraph/layout/compute-row-height.js +20 -9
  209. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  210. package/cjs/scenegraph/layout/move-cell.js +1 -1
  211. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  212. package/cjs/scenegraph/layout/update-cell.js +3 -2
  213. package/cjs/scenegraph/layout/update-cell.js.map +1 -1
  214. package/cjs/scenegraph/layout/update-height.js +1 -1
  215. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  216. package/cjs/scenegraph/layout/update-row.js +1 -1
  217. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  218. package/cjs/scenegraph/layout/update-width.js +33 -3
  219. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  220. package/cjs/scenegraph/refresh-node/update-chart.d.ts +3 -0
  221. package/cjs/scenegraph/refresh-node/update-chart.js +76 -7
  222. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  223. package/cjs/scenegraph/scenegraph.d.ts +8 -0
  224. package/cjs/scenegraph/scenegraph.js +115 -19
  225. package/cjs/scenegraph/scenegraph.js.map +1 -1
  226. package/cjs/scenegraph/stick-text/index.js +10 -8
  227. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  228. package/cjs/scenegraph/style/corner-cell.d.ts +3 -0
  229. package/cjs/scenegraph/style/corner-cell.js +29 -0
  230. package/cjs/scenegraph/style/corner-cell.js.map +1 -0
  231. package/cjs/scenegraph/style/frame-border.d.ts +1 -0
  232. package/cjs/scenegraph/style/frame-border.js +3 -7
  233. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  234. package/cjs/scenegraph/utils/get-cell-merge.js +2 -1
  235. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  236. package/cjs/state/state.js +1 -1
  237. package/cjs/state/state.js.map +1 -1
  238. package/cjs/themes/DARK.js +1 -2
  239. package/cjs/themes/theme.d.ts +10 -0
  240. package/cjs/themes/theme.js +50 -4
  241. package/cjs/themes/theme.js.map +1 -1
  242. package/cjs/tools/LimitPromiseQueue.js +2 -1
  243. package/cjs/tools/calc.d.ts +3 -0
  244. package/cjs/tools/calc.js +11 -3
  245. package/cjs/tools/calc.js.map +1 -1
  246. package/cjs/tools/debounce.js +1 -1
  247. package/cjs/tools/diff-cell.js +2 -2
  248. package/cjs/tools/dom.js +1 -1
  249. package/cjs/tools/env.js +1 -1
  250. package/cjs/ts-types/base-table.d.ts +29 -12
  251. package/cjs/ts-types/base-table.js.map +1 -1
  252. package/cjs/ts-types/column/style.d.ts +0 -1
  253. package/cjs/ts-types/column/style.js.map +1 -1
  254. package/cjs/ts-types/component/axis.d.ts +12 -0
  255. package/cjs/ts-types/component/axis.js +6 -0
  256. package/cjs/ts-types/component/axis.js.map +1 -0
  257. package/cjs/ts-types/component/legend.d.ts +5 -0
  258. package/cjs/ts-types/component/legend.js +6 -0
  259. package/cjs/ts-types/component/legend.js.map +1 -0
  260. package/cjs/ts-types/component/title.d.ts +47 -0
  261. package/cjs/ts-types/component/title.js +6 -0
  262. package/cjs/ts-types/component/title.js.map +1 -0
  263. package/cjs/ts-types/component/util.d.ts +1 -0
  264. package/cjs/ts-types/component/util.js +6 -0
  265. package/cjs/ts-types/component/util.js.map +1 -0
  266. package/cjs/ts-types/customElement.d.ts +2 -0
  267. package/cjs/ts-types/customElement.js.map +1 -1
  268. package/cjs/ts-types/events.d.ts +108 -83
  269. package/cjs/ts-types/events.js.map +1 -1
  270. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  271. package/cjs/ts-types/list-table/define/chart-define.d.ts +1 -1
  272. package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
  273. package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -2
  274. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  275. package/cjs/ts-types/new-data-set.d.ts +19 -5
  276. package/cjs/ts-types/new-data-set.js +2 -2
  277. package/cjs/ts-types/new-data-set.js.map +1 -1
  278. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  279. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
  280. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  281. package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
  282. package/cjs/ts-types/pivot-table/corner.js.map +1 -1
  283. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  284. package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  285. package/cjs/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  286. package/cjs/ts-types/pivot-table/indicator/index.d.ts +1 -0
  287. package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
  288. package/cjs/ts-types/pivot-table/title.d.ts +1 -1
  289. package/cjs/ts-types/pivot-table/title.js.map +1 -1
  290. package/cjs/ts-types/table-engine.d.ts +27 -3
  291. package/cjs/ts-types/table-engine.js.map +1 -1
  292. package/cjs/ts-types/theme.d.ts +5 -0
  293. package/cjs/ts-types/theme.js.map +1 -1
  294. package/dist/vtable.js +37522 -24362
  295. package/dist/vtable.min.js +4 -2
  296. package/es/ListTable.d.ts +2 -1
  297. package/es/ListTable.js +17 -13
  298. package/es/ListTable.js.map +1 -1
  299. package/es/PivotChart.d.ts +69 -0
  300. package/es/PivotChart.js +445 -0
  301. package/es/PivotChart.js.map +1 -0
  302. package/es/PivotTable.d.ts +2 -1
  303. package/es/PivotTable.js +19 -14
  304. package/es/PivotTable.js.map +1 -1
  305. package/es/body-helper/style/MultilineTextStyle.js +2 -2
  306. package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
  307. package/es/body-helper/style/ProgressBarStyle.js +15 -15
  308. package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
  309. package/es/body-helper/style/Style.d.ts +0 -1
  310. package/es/body-helper/style/Style.js +25 -28
  311. package/es/body-helper/style/Style.js.map +1 -1
  312. package/es/{chartType.js → chartModule.js} +2 -2
  313. package/es/chartModule.js.map +1 -0
  314. package/es/components/axis/axis.d.ts +45 -0
  315. package/es/components/axis/axis.js +155 -0
  316. package/es/components/axis/axis.js.map +1 -0
  317. package/es/components/axis/band-scale.d.ts +18 -0
  318. package/es/components/axis/band-scale.js +46 -0
  319. package/es/components/axis/band-scale.js.map +1 -0
  320. package/es/components/axis/get-axis-attributes.d.ts +136 -0
  321. package/es/components/axis/get-axis-attributes.js +166 -0
  322. package/es/components/axis/get-axis-attributes.js.map +1 -0
  323. package/es/components/axis/label-overlap.d.ts +3 -0
  324. package/es/components/axis/label-overlap.js +39 -0
  325. package/es/components/axis/label-overlap.js.map +1 -0
  326. package/es/components/axis/linear-scale.d.ts +45 -0
  327. package/es/components/axis/linear-scale.js +104 -0
  328. package/es/components/axis/linear-scale.js.map +1 -0
  329. package/es/components/legend/get-legend-attributes.d.ts +5 -0
  330. package/es/components/legend/get-legend-attributes.js +84 -0
  331. package/es/components/legend/get-legend-attributes.js.map +1 -0
  332. package/es/components/legend/legend.d.ts +23 -0
  333. package/es/components/legend/legend.js +93 -0
  334. package/es/components/legend/legend.js.map +1 -0
  335. package/{cjs → es/components}/menu/dom/BaseMenu.d.ts +2 -2
  336. package/es/components/menu/dom/BaseMenu.js.map +1 -0
  337. package/es/components/menu/dom/Menu.js.map +1 -0
  338. package/es/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  339. package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
  340. package/es/components/menu/dom/MenuHandler.js.map +1 -0
  341. package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  342. package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
  343. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
  344. package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  345. package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
  346. package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
  347. package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  348. package/es/components/title/title.d.ts +12 -0
  349. package/es/components/title/title.js +61 -0
  350. package/es/components/title/title.js.map +1 -0
  351. package/{cjs → es/components}/tooltip/BaseTooltip.d.ts +3 -3
  352. package/es/components/tooltip/BaseTooltip.js.map +1 -0
  353. package/es/components/tooltip/Tooltip.js.map +1 -0
  354. package/es/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  355. package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
  356. package/es/components/tooltip/TooltipHandler.js.map +1 -0
  357. package/{cjs → es/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  358. package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
  359. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  360. package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  361. package/es/components/util/orient.d.ts +3 -0
  362. package/es/components/util/orient.js +8 -0
  363. package/es/components/util/orient.js.map +1 -0
  364. package/es/components/util/register.d.ts +3 -0
  365. package/es/components/util/register.js +8 -0
  366. package/es/components/util/register.js.map +1 -0
  367. package/es/components/util/tick-data/config.d.ts +1 -0
  368. package/es/components/util/tick-data/config.js +2 -0
  369. package/es/components/util/tick-data/config.js.map +1 -0
  370. package/es/components/util/tick-data/continuous.d.ts +2 -0
  371. package/es/components/util/tick-data/continuous.js +38 -0
  372. package/es/components/util/tick-data/continuous.js.map +1 -0
  373. package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
  374. package/es/components/util/tick-data/discrete/linear.js +59 -0
  375. package/es/components/util/tick-data/discrete/linear.js.map +1 -0
  376. package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  377. package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
  378. package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  379. package/es/components/util/tick-data/index.d.ts +2 -0
  380. package/es/components/util/tick-data/index.js +19 -0
  381. package/es/components/util/tick-data/index.js.map +1 -0
  382. package/es/components/util/tick-data/util.d.ts +21 -0
  383. package/es/components/util/tick-data/util.js +104 -0
  384. package/es/components/util/tick-data/util.js.map +1 -0
  385. package/es/components/util/transform.d.ts +5 -0
  386. package/es/components/util/transform.js +34 -0
  387. package/es/components/util/transform.js.map +1 -0
  388. package/es/core/BaseTable.d.ts +18 -5
  389. package/es/core/BaseTable.js +119 -43
  390. package/es/core/BaseTable.js.map +1 -1
  391. package/es/core/TABLE_EVENT_TYPE.d.ts +5 -0
  392. package/es/core/TABLE_EVENT_TYPE.js +6 -1
  393. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  394. package/es/core/style.js +1 -1
  395. package/es/core/style.js.map +1 -1
  396. package/es/core/tableHelper.js +1 -2
  397. package/es/data/CachedDataSource.js +2 -1
  398. package/es/data/DataSource.js +2 -2
  399. package/es/data/DataSource.js.map +1 -1
  400. package/es/dataset/dataset-pivot-table.d.ts +60 -0
  401. package/es/dataset/dataset-pivot-table.js +378 -0
  402. package/es/dataset/dataset-pivot-table.js.map +1 -0
  403. package/es/dataset/dataset.d.ts +14 -19
  404. package/es/dataset/dataset.js +175 -190
  405. package/es/dataset/dataset.js.map +1 -1
  406. package/es/dataset/statistics-helper.d.ts +68 -0
  407. package/es/dataset/statistics-helper.js +152 -0
  408. package/es/dataset/statistics-helper.js.map +1 -0
  409. package/es/dataset/util/zero-align.d.ts +10 -0
  410. package/es/dataset/util/zero-align.js +111 -0
  411. package/es/dataset/util/zero-align.js.map +1 -0
  412. package/es/event/EventHandler.js.map +1 -1
  413. package/es/event/EventTarget.d.ts +5 -5
  414. package/es/event/EventTarget.js +2 -2
  415. package/es/event/EventTarget.js.map +1 -1
  416. package/es/event/VChartEventProxy.d.ts +1 -0
  417. package/es/event/VChartEventProxy.js +1 -0
  418. package/es/event/VChartEventProxy.js.map +1 -0
  419. package/es/event/event.js +10 -3
  420. package/es/event/event.js.map +1 -1
  421. package/es/event/listener/table-group.js +8 -6
  422. package/es/event/listener/table-group.js.map +1 -1
  423. package/es/event/pivot-chart/axis-click.d.ts +2 -0
  424. package/es/event/pivot-chart/axis-click.js +36 -0
  425. package/es/event/pivot-chart/axis-click.js.map +1 -0
  426. package/es/event/pivot-chart/axis-hover.d.ts +2 -0
  427. package/es/event/pivot-chart/axis-hover.js +33 -0
  428. package/es/event/pivot-chart/axis-hover.js.map +1 -0
  429. package/es/event/scroll.js +4 -3
  430. package/es/event/scroll.js.map +1 -1
  431. package/es/event/sparkline-event.js +1 -2
  432. package/es/event/sparkline-event.js.map +1 -1
  433. package/es/header-helper/header-helper.js +1 -1
  434. package/es/header-helper/header-helper.js.map +1 -1
  435. package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  436. package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  437. package/es/header-helper/style/Style.d.ts +0 -1
  438. package/es/header-helper/style/Style.js +25 -28
  439. package/es/header-helper/style/Style.js.map +1 -1
  440. package/es/index.d.ts +4 -3
  441. package/es/index.js +4 -2
  442. package/es/index.js.map +1 -1
  443. package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
  444. package/es/layout/chart-helper/get-axis-config.js +110 -0
  445. package/es/layout/chart-helper/get-axis-config.js.map +1 -0
  446. package/es/layout/chart-helper/get-chart-spec.d.ts +7 -0
  447. package/es/layout/chart-helper/get-chart-spec.js +126 -0
  448. package/es/layout/chart-helper/get-chart-spec.js.map +1 -0
  449. package/es/layout/index.js +2 -1
  450. package/es/layout/pivot-header-layout.d.ts +13 -5
  451. package/es/layout/pivot-header-layout.js +50 -12
  452. package/es/layout/pivot-header-layout.js.map +1 -1
  453. package/es/layout/pivot-layout.d.ts +54 -8
  454. package/es/layout/pivot-layout.js +402 -89
  455. package/es/layout/pivot-layout.js.map +1 -1
  456. package/es/layout/simple-header-layout.d.ts +10 -0
  457. package/es/layout/simple-header-layout.js +44 -1
  458. package/es/layout/simple-header-layout.js.map +1 -1
  459. package/es/plugins/chartModules.js +2 -0
  460. package/es/plugins/chartModules.js.map +1 -0
  461. package/es/register.d.ts +1 -1
  462. package/es/register.js +3 -3
  463. package/es/register.js.map +1 -1
  464. package/es/render/layout/text.d.ts +33 -4
  465. package/es/render/layout/text.js +9 -3
  466. package/es/render/layout/text.js.map +1 -1
  467. package/es/scenegraph/component/custom.js +17 -16
  468. package/es/scenegraph/component/custom.js.map +1 -1
  469. package/es/scenegraph/component/menu.d.ts +41 -0
  470. package/es/scenegraph/component/table-component.js +3 -3
  471. package/es/scenegraph/component/table-component.js.map +1 -1
  472. package/es/scenegraph/graphic/chart.d.ts +4 -1
  473. package/es/scenegraph/graphic/chart.js +29 -15
  474. package/es/scenegraph/graphic/chart.js.map +1 -1
  475. package/es/scenegraph/graphic/contributions/chart-render.js +22 -3
  476. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  477. package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  478. package/es/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  479. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  480. package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  481. package/es/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  482. package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  483. package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  484. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  485. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  486. package/es/scenegraph/graphic/text.d.ts +15 -0
  487. package/es/scenegraph/group-creater/cell-helper.js +10 -2
  488. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  489. package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  490. package/es/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  491. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  492. package/es/scenegraph/group-creater/column.js.map +1 -1
  493. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  494. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
  495. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  496. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  497. package/es/scenegraph/group-creater/progress/proxy.js +27 -34
  498. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  499. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
  500. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  501. package/es/scenegraph/layout/compute-col-width.js +23 -15
  502. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  503. package/es/scenegraph/layout/compute-row-height.js +20 -9
  504. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  505. package/es/scenegraph/layout/move-cell.js +1 -1
  506. package/es/scenegraph/layout/move-cell.js.map +1 -1
  507. package/es/scenegraph/layout/update-cell.js +3 -1
  508. package/es/scenegraph/layout/update-cell.js.map +1 -1
  509. package/es/scenegraph/layout/update-height.js +1 -1
  510. package/es/scenegraph/layout/update-height.js.map +1 -1
  511. package/es/scenegraph/layout/update-row.js +1 -1
  512. package/es/scenegraph/layout/update-row.js.map +1 -1
  513. package/es/scenegraph/layout/update-width.js +34 -2
  514. package/es/scenegraph/layout/update-width.js.map +1 -1
  515. package/es/scenegraph/refresh-node/update-chart.d.ts +3 -0
  516. package/es/scenegraph/refresh-node/update-chart.js +70 -4
  517. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  518. package/es/scenegraph/scenegraph.d.ts +8 -0
  519. package/es/scenegraph/scenegraph.js +117 -19
  520. package/es/scenegraph/scenegraph.js.map +1 -1
  521. package/es/scenegraph/stick-text/index.js +10 -8
  522. package/es/scenegraph/stick-text/index.js.map +1 -1
  523. package/es/scenegraph/style/corner-cell.d.ts +3 -0
  524. package/es/scenegraph/style/corner-cell.js +25 -0
  525. package/es/scenegraph/style/corner-cell.js.map +1 -0
  526. package/es/scenegraph/style/frame-border.d.ts +1 -0
  527. package/es/scenegraph/style/frame-border.js +2 -6
  528. package/es/scenegraph/style/frame-border.js.map +1 -1
  529. package/es/scenegraph/utils/get-cell-merge.js +2 -1
  530. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  531. package/es/state/state.js +1 -1
  532. package/es/state/state.js.map +1 -1
  533. package/es/themes/DARK.js +1 -2
  534. package/es/themes/theme.d.ts +10 -0
  535. package/es/themes/theme.js +50 -4
  536. package/es/themes/theme.js.map +1 -1
  537. package/es/tools/LimitPromiseQueue.js +2 -1
  538. package/es/tools/calc.d.ts +3 -0
  539. package/es/tools/calc.js +10 -0
  540. package/es/tools/calc.js.map +1 -1
  541. package/es/tools/debounce.js +1 -1
  542. package/es/tools/diff-cell.js +1 -1
  543. package/es/tools/dom.js +1 -1
  544. package/es/tools/env.js +1 -1
  545. package/es/ts-types/base-table.d.ts +29 -12
  546. package/es/ts-types/base-table.js.map +1 -1
  547. package/es/ts-types/column/style.d.ts +0 -1
  548. package/es/ts-types/column/style.js.map +1 -1
  549. package/es/ts-types/component/axis.d.ts +12 -0
  550. package/es/ts-types/component/axis.js +2 -0
  551. package/es/ts-types/component/axis.js.map +1 -0
  552. package/es/ts-types/component/legend.d.ts +5 -0
  553. package/es/ts-types/component/legend.js +2 -0
  554. package/es/ts-types/component/legend.js.map +1 -0
  555. package/es/ts-types/component/title.d.ts +47 -0
  556. package/es/ts-types/component/title.js +2 -0
  557. package/es/ts-types/component/title.js.map +1 -0
  558. package/es/ts-types/component/util.d.ts +1 -0
  559. package/es/ts-types/component/util.js +2 -0
  560. package/es/ts-types/component/util.js.map +1 -0
  561. package/es/ts-types/customElement.d.ts +2 -0
  562. package/es/ts-types/customElement.js.map +1 -1
  563. package/es/ts-types/events.d.ts +108 -83
  564. package/es/ts-types/events.js.map +1 -1
  565. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  566. package/es/ts-types/list-table/define/chart-define.d.ts +1 -1
  567. package/es/ts-types/list-table/define/chart-define.js.map +1 -1
  568. package/es/ts-types/list-table/layout-map/api.d.ts +4 -2
  569. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  570. package/es/ts-types/new-data-set.d.ts +19 -5
  571. package/es/ts-types/new-data-set.js +2 -2
  572. package/es/ts-types/new-data-set.js.map +1 -1
  573. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  574. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
  575. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  576. package/es/ts-types/pivot-table/corner.d.ts +3 -3
  577. package/es/ts-types/pivot-table/corner.js.map +1 -1
  578. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  579. package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  580. package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  581. package/es/ts-types/pivot-table/indicator/index.d.ts +1 -0
  582. package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
  583. package/es/ts-types/pivot-table/title.d.ts +1 -1
  584. package/es/ts-types/pivot-table/title.js.map +1 -1
  585. package/es/ts-types/table-engine.d.ts +27 -3
  586. package/es/ts-types/table-engine.js.map +1 -1
  587. package/es/ts-types/theme.d.ts +5 -0
  588. package/es/ts-types/theme.js.map +1 -1
  589. package/package.json +16 -10
  590. package/cjs/chartType.js +0 -14
  591. package/cjs/chartType.js.map +0 -1
  592. package/cjs/menu/dom/BaseMenu.js.map +0 -1
  593. package/cjs/menu/dom/Menu.js.map +0 -1
  594. package/cjs/menu/dom/MenuHandler.js.map +0 -1
  595. package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
  596. package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
  597. package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
  598. package/cjs/plugins/chartTypes.js.map +0 -1
  599. package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
  600. package/cjs/scenegraph/layout/auto-width.js +0 -85
  601. package/cjs/scenegraph/layout/auto-width.js.map +0 -1
  602. package/cjs/tooltip/BaseTooltip.js.map +0 -1
  603. package/cjs/tooltip/Tooltip.js.map +0 -1
  604. package/cjs/tooltip/TooltipHandler.js.map +0 -1
  605. package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  606. package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  607. package/es/chartType.js.map +0 -1
  608. package/es/menu/dom/BaseMenu.js.map +0 -1
  609. package/es/menu/dom/Menu.js.map +0 -1
  610. package/es/menu/dom/MenuHandler.js.map +0 -1
  611. package/es/menu/dom/logic/MenuContainer.js.map +0 -1
  612. package/es/menu/dom/logic/MenuElement.js.map +0 -1
  613. package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
  614. package/es/plugins/chartTypes.js +0 -2
  615. package/es/plugins/chartTypes.js.map +0 -1
  616. package/es/scenegraph/layout/auto-width.d.ts +0 -2
  617. package/es/scenegraph/layout/auto-width.js +0 -82
  618. package/es/scenegraph/layout/auto-width.js.map +0 -1
  619. package/es/tooltip/BaseTooltip.js.map +0 -1
  620. package/es/tooltip/Tooltip.js.map +0 -1
  621. package/es/tooltip/TooltipHandler.js.map +0 -1
  622. package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  623. package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  624. /package/cjs/{chartType.d.ts → chartModule.d.ts} +0 -0
  625. /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
  626. /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
  627. /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
  628. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  629. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  630. /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  631. /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  632. /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
  633. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  634. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  635. /package/cjs/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
  636. /package/es/{chartType.d.ts → chartModule.d.ts} +0 -0
  637. /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
  638. /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
  639. /package/es/{menu → components/menu}/dom/Menu.js +0 -0
  640. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  641. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  642. /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  643. /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  644. /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
  645. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  646. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  647. /package/es/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
@@ -1,32 +1,146 @@
1
- import { transpose } from "../tools/util";
1
+ import { isValid, transpose } from "../tools/util";
2
2
 
3
3
  import { IndicatorDimensionKeyPlaceholder } from "../tools/global";
4
4
 
5
- export class PivoLayoutMap {
5
+ import { getAxisConfigInPivotChart } from "./chart-helper/get-axis-config";
6
+
7
+ import { getChartAxes, getChartDataId, getChartSpec, getRawChartSpec } from "./chart-helper/get-chart-spec";
8
+
9
+ const EMPTY_HEADER = {
10
+ isEmpty: !0,
11
+ id: void 0,
12
+ field: void 0,
13
+ headerType: void 0,
14
+ define: void 0
15
+ };
16
+
17
+ export class PivotLayoutMap {
6
18
  constructor(table, dataset) {
7
- var _a, _b, _c, _d, _e, _f;
19
+ var _a, _b, _c, _d, _e, _f, _g, _h;
8
20
  this._headerObjects = [], this._headerObjectMap = {}, this._indicatorObjects = [],
9
- this._showRowHeader = !0, this._showColumnHeader = !0, this._indicatorShowType = "column",
10
- this.indicatorsAsCol = !0, this.hideIndicatorName = !1, this._table = table, this.rowsDefine = null !== (_a = table.options.rows) && void 0 !== _a ? _a : [],
21
+ this._columnWidths = [], this._showRowHeader = !0, this._showColumnHeader = !0,
22
+ this._indicatorShowType = "column", this.indicatorsAsCol = !0, this.hideIndicatorName = !1,
23
+ this.indicatorDimensionKey = IndicatorDimensionKeyPlaceholder, this._table = table,
24
+ this.rowTree = table.options.rowTree, this.columnTree = table.options.columnTree,
25
+ this.rowsDefine = null !== (_a = table.options.rows) && void 0 !== _a ? _a : [],
11
26
  this.columnsDefine = null !== (_b = table.options.columns) && void 0 !== _b ? _b : [],
12
27
  this.indicatorsDefine = null !== (_c = table.options.indicators) && void 0 !== _c ? _c : [],
13
28
  this.indicatorTitle = table.options.indicatorTitle, this.dataset = dataset, this.dataConfig = dataset.dataConfig,
14
- this.indicators = dataset.indicators, this.indicatorsAsCol = null === (_d = table.options.indicatorsAsCol) || void 0 === _d || _d,
29
+ this.indicatorKeys = dataset.indicatorKeys, this.indicatorsAsCol = null === (_d = table.options.indicatorsAsCol) || void 0 === _d || _d,
15
30
  this.hideIndicatorName = null !== (_e = table.options.hideIndicatorName) && void 0 !== _e && _e,
16
- this.indicatorDimensionKey = IndicatorDimensionKeyPlaceholder, this.cornerSetting = null !== (_f = table.options.corner) && void 0 !== _f ? _f : {
31
+ this.showRowHeader = null === (_f = table.options.showRowHeader) || void 0 === _f || _f,
32
+ this.showColumnHeader = null === (_g = table.options.showColumnHeader) || void 0 === _g || _g,
33
+ this.rowHeaderTitle = table.options.rowHeaderTitle, this.columnHeaderTitle = table.options.columnHeaderTitle,
34
+ this.cornerSetting = null !== (_h = table.options.corner) && void 0 !== _h ? _h : {
17
35
  titleOnDimension: "column"
18
36
  }, this.columns = dataset.columns, this.rows = dataset.rows, this.rowKeysPath = dataset.rowKeysPath,
19
- this.colKeysPath = dataset.colKeysPath, this.convertColKeys = transpose(this.colKeysPath),
20
- this.tree = dataset.tree, this.initState();
37
+ this.colKeysPath = dataset.colKeysPath, this.tree = dataset.tree, this.initState(),
38
+ this.convertColKeys = transpose(this.colKeysPath);
21
39
  }
22
40
  initState() {
23
- this.indicatorsAsCol && !this.hideIndicatorName ? this._indicatorShowType = "column" : this.indicatorsAsCol || this.hideIndicatorName ? this._indicatorShowType = "none" : this._indicatorShowType = "row",
24
- this.colShowAttrs = "column" === this._indicatorShowType ? this.columns.concat(this.indicatorDimensionKey) : this.columns,
25
- this.rowShowAttrs = "row" === this._indicatorShowType ? this.rows.concat(this.indicatorDimensionKey) : this.rows,
26
- this._colCount = (0 === this.colKeysPath.length ? 1 : this.colKeysPath.length) * (this.indicatorsAsCol ? this.indicators.length : 1) + this.rowHeaderLevelCount,
27
- this._rowCount = (0 === this.rowKeysPath.length ? 1 : this.rowKeysPath.length) * (this.indicatorsAsCol ? 1 : this.indicators.length) + this.columnHeaderLevelCount,
28
- this._bodyRowCount = this.rowKeysPath.length * (this.indicatorsAsCol ? 1 : this.indicators.length),
29
- this.initHeaderObjects(), this.initIndicatorObjects();
41
+ var _a, _b, _c, _d, _e;
42
+ if (this.indicatorsAsCol && !this.hideIndicatorName ? this._indicatorShowType = "column" : this.indicatorsAsCol || this.hideIndicatorName ? this._indicatorShowType = "none" : this._indicatorShowType = "row",
43
+ this.colShowAttrs = "column" === this._indicatorShowType ? this.columns.concat(this.indicatorDimensionKey) : Array.from(this.columns),
44
+ this.rowShowAttrs = "row" === this._indicatorShowType ? this.rows.concat(this.indicatorDimensionKey) : Array.from(this.rows),
45
+ this._bodyRowCount = this.rowKeysPath.length * (this.indicatorsAsCol ? 1 : this.indicatorKeys.length),
46
+ this.initHeaderObjects(), this.initIndicatorObjects(), this.rowHeaderTitle) {
47
+ const cell_id = "rowHeaderTitle", caption = "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), "");
48
+ this._headerObjectMap[caption] = {
49
+ id: caption,
50
+ caption: caption,
51
+ field: cell_id,
52
+ headerType: null !== (_a = this.rowHeaderTitle.headerType) && void 0 !== _a ? _a : "text",
53
+ style: this.rowHeaderTitle.headerStyle,
54
+ define: {}
55
+ }, this._headerObjectMap[cell_id] = {
56
+ id: cell_id,
57
+ caption: "",
58
+ field: cell_id,
59
+ headerType: null !== (_b = this.cornerSetting.headerType) && void 0 !== _b ? _b : "text",
60
+ style: this.cornerSetting.headerStyle,
61
+ define: {}
62
+ }, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
63
+ this.rowShowAttrs.unshift(cell_id), this.rowKeysPath.forEach(((rowKey, index) => {
64
+ rowKey.unshift(caption);
65
+ }));
66
+ }
67
+ if (this.columnHeaderTitle) {
68
+ const cell_id = "columnHeaderTitleCell", caption = "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), "");
69
+ this._headerObjectMap[caption] = {
70
+ id: caption,
71
+ caption: caption,
72
+ field: cell_id,
73
+ headerType: null !== (_c = this.columnHeaderTitle.headerType) && void 0 !== _c ? _c : "text",
74
+ style: this.columnHeaderTitle.headerStyle,
75
+ define: {}
76
+ }, this._headerObjectMap[cell_id] = {
77
+ id: cell_id,
78
+ caption: "",
79
+ field: cell_id,
80
+ headerType: null !== (_d = this.cornerSetting.headerType) && void 0 !== _d ? _d : "text",
81
+ style: this.cornerSetting.headerStyle,
82
+ define: {}
83
+ }, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
84
+ this.colShowAttrs.unshift(cell_id), this.colKeysPath.forEach(((columnKey, index) => {
85
+ columnKey.unshift(caption);
86
+ }));
87
+ }
88
+ if (this._table.isPivotChart()) if (this.hasTwoIndicatorAxes = this._indicatorObjects.some((indicatorObject => !!(indicatorObject.chartSpec && indicatorObject.chartSpec.series && indicatorObject.chartSpec.series.length > 1))),
89
+ this.indicatorsAsCol) {
90
+ const cell_id = "rowHeaderEmpty";
91
+ this._headerObjectMap[cell_id] = {
92
+ id: cell_id,
93
+ caption: "",
94
+ field: cell_id,
95
+ headerType: null !== (_e = this.cornerSetting.headerType) && void 0 !== _e ? _e : "text",
96
+ style: this.cornerSetting.headerStyle,
97
+ define: {}
98
+ }, this._headerObjects.push(this._headerObjectMap[cell_id]), this.rowShowAttrs.push(cell_id),
99
+ this.hasTwoIndicatorAxes || this.colShowAttrs.pop();
100
+ } else {
101
+ const axisOption = this._table.pivotChartAxes.find((axisOption => "left" === axisOption.orient));
102
+ !1 === (null == axisOption ? void 0 : axisOption.visible) && this.rowShowAttrs.pop();
103
+ }
104
+ this._colCount = (0 === this.colKeysPath.length ? 1 : this.colKeysPath.length) * (this.indicatorsAsCol ? this.indicatorKeys.length : 1) + this.rowHeaderLevelCount + this.rightFrozenColCount,
105
+ this._rowCount = (0 === this.rowKeysPath.length ? 1 : this.rowKeysPath.length) * (this.indicatorsAsCol ? 1 : this.indicatorKeys.length) + this.columnHeaderLevelCount + this.bottomFrozenRowCount,
106
+ this.setColumnWidths();
107
+ }
108
+ setColumnWidths() {
109
+ const returnWidths = new Array(this.colCount).fill(void 0);
110
+ if (this.showRowHeader && (this.rowHeaderTitle && (returnWidths[0] = {}), this.rowShowAttrs.forEach(((objKey, index) => {
111
+ var _a;
112
+ const dimension = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === objKey));
113
+ dimension && (returnWidths[index + (this.rowHeaderTitle ? 1 : 0)] = {
114
+ width: dimension.width,
115
+ minWidth: dimension.minWidth,
116
+ maxWidth: dimension.maxWidth
117
+ });
118
+ }))), this.indicatorsAsCol) for (let i = this.rowHeaderLevelCount; i < this.colCount; i++) {
119
+ const cellDefine = this.getBody(i, this.columnHeaderLevelCount);
120
+ returnWidths[i] = {
121
+ width: null == cellDefine ? void 0 : cellDefine.width,
122
+ minWidth: null == cellDefine ? void 0 : cellDefine.minWidth,
123
+ maxWidth: null == cellDefine ? void 0 : cellDefine.maxWidth
124
+ };
125
+ } else {
126
+ let maxWidth, minWidth, isAuto, width = 0;
127
+ this._indicatorObjects.forEach(((obj, index) => {
128
+ "number" == typeof obj.width ? width = Math.max(obj.width, width) : "auto" === obj.width && (isAuto = !0),
129
+ "number" == typeof obj.minWidth && (minWidth = Math.max(obj.minWidth, minWidth)),
130
+ "number" == typeof obj.maxWidth && (maxWidth = Math.max(obj.maxWidth, maxWidth));
131
+ })), width = width > 0 ? width : isAuto ? "auto" : void 0, returnWidths.fill({
132
+ width: width,
133
+ minWidth: minWidth,
134
+ maxWidth: maxWidth
135
+ }, this.rowHeaderLevelCount, this.colCount - this.rightFrozenColCount);
136
+ }
137
+ this._columnWidths = returnWidths;
138
+ }
139
+ get columnWidths() {
140
+ return this._columnWidths;
141
+ }
142
+ getColumnWidthDefined(col) {
143
+ return this._columnWidths[col];
30
144
  }
31
145
  getDimensionInfo(dimensionKey) {
32
146
  var _a, _b, _c;
@@ -36,6 +150,12 @@ export class PivoLayoutMap {
36
150
  var _a;
37
151
  return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.caption === indicatorValue)));
38
152
  }
153
+ getColKeysPath() {
154
+ return this.colKeysPath;
155
+ }
156
+ getRowKeysPath() {
157
+ return this.rowKeysPath;
158
+ }
39
159
  initHeaderObjects() {
40
160
  var _a, _b, _c, _d, _e, _f, _g, _h;
41
161
  for (let i = 0, len = this.rowKeysPath.length; i <= len - 1; i++) {
@@ -82,20 +202,20 @@ export class PivoLayoutMap {
82
202
  }
83
203
  let cornerAttrs;
84
204
  this.indicatorsDefine.forEach((indicator => {
85
- var _a, _b;
205
+ var _a, _b, _c;
86
206
  const indicatorKey = "string" == typeof indicator ? indicator : indicator.indicatorKey, indicatorInfo = "string" == typeof indicator ? void 0 : indicator;
87
207
  this._headerObjectMap[indicatorKey] || (this._headerObjectMap[indicatorKey] = {
88
208
  id: indicatorKey,
89
209
  field: this.indicatorDimensionKey,
90
- caption: indicatorKey,
210
+ caption: null !== (_a = indicatorInfo.caption) && void 0 !== _a ? _a : indicatorKey,
91
211
  style: null == indicatorInfo ? void 0 : indicatorInfo.headerStyle,
92
212
  define: {
93
213
  field: this.indicatorDimensionKey,
94
- headerType: null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _a ? _a : "text",
214
+ headerType: null !== (_b = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _b ? _b : "text",
95
215
  columnType: "text"
96
216
  },
97
217
  dropDownMenu: null == indicatorInfo ? void 0 : indicatorInfo.dropDownMenu,
98
- headerType: null !== (_b = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _b ? _b : "text",
218
+ headerType: null !== (_c = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _c ? _c : "text",
99
219
  width: null == indicatorInfo ? void 0 : indicatorInfo.width
100
220
  }, this._headerObjects.push(this._headerObjectMap[indicatorKey]));
101
221
  })), "column" === this.cornerSetting.titleOnDimension ? cornerAttrs = this.colShowAttrs : "row" === this.cornerSetting.titleOnDimension && (cornerAttrs = this.rowShowAttrs),
@@ -121,41 +241,32 @@ export class PivoLayoutMap {
121
241
  }));
122
242
  }
123
243
  initIndicatorObjects() {
124
- this.indicators.forEach((indicatorStr => {
244
+ this.indicatorKeys.forEach((indicatorKey => {
125
245
  var _a, _b, _c;
126
- const indicatorInfo = null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && indicator.caption === indicatorStr));
246
+ const indicatorInfo = null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && indicator.indicatorKey === indicatorKey));
127
247
  this._indicatorObjects.push({
128
- id: indicatorStr,
129
- indicatorKey: indicatorStr,
130
- field: indicatorStr,
131
- define: {
132
- field: indicatorStr,
248
+ id: indicatorKey,
249
+ indicatorKey: indicatorKey,
250
+ field: indicatorKey,
251
+ define: Object.assign({
252
+ field: indicatorKey,
133
253
  headerType: "text",
134
254
  columnType: null !== (_b = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _b ? _b : "text"
135
- },
255
+ }, indicatorInfo),
136
256
  fieldFormat: null == indicatorInfo ? void 0 : indicatorInfo.format,
137
257
  columnType: null !== (_c = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _c ? _c : "text",
138
- style: null == indicatorInfo ? void 0 : indicatorInfo.style
258
+ chartModule: indicatorInfo && ("chartModule" in indicatorInfo ? indicatorInfo.chartModule : null),
259
+ chartSpec: indicatorInfo && ("chartSpec" in indicatorInfo ? indicatorInfo.chartSpec : null),
260
+ sparklineSpec: "sparklineSpec" in indicatorInfo ? indicatorInfo.sparklineSpec : null,
261
+ style: null == indicatorInfo ? void 0 : indicatorInfo.style,
262
+ icon: null == indicatorInfo ? void 0 : indicatorInfo.icon,
263
+ width: null == indicatorInfo ? void 0 : indicatorInfo.width,
264
+ minWidth: null == indicatorInfo ? void 0 : indicatorInfo.minWidth,
265
+ maxWidth: null == indicatorInfo ? void 0 : indicatorInfo.maxWidth,
266
+ disableColumnResize: null == indicatorInfo ? void 0 : indicatorInfo.disableColumnResize
139
267
  });
140
268
  }));
141
269
  }
142
- get columnWidths() {
143
- var _a;
144
- const returnWidths = [];
145
- for (let i = 0; i < this.rowHeaderLevelCount; i++) {
146
- const dimension = null !== (_a = this.getDimensionInfo(this.rowShowAttrs[i])) && void 0 !== _a ? _a : this.getIndicatorInfo(this.rowShowAttrs[i]);
147
- returnWidths.push({
148
- width: null == dimension ? void 0 : dimension.width
149
- });
150
- }
151
- for (let j = 0; j < this.colCount - this.rowHeaderLevelCount; j++) {
152
- const indicator = this._indicatorObjects[j % this._indicatorObjects.length];
153
- returnWidths.push({
154
- width: null == indicator ? void 0 : indicator.width
155
- });
156
- }
157
- return returnWidths;
158
- }
159
270
  get showColumnHeader() {
160
271
  return this._showColumnHeader;
161
272
  }
@@ -168,11 +279,23 @@ export class PivoLayoutMap {
168
279
  set showRowHeader(_showRowHeader) {
169
280
  this._showRowHeader = _showRowHeader;
170
281
  }
282
+ get columnHeaderTitle() {
283
+ return this._columnHeaderTitle;
284
+ }
285
+ set columnHeaderTitle(_columnHeaderTitle) {
286
+ this._columnHeaderTitle = _columnHeaderTitle;
287
+ }
288
+ get rowHeaderTitle() {
289
+ return this._rowHeaderTitle;
290
+ }
291
+ set rowHeaderTitle(_rowHeaderTitle) {
292
+ this._rowHeaderTitle = _rowHeaderTitle;
293
+ }
171
294
  getCellType(col, row) {
172
295
  return this.isCornerHeader(col, row) ? "cornerHeader" : this.isColumnHeader(col, row) ? "columnHeader" : this.isRowHeader(col, row) ? "rowHeader" : "body";
173
296
  }
174
297
  isHeader(col, row) {
175
- return col < this.rowHeaderLevelCount || row < this.columnHeaderLevelCount;
298
+ return col < this.rowHeaderLevelCount || (row < this.columnHeaderLevelCount || (col >= this.colCount - this.rightFrozenColCount || row >= this.rowCount - this.bottomFrozenRowCount));
176
299
  }
177
300
  isCornerHeader(col, row) {
178
301
  return col < this.rowHeaderLevelCount && row < this.columnHeaderLevelCount;
@@ -180,6 +303,12 @@ export class PivoLayoutMap {
180
303
  isColumnHeader(col, row) {
181
304
  return col >= this.rowHeaderLevelCount && row < this.columnHeaderLevelCount;
182
305
  }
306
+ isRightFrozenColumn(col, row) {
307
+ return col >= this.colCount - this.rightFrozenColCount && row >= this.columnHeaderLevelCount && row < this.rowCount - this.bottomFrozenRowCount;
308
+ }
309
+ isBottomFrozenRow(col, row) {
310
+ return col >= this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount && col < this.colCount - this.rightFrozenColCount;
311
+ }
183
312
  isRowHeader(col, row) {
184
313
  return col < this.rowHeaderLevelCount && row >= this.columnHeaderLevelCount;
185
314
  }
@@ -246,11 +375,17 @@ export class PivoLayoutMap {
246
375
  }
247
376
  get columnHeaderLevelCount() {
248
377
  const colLevelCount = this.colShowAttrs.length;
249
- return this.showColumnHeader ? colLevelCount : 0;
378
+ if (this.showColumnHeader) {
379
+ return this.indicatorsAsCol && this.hideIndicatorName && this.colShowAttrs[this.colShowAttrs.length - 1] === this.indicatorDimensionKey ? colLevelCount - 1 : colLevelCount;
380
+ }
381
+ return this.indicatorsAsCol ? this.hideIndicatorName ? 0 : 1 : 0;
250
382
  }
251
383
  get rowHeaderLevelCount() {
252
384
  const rowLevelCount = this.rowShowAttrs.length;
253
- return this.showRowHeader ? rowLevelCount : 0;
385
+ if (this.showRowHeader) {
386
+ return this.indicatorsAsCol ? rowLevelCount : this.hideIndicatorName && this.rowShowAttrs[this.rowShowAttrs.length - 1] === this.indicatorDimensionKey ? rowLevelCount - 1 : rowLevelCount;
387
+ }
388
+ return this.indicatorsAsCol || this.hideIndicatorName ? 0 : 1;
254
389
  }
255
390
  get colCount() {
256
391
  return this._colCount;
@@ -261,6 +396,34 @@ export class PivoLayoutMap {
261
396
  get bodyRowCount() {
262
397
  return this._bodyRowCount;
263
398
  }
399
+ get bottomFrozenRowCount() {
400
+ if (!this._table.isPivotChart()) return 0;
401
+ const axisOption = this._table.pivotChartAxes.find((axisOption => "bottom" === axisOption.orient));
402
+ return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : (this.indicatorsAsCol,
403
+ 1);
404
+ }
405
+ get rightFrozenColCount() {
406
+ if (!this._table.isPivotChart()) return 0;
407
+ const axisOption = this._table.pivotChartAxes.find((axisOption => "right" === axisOption.orient));
408
+ return !1 === (null == axisOption ? void 0 : axisOption.visible) || this.indicatorsAsCol ? 0 : this.hasTwoIndicatorAxes ? 1 : 0;
409
+ }
410
+ get leftAxesCount() {
411
+ if (!this._table.isPivotChart()) return 0;
412
+ const axisOption = this._table.pivotChartAxes.find((axisOption => "left" === axisOption.orient));
413
+ return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : (this.indicatorsAsCol,
414
+ 1);
415
+ }
416
+ get topAxesCount() {
417
+ if (!this._table.isPivotChart()) return 0;
418
+ const axisOption = this._table.pivotChartAxes.find((axisOption => "top" === axisOption.orient));
419
+ return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : this.indicatorsAsCol && this.hasTwoIndicatorAxes ? 1 : 0;
420
+ }
421
+ get rightAxesCount() {
422
+ return this.rightFrozenColCount;
423
+ }
424
+ get bottomAxesCount() {
425
+ return this.bottomFrozenRowCount;
426
+ }
264
427
  get headerObjects() {
265
428
  return this._headerObjects;
266
429
  }
@@ -268,27 +431,31 @@ export class PivoLayoutMap {
268
431
  return this._indicatorObjects;
269
432
  }
270
433
  getCellId(col, row) {
434
+ if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount || row < this.columnHeaderLevelCount && col >= this.colCount - this.rightFrozenColCount) return 0;
271
435
  if (row >= 0 && col >= 0) if (this.isCornerHeader(col, row)) {
272
436
  if ("column" === this.cornerSetting.titleOnDimension) return this.colShowAttrs[row];
273
437
  if ("row" === this.cornerSetting.titleOnDimension) return this.rowShowAttrs[col];
274
438
  } else {
275
- if (this.isColumnHeader(col, row)) return row < this.columns.length ? this.convertColKeys[row][this.indicatorsAsCol ? Math.floor((col - this.rowHeaderLevelCount) / this.indicators.length) : col - this.rowHeaderLevelCount] : this.indicators[(col - this.rowHeaderLevelCount) % this.indicators.length];
276
- if (this.isRowHeader(col, row)) return col < this.rows.length ? this.rowKeysPath[this.indicatorsAsCol ? row - this.columnHeaderLevelCount : Math.floor((row - this.columnHeaderLevelCount) / this.indicators.length)][col] : this.indicators[(row - this.columnHeaderLevelCount) % this.indicators.length];
439
+ if (this.isColumnHeader(col, row)) return row < this.columns.length + (this.columnHeaderTitle ? 1 : 0) ? this.convertColKeys[row][this.indicatorsAsCol ? Math.floor((col - this.rowHeaderLevelCount) / this.indicatorKeys.length) : col - this.rowHeaderLevelCount] : this.indicatorKeys[(col - this.rowHeaderLevelCount) % this.indicatorKeys.length];
440
+ if (this.isRowHeader(col, row)) return col < this.rows.length + (this.rowHeaderTitle ? 1 : 0) ? this.rowKeysPath[this.indicatorsAsCol ? row - this.columnHeaderLevelCount : Math.floor((row - this.columnHeaderLevelCount) / this.indicatorKeys.length)][col] : this.indicatorKeys[(row - this.columnHeaderLevelCount) % this.indicatorKeys.length];
441
+ if (this.isRightFrozenColumn(col, row)) return this.indicatorsAsCol ? this.rowKeysPath[row - this.columnHeaderLevelCount][this.rowHeaderLevelCount - 1] : this.indicatorKeys[(row - this.columnHeaderLevelCount) % this.indicatorKeys.length];
442
+ if (this.isBottomFrozenRow(col, row)) return this.indicatorsAsCol ? this.indicatorKeys[(col - this.rowHeaderLevelCount) % this.indicatorKeys.length] : this.convertColKeys[this.convertColKeys.length - 1][Math.floor((col - this.rowHeaderLevelCount) / this.indicatorKeys.length)];
277
443
  }
278
444
  return 0;
279
445
  }
280
- getIndicatorName(col, row) {
446
+ getIndicatorKey(col, row) {
281
447
  if (this.isHeader(col, row)) return "";
282
448
  if (this.indicatorsAsCol) {
283
449
  const bodyCol = col - this.rowHeaderLevelCount;
284
- return this.indicators[bodyCol % this.indicators.length];
450
+ return this.indicatorKeys[bodyCol % this.indicatorKeys.length];
285
451
  }
286
452
  const bodyRow = row - this.columnHeaderLevelCount;
287
- return this.indicators[bodyRow % this.indicators.length];
453
+ return this.indicatorKeys[bodyRow % this.indicatorKeys.length];
288
454
  }
289
455
  getHeader(col, row) {
456
+ var _a;
290
457
  const id = this.getCellId(col, row);
291
- return this._headerObjectMap[id];
458
+ return null !== (_a = this._headerObjectMap[id]) && void 0 !== _a ? _a : EMPTY_HEADER;
292
459
  }
293
460
  getHeaderField(col, row) {
294
461
  var _a, _b;
@@ -301,20 +468,25 @@ export class PivoLayoutMap {
301
468
  throw new Error(`Method not implemented.${field}`);
302
469
  }
303
470
  getBody(_col, _row) {
304
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
305
- let indicatorInfo;
306
- return indicatorInfo = this.indicatorsAsCol ? this.getIndicatorInfo(null === (_a = null == this ? void 0 : this.indicators) || void 0 === _a ? void 0 : _a[(_col - this.rowHeaderLevelCount) % (null !== (_c = null === (_b = this.indicators) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0)]) : this.getIndicatorInfo(null === (_d = null == this ? void 0 : this.indicators) || void 0 === _d ? void 0 : _d[(_row - this.columnHeaderLevelCount) % (null !== (_f = null === (_e = this.indicators) || void 0 === _e ? void 0 : _e.length) && void 0 !== _f ? _f : 0)]),
307
- {
308
- id: 0,
309
- indicatorKey: this.indicators[(_col - this.rowHeaderLevelCount) % (null !== (_h = null === (_g = this.indicators) || void 0 === _g ? void 0 : _g.length) && void 0 !== _h ? _h : 0)],
310
- field: this.indicators[(_col - this.rowHeaderLevelCount) % (null !== (_k = null === (_j = this.indicators) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0)],
311
- columnType: null !== (_l = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _l ? _l : "text",
312
- style: null == indicatorInfo ? void 0 : indicatorInfo.style,
313
- define: {
314
- field: this.indicators[(_col - this.rowHeaderLevelCount) % (null !== (_o = null === (_m = this.indicators) || void 0 === _m ? void 0 : _m.length) && void 0 !== _o ? _o : 0)],
315
- headerType: "text",
316
- columnType: null !== (_p = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _p ? _p : "text"
317
- }
471
+ var _a, _b, _c, _d, _e, _f;
472
+ const paths = this.getCellHeaderPaths(_col, _row);
473
+ if (this.indicatorsAsCol) {
474
+ const indicatorKey = null === (_a = paths.colHeaderPaths.find((colPath => colPath.indicatorKey))) || void 0 === _a ? void 0 : _a.indicatorKey;
475
+ return null !== (_c = null !== (_b = this._indicatorObjects.find((indicator => indicator.indicatorKey === indicatorKey))) && void 0 !== _b ? _b : this._indicatorObjects[0]) && void 0 !== _c ? _c : {
476
+ id: "",
477
+ field: void 0,
478
+ indicatorKey: void 0,
479
+ columnType: void 0,
480
+ define: void 0
481
+ };
482
+ }
483
+ const indicatorKey = null === (_d = paths.rowHeaderPaths.find((rowPath => rowPath.indicatorKey))) || void 0 === _d ? void 0 : _d.indicatorKey;
484
+ return null !== (_f = null !== (_e = this._indicatorObjects.find((indicator => indicator.indicatorKey === indicatorKey))) && void 0 !== _e ? _e : this._indicatorObjects[0]) && void 0 !== _f ? _f : {
485
+ id: "",
486
+ field: void 0,
487
+ indicatorKey: void 0,
488
+ columnType: void 0,
489
+ define: void 0
318
490
  };
319
491
  }
320
492
  getBodyLayoutRangeById(id) {
@@ -344,6 +516,7 @@ export class PivoLayoutMap {
344
516
  }
345
517
  };
346
518
  if (!this.isHeader(col, row) || -1 === col || -1 === row || this.isIndicatorHeader(col, row)) return result;
519
+ if (this.isRightFrozenColumn(col, row) || this.isBottomFrozenRow(col, row)) return result;
347
520
  const id = this.getCellId(col, row);
348
521
  for (let c = col - 1; c >= 0 && id === this.getCellId(c, row); c--) result.start.col = c;
349
522
  for (let c = col + 1; c < (null !== (_a = this.colCount) && void 0 !== _a ? _a : 0) && id === this.getCellId(c, row); c++) result.end.col = c;
@@ -356,10 +529,10 @@ export class PivoLayoutMap {
356
529
  return range1.start.col === range2.start.col && range1.end.col === range2.end.col && range1.start.row === range2.start.row && range1.end.row === range2.end.row;
357
530
  }
358
531
  getRecordIndexByRow(row) {
359
- return row < this.columnHeaderLevelCount ? -1 : this.indicatorsAsCol ? row - this.columnHeaderLevelCount : Math.floor((row - this.columnHeaderLevelCount) / this.indicators.length);
532
+ return row < this.columnHeaderLevelCount ? -1 : this.indicatorsAsCol ? row - this.columnHeaderLevelCount : Math.floor((row - this.columnHeaderLevelCount) / this.indicatorKeys.length);
360
533
  }
361
534
  getRecordIndexByCol(col) {
362
- return col < this.rowHeaderLevelCount ? -1 : this.indicatorsAsCol ? Math.floor((col - this.rowHeaderLevelCount) / this.indicators.length) : col - this.rowHeaderLevelCount;
535
+ return col < this.rowHeaderLevelCount ? -1 : this.indicatorsAsCol ? Math.floor((col - this.rowHeaderLevelCount) / this.indicatorKeys.length) : col - this.rowHeaderLevelCount;
363
536
  }
364
537
  getRecordStartRowByRecordIndex(index) {
365
538
  return this.columnHeaderLevelCount + index;
@@ -369,32 +542,85 @@ export class PivoLayoutMap {
369
542
  const recordCol = this.getRecordIndexByCol(col), recordRow = this.getRecordIndexByRow(row);
370
543
  let colPath, rowPath, colHeaderPaths, rowHeaderPaths;
371
544
  return recordCol >= 0 && (colPath = this.colKeysPath[recordCol], colHeaderPaths = null === (_a = null == colPath ? void 0 : colPath[colPath.length - 1]) || void 0 === _a ? void 0 : _a.split(this.dataset.stringJoinChar),
372
- row < this.columns.length - 1 && (colHeaderPaths = colHeaderPaths.slice(0, row + 1))),
545
+ colHeaderPaths && this.showColumnHeader && row < this.columns.length - 1 && (colHeaderPaths = colHeaderPaths.slice(0, row + 1))),
373
546
  recordRow >= 0 && (rowPath = this.rowKeysPath[recordRow], rowHeaderPaths = null === (_b = null == rowPath ? void 0 : rowPath[rowPath.length - 1]) || void 0 === _b ? void 0 : _b.split(this.dataset.stringJoinChar),
374
- col < this.rows.length - 1 && (rowHeaderPaths = rowHeaderPaths.slice(0, col + 1))),
547
+ rowHeaderPaths && this.showRowHeader && col < this.rows.length - 1 && (rowHeaderPaths = rowHeaderPaths.slice(0, col + 1))),
548
+ colHeaderPaths && this.indicatorsAsCol && col >= this.rowHeaderLevelCount ? colHeaderPaths.push(this.indicatorKeys[(col - this.rowHeaderLevelCount) % this.indicatorKeys.length]) : rowHeaderPaths && row >= this.columnHeaderLevelCount && rowHeaderPaths.push(this.indicatorKeys[(row - this.columnHeaderLevelCount) % this.indicatorKeys.length]),
375
549
  {
376
- colHeaderPaths: null !== (_c = colHeaderPaths.map((key => {
377
- const isIndicatorKey = this._indicatorObjects.find((indicator => {
378
- indicator.indicatorKey;
379
- }));
550
+ colHeaderPaths: null !== (_c = null == colHeaderPaths ? void 0 : colHeaderPaths.map(((key, index) => {
551
+ const indicatorObject = this._indicatorObjects.find((indicator => indicator.indicatorKey === key));
380
552
  return {
381
- dimensionKey: isIndicatorKey ? void 0 : key,
382
- indicatorKey: isIndicatorKey ? key : void 0,
383
- value: key
553
+ dimensionKey: indicatorObject ? void 0 : this.colShowAttrs[index],
554
+ indicatorKey: indicatorObject ? key : void 0,
555
+ value: indicatorObject ? indicatorObject.define.caption : key
384
556
  };
385
557
  }))) && void 0 !== _c ? _c : [],
386
- rowHeaderPaths: null !== (_d = rowHeaderPaths.map((key => {
387
- const isIndicatorKey = this._indicatorObjects.find((indicator => {
388
- indicator.indicatorKey;
389
- }));
558
+ rowHeaderPaths: null !== (_d = null == rowHeaderPaths ? void 0 : rowHeaderPaths.map(((key, index) => {
559
+ const indicatorObject = this._indicatorObjects.find((indicator => indicator.indicatorKey === key));
390
560
  return {
391
- dimensionKey: isIndicatorKey ? void 0 : key,
392
- indicatorKey: isIndicatorKey ? key : void 0,
393
- value: key
561
+ dimensionKey: indicatorObject ? void 0 : this.rowShowAttrs[index],
562
+ indicatorKey: indicatorObject ? key : void 0,
563
+ value: indicatorObject ? indicatorObject.define.caption : key
394
564
  };
395
565
  }))) && void 0 !== _d ? _d : []
396
566
  };
397
567
  }
568
+ getCellAdressByHeaderPath(dimensionPaths) {
569
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
570
+ let colHeaderPaths, rowHeaderPaths;
571
+ if (Array.isArray(dimensionPaths)) {
572
+ if (dimensionPaths.length > this.rowShowAttrs.length + this.colShowAttrs.length) return;
573
+ colHeaderPaths = dimensionPaths.filter((path => this.colShowAttrs.indexOf(path.dimensionKey) >= 0)),
574
+ rowHeaderPaths = dimensionPaths.filter((path => this.rowShowAttrs.indexOf(path.dimensionKey) >= 0));
575
+ } else colHeaderPaths = dimensionPaths.colHeaderPaths, rowHeaderPaths = dimensionPaths.rowHeaderPaths;
576
+ if (!Array.isArray(colHeaderPaths) && !Array.isArray(rowHeaderPaths)) return;
577
+ null == colHeaderPaths || colHeaderPaths.sort(((a, b) => {
578
+ var _a, _b;
579
+ return this.colShowAttrs.indexOf(null !== (_a = a.dimensionKey) && void 0 !== _a ? _a : this.indicatorDimensionKey) - this.colShowAttrs.indexOf(null !== (_b = b.dimensionKey) && void 0 !== _b ? _b : this.indicatorDimensionKey);
580
+ })), null == rowHeaderPaths || rowHeaderPaths.sort(((a, b) => {
581
+ var _a, _b;
582
+ return this.rowShowAttrs.indexOf(null !== (_a = a.dimensionKey) && void 0 !== _a ? _a : this.indicatorDimensionKey) - this.rowShowAttrs.indexOf(null !== (_b = b.dimensionKey) && void 0 !== _b ? _b : this.indicatorDimensionKey);
583
+ }));
584
+ let needLowestLevel = !1;
585
+ (null == colHeaderPaths ? void 0 : colHeaderPaths.length) >= 1 && (null == rowHeaderPaths ? void 0 : rowHeaderPaths.length) >= 1 && (needLowestLevel = !0);
586
+ let toFindIndicator, col = 0, row = 0, rowTree = this.rowTree, columnTree = this.columnTree;
587
+ if (colHeaderPaths) for (let i = 0; i < colHeaderPaths.length; i++) {
588
+ const colDimension = colHeaderPaths[i];
589
+ if (colDimension.indicatorKey) {
590
+ toFindIndicator = colDimension.indicatorKey;
591
+ break;
592
+ }
593
+ for (let j = 0; j < columnTree.length; j++) {
594
+ const dimension = columnTree[j];
595
+ if (!isValid(colDimension.indicatorKey) && dimension.dimensionKey === colDimension.dimensionKey && dimension.value === colDimension.value) {
596
+ columnTree = dimension.children, columnTree && 0 !== columnTree.length && !(null === (_a = null == columnTree ? void 0 : columnTree[0]) || void 0 === _a ? void 0 : _a.indicatorKey) || (col += j);
597
+ break;
598
+ }
599
+ col += (null === (_c = null === (_b = dimension.children) || void 0 === _b ? void 0 : _b[0]) || void 0 === _c ? void 0 : _c.indicatorKey) ? 0 : null !== (_e = null === (_d = dimension.children) || void 0 === _d ? void 0 : _d.length) && void 0 !== _e ? _e : 0;
600
+ }
601
+ }
602
+ if (rowHeaderPaths) for (let i = 0; i < rowHeaderPaths.length; i++) {
603
+ const rowDimension = rowHeaderPaths[i];
604
+ if (rowDimension.indicatorKey) {
605
+ toFindIndicator = rowDimension.indicatorKey;
606
+ break;
607
+ }
608
+ for (let j = 0; j < rowTree.length; j++) {
609
+ const dimension = rowTree[j];
610
+ if (!isValid(rowDimension.indicatorKey) && dimension.dimensionKey === rowDimension.dimensionKey && dimension.value === rowDimension.value) {
611
+ rowTree = dimension.children, rowTree && 0 !== rowTree.length && !(null === (_f = null == rowTree ? void 0 : rowTree[0]) || void 0 === _f ? void 0 : _f.indicatorKey) || (row += j);
612
+ break;
613
+ }
614
+ row += (null === (_h = null === (_g = dimension.children) || void 0 === _g ? void 0 : _g[0]) || void 0 === _h ? void 0 : _h.indicatorKey) ? 0 : null !== (_k = null === (_j = dimension.children) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0;
615
+ }
616
+ }
617
+ return col = (this.indicatorsAsCol ? col * this.indicatorKeys.length + this.indicatorKeys.indexOf(toFindIndicator) : col) + this.rowHeaderLevelCount,
618
+ row = (this.indicatorsAsCol ? row : row * this.indicatorKeys.length + this.indicatorKeys.indexOf(toFindIndicator)) + this.columnHeaderLevelCount,
619
+ isValid(col) || isValid(row) ? {
620
+ col: null != col ? col : undefined,
621
+ row: null != row ? row : undefined
622
+ } : void 0;
623
+ }
398
624
  getHeaderDimension(col, row) {
399
625
  var _a, _b, _c;
400
626
  if (this.isHeader(col, row)) {
@@ -404,8 +630,8 @@ export class PivoLayoutMap {
404
630
  }
405
631
  updateDataset(dataset) {
406
632
  this.dataset = dataset, this.dataConfig = dataset.dataConfig, this.rowKeysPath = dataset.rowKeysPath,
407
- this.colKeysPath = dataset.colKeysPath, this.convertColKeys = transpose(this.colKeysPath),
408
- this.tree = dataset.tree, this.initState();
633
+ this.colKeysPath = dataset.colKeysPath, this.tree = dataset.tree, this._indicatorObjects = [],
634
+ this._headerObjects = [], this._headerObjectMap = {}, this.initState(), this.convertColKeys = transpose(this.colKeysPath);
409
635
  }
410
636
  isHeaderForColWidth(col, row) {
411
637
  return this.isHeader(col, row);
@@ -439,5 +665,92 @@ export class PivoLayoutMap {
439
665
  }
440
666
  return null == indicatorObj ? void 0 : indicatorObj.chartInstance;
441
667
  }
668
+ _generateChartState() {
669
+ return {
670
+ vtable_selected: {
671
+ filter: datum => {
672
+ if (this._table._selectedDataItemsInChart.length >= 1) {
673
+ return !!this._table._selectedDataItemsInChart.find((item => {
674
+ for (const itemKey in item) if (item[itemKey] !== datum[itemKey]) return !1;
675
+ return !0;
676
+ }));
677
+ }
678
+ if (this._table._selectedDimensionInChart.length) {
679
+ return !!this._table._selectedDimensionInChart.every((item => datum[item.key] === item.value));
680
+ }
681
+ return !1;
682
+ }
683
+ },
684
+ vtable_selected_reverse: {
685
+ filter: datum => {
686
+ if (this._table._selectedDataItemsInChart.length >= 1) {
687
+ return !this._table._selectedDataItemsInChart.find((item => {
688
+ for (const itemKey in item) if (item[itemKey] !== datum[itemKey]) return !1;
689
+ return !0;
690
+ }));
691
+ }
692
+ if (this._table._selectedDimensionInChart.length) {
693
+ return !this._table._selectedDimensionInChart.every((item => datum[item.key] === item.value));
694
+ }
695
+ return !1;
696
+ }
697
+ }
698
+ };
699
+ }
700
+ updateDataStateToChartInstance(activeChartInstance) {
701
+ activeChartInstance || (activeChartInstance = this._table._getActiveChartInstance());
702
+ const state = this._generateChartState();
703
+ this._indicatorObjects.forEach((_indicatorObject => {
704
+ _indicatorObject.chartInstance.updateState(state);
705
+ })), null == activeChartInstance || activeChartInstance.updateState(state);
706
+ }
707
+ updateDataStateToActiveChartInstance(activeChartInstance) {
708
+ activeChartInstance || (activeChartInstance = this._table._getActiveChartInstance());
709
+ const state = this._generateChartState();
710
+ null == activeChartInstance || activeChartInstance.updateState(state);
711
+ }
712
+ getOptimunWidthForChart(col) {
713
+ var _a;
714
+ const path = this.getCellHeaderPaths(col, this.columnHeaderLevelCount).colHeaderPaths;
715
+ let collectedValues;
716
+ for (const key in this.dataset.collectValuesBy) if ("xField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
717
+ collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
718
+ break;
719
+ }
720
+ return 50 * (null !== (_a = null == collectedValues ? void 0 : collectedValues.size) && void 0 !== _a ? _a : 0);
721
+ }
722
+ getIndicatorKeyInChartSpec(_col, _row) {
723
+ const chartSpec = this.getRawChartSpec(_col, _row), indicatorKeys = [];
724
+ return chartSpec ? (!1 === this.indicatorsAsCol ? chartSpec.series ? chartSpec.series.forEach((chartSeries => {
725
+ const yField = chartSeries.yField;
726
+ indicatorKeys.push(yField);
727
+ })) : indicatorKeys.push(chartSpec.yField) : chartSpec.series ? chartSpec.series.forEach((chartSeries => {
728
+ const xField = chartSeries.xField;
729
+ indicatorKeys.push(xField);
730
+ })) : indicatorKeys.push(chartSpec.xField), indicatorKeys) : null;
731
+ }
732
+ getDimensionKeyInChartSpec(_col, _row) {
733
+ const chartSpec = this.getRawChartSpec(_col, _row), dimensionKeys = [];
734
+ return chartSpec ? (!1 === this.indicatorsAsCol ? dimensionKeys.push(chartSpec.xField) : dimensionKeys.push(chartSpec.yField),
735
+ dimensionKeys) : null;
736
+ }
737
+ getAxisConfigInPivotChart(col, row) {
738
+ return getAxisConfigInPivotChart(col, row, this);
739
+ }
740
+ getRawChartSpec(col, row) {
741
+ return getRawChartSpec(col, row, this);
742
+ }
743
+ getChartSpec(col, row) {
744
+ return getChartSpec(col, row, this);
745
+ }
746
+ getChartAxes(col, row) {
747
+ return getChartAxes(col, row, this);
748
+ }
749
+ getChartDataId(col, row) {
750
+ return getChartDataId(col, row, this);
751
+ }
752
+ isEmpty(col, row) {
753
+ return !!this._table.isPivotChart() && (col > this.colCount - this.rightFrozenColCount - 1 || row > this.rowCount - this.bottomFrozenRowCount - 1 || !(!this.hasTwoIndicatorAxes || !this.indicatorsAsCol || row !== this.columnHeaderLevelCount - 1));
754
+ }
442
755
  }
443
756
  //# sourceMappingURL=pivot-layout.js.map