@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
|
}
|
|
@@ -411,7 +411,7 @@ class PivotHeaderLayoutMap {
|
|
|
411
411
|
return this.isCornerHeader(col, row) ? "cornerHeader" : this.isColumnHeader(col, row) ? "columnHeader" : this.isRowHeader(col, row) ? "rowHeader" : "body";
|
|
412
412
|
}
|
|
413
413
|
isHeader(col, row) {
|
|
414
|
-
return col < this.rowHeaderLevelCount || (row < this.columnHeaderLevelCount || (col >= this.colCount - this.
|
|
414
|
+
return col < this.rowHeaderLevelCount || (row < this.columnHeaderLevelCount || (col >= this.colCount - this.rightHeaderColCount || row >= this.rowCount - this.bottomHeaderRowCount));
|
|
415
415
|
}
|
|
416
416
|
isCornerHeader(col, row) {
|
|
417
417
|
return col < this.rowHeaderLevelCount && row < this.columnHeaderLevelCount;
|
|
@@ -505,12 +505,10 @@ class PivotHeaderLayoutMap {
|
|
|
505
505
|
}
|
|
506
506
|
resetCellIds() {}
|
|
507
507
|
get frozenColCount() {
|
|
508
|
-
|
|
509
|
-
return null !== (_a = this._table.internalProps.frozenColCount) && void 0 !== _a ? _a : 0;
|
|
508
|
+
return this._table.internalProps.frozenColCount ? this.colCount > this._table.internalProps.frozenColCount ? this._table.internalProps.frozenColCount : this.colCount : 0;
|
|
510
509
|
}
|
|
511
510
|
get frozenRowCount() {
|
|
512
|
-
|
|
513
|
-
return null !== (_a = this._table.internalProps.frozenRowCount) && void 0 !== _a ? _a : 0;
|
|
511
|
+
return this._table.internalProps.frozenRowCount ? this.rowCount >= this._table.internalProps.frozenRowCount ? this._table.internalProps.frozenRowCount : this.rowCount : 0;
|
|
514
512
|
}
|
|
515
513
|
get headerLevelCount() {
|
|
516
514
|
return this.columnHeaderLevelCount;
|
|
@@ -539,26 +537,32 @@ class PivotHeaderLayoutMap {
|
|
|
539
537
|
return this.indicatorsAsCol || this.hideIndicatorName ? 0 : 1;
|
|
540
538
|
}
|
|
541
539
|
get colCount() {
|
|
542
|
-
return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.
|
|
540
|
+
return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.rightHeaderColCount;
|
|
543
541
|
}
|
|
544
542
|
get rowCount() {
|
|
545
543
|
var _a, _b, _c, _d;
|
|
546
|
-
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.
|
|
544
|
+
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;
|
|
547
545
|
}
|
|
548
|
-
get
|
|
546
|
+
get bodyRowSpanCount() {
|
|
549
547
|
return this.rowDimensionTree.tree.size;
|
|
550
548
|
}
|
|
551
549
|
get bottomFrozenRowCount() {
|
|
552
|
-
if (!this._table.isPivotChart()) return 0;
|
|
550
|
+
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;
|
|
553
551
|
const axisOption = this._table.pivotChartAxes.find((axisOption => "bottom" === axisOption.orient));
|
|
554
552
|
return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : (this.indicatorsAsCol,
|
|
555
553
|
1);
|
|
556
554
|
}
|
|
557
555
|
get rightFrozenColCount() {
|
|
558
|
-
if (!this._table.isPivotChart()) return 0;
|
|
556
|
+
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;
|
|
559
557
|
const axisOption = this._table.pivotChartAxes.find((axisOption => "right" === axisOption.orient));
|
|
560
558
|
return !1 === (null == axisOption ? void 0 : axisOption.visible) || this.indicatorsAsCol ? 0 : this.hasTwoIndicatorAxes ? 1 : 0;
|
|
561
559
|
}
|
|
560
|
+
get bodyRowCount() {
|
|
561
|
+
return this.rowCount - this.bottomFrozenRowCount - this.headerLevelCount;
|
|
562
|
+
}
|
|
563
|
+
get bodyColCount() {
|
|
564
|
+
return this.colCount - this.rightFrozenColCount - this.rowHeaderLevelCount;
|
|
565
|
+
}
|
|
562
566
|
get headerObjects() {
|
|
563
567
|
return this._headerObjects;
|
|
564
568
|
}
|
|
@@ -668,10 +672,16 @@ class PivotHeaderLayoutMap {
|
|
|
668
672
|
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;
|
|
669
673
|
}
|
|
670
674
|
getBodyIndexByRow(row) {
|
|
671
|
-
return row < this.columnHeaderLevelCount || row >= this.rowCount - this.
|
|
675
|
+
return row < this.columnHeaderLevelCount || row >= this.rowCount - this.bottomHeaderRowCount ? -1 : row - this.columnHeaderLevelCount;
|
|
676
|
+
}
|
|
677
|
+
get bottomHeaderRowCount() {
|
|
678
|
+
return this._table.isPivotChart() ? this.bottomFrozenRowCount : 0;
|
|
679
|
+
}
|
|
680
|
+
get rightHeaderColCount() {
|
|
681
|
+
return this._table.isPivotChart() ? this.rightFrozenColCount : 0;
|
|
672
682
|
}
|
|
673
683
|
getBodyIndexByCol(col) {
|
|
674
|
-
return col < this.rowHeaderLevelCount || col >= this.colCount - this.
|
|
684
|
+
return col < this.rowHeaderLevelCount || col >= this.colCount - this.rightHeaderColCount ? -1 : col - this.rowHeaderLevelCount;
|
|
675
685
|
}
|
|
676
686
|
getRecordStartRowByRecordIndex(index) {
|
|
677
687
|
return this.columnHeaderLevelCount + index;
|
|
@@ -1196,33 +1206,33 @@ class PivotHeaderLayoutMap {
|
|
|
1196
1206
|
})) : indicatorKeys.push(chartSpec.xField), indicatorKeys) : null;
|
|
1197
1207
|
}
|
|
1198
1208
|
getOptimunHeightForChart(row) {
|
|
1199
|
-
var _a, _b, _c, _d;
|
|
1209
|
+
var _a, _b, _c, _d, _e;
|
|
1200
1210
|
const path = this.getCellHeaderPaths(this.rowHeaderLevelCount, row).rowHeaderPaths;
|
|
1201
1211
|
let collectedValues, height;
|
|
1202
1212
|
for (const key in this.dataset.collectValuesBy) if ("yField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
|
|
1203
|
-
collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1213
|
+
collectedValues = null === (_a = this.dataset.collectedValues[key]) || void 0 === _a ? void 0 : _a[path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1204
1214
|
break;
|
|
1205
1215
|
}
|
|
1206
|
-
if (this._chartItemBandSize) height = scaleWholeRangeSize(null !== (
|
|
1216
|
+
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 {
|
|
1207
1217
|
const barWidth = this._chartItemSpanSize || 25;
|
|
1208
|
-
height = (null !== (
|
|
1218
|
+
height = (null !== (_c = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _c ? _c : 0) * (barWidth + barWidth / 3);
|
|
1209
1219
|
}
|
|
1210
|
-
const padding = (0, padding_1.getQuadProps)(null !== (
|
|
1220
|
+
const padding = (0, padding_1.getQuadProps)(null !== (_e = null !== (_d = this._chartPadding) && void 0 !== _d ? _d : this._table.theme.bodyStyle.padding) && void 0 !== _e ? _e : 0);
|
|
1211
1221
|
return height + padding[0] + padding[2];
|
|
1212
1222
|
}
|
|
1213
1223
|
getOptimunWidthForChart(col) {
|
|
1214
|
-
var _a, _b, _c, _d;
|
|
1224
|
+
var _a, _b, _c, _d, _e;
|
|
1215
1225
|
const path = this.getCellHeaderPaths(col, this.columnHeaderLevelCount).colHeaderPaths;
|
|
1216
1226
|
let collectedValues, width;
|
|
1217
1227
|
for (const key in this.dataset.collectValuesBy) if ("xField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
|
|
1218
|
-
collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1228
|
+
collectedValues = null === (_a = this.dataset.collectedValues[key]) || void 0 === _a ? void 0 : _a[path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
1219
1229
|
break;
|
|
1220
1230
|
}
|
|
1221
|
-
if (this._chartItemBandSize) width = scaleWholeRangeSize(null !== (
|
|
1231
|
+
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 {
|
|
1222
1232
|
const barWidth = this._chartItemSpanSize || 25;
|
|
1223
|
-
width = (null !== (
|
|
1233
|
+
width = (null !== (_c = null == collectedValues ? void 0 : collectedValues.length) && void 0 !== _c ? _c : 0) * (barWidth + barWidth / 3);
|
|
1224
1234
|
}
|
|
1225
|
-
const padding = (0, padding_1.getQuadProps)(null !== (
|
|
1235
|
+
const padding = (0, padding_1.getQuadProps)(null !== (_e = null !== (_d = this._chartPadding) && void 0 !== _d ? _d : this._table.theme.bodyStyle.padding) && void 0 !== _e ? _e : 0);
|
|
1226
1236
|
return width + padding[1] + padding[3];
|
|
1227
1237
|
}
|
|
1228
1238
|
get leftAxesCount() {
|
|
@@ -1258,6 +1268,21 @@ class PivotHeaderLayoutMap {
|
|
|
1258
1268
|
var _a;
|
|
1259
1269
|
return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.title === indicatorValue)));
|
|
1260
1270
|
}
|
|
1271
|
+
getLayoutRowTree() {
|
|
1272
|
+
const tree = [], children = this.rowDimensionTree.tree.children;
|
|
1273
|
+
return (0, pivot_layout_helper_1.generateLayoutTree)(tree, children), tree;
|
|
1274
|
+
}
|
|
1275
|
+
getLayoutRowTreeCount() {
|
|
1276
|
+
var _a;
|
|
1277
|
+
const children = this.rowDimensionTree.tree.children;
|
|
1278
|
+
let totalCount = (0, pivot_layout_helper_1.countLayoutTree)(children, "tree" === this.rowHierarchyType);
|
|
1279
|
+
return null === (_a = this.extensionRows) || void 0 === _a || _a.forEach((extensionRow => {
|
|
1280
|
+
if ("function" != typeof extensionRow.rowTree) {
|
|
1281
|
+
const thisTreeCount = (0, pivot_layout_helper_1.countLayoutTree)(extensionRow.rowTree, !0);
|
|
1282
|
+
totalCount *= thisTreeCount;
|
|
1283
|
+
}
|
|
1284
|
+
})), totalCount;
|
|
1285
|
+
}
|
|
1261
1286
|
updateDataset(dataset) {}
|
|
1262
1287
|
}
|
|
1263
1288
|
|