@adaptabletools/adaptable 11.0.9 → 11.1.1-canary.1

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 (150) hide show
  1. package/base.css +19 -11
  2. package/bundle.cjs.js +125 -125
  3. package/index.css +23 -11
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -2
  8. package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
  9. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  11. package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
  12. package/src/Api/AlertApi.d.ts +5 -6
  13. package/src/Api/BulkUpdateApi.d.ts +5 -0
  14. package/src/Api/ConfigApi.d.ts +1 -1
  15. package/src/Api/DataChangeHistoryApi.d.ts +3 -3
  16. package/src/Api/EventApi.d.ts +1 -1
  17. package/src/Api/Events/CellChanged.d.ts +2 -2
  18. package/src/Api/Events/GridDataChanged.d.ts +5 -1
  19. package/src/Api/ExportApi.d.ts +3 -3
  20. package/src/Api/FreeTextColumnApi.d.ts +3 -3
  21. package/src/Api/GridApi.d.ts +27 -6
  22. package/src/Api/Implementation/AlertApiImpl.d.ts +7 -4
  23. package/src/Api/Implementation/AlertApiImpl.js +86 -59
  24. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
  25. package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -0
  26. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  27. package/src/Api/Implementation/ConfigApiImpl.js +7 -2
  28. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +3 -3
  29. package/src/Api/Implementation/EventApiImpl.js +1 -1
  30. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
  31. package/src/Api/Implementation/ExportApiImpl.js +7 -8
  32. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +2 -2
  33. package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -7
  34. package/src/Api/Implementation/GridApiImpl.d.ts +11 -3
  35. package/src/Api/Implementation/GridApiImpl.js +29 -8
  36. package/src/Api/Implementation/InternalApiImpl.d.ts +11 -4
  37. package/src/Api/Implementation/InternalApiImpl.js +41 -5
  38. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -1
  39. package/src/Api/Implementation/LayoutApiImpl.js +19 -4
  40. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  41. package/src/Api/Implementation/SettingsPanelApiImpl.js +7 -1
  42. package/src/Api/InternalApi.d.ts +10 -3
  43. package/src/Api/LayoutApi.d.ts +14 -3
  44. package/src/PredefinedConfig/AlertState.d.ts +7 -3
  45. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +35 -6
  46. package/src/PredefinedConfig/Common/AdaptableAlert.js +7 -0
  47. package/src/PredefinedConfig/Common/AdaptableFlashingCell.d.ts +2 -2
  48. package/src/PredefinedConfig/Common/AdaptablePredicate.js +20 -0
  49. package/src/PredefinedConfig/Common/{DataChangedInfo.d.ts → CellDataChangedInfo.d.ts} +2 -6
  50. package/src/PredefinedConfig/Common/{DataChangedInfo.js → CellDataChangedInfo.js} +0 -0
  51. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -1
  52. package/src/PredefinedConfig/Common/DataChangedScope.d.ts +4 -0
  53. package/src/PredefinedConfig/Common/DataChangedScope.js +2 -0
  54. package/src/PredefinedConfig/Common/Entitlement.d.ts +2 -2
  55. package/src/PredefinedConfig/Common/Menu.d.ts +3 -0
  56. package/src/PredefinedConfig/Common/RowsHighlightInfo.d.ts +15 -0
  57. package/src/PredefinedConfig/Common/RowsHighlightInfo.js +2 -0
  58. package/src/PredefinedConfig/ConfigState.d.ts +4 -1
  59. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  60. package/src/PredefinedConfig/PopupState.d.ts +2 -1
  61. package/src/PredefinedConfig/SystemState.d.ts +2 -2
  62. package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
  63. package/src/Redux/ActionsReducers/GridRedux.d.ts +5 -5
  64. package/src/Redux/ActionsReducers/PopupRedux.d.ts +18 -0
  65. package/src/Redux/ActionsReducers/PopupRedux.js +36 -1
  66. package/src/Redux/ActionsReducers/SystemRedux.d.ts +16 -5
  67. package/src/Redux/ActionsReducers/SystemRedux.js +37 -6
  68. package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -0
  69. package/src/Redux/Store/AdaptableReduxMerger.js +40 -4
  70. package/src/Redux/Store/AdaptableStore.js +76 -34
  71. package/src/Strategy/AlertModule.d.ts +5 -3
  72. package/src/Strategy/AlertModule.js +68 -22
  73. package/src/Strategy/BulkUpdateModule.js +7 -2
  74. package/src/Strategy/DataChangeHistoryModule.js +8 -6
  75. package/src/Strategy/ExportModule.js +1 -0
  76. package/src/Strategy/FlashingCellModule.d.ts +2 -2
  77. package/src/Strategy/FlashingCellModule.js +21 -15
  78. package/src/Strategy/FormatColumnModule.js +4 -2
  79. package/src/Strategy/SmartEditModule.js +6 -0
  80. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  81. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
  82. package/src/Utilities/Defaults/DefaultSettingsPanel.js +6 -2
  83. package/src/Utilities/Emitter.d.ts +1 -1
  84. package/src/Utilities/Emitter.js +6 -3
  85. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  86. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  87. package/src/Utilities/Interface/MessagePopups.d.ts +13 -0
  88. package/src/Utilities/ObjectFactory.d.ts +9 -7
  89. package/src/Utilities/ObjectFactory.js +26 -12
  90. package/src/Utilities/Services/CalculatedColumnExpressionService.js +3 -3
  91. package/src/Utilities/Services/DataService.d.ts +5 -5
  92. package/src/Utilities/Services/DataService.js +12 -10
  93. package/src/Utilities/Services/Interface/IAlertService.d.ts +2 -2
  94. package/src/Utilities/Services/Interface/IDataService.d.ts +6 -6
  95. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
  96. package/src/Utilities/Services/Interface/IValidationService.d.ts +4 -4
  97. package/src/Utilities/Services/LicenseService.js +1 -1
  98. package/src/Utilities/Services/ModuleService.js +1 -1
  99. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  100. package/src/Utilities/Services/ValidationService.d.ts +4 -4
  101. package/src/Utilities/Services/ValidationService.js +18 -17
  102. package/src/View/AdaptableView.js +2 -0
  103. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +16 -9
  104. package/src/View/Alert/Wizard/AlertButtonsEditor.js +13 -3
  105. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -0
  106. package/src/View/Alert/Wizard/AlertWizard.js +83 -1
  107. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
  108. package/src/View/Components/FilterForm/FilterForm.js +2 -2
  109. package/src/View/Components/Panels/PanelFooter.d.ts +10 -0
  110. package/src/View/Components/Panels/PanelFooter.js +14 -0
  111. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +12 -7
  112. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -1
  113. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -1
  114. package/src/View/Components/Popups/{AdaptablePopup/Utilities.d.ts → Utilities.d.ts} +4 -0
  115. package/src/View/Components/Popups/{AdaptablePopup/Utilities.js → Utilities.js} +5 -2
  116. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +6 -0
  117. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +32 -0
  118. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +4 -0
  119. package/src/View/Components/Popups/WindowPopups/windowFactory.js +8 -0
  120. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +2 -2
  121. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +2 -2
  122. package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +3 -0
  123. package/src/View/Layout/LayoutEditorStandalonePopup.js +76 -0
  124. package/src/View/Layout/LayoutPopup.js +3 -24
  125. package/src/View/Layout/LayoutViewPanel.d.ts +1 -4
  126. package/src/View/Layout/LayoutViewPanel.js +5 -18
  127. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.d.ts +9 -0
  128. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.js +55 -0
  129. package/src/View/Layout/Wizard/LayoutEditor/index.js +3 -68
  130. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  131. package/src/View/Layout/Wizard/LayoutEditorWizard.js +35 -7
  132. package/src/View/SystemStatus/SystemStatusEntityRow.js +1 -2
  133. package/src/agGrid/Adaptable.d.ts +6 -4
  134. package/src/agGrid/Adaptable.js +115 -117
  135. package/src/agGrid/agGridHelper.d.ts +1 -1
  136. package/src/agGrid/agGridHelper.js +23 -8
  137. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  138. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  139. package/src/components/Dialog/index.js +1 -1
  140. package/src/components/Modal/index.js +1 -1
  141. package/src/components/WindowModal/WindowModal.d.ts +10 -8
  142. package/src/components/WindowModal/WindowModal.js +4 -2
  143. package/src/components/WindowModal/useStacking.d.ts +9 -0
  144. package/src/components/WindowModal/useStacking.js +45 -0
  145. package/src/env.js +3 -3
  146. package/src/metamodel/adaptable.metamodel.d.ts +85 -45
  147. package/src/metamodel/adaptable.metamodel.js +185 -84
  148. package/src/types.d.ts +5 -3
  149. package/version.d.ts +1 -1
  150. package/version.js +1 -1
