@visactor/vtable 1.6.3-alpha.2 → 1.6.3
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.js +11 -7
- package/cjs/ListTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -1
- package/cjs/core/BaseTable.js +4 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/record-helper.js +1 -1
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +1 -0
- package/cjs/dataset/dataset-pivot-table.js.map +1 -1
- package/cjs/dataset/dataset.js +2 -0
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +0 -4
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +30 -25
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +2 -1
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/event/scroll.d.ts +2 -1
- package/cjs/event/scroll.js +2 -2
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +17 -7
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +16 -4
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.js +45 -20
- package/cjs/layout/tree-helper.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +1 -0
- package/cjs/scenegraph/component/table-component.js +24 -22
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +4 -3
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +2 -2
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +2 -2
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +6 -3
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +7 -2
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/cell-move/index.d.ts +1 -1
- package/cjs/state/cell-move/index.js +10 -5
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/state.d.ts +5 -5
- package/cjs/state/state.js +8 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme.js +12 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +1 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/Composite-define.d.ts +2 -0
- package/cjs/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/link-define.d.ts +4 -0
- package/cjs/ts-types/list-table/define/link-define.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/link-dimension.d.ts +2 -0
- package/cjs/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/composite-indicator.d.ts +2 -0
- package/cjs/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/link-indicator.d.ts +4 -0
- package/cjs/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +3 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +361 -213
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +10 -6
- package/es/ListTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -1
- package/es/core/BaseTable.js +4 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/record-helper.js +1 -1
- package/es/core/record-helper.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +1 -0
- package/es/dataset/dataset-pivot-table.js.map +1 -1
- package/es/dataset/dataset.js +2 -0
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.js +1 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +0 -3
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +30 -24
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +2 -1
- package/es/event/media-click.js.map +1 -1
- package/es/event/scroll.d.ts +2 -1
- package/es/event/scroll.js +2 -2
- package/es/event/scroll.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +17 -7
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +16 -4
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/layout/tree-helper.js +45 -20
- package/es/layout/tree-helper.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +1 -0
- package/es/scenegraph/component/table-component.js +24 -22
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +4 -3
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +2 -2
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +2 -2
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +6 -3
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +7 -2
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/cell-move/index.d.ts +1 -1
- package/es/state/cell-move/index.js +10 -5
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/state.d.ts +5 -5
- package/es/state/state.js +8 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/theme.js +12 -0
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +1 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/Composite-define.d.ts +2 -0
- package/es/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/es/ts-types/list-table/define/link-define.d.ts +4 -0
- package/es/ts-types/list-table/define/link-define.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/link-dimension.d.ts +2 -0
- package/es/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/composite-indicator.d.ts +2 -0
- package/es/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/link-indicator.d.ts +4 -0
- package/es/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +3 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +6 -6
package/dist/vtable.js
CHANGED
|
@@ -29244,6 +29244,12 @@
|
|
|
29244
29244
|
},
|
|
29245
29245
|
get barToSide() {
|
|
29246
29246
|
return scroll.barToSide ?? false;
|
|
29247
|
+
},
|
|
29248
|
+
get horizontalPadding() {
|
|
29249
|
+
return scroll.horizontalPadding ?? 0;
|
|
29250
|
+
},
|
|
29251
|
+
get verticalPadding() {
|
|
29252
|
+
return scroll.verticalPadding ?? 0;
|
|
29247
29253
|
}
|
|
29248
29254
|
};
|
|
29249
29255
|
}
|
|
@@ -29310,6 +29316,9 @@
|
|
|
29310
29316
|
},
|
|
29311
29317
|
get labelBackgroundCornerRadius() {
|
|
29312
29318
|
return columnResize.labelBackgroundCornerRadius ?? 5;
|
|
29319
|
+
},
|
|
29320
|
+
get labelVisible() {
|
|
29321
|
+
return columnResize.labelVisible ?? true;
|
|
29313
29322
|
}
|
|
29314
29323
|
};
|
|
29315
29324
|
}
|
|
@@ -34978,7 +34987,7 @@
|
|
|
34978
34987
|
const createTextCellGroup = Factory.getFunction('createTextCellGroup');
|
|
34979
34988
|
cellGroup = createTextCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, false, null, true, cellTheme, range, isAsync);
|
|
34980
34989
|
const createProgressBarCell = Factory.getFunction('createProgressBarCell');
|
|
34981
|
-
const progressBarGroup = createProgressBarCell(define, style, colWidth, value, dataValue, col, row, padding, table);
|
|
34990
|
+
const progressBarGroup = createProgressBarCell(define, style, colWidth, value, dataValue, col, row, padding, table, range);
|
|
34982
34991
|
if (cellGroup.firstChild) {
|
|
34983
34992
|
cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);
|
|
34984
34993
|
}
|
|
@@ -35002,8 +35011,6 @@
|
|
|
35002
35011
|
}
|
|
35003
35012
|
function updateCell$1(col, row, table, addNew, isShadow) {
|
|
35004
35013
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
|
|
35005
|
-
const cellStyle = table._getCellStyle(col, row);
|
|
35006
|
-
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
35007
35014
|
const cellLocation = table.getCellLocation(col, row);
|
|
35008
35015
|
let value = table.getCellValue(col, row);
|
|
35009
35016
|
let isMerge;
|
|
@@ -35057,13 +35064,15 @@
|
|
|
35057
35064
|
value = vtableMergeName;
|
|
35058
35065
|
}
|
|
35059
35066
|
}
|
|
35067
|
+
const cellStyle = table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
35068
|
+
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
35060
35069
|
if (!cellTheme) {
|
|
35061
35070
|
cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
|
|
35062
35071
|
}
|
|
35063
35072
|
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
35064
35073
|
if (!addNew &&
|
|
35065
35074
|
!isMerge &&
|
|
35066
|
-
!(define
|
|
35075
|
+
!(define?.customLayout || define?.customRender || define?.headerCustomLayout || define?.headerCustomRender) &&
|
|
35067
35076
|
canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table)) {
|
|
35068
35077
|
const cellWidth = table.getColWidth(col);
|
|
35069
35078
|
const cellHeight = table.getRowHeight(row);
|
|
@@ -36315,13 +36324,18 @@
|
|
|
36315
36324
|
const value = scene.table.getCellValue(col, row);
|
|
36316
36325
|
const dataValue = scene.table.getCellOriginValue(col, row);
|
|
36317
36326
|
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
36327
|
+
let range;
|
|
36328
|
+
if (columnDefine?.mergeCell) {
|
|
36329
|
+
range = scene.table.getCellRange(col, row);
|
|
36330
|
+
}
|
|
36318
36331
|
const createProgressBarCell = Factory.getFunction('createProgressBarCell');
|
|
36319
|
-
const newBarCell = createProgressBarCell(columnDefine, style, cell.attribute.width, value, dataValue, col, row, padding, scene.table);
|
|
36332
|
+
const newBarCell = createProgressBarCell(columnDefine, style, cell.attribute.width, value, dataValue, col, row, padding, scene.table, range);
|
|
36320
36333
|
const oldBarCell = cell.getChildByName('progress-bar');
|
|
36321
36334
|
cell.insertBefore(newBarCell, oldBarCell);
|
|
36322
36335
|
cell.removeChild(oldBarCell);
|
|
36323
36336
|
oldBarCell.removeAllChild();
|
|
36324
36337
|
oldBarCell.release();
|
|
36338
|
+
updateMergeCellContentHeight(cell, distHeight, detaY, scene.table.isAutoRowHeight(row), true, scene.table);
|
|
36325
36339
|
}
|
|
36326
36340
|
else if (type === 'sparkline') {
|
|
36327
36341
|
cell.removeAllChild();
|
|
@@ -36434,7 +36448,7 @@
|
|
|
36434
36448
|
});
|
|
36435
36449
|
});
|
|
36436
36450
|
if (renderDefault) {
|
|
36437
|
-
const style = table._getCellStyle(
|
|
36451
|
+
const style = table._getCellStyle(colStart, rowStart);
|
|
36438
36452
|
updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline);
|
|
36439
36453
|
}
|
|
36440
36454
|
const rangeHeight = table.getRowHeight(row);
|
|
@@ -36649,13 +36663,19 @@
|
|
|
36649
36663
|
const value = scene.table.getCellValue(col, row);
|
|
36650
36664
|
const dataValue = scene.table.getCellOriginValue(col, row);
|
|
36651
36665
|
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
36666
|
+
let range;
|
|
36667
|
+
if (columnDefine?.mergeCell) {
|
|
36668
|
+
range = scene.table.getCellRange(col, row);
|
|
36669
|
+
}
|
|
36652
36670
|
const createProgressBarCell = Factory.getFunction('createProgressBarCell');
|
|
36653
|
-
const newBarCell = createProgressBarCell(columnDefine, style, cellGroup.attribute.width, value, dataValue, col, row, padding, scene.table);
|
|
36671
|
+
const newBarCell = createProgressBarCell(columnDefine, style, cellGroup.attribute.width, value, dataValue, col, row, padding, scene.table, range);
|
|
36654
36672
|
const oldBarCell = cellGroup.getChildByName('progress-bar');
|
|
36655
36673
|
cellGroup.insertBefore(newBarCell, oldBarCell);
|
|
36656
36674
|
cellGroup.removeChild(oldBarCell);
|
|
36657
36675
|
oldBarCell.removeAllChild();
|
|
36658
36676
|
oldBarCell.release();
|
|
36677
|
+
const cellChange = updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, true, scene.table);
|
|
36678
|
+
isHeightChange = isHeightChange || cellChange;
|
|
36659
36679
|
}
|
|
36660
36680
|
else if (type === 'sparkline') {
|
|
36661
36681
|
cellGroup.removeAllChild();
|
|
@@ -36796,7 +36816,7 @@
|
|
|
36796
36816
|
});
|
|
36797
36817
|
let changed = false;
|
|
36798
36818
|
if (renderDefault) {
|
|
36799
|
-
const style = table._getCellStyle(
|
|
36819
|
+
const style = table._getCellStyle(colStart, rowStart);
|
|
36800
36820
|
const padding = getQuadProps(style.padding);
|
|
36801
36821
|
const textAlign = style.textAlign;
|
|
36802
36822
|
const textBaseline = style.textBaseline;
|
|
@@ -37364,6 +37384,7 @@
|
|
|
37364
37384
|
rightFrozenShadowLine;
|
|
37365
37385
|
drillIcon;
|
|
37366
37386
|
cellMover;
|
|
37387
|
+
labelVisible;
|
|
37367
37388
|
constructor(table) {
|
|
37368
37389
|
this.table = table;
|
|
37369
37390
|
const theme = this.table.theme;
|
|
@@ -37372,11 +37393,13 @@
|
|
|
37372
37393
|
const columnResizeWidth = theme.columnResize?.lineWidth;
|
|
37373
37394
|
const columnResizeBgColor = theme.columnResize?.bgColor;
|
|
37374
37395
|
const columnResizeBgWidth = theme.columnResize?.width;
|
|
37396
|
+
const labelVisible = theme.columnResize?.labelVisible ?? true;
|
|
37375
37397
|
const labelColor = theme.columnResize?.labelColor;
|
|
37376
37398
|
const labelFontSize = theme.columnResize?.labelFontSize;
|
|
37377
37399
|
const labelFontFamily = theme.columnResize?.labelFontFamily;
|
|
37378
37400
|
const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;
|
|
37379
37401
|
const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;
|
|
37402
|
+
this.labelVisible = labelVisible;
|
|
37380
37403
|
this.columnResizeLine = createLine({
|
|
37381
37404
|
visible: false,
|
|
37382
37405
|
pickable: false,
|
|
@@ -37564,6 +37587,8 @@
|
|
|
37564
37587
|
const scrollSliderColor = theme.scrollStyle?.scrollSliderColor;
|
|
37565
37588
|
const scrollSliderCornerRadius = theme.scrollStyle?.scrollSliderCornerRadius;
|
|
37566
37589
|
const width = theme.scrollStyle?.width;
|
|
37590
|
+
const horizontalPadding = theme.scrollStyle?.horizontalPadding;
|
|
37591
|
+
const verticalPadding = theme.scrollStyle?.verticalPadding;
|
|
37567
37592
|
let sliderStyle;
|
|
37568
37593
|
if (isValid$3(scrollSliderCornerRadius)) {
|
|
37569
37594
|
sliderStyle = {
|
|
@@ -37582,7 +37607,7 @@
|
|
|
37582
37607
|
y: -this.table.tableNoFrameHeight * 2,
|
|
37583
37608
|
width: this.table.tableNoFrameWidth,
|
|
37584
37609
|
height: width,
|
|
37585
|
-
padding:
|
|
37610
|
+
padding: horizontalPadding,
|
|
37586
37611
|
railStyle: {
|
|
37587
37612
|
fill: scrollRailColor
|
|
37588
37613
|
},
|
|
@@ -37598,7 +37623,7 @@
|
|
|
37598
37623
|
y: -this.table.tableNoFrameHeight * 2,
|
|
37599
37624
|
width,
|
|
37600
37625
|
height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),
|
|
37601
|
-
padding:
|
|
37626
|
+
padding: verticalPadding,
|
|
37602
37627
|
railStyle: {
|
|
37603
37628
|
fill: scrollRailColor
|
|
37604
37629
|
},
|
|
@@ -37727,13 +37752,15 @@
|
|
|
37727
37752
|
{ x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }
|
|
37728
37753
|
]
|
|
37729
37754
|
});
|
|
37730
|
-
this.
|
|
37731
|
-
|
|
37732
|
-
|
|
37733
|
-
|
|
37734
|
-
|
|
37735
|
-
|
|
37736
|
-
|
|
37755
|
+
if (this.labelVisible) {
|
|
37756
|
+
this.columnResizeLabel.showAll();
|
|
37757
|
+
this.columnResizeLabel.setAttributes({
|
|
37758
|
+
visible: true,
|
|
37759
|
+
x: colX,
|
|
37760
|
+
y
|
|
37761
|
+
});
|
|
37762
|
+
this.columnResizeLabel.lastChild.setAttribute('text', `${this.table.getColWidth(col)}px`);
|
|
37763
|
+
}
|
|
37737
37764
|
}
|
|
37738
37765
|
updateResizeCol(col, y, isRightFrozen) {
|
|
37739
37766
|
const colX = getColX(col, this.table, isRightFrozen);
|
|
@@ -37751,11 +37778,13 @@
|
|
|
37751
37778
|
{ x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }
|
|
37752
37779
|
]
|
|
37753
37780
|
});
|
|
37754
|
-
this.
|
|
37755
|
-
|
|
37756
|
-
|
|
37757
|
-
|
|
37758
|
-
|
|
37781
|
+
if (this.labelVisible) {
|
|
37782
|
+
this.columnResizeLabel.setAttributes({
|
|
37783
|
+
x: colX,
|
|
37784
|
+
y
|
|
37785
|
+
});
|
|
37786
|
+
this.columnResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);
|
|
37787
|
+
}
|
|
37759
37788
|
}
|
|
37760
37789
|
hideResizeRow() {
|
|
37761
37790
|
this.rowResizeLine.setAttribute('visible', false);
|
|
@@ -37781,13 +37810,15 @@
|
|
|
37781
37810
|
{ y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
|
|
37782
37811
|
]
|
|
37783
37812
|
});
|
|
37784
|
-
this.
|
|
37785
|
-
|
|
37786
|
-
|
|
37787
|
-
|
|
37788
|
-
|
|
37789
|
-
|
|
37790
|
-
|
|
37813
|
+
if (this.labelVisible) {
|
|
37814
|
+
this.rowResizeLabel.showAll();
|
|
37815
|
+
this.rowResizeLabel.setAttributes({
|
|
37816
|
+
visible: true,
|
|
37817
|
+
y: rowY,
|
|
37818
|
+
x
|
|
37819
|
+
});
|
|
37820
|
+
this.rowResizeLabel.lastChild.setAttribute('text', `${this.table.getRowHeight(row)}px`);
|
|
37821
|
+
}
|
|
37791
37822
|
}
|
|
37792
37823
|
updateResizeRow(row, x, isBottomFrozen) {
|
|
37793
37824
|
const rowY = getRowY(row, this.table, isBottomFrozen);
|
|
@@ -37805,11 +37836,13 @@
|
|
|
37805
37836
|
{ y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
|
|
37806
37837
|
]
|
|
37807
37838
|
});
|
|
37808
|
-
this.
|
|
37809
|
-
|
|
37810
|
-
|
|
37811
|
-
|
|
37812
|
-
|
|
37839
|
+
if (this.labelVisible) {
|
|
37840
|
+
this.rowResizeLabel.setAttributes({
|
|
37841
|
+
y: rowY,
|
|
37842
|
+
x
|
|
37843
|
+
});
|
|
37844
|
+
this.rowResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getRowHeight(row))}px`);
|
|
37845
|
+
}
|
|
37813
37846
|
}
|
|
37814
37847
|
hideMoveCol() {
|
|
37815
37848
|
this.cellMover.hide();
|
|
@@ -37914,6 +37947,8 @@
|
|
|
37914
37947
|
const scrollSliderColor = theme.scrollStyle?.scrollSliderColor;
|
|
37915
37948
|
const scrollSliderCornerRadius = theme.scrollStyle?.scrollSliderCornerRadius;
|
|
37916
37949
|
const width = theme.scrollStyle?.width;
|
|
37950
|
+
const horizontalPadding = theme.scrollStyle?.horizontalPadding;
|
|
37951
|
+
const verticalPadding = theme.scrollStyle?.verticalPadding;
|
|
37917
37952
|
let sliderStyle;
|
|
37918
37953
|
if (isValid$3(scrollSliderCornerRadius)) {
|
|
37919
37954
|
sliderStyle = {
|
|
@@ -37928,6 +37963,7 @@
|
|
|
37928
37963
|
}
|
|
37929
37964
|
this.hScrollBar.setAttributes({
|
|
37930
37965
|
height: width,
|
|
37966
|
+
padding: horizontalPadding,
|
|
37931
37967
|
railStyle: {
|
|
37932
37968
|
fill: scrollRailColor
|
|
37933
37969
|
},
|
|
@@ -37935,6 +37971,7 @@
|
|
|
37935
37971
|
});
|
|
37936
37972
|
this.vScrollBar.setAttributes({
|
|
37937
37973
|
width,
|
|
37974
|
+
padding: verticalPadding,
|
|
37938
37975
|
railStyle: {
|
|
37939
37976
|
fill: scrollRailColor
|
|
37940
37977
|
},
|
|
@@ -37957,6 +37994,8 @@
|
|
|
37957
37994
|
const labelFontFamily = theme.columnResize?.labelFontFamily;
|
|
37958
37995
|
const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;
|
|
37959
37996
|
const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;
|
|
37997
|
+
const labelVisible = theme.columnResize?.labelVisible ?? true;
|
|
37998
|
+
this.labelVisible = labelVisible;
|
|
37960
37999
|
this.columnResizeLabel.lastChild.setAttributes({
|
|
37961
38000
|
fontSize: labelFontSize,
|
|
37962
38001
|
fill: labelColor,
|
|
@@ -40624,6 +40663,9 @@
|
|
|
40624
40663
|
colForDefine = range.start.col;
|
|
40625
40664
|
rowForDefine = range.start.row;
|
|
40626
40665
|
}
|
|
40666
|
+
if ((cellLocation === 'columnHeader' || cellLocation === 'cornerHeader') && row >= table.columnHeaderLevelCount) {
|
|
40667
|
+
cellLocation = 'body';
|
|
40668
|
+
}
|
|
40627
40669
|
const define = cellLocation !== 'body'
|
|
40628
40670
|
? table.getHeaderDefine(colForDefine, rowForDefine)
|
|
40629
40671
|
: table.getBodyColumnDefine(colForDefine, rowForDefine);
|
|
@@ -40653,7 +40695,7 @@
|
|
|
40653
40695
|
value = vtableMergeName;
|
|
40654
40696
|
}
|
|
40655
40697
|
}
|
|
40656
|
-
const cellStyle = customStyle || table._getCellStyle(col, row);
|
|
40698
|
+
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
40657
40699
|
const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
|
|
40658
40700
|
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
40659
40701
|
cellTheme.group.width = colWidth;
|
|
@@ -45838,7 +45880,7 @@
|
|
|
45838
45880
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bodyGroup.firstChild.col - 1)
|
|
45839
45881
|
: 0)
|
|
45840
45882
|
: 0;
|
|
45841
|
-
const rightX = updateContainerChildrenX(this.rightFrozenGroup, 0);
|
|
45883
|
+
const rightX = updateContainerChildrenX(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
|
|
45842
45884
|
this.bottomFrozenGroup.hasChildNodes() &&
|
|
45843
45885
|
this.bottomFrozenGroup.firstChild &&
|
|
45844
45886
|
updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0
|
|
@@ -46970,6 +47012,7 @@
|
|
|
46970
47012
|
}
|
|
46971
47013
|
}
|
|
46972
47014
|
function endMoveCol(state) {
|
|
47015
|
+
let moveColResult = false;
|
|
46973
47016
|
if ('canMoveHeaderPosition' in state.table.internalProps.layoutMap &&
|
|
46974
47017
|
state.columnMove.moving &&
|
|
46975
47018
|
state.columnMove.colSource >= 0 &&
|
|
@@ -46979,7 +47022,7 @@
|
|
|
46979
47022
|
const oldSourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);
|
|
46980
47023
|
const oldTargetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);
|
|
46981
47024
|
const moveContext = state.table._moveHeaderPosition({ col: state.columnMove.colSource, row: state.columnMove.rowSource }, { col: state.columnMove.colTarget, row: state.columnMove.rowTarget });
|
|
46982
|
-
if (moveContext) {
|
|
47025
|
+
if (moveContext && moveContext.targetIndex !== moveContext.sourceIndex) {
|
|
46983
47026
|
state.table.internalProps.useOneRowHeightFillAll = false;
|
|
46984
47027
|
state.table.internalProps.layoutMap.clearCellRangeMap();
|
|
46985
47028
|
const sourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);
|
|
@@ -47040,8 +47083,19 @@
|
|
|
47040
47083
|
sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
|
|
47041
47084
|
}
|
|
47042
47085
|
}
|
|
47086
|
+
moveColResult = true;
|
|
47087
|
+
}
|
|
47088
|
+
else {
|
|
47089
|
+
state.updateCursor();
|
|
47090
|
+
state.columnMove.moving = false;
|
|
47091
|
+
delete state.columnMove.colSource;
|
|
47092
|
+
delete state.columnMove.rowSource;
|
|
47093
|
+
delete state.columnMove.colTarget;
|
|
47094
|
+
delete state.columnMove.rowTarget;
|
|
47095
|
+
state.table.scenegraph.component.hideMoveCol();
|
|
47096
|
+
state.table.scenegraph.updateNextFrame();
|
|
47097
|
+
return false;
|
|
47043
47098
|
}
|
|
47044
|
-
state.updateCursor();
|
|
47045
47099
|
}
|
|
47046
47100
|
setTimeout(() => {
|
|
47047
47101
|
state.columnMove.moving = false;
|
|
@@ -47069,6 +47123,7 @@
|
|
|
47069
47123
|
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
47070
47124
|
}
|
|
47071
47125
|
state.table.scenegraph.updateNextFrame();
|
|
47126
|
+
return moveColResult;
|
|
47072
47127
|
}
|
|
47073
47128
|
function clearWidthsAndHeightsCache(colMin, colMax, rowMin, rowMax, table) {
|
|
47074
47129
|
for (let col = colMin; col <= colMax; col++) {
|
|
@@ -48023,7 +48078,7 @@
|
|
|
48023
48078
|
checkCellRangeInSelect(cellPosStart, cellPosEnd) {
|
|
48024
48079
|
return checkMultiCellInSelect(cellPosStart, cellPosEnd, this.select.ranges, this.select.highlightScope);
|
|
48025
48080
|
}
|
|
48026
|
-
updateHoverIcon(col, row, target, cellGroup
|
|
48081
|
+
updateHoverIcon(col, row, target, cellGroup) {
|
|
48027
48082
|
if (this.residentHoverIcon?.icon && target === this.residentHoverIcon?.icon) {
|
|
48028
48083
|
return;
|
|
48029
48084
|
}
|
|
@@ -48217,7 +48272,7 @@
|
|
|
48217
48272
|
return this.columnMove.moving;
|
|
48218
48273
|
}
|
|
48219
48274
|
endMoveCol() {
|
|
48220
|
-
endMoveCol(this);
|
|
48275
|
+
return endMoveCol(this);
|
|
48221
48276
|
}
|
|
48222
48277
|
checkFrozen() {
|
|
48223
48278
|
let originalFrozenColCount = this.table.isListTable() && !this.table.internalProps.transpose
|
|
@@ -48294,6 +48349,7 @@
|
|
|
48294
48349
|
this.table.scenegraph.proxy.deltaY = 0;
|
|
48295
48350
|
this.updateHoverPos(-1, -1);
|
|
48296
48351
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
48352
|
+
event: undefined,
|
|
48297
48353
|
scrollTop: this.scroll.verticalBarPos,
|
|
48298
48354
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
48299
48355
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -48319,6 +48375,7 @@
|
|
|
48319
48375
|
this.table.scenegraph.proxy.deltaX = 0;
|
|
48320
48376
|
this.updateHoverPos(-1, -1);
|
|
48321
48377
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
48378
|
+
event: undefined,
|
|
48322
48379
|
scrollTop: this.scroll.verticalBarPos,
|
|
48323
48380
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
48324
48381
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -48332,7 +48389,7 @@
|
|
|
48332
48389
|
this.checkHorizontalScrollBarEnd();
|
|
48333
48390
|
}
|
|
48334
48391
|
}
|
|
48335
|
-
setScrollTop(top) {
|
|
48392
|
+
setScrollTop(top, event) {
|
|
48336
48393
|
const totalHeight = this.table.getAllRowsHeight();
|
|
48337
48394
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
48338
48395
|
top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance));
|
|
@@ -48350,6 +48407,7 @@
|
|
|
48350
48407
|
this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
|
|
48351
48408
|
if (oldVerticalBarPos !== top) {
|
|
48352
48409
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
48410
|
+
event: event?.nativeEvent,
|
|
48353
48411
|
scrollTop: this.scroll.verticalBarPos,
|
|
48354
48412
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
48355
48413
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -48362,7 +48420,7 @@
|
|
|
48362
48420
|
this.checkVerticalScrollBarEnd();
|
|
48363
48421
|
}
|
|
48364
48422
|
}
|
|
48365
|
-
setScrollLeft(left) {
|
|
48423
|
+
setScrollLeft(left, event) {
|
|
48366
48424
|
this.table.scrollLeft;
|
|
48367
48425
|
const totalWidth = this.table.getAllColsWidth();
|
|
48368
48426
|
this.table.getFrozenColsWidth();
|
|
@@ -48382,6 +48440,7 @@
|
|
|
48382
48440
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
48383
48441
|
if (oldHorizontalBarPos !== left) {
|
|
48384
48442
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
48443
|
+
event: event?.nativeEvent,
|
|
48385
48444
|
scrollTop: this.scroll.verticalBarPos,
|
|
48386
48445
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
48387
48446
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -48715,7 +48774,9 @@
|
|
|
48715
48774
|
else {
|
|
48716
48775
|
return;
|
|
48717
48776
|
}
|
|
48718
|
-
|
|
48777
|
+
const linkTarget = columnDefine.linkTarget;
|
|
48778
|
+
const linkWindowFeatures = columnDefine.linkWindowFeatures;
|
|
48779
|
+
window.open(url, linkTarget, linkWindowFeatures);
|
|
48719
48780
|
}
|
|
48720
48781
|
else if (cellType === 'image') {
|
|
48721
48782
|
const { clickToPreview } = columnDefine;
|
|
@@ -48854,6 +48915,132 @@
|
|
|
48854
48915
|
});
|
|
48855
48916
|
}
|
|
48856
48917
|
|
|
48918
|
+
function handleWhell(event, state, isWheelEvent = true) {
|
|
48919
|
+
let { deltaX, deltaY } = event;
|
|
48920
|
+
if (event.shiftKey && event.deltaY) {
|
|
48921
|
+
deltaX = deltaY;
|
|
48922
|
+
deltaY = 0;
|
|
48923
|
+
}
|
|
48924
|
+
const [optimizedDeltaX, optimizedDeltaY] = optimizeScrollXY(deltaX, deltaY, { horizontal: 1, vertical: 1 });
|
|
48925
|
+
if (optimizedDeltaX || optimizedDeltaY) {
|
|
48926
|
+
if (state.interactionState !== InteractionState.scrolling) {
|
|
48927
|
+
state.updateInteractionState(InteractionState.scrolling);
|
|
48928
|
+
}
|
|
48929
|
+
}
|
|
48930
|
+
if (optimizedDeltaX) {
|
|
48931
|
+
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event);
|
|
48932
|
+
state.showHorizontalScrollBar(true);
|
|
48933
|
+
}
|
|
48934
|
+
if (optimizedDeltaY) {
|
|
48935
|
+
state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event);
|
|
48936
|
+
state.showVerticalScrollBar(true);
|
|
48937
|
+
}
|
|
48938
|
+
isWheelEvent && state.resetInteractionState();
|
|
48939
|
+
if (event.cancelable &&
|
|
48940
|
+
(state.table.internalProps.overscrollBehavior === 'none' ||
|
|
48941
|
+
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
|
|
48942
|
+
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
|
|
48943
|
+
event.preventDefault();
|
|
48944
|
+
}
|
|
48945
|
+
}
|
|
48946
|
+
function optimizeScrollXY(x, y, ratio) {
|
|
48947
|
+
const ANGLE = 2;
|
|
48948
|
+
const angle = Math.abs(x / y);
|
|
48949
|
+
const deltaX = angle <= 1 / ANGLE ? 0 : x;
|
|
48950
|
+
const deltaY = angle > ANGLE ? 0 : y;
|
|
48951
|
+
return [Math.ceil(deltaX * (ratio.horizontal ?? 0)), Math.ceil(deltaY * (ratio.vertical ?? 0))];
|
|
48952
|
+
}
|
|
48953
|
+
function isVerticalScrollable(deltaY, state) {
|
|
48954
|
+
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
48955
|
+
if (totalHeight === 0) {
|
|
48956
|
+
return false;
|
|
48957
|
+
}
|
|
48958
|
+
return !isScrollToTop(deltaY, state) && !isScrollToBottom(deltaY, state);
|
|
48959
|
+
}
|
|
48960
|
+
function isHorizontalScrollable(deltaX, state) {
|
|
48961
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
|
|
48962
|
+
if (totalWidth === 0) {
|
|
48963
|
+
return false;
|
|
48964
|
+
}
|
|
48965
|
+
return !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
|
|
48966
|
+
}
|
|
48967
|
+
function isScrollToTop(deltaY, state) {
|
|
48968
|
+
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
48969
|
+
return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
|
|
48970
|
+
}
|
|
48971
|
+
function isScrollToBottom(deltaY, state) {
|
|
48972
|
+
const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
48973
|
+
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
48974
|
+
return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
|
|
48975
|
+
}
|
|
48976
|
+
function isScrollToLeft(deltaX, state) {
|
|
48977
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
|
|
48978
|
+
return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
|
|
48979
|
+
}
|
|
48980
|
+
function isScrollToRight(deltaX, state) {
|
|
48981
|
+
const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
48982
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
|
|
48983
|
+
return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
|
|
48984
|
+
}
|
|
48985
|
+
class InertiaScroll {
|
|
48986
|
+
friction;
|
|
48987
|
+
lastTime;
|
|
48988
|
+
speedX;
|
|
48989
|
+
speedY;
|
|
48990
|
+
stateManager;
|
|
48991
|
+
runingId;
|
|
48992
|
+
scrollHandle;
|
|
48993
|
+
constructor(stateManager) {
|
|
48994
|
+
this.stateManager = stateManager;
|
|
48995
|
+
}
|
|
48996
|
+
setScrollHandle(scrollHandle) {
|
|
48997
|
+
this.scrollHandle = scrollHandle;
|
|
48998
|
+
}
|
|
48999
|
+
startInertia(speedX, speedY, friction) {
|
|
49000
|
+
this.lastTime = Date.now();
|
|
49001
|
+
this.speedX = speedX;
|
|
49002
|
+
this.speedY = speedY;
|
|
49003
|
+
this.friction = friction;
|
|
49004
|
+
if (!this.runingId) {
|
|
49005
|
+
this.runingId = requestAnimationFrame(this.inertia.bind(this));
|
|
49006
|
+
}
|
|
49007
|
+
}
|
|
49008
|
+
inertia() {
|
|
49009
|
+
const now = Date.now();
|
|
49010
|
+
const dffTime = now - this.lastTime;
|
|
49011
|
+
let stopped = true;
|
|
49012
|
+
const f = Math.pow(this.friction, dffTime / 16);
|
|
49013
|
+
const newSpeedX = f * this.speedX;
|
|
49014
|
+
const newSpeedY = f * this.speedY;
|
|
49015
|
+
let dx = 0;
|
|
49016
|
+
let dy = 0;
|
|
49017
|
+
if (Math.abs(newSpeedX) > 0.05) {
|
|
49018
|
+
stopped = false;
|
|
49019
|
+
dx = ((this.speedX + newSpeedX) / 2) * dffTime;
|
|
49020
|
+
}
|
|
49021
|
+
if (Math.abs(newSpeedY) > 0.05) {
|
|
49022
|
+
stopped = false;
|
|
49023
|
+
dy = ((this.speedY + newSpeedY) / 2) * dffTime;
|
|
49024
|
+
}
|
|
49025
|
+
this.scrollHandle?.(dx, dy);
|
|
49026
|
+
if (stopped) {
|
|
49027
|
+
this.runingId = null;
|
|
49028
|
+
return;
|
|
49029
|
+
}
|
|
49030
|
+
this.lastTime = now;
|
|
49031
|
+
this.speedX = newSpeedX;
|
|
49032
|
+
this.speedY = newSpeedY;
|
|
49033
|
+
this.runingId = requestAnimationFrame(this.inertia.bind(this));
|
|
49034
|
+
}
|
|
49035
|
+
endInertia() {
|
|
49036
|
+
cancelAnimationFrame(this.runingId);
|
|
49037
|
+
this.runingId = null;
|
|
49038
|
+
}
|
|
49039
|
+
isInertiaScrolling() {
|
|
49040
|
+
return !!this.runingId;
|
|
49041
|
+
}
|
|
49042
|
+
}
|
|
49043
|
+
|
|
48857
49044
|
function bindTableGroupListener(eventManager) {
|
|
48858
49045
|
const table = eventManager.table;
|
|
48859
49046
|
const stateManager = table.stateManager;
|
|
@@ -48877,7 +49064,7 @@
|
|
|
48877
49064
|
eventManager.dealFillSelect(eventArgsSet, true);
|
|
48878
49065
|
}
|
|
48879
49066
|
else {
|
|
48880
|
-
eventManager.dealTableSelect(eventArgsSet, true);
|
|
49067
|
+
table.options.select?.disableDragSelect || eventManager.dealTableSelect(eventArgsSet, true);
|
|
48881
49068
|
}
|
|
48882
49069
|
}
|
|
48883
49070
|
return;
|
|
@@ -49053,8 +49240,9 @@
|
|
|
49053
49240
|
endResizeRow(table);
|
|
49054
49241
|
}
|
|
49055
49242
|
else if (stateManager.isMoveCol()) {
|
|
49056
|
-
table.stateManager.endMoveCol();
|
|
49057
|
-
if (
|
|
49243
|
+
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
49244
|
+
if (endMoveColSuccess &&
|
|
49245
|
+
table.stateManager.columnMove?.colSource !== -1 &&
|
|
49058
49246
|
table.stateManager.columnMove?.rowSource !== -1 &&
|
|
49059
49247
|
table.stateManager.columnMove?.colTarget !== -1 &&
|
|
49060
49248
|
table.stateManager.columnMove?.rowTarget !== -1) {
|
|
@@ -49209,8 +49397,10 @@
|
|
|
49209
49397
|
}
|
|
49210
49398
|
else if (stateManager.isMoveCol()) {
|
|
49211
49399
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
49212
|
-
table.stateManager.endMoveCol();
|
|
49213
|
-
if (
|
|
49400
|
+
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
49401
|
+
if (endMoveColSuccess &&
|
|
49402
|
+
eventArgsSet.eventArgs &&
|
|
49403
|
+
table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
49214
49404
|
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
49215
49405
|
target: { col: eventArgsSet.eventArgs.col, row: eventArgsSet.eventArgs.row },
|
|
49216
49406
|
source: {
|
|
@@ -49429,6 +49619,7 @@
|
|
|
49429
49619
|
stateManager.updateCursor('row-resize');
|
|
49430
49620
|
}
|
|
49431
49621
|
}
|
|
49622
|
+
else if (stateManager.isMoveCol()) ;
|
|
49432
49623
|
else {
|
|
49433
49624
|
stateManager.updateCursor();
|
|
49434
49625
|
}
|
|
@@ -49553,6 +49744,12 @@
|
|
|
49553
49744
|
table.fireListeners(TABLE_EVENT_TYPE.RADIO_STATE_CHANGE, cellsEvent);
|
|
49554
49745
|
table.scenegraph.updateNextFrame();
|
|
49555
49746
|
});
|
|
49747
|
+
table.scenegraph.stage.addEventListener('wheel', (e) => {
|
|
49748
|
+
table.editorManager?.completeEdit();
|
|
49749
|
+
if (table.eventManager._enableTableScroll) {
|
|
49750
|
+
handleWhell(e, stateManager);
|
|
49751
|
+
}
|
|
49752
|
+
});
|
|
49556
49753
|
}
|
|
49557
49754
|
function bindGesture(eventManager) {
|
|
49558
49755
|
const table = eventManager.table;
|
|
@@ -49757,132 +49954,6 @@
|
|
|
49757
49954
|
});
|
|
49758
49955
|
}
|
|
49759
49956
|
|
|
49760
|
-
function handleWhell(event, state, isWheelEvent = true) {
|
|
49761
|
-
let { deltaX, deltaY } = event;
|
|
49762
|
-
if (event.shiftKey && event.deltaY) {
|
|
49763
|
-
deltaX = deltaY;
|
|
49764
|
-
deltaY = 0;
|
|
49765
|
-
}
|
|
49766
|
-
const [optimizedDeltaX, optimizedDeltaY] = optimizeScrollXY(deltaX, deltaY, { horizontal: 1, vertical: 1 });
|
|
49767
|
-
if (optimizedDeltaX || optimizedDeltaY) {
|
|
49768
|
-
if (state.interactionState !== InteractionState.scrolling) {
|
|
49769
|
-
state.updateInteractionState(InteractionState.scrolling);
|
|
49770
|
-
}
|
|
49771
|
-
}
|
|
49772
|
-
if (optimizedDeltaX) {
|
|
49773
|
-
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX);
|
|
49774
|
-
state.showHorizontalScrollBar(true);
|
|
49775
|
-
}
|
|
49776
|
-
if (optimizedDeltaY) {
|
|
49777
|
-
state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY);
|
|
49778
|
-
state.showVerticalScrollBar(true);
|
|
49779
|
-
}
|
|
49780
|
-
isWheelEvent && state.resetInteractionState();
|
|
49781
|
-
if (event.cancelable &&
|
|
49782
|
-
(state.table.internalProps.overscrollBehavior === 'none' ||
|
|
49783
|
-
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
|
|
49784
|
-
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
|
|
49785
|
-
event.preventDefault();
|
|
49786
|
-
}
|
|
49787
|
-
}
|
|
49788
|
-
function optimizeScrollXY(x, y, ratio) {
|
|
49789
|
-
const ANGLE = 2;
|
|
49790
|
-
const angle = Math.abs(x / y);
|
|
49791
|
-
const deltaX = angle <= 1 / ANGLE ? 0 : x;
|
|
49792
|
-
const deltaY = angle > ANGLE ? 0 : y;
|
|
49793
|
-
return [Math.ceil(deltaX * (ratio.horizontal ?? 0)), Math.ceil(deltaY * (ratio.vertical ?? 0))];
|
|
49794
|
-
}
|
|
49795
|
-
function isVerticalScrollable(deltaY, state) {
|
|
49796
|
-
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
49797
|
-
if (totalHeight === 0) {
|
|
49798
|
-
return false;
|
|
49799
|
-
}
|
|
49800
|
-
return !isScrollToTop(deltaY, state) && !isScrollToBottom(deltaY, state);
|
|
49801
|
-
}
|
|
49802
|
-
function isHorizontalScrollable(deltaX, state) {
|
|
49803
|
-
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
|
|
49804
|
-
if (totalWidth === 0) {
|
|
49805
|
-
return false;
|
|
49806
|
-
}
|
|
49807
|
-
return !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
|
|
49808
|
-
}
|
|
49809
|
-
function isScrollToTop(deltaY, state) {
|
|
49810
|
-
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
49811
|
-
return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
|
|
49812
|
-
}
|
|
49813
|
-
function isScrollToBottom(deltaY, state) {
|
|
49814
|
-
const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
49815
|
-
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
49816
|
-
return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
|
|
49817
|
-
}
|
|
49818
|
-
function isScrollToLeft(deltaX, state) {
|
|
49819
|
-
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
|
|
49820
|
-
return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
|
|
49821
|
-
}
|
|
49822
|
-
function isScrollToRight(deltaX, state) {
|
|
49823
|
-
const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
49824
|
-
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
|
|
49825
|
-
return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
|
|
49826
|
-
}
|
|
49827
|
-
class InertiaScroll {
|
|
49828
|
-
friction;
|
|
49829
|
-
lastTime;
|
|
49830
|
-
speedX;
|
|
49831
|
-
speedY;
|
|
49832
|
-
stateManager;
|
|
49833
|
-
runingId;
|
|
49834
|
-
scrollHandle;
|
|
49835
|
-
constructor(stateManager) {
|
|
49836
|
-
this.stateManager = stateManager;
|
|
49837
|
-
}
|
|
49838
|
-
setScrollHandle(scrollHandle) {
|
|
49839
|
-
this.scrollHandle = scrollHandle;
|
|
49840
|
-
}
|
|
49841
|
-
startInertia(speedX, speedY, friction) {
|
|
49842
|
-
this.lastTime = Date.now();
|
|
49843
|
-
this.speedX = speedX;
|
|
49844
|
-
this.speedY = speedY;
|
|
49845
|
-
this.friction = friction;
|
|
49846
|
-
if (!this.runingId) {
|
|
49847
|
-
this.runingId = requestAnimationFrame(this.inertia.bind(this));
|
|
49848
|
-
}
|
|
49849
|
-
}
|
|
49850
|
-
inertia() {
|
|
49851
|
-
const now = Date.now();
|
|
49852
|
-
const dffTime = now - this.lastTime;
|
|
49853
|
-
let stopped = true;
|
|
49854
|
-
const f = Math.pow(this.friction, dffTime / 16);
|
|
49855
|
-
const newSpeedX = f * this.speedX;
|
|
49856
|
-
const newSpeedY = f * this.speedY;
|
|
49857
|
-
let dx = 0;
|
|
49858
|
-
let dy = 0;
|
|
49859
|
-
if (Math.abs(newSpeedX) > 0.05) {
|
|
49860
|
-
stopped = false;
|
|
49861
|
-
dx = ((this.speedX + newSpeedX) / 2) * dffTime;
|
|
49862
|
-
}
|
|
49863
|
-
if (Math.abs(newSpeedY) > 0.05) {
|
|
49864
|
-
stopped = false;
|
|
49865
|
-
dy = ((this.speedY + newSpeedY) / 2) * dffTime;
|
|
49866
|
-
}
|
|
49867
|
-
this.scrollHandle?.(dx, dy);
|
|
49868
|
-
if (stopped) {
|
|
49869
|
-
this.runingId = null;
|
|
49870
|
-
return;
|
|
49871
|
-
}
|
|
49872
|
-
this.lastTime = now;
|
|
49873
|
-
this.speedX = newSpeedX;
|
|
49874
|
-
this.speedY = newSpeedY;
|
|
49875
|
-
this.runingId = requestAnimationFrame(this.inertia.bind(this));
|
|
49876
|
-
}
|
|
49877
|
-
endInertia() {
|
|
49878
|
-
cancelAnimationFrame(this.runingId);
|
|
49879
|
-
this.runingId = null;
|
|
49880
|
-
}
|
|
49881
|
-
isInertiaScrolling() {
|
|
49882
|
-
return !!this.runingId;
|
|
49883
|
-
}
|
|
49884
|
-
}
|
|
49885
|
-
|
|
49886
49957
|
let defaultPixelRatio = 1;
|
|
49887
49958
|
function getPixelRatio() {
|
|
49888
49959
|
if (isNode) {
|
|
@@ -49905,12 +49976,6 @@
|
|
|
49905
49976
|
handler.on(table.getElement(), 'blur', (e) => {
|
|
49906
49977
|
eventManager.dealTableHover();
|
|
49907
49978
|
});
|
|
49908
|
-
handler.on(table.getElement(), 'wheel', (e) => {
|
|
49909
|
-
table.editorManager?.completeEdit();
|
|
49910
|
-
if (table.eventManager._enableTableScroll) {
|
|
49911
|
-
handleWhell(e, stateManager);
|
|
49912
|
-
}
|
|
49913
|
-
});
|
|
49914
49979
|
handler.on(table.getElement(), 'keydown', (e) => {
|
|
49915
49980
|
if (e.key === 'a' && (e.ctrlKey || e.metaKey)) {
|
|
49916
49981
|
if (table.keyboardOptions?.selectAllOnCtrlA) {
|
|
@@ -50906,7 +50971,7 @@
|
|
|
50906
50971
|
dealIconHover(eventArgsSet) {
|
|
50907
50972
|
const { eventArgs } = eventArgsSet;
|
|
50908
50973
|
if (eventArgs) {
|
|
50909
|
-
this.table.stateManager.updateHoverIcon(eventArgs.col, eventArgs.row, eventArgs.target, eventArgs.targetCell
|
|
50974
|
+
this.table.stateManager.updateHoverIcon(eventArgs.col, eventArgs.row, eventArgs.target, eventArgs.targetCell);
|
|
50910
50975
|
}
|
|
50911
50976
|
else {
|
|
50912
50977
|
this.table.stateManager.updateHoverIcon(-1, -1, undefined, undefined);
|
|
@@ -53629,29 +53694,38 @@
|
|
|
53629
53694
|
function dealHeaderForTreeMode(hd, _headerCellIds, results, roots, row, totalLevel, show, dimensions, layoutMap) {
|
|
53630
53695
|
const id = hd.id;
|
|
53631
53696
|
const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === hd.dimensionKey);
|
|
53697
|
+
const indicatorInfo = layoutMap.indicatorsDefine?.find(indicator => {
|
|
53698
|
+
if (typeof indicator === 'string') {
|
|
53699
|
+
return false;
|
|
53700
|
+
}
|
|
53701
|
+
if (hd.indicatorKey) {
|
|
53702
|
+
return indicator.indicatorKey === hd.indicatorKey;
|
|
53703
|
+
}
|
|
53704
|
+
return indicator.title === hd.value;
|
|
53705
|
+
});
|
|
53632
53706
|
const cell = {
|
|
53633
53707
|
id,
|
|
53634
|
-
title: hd.value,
|
|
53708
|
+
title: hd.value ?? indicatorInfo.title,
|
|
53635
53709
|
field: hd.dimensionKey,
|
|
53636
|
-
style: hd.level + 1 === totalLevel || typeof dimensionInfo?.headerStyle === 'function'
|
|
53637
|
-
? dimensionInfo?.headerStyle
|
|
53638
|
-
: Object.assign({}, dimensionInfo?.headerStyle, { textAlign: 'left' }),
|
|
53639
|
-
headerType: dimensionInfo?.headerType ?? 'text',
|
|
53640
|
-
headerIcon: dimensionInfo?.headerIcon,
|
|
53710
|
+
style: hd.level + 1 === totalLevel || typeof (indicatorInfo ?? dimensionInfo)?.headerStyle === 'function'
|
|
53711
|
+
? (indicatorInfo ?? dimensionInfo)?.headerStyle
|
|
53712
|
+
: Object.assign({}, (indicatorInfo ?? dimensionInfo)?.headerStyle, { textAlign: 'left' }),
|
|
53713
|
+
headerType: indicatorInfo?.headerType ?? dimensionInfo?.headerType ?? 'text',
|
|
53714
|
+
headerIcon: indicatorInfo?.headerIcon ?? dimensionInfo?.headerIcon,
|
|
53641
53715
|
define: Object.assign(hd, {
|
|
53642
|
-
linkJump: dimensionInfo?.linkJump,
|
|
53643
|
-
linkDetect: dimensionInfo?.linkDetect,
|
|
53644
|
-
templateLink: dimensionInfo?.templateLink,
|
|
53645
|
-
keepAspectRatio: dimensionInfo?.keepAspectRatio ?? false,
|
|
53646
|
-
imageAutoSizing: dimensionInfo?.imageAutoSizing,
|
|
53647
|
-
headerCustomRender: dimensionInfo?.headerCustomRender,
|
|
53648
|
-
headerCustomLayout: dimensionInfo?.headerCustomLayout,
|
|
53716
|
+
linkJump: (indicatorInfo ?? dimensionInfo)?.linkJump,
|
|
53717
|
+
linkDetect: (indicatorInfo ?? dimensionInfo)?.linkDetect,
|
|
53718
|
+
templateLink: (indicatorInfo ?? dimensionInfo)?.templateLink,
|
|
53719
|
+
keepAspectRatio: (indicatorInfo ?? dimensionInfo)?.keepAspectRatio ?? false,
|
|
53720
|
+
imageAutoSizing: (indicatorInfo ?? dimensionInfo)?.imageAutoSizing,
|
|
53721
|
+
headerCustomRender: (indicatorInfo ?? dimensionInfo)?.headerCustomRender,
|
|
53722
|
+
headerCustomLayout: (indicatorInfo ?? dimensionInfo)?.headerCustomLayout,
|
|
53649
53723
|
dragHeader: dimensionInfo?.dragHeader,
|
|
53650
|
-
disableHeaderHover: !!dimensionInfo?.disableHeaderHover,
|
|
53651
|
-
disableHeaderSelect: !!dimensionInfo?.disableHeaderSelect
|
|
53724
|
+
disableHeaderHover: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderHover,
|
|
53725
|
+
disableHeaderSelect: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderSelect
|
|
53652
53726
|
}),
|
|
53653
|
-
fieldFormat: dimensionInfo?.headerFormat,
|
|
53654
|
-
dropDownMenu: dimensionInfo?.dropDownMenu,
|
|
53727
|
+
fieldFormat: indicatorInfo?.headerFormat ?? dimensionInfo?.headerFormat,
|
|
53728
|
+
dropDownMenu: indicatorInfo?.dropDownMenu ?? dimensionInfo?.dropDownMenu,
|
|
53655
53729
|
pivotInfo: {
|
|
53656
53730
|
value: hd.value,
|
|
53657
53731
|
dimensionKey: hd.dimensionKey,
|
|
@@ -53665,6 +53739,43 @@
|
|
|
53665
53739
|
maxWidth: dimensionInfo?.maxWidth,
|
|
53666
53740
|
parentCellId: roots[roots.length - 1]
|
|
53667
53741
|
};
|
|
53742
|
+
if (indicatorInfo) {
|
|
53743
|
+
if (indicatorInfo.customRender) {
|
|
53744
|
+
hd.customRender = indicatorInfo.customRender;
|
|
53745
|
+
}
|
|
53746
|
+
if (!isValid$3(layoutMap._indicators?.find(indicator => indicator.indicatorKey === indicatorInfo.indicatorKey))) {
|
|
53747
|
+
layoutMap._indicators?.push({
|
|
53748
|
+
id: ++layoutMap.sharedVar.seqId,
|
|
53749
|
+
indicatorKey: indicatorInfo.indicatorKey,
|
|
53750
|
+
field: indicatorInfo.indicatorKey,
|
|
53751
|
+
fieldFormat: indicatorInfo?.format,
|
|
53752
|
+
cellType: indicatorInfo?.cellType ?? indicatorInfo?.columnType ?? 'text',
|
|
53753
|
+
chartModule: 'chartModule' in indicatorInfo ? indicatorInfo.chartModule : null,
|
|
53754
|
+
chartSpec: 'chartSpec' in indicatorInfo ? indicatorInfo.chartSpec : null,
|
|
53755
|
+
sparklineSpec: 'sparklineSpec' in indicatorInfo ? indicatorInfo.sparklineSpec : null,
|
|
53756
|
+
style: indicatorInfo?.style,
|
|
53757
|
+
icon: indicatorInfo?.icon,
|
|
53758
|
+
define: Object.assign({}, hd, indicatorInfo, {
|
|
53759
|
+
dragHeader: dimensionInfo?.dragHeader
|
|
53760
|
+
}),
|
|
53761
|
+
width: indicatorInfo?.width,
|
|
53762
|
+
minWidth: indicatorInfo?.minWidth,
|
|
53763
|
+
maxWidth: indicatorInfo?.maxWidth,
|
|
53764
|
+
disableColumnResize: indicatorInfo?.disableColumnResize
|
|
53765
|
+
});
|
|
53766
|
+
}
|
|
53767
|
+
}
|
|
53768
|
+
else if (hd.indicatorKey) {
|
|
53769
|
+
if (!isValid$3(layoutMap._indicators?.find(indicator => indicator.indicatorKey === hd.indicatorKey))) {
|
|
53770
|
+
layoutMap._indicators?.push({
|
|
53771
|
+
id: ++layoutMap.sharedVar.seqId,
|
|
53772
|
+
indicatorKey: hd.indicatorKey,
|
|
53773
|
+
field: hd.indicatorKey,
|
|
53774
|
+
cellType: 'text',
|
|
53775
|
+
define: Object.assign({}, hd)
|
|
53776
|
+
});
|
|
53777
|
+
}
|
|
53778
|
+
}
|
|
53668
53779
|
results[id] = cell;
|
|
53669
53780
|
layoutMap._headerObjects[id] = cell;
|
|
53670
53781
|
_headerCellIds[row][layoutMap.colIndex] = id;
|
|
@@ -55156,7 +55267,7 @@
|
|
|
55156
55267
|
return TABLE_EVENT_TYPE;
|
|
55157
55268
|
}
|
|
55158
55269
|
options;
|
|
55159
|
-
version = "1.6.3
|
|
55270
|
+
version = "1.6.3";
|
|
55160
55271
|
pagination;
|
|
55161
55272
|
id = `VTable${Date.now()}`;
|
|
55162
55273
|
headerStyleCache;
|
|
@@ -56668,9 +56779,9 @@
|
|
|
56668
56779
|
clearSelected() {
|
|
56669
56780
|
this.stateManager.updateSelectPos(-1, -1);
|
|
56670
56781
|
}
|
|
56671
|
-
selectCell(col, row, isShift, isCtrl) {
|
|
56782
|
+
selectCell(col, row, isShift, isCtrl, makeSelectCellVisible = true) {
|
|
56672
56783
|
const isHasSelected = !!this.stateManager.select.ranges?.length;
|
|
56673
|
-
this.stateManager.updateSelectPos(col, row, isShift, isCtrl);
|
|
56784
|
+
this.stateManager.updateSelectPos(col, row, isShift, isCtrl, false, !makeSelectCellVisible);
|
|
56674
56785
|
this.stateManager.endSelectCells(true, isHasSelected);
|
|
56675
56786
|
}
|
|
56676
56787
|
selectCells(cellRanges) {
|
|
@@ -60403,7 +60514,7 @@
|
|
|
60403
60514
|
}
|
|
60404
60515
|
getHeaderCellAddressByField(field) {
|
|
60405
60516
|
const hd = this.headerObjects.find((col) => col && col.field === field);
|
|
60406
|
-
return this.getHeaderCellAdressById(hd.id);
|
|
60517
|
+
return hd && this.getHeaderCellAdressById(hd.id);
|
|
60407
60518
|
}
|
|
60408
60519
|
getBody(col, _row) {
|
|
60409
60520
|
if (this.isSeriesNumber(col, _row)) {
|
|
@@ -60423,7 +60534,7 @@
|
|
|
60423
60534
|
}
|
|
60424
60535
|
}
|
|
60425
60536
|
else {
|
|
60426
|
-
for (let col =
|
|
60537
|
+
for (let col = this.leftRowSeriesNumberColumnCount; col < (this.colCount ?? 0); col++) {
|
|
60427
60538
|
if (id === this._columns[col - this.leftRowSeriesNumberColumnCount].id) {
|
|
60428
60539
|
return {
|
|
60429
60540
|
start: { col, row: 0 },
|
|
@@ -60432,7 +60543,10 @@
|
|
|
60432
60543
|
}
|
|
60433
60544
|
}
|
|
60434
60545
|
}
|
|
60435
|
-
|
|
60546
|
+
return {
|
|
60547
|
+
start: { col: -1, row: -1 },
|
|
60548
|
+
end: { col: -1, row: -1 }
|
|
60549
|
+
};
|
|
60436
60550
|
}
|
|
60437
60551
|
getCellRange(col, row) {
|
|
60438
60552
|
return getCellRange(col, row, this);
|
|
@@ -60623,7 +60737,10 @@
|
|
|
60623
60737
|
else if (!this.transpose &&
|
|
60624
60738
|
this.isSeriesNumberInBody(target.col, target.row) &&
|
|
60625
60739
|
this.isSeriesNumberInBody(source.col, source.row)) {
|
|
60626
|
-
|
|
60740
|
+
const sourceIndex = this.getRecordShowIndexByCell(0, source.row);
|
|
60741
|
+
const targetIndex = this.getRecordShowIndexByCell(0, target.row);
|
|
60742
|
+
const canMove = this._table.dataSource.isCanExchangeOrder(sourceIndex, targetIndex);
|
|
60743
|
+
return canMove;
|
|
60627
60744
|
}
|
|
60628
60745
|
else if (this.transpose &&
|
|
60629
60746
|
this.isSeriesNumberInBody(target.col, target.row) &&
|
|
@@ -61234,7 +61351,7 @@
|
|
|
61234
61351
|
if (order && field && order !== 'normal') {
|
|
61235
61352
|
const sortFunc = table._getSortFuncFromHeaderOption(undefined, field);
|
|
61236
61353
|
const hd = table.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
|
|
61237
|
-
table.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
|
|
61354
|
+
hd && table.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
|
|
61238
61355
|
}
|
|
61239
61356
|
}
|
|
61240
61357
|
}
|
|
@@ -61788,6 +61905,9 @@
|
|
|
61788
61905
|
}
|
|
61789
61906
|
getTableIndexByField(field) {
|
|
61790
61907
|
const colObj = this.internalProps.layoutMap.columnObjects.find((col) => col.field === field);
|
|
61908
|
+
if (!colObj) {
|
|
61909
|
+
return -1;
|
|
61910
|
+
}
|
|
61791
61911
|
const layoutRange = this.internalProps.layoutMap.getBodyLayoutRangeById(colObj.id);
|
|
61792
61912
|
if (this.transpose) {
|
|
61793
61913
|
return layoutRange.start.row;
|
|
@@ -61845,6 +61965,7 @@
|
|
|
61845
61965
|
: options.header
|
|
61846
61966
|
? cloneDeepSpec(options.header, ['children'])
|
|
61847
61967
|
: [];
|
|
61968
|
+
internalProps.enableTreeNodeMerge = options.enableTreeNodeMerge ?? isValid$3(options.groupBy) ?? false;
|
|
61848
61969
|
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
61849
61970
|
this.transpose = options.transpose ?? false;
|
|
61850
61971
|
this.refreshHeader();
|
|
@@ -62200,7 +62321,7 @@
|
|
|
62200
62321
|
if (field && executeSort) {
|
|
62201
62322
|
const sortFunc = this._getSortFuncFromHeaderOption(this.internalProps.columns, field);
|
|
62202
62323
|
const hd = this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
|
|
62203
|
-
if (hd.define.sort !== false) {
|
|
62324
|
+
if (hd && hd.define.sort !== false) {
|
|
62204
62325
|
this.dataSource.sort(hd.field, order, sortFunc);
|
|
62205
62326
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
62206
62327
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
@@ -62296,7 +62417,7 @@
|
|
|
62296
62417
|
if (order && field && order !== 'normal') {
|
|
62297
62418
|
const sortFunc = this._getSortFuncFromHeaderOption(undefined, field);
|
|
62298
62419
|
const hd = this.internalProps.layoutMap.headerObjectsIncludeHided.find((col) => col && col.field === field);
|
|
62299
|
-
if (hd.define.sort !== false) {
|
|
62420
|
+
if (hd && hd.define.sort !== false) {
|
|
62300
62421
|
this.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
|
|
62301
62422
|
}
|
|
62302
62423
|
}
|
|
@@ -67442,7 +67563,7 @@
|
|
|
67442
67563
|
return cellGroup;
|
|
67443
67564
|
}
|
|
67444
67565
|
|
|
67445
|
-
function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table) {
|
|
67566
|
+
function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table, range) {
|
|
67446
67567
|
if (progressBarDefine.dependField) {
|
|
67447
67568
|
dataValue = table.getCellOriginRecord(col, row)?.[progressBarDefine.dependField] ?? dataValue;
|
|
67448
67569
|
}
|
|
@@ -67465,7 +67586,13 @@
|
|
|
67465
67586
|
dataValue,
|
|
67466
67587
|
cellHeaderPaths: undefined
|
|
67467
67588
|
}) ?? progressBarDefine.min + 100;
|
|
67468
|
-
|
|
67589
|
+
let height = 0;
|
|
67590
|
+
if (range) {
|
|
67591
|
+
height = table.getRowsHeight(range.start.row, range.end.row);
|
|
67592
|
+
}
|
|
67593
|
+
else {
|
|
67594
|
+
height = table.getRowHeight(row);
|
|
67595
|
+
}
|
|
67469
67596
|
let contentWidth = width;
|
|
67470
67597
|
let contentHeight = height;
|
|
67471
67598
|
let _contentOffset = 0;
|
|
@@ -69396,7 +69523,7 @@
|
|
|
69396
69523
|
}
|
|
69397
69524
|
getHeaderCellAddressByField(field) {
|
|
69398
69525
|
const hd = this.headerObjects.find((col) => col && col.field === field);
|
|
69399
|
-
return this.getHeaderCellAdressById(hd.id);
|
|
69526
|
+
return hd && this.getHeaderCellAdressById(hd.id);
|
|
69400
69527
|
}
|
|
69401
69528
|
getBody(_col, _row) {
|
|
69402
69529
|
const cache = this.getBodyWidthCache(_col, _row);
|
|
@@ -70106,7 +70233,24 @@
|
|
|
70106
70233
|
}
|
|
70107
70234
|
});
|
|
70108
70235
|
if (isCornerCell) {
|
|
70109
|
-
if (this.cornerSetting.titleOnDimension === '
|
|
70236
|
+
if (this.cornerSetting.titleOnDimension === 'all' && this.indicatorsAsCol && colHeaderPaths.length === 0) {
|
|
70237
|
+
for (let i = 0; i < this.rowDimensionKeys.length; i++) {
|
|
70238
|
+
if (rowHeaderPaths[0]?.dimensionKey === this.rowDimensionKeys[i]) {
|
|
70239
|
+
return { col: i + this.leftRowSeriesNumberColumnCount, row: this.columnHeaderLevelCount - 1 };
|
|
70240
|
+
}
|
|
70241
|
+
}
|
|
70242
|
+
}
|
|
70243
|
+
else if (this.cornerSetting.titleOnDimension === 'all' &&
|
|
70244
|
+
!this.indicatorsAsCol &&
|
|
70245
|
+
rowHeaderPaths.length === 0) {
|
|
70246
|
+
for (let i = 0; i < this.colDimensionKeys.length; i++) {
|
|
70247
|
+
if (colHeaderPaths[0]?.dimensionKey === this.colDimensionKeys[i]) {
|
|
70248
|
+
return { col: this.rowHeaderLevelCount - 1, row: i };
|
|
70249
|
+
}
|
|
70250
|
+
}
|
|
70251
|
+
}
|
|
70252
|
+
else if (this.cornerSetting.titleOnDimension === 'row' ||
|
|
70253
|
+
(this.cornerSetting.titleOnDimension === 'all' && !this.indicatorsAsCol)) {
|
|
70110
70254
|
for (let i = 0; i < this.rowDimensionKeys.length; i++) {
|
|
70111
70255
|
if (rowHeaderPaths[0]?.dimensionKey === this.rowDimensionKeys[i]) {
|
|
70112
70256
|
return { col: i + this.leftRowSeriesNumberColumnCount, row: 0 };
|
|
@@ -72524,6 +72668,10 @@
|
|
|
72524
72668
|
this.changedTree[flatRowKey][flatColKey] = [];
|
|
72525
72669
|
this.changedTree[flatRowKey][flatColKey][indicatorIndex] = newValue;
|
|
72526
72670
|
}
|
|
72671
|
+
const cellAggregator = this.tree[flatRowKey][flatColKey][indicatorIndex];
|
|
72672
|
+
if (cellAggregator.records.length === 1) {
|
|
72673
|
+
cellAggregator.records[0][this.indicatorKeys[indicatorIndex]] = newValue;
|
|
72674
|
+
}
|
|
72527
72675
|
}
|
|
72528
72676
|
changeRecordFieldValue(fieldName, oldValue, value) {
|
|
72529
72677
|
let isIndicatorName = false;
|
|
@@ -75654,7 +75802,7 @@
|
|
|
75654
75802
|
}
|
|
75655
75803
|
|
|
75656
75804
|
registerForVrender();
|
|
75657
|
-
const version = "1.6.3
|
|
75805
|
+
const version = "1.6.3";
|
|
75658
75806
|
function getIcons() {
|
|
75659
75807
|
return get$2();
|
|
75660
75808
|
}
|