@adaptabletools/adaptable 11.1.0 → 11.1.1-canary.2

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 (79) hide show
  1. package/LICENSE.md +5 -5
  2. package/agGrid.d.ts +2 -2
  3. package/base.css +4 -6
  4. package/bundle.cjs.js +67 -67
  5. package/index.css +4 -6
  6. package/package.json +1 -1
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  10. package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
  11. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
  12. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  13. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +8 -12
  14. package/src/Api/AlertApi.d.ts +3 -5
  15. package/src/Api/DataChangeHistoryApi.d.ts +3 -3
  16. package/src/Api/Events/CellChanged.d.ts +2 -2
  17. package/src/Api/ExportApi.d.ts +3 -3
  18. package/src/Api/FreeTextColumnApi.d.ts +3 -3
  19. package/src/Api/GridApi.d.ts +4 -4
  20. package/src/Api/Implementation/AlertApiImpl.d.ts +3 -3
  21. package/src/Api/Implementation/AlertApiImpl.js +20 -20
  22. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +3 -3
  23. package/src/Api/Implementation/EventApiImpl.js +1 -1
  24. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
  25. package/src/Api/Implementation/ExportApiImpl.js +7 -8
  26. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +2 -2
  27. package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -7
  28. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  29. package/src/Api/Implementation/GridApiImpl.js +5 -5
  30. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -2
  31. package/src/Api/Implementation/InternalApiImpl.js +6 -6
  32. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -1
  33. package/src/Api/InternalApi.d.ts +2 -2
  34. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +2 -2
  35. package/src/PredefinedConfig/Common/AdaptableFlashingCell.d.ts +2 -2
  36. package/src/PredefinedConfig/Common/{DataChangedInfo.d.ts → CellDataChangedInfo.d.ts} +1 -5
  37. package/src/PredefinedConfig/Common/{DataChangedInfo.js → CellDataChangedInfo.js} +0 -0
  38. package/src/PredefinedConfig/Common/DataChangedScope.d.ts +4 -0
  39. package/src/PredefinedConfig/Common/DataChangedScope.js +2 -0
  40. package/src/PredefinedConfig/SystemState.d.ts +2 -2
  41. package/src/Redux/ActionsReducers/GridRedux.d.ts +5 -5
  42. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -5
  43. package/src/Redux/ActionsReducers/SystemRedux.js +5 -5
  44. package/src/Redux/Store/AdaptableStore.js +15 -15
  45. package/src/Strategy/AlertModule.js +12 -10
  46. package/src/Strategy/BulkUpdateModule.js +2 -2
  47. package/src/Strategy/DataChangeHistoryModule.js +8 -6
  48. package/src/Strategy/FlashingCellModule.d.ts +2 -2
  49. package/src/Strategy/FlashingCellModule.js +21 -15
  50. package/src/Strategy/FormatColumnModule.js +4 -2
  51. package/src/Utilities/Emitter.d.ts +1 -1
  52. package/src/Utilities/Emitter.js +6 -3
  53. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
  54. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  55. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  56. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -1
  57. package/src/Utilities/ObjectFactory.d.ts +2 -2
  58. package/src/Utilities/ObjectFactory.js +2 -2
  59. package/src/Utilities/Services/CalculatedColumnExpressionService.js +3 -3
  60. package/src/Utilities/Services/DataService.d.ts +5 -5
  61. package/src/Utilities/Services/DataService.js +12 -10
  62. package/src/Utilities/Services/Interface/IAlertService.d.ts +2 -2
  63. package/src/Utilities/Services/Interface/IDataService.d.ts +6 -6
  64. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
  65. package/src/Utilities/Services/Interface/IValidationService.d.ts +4 -4
  66. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  67. package/src/Utilities/Services/ValidationService.d.ts +4 -4
  68. package/src/Utilities/Services/ValidationService.js +17 -17
  69. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +2 -2
  70. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +2 -2
  71. package/src/agGrid/ActionColumnRenderer.d.ts +1 -6
  72. package/src/agGrid/ActionColumnRenderer.js +50 -59
  73. package/src/agGrid/Adaptable.d.ts +3 -2
  74. package/src/agGrid/Adaptable.js +54 -49
  75. package/src/metamodel/adaptable.metamodel.d.ts +34 -34
  76. package/src/metamodel/adaptable.metamodel.js +73 -73
  77. package/src/types.d.ts +7 -1
  78. package/version.d.ts +1 -1
  79. package/version.js +1 -1
@@ -32,10 +32,10 @@ class GridApiImpl extends ApiBase_1.ApiBase {
32
32
  this.fireGridDataChangedEvent(dataRows, rowNodes, 'Add');
33
33
  return rowNodes;
34
34
  }
