@visactor/vtable 0.9.3-alpha.6 → 0.10.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 -1
- package/cjs/ListTable.js +9 -7
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +6 -5
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +7 -5
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.d.ts +1 -0
- package/cjs/components/axis/axis.js +10 -1
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.js +13 -9
- package/cjs/components/axis/get-axis-component-size.js.map +1 -1
- package/cjs/components/legend/legend.js +5 -3
- package/cjs/components/legend/legend.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +8 -5
- package/cjs/core/BaseTable.js +40 -27
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/drill.d.ts +2 -0
- package/cjs/event/drill.js +15 -2
- package/cjs/event/drill.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/listener/scroll-bar.js +2 -0
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/pivot-chart/axis-click.js +3 -2
- package/cjs/event/pivot-chart/axis-click.js.map +1 -1
- package/cjs/event/scroll.js +8 -4
- package/cjs/event/scroll.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/chart-helper/get-axis-config.js +5 -5
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +2 -2
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-layout.js +4 -2
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/render/layout/text.js +1 -0
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.d.ts +8 -0
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +66 -0
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/chart-render.js +9 -35
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +6 -3
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/text.js +6 -4
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +2 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +3 -3
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.d.ts +2 -0
- package/cjs/scenegraph/group-creater/init-scenegraph.js +61 -0
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +7 -2
- 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 +12 -21
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +36 -44
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +5 -19
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js +37 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/util.d.ts +8 -0
- package/cjs/scenegraph/group-creater/progress/update-position/util.js +70 -0
- package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -0
- package/cjs/scenegraph/layout/compute-col-width.js +5 -3
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.d.ts +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +26 -13
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.d.ts +2 -0
- package/cjs/scenegraph/layout/frozen.js +139 -6
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +2 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +45 -66
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +8 -6
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +9 -4
- package/cjs/scenegraph/scenegraph.js +39 -102
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/style/corner-cell.d.ts +2 -2
- package/cjs/scenegraph/style/corner-cell.js +8 -9
- package/cjs/scenegraph/style/corner-cell.js.map +1 -1
- package/cjs/scenegraph/utils/measure-text.js +9 -8
- package/cjs/scenegraph/utils/measure-text.js.map +1 -1
- package/cjs/state/hover/update-position.js +1 -1
- package/cjs/state/hover/update-position.js.map +1 -1
- package/cjs/state/state.d.ts +1 -0
- package/cjs/state/state.js +4 -2
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +10 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +1244 -790
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.d.ts +2 -1
- package/es/ListTable.js +9 -7
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +6 -5
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +7 -5
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.d.ts +1 -0
- package/es/components/axis/axis.js +10 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/get-axis-component-size.js +13 -9
- package/es/components/axis/get-axis-component-size.js.map +1 -1
- package/es/components/legend/legend.js +5 -3
- package/es/components/legend/legend.js.map +1 -1
- package/es/core/BaseTable.d.ts +8 -5
- package/es/core/BaseTable.js +34 -20
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/drill.d.ts +2 -0
- package/es/event/drill.js +13 -0
- package/es/event/drill.js.map +1 -1
- package/es/event/event.js +3 -3
- 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/listener/scroll-bar.js +2 -0
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/pivot-chart/axis-click.js +3 -2
- package/es/event/pivot-chart/axis-click.js.map +1 -1
- package/es/event/scroll.js +4 -1
- package/es/event/scroll.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/chart-helper/get-axis-config.js +5 -5
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +2 -2
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-layout.js +4 -2
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/render/layout/text.js +1 -0
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.d.ts +8 -0
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +61 -0
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -0
- package/es/scenegraph/graphic/contributions/chart-render.js +9 -34
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +7 -2
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/text.js +6 -4
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +3 -3
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.d.ts +2 -0
- package/es/scenegraph/group-creater/init-scenegraph.js +55 -0
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -0
- 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.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +13 -18
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +37 -44
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -22
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js +29 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/util.d.ts +8 -0
- package/es/scenegraph/group-creater/progress/update-position/util.js +60 -0
- package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -0
- package/es/scenegraph/layout/compute-col-width.js +4 -2
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.d.ts +1 -1
- package/es/scenegraph/layout/compute-row-height.js +26 -13
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/frozen.d.ts +2 -0
- package/es/scenegraph/layout/frozen.js +137 -3
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +2 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +45 -66
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +9 -5
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +9 -4
- package/es/scenegraph/scenegraph.js +39 -104
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/style/corner-cell.d.ts +2 -2
- package/es/scenegraph/style/corner-cell.js +4 -7
- package/es/scenegraph/style/corner-cell.js.map +1 -1
- package/es/scenegraph/utils/measure-text.js +10 -9
- package/es/scenegraph/utils/measure-text.js.map +1 -1
- package/es/state/hover/update-position.js +1 -1
- package/es/state/hover/update-position.js.map +1 -1
- package/es/state/state.d.ts +1 -0
- package/es/state/state.js +5 -1
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +10 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IStage, IRect } from '@visactor/vrender';
|
|
2
2
|
import { type CellAddress, type CellType, type ColumnIconOption, type SortOrder, IconFuncTypeEnum } from '../ts-types';
|
|
3
|
-
import { Group } from './graphic/group';
|
|
3
|
+
import type { Group } from './graphic/group';
|
|
4
4
|
import type { Icon } from './graphic/icon';
|
|
5
5
|
import { TableComponent } from './component/table-component';
|
|
6
6
|
import { SceneProxy } from './group-creater/progress/proxy';
|
|
@@ -20,9 +20,9 @@ export declare class Scenegraph {
|
|
|
20
20
|
bodyGroup: Group;
|
|
21
21
|
rightFrozenGroup: Group;
|
|
22
22
|
bottomFrozenGroup: Group;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
rightTopCornerGroup: Group;
|
|
24
|
+
leftBottomCornerGroup: Group;
|
|
25
|
+
rightBottomCornerGroup: Group;
|
|
26
26
|
componentGroup: Group;
|
|
27
27
|
selectedRangeComponents: Map<string, {
|
|
28
28
|
rect: IRect;
|
|
@@ -61,6 +61,9 @@ export declare class Scenegraph {
|
|
|
61
61
|
highPerformanceGetCell(col: number, row: number, getShadow?: boolean): Group;
|
|
62
62
|
getColGroup(col: number, isCornerOrColHeader?: boolean): Group;
|
|
63
63
|
getColGroupInBottom(col: number): Group | undefined;
|
|
64
|
+
getColGroupInLeftBottomCorner(col: number): Group | undefined;
|
|
65
|
+
getColGroupInRightTopCorner(col: number): Group | undefined;
|
|
66
|
+
getColGroupInRightBottomCorner(col: number): Group | undefined;
|
|
64
67
|
getCellSize(col: number, row: number): {
|
|
65
68
|
width: number;
|
|
66
69
|
height: number;
|
|
@@ -116,6 +119,8 @@ export declare class Scenegraph {
|
|
|
116
119
|
};
|
|
117
120
|
updateIcon(icon: Icon, iconConfig: ColumnIconOption): void;
|
|
118
121
|
updateFrozen(): void;
|
|
122
|
+
dealWidthRightFrozen(rightFrozenColCount: number): void;
|
|
123
|
+
dealWidthBottomFrozen(bottomFrozenRowCount: number): void;
|
|
119
124
|
updateBorderSizeAndPosition(): void;
|
|
120
125
|
updateSortIcon(col: number, row: number, iconMark: Icon, order: SortOrder, oldSortCol: number, oldSortRow: number, oldIconMark: Icon | undefined): void;
|
|
121
126
|
updateFrozenIcon(col: number, oldFrozenCol: number): void;
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
10
|
value: !0
|
|
11
11
|
}), exports.Scenegraph = void 0;
|
|
12
12
|
|
|
13
|
-
const vrender_1 = require("@visactor/vrender"), ts_types_1 = require("../ts-types"), vutils_1 = require("@visactor/vutils"),
|
|
13
|
+
const vrender_1 = require("@visactor/vrender"), ts_types_1 = require("../ts-types"), vutils_1 = require("@visactor/vutils"), get_cell_merge_1 = require("./utils/get-cell-merge"), update_width_1 = require("./layout/update-width"), table_component_1 = require("./component/table-component"), update_height_1 = require("./layout/update-height"), image_cell_1 = require("./group-creater/cell-type/image-cell"), padding_1 = require("./utils/padding"), frame_border_1 = require("./style/frame-border"), global_1 = require("../tools/global"), contributions_1 = __importDefault(require("./graphic/contributions")), get_prop_1 = require("./utils/get-prop"), text_icon_layout_1 = require("./utils/text-icon-layout"), proxy_1 = require("./group-creater/progress/proxy"), compute_col_width_1 = require("./layout/compute-col-width"), move_cell_1 = require("./layout/move-cell"), cell_helper_1 = require("./group-creater/cell-helper"), update_select_border_1 = require("./select/update-select-border"), create_select_border_1 = require("./select/create-select-border"), move_select_border_1 = require("./select/move-select-border"), delete_select_border_1 = require("./select/delete-select-border"), update_row_1 = require("./layout/update-row"), stick_text_1 = require("./stick-text"), compute_row_height_1 = require("./layout/compute-row-height"), empty_group_1 = require("./utils/empty-group"), frozen_1 = require("./layout/frozen"), update_chart_1 = require("./refresh-node/update-chart"), init_scenegraph_1 = require("./group-creater/init-scenegraph");
|
|
14
14
|
|
|
15
15
|
vrender_1.container.load(contributions_1.default);
|
|
16
16
|
|
|
@@ -58,94 +58,14 @@ class Scenegraph {
|
|
|
58
58
|
return this.transpose || this.isPivot ? this.table.rowCount - 1 : null !== (_a = this.proxy.rowEnd) && void 0 !== _a ? _a : 0;
|
|
59
59
|
}
|
|
60
60
|
initSceneGraph() {
|
|
61
|
-
this.isPivot = this.table.isPivotTable(), this.transpose = this.table.options.transpose
|
|
62
|
-
|
|
63
|
-
this.tableGroup = new group_1.Group({
|
|
64
|
-
x: 0,
|
|
65
|
-
y: 0,
|
|
66
|
-
width: width,
|
|
67
|
-
height: height,
|
|
68
|
-
clip: !0,
|
|
69
|
-
pickable: !1
|
|
70
|
-
}), this.tableGroup.role = "table";
|
|
71
|
-
const colHeaderGroup = new group_1.Group({
|
|
72
|
-
x: 0,
|
|
73
|
-
y: 0,
|
|
74
|
-
width: 0,
|
|
75
|
-
height: 0,
|
|
76
|
-
clip: !1,
|
|
77
|
-
pickable: !1
|
|
78
|
-
});
|
|
79
|
-
colHeaderGroup.role = "col-header", this.colHeaderGroup = colHeaderGroup;
|
|
80
|
-
const cornerHeaderGroup = new group_1.Group({
|
|
81
|
-
x: 0,
|
|
82
|
-
y: 0,
|
|
83
|
-
width: 0,
|
|
84
|
-
height: 0,
|
|
85
|
-
clip: !1,
|
|
86
|
-
pickable: !1
|
|
87
|
-
});
|
|
88
|
-
cornerHeaderGroup.role = "corner-header", this.cornerHeaderGroup = cornerHeaderGroup;
|
|
89
|
-
const rowHeaderGroup = new group_1.Group({
|
|
90
|
-
x: 0,
|
|
91
|
-
y: 0,
|
|
92
|
-
width: 0,
|
|
93
|
-
height: 0,
|
|
94
|
-
clip: !1,
|
|
95
|
-
pickable: !1
|
|
96
|
-
});
|
|
97
|
-
rowHeaderGroup.role = "row-header", this.rowHeaderGroup = rowHeaderGroup;
|
|
98
|
-
const bodyGroup = new group_1.Group({
|
|
99
|
-
x: 0,
|
|
100
|
-
y: 0,
|
|
101
|
-
width: width,
|
|
102
|
-
height: 0,
|
|
103
|
-
clip: !1,
|
|
104
|
-
pickable: !1
|
|
105
|
-
});
|
|
106
|
-
bodyGroup.role = "body", this.bodyGroup = bodyGroup;
|
|
107
|
-
const rightFrozenGroup = new group_1.Group({
|
|
108
|
-
x: 0,
|
|
109
|
-
y: 0,
|
|
110
|
-
width: width,
|
|
111
|
-
height: 0,
|
|
112
|
-
clip: !1,
|
|
113
|
-
pickable: !1
|
|
114
|
-
});
|
|
115
|
-
rightFrozenGroup.role = "right-frozen", this.rightFrozenGroup = rightFrozenGroup;
|
|
116
|
-
const bottomFrozenGroup = new group_1.Group({
|
|
117
|
-
x: 0,
|
|
118
|
-
y: 0,
|
|
119
|
-
width: width,
|
|
120
|
-
height: 0,
|
|
121
|
-
clip: !1,
|
|
122
|
-
pickable: !1
|
|
123
|
-
});
|
|
124
|
-
bottomFrozenGroup.role = "bottom-frozen", this.bottomFrozenGroup = bottomFrozenGroup;
|
|
125
|
-
const componentGroup = new group_1.Group({
|
|
126
|
-
x: 0,
|
|
127
|
-
y: 0,
|
|
128
|
-
width: 0,
|
|
129
|
-
height: 0,
|
|
130
|
-
clip: !1,
|
|
131
|
-
pickable: !1,
|
|
132
|
-
childrenPickable: !0
|
|
133
|
-
});
|
|
134
|
-
componentGroup.role = "component", this.componentGroup = componentGroup, this.rightTopCellGroup = (0,
|
|
135
|
-
corner_cell_1.createCornerCell)(this.table.theme.cornerRightTopCellStyle || this.table.theme.cornerHeaderStyle),
|
|
136
|
-
this.leftBottomCellGroup = (0, corner_cell_1.createCornerCell)(this.table.theme.cornerLeftBottomCellStyle || this.table.theme.cornerHeaderStyle),
|
|
137
|
-
this.rightBottomCellGroup = (0, corner_cell_1.createCornerCell)(this.table.theme.cornerRightBottomCellStyle || this.table.theme.cornerHeaderStyle),
|
|
138
|
-
this.tableGroup.addChild(bodyGroup), this.tableGroup.addChild(rightFrozenGroup),
|
|
139
|
-
this.tableGroup.addChild(bottomFrozenGroup), this.tableGroup.addChild(rowHeaderGroup),
|
|
140
|
-
this.tableGroup.addChild(colHeaderGroup), this.tableGroup.addChild(this.rightBottomCellGroup),
|
|
141
|
-
this.tableGroup.addChild(this.rightTopCellGroup), this.tableGroup.addChild(this.leftBottomCellGroup),
|
|
142
|
-
this.tableGroup.addChild(cornerHeaderGroup), this.tableGroup.addChild(componentGroup);
|
|
61
|
+
this.isPivot = this.table.isPivotTable(), this.transpose = this.table.options.transpose,
|
|
62
|
+
(0, init_scenegraph_1.initSceneGraph)(this);
|
|
143
63
|
}
|
|
144
64
|
clearCells() {
|
|
145
65
|
this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
|
|
146
66
|
this.rowHeaderGroup.clear(), this.cornerHeaderGroup.clear(), this.bodyGroup.clear(),
|
|
147
|
-
this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.
|
|
148
|
-
this.
|
|
67
|
+
this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.rightTopCornerGroup.clear(),
|
|
68
|
+
this.rightBottomCornerGroup.clear(), this.leftBottomCornerGroup.clear(), this.colHeaderGroup.setAttributes({
|
|
149
69
|
x: 0,
|
|
150
70
|
y: 0,
|
|
151
71
|
width: 0,
|
|
@@ -175,19 +95,19 @@ class Scenegraph {
|
|
|
175
95
|
y: 0,
|
|
176
96
|
width: 0,
|
|
177
97
|
height: 0
|
|
178
|
-
}), this.
|
|
98
|
+
}), this.rightTopCornerGroup.setAttributes({
|
|
179
99
|
x: 0,
|
|
180
100
|
y: 0,
|
|
181
101
|
width: 0,
|
|
182
102
|
height: 0,
|
|
183
103
|
visible: !1
|
|
184
|
-
}), this.
|
|
104
|
+
}), this.leftBottomCornerGroup.setAttributes({
|
|
185
105
|
x: 0,
|
|
186
106
|
y: 0,
|
|
187
107
|
width: 0,
|
|
188
108
|
height: 0,
|
|
189
109
|
visible: !1
|
|
190
|
-
}), this.
|
|
110
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
191
111
|
x: 0,
|
|
192
112
|
y: 0,
|
|
193
113
|
width: 0,
|
|
@@ -230,9 +150,9 @@ class Scenegraph {
|
|
|
230
150
|
element || void 0;
|
|
231
151
|
}
|
|
232
152
|
getCell(col, row, getShadow) {
|
|
233
|
-
var _a, _b, _c;
|
|
153
|
+
var _a, _b, _c, _d, _e, _f;
|
|
234
154
|
let cell;
|
|
235
|
-
if (cell = this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? null === (
|
|
155
|
+
if (cell = this.table.rightFrozenColCount > 0 && col >= this.table.colCount - this.table.rightFrozenColCount && row < this.table.frozenRowCount ? null === (_a = this.rightBottomCornerGroup.getColGroup(col)) || void 0 === _a ? void 0 : _a.getRowGroup(row) : this.table.bottomFrozenRowCount > 0 && row >= this.table.rowCount - this.table.bottomFrozenRowCount && col < this.table.frozenColCount ? null === (_b = this.leftBottomCornerGroup.getColGroup(col)) || void 0 === _b ? void 0 : _b.getRowGroup(row) : this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && col >= this.table.colCount - this.table.rightFrozenColCount && row >= this.table.rowCount - this.table.bottomFrozenRowCount ? null === (_c = this.rightBottomCornerGroup.getColGroup(col)) || void 0 === _c ? void 0 : _c.getRowGroup(row) : this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? null === (_d = this.rightFrozenGroup.getColGroup(col)) || void 0 === _d ? void 0 : _d.getRowGroup(row) : this.table.bottomFrozenRowCount > 0 && row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount ? null === (_e = this.bottomFrozenGroup.getColGroup(col)) || void 0 === _e ? void 0 : _e.getRowGroup(row) : null === (_f = this.getColGroup(col, row < this.frozenRowCount)) || void 0 === _f ? void 0 : _f.getRowGroup(row),
|
|
236
156
|
cell && "shadow-cell" === cell.role && !getShadow) {
|
|
237
157
|
const range = this.table.getCellRange(col, row);
|
|
238
158
|
range.start.col === col && range.start.row === row || (cell = this.getCell(range.start.col, range.start.row));
|
|
@@ -250,6 +170,15 @@ class Scenegraph {
|
|
|
250
170
|
getColGroupInBottom(col) {
|
|
251
171
|
if (this.table.bottomFrozenRowCount > 0) return this.bottomFrozenGroup.getColGroup(col);
|
|
252
172
|
}
|
|
173
|
+
getColGroupInLeftBottomCorner(col) {
|
|
174
|
+
if (this.table.bottomFrozenRowCount > 0) return this.leftBottomCornerGroup.getColGroup(col);
|
|
175
|
+
}
|
|
176
|
+
getColGroupInRightTopCorner(col) {
|
|
177
|
+
if (this.table.rightFrozenColCount > 0) return this.rightTopCornerGroup.getColGroup(col);
|
|
178
|
+
}
|
|
179
|
+
getColGroupInRightBottomCorner(col) {
|
|
180
|
+
if (this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0) return this.rightBottomCornerGroup.getColGroup(col);
|
|
181
|
+
}
|
|
253
182
|
getCellSize(col, row) {
|
|
254
183
|
const cell = this.getCell(col, row), mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(this.table, col, row);
|
|
255
184
|
let width = cell.attribute.width, height = cell.attribute.height;
|
|
@@ -386,36 +315,36 @@ class Scenegraph {
|
|
|
386
315
|
(0, compute_row_height_1.computeRowsHeight)(this.table, 0, this.table.rowCount - 1);
|
|
387
316
|
}
|
|
388
317
|
resize() {
|
|
389
|
-
this.recalculateColWidths(),
|
|
390
|
-
this.
|
|
391
|
-
this.
|
|
318
|
+
this.recalculateColWidths(), this.recalculateRowHeights(), this.dealWidthMode(),
|
|
319
|
+
this.dealHeightMode(), this.dealFrozen(), this.updateTableSize(), this.updateBorderSizeAndPosition(),
|
|
320
|
+
this.component.updateScrollBar(), "adaptive" !== this.table.widthMode && "adaptive" !== this.table.heightMode || this.updateChartSize(this.table.rowHeaderLevelCount),
|
|
392
321
|
this.updateNextFrame();
|
|
393
322
|
}
|
|
394
323
|
updateTableSize() {
|
|
395
324
|
var _a, _b;
|
|
396
325
|
this.tableGroup.setAttributes({
|
|
397
|
-
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) + this.
|
|
326
|
+
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) + this.rightBottomCornerGroup.attribute.width),
|
|
398
327
|
height: Math.min(this.table.tableNoFrameHeight, (null !== (_a = this.colHeaderGroup.attribute.height) && void 0 !== _a ? _a : 0) + (null !== (_b = this.bodyGroup.attribute.height) && void 0 !== _b ? _b : 0) + this.bottomFrozenGroup.attribute.height)
|
|
399
328
|
}), this.tableGroup.border && this.tableGroup.border.setAttributes({
|
|
400
329
|
width: this.tableGroup.attribute.width + this.tableGroup.border.attribute.lineWidth,
|
|
401
330
|
height: this.tableGroup.attribute.height + this.tableGroup.border.attribute.lineWidth
|
|
402
331
|
}), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("y", this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height),
|
|
403
|
-
this.
|
|
332
|
+
this.leftBottomCornerGroup.setAttributes({
|
|
404
333
|
visible: !0,
|
|
405
334
|
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
406
335
|
height: this.bottomFrozenGroup.attribute.height,
|
|
407
336
|
width: this.table.getFrozenColsWidth()
|
|
408
|
-
}), this.
|
|
337
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
409
338
|
visible: !0,
|
|
410
339
|
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
411
340
|
height: this.bottomFrozenGroup.attribute.height
|
|
412
341
|
})), this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("x", this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width),
|
|
413
|
-
this.
|
|
342
|
+
this.rightTopCornerGroup.setAttributes({
|
|
414
343
|
visible: !0,
|
|
415
344
|
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
416
345
|
width: this.rightFrozenGroup.attribute.width,
|
|
417
346
|
height: this.table.getFrozenRowsHeight()
|
|
418
|
-
}), this.
|
|
347
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
419
348
|
visible: !0,
|
|
420
349
|
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
421
350
|
width: this.rightFrozenGroup.attribute.width
|
|
@@ -431,8 +360,9 @@ class Scenegraph {
|
|
|
431
360
|
this.updateNextFrame();
|
|
432
361
|
}
|
|
433
362
|
updateContainerHeight(row, detaY) {
|
|
434
|
-
row < this.frozenRowCount ? (this.colHeaderGroup.setDeltaHeight(detaY), this.cornerHeaderGroup.setDeltaHeight(detaY),
|
|
435
|
-
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY)) : (this.
|
|
363
|
+
row < this.table.frozenRowCount ? (this.colHeaderGroup.setDeltaHeight(detaY), this.cornerHeaderGroup.setDeltaHeight(detaY),
|
|
364
|
+
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY)) : row >= this.table.rowCount - this.table.bottomFrozenRowCount ? (this.leftBottomCornerGroup.setDeltaHeight(detaY),
|
|
365
|
+
this.bottomFrozenGroup.setDeltaHeight(detaY), this.rightBottomCornerGroup.setDeltaHeight(detaY)) : (this.rowHeaderGroup.setDeltaHeight(detaY),
|
|
436
366
|
this.bodyGroup.setDeltaHeight(detaY)), this.updateTableSize(), this.component.updateScrollBar(),
|
|
437
367
|
this.updateNextFrame();
|
|
438
368
|
}
|
|
@@ -622,6 +552,14 @@ class Scenegraph {
|
|
|
622
552
|
updateFrozen() {
|
|
623
553
|
this.clear || (this.resetFrozen(), this.dealFrozen(), this.component.updateScrollBar());
|
|
624
554
|
}
|
|
555
|
+
dealWidthRightFrozen(rightFrozenColCount) {
|
|
556
|
+
this.clear ? this.table.internalProps.rightFrozenColCount = rightFrozenColCount : (0,
|
|
557
|
+
frozen_1.dealRightFrozen)(rightFrozenColCount, this);
|
|
558
|
+
}
|
|
559
|
+
dealWidthBottomFrozen(bottomFrozenRowCount) {
|
|
560
|
+
this.clear ? this.table.internalProps.bottomFrozenRowCount = bottomFrozenRowCount : (0,
|
|
561
|
+
frozen_1.dealBottomFrozen)(bottomFrozenRowCount, this);
|
|
562
|
+
}
|
|
625
563
|
updateBorderSizeAndPosition() {
|
|
626
564
|
this.bodyGroup.border && (this.bodyGroup.appendChild(this.bodyGroup.border), (0,
|
|
627
565
|
frame_border_1.updateFrameBorderSize)(this.bodyGroup), 0 === this.rowHeaderGroup.attribute.width ? (0,
|
|
@@ -700,8 +638,7 @@ class Scenegraph {
|
|
|
700
638
|
}
|
|
701
639
|
updateRow(removeCells, addCells) {
|
|
702
640
|
(0, update_row_1.updateRow)(removeCells, addCells, this.table), this.recalculateColWidths(),
|
|
703
|
-
|
|
704
|
-
this.updateNextFrame();
|
|
641
|
+
this.recalculateRowHeights(), this.table.stateManeger.checkFrozen(), this.updateNextFrame();
|
|
705
642
|
}
|
|
706
643
|
findAndUpdateIcon(group, funcTypeArr, iconConfig) {
|
|
707
644
|
group.forEachChildren((icon => {
|