@visactor/vtable 1.6.0-alpha.0 → 1.6.0-alpha.2
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-all.js +5 -5
- package/cjs/ListTable-all.js.map +1 -1
- package/cjs/ListTable.d.ts +2 -2
- package/cjs/ListTable.js +10 -4
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +0 -2
- package/cjs/PivotTable.js +1 -1
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style.js +2 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +7 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/components/react/react-custom-layout.d.ts +3 -1
- package/cjs/components/react/react-custom-layout.js +7 -3
- package/cjs/components/react/react-custom-layout.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -1
- package/cjs/core/BaseTable.js +9 -7
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/CachedDataSource.js +1 -1
- package/cjs/data/DataSource.js +2 -2
- package/cjs/dataset/dataset.js +1 -0
- package/cjs/edit/edit-manager.js +4 -7
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/edit/editors.js +1 -2
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventTarget.js +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/event.js +7 -5
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +43 -19
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/sparkline-event.js +1 -1
- package/cjs/event/util.js +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.js +2 -1
- package/cjs/layout/pivot-header-layout.js +11 -5
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.js +0 -1
- package/cjs/plugins/icons.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.d.ts +16 -0
- package/cjs/plugins/list-tree-stick-cell.js +178 -0
- package/cjs/plugins/list-tree-stick-cell.js.map +1 -0
- package/cjs/plugins/themes.js +1 -1
- package/cjs/scenegraph/component/custom.js +1 -1
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +26 -10
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/group.js +1 -1
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +2 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +16 -4
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +2 -2
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +4 -2
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +6 -4
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +2 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +18 -4
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +2 -1
- package/cjs/scenegraph/scenegraph.js +13 -8
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.js +2 -2
- package/cjs/scenegraph/select/create-select-border.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +6 -5
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/cell-move/index.js +14 -11
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/select/is-cell-select-highlight.js +6 -0
- package/cjs/state/select/is-cell-select-highlight.js.map +1 -1
- package/cjs/state/state.js +8 -6
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -1
- package/cjs/themes/BRIGHT.js +1 -1
- package/cjs/themes/DARK.js +1 -1
- package/cjs/themes/DEFAULT.js +1 -1
- package/cjs/themes/SIMPLIFY.js +1 -1
- package/cjs/themes/component.js +1 -1
- package/cjs/themes/theme.js +8 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +3 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -0
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js +2 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +543 -112
- package/dist/vtable.min.js +2 -2
- package/es/ListTable-all.js +5 -3
- package/es/ListTable-all.js.map +1 -1
- package/es/ListTable.d.ts +2 -2
- package/es/ListTable.js +9 -4
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +0 -2
- package/es/PivotTable.js +1 -1
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style.js +2 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +7 -1
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/components/react/react-custom-layout.d.ts +3 -1
- package/es/components/react/react-custom-layout.js +7 -3
- package/es/components/react/react-custom-layout.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -1
- package/es/core/BaseTable.js +9 -7
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/CachedDataSource.js +1 -1
- package/es/data/DataSource.js +2 -2
- package/es/dataset/dataset.js +2 -1
- package/es/edit/edit-manager.js +4 -7
- package/es/edit/edit-manager.js.map +1 -1
- package/es/edit/editors.js +1 -2
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventTarget.js +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/event.js +7 -5
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +39 -18
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/sparkline-event.js +1 -1
- package/es/event/util.js +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.js +2 -1
- package/es/layout/pivot-header-layout.js +11 -5
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/tree-helper.js +1 -2
- package/es/plugins/icons.js +1 -1
- package/es/plugins/list-tree-stick-cell.d.ts +16 -0
- package/es/plugins/list-tree-stick-cell.js +176 -0
- package/es/plugins/list-tree-stick-cell.js.map +1 -0
- package/es/plugins/themes.js +1 -1
- package/es/scenegraph/component/custom.js +1 -1
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +26 -10
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/group.js +1 -1
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +2 -1
- package/es/scenegraph/group-creater/cell-helper.js +11 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +2 -2
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +4 -2
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +6 -4
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +2 -1
- package/es/scenegraph/refresh-node/update-chart.js +14 -1
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +2 -1
- package/es/scenegraph/scenegraph.js +15 -10
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/create-select-border.js +2 -2
- package/es/scenegraph/select/create-select-border.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +7 -4
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/cell-move/index.js +14 -11
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/select/is-cell-select-highlight.js +6 -0
- package/es/state/select/is-cell-select-highlight.js.map +1 -1
- package/es/state/state.js +8 -6
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +1 -1
- package/es/themes/BRIGHT.js +1 -1
- package/es/themes/DARK.js +1 -1
- package/es/themes/DEFAULT.js +1 -1
- package/es/themes/SIMPLIFY.js +1 -1
- package/es/themes/component.js +1 -1
- package/es/themes/theme.js +8 -0
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/base-table.d.ts +3 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -0
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js +3 -2
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -9285,7 +9285,7 @@
|
|
|
9285
9285
|
var _a;
|
|
9286
9286
|
const validateToGraphics = toGraphics.filter(graphic => graphic && graphic.toCustomPath && graphic.valid);
|
|
9287
9287
|
validateToGraphics.length || __DEV__ && (void 0), fromGraphic.valid && fromGraphic.toCustomPath || __DEV__ && (void 0);
|
|
9288
|
-
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(fromGraphic, validateToGraphics.length, !1),
|
|
9288
|
+
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic$1 : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(fromGraphic, validateToGraphics.length, !1),
|
|
9289
9289
|
oldOnEnd = null == animationConfig ? void 0 : animationConfig.onEnd;
|
|
9290
9290
|
let count = validateToGraphics.length;
|
|
9291
9291
|
const onEachEnd = () => {
|
|
@@ -9359,7 +9359,7 @@
|
|
|
9359
9359
|
});
|
|
9360
9360
|
}
|
|
9361
9361
|
};
|
|
9362
|
-
const cloneGraphic = (graphic, count, needAppend) => {
|
|
9362
|
+
const cloneGraphic$1 = (graphic, count, needAppend) => {
|
|
9363
9363
|
const children = [],
|
|
9364
9364
|
childAttrs = needAppend ? null : parseShadowChildAttrs(graphic.attribute),
|
|
9365
9365
|
path = graphic.toCustomPath();
|
|
@@ -9414,7 +9414,7 @@
|
|
|
9414
9414
|
var _a, _b, _c;
|
|
9415
9415
|
const validateFromGraphics = fromGraphics.filter(graphic => graphic.toCustomPath && graphic.valid);
|
|
9416
9416
|
validateFromGraphics.length || __DEV__ && (void 0), toGraphic.valid && toGraphic.toCustomPath || __DEV__ && (void 0);
|
|
9417
|
-
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(toGraphic, validateFromGraphics.length, !0),
|
|
9417
|
+
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic$1 : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(toGraphic, validateFromGraphics.length, !0),
|
|
9418
9418
|
toAttrs = toGraphic.attribute;
|
|
9419
9419
|
toGraphic.setAttribute("visible", !1);
|
|
9420
9420
|
const morphingData = validateFromGraphics.map((graphic, index) => parseMorphingData(graphic.toCustomPath(), childGraphics[index].toCustomPath(), {
|
|
@@ -42035,6 +42035,7 @@
|
|
|
42035
42035
|
registerLine();
|
|
42036
42036
|
registerRect();
|
|
42037
42037
|
registerRichtext();
|
|
42038
|
+
registerShadowRoot();
|
|
42038
42039
|
registerSymbol();
|
|
42039
42040
|
registerText();
|
|
42040
42041
|
loadPoptip();
|
|
@@ -42473,7 +42474,7 @@
|
|
|
42473
42474
|
circleModule: circleModule,
|
|
42474
42475
|
clampRadian: clampRadian,
|
|
42475
42476
|
clock: clock,
|
|
42476
|
-
cloneGraphic: cloneGraphic,
|
|
42477
|
+
cloneGraphic: cloneGraphic$1,
|
|
42477
42478
|
colorEqual: colorEqual,
|
|
42478
42479
|
colorStringInterpolationToStr: colorStringInterpolationToStr,
|
|
42479
42480
|
container: container,
|
|
@@ -45688,6 +45689,9 @@
|
|
|
45688
45689
|
},
|
|
45689
45690
|
get inlineRowBgColor() {
|
|
45690
45691
|
return selectionStyle?.inlineRowBgColor;
|
|
45692
|
+
},
|
|
45693
|
+
get selectionFillMode() {
|
|
45694
|
+
return selectionStyle?.selectionFillMode ?? 'overlay';
|
|
45691
45695
|
}
|
|
45692
45696
|
};
|
|
45693
45697
|
}
|
|
@@ -45809,6 +45813,12 @@
|
|
|
45809
45813
|
? changeColor(that.selectionStyle.cellBgColor, 0.1, false)
|
|
45810
45814
|
: undefined) ??
|
|
45811
45815
|
undefined);
|
|
45816
|
+
},
|
|
45817
|
+
get cellBgColor() {
|
|
45818
|
+
if (that.selectionStyle.selectionFillMode === 'replace') {
|
|
45819
|
+
return style.select?.cellBgColor ?? that.selectionStyle.cellBgColor ?? undefined;
|
|
45820
|
+
}
|
|
45821
|
+
return undefined;
|
|
45812
45822
|
}
|
|
45813
45823
|
};
|
|
45814
45824
|
},
|
|
@@ -48659,12 +48669,14 @@
|
|
|
48659
48669
|
};
|
|
48660
48670
|
}
|
|
48661
48671
|
class ReactCustomLayout {
|
|
48672
|
+
removeAllContainer;
|
|
48662
48673
|
table;
|
|
48663
48674
|
customLayoutFuncCache;
|
|
48664
48675
|
reactRemoveGraphicCache;
|
|
48665
48676
|
headerCustomLayoutFuncCache;
|
|
48666
48677
|
headerReactRemoveGraphicCache;
|
|
48667
|
-
constructor(table) {
|
|
48678
|
+
constructor(removeAllContainer, table) {
|
|
48679
|
+
this.removeAllContainer = removeAllContainer;
|
|
48668
48680
|
this.table = table;
|
|
48669
48681
|
this.customLayoutFuncCache = new Map();
|
|
48670
48682
|
this.reactRemoveGraphicCache = new Map();
|
|
@@ -48742,6 +48754,9 @@
|
|
|
48742
48754
|
removeFun(col, row);
|
|
48743
48755
|
}
|
|
48744
48756
|
}
|
|
48757
|
+
clearCache() {
|
|
48758
|
+
this.removeAllContainer();
|
|
48759
|
+
}
|
|
48745
48760
|
}
|
|
48746
48761
|
function getUpdateCustomCellRangeInListTable(componentId, table, isHeaderCustomLayout) {
|
|
48747
48762
|
const rowSeriesNumber = table.internalProps.rowSeriesNumber ? 1 : 0;
|
|
@@ -49295,7 +49310,7 @@
|
|
|
49295
49310
|
return;
|
|
49296
49311
|
}
|
|
49297
49312
|
const cellGroup = getTargetCell(graphic);
|
|
49298
|
-
if (!cellGroup || cellGroup.stage) {
|
|
49313
|
+
if (!cellGroup || !cellGroup.stage) {
|
|
49299
49314
|
return;
|
|
49300
49315
|
}
|
|
49301
49316
|
const table = cellGroup.stage.table;
|
|
@@ -49837,6 +49852,9 @@
|
|
|
49837
49852
|
this._AABBBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
|
|
49838
49853
|
this.parent && this.parent.addChildUpdateBoundTag();
|
|
49839
49854
|
this.clearUpdateBoundTag();
|
|
49855
|
+
if (this.shadowRoot) {
|
|
49856
|
+
this.shadowRoot.tryUpdateAABBBounds();
|
|
49857
|
+
}
|
|
49840
49858
|
return this._AABBBounds;
|
|
49841
49859
|
}
|
|
49842
49860
|
return super.doUpdateAABBBounds();
|
|
@@ -50335,7 +50353,8 @@
|
|
|
50335
50353
|
x: 0,
|
|
50336
50354
|
y: 0,
|
|
50337
50355
|
fill: false,
|
|
50338
|
-
stroke: false
|
|
50356
|
+
stroke: false,
|
|
50357
|
+
pickable: false
|
|
50339
50358
|
});
|
|
50340
50359
|
cellContent.name = 'content';
|
|
50341
50360
|
cellContent.setCellContentOption({
|
|
@@ -50577,7 +50596,7 @@
|
|
|
50577
50596
|
}
|
|
50578
50597
|
newHeight = (cellGroup.contentHeight ?? cellHeight) - (padding[0] + padding[2]);
|
|
50579
50598
|
cellGroup.forEachChildren((child) => {
|
|
50580
|
-
if (child.type === 'rect' || child.type === 'chart') {
|
|
50599
|
+
if (child.type === 'rect' || child.type === 'chart' || child.name === CUSTOM_CONTAINER_NAME) {
|
|
50581
50600
|
return;
|
|
50582
50601
|
}
|
|
50583
50602
|
if (child.name === 'mark') {
|
|
@@ -50596,7 +50615,7 @@
|
|
|
50596
50615
|
}
|
|
50597
50616
|
else if (textBaseline === 'middle' || textBaseline === 'bottom') {
|
|
50598
50617
|
cellGroup.forEachChildren((child) => {
|
|
50599
|
-
if (child.type === 'rect' || child.type === 'chart') {
|
|
50618
|
+
if (child.type === 'rect' || child.type === 'chart' || child.name === CUSTOM_CONTAINER_NAME) {
|
|
50600
50619
|
return;
|
|
50601
50620
|
}
|
|
50602
50621
|
if (child.name === 'mark') {
|
|
@@ -50634,7 +50653,7 @@
|
|
|
50634
50653
|
}
|
|
50635
50654
|
cellGroup.forEachChildren((child) => {
|
|
50636
50655
|
child.setAttribute('dy', 0);
|
|
50637
|
-
if (child.type === 'rect' || child.type === 'chart') ;
|
|
50656
|
+
if (child.type === 'rect' || child.type === 'chart' || child.name === CUSTOM_CONTAINER_NAME) ;
|
|
50638
50657
|
else if (child.name === 'mark') {
|
|
50639
50658
|
child.setAttribute('y', 0);
|
|
50640
50659
|
}
|
|
@@ -51258,7 +51277,7 @@
|
|
|
51258
51277
|
}
|
|
51259
51278
|
return cellGroup;
|
|
51260
51279
|
}
|
|
51261
|
-
function updateCell$1(col, row, table, addNew) {
|
|
51280
|
+
function updateCell$1(col, row, table, addNew, isShadow) {
|
|
51262
51281
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
|
|
51263
51282
|
const cellStyle = table._getCellStyle(col, row);
|
|
51264
51283
|
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
@@ -51427,7 +51446,12 @@
|
|
|
51427
51446
|
const { height: contentHeight } = newCellGroup.attribute;
|
|
51428
51447
|
newCellGroup.contentWidth = contentWidth;
|
|
51429
51448
|
newCellGroup.contentHeight = contentHeight;
|
|
51430
|
-
|
|
51449
|
+
if (isShadow) {
|
|
51450
|
+
dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, newCellGroup);
|
|
51451
|
+
}
|
|
51452
|
+
else {
|
|
51453
|
+
dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);
|
|
51454
|
+
}
|
|
51431
51455
|
}
|
|
51432
51456
|
return newCellGroup;
|
|
51433
51457
|
}
|
|
@@ -51494,6 +51518,20 @@
|
|
|
51494
51518
|
}
|
|
51495
51519
|
}
|
|
51496
51520
|
}
|
|
51521
|
+
function dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellGroup) {
|
|
51522
|
+
const { col, row } = cellGroup;
|
|
51523
|
+
if (range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) {
|
|
51524
|
+
updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline);
|
|
51525
|
+
}
|
|
51526
|
+
if (range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) {
|
|
51527
|
+
updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph);
|
|
51528
|
+
}
|
|
51529
|
+
cellGroup.contentWidth = cellWidth;
|
|
51530
|
+
cellGroup.contentHeight = cellHeight;
|
|
51531
|
+
const rangeHeight = table.getRowHeight(row);
|
|
51532
|
+
const rangeWidth = table.getColWidth(col);
|
|
51533
|
+
resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table);
|
|
51534
|
+
}
|
|
51497
51535
|
function resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table) {
|
|
51498
51536
|
const { col, row } = cellGroup;
|
|
51499
51537
|
const dx = -table.getColsWidth(range.start.col, col - 1);
|
|
@@ -52593,8 +52631,8 @@
|
|
|
52593
52631
|
continue;
|
|
52594
52632
|
}
|
|
52595
52633
|
const mergedCell = scene.getCell(col, mergeRow);
|
|
52596
|
-
const customContainer =
|
|
52597
|
-
|
|
52634
|
+
const customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) ||
|
|
52635
|
+
mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
|
|
52598
52636
|
customContainer.removeAllChild();
|
|
52599
52637
|
mergedCell.removeChild(customContainer);
|
|
52600
52638
|
getCustomCellMergeCustom(col, mergeRow, mergedCell, scene.table);
|
|
@@ -52604,7 +52642,11 @@
|
|
|
52604
52642
|
let customRender;
|
|
52605
52643
|
let customLayout;
|
|
52606
52644
|
const cellLocation = scene.table.getCellLocation(col, row);
|
|
52607
|
-
|
|
52645
|
+
const { vTableMerge } = scene.table.getCellRawRecord(col, row);
|
|
52646
|
+
if (vTableMerge && scene.table.options.groupTitleCustomLayout) {
|
|
52647
|
+
customLayout = scene.table.options.groupTitleCustomLayout;
|
|
52648
|
+
}
|
|
52649
|
+
else if (cellLocation !== 'body') {
|
|
52608
52650
|
const define = scene.table.getHeaderDefine(col, row);
|
|
52609
52651
|
customRender = define?.headerCustomRender;
|
|
52610
52652
|
customLayout = define?.headerCustomLayout;
|
|
@@ -52614,6 +52656,15 @@
|
|
|
52614
52656
|
customRender = define?.customRender || scene.table.customRender;
|
|
52615
52657
|
customLayout = define?.customLayout;
|
|
52616
52658
|
}
|
|
52659
|
+
if ((customRender || customLayout) && isMergeCellGroup(cell)) {
|
|
52660
|
+
for (let mergeCol = cell.mergeStartCol; mergeCol <= cell.mergeEndCol; mergeCol++) {
|
|
52661
|
+
for (let mergeRow = cell.mergeStartRow; mergeRow <= cell.mergeEndRow; mergeRow++) {
|
|
52662
|
+
if (mergeRow !== row) {
|
|
52663
|
+
scene.updateCellContent(mergeCol, mergeRow);
|
|
52664
|
+
}
|
|
52665
|
+
}
|
|
52666
|
+
}
|
|
52667
|
+
}
|
|
52617
52668
|
if (customLayout || customRender) {
|
|
52618
52669
|
const style = scene.table._getCellStyle(col, row);
|
|
52619
52670
|
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
@@ -52927,7 +52978,7 @@
|
|
|
52927
52978
|
}
|
|
52928
52979
|
const mergedCell = scene.getCell(mergeCol, row);
|
|
52929
52980
|
const customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) ||
|
|
52930
|
-
|
|
52981
|
+
mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
|
|
52931
52982
|
customContainer.removeAllChild();
|
|
52932
52983
|
mergedCell.removeChild(customContainer);
|
|
52933
52984
|
getCustomCellMergeCustom(mergeCol, row, mergedCell, scene.table);
|
|
@@ -52937,7 +52988,11 @@
|
|
|
52937
52988
|
let customRender;
|
|
52938
52989
|
let customLayout;
|
|
52939
52990
|
const cellType = scene.table.getCellLocation(col, row);
|
|
52940
|
-
|
|
52991
|
+
const { vTableMerge } = scene.table.getCellRawRecord(col, row);
|
|
52992
|
+
if (vTableMerge && scene.table.options.groupTitleCustomLayout) {
|
|
52993
|
+
customLayout = scene.table.options.groupTitleCustomLayout;
|
|
52994
|
+
}
|
|
52995
|
+
else if (cellType !== 'body') {
|
|
52941
52996
|
const define = scene.table.getHeaderDefine(col, row);
|
|
52942
52997
|
customRender = define?.headerCustomRender;
|
|
52943
52998
|
customLayout = define?.headerCustomLayout;
|
|
@@ -52947,6 +53002,15 @@
|
|
|
52947
53002
|
customRender = define?.customRender || scene.table.customRender;
|
|
52948
53003
|
customLayout = define?.customLayout;
|
|
52949
53004
|
}
|
|
53005
|
+
if ((customRender || customLayout) && isMergeCellGroup(cellGroup)) {
|
|
53006
|
+
for (let mergeCol = cellGroup.mergeStartCol; mergeCol <= cellGroup.mergeEndCol; mergeCol++) {
|
|
53007
|
+
if (mergeCol !== col) {
|
|
53008
|
+
for (let mergeRow = cellGroup.mergeStartRow; mergeRow <= cellGroup.mergeEndRow; mergeRow++) {
|
|
53009
|
+
scene.updateCellContent(mergeCol, mergeRow);
|
|
53010
|
+
}
|
|
53011
|
+
}
|
|
53012
|
+
}
|
|
53013
|
+
}
|
|
52950
53014
|
if (customLayout || customRender) {
|
|
52951
53015
|
const style = scene.table._getCellStyle(col, row);
|
|
52952
53016
|
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
@@ -52956,7 +53020,7 @@
|
|
|
52956
53020
|
width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);
|
|
52957
53021
|
height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);
|
|
52958
53022
|
}
|
|
52959
|
-
const customResult = dealWithCustom(customLayout, customRender, col, row, width, height, false, scene.table.isAutoRowHeight(row), padding, isMergeCellGroup(cellGroup)
|
|
53023
|
+
const customResult = dealWithCustom(customLayout, customRender, cellGroup.mergeStartCol ?? col, cellGroup.mergeStartRow ?? row, width, height, false, scene.table.isAutoRowHeight(row), padding, isMergeCellGroup(cellGroup)
|
|
52960
53024
|
? {
|
|
52961
53025
|
start: { col: cellGroup.mergeStartCol, row: cellGroup.mergeStartRow },
|
|
52962
53026
|
end: { col: cellGroup.mergeEndCol, row: cellGroup.mergeEndRow }
|
|
@@ -54655,8 +54719,23 @@
|
|
|
54655
54719
|
return isHandlingChartQueue;
|
|
54656
54720
|
}
|
|
54657
54721
|
function renderChart(chart) {
|
|
54658
|
-
const { axes, dataId, data, spec } = chart.attribute;
|
|
54659
|
-
|
|
54722
|
+
const { axes, dataId, data, spec, ClassType, canvas, mode, modeParams, dpr } = chart.attribute;
|
|
54723
|
+
let { chartInstance } = chart;
|
|
54724
|
+
if (!chartInstance) {
|
|
54725
|
+
chartInstance = new ClassType(spec, {
|
|
54726
|
+
renderCanvas: canvas,
|
|
54727
|
+
mode: mode === 'node' ? 'node' : 'desktop-browser',
|
|
54728
|
+
modeParams: modeParams,
|
|
54729
|
+
canvasControled: false,
|
|
54730
|
+
viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 },
|
|
54731
|
+
dpr: dpr,
|
|
54732
|
+
interactive: false,
|
|
54733
|
+
animation: false,
|
|
54734
|
+
autoFit: false
|
|
54735
|
+
});
|
|
54736
|
+
chartInstance.renderSync();
|
|
54737
|
+
chart.chartInstance = chartInstance;
|
|
54738
|
+
}
|
|
54660
54739
|
const viewBox = chart.getViewBox();
|
|
54661
54740
|
if (viewBox.x2 <= viewBox.x1) {
|
|
54662
54741
|
viewBox.x2 = viewBox.x1 + 1;
|
|
@@ -54678,8 +54757,6 @@
|
|
|
54678
54757
|
y1: viewBox.y1 - chart.getRootNode().table.scrollTop,
|
|
54679
54758
|
y2: viewBox.y2 - chart.getRootNode().table.scrollTop
|
|
54680
54759
|
}, false, false);
|
|
54681
|
-
const table = chart.getRootNode().table;
|
|
54682
|
-
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
|
|
54683
54760
|
if (typeof dataId === 'string') {
|
|
54684
54761
|
chartInstance.updateDataSync(dataId, data ?? []);
|
|
54685
54762
|
}
|
|
@@ -55109,6 +55186,15 @@
|
|
|
55109
55186
|
}
|
|
55110
55187
|
}
|
|
55111
55188
|
}
|
|
55189
|
+
else if (state.table.theme.selectionStyle.selectionFillMode === 'replace') {
|
|
55190
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
55191
|
+
const range = ranges[i];
|
|
55192
|
+
if (range.start.col <= col && range.start.row <= row && range.end.col >= col && range.end.row >= row) {
|
|
55193
|
+
selectMode = 'cellBgColor';
|
|
55194
|
+
break;
|
|
55195
|
+
}
|
|
55196
|
+
}
|
|
55197
|
+
}
|
|
55112
55198
|
return selectMode;
|
|
55113
55199
|
}
|
|
55114
55200
|
function isCellDisableSelect(table, col, row) {
|
|
@@ -58833,7 +58919,9 @@
|
|
|
58833
58919
|
const bodyClickLineWidth = theme.selectionStyle?.cellBorderLineWidth;
|
|
58834
58920
|
const rect = createRect({
|
|
58835
58921
|
pickable: false,
|
|
58836
|
-
fill: theme.selectionStyle?.
|
|
58922
|
+
fill: theme.selectionStyle?.selectionFillMode === 'replace'
|
|
58923
|
+
? false
|
|
58924
|
+
: theme.selectionStyle?.cellBgColor ?? 'rgba(0, 0, 255,0.1)',
|
|
58837
58925
|
lineWidth: bodyClickLineWidth,
|
|
58838
58926
|
stroke: strokes.map(stroke => {
|
|
58839
58927
|
if (stroke) {
|
|
@@ -59708,7 +59796,7 @@
|
|
|
59708
59796
|
}
|
|
59709
59797
|
}
|
|
59710
59798
|
|
|
59711
|
-
function
|
|
59799
|
+
function updateChartSizeForResizeColWidth(scenegraph, col) {
|
|
59712
59800
|
for (let c = col; c <= scenegraph.proxy.colEnd; c++) {
|
|
59713
59801
|
const columnGroup = scenegraph.getColGroup(c);
|
|
59714
59802
|
columnGroup?.getChildren()?.forEach((cellNode) => {
|
|
@@ -59740,6 +59828,39 @@
|
|
|
59740
59828
|
}
|
|
59741
59829
|
}
|
|
59742
59830
|
}
|
|
59831
|
+
function updateChartSizeForResizeRowHeight(scenegraph, row) {
|
|
59832
|
+
const updateCellNode = (c, r) => {
|
|
59833
|
+
const cellNode = scenegraph.getCell(c, r);
|
|
59834
|
+
const width = scenegraph.table.getColWidth(cellNode.col);
|
|
59835
|
+
const height = scenegraph.table.getRowHeight(cellNode.row);
|
|
59836
|
+
cellNode.children.forEach((node) => {
|
|
59837
|
+
if (node.type === 'chart') {
|
|
59838
|
+
node.cacheCanvas = null;
|
|
59839
|
+
node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));
|
|
59840
|
+
node.setAttribute('height', Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2]));
|
|
59841
|
+
}
|
|
59842
|
+
});
|
|
59843
|
+
};
|
|
59844
|
+
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
59845
|
+
for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {
|
|
59846
|
+
updateCellNode(c, r);
|
|
59847
|
+
}
|
|
59848
|
+
}
|
|
59849
|
+
if (scenegraph.table.rightFrozenColCount >= 1) {
|
|
59850
|
+
for (let c = scenegraph.table.colCount - scenegraph.table.rightFrozenColCount; c <= scenegraph.table.colCount - 1; c++) {
|
|
59851
|
+
for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {
|
|
59852
|
+
updateCellNode(c, r);
|
|
59853
|
+
}
|
|
59854
|
+
}
|
|
59855
|
+
}
|
|
59856
|
+
if (scenegraph.table.frozenColCount >= 1) {
|
|
59857
|
+
for (let c = 0; c <= scenegraph.table.frozenColCount - 1; c++) {
|
|
59858
|
+
for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {
|
|
59859
|
+
updateCellNode(c, r);
|
|
59860
|
+
}
|
|
59861
|
+
}
|
|
59862
|
+
}
|
|
59863
|
+
}
|
|
59743
59864
|
function clearChartCacheImage(scenegraph) {
|
|
59744
59865
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
59745
59866
|
const columnGroup = scenegraph.getColGroup(c);
|
|
@@ -59849,10 +59970,10 @@
|
|
|
59849
59970
|
const height = scene.table.tableNoFrameHeight;
|
|
59850
59971
|
scene.tableGroup = new Group$1({ x: 0, y: 0, width, height, clip: true, pickable: false });
|
|
59851
59972
|
scene.tableGroup.role = 'table';
|
|
59852
|
-
const colHeaderGroup = createContainerGroup(0, 0,
|
|
59973
|
+
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
|
|
59853
59974
|
colHeaderGroup.role = 'col-header';
|
|
59854
59975
|
scene.colHeaderGroup = colHeaderGroup;
|
|
59855
|
-
const cornerHeaderGroup = createContainerGroup(0, 0,
|
|
59976
|
+
const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
|
|
59856
59977
|
cornerHeaderGroup.role = 'corner-header';
|
|
59857
59978
|
scene.cornerHeaderGroup = cornerHeaderGroup;
|
|
59858
59979
|
const rowHeaderGroup = createContainerGroup(0, 0, true);
|
|
@@ -60766,6 +60887,7 @@
|
|
|
60766
60887
|
delete this.tableGroup.border;
|
|
60767
60888
|
}
|
|
60768
60889
|
this.proxy?.release();
|
|
60890
|
+
this.table.reactCustomLayout?.clearCache();
|
|
60769
60891
|
}
|
|
60770
60892
|
updateStageBackground() {
|
|
60771
60893
|
this.stage.background = this.table.theme.underlayBackgroundColor;
|
|
@@ -60783,6 +60905,7 @@
|
|
|
60783
60905
|
createSceneGraph(skipRowHeightClear = false) {
|
|
60784
60906
|
if (!skipRowHeightClear) {
|
|
60785
60907
|
this.table.rowHeightsMap.clear();
|
|
60908
|
+
this.table.internalProps.layoutMap.clearCellRangeMap();
|
|
60786
60909
|
}
|
|
60787
60910
|
if (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) {
|
|
60788
60911
|
this.stage.pluginService.autoEnablePlugins.getContributions().forEach((p) => {
|
|
@@ -60984,6 +61107,7 @@
|
|
|
60984
61107
|
}
|
|
60985
61108
|
deleteAllSelectBorder() {
|
|
60986
61109
|
deleteAllSelectBorder(this);
|
|
61110
|
+
deleteAllSelectingBorder(this);
|
|
60987
61111
|
}
|
|
60988
61112
|
updateCellSelectBorder(selectRange, extendSelectRange = true) {
|
|
60989
61113
|
updateCellSelectBorder(this, selectRange, extendSelectRange);
|
|
@@ -61004,8 +61128,11 @@
|
|
|
61004
61128
|
this.updateContainer(true);
|
|
61005
61129
|
}
|
|
61006
61130
|
}
|
|
61007
|
-
|
|
61008
|
-
|
|
61131
|
+
updateChartSizeForResizeColWidth(col) {
|
|
61132
|
+
updateChartSizeForResizeColWidth(this, col);
|
|
61133
|
+
}
|
|
61134
|
+
updateChartSizeForResizeRowHeight(col) {
|
|
61135
|
+
updateChartSizeForResizeRowHeight(this, col);
|
|
61009
61136
|
}
|
|
61010
61137
|
updateChartState(datum) {
|
|
61011
61138
|
this.table.isPivotChart() && updateChartState(this, datum);
|
|
@@ -61141,7 +61268,7 @@
|
|
|
61141
61268
|
this.table.heightMode === 'adaptive' ||
|
|
61142
61269
|
this.table.autoFillWidth ||
|
|
61143
61270
|
this.table.autoFillHeight) {
|
|
61144
|
-
this.
|
|
61271
|
+
this.updateChartSizeForResizeColWidth(this.table.rowHeaderLevelCount);
|
|
61145
61272
|
}
|
|
61146
61273
|
this.proxy.progress();
|
|
61147
61274
|
this.updateNextFrame();
|
|
@@ -62647,63 +62774,66 @@
|
|
|
62647
62774
|
return;
|
|
62648
62775
|
}
|
|
62649
62776
|
const targetCell = adjustMoveHeaderTarget({ col: state.columnMove.colSource, row: state.columnMove.rowSource }, { col, row }, state.table);
|
|
62650
|
-
state.
|
|
62651
|
-
state.columnMove.y = y - state.table.tableY;
|
|
62652
|
-
state.columnMove.colTarget = targetCell.col;
|
|
62653
|
-
state.columnMove.rowTarget = targetCell.row;
|
|
62654
|
-
const canMove = state.table.internalProps.layoutMap.canMoveHeaderPosition({ col: state.columnMove.colSource, row: state.columnMove.rowSource }, { col: state.columnMove.colTarget, row: state.columnMove.rowTarget });
|
|
62777
|
+
const canMove = state.table.internalProps.layoutMap.canMoveHeaderPosition({ col: state.columnMove.colSource, row: state.columnMove.rowSource }, { col: targetCell.col, row: targetCell.row });
|
|
62655
62778
|
if (!canMove) {
|
|
62656
62779
|
state.updateCursor('not-allowed');
|
|
62780
|
+
state.columnMove.colTarget = state.columnMove.colSource;
|
|
62781
|
+
state.columnMove.rowTarget = state.columnMove.rowSource;
|
|
62657
62782
|
}
|
|
62658
62783
|
else {
|
|
62784
|
+
state.columnMove.x = x - state.table.tableX;
|
|
62785
|
+
state.columnMove.y = y - state.table.tableY;
|
|
62786
|
+
state.columnMove.colTarget = targetCell.col;
|
|
62787
|
+
state.columnMove.rowTarget = targetCell.row;
|
|
62659
62788
|
state.updateCursor('grabbing');
|
|
62660
|
-
|
|
62661
|
-
|
|
62662
|
-
|
|
62663
|
-
|
|
62664
|
-
|
|
62665
|
-
|
|
62666
|
-
|
|
62667
|
-
|
|
62668
|
-
|
|
62669
|
-
|
|
62670
|
-
|
|
62671
|
-
|
|
62672
|
-
|
|
62673
|
-
|
|
62674
|
-
|
|
62675
|
-
|
|
62676
|
-
|
|
62677
|
-
|
|
62678
|
-
|
|
62679
|
-
|
|
62680
|
-
|
|
62681
|
-
|
|
62682
|
-
|
|
62683
|
-
}
|
|
62684
|
-
}
|
|
62685
|
-
else if (cellLocation === 'rowHeader' ||
|
|
62686
|
-
state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) {
|
|
62687
|
-
backY = state.columnMove.y;
|
|
62688
|
-
if (state.table.isFrozenRow(row)) {
|
|
62689
|
-
lineY =
|
|
62690
|
-
state.columnMove.rowTarget >= state.columnMove.rowSource
|
|
62691
|
-
? state.table.getRowsHeight(0, state.columnMove.rowTarget)
|
|
62692
|
-
: state.table.getRowsHeight(0, state.columnMove.rowTarget - 1);
|
|
62693
|
-
}
|
|
62694
|
-
else if (state.table.isBottomFrozenRow(row)) {
|
|
62695
|
-
lineY = state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1);
|
|
62789
|
+
let lineX;
|
|
62790
|
+
let backX;
|
|
62791
|
+
let lineY;
|
|
62792
|
+
let backY;
|
|
62793
|
+
const cellLocation = state.table.getCellLocation(state.columnMove.colSource, state.columnMove.rowSource);
|
|
62794
|
+
if (cellLocation === 'columnHeader') {
|
|
62795
|
+
backX = state.columnMove.x;
|
|
62796
|
+
if (state.table.isLeftFrozenColumn(col)) {
|
|
62797
|
+
lineX =
|
|
62798
|
+
state.columnMove.colTarget >= state.columnMove.colSource
|
|
62799
|
+
? state.table.getColsWidth(0, state.columnMove.colTarget)
|
|
62800
|
+
: state.table.getColsWidth(0, state.columnMove.colTarget - 1);
|
|
62801
|
+
}
|
|
62802
|
+
else if (state.table.isRightFrozenColumn(col)) {
|
|
62803
|
+
lineX = state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1);
|
|
62804
|
+
}
|
|
62805
|
+
else {
|
|
62806
|
+
lineX =
|
|
62807
|
+
(state.columnMove.colTarget >= state.columnMove.colSource
|
|
62808
|
+
? state.table.getColsWidth(0, state.columnMove.colTarget)
|
|
62809
|
+
: state.table.getColsWidth(0, state.columnMove.colTarget - 1)) -
|
|
62810
|
+
state.table.stateManager.scroll.horizontalBarPos;
|
|
62811
|
+
}
|
|
62696
62812
|
}
|
|
62697
|
-
else
|
|
62698
|
-
|
|
62699
|
-
|
|
62700
|
-
|
|
62701
|
-
|
|
62702
|
-
state.
|
|
62813
|
+
else if (cellLocation === 'rowHeader' ||
|
|
62814
|
+
state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) {
|
|
62815
|
+
backY = state.columnMove.y;
|
|
62816
|
+
if (state.table.isFrozenRow(row)) {
|
|
62817
|
+
lineY =
|
|
62818
|
+
state.columnMove.rowTarget >= state.columnMove.rowSource
|
|
62819
|
+
? state.table.getRowsHeight(0, state.columnMove.rowTarget)
|
|
62820
|
+
: state.table.getRowsHeight(0, state.columnMove.rowTarget - 1);
|
|
62821
|
+
}
|
|
62822
|
+
else if (state.table.isBottomFrozenRow(row)) {
|
|
62823
|
+
lineY =
|
|
62824
|
+
state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1);
|
|
62825
|
+
}
|
|
62826
|
+
else {
|
|
62827
|
+
lineY =
|
|
62828
|
+
(state.columnMove.rowTarget >= state.columnMove.rowSource
|
|
62829
|
+
? state.table.getRowsHeight(0, state.columnMove.rowTarget)
|
|
62830
|
+
: state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) -
|
|
62831
|
+
state.table.stateManager.scroll.verticalBarPos;
|
|
62832
|
+
}
|
|
62703
62833
|
}
|
|
62834
|
+
state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY);
|
|
62835
|
+
state.table.scenegraph.updateNextFrame();
|
|
62704
62836
|
}
|
|
62705
|
-
state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY);
|
|
62706
|
-
state.table.scenegraph.updateNextFrame();
|
|
62707
62837
|
}
|
|
62708
62838
|
function endMoveCol(state) {
|
|
62709
62839
|
if ('canMoveHeaderPosition' in state.table.internalProps.layoutMap &&
|
|
@@ -63870,7 +64000,7 @@
|
|
|
63870
64000
|
setTimeout(() => {
|
|
63871
64001
|
this.columnResize.resizing = false;
|
|
63872
64002
|
}, 0);
|
|
63873
|
-
this.table.scenegraph.
|
|
64003
|
+
this.table.scenegraph.updateChartSizeForResizeColWidth(this.columnResize.col);
|
|
63874
64004
|
this.checkFrozen();
|
|
63875
64005
|
this.table.scenegraph.component.hideResizeCol();
|
|
63876
64006
|
this.table.scenegraph.updateNextFrame();
|
|
@@ -63893,7 +64023,7 @@
|
|
|
63893
64023
|
setTimeout(() => {
|
|
63894
64024
|
this.rowResize.resizing = false;
|
|
63895
64025
|
}, 0);
|
|
63896
|
-
this.table.scenegraph.
|
|
64026
|
+
this.table.scenegraph.updateChartSizeForResizeColWidth(this.rowResize.row);
|
|
63897
64027
|
this.table.scenegraph.component.hideResizeRow();
|
|
63898
64028
|
this.table.scenegraph.updateNextFrame();
|
|
63899
64029
|
}
|
|
@@ -64138,7 +64268,7 @@
|
|
|
64138
64268
|
if (autoHide) {
|
|
64139
64269
|
clearTimeout(this._clearVerticalScrollBar);
|
|
64140
64270
|
this._clearVerticalScrollBar = setTimeout(() => {
|
|
64141
|
-
this.table.scenegraph
|
|
64271
|
+
this.table.scenegraph?.component.hideVerticalScrollBar();
|
|
64142
64272
|
}, 1000);
|
|
64143
64273
|
}
|
|
64144
64274
|
}
|
|
@@ -64150,7 +64280,7 @@
|
|
|
64150
64280
|
if (autoHide) {
|
|
64151
64281
|
clearTimeout(this._clearHorizontalScrollBar);
|
|
64152
64282
|
this._clearHorizontalScrollBar = setTimeout(() => {
|
|
64153
|
-
this.table.scenegraph
|
|
64283
|
+
this.table.scenegraph?.component.hideHorizontalScrollBar();
|
|
64154
64284
|
}, 1000);
|
|
64155
64285
|
}
|
|
64156
64286
|
}
|
|
@@ -65642,6 +65772,7 @@
|
|
|
65642
65772
|
eventManager.dealTableHover();
|
|
65643
65773
|
});
|
|
65644
65774
|
handler.on(table.getElement(), 'wheel', (e) => {
|
|
65775
|
+
table.editorManager?.completeEdit();
|
|
65645
65776
|
if (table.eventManager._enableTableScroll) {
|
|
65646
65777
|
handleWhell(e, stateManager);
|
|
65647
65778
|
}
|
|
@@ -65734,16 +65865,32 @@
|
|
|
65734
65865
|
}
|
|
65735
65866
|
}
|
|
65736
65867
|
else if (e.key === 'Escape') {
|
|
65737
|
-
table.editorManager
|
|
65868
|
+
table.editorManager?.cancelEdit();
|
|
65738
65869
|
}
|
|
65739
65870
|
else if (e.key === 'Enter') {
|
|
65740
|
-
if (table.editorManager
|
|
65871
|
+
if (table.editorManager?.editingEditor) {
|
|
65741
65872
|
handleKeydownListener(e);
|
|
65742
65873
|
table.editorManager.completeEdit();
|
|
65743
65874
|
table.getElement().focus();
|
|
65875
|
+
if (table.options.keyboardOptions?.moveFocusCellOnEnter === true) {
|
|
65876
|
+
const targetCol = stateManager.select.cellPos.col;
|
|
65877
|
+
const targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row + 1));
|
|
65878
|
+
if (isCellDisableSelect(table, targetCol, targetRow)) {
|
|
65879
|
+
return;
|
|
65880
|
+
}
|
|
65881
|
+
table.selectCell(targetCol, targetRow, e.shiftKey);
|
|
65882
|
+
}
|
|
65744
65883
|
return;
|
|
65745
65884
|
}
|
|
65746
|
-
if (
|
|
65885
|
+
if (table.options.keyboardOptions?.moveFocusCellOnEnter === true) {
|
|
65886
|
+
const targetCol = stateManager.select.cellPos.col;
|
|
65887
|
+
const targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row + 1));
|
|
65888
|
+
if (isCellDisableSelect(table, targetCol, targetRow)) {
|
|
65889
|
+
return;
|
|
65890
|
+
}
|
|
65891
|
+
table.selectCell(targetCol, targetRow, e.shiftKey);
|
|
65892
|
+
}
|
|
65893
|
+
else if ((table.options.keyboardOptions?.editCellOnEnter ?? true) &&
|
|
65747
65894
|
(table.stateManager.select.ranges?.length ?? 0) === 1) {
|
|
65748
65895
|
const startCol = table.stateManager.select.ranges[0].start.col;
|
|
65749
65896
|
const startRow = table.stateManager.select.ranges[0].start.row;
|
|
@@ -65788,6 +65935,16 @@
|
|
|
65788
65935
|
}
|
|
65789
65936
|
}
|
|
65790
65937
|
}
|
|
65938
|
+
else {
|
|
65939
|
+
const editCellTrigger = table.options.editCellTrigger;
|
|
65940
|
+
if ((editCellTrigger === 'keydown' || (Array.isArray(editCellTrigger) && editCellTrigger.includes('keydown'))) &&
|
|
65941
|
+
!table.editorManager?.editingEditor) {
|
|
65942
|
+
const allowedKeys = /^[a-zA-Z0-9+\-*\/%=.,\s]$/;
|
|
65943
|
+
if (e.key.match(allowedKeys)) {
|
|
65944
|
+
table.editorManager.startEditCell(stateManager.select.cellPos.col, stateManager.select.cellPos.row, '');
|
|
65945
|
+
}
|
|
65946
|
+
}
|
|
65947
|
+
}
|
|
65791
65948
|
handleKeydownListener(e);
|
|
65792
65949
|
});
|
|
65793
65950
|
function handleKeydownListener(e) {
|
|
@@ -65920,6 +66077,9 @@
|
|
|
65920
66077
|
if (e.width === 0 && e.height === 0) {
|
|
65921
66078
|
return;
|
|
65922
66079
|
}
|
|
66080
|
+
if (table.autoFillWidth || table.autoFillHeight) {
|
|
66081
|
+
table.editorManager?.completeEdit();
|
|
66082
|
+
}
|
|
65923
66083
|
if (!isValid$1(table.options.pixelRatio)) {
|
|
65924
66084
|
table.setPixelRatio(getPixelRatio());
|
|
65925
66085
|
}
|
|
@@ -66074,10 +66234,10 @@
|
|
|
66074
66234
|
table.eventManager.isDown = false;
|
|
66075
66235
|
table.eventManager.isDraging = false;
|
|
66076
66236
|
table.eventManager.inertiaScroll.endInertia();
|
|
66077
|
-
if (stateManager.isResizeCol()) {
|
|
66237
|
+
if (stateManager.interactionState === 'grabing' && stateManager.isResizeCol()) {
|
|
66078
66238
|
endResizeCol(table);
|
|
66079
66239
|
}
|
|
66080
|
-
else if (stateManager.isResizeRow()) {
|
|
66240
|
+
else if (stateManager.interactionState === 'grabing' && stateManager.isResizeRow()) {
|
|
66081
66241
|
endResizeRow(table);
|
|
66082
66242
|
}
|
|
66083
66243
|
};
|
|
@@ -66505,6 +66665,9 @@
|
|
|
66505
66665
|
}
|
|
66506
66666
|
updateEventBinder() {
|
|
66507
66667
|
setTimeout(() => {
|
|
66668
|
+
if (this.table.isReleased) {
|
|
66669
|
+
return;
|
|
66670
|
+
}
|
|
66508
66671
|
if (checkHaveTextStick(this.table) && this.handleTextStickBindId?.length === 0) {
|
|
66509
66672
|
this.handleTextStickBindId.push(this.table.on(TABLE_EVENT_TYPE.SCROLL, e => {
|
|
66510
66673
|
handleTextStick(this.table);
|
|
@@ -66566,7 +66729,7 @@
|
|
|
66566
66729
|
else if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
66567
66730
|
this.table.scenegraph.updateAutoColWidth(resizeCol.col);
|
|
66568
66731
|
this.table.internalProps._widthResizedColMap.add(resizeCol.col);
|
|
66569
|
-
this.table.scenegraph.
|
|
66732
|
+
this.table.scenegraph.updateChartSizeForResizeColWidth(resizeCol.col);
|
|
66570
66733
|
const state = this.table.stateManager;
|
|
66571
66734
|
if (state.columnResize.col < state.table.frozenColCount &&
|
|
66572
66735
|
!state.table.isPivotTable() &&
|
|
@@ -66708,6 +66871,9 @@
|
|
|
66708
66871
|
}
|
|
66709
66872
|
checkColumnResize(eventArgsSet, update) {
|
|
66710
66873
|
const { eventArgs } = eventArgsSet;
|
|
66874
|
+
if (this.table.options.enableTreeStickCell && !eventArgs) {
|
|
66875
|
+
return false;
|
|
66876
|
+
}
|
|
66711
66877
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgs?.targetCell);
|
|
66712
66878
|
if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
66713
66879
|
if (update) {
|
|
@@ -70845,12 +71011,13 @@
|
|
|
70845
71011
|
scenegraph;
|
|
70846
71012
|
stateManager;
|
|
70847
71013
|
eventManager;
|
|
71014
|
+
editorManager;
|
|
70848
71015
|
_pixelRatio;
|
|
70849
71016
|
static get EVENT_TYPE() {
|
|
70850
71017
|
return TABLE_EVENT_TYPE;
|
|
70851
71018
|
}
|
|
70852
71019
|
options;
|
|
70853
|
-
version = "1.6.0-alpha.
|
|
71020
|
+
version = "1.6.0-alpha.2";
|
|
70854
71021
|
pagination;
|
|
70855
71022
|
id = `VTable${Date.now()}`;
|
|
70856
71023
|
headerStyleCache;
|
|
@@ -71476,6 +71643,7 @@
|
|
|
71476
71643
|
}
|
|
71477
71644
|
setRowHeight(row, height) {
|
|
71478
71645
|
this.scenegraph.setRowHeight(row, height);
|
|
71646
|
+
this.scenegraph.updateChartSizeForResizeRowHeight(row);
|
|
71479
71647
|
this.internalProps._heightResizedRowMap.add(row);
|
|
71480
71648
|
}
|
|
71481
71649
|
getRowsHeight(startRow, endRow) {
|
|
@@ -71573,6 +71741,7 @@
|
|
|
71573
71741
|
}
|
|
71574
71742
|
setColWidth(col, width) {
|
|
71575
71743
|
this.scenegraph.setColWidth(col, width);
|
|
71744
|
+
this.scenegraph.updateChartSizeForResizeColWidth(col);
|
|
71576
71745
|
this.internalProps._widthResizedColMap.add(col);
|
|
71577
71746
|
}
|
|
71578
71747
|
_clearColRangeWidthsMap(col) {
|
|
@@ -73362,6 +73531,9 @@
|
|
|
73362
73531
|
setMinMaxLimitWidth(setWidth = false) {
|
|
73363
73532
|
const internalProps = this.internalProps;
|
|
73364
73533
|
for (let col = 0; col < internalProps.layoutMap.columnWidths.length; col++) {
|
|
73534
|
+
if (this.internalProps._widthResizedColMap.has(col)) {
|
|
73535
|
+
continue;
|
|
73536
|
+
}
|
|
73365
73537
|
const { width, minWidth, maxWidth } = internalProps.layoutMap.columnWidths?.[col] ?? {};
|
|
73366
73538
|
if (setWidth &&
|
|
73367
73539
|
width &&
|
|
@@ -73379,9 +73551,9 @@
|
|
|
73379
73551
|
setSortedIndexMap(field, filedMap) {
|
|
73380
73552
|
this.dataSource?.setSortedIndexMap(field, filedMap);
|
|
73381
73553
|
}
|
|
73382
|
-
checkReactCustomLayout() {
|
|
73554
|
+
checkReactCustomLayout(removeAllContainer) {
|
|
73383
73555
|
if (!this.reactCustomLayout) {
|
|
73384
|
-
this.reactCustomLayout = new ReactCustomLayout(this);
|
|
73556
|
+
this.reactCustomLayout = new ReactCustomLayout(removeAllContainer, this);
|
|
73385
73557
|
}
|
|
73386
73558
|
}
|
|
73387
73559
|
get bodyDomContainer() {
|
|
@@ -75784,10 +75956,12 @@
|
|
|
75784
75956
|
this.bindEvent();
|
|
75785
75957
|
}
|
|
75786
75958
|
bindEvent() {
|
|
75787
|
-
|
|
75959
|
+
this.table.internalProps.handler;
|
|
75960
|
+
const editCellTrigger = this.table.options.editCellTrigger;
|
|
75788
75961
|
this.table.on(TABLE_EVENT_TYPE.DBLCLICK_CELL, e => {
|
|
75789
|
-
if (!
|
|
75790
|
-
|
|
75962
|
+
if (!editCellTrigger ||
|
|
75963
|
+
editCellTrigger === 'doubleclick' ||
|
|
75964
|
+
(Array.isArray(editCellTrigger) && editCellTrigger.includes('doubleclick'))) {
|
|
75791
75965
|
const { col, row } = e;
|
|
75792
75966
|
const eventArgsSet = getCellEventArgsSet(e.federatedEvent);
|
|
75793
75967
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.targetCell);
|
|
@@ -75798,19 +75972,11 @@
|
|
|
75798
75972
|
}
|
|
75799
75973
|
});
|
|
75800
75974
|
this.table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
|
|
75801
|
-
if (
|
|
75975
|
+
if (editCellTrigger === 'click' || (Array.isArray(editCellTrigger) && editCellTrigger.includes('click'))) {
|
|
75802
75976
|
const { col, row } = e;
|
|
75803
75977
|
this.startEditCell(col, row);
|
|
75804
75978
|
}
|
|
75805
75979
|
});
|
|
75806
|
-
handler.on(this.table.getElement(), 'wheel', (e) => {
|
|
75807
|
-
this.completeEdit();
|
|
75808
|
-
});
|
|
75809
|
-
handler.on(this.table.getElement(), 'resize', (e) => {
|
|
75810
|
-
if (this.table.autoFillWidth || this.table.autoFillHeight) {
|
|
75811
|
-
this.completeEdit();
|
|
75812
|
-
}
|
|
75813
|
-
});
|
|
75814
75980
|
}
|
|
75815
75981
|
startEditCell(col, row, value) {
|
|
75816
75982
|
const editor = this.table.getEditor(col, row);
|
|
@@ -76496,7 +76662,7 @@
|
|
|
76496
76662
|
|
|
76497
76663
|
class ListTable extends BaseTable {
|
|
76498
76664
|
showHeader = true;
|
|
76499
|
-
|
|
76665
|
+
listTreeStickCellPlugin;
|
|
76500
76666
|
constructor(container, options) {
|
|
76501
76667
|
if (Env.mode === 'node') {
|
|
76502
76668
|
options = container;
|
|
@@ -76555,6 +76721,10 @@
|
|
|
76555
76721
|
this.internalProps.emptyTip.resetVisible();
|
|
76556
76722
|
}
|
|
76557
76723
|
}
|
|
76724
|
+
if (options.enableTreeStickCell) {
|
|
76725
|
+
const ListTreeStickCellPlugin = Factory.getComponent('listTreeStickCellPlugin');
|
|
76726
|
+
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
76727
|
+
}
|
|
76558
76728
|
setTimeout(() => {
|
|
76559
76729
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
76560
76730
|
}, 0);
|
|
@@ -76767,7 +76937,7 @@
|
|
|
76767
76937
|
internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode;
|
|
76768
76938
|
this.pagination = options.pagination;
|
|
76769
76939
|
internalProps.sortState = options.sortState;
|
|
76770
|
-
internalProps.dataConfig = {};
|
|
76940
|
+
internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {};
|
|
76771
76941
|
this.showHeader = options.showHeader ?? true;
|
|
76772
76942
|
internalProps.columns = options.columns
|
|
76773
76943
|
? cloneDeepSpec(options.columns, ['children'])
|
|
@@ -77062,7 +77232,7 @@
|
|
|
77062
77232
|
notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight;
|
|
77063
77233
|
}
|
|
77064
77234
|
if (this.widthMode === 'adaptive' || notFillWidth || this.heightMode === 'adaptive' || notFillHeight) {
|
|
77065
|
-
this.scenegraph.
|
|
77235
|
+
this.scenegraph.updateChartSizeForResizeColWidth(0);
|
|
77066
77236
|
}
|
|
77067
77237
|
}
|
|
77068
77238
|
}
|
|
@@ -77257,7 +77427,7 @@
|
|
|
77257
77427
|
this.render();
|
|
77258
77428
|
if (isValid$1(oldHoverState.col) && isValid$1(oldHoverState.row) && oldHoverState.col >= 0 && oldHoverState.row >= 0) {
|
|
77259
77429
|
setTimeout(() => {
|
|
77260
|
-
this.internalProps
|
|
77430
|
+
this.internalProps?.tooltipHandler.showTooltip(oldHoverState.col, oldHoverState.row);
|
|
77261
77431
|
}, 0);
|
|
77262
77432
|
}
|
|
77263
77433
|
}
|
|
@@ -78513,6 +78683,16 @@
|
|
|
78513
78683
|
}));
|
|
78514
78684
|
legend.name = 'legend';
|
|
78515
78685
|
this.legendComponent = legend;
|
|
78686
|
+
if (this.visible === false) {
|
|
78687
|
+
legend.setAttributes({
|
|
78688
|
+
maxWidth: 0,
|
|
78689
|
+
width: 0,
|
|
78690
|
+
maxHeight: 0,
|
|
78691
|
+
height: 0,
|
|
78692
|
+
clip: true
|
|
78693
|
+
});
|
|
78694
|
+
legend.hideAll();
|
|
78695
|
+
}
|
|
78516
78696
|
this.table.scenegraph.stage.defaultLayer.appendChild(legend);
|
|
78517
78697
|
this.adjustTableSize(attrs);
|
|
78518
78698
|
}
|
|
@@ -80123,6 +80303,249 @@
|
|
|
80123
80303
|
Factory.registerComponent('tooltipHandler', TooltipHandler);
|
|
80124
80304
|
};
|
|
80125
80305
|
|
|
80306
|
+
class ListTreeStickCellPlugin {
|
|
80307
|
+
table;
|
|
80308
|
+
titleRows = [];
|
|
80309
|
+
showedTitleRows = [];
|
|
80310
|
+
rowNow = -1;
|
|
80311
|
+
skipStartRow = -1;
|
|
80312
|
+
skipEndRow = -1;
|
|
80313
|
+
constructor(table) {
|
|
80314
|
+
this.table = table;
|
|
80315
|
+
this.table.on('scroll', e => {
|
|
80316
|
+
if (e.scrollDirection !== 'vertical') {
|
|
80317
|
+
return;
|
|
80318
|
+
}
|
|
80319
|
+
this.updateGroupTitle();
|
|
80320
|
+
});
|
|
80321
|
+
this.table.on('resize_column', e => {
|
|
80322
|
+
this.updateGroupTitle();
|
|
80323
|
+
});
|
|
80324
|
+
}
|
|
80325
|
+
updateGroupTitle() {
|
|
80326
|
+
if (this.table.scrollTop === 0) {
|
|
80327
|
+
this.titleRows = [];
|
|
80328
|
+
this.showedTitleRows = [];
|
|
80329
|
+
}
|
|
80330
|
+
else if (this.skipStartRow !== -1 &&
|
|
80331
|
+
this.skipEndRow !== -1 &&
|
|
80332
|
+
this.skipStartRow !== this.table.scenegraph.proxy.bodyTopRow - 1) {
|
|
80333
|
+
if (this.table.scenegraph.proxy.screenTopRow <= this.skipStartRow ||
|
|
80334
|
+
this.table.scenegraph.proxy.screenTopRow >= this.skipEndRow) {
|
|
80335
|
+
this.skipStartRow = -1;
|
|
80336
|
+
this.skipEndRow = -1;
|
|
80337
|
+
this.updateGroupTitleInfo();
|
|
80338
|
+
}
|
|
80339
|
+
}
|
|
80340
|
+
else {
|
|
80341
|
+
this.skipStartRow = -1;
|
|
80342
|
+
this.skipEndRow = -1;
|
|
80343
|
+
this.updateGroupTitleInfo();
|
|
80344
|
+
}
|
|
80345
|
+
this.updateScenegraph();
|
|
80346
|
+
}
|
|
80347
|
+
updateGroupTitleInfo() {
|
|
80348
|
+
this.rowNow = this.table.scenegraph.proxy.screenTopRow + this.titleRows.length;
|
|
80349
|
+
const recordIndex = this.table.getRecordIndexByCell(0, this.rowNow);
|
|
80350
|
+
const nextRecordIndex = this.table.getRecordIndexByCell(0, this.rowNow + 1);
|
|
80351
|
+
this.getTitleRowsByRecordIndex(recordIndex, nextRecordIndex);
|
|
80352
|
+
}
|
|
80353
|
+
getTitleRowsByRecordIndex(recordIndex, nextRecordIndex) {
|
|
80354
|
+
if (!isArray$1(recordIndex)) {
|
|
80355
|
+
recordIndex = [recordIndex];
|
|
80356
|
+
}
|
|
80357
|
+
if (!isArray$1(nextRecordIndex)) {
|
|
80358
|
+
nextRecordIndex = [nextRecordIndex];
|
|
80359
|
+
}
|
|
80360
|
+
for (let i = 0; i < recordIndex.length; i++) {
|
|
80361
|
+
const index = recordIndex.slice(0, i + 1);
|
|
80362
|
+
this.table.dataSource.getRaw(index);
|
|
80363
|
+
}
|
|
80364
|
+
const titleRows = [];
|
|
80365
|
+
const isTitle = nextRecordIndex.length === recordIndex.length + 1;
|
|
80366
|
+
let titleIndex = recordIndex.slice(0, !isTitle ? recordIndex.length - 1 : recordIndex.length);
|
|
80367
|
+
const currentIndexedData = this.table.dataSource.currentIndexedData;
|
|
80368
|
+
const startIndex = this.rowNow - this.table.columnHeaderLevelCount;
|
|
80369
|
+
for (let i = startIndex; i >= 0; i--) {
|
|
80370
|
+
const currentIndex = currentIndexedData[i];
|
|
80371
|
+
if (isArray$1(currentIndex) && titleIndex.length === currentIndex.length) {
|
|
80372
|
+
let isMatch = true;
|
|
80373
|
+
for (let j = 0; j < currentIndex.length; j++) {
|
|
80374
|
+
if (currentIndex[j] !== titleIndex[j]) {
|
|
80375
|
+
isMatch = false;
|
|
80376
|
+
break;
|
|
80377
|
+
}
|
|
80378
|
+
}
|
|
80379
|
+
if (isMatch) {
|
|
80380
|
+
titleRows.push(i + this.table.columnHeaderLevelCount);
|
|
80381
|
+
titleIndex = titleIndex.slice(0, titleIndex.length - 1);
|
|
80382
|
+
}
|
|
80383
|
+
}
|
|
80384
|
+
else if (currentIndex === recordIndex[0]) {
|
|
80385
|
+
titleRows.push(i + this.table.columnHeaderLevelCount);
|
|
80386
|
+
break;
|
|
80387
|
+
}
|
|
80388
|
+
}
|
|
80389
|
+
this.titleRows = titleRows.reverse();
|
|
80390
|
+
}
|
|
80391
|
+
updateScenegraph() {
|
|
80392
|
+
const { table } = this;
|
|
80393
|
+
const { shadowGroup, shadowGroupFrozen } = prepareShadowRoot(table);
|
|
80394
|
+
this.showedTitleRows.length = 0;
|
|
80395
|
+
let skip = 0;
|
|
80396
|
+
for (let col = 0; col < table.colCount; col++) {
|
|
80397
|
+
let colGroup;
|
|
80398
|
+
if (col < table.frozenColCount) {
|
|
80399
|
+
colGroup = new Group$1({
|
|
80400
|
+
x: table.getColsWidth(0, col - 1),
|
|
80401
|
+
y: table.getFrozenRowsHeight()
|
|
80402
|
+
});
|
|
80403
|
+
shadowGroupFrozen.add(colGroup);
|
|
80404
|
+
}
|
|
80405
|
+
else {
|
|
80406
|
+
colGroup = new Group$1({
|
|
80407
|
+
x: table.getColsWidth(table.frozenColCount, col - 1),
|
|
80408
|
+
y: table.getFrozenRowsHeight()
|
|
80409
|
+
});
|
|
80410
|
+
shadowGroup.add(colGroup);
|
|
80411
|
+
}
|
|
80412
|
+
colGroup.col = col;
|
|
80413
|
+
for (let i = 0; i < this.titleRows.length; i++) {
|
|
80414
|
+
const row = this.titleRows[i];
|
|
80415
|
+
if (isSkipRow(row, this.rowNow, table.scenegraph.proxy.screenTopRow, this.titleRows)) {
|
|
80416
|
+
col === 0 && skip++;
|
|
80417
|
+
continue;
|
|
80418
|
+
}
|
|
80419
|
+
if (col === 0) {
|
|
80420
|
+
this.showedTitleRows.push(row);
|
|
80421
|
+
}
|
|
80422
|
+
const cell = table.scenegraph.getCell(col, row);
|
|
80423
|
+
if (cell.role === 'cell') {
|
|
80424
|
+
const newCell = cloneGraphic(cell);
|
|
80425
|
+
newCell.setAttributes({
|
|
80426
|
+
y: i * 40
|
|
80427
|
+
});
|
|
80428
|
+
colGroup.add(newCell);
|
|
80429
|
+
}
|
|
80430
|
+
else {
|
|
80431
|
+
const newCell = updateCell$1(col, row, table, true, true);
|
|
80432
|
+
newCell.setAttributes({
|
|
80433
|
+
y: i * 40
|
|
80434
|
+
});
|
|
80435
|
+
colGroup.add(newCell);
|
|
80436
|
+
}
|
|
80437
|
+
}
|
|
80438
|
+
}
|
|
80439
|
+
if (skip > 0 && this.skipStartRow === -1 && this.skipEndRow === -1) {
|
|
80440
|
+
this.skipStartRow = table.scenegraph.proxy.screenTopRow - 1;
|
|
80441
|
+
this.skipEndRow = table.scenegraph.proxy.screenTopRow + 1;
|
|
80442
|
+
}
|
|
80443
|
+
}
|
|
80444
|
+
}
|
|
80445
|
+
function isSkipRow(row, topRow, screenTopRow, titleRows) {
|
|
80446
|
+
if (row === topRow && row !== screenTopRow + titleRows.length - 1) {
|
|
80447
|
+
return true;
|
|
80448
|
+
}
|
|
80449
|
+
const rowIndex = titleRows.indexOf(row);
|
|
80450
|
+
const rowLimit = screenTopRow + rowIndex + 1;
|
|
80451
|
+
if (row === rowLimit && row < topRow) {
|
|
80452
|
+
return true;
|
|
80453
|
+
}
|
|
80454
|
+
return false;
|
|
80455
|
+
}
|
|
80456
|
+
function cloneGraphic(graphic) {
|
|
80457
|
+
const newGraphic = graphic.clone();
|
|
80458
|
+
newGraphic.role = graphic.role;
|
|
80459
|
+
newGraphic.col = graphic.col;
|
|
80460
|
+
newGraphic.row = graphic.row;
|
|
80461
|
+
newGraphic.mergeStartCol = graphic.mergeStartCol;
|
|
80462
|
+
newGraphic.mergeStartRow = graphic.mergeStartRow;
|
|
80463
|
+
newGraphic.mergeEndCol = graphic.mergeEndCol;
|
|
80464
|
+
newGraphic.mergeEndRow = graphic.mergeEndRow;
|
|
80465
|
+
newGraphic.contentWidth = graphic.contentWidth;
|
|
80466
|
+
newGraphic.contentHeight = graphic.contentHeight;
|
|
80467
|
+
if (newGraphic.role === 'cell') {
|
|
80468
|
+
const hackRect = createRect({
|
|
80469
|
+
x: 0,
|
|
80470
|
+
y: 0,
|
|
80471
|
+
width: newGraphic.attribute.width,
|
|
80472
|
+
height: newGraphic.attribute.height
|
|
80473
|
+
});
|
|
80474
|
+
newGraphic.add(hackRect);
|
|
80475
|
+
}
|
|
80476
|
+
if (graphic.type === 'group') {
|
|
80477
|
+
const newGroup = newGraphic;
|
|
80478
|
+
graphic.forEachChildren(child => {
|
|
80479
|
+
const newChild = cloneGraphic(child);
|
|
80480
|
+
newGroup.add(newChild);
|
|
80481
|
+
});
|
|
80482
|
+
}
|
|
80483
|
+
return newGraphic;
|
|
80484
|
+
}
|
|
80485
|
+
function prepareShadowRoot(table) {
|
|
80486
|
+
const colHeaderGroup = table.scenegraph.colHeaderGroup;
|
|
80487
|
+
const cornerHeaderGroup = table.scenegraph.cornerHeaderGroup;
|
|
80488
|
+
if (!colHeaderGroup.border) {
|
|
80489
|
+
const hackBorder = createRect({
|
|
80490
|
+
x: 0,
|
|
80491
|
+
y: 0,
|
|
80492
|
+
width: 0,
|
|
80493
|
+
height: 0,
|
|
80494
|
+
cursor: 'pointer'
|
|
80495
|
+
});
|
|
80496
|
+
colHeaderGroup.add(hackBorder);
|
|
80497
|
+
colHeaderGroup.border = hackBorder;
|
|
80498
|
+
hackBorder.attachShadow(hackBorder.shadowRoot);
|
|
80499
|
+
hackBorder.name = 'border-rect';
|
|
80500
|
+
hackBorder.addEventListener('click', (e) => {
|
|
80501
|
+
const titleRows = table.listTreeStickCellPlugin.titleRows;
|
|
80502
|
+
const { shadowTarget } = e.pickParams;
|
|
80503
|
+
const cellGroup = getTargetCell(shadowTarget);
|
|
80504
|
+
const { col, row } = cellGroup;
|
|
80505
|
+
const rowIndex = titleRows.indexOf(row);
|
|
80506
|
+
scrollToRow(row - rowIndex, table);
|
|
80507
|
+
});
|
|
80508
|
+
}
|
|
80509
|
+
if (!cornerHeaderGroup.border) {
|
|
80510
|
+
const hackBorder = createRect({
|
|
80511
|
+
x: 0,
|
|
80512
|
+
y: 0,
|
|
80513
|
+
width: 0,
|
|
80514
|
+
height: 0,
|
|
80515
|
+
cursor: 'pointer'
|
|
80516
|
+
});
|
|
80517
|
+
cornerHeaderGroup.add(hackBorder);
|
|
80518
|
+
cornerHeaderGroup.border = hackBorder;
|
|
80519
|
+
hackBorder.attachShadow(hackBorder.shadowRoot);
|
|
80520
|
+
hackBorder.name = 'border-rect';
|
|
80521
|
+
hackBorder.addEventListener('click', (e) => {
|
|
80522
|
+
const titleRows = table.listTreeStickCellPlugin.titleRows;
|
|
80523
|
+
const { shadowTarget } = e.pickParams;
|
|
80524
|
+
const cellGroup = getTargetCell(shadowTarget);
|
|
80525
|
+
const { col, row } = cellGroup;
|
|
80526
|
+
const rowIndex = titleRows.indexOf(row);
|
|
80527
|
+
scrollToRow(row - rowIndex, table);
|
|
80528
|
+
});
|
|
80529
|
+
}
|
|
80530
|
+
const shadowGroup = colHeaderGroup.border.shadowRoot;
|
|
80531
|
+
const shadowGroupFrozen = cornerHeaderGroup.border.shadowRoot;
|
|
80532
|
+
shadowGroup.removeAllChild();
|
|
80533
|
+
shadowGroupFrozen.removeAllChild();
|
|
80534
|
+
return { shadowGroup, shadowGroupFrozen };
|
|
80535
|
+
}
|
|
80536
|
+
function scrollToRow(row, table) {
|
|
80537
|
+
const drawRange = table.getDrawRange();
|
|
80538
|
+
if (isValid$1(row) && row >= table.frozenRowCount) {
|
|
80539
|
+
const frozenHeight = table.getFrozenRowsHeight();
|
|
80540
|
+
const top = table.getRowsHeight(0, row - 1);
|
|
80541
|
+
table.scrollTop = Math.min(top - frozenHeight, table.getAllRowsHeight() - drawRange.height) - 1;
|
|
80542
|
+
}
|
|
80543
|
+
table.scenegraph.updateNextFrame();
|
|
80544
|
+
}
|
|
80545
|
+
const registerListTreeStickCellPlugin = () => {
|
|
80546
|
+
Factory.registerComponent('listTreeStickCellPlugin', ListTreeStickCellPlugin);
|
|
80547
|
+
};
|
|
80548
|
+
|
|
80126
80549
|
const builtin = {};
|
|
80127
80550
|
function get() {
|
|
80128
80551
|
return extend(builtin, chartTypes);
|
|
@@ -81717,6 +82140,7 @@
|
|
|
81717
82140
|
registerMenu();
|
|
81718
82141
|
registerTitle();
|
|
81719
82142
|
registerTooltip();
|
|
82143
|
+
registerListTreeStickCellPlugin();
|
|
81720
82144
|
registerChartCell();
|
|
81721
82145
|
registerCheckboxCell();
|
|
81722
82146
|
registerImageCell();
|
|
@@ -82241,6 +82665,7 @@
|
|
|
82241
82665
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82242
82666
|
},
|
|
82243
82667
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82668
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82244
82669
|
pivotInfo: {
|
|
82245
82670
|
value: dimensionInfo?.title ?? '',
|
|
82246
82671
|
dimensionKey,
|
|
@@ -82287,6 +82712,7 @@
|
|
|
82287
82712
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82288
82713
|
},
|
|
82289
82714
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82715
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82290
82716
|
pivotInfo: {
|
|
82291
82717
|
value: dimensionInfo?.title ?? '',
|
|
82292
82718
|
dimensionKey,
|
|
@@ -82337,6 +82763,7 @@
|
|
|
82337
82763
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82338
82764
|
},
|
|
82339
82765
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82766
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82340
82767
|
pivotInfo: {
|
|
82341
82768
|
value: dimensionInfo?.title ?? '',
|
|
82342
82769
|
dimensionKey,
|
|
@@ -82383,6 +82810,7 @@
|
|
|
82383
82810
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82384
82811
|
},
|
|
82385
82812
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82813
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82386
82814
|
pivotInfo: {
|
|
82387
82815
|
value: dimensionInfo?.title ?? '',
|
|
82388
82816
|
dimensionKey,
|
|
@@ -82428,6 +82856,7 @@
|
|
|
82428
82856
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82429
82857
|
},
|
|
82430
82858
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82859
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82431
82860
|
pivotInfo: {
|
|
82432
82861
|
value: dimensionInfo?.title ?? '',
|
|
82433
82862
|
dimensionKey,
|
|
@@ -83627,6 +84056,9 @@
|
|
|
83627
84056
|
if (this.isSeriesNumberInHeader(target.col, target.row) || this.isSeriesNumberInHeader(source.col, source.row)) {
|
|
83628
84057
|
return false;
|
|
83629
84058
|
}
|
|
84059
|
+
if (this.isCornerHeader(target.col, target.row)) {
|
|
84060
|
+
return false;
|
|
84061
|
+
}
|
|
83630
84062
|
if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
|
|
83631
84063
|
return false;
|
|
83632
84064
|
}
|
|
@@ -83795,14 +84227,14 @@
|
|
|
83795
84227
|
if (isCornerCell) {
|
|
83796
84228
|
if (this.cornerSetting.titleOnDimension === 'row') {
|
|
83797
84229
|
for (let i = 0; i < this.rowDimensionKeys.length; i++) {
|
|
83798
|
-
if (rowHeaderPaths[0]
|
|
84230
|
+
if (rowHeaderPaths[0]?.dimensionKey === this.rowDimensionKeys[i]) {
|
|
83799
84231
|
return { col: i + this.leftRowSeriesNumberColumnCount, row: 0 };
|
|
83800
84232
|
}
|
|
83801
84233
|
}
|
|
83802
84234
|
}
|
|
83803
84235
|
else {
|
|
83804
84236
|
for (let i = 0; i < this.colDimensionKeys.length; i++) {
|
|
83805
|
-
if (colHeaderPaths[0]
|
|
84237
|
+
if (colHeaderPaths[0]?.dimensionKey === this.colDimensionKeys[i]) {
|
|
83806
84238
|
return { col: 0, row: i };
|
|
83807
84239
|
}
|
|
83808
84240
|
}
|
|
@@ -86275,7 +86707,6 @@
|
|
|
86275
86707
|
class PivotTable extends BaseTable {
|
|
86276
86708
|
layoutNodeId = { seqId: 0 };
|
|
86277
86709
|
pivotSortState;
|
|
86278
|
-
editorManager;
|
|
86279
86710
|
dataset;
|
|
86280
86711
|
flatDataToObjects;
|
|
86281
86712
|
constructor(container, options) {
|
|
@@ -87242,7 +87673,7 @@
|
|
|
87242
87673
|
notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight;
|
|
87243
87674
|
}
|
|
87244
87675
|
if (this.widthMode === 'adaptive' || notFillWidth || this.heightMode === 'adaptive' || notFillHeight) {
|
|
87245
|
-
this.scenegraph.
|
|
87676
|
+
this.scenegraph.updateChartSizeForResizeColWidth(0);
|
|
87246
87677
|
}
|
|
87247
87678
|
}
|
|
87248
87679
|
}
|
|
@@ -89334,7 +89765,7 @@
|
|
|
89334
89765
|
}
|
|
89335
89766
|
|
|
89336
89767
|
registerForVrender();
|
|
89337
|
-
const version = "1.6.0-alpha.
|
|
89768
|
+
const version = "1.6.0-alpha.2";
|
|
89338
89769
|
function getIcons() {
|
|
89339
89770
|
return get$2();
|
|
89340
89771
|
}
|