@visactor/vtable 1.15.3-alpha.1 → 1.16.0-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 (147) hide show
  1. package/cjs/PivotChart.d.ts +0 -1
  2. package/cjs/PivotChart.js +2 -5
  3. package/cjs/PivotChart.js.map +1 -1
  4. package/cjs/PivotTable.d.ts +2 -2
  5. package/cjs/PivotTable.js +41 -33
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/components/index.js +1 -1
  8. package/cjs/core/BaseTable.d.ts +1 -2
  9. package/cjs/core/BaseTable.js +2 -2
  10. package/cjs/core/BaseTable.js.map +1 -1
  11. package/cjs/data/DataSource.d.ts +2 -2
  12. package/cjs/data/DataSource.js +4 -4
  13. package/cjs/data/DataSource.js.map +1 -1
  14. package/cjs/dataset/dataset-pivot-table.js +1 -2
  15. package/cjs/dataset/dataset.d.ts +3 -2
  16. package/cjs/dataset/dataset.js +13 -9
  17. package/cjs/dataset/dataset.js.map +1 -1
  18. package/cjs/index.d.ts +1 -1
  19. package/cjs/index.js +1 -1
  20. package/cjs/index.js.map +1 -1
  21. package/cjs/layout/index.js +1 -2
  22. package/cjs/layout/layout-helper.js +10 -9
  23. package/cjs/layout/layout-helper.js.map +1 -1
  24. package/cjs/layout/pivot-header-layout.d.ts +33 -5
  25. package/cjs/layout/pivot-header-layout.js +137 -31
  26. package/cjs/layout/pivot-header-layout.js.map +1 -1
  27. package/cjs/layout/tree-helper.d.ts +5 -4
  28. package/cjs/layout/tree-helper.js +105 -23
  29. package/cjs/layout/tree-helper.js.map +1 -1
  30. package/cjs/plugins/custom-cell-style.js +1 -1
  31. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  32. package/cjs/scenegraph/group-creater/progress/proxy.js +5 -2
  33. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  34. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +8 -4
  35. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  36. package/cjs/scenegraph/layout/compute-col-width.js +1 -1
  37. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  38. package/cjs/scenegraph/layout/frozen.d.ts +1 -0
  39. package/cjs/scenegraph/layout/frozen.js +91 -2
  40. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  41. package/cjs/scenegraph/layout/update-col.js +4 -1
  42. package/cjs/scenegraph/layout/update-col.js.map +1 -1
  43. package/cjs/scenegraph/layout/update-row.js +3 -2
  44. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  45. package/cjs/scenegraph/scenegraph.d.ts +5 -0
  46. package/cjs/scenegraph/scenegraph.js +18 -0
  47. package/cjs/scenegraph/scenegraph.js.map +1 -1
  48. package/cjs/scenegraph/utils/get-hierarchy-offset.js +1 -1
  49. package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  50. package/cjs/state/state.d.ts +2 -0
  51. package/cjs/state/state.js +7 -2
  52. package/cjs/state/state.js.map +1 -1
  53. package/cjs/tools/NumberMap.js +4 -2
  54. package/cjs/tools/NumberMap.js.map +1 -1
  55. package/cjs/tools/diff-cell.d.ts +58 -3
  56. package/cjs/tools/diff-cell.js +90 -11
  57. package/cjs/tools/diff-cell.js.map +1 -1
  58. package/cjs/tools/get-data-path/create-dataset.js +1 -1
  59. package/cjs/tools/get-data-path/create-dataset.js.map +1 -1
  60. package/cjs/ts-types/base-table.d.ts +2 -1
  61. package/cjs/ts-types/base-table.js.map +1 -1
  62. package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -1
  63. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  64. package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -4
  65. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  66. package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +2 -2
  67. package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  68. package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  69. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  70. package/cjs/ts-types/table-engine.d.ts +6 -3
  71. package/cjs/ts-types/table-engine.js.map +1 -1
  72. package/cjs/vrender.js.map +1 -1
  73. package/dist/vtable.js +759 -116
  74. package/dist/vtable.min.js +2 -2
  75. package/es/PivotChart.d.ts +0 -1
  76. package/es/PivotChart.js +2 -5
  77. package/es/PivotChart.js.map +1 -1
  78. package/es/PivotTable.d.ts +2 -2
  79. package/es/PivotTable.js +41 -33
  80. package/es/PivotTable.js.map +1 -1
  81. package/es/components/index.js +1 -1
  82. package/es/core/BaseTable.d.ts +1 -2
  83. package/es/core/BaseTable.js +2 -2
  84. package/es/core/BaseTable.js.map +1 -1
  85. package/es/data/DataSource.d.ts +2 -2
  86. package/es/data/DataSource.js +4 -4
  87. package/es/data/DataSource.js.map +1 -1
  88. package/es/dataset/dataset-pivot-table.js +1 -2
  89. package/es/dataset/dataset.d.ts +3 -2
  90. package/es/dataset/dataset.js +14 -10
  91. package/es/dataset/dataset.js.map +1 -1
  92. package/es/index.d.ts +1 -1
  93. package/es/index.js +1 -1
  94. package/es/index.js.map +1 -1
  95. package/es/layout/index.js +1 -2
  96. package/es/layout/layout-helper.js +10 -9
  97. package/es/layout/layout-helper.js.map +1 -1
  98. package/es/layout/pivot-header-layout.d.ts +33 -5
  99. package/es/layout/pivot-header-layout.js +138 -33
  100. package/es/layout/pivot-header-layout.js.map +1 -1
  101. package/es/layout/tree-helper.d.ts +5 -4
  102. package/es/layout/tree-helper.js +102 -19
  103. package/es/layout/tree-helper.js.map +1 -1
  104. package/es/plugins/custom-cell-style.js +1 -1
  105. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  106. package/es/scenegraph/group-creater/progress/proxy.js +5 -2
  107. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  108. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +8 -4
  109. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  110. package/es/scenegraph/layout/compute-col-width.js +1 -1
  111. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  112. package/es/scenegraph/layout/frozen.d.ts +1 -0
  113. package/es/scenegraph/layout/frozen.js +89 -0
  114. package/es/scenegraph/layout/frozen.js.map +1 -1
  115. package/es/scenegraph/layout/update-col.js +4 -1
  116. package/es/scenegraph/layout/update-col.js.map +1 -1
  117. package/es/scenegraph/layout/update-row.js +3 -2
  118. package/es/scenegraph/layout/update-row.js.map +1 -1
  119. package/es/scenegraph/scenegraph.d.ts +5 -0
  120. package/es/scenegraph/scenegraph.js +16 -1
  121. package/es/scenegraph/scenegraph.js.map +1 -1
  122. package/es/scenegraph/utils/get-hierarchy-offset.js +1 -1
  123. package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  124. package/es/state/state.d.ts +2 -0
  125. package/es/state/state.js +7 -2
  126. package/es/state/state.js.map +1 -1
  127. package/es/tools/NumberMap.js +4 -2
  128. package/es/tools/NumberMap.js.map +1 -1
  129. package/es/tools/diff-cell.d.ts +58 -3
  130. package/es/tools/diff-cell.js +85 -9
  131. package/es/tools/diff-cell.js.map +1 -1
  132. package/es/tools/get-data-path/create-dataset.js +1 -1
  133. package/es/tools/get-data-path/create-dataset.js.map +1 -1
  134. package/es/ts-types/base-table.d.ts +2 -1
  135. package/es/ts-types/base-table.js.map +1 -1
  136. package/es/ts-types/list-table/define/basic-define.d.ts +1 -1
  137. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  138. package/es/ts-types/list-table/layout-map/api.d.ts +4 -4
  139. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  140. package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +2 -2
  141. package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  142. package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  143. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  144. package/es/ts-types/table-engine.d.ts +6 -3
  145. package/es/ts-types/table-engine.js.map +1 -1
  146. package/es/vrender.js.map +1 -1
  147. package/package.json +4 -4
