@visactor/vtable 1.14.2 → 1.14.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.d.ts +2 -2
- package/cjs/ListTable.js +4 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.js +22 -6
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.js +3 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/event.js +3 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/list-table/checkbox.d.ts +2 -0
- package/cjs/event/list-table/checkbox.js +70 -0
- package/cjs/event/list-table/checkbox.js.map +1 -0
- package/cjs/header-helper/header-helper.js +18 -3
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/cell-range/simple-cell-range.js +3 -1
- package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
- package/cjs/layout/layout-helper.d.ts +2 -0
- package/cjs/layout/layout-helper.js +12 -2
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +6 -6
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.d.ts +6 -2
- package/cjs/layout/tree-helper.js +36 -17
- package/cjs/layout/tree-helper.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -2
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/checkbox/checkbox.d.ts +4 -3
- package/cjs/state/checkbox/checkbox.js +12 -5
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/state/state.d.ts +3 -3
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/update-row.js +2 -2
- package/cjs/tools/update-row.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +6 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +5 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +10 -2
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +2 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +288 -24
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +2 -2
- package/es/ListTable.js +4 -3
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.js +17 -7
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.js +3 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/event.js +4 -1
- package/es/event/event.js.map +1 -1
- package/es/event/list-table/checkbox.d.ts +2 -0
- package/es/event/list-table/checkbox.js +62 -0
- package/es/event/list-table/checkbox.js.map +1 -0
- package/es/header-helper/header-helper.js +18 -3
- 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/cell-range/simple-cell-range.js +3 -1
- package/es/layout/cell-range/simple-cell-range.js.map +1 -1
- package/es/layout/layout-helper.d.ts +2 -0
- package/es/layout/layout-helper.js +10 -1
- package/es/layout/layout-helper.js.map +1 -1
- package/es/layout/pivot-header-layout.js +6 -6
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/tree-helper.d.ts +6 -2
- package/es/layout/tree-helper.js +30 -13
- package/es/layout/tree-helper.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -1
- package/es/scenegraph/scenegraph.js +6 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/checkbox/checkbox.d.ts +4 -3
- package/es/state/checkbox/checkbox.js +9 -2
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/state/state.d.ts +3 -3
- package/es/state/state.js.map +1 -1
- package/es/tools/update-row.js +2 -2
- package/es/tools/update-row.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +6 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +5 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +10 -2
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +2 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -47836,7 +47836,14 @@
|
|
|
47836
47836
|
?.getChildren()
|
|
47837
47837
|
.forEach((node) => {
|
|
47838
47838
|
if (node.name === 'checkbox') {
|
|
47839
|
-
|
|
47839
|
+
if (checked === 'indeterminate') {
|
|
47840
|
+
node.setAttribute('indeterminate', true);
|
|
47841
|
+
node.setAttribute('checked', undefined);
|
|
47842
|
+
}
|
|
47843
|
+
else {
|
|
47844
|
+
node.setAttribute('indeterminate', undefined);
|
|
47845
|
+
node.setAttribute('checked', checked);
|
|
47846
|
+
}
|
|
47840
47847
|
}
|
|
47841
47848
|
});
|
|
47842
47849
|
});
|
|
@@ -47846,7 +47853,14 @@
|
|
|
47846
47853
|
columnGroup?.children?.forEach((cellNode) => {
|
|
47847
47854
|
cellNode.getChildren().find(node => {
|
|
47848
47855
|
if (node.name === 'checkbox') {
|
|
47849
|
-
|
|
47856
|
+
if (checked === 'indeterminate') {
|
|
47857
|
+
node.setAttribute('indeterminate', true);
|
|
47858
|
+
node.setAttribute('checked', undefined);
|
|
47859
|
+
}
|
|
47860
|
+
else {
|
|
47861
|
+
node.setAttribute('indeterminate', undefined);
|
|
47862
|
+
node.setAttribute('checked', checked);
|
|
47863
|
+
}
|
|
47850
47864
|
}
|
|
47851
47865
|
});
|
|
47852
47866
|
});
|
|
@@ -50332,7 +50346,7 @@
|
|
|
50332
50346
|
? state.table.getCustomMerge(tableIndex, row)
|
|
50333
50347
|
: state.table.getCustomMerge(col, tableIndex);
|
|
50334
50348
|
const data = state.table.dataSource?.get(index);
|
|
50335
|
-
if (mergeCell || data.vtableMerge) {
|
|
50349
|
+
if (mergeCell || (!state.table.internalProps.rowSeriesNumber?.enableTreeCheckbox && data.vtableMerge)) {
|
|
50336
50350
|
return;
|
|
50337
50351
|
}
|
|
50338
50352
|
if (check_state?.[field] !== true) {
|
|
@@ -50424,6 +50438,20 @@
|
|
|
50424
50438
|
}
|
|
50425
50439
|
}
|
|
50426
50440
|
}
|
|
50441
|
+
function setCellCheckboxStateByAttribute(col, row, checked, table) {
|
|
50442
|
+
const cellGroup = table.scenegraph.getCell(col, row);
|
|
50443
|
+
const checkbox = cellGroup?.getChildByName('checkbox');
|
|
50444
|
+
if (checkbox) {
|
|
50445
|
+
if (checked === 'indeterminate') {
|
|
50446
|
+
checkbox.setAttribute('indeterminate', true);
|
|
50447
|
+
checkbox.setAttribute('checked', undefined);
|
|
50448
|
+
}
|
|
50449
|
+
else {
|
|
50450
|
+
checkbox.setAttribute('indeterminate', undefined);
|
|
50451
|
+
checkbox.setAttribute('checked', checked);
|
|
50452
|
+
}
|
|
50453
|
+
}
|
|
50454
|
+
}
|
|
50427
50455
|
function changeCheckboxOrder(sourceIndex, targetIndex, state) {
|
|
50428
50456
|
const { checkedState, table } = state;
|
|
50429
50457
|
let source;
|
|
@@ -53946,6 +53974,102 @@
|
|
|
53946
53974
|
return 'bottom';
|
|
53947
53975
|
}
|
|
53948
53976
|
|
|
53977
|
+
function bindGroupTitleCheckboxChange(table) {
|
|
53978
|
+
table.on('checkbox_state_change', args => {
|
|
53979
|
+
if (table.internalProps.rowSeriesNumber?.enableTreeCheckbox !== true) {
|
|
53980
|
+
return;
|
|
53981
|
+
}
|
|
53982
|
+
const { col, row, checked } = args;
|
|
53983
|
+
const record = table.getCellOriginRecord(col, row);
|
|
53984
|
+
const indexedData = table.dataSource.currentPagerIndexedData;
|
|
53985
|
+
const titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
53986
|
+
let titleIndex = indexedData[titleShowIndex];
|
|
53987
|
+
if (isNumber$2(titleIndex)) {
|
|
53988
|
+
titleIndex = [titleIndex];
|
|
53989
|
+
}
|
|
53990
|
+
if (record.vtableMerge) {
|
|
53991
|
+
if (checked) {
|
|
53992
|
+
setAllChildrenCheckboxState(true, titleShowIndex, titleIndex, indexedData, table);
|
|
53993
|
+
updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
53994
|
+
}
|
|
53995
|
+
else {
|
|
53996
|
+
setAllChildrenCheckboxState(false, titleShowIndex, titleIndex, indexedData, table);
|
|
53997
|
+
updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
53998
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number;
|
|
53999
|
+
const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState('_vtable_rowSeries_number', col, row);
|
|
54000
|
+
if (oldHeaderCheckedState !== newHeaderCheckedState) {
|
|
54001
|
+
table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
54002
|
+
}
|
|
54003
|
+
}
|
|
54004
|
+
}
|
|
54005
|
+
else {
|
|
54006
|
+
updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
54007
|
+
}
|
|
54008
|
+
});
|
|
54009
|
+
}
|
|
54010
|
+
function setAllChildrenCheckboxState(state, titleShowIndex, titleIndex, indexedData, table) {
|
|
54011
|
+
let i = titleShowIndex + 1;
|
|
54012
|
+
while (isArray$1(indexedData[i]) && indexedData[i]?.length > titleIndex.length) {
|
|
54013
|
+
const row = table.columnHeaderLevelCount + i;
|
|
54014
|
+
table.stateManager.setCheckedState(0, row, '_vtable_rowSeries_number', state);
|
|
54015
|
+
setCellCheckboxStateByAttribute(0, row, state, table);
|
|
54016
|
+
i++;
|
|
54017
|
+
}
|
|
54018
|
+
}
|
|
54019
|
+
function updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table) {
|
|
54020
|
+
let parentLength = titleIndex.length - 1;
|
|
54021
|
+
if (parentLength > 0) {
|
|
54022
|
+
let i = titleShowIndex - 1;
|
|
54023
|
+
while (parentLength > 0 && i >= 0) {
|
|
54024
|
+
if ((isArray$1(indexedData[i]) && indexedData[i]?.length === parentLength) ||
|
|
54025
|
+
(parentLength === 1 && isNumber$2(indexedData[i]))) {
|
|
54026
|
+
const row = table.columnHeaderLevelCount + i;
|
|
54027
|
+
updateParentCheckboxState(0, row, indexedData[i], table);
|
|
54028
|
+
parentLength--;
|
|
54029
|
+
}
|
|
54030
|
+
i--;
|
|
54031
|
+
}
|
|
54032
|
+
}
|
|
54033
|
+
}
|
|
54034
|
+
function updateParentCheckboxState(col, row, currentIndex, table) {
|
|
54035
|
+
const { checkedState } = table.stateManager;
|
|
54036
|
+
const key = currentIndex.toString();
|
|
54037
|
+
const currentIndexLength = isArray$1(currentIndex) ? currentIndex.length : 1;
|
|
54038
|
+
let start = false;
|
|
54039
|
+
const result = [];
|
|
54040
|
+
checkedState.forEach((value, index) => {
|
|
54041
|
+
if (start) {
|
|
54042
|
+
const indexData = index.split(',');
|
|
54043
|
+
if (indexData.length === currentIndexLength) {
|
|
54044
|
+
start = false;
|
|
54045
|
+
}
|
|
54046
|
+
else {
|
|
54047
|
+
result.push(value._vtable_rowSeries_number);
|
|
54048
|
+
}
|
|
54049
|
+
}
|
|
54050
|
+
if (index === key) {
|
|
54051
|
+
start = true;
|
|
54052
|
+
}
|
|
54053
|
+
});
|
|
54054
|
+
if (result.length === 0) {
|
|
54055
|
+
return;
|
|
54056
|
+
}
|
|
54057
|
+
const allChecked = result.every(item => !!item);
|
|
54058
|
+
const allUnChecked = result.every(item => !item);
|
|
54059
|
+
if (allChecked) {
|
|
54060
|
+
table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', true);
|
|
54061
|
+
setCellCheckboxStateByAttribute(col, row, true, table);
|
|
54062
|
+
}
|
|
54063
|
+
else if (allUnChecked) {
|
|
54064
|
+
table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', false);
|
|
54065
|
+
setCellCheckboxStateByAttribute(col, row, false, table);
|
|
54066
|
+
}
|
|
54067
|
+
else {
|
|
54068
|
+
table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', 'indeterminate');
|
|
54069
|
+
setCellCheckboxStateByAttribute(col, row, 'indeterminate', table);
|
|
54070
|
+
}
|
|
54071
|
+
}
|
|
54072
|
+
|
|
53949
54073
|
class EventManager {
|
|
53950
54074
|
table;
|
|
53951
54075
|
isTouchdown;
|
|
@@ -54075,6 +54199,7 @@
|
|
|
54075
54199
|
bindSparklineHoverEvent(this.table);
|
|
54076
54200
|
bindAxisClickEvent(this.table);
|
|
54077
54201
|
bindAxisHoverEvent(this.table);
|
|
54202
|
+
bindGroupTitleCheckboxChange(this.table);
|
|
54078
54203
|
}
|
|
54079
54204
|
dealTableHover(eventArgsSet) {
|
|
54080
54205
|
if (!eventArgsSet) {
|
|
@@ -55694,7 +55819,14 @@
|
|
|
55694
55819
|
const icons = [];
|
|
55695
55820
|
if (this._table.isPivotTable()) {
|
|
55696
55821
|
const { showSort, sort } = this._table.internalProps.layoutMap.getHeader(col, row);
|
|
55697
|
-
|
|
55822
|
+
let _showSort;
|
|
55823
|
+
if (typeof showSort === 'function') {
|
|
55824
|
+
_showSort = showSort({ col, row, table: this._table });
|
|
55825
|
+
}
|
|
55826
|
+
else {
|
|
55827
|
+
_showSort = showSort;
|
|
55828
|
+
}
|
|
55829
|
+
if (_showSort) {
|
|
55698
55830
|
let order = this._table.getPivotSortState(col, row);
|
|
55699
55831
|
if (order) {
|
|
55700
55832
|
order = order.toUpperCase();
|
|
@@ -55820,9 +55952,18 @@
|
|
|
55820
55952
|
getSortIcon(order, _table, col, row) {
|
|
55821
55953
|
const icon = order === 'asc' ? this.upIcon : order === 'desc' ? this.downIcon : this.normalIcon;
|
|
55822
55954
|
const headerC = _table.getHeaderDefine(col, row);
|
|
55955
|
+
let _showSort;
|
|
55956
|
+
if (headerC) {
|
|
55957
|
+
if (typeof headerC.showSort === 'function') {
|
|
55958
|
+
_showSort = headerC.showSort({ col, row, table: this._table });
|
|
55959
|
+
}
|
|
55960
|
+
else {
|
|
55961
|
+
_showSort = headerC.showSort;
|
|
55962
|
+
}
|
|
55963
|
+
}
|
|
55823
55964
|
if (!headerC ||
|
|
55824
|
-
|
|
55825
|
-
(!isValid$1(
|
|
55965
|
+
_showSort === false ||
|
|
55966
|
+
(!isValid$1(_showSort) && !headerC.sort) ||
|
|
55826
55967
|
(headerC.columns && headerC.columns.length > 0)) {
|
|
55827
55968
|
return null;
|
|
55828
55969
|
}
|
|
@@ -55830,9 +55971,18 @@
|
|
|
55830
55971
|
}
|
|
55831
55972
|
getSortIconForPivotTable(order, _table, col, row) {
|
|
55832
55973
|
const headerC = _table.getHeaderDefine(col, row);
|
|
55974
|
+
let _showSort;
|
|
55975
|
+
if (headerC) {
|
|
55976
|
+
if (typeof headerC.showSort === 'function') {
|
|
55977
|
+
_showSort = headerC.showSort({ col, row, table: this._table });
|
|
55978
|
+
}
|
|
55979
|
+
else {
|
|
55980
|
+
_showSort = headerC.showSort;
|
|
55981
|
+
}
|
|
55982
|
+
}
|
|
55833
55983
|
if (!headerC ||
|
|
55834
|
-
|
|
55835
|
-
(!isValid$1(
|
|
55984
|
+
_showSort === false ||
|
|
55985
|
+
(!isValid$1(_showSort) && !headerC.sort) ||
|
|
55836
55986
|
(headerC.columns && headerC.columns.length > 0)) {
|
|
55837
55987
|
return null;
|
|
55838
55988
|
}
|
|
@@ -56364,6 +56514,7 @@
|
|
|
56364
56514
|
|
|
56365
56515
|
class DimensionTree {
|
|
56366
56516
|
sharedVar;
|
|
56517
|
+
hasHideNode = false;
|
|
56367
56518
|
sizeIncludeParent = false;
|
|
56368
56519
|
rowExpandLevel;
|
|
56369
56520
|
hierarchyType;
|
|
@@ -56390,7 +56541,8 @@
|
|
|
56390
56541
|
this.sharedVar = sharedVar;
|
|
56391
56542
|
this.reset(tree);
|
|
56392
56543
|
}
|
|
56393
|
-
reset(tree
|
|
56544
|
+
reset(tree) {
|
|
56545
|
+
this.hasHideNode = false;
|
|
56394
56546
|
this.cache.clear();
|
|
56395
56547
|
this.dimensionKeys = new NumberMap();
|
|
56396
56548
|
this.dimensionKeysIncludeVirtual = new NumberMap();
|
|
@@ -56400,6 +56552,9 @@
|
|
|
56400
56552
|
setTreeNode(node, startIndex, parent) {
|
|
56401
56553
|
node.startIndex = startIndex;
|
|
56402
56554
|
node.startInTotal = (parent.startInTotal ?? 0) + node.startIndex;
|
|
56555
|
+
if (node.hide) {
|
|
56556
|
+
this.hasHideNode = true;
|
|
56557
|
+
}
|
|
56403
56558
|
if (node.dimensionKey ?? node.indicatorKey) {
|
|
56404
56559
|
if (!node.virtual &&
|
|
56405
56560
|
!this.dimensionKeys.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey)) {
|
|
@@ -56748,7 +56903,9 @@
|
|
|
56748
56903
|
headerCustomLayout: (indicatorInfo ?? dimensionInfo)?.headerCustomLayout,
|
|
56749
56904
|
dragHeader: dimensionInfo?.dragHeader,
|
|
56750
56905
|
disableHeaderHover: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderHover,
|
|
56751
|
-
disableHeaderSelect: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderSelect
|
|
56906
|
+
disableHeaderSelect: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderSelect,
|
|
56907
|
+
showSort: indicatorInfo?.showSort ?? dimensionInfo?.showSort,
|
|
56908
|
+
hide: indicatorInfo?.hide
|
|
56752
56909
|
}),
|
|
56753
56910
|
fieldFormat: indicatorInfo?.headerFormat ?? dimensionInfo?.headerFormat,
|
|
56754
56911
|
dropDownMenu: indicatorInfo?.dropDownMenu ?? dimensionInfo?.dropDownMenu,
|
|
@@ -56835,6 +56992,30 @@
|
|
|
56835
56992
|
}
|
|
56836
56993
|
}
|
|
56837
56994
|
}
|
|
56995
|
+
function deleteTreeHideNode(tree_children, dimensionPath, indicators, hasHideNode, table) {
|
|
56996
|
+
for (let i = tree_children.length - 1; i >= 0; i--) {
|
|
56997
|
+
const node = tree_children[i];
|
|
56998
|
+
dimensionPath.push(node);
|
|
56999
|
+
if (hasHideNode && node.hide) {
|
|
57000
|
+
tree_children.splice(i, 1);
|
|
57001
|
+
}
|
|
57002
|
+
else if (node.indicatorKey) {
|
|
57003
|
+
const hide = indicators?.find(indicator => indicator.indicatorKey === node.indicatorKey)?.hide;
|
|
57004
|
+
if (typeof hide === 'function') {
|
|
57005
|
+
if (hide({ dimensionPaths: dimensionPath, table })) {
|
|
57006
|
+
tree_children.splice(i, 1);
|
|
57007
|
+
}
|
|
57008
|
+
}
|
|
57009
|
+
else if (hide) {
|
|
57010
|
+
tree_children.splice(i, 1);
|
|
57011
|
+
}
|
|
57012
|
+
}
|
|
57013
|
+
else if (node.children && node.children.length > 0) {
|
|
57014
|
+
deleteTreeHideNode(node.children, dimensionPath, indicators, hasHideNode, table);
|
|
57015
|
+
}
|
|
57016
|
+
dimensionPath.pop();
|
|
57017
|
+
}
|
|
57018
|
+
}
|
|
56838
57019
|
|
|
56839
57020
|
function checkHasAggregation(layoutMap) {
|
|
56840
57021
|
const columnObjects = layoutMap.columnObjects;
|
|
@@ -57092,6 +57273,18 @@
|
|
|
57092
57273
|
}
|
|
57093
57274
|
return customTree;
|
|
57094
57275
|
}
|
|
57276
|
+
function deleteHideIndicatorNode(treeNodeChildren, indicators, hasHideNode, table) {
|
|
57277
|
+
const hasHideSettingIndicators = [];
|
|
57278
|
+
for (let i = 0; i < indicators?.length; i++) {
|
|
57279
|
+
const indicator = indicators[i];
|
|
57280
|
+
if (indicator?.hide) {
|
|
57281
|
+
hasHideSettingIndicators.push(indicator);
|
|
57282
|
+
}
|
|
57283
|
+
}
|
|
57284
|
+
if (hasHideSettingIndicators.length || hasHideNode) {
|
|
57285
|
+
deleteTreeHideNode(treeNodeChildren, [], hasHideSettingIndicators, hasHideNode, table);
|
|
57286
|
+
}
|
|
57287
|
+
}
|
|
57095
57288
|
|
|
57096
57289
|
function getRowAt(absoluteY, _this) {
|
|
57097
57290
|
const frozen = _getTargetFrozenRowAt(_this, absoluteY);
|
|
@@ -58615,7 +58808,7 @@
|
|
|
58615
58808
|
return TABLE_EVENT_TYPE;
|
|
58616
58809
|
}
|
|
58617
58810
|
options;
|
|
58618
|
-
version = "1.14.
|
|
58811
|
+
version = "1.14.3";
|
|
58619
58812
|
pagination;
|
|
58620
58813
|
id = `VTable${Date.now()}`;
|
|
58621
58814
|
headerStyleCache;
|
|
@@ -59907,7 +60100,7 @@
|
|
|
59907
60100
|
updateOption(options) {
|
|
59908
60101
|
this.options = options;
|
|
59909
60102
|
this._hasAutoImageColumn = undefined;
|
|
59910
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
|
|
60103
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
|
|
59911
60104
|
if (pixelRatio && pixelRatio !== this.internalProps.pixelRatio) {
|
|
59912
60105
|
this.internalProps.pixelRatio = pixelRatio;
|
|
59913
60106
|
}
|
|
@@ -59936,6 +60129,8 @@
|
|
|
59936
60129
|
this.autoFillWidth = autoFillWidth ?? false;
|
|
59937
60130
|
this.autoFillHeight = autoFillHeight ?? false;
|
|
59938
60131
|
this.customRender = customRender;
|
|
60132
|
+
this.canvasWidth = canvasWidth;
|
|
60133
|
+
this.canvasHeight = canvasHeight;
|
|
59939
60134
|
const internalProps = this.internalProps;
|
|
59940
60135
|
if (Env.mode !== 'node' && !options.canvas) {
|
|
59941
60136
|
updateRootElementPadding(internalProps.element, this.padding);
|
|
@@ -62431,10 +62626,19 @@
|
|
|
62431
62626
|
return;
|
|
62432
62627
|
}
|
|
62433
62628
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
62434
|
-
if (
|
|
62435
|
-
|
|
62436
|
-
|
|
62437
|
-
|
|
62629
|
+
if (layout._table.internalProps.rowSeriesNumber?.enableTreeCheckbox) {
|
|
62630
|
+
if (cellRecord?.vtableMerge && col >= layout.leftRowSeriesNumberColumnCount) {
|
|
62631
|
+
cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount;
|
|
62632
|
+
cellRange.end.col = layout.colCount - 1;
|
|
62633
|
+
cellRange.start.row = cellRange.end.row = row;
|
|
62634
|
+
}
|
|
62635
|
+
}
|
|
62636
|
+
else {
|
|
62637
|
+
if (cellRecord?.vtableMerge) {
|
|
62638
|
+
cellRange.start.col = layout.rowHeaderLevelCount;
|
|
62639
|
+
cellRange.end.col = layout.colCount - 1;
|
|
62640
|
+
cellRange.start.row = cellRange.end.row = row;
|
|
62641
|
+
}
|
|
62438
62642
|
}
|
|
62439
62643
|
}
|
|
62440
62644
|
function getCellRangeTranspose(col, row, layout) {
|
|
@@ -64594,6 +64798,7 @@
|
|
|
64594
64798
|
}
|
|
64595
64799
|
}
|
|
64596
64800
|
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount);
|
|
64801
|
+
const notFullRow = newRowEnd < rowStart + rowLimit;
|
|
64597
64802
|
for (let i = 0; i < removeCellPositions.length; i++) {
|
|
64598
64803
|
const { row: cellRow } = removeCellPositions[removeCellPositions.length - i - 1];
|
|
64599
64804
|
if (cellRow < rowStart || cellRow > rowEnd) {
|
|
@@ -64606,6 +64811,13 @@
|
|
|
64606
64811
|
});
|
|
64607
64812
|
updateRow--;
|
|
64608
64813
|
}
|
|
64814
|
+
else if (notFullRow) {
|
|
64815
|
+
removeCells.push({
|
|
64816
|
+
col,
|
|
64817
|
+
row: cellRow
|
|
64818
|
+
});
|
|
64819
|
+
updateRow--;
|
|
64820
|
+
}
|
|
64609
64821
|
else {
|
|
64610
64822
|
updateRow = Math.min(updateRow, cellRow);
|
|
64611
64823
|
}
|
|
@@ -64782,16 +64994,20 @@
|
|
|
64782
64994
|
const { title } = table.internalProps.layoutMap.getSeriesNumberHeader(col, row);
|
|
64783
64995
|
return title;
|
|
64784
64996
|
}
|
|
64997
|
+
let value;
|
|
64785
64998
|
if (this.options.groupBy) {
|
|
64786
64999
|
const record = table.getCellRawRecord(col, row);
|
|
64787
65000
|
if (record?.vtableMerge) {
|
|
64788
65001
|
return '';
|
|
64789
65002
|
}
|
|
64790
65003
|
const indexs = this.dataSource.currentIndexedData[row - this.columnHeaderLevelCount];
|
|
64791
|
-
|
|
65004
|
+
value = indexs[indexs.length - 1] + 1;
|
|
65005
|
+
}
|
|
65006
|
+
else {
|
|
65007
|
+
value = row - this.columnHeaderLevelCount + 1;
|
|
64792
65008
|
}
|
|
64793
65009
|
const { format } = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
|
|
64794
|
-
return typeof format === 'function' ? format(col, row, this) :
|
|
65010
|
+
return typeof format === 'function' ? format(col, row, this, value) : value;
|
|
64795
65011
|
}
|
|
64796
65012
|
else if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
64797
65013
|
const { title } = table.internalProps.layoutMap.getHeader(col, row);
|
|
@@ -72003,7 +72219,7 @@
|
|
|
72003
72219
|
}
|
|
72004
72220
|
let rowExtensionDimensionTree;
|
|
72005
72221
|
if (this._rowHeaderExtensionTree[key]) {
|
|
72006
|
-
this._rowHeaderExtensionTree[key].reset(this._rowHeaderExtensionTree[key].tree.children
|
|
72222
|
+
this._rowHeaderExtensionTree[key].reset(this._rowHeaderExtensionTree[key].tree.children);
|
|
72007
72223
|
rowExtensionDimensionTree = this._rowHeaderExtensionTree[key];
|
|
72008
72224
|
}
|
|
72009
72225
|
else {
|
|
@@ -72462,7 +72678,7 @@
|
|
|
72462
72678
|
this._table.isPivotChart() ||
|
|
72463
72679
|
this.dataset.records?.length > 0 ||
|
|
72464
72680
|
(this.dataset.records && !Array.isArray(this.dataset.records))
|
|
72465
|
-
? this.columnDimensionTree.tree.size
|
|
72681
|
+
? this._columnHeaderCellIds[0]?.length ?? this.columnDimensionTree.tree.size
|
|
72466
72682
|
: 0) +
|
|
72467
72683
|
this.rowHeaderLevelCount +
|
|
72468
72684
|
this.rightHeaderColCount +
|
|
@@ -72938,7 +73154,7 @@
|
|
|
72938
73154
|
const hd = this.getHeader(col, row);
|
|
72939
73155
|
hd.define.hierarchyState =
|
|
72940
73156
|
hd.define.hierarchyState === HierarchyState.collapse ? HierarchyState.expand : HierarchyState.collapse;
|
|
72941
|
-
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children
|
|
73157
|
+
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children);
|
|
72942
73158
|
this._rowHeaderCellFullPathIds_FULL = [];
|
|
72943
73159
|
this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
|
|
72944
73160
|
this.fullRowDimensionKeys = [];
|
|
@@ -73220,7 +73436,7 @@
|
|
|
73220
73436
|
sourceColumns.unshift((targetIndex - this.leftRowSeriesNumberColumnCount), 0);
|
|
73221
73437
|
Array.prototype.splice.apply(this._columnWidths, sourceColumns);
|
|
73222
73438
|
this.columnDimensionTree.movePosition(this.getCellHeaderPathsWithTreeNode(source.col, source.row).colHeaderPaths.length - 1, sourceCellRange.start.col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount, targetCellRange.start.col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount);
|
|
73223
|
-
this.columnDimensionTree.reset(this.columnDimensionTree.tree.children
|
|
73439
|
+
this.columnDimensionTree.reset(this.columnDimensionTree.tree.children);
|
|
73224
73440
|
this._CellHeaderPathMap = new Map();
|
|
73225
73441
|
this._largeCellRangeCache.length = 0;
|
|
73226
73442
|
return {
|
|
@@ -73261,7 +73477,7 @@
|
|
|
73261
73477
|
sourceIds_FULL0.unshift(targetIndex, 0);
|
|
73262
73478
|
Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL, sourceIds_FULL0);
|
|
73263
73479
|
this.rowDimensionTree.movePosition(sourceRowHeaderPaths.length - 1, sourceCellRange.start.row - this.columnHeaderLevelCount, targetIndex + (target.row > source.row ? sourceRowHeaderNode.size - 1 : 0));
|
|
73264
|
-
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children
|
|
73480
|
+
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children);
|
|
73265
73481
|
this._CellHeaderPathMap = new Map();
|
|
73266
73482
|
this._largeCellRangeCache.length = 0;
|
|
73267
73483
|
return {
|
|
@@ -76109,14 +76325,34 @@
|
|
|
76109
76325
|
if (options.indicatorsAsCol !== false) {
|
|
76110
76326
|
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
76111
76327
|
}
|
|
76328
|
+
options.indicatorsAsCol !== false &&
|
|
76329
|
+
options.indicators &&
|
|
76330
|
+
this.dataset.colHeaderTree &&
|
|
76331
|
+
deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
|
|
76112
76332
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
76113
76333
|
}
|
|
76334
|
+
else {
|
|
76335
|
+
if (columnDimensionTree.hasHideNode) {
|
|
76336
|
+
deleteHideIndicatorNode(columnDimensionTree.tree.children, options.indicators, true, this);
|
|
76337
|
+
columnDimensionTree.reset(columnDimensionTree.tree.children);
|
|
76338
|
+
}
|
|
76339
|
+
}
|
|
76114
76340
|
if (!options.rowTree) {
|
|
76115
76341
|
if (options.indicatorsAsCol === false) {
|
|
76116
76342
|
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
76117
76343
|
}
|
|
76344
|
+
options.indicatorsAsCol === false &&
|
|
76345
|
+
this.dataset.rowHeaderTree &&
|
|
76346
|
+
options.indicators &&
|
|
76347
|
+
deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
|
|
76118
76348
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
76119
76349
|
}
|
|
76350
|
+
else {
|
|
76351
|
+
if (rowDimensionTree.hasHideNode) {
|
|
76352
|
+
deleteHideIndicatorNode(rowDimensionTree.tree.children, options.indicators, true, this);
|
|
76353
|
+
rowDimensionTree.reset(rowDimensionTree.tree.children);
|
|
76354
|
+
}
|
|
76355
|
+
}
|
|
76120
76356
|
this.internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
76121
76357
|
}
|
|
76122
76358
|
this._changePivotSortStateBySortRules();
|
|
@@ -76251,14 +76487,34 @@
|
|
|
76251
76487
|
if (options.indicatorsAsCol !== false) {
|
|
76252
76488
|
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
76253
76489
|
}
|
|
76490
|
+
options.indicatorsAsCol !== false &&
|
|
76491
|
+
options.indicators &&
|
|
76492
|
+
this.dataset.colHeaderTree &&
|
|
76493
|
+
deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
|
|
76254
76494
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
76255
76495
|
}
|
|
76496
|
+
else {
|
|
76497
|
+
if (columnDimensionTree.hasHideNode) {
|
|
76498
|
+
deleteHideIndicatorNode(columnDimensionTree.tree.children, options.indicators, true, this);
|
|
76499
|
+
columnDimensionTree.reset(columnDimensionTree.tree.children);
|
|
76500
|
+
}
|
|
76501
|
+
}
|
|
76256
76502
|
if (!options.rowTree) {
|
|
76257
76503
|
if (options.indicatorsAsCol === false) {
|
|
76258
76504
|
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
76259
76505
|
}
|
|
76506
|
+
options.indicatorsAsCol === false &&
|
|
76507
|
+
this.dataset.rowHeaderTree &&
|
|
76508
|
+
options.indicators &&
|
|
76509
|
+
deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
|
|
76260
76510
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
76261
76511
|
}
|
|
76512
|
+
else {
|
|
76513
|
+
if (rowDimensionTree.hasHideNode) {
|
|
76514
|
+
deleteHideIndicatorNode(rowDimensionTree.tree.children, options.indicators, true, this);
|
|
76515
|
+
rowDimensionTree.reset(rowDimensionTree.tree.children);
|
|
76516
|
+
}
|
|
76517
|
+
}
|
|
76262
76518
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
76263
76519
|
}
|
|
76264
76520
|
this._changePivotSortStateBySortRules();
|
|
@@ -77135,12 +77391,20 @@
|
|
|
77135
77391
|
columnDimensionTree = internalProps.layoutMap.columnDimensionTree;
|
|
77136
77392
|
}
|
|
77137
77393
|
else {
|
|
77394
|
+
options.indicatorsAsCol !== false &&
|
|
77395
|
+
options.indicators &&
|
|
77396
|
+
this.dataset.colHeaderTree &&
|
|
77397
|
+
deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
|
|
77138
77398
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
77139
77399
|
}
|
|
77140
77400
|
if (options.rowTree) {
|
|
77141
77401
|
rowDimensionTree = internalProps.layoutMap.rowDimensionTree;
|
|
77142
77402
|
}
|
|
77143
77403
|
else {
|
|
77404
|
+
options.indicatorsAsCol === false &&
|
|
77405
|
+
this.dataset.rowHeaderTree &&
|
|
77406
|
+
options.indicators &&
|
|
77407
|
+
deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
|
|
77144
77408
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
77145
77409
|
}
|
|
77146
77410
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
@@ -79172,7 +79436,7 @@
|
|
|
79172
79436
|
}
|
|
79173
79437
|
|
|
79174
79438
|
registerForVrender();
|
|
79175
|
-
const version = "1.14.
|
|
79439
|
+
const version = "1.14.3";
|
|
79176
79440
|
function getIcons() {
|
|
79177
79441
|
return get$2();
|
|
79178
79442
|
}
|