@visactor/vtable 0.15.0-alpha.3 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/cjs/ListTable.d.ts +12 -0
  2. package/cjs/ListTable.js +127 -13
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +1 -0
  5. package/cjs/PivotChart.js +36 -26
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +5 -1
  8. package/cjs/PivotTable.js +109 -63
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/core/BaseTable.d.ts +1 -2
  11. package/cjs/core/BaseTable.js +72 -92
  12. package/cjs/core/BaseTable.js.map +1 -1
  13. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  14. package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
  15. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  16. package/cjs/data/DataSource.d.ts +7 -1
  17. package/cjs/data/DataSource.js +43 -8
  18. package/cjs/data/DataSource.js.map +1 -1
  19. package/cjs/dataset/dataset.d.ts +3 -1
  20. package/cjs/dataset/dataset.js +20 -15
  21. package/cjs/dataset/dataset.js.map +1 -1
  22. package/cjs/edit/edit-manager.d.ts +14 -0
  23. package/cjs/edit/edit-manager.js +72 -0
  24. package/cjs/edit/edit-manager.js.map +1 -0
  25. package/cjs/edit/editors.d.ts +5 -0
  26. package/cjs/edit/editors.js +10 -0
  27. package/cjs/edit/editors.js.map +1 -0
  28. package/cjs/event/event.d.ts +3 -1
  29. package/cjs/event/event.js +5 -1
  30. package/cjs/event/event.js.map +1 -1
  31. package/cjs/event/listener/container-dom.js +5 -1
  32. package/cjs/event/listener/container-dom.js.map +1 -1
  33. package/cjs/event/listener/table-group.d.ts +1 -0
  34. package/cjs/event/listener/table-group.js +41 -27
  35. package/cjs/event/listener/table-group.js.map +1 -1
  36. package/cjs/event/media-click.js +1 -2
  37. package/cjs/event/sparkline-event.js +2 -1
  38. package/cjs/index.d.ts +1 -1
  39. package/cjs/index.js +1 -1
  40. package/cjs/index.js.map +1 -1
  41. package/cjs/layout/pivot-header-layout.d.ts +8 -1
  42. package/cjs/layout/pivot-header-layout.js +47 -22
  43. package/cjs/layout/pivot-header-layout.js.map +1 -1
  44. package/cjs/layout/pivot-layout-helper.d.ts +11 -0
  45. package/cjs/layout/pivot-layout-helper.js +24 -2
  46. package/cjs/layout/pivot-layout-helper.js.map +1 -1
  47. package/cjs/layout/simple-header-layout.d.ts +3 -1
  48. package/cjs/layout/simple-header-layout.js +11 -9
  49. package/cjs/layout/simple-header-layout.js.map +1 -1
  50. package/cjs/register.d.ts +2 -0
  51. package/cjs/register.js +8 -3
  52. package/cjs/register.js.map +1 -1
  53. package/cjs/scenegraph/component/menu.d.ts +41 -0
  54. package/cjs/scenegraph/graphic/icon.js +5 -5
  55. package/cjs/scenegraph/graphic/icon.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
  57. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +30 -58
  58. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  59. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  60. package/cjs/scenegraph/group-creater/progress/proxy.js +1 -3
  61. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  62. package/cjs/scenegraph/icon/icon-update.js +4 -4
  63. package/cjs/scenegraph/icon/icon-update.js.map +1 -1
  64. package/cjs/scenegraph/layout/compute-col-width.d.ts +1 -1
  65. package/cjs/scenegraph/layout/compute-col-width.js +10 -8
  66. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  67. package/cjs/scenegraph/scenegraph.d.ts +1 -0
  68. package/cjs/scenegraph/scenegraph.js +19 -12
  69. package/cjs/scenegraph/scenegraph.js.map +1 -1
  70. package/cjs/scenegraph/select/update-select-border.js +5 -5
  71. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  72. package/cjs/state/resize/update-resize-column.js +15 -6
  73. package/cjs/state/resize/update-resize-column.js.map +1 -1
  74. package/cjs/state/state.js +5 -4
  75. package/cjs/state/state.js.map +1 -1
  76. package/cjs/themes/ARCO.js +1 -1
  77. package/cjs/themes/BRIGHT.js +1 -2
  78. package/cjs/themes/DARK.js +1 -1
  79. package/cjs/themes/DEFAULT.js +1 -1
  80. package/cjs/themes/SIMPLIFY.js +1 -1
  81. package/cjs/themes/theme.js +1 -1
  82. package/cjs/tools/LimitPromiseQueue.js +1 -1
  83. package/cjs/tools/NumberMap.js +1 -1
  84. package/cjs/tools/Rect.js +2 -1
  85. package/cjs/tools/calc.js +1 -1
  86. package/cjs/tools/debounce.js +1 -1
  87. package/cjs/tools/diff-cell.js +2 -2
  88. package/cjs/tools/dom.js +1 -1
  89. package/cjs/tools/env.js +1 -1
  90. package/cjs/tools/global.js +1 -1
  91. package/cjs/tools/helper.js +1 -1
  92. package/cjs/ts-types/base-table.d.ts +2 -2
  93. package/cjs/ts-types/base-table.js +1 -1
  94. package/cjs/ts-types/base-table.js.map +1 -1
  95. package/cjs/ts-types/common.d.ts +6 -0
  96. package/cjs/ts-types/common.js +1 -1
  97. package/cjs/ts-types/common.js.map +1 -1
  98. package/cjs/ts-types/component/title.d.ts +3 -3
  99. package/cjs/ts-types/component/title.js.map +1 -1
  100. package/cjs/ts-types/events.d.ts +12 -2
  101. package/cjs/ts-types/events.js.map +1 -1
  102. package/cjs/ts-types/list-table/define/basic-define.d.ts +5 -1
  103. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  104. package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -1
  105. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  106. package/cjs/ts-types/table-engine.d.ts +13 -1
  107. package/cjs/ts-types/table-engine.js.map +1 -1
  108. package/dist/vtable.js +9136 -25006
  109. package/dist/vtable.min.js +2 -2
  110. package/es/ListTable.d.ts +12 -0
  111. package/es/ListTable.js +111 -12
  112. package/es/ListTable.js.map +1 -1
  113. package/es/PivotChart.d.ts +1 -0
  114. package/es/PivotChart.js +36 -27
  115. package/es/PivotChart.js.map +1 -1
  116. package/es/PivotTable.d.ts +5 -1
  117. package/es/PivotTable.js +104 -61
  118. package/es/PivotTable.js.map +1 -1
  119. package/es/core/BaseTable.d.ts +1 -2
  120. package/es/core/BaseTable.js +74 -94
  121. package/es/core/BaseTable.js.map +1 -1
  122. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  123. package/es/core/TABLE_EVENT_TYPE.js +3 -1
  124. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  125. package/es/data/DataSource.d.ts +7 -1
  126. package/es/data/DataSource.js +44 -9
  127. package/es/data/DataSource.js.map +1 -1
  128. package/es/dataset/dataset.d.ts +3 -1
  129. package/es/dataset/dataset.js +20 -15
  130. package/es/dataset/dataset.js.map +1 -1
  131. package/es/edit/edit-manager.d.ts +14 -0
  132. package/es/edit/edit-manager.js +66 -0
  133. package/es/edit/edit-manager.js.map +1 -0
  134. package/es/edit/editors.d.ts +5 -0
  135. package/es/edit/editors.js +6 -0
  136. package/es/edit/editors.js.map +1 -0
  137. package/es/event/event.d.ts +3 -1
  138. package/es/event/event.js +5 -2
  139. package/es/event/event.js.map +1 -1
  140. package/es/event/listener/container-dom.js +5 -1
  141. package/es/event/listener/container-dom.js.map +1 -1
  142. package/es/event/listener/table-group.d.ts +1 -0
  143. package/es/event/listener/table-group.js +40 -24
  144. package/es/event/listener/table-group.js.map +1 -1
  145. package/es/event/media-click.js +1 -2
  146. package/es/event/sparkline-event.js +2 -1
  147. package/es/index.d.ts +1 -1
  148. package/es/index.js +1 -1
  149. package/es/index.js.map +1 -1
  150. package/es/layout/pivot-header-layout.d.ts +8 -1
  151. package/es/layout/pivot-header-layout.js +48 -23
  152. package/es/layout/pivot-header-layout.js.map +1 -1
  153. package/es/layout/pivot-layout-helper.d.ts +11 -0
  154. package/es/layout/pivot-layout-helper.js +21 -0
  155. package/es/layout/pivot-layout-helper.js.map +1 -1
  156. package/es/layout/simple-header-layout.d.ts +3 -1
  157. package/es/layout/simple-header-layout.js +11 -9
  158. package/es/layout/simple-header-layout.js.map +1 -1
  159. package/es/register.d.ts +2 -0
  160. package/es/register.js +6 -0
  161. package/es/register.js.map +1 -1
  162. package/es/scenegraph/component/menu.d.ts +41 -0
  163. package/es/scenegraph/graphic/icon.js +5 -5
  164. package/es/scenegraph/graphic/icon.js.map +1 -1
  165. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
  166. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +29 -57
  167. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  168. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  169. package/es/scenegraph/group-creater/progress/proxy.js +1 -3
  170. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  171. package/es/scenegraph/icon/icon-update.js +4 -4
  172. package/es/scenegraph/icon/icon-update.js.map +1 -1
  173. package/es/scenegraph/layout/compute-col-width.d.ts +1 -1
  174. package/es/scenegraph/layout/compute-col-width.js +10 -8
  175. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  176. package/es/scenegraph/scenegraph.d.ts +1 -0
  177. package/es/scenegraph/scenegraph.js +19 -12
  178. package/es/scenegraph/scenegraph.js.map +1 -1
  179. package/es/scenegraph/select/update-select-border.js +5 -5
  180. package/es/scenegraph/select/update-select-border.js.map +1 -1
  181. package/es/state/resize/update-resize-column.js +15 -6
  182. package/es/state/resize/update-resize-column.js.map +1 -1
  183. package/es/state/state.js +5 -4
  184. package/es/state/state.js.map +1 -1
  185. package/es/themes/ARCO.js +1 -1
  186. package/es/themes/BRIGHT.js +1 -2
  187. package/es/themes/DARK.js +1 -1
  188. package/es/themes/DEFAULT.js +1 -1
  189. package/es/themes/SIMPLIFY.js +1 -1
  190. package/es/themes/theme.js +1 -1
  191. package/es/tools/LimitPromiseQueue.js +1 -1
  192. package/es/tools/NumberMap.js +1 -1
  193. package/es/tools/Rect.js +2 -1
  194. package/es/tools/calc.js +1 -1
  195. package/es/tools/debounce.js +1 -1
  196. package/es/tools/diff-cell.js +1 -1
  197. package/es/tools/dom.js +1 -1
  198. package/es/tools/env.js +1 -1
  199. package/es/tools/global.js +1 -1
  200. package/es/tools/helper.js +1 -1
  201. package/es/ts-types/base-table.d.ts +2 -2
  202. package/es/ts-types/base-table.js +1 -1
  203. package/es/ts-types/base-table.js.map +1 -1
  204. package/es/ts-types/common.d.ts +6 -0
  205. package/es/ts-types/common.js +1 -1
  206. package/es/ts-types/common.js.map +1 -1
  207. package/es/ts-types/component/title.d.ts +3 -3
  208. package/es/ts-types/component/title.js.map +1 -1
  209. package/es/ts-types/events.d.ts +12 -2
  210. package/es/ts-types/events.js.map +1 -1
  211. package/es/ts-types/list-table/define/basic-define.d.ts +5 -1
  212. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  213. package/es/ts-types/list-table/layout-map/api.d.ts +1 -1
  214. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  215. package/es/ts-types/table-engine.d.ts +13 -1
  216. package/es/ts-types/table-engine.js.map +1 -1
  217. package/package.json +11 -7