@@ -42,6 +42,7 @@ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants")
42
42
  const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
43
43
  const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
44
44
  const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
45
+ const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert");
45
46
  const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
46
47
  const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
47
48
  exports.INIT_STATE = 'INIT_STATE';
@@ -109,6 +110,7 @@ class AdaptableStore {
109
110
  // END STATE LOAD
110
111
  this.loadStorageInProgress = false;
111
112
  this.TheStore.dispatch(PopupRedux.PopupShowAlert({
113
+ alertType: 'generic',
112
114
  header: 'Configuration',
113
115
  message: 'Error loading your configuration:' + e,
114
116
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -258,7 +260,7 @@ exports.AdaptableStore = AdaptableStore;
258
260
  const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
259
261
  return function (next) {
260
262
  return function (action) {
261
- var _a, _b, _c, _d, _e, _f;
263
+ var _a, _b, _c, _d, _e, _f, _g, _h;
262
264
  switch (action.type) {
263
265
  /*******************
264
266
  * NAMED QUERY ACTIONS
@@ -273,6 +275,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
273
275
  const namedQueryReferences = adaptable.api.queryApi.getNamedQueryModuleReferences(actionTyped.namedQuery.Name);
274
276
  if (namedQueryReferences.length) {
275
277
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
278
+ alertType: 'generic',
276
279
  header: 'Named Query could not be deleted',
277
280
  message: `It is still referenced in the following modules: ${namedQueryReferences.join(', ')}`,
278
281
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -294,6 +297,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
294
297
  const namedQueryReferences = adaptable.api.queryApi.getNamedQueryModuleReferences(previousNamedQueryName);
295
298
  if (namedQueryReferences.length) {
296
299
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
300
+ alertType: 'generic',
297
301
  header: 'Named Query could not be renamed',
298
302
  message: `It is currently referenced in the following modules: ${namedQueryReferences.join(', ')}`,
299
303
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -319,11 +323,11 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
319
323
  *******************/
320
324
  case SystemRedux.SYSTEM_FLASHING_CELL_ADD:
321
325
  case SystemRedux.SYSTEM_FLASHING_CELL_DELETE: {
322
- const { flashingCell: FlashingCell, } = action;
323
- const { dataChangedInfo } = FlashingCell;
326
+ const { flashingCell: FlashingCell } = action;
327
+ const { cellDataChangedInfo: cellDataChangedInfo } = FlashingCell;
324
328
  let ret = next(action);
325
- if (dataChangedInfo) {
326
- adaptable.refreshCells([dataChangedInfo.rowNode], Object.keys(FlashingCell.flashColumnIds), true);
329
+ if (cellDataChangedInfo) {
330
+ adaptable.refreshCells([cellDataChangedInfo.rowNode], Object.keys(FlashingCell.flashColumnIds), true);
327
331
  }
328
332
  return ret;
329
333
  }
@@ -380,15 +384,17 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
380
384
  case SystemRedux.SYSTEM_ALERT_DELETE: {
381
385
  const actionTyped = action;
382
386
  let ret = next(action);
383
- if (((_c = actionTyped.alert.alertDefinition.AlertProperties) === null || _c === void 0 ? void 0 : _c.HighlightCell) &&
384
- actionTyped.alert.dataChangedInfo) {
385
- let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
386
- adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
387
+ const adaptableAlert = actionTyped.alert;
388
+ if (((_c = adaptableAlert.alertDefinition.AlertProperties) === null || _c === void 0 ? void 0 : _c.HighlightCell) &&
389
+ AdaptableAlert_1.isAdaptableCellChangedAlert(adaptableAlert) &&
390
+ adaptableAlert.cellDataChangedInfo) {
391
+ const rowNode = adaptableAlert.cellDataChangedInfo.rowNode;
392
+ adaptable.refreshCells([rowNode], [adaptableAlert.cellDataChangedInfo.column.columnId], true);
387
393
  }
388
- if (((_d = actionTyped.alert.alertDefinition.AlertProperties) === null || _d === void 0 ? void 0 : _d.HighlightRow) &&
389
- actionTyped.alert.dataChangedInfo) {
390
- let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
391
- adaptable.api.gridApi.refreshRowNode(rowNode);
394
+ if (((_d = adaptableAlert.alertDefinition.AlertProperties) === null || _d === void 0 ? void 0 : _d.HighlightRow) &&
395
+ AdaptableAlert_1.isAdaptableRowChangedAlert(adaptableAlert) &&
396
+ adaptableAlert.gridDataChangedInfo) {
397
+ adaptable.api.gridApi.refreshRowNodes(adaptableAlert.gridDataChangedInfo.rowNodes);
392
398
  }
393
399
  return ret;
394
400
  }
@@ -402,13 +408,16 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
402
408
  let alerts = actionTyped.alerts;
403
409
  alerts.forEach((alert) => {
404
410
  var _a, _b;
405
- if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) && alert.dataChangedInfo) {
406
- let rowNode = alert.dataChangedInfo.rowNode;
407
- adaptable.refreshCells([rowNode], [alert.dataChangedInfo.column.columnId], true);
411
+ if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
412
+ AdaptableAlert_1.isAdaptableCellChangedAlert(alert) &&
413
+ alert.cellDataChangedInfo) {
414
+ let rowNode = alert.cellDataChangedInfo.rowNode;
415
+ adaptable.refreshCells([rowNode], [alert.cellDataChangedInfo.column.columnId], true);
408
416
  }
409
- if (((_b = alert.alertDefinition.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow) && alert.dataChangedInfo) {
410
- let rowNode = alert.dataChangedInfo.rowNode;
411
- adaptable.api.gridApi.refreshRowNode(rowNode);
417
+ if (((_b = alert.alertDefinition.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow) &&
418
+ AdaptableAlert_1.isAdaptableRowChangedAlert(alert) &&
419
+ alert.gridDataChangedInfo) {
420
+ adaptable.api.gridApi.refreshRowNodes(alert.gridDataChangedInfo.rowNodes);
412
421
  }
413
422
  });
414
423
  return ret;
@@ -420,14 +429,17 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
420
429
  case SystemRedux.SYSTEM_ALERT_REMOVE_HIGHLIGHT: {
421
430
  let ret = next(action);
422
431
  const actionTyped = action;
423
- if (actionTyped.alert.dataChangedInfo) {
424
- let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
425
- if (actionTyped.alert.alertDefinition.AlertProperties.HighlightCell) {
426
- adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
427
- }
428
- if (actionTyped.alert.alertDefinition.AlertProperties.HighlightRow) {
429
- adaptable.api.gridApi.refreshRowNode(rowNode);
430
- }
432
+ const adaptableAlert = actionTyped.alert;
433
+ if (((_e = adaptableAlert.alertDefinition.AlertProperties) === null || _e === void 0 ? void 0 : _e.HighlightCell) &&
434
+ AdaptableAlert_1.isAdaptableCellChangedAlert(adaptableAlert) &&
435
+ adaptableAlert.cellDataChangedInfo) {
436
+ const rowNode = adaptableAlert.cellDataChangedInfo.rowNode;
437
+ adaptable.refreshCells([rowNode], [adaptableAlert.cellDataChangedInfo.column.columnId], true);
438
+ }
439
+ if (((_f = adaptableAlert.alertDefinition.AlertProperties) === null || _f === void 0 ? void 0 : _f.HighlightRow) &&
440
+ AdaptableAlert_1.isAdaptableRowChangedAlert(adaptableAlert) &&
441
+ adaptableAlert.gridDataChangedInfo) {
442
+ adaptable.api.gridApi.refreshRowNodes(adaptableAlert.gridDataChangedInfo.rowNodes);
431
443
  }
432
444
  return ret;
433
445
  }
@@ -481,6 +493,25 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
481
493
  }
482
494
  return ret;
483
495
  }
496
+ case SystemRedux.SYSTEM_HIGHLIGHT_ROWS_ADD: {
497
+ const actionTyped = action;
498
+ const ret = next(action);
499
+ const rowsHighlightInfo = actionTyped.rowsHighlightInfo;
500
+ const rowNodes = adaptable.getRowNodesForPrimaryKeys(rowsHighlightInfo.primaryKeyValues);
501
+ if (rowNodes.length) {
502
+ adaptable.api.gridApi.refreshRowNodes(rowNodes);
503
+ }
504
+ return ret;
505
+ }
506
+ case SystemRedux.SYSTEM_HIGHLIGHT_ROWS_DELETE: {
507
+ const actionTyped = action;
508
+ const ret = next(action);
509
+ const rowNodes = adaptable.getRowNodesForPrimaryKeys(actionTyped.primaryKeyValues);
510
+ if (rowNodes.length) {
511
+ adaptable.api.gridApi.refreshRowNodes(rowNodes);
512
+ }
513
+ return ret;
514
+ }
484
515
  case SystemRedux.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL: {
485
516
  const rowHighlightInfos = middlewareAPI.getState().System.HighlightedRows;
486
517
  const ret = next(action);
@@ -540,6 +571,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
540
571
  const calculatedColumnReferences = adaptable.api.calculatedColumnApi.getCalculatedColumnModuleReferences(actionTyped.calculatedColumn);
541
572
  if (calculatedColumnReferences.length) {
542
573
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
574
+ alertType: 'generic',
543
575
  header: 'CalculatedColumn could not be deleted',
544
576
  message: `It is still referenced in the following modules: ${calculatedColumnReferences.join(', ')}`,
545
577
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -563,6 +595,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
563
595
  const freeTextColumnReferences = adaptable.api.freeTextColumnApi.getFreeTextColumnModuleReferences(actionTyped.freeTextColumn);
564
596
  if (freeTextColumnReferences.length) {
565
597
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
598
+ alertType: 'generic',
566
599
  header: 'FreeTextColumn could not be deleted',
567
600
  message: `It is still referenced in the following modules: ${freeTextColumnReferences.join(', ')}`,
568
601
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -762,7 +795,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
762
795
  // tell grid the layout has been selected
763
796
  adaptable.setLayout(currentLayout);
764
797
  }
765
- if (!((_e = adaptable.adaptableOptions.layoutOptions) === null || _e === void 0 ? void 0 : _e.autoSaveLayouts)) {
798
+ if (!((_g = adaptable.adaptableOptions.layoutOptions) === null || _g === void 0 ? void 0 : _g.autoSaveLayouts)) {
766
799
  middlewareAPI.dispatch(LayoutRedux.LayoutUpdateCurrentDraft(currentLayout));
767
800
  }
768
801
  }
@@ -770,7 +803,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
770
803
  returnAction.type == LayoutRedux.LAYOUT_SAVE) {
771
804
  const actionTyped = action;
772
805
  // if autosave is false
773
- if (!((_f = adaptable.adaptableOptions.layoutOptions) === null || _f === void 0 ? void 0 : _f.autoSaveLayouts)) {
806
+ if (!((_h = adaptable.adaptableOptions.layoutOptions) === null || _h === void 0 ? void 0 : _h.autoSaveLayouts)) {
774
807
  // and the current layout is saved, make sure we also update the draft
775
808
  if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
776
809
  middlewareAPI.dispatch(LayoutRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
@@ -1001,6 +1034,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1001
1034
  .catch((error) => {
1002
1035
  LoggingHelper_1.LogAdaptableError('TeamSharing get error : ' + error.message);
1003
1036
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1037
+ alertType: 'generic',
1004
1038
  header: 'Team Sharing',
1005
1039
  message: "Couldn't get shared items: " + error.message,
1006
1040
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -1027,6 +1061,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1027
1061
  adaptable.api.teamSharingApi.getTeamSharingState().ActiveSharedEntityMap[Entity.Uuid];
1028
1062
  if (existingActiveSharedEntity) {
1029
1063
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1064
+ alertType: 'generic',
1030
1065
  header: 'Team Sharing',
1031
1066
  message: `Couldn't share ${adaptable.api.internalApi.getModuleFriendlyName(existingActiveSharedEntity.Module)}, there is already an existing active share for it: ${existingActiveSharedEntity.Description}`,
1032
1067
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -1049,6 +1084,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1049
1084
  .then(() => {
1050
1085
  if (shareSuccessful) {
1051
1086
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1087
+ alertType: 'generic',
1052
1088
  header: 'Team Sharing',
1053
1089
  message: `${adaptable.api.internalApi.getModuleFriendlyName(Module)} Shared Successfully`,
1054
1090
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Success'),
@@ -1058,6 +1094,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1058
1094
  .catch((error) => {
1059
1095
  LoggingHelper_1.LogAdaptableError('TeamSharing share error : ' + error.message, actionTyped.Entity);
1060
1096
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1097
+ alertType: 'generic',
1061
1098
  header: 'Team Sharing',
1062
1099
  message: "Couldn't share item: " + error.message,
1063
1100
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -1081,6 +1118,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1081
1118
  .getSharedEntityDependants(actionTyped.Uuid, sharedEntities);
1082
1119
  if (sharedEntityDependants.length) {
1083
1120
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1121
+ alertType: 'generic',
1084
1122
  header: `Cannot remove the shared item as it is referenced in:`,
1085
1123
  message: sharedEntityDependants
1086
1124
  .map((sharedEntity) => `${adaptable.api.internalApi.getModuleFriendlyName(sharedEntity.Module)} ${sharedEntity.Description}`)
@@ -1098,6 +1136,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1098
1136
  .catch((error) => {
1099
1137
  LoggingHelper_1.LogAdaptableError('TeamSharing remove error : ' + error.message);
1100
1138
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1139
+ alertType: 'generic',
1101
1140
  header: 'Team Sharing',
1102
1141
  message: "Couldn't remove item: " + error.message,
1103
1142
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -1112,7 +1151,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1112
1151
  case TeamSharingRedux.TEAMSHARING_IMPORT_ITEM: {
1113
1152
  let returnAction = next(action);
1114
1153
  const actionTyped = action;
1115
- const [importStepActions, needsOverwriteConfirmation,] = adaptable.api.internalApi
1154
+ const [importStepActions, needsOverwriteConfirmation] = adaptable.api.internalApi
1116
1155
  .getTeamSharingService()
1117
1156
  .buildSharedEntityImportActions(actionTyped.SharedEntity);
1118
1157
  const processImportAction = TeamSharingRedux.TeamSharingProcessImport(importStepActions);
@@ -1164,6 +1203,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1164
1203
  .then(() => middlewareAPI.dispatch(TeamSharingRedux.TeamSharingCommitImport()))
1165
1204
  .catch(() => middlewareAPI.dispatch(TeamSharingRedux.TeamSharingCommitImport()));
1166
1205
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1206
+ alertType: 'generic',
1167
1207
  header: 'Team Sharing',
1168
1208
  message: `Item Successfully Imported`,
1169
1209
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Success'),
@@ -1185,14 +1225,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1185
1225
  .getSharedEntities(adaptableId)
1186
1226
  .then((sharedEntities) => {
1187
1227
  // check if remote server has a newer revision
1188
- const [localRevision, remoteRevision,] = adaptable.api.internalApi
1228
+ const [localRevision, remoteRevision] = adaptable.api.internalApi
1189
1229
  .getTeamSharingService()
1190
1230
  .getSharedEntityLocalAndRemoteRevisions(ChangedAdaptableObject.Uuid, sharedEntities);
1191
1231
  if (remoteRevision > localRevision) {
1192
1232
  // if remote has a newer version, we will NOT overwrite it
1193
1233
  return;
1194
1234
  }
1195
- const [updatedSharedEntities, newActiveEntities,] = adaptable.api.internalApi
1235
+ const [updatedSharedEntities, newActiveEntities] = adaptable.api.internalApi
1196
1236
  .getTeamSharingService()
1197
1237
  .updateActiveSharedEntity(ChangedAdaptableObject, UserName, sharedEntities);
1198
1238
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...newActiveEntities));
@@ -1202,6 +1242,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1202
1242
  .catch((error) => {
1203
1243
  LoggingHelper_1.LogAdaptableError('TeamSharing update active item error : ' + error.message);
1204
1244
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1245
+ alertType: 'generic',
1205
1246
  header: 'Team Sharing',
1206
1247
  message: "Couldn't update active item: " + error.message,
1207
1248
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -1222,6 +1263,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1222
1263
  .catch((error) => {
1223
1264
  LoggingHelper_1.LogAdaptableError('TeamSharing update error : ' + error.message);
1224
1265
  middlewareAPI.dispatch(PopupRedux.PopupShowAlert({
1266
+ alertType: 'generic',
1225
1267
  header: 'Team Sharing',
1226
1268
  message: "Couldn't check for updates: " + error.message,
1227
1269
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -1234,8 +1276,8 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1234
1276
  *******************/
1235
1277
  case SystemRedux.SYSTEM_DATA_CHANGE_HISTORY_UNDO:
1236
1278
  const actionTypedUndo = action;
1237
- const dataChangedInfo = actionTypedUndo.changeInfo;
1238
- adaptable.api.gridApi.undoCellEdit(dataChangedInfo);
1279
+ const cellDataChangedInfo = actionTypedUndo.changeInfo;
1280
+ adaptable.api.gridApi.undoCellEdit(cellDataChangedInfo);
1239
1281
  return next(action);
1240
1282
  /*******************
1241
1283
  * SYSTEM (INTERNAL) ACTIONS
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { AdaptableApi } from '../Api/AdaptableApi';
3
3
  import { AlertDefinition } from '../PredefinedConfig/AlertState';
4
- import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
5
4
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
6
5
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
7
6
  import * as AlertRedux from '../Redux/ActionsReducers/AlertRedux';
@@ -15,12 +14,15 @@ export declare class AlertModule extends AdaptableModuleBase implements IModule
15
14
  getReferencedNamedQueryNames(alertDefinition: AlertDefinition): string[];
16
15
  updateOldConfig(): void;
17
16
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
18
- protected handleDataSourceChanged(dataChangedInfo: DataChangedInfo): void;
17
+ private handleCellDataChanged;
18
+ private handleGridDataChanged;
19
19
  private handleReactiveAlertTriggered;
20
20
  private showAlertForDefinitions;
21
- private getAlertDefinitionsForDataChange;
21
+ private getAlertDefinitionsForCellDataChange;
22
+ private getAlertDefinitionsForGridDataChange;
22
23
  private getBaseAlertDefinitionsForDataChange;
23
24
  private isAlertPredicateTriggered;
25
+ private isAlertDefinitionForRowChangeEvent;
24
26
  getTeamSharingAction(): TeamSharingImportInfo<AlertDefinition>;
25
27
  toView(alert: AlertDefinition): AdaptableObjectView;
26
28
  toViewAll(): AdaptableObjectView[];
@@ -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,14 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
34
36
  return;
35
37
  }
36
38
  }
37
- this.handleDataSourceChanged(dataChangedInfo);
39
+ this.handleCellDataChanged(cellDataChangedInfo);
40
+ });
41
+ this.api.eventApi.on('GridDataChanged', (gridDataChangedInfo) => {
42
+ if (gridDataChangedInfo.rowTrigger === 'Edit') {
43
+ // changed row alerts should be handled by standard 'Any' ('AnyChange') Predicate
44
+ return;
45
+ }
46
+ this.handleGridDataChanged(gridDataChangedInfo);
38
47
  });
39
48
  this.api.internalApi
40
49
  .getAlertService()
@@ -87,25 +96,40 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
87
96
  const items = [];
88
97
  if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
89
98
  if (menuContext.adaptableColumn && menuContext.rowNode) {
90
- let currentAlerts = this.api.internalApi
91
- .getAdaptableAlerts()
92
- .filter((a) => { var _a; return a.dataChangedInfo && ((_a = a.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell); });
93
- if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(currentAlerts)) {
94
- let relevantAlert = currentAlerts.find((a) => this.api.scopeApi.isColumnInScope(menuContext.adaptableColumn, a.alertDefinition.Scope) && a.dataChangedInfo.rowNode == menuContext.rowNode);
95
- if (relevantAlert) {
96
- items.push(this.createColumnMenuItemReduxAction('Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
97
- }
99
+ let relevantAlert;
100
+ // find alerts which highlight the current cell
101
+ relevantAlert = this.api.internalApi.getAdaptableAlertWithHighlightCell(menuContext.adaptableColumn.columnId, menuContext.rowNode);
102
+ if (!relevantAlert) {
103
+ // find alerts which highlight the current row
104
+ relevantAlert = this.api.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
105
+ }
106
+ if (relevantAlert) {
107
+ items.push(this.createColumnMenuItemReduxAction('Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
98
108
  }
99
109
  }
100
110
  }
101
111
  return items;
102
112
  }
103
- handleDataSourceChanged(dataChangedInfo) {
104
- const alertDefinitions = this.getAlertDefinitionsForDataChange(dataChangedInfo);
105
- if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(alertDefinitions)) {
106
- this.showAlertForDefinitions(dataChangedInfo, alertDefinitions);
113
+ handleCellDataChanged(cellDataChangedInfo) {
114
+ const alertDefinitions = this.getAlertDefinitionsForCellDataChange(cellDataChangedInfo);
115
+ if (alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.length) {
116
+ this.showAlertForDefinitions(cellDataChangedInfo, alertDefinitions);
107
117
  }
108
118
  }
119
+ handleGridDataChanged(gridDataChangedInfo) {
120
+ const alertDefinitions = this.getAlertDefinitionsForGridDataChange(gridDataChangedInfo);
121
+ const rowAdded = gridDataChangedInfo.rowTrigger === 'Add';
122
+ const numberOfChangedRows = gridDataChangedInfo.rowNodes.length;
123
+ const actionName = rowAdded ? 'Added' : 'Removed';
124
+ const alertHeader = numberOfChangedRows > 1 ? `${actionName} Rows` : `${actionName} Row `;
125
+ const alertMessage = numberOfChangedRows > 1
126
+ ? `${numberOfChangedRows} rows were ${actionName.toLowerCase()}`
127
+ : `${numberOfChangedRows} row was ${actionName.toLowerCase()}`;
128
+ alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.forEach((alertDefinition) => {
129
+ const alert = ObjectFactory_1.default.CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, gridDataChangedInfo);
130
+ this.api.alertApi.displayAlert(alert);
131
+ });
132
+ }
109
133
  handleReactiveAlertTriggered(reactiveAlertInfo) {
110
134
  var _a;
111
135
  // the row node data is most probably stale because the reactive queries buffer the changed data
@@ -120,15 +144,30 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
120
144
  ]);
121
145
  }
122
146
  }
123
- showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
147
+ showAlertForDefinitions(cellDataChangedInfo, alertDefinitions = []) {
124
148
  alertDefinitions.forEach((alertDefinition) => {
125
- const alert = ObjectFactory_1.default.CreateAlert(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);
126
150
  this.api.alertApi.displayAlert(alert);
127
151
  });
128
152
  }
129
- getAlertDefinitionsForDataChange(dataChangedEvent) {
153
+ getAlertDefinitionsForCellDataChange(dataChangedEvent) {
130
154
  return this.getBaseAlertDefinitionsForDataChange(dataChangedEvent, this.api.alertApi.getActiveNonReactiveAlertDefinitions());
131
155
  }
156
+ getAlertDefinitionsForGridDataChange(gridDataChangedInfo) {
157
+ return this.api.alertApi
158
+ .getActiveNonReactiveAlertDefinitions()
159
+ .filter((alertDefinition) => this.isAlertDefinitionForRowChangeEvent(alertDefinition))
160
+ .filter((alertDefinition) => {
161
+ var _a, _b, _c, _d;
162
+ if (gridDataChangedInfo.rowTrigger === 'Add') {
163
+ return ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) === null || _b === void 0 ? void 0 : _b.PredicateId) === 'AddedRow';
164
+ }
165
+ if (gridDataChangedInfo.rowTrigger === 'Delete') {
166
+ return ((_d = (_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.Predicate) === null || _d === void 0 ? void 0 : _d.PredicateId) === 'RemovedRow';
167
+ }
168
+ return false;
169
+ });
170
+ }
132
171
  getBaseAlertDefinitionsForDataChange(dataChangedEvent, definitions, defaultNoPredicateReturn = false) {
133
172
  let relatedAlertDefinitions = definitions
134
173
  .filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
@@ -151,8 +190,11 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
151
190
  triggeredAlerts.push(alertDefinition);
152
191
  }
153
192
  }
154
- else if (this.isAlertPredicateTriggered(alertDefinition, dataChangedEvent, defaultNoPredicateReturn)) {
155
- triggeredAlerts.push(alertDefinition);
193
+ else {
194
+ if (!this.isAlertDefinitionForRowChangeEvent(alertDefinition) &&
195
+ this.isAlertPredicateTriggered(alertDefinition, dataChangedEvent, defaultNoPredicateReturn)) {
196
+ triggeredAlerts.push(alertDefinition);
197
+ }
156
198
  }
157
199
  });
158
200
  }
@@ -168,6 +210,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
168
210
  column: dataChangedEvent.column,
169
211
  }, defaultNoPredicateReturn);
170
212
  }
213
+ isAlertDefinitionForRowChangeEvent(alertDefinition) {
214
+ return (this.api.internalApi.isAlertDefinitionForAddedRowChangeEvent(alertDefinition) ||
215
+ this.api.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition));
216
+ }
171
217
  getTeamSharingAction() {
172
218
  return {
173
219
  ModuleEntities: this.api.alertApi.getAlertDefinitions(),
@@ -43,6 +43,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
43
43
  return {
44
44
  IsValid: false,
45
45
  Alert: {
46
+ alertType: 'generic',
46
47
  header: 'Bulk Update Error',
47
48
  message: 'Cannot edit while Grid is in Pivot Mode.',
48
49
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -53,6 +54,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
53
54
  return {
54
55
  IsValid: false,
55
56
  Alert: {
57
+ alertType: 'generic',
56
58
  header: 'Bulk Update Error',
57
59
  message: 'No cells are selected.\nPlease select some cells.',
58
60
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -63,6 +65,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
63
65
  return {
64
66
  IsValid: false,
65
67
  Alert: {
68
+ alertType: 'generic',
66
69
  header: 'Bulk Update Error',
67
70
  message: 'Bulk Update only supports single column edit.\nPlease adjust cell selection.',
68
71
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -74,6 +77,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
74
77
  return {
75
78
  IsValid: false,
76
79
  Alert: {
80
+ alertType: 'generic',
77
81
  header: 'Bulk Update Error',
78
82
  message: 'Bulk Update is not permitted on readonly columns.\nPlease adjust the cell selection.',
79
83
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -85,6 +89,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
85
89
  return {
86
90
  IsValid: false,
87
91
  Alert: {
92
+ alertType: 'generic',
88
93
  header: 'Bulk Update Error',
89
94
  message: 'Bulk Update is not permitted on readonly cells.\nPlease adjust the cell selection.',
90
95
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -116,7 +121,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
116
121
  break;
117
122
  }
118
123
  selectedCellInfo.gridCells.forEach((selectedCell) => {
119
- const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
124
+ const cellDataChangedInfo = this.api.internalApi.buildDataChangedInfo({
120
125
  oldValue: selectedCell.rawValue,
121
126
  newValue: typedBulkUpdateValue,
122
127
  column: selectedCell.column,
@@ -126,7 +131,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
126
131
  });
127
132
  const validationRules = this.api.internalApi
128
133
  .getValidationService()
129
- .getValidationRulesForDataChange(dataChangedInfo);
134
+ .getValidationRulesForDataChange(cellDataChangedInfo);
130
135
  const previewResult = {
131
136
  id: selectedCell.primaryKeyValue,
132
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
  }
@@ -185,6 +185,7 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
185
185
  }
186
186
  showEmptyExportWarning() {
187
187
  this.api.internalApi.dispatchReduxAction(PopupRedux.PopupShowAlert({
188
+ alertType: 'generic',
188
189
  header: 'Export',
189
190
  message: 'No Data To Export',
190
191
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
@@ -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;