@adaptabletools/adaptable 20.2.4 → 20.2.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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/AdaptableOptions.d.ts +4 -4
  3. package/src/AdaptableOptions/DataSetOptions.d.ts +1 -1
  4. package/src/AdaptableOptions/ExportOptions.d.ts +25 -8
  5. package/src/AdaptableState/Common/AdaptableColumn.d.ts +4 -0
  6. package/src/AdaptableState/Common/AggregationColumns.d.ts +6 -0
  7. package/src/AdaptableState/ExportState.d.ts +2 -2
  8. package/src/AdaptableState/FormatColumnState.d.ts +3 -3
  9. package/src/AdaptableState/LayoutState.d.ts +17 -16
  10. package/src/Api/AdaptableApi.d.ts +42 -42
  11. package/src/Api/EventApi.d.ts +1 -1
  12. package/src/Api/ExportApi.d.ts +7 -8
  13. package/src/Api/Implementation/ColumnApiImpl.js +1 -0
  14. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
  15. package/src/Api/Implementation/ExportApiImpl.js +20 -11
  16. package/src/Api/Internal/ExportInternalApi.js +4 -4
  17. package/src/Api/OptionsApi.d.ts +1 -7
  18. package/src/Strategy/TeamSharingModule.js +2 -2
  19. package/src/View/Dashboard/Dashboard.js +1 -1
  20. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  21. package/src/View/QuickSearch/QuickSearchInput.d.ts +1 -0
  22. package/src/View/QuickSearch/QuickSearchInput.js +1 -1
  23. package/src/View/QuickSearch/QuickSearchStatusBarContent.js +2 -9
  24. package/src/agGrid/AdaptableAgGrid.js +1 -0
  25. package/src/agGrid/AgGridAdapter.js +1 -0
  26. package/src/agGrid/AgGridColumnAdapter.js +4 -3
  27. package/src/agGrid/AgGridExportAdapter.js +1 -1
  28. package/src/env.js +2 -2
  29. package/src/layout-manager/src/index.js +22 -20
  30. package/src/metamodel/adaptable.metamodel.d.ts +34 -0
  31. package/src/metamodel/adaptable.metamodel.js +1 -1
  32. package/src/types.d.ts +2 -2
  33. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -109,9 +109,10 @@ export class AgGridColumnAdapter {
109
109
  this.agGridApi.getAllGridColumns();
110
110
  if (pivotMode) {
111
111
  const pivotResultColumns = this.agGridApi.getPivotResultColumns() || [];
112
- if (pivotResultColumns.length) {
113
- cols = [...cols, ...pivotResultColumns];
114
- }
112
+ const autoGroupColumns = this.agGridApi
113
+ .getAllGridColumns()
114
+ .filter((column) => this.adaptableApi.columnApi.isAutoRowGroupColumn(column.getColId()));
115
+ cols = [...autoGroupColumns, ...cols, ...pivotResultColumns];
115
116
  }
116
117
  // this needs to be here, before the other setup below
117
118
  // so the setup methods below reference the correct columns in adaptable store
@@ -419,7 +419,7 @@ export class AgGridExportAdapter {
419
419
  let rawValue = rowNode.key;
420
420
  return { columnId, rawValue };
421
421
  }
422
- if (this.adaptableApi.columnApi.isPivotResultColumn(agColumn.getColId())) {
422
+ if (!!rowNode.aggData) {
423
423
  const columnId = agColumn.getColId();
424
424
  const rawValue = rowNode.aggData?.[columnId];
425
425
  return { columnId, rawValue };
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: 1751027819726 || Date.now(),
4
- VERSION: "20.2.4" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1751633635859 || Date.now(),
4
+ VERSION: "20.2.6" || '--current-version--',
5
5
  };
@@ -223,21 +223,9 @@ export class LayoutManager extends LMEmitter {
223
223
  const shouldSkipTriggerChange = options?.skipTriggerChange === true;
224
224
  this._prevFiredLayout = layout;
225
225
  this.currentLayout = layout;
226
- if ((!prevLayout?.RowGroupedColumns || !prevLayout?.RowGroupedColumns.length) &&
227
- layout.RowGroupedColumns &&
228
- layout.RowGroupedColumns.length > 0 &&
229
- layout.RowGroupValues) {
230
- // most likely the user has changed grouping via some AG Grid action
231
- // and we need to make sure the expand/collapse state is applied
232
- // but we want to suspend the listener
233
- // as it would re-trigger another change
234
- const unsupress = this.suspendAgGridListener();
235
- this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
236
- unsupress();
237
- }
238
- if ((!prevLayout?.RowGroupedColumns || !prevLayout?.RowGroupedColumns.length) &&
239
- layout.RowGroupedColumns &&
226
+ if (layout.RowGroupedColumns &&
240
227
  layout.RowGroupedColumns.length > 0 &&
228
+ (prevLayout?.RowGroupedColumns || []).join(',') !== layout.RowGroupedColumns.join(',') &&
241
229
  layout.RowGroupValues) {
242
230
  // most likely the user has changed grouping via some AG Grid action
243
231
  // and we need to make sure the expand/collapse state is applied
@@ -473,12 +461,24 @@ export class LayoutManager extends LMEmitter {
473
461
  });
474
462
  }
475
463
  if (RowGroupedColumns && RowGroupedColumns.length) {
464
+ const LayoutRowGroupedColumns = this.currentLayout?.RowGroupedColumns || this.currentLayout?.PivotGroupedColumns || [];
476
465
  // if it's a new grouping, try and take it
477
- const isGroupingNew = RowGroupedColumns &&
478
- !this.currentLayout?.RowGroupedColumns &&
479
- !this.currentLayout?.PivotGroupedColumns;
466
+ const isGroupingNew = RowGroupedColumns && RowGroupedColumns.join(',') !== LayoutRowGroupedColumns.join(',');
480
467
  if (this.currentLayout?.RowGroupValues) {
481
468
  const currentRowGroupValues = this.currentLayout.RowGroupValues;
469
+ let currentRowGroupValuesGroupKeys = [];
470
+ if (currentRowGroupValues.RowGroupDisplay === 'expanded' ||
471
+ currentRowGroupValues.RowGroupDisplay === 'collapsed') {
472
+ if (Array.isArray(currentRowGroupValues.GroupKeys)) {
473
+ currentRowGroupValuesGroupKeys =
474
+ currentRowGroupValues.GroupKeys.find((item) => {
475
+ return ((item.RowGroupedColumns || []).join(',') === (RowGroupedColumns || []).join(','));
476
+ })?.Values || [];
477
+ }
478
+ else {
479
+ currentRowGroupValuesGroupKeys = currentRowGroupValues.Values || [];
480
+ }
481
+ }
482
482
  if (currentRowGroupValues.RowGroupDisplay === 'always-collapsed') {
483
483
  RowGroupValues = {
484
484
  RowGroupDisplay: 'always-collapsed',
@@ -491,7 +491,7 @@ export class LayoutManager extends LMEmitter {
491
491
  }
492
492
  else if (currentRowGroupValues.RowGroupDisplay === 'collapsed') {
493
493
  const ExpandedValues = isGroupingNew
494
- ? currentRowGroupValues.Values || []
494
+ ? currentRowGroupValuesGroupKeys || []
495
495
  : this.getRowGroupNodePathsAs({
496
496
  expanded: true,
497
497
  });
@@ -518,7 +518,7 @@ export class LayoutManager extends LMEmitter {
518
518
  }
519
519
  else if (currentRowGroupValues.RowGroupDisplay === 'expanded') {
520
520
  const CollapsedValues = isGroupingNew
521
- ? currentRowGroupValues.Values || []
521
+ ? currentRowGroupValuesGroupKeys || []
522
522
  : this.getRowGroupNodePathsAs({
523
523
  expanded: false,
524
524
  });
@@ -1016,7 +1016,9 @@ export class LayoutManager extends LMEmitter {
1016
1016
  acc[colId] = index;
1017
1017
  return acc;
1018
1018
  }, {});
1019
- columnState.applyOrder = true;
1019
+ // having this set to true will change pivot column order when there is sorting
1020
+ // and we don't want that to happen #keep-sorted-columns-in-same-order-as-unsorted
1021
+ // columnState.applyOrder = true;
1020
1022
  const columnIds = getColumnOrderIdsForAllColDefs([
1021
1023
  ...layout.PivotColumns,
1022
1024
  ...(layout.PivotAggregationColumns || []).map((col) => col.ColumnId),
@@ -2325,6 +2325,24 @@ export declare const ADAPTABLE_METAMODEL: {
2325
2325
  isOpt?: undefined;
2326
2326
  })[];
2327
2327
  };
2328
+ CustomDestinationsContext: {
2329
+ name: string;
2330
+ kind: string;
2331
+ desc: string;
2332
+ props: ({
2333
+ name: string;
2334
+ kind: string;
2335
+ desc: string;
2336
+ isOpt?: undefined;
2337
+ ref?: undefined;
2338
+ } | {
2339
+ name: string;
2340
+ kind: string;
2341
+ desc: string;
2342
+ isOpt: boolean;
2343
+ ref: string;
2344
+ })[];
2345
+ };
2328
2346
  CustomDisplayFormatter: {
2329
2347
  name: string;
2330
2348
  kind: string;
@@ -3855,6 +3873,22 @@ export declare const ADAPTABLE_METAMODEL: {
3855
3873
  ref: string;
3856
3874
  })[];
3857
3875
  };
3876
+ GroupKeys: {
3877
+ name: string;
3878
+ kind: string;
3879
+ desc: string;
3880
+ props: ({
3881
+ name: string;
3882
+ kind: string;
3883
+ desc: string;
3884
+ isOpt: boolean;
3885
+ } | {
3886
+ name: string;
3887
+ kind: string;
3888
+ desc: string;
3889
+ isOpt?: undefined;
3890
+ })[];
3891
+ };
3858
3892
  HandleFdc3Context: {
3859
3893
  name: string;
3860
3894
  kind: string;