@visactor/vtable 0.24.2-alpha.4 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js +5 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +14 -12
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +89 -43
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +62 -16
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +3 -1
- package/cjs/core/TABLE_EVENT_TYPE.js +3 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +1 -0
- package/cjs/dataset/dataset.js +14 -0
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/flatDataToObject.d.ts +8 -3
- package/cjs/dataset/flatDataToObject.js +39 -8
- package/cjs/dataset/flatDataToObject.js.map +1 -1
- package/cjs/edit/edit-manager.js +0 -2
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/event.d.ts +2 -0
- package/cjs/event/event.js +12 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +5 -2
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +8 -0
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +23 -8
- package/cjs/event/listener/table-group.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.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +16 -4
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +8 -0
- package/cjs/scenegraph/component/table-component.js +180 -2
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -0
- package/cjs/scenegraph/component/util.js +8 -2
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +18 -9
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -5
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +4 -2
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +7 -0
- package/cjs/scenegraph/scenegraph.js +42 -19
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +4 -4
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/cell-move/index.js +2 -1
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +4 -3
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/resize/update-resize-row.d.ts +2 -0
- package/cjs/state/resize/update-resize-row.js +63 -0
- package/cjs/state/resize/update-resize-row.js.map +1 -0
- package/cjs/state/state.d.ts +11 -1
- package/cjs/state/state.js +30 -5
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/component.js +1 -1
- package/cjs/tools/global.d.ts +1 -0
- package/cjs/tools/global.js +2 -2
- package/cjs/tools/global.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +11 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +6 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +3 -0
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +5 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +914 -107
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +5 -3
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +14 -12
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +89 -43
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +62 -17
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +3 -1
- package/es/core/TABLE_EVENT_TYPE.js +3 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/dataset/dataset.d.ts +1 -0
- package/es/dataset/dataset.js +14 -0
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/flatDataToObject.d.ts +8 -3
- package/es/dataset/flatDataToObject.js +38 -8
- package/es/dataset/flatDataToObject.js.map +1 -1
- package/es/edit/edit-manager.js +0 -2
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/event.d.ts +2 -0
- package/es/event/event.js +12 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +5 -2
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +8 -0
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +23 -8
- package/es/event/listener/table-group.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.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +12 -2
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +8 -0
- package/es/scenegraph/component/table-component.js +181 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -0
- package/es/scenegraph/component/util.js +7 -1
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +18 -9
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -4
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +4 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +4 -2
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +7 -0
- package/es/scenegraph/scenegraph.js +44 -19
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +4 -4
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/cell-move/index.js +2 -1
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/resize/update-resize-column.js +4 -3
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/resize/update-resize-row.d.ts +2 -0
- package/es/state/resize/update-resize-row.js +57 -0
- package/es/state/resize/update-resize-row.js.map +1 -0
- package/es/state/state.d.ts +11 -1
- package/es/state/state.js +31 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/component.js +1 -1
- package/es/tools/global.d.ts +1 -0
- package/es/tools/global.js +2 -0
- package/es/tools/global.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +11 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +6 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +3 -0
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +5 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -23297,12 +23297,15 @@
|
|
|
23297
23297
|
KEYDOWN: 'keydown',
|
|
23298
23298
|
MOUSEENTER_TABLE: 'mouseenter_table',
|
|
23299
23299
|
MOUSELEAVE_TABLE: 'mouseleave_table',
|
|
23300
|
+
MOUSEDOWN_TABLE: 'mousedown_table',
|
|
23300
23301
|
MOUSEMOVE_CELL: 'mousemove_cell',
|
|
23301
23302
|
MOUSEENTER_CELL: 'mouseenter_cell',
|
|
23302
23303
|
MOUSELEAVE_CELL: 'mouseleave_cell',
|
|
23303
23304
|
CONTEXTMENU_CELL: 'contextmenu_cell',
|
|
23304
23305
|
RESIZE_COLUMN: 'resize_column',
|
|
23305
23306
|
RESIZE_COLUMN_END: 'resize_column_end',
|
|
23307
|
+
RESIZE_ROW: 'resize_row',
|
|
23308
|
+
RESIZE_ROW_END: 'resize_row_end',
|
|
23306
23309
|
CHANGE_HEADER_POSITION: 'change_header_position',
|
|
23307
23310
|
SORT_CLICK: 'sort_click',
|
|
23308
23311
|
FREEZE_CLICK: 'freeze_click',
|
|
@@ -24336,6 +24339,7 @@
|
|
|
24336
24339
|
const DEFAULTFONTCOLOR = '#000';
|
|
24337
24340
|
const regUrl = /^(https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/;
|
|
24338
24341
|
const ResizeColumnHotSpotSize = 16;
|
|
24342
|
+
const ResizeRowHotSpotSize = 16;
|
|
24339
24343
|
const IndicatorDimensionKeyPlaceholder = '$$indicator$$';
|
|
24340
24344
|
const DrillDown = `<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><rect x="0" y="0" width="1024" height="1024" rx="20%" ry="20%" fill="#ffffff" /><path d="M810.666667 85.333333c70.688 0 128 57.312 128 128v597.333334c0 70.688-57.312 128-128 128H213.333333c-70.688 0-128-57.312-128-128V213.333333c0-70.688 57.312-128 128-128h597.333334z m0 85.333334H213.333333a42.666667 42.666667 0 0 0-42.613333 40.533333L170.666667 213.333333v597.333334a42.666667 42.666667 0 0 0 40.533333 42.613333L213.333333 853.333333h597.333334a42.666667 42.666667 0 0 0 42.613333-40.533333L853.333333 810.666667V213.333333a42.666667 42.666667 0 0 0-40.533333-42.613333L810.666667 170.666667zM549.333333 288a5.333333 5.333333 0 0 1 5.333334 5.333333V469.333333h176a5.333333 5.333333 0 0 1 5.333333 5.333334v74.666666a5.333333 5.333333 0 0 1-5.333333 5.333334H554.666667v176a5.333333 5.333333 0 0 1-5.333334 5.333333h-74.666666a5.333333 5.333333 0 0 1-5.333334-5.333333V554.666667H293.333333a5.333333 5.333333 0 0 1-5.333333-5.333334v-74.666666a5.333333 5.333333 0 0 1 5.333333-5.333334H469.333333V293.333333a5.333333 5.333333 0 0 1 5.333334-5.333333h74.666666z"></path></svg>`;
|
|
24341
24345
|
const DrillUp = `<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><rect x="0" y="0" width="1024" height="1024" rx="20%" ry="20%" fill="#ffffff" /><path d="M810.666667 85.333333c70.688 0 128 57.312 128 128v597.333334c0 70.688-57.312 128-128 128H213.333333c-70.688 0-128-57.312-128-128V213.333333c0-70.688 57.312-128 128-128h597.333334z m0 85.333334H213.333333a42.666667 42.666667 0 0 0-42.613333 40.533333L170.666667 213.333333v597.333334a42.666667 42.666667 0 0 0 40.533333 42.613333L213.333333 853.333333h597.333334a42.666667 42.666667 0 0 0 42.613333-40.533333L853.333333 810.666667V213.333333a42.666667 42.666667 0 0 0-40.533333-42.613333L810.666667 170.666667zM693.333333 469.333333a42.666667 42.666667 0 1 1 0 85.333334H330.666667a42.666667 42.666667 0 1 1 0-85.333334h362.666666z"></path></svg>`;
|
|
@@ -42284,7 +42288,7 @@
|
|
|
42284
42288
|
|
|
42285
42289
|
function getColX(col, table, isRightFrozen) {
|
|
42286
42290
|
if (isRightFrozen) {
|
|
42287
|
-
return table.tableNoFrameWidth - table.getColsWidth(col, table.colCount - 1);
|
|
42291
|
+
return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) - table.getColsWidth(col, table.colCount - 1);
|
|
42288
42292
|
}
|
|
42289
42293
|
let colX = table.getColsWidth(0, col);
|
|
42290
42294
|
if (col >= table.frozenColCount) {
|
|
@@ -42292,6 +42296,16 @@
|
|
|
42292
42296
|
}
|
|
42293
42297
|
return colX;
|
|
42294
42298
|
}
|
|
42299
|
+
function getRowY(row, table, isBottomFrozen) {
|
|
42300
|
+
if (isBottomFrozen) {
|
|
42301
|
+
return Math.min(table.tableNoFrameWidth, table.getAllRowsHeight()) - table.getRowsHeight(row, table.rowCount - 1);
|
|
42302
|
+
}
|
|
42303
|
+
let rowY = table.getRowsHeight(0, row);
|
|
42304
|
+
if (row >= table.frozenRowCount) {
|
|
42305
|
+
rowY -= table.scrollLeft;
|
|
42306
|
+
}
|
|
42307
|
+
return rowY;
|
|
42308
|
+
}
|
|
42295
42309
|
|
|
42296
42310
|
class TableComponent {
|
|
42297
42311
|
table;
|
|
@@ -42299,10 +42313,14 @@
|
|
|
42299
42313
|
columnResizeLine;
|
|
42300
42314
|
columnResizeBgLine;
|
|
42301
42315
|
columnResizeLabel;
|
|
42316
|
+
rowResizeLine;
|
|
42317
|
+
rowResizeBgLine;
|
|
42318
|
+
rowResizeLabel;
|
|
42302
42319
|
menu;
|
|
42303
42320
|
vScrollBar;
|
|
42304
42321
|
hScrollBar;
|
|
42305
42322
|
frozenShadowLine;
|
|
42323
|
+
rightFrozenShadowLine;
|
|
42306
42324
|
drillIcon;
|
|
42307
42325
|
cellMover;
|
|
42308
42326
|
constructor(table) {
|
|
@@ -42375,6 +42393,63 @@
|
|
|
42375
42393
|
});
|
|
42376
42394
|
this.columnResizeLabel.appendChild(columnResizeLabelBack);
|
|
42377
42395
|
this.columnResizeLabel.appendChild(columnResizeLabelText);
|
|
42396
|
+
this.rowResizeLine = createLine({
|
|
42397
|
+
visible: false,
|
|
42398
|
+
pickable: false,
|
|
42399
|
+
stroke: columnResizeColor,
|
|
42400
|
+
lineWidth: columnResizeWidth,
|
|
42401
|
+
x: 0,
|
|
42402
|
+
y: 0,
|
|
42403
|
+
points: [
|
|
42404
|
+
{ x: 0, y: 0 },
|
|
42405
|
+
{ x: 0, y: 0 }
|
|
42406
|
+
]
|
|
42407
|
+
});
|
|
42408
|
+
this.rowResizeBgLine = createLine({
|
|
42409
|
+
visible: false,
|
|
42410
|
+
pickable: false,
|
|
42411
|
+
stroke: columnResizeBgColor,
|
|
42412
|
+
lineWidth: columnResizeBgWidth,
|
|
42413
|
+
x: 0,
|
|
42414
|
+
y: 0,
|
|
42415
|
+
points: [
|
|
42416
|
+
{ x: 0, y: 0 },
|
|
42417
|
+
{ x: 0, y: 0 }
|
|
42418
|
+
]
|
|
42419
|
+
});
|
|
42420
|
+
const rowResizeLabelText = createText({
|
|
42421
|
+
visible: false,
|
|
42422
|
+
pickable: false,
|
|
42423
|
+
x: 0,
|
|
42424
|
+
y: 0,
|
|
42425
|
+
fontSize: labelFontSize,
|
|
42426
|
+
fill: labelColor,
|
|
42427
|
+
fontFamily: labelFontFamily,
|
|
42428
|
+
text: '',
|
|
42429
|
+
textBaseline: 'top',
|
|
42430
|
+
dx: 12 + 4,
|
|
42431
|
+
dy: -labelFontSize / 2
|
|
42432
|
+
});
|
|
42433
|
+
const rowResizeLabelBack = createRect({
|
|
42434
|
+
visible: false,
|
|
42435
|
+
pickable: false,
|
|
42436
|
+
fill: labelBackgroundFill,
|
|
42437
|
+
x: 0,
|
|
42438
|
+
y: 0,
|
|
42439
|
+
width: 5 * labelFontSize * 0.8,
|
|
42440
|
+
height: labelFontSize + 8,
|
|
42441
|
+
cornerRadius: labelBackgroundCornerRadius,
|
|
42442
|
+
dx: 12,
|
|
42443
|
+
dy: -labelFontSize / 2 - 4
|
|
42444
|
+
});
|
|
42445
|
+
this.rowResizeLabel = createGroup({
|
|
42446
|
+
visible: false,
|
|
42447
|
+
pickable: false,
|
|
42448
|
+
x: 0,
|
|
42449
|
+
y: 0
|
|
42450
|
+
});
|
|
42451
|
+
this.rowResizeLabel.appendChild(rowResizeLabelBack);
|
|
42452
|
+
this.rowResizeLabel.appendChild(rowResizeLabelText);
|
|
42378
42453
|
this.cellMover = new CellMover(this.table);
|
|
42379
42454
|
const shadowWidth = theme.frozenColumnLine?.shadow?.width;
|
|
42380
42455
|
const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;
|
|
@@ -42398,14 +42473,37 @@
|
|
|
42398
42473
|
]
|
|
42399
42474
|
}
|
|
42400
42475
|
});
|
|
42476
|
+
this.rightFrozenShadowLine = createRect({
|
|
42477
|
+
visible: true,
|
|
42478
|
+
pickable: false,
|
|
42479
|
+
x: 0,
|
|
42480
|
+
y: 0,
|
|
42481
|
+
width: shadowWidth,
|
|
42482
|
+
height: 0,
|
|
42483
|
+
fill: {
|
|
42484
|
+
gradient: 'linear',
|
|
42485
|
+
x0: 0,
|
|
42486
|
+
y0: 0,
|
|
42487
|
+
x1: 1,
|
|
42488
|
+
y1: 0,
|
|
42489
|
+
stops: [
|
|
42490
|
+
{ color: shadowEndColor, offset: 0 },
|
|
42491
|
+
{ color: shadowStartColor, offset: 1 }
|
|
42492
|
+
]
|
|
42493
|
+
}
|
|
42494
|
+
});
|
|
42401
42495
|
this.menu = new MenuHandler$1(this.table);
|
|
42402
42496
|
this.drillIcon = new DrillIcon();
|
|
42403
42497
|
}
|
|
42404
42498
|
addToGroup(componentGroup) {
|
|
42405
42499
|
componentGroup.addChild(this.frozenShadowLine);
|
|
42500
|
+
componentGroup.addChild(this.rightFrozenShadowLine);
|
|
42406
42501
|
componentGroup.addChild(this.columnResizeBgLine);
|
|
42407
42502
|
componentGroup.addChild(this.columnResizeLine);
|
|
42408
42503
|
componentGroup.addChild(this.columnResizeLabel);
|
|
42504
|
+
componentGroup.addChild(this.rowResizeBgLine);
|
|
42505
|
+
componentGroup.addChild(this.rowResizeLine);
|
|
42506
|
+
componentGroup.addChild(this.rowResizeLabel);
|
|
42409
42507
|
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
42410
42508
|
if (hoverOn && !this.table.theme.scrollStyle.barToSide) {
|
|
42411
42509
|
componentGroup.addChild(this.hScrollBar);
|
|
@@ -42608,6 +42706,60 @@
|
|
|
42608
42706
|
});
|
|
42609
42707
|
this.columnResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);
|
|
42610
42708
|
}
|
|
42709
|
+
hideResizeRow() {
|
|
42710
|
+
this.rowResizeLine.setAttribute('visible', false);
|
|
42711
|
+
this.rowResizeBgLine.setAttribute('visible', false);
|
|
42712
|
+
this.rowResizeLabel.setAttribute('visible', false);
|
|
42713
|
+
this.rowResizeLabel.hideAll();
|
|
42714
|
+
}
|
|
42715
|
+
showResizeRow(row, x, isRightFrozen) {
|
|
42716
|
+
const rowY = getRowY(row, this.table, isRightFrozen);
|
|
42717
|
+
this.rowResizeLine.setAttributes({
|
|
42718
|
+
visible: true,
|
|
42719
|
+
y: rowY,
|
|
42720
|
+
points: [
|
|
42721
|
+
{ y: 0, x: 0 },
|
|
42722
|
+
{ y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
|
|
42723
|
+
]
|
|
42724
|
+
});
|
|
42725
|
+
this.rowResizeBgLine.setAttributes({
|
|
42726
|
+
visible: true,
|
|
42727
|
+
y: rowY,
|
|
42728
|
+
points: [
|
|
42729
|
+
{ y: 0, x: 0 },
|
|
42730
|
+
{ y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
|
|
42731
|
+
]
|
|
42732
|
+
});
|
|
42733
|
+
this.rowResizeLabel.showAll();
|
|
42734
|
+
this.rowResizeLabel.setAttributes({
|
|
42735
|
+
visible: true,
|
|
42736
|
+
y: rowY,
|
|
42737
|
+
x
|
|
42738
|
+
});
|
|
42739
|
+
this.rowResizeLabel.lastChild.setAttribute('text', `${this.table.getRowHeight(row)}px`);
|
|
42740
|
+
}
|
|
42741
|
+
updateResizeRow(row, x, isBottomFrozen) {
|
|
42742
|
+
const rowY = getRowY(row, this.table, isBottomFrozen);
|
|
42743
|
+
this.rowResizeLine.setAttributes({
|
|
42744
|
+
y: rowY,
|
|
42745
|
+
points: [
|
|
42746
|
+
{ y: 0, x: 0 },
|
|
42747
|
+
{ y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
|
|
42748
|
+
]
|
|
42749
|
+
});
|
|
42750
|
+
this.rowResizeBgLine.setAttributes({
|
|
42751
|
+
y: rowY,
|
|
42752
|
+
points: [
|
|
42753
|
+
{ y: 0, x: 0 },
|
|
42754
|
+
{ y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
|
|
42755
|
+
]
|
|
42756
|
+
});
|
|
42757
|
+
this.rowResizeLabel.setAttributes({
|
|
42758
|
+
y: rowY,
|
|
42759
|
+
x
|
|
42760
|
+
});
|
|
42761
|
+
this.rowResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getRowHeight(row))}px`);
|
|
42762
|
+
}
|
|
42611
42763
|
hideMoveCol() {
|
|
42612
42764
|
this.cellMover.hide();
|
|
42613
42765
|
}
|
|
@@ -42632,6 +42784,21 @@
|
|
|
42632
42784
|
});
|
|
42633
42785
|
}
|
|
42634
42786
|
}
|
|
42787
|
+
setRightFrozenColumnShadow(col) {
|
|
42788
|
+
if (col >= this.table.colCount) {
|
|
42789
|
+
this.rightFrozenShadowLine.setAttributes({
|
|
42790
|
+
visible: false
|
|
42791
|
+
});
|
|
42792
|
+
}
|
|
42793
|
+
else {
|
|
42794
|
+
const colX = getColX(col, this.table, true);
|
|
42795
|
+
this.rightFrozenShadowLine.setAttributes({
|
|
42796
|
+
visible: true,
|
|
42797
|
+
x: colX - this.rightFrozenShadowLine.attribute.width,
|
|
42798
|
+
height: this.table.getDrawRange().height
|
|
42799
|
+
});
|
|
42800
|
+
}
|
|
42801
|
+
}
|
|
42635
42802
|
hideVerticalScrollBar() {
|
|
42636
42803
|
const visable = this.table.theme.scrollStyle.visible;
|
|
42637
42804
|
if (visable !== 'focus' && visable !== 'scrolling') {
|
|
@@ -42743,6 +42910,19 @@
|
|
|
42743
42910
|
cornerRadius: labelBackgroundCornerRadius,
|
|
42744
42911
|
dy: -labelFontSize / 2 - 4
|
|
42745
42912
|
});
|
|
42913
|
+
this.rowResizeLabel.lastChild.setAttributes({
|
|
42914
|
+
fontSize: labelFontSize,
|
|
42915
|
+
fill: labelColor,
|
|
42916
|
+
fontFamily: labelFontFamily,
|
|
42917
|
+
dy: -labelFontSize / 2
|
|
42918
|
+
});
|
|
42919
|
+
this.rowResizeLabel.firstChild.setAttributes({
|
|
42920
|
+
fill: labelBackgroundFill,
|
|
42921
|
+
width: 5 * labelFontSize * 0.8,
|
|
42922
|
+
height: labelFontSize + 8,
|
|
42923
|
+
cornerRadius: labelBackgroundCornerRadius,
|
|
42924
|
+
dy: -labelFontSize / 2 - 4
|
|
42925
|
+
});
|
|
42746
42926
|
const shadowWidth = theme.frozenColumnLine?.shadow?.width;
|
|
42747
42927
|
const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;
|
|
42748
42928
|
const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;
|
|
@@ -42760,6 +42940,20 @@
|
|
|
42760
42940
|
]
|
|
42761
42941
|
}
|
|
42762
42942
|
});
|
|
42943
|
+
this.rightFrozenShadowLine.setAttributes({
|
|
42944
|
+
width: shadowWidth,
|
|
42945
|
+
fill: {
|
|
42946
|
+
gradient: 'linear',
|
|
42947
|
+
x0: 0,
|
|
42948
|
+
y0: 0,
|
|
42949
|
+
x1: 1,
|
|
42950
|
+
y1: 0,
|
|
42951
|
+
stops: [
|
|
42952
|
+
{ color: shadowEndColor, offset: 0 },
|
|
42953
|
+
{ color: shadowStartColor, offset: 1 }
|
|
42954
|
+
]
|
|
42955
|
+
}
|
|
42956
|
+
});
|
|
42763
42957
|
this.cellMover.updateStyle();
|
|
42764
42958
|
}
|
|
42765
42959
|
}
|
|
@@ -43493,9 +43687,9 @@
|
|
|
43493
43687
|
const isPart = Array.isArray(part);
|
|
43494
43688
|
const isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;
|
|
43495
43689
|
context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);
|
|
43496
|
-
const lineDash =
|
|
43690
|
+
const { lineDash = groupAttribute.lineDash } = group.attribute;
|
|
43497
43691
|
let isDash = false;
|
|
43498
|
-
if (lineDash.length) {
|
|
43692
|
+
if (lineDash.length && lineDash.some((dash) => Array.isArray(dash))) {
|
|
43499
43693
|
isDash = true;
|
|
43500
43694
|
}
|
|
43501
43695
|
context.beginPath();
|
|
@@ -43521,6 +43715,9 @@
|
|
|
43521
43715
|
context.lineWidth = strokeArrayWidth[0];
|
|
43522
43716
|
}
|
|
43523
43717
|
context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;
|
|
43718
|
+
if (isDash) {
|
|
43719
|
+
context.setLineDash(lineDash[0] ?? []);
|
|
43720
|
+
}
|
|
43524
43721
|
context.stroke();
|
|
43525
43722
|
context.beginPath();
|
|
43526
43723
|
context.moveTo(x + width, y);
|
|
@@ -43550,6 +43747,9 @@
|
|
|
43550
43747
|
context.lineWidth = strokeArrayWidth[1];
|
|
43551
43748
|
}
|
|
43552
43749
|
context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;
|
|
43750
|
+
if (isDash) {
|
|
43751
|
+
context.setLineDash(lineDash[1] ?? []);
|
|
43752
|
+
}
|
|
43553
43753
|
context.stroke();
|
|
43554
43754
|
context.beginPath();
|
|
43555
43755
|
context.moveTo(x + width, y + height);
|
|
@@ -43579,6 +43779,9 @@
|
|
|
43579
43779
|
context.lineWidth = strokeArrayWidth[2];
|
|
43580
43780
|
}
|
|
43581
43781
|
context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;
|
|
43782
|
+
if (isDash) {
|
|
43783
|
+
context.setLineDash(lineDash[2] ?? []);
|
|
43784
|
+
}
|
|
43582
43785
|
context.stroke();
|
|
43583
43786
|
context.beginPath();
|
|
43584
43787
|
context.moveTo(x, y + height);
|
|
@@ -43608,6 +43811,9 @@
|
|
|
43608
43811
|
context.lineWidth = strokeArrayWidth[3];
|
|
43609
43812
|
}
|
|
43610
43813
|
context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;
|
|
43814
|
+
if (isDash) {
|
|
43815
|
+
context.setLineDash(lineDash[3] ?? []);
|
|
43816
|
+
}
|
|
43611
43817
|
context.stroke();
|
|
43612
43818
|
context.beginPath();
|
|
43613
43819
|
context.moveTo(x, y);
|
|
@@ -43623,6 +43829,7 @@
|
|
|
43623
43829
|
context.stroke();
|
|
43624
43830
|
}
|
|
43625
43831
|
context.lineDashOffset = 0;
|
|
43832
|
+
context.setLineDash([]);
|
|
43626
43833
|
}
|
|
43627
43834
|
let DashGroupBeforeRenderContribution = class DashGroupBeforeRenderContribution {
|
|
43628
43835
|
time = BaseRenderContributionTime.beforeFillStroke;
|
|
@@ -43698,22 +43905,28 @@
|
|
|
43698
43905
|
context.moveTo(x, y);
|
|
43699
43906
|
context.lineTo(x + widthForStroke, y);
|
|
43700
43907
|
context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;
|
|
43908
|
+
context.setLineDash(lineDash[0] ?? []);
|
|
43701
43909
|
context.stroke();
|
|
43702
43910
|
context.beginPath();
|
|
43703
43911
|
context.moveTo(x + widthForStroke, y);
|
|
43704
43912
|
context.lineTo(x + widthForStroke, y + heightForStroke);
|
|
43705
43913
|
context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;
|
|
43914
|
+
context.setLineDash(lineDash[1] ?? []);
|
|
43706
43915
|
context.stroke();
|
|
43707
43916
|
context.beginPath();
|
|
43708
43917
|
context.moveTo(x, y + heightForStroke);
|
|
43709
43918
|
context.lineTo(x + widthForStroke, y + heightForStroke);
|
|
43710
43919
|
context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;
|
|
43920
|
+
context.setLineDash(lineDash[2] ?? []);
|
|
43711
43921
|
context.stroke();
|
|
43712
43922
|
context.beginPath();
|
|
43713
43923
|
context.moveTo(x, y);
|
|
43714
43924
|
context.lineTo(x, y + heightForStroke);
|
|
43715
43925
|
context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;
|
|
43926
|
+
context.setLineDash(lineDash[3] ?? []);
|
|
43716
43927
|
context.stroke();
|
|
43928
|
+
context.lineDashOffset = 0;
|
|
43929
|
+
context.setLineDash([]);
|
|
43717
43930
|
}
|
|
43718
43931
|
};
|
|
43719
43932
|
DashGroupAfterRenderContribution = __decorate([
|
|
@@ -44905,7 +45118,9 @@
|
|
|
44905
45118
|
if (table.internalProps._widthResizedColMap.size === 0) {
|
|
44906
45119
|
computeColsWidth(table, 0, distCol);
|
|
44907
45120
|
}
|
|
44908
|
-
|
|
45121
|
+
if (table.internalProps._heightResizedRowMap.size === 0) {
|
|
45122
|
+
computeRowsHeight(table, 0, distRow);
|
|
45123
|
+
}
|
|
44909
45124
|
if (distCol < table.colCount - table.rightFrozenColCount) {
|
|
44910
45125
|
computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1);
|
|
44911
45126
|
}
|
|
@@ -44958,7 +45173,10 @@
|
|
|
44958
45173
|
}
|
|
44959
45174
|
distCol - table.rightFrozenColCount >= table.frozenColCount &&
|
|
44960
45175
|
createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, 'body', table);
|
|
44961
|
-
if (!bodyGroup.firstChild &&
|
|
45176
|
+
if (!bodyGroup.firstChild &&
|
|
45177
|
+
!colHeaderGroup.firstChild &&
|
|
45178
|
+
!cornerHeaderGroup.firstChild &&
|
|
45179
|
+
!rowHeaderGroup.firstChild) {
|
|
44962
45180
|
proxy.currentRow = proxy.totalRow;
|
|
44963
45181
|
proxy.rowEnd = proxy.currentRow;
|
|
44964
45182
|
proxy.rowUpdatePos = proxy.rowEnd + 1;
|
|
@@ -44969,12 +45187,17 @@
|
|
|
44969
45187
|
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
|
|
44970
45188
|
}
|
|
44971
45189
|
else {
|
|
44972
|
-
proxy.currentRow =
|
|
45190
|
+
proxy.currentRow =
|
|
45191
|
+
bodyGroup.firstChild?.rowNumber ?? rowHeaderGroup.firstChild?.rowNumber ?? proxy.totalRow;
|
|
44973
45192
|
proxy.rowEnd = proxy.currentRow;
|
|
44974
45193
|
proxy.rowUpdatePos = proxy.rowEnd + 1;
|
|
44975
45194
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
|
|
44976
45195
|
proxy.currentCol =
|
|
44977
|
-
bodyGroup.lastChild?.col ??
|
|
45196
|
+
bodyGroup.lastChild?.col ??
|
|
45197
|
+
colHeaderGroup.lastChild?.col ??
|
|
45198
|
+
rowHeaderGroup.lastChild?.col ??
|
|
45199
|
+
cornerHeaderGroup.lastChild?.col ??
|
|
45200
|
+
proxy.totalCol;
|
|
44978
45201
|
proxy.colEnd = proxy.currentCol;
|
|
44979
45202
|
proxy.colUpdatePos = proxy.colEnd + 1;
|
|
44980
45203
|
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
|
|
@@ -46165,8 +46388,9 @@
|
|
|
46165
46388
|
this.updateDeltaY(y);
|
|
46166
46389
|
this.updateBody(y - this.deltaY);
|
|
46167
46390
|
}
|
|
46168
|
-
else if (!this.table.scenegraph.bodyGroup.firstChild ||
|
|
46169
|
-
this.table.scenegraph.
|
|
46391
|
+
else if ((!this.table.scenegraph.bodyGroup.firstChild || this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0) &&
|
|
46392
|
+
(!this.table.scenegraph.rowHeaderGroup.firstChild ||
|
|
46393
|
+
this.table.scenegraph.rowHeaderGroup.firstChild.childrenCount === 0)) {
|
|
46170
46394
|
this.updateDeltaY(y);
|
|
46171
46395
|
this.updateBody(y - this.deltaY);
|
|
46172
46396
|
}
|
|
@@ -46327,7 +46551,10 @@
|
|
|
46327
46551
|
}
|
|
46328
46552
|
}
|
|
46329
46553
|
else if (isValid$3(screenTopY) && isValid$3(screenTopRow)) {
|
|
46330
|
-
|
|
46554
|
+
let cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, screenTopRow, true);
|
|
46555
|
+
if (cellGroup.role !== 'cell') {
|
|
46556
|
+
cellGroup = this.table.scenegraph.highPerformanceGetCell(0, screenTopRow, true);
|
|
46557
|
+
}
|
|
46331
46558
|
const bodyY = y - this.deltaY;
|
|
46332
46559
|
const distRowYOffset = screenTopY - bodyY;
|
|
46333
46560
|
const currentRowYOffset = cellGroup.attribute.y - bodyY + this.table.getFrozenRowsHeight();
|
|
@@ -46865,18 +47092,18 @@
|
|
|
46865
47092
|
}
|
|
46866
47093
|
function hideCellSelectBorder(scene) {
|
|
46867
47094
|
scene.selectingRangeComponents.forEach((selectComp, key) => {
|
|
46868
|
-
selectComp.rect.setAttribute('
|
|
47095
|
+
selectComp.rect.setAttribute('opacity', 0);
|
|
46869
47096
|
});
|
|
46870
47097
|
scene.selectedRangeComponents.forEach((selectComp, key) => {
|
|
46871
|
-
selectComp.rect.setAttribute('
|
|
47098
|
+
selectComp.rect.setAttribute('opacity', 0);
|
|
46872
47099
|
});
|
|
46873
47100
|
}
|
|
46874
47101
|
function restoreCellSelectBorder(scene) {
|
|
46875
47102
|
scene.selectingRangeComponents.forEach((selectComp, key) => {
|
|
46876
|
-
selectComp.rect.setAttribute('
|
|
47103
|
+
selectComp.rect.setAttribute('opacity', 1);
|
|
46877
47104
|
});
|
|
46878
47105
|
scene.selectedRangeComponents.forEach((selectComp, key) => {
|
|
46879
|
-
selectComp.rect.setAttribute('
|
|
47106
|
+
selectComp.rect.setAttribute('opacity', 1);
|
|
46880
47107
|
});
|
|
46881
47108
|
}
|
|
46882
47109
|
|
|
@@ -47462,10 +47689,14 @@
|
|
|
47462
47689
|
scene.updateBorderSizeAndPosition();
|
|
47463
47690
|
if (!scene.isPivot && !scene.table.transpose) {
|
|
47464
47691
|
scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);
|
|
47692
|
+
scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
|
|
47465
47693
|
}
|
|
47466
47694
|
else if (scene.table.options.frozenColCount) {
|
|
47467
47695
|
scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);
|
|
47468
47696
|
}
|
|
47697
|
+
else if (scene.table.options.frozenColCount) {
|
|
47698
|
+
scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
|
|
47699
|
+
}
|
|
47469
47700
|
scene.hasFrozen = true;
|
|
47470
47701
|
scene.frozenColCount = scene.table.frozenColCount;
|
|
47471
47702
|
scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;
|
|
@@ -47501,10 +47732,14 @@
|
|
|
47501
47732
|
scene.updateBorderSizeAndPosition();
|
|
47502
47733
|
if (!scene.isPivot && !scene.table.transpose) {
|
|
47503
47734
|
scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);
|
|
47735
|
+
scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
|
|
47504
47736
|
}
|
|
47505
47737
|
else if (scene.table.options.frozenColCount) {
|
|
47506
47738
|
scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);
|
|
47507
47739
|
}
|
|
47740
|
+
else if (scene.table.options.rightFrozenColCount) {
|
|
47741
|
+
scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
|
|
47742
|
+
}
|
|
47508
47743
|
scene.hasFrozen = true;
|
|
47509
47744
|
}
|
|
47510
47745
|
function moveColumnFromBodyToRowHeader(scene) {
|
|
@@ -48921,6 +49156,7 @@
|
|
|
48921
49156
|
return { width, height };
|
|
48922
49157
|
}
|
|
48923
49158
|
updateNextFrame() {
|
|
49159
|
+
this.updateContainerSync();
|
|
48924
49160
|
this.resetAllSelectComponent();
|
|
48925
49161
|
this.stage.renderNextFrame();
|
|
48926
49162
|
}
|
|
@@ -49109,7 +49345,12 @@
|
|
|
49109
49345
|
}
|
|
49110
49346
|
}
|
|
49111
49347
|
if (this.table.heightMode === 'adaptive') {
|
|
49112
|
-
this.
|
|
49348
|
+
if (this.table.internalProps._heightResizedRowMap.size === 0) {
|
|
49349
|
+
this.recalculateRowHeights();
|
|
49350
|
+
}
|
|
49351
|
+
else {
|
|
49352
|
+
this.dealHeightMode();
|
|
49353
|
+
}
|
|
49113
49354
|
}
|
|
49114
49355
|
else if (this.table.autoFillHeight) {
|
|
49115
49356
|
this.dealHeightMode();
|
|
@@ -49361,15 +49602,23 @@
|
|
|
49361
49602
|
afterScenegraphCreated() {
|
|
49362
49603
|
if (!this.isPivot && !this.table.transpose) {
|
|
49363
49604
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
49605
|
+
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
49364
49606
|
}
|
|
49365
49607
|
else if (this.table.options.frozenColCount) {
|
|
49366
49608
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
49367
49609
|
}
|
|
49610
|
+
else if (this.table.options.rightFrozenColCount) {
|
|
49611
|
+
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
49612
|
+
}
|
|
49613
|
+
else {
|
|
49614
|
+
this.component.setFrozenColumnShadow(-1);
|
|
49615
|
+
}
|
|
49368
49616
|
this.table.stateManager.checkFrozen();
|
|
49369
49617
|
this.updateContainer();
|
|
49370
49618
|
this.createFrameBorder();
|
|
49371
49619
|
this.updateBorderSizeAndPosition();
|
|
49372
49620
|
this.component.updateScrollBar();
|
|
49621
|
+
handleTextStick(this.table);
|
|
49373
49622
|
this.updateNextFrame();
|
|
49374
49623
|
}
|
|
49375
49624
|
dealWidthMode() {
|
|
@@ -49582,21 +49831,24 @@
|
|
|
49582
49831
|
if (!this._needUpdateContainer) {
|
|
49583
49832
|
this._needUpdateContainer = true;
|
|
49584
49833
|
setTimeout(() => {
|
|
49585
|
-
this.
|
|
49586
|
-
this.updateTableSize();
|
|
49587
|
-
this.component.updateScrollBar();
|
|
49588
|
-
this.updateNextFrame();
|
|
49589
|
-
this._needUpdateContainer = false;
|
|
49834
|
+
this.updateContainerSync();
|
|
49590
49835
|
}, 0);
|
|
49591
49836
|
}
|
|
49592
49837
|
}
|
|
49593
49838
|
else {
|
|
49594
|
-
this.
|
|
49595
|
-
this.
|
|
49596
|
-
|
|
49597
|
-
|
|
49598
|
-
|
|
49839
|
+
this._needUpdateContainer = true;
|
|
49840
|
+
this.updateContainerSync();
|
|
49841
|
+
}
|
|
49842
|
+
}
|
|
49843
|
+
updateContainerSync() {
|
|
49844
|
+
if (!this._needUpdateContainer) {
|
|
49845
|
+
return;
|
|
49599
49846
|
}
|
|
49847
|
+
this._needUpdateContainer = false;
|
|
49848
|
+
this.updateContainerAttrWidthAndX();
|
|
49849
|
+
this.updateTableSize();
|
|
49850
|
+
this.component.updateScrollBar();
|
|
49851
|
+
this.updateNextFrame();
|
|
49600
49852
|
}
|
|
49601
49853
|
updateCellContentWhileResize(col, row) {
|
|
49602
49854
|
const type = this.table.getBodyColumnType(col, row);
|
|
@@ -49619,9 +49871,11 @@
|
|
|
49619
49871
|
createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, undefined);
|
|
49620
49872
|
}
|
|
49621
49873
|
getResizeColAt(abstractX, abstractY, cellGroup, offset = ResizeColumnHotSpotSize / 2) {
|
|
49622
|
-
|
|
49874
|
+
let cell;
|
|
49875
|
+
if (!cellGroup) {
|
|
49876
|
+
cell = this.table.getCellAt(abstractX - offset, abstractY);
|
|
49877
|
+
}
|
|
49623
49878
|
else {
|
|
49624
|
-
let cell;
|
|
49625
49879
|
if (abstractX < cellGroup.globalAABBBounds.x1 + offset) {
|
|
49626
49880
|
cell = { col: cellGroup.col - 1, row: cellGroup.row, x: cellGroup.globalAABBBounds.x1 };
|
|
49627
49881
|
}
|
|
@@ -49639,6 +49893,33 @@
|
|
|
49639
49893
|
cell.col = cell.col + 1;
|
|
49640
49894
|
cell.rightFrozen = true;
|
|
49641
49895
|
}
|
|
49896
|
+
}
|
|
49897
|
+
if (cell) {
|
|
49898
|
+
return cell;
|
|
49899
|
+
}
|
|
49900
|
+
return { col: -1, row: -1 };
|
|
49901
|
+
}
|
|
49902
|
+
getResizeRowAt(abstractX, abstractY, cellGroup, offset = ResizeRowHotSpotSize / 2) {
|
|
49903
|
+
if (!cellGroup) ;
|
|
49904
|
+
else {
|
|
49905
|
+
let cell;
|
|
49906
|
+
if (abstractY < cellGroup.globalAABBBounds.y1 + offset) {
|
|
49907
|
+
cell = { col: cellGroup.col, row: cellGroup.row - 1, y: cellGroup.globalAABBBounds.y1 };
|
|
49908
|
+
}
|
|
49909
|
+
else if (cellGroup.globalAABBBounds.y2 - offset < abstractY) {
|
|
49910
|
+
cell = { col: cellGroup.col, row: cellGroup.row, y: cellGroup.globalAABBBounds.y2 };
|
|
49911
|
+
}
|
|
49912
|
+
if (cell &&
|
|
49913
|
+
this.table.bottomFrozenRowCount > 0 &&
|
|
49914
|
+
cell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 &&
|
|
49915
|
+
this.table.tableNoFrameHeight -
|
|
49916
|
+
this.table.getFrozenRowsHeight() -
|
|
49917
|
+
this.table.getBottomFrozenRowsHeight() +
|
|
49918
|
+
this.table.scrollTop <
|
|
49919
|
+
this.bodyGroup.attribute.height) {
|
|
49920
|
+
cell.row = cell.row + 1;
|
|
49921
|
+
cell.bottomFrozen = true;
|
|
49922
|
+
}
|
|
49642
49923
|
if (cell) {
|
|
49643
49924
|
return cell;
|
|
49644
49925
|
}
|
|
@@ -49781,10 +50062,14 @@
|
|
|
49781
50062
|
this.table.stateManager.checkFrozen();
|
|
49782
50063
|
if (!this.isPivot && !this.table.transpose) {
|
|
49783
50064
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
50065
|
+
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
49784
50066
|
}
|
|
49785
50067
|
else if (this.table.options.frozenColCount) {
|
|
49786
50068
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
49787
50069
|
}
|
|
50070
|
+
else if (this.table.options.rightFrozenColCount) {
|
|
50071
|
+
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
50072
|
+
}
|
|
49788
50073
|
this.component.updateScrollBar();
|
|
49789
50074
|
this.updateNextFrame();
|
|
49790
50075
|
}
|
|
@@ -49795,10 +50080,14 @@
|
|
|
49795
50080
|
this.table.stateManager.checkFrozen();
|
|
49796
50081
|
if (!this.isPivot && !this.table.transpose) {
|
|
49797
50082
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
50083
|
+
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
49798
50084
|
}
|
|
49799
50085
|
else if (this.table.options.frozenColCount) {
|
|
49800
50086
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
49801
50087
|
}
|
|
50088
|
+
else if (this.table.options.rightFrozenColCount) {
|
|
50089
|
+
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
50090
|
+
}
|
|
49802
50091
|
this.component.updateScrollBar();
|
|
49803
50092
|
this.updateNextFrame();
|
|
49804
50093
|
}
|
|
@@ -50670,10 +50959,19 @@
|
|
|
50670
50959
|
!state.table.isPivotTable() &&
|
|
50671
50960
|
!state.table.transpose) {
|
|
50672
50961
|
state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen);
|
|
50962
|
+
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
50963
|
+
}
|
|
50964
|
+
else if (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount &&
|
|
50965
|
+
!state.table.isPivotTable() &&
|
|
50966
|
+
!state.table.transpose) {
|
|
50967
|
+
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
50673
50968
|
}
|
|
50674
50969
|
else if (state.table.options.frozenColCount) {
|
|
50675
50970
|
state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1);
|
|
50676
50971
|
}
|
|
50972
|
+
else if (state.table.options.rightFrozenColCount) {
|
|
50973
|
+
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
50974
|
+
}
|
|
50677
50975
|
state.table.scenegraph.updateNextFrame();
|
|
50678
50976
|
}
|
|
50679
50977
|
function clearWidthsAndHeightsCache(colMin, colMax, rowMin, rowMax, table) {
|
|
@@ -50780,13 +51078,13 @@
|
|
|
50780
51078
|
updateResizeColForColumn(detaX, state);
|
|
50781
51079
|
}
|
|
50782
51080
|
else if (state.table.internalProps.columnResizeType === 'indicator') {
|
|
50783
|
-
updateResizeColForIndicator(detaX, state);
|
|
51081
|
+
updateResizeColForIndicator$1(detaX, state);
|
|
50784
51082
|
}
|
|
50785
51083
|
else if (state.table.internalProps.columnResizeType === 'indicatorGroup') {
|
|
50786
|
-
updateResizeColForIndicatorGroup(detaX, state);
|
|
51084
|
+
updateResizeColForIndicatorGroup$1(detaX, state);
|
|
50787
51085
|
}
|
|
50788
51086
|
else if (state.table.internalProps.columnResizeType === 'all') {
|
|
50789
|
-
updateResizeColForAll(detaX, state);
|
|
51087
|
+
updateResizeColForAll$1(detaX, state);
|
|
50790
51088
|
}
|
|
50791
51089
|
else {
|
|
50792
51090
|
updateResizeColForColumn(detaX, state);
|
|
@@ -50798,9 +51096,17 @@
|
|
|
50798
51096
|
!state.table.transpose) {
|
|
50799
51097
|
state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen);
|
|
50800
51098
|
}
|
|
51099
|
+
else if (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount &&
|
|
51100
|
+
!state.table.isPivotTable() &&
|
|
51101
|
+
!state.table.transpose) {
|
|
51102
|
+
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
51103
|
+
}
|
|
50801
51104
|
else if (state.table.options.frozenColCount) {
|
|
50802
51105
|
state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1);
|
|
50803
51106
|
}
|
|
51107
|
+
else if (state.table.options.rightFrozenColCount) {
|
|
51108
|
+
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
51109
|
+
}
|
|
50804
51110
|
state.table.scenegraph.updateNextFrame();
|
|
50805
51111
|
}
|
|
50806
51112
|
function updateResizeColForColumn(detaX, state) {
|
|
@@ -50815,7 +51121,7 @@
|
|
|
50815
51121
|
state.table.internalProps._widthResizedColMap.add(state.columnResize.col);
|
|
50816
51122
|
}
|
|
50817
51123
|
}
|
|
50818
|
-
function updateResizeColForAll(detaX, state) {
|
|
51124
|
+
function updateResizeColForAll$1(detaX, state) {
|
|
50819
51125
|
const layout = state.table.internalProps.layoutMap;
|
|
50820
51126
|
for (let col = state.table.frozenColCount; col < state.table.colCount - state.table.rightFrozenColCount; col++) {
|
|
50821
51127
|
if (!(state.table.internalProps.transpose || (state.table.isPivotTable() && !layout.indicatorsAsCol))) {
|
|
@@ -50828,7 +51134,7 @@
|
|
|
50828
51134
|
state.table.internalProps._widthResizedColMap.add(col);
|
|
50829
51135
|
}
|
|
50830
51136
|
}
|
|
50831
|
-
function updateResizeColForIndicator(detaX, state) {
|
|
51137
|
+
function updateResizeColForIndicator$1(detaX, state) {
|
|
50832
51138
|
const layout = state.table.internalProps.layoutMap;
|
|
50833
51139
|
let resizeIndicatorKey;
|
|
50834
51140
|
let resizeDimensionKey;
|
|
@@ -50858,7 +51164,7 @@
|
|
|
50858
51164
|
}
|
|
50859
51165
|
}
|
|
50860
51166
|
}
|
|
50861
|
-
function updateResizeColForIndicatorGroup(detaX, state) {
|
|
51167
|
+
function updateResizeColForIndicatorGroup$1(detaX, state) {
|
|
50862
51168
|
const layout = state.table.internalProps.layoutMap;
|
|
50863
51169
|
const headerPaths = layout.getCellHeaderPaths(state.columnResize.col, state.table.columnHeaderLevelCount);
|
|
50864
51170
|
const node = layout.getHeadNode(headerPaths.colHeaderPaths.slice(0, headerPaths.colHeaderPaths.length - 1));
|
|
@@ -50874,7 +51180,14 @@
|
|
|
50874
51180
|
}
|
|
50875
51181
|
}
|
|
50876
51182
|
const prevWidth = state.table.getColWidth(col);
|
|
50877
|
-
|
|
51183
|
+
let deltaWidth = (prevWidth / totalColWidth) * moveX;
|
|
51184
|
+
if (deltaWidth > 0 && deltaWidth < 0.5) {
|
|
51185
|
+
deltaWidth = 0.5;
|
|
51186
|
+
}
|
|
51187
|
+
else if (deltaWidth < 0 && deltaWidth >= -0.5) {
|
|
51188
|
+
deltaWidth = -0.5;
|
|
51189
|
+
}
|
|
51190
|
+
state.table.scenegraph.updateColWidth(col, deltaWidth);
|
|
50878
51191
|
state.table.internalProps._widthResizedColMap.add(col);
|
|
50879
51192
|
}
|
|
50880
51193
|
}
|
|
@@ -51186,6 +51499,118 @@
|
|
|
51186
51499
|
}
|
|
51187
51500
|
}
|
|
51188
51501
|
|
|
51502
|
+
function updateResizeRow(xInTable, yInTable, state) {
|
|
51503
|
+
xInTable = Math.ceil(xInTable);
|
|
51504
|
+
yInTable = Math.ceil(yInTable);
|
|
51505
|
+
let detaY = state.rowResize.isBottomFrozen ? state.rowResize.y - yInTable : yInTable - state.rowResize.y;
|
|
51506
|
+
if (Math.abs(detaY) < 1) {
|
|
51507
|
+
return;
|
|
51508
|
+
}
|
|
51509
|
+
state.table.getRowHeight(state.rowResize.row);
|
|
51510
|
+
let afterSize = state.table.getRowHeight(state.rowResize.row) + detaY;
|
|
51511
|
+
if (afterSize < state.table.internalProps.limitMinHeight) {
|
|
51512
|
+
afterSize = state.table.internalProps.limitMinHeight;
|
|
51513
|
+
detaY = afterSize - state.table.getRowHeight(state.rowResize.row);
|
|
51514
|
+
}
|
|
51515
|
+
if (state.table.heightMode === 'adaptive' && state.rowResize.row < state.table.rowCount - 1) {
|
|
51516
|
+
const bottomRowHeightCache = state.table.getRowHeight(state.rowResize.row + 1);
|
|
51517
|
+
let bottomRowHeight = bottomRowHeightCache;
|
|
51518
|
+
bottomRowHeight -= detaY;
|
|
51519
|
+
if (bottomRowHeight - detaY < state.table.internalProps.limitMinHeight) {
|
|
51520
|
+
detaY = bottomRowHeight - state.table.internalProps.limitMinHeight;
|
|
51521
|
+
}
|
|
51522
|
+
}
|
|
51523
|
+
detaY = Math.ceil(detaY);
|
|
51524
|
+
if (state.rowResize.row < state.table.columnHeaderLevelCount ||
|
|
51525
|
+
state.rowResize.row >= state.table.rowCount - state.table.bottomFrozenRowCount) {
|
|
51526
|
+
updateResizeColForRow(detaY, state);
|
|
51527
|
+
}
|
|
51528
|
+
else if (state.table.internalProps.rowResizeType === 'indicator') {
|
|
51529
|
+
updateResizeColForIndicator(detaY, state);
|
|
51530
|
+
}
|
|
51531
|
+
else if (state.table.internalProps.rowResizeType === 'indicatorGroup') {
|
|
51532
|
+
updateResizeColForIndicatorGroup(detaY, state);
|
|
51533
|
+
}
|
|
51534
|
+
else if (state.table.internalProps.rowResizeType === 'all') {
|
|
51535
|
+
updateResizeColForAll(detaY, state);
|
|
51536
|
+
}
|
|
51537
|
+
else {
|
|
51538
|
+
updateResizeColForRow(detaY, state);
|
|
51539
|
+
}
|
|
51540
|
+
state.rowResize.y = yInTable;
|
|
51541
|
+
state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen);
|
|
51542
|
+
state.table.scenegraph.updateNextFrame();
|
|
51543
|
+
}
|
|
51544
|
+
function updateResizeColForRow(detaY, state) {
|
|
51545
|
+
if (state.table.heightMode === 'adaptive' && state.rowResize.row < state.table.colCount - 1) {
|
|
51546
|
+
state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY);
|
|
51547
|
+
state.table.scenegraph.updateRowHeight(state.rowResize.row + 1, -detaY);
|
|
51548
|
+
state.table.internalProps._heightResizedRowMap.add(state.rowResize.row);
|
|
51549
|
+
state.table.internalProps._heightResizedRowMap.add(state.rowResize.row + 1);
|
|
51550
|
+
}
|
|
51551
|
+
else {
|
|
51552
|
+
state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY);
|
|
51553
|
+
state.table.internalProps._heightResizedRowMap.add(state.rowResize.row);
|
|
51554
|
+
}
|
|
51555
|
+
}
|
|
51556
|
+
function updateResizeColForAll(detaY, state) {
|
|
51557
|
+
for (let row = state.table.frozenRowCount; row < state.table.rowCount - state.table.bottomFrozenRowCount; row++) {
|
|
51558
|
+
state.table.scenegraph.updateRowHeight(row, detaY);
|
|
51559
|
+
state.table.internalProps._heightResizedRowMap.add(row);
|
|
51560
|
+
}
|
|
51561
|
+
}
|
|
51562
|
+
function updateResizeColForIndicator(detaY, state) {
|
|
51563
|
+
const layout = state.table.internalProps.layoutMap;
|
|
51564
|
+
let resizeIndicatorKey;
|
|
51565
|
+
let resizeDimensionKey;
|
|
51566
|
+
let resizeDimensionValue;
|
|
51567
|
+
if (!layout.indicatorsAsCol) {
|
|
51568
|
+
resizeIndicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, state.rowResize.row);
|
|
51569
|
+
}
|
|
51570
|
+
else {
|
|
51571
|
+
const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, state.rowResize.row);
|
|
51572
|
+
const headerPath = headerPaths.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];
|
|
51573
|
+
resizeDimensionKey = headerPath.dimensionKey;
|
|
51574
|
+
resizeDimensionValue = headerPath.value;
|
|
51575
|
+
}
|
|
51576
|
+
for (let row = state.table.columnHeaderLevelCount; row < state.table.rowCount - state.table.bottomFrozenRowCount; row++) {
|
|
51577
|
+
const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, row);
|
|
51578
|
+
if (!layout.indicatorsAsCol && indicatorKey === resizeIndicatorKey) {
|
|
51579
|
+
state.table.scenegraph.updateRowHeight(row, detaY);
|
|
51580
|
+
state.table.internalProps._heightResizedRowMap.add(row);
|
|
51581
|
+
}
|
|
51582
|
+
else if (layout.indicatorsAsCol) {
|
|
51583
|
+
const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, row);
|
|
51584
|
+
const headerPath = headerPaths?.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];
|
|
51585
|
+
if (headerPath && resizeDimensionKey === headerPath.dimensionKey && resizeDimensionValue === headerPath.value) {
|
|
51586
|
+
state.table.scenegraph.updateRowHeight(row, detaY);
|
|
51587
|
+
state.table.internalProps._heightResizedRowMap.add(row);
|
|
51588
|
+
}
|
|
51589
|
+
}
|
|
51590
|
+
}
|
|
51591
|
+
}
|
|
51592
|
+
function updateResizeColForIndicatorGroup(detaY, state) {
|
|
51593
|
+
const layout = state.table.internalProps.layoutMap;
|
|
51594
|
+
const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount, state.rowResize.row);
|
|
51595
|
+
const node = layout.getHeadNode(headerPaths.rowHeaderPaths.slice(0, headerPaths.rowHeaderPaths.length - 1));
|
|
51596
|
+
const startRow = node.startInTotal + state.table.frozenRowCount;
|
|
51597
|
+
const endRow = node.startInTotal + state.table.frozenRowCount + node.size - 1;
|
|
51598
|
+
const totalRowHeight = state.table.getRowsHeight(startRow, endRow);
|
|
51599
|
+
const moveY = detaY;
|
|
51600
|
+
for (let row = startRow; row <= endRow; row++) {
|
|
51601
|
+
const prevHeight = state.table.getRowHeight(row);
|
|
51602
|
+
let deltaHeight = (prevHeight / totalRowHeight) * moveY;
|
|
51603
|
+
if (deltaHeight > 0 && deltaHeight < 0.5) {
|
|
51604
|
+
deltaHeight = 0.5;
|
|
51605
|
+
}
|
|
51606
|
+
else if (deltaHeight < 0 && deltaHeight >= -0.5) {
|
|
51607
|
+
deltaHeight = -0.51;
|
|
51608
|
+
}
|
|
51609
|
+
state.table.scenegraph.updateRowHeight(row, deltaHeight);
|
|
51610
|
+
state.table.internalProps._heightResizedRowMap.add(row);
|
|
51611
|
+
}
|
|
51612
|
+
}
|
|
51613
|
+
|
|
51189
51614
|
class StateManager {
|
|
51190
51615
|
table;
|
|
51191
51616
|
interactionState;
|
|
@@ -51195,6 +51620,7 @@
|
|
|
51195
51620
|
hoverIcon;
|
|
51196
51621
|
residentHoverIcon;
|
|
51197
51622
|
columnResize;
|
|
51623
|
+
rowResize;
|
|
51198
51624
|
columnMove;
|
|
51199
51625
|
menu;
|
|
51200
51626
|
sort;
|
|
@@ -51244,6 +51670,11 @@
|
|
|
51244
51670
|
x: 0,
|
|
51245
51671
|
resizing: false
|
|
51246
51672
|
};
|
|
51673
|
+
this.rowResize = {
|
|
51674
|
+
row: -1,
|
|
51675
|
+
y: 0,
|
|
51676
|
+
resizing: false
|
|
51677
|
+
};
|
|
51247
51678
|
this.columnMove = {
|
|
51248
51679
|
colSource: -1,
|
|
51249
51680
|
colTarget: -1,
|
|
@@ -51316,6 +51747,11 @@
|
|
|
51316
51747
|
x: 0,
|
|
51317
51748
|
resizing: false
|
|
51318
51749
|
};
|
|
51750
|
+
this.rowResize = {
|
|
51751
|
+
row: -1,
|
|
51752
|
+
y: 0,
|
|
51753
|
+
resizing: false
|
|
51754
|
+
};
|
|
51319
51755
|
this.columnMove = {
|
|
51320
51756
|
colSource: -1,
|
|
51321
51757
|
colTarget: -1,
|
|
@@ -51502,6 +51938,9 @@
|
|
|
51502
51938
|
isResizeCol() {
|
|
51503
51939
|
return this.columnResize.resizing;
|
|
51504
51940
|
}
|
|
51941
|
+
isResizeRow() {
|
|
51942
|
+
return this.rowResize.resizing;
|
|
51943
|
+
}
|
|
51505
51944
|
isFillHandle() {
|
|
51506
51945
|
return this.fillHandle.isFilling;
|
|
51507
51946
|
}
|
|
@@ -51543,6 +51982,29 @@
|
|
|
51543
51982
|
this.updateSelectPos(-1, -1);
|
|
51544
51983
|
this.table.scenegraph.updateNextFrame();
|
|
51545
51984
|
}
|
|
51985
|
+
updateResizeCol(xInTable, yInTable) {
|
|
51986
|
+
updateResizeColumn(xInTable, yInTable, this);
|
|
51987
|
+
}
|
|
51988
|
+
endResizeRow() {
|
|
51989
|
+
setTimeout(() => {
|
|
51990
|
+
this.rowResize.resizing = false;
|
|
51991
|
+
}, 0);
|
|
51992
|
+
this.table.scenegraph.updateChartSize(this.rowResize.row);
|
|
51993
|
+
this.table.scenegraph.component.hideResizeRow();
|
|
51994
|
+
this.table.scenegraph.updateNextFrame();
|
|
51995
|
+
}
|
|
51996
|
+
startResizeRow(row, x, y, isBottomFrozen) {
|
|
51997
|
+
this.rowResize.resizing = true;
|
|
51998
|
+
this.rowResize.row = row;
|
|
51999
|
+
this.rowResize.y = y;
|
|
52000
|
+
this.rowResize.isBottomFrozen = isBottomFrozen;
|
|
52001
|
+
this.table.scenegraph.component.showResizeRow(row, x, isBottomFrozen);
|
|
52002
|
+
this.updateSelectPos(-1, -1);
|
|
52003
|
+
this.table.scenegraph.updateNextFrame();
|
|
52004
|
+
}
|
|
52005
|
+
updateResizeRow(xInTable, yInTable) {
|
|
52006
|
+
updateResizeRow(xInTable, yInTable, this);
|
|
52007
|
+
}
|
|
51546
52008
|
startFillSelect(x, y) {
|
|
51547
52009
|
this.fillHandle.isFilling = true;
|
|
51548
52010
|
this.fillHandle.startX = x;
|
|
@@ -51575,9 +52037,6 @@
|
|
|
51575
52037
|
this.fillHandle.beforeFillMinCol = undefined;
|
|
51576
52038
|
this.fillHandle.beforeFillMinRow = undefined;
|
|
51577
52039
|
}
|
|
51578
|
-
updateResizeCol(xInTable, yInTable) {
|
|
51579
|
-
updateResizeColumn(xInTable, yInTable, this);
|
|
51580
|
-
}
|
|
51581
52040
|
startMoveCol(col, row, x, y) {
|
|
51582
52041
|
startMoveCol(col, row, x, y, this);
|
|
51583
52042
|
}
|
|
@@ -52262,17 +52721,6 @@
|
|
|
52262
52721
|
else if (table.eventManager.isDraging && stateManager.isSelecting()) {
|
|
52263
52722
|
eventManager.dealTableSelect(eventArgsSet, true);
|
|
52264
52723
|
}
|
|
52265
|
-
if (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet)) {
|
|
52266
|
-
if (table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet)) {
|
|
52267
|
-
stateManager.updateCursor('crosshair');
|
|
52268
|
-
}
|
|
52269
|
-
else {
|
|
52270
|
-
stateManager.updateCursor('col-resize');
|
|
52271
|
-
}
|
|
52272
|
-
}
|
|
52273
|
-
else {
|
|
52274
|
-
stateManager.updateCursor();
|
|
52275
|
-
}
|
|
52276
52724
|
const cellGoup = e.path.find(node => node.role === 'cell');
|
|
52277
52725
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL)) {
|
|
52278
52726
|
if (table.stateManager.hover.cellPos.col !== -1 &&
|
|
@@ -52433,6 +52881,9 @@
|
|
|
52433
52881
|
if (stateManager.isResizeCol()) {
|
|
52434
52882
|
endResizeCol(table);
|
|
52435
52883
|
}
|
|
52884
|
+
else if (stateManager.isResizeRow()) {
|
|
52885
|
+
endResizeRow(table);
|
|
52886
|
+
}
|
|
52436
52887
|
else if (stateManager.isMoveCol()) {
|
|
52437
52888
|
table.stateManager.endMoveCol();
|
|
52438
52889
|
if (table.stateManager.columnMove?.colSource !== -1 &&
|
|
@@ -52507,7 +52958,8 @@
|
|
|
52507
52958
|
eventManager.touchSetTimeout = setTimeout(() => {
|
|
52508
52959
|
eventManager.isTouchdown = false;
|
|
52509
52960
|
eventManager.touchMove = true;
|
|
52510
|
-
if (!eventManager.touchEnd &&
|
|
52961
|
+
if (!eventManager.touchEnd &&
|
|
52962
|
+
(eventManager.checkColumnResize(eventArgsSet, true) || eventManager.checkRowResize(eventArgsSet, true))) {
|
|
52511
52963
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
52512
52964
|
return;
|
|
52513
52965
|
}
|
|
@@ -52522,7 +52974,8 @@
|
|
|
52522
52974
|
eventManager.dealTableHover(eventArgsSet);
|
|
52523
52975
|
}
|
|
52524
52976
|
else {
|
|
52525
|
-
if (!eventManager.checkCellFillhandle(eventArgsSet) &&
|
|
52977
|
+
if (!eventManager.checkCellFillhandle(eventArgsSet) &&
|
|
52978
|
+
(eventManager.checkColumnResize(eventArgsSet, true) || eventManager.checkRowResize(eventArgsSet, true))) {
|
|
52526
52979
|
table.scenegraph.updateChartState(null);
|
|
52527
52980
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
52528
52981
|
return;
|
|
@@ -52565,6 +53018,9 @@
|
|
|
52565
53018
|
if (stateManager.isResizeCol()) {
|
|
52566
53019
|
endResizeCol(table);
|
|
52567
53020
|
}
|
|
53021
|
+
else if (stateManager.isResizeRow()) {
|
|
53022
|
+
endResizeRow(table);
|
|
53023
|
+
}
|
|
52568
53024
|
else if (stateManager.isMoveCol()) {
|
|
52569
53025
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
52570
53026
|
table.stateManager.endMoveCol();
|
|
@@ -52709,6 +53165,19 @@
|
|
|
52709
53165
|
stateManager.hideMenu();
|
|
52710
53166
|
}
|
|
52711
53167
|
table.editorManager?.completeEdit(e.nativeEvent);
|
|
53168
|
+
if (!eventManager.checkCellFillhandle(eventArgsSet) && eventManager.checkColumnResize(eventArgsSet, true)) {
|
|
53169
|
+
table.scenegraph.updateChartState(null);
|
|
53170
|
+
stateManager.updateInteractionState(InteractionState.grabing);
|
|
53171
|
+
return;
|
|
53172
|
+
}
|
|
53173
|
+
});
|
|
53174
|
+
table.scenegraph.stage.addEventListener('pointerup', (e) => {
|
|
53175
|
+
if (stateManager.interactionState === 'grabing') {
|
|
53176
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
53177
|
+
if (stateManager.isResizeCol()) {
|
|
53178
|
+
endResizeCol(table);
|
|
53179
|
+
}
|
|
53180
|
+
}
|
|
52712
53181
|
});
|
|
52713
53182
|
table.scenegraph.stage.addEventListener('pointertap', (e) => {
|
|
52714
53183
|
const target = e.target;
|
|
@@ -52726,6 +53195,28 @@
|
|
|
52726
53195
|
stateManager.endSelectCells();
|
|
52727
53196
|
}
|
|
52728
53197
|
});
|
|
53198
|
+
table.scenegraph.stage.addEventListener('pointermove', (e) => {
|
|
53199
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
53200
|
+
if (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet)) {
|
|
53201
|
+
if (table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet)) {
|
|
53202
|
+
stateManager.updateCursor('crosshair');
|
|
53203
|
+
}
|
|
53204
|
+
else {
|
|
53205
|
+
stateManager.updateCursor('col-resize');
|
|
53206
|
+
}
|
|
53207
|
+
}
|
|
53208
|
+
else if (stateManager.isResizeRow() || eventManager.checkRowResize(eventArgsSet)) {
|
|
53209
|
+
if (table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet)) {
|
|
53210
|
+
stateManager.updateCursor('crosshair');
|
|
53211
|
+
}
|
|
53212
|
+
else {
|
|
53213
|
+
stateManager.updateCursor('row-resize');
|
|
53214
|
+
}
|
|
53215
|
+
}
|
|
53216
|
+
else {
|
|
53217
|
+
stateManager.updateCursor();
|
|
53218
|
+
}
|
|
53219
|
+
});
|
|
52729
53220
|
table.scenegraph.tableGroup.addEventListener('checkbox_state_change', (e) => {
|
|
52730
53221
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
52731
53222
|
const { col, row } = eventArgsSet.eventArgs;
|
|
@@ -52867,6 +53358,13 @@
|
|
|
52867
53358
|
colWidths: columns
|
|
52868
53359
|
});
|
|
52869
53360
|
}
|
|
53361
|
+
function endResizeRow(table) {
|
|
53362
|
+
table.stateManager.endResizeRow();
|
|
53363
|
+
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_ROW_END, {
|
|
53364
|
+
row: table.stateManager.rowResize.row,
|
|
53365
|
+
rowHeight: table.getRowHeight(table.stateManager.rowResize.row)
|
|
53366
|
+
});
|
|
53367
|
+
}
|
|
52870
53368
|
function dblclickHandler(e, table) {
|
|
52871
53369
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
52872
53370
|
let col = -1;
|
|
@@ -52930,6 +53428,13 @@
|
|
|
52930
53428
|
}
|
|
52931
53429
|
stateManager.hideHorizontalScrollBar();
|
|
52932
53430
|
});
|
|
53431
|
+
scenegraph.component.vScrollBar.addEventListener('pointermove', (e) => {
|
|
53432
|
+
scenegraph.table.stateManager.updateCursor('default');
|
|
53433
|
+
e.stopPropagation();
|
|
53434
|
+
});
|
|
53435
|
+
scenegraph.component.vScrollBar.addEventListener('pointerdown', (e) => {
|
|
53436
|
+
e.stopPropagation();
|
|
53437
|
+
});
|
|
52933
53438
|
scenegraph.component.vScrollBar.addEventListener('scrollDown', (e) => {
|
|
52934
53439
|
scenegraph.table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
52935
53440
|
scenegraph.table.eventManager.isDown = true;
|
|
@@ -52960,6 +53465,13 @@
|
|
|
52960
53465
|
scenegraph.component.vScrollBar.addEventListener('scrollUp', (e) => {
|
|
52961
53466
|
scenegraph.table.eventManager.isDraging = false;
|
|
52962
53467
|
});
|
|
53468
|
+
scenegraph.component.hScrollBar.addEventListener('pointermove', (e) => {
|
|
53469
|
+
scenegraph.table.stateManager.updateCursor('default');
|
|
53470
|
+
e.stopPropagation();
|
|
53471
|
+
});
|
|
53472
|
+
scenegraph.component.hScrollBar.addEventListener('pointerdown', (e) => {
|
|
53473
|
+
e.stopPropagation();
|
|
53474
|
+
});
|
|
52963
53475
|
scenegraph.component.hScrollBar.addEventListener('scrollDown', (e) => {
|
|
52964
53476
|
scenegraph.table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
52965
53477
|
scenegraph.table.eventManager.isDown = true;
|
|
@@ -53550,6 +54062,15 @@
|
|
|
53550
54062
|
});
|
|
53551
54063
|
}
|
|
53552
54064
|
}
|
|
54065
|
+
else if (stateManager.isResizeRow()) {
|
|
54066
|
+
eventManager.dealRowResize(x, y);
|
|
54067
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.RESIZE_ROW)) {
|
|
54068
|
+
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_ROW, {
|
|
54069
|
+
row: table.stateManager.rowResize.row,
|
|
54070
|
+
rowHeight: table.getRowHeight(table.stateManager.rowResize.row)
|
|
54071
|
+
});
|
|
54072
|
+
}
|
|
54073
|
+
}
|
|
53553
54074
|
}
|
|
53554
54075
|
const isSelecting = table.stateManager.isSelecting();
|
|
53555
54076
|
if (eventManager.isDraging && isSelecting && table.stateManager.select.ranges?.length > 0) {
|
|
@@ -53934,6 +54455,9 @@
|
|
|
53934
54455
|
this.handleTextStickBindId.push(this.table.on(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, e => {
|
|
53935
54456
|
handleTextStick(this.table);
|
|
53936
54457
|
}));
|
|
54458
|
+
this.handleTextStickBindId.push(this.table.on(TABLE_EVENT_TYPE.RESIZE_ROW_END, e => {
|
|
54459
|
+
handleTextStick(this.table);
|
|
54460
|
+
}));
|
|
53937
54461
|
}
|
|
53938
54462
|
else if (!checkHaveTextStick(this.table) && this.handleTextStickBindId) {
|
|
53939
54463
|
this.handleTextStickBindId.forEach(id => {
|
|
@@ -54123,12 +54647,23 @@
|
|
|
54123
54647
|
dealMenuSelect(eventArgsSet) {
|
|
54124
54648
|
}
|
|
54125
54649
|
checkColumnResize(eventArgsSet, update) {
|
|
54650
|
+
const { eventArgs } = eventArgsSet;
|
|
54651
|
+
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgs?.targetCell);
|
|
54652
|
+
if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
54653
|
+
if (update) {
|
|
54654
|
+
this.table.stateManager.startResizeCol(resizeCol.col, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, resizeCol.rightFrozen);
|
|
54655
|
+
}
|
|
54656
|
+
return true;
|
|
54657
|
+
}
|
|
54658
|
+
return false;
|
|
54659
|
+
}
|
|
54660
|
+
checkRowResize(eventArgsSet, update) {
|
|
54126
54661
|
const { eventArgs } = eventArgsSet;
|
|
54127
54662
|
if (eventArgs) {
|
|
54128
|
-
const
|
|
54129
|
-
if (this.table.
|
|
54663
|
+
const resizeRow = this.table.scenegraph.getResizeRowAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgs.targetCell);
|
|
54664
|
+
if (this.table._canResizeRow(resizeRow.col, resizeRow.row) && resizeRow.row >= 0) {
|
|
54130
54665
|
if (update) {
|
|
54131
|
-
this.table.stateManager.
|
|
54666
|
+
this.table.stateManager.startResizeRow(resizeRow.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, resizeRow.bottomFrozen);
|
|
54132
54667
|
}
|
|
54133
54668
|
return true;
|
|
54134
54669
|
}
|
|
@@ -54161,6 +54696,9 @@
|
|
|
54161
54696
|
dealColumnResize(xInTable, yInTable) {
|
|
54162
54697
|
this.table.stateManager.updateResizeCol(xInTable, yInTable);
|
|
54163
54698
|
}
|
|
54699
|
+
dealRowResize(xInTable, yInTable) {
|
|
54700
|
+
this.table.stateManager.updateResizeRow(xInTable, yInTable);
|
|
54701
|
+
}
|
|
54164
54702
|
chechColumnMover(eventArgsSet) {
|
|
54165
54703
|
const { eventArgs } = eventArgsSet;
|
|
54166
54704
|
if (eventArgs &&
|
|
@@ -57479,7 +58017,7 @@
|
|
|
57479
58017
|
return TABLE_EVENT_TYPE;
|
|
57480
58018
|
}
|
|
57481
58019
|
options;
|
|
57482
|
-
version = "0.
|
|
58020
|
+
version = "0.25.0";
|
|
57483
58021
|
pagination;
|
|
57484
58022
|
id = `VTable${Date.now()}`;
|
|
57485
58023
|
headerStyleCache;
|
|
@@ -57495,7 +58033,7 @@
|
|
|
57495
58033
|
if (!container && options.mode !== 'node') {
|
|
57496
58034
|
throw new Error("vtable's container is undefined");
|
|
57497
58035
|
}
|
|
57498
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth } = options;
|
|
58036
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
|
|
57499
58037
|
this.container = container;
|
|
57500
58038
|
this.options = options;
|
|
57501
58039
|
this._widthMode = widthMode;
|
|
@@ -57551,6 +58089,7 @@
|
|
|
57551
58089
|
internalProps.eventOptions = eventOptions;
|
|
57552
58090
|
internalProps.rowSeriesNumber = rowSeriesNumber;
|
|
57553
58091
|
internalProps.columnResizeMode = columnResizeMode;
|
|
58092
|
+
internalProps.rowResizeMode = rowResizeMode;
|
|
57554
58093
|
internalProps.dragHeaderMode = dragHeaderMode;
|
|
57555
58094
|
internalProps.renderChartAsync = renderChartAsync;
|
|
57556
58095
|
setBatchRenderChartCount(renderChartAsyncBatchCount);
|
|
@@ -57559,6 +58098,7 @@
|
|
|
57559
58098
|
internalProps._rowRangeHeightsMap = new Map();
|
|
57560
58099
|
internalProps._colRangeWidthsMap = new Map();
|
|
57561
58100
|
internalProps._widthResizedColMap = new Set();
|
|
58101
|
+
internalProps._heightResizedRowMap = new Set();
|
|
57562
58102
|
this.colWidthsMap = new NumberMap();
|
|
57563
58103
|
this.colContentWidthsMap = new NumberMap();
|
|
57564
58104
|
this.colWidthsLimit = {};
|
|
@@ -57601,6 +58141,14 @@
|
|
|
57601
58141
|
? 10
|
|
57602
58142
|
: 0
|
|
57603
58143
|
: 10;
|
|
58144
|
+
internalProps.limitMinHeight =
|
|
58145
|
+
limitMinHeight !== null && limitMinHeight !== undefined
|
|
58146
|
+
? typeof limitMinHeight === 'number'
|
|
58147
|
+
? limitMinHeight
|
|
58148
|
+
: limitMinHeight
|
|
58149
|
+
? 10
|
|
58150
|
+
: 0
|
|
58151
|
+
: 10;
|
|
57604
58152
|
this._vDataSet = new DataSet();
|
|
57605
58153
|
this.scenegraph = new Scenegraph(this);
|
|
57606
58154
|
this.stateManager = new StateManager(this);
|
|
@@ -58020,7 +58568,8 @@
|
|
|
58020
58568
|
if (this.heightMode === 'standard' &&
|
|
58021
58569
|
!this.autoFillHeight &&
|
|
58022
58570
|
this.internalProps.layoutMap &&
|
|
58023
|
-
!this.hasAutoImageColumn()
|
|
58571
|
+
!this.hasAutoImageColumn() &&
|
|
58572
|
+
this.internalProps._heightResizedRowMap.size === 0) {
|
|
58024
58573
|
for (let i = startRow; i < Math.min(endRow + 1, this.columnHeaderLevelCount); i++) {
|
|
58025
58574
|
h += this.getRowHeight(i);
|
|
58026
58575
|
}
|
|
@@ -58607,7 +59156,7 @@
|
|
|
58607
59156
|
}
|
|
58608
59157
|
updateOption(options) {
|
|
58609
59158
|
this.options = options;
|
|
58610
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, overscrollBehavior, limitMinWidth } = options;
|
|
59159
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
|
|
58611
59160
|
if (pixelRatio && pixelRatio !== this.internalProps.pixelRatio) {
|
|
58612
59161
|
this.internalProps.pixelRatio = pixelRatio;
|
|
58613
59162
|
}
|
|
@@ -58650,6 +59199,7 @@
|
|
|
58650
59199
|
internalProps.eventOptions = eventOptions;
|
|
58651
59200
|
internalProps.rowSeriesNumber = rowSeriesNumber;
|
|
58652
59201
|
internalProps.columnResizeMode = columnResizeMode;
|
|
59202
|
+
internalProps.rowResizeMode = rowResizeMode;
|
|
58653
59203
|
internalProps.dragHeaderMode = dragHeaderMode;
|
|
58654
59204
|
internalProps.renderChartAsync = renderChartAsync;
|
|
58655
59205
|
setBatchRenderChartCount(renderChartAsyncBatchCount);
|
|
@@ -58659,6 +59209,7 @@
|
|
|
58659
59209
|
internalProps._rowRangeHeightsMap = new Map();
|
|
58660
59210
|
internalProps._colRangeWidthsMap = new Map();
|
|
58661
59211
|
internalProps._widthResizedColMap = new Set();
|
|
59212
|
+
internalProps._heightResizedRowMap = new Set();
|
|
58662
59213
|
this.colWidthsMap = new NumberMap();
|
|
58663
59214
|
this.colContentWidthsMap = new NumberMap();
|
|
58664
59215
|
this.colWidthsLimit = {};
|
|
@@ -58678,6 +59229,14 @@
|
|
|
58678
59229
|
? 10
|
|
58679
59230
|
: 0
|
|
58680
59231
|
: 10;
|
|
59232
|
+
internalProps.limitMinHeight =
|
|
59233
|
+
limitMinHeight !== null && limitMinHeight !== undefined
|
|
59234
|
+
? typeof limitMinHeight === 'number'
|
|
59235
|
+
? limitMinHeight
|
|
59236
|
+
: limitMinHeight
|
|
59237
|
+
? 10
|
|
59238
|
+
: 0
|
|
59239
|
+
: 10;
|
|
58681
59240
|
this._vDataSet = new DataSet();
|
|
58682
59241
|
internalProps.legends?.release();
|
|
58683
59242
|
internalProps.title?.release();
|
|
@@ -59459,6 +60018,28 @@
|
|
|
59459
60018
|
}
|
|
59460
60019
|
return limit.max !== limit.min;
|
|
59461
60020
|
}
|
|
60021
|
+
_canResizeRow(col, row) {
|
|
60022
|
+
if (!(col >= 0 && row >= 0)) {
|
|
60023
|
+
return false;
|
|
60024
|
+
}
|
|
60025
|
+
if (this.isCellRangeEqual(col, row, col, row + 1)) {
|
|
60026
|
+
return false;
|
|
60027
|
+
}
|
|
60028
|
+
if (this.internalProps.rowResizeMode === 'none') {
|
|
60029
|
+
return false;
|
|
60030
|
+
}
|
|
60031
|
+
else if (this.internalProps.rowResizeMode === 'header') {
|
|
60032
|
+
if (!this.isHeader(col, row)) {
|
|
60033
|
+
return false;
|
|
60034
|
+
}
|
|
60035
|
+
}
|
|
60036
|
+
else if (this.internalProps.rowResizeMode === 'body') {
|
|
60037
|
+
if (this.isHeader(col, row)) {
|
|
60038
|
+
return false;
|
|
60039
|
+
}
|
|
60040
|
+
}
|
|
60041
|
+
return true;
|
|
60042
|
+
}
|
|
59462
60043
|
_canDragHeaderPosition(col, row) {
|
|
59463
60044
|
if (this.isHeader(col, row) && this.stateManager.isSelected(col, row)) {
|
|
59464
60045
|
if (this.internalProps.frozenColDragHeaderMode === 'disabled' && this.isFrozenColumn(col)) {
|
|
@@ -59875,11 +60456,37 @@
|
|
|
59875
60456
|
if (col < this.frozenColCount && row < this.frozenRowCount) {
|
|
59876
60457
|
return true;
|
|
59877
60458
|
}
|
|
60459
|
+
const colHeaderRangeRect = this.getCellRangeRelativeRect({
|
|
60460
|
+
start: {
|
|
60461
|
+
col: 0,
|
|
60462
|
+
row: 0
|
|
60463
|
+
},
|
|
60464
|
+
end: {
|
|
60465
|
+
col: this.colCount - 1,
|
|
60466
|
+
row: this.columnHeaderLevelCount
|
|
60467
|
+
}
|
|
60468
|
+
});
|
|
60469
|
+
const rowHeaderRangeRect = this.getCellRangeRelativeRect({
|
|
60470
|
+
start: {
|
|
60471
|
+
col: 0,
|
|
60472
|
+
row: 0
|
|
60473
|
+
},
|
|
60474
|
+
end: {
|
|
60475
|
+
col: this.rowHeaderLevelCount,
|
|
60476
|
+
row: this.rowCount - 1
|
|
60477
|
+
}
|
|
60478
|
+
});
|
|
59878
60479
|
if (rect.top >= drawRange.top &&
|
|
59879
60480
|
rect.bottom <= drawRange.bottom &&
|
|
59880
60481
|
rect.left >= drawRange.left &&
|
|
59881
60482
|
rect.right <= drawRange.right) {
|
|
59882
|
-
|
|
60483
|
+
if (this.isHeader(col, row)) {
|
|
60484
|
+
return true;
|
|
60485
|
+
}
|
|
60486
|
+
else if (drawRange.top >= colHeaderRangeRect.bottom &&
|
|
60487
|
+
drawRange.left >= rowHeaderRangeRect.right) {
|
|
60488
|
+
return true;
|
|
60489
|
+
}
|
|
59883
60490
|
}
|
|
59884
60491
|
return false;
|
|
59885
60492
|
}
|
|
@@ -59909,6 +60516,8 @@
|
|
|
59909
60516
|
}
|
|
59910
60517
|
const { col: hoverCol, row: hoverRow } = this.stateManager.hover.cellPos;
|
|
59911
60518
|
this.stateManager.updateHoverPos(-1, -1);
|
|
60519
|
+
this.scenegraph.component.hideVerticalScrollBar();
|
|
60520
|
+
this.scenegraph.component.hideHorizontalScrollBar();
|
|
59912
60521
|
this.scenegraph.renderSceneGraph();
|
|
59913
60522
|
const c = this.scenegraph.stage.toCanvas(false, new AABBBounds().set(cellRect.left + this.tableX + 1, cellRect.top + this.tableY + 1, cellRect.right + this.tableX, cellRect.bottom + this.tableY));
|
|
59914
60523
|
if (!isInView) {
|
|
@@ -59936,12 +60545,24 @@
|
|
|
59936
60545
|
start: { col: minCol, row: minRow },
|
|
59937
60546
|
end: { col: maxCol, row: maxRow }
|
|
59938
60547
|
});
|
|
60548
|
+
if (this.stateManager.select?.ranges?.length > 0) {
|
|
60549
|
+
hideCellSelectBorder(this.scenegraph);
|
|
60550
|
+
}
|
|
60551
|
+
const { col: hoverCol, row: hoverRow } = this.stateManager.hover.cellPos;
|
|
60552
|
+
this.stateManager.updateHoverPos(-1, -1);
|
|
60553
|
+
this.scenegraph.component.hideVerticalScrollBar();
|
|
60554
|
+
this.scenegraph.component.hideHorizontalScrollBar();
|
|
60555
|
+
this.scenegraph.renderSceneGraph();
|
|
59939
60556
|
const c = this.scenegraph.stage.toCanvas(false, new AABBBounds().set(cellRect.left + this.tableX + 1, cellRect.top + this.tableY + 1, cellRect.right + this.tableX, cellRect.bottom + this.tableY));
|
|
59940
60557
|
const base64Image = c.toDataURL();
|
|
59941
60558
|
if (!isInView || !isMaxCellInView) {
|
|
59942
60559
|
this.setScrollTop(scrollTop);
|
|
59943
60560
|
this.setScrollLeft(scrollLeft);
|
|
59944
60561
|
}
|
|
60562
|
+
if (this.stateManager.select?.ranges?.length > 0) {
|
|
60563
|
+
restoreCellSelectBorder(this.scenegraph);
|
|
60564
|
+
}
|
|
60565
|
+
this.stateManager.updateHoverPos(hoverCol, hoverRow);
|
|
59945
60566
|
return base64Image;
|
|
59946
60567
|
}
|
|
59947
60568
|
exportCanvas() {
|
|
@@ -62443,14 +63064,8 @@
|
|
|
62443
63064
|
});
|
|
62444
63065
|
}
|
|
62445
63066
|
startEditCell(col, row) {
|
|
62446
|
-
if (this.table.isPivotTable() && this.table.isHeader(col, row)) {
|
|
62447
|
-
return;
|
|
62448
|
-
}
|
|
62449
63067
|
const editor = this.table.getEditor(col, row);
|
|
62450
63068
|
if (editor) {
|
|
62451
|
-
if (this.table.getCustomRender(col, row) || this.table.getCustomLayout(col, row)) {
|
|
62452
|
-
return;
|
|
62453
|
-
}
|
|
62454
63069
|
if (!this.table.isHeader(col, row)) {
|
|
62455
63070
|
const range = this.table.getCellRange(col, row);
|
|
62456
63071
|
const isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
|
|
@@ -63316,6 +63931,7 @@
|
|
|
63316
63931
|
const recordIndex = this.getRecordShowIndexByCell(col, row);
|
|
63317
63932
|
const { field } = this.internalProps.layoutMap.getBody(col, row);
|
|
63318
63933
|
const beforeChangeValue = this.getCellRawValue(col, row);
|
|
63934
|
+
const oldValue = this.getCellOriginValue(col, row);
|
|
63319
63935
|
if (this.isHeader(col, row)) {
|
|
63320
63936
|
this.internalProps.layoutMap.updateColumnTitle(col, row, value);
|
|
63321
63937
|
}
|
|
@@ -63362,9 +63978,11 @@
|
|
|
63362
63978
|
}
|
|
63363
63979
|
if (this.heightMode === 'adaptive' ||
|
|
63364
63980
|
(this.autoFillHeight && this.getAllRowsHeight() <= this.tableNoFrameHeight)) {
|
|
63365
|
-
this.
|
|
63981
|
+
if (this.internalProps._heightResizedRowMap.size === 0) {
|
|
63982
|
+
this.scenegraph.recalculateRowHeights();
|
|
63983
|
+
}
|
|
63366
63984
|
}
|
|
63367
|
-
else if (this.heightMode === 'autoHeight') {
|
|
63985
|
+
else if (this.heightMode === 'autoHeight' && !this.internalProps._heightResizedRowMap.has(row)) {
|
|
63368
63986
|
const oldHeight = this.getRowHeight(row);
|
|
63369
63987
|
const newHeight = computeRowHeight(row, 0, this.colCount - 1, this);
|
|
63370
63988
|
this.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
@@ -63373,6 +63991,7 @@
|
|
|
63373
63991
|
col,
|
|
63374
63992
|
row,
|
|
63375
63993
|
rawValue: beforeChangeValue,
|
|
63994
|
+
currentValue: oldValue,
|
|
63376
63995
|
changedValue: this.getCellOriginValue(col, row)
|
|
63377
63996
|
});
|
|
63378
63997
|
this.scenegraph.updateNextFrame();
|
|
@@ -63399,6 +64018,7 @@
|
|
|
63399
64018
|
const recordIndex = this.getRecordShowIndexByCell(startCol + j, startRow + i);
|
|
63400
64019
|
const { field } = this.internalProps.layoutMap.getBody(startCol + j, startRow + i);
|
|
63401
64020
|
const beforeChangeValue = this.getCellRawValue(startCol + j, startRow + i);
|
|
64021
|
+
const oldValue = this.getCellOriginValue(startCol + j, startRow + i);
|
|
63402
64022
|
if (this.isHeader(startCol + j, startRow + i)) {
|
|
63403
64023
|
this.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value);
|
|
63404
64024
|
}
|
|
@@ -63409,6 +64029,7 @@
|
|
|
63409
64029
|
col: startCol + j,
|
|
63410
64030
|
row: startRow + i,
|
|
63411
64031
|
rawValue: beforeChangeValue,
|
|
64032
|
+
currentValue: oldValue,
|
|
63412
64033
|
changedValue: this.getCellOriginValue(startCol + j, startRow + i)
|
|
63413
64034
|
});
|
|
63414
64035
|
}
|
|
@@ -65814,9 +66435,14 @@
|
|
|
65814
66435
|
let isCol = false;
|
|
65815
66436
|
for (let j = 0; j < colArr.length; j++) {
|
|
65816
66437
|
const dimension = colArr[j];
|
|
65817
|
-
if ((
|
|
65818
|
-
|
|
65819
|
-
dimension.value === highlightDimension.value)
|
|
66438
|
+
if ((isValid$3(highlightDimension.dimensionKey) &&
|
|
66439
|
+
dimension.dimensionKey === highlightDimension.dimensionKey &&
|
|
66440
|
+
dimension.value === highlightDimension.value) ||
|
|
66441
|
+
(isValid$3(highlightDimension.indicatorKey) &&
|
|
66442
|
+
dimension.indicatorKey === highlightDimension.indicatorKey &&
|
|
66443
|
+
(dimension.value === highlightDimension.value ||
|
|
66444
|
+
!isValid$3(highlightDimension.value) ||
|
|
66445
|
+
!isValid$3(dimension.value)))) {
|
|
65820
66446
|
colArr = dimension.children;
|
|
65821
66447
|
colDimension = dimension;
|
|
65822
66448
|
isCol = true;
|
|
@@ -65828,9 +66454,14 @@
|
|
|
65828
66454
|
}
|
|
65829
66455
|
for (let k = 0; k < rowArr.length; k++) {
|
|
65830
66456
|
const dimension = rowArr[k];
|
|
65831
|
-
if ((
|
|
65832
|
-
|
|
65833
|
-
dimension.value === highlightDimension.value)
|
|
66457
|
+
if ((isValid$3(highlightDimension.dimensionKey) &&
|
|
66458
|
+
dimension.dimensionKey === highlightDimension.dimensionKey &&
|
|
66459
|
+
dimension.value === highlightDimension.value) ||
|
|
66460
|
+
(isValid$3(highlightDimension.indicatorKey) &&
|
|
66461
|
+
dimension.indicatorKey === highlightDimension.indicatorKey &&
|
|
66462
|
+
(dimension.value === highlightDimension.value ||
|
|
66463
|
+
!isValid$3(highlightDimension.value) ||
|
|
66464
|
+
!isValid$3(dimension.value)))) {
|
|
65834
66465
|
rowArr = dimension.children;
|
|
65835
66466
|
rowDimension = dimension;
|
|
65836
66467
|
break;
|
|
@@ -66228,6 +66859,19 @@
|
|
|
66228
66859
|
}
|
|
66229
66860
|
return undefined;
|
|
66230
66861
|
}
|
|
66862
|
+
changeTreeNodeTitle(col, row, value) {
|
|
66863
|
+
const headerPaths = this.getCellHeaderPaths(col, row);
|
|
66864
|
+
if (headerPaths.rowHeaderPaths.length > 0) {
|
|
66865
|
+
const headerTreeNode = this.getHeadNode(headerPaths.rowHeaderPaths.slice(0, headerPaths.rowHeaderPaths.length));
|
|
66866
|
+
headerTreeNode.value = value;
|
|
66867
|
+
}
|
|
66868
|
+
else if (headerPaths.colHeaderPaths.length > 0) {
|
|
66869
|
+
const headerTreeNode = this.getHeadNode(headerPaths.colHeaderPaths.slice(0, headerPaths.colHeaderPaths.length));
|
|
66870
|
+
headerTreeNode.value = value;
|
|
66871
|
+
}
|
|
66872
|
+
const id = this.getCellId(col, row);
|
|
66873
|
+
this._headerObjectMap[id].title = value;
|
|
66874
|
+
}
|
|
66231
66875
|
}
|
|
66232
66876
|
function scaleWholeRangeSize(count, bandwidth, paddingInner, paddingOuter) {
|
|
66233
66877
|
if (paddingInner === 1) {
|
|
@@ -66253,7 +66897,7 @@
|
|
|
66253
66897
|
dataConfig;
|
|
66254
66898
|
records;
|
|
66255
66899
|
tree = {};
|
|
66256
|
-
|
|
66900
|
+
beforeChangedTree = {};
|
|
66257
66901
|
colFlatKeys = {};
|
|
66258
66902
|
rowFlatKeys = {};
|
|
66259
66903
|
stringJoinChar = String.fromCharCode(0);
|
|
@@ -66339,7 +66983,7 @@
|
|
|
66339
66983
|
}
|
|
66340
66984
|
});
|
|
66341
66985
|
}
|
|
66342
|
-
getTreeNode(rowKey = [], colKey = [], indicator,
|
|
66986
|
+
getTreeNode(rowKey = [], colKey = [], indicator, ifChangedValue = true) {
|
|
66343
66987
|
let flatRowKey;
|
|
66344
66988
|
let flatColKey;
|
|
66345
66989
|
if (typeof rowKey === 'string') {
|
|
@@ -66370,10 +67014,16 @@
|
|
|
66370
67014
|
isHasIndicator && colKey.push(indicator);
|
|
66371
67015
|
flatColKey = colKey.join(this.stringJoinChar);
|
|
66372
67016
|
}
|
|
66373
|
-
if (
|
|
66374
|
-
return
|
|
67017
|
+
if (ifChangedValue) {
|
|
67018
|
+
return this.tree?.[flatRowKey]?.[flatColKey] ?? undefined;
|
|
67019
|
+
}
|
|
67020
|
+
if (isValid$3(this.beforeChangedTree[flatRowKey]?.[flatColKey])) {
|
|
67021
|
+
return {
|
|
67022
|
+
value: this.beforeChangedTree[flatRowKey][flatColKey].value,
|
|
67023
|
+
record: this.beforeChangedTree[flatRowKey][flatColKey].record
|
|
67024
|
+
};
|
|
66375
67025
|
}
|
|
66376
|
-
return
|
|
67026
|
+
return undefined;
|
|
66377
67027
|
}
|
|
66378
67028
|
changeTreeNodeValue(rowKey = [], colKey = [], indicator, newValue) {
|
|
66379
67029
|
let flatRowKey;
|
|
@@ -66406,13 +67056,45 @@
|
|
|
66406
67056
|
isHasIndicator && colKey.push(indicator);
|
|
66407
67057
|
flatColKey = colKey.join(this.stringJoinChar);
|
|
66408
67058
|
}
|
|
66409
|
-
|
|
66410
|
-
|
|
67059
|
+
const oldValue = this.tree[flatRowKey]?.[flatColKey]?.value;
|
|
67060
|
+
const oldRecord = Object.assign({}, this.tree[flatRowKey]?.[flatColKey]?.record);
|
|
67061
|
+
if (this.tree[flatRowKey]?.[flatColKey]?.record) {
|
|
67062
|
+
this.tree[flatRowKey][flatColKey].record[indicator] = newValue;
|
|
67063
|
+
this.tree[flatRowKey][flatColKey].value = newValue;
|
|
66411
67064
|
}
|
|
66412
67065
|
else {
|
|
66413
|
-
this.
|
|
66414
|
-
|
|
67066
|
+
if (!this.tree[flatRowKey]) {
|
|
67067
|
+
this.tree[flatRowKey] = {};
|
|
67068
|
+
}
|
|
67069
|
+
this.tree[flatRowKey][flatColKey] = {
|
|
67070
|
+
record: this._buildRecord(rowKey, colKey, indicator, newValue),
|
|
67071
|
+
value: newValue
|
|
67072
|
+
};
|
|
66415
67073
|
}
|
|
67074
|
+
if (!this.beforeChangedTree[flatRowKey]?.[flatColKey]) {
|
|
67075
|
+
this.beforeChangedTree[flatRowKey] = {};
|
|
67076
|
+
this.beforeChangedTree[flatRowKey][flatColKey] = { record: undefined, value: undefined };
|
|
67077
|
+
this.beforeChangedTree[flatRowKey][flatColKey].record = oldRecord;
|
|
67078
|
+
this.beforeChangedTree[flatRowKey][flatColKey].value = oldValue;
|
|
67079
|
+
}
|
|
67080
|
+
}
|
|
67081
|
+
_buildRecord(rowKey = [], colKey = [], indicator, value) {
|
|
67082
|
+
const record = {};
|
|
67083
|
+
const rowDimensions = this.dataConfig.rows;
|
|
67084
|
+
const colDimensions = this.dataConfig.columns;
|
|
67085
|
+
rowDimensions.forEach((dimension, index) => {
|
|
67086
|
+
if (dimension !== this.dataConfig.indicatorDimensionKey) {
|
|
67087
|
+
record[dimension] = rowKey[index];
|
|
67088
|
+
}
|
|
67089
|
+
});
|
|
67090
|
+
colDimensions.forEach((dimension, index) => {
|
|
67091
|
+
if (dimension !== this.dataConfig.indicatorDimensionKey) {
|
|
67092
|
+
record[dimension] = colKey[index];
|
|
67093
|
+
}
|
|
67094
|
+
});
|
|
67095
|
+
record[indicator] = value;
|
|
67096
|
+
this.records.push(record);
|
|
67097
|
+
return record;
|
|
66416
67098
|
}
|
|
66417
67099
|
addRecords(records) {
|
|
66418
67100
|
for (let i = 0, len = records.length; i < len; i++) {
|
|
@@ -66421,6 +67103,26 @@
|
|
|
66421
67103
|
}
|
|
66422
67104
|
this.records.push(records);
|
|
66423
67105
|
}
|
|
67106
|
+
changeRecordFieldValue(fieldName, oldValue, value) {
|
|
67107
|
+
let isIndicatorName = false;
|
|
67108
|
+
for (let i = 0; i < this.dataConfig.indicators.length; i++) {
|
|
67109
|
+
if (this.dataConfig.indicators[i] === fieldName) {
|
|
67110
|
+
isIndicatorName = true;
|
|
67111
|
+
}
|
|
67112
|
+
}
|
|
67113
|
+
if (!isIndicatorName) {
|
|
67114
|
+
for (let i = 0, len = this.records.length; i < len; i++) {
|
|
67115
|
+
const record = this.records[i];
|
|
67116
|
+
if (record[fieldName] === oldValue) {
|
|
67117
|
+
record[fieldName] = value;
|
|
67118
|
+
}
|
|
67119
|
+
}
|
|
67120
|
+
this.rowFlatKeys = {};
|
|
67121
|
+
this.colFlatKeys = {};
|
|
67122
|
+
this.tree = {};
|
|
67123
|
+
this.processRecords();
|
|
67124
|
+
}
|
|
67125
|
+
}
|
|
66424
67126
|
}
|
|
66425
67127
|
|
|
66426
67128
|
class Dataset {
|
|
@@ -67486,6 +68188,38 @@
|
|
|
67486
68188
|
this.changedTree[flatRowKey][flatColKey][indicatorIndex] = newValue;
|
|
67487
68189
|
}
|
|
67488
68190
|
}
|
|
68191
|
+
changeRecordFieldValue(fieldName, oldValue, value) {
|
|
68192
|
+
let isIndicatorName = false;
|
|
68193
|
+
for (let i = 0; i < this.indicatorKeys.length; i++) {
|
|
68194
|
+
if (this.indicatorKeys[i] === fieldName) {
|
|
68195
|
+
isIndicatorName = true;
|
|
68196
|
+
}
|
|
68197
|
+
}
|
|
68198
|
+
if (!isIndicatorName) {
|
|
68199
|
+
if (Array.isArray(this.records)) {
|
|
68200
|
+
for (let i = 0, len = this.records.length; i < len; i++) {
|
|
68201
|
+
const record = this.records[i];
|
|
68202
|
+
if (record[fieldName] === oldValue) {
|
|
68203
|
+
record[fieldName] = value;
|
|
68204
|
+
}
|
|
68205
|
+
}
|
|
68206
|
+
}
|
|
68207
|
+
else {
|
|
68208
|
+
for (const key in this.records) {
|
|
68209
|
+
for (let i = 0, len = this.records[key].length; i < len; i++) {
|
|
68210
|
+
const record = this.records[key][i];
|
|
68211
|
+
if (record[fieldName] === oldValue) {
|
|
68212
|
+
record[fieldName] = value;
|
|
68213
|
+
}
|
|
68214
|
+
}
|
|
68215
|
+
}
|
|
68216
|
+
}
|
|
68217
|
+
this.rowFlatKeys = {};
|
|
68218
|
+
this.colFlatKeys = {};
|
|
68219
|
+
this.tree = {};
|
|
68220
|
+
this.processRecords();
|
|
68221
|
+
}
|
|
68222
|
+
}
|
|
67489
68223
|
}
|
|
67490
68224
|
function arraySortByAnotherArray(array, sortArray) {
|
|
67491
68225
|
return array.sort((a, b) => {
|
|
@@ -67539,6 +68273,7 @@
|
|
|
67539
68273
|
this.internalProps.records = options.records;
|
|
67540
68274
|
this.pagination = options.pagination;
|
|
67541
68275
|
this.internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
68276
|
+
this.internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
67542
68277
|
this.internalProps.dataConfig = cloneDeep(options.dataConfig);
|
|
67543
68278
|
if (!options.rowTree && !options.columnTree) {
|
|
67544
68279
|
this.internalProps.enableDataAnalysis = true;
|
|
@@ -67658,6 +68393,7 @@
|
|
|
67658
68393
|
this.stateManager.updateDrillState(undefined, undefined, false, false, -1, -1);
|
|
67659
68394
|
this.pagination = options.pagination;
|
|
67660
68395
|
internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
68396
|
+
internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
67661
68397
|
internalProps.dataConfig = cloneDeep(options.dataConfig);
|
|
67662
68398
|
if (!options.rowTree && !options.columnTree) {
|
|
67663
68399
|
internalProps.enableDataAnalysis = true;
|
|
@@ -68010,7 +68746,7 @@
|
|
|
68010
68746
|
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
68011
68747
|
return rowPath.indicatorKey ?? rowPath.value;
|
|
68012
68748
|
});
|
|
68013
|
-
const treeNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey
|
|
68749
|
+
const treeNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey);
|
|
68014
68750
|
return treeNode?.record;
|
|
68015
68751
|
}
|
|
68016
68752
|
const rowIndex = this.getBodyIndexByRow(row);
|
|
@@ -68019,7 +68755,36 @@
|
|
|
68019
68755
|
return dataValue;
|
|
68020
68756
|
}
|
|
68021
68757
|
getCellRawRecord(col, row) {
|
|
68022
|
-
|
|
68758
|
+
const table = this;
|
|
68759
|
+
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
68760
|
+
return undefined;
|
|
68761
|
+
}
|
|
68762
|
+
if (this.dataset) {
|
|
68763
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
68764
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
68765
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
68766
|
+
});
|
|
68767
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
68768
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
68769
|
+
});
|
|
68770
|
+
const aggregator = this.dataset.getAggregator(!this.internalProps.layoutMap.indicatorsAsCol ? rowKeys.slice(0, -1) : rowKeys, this.internalProps.layoutMap.indicatorsAsCol ? colKeys.slice(0, -1) : colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row));
|
|
68771
|
+
return aggregator.records;
|
|
68772
|
+
}
|
|
68773
|
+
else if (this.flatDataToObjects) {
|
|
68774
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
68775
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
68776
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
68777
|
+
});
|
|
68778
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
68779
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
68780
|
+
});
|
|
68781
|
+
const treeNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey, false);
|
|
68782
|
+
return treeNode?.record;
|
|
68783
|
+
}
|
|
68784
|
+
const rowIndex = this.getBodyIndexByRow(row);
|
|
68785
|
+
const colIndex = this.getBodyIndexByCol(col);
|
|
68786
|
+
const dataValue = this.records[rowIndex]?.[colIndex];
|
|
68787
|
+
return dataValue;
|
|
68023
68788
|
}
|
|
68024
68789
|
updateSortRules(sortRules) {
|
|
68025
68790
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
@@ -68252,8 +69017,15 @@
|
|
|
68252
69017
|
this.editorManager.completeEdit();
|
|
68253
69018
|
}
|
|
68254
69019
|
getEditor(col, row) {
|
|
68255
|
-
|
|
68256
|
-
|
|
69020
|
+
let editorDefine;
|
|
69021
|
+
if (this.isHeader(col, row) && !this.isCornerHeader(col, row)) {
|
|
69022
|
+
const define = this.getHeaderDefine(col, row);
|
|
69023
|
+
editorDefine = define?.headerEditor ?? this.options.headerEditor;
|
|
69024
|
+
}
|
|
69025
|
+
else {
|
|
69026
|
+
const define = this.getBodyColumnDefine(col, row);
|
|
69027
|
+
editorDefine = define?.editor ?? this.options.editor;
|
|
69028
|
+
}
|
|
68257
69029
|
if (typeof editorDefine === 'function') {
|
|
68258
69030
|
const arg = {
|
|
68259
69031
|
col,
|
|
@@ -68287,12 +69059,18 @@
|
|
|
68287
69059
|
changeCellValue(col, row, value, workOnEditableCell = false) {
|
|
68288
69060
|
if ((workOnEditableCell && this.isHasEditorDefine(col, row)) || workOnEditableCell === false) {
|
|
68289
69061
|
let newValue = value;
|
|
69062
|
+
const oldValue = this.getCellOriginValue(col, row);
|
|
68290
69063
|
const rawValue = this.getCellRawValue(col, row);
|
|
68291
69064
|
if (typeof rawValue === 'number' && isAllDigits(value)) {
|
|
68292
69065
|
newValue = parseFloat(value);
|
|
68293
69066
|
}
|
|
68294
|
-
this._changeCellValueToDataSet(col, row, newValue);
|
|
68295
|
-
this.
|
|
69067
|
+
this._changeCellValueToDataSet(col, row, oldValue, newValue);
|
|
69068
|
+
const range = this.getCellRange(col, row);
|
|
69069
|
+
for (let sCol = range.start.col; sCol <= range.end.col; sCol++) {
|
|
69070
|
+
for (let sRow = range.start.row; sRow <= range.end.row; sRow++) {
|
|
69071
|
+
this.scenegraph.updateCellContent(sCol, sRow);
|
|
69072
|
+
}
|
|
69073
|
+
}
|
|
68296
69074
|
if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
|
|
68297
69075
|
if (this.internalProps._widthResizedColMap.size === 0) {
|
|
68298
69076
|
this.scenegraph.recalculateColWidths();
|
|
@@ -68307,9 +69085,11 @@
|
|
|
68307
69085
|
}
|
|
68308
69086
|
if (this.heightMode === 'adaptive' ||
|
|
68309
69087
|
(this.autoFillHeight && this.getAllRowsHeight() <= this.tableNoFrameHeight)) {
|
|
68310
|
-
this.
|
|
69088
|
+
if (this.internalProps._heightResizedRowMap.size === 0) {
|
|
69089
|
+
this.scenegraph.recalculateRowHeights();
|
|
69090
|
+
}
|
|
68311
69091
|
}
|
|
68312
|
-
else if (this.heightMode === 'autoHeight') {
|
|
69092
|
+
else if (this.heightMode === 'autoHeight' && !this.internalProps._heightResizedRowMap.has(row)) {
|
|
68313
69093
|
const oldHeight = this.getRowHeight(row);
|
|
68314
69094
|
const newHeight = computeRowHeight(row, 0, this.colCount - 1, this);
|
|
68315
69095
|
this.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
@@ -68317,7 +69097,8 @@
|
|
|
68317
69097
|
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
|
|
68318
69098
|
col,
|
|
68319
69099
|
row,
|
|
68320
|
-
rawValue
|
|
69100
|
+
rawValue,
|
|
69101
|
+
currentValue: oldValue,
|
|
68321
69102
|
changedValue: newValue
|
|
68322
69103
|
});
|
|
68323
69104
|
this.scenegraph.updateNextFrame();
|
|
@@ -68342,15 +69123,17 @@
|
|
|
68342
69123
|
workOnEditableCell === false) {
|
|
68343
69124
|
const value = rowValues[j];
|
|
68344
69125
|
let newValue = value;
|
|
69126
|
+
const oldValue = this.getCellOriginValue(startCol + j, startRow + i);
|
|
68345
69127
|
const rawValue = this.getCellRawValue(startCol + j, startRow + i);
|
|
68346
69128
|
if (typeof rawValue === 'number' && isAllDigits(value)) {
|
|
68347
69129
|
newValue = parseFloat(value);
|
|
68348
69130
|
}
|
|
68349
|
-
this._changeCellValueToDataSet(startCol + j, startRow + i, newValue);
|
|
69131
|
+
this._changeCellValueToDataSet(startCol + j, startRow + i, oldValue, newValue);
|
|
68350
69132
|
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
|
|
68351
69133
|
col: startCol + j,
|
|
68352
69134
|
row: startRow + i,
|
|
68353
69135
|
rawValue,
|
|
69136
|
+
currentValue: oldValue,
|
|
68354
69137
|
changedValue: this.getCellOriginValue(startCol + j, startRow + i)
|
|
68355
69138
|
});
|
|
68356
69139
|
}
|
|
@@ -68398,26 +69181,48 @@
|
|
|
68398
69181
|
}
|
|
68399
69182
|
this.scenegraph.updateNextFrame();
|
|
68400
69183
|
}
|
|
68401
|
-
_changeCellValueToDataSet(col, row, newValue) {
|
|
69184
|
+
_changeCellValueToDataSet(col, row, oldValue, newValue) {
|
|
68402
69185
|
if (this.dataset) {
|
|
68403
69186
|
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
68404
|
-
|
|
68405
|
-
|
|
68406
|
-
|
|
68407
|
-
|
|
68408
|
-
|
|
68409
|
-
|
|
68410
|
-
|
|
69187
|
+
if (this.isHeader(col, row)) {
|
|
69188
|
+
this.internalProps.layoutMap.changeTreeNodeTitle(col, row, newValue);
|
|
69189
|
+
!this.isCornerHeader(col, row) &&
|
|
69190
|
+
this.dataset.changeRecordFieldValue(cellDimensionPath.colHeaderPaths?.length
|
|
69191
|
+
? cellDimensionPath.colHeaderPaths[cellDimensionPath.colHeaderPaths.length - 1].indicatorKey ??
|
|
69192
|
+
cellDimensionPath.colHeaderPaths[cellDimensionPath.colHeaderPaths.length - 1].dimensionKey
|
|
69193
|
+
: cellDimensionPath.rowHeaderPaths[cellDimensionPath.rowHeaderPaths.length - 1].indicatorKey ??
|
|
69194
|
+
cellDimensionPath.rowHeaderPaths[cellDimensionPath.rowHeaderPaths.length - 1].dimensionKey, oldValue, newValue);
|
|
69195
|
+
}
|
|
69196
|
+
else {
|
|
69197
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
69198
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
69199
|
+
});
|
|
69200
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
69201
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
69202
|
+
});
|
|
69203
|
+
this.dataset.changeTreeNodeValue(!this.internalProps.layoutMap.indicatorsAsCol ? rowKeys.slice(0, -1) : rowKeys, this.internalProps.layoutMap.indicatorsAsCol ? colKeys.slice(0, -1) : colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row), newValue);
|
|
69204
|
+
}
|
|
68411
69205
|
}
|
|
68412
69206
|
else if (this.flatDataToObjects) {
|
|
68413
69207
|
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
68414
|
-
|
|
68415
|
-
|
|
68416
|
-
|
|
68417
|
-
|
|
68418
|
-
|
|
68419
|
-
|
|
68420
|
-
|
|
69208
|
+
if (this.isHeader(col, row)) {
|
|
69209
|
+
this.internalProps.layoutMap.changeTreeNodeTitle(col, row, newValue);
|
|
69210
|
+
!this.isCornerHeader(col, row) &&
|
|
69211
|
+
this.flatDataToObjects.changeRecordFieldValue(cellDimensionPath.colHeaderPaths?.length
|
|
69212
|
+
? cellDimensionPath.colHeaderPaths[cellDimensionPath.colHeaderPaths.length - 1].indicatorKey ??
|
|
69213
|
+
cellDimensionPath.colHeaderPaths[cellDimensionPath.colHeaderPaths.length - 1].dimensionKey
|
|
69214
|
+
: cellDimensionPath.rowHeaderPaths[cellDimensionPath.rowHeaderPaths.length - 1].indicatorKey ??
|
|
69215
|
+
cellDimensionPath.rowHeaderPaths[cellDimensionPath.rowHeaderPaths.length - 1].dimensionKey, oldValue, newValue);
|
|
69216
|
+
}
|
|
69217
|
+
else {
|
|
69218
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
69219
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
69220
|
+
});
|
|
69221
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
69222
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
69223
|
+
});
|
|
69224
|
+
this.flatDataToObjects.changeTreeNodeValue(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey, newValue);
|
|
69225
|
+
}
|
|
68421
69226
|
}
|
|
68422
69227
|
else {
|
|
68423
69228
|
const rowIndex = this.getBodyIndexByRow(row);
|
|
@@ -68510,6 +69315,7 @@
|
|
|
68510
69315
|
this.internalProps.records = options.records;
|
|
68511
69316
|
this.setCustomStateNameToSpec();
|
|
68512
69317
|
this.internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
69318
|
+
this.internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
68513
69319
|
this.internalProps.dataConfig = { isPivotChart: true };
|
|
68514
69320
|
this._axes = isArray$3(options.axes) ? options.axes : [];
|
|
68515
69321
|
const rowKeys = options.rows?.reduce((keys, rowObj) => {
|
|
@@ -68598,6 +69404,7 @@
|
|
|
68598
69404
|
this.setCustomStateNameToSpec();
|
|
68599
69405
|
this._selectedDataItemsInChart = [];
|
|
68600
69406
|
internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
69407
|
+
internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
68601
69408
|
internalProps.dataConfig = { isPivotChart: true };
|
|
68602
69409
|
this._axes = isArray$3(options.axes) ? options.axes : [];
|
|
68603
69410
|
const rowKeys = options.rows?.reduce((keys, rowObj) => {
|
|
@@ -69846,7 +70653,7 @@
|
|
|
69846
70653
|
}
|
|
69847
70654
|
|
|
69848
70655
|
registerForVrender();
|
|
69849
|
-
const version = "0.
|
|
70656
|
+
const version = "0.25.0";
|
|
69850
70657
|
function getIcons() {
|
|
69851
70658
|
return get$2();
|
|
69852
70659
|
}
|