@visactor/vtable 1.15.2 → 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.
- package/cjs/PivotChart.d.ts +0 -1
- package/cjs/PivotChart.js +2 -5
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +2 -2
- package/cjs/PivotTable.js +41 -33
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -2
- package/cjs/core/BaseTable.js +2 -2
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/DataSource.d.ts +2 -2
- package/cjs/data/DataSource.js +4 -4
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +3 -2
- package/cjs/dataset/dataset.js +12 -9
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/layout-helper.js +8 -8
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +33 -5
- package/cjs/layout/pivot-header-layout.js +137 -31
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.d.ts +5 -4
- package/cjs/layout/tree-helper.js +105 -23
- package/cjs/layout/tree-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +5 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +8 -4
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.d.ts +1 -0
- package/cjs/scenegraph/layout/frozen.js +91 -2
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +4 -1
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +3 -2
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +5 -0
- package/cjs/scenegraph/scenegraph.js +18 -0
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/get-hierarchy-offset.js +1 -1
- package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/cjs/state/state.d.ts +2 -0
- package/cjs/state/state.js +7 -2
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/NumberMap.js +4 -2
- package/cjs/tools/NumberMap.js.map +1 -1
- package/cjs/tools/diff-cell.d.ts +58 -3
- package/cjs/tools/diff-cell.js +90 -11
- package/cjs/tools/diff-cell.js.map +1 -1
- package/cjs/tools/get-data-path/create-dataset.js +1 -1
- package/cjs/tools/get-data-path/create-dataset.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -4
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +2 -2
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +6 -3
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +759 -116
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.d.ts +0 -1
- package/es/PivotChart.js +2 -5
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +2 -2
- package/es/PivotTable.js +41 -33
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -2
- package/es/core/BaseTable.js +2 -2
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/DataSource.d.ts +2 -2
- package/es/data/DataSource.js +4 -4
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +3 -2
- package/es/dataset/dataset.js +12 -9
- package/es/dataset/dataset.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/layout-helper.js +8 -8
- package/es/layout/layout-helper.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +33 -5
- package/es/layout/pivot-header-layout.js +138 -33
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/tree-helper.d.ts +5 -4
- package/es/layout/tree-helper.js +102 -19
- package/es/layout/tree-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +5 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +8 -4
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/frozen.d.ts +1 -0
- package/es/scenegraph/layout/frozen.js +89 -0
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +4 -1
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +3 -2
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +5 -0
- package/es/scenegraph/scenegraph.js +16 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/get-hierarchy-offset.js +1 -1
- package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/es/state/state.d.ts +2 -0
- package/es/state/state.js +7 -2
- package/es/state/state.js.map +1 -1
- package/es/tools/NumberMap.js +4 -2
- package/es/tools/NumberMap.js.map +1 -1
- package/es/tools/diff-cell.d.ts +58 -3
- package/es/tools/diff-cell.js +85 -9
- package/es/tools/diff-cell.js.map +1 -1
- package/es/tools/get-data-path/create-dataset.js +1 -1
- package/es/tools/get-data-path/create-dataset.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +4 -4
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +2 -2
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +6 -3
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
|
@@ -4,11 +4,11 @@ import { HierarchyState } from "../ts-types";
|
|
|
4
4
|
|
|
5
5
|
import { IndicatorDimensionKeyPlaceholder } from "../tools/global";
|
|
6
6
|
|
|
7
|
-
import { diffCellAddress } from "../tools/diff-cell";
|
|
7
|
+
import { diffCellAddress, diffCellAddressForGridTree, diffCellAddressForGridTreeOnColumn } from "../tools/diff-cell";
|
|
8
8
|
|
|
9
9
|
import { checkHasCartesianChart, checkHasChart, getChartAxes, getChartDataId, getChartSpec, getRawChartSpec, isCartesianChart, isHasCartesianChartInline, isNoChartDataRenderNothing, isShareChartSpec } from "./chart-helper/get-chart-spec";
|
|
10
10
|
|
|
11
|
-
import { DimensionTree, countLayoutTree, dealHeader, dealHeaderForTreeMode, generateLayoutTree } from "./tree-helper";
|
|
11
|
+
import { DimensionTree, countLayoutTree, dealHeader, dealHeaderForGridTreeMode, dealHeaderForTreeMode, generateLayoutTree } from "./tree-helper";
|
|
12
12
|
|
|
13
13
|
import { cloneDeep, isArray, isValid } from "@visactor/vutils";
|
|
14
14
|
|
|
@@ -23,7 +23,7 @@ const defaultDimension = {
|
|
|
23
23
|
|
|
24
24
|
export class PivotHeaderLayoutMap {
|
|
25
25
|
constructor(table, dataset, columnDimensionTree, rowDimensionTree) {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
27
27
|
this.colIndex = 0, this._showHeader = !0, this.columnHeaderObjs = [], this.rowHeaderObjs = [],
|
|
28
28
|
this._cornerHeaderCellFullPathIds = [], this._columnHeaderCellFullPathIds = [],
|
|
29
29
|
this._rowHeaderCellFullPathIds = [], this._rowHeaderCellFullPathIds_FULL = [], this._cornerHeaderCellIds = [],
|
|
@@ -48,14 +48,16 @@ export class PivotHeaderLayoutMap {
|
|
|
48
48
|
this.showColumnHeader = null === (_g = table.options.showColumnHeader) || void 0 === _g || _g,
|
|
49
49
|
this.rowHeaderTitle = table.options.rowHeaderTitle, this.columnHeaderTitle = table.options.columnHeaderTitle,
|
|
50
50
|
this.rowHierarchyType = null !== (_h = table.options.rowHierarchyType) && void 0 !== _h ? _h : "grid",
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
51
|
+
this.columnHierarchyType = null !== (_j = table.options.columnHierarchyType) && void 0 !== _j ? _j : "grid",
|
|
52
|
+
this.rowExpandLevel = null !== (_k = table.options.rowExpandLevel) && void 0 !== _k ? _k : 1,
|
|
53
|
+
this.columnExpandLevel = null !== (_l = table.options.columnExpandLevel) && void 0 !== _l ? _l : 1,
|
|
54
|
+
this.rowHierarchyIndent = null !== (_m = table.options.rowHierarchyIndent) && void 0 !== _m ? _m : 20,
|
|
53
55
|
this.rowHierarchyTextStartAlignment = table.options.rowHierarchyTextStartAlignment,
|
|
54
56
|
this.cornerSetting = Object.assign({
|
|
55
57
|
titleOnDimension: "column",
|
|
56
58
|
forceShowHeader: !1
|
|
57
59
|
}, table.options.corner), dataset && (this.rowTree = dataset.rowHeaderTree, this.columnTree = dataset.colHeaderTree),
|
|
58
|
-
null === (
|
|
60
|
+
null === (_o = this.indicatorsDefine) || void 0 === _o || _o.forEach((indicator => {
|
|
59
61
|
"string" == typeof indicator ? this.indicatorKeys.push(indicator) : this.indicatorKeys.push(indicator.indicatorKey);
|
|
60
62
|
})), this.columnDimensionTree = columnDimensionTree, this.rowDimensionTree = rowDimensionTree,
|
|
61
63
|
this.colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
@@ -70,7 +72,7 @@ export class PivotHeaderLayoutMap {
|
|
|
70
72
|
return !1;
|
|
71
73
|
}))), this.resetColumnHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
|
|
72
74
|
this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
73
|
-
"tree" === table.options.rowHierarchyType && (null === (
|
|
75
|
+
"tree" === table.options.rowHierarchyType && (null === (_p = this.extensionRows) || void 0 === _p ? void 0 : _p.length) >= 1 && (this.generateExtensionRowTree(),
|
|
74
76
|
this.extensionRows.forEach((extensionRow => {
|
|
75
77
|
const rowKeys = [];
|
|
76
78
|
extensionRow.rows.forEach((row => {
|
|
@@ -78,17 +80,17 @@ export class PivotHeaderLayoutMap {
|
|
|
78
80
|
})), this._extensionRowDimensionKeys.push(rowKeys), this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(rowKeys);
|
|
79
81
|
}))), this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
80
82
|
let rowDimensionKeys, colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
|
|
81
|
-
!this.dataset || this._table.isPivotChart() || 0 !== (null !== (
|
|
83
|
+
!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)),
|
|
82
84
|
this.indicatorsAsCol && colDimensionKeys.push(this.indicatorDimensionKey)), colDimensionKeys = this.columnHeaderTitle ? [ "" ].concat(colDimensionKeys) : colDimensionKeys;
|
|
83
85
|
let extensionRowDimensions = [];
|
|
84
|
-
if ("tree" === this.rowHierarchyType && (null === (
|
|
86
|
+
if ("tree" === this.rowHierarchyType && (null === (_s = this.extensionRows) || void 0 === _s ? void 0 : _s.length) >= 1) {
|
|
85
87
|
const rowTreeFirstKey = [];
|
|
86
88
|
rowTreeFirstKey.push(this.rowDimensionKeys[0]), this._extensionRowDimensionKeys.forEach((extensionRowKeys => {
|
|
87
89
|
rowTreeFirstKey.push(extensionRowKeys[0]);
|
|
88
90
|
})), extensionRowDimensions = this.extensionRows.reduce(((dimensions, cur) => dimensions.concat(cur.rows)), []),
|
|
89
91
|
rowDimensionKeys = this.rowHeaderTitle ? [ "" ].concat(rowTreeFirstKey) : rowTreeFirstKey;
|
|
90
92
|
} else rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
91
|
-
!this.dataset || this._table.isPivotChart() || 0 !== (null !== (
|
|
93
|
+
!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)),
|
|
92
94
|
this.indicatorsAsCol || rowDimensionKeys.push(this.indicatorDimensionKey)), rowDimensionKeys = this.rowHeaderTitle ? [ "" ].concat(rowDimensionKeys) : rowDimensionKeys;
|
|
93
95
|
this.cornerHeaderObjs = this._addCornerHeaders(colDimensionKeys, rowDimensionKeys, this.columnsDefine.concat(...this.rowsDefine, ...extensionRowDimensions)),
|
|
94
96
|
this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
|
|
@@ -141,10 +143,13 @@ export class PivotHeaderLayoutMap {
|
|
|
141
143
|
}
|
|
142
144
|
_generateColHeaderIds() {
|
|
143
145
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
144
|
-
if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) {
|
|
146
|
+
if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) if ("grid-tree" === this.columnHierarchyType) {
|
|
147
|
+
const startCol = 0;
|
|
148
|
+
this._addHeadersForGridTreeMode(this._columnHeaderCellFullPathIds, startCol, this.columnDimensionTree.tree.children, [], this.columnDimensionTree.totalLevel, this._getColumnHeaderTreeExpandedMaxLevelCount(), !0, this.columnsDefine, this.columnHeaderObjs, !1);
|
|
149
|
+
} else {
|
|
145
150
|
let startRow = 0;
|
|
146
|
-
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.
|
|
147
|
-
startRow = this.columnHeaderLevelCount - this.
|
|
151
|
+
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) {
|
|
152
|
+
startRow = this.columnHeaderLevelCount - this._getColumnHeaderTreeExpandedMaxLevelCount();
|
|
148
153
|
for (let i = 0; i < startRow; i++) this._columnHeaderCellFullPathIds.unshift([]);
|
|
149
154
|
}
|
|
150
155
|
this._addHeaders(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs);
|
|
@@ -170,10 +175,13 @@ export class PivotHeaderLayoutMap {
|
|
|
170
175
|
}
|
|
171
176
|
_generateRowHeaderIds() {
|
|
172
177
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
173
|
-
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 {
|
|
178
|
+
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) {
|
|
179
|
+
const startRow = 0;
|
|
180
|
+
this._addHeadersForGridTreeMode(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, this._getRowHeaderTreeExpandedMaxLevelCount(), !0, this.rowsDefine, this.rowHeaderObjs, !0);
|
|
181
|
+
} else {
|
|
174
182
|
let startRow = 0;
|
|
175
|
-
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.
|
|
176
|
-
startRow = this.rowHeaderLevelCount - this.
|
|
183
|
+
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) {
|
|
184
|
+
startRow = this.rowHeaderLevelCount - this._getRowHeaderTreeExpandedMaxLevelCount();
|
|
177
185
|
for (let i = 0; i < startRow; i++) this._rowHeaderCellFullPathIds_FULL.unshift([]);
|
|
178
186
|
}
|
|
179
187
|
this._addHeaders(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs);
|
|
@@ -197,6 +205,12 @@ export class PivotHeaderLayoutMap {
|
|
|
197
205
|
this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
|
|
198
206
|
}
|
|
199
207
|
}
|
|
208
|
+
_getRowHeaderTreeExpandedMaxLevelCount() {
|
|
209
|
+
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;
|
|
210
|
+
}
|
|
211
|
+
_getColumnHeaderTreeExpandedMaxLevelCount() {
|
|
212
|
+
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;
|
|
213
|
+
}
|
|
200
214
|
_addHeaders(_headerCellIds, row, header, roots, results) {
|
|
201
215
|
const _this = this;
|
|
202
216
|
_headerCellIds[row] || function(row) {
|
|
@@ -223,6 +237,19 @@ export class PivotHeaderLayoutMap {
|
|
|
223
237
|
dealHeaderForTreeMode(hd, _headerCellIds, results, roots, row, totalLevel, show, dimensions, this);
|
|
224
238
|
}
|
|
225
239
|
}
|
|
240
|
+
_addHeadersForGridTreeMode(_headerCellIds, row, header, roots, totalLevel, expandedMaxLevel, show, dimensions, results, isRowTree) {
|
|
241
|
+
const _this = this;
|
|
242
|
+
_headerCellIds[row] || function(row) {
|
|
243
|
+
const newRow = _headerCellIds[row] = [];
|
|
244
|
+
if (0 === _this.colIndex) return newRow;
|
|
245
|
+
const prev = _headerCellIds[row - 1];
|
|
246
|
+
for (let col = 0; col < (null == prev ? void 0 : prev.length); col++) newRow[col] = prev[col];
|
|
247
|
+
}(row);
|
|
248
|
+
for (let i = 0; i < header.length; i++) {
|
|
249
|
+
const hd = header[i];
|
|
250
|
+
dealHeaderForGridTreeMode(hd, _headerCellIds, results, roots, row, totalLevel, expandedMaxLevel, show, dimensions, isRowTree, this.indicatorsAsCol, this);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
226
253
|
_addCornerHeaders(colDimensionKeys, rowDimensionKeys, dimensions) {
|
|
227
254
|
var _a, _b;
|
|
228
255
|
const results = [];
|
|
@@ -654,8 +681,9 @@ export class PivotHeaderLayoutMap {
|
|
|
654
681
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
655
682
|
if (this.showHeader && this.showColumnHeader) {
|
|
656
683
|
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);
|
|
657
|
-
let count = this.
|
|
658
|
-
return
|
|
684
|
+
let count = this._getColumnHeaderTreeExpandedMaxLevelCount();
|
|
685
|
+
return this.indicatorsAsCol && this.hideIndicatorName && this.colDimensionKeys[this.colDimensionKeys.length - 1] === this.indicatorDimensionKey && count--,
|
|
686
|
+
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,
|
|
659
687
|
!this.hideIndicatorName && this.indicatorsAsCol && count++), this.columnHeaderTitle && (count += 1),
|
|
660
688
|
this._table.isPivotChart() && this.indicatorsAsCol && !this.hasTwoIndicatorAxes && checkHasCartesianChart(this.indicatorsDefine) && (count -= 1),
|
|
661
689
|
void (this.columnHeaderLevelCount = count);
|
|
@@ -669,7 +697,7 @@ export class PivotHeaderLayoutMap {
|
|
|
669
697
|
const extensionRowCount = null !== (_b = null === (_a = this.extensionRows) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
|
|
670
698
|
return this.rowHeaderTitle ? void (this.rowHeaderLevelCount = 2 + extensionRowCount) : void (this.rowHeaderLevelCount = 1 + extensionRowCount);
|
|
671
699
|
}
|
|
672
|
-
const rowLevelCount = this.
|
|
700
|
+
const rowLevelCount = this._getRowHeaderTreeExpandedMaxLevelCount();
|
|
673
701
|
let count = rowLevelCount;
|
|
674
702
|
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,
|
|
675
703
|
this.hideIndicatorName || this.indicatorsAsCol || count++), !this.indicatorsAsCol && this.hideIndicatorName && this.rowDimensionKeys[this.rowDimensionKeys.length - 1] === this.indicatorDimensionKey && (count = rowLevelCount - 1),
|
|
@@ -691,7 +719,7 @@ export class PivotHeaderLayoutMap {
|
|
|
691
719
|
}
|
|
692
720
|
get colCount() {
|
|
693
721
|
var _a, _b, _c;
|
|
694
|
-
return (this.
|
|
722
|
+
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;
|
|
695
723
|
}
|
|
696
724
|
get rowCount() {
|
|
697
725
|
var _a, _b, _c, _d;
|
|
@@ -899,8 +927,18 @@ export class PivotHeaderLayoutMap {
|
|
|
899
927
|
}
|
|
900
928
|
let colPath = this.getColHeaderPathCache(col, row), rowPath = this.getRowHeaderPathCache(col, row);
|
|
901
929
|
const recordCol = this.getBodyIndexByCol(col), recordRow = this.getBodyIndexByRow(row) + this.currentPageStartIndex;
|
|
902
|
-
if (!colPath && row >= 0 && recordCol >= 0
|
|
903
|
-
|
|
930
|
+
if (!colPath && row >= 0 && recordCol >= 0) {
|
|
931
|
+
if (colPath = [], "grid-tree" === this.columnHierarchyType) {
|
|
932
|
+
const col_pathIds = [];
|
|
933
|
+
this._columnHeaderCellFullPathIds.map((arr => {
|
|
934
|
+
col_pathIds.push(arr[recordCol]);
|
|
935
|
+
}));
|
|
936
|
+
const findedRowPath = this.getTreePathByCellIds(col_pathIds);
|
|
937
|
+
colPath.push(...findedRowPath);
|
|
938
|
+
} else colPath = this.columnDimensionTree.getTreePath(recordCol, this.showHeader && this.showColumnHeader ? row - (this.columnHeaderTitle ? 1 : 0) : this.columnDimensionTree.totalLevel);
|
|
939
|
+
this.setColHeaderPathCache(col, row, colPath);
|
|
940
|
+
}
|
|
941
|
+
if (!rowPath && col >= 0 && recordRow >= 0) {
|
|
904
942
|
if (rowPath = [], "tree" === this.rowHierarchyType) {
|
|
905
943
|
const row_pathIds = this._rowHeaderCellFullPathIds[recordRow];
|
|
906
944
|
let findTree = this.rowDimensionTree, level = 0;
|
|
@@ -912,10 +950,13 @@ export class PivotHeaderLayoutMap {
|
|
|
912
950
|
if (!(null == hd ? void 0 : hd.parentCellId)) break;
|
|
913
951
|
pathIds.unshift(hd.parentCellId), cellId = hd.parentCellId;
|
|
914
952
|
}
|
|
915
|
-
const findedRowPath =
|
|
953
|
+
const findedRowPath = this.getTreePathByCellIds(pathIds);
|
|
916
954
|
rowPath.push(...findedRowPath), findTree = this._rowHeaderExtensionTree[row_pathIds[level]],
|
|
917
955
|
level++;
|
|
918
956
|
}
|
|
957
|
+
} else if ("grid-tree" === this.rowHierarchyType) {
|
|
958
|
+
const row_pathIds = this._rowHeaderCellFullPathIds[recordRow], findedRowPath = this.getTreePathByCellIds(row_pathIds);
|
|
959
|
+
rowPath.push(...findedRowPath);
|
|
919
960
|
} else rowPath = this.rowDimensionTree.getTreePath(recordRow, this.showHeader && this.showRowHeader ? col - (this.rowHeaderTitle ? 1 : 0) - this.leftRowSeriesNumberColumnCount : this.rowDimensionTree.totalLevel);
|
|
920
961
|
this.setRowHeaderPathCache(col, row, rowPath);
|
|
921
962
|
}
|
|
@@ -925,6 +966,16 @@ export class PivotHeaderLayoutMap {
|
|
|
925
966
|
cellLocation: this.getCellLocation(col, row)
|
|
926
967
|
};
|
|
927
968
|
}
|
|
969
|
+
getTreePathByCellIds(row_pathIds) {
|
|
970
|
+
const paths = [];
|
|
971
|
+
for (let i = 0; i < row_pathIds.length; i++) {
|
|
972
|
+
const id = row_pathIds[i];
|
|
973
|
+
if (i > 0 && id === row_pathIds[i - 1]) continue;
|
|
974
|
+
const hd = this._headerObjects[id];
|
|
975
|
+
(null == hd ? void 0 : hd.define) && paths.push(hd.define);
|
|
976
|
+
}
|
|
977
|
+
return paths;
|
|
978
|
+
}
|
|
928
979
|
getCellHeaderPaths(col, row) {
|
|
929
980
|
var _a, _b;
|
|
930
981
|
const headerPathsWidthNode = this.getCellHeaderPathsWithTreeNode(col, row), headerPaths = {
|
|
@@ -983,16 +1034,19 @@ export class PivotHeaderLayoutMap {
|
|
|
983
1034
|
toggleHierarchyState(col, row) {
|
|
984
1035
|
var _a, _b, _c, _d, _e, _f;
|
|
985
1036
|
this.colIndex = 0;
|
|
986
|
-
const oldRowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL.slice(0), oldRowHeaderCellPositons = oldRowHeaderCellIds.map(((id, row) => ({
|
|
1037
|
+
const lastLevelIndex = (this.indicatorsAsCol ? this.rowHeaderLevelCount - 1 : this.rowHeaderLevelCount - 2) - this.leftRowSeriesNumberColumnCount, oldRowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL.slice(0), oldRowHeaderCellPositons = oldRowHeaderCellIds.map(((id, row) => ({
|
|
987
1038
|
col: col,
|
|
988
1039
|
row: row + this.columnHeaderLevelCount
|
|
989
1040
|
}))), hd = this.getHeader(col, row);
|
|
990
1041
|
if (hd.define.hierarchyState = hd.define.hierarchyState === HierarchyState.collapse ? HierarchyState.expand : HierarchyState.collapse,
|
|
991
|
-
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children), this.
|
|
992
|
-
this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
1042
|
+
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children), this.resetRowHeaderLevelCount(),
|
|
1043
|
+
this._rowHeaderCellFullPathIds_FULL = [], this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
993
1044
|
this.fullRowDimensionKeys = [], this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys),
|
|
994
|
-
this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs)
|
|
995
|
-
|
|
1045
|
+
"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) {
|
|
1046
|
+
const startRow = 0;
|
|
1047
|
+
this._addHeadersForGridTreeMode(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, this._getRowHeaderTreeExpandedMaxLevelCount(), !0, this.rowsDefine, this.rowHeaderObjs, !0);
|
|
1048
|
+
}
|
|
1049
|
+
if (this.rowHeaderTitle) {
|
|
996
1050
|
const id = ++this.sharedVar.seqId, firstColIds = Array(this.rowCount - this.columnHeaderLevelCount).fill(id);
|
|
997
1051
|
this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
|
|
998
1052
|
const cell = {
|
|
@@ -1011,12 +1065,53 @@ export class PivotHeaderLayoutMap {
|
|
|
1011
1065
|
};
|
|
1012
1066
|
this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
|
|
1013
1067
|
}
|
|
1014
|
-
|
|
1068
|
+
let diffCell;
|
|
1069
|
+
if (this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
1015
1070
|
"tree" === this.rowHierarchyType && (null === (_f = this.extensionRows) || void 0 === _f ? void 0 : _f.length) >= 1 && this.generateExtensionRowTree(),
|
|
1016
1071
|
this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
|
|
1017
|
-
o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0
|
|
1018
|
-
|
|
1072
|
+
o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0,
|
|
1073
|
+
"tree" === this.rowHierarchyType) diffCell = diffCellAddress(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount])), this._rowHeaderCellFullPathIds_FULL.map((newCellId => newCellId[col - this.leftRowSeriesNumberColumnCount])), oldRowHeaderCellPositons, this); else {
|
|
1074
|
+
const new_lastLevelIndex = (this.indicatorsAsCol ? this.rowHeaderLevelCount - 1 : this.rowHeaderLevelCount - 2) - this.leftRowSeriesNumberColumnCount;
|
|
1075
|
+
diffCell = diffCellAddressForGridTree(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[lastLevelIndex])), this._rowHeaderCellFullPathIds_FULL.map((newCellId => newCellId[new_lastLevelIndex])), oldRowHeaderCellPositons, this);
|
|
1076
|
+
}
|
|
1019
1077
|
return this.generateCellIdsConsiderHideHeader(), this.setPagination(this.pagination),
|
|
1078
|
+
"grid-tree" === this.rowHierarchyType && this.setColumnWidths(), diffCell;
|
|
1079
|
+
}
|
|
1080
|
+
toggleHierarchyStateForColumnTree(col, row) {
|
|
1081
|
+
var _a, _b, _c, _d, _e;
|
|
1082
|
+
this.colIndex = 0;
|
|
1083
|
+
const lastLevelIndex = this.indicatorsAsCol ? this.columnHeaderLevelCount - 2 : this.columnHeaderLevelCount - 1, oldColumnHeaderCellIds = this._columnHeaderCellFullPathIds.slice(0), oldColumnHeaderCellPositons = oldColumnHeaderCellIds[this.columnHeaderLevelCount - 1].map(((id, col) => ({
|
|
1084
|
+
col: col + this.rowHeaderLevelCount,
|
|
1085
|
+
row: row
|
|
1086
|
+
}))), hd = this.getHeader(col, row);
|
|
1087
|
+
if (hd.define.hierarchyState = hd.define.hierarchyState === HierarchyState.collapse ? HierarchyState.expand : HierarchyState.collapse,
|
|
1088
|
+
this.columnDimensionTree.reset(this.columnDimensionTree.tree.children), this.resetColumnHeaderLevelCount(),
|
|
1089
|
+
this._columnHeaderCellFullPathIds = [], this.colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
1090
|
+
"grid-tree" === this.columnHierarchyType) {
|
|
1091
|
+
const startRow = 0;
|
|
1092
|
+
this._addHeadersForGridTreeMode(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnDimensionTree.totalLevel, this._getColumnHeaderTreeExpandedMaxLevelCount(), !0, this.columnsDefine, this.columnHeaderObjs, !1);
|
|
1093
|
+
}
|
|
1094
|
+
if (this.columnHeaderTitle) {
|
|
1095
|
+
const id = ++this.sharedVar.seqId, firstRowIds = Array(this.colCount - this.rowHeaderLevelCount - this.rightFrozenColCount).fill(id);
|
|
1096
|
+
this._columnHeaderCellFullPathIds.unshift(firstRowIds);
|
|
1097
|
+
const cell = {
|
|
1098
|
+
id: id,
|
|
1099
|
+
title: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
|
|
1100
|
+
field: void 0,
|
|
1101
|
+
headerType: null !== (_b = null === (_a = this.columnHeaderTitle) || void 0 === _a ? void 0 : _a.headerType) && void 0 !== _b ? _b : "text",
|
|
1102
|
+
style: null === (_c = this.columnHeaderTitle) || void 0 === _c ? void 0 : _c.headerStyle,
|
|
1103
|
+
define: {
|
|
1104
|
+
id: id,
|
|
1105
|
+
disableHeaderHover: !!(null === (_d = this.columnHeaderTitle) || void 0 === _d ? void 0 : _d.disableHeaderHover),
|
|
1106
|
+
disableHeaderSelect: !!(null === (_e = this.columnHeaderTitle) || void 0 === _e ? void 0 : _e.disableHeaderSelect)
|
|
1107
|
+
}
|
|
1108
|
+
};
|
|
1109
|
+
this.columnHeaderObjs.push(cell), this._headerObjects[id] = cell;
|
|
1110
|
+
}
|
|
1111
|
+
this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
|
|
1112
|
+
o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0;
|
|
1113
|
+
const new_lastLevelIndex = this.indicatorsAsCol ? this.columnHeaderLevelCount - 2 : this.columnHeaderLevelCount - 1, diffCell = diffCellAddressForGridTreeOnColumn(col, row, oldColumnHeaderCellIds[lastLevelIndex], this._columnHeaderCellFullPathIds[new_lastLevelIndex], oldColumnHeaderCellPositons, this);
|
|
1114
|
+
return this.generateCellIdsConsiderHideHeader(), "grid-tree" === this.columnHierarchyType && this.setColumnWidths(),
|
|
1020
1115
|
diffCell;
|
|
1021
1116
|
}
|
|
1022
1117
|
isHeaderForColWidth(col, row) {
|
|
@@ -1595,8 +1690,8 @@ export class PivotHeaderLayoutMap {
|
|
|
1595
1690
|
null === (_a = this.rowTree) || void 0 === _a || _a.forEach(((node, index) => {
|
|
1596
1691
|
const beforeRowDimension = beforeRowDimensions.find((item => item.dimensionKey === node.dimensionKey && item.value === node.value));
|
|
1597
1692
|
beforeRowDimension && this._table._syncHierarchyState(beforeRowDimension, node);
|
|
1598
|
-
})), this.columnDimensionTree = new DimensionTree(null !== (_b = this.columnTree) && void 0 !== _b ? _b : [], this.sharedVar),
|
|
1599
|
-
this.rowDimensionTree = new DimensionTree(null !== (_c = this.rowTree) && void 0 !== _c ? _c : [], this.sharedVar, this.rowHierarchyType, "
|
|
1693
|
+
})), this.columnDimensionTree = new DimensionTree(null !== (_b = this.columnTree) && void 0 !== _b ? _b : [], this.sharedVar, this.columnHierarchyType, "grid" !== this.columnHierarchyType ? this.columnExpandLevel : void 0),
|
|
1694
|
+
this.rowDimensionTree = new DimensionTree(null !== (_c = this.rowTree) && void 0 !== _c ? _c : [], this.sharedVar, this.rowHierarchyType, "grid" !== this.rowHierarchyType ? this.rowExpandLevel : void 0),
|
|
1600
1695
|
this.resetColumnHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
|
|
1601
1696
|
this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
1602
1697
|
this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e, o)), {}),
|
|
@@ -1636,6 +1731,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1636
1731
|
}
|
|
1637
1732
|
}
|
|
1638
1733
|
generateCellIdsConsiderHideHeader() {
|
|
1734
|
+
var _a, _b, _c, _d;
|
|
1639
1735
|
if (this._columnHeaderCellIds = this._columnHeaderCellFullPathIds.slice(), !this.showColumnHeader) if (this.indicatorsAsCol && !this.hideIndicatorName) {
|
|
1640
1736
|
const indicatorIndex = this.colDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder), indicatorIds = this._columnHeaderCellIds.splice(indicatorIndex, 1);
|
|
1641
1737
|
this._columnHeaderCellIds.splice(0, this._columnHeaderCellIds.length), this._columnHeaderCellIds.push(indicatorIds[0]);
|
|
@@ -1666,6 +1762,15 @@ export class PivotHeaderLayoutMap {
|
|
|
1666
1762
|
_cellIds.splice(0, _cellIds.length), _cellIds.push(indicator[0]), this._cornerHeaderCellIds[index] = _cellIds;
|
|
1667
1763
|
}));
|
|
1668
1764
|
}
|
|
1765
|
+
if ("grid-tree" === this.rowHierarchyType && "column" === this.cornerSetting.titleOnDimension) this._cornerHeaderCellIds[0].length < this._rowHeaderCellIds[0].length ? this._cornerHeaderCellIds.forEach(((cellIds, index) => {
|
|
1766
|
+
const oldLength = cellIds.length;
|
|
1767
|
+
cellIds.length = this._rowHeaderCellIds[0].length, cellIds.fill(cellIds[0], oldLength);
|
|
1768
|
+
})) : this._cornerHeaderCellIds[0].length > this._rowHeaderCellIds[0].length && this._cornerHeaderCellIds.forEach(((cellIds, index) => {
|
|
1769
|
+
cellIds.length = this._rowHeaderCellIds[0].length;
|
|
1770
|
+
})); 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)) {
|
|
1771
|
+
const oldLength = this._cornerHeaderCellIds.length;
|
|
1772
|
+
this._cornerHeaderCellIds.length = this._columnHeaderCellIds.length, this._cornerHeaderCellIds.fill(this._cornerHeaderCellIds[0], oldLength);
|
|
1773
|
+
} 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);
|
|
1669
1774
|
}
|
|
1670
1775
|
enableUseGetBodyCache() {
|
|
1671
1776
|
this._useGetBodyCache = !0, this._getBodyCache.clear();
|