@@ -11,7 +11,7 @@ const util_1 = require("../tools/util"), ts_types_1 = require("../ts-types"), gl
11
11
 
12
12
  class PivotHeaderLayoutMap {
13
13
  constructor(table, dataset, columnDimensionTree, rowDimensionTree) {
14
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
14
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
15
15
  this.colIndex = 0, this._showHeader = !0, this.columnHeaderObjs = [], this.rowHeaderObjs = [],
16
16
  this._cornerHeaderCellFullPathIds = [], this._columnHeaderCellFullPathIds = [],
17
17
  this._rowHeaderCellFullPathIds = [], this._rowHeaderCellFullPathIds_FULL = [], this._cornerHeaderCellIds = [],
@@ -36,14 +36,16 @@ class PivotHeaderLayoutMap {
36
36
  this.showColumnHeader = null === (_g = table.options.showColumnHeader) || void 0 === _g || _g,
37
37
  this.rowHeaderTitle = table.options.rowHeaderTitle, this.columnHeaderTitle = table.options.columnHeaderTitle,
38
38
  this.rowHierarchyType = null !== (_h = table.options.rowHierarchyType) && void 0 !== _h ? _h : "grid",
39
- this.rowExpandLevel = null !== (_j = table.options.rowExpandLevel) && void 0 !== _j ? _j : 1,
40
- this.rowHierarchyIndent = null !== (_k = table.options.rowHierarchyIndent) && void 0 !== _k ? _k : 20,
39
+ this.columnHierarchyType = null !== (_j = table.options.columnHierarchyType) && void 0 !== _j ? _j : "grid",
40
+ this.rowExpandLevel = null !== (_k = table.options.rowExpandLevel) && void 0 !== _k ? _k : 1,
41
+ this.columnExpandLevel = null !== (_l = table.options.columnExpandLevel) && void 0 !== _l ? _l : 1,
42
+ this.rowHierarchyIndent = null !== (_m = table.options.rowHierarchyIndent) && void 0 !== _m ? _m : 20,
41
43
  this.rowHierarchyTextStartAlignment = table.options.rowHierarchyTextStartAlignment,
42
44
  this.cornerSetting = Object.assign({
43
45
  titleOnDimension: "column",
44
46
  forceShowHeader: !1
45
47
  }, table.options.corner), dataset && (this.rowTree = dataset.rowHeaderTree, this.columnTree = dataset.colHeaderTree),
46
- null === (_l = this.indicatorsDefine) || void 0 === _l || _l.forEach((indicator => {
48
+ null === (_o = this.indicatorsDefine) || void 0 === _o || _o.forEach((indicator => {
47
49
  "string" == typeof indicator ? this.indicatorKeys.push(indicator) : this.indicatorKeys.push(indicator.indicatorKey);
48
50
  })), this.columnDimensionTree = columnDimensionTree, this.rowDimensionTree = rowDimensionTree,
49
51
  this.colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
@@ -58,7 +60,7 @@ class PivotHeaderLayoutMap {
58
60
  return !1;
59
61
  }))), this.resetColumnHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
60
62
  this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = (0, util_1.transpose)(this._rowHeaderCellFullPathIds_FULL),
61
- "tree" === table.options.rowHierarchyType && (null === (_m = this.extensionRows) || void 0 === _m ? void 0 : _m.length) >= 1 && (this.generateExtensionRowTree(),
63
+ "tree" === table.options.rowHierarchyType && (null === (_p = this.extensionRows) || void 0 === _p ? void 0 : _p.length) >= 1 && (this.generateExtensionRowTree(),
62
64
  this.extensionRows.forEach((extensionRow => {
63
65
  const rowKeys = [];
64
66
  extensionRow.rows.forEach((row => {
@@ -66,17 +68,17 @@ class PivotHeaderLayoutMap {
66
68
  })), this._extensionRowDimensionKeys.push(rowKeys), this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(rowKeys);
67
69
  }))), this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
68
70
  let rowDimensionKeys, colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
69
- !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_p = null === (_o = this.dataset.records) || void 0 === _o ? void 0 : _o.length) && void 0 !== _p ? _p : 0) || this.dataset.customColTree || (colDimensionKeys = this.columnsDefine.map((define => "string" == typeof define ? define : define.dimensionKey)),
71
+ !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_r = null === (_q = this.dataset.records) || void 0 === _q ? void 0 : _q.length) && void 0 !== _r ? _r : 0) || this.dataset.customColTree || (colDimensionKeys = this.columnsDefine.map((define => "string" == typeof define ? define : define.dimensionKey)),
70
72
  this.indicatorsAsCol && colDimensionKeys.push(this.indicatorDimensionKey)), colDimensionKeys = this.columnHeaderTitle ? [ "" ].concat(colDimensionKeys) : colDimensionKeys;
71
73
  let extensionRowDimensions = [];
72
- if ("tree" === this.rowHierarchyType && (null === (_q = this.extensionRows) || void 0 === _q ? void 0 : _q.length) >= 1) {
74
+ if ("tree" === this.rowHierarchyType && (null === (_s = this.extensionRows) || void 0 === _s ? void 0 : _s.length) >= 1) {
73
75
  const rowTreeFirstKey = [];
74
76
  rowTreeFirstKey.push(this.rowDimensionKeys[0]), this._extensionRowDimensionKeys.forEach((extensionRowKeys => {
75
77
  rowTreeFirstKey.push(extensionRowKeys[0]);
76
78
  })), extensionRowDimensions = this.extensionRows.reduce(((dimensions, cur) => dimensions.concat(cur.rows)), []),
77
79
  rowDimensionKeys = this.rowHeaderTitle ? [ "" ].concat(rowTreeFirstKey) : rowTreeFirstKey;
78
80
  } else rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
79
- !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_s = null === (_r = this.dataset.records) || void 0 === _r ? void 0 : _r.length) && void 0 !== _s ? _s : 0) || this.dataset.customRowTree || (rowDimensionKeys = this.rowsDefine.map((define => "string" == typeof define ? define : define.dimensionKey)),
81
+ !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_u = null === (_t = this.dataset.records) || void 0 === _t ? void 0 : _t.length) && void 0 !== _u ? _u : 0) || this.dataset.customRowTree || (rowDimensionKeys = this.rowsDefine.map((define => "string" == typeof define ? define : define.dimensionKey)),
80
82
  this.indicatorsAsCol || rowDimensionKeys.push(this.indicatorDimensionKey)), rowDimensionKeys = this.rowHeaderTitle ? [ "" ].concat(rowDimensionKeys) : rowDimensionKeys;
