@visactor/vtable 1.3.2-alpha.0 → 1.3.2-alpha.2
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 +1 -0
- package/cjs/PivotChart.js +4 -0
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/components/axis/axis.js +3 -2
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/empty-tip/empty-tip.js +2 -2
- package/cjs/components/empty-tip/empty-tip.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +2 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -2
- package/cjs/core/BaseTable.js +54 -170
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.d.ts +1 -0
- package/cjs/core/FouseInput.js +5 -2
- package/cjs/core/FouseInput.js.map +1 -1
- package/cjs/core/utils/get-cell-position.d.ts +42 -0
- package/cjs/core/utils/get-cell-position.js +206 -0
- package/cjs/core/utils/get-cell-position.js.map +1 -0
- package/cjs/dataset/dataset.d.ts +0 -2
- package/cjs/dataset/dataset.js +7 -8
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.js +2 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/util.js +2 -2
- package/cjs/event/util.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/pivot-header-layout.js +37 -57
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js +4 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +1 -0
- package/cjs/scenegraph/graphic/chart.js +34 -20
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +20 -8
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +2 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +40 -24
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +1 -0
- package/cjs/scenegraph/refresh-node/update-chart.js +9 -2
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +10 -4
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +14 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +511 -443
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +5 -2
- package/es/PivotChart.js.map +1 -1
- package/es/components/axis/axis.js +3 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/empty-tip/empty-tip.js +2 -2
- package/es/components/empty-tip/empty-tip.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +2 -1
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -2
- package/es/core/BaseTable.js +55 -169
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.d.ts +1 -0
- package/es/core/FouseInput.js +5 -2
- package/es/core/FouseInput.js.map +1 -1
- package/es/core/utils/get-cell-position.d.ts +42 -0
- package/es/core/utils/get-cell-position.js +194 -0
- package/es/core/utils/get-cell-position.js.map +1 -0
- package/es/dataset/dataset.d.ts +0 -2
- package/es/dataset/dataset.js +7 -8
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.js +2 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/util.js +2 -2
- package/es/event/util.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/pivot-header-layout.js +36 -56
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js +4 -1
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +1 -0
- package/es/scenegraph/graphic/chart.js +33 -21
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +20 -8
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.d.ts +2 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +41 -25
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +1 -0
- package/es/scenegraph/refresh-node/update-chart.js +6 -0
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +10 -4
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/ts-types/base-table.d.ts +14 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +2 -2
|
@@ -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
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
27
27
|
if (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 = [],
|
|
@@ -58,15 +58,15 @@ export class PivotHeaderLayoutMap {
|
|
|
58
58
|
})), this.columnDimensionTree = columnDimensionTree, this.rowDimensionTree = rowDimensionTree,
|
|
59
59
|
this.colDimensionKeys = this.columnDimensionTree.dimensionKeys.valueArr(), this.rowDimensionKeys = this.rowDimensionTree.dimensionKeys.valueArr(),
|
|
60
60
|
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys),
|
|
61
|
-
this.resetRowHeaderLevelCount(), this.
|
|
61
|
+
this.resetRowHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
|
|
62
|
+
this._generateRowHeaderIds(), this._table.isPivotChart() && (this.hasTwoIndicatorAxes = this._indicators.some((indicatorObject => {
|
|
62
63
|
var _a, _b;
|
|
63
64
|
if (indicatorObject.chartSpec && indicatorObject.chartSpec.series && indicatorObject.chartSpec.series.length > 1) {
|
|
64
65
|
const axes = null !== (_b = null !== (_a = indicatorObject.chartSpec.axes) && void 0 !== _a ? _a : this._table.pivotChartAxes) && void 0 !== _b ? _b : [];
|
|
65
66
|
if (!axes.length || axes.every((axis => axis.orient !== (this.indicatorsAsCol ? "top" : "right") || !1 !== axis.visible))) return !0;
|
|
66
67
|
}
|
|
67
68
|
return !1;
|
|
68
|
-
}))), this.resetColumnHeaderLevelCount(), this.
|
|
69
|
-
this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
69
|
+
}))), this.resetColumnHeaderLevelCount(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
70
70
|
"tree" === table.options.rowHierarchyType && (null === (_o = this.extensionRows) || void 0 === _o ? void 0 : _o.length) >= 1 && (this.generateExtensionRowTree(),
|
|
71
71
|
this.extensionRows.forEach((extensionRow => {
|
|
72
72
|
const rowKeys = [];
|
|
@@ -75,10 +75,9 @@ export class PivotHeaderLayoutMap {
|
|
|
75
75
|
})), this._extensionRowDimensionKeys.push(rowKeys), this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(rowKeys);
|
|
76
76
|
}))), this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length),
|
|
77
77
|
"column" === this.cornerSetting.titleOnDimension) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
} else if ("row" === this.cornerSetting.titleOnDimension) if ("tree" === this.rowHierarchyType && (null === (_r = this.extensionRows) || void 0 === _r ? void 0 : _r.length) >= 1) {
|
|
78
|
+
const colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
|
|
79
|
+
this.cornerHeaderObjs = this._addCornerHeaders(this.columnHeaderTitle ? [ "" ].concat(colDimensionKeys) : colDimensionKeys, this.columnsDefine);
|
|
80
|
+
} else if ("row" === this.cornerSetting.titleOnDimension) if ("tree" === this.rowHierarchyType && (null === (_p = this.extensionRows) || void 0 === _p ? void 0 : _p.length) >= 1) {
|
|
82
81
|
const rowTreeFirstKey = [];
|
|
83
82
|
rowTreeFirstKey.push(this.rowDimensionKeys[0]), this._extensionRowDimensionKeys.forEach((extensionRowKeys => {
|
|
84
83
|
rowTreeFirstKey.push(extensionRowKeys[0]);
|
|
@@ -86,9 +85,8 @@ export class PivotHeaderLayoutMap {
|
|
|
86
85
|
const extensionRowDimensions = this.extensionRows.reduce(((dimensions, cur) => dimensions.concat(cur.rows)), []);
|
|
87
86
|
this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [ "" ].concat(rowTreeFirstKey) : rowTreeFirstKey, this.rowsDefine.concat(extensionRowDimensions));
|
|
88
87
|
} else {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
this.indicatorsAsCol || rowDimensionKeys.push(this.indicatorDimensionKey)), this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [ "" ].concat(rowDimensionKeys) : rowDimensionKeys, this.rowsDefine);
|
|
88
|
+
const rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
|
|
89
|
+
this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [ "" ].concat(rowDimensionKeys) : rowDimensionKeys, this.rowsDefine);
|
|
92
90
|
} else this.cornerHeaderObjs = this._addCornerHeaders(null, void 0);
|
|
93
91
|
this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
|
|
94
92
|
o)), {}), this.indicatorsAsCol && !this.hideIndicatorName ? this._indicatorShowType = "column" : this.indicatorsAsCol || this.hideIndicatorName ? this._indicatorShowType = "none" : this._indicatorShowType = "row",
|
|
@@ -137,58 +135,44 @@ export class PivotHeaderLayoutMap {
|
|
|
137
135
|
this.leftRowSeriesNumberColumnCount = this.leftRowSeriesNumberColumn.length, this.rightRowSeriesNumberColumnCount = this.rightRowSeriesNumberColumn.length);
|
|
138
136
|
}
|
|
139
137
|
_generateColHeaderIds() {
|
|
140
|
-
var _a, _b, _c, _d, _e, _f
|
|
141
|
-
if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1)
|
|
142
|
-
|
|
143
|
-
if (this.dataset && 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) {
|
|
144
|
-
startRow = this.columnHeaderLevelCount - this.columnDimensionTree.totalLevel;
|
|
145
|
-
for (let i = 0; i < startRow; i++) this._columnHeaderCellFullPathIds.unshift([]);
|
|
146
|
-
}
|
|
147
|
-
this._addHeaders(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs);
|
|
148
|
-
}
|
|
149
|
-
if (this.columnHeaderTitle) {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f;
|
|
139
|
+
if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && this._addHeaders(this._columnHeaderCellFullPathIds, 0, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs),
|
|
140
|
+
this.columnHeaderTitle) {
|
|
150
141
|
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
151
|
-
const id = ++this.sharedVar.seqId, firstRowIds = Array(this.colCount - this.rowHeaderLevelCount
|
|
142
|
+
const id = ++this.sharedVar.seqId, firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
|
|
152
143
|
this._columnHeaderCellFullPathIds.unshift(firstRowIds);
|
|
153
144
|
const cell = {
|
|
154
145
|
id: id,
|
|
155
146
|
title: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
|
|
156
147
|
field: void 0,
|
|
157
|
-
headerType: null !== (
|
|
158
|
-
style: null === (
|
|
148
|
+
headerType: null !== (_c = null === (_b = this.columnHeaderTitle) || void 0 === _b ? void 0 : _b.headerType) && void 0 !== _c ? _c : "text",
|
|
149
|
+
style: null === (_d = this.columnHeaderTitle) || void 0 === _d ? void 0 : _d.headerStyle,
|
|
159
150
|
define: {
|
|
160
151
|
id: id,
|
|
161
|
-
disableHeaderHover: !!(null === (
|
|
162
|
-
disableHeaderSelect: !!(null === (
|
|
152
|
+
disableHeaderHover: !!(null === (_e = this.columnHeaderTitle) || void 0 === _e ? void 0 : _e.disableHeaderHover),
|
|
153
|
+
disableHeaderSelect: !!(null === (_f = this.columnHeaderTitle) || void 0 === _f ? void 0 : _f.disableHeaderSelect)
|
|
163
154
|
}
|
|
164
155
|
};
|
|
165
156
|
this.columnHeaderObjs.push(cell), this._headerObjects[id] = cell;
|
|
166
157
|
}
|
|
167
158
|
}
|
|
168
159
|
_generateRowHeaderIds() {
|
|
169
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
170
|
-
if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1
|
|
171
|
-
|
|
172
|
-
if (this.dataset && 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) {
|
|
173
|
-
startRow = this.rowHeaderLevelCount - this.rowDimensionTree.totalLevel;
|
|
174
|
-
for (let i = 0; i < startRow; i++) this._rowHeaderCellFullPathIds_FULL.unshift([]);
|
|
175
|
-
}
|
|
176
|
-
this._addHeaders(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs);
|
|
177
|
-
}
|
|
178
|
-
if (this.rowHeaderTitle) {
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
161
|
+
if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && ("tree" === this.rowHierarchyType ? this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs) : this._addHeaders(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs)),
|
|
162
|
+
this.rowHeaderTitle) {
|
|
179
163
|
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
180
|
-
const id = ++this.sharedVar.seqId, firstColIds = Array(null !== (
|
|
164
|
+
const id = ++this.sharedVar.seqId, firstColIds = Array(null !== (_c = null === (_b = this._rowHeaderCellFullPathIds_FULL[0]) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : this.rowDimensionTree.tree.size).fill(id);
|
|
181
165
|
this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
|
|
182
166
|
const cell = {
|
|
183
167
|
id: id,
|
|
184
168
|
title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
|
|
185
169
|
field: void 0,
|
|
186
|
-
headerType: null !== (
|
|
187
|
-
style: null === (
|
|
170
|
+
headerType: null !== (_e = null === (_d = this.rowHeaderTitle) || void 0 === _d ? void 0 : _d.headerType) && void 0 !== _e ? _e : "text",
|
|
171
|
+
style: null === (_f = this.rowHeaderTitle) || void 0 === _f ? void 0 : _f.headerStyle,
|
|
188
172
|
define: {
|
|
189
173
|
id: id,
|
|
190
|
-
disableHeaderHover: !!(null === (
|
|
191
|
-
disableHeaderSelect: !!(null === (
|
|
174
|
+
disableHeaderHover: !!(null === (_g = this.rowHeaderTitle) || void 0 === _g ? void 0 : _g.disableHeaderHover),
|
|
175
|
+
disableHeaderSelect: !!(null === (_h = this.rowHeaderTitle) || void 0 === _h ? void 0 : _h.disableHeaderSelect)
|
|
192
176
|
}
|
|
193
177
|
};
|
|
194
178
|
this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
|
|
@@ -503,19 +487,17 @@ export class PivotHeaderLayoutMap {
|
|
|
503
487
|
return this.columnHeaderLevelCount;
|
|
504
488
|
}
|
|
505
489
|
resetColumnHeaderLevelCount() {
|
|
506
|
-
var _a, _b, _c, _d
|
|
490
|
+
var _a, _b, _c, _d;
|
|
507
491
|
if (this.showHeader && this.showColumnHeader) {
|
|
508
492
|
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);
|
|
509
493
|
let count = this.indicatorsAsCol && this.hideIndicatorName && this.colDimensionKeys[this.colDimensionKeys.length - 1] === this.indicatorDimensionKey ? this.columnDimensionTree.totalLevel - 1 : this.columnDimensionTree.totalLevel;
|
|
510
494
|
return this.columnHeaderTitle && (count += 1), this._table.isPivotChart() && this.indicatorsAsCol && !this.hasTwoIndicatorAxes && checkHasCartesianChart(this.indicatorsDefine) && (count -= 1),
|
|
511
|
-
0 !== count || !this.dataset || this.dataset.customColTree || this.dataset.customRowTree ? !this.dataset || 0 !== (null !== (_j = null === (_h = this.dataset.records) || void 0 === _h ? void 0 : _h.length) && void 0 !== _j ? _j : 0) || this.dataset.customColTree || this.dataset.customRowTree || "column" === this.cornerSetting.titleOnDimension && (count = null !== (_k = this.columnsDefine.length) && void 0 !== _k ? _k : 0,
|
|
512
|
-
!this.hideIndicatorName && this.indicatorsAsCol && count++) : "row" === this.cornerSetting.titleOnDimension ? count = 1 : 0 === (null !== (_f = null === (_e = this.dataset.records) || void 0 === _e ? void 0 : _e.length) && void 0 !== _f ? _f : 0) && "column" === this.cornerSetting.titleOnDimension && (count = null !== (_g = this.columnsDefine.length) && void 0 !== _g ? _g : 0),
|
|
513
495
|
void (this.columnHeaderLevelCount = count);
|
|
514
496
|
}
|
|
515
497
|
this.columnHeaderLevelCount = this.indicatorsAsCol ? this.hideIndicatorName ? 0 : 1 : 0;
|
|
516
498
|
}
|
|
517
499
|
resetRowHeaderLevelCount() {
|
|
518
|
-
var _a, _b
|
|
500
|
+
var _a, _b;
|
|
519
501
|
if (this.showHeader && this.showRowHeader) {
|
|
520
502
|
if ("tree" === this.rowHierarchyType) {
|
|
521
503
|
const extensionRowCount = null !== (_b = null === (_a = this.extensionRows) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
|
|
@@ -524,9 +506,7 @@ export class PivotHeaderLayoutMap {
|
|
|
524
506
|
const rowLevelCount = this.rowDimensionTree.totalLevel;
|
|
525
507
|
let count = rowLevelCount;
|
|
526
508
|
return this.indicatorsAsCol || this.hideIndicatorName && this.rowDimensionKeys[this.rowDimensionKeys.length - 1] === this.indicatorDimensionKey && (count = rowLevelCount - 1),
|
|
527
|
-
this.rowHeaderTitle && (count += 1),
|
|
528
|
-
this.hideIndicatorName || this.indicatorsAsCol || count++) : "column" === this.cornerSetting.titleOnDimension ? count = 1 : 0 === (null !== (_d = null === (_c = this.dataset.records) || void 0 === _c ? void 0 : _c.length) && void 0 !== _d ? _d : 0) && "row" === this.cornerSetting.titleOnDimension && (count = null !== (_e = this.rowsDefine.length) && void 0 !== _e ? _e : 0),
|
|
529
|
-
void (this.rowHeaderLevelCount = count);
|
|
509
|
+
this.rowHeaderTitle && (count += 1), void (this.rowHeaderLevelCount = count);
|
|
530
510
|
}
|
|
531
511
|
this.rowHeaderLevelCount = this.indicatorsAsCol || this.hideIndicatorName ? 0 : 1;
|
|
532
512
|
}
|
|
@@ -580,14 +560,14 @@ export class PivotHeaderLayoutMap {
|
|
|
580
560
|
return this._indicators;
|
|
581
561
|
}
|
|
582
562
|
getCellId(col, row) {
|
|
583
|
-
var _a, _b
|
|
563
|
+
var _a, _b;
|
|
584
564
|
if (row >= 0 && col >= 0) {
|
|
585
565
|
if (this.isSeriesNumber(col, row)) return "";
|
|
586
|
-
if (this.isCornerHeader(col, row)) return
|
|
587
|
-
if (this.isColumnHeader(col, row)) return
|
|
588
|
-
if (this.isRowHeader(col, row)) return null === (
|
|
589
|
-
if (this.isRightFrozenColumn(col, row)) return
|
|
590
|
-
if (this.isBottomFrozenRow(col, row)) return null === (
|
|
566
|
+
if (this.isCornerHeader(col, row)) return this._cornerHeaderCellIds[row][col - this.leftRowSeriesNumberColumnCount];
|
|
567
|
+
if (this.isColumnHeader(col, row)) return this._columnHeaderCellIds[row][col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
|
|
568
|
+
if (this.isRowHeader(col, row)) return null === (_a = this._rowHeaderCellIds[row - this.columnHeaderLevelCount]) || void 0 === _a ? void 0 : _a[col - this.leftRowSeriesNumberColumnCount];
|
|
569
|
+
if (this.isRightFrozenColumn(col, row)) return this._rowHeaderCellIds[row - this.columnHeaderLevelCount][this.rowHeaderLevelCount - 1];
|
|
570
|
+
if (this.isBottomFrozenRow(col, row)) return null === (_b = this._columnHeaderCellIds[this.columnHeaderLevelCount - 1]) || void 0 === _b ? void 0 : _b[col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
|
|
591
571
|
}
|
|
592
572
|
}
|
|
593
573
|
getHeader(col, row) {
|
|
@@ -1413,8 +1393,8 @@ export class PivotHeaderLayoutMap {
|
|
|
1413
1393
|
const dataset = this.dataset;
|
|
1414
1394
|
this.rowTree = dataset.rowHeaderTree, this.columnTree = dataset.colHeaderTree, this.columnDimensionTree = new DimensionTree(null !== (_a = this.columnTree) && void 0 !== _a ? _a : [], this.sharedVar),
|
|
1415
1395
|
this.rowDimensionTree = new DimensionTree(null !== (_b = this.rowTree) && void 0 !== _b ? _b : [], this.sharedVar, this.rowHierarchyType, "tree" === this.rowHierarchyType ? this.rowExpandLevel : void 0),
|
|
1416
|
-
this.
|
|
1417
|
-
this.
|
|
1396
|
+
this._generateColHeaderIds(), this.colIndex = 0, this._generateRowHeaderIds(), this.resetColumnHeaderLevelCount(),
|
|
1397
|
+
this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
1418
1398
|
this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e, o)), {}),
|
|
1419
1399
|
this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0, this.generateCellIdsConsiderHideHeader(),
|
|
1420
1400
|
this.setPagination(this.pagination);
|