@adaptabletools/adaptable 24.0.4 → 24.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "24.0.4",
3
+ "version": "24.0.6",
4
4
  "description": "Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -69,8 +69,7 @@
69
69
  "tinycolor2": "^1.4.2",
70
70
  "tslib": "^2.8.1",
71
71
  "tw-animate-css": "^1.4.0",
72
- "udsv": "0.6.0",
73
- "uuid": "9.0.1"
72
+ "udsv": "0.6.0"
74
73
  },
75
74
  "peerDependencies": {
76
75
  "ag-grid-enterprise": ">=36.2.0",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export type TypeUuid = string;
5
5
  /**
6
- * Creates a new UUID string.
6
+ * Creates a new RFC 4122/9562 v4 UUID string.
7
7
  */
8
8
  export declare const createUuid: () => TypeUuid;
@@ -1,2 +1,38 @@
1
- import { v4 as uuidv4 } from 'uuid';
2
- export const createUuid = () => uuidv4();
1
+ const BYTE_TO_HEX = Array.from({ length: 256 }, (_, i) => (i + 0x100).toString(16).slice(1));
2
+ const BYTES = new Uint8Array(16);
3
+ export const createUuid = () => {
4
+ const c = typeof globalThis !== 'undefined' ? globalThis.crypto : undefined;
5
+ if (typeof c?.randomUUID === 'function') {
6
+ return c.randomUUID();
7
+ }
8
+ if (typeof c?.getRandomValues === 'function') {
9
+ c.getRandomValues(BYTES);
10
+ }
11
+ else {
12
+ for (let i = 0; i < 16; i++) {
13
+ BYTES[i] = Math.floor(Math.random() * 256);
14
+ }
15
+ }
16
+ BYTES[6] = (BYTES[6] & 0x0f) | 0x40;
17
+ BYTES[8] = (BYTES[8] & 0x3f) | 0x80;
18
+ return (BYTE_TO_HEX[BYTES[0]] +
19
+ BYTE_TO_HEX[BYTES[1]] +
20
+ BYTE_TO_HEX[BYTES[2]] +
21
+ BYTE_TO_HEX[BYTES[3]] +
22
+ '-' +
23
+ BYTE_TO_HEX[BYTES[4]] +
24
+ BYTE_TO_HEX[BYTES[5]] +
25
+ '-' +
26
+ BYTE_TO_HEX[BYTES[6]] +
27
+ BYTE_TO_HEX[BYTES[7]] +
28
+ '-' +
29
+ BYTE_TO_HEX[BYTES[8]] +
30
+ BYTE_TO_HEX[BYTES[9]] +
31
+ '-' +
32
+ BYTE_TO_HEX[BYTES[10]] +
33
+ BYTE_TO_HEX[BYTES[11]] +
34
+ BYTE_TO_HEX[BYTES[12]] +
35
+ BYTE_TO_HEX[BYTES[13]] +
36
+ BYTE_TO_HEX[BYTES[14]] +
37
+ BYTE_TO_HEX[BYTES[15]]);
38
+ };
@@ -19,7 +19,12 @@ export declare const normalizeTableLayout: (tableLayout: TableLayout, options?:
19
19
  export declare const normalizePivotLayout: (pivotLayout: PivotLayout) => PivotLayout;
20
20
  /** Clears module-scoped dedupe state when a new Adaptable instance starts (e.g. Playwright retries). */
21
21
  export declare const resetLayoutHelperErrorOnceMessages: () => void;
22
+ /**
23
+ * Extracts active `ExceptionGroupKeys` for a Table or Pivot Layout (resolving `GroupKeys` against
24
+ * `PivotGroupedColumns` vs `RowGroupedColumns`; see #ssrm_row_group_expansion).
25
+ */
22
26
  export declare const getLayoutRowGroupValuesExceptionGroupKeys: (layout: TableLayout | PivotLayout) => any[][];
27
+ export declare const shouldUpdateRowGroupsExpandedState: (prevLayout: Layout | undefined | null, nextLayout: Layout) => boolean;
23
28
  export declare const toRowGroupValuesForLayoutState: (rowGroupValuesModel: TableLayoutModel["RowGroupValues"]) => TableLayout["RowGroupValues"];
24
29
  export declare const toRowGroupValuesForLayoutModel: (rowGroupValuesState: TableLayout["RowGroupValues"]) => TableLayoutModel["RowGroupValues"];
25
30
  export declare const checkForDuplicateColumns: (layout: TableLayout) => void;
@@ -96,16 +96,46 @@ export const getLayoutRowGroupValuesExceptionGroupKeys = (layout) => {
96
96
  return [];
97
97
  }
98
98
  if (Array.isArray(layout.RowGroupValues?.GroupKeys)) {
99
- const currentGroupedColumns = (layout.RowGroupedColumns || []).join(',');
99
+ const groupedColumns = isPivotLayout(layout)
100
+ ? layout.PivotGroupedColumns
101
+ : layout.RowGroupedColumns;
102
+ const currentGroupedColumns = (groupedColumns || []).join(',');
100
103
  const matchingGroupKeys = layout.RowGroupValues.GroupKeys.find(({ RowGroupedColumns }) => {
101
- return RowGroupedColumns.join(',') === currentGroupedColumns;
104
+ return (RowGroupedColumns || []).join(',') === currentGroupedColumns;
102
105
  });
103
106
  if (matchingGroupKeys) {
104
- return matchingGroupKeys.ExceptionGroupKeys;
107
+ return matchingGroupKeys.ExceptionGroupKeys || [];
105
108
  }
109
+ return [];
106
110
  }
107
111
  return layout.RowGroupValues.ExceptionGroupKeys || [];
108
112
  };
113
+ export const shouldUpdateRowGroupsExpandedState = (prevLayout, nextLayout) => {
114
+ if (!prevLayout) {
115
+ return false;
116
+ }
117
+ if (prevLayout.Name !== nextLayout.Name) {
118
+ return true;
119
+ }
120
+ const prevIsPivot = isPivotLayout(prevLayout);
121
+ const nextIsPivot = isPivotLayout(nextLayout);
122
+ if (prevIsPivot !== nextIsPivot) {
123
+ return true;
124
+ }
125
+ const prevGroupedColumns = (prevIsPivot ? prevLayout.PivotGroupedColumns : prevLayout.RowGroupedColumns) ?? [];
126
+ const nextGroupedColumns = (nextIsPivot ? nextLayout.PivotGroupedColumns : nextLayout.RowGroupedColumns) ?? [];
127
+ if (!isEqual(prevGroupedColumns, nextGroupedColumns)) {
128
+ return true;
129
+ }
130
+ const prevBehavior = prevLayout.RowGroupValues?.RowGroupDefaultBehavior ??
131
+ (prevIsPivot || prevGroupedColumns.length > 0 ? 'always-collapsed' : undefined);
132
+ const nextBehavior = nextLayout.RowGroupValues?.RowGroupDefaultBehavior ??
133
+ (nextIsPivot || nextGroupedColumns.length > 0 ? 'always-collapsed' : undefined);
134
+ if (prevBehavior !== nextBehavior) {
135
+ return true;
136
+ }
137
+ return !isEqual(getLayoutRowGroupValuesExceptionGroupKeys(prevLayout), getLayoutRowGroupValuesExceptionGroupKeys(nextLayout));
138
+ };
109
139
  export const toRowGroupValuesForLayoutState = (rowGroupValuesModel) => {
110
140
  if (!rowGroupValuesModel) {
111
141
  return undefined;
@@ -129,6 +129,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
129
129
  private primaryKeyLookup;
130
130
  private hasLoggedPrimaryKeyLookupFallback;
131
131
  private hasWarnedSameObjectUpdate;
132
+ private rowGroupExpansionMatcherRef;
132
133
  private debouncedSetSelectedRows;
133
134
  private debouncedSetSelectedCells;
134
135
  private agGridListenerKeydown;
@@ -100,11 +100,13 @@ import { weightedAverage } from '../AdaptableState/Aggregations/weightedAverage'
100
100
  import { ROW_SUMMARY_ROW_ID } from '../AdaptableState/Common/RowSummary';
101
101
  import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
102
102
  import { AgGridExportAdapter } from './AgGridExportAdapter';
103
- import { checkForDuplicateColumns, resetLayoutHelperErrorOnceMessages, getLayoutRowGroupValuesExceptionGroupKeys, isPivotLayout, layoutModelToLayoutState, layoutStateToLayoutModel, normalizeLayout, } from '../Utilities/Helpers/Layouts/LayoutHelper';
103
+ import { checkForDuplicateColumns, resetLayoutHelperErrorOnceMessages, isPivotLayout, layoutModelToLayoutState, layoutStateToLayoutModel, normalizeLayout, shouldUpdateRowGroupsExpandedState, } from '../Utilities/Helpers/Layouts/LayoutHelper';
104
104
  import { applyAutoCreatedLayout, buildLayoutFromColDefs, resolveAutoCreateLayoutConfig, } from '../Utilities/Helpers/Layouts/AutoCreateLayoutHelper';
105
105
  import { LayoutManager } from '../layout-manager/src';
106
106
  import { rowGroupDisplayTypeToGridOption } from '../layout-manager/src/rowGroupDisplayType';
107
107
  import { expandAllRowGroups } from '../layout-manager/src/expandAllRowGroups';
108
+ import { compileLayoutRowGroupExpansionMatcher, getLayoutModelGroupedColumns, getRowGroupNodePath, isPersistableGroupNode, isRowGroupExpandedByMatcher, } from '../layout-manager/src/rowGroupExpansionMatcher';
109
+ import { normalizeLayoutModel } from '../layout-manager/src/normalizeLayoutModel';
108
110
  import { isPivotLayoutModel } from '../layout-manager/src/isPivotLayoutModel';
109
111
  import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, HIDDEN_COLUMN_TYPE, hiddenColDefConfig, PIVOT_AGGREGATION_TOTAL_COLUMN_TYPE, PIVOT_ANY_TOTAL_COLUMN_TYPE, PIVOT_COLUMN_TOTAL_COLUMN_TYPE, PIVOT_GRAND_TOTAL_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
110
112
  import { mergeDataTypeDefinitions } from './AgGridCellDataTypeHelper';
@@ -189,6 +191,7 @@ export class AdaptableAgGrid {
189
191
  primaryKeyLookup;
190
192
  hasLoggedPrimaryKeyLookupFallback = false;
191
193
  hasWarnedSameObjectUpdate = false;
194
+ rowGroupExpansionMatcherRef = { current: null };
192
195
  debouncedSetSelectedRows;
193
196
  debouncedSetSelectedCells;
194
197
  agGridListenerKeydown;
@@ -386,6 +389,11 @@ export class AdaptableAgGrid {
386
389
  colTypes: gridOptions.columnTypes,
387
390
  defaultColDef: gridOptions.defaultColDef,
388
391
  });
392
+ if (gridOptions.rowModelType === 'serverSide' && layoutModel) {
393
+ this.rowGroupExpansionMatcherRef.current = compileLayoutRowGroupExpansionMatcher(normalizeLayoutModel(layoutModel, {
394
+ isTree: !!gridOptions.treeData,
395
+ }));
396
+ }
389
397
  columnDefs = LayoutManager.getColumnDefsChangesForLayout(layoutModel, columnDefs) ?? columnDefs;
390
398
  gridOptions.columnDefs = columnDefs;
391
399
  gridOptions.initialState = initialGridState;
@@ -422,11 +430,13 @@ export class AdaptableAgGrid {
422
430
  debugId: this.adaptableOptions.adaptableId,
423
431
  initialRowSelection,
424
432
  getRowSelectionCheckboxesOverride: () => this.getRowSelectionCheckboxesOverride(),
433
+ rowGroupExpansionMatcherRef: this.rowGroupExpansionMatcherRef,
425
434
  });
426
435
  this.silentUpdateCurrentLayoutModel(layoutModel);
427
436
  if (isPivotLayoutModel(layoutModel)) {
428
437
  this.layoutManager.setLayout(layoutModel, {
429
438
  force: true,
439
+ skipApplyRowGroupsExpandedState: this.getAgGridRowModelType() === 'serverSide',
430
440
  });
431
441
  }
432
442
  this.layoutManager.onChange((layoutModel) => {
@@ -473,7 +483,9 @@ export class AdaptableAgGrid {
473
483
  this._prevLayout = currentLayout;
474
484
  this.__prevLayoutForRefresh = currentLayout;
475
485
  const layoutModelForApply = layoutStateToLayoutModel(currentLayout);
476
- this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues, layoutModelForApply.RowGroupedColumns);
486
+ if (this.getAgGridRowModelType() !== 'serverSide') {
487
+ this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues, getLayoutModelGroupedColumns(layoutModelForApply));
488
+ }
477
489
  this.layoutManager.applyColumnGroupCollapseExpandState(layoutModelForApply);
478
490
  this.autoSizeLayoutIfNeeded();
479
491
  this.ModuleService.createModuleUIItems();
@@ -976,6 +988,24 @@ export class AdaptableAgGrid {
976
988
  }
977
989
  return true;
978
990
  });
991
+ if (gridOptions.rowModelType === 'serverSide') {
992
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'isServerSideGroupOpenByDefault', (original_isServerSideGroupOpenByDefault) => {
993
+ return (params) => {
994
+ if (!params.rowNode.group) {
995
+ return original_isServerSideGroupOpenByDefault
996
+ ? original_isServerSideGroupOpenByDefault(params)
997
+ : false;
998
+ }
999
+ const matcher = this.rowGroupExpansionMatcherRef.current;
1000
+ if (!matcher) {
1001
+ return original_isServerSideGroupOpenByDefault
1002
+ ? original_isServerSideGroupOpenByDefault(params)
1003
+ : false;
1004
+ }
1005
+ return isRowGroupExpandedByMatcher(matcher, params.rowNode);
1006
+ };
1007
+ });
1008
+ }
979
1009
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'aggFuncs', (original_aggFuncs) => {
980
1010
  const aggregationFunctions = original_aggFuncs || {};
981
1011
  aggregationFunctions[ONLY_AGG_FN_NAME] = (params) => {
@@ -1880,7 +1910,8 @@ export class AdaptableAgGrid {
1880
1910
  }
1881
1911
  }
1882
1912
  isInPivotMode() {
1883
- return (this.agGridModulesAdapter.isAgGridModuleRegistered('PivotModule') &&
1913
+ return ((this.agGridModulesAdapter.isAgGridModuleRegistered('PivotModule') ||
1914
+ this.agGridModulesAdapter.isAgGridModuleRegistered('ServerSideRowModelModule')) &&
1884
1915
  this.agGridAdapter.getAgGridApi().isPivotMode());
1885
1916
  }
1886
1917
  deriveAdaptableColumnStateFromAgGrid() {
@@ -2343,7 +2374,9 @@ export class AdaptableAgGrid {
2343
2374
  layout = this.api.layoutApi.getCurrentLayout();
2344
2375
  }
2345
2376
  const layoutModel = layoutStateToLayoutModel(layout);
2346
- this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues, layoutModel.RowGroupedColumns);
2377
+ if (this.getAgGridRowModelType() !== 'serverSide') {
2378
+ this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues, getLayoutModelGroupedColumns(layoutModel));
2379
+ }
2347
2380
  this.layoutManager.applyColumnGroupCollapseExpandState(layoutModel);
2348
2381
  }
