@adaptabletools/adaptable 20.2.1 → 20.2.3

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 (38) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/ExportOptions.d.ts +16 -5
  3. package/src/AdaptableState/Common/AdaptableColumn.d.ts +4 -0
  4. package/src/AdaptableState/LayoutState.d.ts +16 -2
  5. package/src/AdaptableState/QuickSearchState.d.ts +5 -5
  6. package/src/Api/ExportApi.d.ts +4 -9
  7. package/src/Api/Implementation/ColumnApiImpl.js +1 -0
  8. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -5
  9. package/src/Api/Implementation/ExportApiImpl.js +3 -3
  10. package/src/Api/Implementation/LayoutHelpers.d.ts +3 -0
  11. package/src/Api/Implementation/LayoutHelpers.js +76 -40
  12. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -2
  13. package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
  14. package/src/Api/Internal/FormatColumnInternalApi.d.ts +1 -1
  15. package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
  16. package/src/Api/QuickSearchApi.d.ts +2 -2
  17. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +8 -4
  18. package/src/Redux/ActionsReducers/QuickSearchRedux.js +10 -10
  19. package/src/Redux/Store/AdaptableStore.js +1 -1
  20. package/src/Strategy/QuickSearchModule.d.ts +1 -0
  21. package/src/Strategy/QuickSearchModule.js +14 -0
  22. package/src/View/Components/StyleComponent.d.ts +1 -0
  23. package/src/View/Components/StyleComponent.js +2 -1
  24. package/src/View/Layout/Wizard/sections/ColumnsSection.js +27 -8
  25. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
  26. package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
  27. package/src/View/QuickSearch/QuickSearchPopup.js +7 -4
  28. package/src/agGrid/AdaptableAgGrid.js +20 -9
  29. package/src/agGrid/AgGridAdapter.js +6 -1
  30. package/src/agGrid/AgGridColumnAdapter.js +10 -8
  31. package/src/env.js +2 -2
  32. package/src/layout-manager/src/LayoutManagerModel.d.ts +17 -4
  33. package/src/layout-manager/src/index.d.ts +1 -1
  34. package/src/layout-manager/src/index.js +61 -18
  35. package/src/metamodel/adaptable.metamodel.d.ts +23 -9
  36. package/src/metamodel/adaptable.metamodel.js +1 -1
  37. package/src/types.d.ts +2 -2
  38. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -22,6 +22,7 @@ import { ReorderDraggable } from '../../../Components/ReorderDraggable';
22
22
  import { AdaptableFormControlTextClear } from '../../../Components/Forms/AdaptableFormControlTextClear';
23
23
  import { sortColumnIdsByOrder } from '../../../../layout-manager/src/sortColumnIdsByOrder';
24
24
  import HelpBlock from '../../../../components/HelpBlock';
25
+ import { AG_GRID_SELECTION_COLUMN } from '../../../../Utilities/Constants/GeneralConstants';
25
26
  const PropertyOrderText = (props) => (React.createElement(Text, { fontWeight: 600, fontSize: 2 }, props.children));
