@adaptabletools/adaptable 20.0.11 → 20.0.13

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 (51) hide show
  1. package/agGrid.d.ts +3 -3
  2. package/agGrid.js +4 -4
  3. package/package.json +1 -1
  4. package/src/AdaptableOptions/ColumnOptions.d.ts +3 -3
  5. package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -3
  6. package/src/AdaptableState/Common/AdaptableColumn.js +9 -8
  7. package/src/AdaptableState/Common/AggregationColumns.d.ts +3 -2
  8. package/src/AdaptableState/Common/AggregationColumns.js +0 -3
  9. package/src/AdaptableState/LayoutState.d.ts +6 -2
  10. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  11. package/src/Api/Implementation/ColumnApiImpl.js +5 -5
  12. package/src/Api/Implementation/LayoutHelpers.js +18 -32
  13. package/src/Api/Internal/ColumnInternalApi.js +5 -5
  14. package/src/Strategy/CalculatedColumnModule.d.ts +1 -1
  15. package/src/Strategy/CellSummaryModule.d.ts +1 -1
  16. package/src/Strategy/ChartingModule.d.ts +1 -1
  17. package/src/Strategy/ColumnFilterModule.d.ts +1 -1
  18. package/src/Strategy/ColumnInfoModule.d.ts +1 -1
  19. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  20. package/src/Strategy/FormatColumnModule.d.ts +1 -1
  21. package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
  22. package/src/Strategy/GridInfoModule.d.ts +1 -1
  23. package/src/Strategy/LayoutModule.d.ts +1 -1
  24. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  25. package/src/Strategy/SettingsPanelModule.d.ts +1 -1
  26. package/src/Strategy/StyledColumnModule.d.ts +1 -1
  27. package/src/Strategy/SystemStatusModule.d.ts +1 -1
  28. package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -0
  29. package/src/Utilities/Helpers/AdaptableHelper.js +27 -1
  30. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +23 -23
  31. package/src/agGrid/AdaptableAgGrid.js +8 -4
  32. package/src/agGrid/AgGridAdapter.js +4 -4
  33. package/src/agGrid/AgGridColumnAdapter.js +21 -3
  34. package/src/env.js +2 -2
  35. package/src/layout-manager/src/LayoutManagerModel.d.ts +3 -3
  36. package/src/layout-manager/src/index.d.ts +5 -1
  37. package/src/layout-manager/src/index.js +48 -44
  38. package/src/layout-manager/src/isLayoutEqual.d.ts +8 -0
  39. package/src/layout-manager/src/isLayoutEqual.js +43 -2
  40. package/src/layout-manager/src/isPivotColumnTotal.d.ts +1 -0
  41. package/src/layout-manager/src/{isPivotGroupTotalColumn.js → isPivotColumnTotal.js} +1 -1
  42. package/src/layout-manager/src/isPivotGrandTotal.d.ts +2 -0
  43. package/src/layout-manager/src/{isPivotGrandTotalColumn.js → isPivotGrandTotal.js} +1 -1
  44. package/src/layout-manager/src/normalizeLayoutModel.js +24 -0
  45. package/src/layout-manager/src/simplifyLayoutModel.js +10 -1
  46. package/src/metamodel/adaptable.metamodel.d.ts +4 -4
  47. package/src/metamodel/adaptable.metamodel.js +1 -1
  48. package/src/types.d.ts +1 -1
  49. package/tsconfig.esm.tsbuildinfo +1 -1
  50. package/src/layout-manager/src/isPivotGrandTotalColumn.d.ts +0 -2
  51. package/src/layout-manager/src/isPivotGroupTotalColumn.d.ts +0 -1