81
83
  this.cornerHeaderObjs = this._addCornerHeaders(colDimensionKeys, rowDimensionKeys, this.columnsDefine.concat(...this.rowsDefine, ...extensionRowDimensions)),
82
84
  this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
@@ -129,10 +131,13 @@ class PivotHeaderLayoutMap {
129
131
  }
130
132
  _generateColHeaderIds() {
131
133
  var _a, _b, _c, _d, _e, _f, _g, _h;
132
- if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) {
134
+ if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) if ("grid-tree" === this.columnHierarchyType) {
135
+ const startCol = 0;
136
+ this._addHeadersForGridTreeMode(this._columnHeaderCellFullPathIds, startCol, this.columnDimensionTree.tree.children, [], this.columnDimensionTree.totalLevel, this._getColumnHeaderTreeExpandedMaxLevelCount(), !0, this.columnsDefine, this.columnHeaderObjs, !1);
137
+ } else {
133
138
  let startRow = 0;
134
- if (this.dataset && !this._table.isPivotChart() && 0 === (null !== (_c = null === (_b = this.dataset.records) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0) && !this.dataset.customColTree && !this.dataset.customRowTree && this.indicatorsAsCol && this.columnDimensionTree.totalLevel < this.columnHeaderLevelCount) {
135
- startRow = this.columnHeaderLevelCount - this.columnDimensionTree.totalLevel;
139
+ if (this.dataset && !this._table.isPivotChart() && 0 === (null !== (_c = null === (_b = this.dataset.records) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0) && !this.dataset.customColTree && !this.dataset.customRowTree && this.indicatorsAsCol && this._getColumnHeaderTreeExpandedMaxLevelCount() < this.columnHeaderLevelCount) {
140
+ startRow = this.columnHeaderLevelCount - this._getColumnHeaderTreeExpandedMaxLevelCount();
136
141
  for (let i = 0; i < startRow; i++) this._columnHeaderCellFullPathIds.unshift([]);
137
142
  }
138
143
  this._addHeaders(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs);
@@ -158,10 +163,13 @@ class PivotHeaderLayoutMap {
158
163
  }
159
164
  _generateRowHeaderIds() {
160
165
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
161
- if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) if ("tree" === this.rowHierarchyType) this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs); else {
166
+ if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) if ("tree" === this.rowHierarchyType) this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs); else if ("grid-tree" === this.rowHierarchyType) {
167
+ const startRow = 0;
168
+ this._addHeadersForGridTreeMode(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, this._getRowHeaderTreeExpandedMaxLevelCount(), !0, this.rowsDefine, this.rowHeaderObjs, !0);
169
+ } else {
162
170
  let startRow = 0;
163
- if (this.dataset && !this._table.isPivotChart() && 0 === (null !== (_c = null === (_b = this.dataset.records) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0) && !this.dataset.customColTree && !this.dataset.customRowTree && !this.indicatorsAsCol && this.rowDimensionTree.totalLevel < this.rowHeaderLevelCount) {
164
- startRow = this.rowHeaderLevelCount - this.rowDimensionTree.totalLevel;
171
+ if (this.dataset && !this._table.isPivotChart() && 0 === (null !== (_c = null === (_b = this.dataset.records) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0) && !this.dataset.customColTree && !this.dataset.customRowTree && !this.indicatorsAsCol && this._getRowHeaderTreeExpandedMaxLevelCount() < this.rowHeaderLevelCount) {
172
+ startRow = this.rowHeaderLevelCount - this._getRowHeaderTreeExpandedMaxLevelCount();
165
173
  for (let i = 0; i < startRow; i++) this._rowHeaderCellFullPathIds_FULL.unshift([]);
166
174
  }
167
175
  this._addHeaders(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs);
@@ -185,6 +193,12 @@ class PivotHeaderLayoutMap {
185
193
  this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
186
194
  }
187
195
  }
196
+ _getRowHeaderTreeExpandedMaxLevelCount() {
197
+ return "tree" === this.rowHierarchyType ? 1 : "grid-tree" === this.rowHierarchyType ? "row" === this.cornerSetting.titleOnDimension ? this.rowDimensionTree.totalLevel : this.indicatorsAsCol ? this.rowDimensionTree.expandedMaxLevel : this.rowDimensionTree.expandedMaxLevel + 1 : this.rowDimensionTree.totalLevel;
198
+ }
199
+ _getColumnHeaderTreeExpandedMaxLevelCount() {
200
+ return "grid-tree" === this.columnHierarchyType ? "column" === this.cornerSetting.titleOnDimension ? this.columnDimensionTree.totalLevel : !1 === this.indicatorsAsCol ? this.columnDimensionTree.expandedMaxLevel : this.columnDimensionTree.expandedMaxLevel + 1 : this.columnDimensionTree.totalLevel;
201
+ }
188
202
  _addHeaders(_headerCellIds, row, header, roots, results) {
189
203
  const _this = this;
190
204
  _headerCellIds[row] || function(row) {
@@ -211,6 +225,19 @@ class PivotHeaderLayoutMap {
211
225
  (0, tree_helper_1.dealHeaderForTreeMode)(hd, _headerCellIds, results, roots, row, totalLevel, show, dimensions, this);
212
226
  }
213
227
  }
228
+ _addHeadersForGridTreeMode(_headerCellIds, row, header, roots, totalLevel, expandedMaxLevel, show, dimensions, results, isRowTree) {
229
+ const _this = this;
230
+ _headerCellIds[row] || function(row) {
231
+ const newRow = _headerCellIds[row] = [];
232
+ if (0 === _this.colIndex) return newRow;
233
+ const prev = _headerCellIds[row - 1];
234
+ for (let col = 0; col < (null == prev ? void 0 : prev.length); col++) newRow[col] = prev[col];
235
+ }(row);
236
+ for (let i = 0; i < header.length; i++) {
237
+ const hd = header[i];
238
+ (0, tree_helper_1.dealHeaderForGridTreeMode)(hd, _headerCellIds, results, roots, row, totalLevel, expandedMaxLevel, show, dimensions, isRowTree, this.indicatorsAsCol, this);
239
+ }
240
+ }
214
241
  _addCornerHeaders(colDimensionKeys, rowDimensionKeys, dimensions) {
215
242
  var _a, _b;
216
243
  const results = [];
@@ -642,8 +669,9 @@ class PivotHeaderLayoutMap {
642
669
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
643
670
  if (this.showHeader && this.showColumnHeader) {
644
671
  if (this._table.isPivotChart() && this.indicatorsAsCol && !(null === (_b = null === (_a = this.dataset) || void 0 === _a ? void 0 : _a.colKeys) || void 0 === _b ? void 0 : _b.length) && 0 === (null === (_d = null === (_c = this.columnDimensionTree) || void 0 === _c ? void 0 : _c.tree) || void 0 === _d ? void 0 : _d.level) && !this.hasTwoIndicatorAxes) return void (this.columnHeaderLevelCount = 0);
645
- let count = this.indicatorsAsCol && this.hideIndicatorName && this.colDimensionKeys[this.colDimensionKeys.length - 1] === this.indicatorDimensionKey ? this.columnDimensionTree.totalLevel - 1 : this.columnDimensionTree.totalLevel;
646
- return 0 === count && this.dataset && !(null === (_e = this.dataset.customColTree) || void 0 === _e ? void 0 : _e.length) ? "row" === this.cornerSetting.titleOnDimension && this.cornerSetting.forceShowHeader ? count = 1 : this._table.isPivotChart() || 0 !== (null !== (_g = null === (_f = this.dataset.records) || void 0 === _f ? void 0 : _f.length) && void 0 !== _g ? _g : 0) || "column" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_h = this.columnsDefine.length) && void 0 !== _h ? _h : 0) : !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_k = null === (_j = this.dataset.records) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0) || this.dataset.customColTree || "column" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_l = this.columnsDefine.length) && void 0 !== _l ? _l : 0,
672
+ let count = this._getColumnHeaderTreeExpandedMaxLevelCount();
673
+ return this.indicatorsAsCol && this.hideIndicatorName && this.colDimensionKeys[this.colDimensionKeys.length - 1] === this.indicatorDimensionKey && count--,
674
+ 0 === count && this.dataset && !(null === (_e = this.dataset.customColTree) || void 0 === _e ? void 0 : _e.length) ? "row" === this.cornerSetting.titleOnDimension && this.cornerSetting.forceShowHeader ? count = 1 : this._table.isPivotChart() || 0 !== (null !== (_g = null === (_f = this.dataset.records) || void 0 === _f ? void 0 : _f.length) && void 0 !== _g ? _g : 0) || "column" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_h = this.columnsDefine.length) && void 0 !== _h ? _h : 0) : !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_k = null === (_j = this.dataset.records) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0) || this.dataset.customColTree || "column" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_l = this.columnsDefine.length) && void 0 !== _l ? _l : 0,
647
675
  !this.hideIndicatorName && this.indicatorsAsCol && count++), this.columnHeaderTitle && (count += 1),
