@adaptabletools/adaptable 10.0.3 → 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 (101) hide show
  1. package/package.json +1 -1
  2. package/publishTimestamp.d.ts +1 -1
  3. package/publishTimestamp.js +1 -1
  4. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -4
  5. package/src/Api/CalculatedColumnApi.d.ts +15 -0
  6. package/src/Api/ColumnApi.d.ts +6 -0
  7. package/src/Api/Implementation/AlertApiImpl.js +5 -5
  8. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
  9. package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
  10. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  11. package/src/Api/Implementation/ColumnApiImpl.js +32 -35
  12. package/src/Api/Implementation/ExportApiImpl.js +4 -4
  13. package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
  14. package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -2
  15. package/src/Api/Implementation/GridApiImpl.js +8 -9
  16. package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
  17. package/src/Api/Implementation/InternalApiImpl.js +4 -4
  18. package/src/Api/Implementation/LayoutApiImpl.js +3 -3
  19. package/src/Api/Implementation/ScopeApiImpl.js +11 -11
  20. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
  21. package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -8
  22. package/src/Api/InternalApi.d.ts +1 -1
  23. package/src/Api/UserInterfaceApi.d.ts +3 -2
  24. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +33 -33
  25. package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
  26. package/src/PredefinedConfig/Common/AdaptablePredicate.js +3 -3
  27. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +3 -2
  28. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
  29. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  30. package/src/Redux/Store/AdaptableStore.js +3 -3
  31. package/src/Strategy/AdaptableModuleBase.js +8 -8
  32. package/src/Strategy/AlertModule.js +12 -11
  33. package/src/Strategy/BulkUpdateModule.js +5 -5
  34. package/src/Strategy/CalculatedColumnModule.js +1 -1
  35. package/src/Strategy/CellSummaryModule.js +3 -3
  36. package/src/Strategy/ConditionalStyleModule.js +3 -3
  37. package/src/Strategy/CustomSortModule.js +2 -2
  38. package/src/Strategy/ExportModule.js +1 -1
  39. package/src/Strategy/FilterModule.js +4 -4
  40. package/src/Strategy/FormatColumnModule.js +5 -5
  41. package/src/Strategy/FreeTextColumnModule.js +1 -1
  42. package/src/Strategy/LayoutModule.js +3 -3
  43. package/src/Strategy/PlusMinusModule.js +8 -9
  44. package/src/Strategy/SmartEditModule.js +6 -6
  45. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
  46. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  47. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  48. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  49. package/src/Utilities/Helpers/PreviewHelper.js +2 -2
  50. package/src/Utilities/ObjectFactory.js +1 -1
  51. package/src/Utilities/Services/DataService.js +5 -5
  52. package/src/Utilities/Services/ReportService.js +11 -11
  53. package/src/Utilities/Services/ValidationService.js +4 -5
  54. package/src/View/Alert/AlertPopup.js +1 -1
  55. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  56. package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -3
  57. package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
  58. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
  59. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  60. package/src/View/Components/ColumnSelector/index.js +2 -2
  61. package/src/View/Components/FilterForm/FilterForm.js +14 -14
  62. package/src/View/Components/FilterForm/QuickFilterForm.js +13 -13
  63. package/src/View/Components/NewScopeComponent.js +1 -1
  64. package/src/View/Components/PreviewResultsPanel.js +1 -1
  65. package/src/View/Components/RangesComponent.js +2 -2
  66. package/src/View/Components/Selectors/ColumnSelector.js +5 -5
  67. package/src/View/Components/Selectors/ColumnValueSelector.js +4 -4
  68. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -6
  69. package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
  70. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
  71. package/src/View/CustomSort/CustomSortEntityRow.js +2 -2
  72. package/src/View/CustomSort/CustomSortPopup.js +1 -1
  73. package/src/View/CustomSort/CustomSortSummary.js +3 -3
  74. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
  75. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -3
  76. package/src/View/Filter/FilterSummary.js +2 -2
  77. package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
  78. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  79. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  80. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +1 -1
  81. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +2 -2
  82. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  83. package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
  84. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
  85. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
  86. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
  87. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
  88. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
  89. package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
  90. package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
  91. package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
  92. package/src/View/Query/QueryViewPanel.js +2 -2
  93. package/src/agGrid/Adaptable.js +57 -51
  94. package/src/agGrid/agGridHelper.js +32 -32
  95. package/src/agGrid/agGridMenuHelper.js +2 -2
  96. package/src/components/ExpressionEditor/index.js +7 -7
  97. package/src/metamodel/adaptable.metamodel.d.ts +51 -5
  98. package/src/metamodel/adaptable.metamodel.js +99 -30
  99. package/src/types.d.ts +1 -1
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
@@ -736,19 +736,19 @@ class Adaptable {
736
736
  const columnsInGroup = columnGroup.getLeafColumns();
737
737
  columnsInGroup.forEach((col) => {
738
738
  const group = {
739
- ColumnGroupId: ColumnGroupId,
740
- FriendlyName,
741
- AllowGroupSplit: AllowGroupSplit,
742
- GroupCount: 0,
739
+ columnGroupId: ColumnGroupId,
740
+ friendlyName: FriendlyName,
741
+ allowGroupSplit: AllowGroupSplit,
742
+ groupCount: 0,
743
743
  };
744
- groupsCount[group.ColumnGroupId] = groupsCount[group.ColumnGroupId] || 0;
745
- groupsCount[group.ColumnGroupId] += columnsInGroup.length;
744
+ groupsCount[group.columnGroupId] = groupsCount[group.columnGroupId] || 0;
745
+ groupsCount[group.columnGroupId] += columnsInGroup.length;
746
746
  acc[col.getColId()] = group;
747
747
  });
748
748
  return acc;
749
749
  }, {});
