@adaptabletools/adaptable 10.0.0 → 10.0.4-canary.0

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 (169) hide show
  1. package/base.css +77 -29
  2. package/index.css +89 -31
  3. package/package.json +1 -5
  4. package/publishTimestamp.d.ts +1 -1
  5. package/publishTimestamp.js +1 -1
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -2
  7. package/src/AdaptableOptions/FilterOptions.d.ts +14 -7
  8. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +88 -4
  10. package/src/Api/AlertApi.d.ts +1 -1
  11. package/src/Api/CalculatedColumnApi.d.ts +15 -0
  12. package/src/Api/ColumnApi.d.ts +39 -0
  13. package/src/Api/ConfigApi.d.ts +8 -0
  14. package/src/Api/GridApi.d.ts +34 -8
  15. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
  16. package/src/Api/Implementation/AlertApiImpl.js +16 -9
  17. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
  18. package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
  19. package/src/Api/Implementation/ColumnApiImpl.d.ts +8 -0
  20. package/src/Api/Implementation/ColumnApiImpl.js +69 -36
  21. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  22. package/src/Api/Implementation/ConfigApiImpl.js +28 -17
  23. package/src/Api/Implementation/ExportApiImpl.js +4 -4
  24. package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
  25. package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
  26. package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
  27. package/src/Api/Implementation/GridApiImpl.js +25 -10
  28. package/src/Api/Implementation/InternalApiImpl.d.ts +3 -1
  29. package/src/Api/Implementation/InternalApiImpl.js +20 -4
  30. package/src/Api/Implementation/LayoutApiImpl.js +3 -3
  31. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -0
  32. package/src/Api/Implementation/QueryLanguageApiImpl.js +3 -0
  33. package/src/Api/Implementation/ScopeApiImpl.js +11 -11
  34. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +12 -8
  35. package/src/Api/Implementation/UserInterfaceApiImpl.js +59 -86
  36. package/src/Api/InternalApi.d.ts +3 -1
  37. package/src/Api/QueryLanguageApi.d.ts +5 -0
  38. package/src/Api/UserInterfaceApi.d.ts +16 -6
  39. package/src/PredefinedConfig/AlertState.d.ts +10 -0
  40. package/src/PredefinedConfig/CalculatedColumnState.d.ts +4 -37
  41. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +33 -33
  42. package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
  43. package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
  44. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +3 -2
  45. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
  46. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
  47. package/src/{Utilities/Interface/ProgressIndicator.js → PredefinedConfig/Common/SpecialColumnSettings.js} +0 -0
  48. package/src/PredefinedConfig/FilterState.d.ts +1 -1
  49. package/src/PredefinedConfig/FreeTextColumnState.d.ts +10 -0
  50. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
  51. package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
  52. package/src/PredefinedConfig/SystemState.d.ts +4 -1
  53. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  54. package/src/Redux/Store/AdaptableReduxMerger.js +7 -1
  55. package/src/Redux/Store/AdaptableStore.js +7 -3
  56. package/src/Strategy/AdaptableModuleBase.js +8 -8
  57. package/src/Strategy/AlertModule.js +12 -11
  58. package/src/Strategy/BulkUpdateModule.js +5 -5
  59. package/src/Strategy/CalculatedColumnModule.js +1 -1
  60. package/src/Strategy/CellSummaryModule.js +3 -3
  61. package/src/Strategy/ConditionalStyleModule.js +3 -3
  62. package/src/Strategy/CustomSortModule.js +2 -2
  63. package/src/Strategy/ExportModule.d.ts +0 -2
  64. package/src/Strategy/ExportModule.js +59 -62
  65. package/src/Strategy/FilterModule.js +4 -4
  66. package/src/Strategy/FormatColumnModule.js +5 -5
  67. package/src/Strategy/FreeTextColumnModule.js +1 -1
  68. package/src/Strategy/LayoutModule.js +3 -3
  69. package/src/Strategy/PlusMinusModule.js +8 -9
  70. package/src/Strategy/SmartEditModule.js +6 -6
  71. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  72. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
  73. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  74. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  75. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  76. package/src/Utilities/Helpers/DateHelper.d.ts +8 -2
  77. package/src/Utilities/Helpers/DateHelper.js +42 -20
  78. package/src/Utilities/Helpers/PreviewHelper.js +2 -2
  79. package/src/Utilities/ObjectFactory.d.ts +1 -1
  80. package/src/Utilities/ObjectFactory.js +14 -2
  81. package/src/Utilities/Services/DataService.js +5 -5
  82. package/src/Utilities/Services/MetamodelService.js +1 -0
  83. package/src/Utilities/Services/ModuleService.js +31 -24
  84. package/src/Utilities/Services/ReportService.js +12 -12
  85. package/src/Utilities/Services/ValidationService.js +4 -5
  86. package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
  87. package/src/Utilities/runIfNotResolvedIn.js +23 -0
  88. package/src/View/AdaptableView.js +1 -1
  89. package/src/View/Alert/AlertPopup.js +1 -1
  90. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
  91. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  92. package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
  93. package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
  94. package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
  95. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
  96. package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
  97. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
  98. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  99. package/src/View/Components/ColumnSelector/index.js +2 -2
  100. package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
  101. package/src/View/Components/FilterForm/FilterForm.js +53 -32
  102. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +3 -0
  103. package/src/View/Components/FilterForm/ListBoxFilterForm.js +14 -5
  104. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
  105. package/src/View/Components/FilterForm/QuickFilterForm.js +72 -31
  106. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
  107. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
  108. package/src/View/Components/NewScopeComponent.js +1 -1
  109. package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
  110. package/src/View/Components/PreviewResultsPanel.js +1 -1
  111. package/src/View/Components/RangesComponent.js +2 -2
  112. package/src/View/Components/Selectors/ColumnSelector.js +5 -5
  113. package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
  114. package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
  115. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -6
  116. package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
  117. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
  118. package/src/View/CustomSort/CustomSortEntityRow.js +2 -2
  119. package/src/View/CustomSort/CustomSortPopup.js +1 -1
  120. package/src/View/CustomSort/CustomSortSummary.js +3 -3
  121. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
  122. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
  123. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -3
  124. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  125. package/src/View/Filter/FilterSummary.js +2 -2
  126. package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
  127. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  128. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  129. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
  130. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
  131. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  132. package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
  133. package/src/View/GridInfo/GridInfoPopup.js +4 -1
  134. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
  135. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
  136. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
  137. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
  138. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
  139. package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
  140. package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
  141. package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
  142. package/src/View/Query/QueryViewPanel.js +3 -3
  143. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.d.ts +1 -1
  144. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +6 -8
  145. package/src/View/UIHelper.d.ts +2 -0
  146. package/src/View/UIHelper.js +10 -1
  147. package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
  148. package/src/agGrid/ActionColumnRenderer.js +20 -3
  149. package/src/agGrid/Adaptable.d.ts +20 -4
  150. package/src/agGrid/Adaptable.js +234 -102
  151. package/src/agGrid/agGridHelper.js +32 -32
  152. package/src/agGrid/agGridMenuHelper.js +2 -2
  153. package/src/components/Dashboard/Dashboard.js +1 -1
  154. package/src/components/DropdownButton/index.js +1 -1
  155. package/src/components/ExpressionEditor/index.js +8 -7
  156. package/src/components/Loader/Loader.d.ts +7 -0
  157. package/src/components/Loader/Loader.js +13 -0
  158. package/src/components/Loader/index.d.ts +2 -0
  159. package/src/components/Loader/index.js +7 -0
  160. package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
  161. package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
  162. package/src/metamodel/adaptable.metamodel.d.ts +125 -7
  163. package/src/metamodel/adaptable.metamodel.js +416 -101
  164. package/src/types.d.ts +4 -3
  165. package/version.d.ts +1 -1
  166. package/version.js +1 -1
  167. package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
  168. package/src/View/Export/ProgressIndicator.d.ts +0 -6
  169. package/src/View/Export/ProgressIndicator.js +0 -25