648
676
  this._table.isPivotChart() && this.indicatorsAsCol && !this.hasTwoIndicatorAxes && (0,
649
677
  get_chart_spec_1.checkHasCartesianChart)(this.indicatorsDefine) && (count -= 1),
@@ -658,7 +686,7 @@ class PivotHeaderLayoutMap {
658
686
  const extensionRowCount = null !== (_b = null === (_a = this.extensionRows) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
659
687
  return this.rowHeaderTitle ? void (this.rowHeaderLevelCount = 2 + extensionRowCount) : void (this.rowHeaderLevelCount = 1 + extensionRowCount);
660
688
  }
661
- const rowLevelCount = this.rowDimensionTree.totalLevel;
689
+ const rowLevelCount = this._getRowHeaderTreeExpandedMaxLevelCount();
662
690
  let count = rowLevelCount;
663
691
  return 0 === count && this.dataset && !(null === (_c = this.dataset.customRowTree) || void 0 === _c ? void 0 : _c.length) ? "column" === this.cornerSetting.titleOnDimension && this.cornerSetting.forceShowHeader ? count = 1 : this._table.isPivotChart() || 0 !== (null !== (_e = null === (_d = this.dataset.records) || void 0 === _d ? void 0 : _d.length) && void 0 !== _e ? _e : 0) || "row" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_f = this.rowsDefine.length) && void 0 !== _f ? _f : 0) : !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_h = null === (_g = this.dataset.records) || void 0 === _g ? void 0 : _g.length) && void 0 !== _h ? _h : 0) || this.dataset.customRowTree || "row" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = this.rowsDefine.length,