26
27
  const columnTypes = {
27
28
  default: {
@@ -195,6 +196,7 @@ export const ColumnsSection = (props) => {
195
196
  const adaptable = useAdaptable();
196
197
  const { data: layout } = useOnePageAdaptableWizardContext();
197
198
  const [searchInputValue, setSearchInputValue] = React.useState('');
199
+ let hasSelectionColumn = false;
198
200
  const allColumns = adaptable.api.columnApi
199
201
  .getUIAvailableColumns()
200
202
  .filter((col) => {
@@ -204,7 +206,23 @@ export const ColumnsSection = (props) => {
204
206
  return !col.isGeneratedRowGroupColumn;
205
207
  })
206
208
  // if the current Layout is a PivotLayout, then we also filter out current Pivot Result Columns
207
- .filter((col) => !col.isGeneratedPivotResultColumn);
209
+ .filter((col) => !col.isGeneratedPivotResultColumn)
210
+ // also we need to filter out selection column
211
+ .filter((col) => {
212
+ const result = !col.isGeneratedSelectionColumn;
213
+ if (!result) {
214
+ hasSelectionColumn = true;
215
+ }
216
+ return result;
217
+ });
218
+ const onChange = (data) => {
219
+ if (hasSelectionColumn &&
220
+ Array.isArray(data.TableColumns) &&
221
+ !data.TableColumns.includes(AG_GRID_SELECTION_COLUMN)) {
222
+ data.TableColumns.unshift(AG_GRID_SELECTION_COLUMN);
223
+ }
224
+ props.onChange(data);
225
+ };
208
226
  // however, changes in RowGroupedColumns done in the previous step
209
227
  // are reflected into the layout, so we use the latest layout.RowGroupedColumns
210
228
  // to create new columns
@@ -261,7 +279,7 @@ export const ColumnsSection = (props) => {
261
279
  ColumnVisibility[colId] = false;
262
280
  }
263
281
  });
264
- props.onChange({
282
+ onChange({
265
283
  ...layout,
266
284
  TableColumns: columnIds,
267
285
  ColumnVisibility,
@@ -300,14 +318,14 @@ export const ColumnsSection = (props) => {
300
318
  return shouldInclude;
301
319
  });
302
320
  }
303
- props.onChange({
321
+ onChange({
304
322
  ...layout,
305
323
  TableColumns: TableColumns,
306
324
  ColumnVisibility,
307
325
  });
308
326
  };
309
327
  const handlePinChange = (columnId, pinning) => {
310
- props.onChange({
328
+ onChange({
311
329
  ...layout,
312
330
  ColumnPinning: {
313
331
  ...layout.ColumnPinning,
@@ -316,7 +334,7 @@ export const ColumnsSection = (props) => {
316
334
  });
317
335
  };
318
336
  const handleColumnNameChange = (columnId, headerName) => {
319
- props.onChange({
337
+ onChange({
320
338
  ...layout,
321
339
  ColumnHeaders: {
322
340
  ...layout.ColumnHeaders,
@@ -325,7 +343,7 @@ export const ColumnsSection = (props) => {
325
343
  });
326
344
  };
327
345
  const handleColumnWidthChange = (columnId, width) => {
328
- props.onChange({
346
+ onChange({
329
347
  ...layout,
330
348
  ColumnWidths: {
331
349
  ...layout.ColumnWidths,
@@ -334,7 +352,8 @@ export const ColumnsSection = (props) => {
334
352
  });
335
353
  };
336
354
  const visibleIds = layout.TableColumns.filter((colId) => {
337
- return layout.ColumnVisibility?.[colId] !== false;
355
+ return (layout.ColumnVisibility?.[colId] !== false &&
356
+ adaptable.api.columnApi.isSelectionColumn(colId) === false);
338
357
  });
339
358
  const toLabel = (colId) => adaptable.api.columnApi.getFriendlyNameForColumnId(colId, layout);
340
359
  const toIdentifier = (colId) => colId;
@@ -373,7 +392,7 @@ export const ColumnsSection = (props) => {
373
392
  noSelectionLabel: `No Columns Selected`,
374
393
  onChange: handleColumnsChange,
375
394
  onSelectAll: () => {
376
- props.onChange({
395
+ onChange({
377
396
  ...layout,
378
397
  ColumnVisibility: {},
379
398
  TableColumns: ColumnOrderAllColumns.map((col) => col.columnId),
@@ -39,8 +39,8 @@ export const RowGroupBehaviorSection = (props) => {
39
39
  }
40
40
  onChange(newLayout);
41
41
  } },
42
- React.createElement(TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Always open Layout with all Grouped Rows collapsed" }),
43
- React.createElement(TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Always open Layout with all Grouped Rows expanded" }),
42
+ React.createElement(TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Layout opens with all Grouped Rows always collapsed" }),
43
+ React.createElement(TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Layout opens with all Grouped Rows always expanded" }),
44
44
  React.createElement(TypeRadio, { value: "expanded", text: "Mostly Expanded", description: "Layout opens with all Grouped rows expanded, other than those collapsed when Layout last displayed" }),
45
45
  React.createElement(TypeRadio, { value: "collapsed", text: "Mostly Collapsed", description: "Layout opens with all Grouped rows collapsed, other than those expanded when Layout last displayed" }))));
46
46
  };
@@ -6,7 +6,7 @@ interface QuickSearchPopupProps extends ModuleViewPopupProps<any> {
6
6
  QuickSearchText: string;
7
7
  QuickSearchStyle: AdaptableStyle;
8
8
  onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction;
9
- onSetStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetStyleAction;
9
+ onSetMatchingCellStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetMatchingCellStyleAction;
10
10
  }
11
11
  export declare const QuickSearchPopup: import("react-redux").ConnectedComponent<(props: QuickSearchPopupProps) => React.JSX.Element, {
12
12
  [x: string]: any;
@@ -11,6 +11,7 @@ import { CheckBox } from '../../components/CheckBox';
11
11
  import StringExtensions from '../../Utilities/Extensions/StringExtensions';
12
12
  import { useQuickSearchDebounced } from './useQuickSearchDebounced';
13
13
  import { QuickSearchInput } from './QuickSearchInput';
14
+ import HelpBlock from '../../components/HelpBlock';
14
15
  const QuickSearchPopupComponent = (props) => {
15
16
  const [searchText, search] = useQuickSearchDebounced(props);
16
17
  const [state, setState] = useState({
@@ -19,7 +20,7 @@ const QuickSearchPopupComponent = (props) => {
19
20
  });
20
21
  const onUpdateStyle = (style) => {
21
22
  setState({ ...state, EditedStyle: style });
22
- props.onSetStyle(style);
23
+ props.onSetMatchingCellStyle(style);
23
24
  };
24
25
  const onQuickSearchBehaviourChange = (checked) => {
25
26
  setState({ ...state, RunQueryAfterQuickSearch: checked });
@@ -33,21 +34,23 @@ const QuickSearchPopupComponent = (props) => {
33
34
  React.createElement(Panel, { header: props.api.internalApi.getCorrectEnglishVariant('Behaviour'), style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
34
35
  ' ',
35
36
  React.createElement(Flex, { flexDirection: "column" },
37
+ React.createElement(HelpBlock, { fontSize: 2, marginTop: 2, marginBottom: 2 }, "Filters the Grid to only show rows with matching cells; use with care as can cause performance issues"),
38
+ ' ',
36
39
  React.createElement(FormLayout, { columns: [1, 2] },
37
40
  React.createElement(FormRow, null,
38
41
  React.createElement(CheckBox, { "data-name": "filter-quick-search-results", value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))))),
39
- React.createElement(StyleComponent, { style: { height: '100%' }, api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
42
+ React.createElement(StyleComponent, { style: { height: '100%' }, headerText: 'Cell Matching Style', api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
40
43
  };
41
44
  function mapStateToProps(state, ownProps) {
42
45
  return {
43
46
  QuickSearchText: state.QuickSearch.QuickSearchText,
44
- QuickSearchStyle: state.QuickSearch.Style,
47
+ QuickSearchStyle: state.QuickSearch.CellMatchStyle ?? {},
45
48
  };
46
49
  }
47
50
  function mapDispatchToProps(dispatch) {
48
51
  return {
49
52
  onRunQuickSearch: (quickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(quickSearchText)),
50
- onSetStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetStyle(style)),
53
+ onSetMatchingCellStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetCellMatchingStyle(style)),
51
54
  };
52
55
  }
53
56
  export const QuickSearchPopup = connect(mapStateToProps, mapDispatchToProps)(QuickSearchPopupComponent);
@@ -90,7 +90,7 @@ import { weightedAverage } from '../Utilities/weightedAverage';
90
90
  import { ROW_SUMMARY_ROW_ID } from '../AdaptableState/Common/RowSummary';
91
91
  import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
92
92
  import { AgGridExportAdapter } from './AgGridExportAdapter';
93
- import { checkForDuplicateColumns, isPivotLayout, layoutModelToLayoutState, layoutStateToLayoutModel, normalizeLayout, } from '../Api/Implementation/LayoutHelpers';
93
+ import { checkForDuplicateColumns, getLayoutRowGroupValuesExceptionGroupKeys, isPivotLayout, layoutModelToLayoutState, layoutStateToLayoutModel, normalizeLayout, } from '../Api/Implementation/LayoutHelpers';
94
94
  import { LayoutManager } from '../layout-manager/src';
95
95
  import { isPivotLayoutModel } from '../layout-manager/src/isPivotLayoutModel';
96
96
  import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, PIVOT_AGGREGATION_TOTAL_COLUMN_TYPE, PIVOT_ANY_TOTAL_COLUMN_TYPE, PIVOT_COLUMN_TOTAL_COLUMN_TYPE, PIVOT_GRAND_TOTAL_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
@@ -449,7 +449,7 @@ export class AdaptableAgGrid {
449
449
  this.updateColumnModelAndRefreshGrid();
450
450
  }
451
451
  const layoutModelForApply = layoutStateToLayoutModel(currentLayout);
452
- this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues);
452
+ this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues, layoutModelForApply.RowGroupedColumns);
453
453
  this.layoutManager.applyColumnGroupCollapseExpandState(layoutModelForApply);
454
454
  this.autoSizeLayoutIfNeeded();
455
455
  this.ModuleService.createModuleUIItems();
@@ -2014,7 +2014,7 @@ You need to define at least one Layout!`);
2014
2014
  layout = this.api.layoutApi.getCurrentLayout();
2015
2015
  }
2016
2016
  const layoutModel = layoutStateToLayoutModel(layout);
2017
- this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues);
2017
+ this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues, layoutModel.RowGroupedColumns);
2018
2018
  }
2019
2019
  isGroupRowNode(rowNode) {
2020
2020
  if (!rowNode) {
@@ -3107,12 +3107,23 @@ You need to define at least one Layout!`);
3107
3107
  checkForDuplicateColumns(layout);
3108
3108
  const isLayoutSwitch = this._prevLayout && layout.Name != this._prevLayout.Name;
3109
3109
  let shouldUpdateExpandState = isLayoutSwitch;
3110
- if (!isLayoutSwitch &&
3111
- this._prevLayout &&
3112
- layout.RowGroupValues?.RowGroupDefaultBehavior &&
3113
- this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
3114
- layout.RowGroupValues?.RowGroupDefaultBehavior) {
3115
- shouldUpdateExpandState = true;
3110
+ if (!isLayoutSwitch && this._prevLayout) {
3111
+ if (layout.RowGroupValues?.RowGroupDefaultBehavior &&
3112
+ this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
3113
+ layout.RowGroupValues?.RowGroupDefaultBehavior) {
3114
+ shouldUpdateExpandState = true;
3115
+ }
3116
+ else {
3117
+ const prevLayoutExceptionGroupKeys = getLayoutRowGroupValuesExceptionGroupKeys(this._prevLayout)
3118
+ .flat()
3119
+ .join(',');
3120
+ const currentLayoutExceptionGroupKeys = getLayoutRowGroupValuesExceptionGroupKeys(layout)
3121
+ .flat()
3122
+ .join(',');
3123
+ if (prevLayoutExceptionGroupKeys !== currentLayoutExceptionGroupKeys) {
3124
+ shouldUpdateExpandState = true;
3125
+ }
3126
+ }
3116
3127
  }
3117
3128
  this._prevLayout = layout;
3118
3129
  const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
@@ -425,6 +425,7 @@ export class AgGridAdapter {
425
425
  const isFdc3MainActionColumn = this.adaptableApi.fdc3Api.internalApi.isFdc3MainActionColumn(colId);
426
426
  let friendlyName;
427
427
  const isGeneratedRowGroupColumn = columnApi.isAutoRowGroupColumn(ColumnId);
428
+ const isGeneratedSelectionColumn = columnApi.isSelectionColumn(ColumnId);
428
429
  const isGeneratedPivotResultColumn = columnApi.isPivotResultColumn(ColumnId) && !agGridColumn.isPrimary();
429
430
  const colExists = columnApi.doesColumnExist(ColumnId) ||
430
431
  isGeneratedRowGroupColumn ||
@@ -464,7 +465,7 @@ export class AgGridAdapter {
464
465
  colDef.lockVisible === true &&
465
466
  colDef.suppressColumnsToolPanel === true &&
466
467
  colDef.suppressFiltersToolPanel === true;
467
- const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn;
468
+ const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn || isGeneratedSelectionColumn;
468
469
  const abColumn = {
469
470
  Uuid: createUuid(),
470
471
  isTreeColumn,
@@ -491,6 +492,7 @@ export class AgGridAdapter {
491
492
  hideable: this.isColumnHideable(colDef),
492
493
  isGrouped: isGenerated ? false : this.isColumnRowGrouped(colDef),
493
494
  isGeneratedRowGroupColumn,
495
+ isGeneratedSelectionColumn,
494
496
  isGeneratedPivotResultColumn,
495
497
  isFixed: this.isColumnFixed(colDef),
496
498
  pinned: this.getColumnPinnedPosition(colDef),
@@ -676,6 +678,9 @@ export class AgGridAdapter {
676
678
  this.adaptableApi.columnApi.isAutoRowGroupColumn(colDef.colId)) {
677
679
  return false;
678
680
  }
681
+ if (this.adaptableApi.columnApi.isSelectionColumn(colDef.colId)) {
682
+ return false;
683
+ }
679
684
  if (colDef.lockVisible != null && colDef.lockVisible == true) {
680
685
  return false;
681
686
  }
@@ -88,12 +88,16 @@ export class AgGridColumnAdapter {
88
88
  }
89
89
  shouldSkipColumn(colId) {
90
90
  /**
91
- * This skips columns like `ag-Grid-SelectionColumn` and possibly other columns
92
- * that ag grid will implement in the future
91
+ * This skips special columns that ag grid will likely implement in the future
93
92
  *
94
- * BUT DOES NOT SKIP GROUP COLUMNS!!!
93
+ * BUT DOES NOT SKIP GROUP COLUMNS or SELECTION COLUMNS!!!
94
+ *
95
+ * It's probably here for historical reasons - previously it used to skip the selection column
96
+ * but now it's not skipping it anymore
95
97
  */
96
- return colId.startsWith('ag-Grid-') && !this.adaptableApi.columnApi.isAutoRowGroupColumn(colId);
98
+ return (colId.startsWith('ag-Grid-') &&
99
+ !this.adaptableApi.columnApi.isAutoRowGroupColumn(colId) &&
100
+ !this.adaptableApi.columnApi.isSelectionColumn(colId));
97
101
  }
98
102
  setupColumns() {
99
103
  const pivotMode = this.agGridApi.isPivotMode();
@@ -153,10 +157,8 @@ export class AgGridColumnAdapter {
153
157
  setupColumnCellClass({ col, colId, abColumn }) {
154
158
  this.setColDefProperty(col, 'cellClass', (userCellClass) => {
155
159
  const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
156
- const quickSearchStyleClassName = this.adaptableApi.quickSearchApi.getQuickSearchStyle().ClassName;
157
160
  const quickSearchTextMatchStyle = this.getQuickSearchTextMatchStyle();
158
161
  const quickSearchCurrentTextMatchStyle = this.getQuickSearchCurrentTextMatchStyle();
159
- const hasQuickSearchStyleClassName = StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
160
162
  const cellClass = (params) => {
161
163
  const gridCell = this.adaptableApi.gridApi.getGridCellFromRowNode(params.node, abColumn.columnId);
162
164
  if (!gridCell.column) {
@@ -183,7 +185,7 @@ export class AgGridColumnAdapter {
183
185
  !hasStyledColumn && formatColumns.length
184
186
  ? this.getFormatColumnCellClass(formatColumns, abColumn, params)
185
187
  : null,
186
- isQuickSearchActive && hasQuickSearchStyleClassName ? quickSearchStyleClassName : null,
188
+ // isQuickSearchActive && hasQuickSearchStyleClassName ? quickSearchStyleClassName : null,
187
189
  isQuickSearchActive && (quickSearchTextMatchStyle || quickSearchCurrentTextMatchStyle)
188
190
  ? 'ab-QuickSearchFind'
189
191
  : null,
@@ -848,7 +850,7 @@ export class AgGridColumnAdapter {
848
850
  return classNames;
849
851
  }
850
852
  getQuickSearchCellStyle() {
851
- const quickSearchStyle = this.adaptableApi.quickSearchApi.getQuickSearchStyle();
853
+ const quickSearchStyle = this.adaptableApi.quickSearchApi.getQuickSearchCellMatchStyle();
852
854
  if (!quickSearchStyle || StringExtensions.IsNotNullOrEmpty(quickSearchStyle.ClassName)) {
853
855
  return undefined;
854
856
  }
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: 1750416425464 || Date.now(),
4
- VERSION: "20.2.1" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1750939303696 || Date.now(),
4
+ VERSION: "20.2.3" || '--current-version--',
5
5
  };
@@ -1,3 +1,4 @@
1
+ import { XOR } from '../../Utilities/Extensions/TypeExtensions';
1
2
  /**
2
3
  * Defines how a Column is sorted
3
4
  */
@@ -64,15 +65,27 @@ export interface BaseLayoutModel {
64
65
  */
65
66
  RowGroupValues?: {
66
67
  RowGroupDisplay: 'always-expanded';
67
- } | {
68
+ } | ({
68
69
  RowGroupDisplay: 'expanded';
70
+ } & XOR<{
69
71
  Values: any[][];
70
- } | {
72
+ }, {
73
+ GroupKeys: {
74
+ RowGroupedColumns: string[];
75
+ Values?: any[][];
76
+ }[];
77
+ }>) | {
71
78
  RowGroupDisplay: 'always-collapsed';
72
- } | {
79
+ } | ({
73
80
  RowGroupDisplay: 'collapsed';
81
+ } & XOR<{
74
82
  Values: any[][];
75
- };
83
+ }, {
84
+ GroupKeys: {
85
+ RowGroupedColumns: string[];
86
+ Values?: any[][];
87
+ }[];
88
+ }>);
76
89
  /**
77
90
  * Behaviour for Expanding / Collapsing Column Groups
78
91
  */
@@ -62,7 +62,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
62
62
  private applyLayout;
63
63
  private applyTableLayout;
64
64
  private getRowGroupNodePathsAs;
65
- applyRowGroupValues(RowGroupValues: TableLayoutModel['RowGroupValues']): void;
65
+ applyRowGroupValues(RowGroupValues: TableLayoutModel['RowGroupValues'], rowGroupedColumns: string[]): void;
66
66
  private computeColumnStateForPivotLayout;
67
67
  private computePivotAggregations;
68
68
  private computeColumnStateForTableLayout;
@@ -232,7 +232,7 @@ export class LayoutManager extends LMEmitter {
232
232
  // but we want to suspend the listener
233
233
  // as it would re-trigger another change
234
234
  const unsupress = this.suspendAgGridListener();
235
- this.applyRowGroupValues(layout.RowGroupValues);
235
+ this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
236
236
  unsupress();
237
237
  }
238
238
  if ((!prevLayout?.RowGroupedColumns || !prevLayout?.RowGroupedColumns.length) &&
@@ -244,7 +244,7 @@ export class LayoutManager extends LMEmitter {
244
244
  // but we want to suspend the listener
245
245
  // as it would re-trigger another change
246
246
  const unsupress = this.suspendAgGridListener();
247
- this.applyRowGroupValues(layout.RowGroupValues);
247
+ this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
248
248
  unsupress();
249
249
  }
250
250
  if (!shouldSkipTriggerChange) {
@@ -331,9 +331,8 @@ export class LayoutManager extends LMEmitter {
331
331
  return this.gridApi.getGridOption('treeData');
332
332
  }
333
333
  getUndecidedLayoutModelFromGrid(columnState) {
334
- let TableColumns = columnState
335
- .map((c) => c.colId)
336
- .filter((colId) => colId !== 'ag-Grid-SelectionColumn');
334
+ let TableColumns = columnState.map((c) => c.colId);
335
+ // .filter((colId) => colId !== 'ag-Grid-SelectionColumn');
337
336
  let ColumnWidths = {};
338
337
  let ColumnSorts = [];
339
338
  let RowGroupedColumns = [];
@@ -496,10 +495,26 @@ export class LayoutManager extends LMEmitter {
496
495
  : this.getRowGroupNodePathsAs({
497
496
  expanded: true,
498
497
  });
499
- RowGroupValues = {
500
- RowGroupDisplay: 'collapsed',
501
- Values: ExpandedValues,
502
- };
498
+ if (Array.isArray(currentRowGroupValues.GroupKeys)) {
499
+ RowGroupValues = {
500
+ RowGroupDisplay: 'collapsed',
501
+ GroupKeys: currentRowGroupValues.GroupKeys.map((item) => {
502
+ if ((item.RowGroupedColumns || []).join(',') === (RowGroupedColumns || []).join(',')) {
503
+ return {
504
+ RowGroupedColumns: item.RowGroupedColumns,
505
+ Values: ExpandedValues,
506
+ };
507
+ }
508
+ return item;
509
+ }),
510
+ };
511
+ }
512
+ else {
513
+ RowGroupValues = {
514
+ RowGroupDisplay: 'collapsed',
515
+ Values: ExpandedValues,
516
+ };
517
+ }
503
518
  }
504
519
  else if (currentRowGroupValues.RowGroupDisplay === 'expanded') {
505
520
  const CollapsedValues = isGroupingNew
@@ -507,10 +522,26 @@ export class LayoutManager extends LMEmitter {
507
522
  : this.getRowGroupNodePathsAs({
508
523
  expanded: false,
509
524
  });
510
- RowGroupValues = {
511
- RowGroupDisplay: 'expanded',
512
- Values: CollapsedValues,
513
- };
525
+ if (Array.isArray(currentRowGroupValues.GroupKeys)) {
526
+ RowGroupValues = {
527
+ RowGroupDisplay: 'expanded',
528
+ GroupKeys: currentRowGroupValues.GroupKeys.map((item) => {
529
+ if ((item.RowGroupedColumns || []).join(',') === (RowGroupedColumns || []).join(',')) {
530
+ return {
531
+ RowGroupedColumns: item.RowGroupedColumns,
532
+ Values: CollapsedValues,
533
+ };
534
+ }
535
+ return item;
536
+ }),
537
+ };
538
+ }
539
+ else {
540
+ RowGroupValues = {
541
+ RowGroupDisplay: 'expanded',
542
+ Values: CollapsedValues,
543
+ };
544
+ }
514
545
  }
515
546
  }
516
547
  }
@@ -897,7 +928,7 @@ export class LayoutManager extends LMEmitter {
897
928
  this.gridApi.applyColumnState(this.computeColumnStateForTableLayout(layout));
898
929
  // but also let's not forget to apply the row group values
899
930
  if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
900
- this.applyRowGroupValues(layout.RowGroupValues);
931
+ this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
901
932
  }
902
933
  this.applyColumnGroupCollapseExpandState(layout);
903
934
  });
@@ -921,7 +952,7 @@ export class LayoutManager extends LMEmitter {
921
952
  });
922
953
  return result;
923
954
  }
924
- applyRowGroupValues(RowGroupValues) {
955
+ applyRowGroupValues(RowGroupValues, rowGroupedColumns) {
925
956
  if (!RowGroupValues) {
926
957
  return;
927
958
  }
@@ -934,9 +965,21 @@ export class LayoutManager extends LMEmitter {
934
965
  return;
935
966
  }
936
967
  const defaultExpanded = RowGroupValues.RowGroupDisplay === 'expanded';
937
- if (RowGroupValues.Values) {
968
+ let currentRowGroupedValues = RowGroupValues.Values;
969
+ if (RowGroupValues.GroupKeys) {
970
+ const matchingRowGroupColumnValues = RowGroupValues.GroupKeys.find((item) => {
971
+ return (item.RowGroupedColumns || []).join(',') === (rowGroupedColumns || []).join(',');
972
+ });
973
+ if (matchingRowGroupColumnValues) {
974
+ currentRowGroupedValues = matchingRowGroupColumnValues.Values;
975
+ }
976
+ else {
977
+ currentRowGroupedValues = [];
978
+ }
979
+ }
980
+ if (currentRowGroupedValues) {
938
981
  const deepMap = new DeepMap();
939
- RowGroupValues.Values.forEach((rowGroupValue) => {
982
+ currentRowGroupedValues.forEach((rowGroupValue) => {
940
983
  deepMap.set(rowGroupValue, true);
941
984
  });
942
985
  this.gridApi.forEachNode((node) => {
@@ -1228,7 +1271,7 @@ export class LayoutManager extends LMEmitter {
1228
1271
  const hasGroupedColumns = layout.PivotGroupedColumns && layout.PivotGroupedColumns.length;
1229
1272
  // but also let's not forget to apply the row group values
1230
1273
  if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
1231
- this.applyRowGroupValues(layout.RowGroupValues);
1274
+ this.applyRowGroupValues(layout.RowGroupValues, layout.PivotGroupedColumns);
1232
1275
  }
1233
1276
  }
1234
1277
  applyPivotTotals(layout) {
@@ -2005,6 +2005,16 @@ export declare const ADAPTABLE_METAMODEL: {
2005
2005
  kind: string;
2006
2006
  desc: string;
2007
2007
  };
2008
+ ColumnGroupValues: {
2009
+ name: string;
2010
+ kind: string;
2011
+ desc: string;
2012
+ };
2013
+ ColumnGroupValuesWithExceptionKeys: {
2014
+ name: string;
2015
+ kind: string;
2016
+ desc: string;
2017
+ };
2008
2018
  ColumnMenuContext: {
2009
2019
  name: string;
2010
2020
  kind: string;
@@ -3064,6 +3074,17 @@ export declare const ADAPTABLE_METAMODEL: {
3064
3074
  ref: string;
3065
3075
  })[];
3066
3076
  };
3077
+ ExportConfig: {
3078
+ name: string;
3079
+ kind: string;
3080
+ desc: string;
3081
+ props: {
3082
+ name: string;
3083
+ kind: string;
3084
+ desc: string;
3085
+ isOpt: boolean;
3086
+ }[];
3087
+ };
3067
3088
  ExportDataFormatContext: {
3068
3089
  name: string;
3069
3090
  kind: string;
@@ -4708,19 +4729,12 @@ export declare const ADAPTABLE_METAMODEL: {
4708
4729
  name: string;
4709
4730
  kind: string;
4710
4731
  desc: string;
4711
- props: ({
4712
- name: string;
4713
- kind: string;
4714
- desc: string;
4715
- isOpt: boolean;
4716
- ref?: undefined;
4717
- } | {
4732
+ props: {
4718
4733
  name: string;
4719
4734
  kind: string;
4720
4735
  desc: string;
4721
4736
  isOpt: boolean;
4722
- ref: string;
4723
- })[];
4737
+ }[];
4724
4738
  };
4725
4739
  RaiseIntentConfig: {
4726
4740
  name: string;