k-vtable 1.0.24 → 1.0.25

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.
Files changed (53) hide show
  1. package/cjs/core/BaseTable.js +1 -1
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/dataset/dataset-pivot-table.js +1 -2
  4. package/cjs/edit/edit-manager.js +1 -0
  5. package/cjs/edit/edit-manager.js.map +1 -1
  6. package/cjs/edit/editors.js +2 -1
  7. package/cjs/index.d.ts +1 -1
  8. package/cjs/index.js +1 -1
  9. package/cjs/index.js.map +1 -1
  10. package/cjs/layout/index.js +1 -2
  11. package/cjs/layout/pivot-header-layout.d.ts +1 -0
  12. package/cjs/layout/pivot-header-layout.js +40 -32
  13. package/cjs/layout/pivot-header-layout.js.map +1 -1
  14. package/cjs/layout/pivot-layout.js +0 -2
  15. package/cjs/layout/row-height-map.js +1 -1
  16. package/cjs/layout/simple-header-layout.js +1 -1
  17. package/cjs/layout/tree-helper.js +1 -1
  18. package/cjs/plugins/custom-cell-style.js +2 -1
  19. package/cjs/plugins/index.js +1 -1
  20. package/cjs/plugins/interface.js +1 -1
  21. package/cjs/plugins/invert-highlight.js +1 -1
  22. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  23. package/cjs/plugins/plugin-manager.js +1 -1
  24. package/cjs/state/state.js.map +1 -1
  25. package/cjs/vrender.js.map +1 -1
  26. package/dist/vtable.js +67 -49
  27. package/dist/vtable.min.js +1 -1
  28. package/es/core/BaseTable.js +1 -1
  29. package/es/core/BaseTable.js.map +1 -1
  30. package/es/dataset/dataset-pivot-table.js +1 -2
  31. package/es/edit/edit-manager.js +1 -0
  32. package/es/edit/edit-manager.js.map +1 -1
  33. package/es/edit/editors.js +2 -1
  34. package/es/index.d.ts +1 -1
  35. package/es/index.js +1 -1
  36. package/es/index.js.map +1 -1
  37. package/es/layout/index.js +1 -2
  38. package/es/layout/pivot-header-layout.d.ts +1 -0
  39. package/es/layout/pivot-header-layout.js +37 -27
  40. package/es/layout/pivot-header-layout.js.map +1 -1
  41. package/es/layout/pivot-layout.js +0 -2
  42. package/es/layout/row-height-map.js +1 -1
  43. package/es/layout/simple-header-layout.js +1 -1
  44. package/es/layout/tree-helper.js +1 -1
  45. package/es/plugins/custom-cell-style.js +2 -1
  46. package/es/plugins/index.js +1 -1
  47. package/es/plugins/interface.js +1 -1
  48. package/es/plugins/invert-highlight.js +1 -1
  49. package/es/plugins/list-tree-stick-cell.js +1 -1
  50. package/es/plugins/plugin-manager.js +1 -1
  51. package/es/state/state.js.map +1 -1
  52. package/es/vrender.js.map +1 -1
  53. package/package.json +1 -1
package/dist/vtable.js CHANGED
@@ -60950,7 +60950,7 @@
60950
60950
  }