664
692
  this.hideIndicatorName || this.indicatorsAsCol || count++), !this.indicatorsAsCol && this.hideIndicatorName && this.rowDimensionKeys[this.rowDimensionKeys.length - 1] === this.indicatorDimensionKey && (count = rowLevelCount - 1),
@@ -680,7 +708,7 @@ class PivotHeaderLayoutMap {
680
708
  }
681
709
  get colCount() {
682
710
  var _a, _b, _c;
683
- return (this.columnDimensionTree.totalLevel > 0 || this._table.isPivotChart() || (null === (_a = this.dataset.records) || void 0 === _a ? void 0 : _a.length) > 0 || this.dataset.records && !Array.isArray(this.dataset.records) ? null !== (_c = null === (_b = this._columnHeaderCellIds[0]) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : this.columnDimensionTree.tree.size : 0) + this.rowHeaderLevelCount + this.rightHeaderColCount + this.leftRowSeriesNumberColumnCount;
711
+ return (this._getColumnHeaderTreeExpandedMaxLevelCount() > 0 || this._table.isPivotChart() || (null === (_a = this.dataset.records) || void 0 === _a ? void 0 : _a.length) > 0 || this.dataset.records && !Array.isArray(this.dataset.records) ? null !== (_c = null === (_b = this._columnHeaderCellIds[0]) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : this.columnDimensionTree.tree.size : 0) + this.rowHeaderLevelCount + this.rightHeaderColCount + this.leftRowSeriesNumberColumnCount;
684
712
  }
685
713
  get rowCount() {
686
714
  var _a, _b, _c, _d;
@@ -890,8 +918,18 @@ class PivotHeaderLayoutMap {
890
918
  }
891
919
  let colPath = this.getColHeaderPathCache(col, row), rowPath = this.getRowHeaderPathCache(col, row);
892
920
  const recordCol = this.getBodyIndexByCol(col), recordRow = this.getBodyIndexByRow(row) + this.currentPageStartIndex;
893
- if (!colPath && row >= 0 && recordCol >= 0 && (colPath = this.columnDimensionTree.getTreePath(recordCol, this.showHeader && this.showColumnHeader ? row - (this.columnHeaderTitle ? 1 : 0) : this.columnDimensionTree.totalLevel),
894
- this.setColHeaderPathCache(col, row, colPath)), !rowPath && col >= 0 && recordRow >= 0) {
921
+ if (!colPath && row >= 0 && recordCol >= 0) {
922
+ if (colPath = [], "grid-tree" === this.columnHierarchyType) {
923
+ const col_pathIds = [];
924
+ this._columnHeaderCellFullPathIds.map((arr => {
925
+ col_pathIds.push(arr[recordCol]);
926
+ }));
927
+ const findedRowPath = this.getTreePathByCellIds(col_pathIds);
928
+ colPath.push(...findedRowPath);
929
+ } else colPath = this.columnDimensionTree.getTreePath(recordCol, this.showHeader && this.showColumnHeader ? row - (this.columnHeaderTitle ? 1 : 0) : this.columnDimensionTree.totalLevel);
930
+ this.setColHeaderPathCache(col, row, colPath);
931
+ }
932
+ if (!rowPath && col >= 0 && recordRow >= 0) {
895
933
  if (rowPath = [], "tree" === this.rowHierarchyType) {
896
934
  const row_pathIds = this._rowHeaderCellFullPathIds[recordRow];
897
935
  let findTree = this.rowDimensionTree, level = 0;
@@ -903,10 +941,13 @@ class PivotHeaderLayoutMap {
903
941
  if (!(null == hd ? void 0 : hd.parentCellId)) break;
904
942
  pathIds.unshift(hd.parentCellId), cellId = hd.parentCellId;
905
943
  }
906
- const findedRowPath = findTree.getTreePathByCellIds(pathIds);
944
+ const findedRowPath = this.getTreePathByCellIds(pathIds);
907
945
  rowPath.push(...findedRowPath), findTree = this._rowHeaderExtensionTree[row_pathIds[level]],
908
946
  level++;
909
947
  }
948
+ } else if ("grid-tree" === this.rowHierarchyType) {
949
+ const row_pathIds = this._rowHeaderCellFullPathIds[recordRow], findedRowPath = this.getTreePathByCellIds(row_pathIds);
950
+ rowPath.push(...findedRowPath);
910
951
  } else rowPath = this.rowDimensionTree.getTreePath(recordRow, this.showHeader && this.showRowHeader ? col - (this.rowHeaderTitle ? 1 : 0) - this.leftRowSeriesNumberColumnCount : this.rowDimensionTree.totalLevel);
911
952
  this.setRowHeaderPathCache(col, row, rowPath);
912
953
  }
@@ -916,6 +957,16 @@ class PivotHeaderLayoutMap {
916
957
  cellLocation: this.getCellLocation(col, row)
917
958
  };
918
959
  }
960
+ getTreePathByCellIds(row_pathIds) {
961
+ const paths = [];
962
+ for (let i = 0; i < row_pathIds.length; i++) {
963
+ const id = row_pathIds[i];
964
+ if (i > 0 && id === row_pathIds[i - 1]) continue;
965
+ const hd = this._headerObjects[id];
966
+ (null == hd ? void 0 : hd.define) && paths.push(hd.define);
967
+ }
968
+ return paths;
969
+ }
919
970
  getCellHeaderPaths(col, row) {
920
971
  var _a, _b;
921
972
  const headerPathsWidthNode = this.getCellHeaderPathsWithTreeNode(col, row), headerPaths = {
@@ -974,16 +1025,19 @@ class PivotHeaderLayoutMap {
974
1025
  toggleHierarchyState(col, row) {
975
1026
  var _a, _b, _c, _d, _e, _f;
976
1027
  this.colIndex = 0;
977
- const oldRowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL.slice(0), oldRowHeaderCellPositons = oldRowHeaderCellIds.map(((id, row) => ({
1028
+ const lastLevelIndex = (this.indicatorsAsCol ? this.rowHeaderLevelCount - 1 : this.rowHeaderLevelCount - 2) - this.leftRowSeriesNumberColumnCount, oldRowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL.slice(0), oldRowHeaderCellPositons = oldRowHeaderCellIds.map(((id, row) => ({
978
1029
  col: col,
979
1030
  row: row + this.columnHeaderLevelCount
980
1031
  }))), hd = this.getHeader(col, row);
981
1032
  if (hd.define.hierarchyState = hd.define.hierarchyState === ts_types_1.HierarchyState.collapse ? ts_types_1.HierarchyState.expand : ts_types_1.HierarchyState.collapse,
982
- this.rowDimensionTree.reset(this.rowDimensionTree.tree.children), this._rowHeaderCellFullPathIds_FULL = [],
983
- this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
1033
+ this.rowDimensionTree.reset(this.rowDimensionTree.tree.children), this.resetRowHeaderLevelCount(),
1034
+ this._rowHeaderCellFullPathIds_FULL = [], this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
984
1035
  this.fullRowDimensionKeys = [], this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys),
985
- this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs),
986
- this.rowHeaderTitle) {
1036
+ "tree" === this.rowHierarchyType) this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs); else if ("grid-tree" === this.rowHierarchyType) {
1037
+ const startRow = 0;
1038
+ this._addHeadersForGridTreeMode(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, this._getRowHeaderTreeExpandedMaxLevelCount(), !0, this.rowsDefine, this.rowHeaderObjs, !0);
1039
+ }
1040
+ if (this.rowHeaderTitle) {
987
1041
  const id = ++this.sharedVar.seqId, firstColIds = Array(this.rowCount - this.columnHeaderLevelCount).fill(id);
988
1042
  this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
989
1043
  const cell = {
@@ -1002,12 +1056,54 @@ class PivotHeaderLayoutMap {
1002
1056
  };
1003
1057
  this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
1004
1058
  }
1005
- this._rowHeaderCellFullPathIds_FULL = (0, util_1.transpose)(this._rowHeaderCellFullPathIds_FULL),
1059
+ let diffCell;
1060
+ if (this._rowHeaderCellFullPathIds_FULL = (0, util_1.transpose)(this._rowHeaderCellFullPathIds_FULL),
1006
1061
  "tree" === this.rowHierarchyType && (null === (_f = this.extensionRows) || void 0 === _f ? void 0 : _f.length) >= 1 && this.generateExtensionRowTree(),
1007
1062
  this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
1008
- o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0;
1009
- const diffCell = (0, diff_cell_1.diffCellAddress)(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount])), this._rowHeaderCellFullPathIds_FULL.map((newCellId => newCellId[col - this.leftRowSeriesNumberColumnCount])), oldRowHeaderCellPositons, this);
1063
+ o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0,
1064
+ "tree" === this.rowHierarchyType) diffCell = (0, diff_cell_1.diffCellAddress)(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount])), this._rowHeaderCellFullPathIds_FULL.map((newCellId => newCellId[col - this.leftRowSeriesNumberColumnCount])), oldRowHeaderCellPositons, this); else {
1065
+ const new_lastLevelIndex = (this.indicatorsAsCol ? this.rowHeaderLevelCount - 1 : this.rowHeaderLevelCount - 2) - this.leftRowSeriesNumberColumnCount;
1066
+ diffCell = (0, diff_cell_1.diffCellAddressForGridTree)(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[lastLevelIndex])), this._rowHeaderCellFullPathIds_FULL.map((newCellId => newCellId[new_lastLevelIndex])), oldRowHeaderCellPositons, this);
1067
+ }
1010
1068
  return this.generateCellIdsConsiderHideHeader(), this.setPagination(this.pagination),
