@visactor/vtable 0.26.0-alpha.2 → 1.0.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 +13 -16
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +17 -7
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +20 -9
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -1
- package/cjs/core/BaseTable.js +69 -25
- 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/edit/edit-manager.js +8 -7
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +6 -2
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +29 -19
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/util.d.ts +2 -0
- package/cjs/event/util.js +18 -4
- package/cjs/event/util.js.map +1 -1
- package/cjs/header-helper/header-helper.d.ts +1 -0
- package/cjs/header-helper/header-helper.js +8 -0
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/layout-helper.d.ts +0 -2
- package/cjs/layout/layout-helper.js +12 -16
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +5 -0
- package/cjs/layout/pivot-header-layout.js +89 -47
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js +26 -22
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +8 -7
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +1 -1
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +24 -18
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +18 -16
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +1 -1
- package/cjs/scenegraph/group-creater/column-helper.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/compute-col-width.js +2 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +1 -1
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +2 -2
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +4 -2
- package/cjs/scenegraph/scenegraph.js +13 -6
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.d.ts +4 -1
- package/cjs/scenegraph/select/update-select-border.js +6 -1
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/scenegraph/utils/break-string.js +1 -1
- package/cjs/scenegraph/utils/break-string.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +4 -4
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.js +3 -1
- package/cjs/scenegraph/utils/text-measure.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/checkbox/checkbox.d.ts +1 -0
- package/cjs/state/checkbox/checkbox.js +12 -2
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/state/radio/radio.d.ts +1 -0
- package/cjs/state/radio/radio.js +13 -2
- package/cjs/state/radio/radio.js.map +1 -1
- package/cjs/state/select/update-position.js +12 -8
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.d.ts +4 -1
- package/cjs/state/state.js +5 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme.js +3 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/helper.js +2 -2
- package/cjs/tools/helper.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +9 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.d.ts +6 -0
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/events.d.ts +4 -1
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +1 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +513 -173
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +8 -12
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +9 -5
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +17 -10
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -1
- package/es/core/BaseTable.js +70 -25
- 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/edit/edit-manager.js +8 -7
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/listener/scroll-bar.js +6 -2
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +29 -19
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/util.d.ts +2 -0
- package/es/event/util.js +12 -0
- package/es/event/util.js.map +1 -1
- package/es/header-helper/header-helper.d.ts +1 -0
- package/es/header-helper/header-helper.js +8 -0
- package/es/header-helper/header-helper.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/layout-helper.d.ts +0 -2
- package/es/layout/layout-helper.js +11 -17
- package/es/layout/layout-helper.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +5 -0
- package/es/layout/pivot-header-layout.js +90 -46
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/component/table-component.js +27 -21
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +8 -7
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +1 -1
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +21 -17
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +18 -15
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +1 -1
- package/es/scenegraph/group-creater/column-helper.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/compute-col-width.js +2 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +1 -1
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +2 -2
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +4 -2
- package/es/scenegraph/scenegraph.js +13 -6
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.d.ts +4 -1
- package/es/scenegraph/select/update-select-border.js +6 -1
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/scenegraph/utils/break-string.js +1 -1
- package/es/scenegraph/utils/break-string.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +4 -4
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-measure.js +3 -1
- package/es/scenegraph/utils/text-measure.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/checkbox/checkbox.d.ts +1 -0
- package/es/state/checkbox/checkbox.js +10 -0
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/state/radio/radio.d.ts +1 -0
- package/es/state/radio/radio.js +10 -0
- package/es/state/radio/radio.js.map +1 -1
- package/es/state/select/update-position.js +12 -8
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.d.ts +4 -1
- package/es/state/state.js +7 -3
- package/es/state/state.js.map +1 -1
- package/es/themes/theme.js +3 -0
- package/es/themes/theme.js.map +1 -1
- package/es/tools/helper.js +2 -2
- package/es/tools/helper.js.map +1 -1
- package/es/ts-types/base-table.d.ts +9 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.d.ts +6 -0
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/events.d.ts +4 -1
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +1 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -23234,8 +23234,12 @@
|
|
|
23234
23234
|
function cellInRanges(ranges, col, row) {
|
|
23235
23235
|
for (let i = 0; i < ranges.length; i++) {
|
|
23236
23236
|
const range = ranges[i];
|
|
23237
|
-
|
|
23238
|
-
|
|
23237
|
+
const startCol = Math.min(range.start.col, range.end.col);
|
|
23238
|
+
const endCol = Math.max(range.start.col, range.end.col);
|
|
23239
|
+
const startRow = Math.min(range.start.row, range.end.row);
|
|
23240
|
+
const endRow = Math.max(range.start.row, range.end.row);
|
|
23241
|
+
if ((startCol <= col && col <= endCol && startRow <= row && row <= endRow) ||
|
|
23242
|
+
(endCol <= col && col <= startCol && endRow <= row && row <= startRow)) {
|
|
23239
23243
|
return true;
|
|
23240
23244
|
}
|
|
23241
23245
|
}
|
|
@@ -23294,6 +23298,7 @@
|
|
|
23294
23298
|
MOUSEDOWN_CELL: 'mousedown_cell',
|
|
23295
23299
|
MOUSEUP_CELL: 'mouseup_cell',
|
|
23296
23300
|
SELECTED_CELL: 'selected_cell',
|
|
23301
|
+
SELECTED_CLEAR: 'selected_clear',
|
|
23297
23302
|
KEYDOWN: 'keydown',
|
|
23298
23303
|
MOUSEENTER_TABLE: 'mouseenter_table',
|
|
23299
23304
|
MOUSELEAVE_TABLE: 'mouseleave_table',
|
|
@@ -24692,6 +24697,9 @@
|
|
|
24692
24697
|
get scrollSliderColor() {
|
|
24693
24698
|
return scroll.scrollSliderColor ?? '#C0C0C0';
|
|
24694
24699
|
},
|
|
24700
|
+
get scrollSliderCornerRadius() {
|
|
24701
|
+
return scroll.scrollSliderCornerRadius;
|
|
24702
|
+
},
|
|
24695
24703
|
get scrollRailColor() {
|
|
24696
24704
|
return scroll.scrollRailColor;
|
|
24697
24705
|
},
|
|
@@ -36690,7 +36698,10 @@
|
|
|
36690
36698
|
function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme, isAsync) {
|
|
36691
36699
|
const headerStyle = table._getCellStyle(col, row);
|
|
36692
36700
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
36693
|
-
if (
|
|
36701
|
+
if (table.options.customConfig?.imageMargin) {
|
|
36702
|
+
padding = getQuadProps(table.options.customConfig?.imageMargin);
|
|
36703
|
+
}
|
|
36704
|
+
else if (isValid$3(functionalPadding)) {
|
|
36694
36705
|
padding = functionalPadding;
|
|
36695
36706
|
}
|
|
36696
36707
|
if (cellTheme?.text?.textAlign) {
|
|
@@ -36843,7 +36854,13 @@
|
|
|
36843
36854
|
const headerStyle = table._getCellStyle(col, row);
|
|
36844
36855
|
const textAlign = getProp('textAlign', headerStyle, col, row, table) ?? 'left';
|
|
36845
36856
|
const textBaseline = getProp('textBaseline', headerStyle, col, row, table) ?? 'middle';
|
|
36846
|
-
|
|
36857
|
+
let padding;
|
|
36858
|
+
if (table.options.customConfig?.imageMargin) {
|
|
36859
|
+
padding = getQuadProps(table.options.customConfig?.imageMargin);
|
|
36860
|
+
}
|
|
36861
|
+
else {
|
|
36862
|
+
padding = getQuadProps(getProp('padding', headerStyle, col, row, table)) ?? [0, 0, 0, 0];
|
|
36863
|
+
}
|
|
36847
36864
|
const { width: cellWidth, height: cellHeight, isMerge } = getCellRange(cellGroup, table);
|
|
36848
36865
|
const colStart = cellGroup.mergeStartCol ?? cellGroup.col;
|
|
36849
36866
|
const rowStart = cellGroup.mergeStartRow ?? cellGroup.row;
|
|
@@ -38122,7 +38139,7 @@
|
|
|
38122
38139
|
else {
|
|
38123
38140
|
text = convertInternal(textStr).replace(/\r?\n/g, '\n').replace(/\r/g, '\n').split('\n') || [];
|
|
38124
38141
|
}
|
|
38125
|
-
while (text.length && !text[text.length - 1]) {
|
|
38142
|
+
while (text.length && text.length > 1 && !text[text.length - 1]) {
|
|
38126
38143
|
text.pop();
|
|
38127
38144
|
}
|
|
38128
38145
|
return text;
|
|
@@ -38492,7 +38509,12 @@
|
|
|
38492
38509
|
let contentHeight;
|
|
38493
38510
|
if (textMark instanceof Text$1) {
|
|
38494
38511
|
oldTextHeight = textMark.AABBBounds.height();
|
|
38495
|
-
textMark.setAttribute('maxLineWidth', distWidth -
|
|
38512
|
+
textMark.setAttribute('maxLineWidth', distWidth -
|
|
38513
|
+
leftIconWidth -
|
|
38514
|
+
rightIconHeight -
|
|
38515
|
+
(padding[1] + padding[3]) -
|
|
38516
|
+
(textMark.attribute.dx ?? 0) -
|
|
38517
|
+
(scene.table.theme._contentOffset ?? 0));
|
|
38496
38518
|
contentHeight = textMark.AABBBounds.height();
|
|
38497
38519
|
}
|
|
38498
38520
|
else if (textMark instanceof RichText) {
|
|
@@ -38530,7 +38552,7 @@
|
|
|
38530
38552
|
});
|
|
38531
38553
|
if (autoRowHeight) {
|
|
38532
38554
|
let newHeight = Math.max(leftIconHeight, contentHeight, rightIconHeight);
|
|
38533
|
-
if (isCellHeightUpdate(scene, cellGroup, newHeight + padding[0] + padding[2], oldCellHeight)) {
|
|
38555
|
+
if (isCellHeightUpdate(scene, cellGroup, Math.round(newHeight + padding[0] + padding[2]), oldCellHeight)) {
|
|
38534
38556
|
return true;
|
|
38535
38557
|
}
|
|
38536
38558
|
newHeight = (cellGroup.contentHeight ?? cellHeight) - (padding[0] + padding[2]);
|
|
@@ -38711,7 +38733,7 @@
|
|
|
38711
38733
|
}
|
|
38712
38734
|
icons = table.getCellIcons(iconCol, iconRow);
|
|
38713
38735
|
}
|
|
38714
|
-
createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, typeof lineClamp === 'number' ? lineClamp : undefined,
|
|
38736
|
+
createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, typeof lineClamp === 'number' ? lineClamp : undefined, cellGroup.attribute.width, cellGroup.attribute.height, textAlign, textBaseline, table, cellTheme, range);
|
|
38715
38737
|
if (cellTheme?._vtable?.marked) {
|
|
38716
38738
|
const mark = createArc({
|
|
38717
38739
|
x: cellGroup.attribute.width,
|
|
@@ -38739,7 +38761,10 @@
|
|
|
38739
38761
|
function createVideoCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme, isAsync) {
|
|
38740
38762
|
const headerStyle = table._getCellStyle(col, row);
|
|
38741
38763
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
38742
|
-
if (
|
|
38764
|
+
if (table.options.customConfig?.imageMargin) {
|
|
38765
|
+
padding = getQuadProps(table.options.customConfig?.imageMargin);
|
|
38766
|
+
}
|
|
38767
|
+
else if (isValid$3(functionalPadding)) {
|
|
38743
38768
|
padding = functionalPadding;
|
|
38744
38769
|
}
|
|
38745
38770
|
if (cellTheme?.text?.textAlign) {
|
|
@@ -40869,7 +40894,10 @@
|
|
|
40869
40894
|
ignoreBuf: true
|
|
40870
40895
|
});
|
|
40871
40896
|
function measureTextBounds(attribute) {
|
|
40872
|
-
utilTextMark.
|
|
40897
|
+
utilTextMark.initAttributes({
|
|
40898
|
+
...attribute,
|
|
40899
|
+
ignoreBuf: true
|
|
40900
|
+
});
|
|
40873
40901
|
return utilTextMark.AABBBounds;
|
|
40874
40902
|
}
|
|
40875
40903
|
|
|
@@ -41507,9 +41535,9 @@
|
|
|
41507
41535
|
rowStart = row + 1;
|
|
41508
41536
|
rowEnd = Math.min(scene.proxy.rowEnd, scene.table.rowCount - scene.table.bottomFrozenRowCount - 1);
|
|
41509
41537
|
}
|
|
41510
|
-
for (let
|
|
41511
|
-
for (let
|
|
41512
|
-
const cellGroup = scene.
|
|
41538
|
+
for (let colIndex = 0; colIndex < scene.table.colCount; colIndex++) {
|
|
41539
|
+
for (let rowIndex = rowStart; rowIndex <= rowEnd; rowIndex++) {
|
|
41540
|
+
const cellGroup = scene.highPerformanceGetCell(colIndex, rowIndex);
|
|
41513
41541
|
if (cellGroup.role === 'cell') {
|
|
41514
41542
|
cellGroup.setAttribute('y', cellGroup.attribute.y + detaY);
|
|
41515
41543
|
}
|
|
@@ -42731,7 +42759,20 @@
|
|
|
42731
42759
|
const theme = this.table.theme;
|
|
42732
42760
|
const scrollRailColor = theme.scrollStyle?.scrollRailColor;
|
|
42733
42761
|
const scrollSliderColor = theme.scrollStyle?.scrollSliderColor;
|
|
42762
|
+
const scrollSliderCornerRadius = theme.scrollStyle?.scrollSliderCornerRadius;
|
|
42734
42763
|
const width = theme.scrollStyle?.width;
|
|
42764
|
+
let sliderStyle;
|
|
42765
|
+
if (isValid$3(scrollSliderCornerRadius)) {
|
|
42766
|
+
sliderStyle = {
|
|
42767
|
+
cornerRadius: scrollSliderCornerRadius,
|
|
42768
|
+
fill: scrollSliderColor
|
|
42769
|
+
};
|
|
42770
|
+
}
|
|
42771
|
+
else {
|
|
42772
|
+
sliderStyle = {
|
|
42773
|
+
fill: scrollSliderColor
|
|
42774
|
+
};
|
|
42775
|
+
}
|
|
42735
42776
|
this.hScrollBar = new ScrollBar({
|
|
42736
42777
|
direction: 'horizontal',
|
|
42737
42778
|
x: -this.table.tableNoFrameWidth * 2,
|
|
@@ -42742,9 +42783,7 @@
|
|
|
42742
42783
|
railStyle: {
|
|
42743
42784
|
fill: scrollRailColor
|
|
42744
42785
|
},
|
|
42745
|
-
sliderStyle
|
|
42746
|
-
fill: scrollSliderColor
|
|
42747
|
-
},
|
|
42786
|
+
sliderStyle,
|
|
42748
42787
|
range: [0, 0.1],
|
|
42749
42788
|
visible: false
|
|
42750
42789
|
});
|
|
@@ -42760,9 +42799,7 @@
|
|
|
42760
42799
|
railStyle: {
|
|
42761
42800
|
fill: scrollRailColor
|
|
42762
42801
|
},
|
|
42763
|
-
sliderStyle
|
|
42764
|
-
fill: scrollSliderColor
|
|
42765
|
-
},
|
|
42802
|
+
sliderStyle,
|
|
42766
42803
|
range: [0, 0.1],
|
|
42767
42804
|
visible: false
|
|
42768
42805
|
});
|
|
@@ -43071,24 +43108,33 @@
|
|
|
43071
43108
|
const theme = this.table.theme;
|
|
43072
43109
|
const scrollRailColor = theme.scrollStyle?.scrollRailColor;
|
|
43073
43110
|
const scrollSliderColor = theme.scrollStyle?.scrollSliderColor;
|
|
43111
|
+
const scrollSliderCornerRadius = theme.scrollStyle?.scrollSliderCornerRadius;
|
|
43074
43112
|
const width = theme.scrollStyle?.width;
|
|
43113
|
+
let sliderStyle;
|
|
43114
|
+
if (isValid$3(scrollSliderCornerRadius)) {
|
|
43115
|
+
sliderStyle = {
|
|
43116
|
+
cornerRadius: scrollSliderCornerRadius,
|
|
43117
|
+
fill: scrollSliderColor
|
|
43118
|
+
};
|
|
43119
|
+
}
|
|
43120
|
+
else {
|
|
43121
|
+
sliderStyle = {
|
|
43122
|
+
fill: scrollSliderColor
|
|
43123
|
+
};
|
|
43124
|
+
}
|
|
43075
43125
|
this.hScrollBar.setAttributes({
|
|
43076
43126
|
height: width,
|
|
43077
43127
|
railStyle: {
|
|
43078
43128
|
fill: scrollRailColor
|
|
43079
43129
|
},
|
|
43080
|
-
sliderStyle
|
|
43081
|
-
fill: scrollSliderColor
|
|
43082
|
-
}
|
|
43130
|
+
sliderStyle
|
|
43083
43131
|
});
|
|
43084
43132
|
this.vScrollBar.setAttributes({
|
|
43085
43133
|
width,
|
|
43086
43134
|
railStyle: {
|
|
43087
43135
|
fill: scrollRailColor
|
|
43088
43136
|
},
|
|
43089
|
-
sliderStyle
|
|
43090
|
-
fill: scrollSliderColor
|
|
43091
|
-
}
|
|
43137
|
+
sliderStyle
|
|
43092
43138
|
});
|
|
43093
43139
|
const columnResizeColor = theme.columnResize?.lineColor;
|
|
43094
43140
|
const columnResizeWidth = theme.columnResize?.lineWidth;
|
|
@@ -44050,6 +44096,7 @@
|
|
|
44050
44096
|
if (stroke &&
|
|
44051
44097
|
Array.isArray(lineDash) &&
|
|
44052
44098
|
lineDash.length &&
|
|
44099
|
+
lineDash[0]?.length &&
|
|
44053
44100
|
!Array.isArray(strokeArrayColor) &&
|
|
44054
44101
|
!Array.isArray(strokeArrayWidth)) {
|
|
44055
44102
|
doFillOrStroke.doStroke = false;
|
|
@@ -44066,7 +44113,7 @@
|
|
|
44066
44113
|
drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
|
|
44067
44114
|
const { lineDash = groupAttribute.lineDash, stroke = groupAttribute.stroke, strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth = groupAttribute.strokeArrayWidth, lineWidth = groupAttribute.lineWidth } = group.attribute;
|
|
44068
44115
|
if (!stroke ||
|
|
44069
|
-
!(Array.isArray(lineDash) && lineDash.length) ||
|
|
44116
|
+
!(Array.isArray(lineDash) && lineDash.length && lineDash[0]?.length) ||
|
|
44070
44117
|
Array.isArray(strokeArrayColor) ||
|
|
44071
44118
|
Array.isArray(strokeArrayWidth)) {
|
|
44072
44119
|
return;
|
|
@@ -44888,6 +44935,9 @@
|
|
|
44888
44935
|
else if (maxWidth > colMaxWidth) {
|
|
44889
44936
|
return colMaxWidth;
|
|
44890
44937
|
}
|
|
44938
|
+
else if (maxWidth <= 0) {
|
|
44939
|
+
maxWidth = table.defaultColWidth;
|
|
44940
|
+
}
|
|
44891
44941
|
return maxWidth;
|
|
44892
44942
|
}
|
|
44893
44943
|
function computeCustomRenderWidth(col, row, table) {
|
|
@@ -45228,8 +45278,8 @@
|
|
|
45228
45278
|
y += rangeHeight;
|
|
45229
45279
|
}
|
|
45230
45280
|
else {
|
|
45231
|
-
columnGroup.updateColumnHeight(
|
|
45232
|
-
y +=
|
|
45281
|
+
columnGroup.updateColumnHeight(cellHeight);
|
|
45282
|
+
y += cellHeight;
|
|
45233
45283
|
}
|
|
45234
45284
|
}
|
|
45235
45285
|
if (rowLimit && row > rowLimit) {
|
|
@@ -46389,14 +46439,18 @@
|
|
|
46389
46439
|
constructor(table) {
|
|
46390
46440
|
this.table = table;
|
|
46391
46441
|
if (this.table.isPivotChart()) {
|
|
46392
|
-
this.rowLimit = 100;
|
|
46393
|
-
this.colLimit = 100;
|
|
46442
|
+
this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));
|
|
46443
|
+
this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));
|
|
46394
46444
|
}
|
|
46395
46445
|
else if (this.table.heightMode === 'autoHeight') {
|
|
46396
|
-
this.rowLimit = 100;
|
|
46446
|
+
this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));
|
|
46397
46447
|
}
|
|
46398
46448
|
else if (this.table.widthMode === 'autoWidth') {
|
|
46399
|
-
this.colLimit = 100;
|
|
46449
|
+
this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));
|
|
46450
|
+
}
|
|
46451
|
+
else {
|
|
46452
|
+
this.rowLimit = Math.max(200, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));
|
|
46453
|
+
this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));
|
|
46400
46454
|
}
|
|
46401
46455
|
if (this.table.internalProps.transpose) {
|
|
46402
46456
|
this.mode = 'row';
|
|
@@ -46813,10 +46867,10 @@
|
|
|
46813
46867
|
}
|
|
46814
46868
|
const prev = cacheCellGroup._prev;
|
|
46815
46869
|
const next = cacheCellGroup._next;
|
|
46816
|
-
if (cacheCellGroup.row > row && prev && prev.row === row - 1) {
|
|
46870
|
+
if (cacheCellGroup.row > row && prev && prev.row === cacheCellGroup.row - 1) {
|
|
46817
46871
|
return getCellByCache(prev, row);
|
|
46818
46872
|
}
|
|
46819
|
-
if (cacheCellGroup.row < row && next && next.row === row + 1) {
|
|
46873
|
+
if (cacheCellGroup.row < row && next && next.row === cacheCellGroup.row + 1) {
|
|
46820
46874
|
return getCellByCache(next, row);
|
|
46821
46875
|
}
|
|
46822
46876
|
return null;
|
|
@@ -47126,7 +47180,12 @@
|
|
|
47126
47180
|
});
|
|
47127
47181
|
}
|
|
47128
47182
|
}
|
|
47129
|
-
function updateCellSelectBorder(scene,
|
|
47183
|
+
function updateCellSelectBorder(scene, selectRange, ifExtendSelectRange = true) {
|
|
47184
|
+
const newStartCol = selectRange.start.col;
|
|
47185
|
+
const newStartRow = selectRange.start.row;
|
|
47186
|
+
const newEndCol = selectRange.end.col;
|
|
47187
|
+
const newEndRow = selectRange.end.row;
|
|
47188
|
+
const skipBodyMerge = selectRange.skipBodyMerge;
|
|
47130
47189
|
let startCol = Math.max(Math.min(newEndCol, newStartCol), 0);
|
|
47131
47190
|
let startRow = Math.max(Math.min(newEndRow, newStartRow), 0);
|
|
47132
47191
|
let endCol = Math.min(Math.max(newEndCol, newStartCol), scene.table.colCount - 1);
|
|
@@ -47136,6 +47195,9 @@
|
|
|
47136
47195
|
for (let col = startCol; col <= endCol; col++) {
|
|
47137
47196
|
if (col === startCol) {
|
|
47138
47197
|
for (let row = startRow; row <= endRow; row++) {
|
|
47198
|
+
if (!scene.table.isHeader(col, row) && skipBodyMerge) {
|
|
47199
|
+
continue;
|
|
47200
|
+
}
|
|
47139
47201
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
47140
47202
|
if (mergeInfo && mergeInfo.start.col < startCol) {
|
|
47141
47203
|
startCol = mergeInfo.start.col;
|
|
@@ -47146,6 +47208,9 @@
|
|
|
47146
47208
|
}
|
|
47147
47209
|
if (!isExtend && col === endCol) {
|
|
47148
47210
|
for (let row = startRow; row <= endRow; row++) {
|
|
47211
|
+
if (!scene.table.isHeader(col, row) && skipBodyMerge) {
|
|
47212
|
+
continue;
|
|
47213
|
+
}
|
|
47149
47214
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
47150
47215
|
if (mergeInfo && Math.min(mergeInfo.end.col, scene.table.colCount - 1) > endCol) {
|
|
47151
47216
|
endCol = mergeInfo.end.col;
|
|
@@ -47162,6 +47227,9 @@
|
|
|
47162
47227
|
for (let row = startRow; row <= endRow; row++) {
|
|
47163
47228
|
if (row === startRow) {
|
|
47164
47229
|
for (let col = startCol; col <= endCol; col++) {
|
|
47230
|
+
if (!scene.table.isHeader(col, row) && skipBodyMerge) {
|
|
47231
|
+
continue;
|
|
47232
|
+
}
|
|
47165
47233
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
47166
47234
|
if (mergeInfo && mergeInfo.start.row < startRow) {
|
|
47167
47235
|
startRow = mergeInfo.start.row;
|
|
@@ -47172,6 +47240,9 @@
|
|
|
47172
47240
|
}
|
|
47173
47241
|
if (!isExtend && row === endRow) {
|
|
47174
47242
|
for (let col = startCol; col <= endCol; col++) {
|
|
47243
|
+
if (!scene.table.isHeader(col, row) && skipBodyMerge) {
|
|
47244
|
+
continue;
|
|
47245
|
+
}
|
|
47175
47246
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
47176
47247
|
if (mergeInfo && Math.min(mergeInfo.end.row, scene.table.rowCount - 1) > endRow) {
|
|
47177
47248
|
endRow = mergeInfo.end.row;
|
|
@@ -47942,7 +48013,7 @@
|
|
|
47942
48013
|
}
|
|
47943
48014
|
scene.deleteAllSelectBorder();
|
|
47944
48015
|
scene.table.stateManager.select.ranges.forEach(range => {
|
|
47945
|
-
scene.updateCellSelectBorder(range
|
|
48016
|
+
scene.updateCellSelectBorder(range);
|
|
47946
48017
|
});
|
|
47947
48018
|
scene.frozenColCount = scene.table.frozenColCount;
|
|
47948
48019
|
scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;
|
|
@@ -49454,8 +49525,8 @@
|
|
|
49454
49525
|
deleteAllSelectBorder() {
|
|
49455
49526
|
deleteAllSelectBorder(this);
|
|
49456
49527
|
}
|
|
49457
|
-
updateCellSelectBorder(
|
|
49458
|
-
updateCellSelectBorder(this,
|
|
49528
|
+
updateCellSelectBorder(selectRange, extendSelectRange = true) {
|
|
49529
|
+
updateCellSelectBorder(this, selectRange, extendSelectRange);
|
|
49459
49530
|
}
|
|
49460
49531
|
removeFillHandleFromSelectComponents() {
|
|
49461
49532
|
removeFillHandleFromSelectComponents(this);
|
|
@@ -49463,7 +49534,7 @@
|
|
|
49463
49534
|
recreateAllSelectRangeComponents() {
|
|
49464
49535
|
deleteAllSelectBorder(this);
|
|
49465
49536
|
this.table.stateManager.select.ranges.forEach((cellRange) => {
|
|
49466
|
-
updateCellSelectBorder(this, cellRange
|
|
49537
|
+
updateCellSelectBorder(this, cellRange);
|
|
49467
49538
|
});
|
|
49468
49539
|
moveSelectingRangeComponentsToSelectedRangeComponents(this);
|
|
49469
49540
|
}
|
|
@@ -50094,26 +50165,29 @@
|
|
|
50094
50165
|
getResizeColAt(abstractX, abstractY, cellGroup, offset = ResizeColumnHotSpotSize / 2) {
|
|
50095
50166
|
let cell;
|
|
50096
50167
|
if (!cellGroup) {
|
|
50097
|
-
|
|
50098
|
-
|
|
50099
|
-
|
|
50100
|
-
|
|
50101
|
-
cell = { col: cellGroup.col - 1, row: cellGroup.row, x: cellGroup.globalAABBBounds.x1 };
|
|
50102
|
-
}
|
|
50103
|
-
else if (cellGroup.globalAABBBounds.x2 - offset < abstractX) {
|
|
50104
|
-
cell = { col: cellGroup.col, row: cellGroup.row, x: cellGroup.globalAABBBounds.x2 };
|
|
50105
|
-
}
|
|
50106
|
-
if (cell &&
|
|
50107
|
-
this.table.rightFrozenColCount > 0 &&
|
|
50108
|
-
cell.col === this.table.colCount - this.table.rightFrozenColCount - 1 &&
|
|
50109
|
-
this.table.tableNoFrameWidth -
|
|
50110
|
-
this.table.getFrozenColsWidth() -
|
|
50111
|
-
this.table.getRightFrozenColsWidth() +
|
|
50112
|
-
this.table.scrollLeft <
|
|
50113
|
-
this.bodyGroup.attribute.width) {
|
|
50114
|
-
cell.col = cell.col + 1;
|
|
50115
|
-
cell.rightFrozen = true;
|
|
50168
|
+
const drawRange = this.table.getDrawRange();
|
|
50169
|
+
if (abstractY >= drawRange.top && abstractY <= drawRange.bottom) {
|
|
50170
|
+
cell = this.table.getCellAt(abstractX - offset, abstractY);
|
|
50171
|
+
return cell;
|
|
50116
50172
|
}
|
|
50173
|
+
return { col: -1, row: -1 };
|
|
50174
|
+
}
|
|
50175
|
+
if (abstractX < cellGroup.globalAABBBounds.x1 + offset) {
|
|
50176
|
+
cell = { col: cellGroup.col - 1, row: cellGroup.row, x: cellGroup.globalAABBBounds.x1 };
|
|
50177
|
+
}
|
|
50178
|
+
else if (cellGroup.globalAABBBounds.x2 - offset < abstractX) {
|
|
50179
|
+
cell = { col: cellGroup.col, row: cellGroup.row, x: cellGroup.globalAABBBounds.x2 };
|
|
50180
|
+
}
|
|
50181
|
+
if (cell &&
|
|
50182
|
+
this.table.rightFrozenColCount > 0 &&
|
|
50183
|
+
cell.col === this.table.colCount - this.table.rightFrozenColCount - 1 &&
|
|
50184
|
+
this.table.tableNoFrameWidth -
|
|
50185
|
+
this.table.getFrozenColsWidth() -
|
|
50186
|
+
this.table.getRightFrozenColsWidth() +
|
|
50187
|
+
this.table.scrollLeft <
|
|
50188
|
+
this.bodyGroup.attribute.width) {
|
|
50189
|
+
cell.col = cell.col + 1;
|
|
50190
|
+
cell.rightFrozen = true;
|
|
50117
50191
|
}
|
|
50118
50192
|
if (cell) {
|
|
50119
50193
|
return cell;
|
|
@@ -50642,7 +50716,7 @@
|
|
|
50642
50716
|
end: { col: table.colCount - 1, row: table.rowCount - 1 }
|
|
50643
50717
|
});
|
|
50644
50718
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
50645
|
-
scenegraph.updateCellSelectBorder(currentRange
|
|
50719
|
+
scenegraph.updateCellSelectBorder(currentRange, false);
|
|
50646
50720
|
}
|
|
50647
50721
|
else if (cellPos.col !== -1 && cellPos.row !== -1 && (col === -1 || row === -1)) {
|
|
50648
50722
|
cellPos.col = -1;
|
|
@@ -50675,7 +50749,7 @@
|
|
|
50675
50749
|
currentRange.end = { col, row };
|
|
50676
50750
|
}
|
|
50677
50751
|
scenegraph.deleteLastSelectedRangeComponents();
|
|
50678
|
-
scenegraph.updateCellSelectBorder(currentRange
|
|
50752
|
+
scenegraph.updateCellSelectBorder(currentRange);
|
|
50679
50753
|
}
|
|
50680
50754
|
else {
|
|
50681
50755
|
let extendSelectRange = true;
|
|
@@ -50687,28 +50761,32 @@
|
|
|
50687
50761
|
const cellRange = table.getCellRange(col, row);
|
|
50688
50762
|
state.select.ranges.push({
|
|
50689
50763
|
start: { col: cellRange.start.col, row },
|
|
50690
|
-
end: { col: cellRange.end.col, row: table.rowCount - 1 }
|
|
50764
|
+
end: { col: cellRange.end.col, row: table.rowCount - 1 },
|
|
50765
|
+
skipBodyMerge: true
|
|
50691
50766
|
});
|
|
50692
50767
|
}
|
|
50693
50768
|
else if (state.select.headerSelectMode !== 'cell' && table.isRowHeader(col, row)) {
|
|
50694
50769
|
const cellRange = table.getCellRange(col, row);
|
|
50695
50770
|
state.select.ranges.push({
|
|
50696
50771
|
start: { col, row: cellRange.start.row },
|
|
50697
|
-
end: { col: table.colCount - 1, row: cellRange.end.row }
|
|
50772
|
+
end: { col: table.colCount - 1, row: cellRange.end.row },
|
|
50773
|
+
skipBodyMerge: true
|
|
50698
50774
|
});
|
|
50699
50775
|
}
|
|
50700
50776
|
else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) {
|
|
50701
50777
|
extendSelectRange = false;
|
|
50702
50778
|
state.select.ranges.push({
|
|
50703
50779
|
start: { col: 0, row: 0 },
|
|
50704
|
-
end: { col: table.colCount - 1, row: table.rowCount - 1 }
|
|
50780
|
+
end: { col: table.colCount - 1, row: table.rowCount - 1 },
|
|
50781
|
+
skipBodyMerge: true
|
|
50705
50782
|
});
|
|
50706
50783
|
}
|
|
50707
50784
|
else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) {
|
|
50708
50785
|
extendSelectRange = false;
|
|
50709
50786
|
state.select.ranges.push({
|
|
50710
50787
|
start: { col, row: row },
|
|
50711
|
-
end: { col: table.colCount - 1, row: row }
|
|
50788
|
+
end: { col: table.colCount - 1, row: row },
|
|
50789
|
+
skipBodyMerge: true
|
|
50712
50790
|
});
|
|
50713
50791
|
}
|
|
50714
50792
|
else if (col >= 0 && row >= 0) {
|
|
@@ -50721,8 +50799,7 @@
|
|
|
50721
50799
|
cellPos.col = col;
|
|
50722
50800
|
cellPos.row = row;
|
|
50723
50801
|
const currentRange = state.select.ranges?.[state.select.ranges.length - 1];
|
|
50724
|
-
currentRange &&
|
|
50725
|
-
scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, currentRange.end.col, currentRange.end.row, extendSelectRange);
|
|
50802
|
+
currentRange && scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
|
|
50726
50803
|
}
|
|
50727
50804
|
}
|
|
50728
50805
|
else if ((interactionState === InteractionState.grabing || table.eventManager.isDraging) &&
|
|
@@ -50817,7 +50894,7 @@
|
|
|
50817
50894
|
};
|
|
50818
50895
|
}
|
|
50819
50896
|
}
|
|
50820
|
-
scenegraph.updateCellSelectBorder(currentRange
|
|
50897
|
+
scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
|
|
50821
50898
|
}
|
|
50822
50899
|
}
|
|
50823
50900
|
scenegraph.updateNextFrame();
|
|
@@ -51126,6 +51203,7 @@
|
|
|
51126
51203
|
if (!state.table.transpose &&
|
|
51127
51204
|
state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource)) {
|
|
51128
51205
|
state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex);
|
|
51206
|
+
state.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex);
|
|
51129
51207
|
}
|
|
51130
51208
|
if (moveContext.moveType === 'column') {
|
|
51131
51209
|
clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table);
|
|
@@ -51538,6 +51616,22 @@
|
|
|
51538
51616
|
radio?._handlePointerUp();
|
|
51539
51617
|
}
|
|
51540
51618
|
}
|
|
51619
|
+
function changeRadioOrder(sourceIndex, targetIndex, state) {
|
|
51620
|
+
const { radioState, table } = state;
|
|
51621
|
+
if (table.internalProps.transpose) {
|
|
51622
|
+
sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0);
|
|
51623
|
+
targetIndex = table.getRecordShowIndexByCell(targetIndex, 0);
|
|
51624
|
+
}
|
|
51625
|
+
else {
|
|
51626
|
+
sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex);
|
|
51627
|
+
targetIndex = table.getRecordShowIndexByCell(0, targetIndex);
|
|
51628
|
+
}
|
|
51629
|
+
if (sourceIndex !== targetIndex) {
|
|
51630
|
+
const sourceRecord = radioState[sourceIndex];
|
|
51631
|
+
radioState[sourceIndex] = radioState[targetIndex];
|
|
51632
|
+
radioState[targetIndex] = sourceRecord;
|
|
51633
|
+
}
|
|
51634
|
+
}
|
|
51541
51635
|
|
|
51542
51636
|
function setCheckedState(col, row, field, checked, state) {
|
|
51543
51637
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
@@ -51719,6 +51813,22 @@
|
|
|
51719
51813
|
}
|
|
51720
51814
|
}
|
|
51721
51815
|
}
|
|
51816
|
+
function changeCheckboxOrder(sourceIndex, targetIndex, state) {
|
|
51817
|
+
const { checkedState, table } = state;
|
|
51818
|
+
if (table.internalProps.transpose) {
|
|
51819
|
+
sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0);
|
|
51820
|
+
targetIndex = table.getRecordShowIndexByCell(targetIndex, 0);
|
|
51821
|
+
}
|
|
51822
|
+
else {
|
|
51823
|
+
sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex);
|
|
51824
|
+
targetIndex = table.getRecordShowIndexByCell(0, targetIndex);
|
|
51825
|
+
}
|
|
51826
|
+
if (sourceIndex !== targetIndex) {
|
|
51827
|
+
const sourceRecord = checkedState[sourceIndex];
|
|
51828
|
+
checkedState[sourceIndex] = checkedState[targetIndex];
|
|
51829
|
+
checkedState[targetIndex] = sourceRecord;
|
|
51830
|
+
}
|
|
51831
|
+
}
|
|
51722
51832
|
|
|
51723
51833
|
function updateResizeRow(xInTable, yInTable, state) {
|
|
51724
51834
|
xInTable = Math.ceil(xInTable);
|
|
@@ -52204,6 +52314,11 @@
|
|
|
52204
52314
|
row: lastRow
|
|
52205
52315
|
});
|
|
52206
52316
|
}
|
|
52317
|
+
else if (fireListener) {
|
|
52318
|
+
if (this.select.ranges.length === 0) {
|
|
52319
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.SELECTED_CLEAR, {});
|
|
52320
|
+
}
|
|
52321
|
+
}
|
|
52207
52322
|
}
|
|
52208
52323
|
endResizeCol() {
|
|
52209
52324
|
setTimeout(() => {
|
|
@@ -52719,6 +52834,14 @@
|
|
|
52719
52834
|
syncRadioState(col, row, field, radioType, indexInCell, isChecked) {
|
|
52720
52835
|
return syncRadioState(col, row, field, radioType, indexInCell, isChecked, this);
|
|
52721
52836
|
}
|
|
52837
|
+
changeCheckboxAndRadioOrder(sourceIndex, targetIndex) {
|
|
52838
|
+
if (this.checkedState.length) {
|
|
52839
|
+
changeCheckboxOrder(sourceIndex, targetIndex, this);
|
|
52840
|
+
}
|
|
52841
|
+
if (this.radioState.length) {
|
|
52842
|
+
changeRadioOrder(sourceIndex, targetIndex, this);
|
|
52843
|
+
}
|
|
52844
|
+
}
|
|
52722
52845
|
}
|
|
52723
52846
|
|
|
52724
52847
|
function bindMediaClick(table) {
|
|
@@ -52916,6 +53039,7 @@
|
|
|
52916
53039
|
row: targetCell.row,
|
|
52917
53040
|
event: e,
|
|
52918
53041
|
targetCell,
|
|
53042
|
+
mergeInfo: getMergeCellInfo(targetCell),
|
|
52919
53043
|
target: e.target
|
|
52920
53044
|
};
|
|
52921
53045
|
}
|
|
@@ -52930,6 +53054,20 @@
|
|
|
52930
53054
|
}
|
|
52931
53055
|
return null;
|
|
52932
53056
|
}
|
|
53057
|
+
function getMergeCellInfo(cellGroup) {
|
|
53058
|
+
if (isValid$3(cellGroup.mergeStartCol) &&
|
|
53059
|
+
isValid$3(cellGroup.mergeStartRow) &&
|
|
53060
|
+
isValid$3(cellGroup.mergeEndCol) &&
|
|
53061
|
+
isValid$3(cellGroup.mergeEndRow)) {
|
|
53062
|
+
return {
|
|
53063
|
+
colStart: cellGroup.mergeStartCol,
|
|
53064
|
+
colEnd: cellGroup.mergeEndCol,
|
|
53065
|
+
rowStart: cellGroup.mergeStartRow,
|
|
53066
|
+
rowEnd: cellGroup.mergeEndRow
|
|
53067
|
+
};
|
|
53068
|
+
}
|
|
53069
|
+
return undefined;
|
|
53070
|
+
}
|
|
52933
53071
|
const regIndexReg = /radio-\d+-\d+-(\d+)/;
|
|
52934
53072
|
|
|
52935
53073
|
function bindTableGroupListener(eventManager) {
|
|
@@ -52998,7 +53136,8 @@
|
|
|
52998
53136
|
}),
|
|
52999
53137
|
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
|
|
53000
53138
|
event: e.nativeEvent,
|
|
53001
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53139
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53140
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
53002
53141
|
});
|
|
53003
53142
|
}
|
|
53004
53143
|
}
|
|
@@ -53027,7 +53166,8 @@
|
|
|
53027
53166
|
funcType: icon.attribute.funcType
|
|
53028
53167
|
}
|
|
53029
53168
|
: undefined,
|
|
53030
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53169
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53170
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
53031
53171
|
});
|
|
53032
53172
|
}
|
|
53033
53173
|
});
|
|
@@ -53245,7 +53385,8 @@
|
|
|
53245
53385
|
col: eventArgsSet.eventArgs.col,
|
|
53246
53386
|
row: eventArgsSet.eventArgs.row,
|
|
53247
53387
|
event: e.nativeEvent,
|
|
53248
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53388
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53389
|
+
mergeCellInfo: eventArgsSet.eventArgs.mergeInfo
|
|
53249
53390
|
});
|
|
53250
53391
|
}
|
|
53251
53392
|
}
|
|
@@ -53290,7 +53431,8 @@
|
|
|
53290
53431
|
col: eventArgsSet.eventArgs.target.col,
|
|
53291
53432
|
row: eventArgsSet.eventArgs.target.row,
|
|
53292
53433
|
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
|
|
53293
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53434
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53435
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
53294
53436
|
};
|
|
53295
53437
|
cellsEvent.cells = table.getSelectedCellInfos();
|
|
53296
53438
|
table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
|
|
@@ -53307,7 +53449,8 @@
|
|
|
53307
53449
|
col: eventArgsSet.eventArgs.col,
|
|
53308
53450
|
row: eventArgsSet.eventArgs.row,
|
|
53309
53451
|
event: e.nativeEvent,
|
|
53310
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53452
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53453
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
53311
53454
|
});
|
|
53312
53455
|
}
|
|
53313
53456
|
}
|
|
@@ -53339,7 +53482,8 @@
|
|
|
53339
53482
|
funcType: icon.attribute.funcType
|
|
53340
53483
|
}
|
|
53341
53484
|
: undefined,
|
|
53342
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53485
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53486
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
53343
53487
|
};
|
|
53344
53488
|
if (cellInRanges(table.stateManager.select.ranges, col, row)) {
|
|
53345
53489
|
cellsEvent.cells = table.getSelectedCellInfos();
|
|
@@ -53395,7 +53539,8 @@
|
|
|
53395
53539
|
funcType: icon.attribute.funcType
|
|
53396
53540
|
}
|
|
53397
53541
|
: undefined,
|
|
53398
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53542
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53543
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
53399
53544
|
};
|
|
53400
53545
|
table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
|
|
53401
53546
|
}
|
|
@@ -53440,6 +53585,7 @@
|
|
|
53440
53585
|
stateManager.updateInteractionState(InteractionState.default);
|
|
53441
53586
|
eventManager.dealTableHover();
|
|
53442
53587
|
eventManager.dealTableSelect();
|
|
53588
|
+
stateManager.endSelectCells();
|
|
53443
53589
|
stateManager.updateCursor();
|
|
53444
53590
|
table.scenegraph.updateChartState(null);
|
|
53445
53591
|
}
|
|
@@ -53493,6 +53639,7 @@
|
|
|
53493
53639
|
...cellInfo,
|
|
53494
53640
|
event: e.nativeEvent,
|
|
53495
53641
|
target: eventArgsSet?.eventArgs?.target,
|
|
53642
|
+
mergeCellInfo: eventArgsSet?.eventArgs?.mergeInfo,
|
|
53496
53643
|
checked: e.detail.checked
|
|
53497
53644
|
};
|
|
53498
53645
|
if (table.isHeader(col, row)) {
|
|
@@ -53582,6 +53729,7 @@
|
|
|
53582
53729
|
...cellInfo,
|
|
53583
53730
|
event: e.nativeEvent,
|
|
53584
53731
|
target: eventArgsSet?.eventArgs?.target,
|
|
53732
|
+
mergeCellInfo: eventArgsSet?.eventArgs?.mergeInfo,
|
|
53585
53733
|
radioIndexInCell
|
|
53586
53734
|
};
|
|
53587
53735
|
table.fireListeners(TABLE_EVENT_TYPE.RADIO_STATE_CHANGE, cellsEvent);
|
|
@@ -53652,7 +53800,8 @@
|
|
|
53652
53800
|
funcType: icon.attribute.funcType
|
|
53653
53801
|
}
|
|
53654
53802
|
: undefined,
|
|
53655
|
-
target: eventArgsSet?.eventArgs?.target
|
|
53803
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
53804
|
+
mergeCellInfo: eventArgsSet?.eventArgs?.mergeInfo
|
|
53656
53805
|
};
|
|
53657
53806
|
table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_CELL, cellsEvent);
|
|
53658
53807
|
}
|
|
@@ -53686,6 +53835,11 @@
|
|
|
53686
53835
|
});
|
|
53687
53836
|
scenegraph.component.vScrollBar.addEventListener('pointerdown', (e) => {
|
|
53688
53837
|
e.stopPropagation();
|
|
53838
|
+
if (scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
53839
|
+
scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53840
|
+
event: e.nativeEvent
|
|
53841
|
+
});
|
|
53842
|
+
}
|
|
53689
53843
|
});
|
|
53690
53844
|
scenegraph.component.vScrollBar.addEventListener('scrollDown', (e) => {
|
|
53691
53845
|
scenegraph.table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
@@ -53723,6 +53877,11 @@
|
|
|
53723
53877
|
});
|
|
53724
53878
|
scenegraph.component.hScrollBar.addEventListener('pointerdown', (e) => {
|
|
53725
53879
|
e.stopPropagation();
|
|
53880
|
+
if (scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
53881
|
+
scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53882
|
+
event: e.nativeEvent
|
|
53883
|
+
});
|
|
53884
|
+
}
|
|
53726
53885
|
});
|
|
53727
53886
|
scenegraph.component.hScrollBar.addEventListener('scrollDown', (e) => {
|
|
53728
53887
|
scenegraph.table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
@@ -56234,6 +56393,19 @@
|
|
|
56234
56393
|
return CheckboxStyle;
|
|
56235
56394
|
}
|
|
56236
56395
|
}
|
|
56396
|
+
setTableColumnsEditor() {
|
|
56397
|
+
const setEditor = (colDefines, setColumns) => {
|
|
56398
|
+
colDefines?.forEach((colDefine, index) => {
|
|
56399
|
+
if (colDefine.editor) {
|
|
56400
|
+
setColumns[index].editor = colDefine.editor;
|
|
56401
|
+
}
|
|
56402
|
+
if (colDefine.columns) {
|
|
56403
|
+
setEditor(colDefine.columns, setColumns[index].columns);
|
|
56404
|
+
}
|
|
56405
|
+
});
|
|
56406
|
+
};
|
|
56407
|
+
setEditor(this._table.options.columns, this._table.internalProps.columns);
|
|
56408
|
+
}
|
|
56237
56409
|
}
|
|
56238
56410
|
|
|
56239
56411
|
class BaseTooltip {
|
|
@@ -58269,7 +58441,7 @@
|
|
|
58269
58441
|
return TABLE_EVENT_TYPE;
|
|
58270
58442
|
}
|
|
58271
58443
|
options;
|
|
58272
|
-
version = "0.
|
|
58444
|
+
version = "1.0.0";
|
|
58273
58445
|
pagination;
|
|
58274
58446
|
id = `VTable${Date.now()}`;
|
|
58275
58447
|
headerStyleCache;
|
|
@@ -58692,8 +58864,21 @@
|
|
|
58692
58864
|
let heightP = 0;
|
|
58693
58865
|
if (Env.mode === 'browser') {
|
|
58694
58866
|
const element = this.getElement();
|
|
58695
|
-
|
|
58696
|
-
|
|
58867
|
+
let widthWithoutPadding = 0;
|
|
58868
|
+
let heightWithoutPadding = 0;
|
|
58869
|
+
if (element.parentElement) {
|
|
58870
|
+
const computedStyle = element.parentElement.style || window.getComputedStyle(element.parentElement);
|
|
58871
|
+
widthWithoutPadding =
|
|
58872
|
+
element.parentElement.offsetWidth -
|
|
58873
|
+
parseInt(computedStyle.paddingLeft || '0px', 10) -
|
|
58874
|
+
parseInt(computedStyle.paddingRight || '0px', 10);
|
|
58875
|
+
heightWithoutPadding =
|
|
58876
|
+
element.parentElement.offsetHeight -
|
|
58877
|
+
parseInt(computedStyle.paddingTop || '0px', 10) -
|
|
58878
|
+
parseInt(computedStyle.paddingBottom || '0px', 20);
|
|
58879
|
+
}
|
|
58880
|
+
const width1 = widthWithoutPadding ?? 1 - 1;
|
|
58881
|
+
const height1 = heightWithoutPadding ?? 1 - 1;
|
|
58697
58882
|
element.style.width = (width1 && `${width1 - padding.left - padding.right}px`) || '0px';
|
|
58698
58883
|
element.style.height = (height1 && `${height1 - padding.top - padding.bottom}px`) || '0px';
|
|
58699
58884
|
const { canvas } = this.internalProps;
|
|
@@ -58769,6 +58954,24 @@
|
|
|
58769
58954
|
}
|
|
58770
58955
|
getRowHeight(row) {
|
|
58771
58956
|
if (isValid$3(this.rowHeightsMap.get(row))) {
|
|
58957
|
+
if (this.options.customConfig?._disableColumnAndRowSizeRound) {
|
|
58958
|
+
const height = this.rowHeightsMap.get(row);
|
|
58959
|
+
let heightRange;
|
|
58960
|
+
if (row < this.frozenRowCount) {
|
|
58961
|
+
heightRange = this.rowHeightsMap.getSumInRange(0, row);
|
|
58962
|
+
}
|
|
58963
|
+
else if (row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
58964
|
+
heightRange = this.rowHeightsMap.getSumInRange(row, this.rowCount - 1);
|
|
58965
|
+
}
|
|
58966
|
+
else {
|
|
58967
|
+
heightRange = this.rowHeightsMap.getSumInRange(this.frozenRowCount, row);
|
|
58968
|
+
}
|
|
58969
|
+
heightRange = Number(heightRange.toFixed(2));
|
|
58970
|
+
if (Number.isInteger(heightRange)) {
|
|
58971
|
+
return Math.ceil(height);
|
|
58972
|
+
}
|
|
58973
|
+
return Math.floor(height);
|
|
58974
|
+
}
|
|
58772
58975
|
return this.rowHeightsMap.get(row);
|
|
58773
58976
|
}
|
|
58774
58977
|
const defaultHeight = this.getDefaultRowHeight(row);
|
|
@@ -58807,7 +59010,7 @@
|
|
|
58807
59010
|
return this.internalProps.defaultRowHeight;
|
|
58808
59011
|
}
|
|
58809
59012
|
_setRowHeight(row, height, clearCache) {
|
|
58810
|
-
this.rowHeightsMap.put(row, Math.round(height));
|
|
59013
|
+
this.rowHeightsMap.put(row, this.options.customConfig?._disableColumnAndRowSizeRound ? height : Math.round(height));
|
|
58811
59014
|
if (clearCache) {
|
|
58812
59015
|
this._clearRowRangeHeightsMap(row);
|
|
58813
59016
|
}
|
|
@@ -58839,6 +59042,24 @@
|
|
|
58839
59042
|
}
|
|
58840
59043
|
}
|
|
58841
59044
|
else {
|
|
59045
|
+
if (this.options.customConfig?._disableColumnAndRowSizeRound) {
|
|
59046
|
+
const tempH = this.rowHeightsMap.getSumInRange(startRow, endRow);
|
|
59047
|
+
let heightRange;
|
|
59048
|
+
if (endRow < this.frozenRowCount) {
|
|
59049
|
+
heightRange = this.rowHeightsMap.getSumInRange(0, endRow);
|
|
59050
|
+
}
|
|
59051
|
+
else if (endRow >= this.rowCount - this.bottomFrozenRowCount) {
|
|
59052
|
+
heightRange = this.rowHeightsMap.getSumInRange(endRow, this.rowCount - 1);
|
|
59053
|
+
}
|
|
59054
|
+
else {
|
|
59055
|
+
heightRange = this.rowHeightsMap.getSumInRange(this.frozenRowCount, endRow);
|
|
59056
|
+
}
|
|
59057
|
+
heightRange = Number(heightRange.toFixed(2));
|
|
59058
|
+
if (Number.isInteger(heightRange)) {
|
|
59059
|
+
return Math.ceil(tempH);
|
|
59060
|
+
}
|
|
59061
|
+
return Math.floor(tempH);
|
|
59062
|
+
}
|
|
58842
59063
|
h = this.rowHeightsMap.getSumInRange(startRow, endRow);
|
|
58843
59064
|
}
|
|
58844
59065
|
return Math.round(h);
|
|
@@ -60758,7 +60979,7 @@
|
|
|
60758
60979
|
const c = this.scenegraph.stage.toCanvas();
|
|
60759
60980
|
return c.toDataURL();
|
|
60760
60981
|
}
|
|
60761
|
-
exportCellImg(col, row) {
|
|
60982
|
+
exportCellImg(col, row, options) {
|
|
60762
60983
|
const isInView = this.cellIsInVisualView(col, row);
|
|
60763
60984
|
const { scrollTop, scrollLeft } = this;
|
|
60764
60985
|
if (!isInView) {
|
|
@@ -60772,16 +60993,43 @@
|
|
|
60772
60993
|
this.stateManager.updateHoverPos(-1, -1);
|
|
60773
60994
|
this.scenegraph.component.hideVerticalScrollBar();
|
|
60774
60995
|
this.scenegraph.component.hideHorizontalScrollBar();
|
|
60996
|
+
this.scenegraph.tableGroup.border.setAttribute('visible', false);
|
|
60997
|
+
let oldFill;
|
|
60998
|
+
if (options?.disableBackground) {
|
|
60999
|
+
const cellGroup = this.scenegraph.getCell(col, row);
|
|
61000
|
+
oldFill = cellGroup.attribute.fill;
|
|
61001
|
+
cellGroup.setAttribute('fill', 'transparent');
|
|
61002
|
+
}
|
|
61003
|
+
let oldStroke;
|
|
61004
|
+
if (options?.disableBorder) {
|
|
61005
|
+
const cellGroup = this.scenegraph.getCell(col, row);
|
|
61006
|
+
oldStroke = cellGroup.attribute.stroke;
|
|
61007
|
+
cellGroup.setAttribute('stroke', false);
|
|
61008
|
+
}
|
|
60775
61009
|
this.scenegraph.renderSceneGraph();
|
|
60776
|
-
|
|
61010
|
+
let sizeOffset = 0;
|
|
61011
|
+
if (this.theme.cellBorderClipDirection === 'bottom-right') {
|
|
61012
|
+
sizeOffset = 1;
|
|
61013
|
+
}
|
|
61014
|
+
const c = this.scenegraph.stage.toCanvas(false, new AABBBounds().set(cellRect.left + this.tableX + 1, cellRect.top + this.tableY + 1, cellRect.right + this.tableX - sizeOffset, cellRect.bottom + this.tableY - sizeOffset));
|
|
60777
61015
|
if (!isInView) {
|
|
60778
61016
|
this.setScrollTop(scrollTop);
|
|
60779
61017
|
this.setScrollLeft(scrollLeft);
|
|
60780
61018
|
}
|
|
61019
|
+
this.scenegraph.tableGroup.border.setAttribute('visible', true);
|
|
61020
|
+
if (oldFill) {
|
|
61021
|
+
const cellGroup = this.scenegraph.getCell(col, row);
|
|
61022
|
+
cellGroup.setAttribute('fill', oldFill);
|
|
61023
|
+
}
|
|
61024
|
+
if (oldStroke) {
|
|
61025
|
+
const cellGroup = this.scenegraph.getCell(col, row);
|
|
61026
|
+
cellGroup.setAttribute('stroke', oldStroke);
|
|
61027
|
+
}
|
|
60781
61028
|
if (this.stateManager.select?.ranges?.length > 0) {
|
|
60782
61029
|
restoreCellSelectBorder(this.scenegraph);
|
|
60783
61030
|
}
|
|
60784
61031
|
this.stateManager.updateHoverPos(hoverCol, hoverRow);
|
|
61032
|
+
this.scenegraph.updateNextFrame();
|
|
60785
61033
|
return c.toDataURL();
|
|
60786
61034
|
}
|
|
60787
61035
|
exportCellRangeImg(cellRange) {
|
|
@@ -61874,37 +62122,17 @@
|
|
|
61874
62122
|
function parseColKeyRowKeyForPivotTable(table, options) {
|
|
61875
62123
|
let columnDimensionTree;
|
|
61876
62124
|
let rowDimensionTree;
|
|
61877
|
-
let isNeedResetColumnDimensionTree = true;
|
|
61878
|
-
let isNeedResetRowDimensionTree = true;
|
|
61879
62125
|
if (options.columnTree) {
|
|
61880
62126
|
if (table.options.indicatorsAsCol !== false && table.options.supplementIndicatorNodes !== false) {
|
|
61881
|
-
supplementIndicatorNodesForCustomTree(table.internalProps.columnTree, options.indicators);
|
|
62127
|
+
table.internalProps.columnTree = supplementIndicatorNodesForCustomTree(table.internalProps.columnTree, options.indicators);
|
|
61882
62128
|
}
|
|
61883
62129
|
columnDimensionTree = new DimensionTree(table.internalProps.columnTree ?? [], table.layoutNodeId);
|
|
61884
|
-
if (table.options.supplementIndicatorNodes !== false &&
|
|
61885
|
-
table.options.indicatorsAsCol !== false &&
|
|
61886
|
-
!columnDimensionTree.dimensionKeys.contain(IndicatorDimensionKeyPlaceholder) &&
|
|
61887
|
-
options.indicators?.length >= 1) {
|
|
61888
|
-
isNeedResetColumnDimensionTree = true;
|
|
61889
|
-
}
|
|
61890
|
-
else {
|
|
61891
|
-
isNeedResetColumnDimensionTree = false;
|
|
61892
|
-
}
|
|
61893
62130
|
}
|
|
61894
62131
|
if (options.rowTree) {
|
|
61895
62132
|
if (table.options.indicatorsAsCol === false && table.options.supplementIndicatorNodes !== false) {
|
|
61896
|
-
supplementIndicatorNodesForCustomTree(table.internalProps.rowTree, options.indicators);
|
|
62133
|
+
table.internalProps.rowTree = supplementIndicatorNodesForCustomTree(table.internalProps.rowTree, options.indicators);
|
|
61897
62134
|
}
|
|
61898
62135
|
rowDimensionTree = new DimensionTree(table.internalProps.rowTree ?? [], table.layoutNodeId, table.options.rowHierarchyType, table.options.rowHierarchyType === 'tree' ? table.options.rowExpandLevel ?? 1 : undefined);
|
|
61899
|
-
if (table.options.supplementIndicatorNodes !== false &&
|
|
61900
|
-
table.options.indicatorsAsCol === false &&
|
|
61901
|
-
!rowDimensionTree.dimensionKeys.contain(IndicatorDimensionKeyPlaceholder) &&
|
|
61902
|
-
options.indicators?.length >= 1) {
|
|
61903
|
-
isNeedResetRowDimensionTree = true;
|
|
61904
|
-
}
|
|
61905
|
-
else {
|
|
61906
|
-
isNeedResetRowDimensionTree = false;
|
|
61907
|
-
}
|
|
61908
62136
|
}
|
|
61909
62137
|
const rowKeys = rowDimensionTree?.dimensionKeys?.count
|
|
61910
62138
|
? rowDimensionTree.dimensionKeys.valueArr()
|
|
@@ -61984,8 +62212,6 @@
|
|
|
61984
62212
|
rowKeys,
|
|
61985
62213
|
columnKeys,
|
|
61986
62214
|
indicatorKeys,
|
|
61987
|
-
isNeedResetColumnDimensionTree,
|
|
61988
|
-
isNeedResetRowDimensionTree,
|
|
61989
62215
|
columnDimensionTree,
|
|
61990
62216
|
rowDimensionTree
|
|
61991
62217
|
};
|
|
@@ -63505,13 +63731,6 @@
|
|
|
63505
63731
|
startEditCell(col, row) {
|
|
63506
63732
|
const editor = this.table.getEditor(col, row);
|
|
63507
63733
|
if (editor) {
|
|
63508
|
-
if (!this.table.isHeader(col, row)) {
|
|
63509
|
-
const range = this.table.getCellRange(col, row);
|
|
63510
|
-
const isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
|
|
63511
|
-
if (isMerge) {
|
|
63512
|
-
return;
|
|
63513
|
-
}
|
|
63514
|
-
}
|
|
63515
63734
|
if (this.table.internalProps.layoutMap?.isAggregation?.(col, row)) {
|
|
63516
63735
|
return;
|
|
63517
63736
|
}
|
|
@@ -63559,7 +63778,16 @@
|
|
|
63559
63778
|
if (!this.editingEditor.getValue) ;
|
|
63560
63779
|
if (!this.editingEditor.validateValue || this.editingEditor.validateValue?.()) {
|
|
63561
63780
|
const changedValue = this.editingEditor.getValue?.();
|
|
63562
|
-
this.table.
|
|
63781
|
+
const range = this.table.getCellRange(this.editCell.col, this.editCell.row);
|
|
63782
|
+
const changedValues = [];
|
|
63783
|
+
for (let row = range.start.row; row <= range.end.row; row++) {
|
|
63784
|
+
const rowChangedValues = [];
|
|
63785
|
+
for (let col = range.start.col; col <= range.end.col; col++) {
|
|
63786
|
+
rowChangedValues.push(changedValue);
|
|
63787
|
+
}
|
|
63788
|
+
changedValues.push(rowChangedValues);
|
|
63789
|
+
}
|
|
63790
|
+
this.table.changeCellValues(range.start.col, range.start.row, changedValues);
|
|
63563
63791
|
this.editingEditor.exit && (void 0);
|
|
63564
63792
|
this.editingEditor.exit?.();
|
|
63565
63793
|
this.editingEditor.onEnd?.();
|
|
@@ -63603,11 +63831,7 @@
|
|
|
63603
63831
|
: options.header
|
|
63604
63832
|
? cloneDeepSpec(options.header)
|
|
63605
63833
|
: [];
|
|
63606
|
-
|
|
63607
|
-
if (colDefine.editor) {
|
|
63608
|
-
internalProps.columns[index].editor = colDefine.editor;
|
|
63609
|
-
}
|
|
63610
|
-
});
|
|
63834
|
+
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
63611
63835
|
this.showHeader = options.showHeader ?? true;
|
|
63612
63836
|
this.transpose = options.transpose ?? false;
|
|
63613
63837
|
if (Env.mode !== 'node') {
|
|
@@ -63652,11 +63876,7 @@
|
|
|
63652
63876
|
updateColumns(columns) {
|
|
63653
63877
|
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
63654
63878
|
this.internalProps.columns = cloneDeepSpec(columns);
|
|
63655
|
-
|
|
63656
|
-
if (colDefine.editor) {
|
|
63657
|
-
this.internalProps.columns[index].editor = colDefine.editor;
|
|
63658
|
-
}
|
|
63659
|
-
});
|
|
63879
|
+
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
63660
63880
|
this.options.columns = columns;
|
|
63661
63881
|
this.refreshHeader();
|
|
63662
63882
|
this.scenegraph.clearCells();
|
|
@@ -63823,9 +64043,13 @@
|
|
|
63823
64043
|
if (ifCan) {
|
|
63824
64044
|
if (!this.transpose) {
|
|
63825
64045
|
const cellDefine = this.internalProps.layoutMap.getBody(col, this.columnHeaderLevelCount);
|
|
64046
|
+
const isSeriesNumber = this.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
63826
64047
|
if (cellDefine?.disableColumnResize) {
|
|
63827
64048
|
return false;
|
|
63828
64049
|
}
|
|
64050
|
+
else if (isSeriesNumber && this.internalProps.rowSeriesNumber.disableColumnResize === true) {
|
|
64051
|
+
return false;
|
|
64052
|
+
}
|
|
63829
64053
|
}
|
|
63830
64054
|
}
|
|
63831
64055
|
return ifCan;
|
|
@@ -63843,11 +64067,7 @@
|
|
|
63843
64067
|
: options.header
|
|
63844
64068
|
? cloneDeepSpec(options.header)
|
|
63845
64069
|
: [];
|
|
63846
|
-
|
|
63847
|
-
if (colDefine.editor) {
|
|
63848
|
-
internalProps.columns[index].editor = colDefine.editor;
|
|
63849
|
-
}
|
|
63850
|
-
});
|
|
64070
|
+
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
63851
64071
|
this.transpose = options.transpose ?? false;
|
|
63852
64072
|
this.refreshHeader();
|
|
63853
64073
|
if (internalProps.releaseList) {
|
|
@@ -64918,6 +65138,10 @@
|
|
|
64918
65138
|
cornerHeaderObjs;
|
|
64919
65139
|
columnHeaderObjs = [];
|
|
64920
65140
|
rowHeaderObjs = [];
|
|
65141
|
+
_cornerHeaderCellFullPathIds = [];
|
|
65142
|
+
_columnHeaderCellFullPathIds = [];
|
|
65143
|
+
_rowHeaderCellFullPathIds = [];
|
|
65144
|
+
_rowHeaderCellFullPathIds_FULL = [];
|
|
64921
65145
|
_cornerHeaderCellIds = [];
|
|
64922
65146
|
_columnHeaderCellIds = [];
|
|
64923
65147
|
_rowHeaderCellIds = [];
|
|
@@ -65041,7 +65265,7 @@
|
|
|
65041
65265
|
});
|
|
65042
65266
|
}
|
|
65043
65267
|
this.resetColumnHeaderLevelCount();
|
|
65044
|
-
this.
|
|
65268
|
+
this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL);
|
|
65045
65269
|
if (table.options.rowHierarchyType === 'tree' && this.extensionRows?.length >= 1) {
|
|
65046
65270
|
this.generateExtensionRowTree();
|
|
65047
65271
|
this.extensionRows.forEach(extensionRow => {
|
|
@@ -65097,6 +65321,7 @@
|
|
|
65097
65321
|
else {
|
|
65098
65322
|
this._indicatorShowType = 'none';
|
|
65099
65323
|
}
|
|
65324
|
+
this.generateCellIdsConsiderHideHeader();
|
|
65100
65325
|
this.setPagination(table.options.pagination);
|
|
65101
65326
|
if (this._table.isPivotChart()) {
|
|
65102
65327
|
this._chartItemSpanSize = 0;
|
|
@@ -65181,13 +65406,13 @@
|
|
|
65181
65406
|
}
|
|
65182
65407
|
_generateColHeaderIds() {
|
|
65183
65408
|
if (this.columnDimensionTree.tree.children?.length >= 1) {
|
|
65184
|
-
this._addHeaders(this.
|
|
65409
|
+
this._addHeaders(this._columnHeaderCellFullPathIds, 0, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs);
|
|
65185
65410
|
}
|
|
65186
65411
|
if (this.columnHeaderTitle) {
|
|
65187
65412
|
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
65188
65413
|
const id = ++this.sharedVar.seqId;
|
|
65189
65414
|
const firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
|
|
65190
|
-
this.
|
|
65415
|
+
this._columnHeaderCellFullPathIds.unshift(firstRowIds);
|
|
65191
65416
|
const cell = {
|
|
65192
65417
|
id,
|
|
65193
65418
|
title: typeof this.columnHeaderTitle.title === 'string'
|
|
@@ -65214,17 +65439,17 @@
|
|
|
65214
65439
|
_generateRowHeaderIds() {
|
|
65215
65440
|
if (this.rowDimensionTree.tree.children?.length >= 1) {
|
|
65216
65441
|
if (this.rowHierarchyType === 'tree') {
|
|
65217
|
-
this._addHeadersForTreeMode(this.
|
|
65442
|
+
this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, true, this.rowsDefine, this.rowHeaderObjs);
|
|
65218
65443
|
}
|
|
65219
65444
|
else {
|
|
65220
|
-
this._addHeaders(this.
|
|
65445
|
+
this._addHeaders(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs);
|
|
65221
65446
|
}
|
|
65222
65447
|
}
|
|
65223
65448
|
if (this.rowHeaderTitle) {
|
|
65224
65449
|
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
65225
65450
|
const id = ++this.sharedVar.seqId;
|
|
65226
|
-
const firstColIds = Array(this.
|
|
65227
|
-
this.
|
|
65451
|
+
const firstColIds = Array(this._rowHeaderCellFullPathIds_FULL[0]?.length ?? this.rowDimensionTree.tree.size).fill(id);
|
|
65452
|
+
this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
|
|
65228
65453
|
const cell = {
|
|
65229
65454
|
id,
|
|
65230
65455
|
title: typeof this.rowHeaderTitle.title === 'string'
|
|
@@ -65326,19 +65551,19 @@
|
|
|
65326
65551
|
results[id] = cell;
|
|
65327
65552
|
this._headerObjects[id] = cell;
|
|
65328
65553
|
if (this.cornerSetting.titleOnDimension === 'column') {
|
|
65329
|
-
if (!this.
|
|
65330
|
-
this.
|
|
65554
|
+
if (!this._cornerHeaderCellFullPathIds[key]) {
|
|
65555
|
+
this._cornerHeaderCellFullPathIds[key] = [];
|
|
65331
65556
|
}
|
|
65332
65557
|
for (let r = 0; r < this.rowHeaderLevelCount; r++) {
|
|
65333
|
-
this.
|
|
65558
|
+
this._cornerHeaderCellFullPathIds[key][r] = id;
|
|
65334
65559
|
}
|
|
65335
65560
|
}
|
|
65336
65561
|
else if (this.cornerSetting.titleOnDimension === 'row') {
|
|
65337
65562
|
for (let r = 0; r < this.columnHeaderLevelCount; r++) {
|
|
65338
|
-
if (!this.
|
|
65339
|
-
this.
|
|
65563
|
+
if (!this._cornerHeaderCellFullPathIds[r]) {
|
|
65564
|
+
this._cornerHeaderCellFullPathIds[r] = [];
|
|
65340
65565
|
}
|
|
65341
|
-
this.
|
|
65566
|
+
this._cornerHeaderCellFullPathIds[r][key] = id;
|
|
65342
65567
|
}
|
|
65343
65568
|
}
|
|
65344
65569
|
});
|
|
@@ -65363,10 +65588,10 @@
|
|
|
65363
65588
|
this._headerObjects[id] = cell;
|
|
65364
65589
|
for (let r = 0; r < this.columnHeaderLevelCount; r++) {
|
|
65365
65590
|
for (let j = 0; j < this.rowHeaderLevelCount; j++) {
|
|
65366
|
-
if (!this.
|
|
65367
|
-
this.
|
|
65591
|
+
if (!this._cornerHeaderCellFullPathIds[r]) {
|
|
65592
|
+
this._cornerHeaderCellFullPathIds[r] = [];
|
|
65368
65593
|
}
|
|
65369
|
-
this.
|
|
65594
|
+
this._cornerHeaderCellFullPathIds[r][j] = id;
|
|
65370
65595
|
}
|
|
65371
65596
|
}
|
|
65372
65597
|
}
|
|
@@ -65374,8 +65599,8 @@
|
|
|
65374
65599
|
}
|
|
65375
65600
|
generateExtensionRowTree() {
|
|
65376
65601
|
this.extensionRows.forEach((extensionRow, indexP) => {
|
|
65377
|
-
const old_rowHeaderCellIds = this.
|
|
65378
|
-
this.
|
|
65602
|
+
const old_rowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL;
|
|
65603
|
+
this._rowHeaderCellFullPathIds_FULL = [];
|
|
65379
65604
|
old_rowHeaderCellIds.forEach((row_ids, index) => {
|
|
65380
65605
|
const key = row_ids[row_ids.length - 1];
|
|
65381
65606
|
this.colIndex = 0;
|
|
@@ -65401,7 +65626,7 @@
|
|
|
65401
65626
|
const extensionRowTreeHeaderIds = [];
|
|
65402
65627
|
this._addHeadersForTreeMode(extensionRowTreeHeaderIds, 0, rowExtensionDimensionTree.tree.children, [], rowExtensionDimensionTree.totalLevel, true, extensionRow.rows, this.rowHeaderObjs);
|
|
65403
65628
|
for (let i = 0; i < extensionRowTreeHeaderIds[0].length; i++) {
|
|
65404
|
-
this.
|
|
65629
|
+
this._rowHeaderCellFullPathIds_FULL.push(row_ids.concat(extensionRowTreeHeaderIds[0][i]));
|
|
65405
65630
|
}
|
|
65406
65631
|
});
|
|
65407
65632
|
});
|
|
@@ -65741,7 +65966,7 @@
|
|
|
65741
65966
|
this.columnHeaderLevelCount = count;
|
|
65742
65967
|
return;
|
|
65743
65968
|
}
|
|
65744
|
-
this.columnHeaderLevelCount = 0;
|
|
65969
|
+
this.columnHeaderLevelCount = !this.indicatorsAsCol ? 0 : this.hideIndicatorName ? 0 : 1;
|
|
65745
65970
|
return;
|
|
65746
65971
|
}
|
|
65747
65972
|
resetRowHeaderLevelCount() {
|
|
@@ -66118,7 +66343,7 @@
|
|
|
66118
66343
|
}
|
|
66119
66344
|
if (col >= 0 && recordRow >= 0) {
|
|
66120
66345
|
if (this.rowHierarchyType === 'tree') {
|
|
66121
|
-
const row_pathIds = this.
|
|
66346
|
+
const row_pathIds = this._rowHeaderCellFullPathIds[recordRow];
|
|
66122
66347
|
let findTree = this.rowDimensionTree;
|
|
66123
66348
|
let level = 0;
|
|
66124
66349
|
while (findTree) {
|
|
@@ -66240,7 +66465,7 @@
|
|
|
66240
66465
|
return this.isColumnIndicatorHeader(col, row) || this.isRowIndicatorHeader(col, row);
|
|
66241
66466
|
}
|
|
66242
66467
|
toggleHierarchyState(col, row) {
|
|
66243
|
-
const oldRowHeaderCellIds = this.
|
|
66468
|
+
const oldRowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL.slice(0);
|
|
66244
66469
|
const oldRowHeaderCellPositons = oldRowHeaderCellIds.map((id, row) => {
|
|
66245
66470
|
return { col, row: row + this.columnHeaderLevelCount };
|
|
66246
66471
|
});
|
|
@@ -66248,15 +66473,15 @@
|
|
|
66248
66473
|
hd.define.hierarchyState =
|
|
66249
66474
|
hd.define.hierarchyState === HierarchyState.collapse ? HierarchyState.expand : HierarchyState.collapse;
|
|
66250
66475
|
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children, true);
|
|
66251
|
-
this.
|
|
66476
|
+
this._rowHeaderCellFullPathIds_FULL = [];
|
|
66252
66477
|
this.rowDimensionKeys = this.rowDimensionTree.dimensionKeys.valueArr();
|
|
66253
66478
|
this.fullRowDimensionKeys = [];
|
|
66254
66479
|
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys);
|
|
66255
|
-
this._addHeadersForTreeMode(this.
|
|
66480
|
+
this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, true, this.rowsDefine, this.rowHeaderObjs);
|
|
66256
66481
|
if (this.rowHeaderTitle) {
|
|
66257
66482
|
const id = ++this.sharedVar.seqId;
|
|
66258
66483
|
const firstColIds = Array(this.rowCount - this.columnHeaderLevelCount).fill(id);
|
|
66259
|
-
this.
|
|
66484
|
+
this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
|
|
66260
66485
|
const cell = {
|
|
66261
66486
|
id,
|
|
66262
66487
|
title: typeof this.rowHeaderTitle.title === 'string'
|
|
@@ -66281,7 +66506,7 @@
|
|
|
66281
66506
|
this.rowHeaderObjs.push(cell);
|
|
66282
66507
|
this._headerObjects[id] = cell;
|
|
66283
66508
|
}
|
|
66284
|
-
this.
|
|
66509
|
+
this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL);
|
|
66285
66510
|
if (this.rowHierarchyType === 'tree' && this.extensionRows?.length >= 1) {
|
|
66286
66511
|
this.generateExtensionRowTree();
|
|
66287
66512
|
}
|
|
@@ -66292,8 +66517,9 @@
|
|
|
66292
66517
|
}, {});
|
|
66293
66518
|
this._CellHeaderPathMap = new Map();
|
|
66294
66519
|
this._largeCellRangeCache.length = 0;
|
|
66295
|
-
const diffCell = diffCellAddress(col, row, oldRowHeaderCellIds.map(oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount]), this.
|
|
66296
|
-
this.
|
|
66520
|
+
const diffCell = diffCellAddress(col, row, oldRowHeaderCellIds.map(oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount]), this._rowHeaderCellFullPathIds_FULL.map(newCellId => newCellId[col - this.leftRowSeriesNumberColumnCount]), oldRowHeaderCellPositons, this);
|
|
66521
|
+
this.generateCellIdsConsiderHideHeader();
|
|
66522
|
+
this.setPagination(this.pagination);
|
|
66297
66523
|
return diffCell;
|
|
66298
66524
|
}
|
|
66299
66525
|
isHeaderForColWidth(col, row) {
|
|
@@ -66516,10 +66742,10 @@
|
|
|
66516
66742
|
if (targetIndex === sourceCellRange.start.col) {
|
|
66517
66743
|
return null;
|
|
66518
66744
|
}
|
|
66519
|
-
for (let row = 0; row < this.
|
|
66520
|
-
const sourceIds = this.
|
|
66745
|
+
for (let row = 0; row < this._columnHeaderCellFullPathIds.length; row++) {
|
|
66746
|
+
const sourceIds = this._columnHeaderCellFullPathIds[row].splice(sourceCellRange.start.col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
66521
66747
|
sourceIds.unshift(targetIndex - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount, 0);
|
|
66522
|
-
Array.prototype.splice.apply(this.
|
|
66748
|
+
Array.prototype.splice.apply(this._columnHeaderCellFullPathIds[row], sourceIds);
|
|
66523
66749
|
}
|
|
66524
66750
|
const sourceColumns = this._columnWidths.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
66525
66751
|
sourceColumns.unshift((targetIndex - this.leftRowSeriesNumberColumnCount), 0);
|
|
@@ -66556,9 +66782,15 @@
|
|
|
66556
66782
|
const sourceIds = this._rowHeaderCellIds.splice(sourceCellRange.start.row - this.columnHeaderLevelCount, sourceSize);
|
|
66557
66783
|
sourceIds.unshift((targetIndex - this.currentPageStartIndex), 0);
|
|
66558
66784
|
Array.prototype.splice.apply(this._rowHeaderCellIds, sourceIds);
|
|
66785
|
+
const sourceIds0 = this._rowHeaderCellFullPathIds.splice(sourceCellRange.start.row - this.columnHeaderLevelCount, sourceSize);
|
|
66786
|
+
sourceIds0.unshift((targetIndex - this.currentPageStartIndex), 0);
|
|
66787
|
+
Array.prototype.splice.apply(this._rowHeaderCellFullPathIds, sourceIds0);
|
|
66559
66788
|
const sourceIds_FULL = this._rowHeaderCellIds_FULL.splice(sourceCellRange.start.row - this.columnHeaderLevelCount + this.currentPageStartIndex, sourceSize);
|
|
66560
66789
|
sourceIds_FULL.unshift(targetIndex, 0);
|
|
66561
66790
|
Array.prototype.splice.apply(this._rowHeaderCellIds_FULL, sourceIds_FULL);
|
|
66791
|
+
const sourceIds_FULL0 = this._rowHeaderCellFullPathIds_FULL.splice(sourceCellRange.start.row - this.columnHeaderLevelCount + this.currentPageStartIndex, sourceSize);
|
|
66792
|
+
sourceIds_FULL0.unshift(targetIndex, 0);
|
|
66793
|
+
Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL, sourceIds_FULL0);
|
|
66562
66794
|
this.rowDimensionTree.movePosition(sourceRowHeaderPaths.length - 1, sourceCellRange.start.row - this.columnHeaderLevelCount, targetIndex + (target.row > source.row ? sourceRowHeaderNode.size - 1 : 0));
|
|
66563
66795
|
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children, true);
|
|
66564
66796
|
this._CellHeaderPathMap = new Map();
|
|
@@ -66834,11 +67066,13 @@
|
|
|
66834
67066
|
this.currentPageStartIndex = perPageCount * (currentPage || 0);
|
|
66835
67067
|
this.currentPageEndIndex = this.currentPageStartIndex + perPageCount;
|
|
66836
67068
|
this._rowHeaderCellIds = this._rowHeaderCellIds_FULL?.slice(this.currentPageStartIndex, this.currentPageEndIndex);
|
|
67069
|
+
this._rowHeaderCellFullPathIds = this._rowHeaderCellFullPathIds_FULL?.slice(this.currentPageStartIndex, this.currentPageEndIndex);
|
|
66837
67070
|
}
|
|
66838
67071
|
else {
|
|
66839
67072
|
this.currentPageStartIndex = 0;
|
|
66840
67073
|
this.currentPageEndIndex = this._rowHeaderCellIds_FULL.length;
|
|
66841
67074
|
this._rowHeaderCellIds = this._rowHeaderCellIds_FULL?.slice(this.currentPageStartIndex, this.currentPageEndIndex);
|
|
67075
|
+
this._rowHeaderCellFullPathIds = this._rowHeaderCellFullPathIds_FULL?.slice(this.currentPageStartIndex, this.currentPageEndIndex);
|
|
66842
67076
|
}
|
|
66843
67077
|
this.pagination && (this.pagination.totalCount = this._rowHeaderCellIds_FULL?.length);
|
|
66844
67078
|
}
|
|
@@ -67222,7 +67456,7 @@
|
|
|
67222
67456
|
return totalCount;
|
|
67223
67457
|
}
|
|
67224
67458
|
resetHeaderTree() {
|
|
67225
|
-
this.
|
|
67459
|
+
this._rowHeaderCellFullPathIds_FULL = [];
|
|
67226
67460
|
this._columnHeaderCellIds = [];
|
|
67227
67461
|
const dataset = this.dataset;
|
|
67228
67462
|
this.rowTree = dataset.rowHeaderTree;
|
|
@@ -67233,11 +67467,12 @@
|
|
|
67233
67467
|
this.colIndex = 0;
|
|
67234
67468
|
this._generateRowHeaderIds();
|
|
67235
67469
|
this.resetColumnHeaderLevelCount();
|
|
67236
|
-
this.
|
|
67470
|
+
this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL);
|
|
67237
67471
|
this._headerObjectMap = this._headerObjects.reduce((o, e) => {
|
|
67238
67472
|
o[e.id] = e;
|
|
67239
67473
|
return o;
|
|
67240
67474
|
}, {});
|
|
67475
|
+
this.generateCellIdsConsiderHideHeader();
|
|
67241
67476
|
this.setPagination(this.pagination);
|
|
67242
67477
|
}
|
|
67243
67478
|
isSeriesNumberInHeader(col, row) {
|
|
@@ -67315,6 +67550,75 @@
|
|
|
67315
67550
|
const id = this.getCellId(col, row);
|
|
67316
67551
|
this._headerObjectMap[id].title = value;
|
|
67317
67552
|
}
|
|
67553
|
+
generateCellIdsConsiderHideHeader() {
|
|
67554
|
+
this._columnHeaderCellIds = this._columnHeaderCellFullPathIds.slice();
|
|
67555
|
+
if (!this.showColumnHeader) {
|
|
67556
|
+
if (this.indicatorsAsCol && !this.hideIndicatorName) {
|
|
67557
|
+
const indicatorIndex = this.colDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
|
|
67558
|
+
const indicatorIds = this._columnHeaderCellIds.splice(indicatorIndex, 1);
|
|
67559
|
+
this._columnHeaderCellIds.splice(0, this._columnHeaderCellIds.length);
|
|
67560
|
+
this._columnHeaderCellIds.push(indicatorIds[0]);
|
|
67561
|
+
}
|
|
67562
|
+
else {
|
|
67563
|
+
this._columnHeaderCellIds.splice(0, this._columnHeaderCellIds.length);
|
|
67564
|
+
}
|
|
67565
|
+
}
|
|
67566
|
+
this._rowHeaderCellIds_FULL = this._rowHeaderCellFullPathIds_FULL.slice();
|
|
67567
|
+
if (!this.showRowHeader) {
|
|
67568
|
+
if (!this.indicatorsAsCol && !this.hideIndicatorName) {
|
|
67569
|
+
const indicatorIndex = this.rowDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
|
|
67570
|
+
this._rowHeaderCellIds_FULL.forEach((cellIds, index) => {
|
|
67571
|
+
const _cellIds = cellIds.slice();
|
|
67572
|
+
const indicator = _cellIds.splice(indicatorIndex, 1);
|
|
67573
|
+
_cellIds.splice(0, _cellIds.length);
|
|
67574
|
+
_cellIds.push(indicator[0]);
|
|
67575
|
+
this._rowHeaderCellIds_FULL[index] = _cellIds;
|
|
67576
|
+
});
|
|
67577
|
+
}
|
|
67578
|
+
else {
|
|
67579
|
+
this._rowHeaderCellIds_FULL.forEach((cellIds, index) => {
|
|
67580
|
+
const _cellIds = cellIds.slice();
|
|
67581
|
+
_cellIds.splice(0, _cellIds.length);
|
|
67582
|
+
this._rowHeaderCellIds_FULL[index] = _cellIds;
|
|
67583
|
+
});
|
|
67584
|
+
}
|
|
67585
|
+
}
|
|
67586
|
+
this._rowHeaderCellIds = this._rowHeaderCellIds_FULL.slice();
|
|
67587
|
+
this._cornerHeaderCellIds = this._cornerHeaderCellFullPathIds.slice();
|
|
67588
|
+
if (this.rowHeaderLevelCount === 0 || this.columnHeaderLevelCount === 0) {
|
|
67589
|
+
this._cornerHeaderCellIds = [];
|
|
67590
|
+
}
|
|
67591
|
+
else if (this.cornerSetting.titleOnDimension === 'row' && !this.showRowHeader) {
|
|
67592
|
+
if (!this.indicatorsAsCol && !this.hideIndicatorName) {
|
|
67593
|
+
const indicatorIndex = this.rowDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
|
|
67594
|
+
this._cornerHeaderCellIds.forEach((cellIds, index) => {
|
|
67595
|
+
const _cellIds = cellIds.slice();
|
|
67596
|
+
const indicator = _cellIds.splice(indicatorIndex, 1);
|
|
67597
|
+
_cellIds.splice(0, _cellIds.length);
|
|
67598
|
+
_cellIds.push(indicator[0]);
|
|
67599
|
+
this._cornerHeaderCellIds[index] = _cellIds;
|
|
67600
|
+
});
|
|
67601
|
+
}
|
|
67602
|
+
else {
|
|
67603
|
+
this._cornerHeaderCellIds.forEach((cellIds, index) => {
|
|
67604
|
+
const _cellIds = cellIds.slice();
|
|
67605
|
+
_cellIds.splice(0, _cellIds.length);
|
|
67606
|
+
this._cornerHeaderCellIds[index] = _cellIds;
|
|
67607
|
+
});
|
|
67608
|
+
}
|
|
67609
|
+
}
|
|
67610
|
+
else if (this.cornerSetting.titleOnDimension === 'column' && !this.showColumnHeader) {
|
|
67611
|
+
if (this.indicatorsAsCol && !this.hideIndicatorName) {
|
|
67612
|
+
const indicatorIndex = this.colDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
|
|
67613
|
+
const indicatorIds = this._cornerHeaderCellIds.splice(indicatorIndex, 1);
|
|
67614
|
+
this._cornerHeaderCellIds.splice(0, this._cornerHeaderCellIds.length);
|
|
67615
|
+
this._cornerHeaderCellIds.push(indicatorIds[0]);
|
|
67616
|
+
}
|
|
67617
|
+
else {
|
|
67618
|
+
this._cornerHeaderCellIds.splice(0, this._cornerHeaderCellIds.length);
|
|
67619
|
+
}
|
|
67620
|
+
}
|
|
67621
|
+
}
|
|
67318
67622
|
}
|
|
67319
67623
|
function scaleWholeRangeSize(count, bandwidth, paddingInner, paddingOuter) {
|
|
67320
67624
|
if (paddingInner === 1) {
|
|
@@ -68751,13 +69055,19 @@
|
|
|
68751
69055
|
}
|
|
68752
69056
|
else {
|
|
68753
69057
|
const keysResults = parseColKeyRowKeyForPivotTable(this, options);
|
|
68754
|
-
const { rowKeys, columnKeys, indicatorKeys
|
|
69058
|
+
const { rowKeys, columnKeys, indicatorKeys } = keysResults;
|
|
68755
69059
|
let { columnDimensionTree, rowDimensionTree } = keysResults;
|
|
68756
69060
|
this.dataset = new Dataset(this.internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, this.internalProps.indicators, options.indicatorsAsCol ?? true, options.records, options.rowHierarchyType, this.internalProps.columnTree, this.internalProps.rowTree);
|
|
68757
|
-
if (!options.columnTree
|
|
69061
|
+
if (!options.columnTree) {
|
|
69062
|
+
if (options.indicatorsAsCol !== false) {
|
|
69063
|
+
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
69064
|
+
}
|
|
68758
69065
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
68759
69066
|
}
|
|
68760
|
-
if (!options.rowTree
|
|
69067
|
+
if (!options.rowTree) {
|
|
69068
|
+
if (options.indicatorsAsCol === false) {
|
|
69069
|
+
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
69070
|
+
}
|
|
68761
69071
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
68762
69072
|
}
|
|
68763
69073
|
this.internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
@@ -68799,7 +69109,11 @@
|
|
|
68799
69109
|
_canResizeColumn(col, row) {
|
|
68800
69110
|
const ifCan = super._canResizeColumn(col, row);
|
|
68801
69111
|
if (ifCan) {
|
|
68802
|
-
|
|
69112
|
+
const isSeriesNumber = this.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
69113
|
+
if (isSeriesNumber && this.internalProps.rowSeriesNumber.disableColumnResize === true) {
|
|
69114
|
+
return false;
|
|
69115
|
+
}
|
|
69116
|
+
else if (!this.internalProps.layoutMap.indicatorsAsCol) {
|
|
68803
69117
|
const cellDefine = this.internalProps.layoutMap.getBody(col, this.columnHeaderLevelCount);
|
|
68804
69118
|
if (cellDefine?.disableColumnResize) {
|
|
68805
69119
|
return false;
|
|
@@ -68869,13 +69183,19 @@
|
|
|
68869
69183
|
}
|
|
68870
69184
|
else {
|
|
68871
69185
|
const keysResults = parseColKeyRowKeyForPivotTable(this, options);
|
|
68872
|
-
const { rowKeys, columnKeys, indicatorKeys
|
|
69186
|
+
const { rowKeys, columnKeys, indicatorKeys } = keysResults;
|
|
68873
69187
|
let { columnDimensionTree, rowDimensionTree } = keysResults;
|
|
68874
69188
|
this.dataset = new Dataset(internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, this.internalProps.indicators, options.indicatorsAsCol ?? true, records, options.rowHierarchyType, this.internalProps.columnTree, this.internalProps.rowTree);
|
|
68875
|
-
if (!options.columnTree
|
|
69189
|
+
if (!options.columnTree) {
|
|
69190
|
+
if (options.indicatorsAsCol !== false) {
|
|
69191
|
+
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
69192
|
+
}
|
|
68876
69193
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
68877
69194
|
}
|
|
68878
|
-
if (!options.rowTree
|
|
69195
|
+
if (!options.rowTree) {
|
|
69196
|
+
if (options.indicatorsAsCol === false) {
|
|
69197
|
+
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
69198
|
+
}
|
|
68879
69199
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
68880
69200
|
}
|
|
68881
69201
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
@@ -69796,13 +70116,13 @@
|
|
|
69796
70116
|
let rowDimensionTree;
|
|
69797
70117
|
if (options.columnTree) {
|
|
69798
70118
|
if (options.indicatorsAsCol !== false) {
|
|
69799
|
-
supplementIndicatorNodesForCustomTree(this.internalProps.columnTree, options.indicators);
|
|
70119
|
+
this.internalProps.columnTree = supplementIndicatorNodesForCustomTree(this.internalProps.columnTree, options.indicators);
|
|
69800
70120
|
}
|
|
69801
70121
|
columnDimensionTree = new DimensionTree(this.internalProps.columnTree ?? [], this.layoutNodeId);
|
|
69802
70122
|
}
|
|
69803
70123
|
if (options.rowTree) {
|
|
69804
70124
|
if (options.indicatorsAsCol === false) {
|
|
69805
|
-
supplementIndicatorNodesForCustomTree(this.internalProps.rowTree, options.indicators);
|
|
70125
|
+
this.internalProps.rowTree = supplementIndicatorNodesForCustomTree(this.internalProps.rowTree, options.indicators);
|
|
69806
70126
|
}
|
|
69807
70127
|
rowDimensionTree = new DimensionTree(this.internalProps.rowTree ?? [], this.layoutNodeId);
|
|
69808
70128
|
}
|
|
@@ -69869,6 +70189,16 @@
|
|
|
69869
70189
|
];
|
|
69870
70190
|
}
|
|
69871
70191
|
}
|
|
70192
|
+
if (!options.columnTree) {
|
|
70193
|
+
if (options.indicatorsAsCol !== false) {
|
|
70194
|
+
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
70195
|
+
}
|
|
70196
|
+
}
|
|
70197
|
+
if (!options.rowTree) {
|
|
70198
|
+
if (options.indicatorsAsCol === false) {
|
|
70199
|
+
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
70200
|
+
}
|
|
70201
|
+
}
|
|
69872
70202
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
69873
70203
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId);
|
|
69874
70204
|
this.internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
@@ -69934,13 +70264,13 @@
|
|
|
69934
70264
|
let rowDimensionTree;
|
|
69935
70265
|
if (options.columnTree) {
|
|
69936
70266
|
if (options.indicatorsAsCol !== false) {
|
|
69937
|
-
supplementIndicatorNodesForCustomTree(this.internalProps.columnTree, options.indicators);
|
|
70267
|
+
this.internalProps.columnTree = supplementIndicatorNodesForCustomTree(this.internalProps.columnTree, options.indicators);
|
|
69938
70268
|
}
|
|
69939
70269
|
columnDimensionTree = new DimensionTree(this.internalProps.columnTree ?? [], this.layoutNodeId);
|
|
69940
70270
|
}
|
|
69941
70271
|
if (options.rowTree) {
|
|
69942
70272
|
if (options.indicatorsAsCol === false) {
|
|
69943
|
-
supplementIndicatorNodesForCustomTree(this.internalProps.rowTree, options.indicators);
|
|
70273
|
+
this.internalProps.rowTree = supplementIndicatorNodesForCustomTree(this.internalProps.rowTree, options.indicators);
|
|
69944
70274
|
}
|
|
69945
70275
|
rowDimensionTree = new DimensionTree(this.internalProps.rowTree ?? [], this.layoutNodeId);
|
|
69946
70276
|
}
|
|
@@ -70007,6 +70337,16 @@
|
|
|
70007
70337
|
];
|
|
70008
70338
|
}
|
|
70009
70339
|
}
|
|
70340
|
+
if (!options.columnTree) {
|
|
70341
|
+
if (options.indicatorsAsCol !== false) {
|
|
70342
|
+
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
70343
|
+
}
|
|
70344
|
+
}
|
|
70345
|
+
if (!options.rowTree) {
|
|
70346
|
+
if (options.indicatorsAsCol === false) {
|
|
70347
|
+
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
70348
|
+
}
|
|
70349
|
+
}
|
|
70010
70350
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
70011
70351
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId);
|
|
70012
70352
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
@@ -71307,7 +71647,7 @@
|
|
|
71307
71647
|
}
|
|
71308
71648
|
|
|
71309
71649
|
registerForVrender();
|
|
71310
|
-
const version = "0.
|
|
71650
|
+
const version = "1.0.0";
|
|
71311
71651
|
function getIcons() {
|
|
71312
71652
|
return get$2();
|
|
71313
71653
|
}
|