@visactor/vtable 0.9.3-alpha.7 → 0.10.1-alpha.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 +1 -2
- package/cjs/ListTable.js +8 -10
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +10 -8
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +10 -7
- 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/legend/legend.js +5 -3
- package/cjs/components/legend/legend.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +2 -0
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -2
- package/cjs/core/BaseTable.js +35 -18
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/drill.d.ts +2 -0
- package/cjs/event/drill.js +17 -2
- package/cjs/event/drill.js.map +1 -1
- package/cjs/event/event.js +3 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +19 -9
- package/cjs/event/listener/table-group.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/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-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +28 -4
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.js +4 -2
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +3 -3
- package/cjs/scenegraph/component/table-component.js +6 -6
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -1
- package/cjs/scenegraph/component/util.js +2 -1
- package/cjs/scenegraph/component/util.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/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 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js +9 -5
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +35 -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 +3 -17
- 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/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 +44 -64
- 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 +10 -4
- package/cjs/scenegraph/scenegraph.js +53 -117
- 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/update-container.d.ts +2 -0
- package/cjs/scenegraph/utils/update-container.js +13 -0
- package/cjs/scenegraph/utils/update-container.js.map +1 -0
- package/cjs/state/hover/update-position.js +1 -1
- package/cjs/state/hover/update-position.js.map +1 -1
- package/cjs/state/resize/update-resize-column.d.ts +2 -0
- package/cjs/state/resize/update-resize-column.js +72 -0
- package/cjs/state/resize/update-resize-column.js.map +1 -0
- package/cjs/state/sort/index.js +4 -2
- package/cjs/state/sort/index.js.map +1 -1
- package/cjs/state/state.d.ts +2 -1
- package/cjs/state/state.js +5 -24
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +8 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +1 -1
- package/cjs/ts-types/events.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 +3357 -2080
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.d.ts +1 -2
- package/es/ListTable.js +8 -10
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +10 -8
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +10 -7
- 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/legend/legend.js +5 -3
- package/es/components/legend/legend.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.js +2 -0
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -2
- package/es/core/BaseTable.js +29 -11
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/drill.d.ts +2 -0
- package/es/event/drill.js +15 -0
- package/es/event/drill.js.map +1 -1
- package/es/event/event.js +4 -4
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +19 -9
- package/es/event/listener/table-group.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/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-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +26 -4
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.js +4 -2
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +3 -3
- package/es/scenegraph/component/table-component.js +6 -6
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -1
- package/es/scenegraph/component/util.js +2 -1
- package/es/scenegraph/component/util.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/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 -0
- package/es/scenegraph/group-creater/progress/proxy.js +10 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +36 -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 +2 -17
- 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/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 +44 -64
- 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 +10 -4
- package/es/scenegraph/scenegraph.js +51 -119
- 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/update-container.d.ts +2 -0
- package/es/scenegraph/utils/update-container.js +7 -0
- package/es/scenegraph/utils/update-container.js.map +1 -0
- package/es/state/hover/update-position.js +1 -1
- package/es/state/hover/update-position.js.map +1 -1
- package/es/state/resize/update-resize-column.d.ts +2 -0
- package/es/state/resize/update-resize-column.js +66 -0
- package/es/state/resize/update-resize-column.js.map +1 -0
- package/es/state/sort/index.js +4 -2
- package/es/state/sort/index.js.map +1 -1
- package/es/state/state.d.ts +2 -1
- package/es/state/state.js +6 -23
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +8 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +1 -1
- package/es/ts-types/events.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 +5 -5
- package/cjs/scenegraph/component/menu.d.ts +0 -41
- package/cjs/scenegraph/graphic/text.d.ts +0 -15
- package/es/scenegraph/component/menu.d.ts +0 -41
- package/es/scenegraph/graphic/text.d.ts +0 -15
|
@@ -4,8 +4,6 @@ import { IconFuncTypeEnum } from "../ts-types";
|
|
|
4
4
|
|
|
5
5
|
import { isArray, isString } from "@visactor/vutils";
|
|
6
6
|
|
|
7
|
-
import { Group } from "./graphic/group";
|
|
8
|
-
|
|
9
7
|
import { getCellMergeInfo } from "./utils/get-cell-merge";
|
|
10
8
|
|
|
11
9
|
import { updateColWidth } from "./layout/update-width";
|
|
@@ -52,11 +50,13 @@ import { computeRowsHeight } from "./layout/compute-row-height";
|
|
|
52
50
|
|
|
53
51
|
import { emptyGroup } from "./utils/empty-group";
|
|
54
52
|
|
|
53
|
+
import { dealBottomFrozen, dealFrozen, dealRightFrozen, resetFrozen } from "./layout/frozen";
|
|
54
|
+
|
|
55
55
|
import { updateChartSize, updateChartState } from "./refresh-node/update-chart";
|
|
56
56
|
|
|
57
|
-
import {
|
|
57
|
+
import { initSceneGraph } from "./group-creater/init-scenegraph";
|
|
58
58
|
|
|
59
|
-
import {
|
|
59
|
+
import { updateContainerChildrenX } from "./utils/update-container";
|
|
60
60
|
|
|
61
61
|
container.load(splitModule);
|
|
62
62
|
|
|
@@ -104,93 +104,14 @@ export class Scenegraph {
|
|
|
104
104
|
return this.transpose || this.isPivot ? this.table.rowCount - 1 : null !== (_a = this.proxy.rowEnd) && void 0 !== _a ? _a : 0;
|
|
105
105
|
}
|
|
106
106
|
initSceneGraph() {
|
|
107
|
-
this.isPivot = this.table.isPivotTable(), this.transpose = this.table.options.transpose
|
|
108
|
-
|
|
109
|
-
this.tableGroup = new Group({
|
|
110
|
-
x: 0,
|
|
111
|
-
y: 0,
|
|
112
|
-
width: width,
|
|
113
|
-
height: height,
|
|
114
|
-
clip: !0,
|
|
115
|
-
pickable: !1
|
|
116
|
-
}), this.tableGroup.role = "table";
|
|
117
|
-
const colHeaderGroup = new Group({
|
|
118
|
-
x: 0,
|
|
119
|
-
y: 0,
|
|
120
|
-
width: 0,
|
|
121
|
-
height: 0,
|
|
122
|
-
clip: !1,
|
|
123
|
-
pickable: !1
|
|
124
|
-
});
|
|
125
|
-
colHeaderGroup.role = "col-header", this.colHeaderGroup = colHeaderGroup;
|
|
126
|
-
const cornerHeaderGroup = new Group({
|
|
127
|
-
x: 0,
|
|
128
|
-
y: 0,
|
|
129
|
-
width: 0,
|
|
130
|
-
height: 0,
|
|
131
|
-
clip: !1,
|
|
132
|
-
pickable: !1
|
|
133
|
-
});
|
|
134
|
-
cornerHeaderGroup.role = "corner-header", this.cornerHeaderGroup = cornerHeaderGroup;
|
|
135
|
-
const rowHeaderGroup = new Group({
|
|
136
|
-
x: 0,
|
|
137
|
-
y: 0,
|
|
138
|
-
width: 0,
|
|
139
|
-
height: 0,
|
|
140
|
-
clip: !1,
|
|
141
|
-
pickable: !1
|
|
142
|
-
});
|
|
143
|
-
rowHeaderGroup.role = "row-header", this.rowHeaderGroup = rowHeaderGroup;
|
|
144
|
-
const bodyGroup = new Group({
|
|
145
|
-
x: 0,
|
|
146
|
-
y: 0,
|
|
147
|
-
width: width,
|
|
148
|
-
height: 0,
|
|
149
|
-
clip: !1,
|
|
150
|
-
pickable: !1
|
|
151
|
-
});
|
|
152
|
-
bodyGroup.role = "body", this.bodyGroup = bodyGroup;
|
|
153
|
-
const rightFrozenGroup = new Group({
|
|
154
|
-
x: 0,
|
|
155
|
-
y: 0,
|
|
156
|
-
width: width,
|
|
157
|
-
height: 0,
|
|
158
|
-
clip: !1,
|
|
159
|
-
pickable: !1
|
|
160
|
-
});
|
|
161
|
-
rightFrozenGroup.role = "right-frozen", this.rightFrozenGroup = rightFrozenGroup;
|
|
162
|
-
const bottomFrozenGroup = new Group({
|
|
163
|
-
x: 0,
|
|
164
|
-
y: 0,
|
|
165
|
-
width: width,
|
|
166
|
-
height: 0,
|
|
167
|
-
clip: !1,
|
|
168
|
-
pickable: !1
|
|
169
|
-
});
|
|
170
|
-
bottomFrozenGroup.role = "bottom-frozen", this.bottomFrozenGroup = bottomFrozenGroup;
|
|
171
|
-
const componentGroup = new Group({
|
|
172
|
-
x: 0,
|
|
173
|
-
y: 0,
|
|
174
|
-
width: 0,
|
|
175
|
-
height: 0,
|
|
176
|
-
clip: !1,
|
|
177
|
-
pickable: !1,
|
|
178
|
-
childrenPickable: !0
|
|
179
|
-
});
|
|
180
|
-
componentGroup.role = "component", this.componentGroup = componentGroup, this.rightTopCellGroup = createCornerCell(this.table.theme.cornerRightTopCellStyle || this.table.theme.cornerHeaderStyle),
|
|
181
|
-
this.leftBottomCellGroup = createCornerCell(this.table.theme.cornerLeftBottomCellStyle || this.table.theme.cornerHeaderStyle),
|
|
182
|
-
this.rightBottomCellGroup = createCornerCell(this.table.theme.cornerRightBottomCellStyle || this.table.theme.cornerHeaderStyle),
|
|
183
|
-
this.tableGroup.addChild(bodyGroup), this.tableGroup.addChild(rightFrozenGroup),
|
|
184
|
-
this.tableGroup.addChild(bottomFrozenGroup), this.tableGroup.addChild(rowHeaderGroup),
|
|
185
|
-
this.tableGroup.addChild(colHeaderGroup), this.tableGroup.addChild(this.rightBottomCellGroup),
|
|
186
|
-
this.tableGroup.addChild(this.rightTopCellGroup), this.tableGroup.addChild(this.leftBottomCellGroup),
|
|
187
|
-
this.tableGroup.addChild(cornerHeaderGroup), this.tableGroup.addChild(componentGroup);
|
|
107
|
+
this.isPivot = this.table.isPivotTable(), this.transpose = this.table.options.transpose,
|
|
108
|
+
initSceneGraph(this);
|
|
188
109
|
}
|
|
189
110
|
clearCells() {
|
|
190
111
|
this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
|
|
191
112
|
this.rowHeaderGroup.clear(), this.cornerHeaderGroup.clear(), this.bodyGroup.clear(),
|
|
192
|
-
this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.
|
|
193
|
-
this.
|
|
113
|
+
this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.rightTopCornerGroup.clear(),
|
|
114
|
+
this.rightBottomCornerGroup.clear(), this.leftBottomCornerGroup.clear(), this.colHeaderGroup.setAttributes({
|
|
194
115
|
x: 0,
|
|
195
116
|
y: 0,
|
|
196
117
|
width: 0,
|
|
@@ -220,19 +141,19 @@ export class Scenegraph {
|
|
|
220
141
|
y: 0,
|
|
221
142
|
width: 0,
|
|
222
143
|
height: 0
|
|
223
|
-
}), this.
|
|
144
|
+
}), this.rightTopCornerGroup.setAttributes({
|
|
224
145
|
x: 0,
|
|
225
146
|
y: 0,
|
|
226
147
|
width: 0,
|
|
227
148
|
height: 0,
|
|
228
149
|
visible: !1
|
|
229
|
-
}), this.
|
|
150
|
+
}), this.leftBottomCornerGroup.setAttributes({
|
|
230
151
|
x: 0,
|
|
231
152
|
y: 0,
|
|
232
153
|
width: 0,
|
|
233
154
|
height: 0,
|
|
234
155
|
visible: !1
|
|
235
|
-
}), this.
|
|
156
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
236
157
|
x: 0,
|
|
237
158
|
y: 0,
|
|
238
159
|
width: 0,
|
|
@@ -275,9 +196,9 @@ export class Scenegraph {
|
|
|
275
196
|
element || void 0;
|
|
276
197
|
}
|
|
277
198
|
getCell(col, row, getShadow) {
|
|
278
|
-
var _a, _b, _c;
|
|
199
|
+
var _a, _b, _c, _d, _e, _f;
|
|
279
200
|
let cell;
|
|
280
|
-
if (cell = this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? null === (
|
|
201
|
+
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),
|
|
281
202
|
cell && "shadow-cell" === cell.role && !getShadow) {
|
|
282
203
|
const range = this.table.getCellRange(col, row);
|
|
283
204
|
range.start.col === col && range.start.row === row || (cell = this.getCell(range.start.col, range.start.row));
|
|
@@ -295,6 +216,15 @@ export class Scenegraph {
|
|
|
295
216
|
getColGroupInBottom(col) {
|
|
296
217
|
if (this.table.bottomFrozenRowCount > 0) return this.bottomFrozenGroup.getColGroup(col);
|
|
297
218
|
}
|
|
219
|
+
getColGroupInLeftBottomCorner(col) {
|
|
220
|
+
if (this.table.bottomFrozenRowCount > 0) return this.leftBottomCornerGroup.getColGroup(col);
|
|
221
|
+
}
|
|
222
|
+
getColGroupInRightTopCorner(col) {
|
|
223
|
+
if (this.table.rightFrozenColCount > 0) return this.rightTopCornerGroup.getColGroup(col);
|
|
224
|
+
}
|
|
225
|
+
getColGroupInRightBottomCorner(col) {
|
|
226
|
+
if (this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0) return this.rightBottomCornerGroup.getColGroup(col);
|
|
227
|
+
}
|
|
298
228
|
getCellSize(col, row) {
|
|
299
229
|
const cell = this.getCell(col, row), mergeInfo = getCellMergeInfo(this.table, col, row);
|
|
300
230
|
let width = cell.attribute.width, height = cell.attribute.height;
|
|
@@ -439,28 +369,28 @@ export class Scenegraph {
|
|
|
439
369
|
updateTableSize() {
|
|
440
370
|
var _a, _b;
|
|
441
371
|
this.tableGroup.setAttributes({
|
|
442
|
-
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.
|
|
372
|
+
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),
|
|
443
373
|
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)
|
|
444
374
|
}), this.tableGroup.border && this.tableGroup.border.setAttributes({
|
|
445
375
|
width: this.tableGroup.attribute.width + this.tableGroup.border.attribute.lineWidth,
|
|
446
376
|
height: this.tableGroup.attribute.height + this.tableGroup.border.attribute.lineWidth
|
|
447
377
|
}), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("y", this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height),
|
|
448
|
-
this.
|
|
378
|
+
this.leftBottomCornerGroup.setAttributes({
|
|
449
379
|
visible: !0,
|
|
450
380
|
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
451
381
|
height: this.bottomFrozenGroup.attribute.height,
|
|
452
382
|
width: this.table.getFrozenColsWidth()
|
|
453
|
-
}), this.
|
|
383
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
454
384
|
visible: !0,
|
|
455
385
|
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
456
386
|
height: this.bottomFrozenGroup.attribute.height
|
|
457
387
|
})), this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("x", this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width),
|
|
458
|
-
this.
|
|
388
|
+
this.rightTopCornerGroup.setAttributes({
|
|
459
389
|
visible: !0,
|
|
460
390
|
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
461
391
|
width: this.rightFrozenGroup.attribute.width,
|
|
462
392
|
height: this.table.getFrozenRowsHeight()
|
|
463
|
-
}), this.
|
|
393
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
464
394
|
visible: !0,
|
|
465
395
|
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
466
396
|
width: this.rightFrozenGroup.attribute.width
|
|
@@ -476,8 +406,9 @@ export class Scenegraph {
|
|
|
476
406
|
this.updateNextFrame();
|
|
477
407
|
}
|
|
478
408
|
updateContainerHeight(row, detaY) {
|
|
479
|
-
row < this.frozenRowCount ? (this.colHeaderGroup.setDeltaHeight(detaY), this.cornerHeaderGroup.setDeltaHeight(detaY),
|
|
480
|
-
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY)) : (this.
|
|
409
|
+
row < this.table.frozenRowCount ? (this.colHeaderGroup.setDeltaHeight(detaY), this.cornerHeaderGroup.setDeltaHeight(detaY),
|
|
410
|
+
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY)) : row >= this.table.rowCount - this.table.bottomFrozenRowCount ? (this.leftBottomCornerGroup.setDeltaHeight(detaY),
|
|
411
|
+
this.bottomFrozenGroup.setDeltaHeight(detaY), this.rightBottomCornerGroup.setDeltaHeight(detaY)) : (this.rowHeaderGroup.setDeltaHeight(detaY),
|
|
481
412
|
this.bodyGroup.setDeltaHeight(detaY)), this.updateTableSize(), this.component.updateScrollBar(),
|
|
482
413
|
this.updateNextFrame();
|
|
483
414
|
}
|
|
@@ -603,24 +534,18 @@ export class Scenegraph {
|
|
|
603
534
|
moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, this.table);
|
|
604
535
|
}
|
|
605
536
|
updateContainer() {
|
|
606
|
-
|
|
607
|
-
this.
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
this.rowHeaderGroup.forEachChildrenSkipChild(((column, index) => {
|
|
612
|
-
column.setAttribute("x", rowHeaderX), rowHeaderX += column.attribute.width;
|
|
613
|
-
}));
|
|
614
|
-
let colHeaderX = 0;
|
|
615
|
-
this.colHeaderGroup.forEachChildrenSkipChild(((column, index) => {
|
|
616
|
-
column.setAttribute("x", colHeaderX), colHeaderX += column.attribute.width;
|
|
617
|
-
}));
|
|
618
|
-
let bodyX = 0;
|
|
619
|
-
this.bodyGroup.forEachChildrenSkipChild(((column, index) => {
|
|
620
|
-
column.setAttribute("x", bodyX), bodyX += column.attribute.width;
|
|
621
|
-
})), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width),
|
|
537
|
+
const cornerX = updateContainerChildrenX(this.cornerHeaderGroup), rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup), colHeaderX = updateContainerChildrenX(this.colHeaderGroup), bodyX = updateContainerChildrenX(this.bodyGroup), rightX = updateContainerChildrenX(this.rightFrozenGroup);
|
|
538
|
+
updateContainerChildrenX(this.bottomFrozenGroup), updateContainerChildrenX(this.leftBottomCornerGroup),
|
|
539
|
+
updateContainerChildrenX(this.rightTopCornerGroup), updateContainerChildrenX(this.rightBottomCornerGroup),
|
|
540
|
+
this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width),
|
|
541
|
+
this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width),
|
|
622
542
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
|
|
543
|
+
this.rightFrozenGroup.setDeltaWidth(colHeaderX - this.rightFrozenGroup.attribute.width),
|
|
623
544
|
this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
|
|
545
|
+
this.bottomFrozenGroup.setDeltaWidth(rowHeaderX - this.bottomFrozenGroup.attribute.width),
|
|
546
|
+
this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width),
|
|
547
|
+
this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width),
|
|
548
|
+
this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width),
|
|
624
549
|
this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
|
|
625
550
|
this.bottomFrozenGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width),
|
|
626
551
|
this.updateTableSize();
|
|
@@ -643,16 +568,17 @@ export class Scenegraph {
|
|
|
643
568
|
}
|
|
644
569
|
getResizeColAt(abstractX, abstractY, cellGroup, offset = ResizeColumnHotSpotSize / 2) {
|
|
645
570
|
if (cellGroup) {
|
|
646
|
-
|
|
571
|
+
let cell;
|
|
572
|
+
if (abstractX < cellGroup.globalAABBBounds.x1 + offset ? cell = {
|
|
647
573
|
col: cellGroup.col - 1,
|
|
648
574
|
row: cellGroup.row,
|
|
649
575
|
x: cellGroup.globalAABBBounds.x1
|
|
650
|
-
}
|
|
651
|
-
if (cellGroup.globalAABBBounds.x2 - offset < abstractX) return {
|
|
576
|
+
} : cellGroup.globalAABBBounds.x2 - offset < abstractX && (cell = {
|
|
652
577
|
col: cellGroup.col,
|
|
653
578
|
row: cellGroup.row,
|
|
654
579
|
x: cellGroup.globalAABBBounds.x2
|
|
655
|
-
}
|
|
580
|
+
}), cell && this.table.rightFrozenColCount > 0 && cell.col === this.table.colCount - this.table.rightFrozenColCount - 1 && this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() + this.table.scrollLeft < this.bodyGroup.attribute.width && (cell.col = cell.col + 1,
|
|
581
|
+
cell.rightFrozen = !0), cell) return cell;
|
|
656
582
|
} else ;
|
|
657
583
|
return {
|
|
658
584
|
col: -1,
|
|
@@ -665,6 +591,12 @@ export class Scenegraph {
|
|
|
665
591
|
updateFrozen() {
|
|
666
592
|
this.clear || (this.resetFrozen(), this.dealFrozen(), this.component.updateScrollBar());
|
|
667
593
|
}
|
|
594
|
+
dealWidthRightFrozen(rightFrozenColCount) {
|
|
595
|
+
this.clear ? this.table.internalProps.rightFrozenColCount = rightFrozenColCount : dealRightFrozen(rightFrozenColCount, this);
|
|
596
|
+
}
|
|
597
|
+
dealWidthBottomFrozen(bottomFrozenRowCount) {
|
|
598
|
+
this.clear ? this.table.internalProps.bottomFrozenRowCount = bottomFrozenRowCount : dealBottomFrozen(bottomFrozenRowCount, this);
|
|
599
|
+
}
|
|
668
600
|
updateBorderSizeAndPosition() {
|
|
669
601
|
this.bodyGroup.border && (this.bodyGroup.appendChild(this.bodyGroup.border), updateFrameBorderSize(this.bodyGroup),
|
|
670
602
|
0 === this.rowHeaderGroup.attribute.width ? updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [ !0, !0, !0, !0 ]) : updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [ !0, !0, !0, !1 ])),
|