1069
+ "grid-tree" === this.rowHierarchyType && this.setColumnWidths(), diffCell;
1070
+ }
1071
+ toggleHierarchyStateForColumnTree(col, row) {
1072
+ var _a, _b, _c, _d, _e;
1073
+ this.colIndex = 0;
1074
+ const lastLevelIndex = this.indicatorsAsCol ? this.columnHeaderLevelCount - 2 : this.columnHeaderLevelCount - 1, oldColumnHeaderCellIds = this._columnHeaderCellFullPathIds.slice(0), oldColumnHeaderCellPositons = oldColumnHeaderCellIds[this.columnHeaderLevelCount - 1].map(((id, col) => ({
1075
+ col: col + this.rowHeaderLevelCount,
1076
+ row: row
1077
+ }))), hd = this.getHeader(col, row);
1078
+ if (hd.define.hierarchyState = hd.define.hierarchyState === ts_types_1.HierarchyState.collapse ? ts_types_1.HierarchyState.expand : ts_types_1.HierarchyState.collapse,
1079
+ this.columnDimensionTree.reset(this.columnDimensionTree.tree.children), this.resetColumnHeaderLevelCount(),
1080
+ this._columnHeaderCellFullPathIds = [], this.colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
1081
+ "grid-tree" === this.columnHierarchyType) {
1082
+ const startRow = 0;
1083
+ this._addHeadersForGridTreeMode(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnDimensionTree.totalLevel, this._getColumnHeaderTreeExpandedMaxLevelCount(), !0, this.columnsDefine, this.columnHeaderObjs, !1);
1084
+ }
1085
+ if (this.columnHeaderTitle) {
1086
+ const id = ++this.sharedVar.seqId, firstRowIds = Array(this.colCount - this.rowHeaderLevelCount - this.rightFrozenColCount).fill(id);
1087
+ this._columnHeaderCellFullPathIds.unshift(firstRowIds);
1088
+ const cell = {
1089
+ id: id,
1090
+ title: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
1091
+ field: void 0,
1092
+ headerType: null !== (_b = null === (_a = this.columnHeaderTitle) || void 0 === _a ? void 0 : _a.headerType) && void 0 !== _b ? _b : "text",
1093
+ style: null === (_c = this.columnHeaderTitle) || void 0 === _c ? void 0 : _c.headerStyle,
1094
+ define: {
1095
+ id: id,
1096
+ disableHeaderHover: !!(null === (_d = this.columnHeaderTitle) || void 0 === _d ? void 0 : _d.disableHeaderHover),
1097
+ disableHeaderSelect: !!(null === (_e = this.columnHeaderTitle) || void 0 === _e ? void 0 : _e.disableHeaderSelect)
1098
+ }
1099
+ };
1100
+ this.columnHeaderObjs.push(cell), this._headerObjects[id] = cell;
1101
+ }
1102
+ this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
1103
+ o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0;
1104
+ const new_lastLevelIndex = this.indicatorsAsCol ? this.columnHeaderLevelCount - 2 : this.columnHeaderLevelCount - 1, diffCell = (0,
1105
+ diff_cell_1.diffCellAddressForGridTreeOnColumn)(col, row, oldColumnHeaderCellIds[lastLevelIndex], this._columnHeaderCellFullPathIds[new_lastLevelIndex], oldColumnHeaderCellPositons, this);
1106
+ return this.generateCellIdsConsiderHideHeader(), "grid-tree" === this.columnHierarchyType && this.setColumnWidths(),
1011
1107
  diffCell;
1012
1108
  }
