@visactor/vtable 1.22.4-alpha.3 → 1.22.4
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/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/edit/edit-manager.js +1 -0
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +39 -31
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +69 -51
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/edit/edit-manager.js +1 -0
- package/es/edit/edit-manager.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +36 -26
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -60685,9 +60685,9 @@
|
|
|
60685
60685
|
}
|
|
60686
60686
|
checkFrozen() {
|
|
60687
60687
|
let originalFrozenColCount = this.table.options.frozenColCount ??
|
|
60688
|
-
(this.table.isPivotTable() || (this.table.isListTable() && this.table.internalProps.transpose)
|
|
60689
|
-
|
|
60690
|
-
|
|
60688
|
+
(this.table.isPivotTable() || (this.table.isListTable() && this.table.internalProps.transpose)
|
|
60689
|
+
? (this.table.rowHeaderLevelCount ?? 0) + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount
|
|
60690
|
+
: 0);
|
|
60691
60691
|
if (originalFrozenColCount) {
|
|
60692
60692
|
originalFrozenColCount = Math.min(originalFrozenColCount, this.table.colCount);
|
|
60693
60693
|
const container = this.table.getContainer();
|
|
@@ -69403,7 +69403,7 @@
|
|
|
69403
69403
|
return TABLE_EVENT_TYPE;
|
|
69404
69404
|
}
|
|
69405
69405
|
options;
|
|
69406
|
-
version = "1.22.4
|
|
69406
|
+
version = "1.22.4";
|
|
69407
69407
|
pagination;
|
|
69408
69408
|
id = `VTable${Date.now()}`;
|
|
69409
69409
|
headerStyleCache;
|
|
@@ -75953,6 +75953,9 @@
|
|
|
75953
75953
|
}
|
|
75954
75954
|
const editor = this.table.getEditor(col, row);
|
|
75955
75955
|
if (editor) {
|
|
75956
|
+
if (this.table.internalProps.layoutMap.isSeriesNumber(col, row)) {
|
|
75957
|
+
return;
|
|
75958
|
+
}
|
|
75956
75959
|
if (this.table.internalProps.layoutMap?.isAggregation?.(col, row)) {
|
|
75957
75960
|
const isPivotTable = this.table.isPivotTable?.();
|
|
75958
75961
|
const updateAggregationOnEditCell = isPivotTable
|
|
@@ -87446,6 +87449,65 @@
|
|
|
87446
87449
|
}
|
|
87447
87450
|
return null;
|
|
87448
87451
|
}
|
|
87452
|
+
matchDimensionPath = (paths, treeNodes, needLowestLevel, checkAxisNode = false, pathIndex = 0) => {
|
|
87453
|
+
if (pathIndex >= paths.length) {
|
|
87454
|
+
return undefined;
|
|
87455
|
+
}
|
|
87456
|
+
const currentPath = paths[pathIndex];
|
|
87457
|
+
for (let j = 0; j < treeNodes.length; j++) {
|
|
87458
|
+
const dimension = treeNodes[j];
|
|
87459
|
+
const isMatch = (!isValid$3(currentPath.indicatorKey) &&
|
|
87460
|
+
dimension.dimensionKey === currentPath.dimensionKey &&
|
|
87461
|
+
dimension.value === currentPath.value) ||
|
|
87462
|
+
(isValid$3(currentPath.indicatorKey) &&
|
|
87463
|
+
dimension.indicatorKey === currentPath.indicatorKey &&
|
|
87464
|
+
((isValid$3(dimension.value) && isValid$3(currentPath.value) && currentPath.value === dimension.value) ||
|
|
87465
|
+
!isValid$3(dimension.value) ||
|
|
87466
|
+
!isValid$3(currentPath.value)));
|
|
87467
|
+
if (isMatch) {
|
|
87468
|
+
const children = dimension.children;
|
|
87469
|
+
if (pathIndex === paths.length - 1) {
|
|
87470
|
+
if (needLowestLevel) {
|
|
87471
|
+
const hasAxisNode = checkAxisNode && children && children.some((row) => row.dimensionKey === 'axis');
|
|
87472
|
+
if (!children?.length || hasAxisNode) {
|
|
87473
|
+
return dimension;
|
|
87474
|
+
}
|
|
87475
|
+
const findLeafNode = (nodes) => {
|
|
87476
|
+
for (const node of nodes) {
|
|
87477
|
+
const nodeChildren = node.children;
|
|
87478
|
+
const nodeHasAxis = checkAxisNode && nodeChildren.some((row) => row.dimensionKey === 'axis');
|
|
87479
|
+
if (!nodeChildren?.length || nodeHasAxis) {
|
|
87480
|
+
return node;
|
|
87481
|
+
}
|
|
87482
|
+
const leaf = findLeafNode(nodeChildren);
|
|
87483
|
+
if (leaf) {
|
|
87484
|
+
return leaf;
|
|
87485
|
+
}
|
|
87486
|
+
}
|
|
87487
|
+
return undefined;
|
|
87488
|
+
};
|
|
87489
|
+
const leafNode = findLeafNode(children);
|
|
87490
|
+
if (leafNode) {
|
|
87491
|
+
return leafNode;
|
|
87492
|
+
}
|
|
87493
|
+
}
|
|
87494
|
+
else {
|
|
87495
|
+
return dimension;
|
|
87496
|
+
}
|
|
87497
|
+
}
|
|
87498
|
+
if (children?.length) {
|
|
87499
|
+
const result = this.matchDimensionPath(paths, children, needLowestLevel, checkAxisNode, pathIndex + 1);
|
|
87500
|
+
if (result) {
|
|
87501
|
+
return result;
|
|
87502
|
+
}
|
|
87503
|
+
}
|
|
87504
|
+
else if (pathIndex === paths.length - 1) {
|
|
87505
|
+
return dimension;
|
|
87506
|
+
}
|
|
87507
|
+
}
|
|
87508
|
+
}
|
|
87509
|
+
return undefined;
|
|
87510
|
+
};
|
|
87449
87511
|
getCellAdressByHeaderPath(dimensionPaths) {
|
|
87450
87512
|
let colHeaderPaths;
|
|
87451
87513
|
let rowHeaderPaths;
|
|
@@ -87537,34 +87599,10 @@
|
|
|
87537
87599
|
let row;
|
|
87538
87600
|
let defaultCol;
|
|
87539
87601
|
let defaultRow;
|
|
87540
|
-
let rowArr = this.rowTree;
|
|
87541
87602
|
let rowDimensionFinded;
|
|
87542
|
-
let colArr = this.columnTree;
|
|
87543
87603
|
let colDimensionFinded;
|
|
87544
87604
|
if (colHeaderPaths) {
|
|
87545
|
-
|
|
87546
|
-
const colDimension = colHeaderPaths[i];
|
|
87547
|
-
for (let j = 0; j < colArr.length; j++) {
|
|
87548
|
-
const dimension = colArr[j];
|
|
87549
|
-
if ((!isValid$3(colDimension.indicatorKey) &&
|
|
87550
|
-
dimension.dimensionKey === colDimension.dimensionKey &&
|
|
87551
|
-
dimension.value === colDimension.value) ||
|
|
87552
|
-
(isValid$3(colDimension.indicatorKey) &&
|
|
87553
|
-
dimension.indicatorKey === colDimension.indicatorKey &&
|
|
87554
|
-
((isValid$3(dimension.value) && isValid$3(colDimension.value) && colDimension.value === dimension.value) ||
|
|
87555
|
-
!isValid$3(dimension.value) ||
|
|
87556
|
-
!isValid$3(colDimension.value)))) {
|
|
87557
|
-
colArr = dimension.children;
|
|
87558
|
-
if (needLowestLevel_colPaths && !colArr?.length) {
|
|
87559
|
-
colDimensionFinded = dimension;
|
|
87560
|
-
}
|
|
87561
|
-
else if (!needLowestLevel_colPaths) {
|
|
87562
|
-
colDimensionFinded = dimension;
|
|
87563
|
-
}
|
|
87564
|
-
break;
|
|
87565
|
-
}
|
|
87566
|
-
}
|
|
87567
|
-
}
|
|
87605
|
+
colDimensionFinded = this.matchDimensionPath(colHeaderPaths, this.columnTree, needLowestLevel_colPaths);
|
|
87568
87606
|
}
|
|
87569
87607
|
if (rowHeaderPaths?.length >= 1) {
|
|
87570
87608
|
if (this.rowHierarchyType === 'tree') {
|
|
@@ -87593,27 +87631,7 @@
|
|
|
87593
87631
|
row = this._rowHeaderCellIds.indexOf(findedCellIdPath) + this.columnHeaderLevelCount;
|
|
87594
87632
|
}
|
|
87595
87633
|
else {
|
|
87596
|
-
|
|
87597
|
-
const rowDimension = rowHeaderPaths[i];
|
|
87598
|
-
for (let j = 0; j < rowArr.length; j++) {
|
|
87599
|
-
const dimension = rowArr[j];
|
|
87600
|
-
if ((!isValid$3(rowDimension.indicatorKey) &&
|
|
87601
|
-
dimension.dimensionKey === rowDimension.dimensionKey &&
|
|
87602
|
-
dimension.value === rowDimension.value) ||
|
|
87603
|
-
(isValid$3(rowDimension.indicatorKey) &&
|
|
87604
|
-
dimension.indicatorKey === rowDimension.indicatorKey &&
|
|
87605
|
-
(!isValid$3(rowDimension.value) || dimension.value === rowDimension.value))) {
|
|
87606
|
-
rowArr = dimension.children;
|
|
87607
|
-
if (needLowestLevel_rowPaths && (!rowArr?.length || rowArr.some(row => row.dimensionKey === 'axis'))) {
|
|
87608
|
-
rowDimensionFinded = dimension;
|
|
87609
|
-
}
|
|
87610
|
-
else if (!needLowestLevel_rowPaths) {
|
|
87611
|
-
rowDimensionFinded = dimension;
|
|
87612
|
-
}
|
|
87613
|
-
break;
|
|
87614
|
-
}
|
|
87615
|
-
}
|
|
87616
|
-
}
|
|
87634
|
+
rowDimensionFinded = this.matchDimensionPath(rowHeaderPaths, this.rowTree, needLowestLevel_rowPaths, true);
|
|
87617
87635
|
}
|
|
87618
87636
|
}
|
|
87619
87637
|
if (!forceBody && needLowestLevel_colPaths && needLowestLevel_rowPaths) {
|
|
@@ -93983,7 +94001,7 @@
|
|
|
93983
94001
|
}
|
|
93984
94002
|
|
|
93985
94003
|
registerForVrender();
|
|
93986
|
-
const version = "1.22.4
|
|
94004
|
+
const version = "1.22.4";
|
|
93987
94005
|
function getIcons() {
|
|
93988
94006
|
return get$2();
|
|
93989
94007
|
}
|