@@ -416,7 +416,7 @@ class Adaptable {
416
416
  this.isInitialised = true;
417
417
  });
418
418
  if (this.abContainerElement == null) {
419
- this.abContainerElement = this.getadaptableContainerElement();
419
+ this.abContainerElement = this.getAdaptableContainerElement();
420
420
  }
421
421
  if (this.abContainerElement != null) {
422
422
  this.abContainerElement.innerHTML = '';
@@ -484,17 +484,19 @@ class Adaptable {
484
484
  });
485
485
  }
486
486
  performAudit(action, oldState, newState) {
487
- const adaptableStateChangedInfo = {
488
- actionName: action.type,
489
- clientTimestamp: new Date(),
490
- userName: this.adaptableOptions.userName,
491
- adaptableId: this.adaptableOptions.adaptableId,
492
- adaptableStateKey: this.adaptableOptions.adaptableStateKey,
493
- action: action,
494
- oldState: oldState,
495
- newState: newState,
496
- };
497
- this.api.eventApi.emit('AdaptableStateChanged', adaptableStateChangedInfo);
487
+ if (this.isInitialised) {
488
+ const adaptableStateChangedInfo = {
489
+ actionName: action.type,
490
+ clientTimestamp: new Date(),
491
+ userName: this.adaptableOptions.userName,
492
+ adaptableId: this.adaptableOptions.adaptableId,
493
+ adaptableStateKey: this.adaptableOptions.adaptableStateKey,
494
+ action: action,
495
+ oldState: oldState,
496
+ newState: newState,
497
+ };
498
+ this.api.eventApi.emit('AdaptableStateChanged', adaptableStateChangedInfo);
499
+ }
498
500
  }
499
501
  initializeAgGrid() {
500
502
  var _a;
@@ -734,19 +736,19 @@ class Adaptable {
734
736
  const columnsInGroup = columnGroup.getLeafColumns();
735
737
  columnsInGroup.forEach((col) => {
736
738
  const group = {
737
- ColumnGroupId: ColumnGroupId,
738
- FriendlyName,
739
- AllowGroupSplit: AllowGroupSplit,
740
- GroupCount: 0,
739
+ columnGroupId: ColumnGroupId,
740
+ friendlyName: FriendlyName,
741
+ allowGroupSplit: AllowGroupSplit,
742
+ groupCount: 0,
741
743
  };
742
- groupsCount[group.ColumnGroupId] = groupsCount[group.ColumnGroupId] || 0;
743
- groupsCount[group.ColumnGroupId] += columnsInGroup.length;
744
+ groupsCount[group.columnGroupId] = groupsCount[group.columnGroupId] || 0;
745
+ groupsCount[group.columnGroupId] += columnsInGroup.length;
744
746
  acc[col.getColId()] = group;
745
747
  });
746
748
  return acc;
747
749
  }, {});
748
750
  Object.keys(colsToGroups).forEach((colId) => {
749
- colsToGroups[colId].GroupCount = groupsCount[colsToGroups[colId].ColumnGroupId];
751
+ colsToGroups[colId].groupCount = groupsCount[colsToGroups[colId].columnGroupId];
750
752
  });
751
753
  // TODO sort the visible columns by layout order