1013
1109
  isHeaderForColWidth(col, row) {
@@ -1604,8 +1700,8 @@ class PivotHeaderLayoutMap {
1604
1700
  null === (_a = this.rowTree) || void 0 === _a || _a.forEach(((node, index) => {
1605
1701
  const beforeRowDimension = beforeRowDimensions.find((item => item.dimensionKey === node.dimensionKey && item.value === node.value));
1606
1702
  beforeRowDimension && this._table._syncHierarchyState(beforeRowDimension, node);
1607
- })), this.columnDimensionTree = new tree_helper_1.DimensionTree(null !== (_b = this.columnTree) && void 0 !== _b ? _b : [], this.sharedVar),
1608
- this.rowDimensionTree = new tree_helper_1.DimensionTree(null !== (_c = this.rowTree) && void 0 !== _c ? _c : [], this.sharedVar, this.rowHierarchyType, "tree" === this.rowHierarchyType ? this.rowExpandLevel : void 0),
1703
+ })), this.columnDimensionTree = new tree_helper_1.DimensionTree(null !== (_b = this.columnTree) && void 0 !== _b ? _b : [], this.sharedVar, this.columnHierarchyType, "grid" !== this.columnHierarchyType ? this.columnExpandLevel : void 0),
1704
+ this.rowDimensionTree = new tree_helper_1.DimensionTree(null !== (_c = this.rowTree) && void 0 !== _c ? _c : [], this.sharedVar, this.rowHierarchyType, "grid" !== this.rowHierarchyType ? this.rowExpandLevel : void 0),
1609
1705
  this.resetColumnHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