2349
2382
  isGroupRowNode(rowNode) {
@@ -3753,24 +3786,24 @@ export class AdaptableAgGrid {
3753
3786
  acc[key] = true;
3754
3787
  return acc;
3755
3788
  }, {});
3756
- this.agGridAdapter.getAgGridApi().forEachNode((node) => {
3757
- if (node.group && !node.expanded) {
3758
- const nodePath = [];
3759
- let current = node;
3760
- while (current) {
3761
- nodePath.push(current.key);
3762
- current = current.parent;
3763
- }
3764
- const nodeKey = nodePath
3765
- .filter((x) => !!x)
3766
- .reverse()
3767
- .join(GROUP_PATH_SEPARATOR);
3789
+ const agGridApi = this.agGridAdapter.getAgGridApi();
3790
+ const inPivotMode = this.isInPivotMode();
3791
+ const allowUnbalanced = !!agGridApi.getGridOption('groupAllowUnbalanced');
3792
+ const nodesToExpand = [];
3793
+ agGridApi.forEachNode((node) => {
3794
+ if (isPersistableGroupNode(node, { inPivotMode, allowUnbalanced }) && !node.expanded) {
3795
+ const nodeKey = getRowGroupNodePath(node).join(GROUP_PATH_SEPARATOR);
3768
3796
  if (expandedKeys[nodeKey]) {
3769
- node.setExpanded(true);
3797
+ nodesToExpand.push(node);
3770
3798
  }
3771
3799
  }
3772
3800
  });
3773
- this.agGridAdapter.getAgGridApi().onGroupExpandedOrCollapsed();
3801
+ for (let i = 0; i < nodesToExpand.length; i++) {
3802
+ nodesToExpand[i].setExpanded(true);
3803
+ }
3804
+ if (this.getAgGridRowModelType() === 'clientSide') {
3805
+ agGridApi.onGroupExpandedOrCollapsed();
3806
+ }
3774
3807
  }
3775
3808
  }
3776
3809
  getAgGridColumnForColumnId(columnId) {
@@ -3835,6 +3868,7 @@ export class AdaptableAgGrid {
3835
3868
  this.layoutManager?.destroy();
3836
3869
  this.layoutManager = null;
3837
3870
  this.rowSelectionCheckboxesOverride = null;
3871
+ this.rowGroupExpansionMatcherRef.current = null;
3838
3872
  const agGridApi = this.agGridAdapter?.getAgGridApi();
3839
3873
  if (agGridApi && !agGridApi.isDestroyed()) {
3840
3874
  agGridApi.removeEventListener('firstDataRendered', this.listenerFirstDataRendered);
@@ -3881,7 +3915,9 @@ export class AdaptableAgGrid {
3881
3915
  'getRowStyle',
3882
3916
  'gridId',
3883
3917
  'isExternalFilterPresent',
3918
+ 'isServerSideGroupOpenByDefault',
3884
3919
  'sideBar',
3920
+ 'ssrmExpandAllAffectsAllRows',
3885
3921
  'statusBar',
3886
3922
  'suppressAggFuncInHeader',
3887
3923
  'defaultColDef',
@@ -4013,26 +4049,7 @@ export class AdaptableAgGrid {
4013
4049
  }
4014
4050
  updateLayoutInManagerAfterStoreHasChanged(layout = this.api.layoutApi.getCurrentLayout()) {
4015
4051
  checkForDuplicateColumns(layout);
4016
- const isLayoutSwitch = this._prevLayout && layout.Name != this._prevLayout.Name;
4017
- let shouldUpdateExpandState = isLayoutSwitch;
4018
- if (!isLayoutSwitch && this._prevLayout) {
4019
- if (layout.RowGroupValues?.RowGroupDefaultBehavior &&
4020
- this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
4021
- layout.RowGroupValues?.RowGroupDefaultBehavior) {
4022
- shouldUpdateExpandState = true;
4023
- }
4024
- else {
4025
- const prevLayoutExceptionGroupKeys = getLayoutRowGroupValuesExceptionGroupKeys(this._prevLayout)
4026
- .flat()
4027
- .join(',');
4028
- const currentLayoutExceptionGroupKeys = getLayoutRowGroupValuesExceptionGroupKeys(layout)
4029
- .flat()
4030
- .join(',');
4031
- if (prevLayoutExceptionGroupKeys !== currentLayoutExceptionGroupKeys) {
4032
- shouldUpdateExpandState = true;
4033
- }
4034
- }
4035
- }
4052
+ const shouldUpdateExpandState = shouldUpdateRowGroupsExpandedState(this._prevLayout, layout);
4036
4053
  const prevLayout = this._prevLayout;
4037
4054
  this._prevLayout = layout;
4038
4055
  const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
@@ -55,6 +55,11 @@ export class AgGridOptionsService {
55
55
  revertGridOptionsPropertiesToUserValue(gridOptions, propertyNames) {
56
56
  for (const propertyName of propertyNames) {
57
57
  const userKey = `user.${propertyName}`;
58
+ const adaptableKey = `adaptable.${propertyName}`;
59
+ if (!this.gridOptionsPropertyCache.has(userKey) &&
60
+ !this.gridOptionsPropertyCache.has(adaptableKey)) {
61
+ continue;
62
+ }
58
63
  const userValue = this.gridOptionsPropertyCache.get(userKey);
59
64
  gridOptions[propertyName] = userValue;
60
65
  }
@@ -1,2 +1 @@
1
- export type TypeUuid = string;
2
- export declare const createUuid: () => TypeUuid;
1
+ export { createUuid, type TypeUuid } from '../../AdaptableState/Uuid';
@@ -1,2 +1 @@
1
- import { v4 as uuidv4 } from 'uuid';
2
- export const createUuid = () => uuidv4();
1
+ export { createUuid } from '../../AdaptableState/Uuid';
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1795455639991 || Date.now(),
4
- VERSION: "24.0.4" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1796400962001 || Date.now(),
4
+ VERSION: "24.0.6" || '--current-version--',
5
5
  };
@@ -1,6 +1,7 @@
1
- import { CheckboxSelectionCallbackParams, ColDef, ColumnState, GridApi, GridOptions, GridState } from 'ag-grid-enterprise';
1
+ import { AgEventType, CheckboxSelectionCallbackParams, ColDef, ColumnState, GridApi, GridOptions, GridState } from 'ag-grid-enterprise';
2
2
  import { PivotLayoutModel, TableLayoutModel } from './LayoutManagerModel';
3
3
  import { LMEmitter } from './LMEmitter';
4
+ import { RowGroupExpansionMatcherRef } from './rowGroupExpansionMatcher';
4
5
  import { LayoutRowSelection } from '../../AdaptableState/LayoutState';
5
6
  export declare const PIVOT_ANY_TOTAL_COL_TYPE = "pivotAnyTotal";
6
7
  export declare const PIVOT_GRAND_TOTAL_COL_TYPE = "pivotGrandTotal";
@@ -16,9 +17,36 @@ export type LayoutManagerOptions = {
16
17
  * When this returns a function, it replaces layout/gridOptions checkbox config.
17
18
  */
18
19
  getRowSelectionCheckboxesOverride?: () => ((params: CheckboxSelectionCallbackParams) => boolean) | undefined;
20
+ /**
21
+ * Shared ref holding the compiled row-group expansion matcher so AdapTable's
22
+ * `isServerSideGroupOpenByDefault` callback stays in sync with `LayoutManager`
23
+ * (including before `LayoutManager` is constructed during AG Grid init; see #ssrm_row_group_expansion).
24
+ */
25
+ rowGroupExpansionMatcherRef?: RowGroupExpansionMatcherRef;
26
+ };
27
+ type SsrmExpansionBatch = {
28
+ kind: 'toggles';
29
+ toggles: {
30
+ path: any[];
31
+ expanded: boolean;
32
+ }[];
33
+ } | {
34
+ kind: 'bulk';
35
+ source: string | undefined;
36
+ postBulkToggles: {
37
+ path: any[];
38
+ expanded: boolean;
39
+ }[];
40
+ };
41
+ type GridLayoutTriggerEvent = {
42
+ type: AgEventType;
43
+ event?: any;
44
+ ssrmExpansionBatch?: SsrmExpansionBatch;
19
45
  };
20
- type ApplyLayoutOptions = {
46
+ type SetLayoutOptions = {
21
47
  skipApplyRowGroupsExpandedState?: boolean;
48
+ force?: boolean;
49
+ skipTriggerChange?: boolean;
22
50
  };
23
51
  export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
24
52
  private gridApi;
@@ -35,10 +63,19 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
35
63
  private layoutManagerDebugId;
36
64
  private initialRowSelection;
37
65
  private getRowSelectionCheckboxesOverride?;
66
+ private rowGroupExpansionMatcherRef;
67
+ private rowModelType;
68
+ private pendingSsrmExpansionBatch;
69
+ private ssrmExpansionFlushScheduled;
70
+ private gridLayoutChangedLogger;
38
71
  constructor(options: LayoutManagerOptions);
39
72
  destroy(): void;
40
73
  private setupEvents;
41
74
  private setupSetColumnDefs;
75
+ private scheduleSsrmExpansionFlush;
76
+ private applyExpansionTogglesToPaths;
77
+ private patchCurrentLayoutGroupKeysForPreviousGrouping;
78
+ private flushPendingSsrmExpansionBatch;
42
79
  private globalAgGridEventListener;
43
80
  private columnDefsChanged;
44
81
  private indexColumns;
@@ -47,11 +84,14 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
47
84
  onChange(fn: (layout: TableLayoutModel | PivotLayoutModel) => void): () => void;
48
85
  onColumnDefsChanged(fn: (colDefs: GridOptions['columnDefs']) => void): () => void;
49
86
  setOptions(options: LayoutManagerOptions): void;
50
- getLayoutModelFromGrid(): TableLayoutModel | PivotLayoutModel;
51
- getPivotLayoutModelFromGrid(): PivotLayoutModel;
52
- getTableLayoutModelFromGrid(): TableLayoutModel;
87
+ getLayoutModelFromGrid(triggerEvent?: GridLayoutTriggerEvent): TableLayoutModel | PivotLayoutModel;
88
+ getPivotLayoutModelFromGrid(triggerEvent?: GridLayoutTriggerEvent): PivotLayoutModel;
89
+ getTableLayoutModelFromGrid(triggerEvent?: GridLayoutTriggerEvent): TableLayoutModel;
53
90
  private isTreeMode;
54
- getUndecidedLayoutModelFromGrid(columnState: ColumnState[]): TableLayoutModel | PivotLayoutModel;
91
+ private getRowModelType;
92
+ private isServerSideRowModel;
93
+ private isClientSideRowModel;
94
+ getUndecidedLayoutModelFromGrid(columnState: ColumnState[], triggerEvent?: GridLayoutTriggerEvent): TableLayoutModel | PivotLayoutModel;
55
95
  static getColumnDefsChangesForLayout(layout: TableLayoutModel | PivotLayoutModel, colDefs: GridOptions['columnDefs']): GridOptions['columnDefs'] | null;
56
96
  static getAGGridInitialStateForLayout(layout: TableLayoutModel | PivotLayoutModel, colDefs: GridOptions['columnDefs'], options: {
57
97
  isTree: boolean;
@@ -67,10 +107,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
67
107
  silentSetCurrentLayout(layout: TableLayoutModel | PivotLayoutModel, options?: {
68
108
  normalize?: boolean;
69
109
  }): void;
70
- setLayout(layout: TableLayoutModel | PivotLayoutModel, options?: ApplyLayoutOptions & {
71
- force?: boolean;
72
- skipTriggerChange?: boolean;
73
- }): boolean;
110
+ setLayout(layout: TableLayoutModel | PivotLayoutModel, options?: SetLayoutOptions): boolean;
74
111
  isCurrentLayoutPivot(): boolean;
75
112
  private suspendAgGridListener;
76
113
  private resumeAgGridListener;
@@ -90,7 +127,11 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
90
127
  */
91
128
  private getRowSelectionCheckboxColumnIds;
92
129
  private applyTableLayout;
130
+ private getNextRowGroupExceptionPaths;
131
+ private getAllLoadedRowGroupNodePaths;
93
132
  private getRowGroupNodePathsAs;
133
+ private syncServerSideRowGroupExpansionMatcher;
134
+ private applyLayoutRowGroupExpansion;
94
135
  applyRowGroupValues(RowGroupValues: TableLayoutModel['RowGroupValues'], rowGroupedColumns: string[]): void;
95
136
  private computeColumnStateForPivotLayout;
96
137
  private computePivotAggregations;