60951
60951
  checkFrozen() {
60952
60952
  let originalFrozenColCount = this.table.options.frozenColCount ??
60953
- ((this.table.isPivotTable() || (this.table.isListTable() && this.table.internalProps.transpose))
60953
+ (this.table.isPivotTable() || (this.table.isListTable() && this.table.internalProps.transpose)
60954
60954
  ? (this.table.rowHeaderLevelCount ?? 0) + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount
60955
60955
  : 0);
60956
60956
  if (originalFrozenColCount) {
@@ -69698,7 +69698,7 @@
69698
69698
  return TABLE_EVENT_TYPE;
69699
69699
  }
69700
69700
  options;
69701
- version = "1.0.24";
69701
+ version = "1.0.25";
69702
69702
  pagination;
69703
69703
  id = `VTable${Date.now()}`;
69704
69704
  headerStyleCache;
@@ -76253,6 +76253,9 @@
76253
76253
  }
76254
76254
  const editor = this.table.getEditor(col, row);
76255
76255
  if (editor) {
76256
+ if (this.table.internalProps.layoutMap.isSeriesNumber(col, row)) {
76257
+ return;
76258
+ }
76256
76259
  if (this.table.internalProps.layoutMap?.isAggregation?.(col, row)) {
76257
76260
  const isPivotTable = this.table.isPivotTable?.();
76258
76261
  const updateAggregationOnEditCell = isPivotTable
@@ -87746,6 +87749,65 @@
87746
87749
  }
87747
87750
  return null;
87748
87751
  }
87752
+ matchDimensionPath = (paths, treeNodes, needLowestLevel, checkAxisNode = false, pathIndex = 0) => {
87753
+ if (pathIndex >= paths.length) {
87754
+ return undefined;
87755
+ }
87756
+ const currentPath = paths[pathIndex];
87757
+ for (let j = 0; j < treeNodes.length; j++) {
87758
+ const dimension = treeNodes[j];
87759
+ const isMatch = (!isValid$3(currentPath.indicatorKey) &&
87760
+ dimension.dimensionKey === currentPath.dimensionKey &&
87761
+ dimension.value === currentPath.value) ||
87762
+ (isValid$3(currentPath.indicatorKey) &&
87763
+ dimension.indicatorKey === currentPath.indicatorKey &&
87764
+ ((isValid$3(dimension.value) && isValid$3(currentPath.value) && currentPath.value === dimension.value) ||
87765
+ !isValid$3(dimension.value) ||
87766
+ !isValid$3(currentPath.value)));
87767
+ if (isMatch) {
87768
+ const children = dimension.children;
87769
+ if (pathIndex === paths.length - 1) {
87770
+ if (needLowestLevel) {
87771
+ const hasAxisNode = checkAxisNode && children && children.some((row) => row.dimensionKey === 'axis');
87772
+ if (!children?.length || hasAxisNode) {
87773
+ return dimension;
87774
+ }
87775
+ const findLeafNode = (nodes) => {
87776
+ for (const node of nodes) {
87777
+ const nodeChildren = node.children;
87778
+ const nodeHasAxis = checkAxisNode && nodeChildren.some((row) => row.dimensionKey === 'axis');
87779
+ if (!nodeChildren?.length || nodeHasAxis) {
87780
+ return node;
87781
+ }
87782
+ const leaf = findLeafNode(nodeChildren);
87783
+ if (leaf) {
87784
+ return leaf;
87785
+ }
87786
+ }
87787
+ return undefined;
87788
+ };
87789
+ const leafNode = findLeafNode(children);
87790
+ if (leafNode) {
87791
+ return leafNode;
87792
+ }
87793
+ }
87794
+ else {
87795
+ return dimension;
87796
+ }
87797
+ }
87798
+ if (children?.length) {
87799
+ const result = this.matchDimensionPath(paths, children, needLowestLevel, checkAxisNode, pathIndex + 1);
87800
+ if (result) {
87801
+ return result;
87802
+ }
87803
+ }
87804
+ else if (pathIndex === paths.length - 1) {
87805
+ return dimension;
87806
+ }
87807
+ }
87808
+ }
87809
+ return undefined;
87810
+ };
87749
87811
  getCellAdressByHeaderPath(dimensionPaths) {
87750
87812
  let colHeaderPaths;
87751
87813
  let rowHeaderPaths;
@@ -87837,34 +87899,10 @@
87837
87899
  let row;
87838
87900
  let defaultCol;
87839
87901
  let defaultRow;
87840
- let rowArr = this.rowTree;
87841
87902
  let rowDimensionFinded;
87842
- let colArr = this.columnTree;
87843
87903
  let colDimensionFinded;
87844
87904
  if (colHeaderPaths) {
87845
- for (let i = 0; i < colHeaderPaths.length; i++) {
87846
- const colDimension = colHeaderPaths[i];
87847
- for (let j = 0; j < colArr.length; j++) {
87848
- const dimension = colArr[j];
87849
- if ((!isValid$3(colDimension.indicatorKey) &&
87850
- dimension.dimensionKey === colDimension.dimensionKey &&
87851
- dimension.value === colDimension.value) ||
87852
- (isValid$3(colDimension.indicatorKey) &&
87853
- dimension.indicatorKey === colDimension.indicatorKey &&
87854
- ((isValid$3(dimension.value) && isValid$3(colDimension.value) && colDimension.value === dimension.value) ||
87855
- !isValid$3(dimension.value) ||
87856
- !isValid$3(colDimension.value)))) {
87857
- colArr = dimension.children;
87858
- if (needLowestLevel_colPaths && !colArr?.length) {
87859
- colDimensionFinded = dimension;
87860
- }
87861
- else if (!needLowestLevel_colPaths) {
87862
- colDimensionFinded = dimension;
87863
- }
87864
- break;
87865
- }
87866
- }
87867
- }
87905
+ colDimensionFinded = this.matchDimensionPath(colHeaderPaths, this.columnTree, needLowestLevel_colPaths);
87868
87906
  }
87869
87907
  if (rowHeaderPaths?.length >= 1) {
87870
87908
  if (this.rowHierarchyType === 'tree') {
@@ -87893,27 +87931,7 @@
87893
87931
  row = this._rowHeaderCellIds.indexOf(findedCellIdPath) + this.columnHeaderLevelCount;
87894
87932
  }
87895
87933
  else {
87896
- for (let i = 0; i < rowHeaderPaths.length; i++) {
87897
- const rowDimension = rowHeaderPaths[i];
87898
- for (let j = 0; j < rowArr.length; j++) {
87899
- const dimension = rowArr[j];
87900
- if ((!isValid$3(rowDimension.indicatorKey) &&
87901
- dimension.dimensionKey === rowDimension.dimensionKey &&
87902
- dimension.value === rowDimension.value) ||
87903
- (isValid$3(rowDimension.indicatorKey) &&
87904
- dimension.indicatorKey === rowDimension.indicatorKey &&
87905
- (!isValid$3(rowDimension.value) || dimension.value === rowDimension.value))) {
87906
- rowArr = dimension.children;
87907
- if (needLowestLevel_rowPaths && (!rowArr?.length || rowArr.some(row => row.dimensionKey === 'axis'))) {
87908
- rowDimensionFinded = dimension;
87909
- }
87910
- else if (!needLowestLevel_rowPaths) {
87911
- rowDimensionFinded = dimension;
87912
- }
87913
- break;
87914
- }
87915
- }
87916
- }
87934
+ rowDimensionFinded = this.matchDimensionPath(rowHeaderPaths, this.rowTree, needLowestLevel_rowPaths, true);
87917
87935
  }
87918
87936
  }
87919
87937
  if (!forceBody && needLowestLevel_colPaths && needLowestLevel_rowPaths) {
@@ -94283,7 +94301,7 @@
94283
94301
  }
94284
94302
 
94285
94303
  registerForVrender();
94286
- const version = "1.0.24";
94304
+ const version = "1.0.25";
94287
94305
  function getIcons() {
94288
94306
  return get$2();
94289
94307
  }