1610
1706
  this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = (0, util_1.transpose)(this._rowHeaderCellFullPathIds_FULL),
1611
1707
  this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e, o)), {}),
@@ -1645,6 +1741,7 @@ class PivotHeaderLayoutMap {
1645
1741
  }
1646
1742
  }
1647
1743
  generateCellIdsConsiderHideHeader() {
1744
+ var _a, _b, _c, _d;
1648
1745
  if (this._columnHeaderCellIds = this._columnHeaderCellFullPathIds.slice(), !this.showColumnHeader) if (this.indicatorsAsCol && !this.hideIndicatorName) {
1649
1746
  const indicatorIndex = this.colDimensionKeys.indexOf(global_1.IndicatorDimensionKeyPlaceholder), indicatorIds = this._columnHeaderCellIds.splice(indicatorIndex, 1);
1650
1747
  this._columnHeaderCellIds.splice(0, this._columnHeaderCellIds.length), this._columnHeaderCellIds.push(indicatorIds[0]);
@@ -1675,6 +1772,15 @@ class PivotHeaderLayoutMap {
1675
1772
  _cellIds.splice(0, _cellIds.length), _cellIds.push(indicator[0]), this._cornerHeaderCellIds[index] = _cellIds;
1676
1773
  }));
1677
1774
  }
1775
+ if ("grid-tree" === this.rowHierarchyType && "column" === this.cornerSetting.titleOnDimension) this._cornerHeaderCellIds[0].length < this._rowHeaderCellIds[0].length ? this._cornerHeaderCellIds.forEach(((cellIds, index) => {
1776
+ const oldLength = cellIds.length;
1777
+ cellIds.length = this._rowHeaderCellIds[0].length, cellIds.fill(cellIds[0], oldLength);
1778
+ })) : this._cornerHeaderCellIds[0].length > this._rowHeaderCellIds[0].length && this._cornerHeaderCellIds.forEach(((cellIds, index) => {
1779
+ cellIds.length = this._rowHeaderCellIds[0].length;
1780
+ })); else if ("grid-tree" === this.columnHierarchyType && "row" === this.cornerSetting.titleOnDimension) if ((null === (_a = this._cornerHeaderCellIds) || void 0 === _a ? void 0 : _a.length) < (null === (_b = this._columnHeaderCellIds) || void 0 === _b ? void 0 : _b.length)) {
1781
+ const oldLength = this._cornerHeaderCellIds.length;
1782
+ this._cornerHeaderCellIds.length = this._columnHeaderCellIds.length, this._cornerHeaderCellIds.fill(this._cornerHeaderCellIds[0], oldLength);
1783
+ } else (null === (_c = this._cornerHeaderCellIds) || void 0 === _c ? void 0 : _c.length) > (null === (_d = this._columnHeaderCellIds) || void 0 === _d ? void 0 : _d.length) && (this._cornerHeaderCellIds.length = this._columnHeaderCellIds.length);
1678
1784
  }
1679
1785
  enableUseGetBodyCache() {
1680
1786
  this._useGetBodyCache = !0, this._getBodyCache.clear();