@adaptabletools/adaptable-cjs 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 +19 -10
  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.cjs.tsbuildinfo +1 -1
@@ -114,9 +114,10 @@ class AgGridColumnAdapter {
114
114
  this.agGridApi.getAllGridColumns();
115
115
  if (pivotMode) {
116
116
  const pivotResultColumns = this.agGridApi.getPivotResultColumns() || [];
117
- if (pivotResultColumns.length) {
118
- cols = [...cols, ...pivotResultColumns];
119
- }
117
+ const autoGroupColumns = this.agGridApi
118
+ .getAllGridColumns()
119
+ .filter((column) => this.adaptableApi.columnApi.isAutoRowGroupColumn(column.getColId()));
120
+ cols = [...autoGroupColumns, ...cols, ...pivotResultColumns];
120
121
  }
121
122
  // this needs to be here, before the other setup below
122
123
  // so the setup methods below reference the correct columns in adaptable store
@@ -423,7 +423,7 @@ class AgGridExportAdapter {
423
423
  let rawValue = rowNode.key;
424
424
  return { columnId, rawValue };
425
425
  }
426
- if (this.adaptableApi.columnApi.isPivotResultColumn(agColumn.getColId())) {
426
+ if (!!rowNode.aggData) {
427
427
  const columnId = agColumn.getColId();
428
428
  const rawValue = rowNode.aggData?.[columnId];
429
429
  return { columnId, rawValue };
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: 1751027848227 || Date.now(),
6
- VERSION: "20.2.4" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1751633664670 || Date.now(),
6
+ VERSION: "20.2.6" || '--current-version--',
7
7
  };
@@ -226,21 +226,9 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
226
226
  const shouldSkipTriggerChange = options?.skipTriggerChange === true;
227
227
  this._prevFiredLayout = layout;
228
228
  this.currentLayout = layout;
229
- if ((!prevLayout?.RowGroupedColumns || !prevLayout?.RowGroupedColumns.length) &&
230
- layout.RowGroupedColumns &&
231
- layout.RowGroupedColumns.length > 0 &&
232
- layout.RowGroupValues) {
233
- // most likely the user has changed grouping via some AG Grid action
234
- // and we need to make sure the expand/collapse state is applied
235
- // but we want to suspend the listener
236
- // as it would re-trigger another change
237
- const unsupress = this.suspendAgGridListener();
238
- this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
239
- unsupress();
240
- }
241
- if ((!prevLayout?.RowGroupedColumns || !prevLayout?.RowGroupedColumns.length) &&
242
- layout.RowGroupedColumns &&
229
+ if (layout.RowGroupedColumns &&
243
230
  layout.RowGroupedColumns.length > 0 &&
231
+ (prevLayout?.RowGroupedColumns || []).join(',') !== layout.RowGroupedColumns.join(',') &&
244
232
  layout.RowGroupValues) {
245
233
  // most likely the user has changed grouping via some AG Grid action
246
234
  // and we need to make sure the expand/collapse state is applied
@@ -476,12 +464,24 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
476
464
  });
477
465
  }
478
466
  if (RowGroupedColumns && RowGroupedColumns.length) {
467
+ const LayoutRowGroupedColumns = this.currentLayout?.RowGroupedColumns || this.currentLayout?.PivotGroupedColumns || [];
479
468
  // if it's a new grouping, try and take it
480
- const isGroupingNew = RowGroupedColumns &&
481
- !this.currentLayout?.RowGroupedColumns &&
482
- !this.currentLayout?.PivotGroupedColumns;
469
+ const isGroupingNew = RowGroupedColumns && RowGroupedColumns.join(',') !== LayoutRowGroupedColumns.join(',');
483
470
  if (this.currentLayout?.RowGroupValues) {
484
471
  const currentRowGroupValues = this.currentLayout.RowGroupValues;
472
+ let currentRowGroupValuesGroupKeys = [];
473
+ if (currentRowGroupValues.RowGroupDisplay === 'expanded' ||
474
+ currentRowGroupValues.RowGroupDisplay === 'collapsed') {
475
+ if (Array.isArray(currentRowGroupValues.GroupKeys)) {
476
+ currentRowGroupValuesGroupKeys =
477
+ currentRowGroupValues.GroupKeys.find((item) => {
478
+ return ((item.RowGroupedColumns || []).join(',') === (RowGroupedColumns || []).join(','));
479
+ })?.Values || [];
480
+ }
481
+ else {
482
+ currentRowGroupValuesGroupKeys = currentRowGroupValues.Values || [];
483
+ }
484
+ }
485
485
  if (currentRowGroupValues.RowGroupDisplay === 'always-collapsed') {
486
486
  RowGroupValues = {
487
487
  RowGroupDisplay: 'always-collapsed',
@@ -494,7 +494,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
494
494
  }
495
495
  else if (currentRowGroupValues.RowGroupDisplay === 'collapsed') {
496
496
  const ExpandedValues = isGroupingNew
497
- ? currentRowGroupValues.Values || []
497
+ ? currentRowGroupValuesGroupKeys || []
498
498
  : this.getRowGroupNodePathsAs({
499
499
  expanded: true,
500
500
  });
@@ -521,7 +521,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
521
521
  }
522
522
  else if (currentRowGroupValues.RowGroupDisplay === 'expanded') {
523
523
  const CollapsedValues = isGroupingNew
524
- ? currentRowGroupValues.Values || []
524
+ ? currentRowGroupValuesGroupKeys || []
525
525
  : this.getRowGroupNodePathsAs({
526
526
  expanded: false,
527
527
  });
@@ -1019,7 +1019,9 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
1019
1019
  acc[colId] = index;
1020
1020
  return acc;
1021
1021
  }, {});
1022
- columnState.applyOrder = true;
1022
+ // having this set to true will change pivot column order when there is sorting
1023
+ // and we don't want that to happen #keep-sorted-columns-in-same-order-as-unsorted
1024
+ // columnState.applyOrder = true;
1023
1025
  const columnIds = getColumnOrderIdsForAllColDefs([
1024
1026
  ...layout.PivotColumns,
1025
1027
  ...(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;