@visactor/vtable 0.15.0-alpha.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +12 -0
- package/cjs/ListTable.js +127 -13
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +36 -26
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +5 -1
- package/cjs/PivotTable.js +109 -63
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -2
- package/cjs/core/BaseTable.js +72 -92
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/data/DataSource.d.ts +7 -1
- package/cjs/data/DataSource.js +43 -8
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +3 -1
- package/cjs/dataset/dataset.js +20 -15
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.d.ts +14 -0
- package/cjs/edit/edit-manager.js +72 -0
- package/cjs/edit/edit-manager.js.map +1 -0
- package/cjs/edit/editors.d.ts +5 -0
- package/cjs/edit/editors.js +10 -0
- package/cjs/edit/editors.js.map +1 -0
- package/cjs/event/event.d.ts +3 -1
- package/cjs/event/event.js +5 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +5 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.d.ts +1 -0
- package/cjs/event/listener/table-group.js +41 -27
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -2
- package/cjs/event/sparkline-event.js +2 -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.d.ts +8 -1
- package/cjs/layout/pivot-header-layout.js +47 -22
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout-helper.d.ts +11 -0
- package/cjs/layout/pivot-layout-helper.js +24 -2
- package/cjs/layout/pivot-layout-helper.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +3 -1
- package/cjs/layout/simple-header-layout.js +11 -9
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/register.d.ts +2 -0
- package/cjs/register.js +8 -3
- package/cjs/register.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/graphic/icon.js +5 -5
- package/cjs/scenegraph/graphic/icon.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +30 -58
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +1 -3
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.js +4 -4
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.d.ts +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +10 -8
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -0
- package/cjs/scenegraph/scenegraph.js +19 -12
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +5 -5
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +15 -6
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/state.js +5 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -1
- package/cjs/themes/BRIGHT.js +1 -2
- package/cjs/themes/DARK.js +1 -1
- package/cjs/themes/DEFAULT.js +1 -1
- package/cjs/themes/SIMPLIFY.js +1 -1
- package/cjs/themes/theme.js +1 -1
- package/cjs/tools/LimitPromiseQueue.js +1 -1
- package/cjs/tools/NumberMap.js +1 -1
- package/cjs/tools/Rect.js +2 -1
- package/cjs/tools/calc.js +1 -1
- package/cjs/tools/debounce.js +1 -1
- package/cjs/tools/diff-cell.js +2 -2
- package/cjs/tools/dom.js +1 -1
- package/cjs/tools/env.js +1 -1
- package/cjs/tools/global.js +1 -1
- package/cjs/tools/helper.js +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -2
- package/cjs/ts-types/base-table.js +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.d.ts +6 -0
- package/cjs/ts-types/common.js +1 -1
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/component/title.d.ts +3 -3
- package/cjs/ts-types/component/title.js.map +1 -1
- package/cjs/ts-types/events.d.ts +12 -2
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +5 -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 +1 -1
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +13 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +9136 -25006
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +12 -0
- package/es/ListTable.js +111 -12
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +36 -27
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +5 -1
- package/es/PivotTable.js +104 -61
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -2
- package/es/core/BaseTable.js +74 -94
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/es/core/TABLE_EVENT_TYPE.js +3 -1
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/data/DataSource.d.ts +7 -1
- package/es/data/DataSource.js +44 -9
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +3 -1
- package/es/dataset/dataset.js +20 -15
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.d.ts +14 -0
- package/es/edit/edit-manager.js +66 -0
- package/es/edit/edit-manager.js.map +1 -0
- package/es/edit/editors.d.ts +5 -0
- package/es/edit/editors.js +6 -0
- package/es/edit/editors.js.map +1 -0
- package/es/event/event.d.ts +3 -1
- package/es/event/event.js +5 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +5 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.d.ts +1 -0
- package/es/event/listener/table-group.js +40 -24
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -2
- package/es/event/sparkline-event.js +2 -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.d.ts +8 -1
- package/es/layout/pivot-header-layout.js +48 -23
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout-helper.d.ts +11 -0
- package/es/layout/pivot-layout-helper.js +21 -0
- package/es/layout/pivot-layout-helper.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +3 -1
- package/es/layout/simple-header-layout.js +11 -9
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/register.d.ts +2 -0
- package/es/register.js +6 -0
- package/es/register.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/graphic/icon.js +5 -5
- package/es/scenegraph/graphic/icon.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +29 -57
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +1 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/icon/icon-update.js +4 -4
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.d.ts +1 -1
- package/es/scenegraph/layout/compute-col-width.js +10 -8
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -0
- package/es/scenegraph/scenegraph.js +19 -12
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +5 -5
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/resize/update-resize-column.js +15 -6
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/state.js +5 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +1 -1
- package/es/themes/BRIGHT.js +1 -2
- package/es/themes/DARK.js +1 -1
- package/es/themes/DEFAULT.js +1 -1
- package/es/themes/SIMPLIFY.js +1 -1
- package/es/themes/theme.js +1 -1
- package/es/tools/LimitPromiseQueue.js +1 -1
- package/es/tools/NumberMap.js +1 -1
- package/es/tools/Rect.js +2 -1
- package/es/tools/calc.js +1 -1
- package/es/tools/debounce.js +1 -1
- package/es/tools/diff-cell.js +1 -1
- package/es/tools/dom.js +1 -1
- package/es/tools/env.js +1 -1
- package/es/tools/global.js +1 -1
- package/es/tools/helper.js +1 -1
- package/es/ts-types/base-table.d.ts +2 -2
- package/es/ts-types/base-table.js +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.d.ts +6 -0
- package/es/ts-types/common.js +1 -1
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/component/title.d.ts +3 -3
- package/es/ts-types/component/title.js.map +1 -1
- package/es/ts-types/events.d.ts +12 -2
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +5 -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 +1 -1
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +13 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +11 -7
|
@@ -2,6 +2,7 @@ import type { CellAddress, CellRange, IPivotTableCellHeaderPaths, LayoutObjectId
|
|
|
2
2
|
import type { HeaderData, IndicatorData, LayoutMapAPI, WidthData } from '../ts-types/list-table/layout-map/api';
|
|
3
3
|
import type { PivotTable } from '../PivotTable';
|
|
4
4
|
import type { PivotChart } from '../PivotChart';
|
|
5
|
+
import type { LayouTreeNode } from './pivot-layout-helper';
|
|
5
6
|
import { DimensionTree } from './pivot-layout-helper';
|
|
6
7
|
import type { Dataset } from '../dataset/dataset';
|
|
7
8
|
export declare const sharedVar: {
|
|
@@ -104,9 +105,11 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
|
|
|
104
105
|
get rowHeaderLevelCount(): number;
|
|
105
106
|
get colCount(): number;
|
|
106
107
|
get rowCount(): number;
|
|
107
|
-
get
|
|
108
|
+
get bodyRowSpanCount(): number;
|
|
108
109
|
get bottomFrozenRowCount(): number;
|
|
109
110
|
get rightFrozenColCount(): number;
|
|
111
|
+
get bodyRowCount(): number | undefined;
|
|
112
|
+
get bodyColCount(): number | undefined;
|
|
110
113
|
get headerObjects(): HeaderData[];
|
|
111
114
|
get columnObjects(): IndicatorData[];
|
|
112
115
|
getCellId(col: number, row: number): LayoutObjectId;
|
|
@@ -118,6 +121,8 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
|
|
|
118
121
|
getCellRange(col: number, row: number): CellRange;
|
|
119
122
|
isCellRangeEqual(col: number, row: number, targetCol: number, targetRow: number): boolean;
|
|
120
123
|
getBodyIndexByRow(row: number): number;
|
|
124
|
+
get bottomHeaderRowCount(): number;
|
|
125
|
+
get rightHeaderColCount(): number;
|
|
121
126
|
getBodyIndexByCol(col: number): number;
|
|
122
127
|
getRecordStartRowByRecordIndex(index: number): number;
|
|
123
128
|
getRecordIndexByCell(col: number, row: number): number;
|
|
@@ -190,5 +195,7 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
|
|
|
190
195
|
getColKeysPath(col: number, row: number): string;
|
|
191
196
|
getRowKeysPath(col: number, row: number): string;
|
|
192
197
|
getIndicatorInfo(indicatorKey: string, indicatorValue?: string): IIndicator;
|
|
198
|
+
getLayoutRowTree(): LayouTreeNode[];
|
|
199
|
+
getLayoutRowTreeCount(): number;
|
|
193
200
|
updateDataset(dataset: Dataset): void;
|
|
194
201
|
}
|
|
@@ -8,7 +8,7 @@ import { diffCellAddress } from "../tools/diff-cell";
|
|
|
8
8
|
|
|
9
9
|
import { getChartAxes, getChartDataId, getChartSpec, getRawChartSpec } from "./chart-helper/get-chart-spec";
|
|
10
10
|
|
|
11
|
-
import { DimensionTree } from "./pivot-layout-helper";
|
|
11
|
+
import { DimensionTree, countLayoutTree, generateLayoutTree } from "./pivot-layout-helper";
|
|
12
12
|
|
|
13
13
|
import { cloneDeep, isArray, isValid } from "@visactor/vutils";
|
|
14
14
|
|
|
@@ -420,7 +420,7 @@ export class PivotHeaderLayoutMap {
|
|
|
420
420
|
return this.isCornerHeader(col, row) ? "cornerHeader" : this.isColumnHeader(col, row) ? "columnHeader" : this.isRowHeader(col, row) ? "rowHeader" : "body";
|
|
421
421
|
}
|
|
422
422
|
isHeader(col, row) {
|
|
423
|
-
return col < this.rowHeaderLevelCount || (row < this.columnHeaderLevelCount || (col >= this.colCount - this.
|
|
423
|
+
return col < this.rowHeaderLevelCount || (row < this.columnHeaderLevelCount || (col >= this.colCount - this.rightHeaderColCount || row >= this.rowCount - this.bottomHeaderRowCount));
|
|
424
424
|
}
|
|
425
425
|
isCornerHeader(col, row) {
|
|
426
426
|
return col < this.rowHeaderLevelCount && row < this.columnHeaderLevelCount;
|
|
@@ -514,12 +514,10 @@ export class PivotHeaderLayoutMap {
|
|
|
514
514
|
}
|
|
515
515
|
resetCellIds() {}
|
|
516
516
|
get frozenColCount() {
|
|
517
|
-
|
|
518
|
-
return null !== (_a = this._table.internalProps.frozenColCount) && void 0 !== _a ? _a : 0;
|
|
517
|
+
return this._table.internalProps.frozenColCount ? this.colCount > this._table.internalProps.frozenColCount ? this._table.internalProps.frozenColCount : this.colCount : 0;
|
|
519
518
|
}
|
|
520
519
|
get frozenRowCount() {
|
|
521
|
-
|
|
522
|
-
return null !== (_a = this._table.internalProps.frozenRowCount) && void 0 !== _a ? _a : 0;
|
|
520
|
+
return this._table.internalProps.frozenRowCount ? this.rowCount >= this._table.internalProps.frozenRowCount ? this._table.internalProps.frozenRowCount : this.rowCount : 0;
|
|
523
521
|
}
|
|
524
522
|
get headerLevelCount() {
|
|
525
523
|
return this.columnHeaderLevelCount;
|
|
@@ -548,26 +546,32 @@ export class PivotHeaderLayoutMap {
|
|
|
548
546
|
return this.indicatorsAsCol || this.hideIndicatorName ? 0 : 1;
|
|
549
547
|
}
|
|
550
548
|
get colCount() {
|
|
551
|
-
return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.
|
|
549
|
+
return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.rightHeaderColCount;
|
|
552
550
|
}
|
|
553
551
|
get rowCount() {
|
|
554
552
|
var _a, _b, _c, _d;
|
|
555
|
-
return ((!Array.isArray(this._table.records) || this._table.records.length > 0) && (null === (_a = this._indicators) || void 0 === _a ? void 0 : _a.length) > 0 && !(null === (_b = this._rowHeaderCellIds) || void 0 === _b ? void 0 : _b.length) ? 1 : null !== (_d = null === (_c = this._rowHeaderCellIds) || void 0 === _c ? void 0 : _c.length) && void 0 !== _d ? _d : 0) + this.columnHeaderLevelCount + this.
|
|
553
|
+
return ((!Array.isArray(this._table.records) || this._table.records.length > 0) && (null === (_a = this._indicators) || void 0 === _a ? void 0 : _a.length) > 0 && !(null === (_b = this._rowHeaderCellIds) || void 0 === _b ? void 0 : _b.length) ? 1 : null !== (_d = null === (_c = this._rowHeaderCellIds) || void 0 === _c ? void 0 : _c.length) && void 0 !== _d ? _d : 0) + this.columnHeaderLevelCount + this.bottomHeaderRowCount;
|
|
556
554
|
}
|
|
557
|
-
get
|
|
555
|
+
get bodyRowSpanCount() {
|
|
558
556
|
return this.rowDimensionTree.tree.size;
|
|
559
557
|
}
|
|
560
558
|
get bottomFrozenRowCount() {
|
|
561
|
-
if (!this._table.isPivotChart()) return 0;
|
|
559
|
+
if (!this._table.isPivotChart()) return this._table.internalProps.bottomFrozenRowCount ? this.rowCount - this.headerLevelCount >= this._table.internalProps.bottomFrozenRowCount ? this._table.internalProps.bottomFrozenRowCount : this.rowCount - this.headerLevelCount : 0;
|
|
562
560
|
const axisOption = this._table.pivotChartAxes.find((axisOption => "bottom" === axisOption.orient));
|
|
563
561
|
return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : (this.indicatorsAsCol,
|
|
564
562
|
1);
|
|
565
563
|
}
|
|
566
564
|
get rightFrozenColCount() {
|
|
567
|
-
if (!this._table.isPivotChart()) return 0;
|
|
565
|
+
if (!this._table.isPivotChart()) return this._table.internalProps.rightFrozenColCount ? this.colCount - this.rowHeaderLevelCount >= this._table.internalProps.rightFrozenColCount ? this._table.internalProps.rightFrozenColCount : this.colCount - this.rowHeaderLevelCount : 0;
|
|
568
566
|
const axisOption = this._table.pivotChartAxes.find((axisOption => "right" === axisOption.orient));
|
|
569
567
|
return !1 === (null == axisOption ? void 0 : axisOption.visible) || this.indicatorsAsCol ? 0 : this.hasTwoIndicatorAxes ? 1 : 0;
|
|
570
568
|
}
|
|
569
|
+
get bodyRowCount() {
|
|
570
|
+
return this.rowCount - this.bottomFrozenRowCount - this.headerLevelCount;
|
|
571
|
+
}
|
|
572
|
+
get bodyColCount() {
|
|
573
|
+
return this.colCount - this.rightFrozenColCount - this.rowHeaderLevelCount;
|
|
574
|
+
}
|
|
571
575
|
get headerObjects() {
|
|
572
576
|
return this._headerObjects;
|
|
573
577
|
}
|
|
@@ -677,10 +681,16 @@ export class PivotHeaderLayoutMap {
|
|
|
677
681
|
return range1.start.col === range2.start.col && range1.end.col === range2.end.col && range1.start.row === range2.start.row && range1.end.row === range2.end.row;
|
|
678
682
|
}
|
|
679
683
|
getBodyIndexByRow(row) {
|
|
680
|
-
return row < this.columnHeaderLevelCount || row >= this.rowCount - this.
|
|
684
|
+
return row < this.columnHeaderLevelCount || row >= this.rowCount - this.bottomHeaderRowCount ? -1 : row - this.columnHeaderLevelCount;
|
|
685
|
+
}
|
|
686
|
+
get bottomHeaderRowCount() {
|
|
687
|
+
return this._table.isPivotChart() ? this.bottomFrozenRowCount : 0;
|
|
688
|
+
}
|
|
689
|
+
get rightHeaderColCount() {
|
|
690
|
+
return this._table.isPivotChart() ? this.rightFrozenColCount : 0;
|
|
681
691
|
}
|
|
682
692
|
getBodyIndexByCol(col) {
|
|
683
|
-
return col < this.rowHeaderLevelCount || col >= this.colCount - this.
|
|
693
|
+
return col < this.rowHeaderLevelCount || col >= this.colCount - this.rightHeaderColCount ? -1 : col - this.rowHeaderLevelCount;
|
|
684
694
|
}
|
|
685
695
|
getRecordStartRowByRecordIndex(index) {
|
|
686
696
|
return this.columnHeaderLevelCount + index;
|
|
@@ -1195,33 +1205,33 @@ export class PivotHeaderLayoutMap {
|
|
|
1195
1205
|
})) : indicatorKeys.push(chartSpec.xField), indicatorKeys) : null;
|
|
1196
1206
|
}
|
|
1197
1207
|
getOptimunHeightForChart(row) {
|
|
1198
|
-
var _a, _b, _c, _d;
|
|
1208
|
+
var _a, _b, _c, _d, _e;
|
|
1199
1209
|
const path = this.getCellHeaderPaths(this.rowHeaderLevelCount, row).rowHeaderPaths;
|
|
1200
1210
|
let collectedValues, height;
|
|
1201
1211
|
for (const key in this.dataset.collectValuesBy) if ("yField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
|
|
1202
|
-
collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1212
|
+
collectedValues = null === (_a = this.dataset.collectedValues[key]) || void 0 === _a ? void 0 : _a[path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1203
1213
|
break;
|
|
1204
1214
|
}
|
|
1205
|
-
if (this._chartItemBandSize) height = scaleWholeRangeSize(null !== (
|
|
1215
|
+
if (this._chartItemBandSize) height = scaleWholeRangeSize(null !== (_b = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _b ? _b : 0, this._chartItemBandSize, this._chartPaddingInner, this._chartPaddingOuter); else {
|
|
1206
1216
|
const barWidth = this._chartItemSpanSize || 25;
|
|
1207
|
-
height = (null !== (
|
|
1217
|
+
height = (null !== (_c = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _c ? _c : 0) * (barWidth + barWidth / 3);
|
|
1208
1218
|
}
|
|
1209
|
-
const padding = getQuadProps(null !== (
|
|
1219
|
+
const padding = getQuadProps(null !== (_e = null !== (_d = this._chartPadding) && void 0 !== _d ? _d : this._table.theme.bodyStyle.padding) && void 0 !== _e ? _e : 0);
|
|
1210
1220
|
return height + padding[0] + padding[2];
|
|
1211
1221
|
}
|
|
1212
1222
|
getOptimunWidthForChart(col) {
|
|
1213
|
-
var _a, _b, _c, _d;
|
|
1223
|
+
var _a, _b, _c, _d, _e;
|
|
1214
1224
|
const path = this.getCellHeaderPaths(col, this.columnHeaderLevelCount).colHeaderPaths;
|
|
1215
1225
|
let collectedValues, width;
|
|
1216
1226
|
for (const key in this.dataset.collectValuesBy) if ("xField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
|
|
1217
|
-
collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1227
|
+
collectedValues = null === (_a = this.dataset.collectedValues[key]) || void 0 === _a ? void 0 : _a[path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1218
1228
|
break;
|
|
1219
1229
|
}
|
|
1220
|
-
if (this._chartItemBandSize) width = scaleWholeRangeSize(null !== (
|
|
1230
|
+
if (this._chartItemBandSize) width = scaleWholeRangeSize(null !== (_b = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _b ? _b : 0, this._chartItemBandSize, this._chartPaddingInner, this._chartPaddingOuter); else {
|
|
1221
1231
|
const barWidth = this._chartItemSpanSize || 25;
|
|
1222
|
-
width = (null !== (
|
|
1232
|
+
width = (null !== (_c = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _c ? _c : 0) * (barWidth + barWidth / 3);
|
|
1223
1233
|
}
|
|
1224
|
-
const padding = getQuadProps(null !== (
|
|
1234
|
+
const padding = getQuadProps(null !== (_e = null !== (_d = this._chartPadding) && void 0 !== _d ? _d : this._table.theme.bodyStyle.padding) && void 0 !== _e ? _e : 0);
|
|
1225
1235
|
return width + padding[1] + padding[3];
|
|
1226
1236
|
}
|
|
1227
1237
|
get leftAxesCount() {
|
|
@@ -1257,6 +1267,21 @@ export class PivotHeaderLayoutMap {
|
|
|
1257
1267
|
var _a;
|
|
1258
1268
|
return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.title === indicatorValue)));
|
|
1259
1269
|
}
|
|
1270
|
+
getLayoutRowTree() {
|
|
1271
|
+
const tree = [], children = this.rowDimensionTree.tree.children;
|
|
1272
|
+
return generateLayoutTree(tree, children), tree;
|
|
1273
|
+
}
|
|
1274
|
+
getLayoutRowTreeCount() {
|
|
1275
|
+
var _a;
|
|
1276
|
+
const children = this.rowDimensionTree.tree.children;
|
|
1277
|
+
let totalCount = countLayoutTree(children, "tree" === this.rowHierarchyType);
|
|
1278
|
+
return null === (_a = this.extensionRows) || void 0 === _a || _a.forEach((extensionRow => {
|
|
1279
|
+
if ("function" != typeof extensionRow.rowTree) {
|
|
1280
|
+
const thisTreeCount = countLayoutTree(extensionRow.rowTree, !0);
|
|
1281
|
+
totalCount *= thisTreeCount;
|
|
1282
|
+
}
|
|
1283
|
+
})), totalCount;
|
|
1284
|
+
}
|
|
1260
1285
|
updateDataset(dataset) {}
|
|
1261
1286
|
}
|
|
1262
1287
|
|