@@ -2,6 +2,7 @@ import type { CellAddress, CellRange, IPivotTableCellHeaderPaths, LayoutObjectId
2
2
  import type { HeaderData, IndicatorData, LayoutMapAPI, WidthData } from '../ts-types/list-table/layout-map/api';
3
3
  import type { PivotTable } from '../PivotTable';
4
4
  import type { PivotChart } from '../PivotChart';
5
+ import type { LayouTreeNode } from './pivot-layout-helper';
5
6
  import { DimensionTree } from './pivot-layout-helper';
6
7
  import type { Dataset } from '../dataset/dataset';
7
8
  export declare const sharedVar: {
@@ -104,9 +105,11 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
104
105
  get rowHeaderLevelCount(): number;
105
106
  get colCount(): number;
106
107
  get rowCount(): number;
107
- get bodyRowCount(): number;
108
+ get bodyRowSpanCount(): number;
108
109
  get bottomFrozenRowCount(): number;
109
110
  get rightFrozenColCount(): number;
111
+ get bodyRowCount(): number | undefined;
112
+ get bodyColCount(): number | undefined;
110
113
  get headerObjects(): HeaderData[];
111
114
  get columnObjects(): IndicatorData[];
112
115
  getCellId(col: number, row: number): LayoutObjectId;
@@ -118,6 +121,8 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
118
121
  getCellRange(col: number, row: number): CellRange;
119
122
  isCellRangeEqual(col: number, row: number, targetCol: number, targetRow: number): boolean;
120
123
  getBodyIndexByRow(row: number): number;
124
+ get bottomHeaderRowCount(): number;
125
+ get rightHeaderColCount(): number;
121
126
  getBodyIndexByCol(col: number): number;
122
127
  getRecordStartRowByRecordIndex(index: number): number;
123
128
  getRecordIndexByCell(col: number, row: number): number;
@@ -190,5 +195,7 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
190
195
  getColKeysPath(col: number, row: number): string;
191
196
  getRowKeysPath(col: number, row: number): string;
192
197
  getIndicatorInfo(indicatorKey: string, indicatorValue?: string): IIndicator;
198
+ getLayoutRowTree(): LayouTreeNode[];
199
+ getLayoutRowTreeCount(): number;
193
200
  updateDataset(dataset: Dataset): void;
194
201
  }
@@ -8,7 +8,7 @@ import { diffCellAddress } from "../tools/diff-cell";
8
8
 
9
9
  import { getChartAxes, getChartDataId, getChartSpec, getRawChartSpec } from "./chart-helper/get-chart-spec";
10
10
 
11
- import { DimensionTree } from "./pivot-layout-helper";
11
+ import { DimensionTree, countLayoutTree, generateLayoutTree } from "./pivot-layout-helper";
12
12
 
13
13
  import { cloneDeep, isArray, isValid } from "@visactor/vutils";
14
14
 
@@ -420,7 +420,7 @@ export class PivotHeaderLayoutMap {
420
420
  return this.isCornerHeader(col, row) ? "cornerHeader" : this.isColumnHeader(col, row) ? "columnHeader" : this.isRowHeader(col, row) ? "rowHeader" : "body";
421
421
  }
422
422
  isHeader(col, row) {
423
- return col < this.rowHeaderLevelCount || (row < this.columnHeaderLevelCount || (col >= this.colCount - this.rightFrozenColCount || row >= this.rowCount - this.bottomFrozenRowCount));
423
+ return col < this.rowHeaderLevelCount || (row < this.columnHeaderLevelCount || (col >= this.colCount - this.rightHeaderColCount || row >= this.rowCount - this.bottomHeaderRowCount));
424
424
  }
425
425
  isCornerHeader(col, row) {
426
426
  return col < this.rowHeaderLevelCount && row < this.columnHeaderLevelCount;
@@ -514,12 +514,10 @@ export class PivotHeaderLayoutMap {
514
514
  }
515
515
  resetCellIds() {}
516
516
  get frozenColCount() {
517
- var _a;
518
- return null !== (_a = this._table.internalProps.frozenColCount) && void 0 !== _a ? _a : 0;
517
+ return this._table.internalProps.frozenColCount ? this.colCount > this._table.internalProps.frozenColCount ? this._table.internalProps.frozenColCount : this.colCount : 0;
519
518
  }
520
519
  get frozenRowCount() {
521
- var _a;
522
- return null !== (_a = this._table.internalProps.frozenRowCount) && void 0 !== _a ? _a : 0;
520
+ return this._table.internalProps.frozenRowCount ? this.rowCount >= this._table.internalProps.frozenRowCount ? this._table.internalProps.frozenRowCount : this.rowCount : 0;
523
521
  }
524
522
  get headerLevelCount() {
525
523
  return this.columnHeaderLevelCount;
@@ -548,26 +546,32 @@ export class PivotHeaderLayoutMap {
548
546
  return this.indicatorsAsCol || this.hideIndicatorName ? 0 : 1;
549
547
  }
550
548
  get colCount() {
551
- return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.rightFrozenColCount;
549
+ return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.rightHeaderColCount;
552
550
  }
553
551
  get rowCount() {
554
552
  var _a, _b, _c, _d;
555
- return ((!Array.isArray(this._table.records) || this._table.records.length > 0) && (null === (_a = this._indicators) || void 0 === _a ? void 0 : _a.length) > 0 && !(null === (_b = this._rowHeaderCellIds) || void 0 === _b ? void 0 : _b.length) ? 1 : null !== (_d = null === (_c = this._rowHeaderCellIds) || void 0 === _c ? void 0 : _c.length) && void 0 !== _d ? _d : 0) + this.columnHeaderLevelCount + this.bottomFrozenRowCount;
553
+ return ((!Array.isArray(this._table.records) || this._table.records.length > 0) && (null === (_a = this._indicators) || void 0 === _a ? void 0 : _a.length) > 0 && !(null === (_b = this._rowHeaderCellIds) || void 0 === _b ? void 0 : _b.length) ? 1 : null !== (_d = null === (_c = this._rowHeaderCellIds) || void 0 === _c ? void 0 : _c.length) && void 0 !== _d ? _d : 0) + this.columnHeaderLevelCount + this.bottomHeaderRowCount;
556
554
  }
557
- get bodyRowCount() {
555
+ get bodyRowSpanCount() {
558
556
  return this.rowDimensionTree.tree.size;
559
557
  }
560
558
  get bottomFrozenRowCount() {
561
- if (!this._table.isPivotChart()) return 0;
559
+ if (!this._table.isPivotChart()) return this._table.internalProps.bottomFrozenRowCount ? this.rowCount - this.headerLevelCount >= this._table.internalProps.bottomFrozenRowCount ? this._table.internalProps.bottomFrozenRowCount : this.rowCount - this.headerLevelCount : 0;
562
560
  const axisOption = this._table.pivotChartAxes.find((axisOption => "bottom" === axisOption.orient));
563
561
  return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : (this.indicatorsAsCol,
564
562
  1);
565
563
  }
566
564
  get rightFrozenColCount() {
567
- if (!this._table.isPivotChart()) return 0;
565
+ if (!this._table.isPivotChart()) return this._table.internalProps.rightFrozenColCount ? this.colCount - this.rowHeaderLevelCount >= this._table.internalProps.rightFrozenColCount ? this._table.internalProps.rightFrozenColCount : this.colCount - this.rowHeaderLevelCount : 0;
568
566
  const axisOption = this._table.pivotChartAxes.find((axisOption => "right" === axisOption.orient));
569
567
  return !1 === (null == axisOption ? void 0 : axisOption.visible) || this.indicatorsAsCol ? 0 : this.hasTwoIndicatorAxes ? 1 : 0;
570
568
  }
569
+ get bodyRowCount() {
570
+ return this.rowCount - this.bottomFrozenRowCount - this.headerLevelCount;
571
+ }
572
+ get bodyColCount() {
573
+ return this.colCount - this.rightFrozenColCount - this.rowHeaderLevelCount;
574
+ }
571
575
  get headerObjects() {
572
576
  return this._headerObjects;
573
577
  }
@@ -677,10 +681,16 @@ export class PivotHeaderLayoutMap {
677
681
  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;
678
682
  }
679
683
  getBodyIndexByRow(row) {
680
- return row < this.columnHeaderLevelCount || row >= this.rowCount - this.bottomFrozenRowCount ? -1 : row - this.columnHeaderLevelCount;
684
+ return row < this.columnHeaderLevelCount || row >= this.rowCount - this.bottomHeaderRowCount ? -1 : row - this.columnHeaderLevelCount;
685
+ }
686
+ get bottomHeaderRowCount() {
687
+ return this._table.isPivotChart() ? this.bottomFrozenRowCount : 0;
688
+ }
689
+ get rightHeaderColCount() {
690
+ return this._table.isPivotChart() ? this.rightFrozenColCount : 0;
681
691
  }
682
692
  getBodyIndexByCol(col) {
683
- return col < this.rowHeaderLevelCount || col >= this.colCount - this.rightFrozenColCount ? -1 : col - this.rowHeaderLevelCount;
693
+ return col < this.rowHeaderLevelCount || col >= this.colCount - this.rightHeaderColCount ? -1 : col - this.rowHeaderLevelCount;
684
694
  }
685
695
  getRecordStartRowByRecordIndex(index) {
686
696
  return this.columnHeaderLevelCount + index;
@@ -1195,33 +1205,33 @@ export class PivotHeaderLayoutMap {
1195
1205
  })) : indicatorKeys.push(chartSpec.xField), indicatorKeys) : null;
1196
1206
  }
1197
1207
  getOptimunHeightForChart(row) {
1198
- var _a, _b, _c, _d;
1208
+ var _a, _b, _c, _d, _e;
1199
1209
  const path = this.getCellHeaderPaths(this.rowHeaderLevelCount, row).rowHeaderPaths;
1200
1210
  let collectedValues, height;
1201
1211
  for (const key in this.dataset.collectValuesBy) if ("yField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
1202
- collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
1212
+ collectedValues = null === (_a = this.dataset.collectedValues[key]) || void 0 === _a ? void 0 : _a[path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
1203
1213
  break;
1204
1214
  }
1205
- if (this._chartItemBandSize) height = scaleWholeRangeSize(null !== (_a = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _a ? _a : 0, this._chartItemBandSize, this._chartPaddingInner, this._chartPaddingOuter); else {
1215
+ if (this._chartItemBandSize) height = scaleWholeRangeSize(null !== (_b = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _b ? _b : 0, this._chartItemBandSize, this._chartPaddingInner, this._chartPaddingOuter); else {
1206
1216
  const barWidth = this._chartItemSpanSize || 25;
1207
- height = (null !== (_b = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _b ? _b : 0) * (barWidth + barWidth / 3);
1217
+ height = (null !== (_c = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _c ? _c : 0) * (barWidth + barWidth / 3);
1208
1218
  }
1209
- const padding = getQuadProps(null !== (_d = null !== (_c = this._chartPadding) && void 0 !== _c ? _c : this._table.theme.bodyStyle.padding) && void 0 !== _d ? _d : 0);
1219
+ const padding = getQuadProps(null !== (_e = null !== (_d = this._chartPadding) && void 0 !== _d ? _d : this._table.theme.bodyStyle.padding) && void 0 !== _e ? _e : 0);
1210
1220
  return height + padding[0] + padding[2];
1211
1221
  }
1212
1222
  getOptimunWidthForChart(col) {
1213
- var _a, _b, _c, _d;
1223
+ var _a, _b, _c, _d, _e;
1214
1224
  const path = this.getCellHeaderPaths(col, this.columnHeaderLevelCount).colHeaderPaths;
1215
1225
  let collectedValues, width;
1216
1226
  for (const key in this.dataset.collectValuesBy) if ("xField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
1217
- collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
1227
+ collectedValues = null === (_a = this.dataset.collectedValues[key]) || void 0 === _a ? void 0 : _a[path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
1218
1228
  break;
1219
1229
  }
1220
- if (this._chartItemBandSize) width = scaleWholeRangeSize(null !== (_a = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _a ? _a : 0, this._chartItemBandSize, this._chartPaddingInner, this._chartPaddingOuter); else {
1230
+ if (this._chartItemBandSize) width = scaleWholeRangeSize(null !== (_b = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _b ? _b : 0, this._chartItemBandSize, this._chartPaddingInner, this._chartPaddingOuter); else {
1221
1231
  const barWidth = this._chartItemSpanSize || 25;
1222
- width = (null !== (_b = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _b ? _b : 0) * (barWidth + barWidth / 3);
1232
+ width = (null !== (_c = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _c ? _c : 0) * (barWidth + barWidth / 3);
1223
1233
  }
1224
- const padding = getQuadProps(null !== (_d = null !== (_c = this._chartPadding) && void 0 !== _c ? _c : this._table.theme.bodyStyle.padding) && void 0 !== _d ? _d : 0);
1234
+ const padding = getQuadProps(null !== (_e = null !== (_d = this._chartPadding) && void 0 !== _d ? _d : this._table.theme.bodyStyle.padding) && void 0 !== _e ? _e : 0);
1225
1235
  return width + padding[1] + padding[3];
1226
1236
  }
1227
1237
  get leftAxesCount() {
@@ -1257,6 +1267,21 @@ export class PivotHeaderLayoutMap {
1257
1267
  var _a;
1258
1268
  return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.title === indicatorValue)));
1259
1269
  }
1270
+ getLayoutRowTree() {
1271
+ const tree = [], children = this.rowDimensionTree.tree.children;
1272
+ return generateLayoutTree(tree, children), tree;
1273
+ }
1274
+ getLayoutRowTreeCount() {
1275
+ var _a;
1276
+ const children = this.rowDimensionTree.tree.children;
1277
+ let totalCount = countLayoutTree(children, "tree" === this.rowHierarchyType);
1278
+ return null === (_a = this.extensionRows) || void 0 === _a || _a.forEach((extensionRow => {
1279
+ if ("function" != typeof extensionRow.rowTree) {
1280
+ const thisTreeCount = countLayoutTree(extensionRow.rowTree, !0);
1281
+ totalCount *= thisTreeCount;
1282
+ }
1283
+ })), totalCount;
1284
+ }
1260
1285
  updateDataset(dataset) {}
1261
1286
  }
1262
1287