@@ -1,4 +1,4 @@
1
- export function isPivotGroupTotalColumn(colId) {
1
+ export function isPivotColumnTotal(colId) {
2
2
  // pivot group total are spanning cross all aggregations
3
3
  // therefore the last part of the colId is empty (hence the "dangling" underscore)
4
4
  return colId?.startsWith('pivot_') && colId?.endsWith('_');
@@ -0,0 +1,2 @@
1
+ import { ColDef, ColGroupDef } from 'ag-grid-enterprise';
2
+ export declare function isPivotGrandTotal(colDef: ColDef | ColGroupDef): boolean;
@@ -1,3 +1,3 @@
1
- export function isPivotGrandTotalColumn(colDef) {
1
+ export function isPivotGrandTotal(colDef) {
2
2
  return colDef?.colId?.startsWith('PivotRowTotal_pivot_');
3
3
  }
@@ -25,6 +25,14 @@ export function normalizeTableLayoutModel(layout, options) {
25
25
  if (!layout.RowGroupedColumns) {
26
26
  layout.RowGroupedColumns = [];
27
27
  }
28
+ if (!('SuppressAggFuncInHeader' in layout)) {
29
+ // make it an own property
30
+ layout.SuppressAggFuncInHeader = undefined;
31
+ }
32
+ if (!('GrandTotalRow' in layout)) {
33
+ // make it an own property
34
+ layout.GrandTotalRow = undefined;
35
+ }
28
36
  const ColumnOrderSet = new Set(layout.TableColumns);
29
37
  if (layout.RowGroupedColumns && layout.RowGroupedColumns.length && layout.TableColumns) {
30
38
  // the layout.TableColumns might not include the group columns
@@ -131,6 +139,22 @@ export function normalizePivotLayoutModel(layout) {
131
139
  RowGroupDisplay: 'always-collapsed',
132
140
  };
133
141
  }
142
+ if (!('SuppressAggFuncInHeader' in layout)) {
143
+ // make it an own property
144
+ layout.SuppressAggFuncInHeader = undefined;
145
+ }
146
+ if (!('GrandTotalRow' in layout)) {
147
+ // make it an own property
148
+ layout.GrandTotalRow = undefined;
149
+ }
150
+ if (!('PivotGrandTotal' in layout)) {
151
+ // make it an own property
152
+ layout.PivotGrandTotal = undefined;
153
+ }
154
+ if (!('PivotColumnTotal' in layout)) {
155
+ // make it an own property
156
+ layout.PivotColumnTotal = undefined;
157
+ }
134
158
  return layout;
135
159
  }
136
160
  export function normalizeLayoutModel(layout, options) {
@@ -53,7 +53,7 @@ export function simplifyTableLayoutModel(layout) {
53
53
  });
54
54
  layout.RowGroupDisplayType = displayType;
55
55
  }
56
- if (!layout.GrandTotalRow) {
56
+ if (layout.GrandTotalRow === undefined) {
57
57
  delete layout.GrandTotalRow;
58
58
  }
59
59
  return layout;
@@ -75,6 +75,15 @@ export function simplifyPivotLayoutModel(layout) {
75
75
  if (!layout.PivotGroupedColumns && layout.RowGroupValues) {
76
76
  delete layout.RowGroupValues;
77
77
  }
78
+ if (layout.GrandTotalRow === undefined) {
79
+ delete layout.GrandTotalRow;
80
+ }
81
+ if (layout.PivotColumnTotal === undefined) {
82
+ delete layout.PivotColumnTotal;
83
+ }
84
+ if (layout.PivotGrandTotal === undefined) {
85
+ delete layout.PivotGrandTotal;
86
+ }
78
87
  return layout;
79
88
  }
80
89
  export function simplifyLayoutModel(layout) {
@@ -4382,18 +4382,18 @@ export declare const ADAPTABLE_METAMODEL: {
4382
4382
  kind: string;
4383
4383
  desc: string;
4384
4384
  isOpt: boolean;
4385
- ref?: undefined;
4385
+ ref: string;
4386
4386
  } | {
4387
4387
  name: string;
4388
4388
  kind: string;
4389
4389
  desc: string;
4390
- isOpt: boolean;
4391
- ref: string;
4390
+ isOpt?: undefined;
4391
+ ref?: undefined;
4392
4392
  } | {
4393
4393
  name: string;
4394
4394
  kind: string;
4395
4395
  desc: string;
4396
- isOpt?: undefined;
4396
+ isOpt: boolean;
4397
4397
  ref?: undefined;
4398
4398
  })[];
4399
4399
  };