@visactor/vtable 0.21.4-alpha.4 → 0.22.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 +2 -4
- package/cjs/ListTable.js +37 -28
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +1 -0
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +13 -4
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +14 -9
- package/cjs/core/BaseTable.js +44 -33
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/row-series-number-helper.d.ts +8 -0
- package/cjs/core/row-series-number-helper.js +45 -0
- package/cjs/core/row-series-number-helper.js.map +1 -0
- package/cjs/core/style.js +2 -1
- package/cjs/core/tableHelper.js +1 -1
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/CachedDataSource.d.ts +2 -2
- package/cjs/data/CachedDataSource.js +5 -5
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.d.ts +6 -2
- package/cjs/data/DataSource.js +113 -41
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +2 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -2
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/event/scroll.js +1 -0
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/icons.js +14 -0
- package/cjs/icons.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.d.ts +1 -0
- package/cjs/layout/layout-helper.js +12 -2
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +16 -5
- package/cjs/layout/pivot-header-layout.js +102 -46
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +17 -4
- package/cjs/layout/simple-header-layout.js +170 -61
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/themes.js +1 -2
- package/cjs/scenegraph/component/cell-mover.js +1 -1
- package/cjs/scenegraph/component/cell-mover.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +1 -1
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +0 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +28 -18
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +3 -4
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +9 -2
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +2 -2
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +2 -2
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +8 -2
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -1
- package/cjs/scenegraph/scenegraph.js +4 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.d.ts +1 -3
- package/cjs/scenegraph/select/update-select-border.js +4 -21
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/cjs/state/cell-move/adjust-header.js +3 -4
- package/cjs/state/cell-move/adjust-header.js.map +1 -1
- package/cjs/state/cell-move/index.js +15 -10
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/select/update-position.js +33 -6
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.js +2 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/component.js +1 -1
- package/cjs/ts-types/base-table.d.ts +15 -6
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/icon.d.ts +4 -2
- package/cjs/ts-types/icon.js +3 -2
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +17 -3
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +1 -2
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/title.d.ts +5 -5
- package/cjs/ts-types/pivot-table/title.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +30 -3
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +1042 -296
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +2 -4
- package/es/ListTable.js +37 -28
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +1 -0
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +13 -4
- package/es/PivotTable.js.map +1 -1
- package/es/components/menu/dom/MenuHandler.js.map +1 -1
- package/es/core/BaseTable.d.ts +14 -9
- package/es/core/BaseTable.js +46 -34
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/row-series-number-helper.d.ts +8 -0
- package/es/core/row-series-number-helper.js +14 -0
- package/es/core/row-series-number-helper.js.map +1 -0
- package/es/core/style.js +2 -1
- package/es/core/tableHelper.js +1 -1
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/CachedDataSource.d.ts +2 -2
- package/es/data/CachedDataSource.js +5 -5
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.d.ts +6 -2
- package/es/data/DataSource.js +113 -41
- package/es/data/DataSource.js.map +1 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +3 -2
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -2
- package/es/event/media-click.js.map +1 -1
- package/es/event/scroll.js +2 -1
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/icons.js +14 -0
- package/es/icons.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.d.ts +1 -0
- package/es/layout/layout-helper.js +10 -0
- package/es/layout/layout-helper.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +16 -5
- package/es/layout/pivot-header-layout.js +102 -46
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +17 -4
- package/es/layout/simple-header-layout.js +170 -61
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/themes.js +1 -2
- package/es/scenegraph/component/cell-mover.js +1 -1
- package/es/scenegraph/component/cell-mover.js.map +1 -1
- package/es/scenegraph/component/custom.js +1 -1
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +0 -1
- package/es/scenegraph/group-creater/cell-helper.js +26 -14
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +5 -6
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +6 -2
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +3 -3
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +3 -3
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +7 -2
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -1
- package/es/scenegraph/scenegraph.js +4 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.d.ts +1 -3
- package/es/scenegraph/select/update-select-border.js +2 -18
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/es/state/cell-move/adjust-header.js +3 -4
- package/es/state/cell-move/adjust-header.js.map +1 -1
- package/es/state/cell-move/index.js +14 -10
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/select/update-position.js +33 -6
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.js +2 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/component.js +1 -1
- package/es/ts-types/base-table.d.ts +15 -6
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/icon.d.ts +4 -2
- package/es/ts-types/icon.js +3 -2
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +17 -3
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +1 -2
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/title.d.ts +5 -5
- package/es/ts-types/pivot-table/title.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +30 -3
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ListTable } from '../ListTable';
|
|
2
|
-
import type { CellAddress, CellRange, CellLocation, IListTableCellHeaderPaths, LayoutObjectId } from '../ts-types';
|
|
2
|
+
import type { CellAddress, CellRange, CellLocation, IListTableCellHeaderPaths, LayoutObjectId, IRowSeriesNumber } from '../ts-types';
|
|
3
3
|
import type { ColumnsDefine } from '../ts-types/list-table/define';
|
|
4
|
-
import type { ColumnData, HeaderData, LayoutMapAPI, WidthData } from '../ts-types/list-table/layout-map/api';
|
|
4
|
+
import type { ColumnData, HeaderData, LayoutMapAPI, SeriesNumberColumnData, WidthData } from '../ts-types/list-table/layout-map/api';
|
|
5
5
|
import type { Aggregator } from '../dataset/statistics-helper';
|
|
6
6
|
import { DimensionTree } from './tree-helper';
|
|
7
7
|
export declare class SimpleHeaderLayoutMap implements LayoutMapAPI {
|
|
@@ -10,6 +10,11 @@ export declare class SimpleHeaderLayoutMap implements LayoutMapAPI {
|
|
|
10
10
|
private _headerObjectMap;
|
|
11
11
|
private _headerCellIds;
|
|
12
12
|
private _columns;
|
|
13
|
+
rowSeriesNumberColumn: SeriesNumberColumnData[];
|
|
14
|
+
leftRowSeriesNumberColumn: SeriesNumberColumnData[];
|
|
15
|
+
rightRowSeriesNumberColumn: SeriesNumberColumnData[];
|
|
16
|
+
leftRowSeriesNumberColumnCount: number;
|
|
17
|
+
rightRowSeriesNumberColumnCount: number;
|
|
13
18
|
columnTree: DimensionTree;
|
|
14
19
|
readonly bodyRowSpanCount: number;
|
|
15
20
|
hierarchyIndent?: number;
|
|
@@ -20,12 +25,19 @@ export declare class SimpleHeaderLayoutMap implements LayoutMapAPI {
|
|
|
20
25
|
_hasAggregation: boolean;
|
|
21
26
|
_hasAggregationOnTopCount: number;
|
|
22
27
|
_hasAggregationOnBottomCount: number;
|
|
28
|
+
rowHierarchyType?: 'grid' | 'tree';
|
|
23
29
|
private _cellRangeMap;
|
|
24
30
|
constructor(table: ListTable, columns: ColumnsDefine, showHeader: boolean, hierarchyIndent: number);
|
|
31
|
+
handleRowSeriesNumber(rowSeriesNumber: IRowSeriesNumber): void;
|
|
25
32
|
get transpose(): boolean;
|
|
26
33
|
set transpose(_transpose: boolean);
|
|
27
34
|
get showHeader(): boolean;
|
|
28
35
|
set showHeader(_showHeader: boolean);
|
|
36
|
+
isSeriesNumberInHeader(col: number, row: number): boolean;
|
|
37
|
+
isSeriesNumberInBody(col: number, row: number): boolean;
|
|
38
|
+
isSeriesNumber(col: number, row: number): boolean;
|
|
39
|
+
getSeriesNumberHeader(col: number, row: number): SeriesNumberColumnData;
|
|
40
|
+
getSeriesNumberBody(col: number, row: number): SeriesNumberColumnData;
|
|
29
41
|
isHeader(col: number, row: number): boolean;
|
|
30
42
|
isAggregation(col: number, row: number): boolean;
|
|
31
43
|
isTopAggregation(col: number, row: number): boolean;
|
|
@@ -73,11 +85,11 @@ export declare class SimpleHeaderLayoutMap implements LayoutMapAPI {
|
|
|
73
85
|
get columnWidths(): WidthData[];
|
|
74
86
|
getColumnWidthDefined(col: number): WidthData;
|
|
75
87
|
getCellId(col: number, row: number): LayoutObjectId;
|
|
76
|
-
getHeader(col: number, row: number): HeaderData;
|
|
88
|
+
getHeader(col: number, row: number): HeaderData | SeriesNumberColumnData;
|
|
77
89
|
getHeaderField(col: number, row: number): import("../ts-types").FieldDef;
|
|
78
90
|
getHeaderCellAdressById(id: number): CellAddress | undefined;
|
|
79
91
|
getHeaderCellAddressByField(field: string): CellAddress | undefined;
|
|
80
|
-
getBody(col: number, _row: number): ColumnData;
|
|
92
|
+
getBody(col: number, _row: number): ColumnData | SeriesNumberColumnData;
|
|
81
93
|
getBodyLayoutRangeById(id: LayoutObjectId): CellRange;
|
|
82
94
|
getCellRange(col: number, row: number): CellRange;
|
|
83
95
|
private getCellRangeTranspose;
|
|
@@ -128,4 +140,5 @@ export declare class SimpleHeaderLayoutMap implements LayoutMapAPI {
|
|
|
128
140
|
col: number;
|
|
129
141
|
columnDefine: ColumnData;
|
|
130
142
|
}[];
|
|
143
|
+
_getColumnDefine(col: number, row: number): ColumnData | SeriesNumberColumnData;
|
|
131
144
|
}
|
|
@@ -4,21 +4,56 @@ import { DefaultSparklineSpec } from "../tools/global";
|
|
|
4
4
|
|
|
5
5
|
import { checkHasChart, getChartDataId } from "./chart-helper/get-chart-spec";
|
|
6
6
|
|
|
7
|
-
import { checkHasAggregation, checkHasAggregationOnBottom, checkHasAggregationOnTop } from "./layout-helper";
|
|
7
|
+
import { checkHasAggregation, checkHasAggregationOnBottom, checkHasAggregationOnTop, checkHasTreeDefine } from "./layout-helper";
|
|
8
8
|
|
|
9
9
|
import { DimensionTree } from "./tree-helper";
|
|
10
10
|
|
|
11
11
|
export class SimpleHeaderLayoutMap {
|
|
12
12
|
constructor(table, columns, showHeader, hierarchyIndent) {
|
|
13
|
-
this.seqId = 0, this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
13
|
+
this.seqId = 0, this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0,
|
|
14
|
+
this.bodyRowSpanCount = 1, this._transpose = !1, this._showHeader = !0, this._recordsCount = 0,
|
|
15
|
+
this._hasAggregation = !1, this._hasAggregationOnTopCount = 0, this._hasAggregationOnBottomCount = 0,
|
|
16
|
+
this._cellRangeMap = new Map, this._showHeader = showHeader, this._table = table,
|
|
17
|
+
this._columns = [], this._headerCellIds = [], this.hierarchyIndent = null != hierarchyIndent ? hierarchyIndent : 20,
|
|
17
18
|
this.columnTree = new DimensionTree(columns, {
|
|
18
19
|
seqId: 0
|
|
19
20
|
}), this._headerObjects = this._addHeaders(0, columns, []), this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
|
|
20
|
-
o)), {}), this.
|
|
21
|
-
this._hasAggregationOnTopCount = checkHasAggregationOnTop(this)
|
|
21
|
+
o)), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this),
|
|
22
|
+
this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this),
|
|
23
|
+
this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
24
|
+
}
|
|
25
|
+
handleRowSeriesNumber(rowSeriesNumber) {
|
|
26
|
+
var _a;
|
|
27
|
+
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber => {
|
|
28
|
+
var _a;
|
|
29
|
+
return {
|
|
30
|
+
id: this.seqId++,
|
|
31
|
+
title: seriesNumber.title,
|
|
32
|
+
define: seriesNumber,
|
|
33
|
+
cellType: null !== (_a = seriesNumber.cellType) && void 0 !== _a ? _a : "text",
|
|
34
|
+
style: seriesNumber.style,
|
|
35
|
+
width: seriesNumber.width,
|
|
36
|
+
format: seriesNumber.format,
|
|
37
|
+
field: seriesNumber.field,
|
|
38
|
+
icon: seriesNumber.icon,
|
|
39
|
+
headerIcon: seriesNumber.headerIcon,
|
|
40
|
+
isChildNode: !1
|
|
41
|
+
};
|
|
42
|
+
})) : this.rowSeriesNumberColumn = [ {
|
|
43
|
+
id: this.seqId++,
|
|
44
|
+
title: rowSeriesNumber.title,
|
|
45
|
+
define: rowSeriesNumber,
|
|
46
|
+
cellType: null !== (_a = rowSeriesNumber.cellType) && void 0 !== _a ? _a : "text",
|
|
47
|
+
style: rowSeriesNumber.style,
|
|
48
|
+
width: rowSeriesNumber.width,
|
|
49
|
+
format: rowSeriesNumber.format,
|
|
50
|
+
field: "",
|
|
51
|
+
icon: rowSeriesNumber.icon,
|
|
52
|
+
headerIcon: rowSeriesNumber.headerIcon,
|
|
53
|
+
isChildNode: !1
|
|
54
|
+
} ], this.leftRowSeriesNumberColumn = this.rowSeriesNumberColumn.filter((rowSeriesNumberItem => !0)),
|
|
55
|
+
this.rightRowSeriesNumberColumn = this.rowSeriesNumberColumn.filter((rowSeriesNumberItem => !1)),
|
|
56
|
+
this.leftRowSeriesNumberColumnCount = this.leftRowSeriesNumberColumn.length, this.rightRowSeriesNumberColumnCount = this.rightRowSeriesNumberColumn.length);
|
|
22
57
|
}
|
|
23
58
|
get transpose() {
|
|
24
59
|
return this._transpose;
|
|
@@ -32,8 +67,55 @@ export class SimpleHeaderLayoutMap {
|
|
|
32
67
|
set showHeader(_showHeader) {
|
|
33
68
|
this._showHeader = _showHeader;
|
|
34
69
|
}
|
|
70
|
+
isSeriesNumberInHeader(col, row) {
|
|
71
|
+
if (this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && row >= 0 && col < this.leftRowSeriesNumberColumnCount) {
|
|
72
|
+
if (this.transpose) return !1;
|
|
73
|
+
if (row < this.headerLevelCount) return !0;
|
|
74
|
+
}
|
|
75
|
+
if (this.rightRowSeriesNumberColumnCount > 0 && row >= 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount) {
|
|
76
|
+
if (this.transpose) return !1;
|
|
77
|
+
if (row < this.headerLevelCount) return !0;
|
|
78
|
+
}
|
|
79
|
+
return !1;
|
|
80
|
+
}
|
|
81
|
+
isSeriesNumberInBody(col, row) {
|
|
82
|
+
if (this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && col < this.leftRowSeriesNumberColumnCount) {
|
|
83
|
+
if (this.transpose) return !0;
|
|
84
|
+
if (row >= this.headerLevelCount) return !0;
|
|
85
|
+
}
|
|
86
|
+
if (this.rightRowSeriesNumberColumnCount > 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount) {
|
|
87
|
+
if (this.transpose) return !0;
|
|
88
|
+
if (row >= this.headerLevelCount) return !0;
|
|
89
|
+
}
|
|
90
|
+
return !1;
|
|
91
|
+
}
|
|
92
|
+
isSeriesNumber(col, row) {
|
|
93
|
+
return this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && row >= 0 && col < this.leftRowSeriesNumberColumnCount || this.rightRowSeriesNumberColumnCount > 0 && row >= 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount;
|
|
94
|
+
}
|
|
95
|
+
getSeriesNumberHeader(col, row) {
|
|
96
|
+
if (this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && col < this.leftRowSeriesNumberColumnCount) {
|
|
97
|
+
if (this.transpose) return;
|
|
98
|
+
if (row < this.headerLevelCount) return Object.assign({}, this.leftRowSeriesNumberColumn[col], {
|
|
99
|
+
style: this._table.internalProps.rowSeriesNumber.headerStyle
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (this.rightRowSeriesNumberColumnCount > 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount && row < this.headerLevelCount) {
|
|
103
|
+
if (this.transpose) return;
|
|
104
|
+
if (row < this.headerLevelCount) return this.rightRowSeriesNumberColumn[col - (this.colCount - this.rightRowSeriesNumberColumnCount)];
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
getSeriesNumberBody(col, row) {
|
|
108
|
+
if (this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && col < this.leftRowSeriesNumberColumnCount) {
|
|
109
|
+
if (this.transpose) return this.leftRowSeriesNumberColumn[col];
|
|
110
|
+
if (row >= this.headerLevelCount) return this.leftRowSeriesNumberColumn[col];
|
|
111
|
+
}
|
|
112
|
+
if (this.rightRowSeriesNumberColumnCount > 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount) {
|
|
113
|
+
if (this.transpose) return this.rightRowSeriesNumberColumn[col - (this.colCount - this.rightRowSeriesNumberColumnCount)];
|
|
114
|
+
if (row >= this.headerLevelCount) return this.rightRowSeriesNumberColumn[col - (this.colCount - this.rightRowSeriesNumberColumnCount)];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
35
117
|
isHeader(col, row) {
|
|
36
|
-
return !!(this.transpose && col >=
|
|
118
|
+
return !!(this.transpose && col >= this.leftRowSeriesNumberColumnCount && col < this.headerLevelCount + this.leftRowSeriesNumberColumnCount) || !this.transpose && row >= 0 && row < this.headerLevelCount;
|
|
37
119
|
}
|
|
38
120
|
isAggregation(col, row) {
|
|
39
121
|
if (this.hasAggregation) {
|
|
@@ -119,10 +201,10 @@ export class SimpleHeaderLayoutMap {
|
|
|
119
201
|
return this.isHeader(col, row) ? this.transpose ? "rowHeader" : "columnHeader" : "body";
|
|
120
202
|
}
|
|
121
203
|
isRowHeader(col, row) {
|
|
122
|
-
return !!(this.transpose && col >=
|
|
204
|
+
return !!(this.transpose && col >= this.leftRowSeriesNumberColumnCount && col < this.headerLevelCount + this.leftRowSeriesNumberColumnCount);
|
|
123
205
|
}
|
|
124
206
|
isColumnHeader(col, row) {
|
|
125
|
-
return !this.transpose && row >= 0 && row <= this.headerLevelCount - 1;
|
|
207
|
+
return !this.transpose && row >= 0 && row <= this.headerLevelCount - 1 && col >= this.leftRowSeriesNumberColumnCount && col < this.colCount - this.rightRowSeriesNumberColumnCount;
|
|
126
208
|
}
|
|
127
209
|
isFrozenColumn(col, row) {
|
|
128
210
|
if (isValid(row)) {
|
|
@@ -249,7 +331,7 @@ export class SimpleHeaderLayoutMap {
|
|
|
249
331
|
return this._table.internalProps.rightFrozenColCount ? this.colCount - this.frozenColCount >= this._table.internalProps.rightFrozenColCount ? this._table.internalProps.rightFrozenColCount : Math.max(0, this.colCount - this.frozenColCount) : 0;
|
|
250
332
|
}
|
|
251
333
|
get colCount() {
|
|
252
|
-
return this.transpose ? this.headerLevelCount + this.recordsCount : this._columns.length;
|
|
334
|
+
return this.transpose ? this.headerLevelCount + this.recordsCount + this.leftRowSeriesNumberColumnCount + this.rightRowSeriesNumberColumnCount : this._columns.length + this.leftRowSeriesNumberColumnCount + this.rightRowSeriesNumberColumnCount;
|
|
253
335
|
}
|
|
254
336
|
get rowCount() {
|
|
255
337
|
return this.transpose ? this._columns.length : this.headerLevelCount + this.recordsCount;
|
|
@@ -277,43 +359,47 @@ export class SimpleHeaderLayoutMap {
|
|
|
277
359
|
}
|
|
278
360
|
getColumnWidthDefined(col) {
|
|
279
361
|
var _a;
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
if (
|
|
283
|
-
let
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
362
|
+
if (col >= 0) {
|
|
363
|
+
if (col < this.leftRowSeriesNumberColumnCount) return this.leftRowSeriesNumberColumn[col];
|
|
364
|
+
if (this.transpose) {
|
|
365
|
+
let maxWidth, minWidth, width = 0;
|
|
366
|
+
if (col >= this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount) {
|
|
367
|
+
let isAuto;
|
|
368
|
+
return this.columnObjects.forEach(((obj, index) => {
|
|
369
|
+
"number" == typeof obj.width ? width = Math.max(obj.width, width) : "auto" === obj.width && (isAuto = !0),
|
|
370
|
+
"number" == typeof obj.minWidth && (minWidth = Math.max(obj.minWidth, minWidth)),
|
|
371
|
+
"number" == typeof obj.maxWidth && (maxWidth = Math.max(obj.maxWidth, maxWidth));
|
|
372
|
+
})), width = width > 0 ? width : isAuto ? "auto" : void 0, {
|
|
373
|
+
width: width,
|
|
374
|
+
minWidth: minWidth,
|
|
375
|
+
maxWidth: maxWidth
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
if (this.isRowHeader(col, 0)) {
|
|
379
|
+
const defaultWidth = Array.isArray(this._table.defaultHeaderColWidth) ? null !== (_a = this._table.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this._table.defaultColWidth : this._table.defaultHeaderColWidth;
|
|
380
|
+
return "auto" === defaultWidth ? {
|
|
381
|
+
width: "auto"
|
|
382
|
+
} : {
|
|
383
|
+
width: defaultWidth
|
|
384
|
+
};
|
|
385
|
+
}
|
|
301
386
|
}
|
|
387
|
+
return this._columns[col - this.leftRowSeriesNumberColumnCount];
|
|
302
388
|
}
|
|
303
|
-
return this._columns[col];
|
|
304
389
|
}
|
|
305
390
|
getCellId(col, row) {
|
|
306
391
|
var _a, _b, _c, _d;
|
|
307
|
-
return this.transpose ? this.headerLevelCount
|
|
392
|
+
return this.transpose ? col >= this.headerLevelCount + this.leftRowSeriesNumberColumnCount ? null === (_a = this._columns[row]) || void 0 === _a ? void 0 : _a.id : this.isSeriesNumber(col, row) ? row + "_series_number" : null === (_b = this._headerCellIds[col - this.leftRowSeriesNumberColumnCount]) || void 0 === _b ? void 0 : _b[row] : this.isSeriesNumber(col, row) ? this.rowSeriesNumberColumn[col].id : this.headerLevelCount <= row ? null === (_c = this._columns[col - this.leftRowSeriesNumberColumnCount]) || void 0 === _c ? void 0 : _c.id : null === (_d = this._headerCellIds[row]) || void 0 === _d ? void 0 : _d[col - this.leftRowSeriesNumberColumnCount];
|
|
308
393
|
}
|
|
309
394
|
getHeader(col, row) {
|
|
395
|
+
if (this.isSeriesNumberInHeader(col, row)) return this.getSeriesNumberHeader(col, row);
|
|
310
396
|
const id = this.getCellId(col, row);
|
|
311
397
|
return this._headerObjectMap[id];
|
|
312
398
|
}
|
|
313
399
|
getHeaderField(col, row) {
|
|
314
400
|
var _a;
|
|
315
401
|
const id = this.getCellId(col, row);
|
|
316
|
-
return (null === (_a = this._headerObjectMap[id]) || void 0 === _a ? void 0 : _a.field) || (this.transpose ? this._columns[row] && this._columns[row].field : this._columns[col] && this._columns[col].field);
|
|
402
|
+
return (null === (_a = this._headerObjectMap[id]) || void 0 === _a ? void 0 : _a.field) || (this.transpose ? this._columns[row] && this._columns[row].field : this._columns[col - this.leftRowSeriesNumberColumnCount] && this._columns[col - this.leftRowSeriesNumberColumnCount].field);
|
|
317
403
|
}
|
|
318
404
|
getHeaderCellAdressById(id) {
|
|
319
405
|
for (let i = 0; i < this._headerCellIds.length; i++) {
|
|
@@ -322,7 +408,7 @@ export class SimpleHeaderLayoutMap {
|
|
|
322
408
|
col: i,
|
|
323
409
|
row: j
|
|
324
410
|
} : {
|
|
325
|
-
col: j,
|
|
411
|
+
col: j + this.leftRowSeriesNumberColumnCount,
|
|
326
412
|
row: i
|
|
327
413
|
};
|
|
328
414
|
}
|
|
@@ -332,7 +418,7 @@ export class SimpleHeaderLayoutMap {
|
|
|
332
418
|
return this.getHeaderCellAdressById(hd.id);
|
|
333
419
|
}
|
|
334
420
|
getBody(col, _row) {
|
|
335
|
-
return this.transpose ? this._columns[_row] : this._columns[col];
|
|
421
|
+
return this.isSeriesNumber(col, _row) ? this.getSeriesNumberBody(col, _row) : this.transpose ? this._columns[_row] : this._columns[col - this.leftRowSeriesNumberColumnCount];
|
|
336
422
|
}
|
|
337
423
|
getBodyLayoutRangeById(id) {
|
|
338
424
|
var _a, _b;
|
|
@@ -347,7 +433,7 @@ export class SimpleHeaderLayoutMap {
|
|
|
347
433
|
row: row
|
|
348
434
|
}
|
|
349
435
|
};
|
|
350
|
-
} else for (let col = 0; col < (null !== (_b = this.colCount) && void 0 !== _b ? _b : 0); col++) if (id === this._columns[col].id) return {
|
|
436
|
+
} else for (let col = 0; col < (null !== (_b = this.colCount) && void 0 !== _b ? _b : 0); col++) if (id === this._columns[col - this.leftRowSeriesNumberColumnCount].id) return {
|
|
351
437
|
start: {
|
|
352
438
|
col: col,
|
|
353
439
|
row: 0
|
|
@@ -383,20 +469,20 @@ export class SimpleHeaderLayoutMap {
|
|
|
383
469
|
}
|
|
384
470
|
};
|
|
385
471
|
if (this.transpose) cellRange = this.getCellRangeTranspose(col, row); else if (this.headerLevelCount <= row) {
|
|
386
|
-
if (this.headerLevelCount <= row && (null === (_b = null === (_a = this.columnObjects[col]) || void 0 === _a ? void 0 : _a.define) || void 0 === _b ? void 0 : _b.mergeCell)) {
|
|
472
|
+
if (this.headerLevelCount <= row && (null === (_b = null === (_a = this.columnObjects[col - this.leftRowSeriesNumberColumnCount]) || void 0 === _a ? void 0 : _a.define) || void 0 === _b ? void 0 : _b.mergeCell)) {
|
|
387
473
|
const value = this._table.getCellValue(col, row);
|
|
388
474
|
for (let r = row - 1; r >= this.headerLevelCount; r--) {
|
|
389
475
|
const last_Value = this._table.getCellValue(col, r);
|
|
390
|
-
if ("boolean" == typeof this.columnObjects[col].define.mergeCell) {
|
|
476
|
+
if ("boolean" == typeof this.columnObjects[col - this.leftRowSeriesNumberColumnCount].define.mergeCell) {
|
|
391
477
|
if (value !== last_Value) break;
|
|
392
|
-
} else if (!this.columnObjects[col].define.mergeCell(value, last_Value)) break;
|
|
478
|
+
} else if (!this.columnObjects[col - this.leftRowSeriesNumberColumnCount].define.mergeCell(value, last_Value)) break;
|
|
393
479
|
cellRange.start.row = r;
|
|
394
480
|
}
|
|
395
481
|
for (let r = row + 1; r < this.rowCount; r++) {
|
|
396
482
|
const next_Value = this._table.getCellValue(col, r);
|
|
397
|
-
if ("boolean" == typeof this.columnObjects[col].define.mergeCell) {
|
|
483
|
+
if ("boolean" == typeof this.columnObjects[col - this.leftRowSeriesNumberColumnCount].define.mergeCell) {
|
|
398
484
|
if (value !== next_Value) break;
|
|
399
|
-
} else if (!this.columnObjects[col].define.mergeCell(value, next_Value)) break;
|
|
485
|
+
} else if (!this.columnObjects[col - this.leftRowSeriesNumberColumnCount].define.mergeCell(value, next_Value)) break;
|
|
400
486
|
cellRange.end.row = r;
|
|
401
487
|
}
|
|
402
488
|
}
|
|
@@ -421,10 +507,10 @@ export class SimpleHeaderLayoutMap {
|
|
|
421
507
|
row: row
|
|
422
508
|
}
|
|
423
509
|
};
|
|
424
|
-
if (this.headerLevelCount <= col || -1 === col && -1 === row) {
|
|
425
|
-
if (this.headerLevelCount <= col && (null === (_b = null === (_a = this.columnObjects[row]) || void 0 === _a ? void 0 : _a.define) || void 0 === _b ? void 0 : _b.mergeCell)) {
|
|
510
|
+
if (this.headerLevelCount + this.leftRowSeriesNumberColumnCount <= col || -1 === col && -1 === row) {
|
|
511
|
+
if (this.headerLevelCount + this.leftRowSeriesNumberColumnCount <= col && (null === (_b = null === (_a = this.columnObjects[row]) || void 0 === _a ? void 0 : _a.define) || void 0 === _b ? void 0 : _b.mergeCell)) {
|
|
426
512
|
const value = this._table.getCellValue(col, row);
|
|
427
|
-
for (let c = col - 1; c >= this.headerLevelCount; c--) {
|
|
513
|
+
for (let c = col - 1; c >= this.headerLevelCount + this.leftRowSeriesNumberColumnCount; c--) {
|
|
428
514
|
const last_Value = this._table.getCellValue(c, row);
|
|
429
515
|
if ("boolean" == typeof this.columnObjects[row].define.mergeCell) {
|
|
430
516
|
if (value !== last_Value) break;
|
|
@@ -445,7 +531,7 @@ export class SimpleHeaderLayoutMap {
|
|
|
445
531
|
for (let r = row - 1; r >= 0 && id === this.getCellId(col, r); r--) result.start.row = r;
|
|
446
532
|
for (let r = row + 1; r < (null !== (_d = this.rowCount) && void 0 !== _d ? _d : 0) && id === this.getCellId(col, r); r++) result.end.row = r;
|
|
447
533
|
for (let c = col - 1; c >= 0 && id === this.getCellId(c, row); c--) result.start.col = c;
|
|
448
|
-
for (let c = col + 1; c < this.headerLevelCount && id === this.getCellId(c, row); c++) result.end.col = c;
|
|
534
|
+
for (let c = col + 1; c < this.headerLevelCount + this.leftRowSeriesNumberColumnCount && id === this.getCellId(c, row); c++) result.end.col = c;
|
|
449
535
|
return result;
|
|
450
536
|
}
|
|
451
537
|
isCellRangeEqual(col, row, targetCol, targetRow) {
|
|
@@ -495,7 +581,8 @@ export class SimpleHeaderLayoutMap {
|
|
|
495
581
|
define: colDef,
|
|
496
582
|
columnWidthComputeMode: colDef.columnWidthComputeMode,
|
|
497
583
|
disableColumnResize: null == colDef ? void 0 : colDef.disableColumnResize,
|
|
498
|
-
aggregation: this._getAggregationForColumn(colDef, col)
|
|
584
|
+
aggregation: this._getAggregationForColumn(colDef, col),
|
|
585
|
+
isChildNode: row >= 1
|
|
499
586
|
});
|
|
500
587
|
for (let r = row + 1; r < this._headerCellIds.length; r++) this._headerCellIds[r][col] = id;
|
|
501
588
|
}
|
|
@@ -525,11 +612,12 @@ export class SimpleHeaderLayoutMap {
|
|
|
525
612
|
return newRow;
|
|
526
613
|
}
|
|
527
614
|
getCellHeaderPaths(col, row) {
|
|
615
|
+
if (this.isSeriesNumber(col, row)) return;
|
|
528
616
|
let colPath = [], rowPath = [];
|
|
529
617
|
return this.transpose ? rowPath = [ {
|
|
530
618
|
field: this._columns[row].field
|
|
531
619
|
} ] : colPath = [ {
|
|
532
|
-
field: this._columns[col].field
|
|
620
|
+
field: this._columns[col - this.leftRowSeriesNumberColumnCount].field
|
|
533
621
|
} ], {
|
|
534
622
|
colHeaderPaths: colPath,
|
|
535
623
|
rowHeaderPaths: rowPath,
|
|
@@ -537,10 +625,20 @@ export class SimpleHeaderLayoutMap {
|
|
|
537
625
|
};
|
|
538
626
|
}
|
|
539
627
|
getParentCellId(col, row) {
|
|
540
|
-
if (0 !== row)
|
|
628
|
+
if (0 !== row) {
|
|
629
|
+
if (this.isColumnHeader(col, row)) return this.getCellId(col, row - 1);
|
|
630
|
+
if (this.isRowHeader(col, row)) {
|
|
631
|
+
if (this.isSeriesNumberInBody(col - 1, row)) return;
|
|
632
|
+
return this.getCellId(col - 1, row);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
541
635
|
}
|
|
542
636
|
canMoveHeaderPosition(source, target) {
|
|
543
|
-
if (
|
|
637
|
+
if (this.isSeriesNumberInHeader(target.col, target.row) || this.isSeriesNumberInHeader(source.col, source.row)) return !1;
|
|
638
|
+
if (!this.transpose && this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row)) return !0;
|
|
639
|
+
if (this.transpose && this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row) && (this._getColumnDefine(source.col + this.leftRowSeriesNumberColumnCount, source.row).isChildNode && this._getColumnDefine(target.col + this.leftRowSeriesNumberColumnCount, target.row).isChildNode ? (source.col = source.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1,
|
|
640
|
+
target.col = target.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1) : (source.col = source.col + this.leftRowSeriesNumberColumnCount,
|
|
641
|
+
target.col = target.col + this.leftRowSeriesNumberColumnCount)), source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) return !1;
|
|
544
642
|
if ("disabled" === this._table.internalProps.frozenColDragHeaderMode && (this._table.isFrozenColumn(target.col) || this._table.isRightFrozenColumn(target.col))) return !1;
|
|
545
643
|
const sourceCellRange = this.getCellRange(source.col, source.row);
|
|
546
644
|
if (this.isColumnHeader(source.col, source.row)) {
|
|
@@ -553,7 +651,7 @@ export class SimpleHeaderLayoutMap {
|
|
|
553
651
|
}
|
|
554
652
|
moveHeaderPosition(source, target) {
|
|
555
653
|
if (this.canMoveHeaderPosition(source, target)) {
|
|
556
|
-
|
|
654
|
+
let sourceCellRange = this.getCellRange(source.col, source.row);
|
|
557
655
|
if (this.isColumnHeader(source.col, source.row)) {
|
|
558
656
|
const sourceSize = sourceCellRange.end.col - sourceCellRange.start.col + 1;
|
|
559
657
|
let targetIndex;
|
|
@@ -561,12 +659,12 @@ export class SimpleHeaderLayoutMap {
|
|
|
561
659
|
if (targetIndex = target.col >= source.col ? targetCellRange.end.col - sourceSize + 1 : targetCellRange.start.col,
|
|
562
660
|
targetIndex === sourceCellRange.start.col) return null;
|
|
563
661
|
for (let row = 0; row < this._headerCellIds.length; row++) {
|
|
564
|
-
const sourceIds = this._headerCellIds[row].splice(sourceCellRange.start.col, sourceSize);
|
|
565
|
-
sourceIds.unshift(targetIndex, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
662
|
+
const sourceIds = this._headerCellIds[row].splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
663
|
+
sourceIds.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
566
664
|
}
|
|
567
|
-
const sourceColumns = this._columns.splice(sourceCellRange.start.col, sourceSize);
|
|
568
|
-
return sourceColumns.unshift(targetIndex
|
|
569
|
-
this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col, targetIndex),
|
|
665
|
+
const sourceColumns = this._columns.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
666
|
+
return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0),
|
|
667
|
+
Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount),
|
|
570
668
|
this.columnTree.reset(this.columnTree.tree.children, !0), this._cellRangeMap = new Map,
|
|
571
669
|
{
|
|
572
670
|
sourceIndex: sourceCellRange.start.col,
|
|
@@ -576,7 +674,8 @@ export class SimpleHeaderLayoutMap {
|
|
|
576
674
|
moveType: "column"
|
|
577
675
|
};
|
|
578
676
|
}
|
|
579
|
-
if (this.isRowHeader(source.col, source.row)) {
|
|
677
|
+
if (this.isRowHeader(source.col, source.row) || this.isSeriesNumberInBody(source.col, source.row) && this.transpose) {
|
|
678
|
+
this.isSeriesNumberInBody(source.col, source.row) && (sourceCellRange = this.getCellRange(source.col + this.leftRowSeriesNumberColumnCount, source.row));
|
|
580
679
|
const sourceSize = sourceCellRange.end.row - sourceCellRange.start.row + 1;
|
|
581
680
|
let targetIndex;
|
|
582
681
|
const targetCellRange = this.getCellRange(sourceCellRange.start.col, target.row);
|
|
@@ -588,7 +687,7 @@ export class SimpleHeaderLayoutMap {
|
|
|
588
687
|
}
|
|
589
688
|
const sourceColumns = this._columns.splice(sourceCellRange.start.row, sourceSize);
|
|
590
689
|
return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns),
|
|
591
|
-
this.columnTree.movePosition(sourceCellRange.start.col, sourceCellRange.start.row, targetIndex),
|
|
690
|
+
this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)),
|
|
592
691
|
this.columnTree.reset(this.columnTree.tree.children, !0), this._cellRangeMap = new Map,
|
|
593
692
|
{
|
|
594
693
|
sourceIndex: sourceCellRange.start.row,
|
|
@@ -598,6 +697,13 @@ export class SimpleHeaderLayoutMap {
|
|
|
598
697
|
moveType: "row"
|
|
599
698
|
};
|
|
600
699
|
}
|
|
700
|
+
if (this.isSeriesNumberInBody(source.col, source.row)) return {
|
|
701
|
+
sourceIndex: source.row,
|
|
702
|
+
targetIndex: target.row,
|
|
703
|
+
sourceSize: 1,
|
|
704
|
+
targetSize: 1,
|
|
705
|
+
moveType: "row"
|
|
706
|
+
};
|
|
601
707
|
}
|
|
602
708
|
return null;
|
|
603
709
|
}
|
|
@@ -614,11 +720,11 @@ export class SimpleHeaderLayoutMap {
|
|
|
614
720
|
};
|
|
615
721
|
}
|
|
616
722
|
setChartInstance(_col, _row, chartInstance) {
|
|
617
|
-
const columnObj = this.transpose ? this._columns[_row] : this._columns[_col];
|
|
723
|
+
const columnObj = this.transpose ? this._columns[_row] : this._columns[_col - this.leftRowSeriesNumberColumnCount];
|
|
618
724
|
"function" != typeof columnObj.chartSpec && (columnObj.chartInstance = chartInstance);
|
|
619
725
|
}
|
|
620
726
|
getChartInstance(_col, _row) {
|
|
621
|
-
return (this.transpose ? this._columns[_row] : this._columns[_col]).chartInstance;
|
|
727
|
+
return (this.transpose ? this._columns[_row] : this._columns[_col - this.leftRowSeriesNumberColumnCount]).chartInstance;
|
|
622
728
|
}
|
|
623
729
|
checkHasChart() {
|
|
624
730
|
return checkHasChart(this);
|
|
@@ -678,5 +784,8 @@ export class SimpleHeaderLayoutMap {
|
|
|
678
784
|
columnDefine: cur
|
|
679
785
|
}), pre)), []);
|
|
680
786
|
}
|
|
787
|
+
_getColumnDefine(col, row) {
|
|
788
|
+
if (col >= 0) return col < this.leftRowSeriesNumberColumnCount ? this.leftRowSeriesNumberColumn[col] : this.transpose ? this._columns[row] : this._columns[col - this.leftRowSeriesNumberColumnCount];
|
|
789
|
+
}
|
|
681
790
|
}
|
|
682
791
|
//# sourceMappingURL=simple-header-layout.js.map
|