752
754
  vendorCols.forEach((vendorColumn) => {
@@ -838,7 +840,8 @@ class Adaptable {
838
840
  var _a;
839
841
  return ((_a = aa.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
840
842
  aa.dataChangedInfo &&
841
- aa.dataChangedInfo.columnId === col.ColumnId &&
843
+ aa.dataChangedInfo.column &&
844
+ aa.dataChangedInfo.column.columnId === col.columnId &&
842
845
  aa.dataChangedInfo.rowNode === params.node;
843
846
  });
844
847
  const alert = activeAlerts[0];
@@ -866,7 +869,7 @@ class Adaptable {
866
869
  }
867
870
  getFlashingAlertCellStyle(col, params) {
868
871
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
869
- return this.getFlashingAlertStyleFor(primaryKeyValue, col.ColumnId);
872
+ return this.getFlashingAlertStyleFor(primaryKeyValue, col.columnId);
870
873
  }
871
874
  getCellHighlightStyle(col, params) {
872
875
  var _a;
@@ -874,7 +877,7 @@ class Adaptable {
874
877
  const cellHightlight = this.api.internalApi
875
878
  .getSystemState()
876
879
  .HighlightedCells.find((cellHighlightInfo) => {
877
- return (col.ColumnId === cellHighlightInfo.columnId &&
880
+ return (col.columnId === cellHighlightInfo.columnId &&
878
881
  cellHighlightInfo.primaryKeyValue === primaryKeyValue);
879
882
  });
880
883
  if (cellHightlight) {
@@ -903,7 +906,7 @@ class Adaptable {
903
906
  if (!editableCellStyle) {
904
907
  return undefined;
905
908
  }
906
- const gridCell = this.getGridCellFromRowNode(params.node, abColumn.ColumnId);
909
+ const gridCell = this.getGridCellFromRowNode(params.node, abColumn.columnId);
907
910
  if (gridCell) {
908
911
  if (this.api.gridApi.areCellsEditable([gridCell])) {
909
912
  return this.convertAdaptableStyleToCSS(editableCellStyle);
@@ -916,7 +919,7 @@ class Adaptable {
916
919
  if (!editableCellStyle) {
917
920
  return undefined;
918
921
  }
919
- const gridCell = this.getGridCellFromRowNode(params.node, abColumn.ColumnId);
922
+ const gridCell = this.getGridCellFromRowNode(params.node, abColumn.columnId);
920
923
  if (gridCell) {
921
924
  if (!this.api.gridApi.areCellsEditable([gridCell])) {
922
925
  return this.convertAdaptableStyleToCSS(editableCellStyle);
@@ -950,8 +953,28 @@ class Adaptable {
950
953
  .join(' ');
951
954
  return classNames;
952
955
  }
956
+ getEditableCellClass(abColumn, params) {
957
+ const editableCellStyle = this.api.userInterfaceApi.getEditableCellStyle();
958
+ if (!(editableCellStyle === null || editableCellStyle === void 0 ? void 0 : editableCellStyle.ClassName)) {
959
+ return null;
960
+ }
961
+ const isCellEditable = this.api.gridApi.areCellsEditable([
962
+ this.getGridCellFromRowNode(params.node, abColumn.columnId),
963
+ ]);
964
+ return isCellEditable ? editableCellStyle.ClassName : null;
965
+ }
966
+ getReadonlyCellClass(abColumn, params) {
967
+ const readonlyCellStyle = this.api.userInterfaceApi.getReadOnlyCellStyle();
968
+ if (!(readonlyCellStyle === null || readonlyCellStyle === void 0 ? void 0 : readonlyCellStyle.ClassName)) {
969
+ return null;
970
+ }
971
+ const isCellReadonly = !this.api.gridApi.areCellsEditable([
972
+ this.getGridCellFromRowNode(params.node, abColumn.columnId),
973
+ ]);
974
+ return isCellReadonly ? readonlyCellStyle.ClassName : null;
975
+ }
953
976
  isQuickSearchActive(abColumn, params) {
954
- if (abColumn.IsExcludedFromQuickSearch) {
977
+ if (abColumn.isExcludedFromQuickSearch) {
955
978
  return false;
956
979
  }
957
980
  if (!params.node || params.node.group) {
@@ -961,7 +984,7 @@ class Adaptable {
961
984
  if (StringExtensions_1.StringExtensions.IsNullOrEmpty(quickSearchValue)) {
962
985
  return false;
963
986
  }
964
- const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.ColumnId, 'Contains', [quickSearchValue]);
987
+ const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.columnId, 'Contains', [quickSearchValue]);
965
988
  return this.api.filterApi.evaluateColumnFilter(columnFilter, params.node);
966
989
  }
967
990
  getPrimaryKeyValueFromRowNode(rowNode) {
@@ -1023,7 +1046,7 @@ class Adaptable {
1023
1046
  }
1024
1047
  setColumnOrder(VisibleColumnList) {
1025
1048
  const newColumnState = this.getSortedColumnStateForVisibleColumns(VisibleColumnList);
1026
- this.gridOptions.columnApi.setColumnState(newColumnState);
1049
+ this.gridOptions.columnApi.applyColumnState({ state: newColumnState, applyOrder: true });
1027
1050
  this.updateColumnsIntoStore();
1028
1051
  }
1029
1052
  persistLayout(layout) {
@@ -1177,7 +1200,7 @@ class Adaptable {
1177
1200
  if (shouldUpdatePivoted) {
1178
1201
  this.gridOptions.columnApi.setPivotMode(pivoted);
1179
1202
  }
1180
- this.gridOptions.columnApi.setColumnState(newColState);
1203
+ this.gridOptions.columnApi.applyColumnState({ state: newColState, applyOrder: true });
1181
1204
  this.api.gridApi.setColumnSorts(layout.ColumnSorts);
1182
1205
  this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
1183
1206
  // aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
@@ -1325,7 +1348,7 @@ class Adaptable {
1325
1348
  const colId = column.getColId();
1326
1349
  const selectedColumn = this.api.columnApi.getColumnFromId(colId);
1327
1350
  if (selectedColumn &&
1328
- columns.find((c) => c.ColumnId == selectedColumn.ColumnId) == null) {
1351
+ columns.find((c) => c.columnId == selectedColumn.columnId) == null) {
1329
1352
  columns.push(selectedColumn);
1330
1353
  }
1331
1354
  for (let rowIndex = y1; rowIndex <= y2; rowIndex++) {
@@ -1365,7 +1388,9 @@ class Adaptable {
1365
1388
  isMaster: !!(node.master != null && node.master == true),
1366
1389
  isExpanded: !!(node.expanded != null && node.expanded == true),
1367
1390
  isGroup: !!(node.group != null && node.group == true),
1368
- level: node.level,
1391
+ isSelected: true,
1392
+ isDisplayed: node.displayed == true,
1393
+ rowGroupLevel: node.level,
1369
1394
  };
1370
1395
  const gridRow = {
1371
1396
  primaryKeyValue: this.getPrimaryKeyValueFromRowNode(node),
@@ -1384,20 +1409,20 @@ class Adaptable {
1384
1409
  setValue(dataChangedInfo) {
1385
1410
  // note: because we use rownode set data value this will cause Validation to fire
1386
1411
  let newValue;
1387
- let dataType = this.api.columnApi.getColumnDataTypeFromColumnId(dataChangedInfo.columnId);
1412
+ let dataType = dataChangedInfo.column.dataType;
1388
1413
  newValue =
1389
1414
  dataType == Enums_1.DataType.Number ? Number(dataChangedInfo.newValue) : dataChangedInfo.newValue;
1390
1415
  if (dataType == undefined) {
1391
1416
  return; // no point continuing as probably a wrong column
1392
1417
  }
1393
1418
  if (dataChangedInfo.rowNode) {
1394
- dataChangedInfo.rowNode.setDataValue(dataChangedInfo.columnId, newValue);
1419
+ dataChangedInfo.rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
1395
1420
  }
1396
1421
  else {
1397
1422
  if (this.useRowNodeLookUp) {
1398
1423
  const rowNode = this.gridOptions.api.getRowNode(dataChangedInfo.primaryKeyValue);
1399
1424
  if (rowNode != null) {
1400
- rowNode.setDataValue(dataChangedInfo.columnId, newValue);
1425
+ rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
1401
1426
  dataChangedInfo.rowNode = rowNode;
1402
1427
  }
1403
1428
  }
@@ -1407,7 +1432,7 @@ class Adaptable {
1407
1432
  this.gridOptions.api.getModel().forEachNode((rowNode) => {
1408
1433
  if (!isUpdated) {
1409
1434
  if (dataChangedInfo.primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
1410
- rowNode.setDataValue(dataChangedInfo.columnId, newValue);
1435
+ rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
1411
1436
  dataChangedInfo.rowNode = rowNode;
1412
1437
  isUpdated = true;
1413
1438
  }
@@ -1419,18 +1444,19 @@ class Adaptable {
1419
1444
  cancelEdit() {
1420
1445
  this.gridOptions.api.stopEditing(true);
1421
1446
  }
1422
- getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode) {
1447
+ getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, permittedValues) {
1423
1448
  let returnValues = [];
1424
1449
  // this function does NOT look up for server values but actually it should...
1425
1450
  // that is currently commented out in the column api function (previously in filter form)
1426
- const permittedValues = this.api.userInterfaceApi.getPermittedValuesForColumn(column);
1451
+ permittedValues = permittedValues !== null && permittedValues !== void 0 ? permittedValues : this.api.userInterfaceApi.getPermittedValuesForColumn(column);
1427
1452
  if (ArrayExtensions_1.ArrayExtensions.IsNotNull(permittedValues)) {
1428
1453
  returnValues = permittedValues.map((pv) => {
1429
1454
  return {
1430
1455
  rawValue: pv,
1431
1456
  displayValue: pv,
1432
1457
  normalisedValue: pv,
1433
- columnId: column.ColumnId,
1458
+ columnId: column.columnId,
1459
+ column: column,
1434
1460
  rowNode: undefined,
1435
1461
  };
1436
1462
  });
@@ -1438,7 +1464,7 @@ class Adaptable {
1438
1464
  else {
1439
1465
  if (visibleRowsOnly) {
1440
1466
  this.gridOptions.api.forEachNodeAfterFilter((rowNode) => {
1441
- const gridCell = this.addDistinctColumnValue(rowNode, column.ColumnId);
1467
+ const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
1442
1468
  if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
1443
1469
  returnValues.push(gridCell);
1444
1470
  }
@@ -1446,7 +1472,7 @@ class Adaptable {
1446
1472
  }
1447
1473
  else {
1448
1474
  this.gridOptions.api.forEachNode((rowNode) => {
1449
- const gridCell = this.addDistinctColumnValue(rowNode, column.ColumnId);
1475
+ const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
1450
1476
  if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
1451
1477
  returnValues.push(gridCell);
1452
1478
  }
@@ -1456,6 +1482,46 @@ class Adaptable {
1456
1482
  const uniqueVals = uniqBy_1.default(returnValues, 'displayValue');
1457
1483
  return uniqueVals.slice(0, this.adaptableOptions.filterOptions.maxFilterValuesToDisplay);
1458
1484
  }
1485
+ async getDistinctFilterValuesForColumn(column, visibleRowsOnly, filter, skipRowNode) {
1486
+ var _a;
1487
+ const permittedValues = (_a = this.api.userInterfaceApi.getFilterPermittedValuesForColumn(column)) !== null && _a !== void 0 ? _a : {
1488
+ suppressClientSideFiltering: false,
1489
+ values: () => undefined,
1490
+ };
1491
+ let preparedPermittedValues = undefined;
1492
+ try {
1493
+ preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(column, filter));
1494
+ }
1495
+ catch (error) {
1496
+ LoggingHelper_1.ConsoleLogError(`Failed to load filter permitted values`, column, filter, error);
1497
+ }
1498
+ return {
1499
+ suppressClientSideFilter: permittedValues.suppressClientSideFiltering,
1500
+ gridCells: this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues),
1501
+ };
1502
+ }
1503
+ async getDistinctCustomSortValuesForColumn(column, visibleRowsOnly, skipRowNode) {
1504
+ const permittedValues = await this.api.userInterfaceApi.getCustomSortPermittedValuesForColumn(column);
1505
+ let preparedPermittedValues = undefined;
1506
+ try {
1507
+ preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(column));
1508
+ }
1509
+ catch (error) {
1510
+ LoggingHelper_1.ConsoleLogError(`Failed to load custom sort permitted values`, column, error);
1511
+ }
1512
+ return this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues);
1513
+ }
1514
+ async getDistinctBulkUpdateValuesForColumn(column, visibleRowsOnly, selectedGridCells, skipRowNode) {
1515
+ const permittedValues = await this.api.userInterfaceApi.getBulkUpdatePermittedValuesForColumn(column);
1516
+ let preparedPermittedValues = undefined;
1517
+ try {
1518
+ preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(column, selectedGridCells));
1519
+ }
1520
+ catch (error) {
1521
+ LoggingHelper_1.ConsoleLogError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
1522
+ }
1523
+ return this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues);
1524
+ }
1459
1525
  getColumnValueDisplayValuePairList(columnId, visibleRowsOnly, onlyIncludeIds) {
1460
1526
  const returnArray = [];
1461
1527
  let permittedMap = new Map();
@@ -1469,7 +1535,7 @@ class Adaptable {
1469
1535
  rawValue: pv,
1470
1536
  displayValue: pv,
1471
1537
  normalisedValue: pv,
1472
- columnId: columnId,
1538
+ column: abColumn,
1473
1539
  rowNode: undefined,
1474
1540
  });
1475
1541
  });
@@ -1518,7 +1584,7 @@ class Adaptable {
1518
1584
  }
1519
1585
  shouldUseRawValueForColumn(column) {
1520
1586
  // we need to return false if the column has a cell rendeerer i think...
1521
- const colDef = this.gridOptions.api.getColumnDef(column.ColumnId);
1587
+ const colDef = this.gridOptions.api.getColumnDef(column.columnId);
1522
1588
  if (colDef && colDef.cellRenderer != null) {
1523
1589
  return true;
1524
1590
  }
@@ -1563,7 +1629,7 @@ class Adaptable {
1563
1629
  rawValue: rawValue,
1564
1630
  displayValue: displayValue,
1565
1631
  normalisedValue: normalisedvalue,
1566
- columnId: columnId,
1632
+ column: abColumn,
1567
1633
  primaryKeyValue: pkValue,
1568
1634
  rowNode: rowNode,
1569
1635
  };
@@ -1794,9 +1860,12 @@ class Adaptable {
1794
1860
  ];
1795
1861
  }
1796
1862
  getColDefsForFreeTextColumns() {
1797
- let filterable = this.api.internalApi.getAdaptableOptions().filterOptions
1863
+ const specialColumnsAreFilterable = this.api.internalApi.getAdaptableOptions().filterOptions
1798
1864
  .enableFilterOnSpecialColumns;
1865
+ const defaultFreeTextColumnSettings = ObjectFactory_1.CreateEmptyFreeTextColumn(specialColumnsAreFilterable)
1866
+ .FreeTextColumnSettings;
1799
1867
  return this.api.freeTextColumnApi.getAllFreeTextColumn().map((freeTextColumn) => {
1868
+ const freeTextColumnSettings = Object.assign(Object.assign({}, defaultFreeTextColumnSettings), freeTextColumn.FreeTextColumnSettings);
1800
1869
  const dataTypeEditor = freeTextColumn.DataType === 'Number'
1801
1870
  ? AdaptableNumberEditor_1.AdaptableNumberEditor
1802
1871
  : freeTextColumn.DataType === 'Date'
@@ -1808,10 +1877,16 @@ class Adaptable {
1808
1877
  colId: freeTextColumn.ColumnId,
1809
1878
  editable: true,
1810
1879
  hide: true,
1811
- filter: filterable,
1812
- sortable: true,
1813
- resizable: true,
1814
- enableRowGroup: true,
1880
+ width: freeTextColumnSettings.Width,
1881
+ enableValue: freeTextColumnSettings.Aggregatable,
1882
+ filter: freeTextColumnSettings.Filterable,
1883
+ floatingFilter: freeTextColumnSettings.Filterable,
1884
+ resizable: freeTextColumnSettings.Resizable,
1885
+ enableRowGroup: freeTextColumnSettings.Groupable,
1886
+ sortable: freeTextColumnSettings.Sortable,
1887
+ enablePivot: freeTextColumnSettings.Pivotable,
1888
+ suppressMenu: freeTextColumnSettings.SuppressMenu,
1889
+ suppressMovable: freeTextColumnSettings.SuppressMovable,
1815
1890
  cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
1816
1891
  ? 'agLargeTextCellEditor'
1817
1892
  : 'agTextCellEditor'),
@@ -1846,15 +1921,24 @@ class Adaptable {
1846
1921
  }
1847
1922
  }
1848
1923
  getColDefsForActionColumns() {
1924
+ const defaultActionColumnSettings = {
1925
+ resizable: true,
1926
+ suppressMenu: false,
1927
+ suppressMovable: false,
1928
+ };
1849
1929
  return this.api.userInterfaceApi.getAllActionColumn().map((actionColumn) => {
1930
+ const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
1850
1931
  const newColDef = {
1851
1932
  headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
1852
1933
  colId: actionColumn.columnId,
1853
- editable: false,
1854
1934
  hide: false,
1935
+ editable: false,
1936
+ width: actionColumnSettings.width,
1937
+ resizable: actionColumnSettings.resizable,
1938
+ suppressMenu: actionColumnSettings.suppressMenu,
1939
+ suppressMovable: actionColumnSettings.suppressMovable,
1855
1940
  filter: false,
1856
1941
  sortable: false,
1857
- resizable: true,
1858
1942
  enableRowGroup: false,
1859
1943
  cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
1860
1944
  type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
@@ -1881,16 +1965,17 @@ class Adaptable {
1881
1965
  this.setLayout();
1882
1966
  }
1883
1967
  getColDefsForCalculatedColumns() {
1968
+ const specialColumnsAreFilterable = this.adaptableOptions.filterOptions
1969
+ .enableFilterOnSpecialColumns
1970
+ ? this.adaptableOptions.filterOptions.enableFilterOnSpecialColumns
1971
+ : true;
1972
+ const defaultCalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(specialColumnsAreFilterable)
1973
+ .CalculatedColumnSettings;
1884
1974
  return this.api.calculatedColumnApi.getAllCalculatedColumn().map((calculatedColumn) => {
1885
1975
  var _a;
1886
- if (!calculatedColumn.CalculatedColumnSettings) {
1887
- let filterable = this.adaptableOptions.filterOptions.enableFilterOnSpecialColumns
1888
- ? this.adaptableOptions.filterOptions.enableFilterOnSpecialColumns
1889
- : true;
1890
- calculatedColumn.CalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(filterable).CalculatedColumnSettings;
1891
- }
1892
- if (!calculatedColumn.CalculatedColumnSettings.DataType) {
1893
- calculatedColumn.CalculatedColumnSettings.DataType = this.CalculatedColumnExpressionService.GetCalculatedColumnDataType((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
1976
+ const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
1977
+ if (!calculatedColumnSettings.DataType) {
1978
+ calculatedColumnSettings.DataType = this.CalculatedColumnExpressionService.GetCalculatedColumnDataType((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
1894
1979
  }
1895
1980
  const newColDef = {
1896
1981
  headerName: calculatedColumn.FriendlyName
@@ -1899,25 +1984,27 @@ class Adaptable {
1899
1984
  colId: calculatedColumn.ColumnId,
1900
1985
  hide: true,
1901
1986
  editable: false,
1902
- width: calculatedColumn.CalculatedColumnSettings.Width,
1903
- enableValue: calculatedColumn.CalculatedColumnSettings.Aggregatable,
1904
- filter: calculatedColumn.CalculatedColumnSettings.Filterable,
1905
- floatingFilter: calculatedColumn.CalculatedColumnSettings.Filterable,
1906
- resizable: calculatedColumn.CalculatedColumnSettings.Resizable,
1907
- enableRowGroup: calculatedColumn.CalculatedColumnSettings.Groupable,
1908
- sortable: calculatedColumn.CalculatedColumnSettings.Sortable,
1909
- enablePivot: calculatedColumn.CalculatedColumnSettings.Pivotable,
1987
+ width: calculatedColumnSettings.Width,
1988
+ enableValue: calculatedColumnSettings.Aggregatable,
1989
+ filter: calculatedColumnSettings.Filterable,
1990
+ floatingFilter: calculatedColumnSettings.Filterable,
1991
+ resizable: calculatedColumnSettings.Resizable,
1992
+ enableRowGroup: calculatedColumnSettings.Groupable,
1993
+ sortable: calculatedColumnSettings.Sortable,
1994
+ enablePivot: calculatedColumnSettings.Pivotable,
1995
+ suppressMenu: calculatedColumnSettings.SuppressMenu,
1996
+ suppressMovable: calculatedColumnSettings.SuppressMovable,
1910
1997
  type: [
1911
1998
  GeneralConstants_1.AB_SPECIAL_COLUMN,
1912
- this.agGridHelper.getAgGridDataType(calculatedColumn.CalculatedColumnSettings.DataType),
1999
+ this.agGridHelper.getAgGridDataType(calculatedColumnSettings.DataType),
1913
2000
  ],
1914
2001
  valueGetter: (params) => {
1915
2002
  var _a;
1916
2003
  return this.CalculatedColumnExpressionService.ComputeExpressionValue((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression, params.node);
1917
2004
  },
1918
2005
  };
1919
- if (calculatedColumn.CalculatedColumnSettings.ShowToolTip != null &&
1920
- calculatedColumn.CalculatedColumnSettings.ShowToolTip == true) {
2006
+ if (calculatedColumnSettings.ShowToolTip != null &&
2007
+ calculatedColumnSettings.ShowToolTip == true) {
1921
2008
  newColDef.tooltipValueGetter = () => {
1922
2009
  var _a;
1923
2010
  return (_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression;
@@ -1986,7 +2073,7 @@ class Adaptable {
1986
2073
  this.emitter = null;
1987
2074
  this._adaptableReady = false;
1988
2075
  Adaptable.dismissInstance(this);
1989
- const abContainerElement = this.getadaptableContainerElement();
2076
+ const abContainerElement = this.getAdaptableContainerElement();
1990
2077
  if (config && !config.unmount) {
1991
2078
  return;
1992
2079
  }
@@ -2018,7 +2105,7 @@ class Adaptable {
2018
2105
  height: 65,
2019
2106
  Columns: this.api.columnApi.getColumns().map((col) => {
2020
2107
  return {
2021
- columnFriendlyName: col.FriendlyName,
2108
+ columnFriendlyName: col.friendlyName,
2022
2109
  width: 200,
2023
2110
  textAlign: 'start',
2024
2111
  };
@@ -2035,7 +2122,7 @@ class Adaptable {
2035
2122
  height: 30,
2036
2123
  Columns: this.api.columnApi.getColumns().map((col) => {
2037
2124
  return {
2038
- columnFriendlyName: col.FriendlyName,
2125
+ columnFriendlyName: col.friendlyName,
2039
2126
  width: 200,
2040
2127
  textAlign: 'start',
2041
2128
  };
@@ -2048,7 +2135,7 @@ class Adaptable {
2048
2135
  getCurrentIPPStyle() {
2049
2136
  return this.agGridHelper.getCurrentIPPStyle();
2050
2137
  }
2051
- getadaptableContainerElement() {
2138
+ getAdaptableContainerElement() {
2052
2139
  if (!this.abContainerElement) {
2053
2140
  let containerOptionsContainer = this.adaptableOptions.containerOptions.adaptableContainer;
2054
2141
  this.abContainerElement =
@@ -2084,7 +2171,7 @@ class Adaptable {
2084
2171
  initInternalGridLogic() {
2085
2172
  LoggingHelper_1.LogAdaptableInfo(`Initializing InternalGridLogic...`);
2086
2173
  if (this.abContainerElement == null) {
2087
- this.abContainerElement = this.getadaptableContainerElement();
2174
+ this.abContainerElement = this.getAdaptableContainerElement();
2088
2175
  }
2089
2176
  if (this.abContainerElement == null) {
2090
2177
  if (typeof this.adaptableOptions.containerOptions.adaptableContainer === 'string') {
@@ -2315,11 +2402,21 @@ class Adaptable {
2315
2402
  RowNodeProto.dispatchLocalEvent = function (event) {
2316
2403
  const node = event.node;
2317
2404
  const result = RowNode_dispatchLocalEvent.apply(this, arguments);
2405
+ const extractGridApiFromRowNode = (rowNode) => {
2406
+ var _a, _b, _c, _d;
2407
+ // starting with AG Grid 26.1.0 the gridApi is wrapped in a Beans property
2408
+ // while older versions than 26.1.0 had a direct property
2409
+ const rowNodeApi = (_c = (_b = (_a = rowNode) === null || _a === void 0 ? void 0 : _a.beans) === null || _b === void 0 ? void 0 : _b.gridApi) !== null && _c !== void 0 ? _c : (_d = rowNode) === null || _d === void 0 ? void 0 : _d.gridApi;
2410
+ if (!rowNodeApi) {
2411
+ LoggingHelper_1.LogAdaptableWarning(`No GridAPI found in passed RowNode, this should never happen!`, rowNode);
2412
+ }
2413
+ return rowNodeApi;
2414
+ };
2318
2415
  // we don't know from which instance of aggrid this is coming,
2319
2416
  // as this fn is shared by all instances
2320
2417
  if (node) {
2321
2418
  Adaptable.forEachAdaptable((adaptable) => {
2322
- if (node.gridApi !== adaptable.gridOptions.api) {
2419
+ if (extractGridApiFromRowNode(node) !== adaptable.gridOptions.api) {
2323
2420
  // the event is coming from another aggrid instance
2324
2421
  // so IGNORE IT
2325
2422
  return;
@@ -2561,6 +2658,8 @@ class Adaptable {
2561
2658
  const cellClass = (params) => {
2562
2659
  const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
2563
2660
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
2661
+ const editableClassName = this.getEditableCellClass(abColumn, params);
2662
+ const readonlyClassName = this.getReadonlyCellClass(abColumn, params);
2564
2663
  let returnValue = [
2565
2664
  this.getExcelClassNameForCell(colId, primaryKeyValue),
2566
2665
  typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
@@ -2569,6 +2668,8 @@ class Adaptable {
2569
2668
  ? this.getConditionalStyleCellClass(conditionalStyles, abColumn, params)
2570
2669
  : null,
2571
2670
  isQuickSearchActive ? quickSearchStyleClassName : null,
2671
+ editableClassName,
2672
+ readonlyClassName,
2572
2673
  ]
2573
2674
  .filter((x) => !!x)
2574
2675
  .join(' ');
@@ -2581,7 +2682,8 @@ class Adaptable {
2581
2682
  return `--excel-cell-${colId}-${primaryKeyValue}`;
2582
2683
  }
2583
2684
  setupColumnCellEditor({ colId, col }) {
2584
- const editLookUpItem = this.api.userInterfaceApi.getEditLookUpItemForColumn(colId);
2685
+ const adaptableColumn = this.api.columnApi.getColumnFromId(colId);
2686
+ const editLookUpItem = this.api.userInterfaceApi.getEditLookUpItemForColumn(adaptableColumn);
2585
2687
  this.setColDefProperty(col, 'cellEditor', () => {
2586
2688
  if (editLookUpItem) {
2587
2689
  return this.isModulePresent('rich-select')
@@ -2589,10 +2691,13 @@ class Adaptable {
2589
2691
  : 'agSelectCellEditor';
2590
2692
  }
2591
2693
  });
2592
- this.setColDefProperty(col, 'cellEditorParams', () => {
2694
+ this.setColDefProperty(col, 'cellEditorParams', (params) => {
2593
2695
  if (editLookUpItem) {
2594
- return {
2595
- values: this.api.userInterfaceApi.getEditLookUpValuesForEditLookUpItem(editLookUpItem, colId),
2696
+ return (params) => {
2697
+ const gridCell = this.getGridCellFromRowNode(params === null || params === void 0 ? void 0 : params.node, colId);
2698
+ return {
2699
+ values: this.api.userInterfaceApi.getEditLookUpValuesForEditLookUpItem(editLookUpItem, gridCell),
2700
+ };
2596
2701
  };
2597
2702
  }
2598
2703
  });
@@ -2605,7 +2710,7 @@ class Adaptable {
2605
2710
  return this.agGridHelper.createNumericStyleRendererFunc(formatColumn);
2606
2711
  }
2607
2712
  if (formatColumn.ColumnStyle.CheckBoxStyle) {
2608
- return this.agGridHelper.createCheckboxRendererComp(abColumn.ColumnId, abColumn.ReadOnly);
2713
+ return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
2609
2714
  }
2610
2715
  }
2611
2716
  const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
@@ -2674,13 +2779,13 @@ class Adaptable {
2674
2779
  resultHeaderName = layoutCustomHeader;
2675
2780
  }
2676
2781
  // check if the deprecated formatColumn header is used
2677
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.ColumnId);
2782
+ const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.columnId);
2678
2783
  if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
2679
2784
  // fallback to the formatColumn property if no Layout custom header is provided
2680
2785
  resultHeaderName = formatColumn.HeaderName;
2681
2786
  }
2682
2787
  // required here for the initial layout rendering
2683
- abColumn.FriendlyName = resultHeaderName;
2788
+ abColumn.friendlyName = resultHeaderName;
2684
2789
  return resultHeaderName;
2685
2790
  });
2686
2791
  const newColumnHeader = (_b = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _b === void 0 ? void 0 : _b.headerName;
@@ -2799,7 +2904,7 @@ class Adaptable {
2799
2904
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
2800
2905
  oldValue: params.oldValue,
2801
2906
  newValue: params.newValue,
2802
- columnId: params.column.getColId(),
2907
+ column: this.api.columnApi.getColumnFromId(params.column.getColId()),
2803
2908
  primaryKeyValue: this.getPrimaryKeyValueFromRowNode(params.node),
2804
2909
  rowNode: params.node,
2805
2910
  trigger: 'edit',
@@ -2894,7 +2999,7 @@ class Adaptable {
2894
2999
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
2895
3000
  oldValue: oldValue,
2896
3001
  newValue: newValue,
2897
- columnId: key,
3002
+ column: this.api.columnApi.getColumnFromId(key),
2898
3003
  primaryKeyValue: primaryKeyValue,
2899
3004
  rowNode: rowNode,
2900
3005
  trigger: 'tick',
@@ -2916,13 +3021,14 @@ class Adaptable {
2916
3021
  if (!primaryKeyValue) {
2917
3022
  return;
2918
3023
  }
2919
- if (!this.api.columnApi.doesColumnExist(colId)) {
3024
+ const abColumn = this.api.columnApi.getColumnFromId(colId);
3025
+ if (!abColumn) {
2920
3026
  return;
2921
3027
  }
2922
3028
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
2923
3029
  oldValue: oldValue,
2924
3030
  newValue: newValue,
2925
- columnId: colId,
3031
+ column: abColumn,
2926
3032
  primaryKeyValue: primaryKeyValue,
2927
3033
  rowNode: rowNode,
2928
3034
  trigger: 'edit',
@@ -2947,7 +3053,7 @@ class Adaptable {
2947
3053
  }
2948
3054
  dataChangedInfos.forEach((dataChangedInfo) => {
2949
3055
  if (dataChangedInfo.trigger === 'undo') {
2950
- LoggingHelper_1.LogAdaptableInfo(`Undo data change: PK(${dataChangedInfo.primaryKeyValue}) Col(${dataChangedInfo.columnId}) RevertedValue(${dataChangedInfo.oldValue}) OriginalValue(${dataChangedInfo.newValue})`);
3056
+ LoggingHelper_1.LogAdaptableInfo(`Undo data change: PK(${dataChangedInfo.primaryKeyValue}) Col(${dataChangedInfo.column}) RevertedValue(${dataChangedInfo.oldValue}) OriginalValue(${dataChangedInfo.newValue})`);
2951
3057
  }
2952
3058
  if (dataChangedInfo.trigger === 'edit' || dataChangedInfo.trigger === 'undo') {
2953
3059
  this.checkChangedCellCurrentlySelected(dataChangedInfo);
@@ -2986,7 +3092,7 @@ class Adaptable {
2986
3092
  stylesWithExpression.forEach((conditionalStyle) => {
2987
3093
  if (!dataChangedScope.wholeRow) {
2988
3094
  const columnIds = this.api.queryLanguageApi.getColumnsFromExpression(conditionalStyle.Rule.BooleanExpression);
2989
- if (columnIds.includes(dataChangedInfo.columnId)) {
3095
+ if (columnIds.includes(dataChangedInfo.column.columnId)) {
2990
3096
  if (this.api.scopeApi.scopeIsAll(conditionalStyle.Scope)) {
2991
3097
  dataChangedScope.wholeRow = true;
2992
3098
  return;
@@ -2994,7 +3100,7 @@ class Adaptable {
2994
3100
  else {
2995
3101
  this.api.scopeApi
2996
3102
  .getColumnsForScope(conditionalStyle.Scope)
2997
- .map((c) => c.ColumnId)
3103
+ .map((c) => c.columnId)
2998
3104
  .forEach((colId) => {
2999
3105
  dataChangedScope.columnIds.add(colId);
3000
3106
  });
@@ -3012,10 +3118,10 @@ class Adaptable {
3012
3118
  let affectedColumnIds = this.api.formatColumnApi.getColumnIdsFromColumnComparison(columnComparision);
3013
3119
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(affectedColumnIds)) {
3014
3120
  dataChangedInfos.forEach((dataChangedInfo) => {
3015
- if (affectedColumnIds.includes(dataChangedInfo.columnId)) {
3121
+ if (affectedColumnIds.includes(dataChangedInfo.column.columnId)) {
3016
3122
  this.api.scopeApi
3017
3123
  .getColumnsForScope(fc.Scope)
3018
- .map((c) => c.ColumnId)
3124
+ .map((c) => c.columnId)
3019
3125
  .forEach((colId) => {
3020
3126
  dataChangedScope.columnIds.add(colId);
3021
3127
  });
@@ -3029,7 +3135,7 @@ class Adaptable {
3029
3135
  let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
3030
3136
  if (selectedCellInfo && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.gridCells)) {
3031
3137
  let matchingCell = selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == dataChangedInfo.primaryKeyValue &&
3032
- gc.columnId == dataChangedInfo.columnId);
3138
+ gc.column == dataChangedInfo.column);
3033
3139
  if (matchingCell) {
3034
3140
  this.setSelectedCells();
3035
3141
  }
@@ -3113,7 +3219,7 @@ class Adaptable {
3113
3219
  getVendorGridColumnFieldForColumn(abColumn) {
3114
3220
  const agGridColumn = this.gridOptions.columnApi
3115
3221
  .getAllColumns()
3116
- .find((c) => c.getColId() === abColumn.ColumnId);
3222
+ .find((c) => c.getColId() === abColumn.columnId);
3117
3223
  return agGridColumn.getColDef().field || '';
3118
3224
  }
3119
3225
  setRowGroupColumns(columnIds) {
@@ -3225,7 +3331,7 @@ class Adaptable {
3225
3331
  }
3226
3332
  return state;
3227
3333
  });
3228
- this.gridOptions.columnApi.setColumnState(newColumnState);
3334
+ this.gridOptions.columnApi.applyColumnState({ state: newColumnState, applyOrder: true });
3229
3335
  this.gridOptions.api.onSortChanged();
3230
3336
  }
3231
3337
  clearColumnSort() {
@@ -3240,6 +3346,26 @@ class Adaptable {
3240
3346
  }
3241
3347
  this.gridOptions.api.setRowData(dataSource);
3242
3348
  }
3349
+ getGridData() {
3350
+ var _a;
3351
+ const data = [];
3352
+ (_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.api.forEachNode((rowNode) => {
3353
+ if (!this.isGroupRowNode(rowNode)) {
3354
+ data.push(rowNode.data);
3355
+ }
3356
+ });
3357
+ return data;
3358
+ }
3359
+ getFilteredData() {
3360
+ var _a;
3361
+ const data = [];
3362
+ (_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.api.forEachNodeAfterFilter((rowNode) => {
3363
+ if (!this.isGroupRowNode(rowNode)) {
3364
+ data.push(rowNode.data);
3365
+ }
3366
+ });
3367
+ return data;
3368
+ }
3243
3369
  loadDataSource(dataSource) {
3244
3370
  if (this.hasAutogeneratedPrimaryKey()) {
3245
3371
  this.addSyntheticPrimaryKey(dataSource);
@@ -3263,11 +3389,15 @@ class Adaptable {
3263
3389
  this.addSyntheticPrimaryKey(dataRows);
3264
3390
  }
3265
3391
  dataUpdateConfig = dataUpdateConfig || {};
3392
+ const newData = { add: dataRows };
3393
+ if (dataUpdateConfig.addIndex !== undefined) {
3394
+ newData.addIndex = dataUpdateConfig.addIndex;
3395
+ }
3266
3396
  if (dataUpdateConfig.runAsync) {
3267
- this.gridOptions.api.applyTransactionAsync({ add: dataRows }, dataUpdateConfig.callback);
3397
+ this.gridOptions.api.applyTransactionAsync(newData, dataUpdateConfig.callback);
3268
3398
  }
3269
3399
  else {
3270
- this.gridOptions.api.applyTransaction({ add: dataRows });
3400
+ this.gridOptions.api.applyTransaction(newData);
3271
3401
  }
3272
3402
  }
3273
3403
  deleteRows(dataRows, dataUpdateConfig) {
@@ -3289,7 +3419,7 @@ class Adaptable {
3289
3419
  checkColumnsDataTypeSet() {
3290
3420
  // check that we have no unknown columns - if we do then ok
3291
3421
  const firstCol = this.api.columnApi.getColumns()[0];
3292
- if (firstCol && firstCol.DataType == Enums_1.DataType.Unknown) {
3422
+ if (firstCol && firstCol.dataType == Enums_1.DataType.Unknown) {
3293
3423
  this.updateColumnsIntoStore();
3294
3424
  }
3295
3425
  }
@@ -3597,21 +3727,23 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
3597
3727
  }
3598
3728
  exportToExcel(reportData, fileName) {
3599
3729
  const columnDefs = reportData.columns.map((column) => ({
3600
- field: column.ColumnId,
3601
- headerName: column.FriendlyName,
3730
+ field: column.columnId,
3731
+ headerName: column.friendlyName,
3602
3732
  }));
3603
3733
  const NESTED_COL_SEPARATOR = '.';
3604
- const nestedColumns = reportData.columns.filter((column) => column.ColumnId.includes(NESTED_COL_SEPARATOR));
3734
+ const nestedColumns = reportData.columns.filter((column) => column.columnId.includes(NESTED_COL_SEPARATOR));
3605
3735
  if (nestedColumns.length) {
3606
3736
  // the rowData of nested fields (containing dots) was flattened during the report data extraction and we need to un-flatten it back
3607
3737
  // ex.
3608
3738
  // current state: { field: 'outerKey.innerKey', value: 2}
3609
3739
  // original (desired) state: { field: 'outerKey.innerKey', value: {outerKey: {innerKey: 2}}}
3610
3740
  reportData.rows.forEach((rowDataEntry) => nestedColumns.forEach((nestedColumn) => {
3611
- const cellExportValue = rowDataEntry[nestedColumn.ColumnId];
3741
+ const cellExportValue = rowDataEntry[nestedColumn.columnId];
3612
3742
  let intermediaryValue = rowDataEntry;
3613
3743
  // augment the rowDataEntry with the new object
3614
- nestedColumn.ColumnId.split(NESTED_COL_SEPARATOR).forEach((nestedKey, index, nestedCols) => {
3744
+ nestedColumn.columnId
3745
+ .split(NESTED_COL_SEPARATOR)
3746
+ .forEach((nestedKey, index, nestedCols) => {
3615
3747
  // we reached the leaf node, so we set the cell value and break
3616
3748
  if (index === nestedCols.length - 1) {
3617
3749
  intermediaryValue[nestedKey] = cellExportValue;
@@ -3623,7 +3755,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
3623
3755
  intermediaryValue = intermediaryValue[nestedKey];
3624
3756
  });
3625
3757
  // delete the obsolete flattened property
3626
- delete rowDataEntry[nestedColumn.ColumnId];
3758
+ delete rowDataEntry[nestedColumn.columnId];
3627
3759
  }));
3628
3760
  }
3629
3761
  const gridOptions = {