@visactor/vtable 1.17.3-alpha.8 → 1.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.js +7 -5
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/react/react-custom-layout.js +3 -2
- package/cjs/components/react/react-custom-layout.js.map +1 -1
- package/cjs/core/BaseTable.js +22 -8
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/record-helper.js +2 -2
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/core/tableHelper.js +1 -1
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/event/event.js +7 -35
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +2 -2
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/scroll.js +1 -2
- package/cjs/event/self-event-listener/base-table/dbclick-auto-column-width.d.ts +2 -0
- package/cjs/event/self-event-listener/base-table/dbclick-auto-column-width.js +31 -0
- package/cjs/event/self-event-listener/base-table/dbclick-auto-column-width.js.map +1 -0
- package/cjs/event/self-event-listener/base-table/dropdown-menu.d.ts +2 -0
- package/cjs/event/self-event-listener/base-table/dropdown-menu.js +16 -0
- package/cjs/event/self-event-listener/base-table/dropdown-menu.js.map +1 -0
- package/cjs/event/self-event-listener/base-table/icon.d.ts +2 -0
- package/cjs/event/self-event-listener/base-table/icon.js +23 -0
- package/cjs/event/self-event-listener/base-table/icon.js.map +1 -0
- package/cjs/event/self-event-listener/base-table/right-button-click.d.ts +2 -0
- package/cjs/event/self-event-listener/base-table/right-button-click.js +25 -0
- package/cjs/event/self-event-listener/base-table/right-button-click.js.map +1 -0
- package/cjs/event/{list-table → self-event-listener/list-table}/checkbox.d.ts +1 -1
- package/cjs/event/{list-table → self-event-listener/list-table}/checkbox.js +1 -1
- package/cjs/event/self-event-listener/list-table/checkbox.js.map +1 -0
- package/{es/event → cjs/event/self-event-listener}/pivot-chart/axis-click.d.ts +1 -1
- package/cjs/event/{pivot-chart → self-event-listener/pivot-chart}/axis-click.js +1 -1
- package/cjs/event/self-event-listener/pivot-chart/axis-click.js.map +1 -0
- package/cjs/event/{pivot-chart → self-event-listener/pivot-chart}/axis-hover.d.ts +1 -1
- package/cjs/event/{pivot-chart → self-event-listener/pivot-chart}/axis-hover.js +1 -1
- package/cjs/event/self-event-listener/pivot-chart/axis-hover.js.map +1 -0
- package/cjs/event/self-event-listener/pivot-table/drill.d.ts +1 -0
- package/cjs/event/self-event-listener/pivot-table/drill.js +3 -0
- package/cjs/event/self-event-listener/pivot-table/drill.js.map +1 -0
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +5 -7
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/index.js +2 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +25 -14
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +5 -5
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/chartModules.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +3 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +4 -2
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +8 -7
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js +5 -4
- package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +2 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +9 -8
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +5 -5
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +5 -1
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/select/update-position.js +2 -2
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.js +64 -16
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/customElement.d.ts +1 -0
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/events.d.ts +16 -1
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -1
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +369 -173
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.js +7 -5
- package/es/PivotTable.js.map +1 -1
- package/es/components/react/react-custom-layout.js +3 -2
- package/es/components/react/react-custom-layout.js.map +1 -1
- package/es/core/BaseTable.js +21 -7
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/es/core/TABLE_EVENT_TYPE.js +1 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/record-helper.js +2 -2
- package/es/core/record-helper.js.map +1 -1
- package/es/core/tableHelper.js +1 -1
- package/es/core/tableHelper.js.map +1 -1
- package/es/event/event.js +16 -39
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +2 -2
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/scroll.js +1 -2
- package/es/event/self-event-listener/base-table/dbclick-auto-column-width.d.ts +2 -0
- package/es/event/self-event-listener/base-table/dbclick-auto-column-width.js +25 -0
- package/es/event/self-event-listener/base-table/dbclick-auto-column-width.js.map +1 -0
- package/es/event/self-event-listener/base-table/dropdown-menu.d.ts +2 -0
- package/es/event/self-event-listener/base-table/dropdown-menu.js +8 -0
- package/es/event/self-event-listener/base-table/dropdown-menu.js.map +1 -0
- package/es/event/self-event-listener/base-table/icon.d.ts +2 -0
- package/es/event/self-event-listener/base-table/icon.js +18 -0
- package/es/event/self-event-listener/base-table/icon.js.map +1 -0
- package/es/event/self-event-listener/base-table/right-button-click.d.ts +2 -0
- package/es/event/self-event-listener/base-table/right-button-click.js +17 -0
- package/es/event/self-event-listener/base-table/right-button-click.js.map +1 -0
- package/es/event/{list-table → self-event-listener/list-table}/checkbox.d.ts +1 -1
- package/es/event/{list-table → self-event-listener/list-table}/checkbox.js +2 -2
- package/es/event/self-event-listener/list-table/checkbox.js.map +1 -0
- package/{cjs/event → es/event/self-event-listener}/pivot-chart/axis-click.d.ts +1 -1
- package/es/event/{pivot-chart → self-event-listener/pivot-chart}/axis-click.js +2 -2
- package/es/event/self-event-listener/pivot-chart/axis-click.js.map +1 -0
- package/es/event/{pivot-chart → self-event-listener/pivot-chart}/axis-hover.d.ts +1 -1
- package/es/event/{pivot-chart → self-event-listener/pivot-chart}/axis-hover.js +1 -1
- package/es/event/self-event-listener/pivot-chart/axis-hover.js.map +1 -0
- package/es/event/self-event-listener/pivot-table/drill.d.ts +1 -0
- package/es/event/self-event-listener/pivot-table/drill.js +3 -0
- package/es/event/self-event-listener/pivot-table/drill.js.map +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js +5 -7
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/index.js +2 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +24 -14
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +5 -5
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/chartModules.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +3 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/radio-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +4 -2
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +8 -7
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js +5 -4
- package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +2 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +9 -8
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +5 -5
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +5 -1
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/select/update-position.js +2 -2
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.js +64 -16
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/customElement.d.ts +1 -0
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/events.d.ts +16 -1
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +1 -1
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
- package/cjs/event/list-table/checkbox.js.map +0 -1
- package/cjs/event/pivot-chart/axis-click.js.map +0 -1
- package/cjs/event/pivot-chart/axis-hover.js.map +0 -1
- package/es/event/list-table/checkbox.js.map +0 -1
- package/es/event/pivot-chart/axis-click.js.map +0 -1
- package/es/event/pivot-chart/axis-hover.js.map +0 -1
package/dist/vtable.js
CHANGED
|
@@ -29027,6 +29027,7 @@
|
|
|
29027
29027
|
AFTER_SORT: 'after_sort',
|
|
29028
29028
|
FREEZE_CLICK: 'freeze_click',
|
|
29029
29029
|
SCROLL: 'scroll',
|
|
29030
|
+
CAN_SCROLL: 'can_scroll',
|
|
29030
29031
|
SCROLL_HORIZONTAL_END: 'scroll_horizontal_end',
|
|
29031
29032
|
SCROLL_VERTICAL_END: 'scroll_vertical_end',
|
|
29032
29033
|
DROPDOWN_MENU_CLICK: 'dropdown_menu_click',
|
|
@@ -34510,32 +34511,34 @@
|
|
|
34510
34511
|
}
|
|
34511
34512
|
function getCellCornerRadius(col, row, table) {
|
|
34512
34513
|
const tableCornerRadius = table.theme.frameStyle.cornerRadius;
|
|
34513
|
-
if (
|
|
34514
|
-
if (
|
|
34515
|
-
|
|
34516
|
-
|
|
34517
|
-
|
|
34518
|
-
|
|
34519
|
-
|
|
34520
|
-
|
|
34521
|
-
|
|
34522
|
-
|
|
34523
|
-
|
|
34524
|
-
|
|
34525
|
-
|
|
34526
|
-
|
|
34527
|
-
else if (tableCornerRadius) {
|
|
34528
|
-
if (col === 0 && row === 0) {
|
|
34529
|
-
return [tableCornerRadius, 0, 0, 0];
|
|
34530
|
-
}
|
|
34531
|
-
else if (col === table.colCount - 1 && row === 0) {
|
|
34532
|
-
return [0, tableCornerRadius, 0, 0];
|
|
34533
|
-
}
|
|
34534
|
-
else if (col === 0 && row === table.rowCount - 1) {
|
|
34535
|
-
return [0, 0, 0, tableCornerRadius];
|
|
34514
|
+
if (table.theme.cellInnerBorder) {
|
|
34515
|
+
if (Array.isArray(tableCornerRadius)) {
|
|
34516
|
+
if (col === 0 && row === 0) {
|
|
34517
|
+
return [tableCornerRadius[0], 0, 0, 0];
|
|
34518
|
+
}
|
|
34519
|
+
else if (col === table.colCount - 1 && row === 0) {
|
|
34520
|
+
return [0, tableCornerRadius[1], 0, 0];
|
|
34521
|
+
}
|
|
34522
|
+
else if (col === 0 && row === table.rowCount - 1) {
|
|
34523
|
+
return [0, 0, 0, tableCornerRadius[3]];
|
|
34524
|
+
}
|
|
34525
|
+
else if (col === table.colCount - 1 && row === table.rowCount - 1) {
|
|
34526
|
+
return [0, 0, tableCornerRadius[2], 0];
|
|
34527
|
+
}
|
|
34536
34528
|
}
|
|
34537
|
-
else if (
|
|
34538
|
-
|
|
34529
|
+
else if (tableCornerRadius) {
|
|
34530
|
+
if (col === 0 && row === 0) {
|
|
34531
|
+
return [tableCornerRadius, 0, 0, 0];
|
|
34532
|
+
}
|
|
34533
|
+
else if (col === table.colCount - 1 && row === 0) {
|
|
34534
|
+
return [0, tableCornerRadius, 0, 0];
|
|
34535
|
+
}
|
|
34536
|
+
else if (col === 0 && row === table.rowCount - 1) {
|
|
34537
|
+
return [0, 0, 0, tableCornerRadius];
|
|
34538
|
+
}
|
|
34539
|
+
else if (col === table.colCount - 1 && row === table.rowCount - 1) {
|
|
34540
|
+
return [0, 0, tableCornerRadius, 0];
|
|
34541
|
+
}
|
|
34539
34542
|
}
|
|
34540
34543
|
}
|
|
34541
34544
|
return 0;
|
|
@@ -34831,6 +34834,14 @@
|
|
|
34831
34834
|
}
|
|
34832
34835
|
updateCustomCell(componentId, isHeaderCustomLayout) {
|
|
34833
34836
|
const table = this.table;
|
|
34837
|
+
if (table.widthMode === 'autoWidth') {
|
|
34838
|
+
table.scenegraph.recalculateColWidths();
|
|
34839
|
+
}
|
|
34840
|
+
if (table.isAutoRowHeight() ||
|
|
34841
|
+
(table.internalProps.defaultRowHeight === 'auto' && !isHeaderCustomLayout) ||
|
|
34842
|
+
(table.internalProps.defaultHeaderRowHeight === 'auto' && isHeaderCustomLayout)) {
|
|
34843
|
+
table.scenegraph.recalculateRowHeights();
|
|
34844
|
+
}
|
|
34834
34845
|
if (table.isPivotTable()) {
|
|
34835
34846
|
const ranges = getUpdateCustomCellRangeInPivotTable(componentId, table, isHeaderCustomLayout);
|
|
34836
34847
|
for (let i = 0; i < ranges.length; i++) {
|
|
@@ -34850,12 +34861,6 @@
|
|
|
34850
34861
|
}
|
|
34851
34862
|
}
|
|
34852
34863
|
}
|
|
34853
|
-
if (table.widthMode === 'autoWidth') {
|
|
34854
|
-
table.scenegraph.recalculateColWidths();
|
|
34855
|
-
}
|
|
34856
|
-
if (table.isAutoRowHeight()) {
|
|
34857
|
-
table.scenegraph.recalculateRowHeights();
|
|
34858
|
-
}
|
|
34859
34864
|
table.scenegraph.renderSceneGraph();
|
|
34860
34865
|
}
|
|
34861
34866
|
getCustomLayoutFunc(col, row) {
|
|
@@ -37626,6 +37631,9 @@
|
|
|
37626
37631
|
}
|
|
37627
37632
|
function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
37628
37633
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
|
|
37634
|
+
if (oldCellGroup.role !== 'cell' && !addNew) {
|
|
37635
|
+
return undefined;
|
|
37636
|
+
}
|
|
37629
37637
|
const cellLocation = table.getCellLocation(col, row);
|
|
37630
37638
|
let value = table.getCellValue(col, row);
|
|
37631
37639
|
let isMerge;
|
|
@@ -38372,7 +38380,8 @@
|
|
|
38372
38380
|
table.defaultHeaderColWidth;
|
|
38373
38381
|
const isDefaultHeaderHasAuto = table.defaultHeaderRowHeight === 'auto' ||
|
|
38374
38382
|
(isArray$7(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => item === 'auto'));
|
|
38375
|
-
const isAllRowsAuto = table.isAutoRowHeight() ||
|
|
38383
|
+
const isAllRowsAuto = table.isAutoRowHeight(rowStart) ||
|
|
38384
|
+
(table.heightMode === 'adaptive' && table.options.autoHeightInAdaptiveMode !== false);
|
|
38376
38385
|
const isDefaultRowHeightIsAuto = table.options.defaultRowHeight === 'auto';
|
|
38377
38386
|
if (isAllRowsAuto || isDefaultHeaderHasAuto || isDefaultRowHeightIsAuto) {
|
|
38378
38387
|
rowStart = rowStart ?? 0;
|
|
@@ -38414,7 +38423,7 @@
|
|
|
38414
38423
|
if (!(table.internalProps.transpose ||
|
|
38415
38424
|
(table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol)) &&
|
|
38416
38425
|
!table.options.customComputeRowHeight &&
|
|
38417
|
-
checkFixedStyleAndNoWrap(table)) {
|
|
38426
|
+
checkFixedStyleAndNoWrap(table, rowStart)) {
|
|
38418
38427
|
const height = computeRowHeight(table.columnHeaderLevelCount, 0, table.colCount - 1, table);
|
|
38419
38428
|
fillRowsHeight(height, table.columnHeaderLevelCount, table.rowCount - 1 - table.bottomFrozenRowCount, table, update ? newHeights : undefined);
|
|
38420
38429
|
for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {
|
|
@@ -38590,7 +38599,7 @@
|
|
|
38590
38599
|
}
|
|
38591
38600
|
}
|
|
38592
38601
|
function computeRowHeight(row, startCol, endCol, table) {
|
|
38593
|
-
const isAllRowsAuto = table.isAutoRowHeight() || (table.heightMode === 'adaptive' && table.options.autoHeightInAdaptiveMode !== false);
|
|
38602
|
+
const isAllRowsAuto = table.isAutoRowHeight(row) || (table.heightMode === 'adaptive' && table.options.autoHeightInAdaptiveMode !== false);
|
|
38594
38603
|
if (!isAllRowsAuto && table.getDefaultRowHeight(row) !== 'auto') {
|
|
38595
38604
|
return table.getDefaultRowHeight(row);
|
|
38596
38605
|
}
|
|
@@ -38660,11 +38669,11 @@
|
|
|
38660
38669
|
const defaultHeight = table.getDefaultRowHeight(row);
|
|
38661
38670
|
return isNumber$4(defaultHeight) ? defaultHeight : table.defaultRowHeight;
|
|
38662
38671
|
}
|
|
38663
|
-
function checkFixedStyleAndNoWrap(table) {
|
|
38672
|
+
function checkFixedStyleAndNoWrap(table, rowStart) {
|
|
38664
38673
|
const { layoutMap } = table.internalProps;
|
|
38665
38674
|
const row = table.columnHeaderLevelCount;
|
|
38666
38675
|
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) &&
|
|
38667
|
-
(table.isAutoRowHeight() || table.options.heightMode === 'adaptive')) {
|
|
38676
|
+
(table.isAutoRowHeight(rowStart) || table.options.heightMode === 'adaptive')) {
|
|
38668
38677
|
return false;
|
|
38669
38678
|
}
|
|
38670
38679
|
for (let col = 0; col < table.colCount; col++) {
|
|
@@ -38692,7 +38701,7 @@
|
|
|
38692
38701
|
function checkFixedStyleAndNoWrapForTranspose(table, row) {
|
|
38693
38702
|
const { layoutMap } = table.internalProps;
|
|
38694
38703
|
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) &&
|
|
38695
|
-
(table.isAutoRowHeight() || table.options.heightMode === 'adaptive')) {
|
|
38704
|
+
(table.isAutoRowHeight(row) || table.options.heightMode === 'adaptive')) {
|
|
38696
38705
|
return false;
|
|
38697
38706
|
}
|
|
38698
38707
|
const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);
|
|
@@ -38714,7 +38723,7 @@
|
|
|
38714
38723
|
}
|
|
38715
38724
|
function checkPivotFixedStyleAndNoWrap(table, row) {
|
|
38716
38725
|
const { layoutMap } = table.internalProps;
|
|
38717
|
-
if (table.internalProps.autoWrapText && (table.isAutoRowHeight() || table.options.heightMode === 'adaptive')) {
|
|
38726
|
+
if (table.internalProps.autoWrapText && (table.isAutoRowHeight(row) || table.options.heightMode === 'adaptive')) {
|
|
38718
38727
|
return false;
|
|
38719
38728
|
}
|
|
38720
38729
|
const headerDefine = layoutMap.getHeader(table.rowHeaderLevelCount, row);
|
|
@@ -38771,7 +38780,8 @@
|
|
|
38771
38780
|
rect: getCellRect$1(col, row, table),
|
|
38772
38781
|
table,
|
|
38773
38782
|
originCol: col,
|
|
38774
|
-
originRow: row
|
|
38783
|
+
originRow: row,
|
|
38784
|
+
forComputation: true
|
|
38775
38785
|
};
|
|
38776
38786
|
if (customLayout === 'react-custom-layout') {
|
|
38777
38787
|
customLayout = table.reactCustomLayout?.getCustomLayoutFunc(col, row) || emptyCustomLayout;
|
|
@@ -43343,7 +43353,8 @@
|
|
|
43343
43353
|
rect: getCellRect(col, row, table),
|
|
43344
43354
|
table,
|
|
43345
43355
|
originCol: col,
|
|
43346
|
-
originRow: row
|
|
43356
|
+
originRow: row,
|
|
43357
|
+
forComputation: true
|
|
43347
43358
|
};
|
|
43348
43359
|
if (customLayout === 'react-custom-layout') {
|
|
43349
43360
|
customLayout = table.reactCustomLayout?.getCustomLayoutFunc(col, row) || emptyCustomLayout;
|
|
@@ -43887,7 +43898,8 @@
|
|
|
43887
43898
|
let distColForCompute;
|
|
43888
43899
|
let distRowForCompute;
|
|
43889
43900
|
if (table.widthMode === 'adaptive' ||
|
|
43890
|
-
(table.options.autoWrapText &&
|
|
43901
|
+
(table.options.autoWrapText &&
|
|
43902
|
+
(table.heightMode === 'adaptive' || table.isAutoRowHeight(table.columnHeaderLevelCount)))) {
|
|
43891
43903
|
distColForCompute = table.colCount - 1;
|
|
43892
43904
|
distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);
|
|
43893
43905
|
}
|
|
@@ -44439,7 +44451,7 @@
|
|
|
44439
44451
|
const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;
|
|
44440
44452
|
let syncTopRow;
|
|
44441
44453
|
let syncBottomRow;
|
|
44442
|
-
if (proxy.table.isAutoRowHeight()) {
|
|
44454
|
+
if (proxy.table.isAutoRowHeight(startRow)) {
|
|
44443
44455
|
syncTopRow = distStartRow;
|
|
44444
44456
|
syncBottomRow = distEndRow;
|
|
44445
44457
|
}
|
|
@@ -44454,7 +44466,7 @@
|
|
|
44454
44466
|
proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;
|
|
44455
44467
|
proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;
|
|
44456
44468
|
const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, true);
|
|
44457
|
-
if (proxy.table.isAutoRowHeight()) {
|
|
44469
|
+
if (proxy.table.isAutoRowHeight(startRow)) {
|
|
44458
44470
|
updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up', true);
|
|
44459
44471
|
updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up', true);
|
|
44460
44472
|
updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up', true);
|
|
@@ -44462,7 +44474,7 @@
|
|
|
44462
44474
|
proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;
|
|
44463
44475
|
proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1));
|
|
44464
44476
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
|
|
44465
|
-
if (proxy.table.isAutoRowHeight() && sync) {
|
|
44477
|
+
if (proxy.table.isAutoRowHeight(startRow) && sync) {
|
|
44466
44478
|
proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, proxy.rowEnd + 1);
|
|
44467
44479
|
}
|
|
44468
44480
|
else {
|
|
@@ -44478,7 +44490,7 @@
|
|
|
44478
44490
|
const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
|
|
44479
44491
|
let syncTopRow;
|
|
44480
44492
|
let syncBottomRow;
|
|
44481
|
-
if (proxy.table.isAutoRowHeight()) {
|
|
44493
|
+
if (proxy.table.isAutoRowHeight(distStartRow)) {
|
|
44482
44494
|
syncTopRow = distStartRow;
|
|
44483
44495
|
syncBottomRow = distEndRow;
|
|
44484
44496
|
}
|
|
@@ -44491,7 +44503,7 @@
|
|
|
44491
44503
|
proxy.rowStart = distStartRow;
|
|
44492
44504
|
proxy.rowEnd = distEndRow;
|
|
44493
44505
|
const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, true);
|
|
44494
|
-
if (proxy.table.isAutoRowHeight()) {
|
|
44506
|
+
if (proxy.table.isAutoRowHeight(distStartRow)) {
|
|
44495
44507
|
updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
44496
44508
|
updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
44497
44509
|
updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
@@ -44499,7 +44511,7 @@
|
|
|
44499
44511
|
proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;
|
|
44500
44512
|
proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1));
|
|
44501
44513
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
|
|
44502
|
-
if (proxy.table.isAutoRowHeight() && sync) {
|
|
44514
|
+
if (proxy.table.isAutoRowHeight(distStartRow) && sync) {
|
|
44503
44515
|
proxy.rowUpdatePos = proxy.rowEnd + 1;
|
|
44504
44516
|
}
|
|
44505
44517
|
else {
|
|
@@ -44644,7 +44656,7 @@
|
|
|
44644
44656
|
});
|
|
44645
44657
|
let syncTopRow;
|
|
44646
44658
|
let syncBottomRow;
|
|
44647
|
-
if (proxy.table.isAutoRowHeight()) {
|
|
44659
|
+
if (proxy.table.isAutoRowHeight(proxy.rowStart)) {
|
|
44648
44660
|
syncTopRow = proxy.rowStart;
|
|
44649
44661
|
syncBottomRow = proxy.rowEnd;
|
|
44650
44662
|
}
|
|
@@ -44658,7 +44670,7 @@
|
|
|
44658
44670
|
if (oldBodyHeight !== newBodyHeight) {
|
|
44659
44671
|
proxy.table.scenegraph.updateContainerHeight(proxy.table.frozenRowCount, newBodyHeight - oldBodyHeight);
|
|
44660
44672
|
}
|
|
44661
|
-
for (let col = 0; col < proxy.table.frozenColCount ?? 0; col++) {
|
|
44673
|
+
for (let col = 0; col < (proxy.table.frozenColCount ?? 0); col++) {
|
|
44662
44674
|
const columnGroup = proxy.table.scenegraph.getColGroup(col);
|
|
44663
44675
|
columnGroup?.setAttribute('chartInstance', undefined);
|
|
44664
44676
|
for (let row = proxy.rowStart; row <= proxy.rowEnd; row++) {
|
|
@@ -44686,13 +44698,13 @@
|
|
|
44686
44698
|
}
|
|
44687
44699
|
}
|
|
44688
44700
|
updateRowContent(syncTopRow, syncBottomRow, proxy);
|
|
44689
|
-
if (proxy.table.isAutoRowHeight()) {
|
|
44701
|
+
if (proxy.table.isAutoRowHeight(syncTopRow)) {
|
|
44690
44702
|
updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
44691
44703
|
}
|
|
44692
44704
|
proxy.rowUpdatePos = proxy.rowStart;
|
|
44693
44705
|
proxy.rowUpdateDirection = proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';
|
|
44694
44706
|
proxy.table.scenegraph.updateNextFrame();
|
|
44695
|
-
if (!proxy.table.isAutoRowHeight()) {
|
|
44707
|
+
if (!proxy.table.isAutoRowHeight(proxy.rowStart)) {
|
|
44696
44708
|
await proxy.progress();
|
|
44697
44709
|
}
|
|
44698
44710
|
}
|
|
@@ -45051,7 +45063,7 @@
|
|
|
45051
45063
|
this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));
|
|
45052
45064
|
this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));
|
|
45053
45065
|
}
|
|
45054
|
-
else if (this.table.isAutoRowHeight()) {
|
|
45066
|
+
else if (this.table.isAutoRowHeight(table.columnHeaderLevelCount)) {
|
|
45055
45067
|
this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));
|
|
45056
45068
|
}
|
|
45057
45069
|
else if (this.table.widthMode === 'autoWidth') {
|
|
@@ -45070,6 +45082,9 @@
|
|
|
45070
45082
|
if (this.table.options.maintainedDataCount) {
|
|
45071
45083
|
this.rowLimit = this.table.options.maintainedDataCount;
|
|
45072
45084
|
}
|
|
45085
|
+
if (this.table.options.maintainedColumnCount) {
|
|
45086
|
+
this.colLimit = this.table.options.maintainedColumnCount;
|
|
45087
|
+
}
|
|
45073
45088
|
}
|
|
45074
45089
|
get bodyLeftCol() {
|
|
45075
45090
|
return this.table.frozenColCount;
|
|
@@ -45339,11 +45354,11 @@
|
|
|
45339
45354
|
}
|
|
45340
45355
|
updateCellGroups(count) {
|
|
45341
45356
|
const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
|
|
45342
|
-
if (this.table.isAutoRowHeight()) {
|
|
45357
|
+
if (this.table.isAutoRowHeight(this.rowUpdatePos)) {
|
|
45343
45358
|
computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);
|
|
45344
45359
|
}
|
|
45345
45360
|
updateRowContent(this.rowUpdatePos, distRow, this);
|
|
45346
|
-
if (this.table.isAutoRowHeight()) {
|
|
45361
|
+
if (this.table.isAutoRowHeight(this.rowUpdatePos)) {
|
|
45347
45362
|
updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, true);
|
|
45348
45363
|
updateAutoRow(0, this.table.frozenColCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, true);
|
|
45349
45364
|
updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, true);
|
|
@@ -45353,11 +45368,11 @@
|
|
|
45353
45368
|
updateBottomFrozenCellGroups() {
|
|
45354
45369
|
const startRow = this.table.rowCount - this.table.bottomFrozenRowCount;
|
|
45355
45370
|
const endRow = this.table.rowCount - 1;
|
|
45356
|
-
if (this.table.isAutoRowHeight()) {
|
|
45371
|
+
if (this.table.isAutoRowHeight(startRow)) {
|
|
45357
45372
|
computeRowsHeight(this.table, startRow, endRow, false);
|
|
45358
45373
|
}
|
|
45359
45374
|
updateRowContent(startRow, endRow, this);
|
|
45360
|
-
if (this.table.isAutoRowHeight()) {
|
|
45375
|
+
if (this.table.isAutoRowHeight(startRow)) {
|
|
45361
45376
|
updateAutoRow(this.bodyLeftCol, this.bodyRightCol, startRow, endRow, this.table, this.rowUpdateDirection);
|
|
45362
45377
|
updateAutoRow(0, this.table.frozenColCount - 1, startRow, endRow, this.table, this.rowUpdateDirection);
|
|
45363
45378
|
updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, startRow, endRow, this.table, this.rowUpdateDirection);
|
|
@@ -45370,7 +45385,7 @@
|
|
|
45370
45385
|
computeColsWidth(this.table, startCol, endCol, false);
|
|
45371
45386
|
}
|
|
45372
45387
|
updateColContent(startCol, endCol, this);
|
|
45373
|
-
if (this.table.isAutoRowHeight()) {
|
|
45388
|
+
if (this.table.isAutoRowHeight(this.rowStart)) {
|
|
45374
45389
|
updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);
|
|
45375
45390
|
}
|
|
45376
45391
|
}
|
|
@@ -45940,7 +45955,25 @@
|
|
|
45940
45955
|
extendSelectRange();
|
|
45941
45956
|
}
|
|
45942
45957
|
};
|
|
45943
|
-
|
|
45958
|
+
if (ifExtendSelectRange) {
|
|
45959
|
+
extendSelectRange();
|
|
45960
|
+
if (selectRange.start.col > selectRange.end.col) {
|
|
45961
|
+
selectRange.start.col = Math.max(startCol, endCol);
|
|
45962
|
+
selectRange.end.col = Math.min(startCol, endCol);
|
|
45963
|
+
}
|
|
45964
|
+
else {
|
|
45965
|
+
selectRange.start.col = Math.min(startCol, endCol);
|
|
45966
|
+
selectRange.end.col = Math.max(startCol, endCol);
|
|
45967
|
+
}
|
|
45968
|
+
if (selectRange.start.row > selectRange.end.row) {
|
|
45969
|
+
selectRange.start.row = Math.max(startRow, endRow);
|
|
45970
|
+
selectRange.end.row = Math.min(startRow, endRow);
|
|
45971
|
+
}
|
|
45972
|
+
else {
|
|
45973
|
+
selectRange.start.row = Math.min(startRow, endRow);
|
|
45974
|
+
selectRange.end.row = Math.max(startRow, endRow);
|
|
45975
|
+
}
|
|
45976
|
+
}
|
|
45944
45977
|
scene.selectingRangeComponents.forEach((selectComp, key) => {
|
|
45945
45978
|
selectComp.rect.delete();
|
|
45946
45979
|
selectComp.fillhandle?.delete();
|
|
@@ -46359,7 +46392,7 @@
|
|
|
46359
46392
|
const minRow = Math.min(...addRows);
|
|
46360
46393
|
scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
|
|
46361
46394
|
}
|
|
46362
|
-
scene.proxy.rowUpdateDirection = '
|
|
46395
|
+
scene.proxy.rowUpdateDirection = 'up';
|
|
46363
46396
|
scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);
|
|
46364
46397
|
updateBottomFrozeCellGroups();
|
|
46365
46398
|
}
|
|
@@ -46647,11 +46680,11 @@
|
|
|
46647
46680
|
addNeedUpdateTag({
|
|
46648
46681
|
start: {
|
|
46649
46682
|
row: beforeCell.mergeStartRow,
|
|
46650
|
-
col: scene.table.isAutoRowHeight() ? 0 : beforeCell.mergeStartCol
|
|
46683
|
+
col: scene.table.isAutoRowHeight(afterRow) ? 0 : beforeCell.mergeStartCol
|
|
46651
46684
|
},
|
|
46652
46685
|
end: {
|
|
46653
46686
|
row: beforeCell.mergeEndRow,
|
|
46654
|
-
col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : beforeCell.mergeEndCol
|
|
46687
|
+
col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : beforeCell.mergeEndCol
|
|
46655
46688
|
}
|
|
46656
46689
|
}, scene);
|
|
46657
46690
|
row = beforeCell.mergeStartRow;
|
|
@@ -46661,11 +46694,11 @@
|
|
|
46661
46694
|
addNeedUpdateTag({
|
|
46662
46695
|
start: {
|
|
46663
46696
|
row: afterCell.mergeStartRow,
|
|
46664
|
-
col: scene.table.isAutoRowHeight() ? 0 : afterCell.mergeStartCol
|
|
46697
|
+
col: scene.table.isAutoRowHeight(afterRow) ? 0 : afterCell.mergeStartCol
|
|
46665
46698
|
},
|
|
46666
46699
|
end: {
|
|
46667
46700
|
row: afterCell.mergeEndRow,
|
|
46668
|
-
col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : afterCell.mergeEndCol
|
|
46701
|
+
col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : afterCell.mergeEndCol
|
|
46669
46702
|
}
|
|
46670
46703
|
}, scene);
|
|
46671
46704
|
row = afterCell.mergeStartRow;
|
|
@@ -49772,7 +49805,7 @@
|
|
|
49772
49805
|
(this.table.autoFillHeight && (this.table.getAllRowsHeight() <= this.table.tableNoFrameHeight || isNotFillHeight))) {
|
|
49773
49806
|
this.table.scenegraph.recalculateRowHeights();
|
|
49774
49807
|
}
|
|
49775
|
-
else if (this.table.isAutoRowHeight()) {
|
|
49808
|
+
else if (this.table.isAutoRowHeight(this.table.columnHeaderLevelCount)) {
|
|
49776
49809
|
for (let i = 0; i < updateRows.length; i++) {
|
|
49777
49810
|
const row = updateRows[i];
|
|
49778
49811
|
const oldHeight = this.table.getRowHeight(row);
|
|
@@ -50391,7 +50424,13 @@
|
|
|
50391
50424
|
cellPos.col = col;
|
|
50392
50425
|
cellPos.row = row;
|
|
50393
50426
|
const currentRange = state.select.ranges?.[state.select.ranges.length - 1];
|
|
50394
|
-
|
|
50427
|
+
if (currentRange &&
|
|
50428
|
+
currentRange.start.row <= table.rowCount - 1 &&
|
|
50429
|
+
currentRange.end.row <= table.rowCount - 1 &&
|
|
50430
|
+
currentRange.start.col <= table.colCount - 1 &&
|
|
50431
|
+
currentRange.end.col <= table.colCount - 1) {
|
|
50432
|
+
scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
|
|
50433
|
+
}
|
|
50395
50434
|
}
|
|
50396
50435
|
}
|
|
50397
50436
|
else if ((interactionState === InteractionState.grabing || table.eventManager.isDraging) &&
|
|
@@ -50528,7 +50567,13 @@
|
|
|
50528
50567
|
}
|
|
50529
50568
|
}
|
|
50530
50569
|
}
|
|
50531
|
-
|
|
50570
|
+
if (currentRange &&
|
|
50571
|
+
currentRange.start.row <= table.rowCount - 1 &&
|
|
50572
|
+
currentRange.end.row <= table.rowCount - 1 &&
|
|
50573
|
+
currentRange.start.col <= table.colCount - 1 &&
|
|
50574
|
+
currentRange.end.col <= table.colCount - 1) {
|
|
50575
|
+
scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
|
|
50576
|
+
}
|
|
50532
50577
|
}
|
|
50533
50578
|
}
|
|
50534
50579
|
scenegraph.updateNextFrame();
|
|
@@ -52130,6 +52175,18 @@
|
|
|
52130
52175
|
if (row !== -1 && row !== -1) {
|
|
52131
52176
|
this.select.selecting = true;
|
|
52132
52177
|
}
|
|
52178
|
+
if (col < 0) {
|
|
52179
|
+
col = -1;
|
|
52180
|
+
}
|
|
52181
|
+
if (row < 0) {
|
|
52182
|
+
row = -1;
|
|
52183
|
+
}
|
|
52184
|
+
if (col > this.table.colCount - 1) {
|
|
52185
|
+
col = this.table.colCount - 1;
|
|
52186
|
+
}
|
|
52187
|
+
if (row > this.table.rowCount - 1) {
|
|
52188
|
+
row = this.table.rowCount - 1;
|
|
52189
|
+
}
|
|
52133
52190
|
updateSelectPosition(this, col, row, isShift, isCtrl, isSelectAll, makeSelectCellVisible, skipBodyMerge);
|
|
52134
52191
|
}
|
|
52135
52192
|
checkCellRangeInSelect(cellPosStart, cellPosEnd) {
|
|
@@ -52411,7 +52468,7 @@
|
|
|
52411
52468
|
verticalBarPos = 0;
|
|
52412
52469
|
}
|
|
52413
52470
|
const dy = verticalBarPos - this.table.scenegraph.proxy.deltaY - oldVerticalBarPos;
|
|
52414
|
-
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.
|
|
52471
|
+
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
|
|
52415
52472
|
event: undefined,
|
|
52416
52473
|
scrollTop: verticalBarPos - this.table.scenegraph.proxy.deltaY,
|
|
52417
52474
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -52433,6 +52490,18 @@
|
|
|
52433
52490
|
this.scroll.verticalBarPos -= this.table.scenegraph.proxy.deltaY;
|
|
52434
52491
|
this.table.scenegraph.proxy.deltaY = 0;
|
|
52435
52492
|
this.updateHoverPos(-1, -1);
|
|
52493
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
52494
|
+
event: undefined,
|
|
52495
|
+
scrollTop: this.scroll.verticalBarPos,
|
|
52496
|
+
scrollLeft: this.scroll.horizontalBarPos,
|
|
52497
|
+
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
52498
|
+
scrollWidth: this.table.theme.scrollStyle?.width,
|
|
52499
|
+
viewHeight: this.table.tableNoFrameHeight,
|
|
52500
|
+
viewWidth: this.table.tableNoFrameWidth,
|
|
52501
|
+
scrollDirection: 'vertical',
|
|
52502
|
+
scrollRatioY: yRatio,
|
|
52503
|
+
dy
|
|
52504
|
+
});
|
|
52436
52505
|
if (oldVerticalBarPos !== this.scroll.verticalBarPos) {
|
|
52437
52506
|
this.checkVerticalScrollBarEnd();
|
|
52438
52507
|
}
|
|
@@ -52445,7 +52514,7 @@
|
|
|
52445
52514
|
horizontalBarPos = 0;
|
|
52446
52515
|
}
|
|
52447
52516
|
const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
|
|
52448
|
-
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.
|
|
52517
|
+
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
|
|
52449
52518
|
event: undefined,
|
|
52450
52519
|
scrollTop: this.scroll.verticalBarPos,
|
|
52451
52520
|
scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
|
|
@@ -52467,6 +52536,18 @@
|
|
|
52467
52536
|
this.scroll.horizontalBarPos -= this.table.scenegraph.proxy.deltaX;
|
|
52468
52537
|
this.table.scenegraph.proxy.deltaX = 0;
|
|
52469
52538
|
this.updateHoverPos(-1, -1);
|
|
52539
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
52540
|
+
event: undefined,
|
|
52541
|
+
scrollTop: this.scroll.verticalBarPos,
|
|
52542
|
+
scrollLeft: this.scroll.horizontalBarPos,
|
|
52543
|
+
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
52544
|
+
scrollWidth: this.table.theme.scrollStyle?.width,
|
|
52545
|
+
viewHeight: this.table.tableNoFrameHeight,
|
|
52546
|
+
viewWidth: this.table.tableNoFrameWidth,
|
|
52547
|
+
scrollDirection: 'horizontal',
|
|
52548
|
+
scrollRatioX: xRatio,
|
|
52549
|
+
dx: dx
|
|
52550
|
+
});
|
|
52470
52551
|
if (oldHorizontalBarPos !== this.scroll.horizontalBarPos) {
|
|
52471
52552
|
this.checkHorizontalScrollBarEnd();
|
|
52472
52553
|
}
|
|
@@ -52485,7 +52566,7 @@
|
|
|
52485
52566
|
verticalBarPos = 0;
|
|
52486
52567
|
}
|
|
52487
52568
|
const dy = verticalBarPos - oldVerticalBarPos;
|
|
52488
|
-
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.
|
|
52569
|
+
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
|
|
52489
52570
|
event: event?.nativeEvent,
|
|
52490
52571
|
scrollTop: verticalBarPos,
|
|
52491
52572
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -52512,6 +52593,19 @@
|
|
|
52512
52593
|
}
|
|
52513
52594
|
this.table.scenegraph.setY(-top);
|
|
52514
52595
|
this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
|
|
52596
|
+
const dy = this.scroll.verticalBarPos - oldVerticalBarPos;
|
|
52597
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
52598
|
+
event: event?.nativeEvent,
|
|
52599
|
+
scrollTop: this.scroll.verticalBarPos,
|
|
52600
|
+
scrollLeft: this.scroll.horizontalBarPos,
|
|
52601
|
+
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
52602
|
+
scrollWidth: this.table.theme.scrollStyle?.width,
|
|
52603
|
+
viewHeight: this.table.tableNoFrameHeight,
|
|
52604
|
+
viewWidth: this.table.tableNoFrameWidth,
|
|
52605
|
+
scrollDirection: 'vertical',
|
|
52606
|
+
scrollRatioY: yRatio,
|
|
52607
|
+
dy
|
|
52608
|
+
});
|
|
52515
52609
|
if (oldVerticalBarPos !== top && triggerEvent) {
|
|
52516
52610
|
this.checkVerticalScrollBarEnd();
|
|
52517
52611
|
}
|
|
@@ -52532,7 +52626,7 @@
|
|
|
52532
52626
|
horizontalBarPos = 0;
|
|
52533
52627
|
}
|
|
52534
52628
|
const dx = horizontalBarPos - oldHorizontalBarPos;
|
|
52535
|
-
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.
|
|
52629
|
+
const canScroll = this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
|
|
52536
52630
|
event: event?.nativeEvent,
|
|
52537
52631
|
scrollTop: this.scroll.verticalBarPos,
|
|
52538
52632
|
scrollLeft: horizontalBarPos,
|
|
@@ -52559,6 +52653,19 @@
|
|
|
52559
52653
|
}
|
|
52560
52654
|
this.table.scenegraph.setX(-left);
|
|
52561
52655
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
52656
|
+
const dx = this.scroll.horizontalBarPos - oldHorizontalBarPos;
|
|
52657
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
52658
|
+
event: event?.nativeEvent,
|
|
52659
|
+
scrollTop: this.scroll.verticalBarPos,
|
|
52660
|
+
scrollLeft: this.scroll.horizontalBarPos,
|
|
52661
|
+
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
52662
|
+
scrollWidth: this.table.theme.scrollStyle?.width,
|
|
52663
|
+
viewHeight: this.table.tableNoFrameHeight,
|
|
52664
|
+
viewWidth: this.table.tableNoFrameWidth,
|
|
52665
|
+
scrollDirection: 'horizontal',
|
|
52666
|
+
scrollRatioX: xRatio,
|
|
52667
|
+
dx
|
|
52668
|
+
});
|
|
52562
52669
|
if (oldHorizontalBarPos !== left && triggerEvent) {
|
|
52563
52670
|
this.checkHorizontalScrollBarEnd();
|
|
52564
52671
|
}
|
|
@@ -53559,6 +53666,9 @@
|
|
|
53559
53666
|
table.eventManager.isDown = true;
|
|
53560
53667
|
table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
53561
53668
|
table.eventManager.LastPointerXY = { x: e.x, y: e.y };
|
|
53669
|
+
if (e.button !== 0) {
|
|
53670
|
+
return;
|
|
53671
|
+
}
|
|
53562
53672
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
53563
53673
|
eventManager.downIcon = undefined;
|
|
53564
53674
|
if (stateManager.interactionState !== InteractionState.default) {
|
|
@@ -54593,6 +54703,9 @@
|
|
|
54593
54703
|
if (table.eventOptions?.preventDefaultContextMenu !== false) {
|
|
54594
54704
|
e.preventDefault();
|
|
54595
54705
|
}
|
|
54706
|
+
else {
|
|
54707
|
+
globalPointerupCallback(e);
|
|
54708
|
+
}
|
|
54596
54709
|
});
|
|
54597
54710
|
if (!table.options.canvas) {
|
|
54598
54711
|
handler.on(table.getContainer(), 'resize', e => {
|
|
@@ -55336,6 +55449,91 @@
|
|
|
55336
55449
|
});
|
|
55337
55450
|
}
|
|
55338
55451
|
|
|
55452
|
+
function bindIconClickEvent(table) {
|
|
55453
|
+
table.on(TABLE_EVENT_TYPE.ICON_CLICK, iconInfo => {
|
|
55454
|
+
const { col, row, x, y, funcType, icon, event } = iconInfo;
|
|
55455
|
+
const { stateManager } = table;
|
|
55456
|
+
if (funcType === IconFuncTypeEnum.dropDown) {
|
|
55457
|
+
stateManager.triggerDropDownMenu(col, row, x, y, event);
|
|
55458
|
+
}
|
|
55459
|
+
else if (funcType === IconFuncTypeEnum.sort) {
|
|
55460
|
+
stateManager.triggerSort(col, row, icon, event);
|
|
55461
|
+
}
|
|
55462
|
+
else if (funcType === IconFuncTypeEnum.frozen) {
|
|
55463
|
+
stateManager.triggerFreeze(col, row, icon);
|
|
55464
|
+
}
|
|
55465
|
+
else if (funcType === IconFuncTypeEnum.drillDown) {
|
|
55466
|
+
drillClick(table);
|
|
55467
|
+
}
|
|
55468
|
+
else if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
|
|
55469
|
+
const isHasSelected = !!stateManager.select.ranges?.length;
|
|
55470
|
+
stateManager.updateSelectPos(-1, -1);
|
|
55471
|
+
stateManager.endSelectCells(true, isHasSelected);
|
|
55472
|
+
table.toggleHierarchyState(col, row);
|
|
55473
|
+
}
|
|
55474
|
+
});
|
|
55475
|
+
}
|
|
55476
|
+
|
|
55477
|
+
function bindDropdownMenuClickEvent(table) {
|
|
55478
|
+
table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
|
|
55479
|
+
table.stateManager.hideMenu();
|
|
55480
|
+
});
|
|
55481
|
+
}
|
|
55482
|
+
|
|
55483
|
+
function bindDBClickAutoColumnWidthEvent(table) {
|
|
55484
|
+
table.on(TABLE_EVENT_TYPE.DBLCLICK_CELL, (e) => {
|
|
55485
|
+
if (e.federatedEvent) {
|
|
55486
|
+
const eventArgsSet = getCellEventArgsSet(e.federatedEvent);
|
|
55487
|
+
const resizeCol = table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.targetCell);
|
|
55488
|
+
const disableDblclickAutoResizeColWidth = table.options.disableDblclickAutoResizeColWidth ?? table.options.resize?.disableDblclickAutoResizeColWidth;
|
|
55489
|
+
if (table.eventManager.checkCellFillhandle(eventArgsSet)) {
|
|
55490
|
+
table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_FILL_HANDLE, {});
|
|
55491
|
+
}
|
|
55492
|
+
else if (table._canResizeColumn(resizeCol.col, resizeCol.row) &&
|
|
55493
|
+
resizeCol.col >= 0 &&
|
|
55494
|
+
!disableDblclickAutoResizeColWidth) {
|
|
55495
|
+
table.scenegraph.updateAutoColWidth(resizeCol.col);
|
|
55496
|
+
table.internalProps._widthResizedColMap.add(resizeCol.col);
|
|
55497
|
+
table.scenegraph.updateChartSizeForResizeColWidth(resizeCol.col);
|
|
55498
|
+
const state = table.stateManager;
|
|
55499
|
+
if (state.columnResize.col < state.table.frozenColCount &&
|
|
55500
|
+
!state.table.isPivotTable() &&
|
|
55501
|
+
!state.table.transpose) {
|
|
55502
|
+
state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen);
|
|
55503
|
+
}
|
|
55504
|
+
const colWidths = [];
|
|
55505
|
+
for (let col = 0; col < table.colCount; col++) {
|
|
55506
|
+
colWidths.push(table.getColWidth(col));
|
|
55507
|
+
}
|
|
55508
|
+
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, {
|
|
55509
|
+
col: resizeCol.col,
|
|
55510
|
+
colWidths
|
|
55511
|
+
});
|
|
55512
|
+
}
|
|
55513
|
+
}
|
|
55514
|
+
});
|
|
55515
|
+
}
|
|
55516
|
+
|
|
55517
|
+
function rightButtonClickEvent(table) {
|
|
55518
|
+
table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, e => {
|
|
55519
|
+
const { col, row } = e;
|
|
55520
|
+
const ranges = table.getSelectedCellRanges();
|
|
55521
|
+
let cellInRange = false;
|
|
55522
|
+
if (ranges.length > 0) {
|
|
55523
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
55524
|
+
const range = ranges[i];
|
|
55525
|
+
if (col >= range.start.col && col <= range.end.col && row >= range.start.row && row <= range.end.row) {
|
|
55526
|
+
cellInRange = true;
|
|
55527
|
+
break;
|
|
55528
|
+
}
|
|
55529
|
+
}
|
|
55530
|
+
}
|
|
55531
|
+
if (!cellInRange) {
|
|
55532
|
+
table.selectCell(col, row);
|
|
55533
|
+
}
|
|
55534
|
+
});
|
|
55535
|
+
}
|
|
55536
|
+
|
|
55339
55537
|
class EventManager {
|
|
55340
55538
|
table;
|
|
55341
55539
|
isTouchdown;
|
|
@@ -55404,65 +55602,11 @@
|
|
|
55404
55602
|
if (this.table.isReleased) {
|
|
55405
55603
|
return;
|
|
55406
55604
|
}
|
|
55407
|
-
|
|
55408
|
-
this.table
|
|
55409
|
-
const { col, row, x, y, funcType, icon, event } = iconInfo;
|
|
55410
|
-
if (funcType === IconFuncTypeEnum.dropDown) {
|
|
55411
|
-
stateManager.triggerDropDownMenu(col, row, x, y, event);
|
|
55412
|
-
}
|
|
55413
|
-
else if (funcType === IconFuncTypeEnum.sort) {
|
|
55414
|
-
stateManager.triggerSort(col, row, icon, event);
|
|
55415
|
-
}
|
|
55416
|
-
else if (funcType === IconFuncTypeEnum.frozen) {
|
|
55417
|
-
stateManager.triggerFreeze(col, row, icon);
|
|
55418
|
-
}
|
|
55419
|
-
else if (funcType === IconFuncTypeEnum.drillDown) {
|
|
55420
|
-
drillClick(this.table);
|
|
55421
|
-
}
|
|
55422
|
-
else if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
|
|
55423
|
-
const isHasSelected = !!stateManager.select.ranges?.length;
|
|
55424
|
-
stateManager.updateSelectPos(-1, -1);
|
|
55425
|
-
stateManager.endSelectCells(true, isHasSelected);
|
|
55426
|
-
this.table.toggleHierarchyState(col, row);
|
|
55427
|
-
}
|
|
55428
|
-
});
|
|
55429
|
-
this.table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
|
|
55430
|
-
stateManager.hideMenu();
|
|
55431
|
-
});
|
|
55605
|
+
bindIconClickEvent(this.table);
|
|
55606
|
+
bindDropdownMenuClickEvent(this.table);
|
|
55432
55607
|
this.updateEventBinder();
|
|
55433
55608
|
bindMediaClick(this.table);
|
|
55434
|
-
this.table
|
|
55435
|
-
if (e.federatedEvent) {
|
|
55436
|
-
const eventArgsSet = getCellEventArgsSet(e.federatedEvent);
|
|
55437
|
-
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.targetCell);
|
|
55438
|
-
const disableDblclickAutoResizeColWidth = this.table.options.disableDblclickAutoResizeColWidth ??
|
|
55439
|
-
this.table.options.resize?.disableDblclickAutoResizeColWidth;
|
|
55440
|
-
if (this.table.eventManager.checkCellFillhandle(eventArgsSet)) {
|
|
55441
|
-
this.table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_FILL_HANDLE, {});
|
|
55442
|
-
}
|
|
55443
|
-
else if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) &&
|
|
55444
|
-
resizeCol.col >= 0 &&
|
|
55445
|
-
!disableDblclickAutoResizeColWidth) {
|
|
55446
|
-
this.table.scenegraph.updateAutoColWidth(resizeCol.col);
|
|
55447
|
-
this.table.internalProps._widthResizedColMap.add(resizeCol.col);
|
|
55448
|
-
this.table.scenegraph.updateChartSizeForResizeColWidth(resizeCol.col);
|
|
55449
|
-
const state = this.table.stateManager;
|
|
55450
|
-
if (state.columnResize.col < state.table.frozenColCount &&
|
|
55451
|
-
!state.table.isPivotTable() &&
|
|
55452
|
-
!state.table.transpose) {
|
|
55453
|
-
state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen);
|
|
55454
|
-
}
|
|
55455
|
-
const colWidths = [];
|
|
55456
|
-
for (let col = 0; col < this.table.colCount; col++) {
|
|
55457
|
-
colWidths.push(this.table.getColWidth(col));
|
|
55458
|
-
}
|
|
55459
|
-
this.table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, {
|
|
55460
|
-
col: resizeCol.col,
|
|
55461
|
-
colWidths
|
|
55462
|
-
});
|
|
55463
|
-
}
|
|
55464
|
-
}
|
|
55465
|
-
});
|
|
55609
|
+
bindDBClickAutoColumnWidthEvent(this.table);
|
|
55466
55610
|
if (this.table.isPivotTable() && checkHaveDrill(this.table)) {
|
|
55467
55611
|
bindDrillEvent(this.table);
|
|
55468
55612
|
}
|
|
@@ -55471,6 +55615,7 @@
|
|
|
55471
55615
|
bindAxisHoverEvent(this.table);
|
|
55472
55616
|
bindGroupTitleCheckboxChange(this.table);
|
|
55473
55617
|
bindButtonClickEvent(this.table);
|
|
55618
|
+
rightButtonClickEvent(this.table);
|
|
55474
55619
|
}
|
|
55475
55620
|
dealTableHover(eventArgsSet) {
|
|
55476
55621
|
if (!eventArgsSet) {
|
|
@@ -59726,18 +59871,15 @@
|
|
|
59726
59871
|
range.min = Math.min(range.min, 0);
|
|
59727
59872
|
range.max = Math.max(range.max, 0);
|
|
59728
59873
|
}
|
|
59729
|
-
|
|
59730
|
-
|
|
59731
|
-
|
|
59732
|
-
|
|
59733
|
-
|
|
59734
|
-
|
|
59735
|
-
|
|
59736
|
-
range.min = axisRange[0];
|
|
59737
|
-
range.max = axisRange[1];
|
|
59738
|
-
}
|
|
59739
|
-
ticks = selfTicks;
|
|
59874
|
+
const getAxisDomainRangeAndLabels = Factory.getFunction('getAxisDomainRangeAndLabels');
|
|
59875
|
+
const { range: axisRange, ticks: selfTicks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, position === 'bottom' || position === 'top'
|
|
59876
|
+
? layout._table.getColWidth(col) || layout._table.tableNoFrameWidth
|
|
59877
|
+
: layout._table.getRowHeight(row) || layout._table.tableNoFrameHeight);
|
|
59878
|
+
if (axisOption?.nice) {
|
|
59879
|
+
range.min = axisRange[0];
|
|
59880
|
+
range.max = axisRange[1];
|
|
59740
59881
|
}
|
|
59882
|
+
const ticks = selfTicks;
|
|
59741
59883
|
if (isNumber$4(axisOption?.min)) {
|
|
59742
59884
|
range.min = axisOption.min;
|
|
59743
59885
|
}
|
|
@@ -60287,7 +60429,7 @@
|
|
|
60287
60429
|
return TABLE_EVENT_TYPE;
|
|
60288
60430
|
}
|
|
60289
60431
|
options;
|
|
60290
|
-
version = "1.17.3
|
|
60432
|
+
version = "1.17.3";
|
|
60291
60433
|
pagination;
|
|
60292
60434
|
id = `VTable${Date.now()}`;
|
|
60293
60435
|
headerStyleCache;
|
|
@@ -60334,7 +60476,7 @@
|
|
|
60334
60476
|
padding.right && (this.padding.right = padding.right);
|
|
60335
60477
|
}
|
|
60336
60478
|
}
|
|
60337
|
-
if (isValid$3(canvasHeight)
|
|
60479
|
+
if (isValid$3(canvasHeight) || isValid$3(canvasWidth)) {
|
|
60338
60480
|
this.canvasSizeSeted = true;
|
|
60339
60481
|
}
|
|
60340
60482
|
this.tableNoFrameWidth = 0;
|
|
@@ -60874,24 +61016,33 @@
|
|
|
60874
61016
|
const element = this.getElement();
|
|
60875
61017
|
let widthWithoutPadding = 0;
|
|
60876
61018
|
let heightWithoutPadding = 0;
|
|
61019
|
+
const isDefWidth = isValid$3(this.canvasWidth);
|
|
61020
|
+
const isDefHeight = isValid$3(this.canvasHeight);
|
|
60877
61021
|
if (this.canvasSizeSeted) {
|
|
60878
|
-
|
|
60879
|
-
|
|
61022
|
+
if (isDefWidth) {
|
|
61023
|
+
widthWithoutPadding = this.canvasWidth;
|
|
61024
|
+
}
|
|
61025
|
+
if (isDefHeight) {
|
|
61026
|
+
heightWithoutPadding = this.canvasHeight;
|
|
61027
|
+
}
|
|
60880
61028
|
}
|
|
60881
|
-
|
|
60882
|
-
|
|
60883
|
-
|
|
61029
|
+
const unDefSize = (!isDefWidth || !isDefHeight) && element.parentElement;
|
|
61030
|
+
if (unDefSize) {
|
|
61031
|
+
const computedStyle = element.parentElement.style || window.getComputedStyle(element.parentElement);
|
|
61032
|
+
if (!isDefWidth) {
|
|
60884
61033
|
widthWithoutPadding =
|
|
60885
61034
|
element.parentElement.offsetWidth -
|
|
60886
|
-
parseInt(computedStyle.paddingLeft
|
|
60887
|
-
parseInt(computedStyle.paddingRight
|
|
61035
|
+
(parseInt(computedStyle.paddingLeft, 10) || 0) -
|
|
61036
|
+
(parseInt(computedStyle.paddingRight, 10) || 0);
|
|
61037
|
+
}
|
|
61038
|
+
if (!isDefHeight) {
|
|
60888
61039
|
heightWithoutPadding =
|
|
60889
61040
|
element.parentElement.offsetHeight -
|
|
60890
61041
|
parseInt(computedStyle.paddingTop || '0px', 10) -
|
|
60891
61042
|
parseInt(computedStyle.paddingBottom || '0px', 20);
|
|
60892
|
-
widthWithoutPadding = (widthWithoutPadding ?? 1) - (this.options.tableSizeAntiJitter ? 1 : 0);
|
|
60893
|
-
heightWithoutPadding = (heightWithoutPadding ?? 1) - (this.options.tableSizeAntiJitter ? 1 : 0);
|
|
60894
61043
|
}
|
|
61044
|
+
widthWithoutPadding = (widthWithoutPadding ?? 1) - (this.options.tableSizeAntiJitter ? 1 : 0);
|
|
61045
|
+
heightWithoutPadding = (heightWithoutPadding ?? 1) - (this.options.tableSizeAntiJitter ? 1 : 0);
|
|
60895
61046
|
}
|
|
60896
61047
|
element.style.width = (widthWithoutPadding && `${widthWithoutPadding - padding.left - padding.right}px`) || '0px';
|
|
60897
61048
|
element.style.height =
|
|
@@ -61144,7 +61295,7 @@
|
|
|
61144
61295
|
else if (row >= 0 && row < this.columnHeaderLevelCount) {
|
|
61145
61296
|
return this.getDefaultRowHeight(row) === 'auto';
|
|
61146
61297
|
}
|
|
61147
|
-
return
|
|
61298
|
+
return this.internalProps.defaultRowHeight === 'auto';
|
|
61148
61299
|
}
|
|
61149
61300
|
getColWidth(col) {
|
|
61150
61301
|
const width = this.colWidthsMap.get(col) ?? this.getDefaultColumnWidth(col);
|
|
@@ -62113,7 +62264,17 @@
|
|
|
62113
62264
|
if (customMerge &&
|
|
62114
62265
|
customMerge.range &&
|
|
62115
62266
|
(isValid$3(customMerge.text) || customMerge.customLayout || customMerge.customRender)) {
|
|
62116
|
-
|
|
62267
|
+
const range = {
|
|
62268
|
+
start: {
|
|
62269
|
+
col: Math.max(customMerge.range.start.col, 0),
|
|
62270
|
+
row: Math.max(customMerge.range.start.row, 0)
|
|
62271
|
+
},
|
|
62272
|
+
end: {
|
|
62273
|
+
col: Math.min(customMerge.range.end.col, this.colCount - 1),
|
|
62274
|
+
row: Math.min(customMerge.range.end.row, this.rowCount - 1)
|
|
62275
|
+
}
|
|
62276
|
+
};
|
|
62277
|
+
return range;
|
|
62117
62278
|
}
|
|
62118
62279
|
}
|
|
62119
62280
|
return this.internalProps.layoutMap?.getCellRange(col, row);
|
|
@@ -65129,7 +65290,7 @@
|
|
|
65129
65290
|
title: seriesNumber.title,
|
|
65130
65291
|
define: merge$1({ field: '_vtable_rowSeries_number_' + index }, seriesNumber),
|
|
65131
65292
|
cellType: seriesNumber.cellType ?? 'text',
|
|
65132
|
-
headerType:
|
|
65293
|
+
headerType: seriesNumber.cellType === 'checkbox' ? 'checkbox' : 'text',
|
|
65133
65294
|
style: seriesNumber.style,
|
|
65134
65295
|
width: seriesNumber.width,
|
|
65135
65296
|
format: seriesNumber.format,
|
|
@@ -65147,7 +65308,7 @@
|
|
|
65147
65308
|
title: rowSeriesNumber.title,
|
|
65148
65309
|
define: merge$1({ field: '_vtable_rowSeries_number' }, rowSeriesNumber),
|
|
65149
65310
|
cellType: rowSeriesNumber.cellType ?? 'text',
|
|
65150
|
-
headerType: rowSeriesNumber.cellType
|
|
65311
|
+
headerType: rowSeriesNumber.cellType === 'checkbox' ? 'checkbox' : 'text',
|
|
65151
65312
|
style: rowSeriesNumber.style,
|
|
65152
65313
|
width: rowSeriesNumber.width,
|
|
65153
65314
|
format: rowSeriesNumber.format,
|
|
@@ -66521,7 +66682,7 @@
|
|
|
66521
66682
|
table.scenegraph.recalculateRowHeights();
|
|
66522
66683
|
}
|
|
66523
66684
|
}
|
|
66524
|
-
else if (table.isAutoRowHeight() && !table.internalProps._heightResizedRowMap.has(row)) {
|
|
66685
|
+
else if (table.isAutoRowHeight(row) && !table.internalProps._heightResizedRowMap.has(row)) {
|
|
66525
66686
|
const oldHeight = table.getRowHeight(row);
|
|
66526
66687
|
const newHeight = computeRowHeight(row, 0, table.colCount - 1, table);
|
|
66527
66688
|
table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
@@ -66680,7 +66841,7 @@
|
|
|
66680
66841
|
(table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight)) {
|
|
66681
66842
|
table.scenegraph.recalculateRowHeights();
|
|
66682
66843
|
}
|
|
66683
|
-
else if (table.isAutoRowHeight()) {
|
|
66844
|
+
else if (table.isAutoRowHeight(startRow)) {
|
|
66684
66845
|
const rows = [];
|
|
66685
66846
|
const deltaYs = [];
|
|
66686
66847
|
for (let sRow = startRow; sRow <= range.end.row; sRow++) {
|
|
@@ -72646,7 +72807,7 @@
|
|
|
72646
72807
|
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
72647
72808
|
const { lineClamp } = cellStyle;
|
|
72648
72809
|
const autoColWidth = colWidth === 'auto';
|
|
72649
|
-
const autoRowHeight = table.isAutoRowHeight();
|
|
72810
|
+
const autoRowHeight = table.isAutoRowHeight(row);
|
|
72650
72811
|
const attribute = {
|
|
72651
72812
|
maxLineWidth: autoColWidth
|
|
72652
72813
|
? Infinity
|
|
@@ -73400,13 +73561,17 @@
|
|
|
73400
73561
|
const iconSize = Math.floor(Math.min(width - padding[1] - padding[3], height - padding[2] - padding[0]) / 2);
|
|
73401
73562
|
const anchorX = left + (width > image.attribute.width ? image.attribute.x - left + image.attribute.width / 2 : width / 2);
|
|
73402
73563
|
const anchorY = top + (height > image.attribute.height ? image.attribute.y - top + image.attribute.height / 2 : height / 2);
|
|
73564
|
+
const imageGraphic = cellGroup.getChildByName('image', true);
|
|
73565
|
+
const { dx, dy } = imageGraphic.attribute;
|
|
73403
73566
|
const playIcon = new Icon$1({
|
|
73404
73567
|
x: anchorX - iconSize / 2,
|
|
73405
73568
|
y: anchorY - iconSize / 2,
|
|
73406
73569
|
width: iconSize,
|
|
73407
73570
|
height: iconSize,
|
|
73408
73571
|
image: regedIcons.play.svg,
|
|
73409
|
-
cursor: regedIcons.play.cursor
|
|
73572
|
+
cursor: regedIcons.play.cursor,
|
|
73573
|
+
dx,
|
|
73574
|
+
dy
|
|
73410
73575
|
});
|
|
73411
73576
|
playIcon.name = 'play-icon';
|
|
73412
73577
|
cellGroup.appendChild(playIcon);
|
|
@@ -74599,6 +74764,11 @@
|
|
|
74599
74764
|
this.rowHierarchyIndent = table.options.rowHierarchyIndent ?? 20;
|
|
74600
74765
|
this.rowHierarchyTextStartAlignment = table.options.rowHierarchyTextStartAlignment;
|
|
74601
74766
|
this.cornerSetting = Object.assign({ titleOnDimension: 'column', forceShowHeader: false }, table.options.corner);
|
|
74767
|
+
if (this._table.options?.customConfig?.enablePivotPathCache) {
|
|
74768
|
+
this._useHeaderPathCache = true;
|
|
74769
|
+
this._colHeaderPathCache.clear();
|
|
74770
|
+
this._rowHeaderPathCache.clear();
|
|
74771
|
+
}
|
|
74602
74772
|
if (dataset) {
|
|
74603
74773
|
this.rowTree = dataset.rowHeaderTree;
|
|
74604
74774
|
this.columnTree = dataset.colHeaderTree;
|
|
@@ -76770,9 +76940,17 @@
|
|
|
76770
76940
|
}
|
|
76771
76941
|
}
|
|
76772
76942
|
}
|
|
76773
|
-
let
|
|
76943
|
+
let needLowestLevel_colPaths = false;
|
|
76944
|
+
let needLowestLevel_rowPaths = false;
|
|
76774
76945
|
if (colHeaderPaths?.length >= 1 && rowHeaderPaths?.length >= 1) {
|
|
76775
|
-
|
|
76946
|
+
needLowestLevel_colPaths = true;
|
|
76947
|
+
needLowestLevel_rowPaths = true;
|
|
76948
|
+
}
|
|
76949
|
+
if (colHeaderPaths.length >= this.columnHeaderLevelCount) {
|
|
76950
|
+
needLowestLevel_colPaths = true;
|
|
76951
|
+
}
|
|
76952
|
+
if (rowHeaderPaths.length >= this.rowHeaderLevelCount) {
|
|
76953
|
+
needLowestLevel_rowPaths = true;
|
|
76776
76954
|
}
|
|
76777
76955
|
let col;
|
|
76778
76956
|
let row;
|
|
@@ -76796,10 +76974,10 @@
|
|
|
76796
76974
|
!isValid$3(dimension.value) ||
|
|
76797
76975
|
!isValid$3(colDimension.value)))) {
|
|
76798
76976
|
colArr = dimension.children;
|
|
76799
|
-
if (
|
|
76977
|
+
if (needLowestLevel_colPaths && !colArr?.length) {
|
|
76800
76978
|
colDimensionFinded = dimension;
|
|
76801
76979
|
}
|
|
76802
|
-
else if (!
|
|
76980
|
+
else if (!needLowestLevel_colPaths) {
|
|
76803
76981
|
colDimensionFinded = dimension;
|
|
76804
76982
|
}
|
|
76805
76983
|
break;
|
|
@@ -76845,10 +77023,10 @@
|
|
|
76845
77023
|
dimension.indicatorKey === rowDimension.indicatorKey &&
|
|
76846
77024
|
(!isValid$3(rowDimension.value) || dimension.value === rowDimension.value))) {
|
|
76847
77025
|
rowArr = dimension.children;
|
|
76848
|
-
if (
|
|
77026
|
+
if (needLowestLevel_rowPaths && (!rowArr?.length || rowArr.some(row => row.dimensionKey === 'axis'))) {
|
|
76849
77027
|
rowDimensionFinded = dimension;
|
|
76850
77028
|
}
|
|
76851
|
-
else if (!
|
|
77029
|
+
else if (!needLowestLevel_rowPaths) {
|
|
76852
77030
|
rowDimensionFinded = dimension;
|
|
76853
77031
|
}
|
|
76854
77032
|
break;
|
|
@@ -76857,7 +77035,7 @@
|
|
|
76857
77035
|
}
|
|
76858
77036
|
}
|
|
76859
77037
|
}
|
|
76860
|
-
if (!forceBody &&
|
|
77038
|
+
if (!forceBody && needLowestLevel_colPaths && needLowestLevel_rowPaths) {
|
|
76861
77039
|
if ((!rowDimensionFinded && !isValid$3(row)) || !colDimensionFinded) {
|
|
76862
77040
|
return undefined;
|
|
76863
77041
|
}
|
|
@@ -77626,14 +77804,24 @@
|
|
|
77626
77804
|
this._getBodyCache.clear();
|
|
77627
77805
|
}
|
|
77628
77806
|
enableUseHeaderPathCache() {
|
|
77629
|
-
this.
|
|
77630
|
-
|
|
77631
|
-
|
|
77807
|
+
if (this._table.options?.customConfig?.enablePivotPathCache) {
|
|
77808
|
+
this._useHeaderPathCache = true;
|
|
77809
|
+
}
|
|
77810
|
+
else {
|
|
77811
|
+
this._useHeaderPathCache = true;
|
|
77812
|
+
this._colHeaderPathCache.clear();
|
|
77813
|
+
this._rowHeaderPathCache.clear();
|
|
77814
|
+
}
|
|
77632
77815
|
}
|
|
77633
77816
|
disableUseHeaderPathCache() {
|
|
77634
|
-
this.
|
|
77635
|
-
|
|
77636
|
-
|
|
77817
|
+
if (this._table.options?.customConfig?.enablePivotPathCache) {
|
|
77818
|
+
this._useHeaderPathCache = true;
|
|
77819
|
+
}
|
|
77820
|
+
else {
|
|
77821
|
+
this._useHeaderPathCache = false;
|
|
77822
|
+
this._colHeaderPathCache.clear();
|
|
77823
|
+
this._rowHeaderPathCache.clear();
|
|
77824
|
+
}
|
|
77637
77825
|
}
|
|
77638
77826
|
getBodyWidthCache(col, row) {
|
|
77639
77827
|
if (!this._useGetBodyCache || this.isHeader(col, row) || this.isSeriesNumber(col, row)) {
|
|
@@ -77686,6 +77874,10 @@
|
|
|
77686
77874
|
this._rowHeaderPathCache.set(row, cache);
|
|
77687
77875
|
}
|
|
77688
77876
|
}
|
|
77877
|
+
clearHeaderPathCache() {
|
|
77878
|
+
this._colHeaderPathCache.clear();
|
|
77879
|
+
this._rowHeaderPathCache.clear();
|
|
77880
|
+
}
|
|
77689
77881
|
}
|
|
77690
77882
|
function scaleWholeRangeSize(count, bandwidth, paddingInner, paddingOuter) {
|
|
77691
77883
|
if (paddingInner === 1) {
|
|
@@ -79748,6 +79940,7 @@
|
|
|
79748
79940
|
if (options.rowTree) {
|
|
79749
79941
|
rowDimensionTree = new DimensionTree(this.internalProps.rowTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType !== 'grid' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
79750
79942
|
}
|
|
79943
|
+
internalProps.layoutMap.clearHeaderPathCache();
|
|
79751
79944
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, null, columnDimensionTree, rowDimensionTree);
|
|
79752
79945
|
if (this.internalProps.recordsIsTwoDimensionalArray === false) {
|
|
79753
79946
|
this.flatDataToObjects = new FlatDataToObjects({
|
|
@@ -79831,6 +80024,7 @@
|
|
|
79831
80024
|
});
|
|
79832
80025
|
}
|
|
79833
80026
|
updatePagination(pagination) {
|
|
80027
|
+
this.internalProps.layoutMap.clearHeaderPathCache();
|
|
79834
80028
|
if (pagination) {
|
|
79835
80029
|
if (!this.pagination) {
|
|
79836
80030
|
this.pagination = { currentPage: 0, perPageCount: 0 };
|
|
@@ -80561,6 +80755,7 @@
|
|
|
80561
80755
|
return null;
|
|
80562
80756
|
}
|
|
80563
80757
|
toggleHierarchyState(col, row, recalculateColWidths = true) {
|
|
80758
|
+
this.internalProps.layoutMap.clearHeaderPathCache();
|
|
80564
80759
|
const hierarchyState = this.getHierarchyState(col, row);
|
|
80565
80760
|
if (hierarchyState === HierarchyState.expand) {
|
|
80566
80761
|
this._refreshHierarchyState(col, row, recalculateColWidths);
|
|
@@ -80859,7 +81054,7 @@
|
|
|
80859
81054
|
this.scenegraph.recalculateRowHeights();
|
|
80860
81055
|
}
|
|
80861
81056
|
}
|
|
80862
|
-
else if (this.isAutoRowHeight() && !this.internalProps._heightResizedRowMap.has(row)) {
|
|
81057
|
+
else if (this.isAutoRowHeight(row) && !this.internalProps._heightResizedRowMap.has(row)) {
|
|
80863
81058
|
const oldHeight = this.getRowHeight(row);
|
|
80864
81059
|
const newHeight = computeRowHeight(row, 0, this.colCount - 1, this);
|
|
80865
81060
|
this.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
@@ -80962,7 +81157,7 @@
|
|
|
80962
81157
|
if (this.heightMode === 'adaptive' || (this.autoFillHeight && this.getAllRowsHeight() <= this.tableNoFrameHeight)) {
|
|
80963
81158
|
this.scenegraph.recalculateRowHeights();
|
|
80964
81159
|
}
|
|
80965
|
-
else if (this.isAutoRowHeight()) {
|
|
81160
|
+
else if (this.isAutoRowHeight(startRow)) {
|
|
80966
81161
|
const rows = [];
|
|
80967
81162
|
const deltaYs = [];
|
|
80968
81163
|
for (let sRow = startRow; sRow <= range.end.row; sRow++) {
|
|
@@ -81135,6 +81330,7 @@
|
|
|
81135
81330
|
this.scenegraph.setLoadingHierarchyState(col, row);
|
|
81136
81331
|
}
|
|
81137
81332
|
release() {
|
|
81333
|
+
this.internalProps.layoutMap.clearHeaderPathCache();
|
|
81138
81334
|
this.editorManager.release();
|
|
81139
81335
|
super.release();
|
|
81140
81336
|
}
|
|
@@ -82877,7 +83073,7 @@
|
|
|
82877
83073
|
}
|
|
82878
83074
|
|
|
82879
83075
|
registerForVrender();
|
|
82880
|
-
const version = "1.17.3
|
|
83076
|
+
const version = "1.17.3";
|
|
82881
83077
|
function getIcons() {
|
|
82882
83078
|
return get$2();
|
|
82883
83079
|
}
|