750
750
  Object.keys(colsToGroups).forEach((colId) => {
751
- colsToGroups[colId].GroupCount = groupsCount[colsToGroups[colId].ColumnGroupId];
751
+ colsToGroups[colId].groupCount = groupsCount[colsToGroups[colId].columnGroupId];
752
752
  });
753
753
  // TODO sort the visible columns by layout order
754
754
  vendorCols.forEach((vendorColumn) => {
@@ -840,7 +840,8 @@ class Adaptable {
840
840
  var _a;
841
841
  return ((_a = aa.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
842
842
  aa.dataChangedInfo &&
843
- aa.dataChangedInfo.columnId === col.ColumnId &&
843
+ aa.dataChangedInfo.column &&
844
+ aa.dataChangedInfo.column.columnId === col.columnId &&
844
845
  aa.dataChangedInfo.rowNode === params.node;
845
846
  });
846
847
  const alert = activeAlerts[0];
@@ -868,7 +869,7 @@ class Adaptable {
868
869
  }
869
870
  getFlashingAlertCellStyle(col, params) {
870
871
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
871
- return this.getFlashingAlertStyleFor(primaryKeyValue, col.ColumnId);
872
+ return this.getFlashingAlertStyleFor(primaryKeyValue, col.columnId);
872
873
  }
873
874
  getCellHighlightStyle(col, params) {
874
875
  var _a;
@@ -876,7 +877,7 @@ class Adaptable {
876
877
  const cellHightlight = this.api.internalApi
877
878
  .getSystemState()
878
879
  .HighlightedCells.find((cellHighlightInfo) => {
879
- return (col.ColumnId === cellHighlightInfo.columnId &&
880
+ return (col.columnId === cellHighlightInfo.columnId &&
880
881
  cellHighlightInfo.primaryKeyValue === primaryKeyValue);
881
882
  });
882
883
  if (cellHightlight) {
@@ -905,7 +906,7 @@ class Adaptable {
905
906
  if (!editableCellStyle) {
906
907
  return undefined;
907
908
  }
908
- const gridCell = this.getGridCellFromRowNode(params.node, abColumn.ColumnId);
909
+ const gridCell = this.getGridCellFromRowNode(params.node, abColumn.columnId);
909
910
  if (gridCell) {
910
911
  if (this.api.gridApi.areCellsEditable([gridCell])) {
911
912
  return this.convertAdaptableStyleToCSS(editableCellStyle);
@@ -918,7 +919,7 @@ class Adaptable {
918
919
  if (!editableCellStyle) {
919
920
  return undefined;
920
921
  }
921
- const gridCell = this.getGridCellFromRowNode(params.node, abColumn.ColumnId);
922
+ const gridCell = this.getGridCellFromRowNode(params.node, abColumn.columnId);
922
923
  if (gridCell) {
923
924
  if (!this.api.gridApi.areCellsEditable([gridCell])) {
924
925
  return this.convertAdaptableStyleToCSS(editableCellStyle);
@@ -958,7 +959,7 @@ class Adaptable {
958
959
  return null;
959
960
  }
960
961
  const isCellEditable = this.api.gridApi.areCellsEditable([
961
- this.getGridCellFromRowNode(params.node, abColumn.ColumnId),
962
+ this.getGridCellFromRowNode(params.node, abColumn.columnId),
962
963
  ]);
963
964
  return isCellEditable ? editableCellStyle.ClassName : null;
964
965
  }
@@ -968,12 +969,12 @@ class Adaptable {
968
969
  return null;
969
970
  }
970
971
  const isCellReadonly = !this.api.gridApi.areCellsEditable([
971
- this.getGridCellFromRowNode(params.node, abColumn.ColumnId),
972
+ this.getGridCellFromRowNode(params.node, abColumn.columnId),
972
973
  ]);
973
974
  return isCellReadonly ? readonlyCellStyle.ClassName : null;
974
975
  }
975
976
  isQuickSearchActive(abColumn, params) {
976
- if (abColumn.IsExcludedFromQuickSearch) {
977
+ if (abColumn.isExcludedFromQuickSearch) {
977
978
  return false;
978
979
  }
979
980
  if (!params.node || params.node.group) {
@@ -983,7 +984,7 @@ class Adaptable {
983
984
  if (StringExtensions_1.StringExtensions.IsNullOrEmpty(quickSearchValue)) {
984
985
  return false;
985
986
  }
986
- const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.ColumnId, 'Contains', [quickSearchValue]);
987
+ const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.columnId, 'Contains', [quickSearchValue]);
987
988
  return this.api.filterApi.evaluateColumnFilter(columnFilter, params.node);
988
989
  }
989
990
  getPrimaryKeyValueFromRowNode(rowNode) {
@@ -1347,7 +1348,7 @@ class Adaptable {
1347
1348
  const colId = column.getColId();
1348
1349
  const selectedColumn = this.api.columnApi.getColumnFromId(colId);
1349
1350
  if (selectedColumn &&
1350
- columns.find((c) => c.ColumnId == selectedColumn.ColumnId) == null) {
1351
+ columns.find((c) => c.columnId == selectedColumn.columnId) == null) {
1351
1352
  columns.push(selectedColumn);
1352
1353
  }
1353
1354
  for (let rowIndex = y1; rowIndex <= y2; rowIndex++) {
@@ -1408,20 +1409,20 @@ class Adaptable {
1408
1409
  setValue(dataChangedInfo) {
1409
1410
  // note: because we use rownode set data value this will cause Validation to fire
1410
1411
  let newValue;
1411
- let dataType = this.api.columnApi.getColumnDataTypeFromColumnId(dataChangedInfo.columnId);
1412
+ let dataType = dataChangedInfo.column.dataType;
1412
1413
  newValue =
1413
1414
  dataType == Enums_1.DataType.Number ? Number(dataChangedInfo.newValue) : dataChangedInfo.newValue;
1414
1415
  if (dataType == undefined) {
1415
1416
  return; // no point continuing as probably a wrong column
1416
1417
  }
1417
1418
  if (dataChangedInfo.rowNode) {
1418
- dataChangedInfo.rowNode.setDataValue(dataChangedInfo.columnId, newValue);
1419
+ dataChangedInfo.rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
1419
1420
  }
1420
1421
  else {
1421
1422
  if (this.useRowNodeLookUp) {
1422
1423
  const rowNode = this.gridOptions.api.getRowNode(dataChangedInfo.primaryKeyValue);
1423
1424
  if (rowNode != null) {
1424
- rowNode.setDataValue(dataChangedInfo.columnId, newValue);
1425
+ rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
1425
1426
  dataChangedInfo.rowNode = rowNode;
1426
1427
  }
1427
1428
  }
@@ -1431,7 +1432,7 @@ class Adaptable {
1431
1432
  this.gridOptions.api.getModel().forEachNode((rowNode) => {
1432
1433
  if (!isUpdated) {
1433
1434
  if (dataChangedInfo.primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
1434
- rowNode.setDataValue(dataChangedInfo.columnId, newValue);
1435
+ rowNode.setDataValue(dataChangedInfo.column.columnId, newValue);
1435
1436
  dataChangedInfo.rowNode = rowNode;
1436
1437
  isUpdated = true;
1437
1438
  }
@@ -1454,7 +1455,8 @@ class Adaptable {
1454
1455
  rawValue: pv,
1455
1456
  displayValue: pv,
1456
1457
  normalisedValue: pv,
1457
- columnId: column.ColumnId,
1458
+ columnId: column.columnId,
1459
+ column: column,
1458
1460
  rowNode: undefined,
1459
1461
  };
1460
1462
  });
@@ -1462,7 +1464,7 @@ class Adaptable {
1462
1464
  else {
1463
1465
  if (visibleRowsOnly) {
1464
1466
  this.gridOptions.api.forEachNodeAfterFilter((rowNode) => {
1465
- const gridCell = this.addDistinctColumnValue(rowNode, column.ColumnId);
1467
+ const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
1466
1468
  if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
1467
1469
  returnValues.push(gridCell);
1468
1470
  }
@@ -1470,7 +1472,7 @@ class Adaptable {
1470
1472
  }
1471
1473
  else {
1472
1474
  this.gridOptions.api.forEachNode((rowNode) => {
1473
- const gridCell = this.addDistinctColumnValue(rowNode, column.ColumnId);
1475
+ const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
1474
1476
  if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
1475
1477
  returnValues.push(gridCell);
1476
1478
  }
@@ -1533,7 +1535,7 @@ class Adaptable {
1533
1535
  rawValue: pv,
1534
1536
  displayValue: pv,
1535
1537
  normalisedValue: pv,
1536
- columnId: columnId,
1538
+ column: abColumn,
1537
1539
  rowNode: undefined,
1538
1540
  });
1539
1541
  });
@@ -1582,7 +1584,7 @@ class Adaptable {
1582
1584
  }
1583
1585
  shouldUseRawValueForColumn(column) {
1584
1586
  // we need to return false if the column has a cell rendeerer i think...
1585
- const colDef = this.gridOptions.api.getColumnDef(column.ColumnId);
1587
+ const colDef = this.gridOptions.api.getColumnDef(column.columnId);
1586
1588
  if (colDef && colDef.cellRenderer != null) {
1587
1589
  return true;
1588
1590
  }
@@ -1627,7 +1629,7 @@ class Adaptable {
1627
1629
  rawValue: rawValue,
1628
1630
  displayValue: displayValue,
1629
1631
  normalisedValue: normalisedvalue,
1630
- columnId: columnId,
1632
+ column: abColumn,
1631
1633
  primaryKeyValue: pkValue,
1632
1634
  rowNode: rowNode,
1633
1635
  };
@@ -2103,7 +2105,7 @@ class Adaptable {
2103
2105
  height: 65,
2104
2106
  Columns: this.api.columnApi.getColumns().map((col) => {
2105
2107
  return {
2106
- columnFriendlyName: col.FriendlyName,
2108
+ columnFriendlyName: col.friendlyName,
2107
2109
  width: 200,
2108
2110
  textAlign: 'start',
2109
2111
  };
@@ -2120,7 +2122,7 @@ class Adaptable {
2120
2122
  height: 30,
2121
2123
  Columns: this.api.columnApi.getColumns().map((col) => {
2122
2124
  return {
2123
- columnFriendlyName: col.FriendlyName,
2125
+ columnFriendlyName: col.friendlyName,
2124
2126
  width: 200,
2125
2127
  textAlign: 'start',
2126
2128
  };
@@ -2692,8 +2694,9 @@ class Adaptable {
2692
2694
  this.setColDefProperty(col, 'cellEditorParams', (params) => {
2693
2695
  if (editLookUpItem) {
2694
2696
  return (params) => {
2697
+ const gridCell = this.getGridCellFromRowNode(params === null || params === void 0 ? void 0 : params.node, colId);
2695
2698
  return {
2696
- values: this.api.userInterfaceApi.getEditLookUpValuesForEditLookUpItem(editLookUpItem, colId, params === null || params === void 0 ? void 0 : params.data),
2699
+ values: this.api.userInterfaceApi.getEditLookUpValuesForEditLookUpItem(editLookUpItem, gridCell),
2697
2700
  };
2698
2701
  };
2699
2702
  }
@@ -2707,7 +2710,7 @@ class Adaptable {
2707
2710
  return this.agGridHelper.createNumericStyleRendererFunc(formatColumn);
2708
2711
  }
2709
2712
  if (formatColumn.ColumnStyle.CheckBoxStyle) {
2710
- return this.agGridHelper.createCheckboxRendererComp(abColumn.ColumnId, abColumn.ReadOnly);
2713
+ return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
2711
2714
  }
2712
2715
  }
2713
2716
  const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
@@ -2776,13 +2779,13 @@ class Adaptable {
2776
2779
  resultHeaderName = layoutCustomHeader;
2777
2780
  }
2778
2781
  // check if the deprecated formatColumn header is used
2779
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.ColumnId);
2782
+ const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.columnId);
2780
2783
  if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
2781
2784
  // fallback to the formatColumn property if no Layout custom header is provided
2782
2785
  resultHeaderName = formatColumn.HeaderName;
2783
2786
  }
2784
2787
  // required here for the initial layout rendering
2785
- abColumn.FriendlyName = resultHeaderName;
2788
+ abColumn.friendlyName = resultHeaderName;
2786
2789
  return resultHeaderName;
2787
2790
  });
2788
2791
  const newColumnHeader = (_b = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _b === void 0 ? void 0 : _b.headerName;
@@ -2901,7 +2904,7 @@ class Adaptable {
2901
2904
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
2902
2905
  oldValue: params.oldValue,
2903
2906
  newValue: params.newValue,
2904
- columnId: params.column.getColId(),
2907
+ column: this.api.columnApi.getColumnFromId(params.column.getColId()),
2905
2908
  primaryKeyValue: this.getPrimaryKeyValueFromRowNode(params.node),
2906
2909
  rowNode: params.node,
2907
2910
  trigger: 'edit',
@@ -2996,7 +2999,7 @@ class Adaptable {
2996
2999
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
2997
3000
  oldValue: oldValue,
2998
3001
  newValue: newValue,
2999
- columnId: key,
3002
+ column: this.api.columnApi.getColumnFromId(key),
3000
3003
  primaryKeyValue: primaryKeyValue,
3001
3004
  rowNode: rowNode,
3002
3005
  trigger: 'tick',
@@ -3018,13 +3021,14 @@ class Adaptable {
3018
3021
  if (!primaryKeyValue) {
3019
3022
  return;
3020
3023
  }
3021
- if (!this.api.columnApi.doesColumnExist(colId)) {
3024
+ const abColumn = this.api.columnApi.getColumnFromId(colId);
3025
+ if (!abColumn) {
3022
3026
  return;
3023
3027
  }
3024
3028
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
3025
3029
  oldValue: oldValue,
3026
3030
  newValue: newValue,
3027
- columnId: colId,
3031
+ column: abColumn,
3028
3032
  primaryKeyValue: primaryKeyValue,
3029
3033
  rowNode: rowNode,
3030
3034
  trigger: 'edit',
@@ -3049,7 +3053,7 @@ class Adaptable {
3049
3053
  }
3050
3054
  dataChangedInfos.forEach((dataChangedInfo) => {
3051
3055
  if (dataChangedInfo.trigger === 'undo') {
3052
- 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})`);
3053
3057
  }
3054
3058
  if (dataChangedInfo.trigger === 'edit' || dataChangedInfo.trigger === 'undo') {
3055
3059
  this.checkChangedCellCurrentlySelected(dataChangedInfo);
@@ -3088,7 +3092,7 @@ class Adaptable {
3088
3092
  stylesWithExpression.forEach((conditionalStyle) => {
3089
3093
  if (!dataChangedScope.wholeRow) {
3090
3094
  const columnIds = this.api.queryLanguageApi.getColumnsFromExpression(conditionalStyle.Rule.BooleanExpression);
3091
- if (columnIds.includes(dataChangedInfo.columnId)) {
3095
+ if (columnIds.includes(dataChangedInfo.column.columnId)) {
3092
3096
  if (this.api.scopeApi.scopeIsAll(conditionalStyle.Scope)) {
3093
3097
  dataChangedScope.wholeRow = true;
3094
3098
  return;
@@ -3096,7 +3100,7 @@ class Adaptable {
3096
3100
  else {
3097
3101
  this.api.scopeApi
3098
3102
  .getColumnsForScope(conditionalStyle.Scope)
3099
- .map((c) => c.ColumnId)
3103
+ .map((c) => c.columnId)
3100
3104
  .forEach((colId) => {
3101
3105
  dataChangedScope.columnIds.add(colId);
3102
3106
  });
@@ -3114,10 +3118,10 @@ class Adaptable {
3114
3118
  let affectedColumnIds = this.api.formatColumnApi.getColumnIdsFromColumnComparison(columnComparision);
3115
3119
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(affectedColumnIds)) {
3116
3120
  dataChangedInfos.forEach((dataChangedInfo) => {
3117
- if (affectedColumnIds.includes(dataChangedInfo.columnId)) {
3121
+ if (affectedColumnIds.includes(dataChangedInfo.column.columnId)) {
3118
3122
  this.api.scopeApi
3119
3123
  .getColumnsForScope(fc.Scope)
3120
- .map((c) => c.ColumnId)
3124
+ .map((c) => c.columnId)
3121
3125
  .forEach((colId) => {
3122
3126
  dataChangedScope.columnIds.add(colId);
3123
3127
  });
@@ -3131,7 +3135,7 @@ class Adaptable {
3131
3135
  let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
3132
3136
  if (selectedCellInfo && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.gridCells)) {
3133
3137
  let matchingCell = selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == dataChangedInfo.primaryKeyValue &&
3134
- gc.columnId == dataChangedInfo.columnId);
3138
+ gc.column == dataChangedInfo.column);
3135
3139
  if (matchingCell) {
3136
3140
  this.setSelectedCells();
3137
3141
  }
@@ -3215,7 +3219,7 @@ class Adaptable {
3215
3219
  getVendorGridColumnFieldForColumn(abColumn) {
3216
3220
  const agGridColumn = this.gridOptions.columnApi
3217
3221
  .getAllColumns()
3218
- .find((c) => c.getColId() === abColumn.ColumnId);
3222
+ .find((c) => c.getColId() === abColumn.columnId);
3219
3223
  return agGridColumn.getColDef().field || '';
3220
3224
  }
3221
3225
  setRowGroupColumns(columnIds) {
@@ -3415,7 +3419,7 @@ class Adaptable {
3415
3419
  checkColumnsDataTypeSet() {
3416
3420
  // check that we have no unknown columns - if we do then ok
3417
3421
  const firstCol = this.api.columnApi.getColumns()[0];
3418
- if (firstCol && firstCol.DataType == Enums_1.DataType.Unknown) {
3422
+ if (firstCol && firstCol.dataType == Enums_1.DataType.Unknown) {
3419
3423
  this.updateColumnsIntoStore();
3420
3424
  }
3421
3425
  }
@@ -3723,21 +3727,23 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
3723
3727
  }
3724
3728
  exportToExcel(reportData, fileName) {
3725
3729
  const columnDefs = reportData.columns.map((column) => ({
3726
- field: column.ColumnId,
3727
- headerName: column.FriendlyName,
3730
+ field: column.columnId,
3731
+ headerName: column.friendlyName,
3728
3732
  }));
3729
3733
  const NESTED_COL_SEPARATOR = '.';
3730
- 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));
3731
3735
  if (nestedColumns.length) {
3732
3736
  // the rowData of nested fields (containing dots) was flattened during the report data extraction and we need to un-flatten it back
3733
3737
  // ex.
3734
3738
  // current state: { field: 'outerKey.innerKey', value: 2}
3735
3739
  // original (desired) state: { field: 'outerKey.innerKey', value: {outerKey: {innerKey: 2}}}
3736
3740
  reportData.rows.forEach((rowDataEntry) => nestedColumns.forEach((nestedColumn) => {
3737
- const cellExportValue = rowDataEntry[nestedColumn.ColumnId];
3741
+ const cellExportValue = rowDataEntry[nestedColumn.columnId];
3738
3742
  let intermediaryValue = rowDataEntry;
3739
3743
  // augment the rowDataEntry with the new object
3740
- nestedColumn.ColumnId.split(NESTED_COL_SEPARATOR).forEach((nestedKey, index, nestedCols) => {
3744
+ nestedColumn.columnId
3745
+ .split(NESTED_COL_SEPARATOR)
3746
+ .forEach((nestedKey, index, nestedCols) => {
3741
3747
  // we reached the leaf node, so we set the cell value and break
3742
3748
  if (index === nestedCols.length - 1) {
3743
3749
  intermediaryValue[nestedKey] = cellExportValue;
@@ -3749,7 +3755,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
3749
3755
  intermediaryValue = intermediaryValue[nestedKey];
3750
3756
  });
3751
3757
  // delete the obsolete flattened property
3752
- delete rowDataEntry[nestedColumn.ColumnId];
3758
+ delete rowDataEntry[nestedColumn.columnId];
3753
3759
  }));
3754
3760
  }
3755
3761
  const gridOptions = {
@@ -215,33 +215,33 @@ class agGridHelper {
215
215
  let ColumnGroup = colsToGroups === null || colsToGroups === void 0 ? void 0 : colsToGroups[ColumnId];
216
216
  const abColumn = {
217
217
  Uuid: Uuid_1.createUuid(),
218
- ColumnId,
219
- FriendlyName,
220
- IsPrimaryKey: ColumnId === pkColumn,
221
- DataType: this.getColumnDataType(vendorColumn, false),
222
- Visible: vendorColumn.isVisible(),
223
- ReadOnly: this.isColumnReadonly(colDef),
224
- ColumnGroup,
225
- Sortable: this.isColumnSortable(colDef),
226
- Filterable: this.isColumnFilterable(colDef),
227
- Groupable: this.isColumnGroupable(colDef),
228
- Pivotable: this.isColumnPivotable(colDef),
229
- Aggregatable: this.isColumnAggregetable(colDef),
230
- AvailableAggregationFunctions: null,
231
- AggregationFunction: null,
232
- Moveable: this.isColumnMoveable(colDef),
233
- Hideable: this.isColumnHideable(colDef),
234
- Queryable: this.isColumnQueryable(colDef, ColumnId),
235
- IsGrouped: this.isColumnGrouped(colDef),
236
- IsFixed: this.isColumnFixed(colDef),
218
+ columnId: ColumnId,
219
+ friendlyName: FriendlyName,
220
+ isPrimaryKey: ColumnId === pkColumn,
221
+ dataType: this.getColumnDataType(vendorColumn, false),
222
+ visible: vendorColumn.isVisible(),
223
+ readOnly: this.isColumnReadonly(colDef),
224
+ columnGroup: ColumnGroup,
225
+ sortable: this.isColumnSortable(colDef),
226
+ filterable: this.isColumnFilterable(colDef),
227
+ groupable: this.isColumnGroupable(colDef),
228
+ pivotable: this.isColumnPivotable(colDef),
229
+ aggregatable: this.isColumnAggregetable(colDef),
230
+ availableAggregationFunctions: null,
231
+ aggregationFunction: null,
232
+ moveable: this.isColumnMoveable(colDef),
233
+ hideable: this.isColumnHideable(colDef),
234
+ queryable: this.isColumnQueryable(colDef, ColumnId),
235
+ isGrouped: this.isColumnGrouped(colDef),
236
+ isFixed: this.isColumnFixed(colDef),
237
237
  //TODO add IsPinned??
238
- IsSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
239
- IsExcludedFromQuickSearch: false,
238
+ isSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
239
+ isExcludedFromQuickSearch: false,
240
240
  };
241
- if (abColumn.Aggregatable) {
242
- abColumn.AvailableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
241
+ if (abColumn.aggregatable) {
242
+ abColumn.availableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
243
243
  if (typeof colDef.aggFunc === 'string') {
244
- abColumn.AggregationFunction = colDef.aggFunc;
244
+ abColumn.aggregationFunction = colDef.aggFunc;
245
245
  }
246
246
  }
247
247
  // lets set this here one as the function cannot change the result so dont need to run it each time
@@ -249,7 +249,7 @@ class agGridHelper {
249
249
  .excludeColumnFromQuickSearch;
250
250
  if (excludeColumnFromQuickSearch) {
251
251
  if (excludeColumnFromQuickSearch(abColumn)) {
252
- abColumn.IsExcludedFromQuickSearch = true;
252
+ abColumn.isExcludedFromQuickSearch = true;
253
253
  }
254
254
  }
255
255
  return abColumn;
@@ -435,8 +435,8 @@ class agGridHelper {
435
435
  let dataType = Enums_1.DataType.Unknown;
436
436
  // get the column type if already in store (and not unknown)
437
437
  const existingColumn = this.adaptable.api.columnApi.getColumnFromId(column.getId(), logWarning);
438
- if (existingColumn && existingColumn.DataType != Enums_1.DataType.Unknown) {
439
- return existingColumn.DataType;
438
+ if (existingColumn && existingColumn.dataType != Enums_1.DataType.Unknown) {
439
+ return existingColumn.dataType;
440
440
  }
441
441
  // check for column type
442
442
  const colType = column.getColDef().type;
@@ -574,7 +574,7 @@ class agGridHelper {
574
574
  return function compareItemsOfCustomSort(nodeA, nodeB) {
575
575
  let firstGroupedColumn = adaptable.getFirstGroupedColumn();
576
576
  if (firstGroupedColumn) {
577
- const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.ColumnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.ColumnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
577
+ const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.columnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.columnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
578
578
  if (definedColumnComparator) {
579
579
  return definedColumnComparator(nodeA.key, nodeB.key);
580
580
  }
@@ -610,10 +610,10 @@ class agGridHelper {
610
610
  headerFontWeight: headerColStyle.fontWeight,
611
611
  height: Number(headerColStyle.height.replace('px', '')),
612
612
  Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
613
- const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.ColumnId}']`);
613
+ const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.columnId}']`);
614
614
  const headerColumnStyle = window.getComputedStyle(headerColumn || headerFirstCol, null);
615
615
  return {
616
- columnFriendlyName: col.FriendlyName,
616
+ columnFriendlyName: col.friendlyName,
617
617
  width: Number(headerColumnStyle.width.replace('px', '')),
618
618
  textAlign: headerColumnStyle.textAlign,
619
619
  };
@@ -629,10 +629,10 @@ class agGridHelper {
629
629
  fontWeight: firstRowStyle.fontWeight,
630
630
  height: Number(firstRowStyle.height.replace('px', '')),
631
631
  Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
632
- const cellElement = document.querySelector(`.ag-cell[col-id='${col.ColumnId}']`);
632
+ const cellElement = document.querySelector(`.ag-cell[col-id='${col.columnId}']`);
633
633
  const headerColumnStyle = window.getComputedStyle(cellElement || firstRow, null);
634
634
  return {
635
- columnFriendlyName: col.FriendlyName,
635
+ columnFriendlyName: col.friendlyName,
636
636
  width: Number(headerColumnStyle.width.replace('px', '')),
637
637
  textAlign: headerColumnStyle.textAlign,
638
638
  };
@@ -223,12 +223,12 @@ class agGridMenuHelper {
223
223
  let isSelectedCell = false;
224
224
  let clickedCell = undefined;
225
225
  if (adaptableColumn) {
226
- clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.ColumnId);
226
+ clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.columnId);
227
227
  }
228
228
  let selectedCellInfo = this.adaptable.setSelectedCells();
229
229
  if (clickedCell && selectedCellInfo) {
230
230
  let matchedCell = selectedCellInfo.gridCells.find((gc) => gc != null &&
231
- gc.columnId == clickedCell.columnId &&
231
+ gc.column == clickedCell.column &&
232
232
  gc.primaryKeyValue == clickedCell.primaryKeyValue);
233
233
  isSelectedCell = matchedCell != null;
234
234
  if (isSelectedCell) {
@@ -47,7 +47,7 @@ function ExpressionEditor(props) {
47
47
  // currently only boolean and scalar expressions support nested calculated columns (calc cols which reference other calc cols)
48
48
  const queryableColumns = type === 'scalar' || type === 'boolean'
49
49
  ? props.columns
50
- : props.columns.filter((c) => !props.api.columnApi.isCalculatedColumn(c.ColumnId));
50
+ : props.columns.filter((c) => !props.api.columnApi.isCalculatedColumn(c.columnId));
51
51
  const dataTableEditor = (React.createElement(React.Fragment, null,
52
52
  React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
53
53
  React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked), style: {
@@ -56,16 +56,16 @@ function ExpressionEditor(props) {
56
56
  paddingTop: 'var(--ab-space-1)',
57
57
  paddingBottom: 'var(--ab-space-1)',
58
58
  } }, 'Show Column IDs')),
59
- React.createElement(FormLayout_1.default, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-space-1)", gridRowGap: "var(--ab-space-1)", sizes: ['auto', '100px'], style: { alignItems: 'stretch' } }, queryableColumns.map((column) => (React.createElement(FormLayout_1.FormRow, { key: column.ColumnId, label: React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
59
+ React.createElement(FormLayout_1.default, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-space-1)", gridRowGap: "var(--ab-space-1)", sizes: ['auto', '100px'], style: { alignItems: 'stretch' } }, queryableColumns.map((column) => (React.createElement(FormLayout_1.FormRow, { key: column.columnId, label: React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
60
60
  background: 'var(--ab-color-primary)',
61
61
  cursor: 'grab',
62
62
  marginRight: 'var(--ab-space-1)',
63
- }, data: `[${column.ColumnId}]`, "data-name": "column", icon: "drag" },
64
- React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.ColumnId}]` : column.FriendlyName)) }, column.DataType === 'Number' ? (React.createElement(Input_1.default, { type: "number", "data-name": "column-input", value: data[column.ColumnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: Number(e.target.value) })), width: "100%", disabled: column.ReadOnly })) : column.DataType === 'String' ? (React.createElement(Input_1.default, { type: "text", "data-name": "column-input", value: data[column.ColumnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: e.target.value })), width: "100%", disabled: column.ReadOnly })) : column.DataType === 'Date' ? (React.createElement(AdaptableInput_1.default, { type: "date", "data-name": "column-input", value: data[column.ColumnId] && DateHelper_1.isValueValidDate(data[column.ColumnId])
65
- ? new Date(data[column.ColumnId]).toISOString().substr(0, 10)
63
+ }, data: `[${column.columnId}]`, "data-name": "column", icon: "drag" },
64
+ React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.columnId}]` : column.friendlyName)) }, column.dataType === 'Number' ? (React.createElement(Input_1.default, { type: "number", "data-name": "column-input", value: data[column.columnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: Number(e.target.value) })), width: "100%", disabled: column.readOnly })) : column.dataType === 'String' ? (React.createElement(Input_1.default, { type: "text", "data-name": "column-input", value: data[column.columnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: e.target.value })), width: "100%", disabled: column.readOnly })) : column.dataType === 'Date' ? (React.createElement(AdaptableInput_1.default, { type: "date", "data-name": "column-input", value: data[column.columnId] && DateHelper_1.isValueValidDate(data[column.columnId])
65
+ ? new Date(data[column.columnId]).toISOString().substr(0, 10)
66
66
  : '', onChange: (e) => {
67
- setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: new Date(e.target.value) }));
68
- }, style: { width: '100%' }, disabled: column.ReadOnly })) : column.DataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", checked: data[column.ColumnId], onChange: (checked) => setData(Object.assign(Object.assign({}, data), { [column.ColumnId]: checked })), disabled: column.ReadOnly })) : null))))));
67
+ setData(Object.assign(Object.assign({}, data), { [column.columnId]: new Date(e.target.value) }));
68
+ }, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", checked: data[column.columnId], onChange: (checked) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: checked })), disabled: column.readOnly })) : null))))));
69
69
  const namedQueries = (React.createElement("div", null, props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: { padding: 3, marginTop: 'var(--ab-space-2)', marginBottom: 'var(--ab-space-2)' }, backgroundColor: "primarylight" },
70
70
  ' ',
71
71
  React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {