@visactor/vtable 1.6.0-alpha.1 → 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.d.ts +0 -2
- package/cjs/ListTable.js +3 -2
- 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 +4 -4
- 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.js +21 -14
- package/cjs/plugins/list-tree-stick-cell.js.map +1 -1
- 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/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 +2 -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.map +1 -1
- package/dist/vtable.js +282 -108
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +0 -2
- package/es/ListTable.js +3 -2
- 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 +4 -4
- 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.js +22 -15
- package/es/plugins/list-tree-stick-cell.js.map +1 -1
- 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/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 +2 -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.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -45689,6 +45689,9 @@
|
|
|
45689
45689
|
},
|
|
45690
45690
|
get inlineRowBgColor() {
|
|
45691
45691
|
return selectionStyle?.inlineRowBgColor;
|
|
45692
|
+
},
|
|
45693
|
+
get selectionFillMode() {
|
|
45694
|
+
return selectionStyle?.selectionFillMode ?? 'overlay';
|
|
45692
45695
|
}
|
|
45693
45696
|
};
|
|
45694
45697
|
}
|
|
@@ -45810,6 +45813,12 @@
|
|
|
45810
45813
|
? changeColor(that.selectionStyle.cellBgColor, 0.1, false)
|
|
45811
45814
|
: undefined) ??
|
|
45812
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;
|
|
45813
45822
|
}
|
|
45814
45823
|
};
|
|
45815
45824
|
},
|
|
@@ -48660,12 +48669,14 @@
|
|
|
48660
48669
|
};
|
|
48661
48670
|
}
|
|
48662
48671
|
class ReactCustomLayout {
|
|
48672
|
+
removeAllContainer;
|
|
48663
48673
|
table;
|
|
48664
48674
|
customLayoutFuncCache;
|
|
48665
48675
|
reactRemoveGraphicCache;
|
|
48666
48676
|
headerCustomLayoutFuncCache;
|
|
48667
48677
|
headerReactRemoveGraphicCache;
|
|
48668
|
-
constructor(table) {
|
|
48678
|
+
constructor(removeAllContainer, table) {
|
|
48679
|
+
this.removeAllContainer = removeAllContainer;
|
|
48669
48680
|
this.table = table;
|
|
48670
48681
|
this.customLayoutFuncCache = new Map();
|
|
48671
48682
|
this.reactRemoveGraphicCache = new Map();
|
|
@@ -48743,6 +48754,9 @@
|
|
|
48743
48754
|
removeFun(col, row);
|
|
48744
48755
|
}
|
|
48745
48756
|
}
|
|
48757
|
+
clearCache() {
|
|
48758
|
+
this.removeAllContainer();
|
|
48759
|
+
}
|
|
48746
48760
|
}
|
|
48747
48761
|
function getUpdateCustomCellRangeInListTable(componentId, table, isHeaderCustomLayout) {
|
|
48748
48762
|
const rowSeriesNumber = table.internalProps.rowSeriesNumber ? 1 : 0;
|
|
@@ -49296,7 +49310,7 @@
|
|
|
49296
49310
|
return;
|
|
49297
49311
|
}
|
|
49298
49312
|
const cellGroup = getTargetCell(graphic);
|
|
49299
|
-
if (!cellGroup || cellGroup.stage) {
|
|
49313
|
+
if (!cellGroup || !cellGroup.stage) {
|
|
49300
49314
|
return;
|
|
49301
49315
|
}
|
|
49302
49316
|
const table = cellGroup.stage.table;
|
|
@@ -50339,7 +50353,8 @@
|
|
|
50339
50353
|
x: 0,
|
|
50340
50354
|
y: 0,
|
|
50341
50355
|
fill: false,
|
|
50342
|
-
stroke: false
|
|
50356
|
+
stroke: false,
|
|
50357
|
+
pickable: false
|
|
50343
50358
|
});
|
|
50344
50359
|
cellContent.name = 'content';
|
|
50345
50360
|
cellContent.setCellContentOption({
|
|
@@ -50581,7 +50596,7 @@
|
|
|
50581
50596
|
}
|
|
50582
50597
|
newHeight = (cellGroup.contentHeight ?? cellHeight) - (padding[0] + padding[2]);
|
|
50583
50598
|
cellGroup.forEachChildren((child) => {
|
|
50584
|
-
if (child.type === 'rect' || child.type === 'chart') {
|
|
50599
|
+
if (child.type === 'rect' || child.type === 'chart' || child.name === CUSTOM_CONTAINER_NAME) {
|
|
50585
50600
|
return;
|
|
50586
50601
|
}
|
|
50587
50602
|
if (child.name === 'mark') {
|
|
@@ -50600,7 +50615,7 @@
|
|
|
50600
50615
|
}
|
|
50601
50616
|
else if (textBaseline === 'middle' || textBaseline === 'bottom') {
|
|
50602
50617
|
cellGroup.forEachChildren((child) => {
|
|
50603
|
-
if (child.type === 'rect' || child.type === 'chart') {
|
|
50618
|
+
if (child.type === 'rect' || child.type === 'chart' || child.name === CUSTOM_CONTAINER_NAME) {
|
|
50604
50619
|
return;
|
|
50605
50620
|
}
|
|
50606
50621
|
if (child.name === 'mark') {
|
|
@@ -50638,7 +50653,7 @@
|
|
|
50638
50653
|
}
|
|
50639
50654
|
cellGroup.forEachChildren((child) => {
|
|
50640
50655
|
child.setAttribute('dy', 0);
|
|
50641
|
-
if (child.type === 'rect' || child.type === 'chart') ;
|
|
50656
|
+
if (child.type === 'rect' || child.type === 'chart' || child.name === CUSTOM_CONTAINER_NAME) ;
|
|
50642
50657
|
else if (child.name === 'mark') {
|
|
50643
50658
|
child.setAttribute('y', 0);
|
|
50644
50659
|
}
|
|
@@ -52616,8 +52631,8 @@
|
|
|
52616
52631
|
continue;
|
|
52617
52632
|
}
|
|
52618
52633
|
const mergedCell = scene.getCell(col, mergeRow);
|
|
52619
|
-
const customContainer =
|
|
52620
|
-
|
|
52634
|
+
const customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) ||
|
|
52635
|
+
mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
|
|
52621
52636
|
customContainer.removeAllChild();
|
|
52622
52637
|
mergedCell.removeChild(customContainer);
|
|
52623
52638
|
getCustomCellMergeCustom(col, mergeRow, mergedCell, scene.table);
|
|
@@ -52627,7 +52642,11 @@
|
|
|
52627
52642
|
let customRender;
|
|
52628
52643
|
let customLayout;
|
|
52629
52644
|
const cellLocation = scene.table.getCellLocation(col, row);
|
|
52630
|
-
|
|
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') {
|
|
52631
52650
|
const define = scene.table.getHeaderDefine(col, row);
|
|
52632
52651
|
customRender = define?.headerCustomRender;
|
|
52633
52652
|
customLayout = define?.headerCustomLayout;
|
|
@@ -52637,6 +52656,15 @@
|
|
|
52637
52656
|
customRender = define?.customRender || scene.table.customRender;
|
|
52638
52657
|
customLayout = define?.customLayout;
|
|
52639
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
|
+
}
|
|
52640
52668
|
if (customLayout || customRender) {
|
|
52641
52669
|
const style = scene.table._getCellStyle(col, row);
|
|
52642
52670
|
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
@@ -52950,7 +52978,7 @@
|
|
|
52950
52978
|
}
|
|
52951
52979
|
const mergedCell = scene.getCell(mergeCol, row);
|
|
52952
52980
|
const customContainer = mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) ||
|
|
52953
|
-
|
|
52981
|
+
mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
|
|
52954
52982
|
customContainer.removeAllChild();
|
|
52955
52983
|
mergedCell.removeChild(customContainer);
|
|
52956
52984
|
getCustomCellMergeCustom(mergeCol, row, mergedCell, scene.table);
|
|
@@ -52960,7 +52988,11 @@
|
|
|
52960
52988
|
let customRender;
|
|
52961
52989
|
let customLayout;
|
|
52962
52990
|
const cellType = scene.table.getCellLocation(col, row);
|
|
52963
|
-
|
|
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') {
|
|
52964
52996
|
const define = scene.table.getHeaderDefine(col, row);
|
|
52965
52997
|
customRender = define?.headerCustomRender;
|
|
52966
52998
|
customLayout = define?.headerCustomLayout;
|
|
@@ -52970,6 +53002,15 @@
|
|
|
52970
53002
|
customRender = define?.customRender || scene.table.customRender;
|
|
52971
53003
|
customLayout = define?.customLayout;
|
|
52972
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
|
+
}
|
|
52973
53014
|
if (customLayout || customRender) {
|
|
52974
53015
|
const style = scene.table._getCellStyle(col, row);
|
|
52975
53016
|
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
@@ -52979,7 +53020,7 @@
|
|
|
52979
53020
|
width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);
|
|
52980
53021
|
height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);
|
|
52981
53022
|
}
|
|
52982
|
-
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)
|
|
52983
53024
|
? {
|
|
52984
53025
|
start: { col: cellGroup.mergeStartCol, row: cellGroup.mergeStartRow },
|
|
52985
53026
|
end: { col: cellGroup.mergeEndCol, row: cellGroup.mergeEndRow }
|
|
@@ -54678,8 +54719,23 @@
|
|
|
54678
54719
|
return isHandlingChartQueue;
|
|
54679
54720
|
}
|
|
54680
54721
|
function renderChart(chart) {
|
|
54681
|
-
const { axes, dataId, data, spec } = chart.attribute;
|
|
54682
|
-
|
|
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
|
+
}
|
|
54683
54739
|
const viewBox = chart.getViewBox();
|
|
54684
54740
|
if (viewBox.x2 <= viewBox.x1) {
|
|
54685
54741
|
viewBox.x2 = viewBox.x1 + 1;
|
|
@@ -54701,8 +54757,6 @@
|
|
|
54701
54757
|
y1: viewBox.y1 - chart.getRootNode().table.scrollTop,
|
|
54702
54758
|
y2: viewBox.y2 - chart.getRootNode().table.scrollTop
|
|
54703
54759
|
}, false, false);
|
|
54704
|
-
const table = chart.getRootNode().table;
|
|
54705
|
-
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
|
|
54706
54760
|
if (typeof dataId === 'string') {
|
|
54707
54761
|
chartInstance.updateDataSync(dataId, data ?? []);
|
|
54708
54762
|
}
|
|
@@ -55132,6 +55186,15 @@
|
|
|
55132
55186
|
}
|
|
55133
55187
|
}
|
|
55134
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
|
+
}
|
|
55135
55198
|
return selectMode;
|
|
55136
55199
|
}
|
|
55137
55200
|
function isCellDisableSelect(table, col, row) {
|
|
@@ -58856,7 +58919,9 @@
|
|
|
58856
58919
|
const bodyClickLineWidth = theme.selectionStyle?.cellBorderLineWidth;
|
|
58857
58920
|
const rect = createRect({
|
|
58858
58921
|
pickable: false,
|
|
58859
|
-
fill: theme.selectionStyle?.
|
|
58922
|
+
fill: theme.selectionStyle?.selectionFillMode === 'replace'
|
|
58923
|
+
? false
|
|
58924
|
+
: theme.selectionStyle?.cellBgColor ?? 'rgba(0, 0, 255,0.1)',
|
|
58860
58925
|
lineWidth: bodyClickLineWidth,
|
|
58861
58926
|
stroke: strokes.map(stroke => {
|
|
58862
58927
|
if (stroke) {
|
|
@@ -59731,7 +59796,7 @@
|
|
|
59731
59796
|
}
|
|
59732
59797
|
}
|
|
59733
59798
|
|
|
59734
|
-
function
|
|
59799
|
+
function updateChartSizeForResizeColWidth(scenegraph, col) {
|
|
59735
59800
|
for (let c = col; c <= scenegraph.proxy.colEnd; c++) {
|
|
59736
59801
|
const columnGroup = scenegraph.getColGroup(c);
|
|
59737
59802
|
columnGroup?.getChildren()?.forEach((cellNode) => {
|
|
@@ -59763,6 +59828,39 @@
|
|
|
59763
59828
|
}
|
|
59764
59829
|
}
|
|
59765
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
|
+
}
|
|
59766
59864
|
function clearChartCacheImage(scenegraph) {
|
|
59767
59865
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
59768
59866
|
const columnGroup = scenegraph.getColGroup(c);
|
|
@@ -60789,6 +60887,7 @@
|
|
|
60789
60887
|
delete this.tableGroup.border;
|
|
60790
60888
|
}
|
|
60791
60889
|
this.proxy?.release();
|
|
60890
|
+
this.table.reactCustomLayout?.clearCache();
|
|
60792
60891
|
}
|
|
60793
60892
|
updateStageBackground() {
|
|
60794
60893
|
this.stage.background = this.table.theme.underlayBackgroundColor;
|
|
@@ -60806,6 +60905,7 @@
|
|
|
60806
60905
|
createSceneGraph(skipRowHeightClear = false) {
|
|
60807
60906
|
if (!skipRowHeightClear) {
|
|
60808
60907
|
this.table.rowHeightsMap.clear();
|
|
60908
|
+
this.table.internalProps.layoutMap.clearCellRangeMap();
|
|
60809
60909
|
}
|
|
60810
60910
|
if (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) {
|
|
60811
60911
|
this.stage.pluginService.autoEnablePlugins.getContributions().forEach((p) => {
|
|
@@ -61007,6 +61107,7 @@
|
|
|
61007
61107
|
}
|
|
61008
61108
|
deleteAllSelectBorder() {
|
|
61009
61109
|
deleteAllSelectBorder(this);
|
|
61110
|
+
deleteAllSelectingBorder(this);
|
|
61010
61111
|
}
|
|
61011
61112
|
updateCellSelectBorder(selectRange, extendSelectRange = true) {
|
|
61012
61113
|
updateCellSelectBorder(this, selectRange, extendSelectRange);
|
|
@@ -61027,8 +61128,11 @@
|
|
|
61027
61128
|
this.updateContainer(true);
|
|
61028
61129
|
}
|
|
61029
61130
|
}
|
|
61030
|
-
|
|
61031
|
-
|
|
61131
|
+
updateChartSizeForResizeColWidth(col) {
|
|
61132
|
+
updateChartSizeForResizeColWidth(this, col);
|
|
61133
|
+
}
|
|
61134
|
+
updateChartSizeForResizeRowHeight(col) {
|
|
61135
|
+
updateChartSizeForResizeRowHeight(this, col);
|
|
61032
61136
|
}
|
|
61033
61137
|
updateChartState(datum) {
|
|
61034
61138
|
this.table.isPivotChart() && updateChartState(this, datum);
|
|
@@ -61164,7 +61268,7 @@
|
|
|
61164
61268
|
this.table.heightMode === 'adaptive' ||
|
|
61165
61269
|
this.table.autoFillWidth ||
|
|
61166
61270
|
this.table.autoFillHeight) {
|
|
61167
|
-
this.
|
|
61271
|
+
this.updateChartSizeForResizeColWidth(this.table.rowHeaderLevelCount);
|
|
61168
61272
|
}
|
|
61169
61273
|
this.proxy.progress();
|
|
61170
61274
|
this.updateNextFrame();
|
|
@@ -62670,63 +62774,66 @@
|
|
|
62670
62774
|
return;
|
|
62671
62775
|
}
|
|
62672
62776
|
const targetCell = adjustMoveHeaderTarget({ col: state.columnMove.colSource, row: state.columnMove.rowSource }, { col, row }, state.table);
|
|
62673
|
-
state.
|
|
62674
|
-
state.columnMove.y = y - state.table.tableY;
|
|
62675
|
-
state.columnMove.colTarget = targetCell.col;
|
|
62676
|
-
state.columnMove.rowTarget = targetCell.row;
|
|
62677
|
-
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 });
|
|
62678
62778
|
if (!canMove) {
|
|
62679
62779
|
state.updateCursor('not-allowed');
|
|
62780
|
+
state.columnMove.colTarget = state.columnMove.colSource;
|
|
62781
|
+
state.columnMove.rowTarget = state.columnMove.rowSource;
|
|
62680
62782
|
}
|
|
62681
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;
|
|
62682
62788
|
state.updateCursor('grabbing');
|
|
62683
|
-
|
|
62684
|
-
|
|
62685
|
-
|
|
62686
|
-
|
|
62687
|
-
|
|
62688
|
-
|
|
62689
|
-
|
|
62690
|
-
|
|
62691
|
-
|
|
62692
|
-
|
|
62693
|
-
|
|
62694
|
-
|
|
62695
|
-
|
|
62696
|
-
|
|
62697
|
-
|
|
62698
|
-
|
|
62699
|
-
|
|
62700
|
-
|
|
62701
|
-
|
|
62702
|
-
|
|
62703
|
-
|
|
62704
|
-
|
|
62705
|
-
|
|
62706
|
-
}
|
|
62707
|
-
}
|
|
62708
|
-
else if (cellLocation === 'rowHeader' ||
|
|
62709
|
-
state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) {
|
|
62710
|
-
backY = state.columnMove.y;
|
|
62711
|
-
if (state.table.isFrozenRow(row)) {
|
|
62712
|
-
lineY =
|
|
62713
|
-
state.columnMove.rowTarget >= state.columnMove.rowSource
|
|
62714
|
-
? state.table.getRowsHeight(0, state.columnMove.rowTarget)
|
|
62715
|
-
: state.table.getRowsHeight(0, state.columnMove.rowTarget - 1);
|
|
62716
|
-
}
|
|
62717
|
-
else if (state.table.isBottomFrozenRow(row)) {
|
|
62718
|
-
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
|
+
}
|
|
62719
62812
|
}
|
|
62720
|
-
else
|
|
62721
|
-
|
|
62722
|
-
|
|
62723
|
-
|
|
62724
|
-
|
|
62725
|
-
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
|
+
}
|
|
62726
62833
|
}
|
|
62834
|
+
state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY);
|
|
62835
|
+
state.table.scenegraph.updateNextFrame();
|
|
62727
62836
|
}
|
|
62728
|
-
state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY);
|
|
62729
|
-
state.table.scenegraph.updateNextFrame();
|
|
62730
62837
|
}
|
|
62731
62838
|
function endMoveCol(state) {
|
|
62732
62839
|
if ('canMoveHeaderPosition' in state.table.internalProps.layoutMap &&
|
|
@@ -63893,7 +64000,7 @@
|
|
|
63893
64000
|
setTimeout(() => {
|
|
63894
64001
|
this.columnResize.resizing = false;
|
|
63895
64002
|
}, 0);
|
|
63896
|
-
this.table.scenegraph.
|
|
64003
|
+
this.table.scenegraph.updateChartSizeForResizeColWidth(this.columnResize.col);
|
|
63897
64004
|
this.checkFrozen();
|
|
63898
64005
|
this.table.scenegraph.component.hideResizeCol();
|
|
63899
64006
|
this.table.scenegraph.updateNextFrame();
|
|
@@ -63916,7 +64023,7 @@
|
|
|
63916
64023
|
setTimeout(() => {
|
|
63917
64024
|
this.rowResize.resizing = false;
|
|
63918
64025
|
}, 0);
|
|
63919
|
-
this.table.scenegraph.
|
|
64026
|
+
this.table.scenegraph.updateChartSizeForResizeColWidth(this.rowResize.row);
|
|
63920
64027
|
this.table.scenegraph.component.hideResizeRow();
|
|
63921
64028
|
this.table.scenegraph.updateNextFrame();
|
|
63922
64029
|
}
|
|
@@ -64161,7 +64268,7 @@
|
|
|
64161
64268
|
if (autoHide) {
|
|
64162
64269
|
clearTimeout(this._clearVerticalScrollBar);
|
|
64163
64270
|
this._clearVerticalScrollBar = setTimeout(() => {
|
|
64164
|
-
this.table.scenegraph
|
|
64271
|
+
this.table.scenegraph?.component.hideVerticalScrollBar();
|
|
64165
64272
|
}, 1000);
|
|
64166
64273
|
}
|
|
64167
64274
|
}
|
|
@@ -64173,7 +64280,7 @@
|
|
|
64173
64280
|
if (autoHide) {
|
|
64174
64281
|
clearTimeout(this._clearHorizontalScrollBar);
|
|
64175
64282
|
this._clearHorizontalScrollBar = setTimeout(() => {
|
|
64176
|
-
this.table.scenegraph
|
|
64283
|
+
this.table.scenegraph?.component.hideHorizontalScrollBar();
|
|
64177
64284
|
}, 1000);
|
|
64178
64285
|
}
|
|
64179
64286
|
}
|
|
@@ -65665,6 +65772,7 @@
|
|
|
65665
65772
|
eventManager.dealTableHover();
|
|
65666
65773
|
});
|
|
65667
65774
|
handler.on(table.getElement(), 'wheel', (e) => {
|
|
65775
|
+
table.editorManager?.completeEdit();
|
|
65668
65776
|
if (table.eventManager._enableTableScroll) {
|
|
65669
65777
|
handleWhell(e, stateManager);
|
|
65670
65778
|
}
|
|
@@ -65757,16 +65865,32 @@
|
|
|
65757
65865
|
}
|
|
65758
65866
|
}
|
|
65759
65867
|
else if (e.key === 'Escape') {
|
|
65760
|
-
table.editorManager
|
|
65868
|
+
table.editorManager?.cancelEdit();
|
|
65761
65869
|
}
|
|
65762
65870
|
else if (e.key === 'Enter') {
|
|
65763
|
-
if (table.editorManager
|
|
65871
|
+
if (table.editorManager?.editingEditor) {
|
|
65764
65872
|
handleKeydownListener(e);
|
|
65765
65873
|
table.editorManager.completeEdit();
|
|
65766
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
|
+
}
|
|
65767
65883
|
return;
|
|
65768
65884
|
}
|
|
65769
|
-
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) &&
|
|
65770
65894
|
(table.stateManager.select.ranges?.length ?? 0) === 1) {
|
|
65771
65895
|
const startCol = table.stateManager.select.ranges[0].start.col;
|
|
65772
65896
|
const startRow = table.stateManager.select.ranges[0].start.row;
|
|
@@ -65811,6 +65935,16 @@
|
|
|
65811
65935
|
}
|
|
65812
65936
|
}
|
|
65813
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
|
+
}
|
|
65814
65948
|
handleKeydownListener(e);
|
|
65815
65949
|
});
|
|
65816
65950
|
function handleKeydownListener(e) {
|
|
@@ -65943,6 +66077,9 @@
|
|
|
65943
66077
|
if (e.width === 0 && e.height === 0) {
|
|
65944
66078
|
return;
|
|
65945
66079
|
}
|
|
66080
|
+
if (table.autoFillWidth || table.autoFillHeight) {
|
|
66081
|
+
table.editorManager?.completeEdit();
|
|
66082
|
+
}
|
|
65946
66083
|
if (!isValid$1(table.options.pixelRatio)) {
|
|
65947
66084
|
table.setPixelRatio(getPixelRatio());
|
|
65948
66085
|
}
|
|
@@ -66097,10 +66234,10 @@
|
|
|
66097
66234
|
table.eventManager.isDown = false;
|
|
66098
66235
|
table.eventManager.isDraging = false;
|
|
66099
66236
|
table.eventManager.inertiaScroll.endInertia();
|
|
66100
|
-
if (stateManager.isResizeCol()) {
|
|
66237
|
+
if (stateManager.interactionState === 'grabing' && stateManager.isResizeCol()) {
|
|
66101
66238
|
endResizeCol(table);
|
|
66102
66239
|
}
|
|
66103
|
-
else if (stateManager.isResizeRow()) {
|
|
66240
|
+
else if (stateManager.interactionState === 'grabing' && stateManager.isResizeRow()) {
|
|
66104
66241
|
endResizeRow(table);
|
|
66105
66242
|
}
|
|
66106
66243
|
};
|
|
@@ -66528,6 +66665,9 @@
|
|
|
66528
66665
|
}
|
|
66529
66666
|
updateEventBinder() {
|
|
66530
66667
|
setTimeout(() => {
|
|
66668
|
+
if (this.table.isReleased) {
|
|
66669
|
+
return;
|
|
66670
|
+
}
|
|
66531
66671
|
if (checkHaveTextStick(this.table) && this.handleTextStickBindId?.length === 0) {
|
|
66532
66672
|
this.handleTextStickBindId.push(this.table.on(TABLE_EVENT_TYPE.SCROLL, e => {
|
|
66533
66673
|
handleTextStick(this.table);
|
|
@@ -66589,7 +66729,7 @@
|
|
|
66589
66729
|
else if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
66590
66730
|
this.table.scenegraph.updateAutoColWidth(resizeCol.col);
|
|
66591
66731
|
this.table.internalProps._widthResizedColMap.add(resizeCol.col);
|
|
66592
|
-
this.table.scenegraph.
|
|
66732
|
+
this.table.scenegraph.updateChartSizeForResizeColWidth(resizeCol.col);
|
|
66593
66733
|
const state = this.table.stateManager;
|
|
66594
66734
|
if (state.columnResize.col < state.table.frozenColCount &&
|
|
66595
66735
|
!state.table.isPivotTable() &&
|
|
@@ -70871,12 +71011,13 @@
|
|
|
70871
71011
|
scenegraph;
|
|
70872
71012
|
stateManager;
|
|
70873
71013
|
eventManager;
|
|
71014
|
+
editorManager;
|
|
70874
71015
|
_pixelRatio;
|
|
70875
71016
|
static get EVENT_TYPE() {
|
|
70876
71017
|
return TABLE_EVENT_TYPE;
|
|
70877
71018
|
}
|
|
70878
71019
|
options;
|
|
70879
|
-
version = "1.6.0-alpha.
|
|
71020
|
+
version = "1.6.0-alpha.2";
|
|
70880
71021
|
pagination;
|
|
70881
71022
|
id = `VTable${Date.now()}`;
|
|
70882
71023
|
headerStyleCache;
|
|
@@ -71502,6 +71643,7 @@
|
|
|
71502
71643
|
}
|
|
71503
71644
|
setRowHeight(row, height) {
|
|
71504
71645
|
this.scenegraph.setRowHeight(row, height);
|
|
71646
|
+
this.scenegraph.updateChartSizeForResizeRowHeight(row);
|
|
71505
71647
|
this.internalProps._heightResizedRowMap.add(row);
|
|
71506
71648
|
}
|
|
71507
71649
|
getRowsHeight(startRow, endRow) {
|
|
@@ -71599,6 +71741,7 @@
|
|
|
71599
71741
|
}
|
|
71600
71742
|
setColWidth(col, width) {
|
|
71601
71743
|
this.scenegraph.setColWidth(col, width);
|
|
71744
|
+
this.scenegraph.updateChartSizeForResizeColWidth(col);
|
|
71602
71745
|
this.internalProps._widthResizedColMap.add(col);
|
|
71603
71746
|
}
|
|
71604
71747
|
_clearColRangeWidthsMap(col) {
|
|
@@ -73388,6 +73531,9 @@
|
|
|
73388
73531
|
setMinMaxLimitWidth(setWidth = false) {
|
|
73389
73532
|
const internalProps = this.internalProps;
|
|
73390
73533
|
for (let col = 0; col < internalProps.layoutMap.columnWidths.length; col++) {
|
|
73534
|
+
if (this.internalProps._widthResizedColMap.has(col)) {
|
|
73535
|
+
continue;
|
|
73536
|
+
}
|
|
73391
73537
|
const { width, minWidth, maxWidth } = internalProps.layoutMap.columnWidths?.[col] ?? {};
|
|
73392
73538
|
if (setWidth &&
|
|
73393
73539
|
width &&
|
|
@@ -73405,9 +73551,9 @@
|
|
|
73405
73551
|
setSortedIndexMap(field, filedMap) {
|
|
73406
73552
|
this.dataSource?.setSortedIndexMap(field, filedMap);
|
|
73407
73553
|
}
|
|
73408
|
-
checkReactCustomLayout() {
|
|
73554
|
+
checkReactCustomLayout(removeAllContainer) {
|
|
73409
73555
|
if (!this.reactCustomLayout) {
|
|
73410
|
-
this.reactCustomLayout = new ReactCustomLayout(this);
|
|
73556
|
+
this.reactCustomLayout = new ReactCustomLayout(removeAllContainer, this);
|
|
73411
73557
|
}
|
|
73412
73558
|
}
|
|
73413
73559
|
get bodyDomContainer() {
|
|
@@ -75810,10 +75956,12 @@
|
|
|
75810
75956
|
this.bindEvent();
|
|
75811
75957
|
}
|
|
75812
75958
|
bindEvent() {
|
|
75813
|
-
|
|
75959
|
+
this.table.internalProps.handler;
|
|
75960
|
+
const editCellTrigger = this.table.options.editCellTrigger;
|
|
75814
75961
|
this.table.on(TABLE_EVENT_TYPE.DBLCLICK_CELL, e => {
|
|
75815
|
-
if (!
|
|
75816
|
-
|
|
75962
|
+
if (!editCellTrigger ||
|
|
75963
|
+
editCellTrigger === 'doubleclick' ||
|
|
75964
|
+
(Array.isArray(editCellTrigger) && editCellTrigger.includes('doubleclick'))) {
|
|
75817
75965
|
const { col, row } = e;
|
|
75818
75966
|
const eventArgsSet = getCellEventArgsSet(e.federatedEvent);
|
|
75819
75967
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.targetCell);
|
|
@@ -75824,19 +75972,11 @@
|
|
|
75824
75972
|
}
|
|
75825
75973
|
});
|
|
75826
75974
|
this.table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
|
|
75827
|
-
if (
|
|
75975
|
+
if (editCellTrigger === 'click' || (Array.isArray(editCellTrigger) && editCellTrigger.includes('click'))) {
|
|
75828
75976
|
const { col, row } = e;
|
|
75829
75977
|
this.startEditCell(col, row);
|
|
75830
75978
|
}
|
|
75831
75979
|
});
|
|
75832
|
-
handler.on(this.table.getElement(), 'wheel', (e) => {
|
|
75833
|
-
this.completeEdit();
|
|
75834
|
-
});
|
|
75835
|
-
handler.on(this.table.getElement(), 'resize', (e) => {
|
|
75836
|
-
if (this.table.autoFillWidth || this.table.autoFillHeight) {
|
|
75837
|
-
this.completeEdit();
|
|
75838
|
-
}
|
|
75839
|
-
});
|
|
75840
75980
|
}
|
|
75841
75981
|
startEditCell(col, row, value) {
|
|
75842
75982
|
const editor = this.table.getEditor(col, row);
|
|
@@ -76522,7 +76662,6 @@
|
|
|
76522
76662
|
|
|
76523
76663
|
class ListTable extends BaseTable {
|
|
76524
76664
|
showHeader = true;
|
|
76525
|
-
editorManager;
|
|
76526
76665
|
listTreeStickCellPlugin;
|
|
76527
76666
|
constructor(container, options) {
|
|
76528
76667
|
if (Env.mode === 'node') {
|
|
@@ -77093,7 +77232,7 @@
|
|
|
77093
77232
|
notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight;
|
|
77094
77233
|
}
|
|
77095
77234
|
if (this.widthMode === 'adaptive' || notFillWidth || this.heightMode === 'adaptive' || notFillHeight) {
|
|
77096
|
-
this.scenegraph.
|
|
77235
|
+
this.scenegraph.updateChartSizeForResizeColWidth(0);
|
|
77097
77236
|
}
|
|
77098
77237
|
}
|
|
77099
77238
|
}
|
|
@@ -77288,7 +77427,7 @@
|
|
|
77288
77427
|
this.render();
|
|
77289
77428
|
if (isValid$1(oldHoverState.col) && isValid$1(oldHoverState.row) && oldHoverState.col >= 0 && oldHoverState.row >= 0) {
|
|
77290
77429
|
setTimeout(() => {
|
|
77291
|
-
this.internalProps
|
|
77430
|
+
this.internalProps?.tooltipHandler.showTooltip(oldHoverState.col, oldHoverState.row);
|
|
77292
77431
|
}, 0);
|
|
77293
77432
|
}
|
|
77294
77433
|
}
|
|
@@ -78544,6 +78683,16 @@
|
|
|
78544
78683
|
}));
|
|
78545
78684
|
legend.name = 'legend';
|
|
78546
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
|
+
}
|
|
78547
78696
|
this.table.scenegraph.stage.defaultLayer.appendChild(legend);
|
|
78548
78697
|
this.adjustTableSize(attrs);
|
|
78549
78698
|
}
|
|
@@ -80169,9 +80318,16 @@
|
|
|
80169
80318
|
}
|
|
80170
80319
|
this.updateGroupTitle();
|
|
80171
80320
|
});
|
|
80321
|
+
this.table.on('resize_column', e => {
|
|
80322
|
+
this.updateGroupTitle();
|
|
80323
|
+
});
|
|
80172
80324
|
}
|
|
80173
80325
|
updateGroupTitle() {
|
|
80174
|
-
if (this.
|
|
80326
|
+
if (this.table.scrollTop === 0) {
|
|
80327
|
+
this.titleRows = [];
|
|
80328
|
+
this.showedTitleRows = [];
|
|
80329
|
+
}
|
|
80330
|
+
else if (this.skipStartRow !== -1 &&
|
|
80175
80331
|
this.skipEndRow !== -1 &&
|
|
80176
80332
|
this.skipStartRow !== this.table.scenegraph.proxy.bodyTopRow - 1) {
|
|
80177
80333
|
if (this.table.scenegraph.proxy.screenTopRow <= this.skipStartRow ||
|
|
@@ -80334,7 +80490,8 @@
|
|
|
80334
80490
|
x: 0,
|
|
80335
80491
|
y: 0,
|
|
80336
80492
|
width: 0,
|
|
80337
|
-
height: 0
|
|
80493
|
+
height: 0,
|
|
80494
|
+
cursor: 'pointer'
|
|
80338
80495
|
});
|
|
80339
80496
|
colHeaderGroup.add(hackBorder);
|
|
80340
80497
|
colHeaderGroup.border = hackBorder;
|
|
@@ -80346,7 +80503,7 @@
|
|
|
80346
80503
|
const cellGroup = getTargetCell(shadowTarget);
|
|
80347
80504
|
const { col, row } = cellGroup;
|
|
80348
80505
|
const rowIndex = titleRows.indexOf(row);
|
|
80349
|
-
|
|
80506
|
+
scrollToRow(row - rowIndex, table);
|
|
80350
80507
|
});
|
|
80351
80508
|
}
|
|
80352
80509
|
if (!cornerHeaderGroup.border) {
|
|
@@ -80354,7 +80511,8 @@
|
|
|
80354
80511
|
x: 0,
|
|
80355
80512
|
y: 0,
|
|
80356
80513
|
width: 0,
|
|
80357
|
-
height: 0
|
|
80514
|
+
height: 0,
|
|
80515
|
+
cursor: 'pointer'
|
|
80358
80516
|
});
|
|
80359
80517
|
cornerHeaderGroup.add(hackBorder);
|
|
80360
80518
|
cornerHeaderGroup.border = hackBorder;
|
|
@@ -80366,7 +80524,7 @@
|
|
|
80366
80524
|
const cellGroup = getTargetCell(shadowTarget);
|
|
80367
80525
|
const { col, row } = cellGroup;
|
|
80368
80526
|
const rowIndex = titleRows.indexOf(row);
|
|
80369
|
-
|
|
80527
|
+
scrollToRow(row - rowIndex, table);
|
|
80370
80528
|
});
|
|
80371
80529
|
}
|
|
80372
80530
|
const shadowGroup = colHeaderGroup.border.shadowRoot;
|
|
@@ -80375,6 +80533,15 @@
|
|
|
80375
80533
|
shadowGroupFrozen.removeAllChild();
|
|
80376
80534
|
return { shadowGroup, shadowGroupFrozen };
|
|
80377
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
|
+
}
|
|
80378
80545
|
const registerListTreeStickCellPlugin = () => {
|
|
80379
80546
|
Factory.registerComponent('listTreeStickCellPlugin', ListTreeStickCellPlugin);
|
|
80380
80547
|
};
|
|
@@ -82498,6 +82665,7 @@
|
|
|
82498
82665
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82499
82666
|
},
|
|
82500
82667
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82668
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82501
82669
|
pivotInfo: {
|
|
82502
82670
|
value: dimensionInfo?.title ?? '',
|
|
82503
82671
|
dimensionKey,
|
|
@@ -82544,6 +82712,7 @@
|
|
|
82544
82712
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82545
82713
|
},
|
|
82546
82714
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82715
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82547
82716
|
pivotInfo: {
|
|
82548
82717
|
value: dimensionInfo?.title ?? '',
|
|
82549
82718
|
dimensionKey,
|
|
@@ -82594,6 +82763,7 @@
|
|
|
82594
82763
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82595
82764
|
},
|
|
82596
82765
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82766
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82597
82767
|
pivotInfo: {
|
|
82598
82768
|
value: dimensionInfo?.title ?? '',
|
|
82599
82769
|
dimensionKey,
|
|
@@ -82640,6 +82810,7 @@
|
|
|
82640
82810
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82641
82811
|
},
|
|
82642
82812
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82813
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82643
82814
|
pivotInfo: {
|
|
82644
82815
|
value: dimensionInfo?.title ?? '',
|
|
82645
82816
|
dimensionKey,
|
|
@@ -82685,6 +82856,7 @@
|
|
|
82685
82856
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
82686
82857
|
},
|
|
82687
82858
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
82859
|
+
headerIcon: dimensionInfo?.cornerHeaderIcon,
|
|
82688
82860
|
pivotInfo: {
|
|
82689
82861
|
value: dimensionInfo?.title ?? '',
|
|
82690
82862
|
dimensionKey,
|
|
@@ -83884,6 +84056,9 @@
|
|
|
83884
84056
|
if (this.isSeriesNumberInHeader(target.col, target.row) || this.isSeriesNumberInHeader(source.col, source.row)) {
|
|
83885
84057
|
return false;
|
|
83886
84058
|
}
|
|
84059
|
+
if (this.isCornerHeader(target.col, target.row)) {
|
|
84060
|
+
return false;
|
|
84061
|
+
}
|
|
83887
84062
|
if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
|
|
83888
84063
|
return false;
|
|
83889
84064
|
}
|
|
@@ -84052,14 +84227,14 @@
|
|
|
84052
84227
|
if (isCornerCell) {
|
|
84053
84228
|
if (this.cornerSetting.titleOnDimension === 'row') {
|
|
84054
84229
|
for (let i = 0; i < this.rowDimensionKeys.length; i++) {
|
|
84055
|
-
if (rowHeaderPaths[0]
|
|
84230
|
+
if (rowHeaderPaths[0]?.dimensionKey === this.rowDimensionKeys[i]) {
|
|
84056
84231
|
return { col: i + this.leftRowSeriesNumberColumnCount, row: 0 };
|
|
84057
84232
|
}
|
|
84058
84233
|
}
|
|
84059
84234
|
}
|
|
84060
84235
|
else {
|
|
84061
84236
|
for (let i = 0; i < this.colDimensionKeys.length; i++) {
|
|
84062
|
-
if (colHeaderPaths[0]
|
|
84237
|
+
if (colHeaderPaths[0]?.dimensionKey === this.colDimensionKeys[i]) {
|
|
84063
84238
|
return { col: 0, row: i };
|
|
84064
84239
|
}
|
|
84065
84240
|
}
|
|
@@ -86532,7 +86707,6 @@
|
|
|
86532
86707
|
class PivotTable extends BaseTable {
|
|
86533
86708
|
layoutNodeId = { seqId: 0 };
|
|
86534
86709
|
pivotSortState;
|
|
86535
|
-
editorManager;
|
|
86536
86710
|
dataset;
|
|
86537
86711
|
flatDataToObjects;
|
|
86538
86712
|
constructor(container, options) {
|
|
@@ -87499,7 +87673,7 @@
|
|
|
87499
87673
|
notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight;
|
|
87500
87674
|
}
|
|
87501
87675
|
if (this.widthMode === 'adaptive' || notFillWidth || this.heightMode === 'adaptive' || notFillHeight) {
|
|
87502
|
-
this.scenegraph.
|
|
87676
|
+
this.scenegraph.updateChartSizeForResizeColWidth(0);
|
|
87503
87677
|
}
|
|
87504
87678
|
}
|
|
87505
87679
|
}
|
|
@@ -89591,7 +89765,7 @@
|
|
|
89591
89765
|
}
|
|
89592
89766
|
|
|
89593
89767
|
registerForVrender();
|
|
89594
|
-
const version = "1.6.0-alpha.
|
|
89768
|
+
const version = "1.6.0-alpha.2";
|
|
89595
89769
|
function getIcons() {
|
|
89596
89770
|
return get$2();
|
|
89597
89771
|
}
|