35
- undoCellEdit(dataChangedInfo) {
35
+ undoCellEdit(cellDataChangedInfo) {
36
36
  // for the reason of this hacky solution see the comments in DataService
37
- this.adaptable.api.internalApi.getDataService().logUndoChange(dataChangedInfo);
38
- this.setCellValue(dataChangedInfo.column.columnId, dataChangedInfo.oldValue, dataChangedInfo.primaryKeyValue);
37
+ this.adaptable.api.internalApi.getDataService().logUndoChange(cellDataChangedInfo);
38
+ this.setCellValue(cellDataChangedInfo.column.columnId, cellDataChangedInfo.oldValue, cellDataChangedInfo.primaryKeyValue);
39
39
  return true;
40
40
  }
41
41
  async deleteGridData(dataRows, dataUpdateConfig) {
@@ -276,11 +276,11 @@ class GridApiImpl extends ApiBase_1.ApiBase {
276
276
  this.adaptable.api.eventApi.emit('SearchChanged', searchChangedInfo);
277
277
  }
278
278
  }
279
- fireCellChangedEvent(dataChangedInfo) {
279
+ fireCellChangedEvent(cellDataChangedInfo) {
280
280
  if (this.adaptable.isInitialised) {
281
281
  const cellChangedInfo = {
282
282
  adaptableApi: this.adaptable.api,
283
- cellChange: dataChangedInfo,
283
+ cellChange: cellDataChangedInfo,
284
284
  };
285
285
  this.adaptable.api.eventApi.emit('CellChanged', cellChangedInfo);
286
286
  }
@@ -10,7 +10,7 @@ import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellI
10
10
  import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
11
11
  import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
12
12
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
13
- import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
13
+ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
14
14
  import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, Layout, SystemStatusMessageInfo } from '../../types';
15
15
  import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
16
16
  import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
@@ -75,7 +75,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
75
75
  setGridCells(gridCells: GridCell[]): void;
76
76
  setToolbarTitle(): string;
77
77
  setGridCell(gridCell: GridCell): void;
78
- buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): DataChangedInfo;
78
+ buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
79
79
  private createDataChangedInfoFromGridCell;
80
80
  setLastAppliedShortCut(gridCell: GridCell | undefined): void;
81
81
  updateCurrentDraftLayout(layout: Layout): void;
@@ -75,8 +75,8 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
75
75
  return this.getAdaptableCellChangedAlerts().find((alert) => {
76
76
  var _a, _b, _c, _d;
77
77
  return ((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
78
- ((_c = (_b = alert.dataChangedInfo) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c.columnId) === columnId &&
79
- ((_d = alert.dataChangedInfo) === null || _d === void 0 ? void 0 : _d.rowNode) === rowNode;
78
+ ((_c = (_b = alert.cellDataChangedInfo) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c.columnId) === columnId &&
79
+ ((_d = alert.cellDataChangedInfo) === null || _d === void 0 ? void 0 : _d.rowNode) === rowNode;
80
80
  });
81
81
  }
82
82
  getAdaptableAlertWithHighlightRow(rowNode) {
@@ -197,8 +197,8 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
197
197
  return toolbarTitle;
198
198
  }
199
199
  setGridCell(gridCell) {
200
- const dataChangedInfo = this.createDataChangedInfoFromGridCell(gridCell);
201
- this.adaptable.setValue(dataChangedInfo);
200
+ const cellDataChangedInfo = this.createDataChangedInfoFromGridCell(gridCell);
201
+ this.adaptable.setValue(cellDataChangedInfo);
202
202
  }
203
203
  buildDataChangedInfo(config) {
204
204
  var _a;
@@ -207,14 +207,14 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
207
207
  createDataChangedInfoFromGridCell(gridCell) {
208
208
  let currentValue = this.adaptable.getDisplayValue(gridCell.primaryKeyValue, gridCell.column.columnId);
209
209
  const currentRowNode = this.adaptable.getRowNodeForPrimaryKey(gridCell.primaryKeyValue);
210
- const dataChangedInfo = this.buildDataChangedInfo({
210
+ const cellDataChangedInfo = this.buildDataChangedInfo({
211
211
  oldValue: currentValue,
212
212
  newValue: gridCell.rawValue,
213
213
  column: gridCell.column,
214
214
  primaryKeyValue: gridCell.primaryKeyValue,
215
215
  rowNode: currentRowNode,
216
216
  });
217
- return dataChangedInfo;
217
+ return cellDataChangedInfo;
218
218
  }
219
219
  setLastAppliedShortCut(gridCell) {
220
220
  this.dispatchAction(SystemRedux.SetLastAppliedShortcut(gridCell));
@@ -8,7 +8,9 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
8
8
  let colorPalette = this.getUserInterfaceOptions().colorPalette;
9
9
  // first do the function then get hardcoded items
10
10
  if (colorPalette != null && typeof colorPalette === 'function') {
11
- return colorPalette();
11
+ const currentTheme = this.adaptable.api.themeApi.getCurrentTheme();
12
+ const colours = colorPalette(currentTheme);
13
+ return colours;
12
14
  }
13
15
  else {
14
16
  let arr = colorPalette;
@@ -17,7 +17,7 @@ import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
17
17
  import { Layout } from '../PredefinedConfig/LayoutState';
18
18
  import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
19
19
  import { IDataService } from '../Utilities/Services/Interface/IDataService';
20
- import { AdaptableMessageType, AlertDefinition, DataChangedInfo, SystemStatusMessageInfo } from '../types';
20
+ import { AdaptableMessageType, AlertDefinition, CellDataChangedInfo, SystemStatusMessageInfo } from '../types';
21
21
  import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
22
22
  import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
23
23
  import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
@@ -80,7 +80,7 @@ export interface InternalApi {
80
80
  setGridCell(gridCell: GridCell): void;
81
81
  setToolbarTitle(): string;
82
82
  getQueryPreviewData(): any;
83
- buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): DataChangedInfo;
83
+ buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
84
84
  setLastAppliedShortCut(gridCell: GridCell | undefined): void;
85
85
  updateCurrentDraftLayout(layout: Layout): void;
86
86
  getPrimaryKey(): any;
@@ -1,5 +1,5 @@
1
1
  import { AdaptableObject } from './AdaptableObject';
2
- import { DataChangedInfo } from './DataChangedInfo';
2
+ import { CellDataChangedInfo } from './CellDataChangedInfo';
3
3
  import { GridDataChangedInfo } from '../../Api/Events/GridDataChanged';
4
4
  import { AlertDefinition } from '../AlertState';
5
5
  /**
@@ -16,7 +16,7 @@ export interface AdaptableCellChangedAlert extends AdaptableAlertBase<'cellChang
16
16
  /**
17
17
  * Cell DataChange which triggered Alert
18
18
  */
19
- dataChangedInfo: DataChangedInfo;
19
+ cellDataChangedInfo: CellDataChangedInfo;
20
20
  }
21
21
  /**
22
22
  * Defines an Alert fired by AdapTable when a row is changed
@@ -1,5 +1,5 @@
1
1
  import { AdaptableObject } from './AdaptableObject';
2
- import { DataChangedInfo } from '../../types';
2
+ import { CellDataChangedInfo } from '../../types';
3
3
  import { FlashingCellDefinition } from '../../../types';
4
4
  /**
5
5
  * Defines an Alert fired by AdapTable
@@ -12,7 +12,7 @@ export interface AdaptableFlashingCell extends AdaptableObject {
12
12
  /**
13
13
  * Data change which triggered the FlashingCell
14
14
  */
15
- dataChangedInfo?: DataChangedInfo;
15
+ cellDataChangedInfo?: CellDataChangedInfo;
16
16
  /**
17
17
  * Direction of the change: 'up', 'down' or 'neutral'
18
18
  */
@@ -3,7 +3,7 @@ import { AdaptableColumn } from './AdaptableColumn';
3
3
  /**
4
4
  * Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row
5
5
  */
6
- export interface DataChangedInfo {
6
+ export interface CellDataChangedInfo {
7
7
  /**
8
8
  * Timestamp of change occurrence (in milliseconds)
9
9
  */
@@ -37,7 +37,3 @@ export interface DataChangedInfo {
37
37
  */
38
38
  trigger?: 'edit' | 'tick' | 'undo' | 'aggChange';
39
39
  }
40
- export interface DataChangedScope {
41
- wholeRow: boolean;
42
- columnIds: Set<string>;
43
- }
@@ -0,0 +1,4 @@
1
+ export interface DataChangedScope {
2
+ wholeRow: boolean;
3
+ columnIds: Set<string>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  import { PreviewInfo } from '../Utilities/Interface/Preview';
2
2
  import { InternalState } from './InternalState';
3
3
  import { BulkUpdateValidationResult } from '../Strategy/Interface/IBulkUpdateModule';
4
- import { DataChangedInfo, GridCell } from '../types';
4
+ import { CellDataChangedInfo, GridCell } from '../types';
5
5
  import type { IPushPullState, IPushPullReport, IPushPullDomain } from './IPushPullState';
6
6
  import { Glue42State, Glue42Report } from './Glue42State';
7
7
  import { OpenFinState, OpenFinReport } from './OpenFinState';
@@ -54,7 +54,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
54
54
  disablePersistence: boolean;
55
55
  };
56
56
  DataChangeHistory: {
57
- logs: Record<string, DataChangedInfo>;
57
+ logs: Record<string, CellDataChangedInfo>;
58
58
  currentMode: DataChangeHistoryMode;
59
59
  enableTime: Date;
60
60
  suspendTime: Date;
@@ -4,7 +4,7 @@ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellInfo';
5
5
  import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
6
6
  import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
7
- import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
7
+ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
8
8
  import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
9
9
  import { CellSummmary } from '../../types';
10
10
  import { RowNode } from '@ag-grid-community/all-modules';
@@ -81,10 +81,10 @@ export declare const GRID_SET_TREE_MODE_ON = "GRID_SET_TREE_MODE_ON";
81
81
  */
82
82
  export declare const GRID_SET_TREE_MODE_OFF = "GRID_SET_TREE_MODE_OFF";
83
83
  export interface GridDataChangedAction extends Redux.Action {
84
- dataChangedInfo: DataChangedInfo;
84
+ cellDataChangedInfo: CellDataChangedInfo;
85
85
  }
86
86
  export interface GridDataEditedAction extends Redux.Action {
87
- dataChangedInfo: DataChangedInfo;
87
+ cellDataChangedInfo: CellDataChangedInfo;
88
88
  }
89
89
  export interface GridSetColumnsAction extends Redux.Action {
90
90
  columns: AdaptableColumn[];
@@ -102,10 +102,10 @@ export interface GridEditColumnAction extends Redux.Action {
102
102
  column: AdaptableColumn;
103
103
  }
104
104
  export interface GridSetValueLikeEditAction extends Redux.Action {
105
- dataChangedInfo: DataChangedInfo;
105
+ cellDataChangedInfo: CellDataChangedInfo;
106
106
  }
107
107
  export interface GridSetValueLikeEditBatchAction extends Redux.Action {
108
- dataChangedInfoBatch: DataChangedInfo[];
108
+ cellDataChangedInfoBatch: CellDataChangedInfo[];
109
109
  }
110
110
  export interface GridSelectColumnAction extends Redux.Action {
111
111
  columnId: string;
@@ -11,7 +11,7 @@ import { SystemStatusMessageInfo } from '../../PredefinedConfig/Common/SystemSta
11
11
  import { CachedQuery } from '../../PredefinedConfig/QueryState';
12
12
  import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
13
13
  import { MathOperation, SummaryOperation } from '../../PredefinedConfig/Common/Enums';
14
- import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
14
+ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
15
15
  import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
16
16
  export declare const FLASHING_CELL_ROW_KEY = "__ROW";
17
17
  export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
@@ -191,10 +191,10 @@ export interface SystemLicenseShowWatermarkAction extends Redux.Action {
191
191
  export interface SystemLicenseDisablePersistenceAction extends Redux.Action {
192
192
  }
193
193
  export interface SystemDataChangeHistoryAddAction extends Redux.Action {
194
- changeInfo: DataChangedInfo;
194
+ changeInfo: CellDataChangedInfo;
195
195
  }
196
196
  export interface SystemDataChangeHistoryUndoAction extends Redux.Action {
197
- changeInfo: DataChangedInfo;
197
+ changeInfo: CellDataChangedInfo;
198
198
  }
199
199
  export interface SystemDataChangeHistoryEnableAction extends Redux.Action {
200
200
  }
@@ -249,8 +249,8 @@ export declare const SystemProgressIndicatorShow: (label: string) => SystemProgr
249
249
  export declare const SystemProgressIndicatorHide: () => SystemProgressIndicatorHideAction;
250
250
  export declare const SystemLicenseShowWatermark: (text: string) => SystemLicenseShowWatermarkAction;
251
251
  export declare const SystemLicenseDisablePersistence: () => SystemLicenseDisablePersistenceAction;
252
- export declare const SystemDataChangeHistoryAdd: (changeInfo: DataChangedInfo) => SystemDataChangeHistoryAddAction;
253
- export declare const SystemDataChangeHistoryUndo: (changeInfo: DataChangedInfo) => SystemDataChangeHistoryUndoAction;
252
+ export declare const SystemDataChangeHistoryAdd: (changeInfo: CellDataChangedInfo) => SystemDataChangeHistoryAddAction;
253
+ export declare const SystemDataChangeHistoryUndo: (changeInfo: CellDataChangedInfo) => SystemDataChangeHistoryUndoAction;
254
254
  export declare const SystemDataChangeHistoryEnable: () => SystemDataChangeHistoryEnableAction;
255
255
  export declare const SystemDataChangeHistoryDisable: () => SystemDataChangeHistoryDisableAction;
256
256
  export declare const SystemDataChangeHistorySuspend: () => SystemDataChangeHistorySuspendAction;
@@ -530,16 +530,16 @@ exports.SystemReducer = (state = initialState, action) => {
530
530
  return Object.assign(Object.assign({}, state), { Export: Object.assign(Object.assign({}, state.Export), { CustomDestinationPopups: (_a = state.Export.CustomDestinationPopups) === null || _a === void 0 ? void 0 : _a.filter((data) => data !== action.data) }) });
531
531
  case exports.SYSTEM_DATA_CHANGE_HISTORY_ADD: {
532
532
  const actionTypedAdd = action;
533
- const dataChangedInfo = actionTypedAdd.changeInfo;
534
- const uniqueKey = getDataChangeHistoryKey(dataChangedInfo);
533
+ const cellDataChangedInfo = actionTypedAdd.changeInfo;
534
+ const uniqueKey = getDataChangeHistoryKey(cellDataChangedInfo);
535
535
  const updatedDataChangeHistoryLogs = Object.assign({}, state.DataChangeHistory.logs);
536
- updatedDataChangeHistoryLogs[uniqueKey] = dataChangedInfo;
536
+ updatedDataChangeHistoryLogs[uniqueKey] = cellDataChangedInfo;
537
537
  return Object.assign(Object.assign({}, state), { DataChangeHistory: Object.assign(Object.assign({}, state.DataChangeHistory), { logs: updatedDataChangeHistoryLogs }) });
538
538
  }
539
539
  case exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO: {
540
540
  const actionTypedUndo = action;
541
- const dataChangedInfo = actionTypedUndo.changeInfo;
542
- const uniqueKey = getDataChangeHistoryKey(dataChangedInfo);
541
+ const cellDataChangedInfo = actionTypedUndo.changeInfo;
542
+ const uniqueKey = getDataChangeHistoryKey(cellDataChangedInfo);
543
543
  const updatedDataChangeHistoryLogs = Object.assign({}, state.DataChangeHistory.logs);
544
544
  delete updatedDataChangeHistoryLogs[uniqueKey];
545
545
  return Object.assign(Object.assign({}, state), { DataChangeHistory: Object.assign(Object.assign({}, state.DataChangeHistory), { logs: updatedDataChangeHistoryLogs }) });
@@ -324,10 +324,10 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
324
324
  case SystemRedux.SYSTEM_FLASHING_CELL_ADD:
325
325
  case SystemRedux.SYSTEM_FLASHING_CELL_DELETE: {
326
326
  const { flashingCell: FlashingCell } = action;
327
- const { dataChangedInfo } = FlashingCell;
327
+ const { cellDataChangedInfo: cellDataChangedInfo } = FlashingCell;
328
328
  let ret = next(action);
329
- if (dataChangedInfo) {
330
- adaptable.refreshCells([dataChangedInfo.rowNode], Object.keys(FlashingCell.flashColumnIds), true);
329
+ if (cellDataChangedInfo) {
330
+ adaptable.refreshCells([cellDataChangedInfo.rowNode], Object.keys(FlashingCell.flashColumnIds), true);
331
331
  }
332
332
  return ret;
333
333
  }
@@ -387,9 +387,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
387
387
  const adaptableAlert = actionTyped.alert;
388
388
  if (((_c = adaptableAlert.alertDefinition.AlertProperties) === null || _c === void 0 ? void 0 : _c.HighlightCell) &&
389
389
  AdaptableAlert_1.isAdaptableCellChangedAlert(adaptableAlert) &&
390
- adaptableAlert.dataChangedInfo) {
391
- const rowNode = adaptableAlert.dataChangedInfo.rowNode;
392
- adaptable.refreshCells([rowNode], [adaptableAlert.dataChangedInfo.column.columnId], true);
390
+ adaptableAlert.cellDataChangedInfo) {
391
+ const rowNode = adaptableAlert.cellDataChangedInfo.rowNode;
392
+ adaptable.refreshCells([rowNode], [adaptableAlert.cellDataChangedInfo.column.columnId], true);
393
393
  }
394
394
  if (((_d = adaptableAlert.alertDefinition.AlertProperties) === null || _d === void 0 ? void 0 : _d.HighlightRow) &&
395
395
  AdaptableAlert_1.isAdaptableRowChangedAlert(adaptableAlert) &&
@@ -410,9 +410,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
410
410
  var _a, _b;
411
411
  if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
412
412
  AdaptableAlert_1.isAdaptableCellChangedAlert(alert) &&
413
- alert.dataChangedInfo) {
414
- let rowNode = alert.dataChangedInfo.rowNode;
415
- adaptable.refreshCells([rowNode], [alert.dataChangedInfo.column.columnId], true);
413
+ alert.cellDataChangedInfo) {
414
+ let rowNode = alert.cellDataChangedInfo.rowNode;
415
+ adaptable.refreshCells([rowNode], [alert.cellDataChangedInfo.column.columnId], true);
416
416
  }
417
417
  if (((_b = alert.alertDefinition.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow) &&
418
418
  AdaptableAlert_1.isAdaptableRowChangedAlert(alert) &&
@@ -432,9 +432,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
432
432
  const adaptableAlert = actionTyped.alert;
433
433
  if (((_e = adaptableAlert.alertDefinition.AlertProperties) === null || _e === void 0 ? void 0 : _e.HighlightCell) &&
434
434
  AdaptableAlert_1.isAdaptableCellChangedAlert(adaptableAlert) &&
435
- adaptableAlert.dataChangedInfo) {
436
- const rowNode = adaptableAlert.dataChangedInfo.rowNode;
437
- adaptable.refreshCells([rowNode], [adaptableAlert.dataChangedInfo.column.columnId], true);
435
+ adaptableAlert.cellDataChangedInfo) {
436
+ const rowNode = adaptableAlert.cellDataChangedInfo.rowNode;
437
+ adaptable.refreshCells([rowNode], [adaptableAlert.cellDataChangedInfo.column.columnId], true);
438
438
  }
439
439
  if (((_f = adaptableAlert.alertDefinition.AlertProperties) === null || _f === void 0 ? void 0 : _f.HighlightRow) &&
440
440
  AdaptableAlert_1.isAdaptableRowChangedAlert(adaptableAlert) &&
@@ -645,7 +645,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
645
645
  case QuickSearchRedux.QUICK_SEARCH_RUN: {
646
646
  let returnAction = next(action);
647
647
  adaptable.redrawBody();
648
- // if set then reun a query on the text
648
+ // if set then return a query on the text
649
649
  if (adaptable.adaptableOptions.searchOptions.filterResultsAfterQuickSearch) {
650
650
  const actionTyped = action;
651
651
  const searchText = actionTyped.quickSearchText;
@@ -1276,8 +1276,8 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1276
1276
  *******************/
1277
1277
  case SystemRedux.SYSTEM_DATA_CHANGE_HISTORY_UNDO:
1278
1278
  const actionTypedUndo = action;
1279
- const dataChangedInfo = actionTypedUndo.changeInfo;
1280
- adaptable.api.gridApi.undoCellEdit(dataChangedInfo);
1279
+ const cellDataChangedInfo = actionTypedUndo.changeInfo;
1280
+ adaptable.api.gridApi.undoCellEdit(cellDataChangedInfo);
1281
1281
  return next(action);
1282
1282
  /*******************
1283
1283
  * SYSTEM (INTERNAL) ACTIONS
@@ -18,15 +18,17 @@ const AlertEmptyView_1 = require("../View/Alert/AlertEmptyView");
18
18
  class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
19
  constructor(api) {
20
20
  super(ModuleConstants.AlertModuleId, 'Alert', 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
21
- this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
22
- if (dataChangedInfo.trigger === 'undo' || dataChangedInfo.trigger === 'aggChange') {
21
+ this.api.internalApi
22
+ .getDataService()
23
+ .on('CellDataChanged', (cellDataChangedInfo) => {
24
+ if (cellDataChangedInfo.trigger === 'undo' || cellDataChangedInfo.trigger === 'aggChange') {
23
25
  // do NOT handle reverted or aggregated changes
24
26
  return;
25
27
  }
26
28
  if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
27
29
  'formattedValue') {
28
- const { oldValue, newValue } = dataChangedInfo;
29
- const columnId = dataChangedInfo.column.columnId;
30
+ const { oldValue, newValue } = cellDataChangedInfo;
31
+ const columnId = cellDataChangedInfo.column.columnId;
30
32
  const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
31
33
  const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
32
34
  if (oldFormattedValue === newFormattedValue) {
@@ -34,7 +36,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
34
36
  return;
35
37
  }
36
38
  }
37
- this.handleCellDataChanged(dataChangedInfo);
39
+ this.handleCellDataChanged(cellDataChangedInfo);
38
40
  });
39
41
  this.api.eventApi.on('GridDataChanged', (gridDataChangedInfo) => {
40
42
  if (gridDataChangedInfo.rowTrigger === 'Edit') {
@@ -108,10 +110,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
108
110
  }
109
111
  return items;
110
112
  }
111
- handleCellDataChanged(dataChangedInfo) {
112
- const alertDefinitions = this.getAlertDefinitionsForCellDataChange(dataChangedInfo);
113
+ handleCellDataChanged(cellDataChangedInfo) {
114
+ const alertDefinitions = this.getAlertDefinitionsForCellDataChange(cellDataChangedInfo);
113
115
  if (alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.length) {
114
- this.showAlertForDefinitions(dataChangedInfo, alertDefinitions);
116
+ this.showAlertForDefinitions(cellDataChangedInfo, alertDefinitions);
115
117
  }
116
118
  }
117
119
  handleGridDataChanged(gridDataChangedInfo) {
@@ -142,9 +144,9 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
142
144
  ]);
143
145
  }
144
146
  }
145
- showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
147
+ showAlertForDefinitions(cellDataChangedInfo, alertDefinitions = []) {
146
148
  alertDefinitions.forEach((alertDefinition) => {
147
- const alert = ObjectFactory_1.default.CreateCellChangedAlert(dataChangedInfo.column.friendlyName, this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
149
+ const alert = ObjectFactory_1.default.CreateCellChangedAlert(cellDataChangedInfo.column.friendlyName, this.api.alertApi.getAlertDescription(alertDefinition, cellDataChangedInfo), alertDefinition, cellDataChangedInfo);
148
150
  this.api.alertApi.displayAlert(alert);
149
151
  });
150
152
  }
@@ -121,7 +121,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
121
121
  break;
122
122
  }
123
123
  selectedCellInfo.gridCells.forEach((selectedCell) => {
124
- const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
124
+ const cellDataChangedInfo = this.api.internalApi.buildDataChangedInfo({
125
125
  oldValue: selectedCell.rawValue,
126
126
  newValue: typedBulkUpdateValue,
127
127
  column: selectedCell.column,
@@ -131,7 +131,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
131
131
  });
132
132
  const validationRules = this.api.internalApi
133
133
  .getValidationService()
134
- .getValidationRulesForDataChange(dataChangedInfo);
134
+ .getValidationRulesForDataChange(cellDataChangedInfo);
135
135
  const previewResult = {
136
136
  id: selectedCell.primaryKeyValue,
137
137
  initialValue: selectedCell.rawValue,
@@ -8,10 +8,12 @@ const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
8
8
  class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
9
9
  constructor(api) {
10
10
  super(ModuleConstants.DataChangeHistoryModuleId, 'Data Changes', 'track-changes', 'DataChangeHistoryPopup', 'Provides an overview of all previous changes, giving the possibility to undo specific changes', api);
11
- this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
12
- if (dataChangedInfo.trigger !== 'undo' && dataChangedInfo.trigger !== 'aggChange') {
13
- if (this.shouldLogDataChange(dataChangedInfo)) {
14
- this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemDataChangeHistoryAdd(dataChangedInfo));
11
+ this.api.internalApi
12
+ .getDataService()
13
+ .on('CellDataChanged', (cellDataChangedInfo) => {
14
+ if (cellDataChangedInfo.trigger !== 'undo' && cellDataChangedInfo.trigger !== 'aggChange') {
15
+ if (this.shouldLogDataChange(cellDataChangedInfo)) {
16
+ this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemDataChangeHistoryAdd(cellDataChangedInfo));
15
17
  }
16
18
  }
17
19
  });
@@ -22,7 +24,7 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
22
24
  hasNamedQueryReferences() {
23
25
  return false;
24
26
  }
25
- shouldLogDataChange(dataChangedInfo) {
27
+ shouldLogDataChange(cellDataChangedInfo) {
26
28
  // we log changes only if the change tracking is active
27
29
  if (this.api.internalApi.getState().System.DataChangeHistory.currentMode !== 'ACTIVE') {
28
30
  return false;
@@ -30,7 +32,7 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
30
32
  if (this.api.internalApi.getAdaptableOptions().dataChangeHistoryOptions.showDataChange) {
31
33
  return this.api.internalApi
32
34
  .getAdaptableOptions()
33
- .dataChangeHistoryOptions.showDataChange(dataChangedInfo);
35
+ .dataChangeHistoryOptions.showDataChange(cellDataChangedInfo);
34
36
  }
35
37
  return true;
36
38
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AdaptableApi } from '../Api/AdaptableApi';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
- import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
4
+ import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
5
5
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
6
6
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
7
7
  import * as FlashingCellRedux from '../Redux/ActionsReducers/FlashingCellRedux';
@@ -16,7 +16,7 @@ export declare class FlashingCellModule extends AdaptableModuleBase implements I
16
16
  getReferencedNamedQueryNames(alertDefinition: FlashingCellDefinition): string[];
17
17
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
18
18
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
19
- protected handleDataSourceChanged(dataChangedInfo: DataChangedInfo): void;
19
+ protected handleDataSourceChanged(cellDataChangedInfo: CellDataChangedInfo): void;
20
20
  private showFlashingCellsForDefinitions;
21
21
  private isFlashingTargetOnlyAggChange;
22
22
  private getFlashingCellDefinitionsForDataChange;
@@ -17,8 +17,10 @@ const getFlashingTargetViewItems_1 = require("./Utilities/getFlashingTargetViewI
17
17
  class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
18
18
  constructor(api) {
19
19
  super(ModuleConstants.FlashingCellModuleId, 'Flashing Cell', 'flashing-cell', 'FlashingAlert', 'Flash cells when they change', api);
20
- this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
21
- if (dataChangedInfo.trigger === 'undo') {
20
+ this.api.internalApi
21
+ .getDataService()
22
+ .on('CellDataChanged', (cellDataChangedInfo) => {
23
+ if (cellDataChangedInfo.trigger === 'undo') {
22
24
  // do NOT handle reverted changes
23
25
  return;
24
26
  }
@@ -26,8 +28,8 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
26
28
  // - flash for the underlying small data changes, but the visual does not
27
29
  if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
28
30
  'formattedValue') {
29
- const { oldValue, newValue } = dataChangedInfo;
30
- const columnId = dataChangedInfo.column.columnId;
31
+ const { oldValue, newValue } = cellDataChangedInfo;
32
+ const columnId = cellDataChangedInfo.column.columnId;
31
33
  const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
32
34
  const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
33
35
  if (oldFormattedValue === newFormattedValue) {
@@ -35,7 +37,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
35
37
  return;
36
38
  }
37
39
  }
38
- this.handleDataSourceChanged(dataChangedInfo);
40
+ this.handleDataSourceChanged(cellDataChangedInfo);
39
41
  });
40
42
  }
41
43
  getModuleAdaptableObjects() {
@@ -101,23 +103,27 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
101
103
  }
102
104
  return items;
103
105
  }
104
- handleDataSourceChanged(dataChangedInfo) {
105
- const flashingCellDefinitions = this.getFlashingCellDefinitionsForDataChange(dataChangedInfo);
106
+ handleDataSourceChanged(cellDataChangedInfo) {
107
+ const flashingCellDefinitions = this.getFlashingCellDefinitionsForDataChange(cellDataChangedInfo);
106
108
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(flashingCellDefinitions)) {
107
- this.showFlashingCellsForDefinitions(dataChangedInfo, flashingCellDefinitions);
109
+ this.showFlashingCellsForDefinitions(cellDataChangedInfo, flashingCellDefinitions);
108
110
  }
109
111
  }
110
- showFlashingCellsForDefinitions(dataChangedInfo, flashingCellDefinitions = []) {
112
+ showFlashingCellsForDefinitions(cellDataChangedInfo, flashingCellDefinitions = []) {
111
113
  const allColumnIds = this.api.columnApi.getColumns().map((c) => c.columnId);
112
- const columnDataType = dataChangedInfo.column.dataType;
114
+ const columnDataType = cellDataChangedInfo.column.dataType;
113
115
  const numeric = columnDataType === 'Number';
114
116
  const isComparableType = numeric || columnDataType === 'Date';
115
117
  let up = false;
116
118
  let down = false;
117
119
  let direction = 'neutral';
118
120
  if (isComparableType) {
119
- const newValue = numeric ? Number(dataChangedInfo.newValue) : dataChangedInfo.newValue;
120
- const oldValue = numeric ? Number(dataChangedInfo.oldValue) : dataChangedInfo.oldValue;
121
+ const newValue = numeric
122
+ ? Number(cellDataChangedInfo.newValue)
123
+ : cellDataChangedInfo.newValue;
124
+ const oldValue = numeric
125
+ ? Number(cellDataChangedInfo.oldValue)
126
+ : cellDataChangedInfo.oldValue;
121
127
  up = newValue > oldValue;
122
128
  down = newValue < oldValue;
123
129
  direction = up ? 'up' : down ? 'down' : 'neutral';
@@ -125,7 +131,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
125
131
  flashingCellDefinitions.forEach((flashingCellDefinition) => {
126
132
  var _a;
127
133
  let flashTarget = this.api.flashingCellApi.getFlashingCellFlashTarget(flashingCellDefinition);
128
- const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
134
+ const flashColumnIds = { [cellDataChangedInfo.column.columnId]: true };
129
135
  /**
130
136
  * When flashing a row, all columns in that row are marked to flash.
131
137
  */
@@ -134,11 +140,11 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
134
140
  flashColumnIds[colId] = true;
135
141
  });
136
142
  }
137
- const rowPrimaryKey = dataChangedInfo.primaryKeyValue;
143
+ const rowPrimaryKey = cellDataChangedInfo.primaryKeyValue;
138
144
  this.api.flashingCellApi.showFlashingCell({
139
145
  rowPrimaryKey,
140
146
  flashingCellDefinition: flashingCellDefinition,
141
- dataChangedInfo,
147
+ cellDataChangedInfo: cellDataChangedInfo,
142
148
  direction,
143
149
  flashTarget,
144
150
  flashColumnIds,
@@ -19,7 +19,9 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
19
  * Use Case: Data (cell/row) has changed
20
20
  * Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
21
21
  */
22
- this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
22
+ this.api.internalApi
23
+ .getDataService()
24
+ .on('CellDataChanged', (cellDataChangedInfo) => {
23
25
  const activeCheckboxColumnIds = this.api.columnApi
24
26
  .getColumns()
25
27
  .filter((aColumn) => {
@@ -28,7 +30,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
28
30
  })
29
31
  .map((aColumn) => aColumn.columnId);
30
32
  // no need to refresh the CheckboxColumns if the change was triggered by one of them
31
- if (!activeCheckboxColumnIds.includes(dataChangedInfo.column.columnId)) {
33
+ if (!activeCheckboxColumnIds.includes(cellDataChangedInfo.column.columnId)) {
32
34
  this.api.internalApi
33
35
  .getAdaptableInstance()
34
36
  .refreshCells(null, activeCheckboxColumnIds, true, true);
@@ -7,7 +7,7 @@ declare class Emittery {
7
7
  on(eventName: string, listener: EmitterCallback): any;
8
8
  off(eventName: string, listener: EmitterCallback): void;
9
9
  once(eventName: string): Promise<unknown>;
10
- onIncludeFiredOnce(eventName: string): Promise<any>;
10
+ onIncludeFiredOnce(eventName: string, listener: EmitterCallback): any;
11
11
  onIncludeFired(eventName: string, listener: EmitterCallback): any;
12
12
  emit(eventName: string, eventData?: any): Promise<any[]>;
13
13
  emitSync(eventName: string, eventData?: any): any[];