@adaptabletools/adaptable 24.0.4 → 24.0.5
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 +1 -1
- package/src/Utilities/Helpers/Layouts/LayoutHelper.d.ts +5 -0
- package/src/Utilities/Helpers/Layouts/LayoutHelper.js +33 -3
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +55 -38
- package/src/agGrid/AgGridOptionsService.js +5 -0
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.d.ts +51 -10
- package/src/layout-manager/src/index.js +334 -91
- package/src/layout-manager/src/isLayoutEqual.js +4 -0
- package/src/layout-manager/src/rowGroupExpansionMatcher.d.ts +116 -0
- package/src/layout-manager/src/rowGroupExpansionMatcher.js +240 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/vendor/components/Resizable/index.d.ts.map +1 -1
- package/vendor/components/Resizable/index.js +22 -10
- package/vendor/components/Resizable/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -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
|
|
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,
|
|
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.
|
|
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.
|
|
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()
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
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
|
-
|
|
3797
|
+
nodesToExpand.push(node);
|
|
3770
3798
|
}
|
|
3771
3799
|
}
|
|
3772
3800
|
});
|
|
3773
|
-
|
|
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
|
|
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
|
}
|
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:
|
|
4
|
-
VERSION: "24.0.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1796394572880 || Date.now(),
|
|
4
|
+
VERSION: "24.0.5" || '--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
|
|
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
|
-
|
|
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?:
|
|
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;
|