@adaptabletools/adaptable-cjs 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 +80 -41
  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 +12 -12
  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 +19 -8
  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.cjs.tsbuildinfo +1 -1
@@ -26,6 +26,7 @@ const ReorderDraggable_1 = require("../../../Components/ReorderDraggable");
26
26
  const AdaptableFormControlTextClear_1 = require("../../../Components/Forms/AdaptableFormControlTextClear");
27
27
  const sortColumnIdsByOrder_1 = require("../../../../layout-manager/src/sortColumnIdsByOrder");
28
28
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
29
+ const GeneralConstants_1 = require("../../../../Utilities/Constants/GeneralConstants");
29
30
  const PropertyOrderText = (props) => (React.createElement(rebass_1.Text, { fontWeight: 600, fontSize: 2 }, props.children));
30
31
  const columnTypes = {
31
32
  default: {
@@ -200,6 +201,7 @@ const ColumnsSection = (props) => {
200
201
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
201
202
  const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
202
203
  const [searchInputValue, setSearchInputValue] = React.useState('');
204
+ let hasSelectionColumn = false;
203
205
  const allColumns = adaptable.api.columnApi
204
206
  .getUIAvailableColumns()
205
207
  .filter((col) => {
@@ -209,7 +211,23 @@ const ColumnsSection = (props) => {
209
211
  return !col.isGeneratedRowGroupColumn;
210
212
  })
211
213
  // if the current Layout is a PivotLayout, then we also filter out current Pivot Result Columns
212
- .filter((col) => !col.isGeneratedPivotResultColumn);
214
+ .filter((col) => !col.isGeneratedPivotResultColumn)
215
+ // also we need to filter out selection column
216
+ .filter((col) => {
217
+ const result = !col.isGeneratedSelectionColumn;
218
+ if (!result) {
219
+ hasSelectionColumn = true;
220
+ }
221
+ return result;
222
+ });
223
+ const onChange = (data) => {
224
+ if (hasSelectionColumn &&
225
+ Array.isArray(data.TableColumns) &&
226
+ !data.TableColumns.includes(GeneralConstants_1.AG_GRID_SELECTION_COLUMN)) {
227
+ data.TableColumns.unshift(GeneralConstants_1.AG_GRID_SELECTION_COLUMN);
228
+ }
229
+ props.onChange(data);
230
+ };
213
231
  // however, changes in RowGroupedColumns done in the previous step
214
232
  // are reflected into the layout, so we use the latest layout.RowGroupedColumns
215
233
  // to create new columns
@@ -266,7 +284,7 @@ const ColumnsSection = (props) => {
266
284
  ColumnVisibility[colId] = false;
267
285
  }
268
286
  });
269
- props.onChange({
287
+ onChange({
270
288
  ...layout,
271
289
  TableColumns: columnIds,
272
290
  ColumnVisibility,
@@ -305,14 +323,14 @@ const ColumnsSection = (props) => {
305
323
  return shouldInclude;
306
324
  });
307
325
  }
308
- props.onChange({
326
+ onChange({
309
327
  ...layout,
310
328
  TableColumns: TableColumns,
311
329
  ColumnVisibility,
312
330
  });
313
331
  };
314
332
  const handlePinChange = (columnId, pinning) => {
315
- props.onChange({
333
+ onChange({
316
334
  ...layout,
317
335
  ColumnPinning: {
318
336
  ...layout.ColumnPinning,
@@ -321,7 +339,7 @@ const ColumnsSection = (props) => {
321
339
  });
322
340
  };
323
341
  const handleColumnNameChange = (columnId, headerName) => {
324
- props.onChange({
342
+ onChange({
325
343
  ...layout,
326
344
  ColumnHeaders: {
327
345
  ...layout.ColumnHeaders,
@@ -330,7 +348,7 @@ const ColumnsSection = (props) => {
330
348
  });
331
349
  };
332
350
  const handleColumnWidthChange = (columnId, width) => {
333
- props.onChange({
351
+ onChange({
334
352
  ...layout,
335
353
  ColumnWidths: {
336
354
  ...layout.ColumnWidths,
@@ -339,7 +357,8 @@ const ColumnsSection = (props) => {
339
357
  });
340
358
  };
341
359
  const visibleIds = layout.TableColumns.filter((colId) => {
342
- return layout.ColumnVisibility?.[colId] !== false;
360
+ return (layout.ColumnVisibility?.[colId] !== false &&
361
+ adaptable.api.columnApi.isSelectionColumn(colId) === false);
343
362
  });
344
363
  const toLabel = (colId) => adaptable.api.columnApi.getFriendlyNameForColumnId(colId, layout);
345
364
  const toIdentifier = (colId) => colId;
@@ -378,7 +397,7 @@ const ColumnsSection = (props) => {
378
397
  noSelectionLabel: `No Columns Selected`,
379
398
  onChange: handleColumnsChange,
380
399
  onSelectAll: () => {
381
- props.onChange({
400
+ onChange({
382
401
  ...layout,
383
402
  ColumnVisibility: {},
384
403
  TableColumns: ColumnOrderAllColumns.map((col) => col.columnId),
@@ -44,8 +44,8 @@ const RowGroupBehaviorSection = (props) => {
44
44
  }
45
45
  onChange(newLayout);
46
46
  } },
47
- React.createElement(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Always open Layout with all Grouped Rows collapsed" }),
48
- React.createElement(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Always open Layout with all Grouped Rows expanded" }),
47
+ React.createElement(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Layout opens with all Grouped Rows always collapsed" }),
48
+ React.createElement(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Layout opens with all Grouped Rows always expanded" }),
49
49
  React.createElement(TypeRadio_1.TypeRadio, { value: "expanded", text: "Mostly Expanded", description: "Layout opens with all Grouped rows expanded, other than those collapsed when Layout last displayed" }),
50
50
  React.createElement(TypeRadio_1.TypeRadio, { value: "collapsed", text: "Mostly Collapsed", description: "Layout opens with all Grouped rows collapsed, other than those expanded when Layout last displayed" }))));
51
51
  };
@@ -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;
@@ -15,6 +15,7 @@ const CheckBox_1 = require("../../components/CheckBox");
15
15
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
16
16
  const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
17
17
  const QuickSearchInput_1 = require("./QuickSearchInput");
18
+ const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
18
19
  const QuickSearchPopupComponent = (props) => {
19
20
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
20
21
  const [state, setState] = (0, react_1.useState)({
@@ -23,7 +24,7 @@ const QuickSearchPopupComponent = (props) => {
23
24
  });
24
25
  const onUpdateStyle = (style) => {
25
26
  setState({ ...state, EditedStyle: style });
26
- props.onSetStyle(style);
27
+ props.onSetMatchingCellStyle(style);
27
28
  };
28
29
  const onQuickSearchBehaviourChange = (checked) => {
29
30
  setState({ ...state, RunQueryAfterQuickSearch: checked });
@@ -37,21 +38,23 @@ const QuickSearchPopupComponent = (props) => {
37
38
  React.createElement(Panel_1.default, { header: props.api.internalApi.getCorrectEnglishVariant('Behaviour'), style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
38
39
  ' ',
39
40
  React.createElement(rebass_1.Flex, { flexDirection: "column" },
41
+ React.createElement(HelpBlock_1.default, { fontSize: 2, marginTop: 2, marginBottom: 2 }, "Filters the Grid to only show rows with matching cells; use with care as can cause performance issues"),
42
+ ' ',
40
43
  React.createElement(FormLayout_1.default, { columns: [1, 2] },
41
44
  React.createElement(FormLayout_1.FormRow, null,
42
45
  React.createElement(CheckBox_1.CheckBox, { "data-name": "filter-quick-search-results", value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))))),
43
- React.createElement(StyleComponent_1.StyleComponent, { style: { height: '100%' }, api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
46
+ React.createElement(StyleComponent_1.StyleComponent, { style: { height: '100%' }, headerText: 'Cell Matching Style', api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
44
47
  };
45
48
  function mapStateToProps(state, ownProps) {
46
49
  return {
47
50
  QuickSearchText: state.QuickSearch.QuickSearchText,
48
- QuickSearchStyle: state.QuickSearch.Style,
51
+ QuickSearchStyle: state.QuickSearch.CellMatchStyle ?? {},
49
52
  };
50
53
  }
51
54
  function mapDispatchToProps(dispatch) {
52
55
  return {
53
56
  onRunQuickSearch: (quickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(quickSearchText)),
54
- onSetStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetStyle(style)),
57
+ onSetMatchingCellStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetCellMatchingStyle(style)),
55
58
  };
56
59
  }
57
60
  exports.QuickSearchPopup = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(QuickSearchPopupComponent);
@@ -453,7 +453,7 @@ class AdaptableAgGrid {
453
453
  this.updateColumnModelAndRefreshGrid();
454
454
  }
455
455
  const layoutModelForApply = (0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout);
456
- this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues);
456
+ this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues, layoutModelForApply.RowGroupedColumns);
457
457
  this.layoutManager.applyColumnGroupCollapseExpandState(layoutModelForApply);
458
458
  this.autoSizeLayoutIfNeeded();
459
459
  this.ModuleService.createModuleUIItems();
@@ -2018,7 +2018,7 @@ You need to define at least one Layout!`);
2018
2018
  layout = this.api.layoutApi.getCurrentLayout();
2019
2019
  }
2020
2020
  const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(layout);
2021
- this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues);
2021
+ this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues, layoutModel.RowGroupedColumns);
2022
2022
  }
2023
2023
  isGroupRowNode(rowNode) {
2024
2024
  if (!rowNode) {
@@ -3111,12 +3111,23 @@ You need to define at least one Layout!`);
3111
3111
  (0, LayoutHelpers_1.checkForDuplicateColumns)(layout);
3112
3112
  const isLayoutSwitch = this._prevLayout && layout.Name != this._prevLayout.Name;
3113
3113
  let shouldUpdateExpandState = isLayoutSwitch;
3114
- if (!isLayoutSwitch &&
3115
- this._prevLayout &&
3116
- layout.RowGroupValues?.RowGroupDefaultBehavior &&
3117
- this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
3118
- layout.RowGroupValues?.RowGroupDefaultBehavior) {
3119
- shouldUpdateExpandState = true;
3114
+ if (!isLayoutSwitch && this._prevLayout) {
3115
+ if (layout.RowGroupValues?.RowGroupDefaultBehavior &&
3116
+ this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
3117
+ layout.RowGroupValues?.RowGroupDefaultBehavior) {
3118
+ shouldUpdateExpandState = true;
3119
+ }
3120
+ else {
3121
+ const prevLayoutExceptionGroupKeys = (0, LayoutHelpers_1.getLayoutRowGroupValuesExceptionGroupKeys)(this._prevLayout)
3122
+ .flat()
3123
+ .join(',');
3124
+ const currentLayoutExceptionGroupKeys = (0, LayoutHelpers_1.getLayoutRowGroupValuesExceptionGroupKeys)(layout)
3125
+ .flat()
3126
+ .join(',');
3127
+ if (prevLayoutExceptionGroupKeys !== currentLayoutExceptionGroupKeys) {
3128
+ shouldUpdateExpandState = true;
3129
+ }
3130
+ }
3120
3131
  }
3121
3132
  this._prevLayout = layout;
3122
3133
  const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
@@ -429,6 +429,7 @@ class AgGridAdapter {
429
429
  const isFdc3MainActionColumn = this.adaptableApi.fdc3Api.internalApi.isFdc3MainActionColumn(colId);
430
430
  let friendlyName;
431
431
  const isGeneratedRowGroupColumn = columnApi.isAutoRowGroupColumn(ColumnId);
432
+ const isGeneratedSelectionColumn = columnApi.isSelectionColumn(ColumnId);
432
433
  const isGeneratedPivotResultColumn = columnApi.isPivotResultColumn(ColumnId) && !agGridColumn.isPrimary();
433
434
  const colExists = columnApi.doesColumnExist(ColumnId) ||
434
435
  isGeneratedRowGroupColumn ||
@@ -468,7 +469,7 @@ class AgGridAdapter {
468
469
  colDef.lockVisible === true &&
469
470
  colDef.suppressColumnsToolPanel === true &&
470
471
  colDef.suppressFiltersToolPanel === true;
471
- const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn;
472
+ const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn || isGeneratedSelectionColumn;
472
473
  const abColumn = {
473
474
  Uuid: (0, Uuid_1.createUuid)(),
474
475
  isTreeColumn,
@@ -495,6 +496,7 @@ class AgGridAdapter {
495
496
  hideable: this.isColumnHideable(colDef),
496
497
  isGrouped: isGenerated ? false : this.isColumnRowGrouped(colDef),
497
498
  isGeneratedRowGroupColumn,
499
+ isGeneratedSelectionColumn,
498
500
  isGeneratedPivotResultColumn,
499
501
  isFixed: this.isColumnFixed(colDef),
500
502
  pinned: this.getColumnPinnedPosition(colDef),
@@ -680,6 +682,9 @@ class AgGridAdapter {
680
682
  this.adaptableApi.columnApi.isAutoRowGroupColumn(colDef.colId)) {
681
683
  return false;
682
684
  }
685
+ if (this.adaptableApi.columnApi.isSelectionColumn(colDef.colId)) {
686
+ return false;
687
+ }
683
688
  if (colDef.lockVisible != null && colDef.lockVisible == true) {
684
689
  return false;
685
690
  }
@@ -93,12 +93,16 @@ class AgGridColumnAdapter {
93
93
  }
94
94
  shouldSkipColumn(colId) {
95
95
  /**
96
- * This skips columns like `ag-Grid-SelectionColumn` and possibly other columns
97
- * that ag grid will implement in the future
96
+ * This skips special columns that ag grid will likely implement in the future
98
97
  *
99
- * BUT DOES NOT SKIP GROUP COLUMNS!!!
98
+ * BUT DOES NOT SKIP GROUP COLUMNS or SELECTION COLUMNS!!!
99
+ *
100
+ * It's probably here for historical reasons - previously it used to skip the selection column
101
+ * but now it's not skipping it anymore
100
102
  */
101
- return colId.startsWith('ag-Grid-') && !this.adaptableApi.columnApi.isAutoRowGroupColumn(colId);
103
+ return (colId.startsWith('ag-Grid-') &&
104
+ !this.adaptableApi.columnApi.isAutoRowGroupColumn(colId) &&
105
+ !this.adaptableApi.columnApi.isSelectionColumn(colId));
102
106
  }
103
107
  setupColumns() {
104
108
  const pivotMode = this.agGridApi.isPivotMode();
@@ -158,10 +162,8 @@ class AgGridColumnAdapter {
158
162
  setupColumnCellClass({ col, colId, abColumn }) {
159
163
  this.setColDefProperty(col, 'cellClass', (userCellClass) => {
160
164
  const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
161
- const quickSearchStyleClassName = this.adaptableApi.quickSearchApi.getQuickSearchStyle().ClassName;
162
165
  const quickSearchTextMatchStyle = this.getQuickSearchTextMatchStyle();
163
166
  const quickSearchCurrentTextMatchStyle = this.getQuickSearchCurrentTextMatchStyle();
164
- const hasQuickSearchStyleClassName = StringExtensions_1.default.IsNotNullOrEmpty(quickSearchStyleClassName);
165
167
  const cellClass = (params) => {
166
168
  const gridCell = this.adaptableApi.gridApi.getGridCellFromRowNode(params.node, abColumn.columnId);
167
169
  if (!gridCell.column) {
@@ -188,7 +190,7 @@ class AgGridColumnAdapter {
188
190
  !hasStyledColumn && formatColumns.length
189
191
  ? this.getFormatColumnCellClass(formatColumns, abColumn, params)
190
192
  : null,
191
- isQuickSearchActive && hasQuickSearchStyleClassName ? quickSearchStyleClassName : null,
193
+ // isQuickSearchActive && hasQuickSearchStyleClassName ? quickSearchStyleClassName : null,
192
194
  isQuickSearchActive && (quickSearchTextMatchStyle || quickSearchCurrentTextMatchStyle)
193
195
  ? 'ab-QuickSearchFind'
194
196
  : null,
@@ -853,7 +855,7 @@ class AgGridColumnAdapter {
853
855
  return classNames;
854
856
  }
855
857
  getQuickSearchCellStyle() {
856
- const quickSearchStyle = this.adaptableApi.quickSearchApi.getQuickSearchStyle();
858
+ const quickSearchStyle = this.adaptableApi.quickSearchApi.getQuickSearchCellMatchStyle();
857
859
  if (!quickSearchStyle || StringExtensions_1.default.IsNotNullOrEmpty(quickSearchStyle.ClassName)) {
858
860
  return undefined;
859
861
  }
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  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" || '',
5
- PUBLISH_TIMESTAMP: 1750416454142 || Date.now(),
6
- VERSION: "20.2.1" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1750939331799 || Date.now(),
6
+ VERSION: "20.2.3" || '--current-version--',
7
7
  };
@@ -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;
@@ -235,7 +235,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
235
235
  // but we want to suspend the listener
236
236
  // as it would re-trigger another change
237
237
  const unsupress = this.suspendAgGridListener();
238
- this.applyRowGroupValues(layout.RowGroupValues);
238
+ this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
239
239
  unsupress();
240
240
  }
241
241
  if ((!prevLayout?.RowGroupedColumns || !prevLayout?.RowGroupedColumns.length) &&
@@ -247,7 +247,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
247
247
  // but we want to suspend the listener
248
248
  // as it would re-trigger another change
249
249
  const unsupress = this.suspendAgGridListener();
250
- this.applyRowGroupValues(layout.RowGroupValues);
250
+ this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
251
251
  unsupress();
252
252
  }
253
253
  if (!shouldSkipTriggerChange) {
@@ -334,9 +334,8 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
334
334
  return this.gridApi.getGridOption('treeData');
335
335
  }
336
336
  getUndecidedLayoutModelFromGrid(columnState) {
337
- let TableColumns = columnState
338
- .map((c) => c.colId)
339
- .filter((colId) => colId !== 'ag-Grid-SelectionColumn');
337
+ let TableColumns = columnState.map((c) => c.colId);
338
+ // .filter((colId) => colId !== 'ag-Grid-SelectionColumn');
340
339
  let ColumnWidths = {};
341
340
  let ColumnSorts = [];
342
341
  let RowGroupedColumns = [];
@@ -499,10 +498,26 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
499
498
  : this.getRowGroupNodePathsAs({
500
499
  expanded: true,
501
500
  });
502
- RowGroupValues = {
503
- RowGroupDisplay: 'collapsed',
504
- Values: ExpandedValues,
505
- };
501
+ if (Array.isArray(currentRowGroupValues.GroupKeys)) {
502
+ RowGroupValues = {
503
+ RowGroupDisplay: 'collapsed',
504
+ GroupKeys: currentRowGroupValues.GroupKeys.map((item) => {
505
+ if ((item.RowGroupedColumns || []).join(',') === (RowGroupedColumns || []).join(',')) {
506
+ return {
507
+ RowGroupedColumns: item.RowGroupedColumns,
508
+ Values: ExpandedValues,
509
+ };
510
+ }
511
+ return item;
512
+ }),
513
+ };
514
+ }
515
+ else {
516
+ RowGroupValues = {
517
+ RowGroupDisplay: 'collapsed',
518
+ Values: ExpandedValues,
519
+ };
520
+ }
506
521
  }
507
522
  else if (currentRowGroupValues.RowGroupDisplay === 'expanded') {
508
523
  const CollapsedValues = isGroupingNew
@@ -510,10 +525,26 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
510
525
  : this.getRowGroupNodePathsAs({
511
526
  expanded: false,
512
527
  });
513
- RowGroupValues = {
514
- RowGroupDisplay: 'expanded',
515
- Values: CollapsedValues,
516
- };
528
+ if (Array.isArray(currentRowGroupValues.GroupKeys)) {
529
+ RowGroupValues = {
530
+ RowGroupDisplay: 'expanded',
531
+ GroupKeys: currentRowGroupValues.GroupKeys.map((item) => {
532
+ if ((item.RowGroupedColumns || []).join(',') === (RowGroupedColumns || []).join(',')) {
533
+ return {
534
+ RowGroupedColumns: item.RowGroupedColumns,
535
+ Values: CollapsedValues,
536
+ };
537
+ }
538
+ return item;
539
+ }),
540
+ };
541
+ }
542
+ else {
543
+ RowGroupValues = {
544
+ RowGroupDisplay: 'expanded',
545
+ Values: CollapsedValues,
546
+ };
547
+ }
517
548
  }
518
549
  }
519
550
  }
@@ -900,7 +931,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
900
931
  this.gridApi.applyColumnState(this.computeColumnStateForTableLayout(layout));
901
932
  // but also let's not forget to apply the row group values
902
933
  if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
903
- this.applyRowGroupValues(layout.RowGroupValues);
934
+ this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
904
935
  }
905
936
  this.applyColumnGroupCollapseExpandState(layout);
906
937
  });
@@ -924,7 +955,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
924
955
  });
925
956
  return result;
926
957
  }
927
- applyRowGroupValues(RowGroupValues) {
958
+ applyRowGroupValues(RowGroupValues, rowGroupedColumns) {
928
959
  if (!RowGroupValues) {
929
960
  return;
930
961
  }
@@ -937,9 +968,21 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
937
968
  return;
938
969
  }
939
970
  const defaultExpanded = RowGroupValues.RowGroupDisplay === 'expanded';
940
- if (RowGroupValues.Values) {
971
+ let currentRowGroupedValues = RowGroupValues.Values;
972
+ if (RowGroupValues.GroupKeys) {
973
+ const matchingRowGroupColumnValues = RowGroupValues.GroupKeys.find((item) => {
974
+ return (item.RowGroupedColumns || []).join(',') === (rowGroupedColumns || []).join(',');
975
+ });
976
+ if (matchingRowGroupColumnValues) {
977
+ currentRowGroupedValues = matchingRowGroupColumnValues.Values;
978
+ }
979
+ else {
980
+ currentRowGroupedValues = [];
981
+ }
982
+ }
983
+ if (currentRowGroupedValues) {
941
984
  const deepMap = new infinite_react_1.DeepMap();
942
- RowGroupValues.Values.forEach((rowGroupValue) => {
985
+ currentRowGroupedValues.forEach((rowGroupValue) => {
943
986
  deepMap.set(rowGroupValue, true);
944
987
  });
945
988
  this.gridApi.forEachNode((node) => {
@@ -1231,7 +1274,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
1231
1274
  const hasGroupedColumns = layout.PivotGroupedColumns && layout.PivotGroupedColumns.length;
1232
1275
  // but also let's not forget to apply the row group values
1233
1276
  if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
1234
- this.applyRowGroupValues(layout.RowGroupValues);
1277
+ this.applyRowGroupValues(layout.RowGroupValues, layout.PivotGroupedColumns);
1235
1278
  }
1236
1279
  }
1237
1280
  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;