@adaptabletools/adaptable 11.0.8 → 11.1.1-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 (115) 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 +2 -0
  8. package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
  9. package/src/Api/AlertApi.d.ts +2 -1
  10. package/src/Api/BulkUpdateApi.d.ts +5 -0
  11. package/src/Api/ConfigApi.d.ts +1 -1
  12. package/src/Api/EventApi.d.ts +1 -1
  13. package/src/Api/Events/GridDataChanged.d.ts +5 -1
  14. package/src/Api/GridApi.d.ts +23 -2
  15. package/src/Api/Implementation/AlertApiImpl.d.ts +4 -1
  16. package/src/Api/Implementation/AlertApiImpl.js +79 -52
  17. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
  18. package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -0
  19. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  20. package/src/Api/Implementation/ConfigApiImpl.js +7 -2
  21. package/src/Api/Implementation/EventApiImpl.js +1 -1
  22. package/src/Api/Implementation/GridApiImpl.d.ts +9 -1
  23. package/src/Api/Implementation/GridApiImpl.js +24 -3
  24. package/src/Api/Implementation/InternalApiImpl.d.ts +9 -2
  25. package/src/Api/Implementation/InternalApiImpl.js +37 -1
  26. package/src/Api/Implementation/LayoutApiImpl.d.ts +6 -1
  27. package/src/Api/Implementation/LayoutApiImpl.js +45 -4
  28. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  29. package/src/Api/Implementation/SettingsPanelApiImpl.js +7 -1
  30. package/src/Api/InternalApi.d.ts +9 -2
  31. package/src/Api/LayoutApi.d.ts +33 -3
  32. package/src/PredefinedConfig/AlertState.d.ts +7 -3
  33. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +35 -6
  34. package/src/PredefinedConfig/Common/AdaptableAlert.js +7 -0
  35. package/src/PredefinedConfig/Common/AdaptablePredicate.js +20 -0
  36. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -1
  37. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
  38. package/src/PredefinedConfig/Common/Entitlement.d.ts +2 -2
  39. package/src/PredefinedConfig/Common/Menu.d.ts +3 -0
  40. package/src/PredefinedConfig/Common/RowsHighlightInfo.d.ts +15 -0
  41. package/src/PredefinedConfig/Common/RowsHighlightInfo.js +2 -0
  42. package/src/PredefinedConfig/ConfigState.d.ts +4 -1
  43. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  44. package/src/PredefinedConfig/PopupState.d.ts +2 -1
  45. package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
  46. package/src/Redux/ActionsReducers/PopupRedux.d.ts +18 -0
  47. package/src/Redux/ActionsReducers/PopupRedux.js +36 -1
  48. package/src/Redux/ActionsReducers/SystemRedux.d.ts +11 -0
  49. package/src/Redux/ActionsReducers/SystemRedux.js +32 -1
  50. package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -0
  51. package/src/Redux/Store/AdaptableReduxMerger.js +40 -4
  52. package/src/Redux/Store/AdaptableStore.js +69 -27
  53. package/src/Strategy/AlertModule.d.ts +5 -3
  54. package/src/Strategy/AlertModule.js +60 -16
  55. package/src/Strategy/BulkUpdateModule.js +5 -0
  56. package/src/Strategy/ExportModule.js +1 -0
  57. package/src/Strategy/SmartEditModule.js +6 -0
  58. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  59. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
  60. package/src/Utilities/Defaults/DefaultSettingsPanel.js +6 -2
  61. package/src/Utilities/Emitter.d.ts +1 -1
  62. package/src/Utilities/Emitter.js +6 -3
  63. package/src/Utilities/Interface/MessagePopups.d.ts +13 -0
  64. package/src/Utilities/ObjectFactory.d.ts +8 -6
  65. package/src/Utilities/ObjectFactory.js +26 -12
  66. package/src/Utilities/Services/LicenseService.js +1 -1
  67. package/src/Utilities/Services/ModuleService.js +1 -1
  68. package/src/Utilities/Services/ValidationService.js +1 -0
  69. package/src/View/AdaptableView.js +2 -0
  70. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +16 -9
  71. package/src/View/Alert/Wizard/AlertButtonsEditor.js +13 -3
  72. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -0
  73. package/src/View/Alert/Wizard/AlertWizard.js +83 -1
  74. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  75. package/src/View/Components/FilterForm/FilterForm.js +2 -2
  76. package/src/View/Components/Panels/PanelFooter.d.ts +10 -0
  77. package/src/View/Components/Panels/PanelFooter.js +14 -0
  78. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +12 -7
  79. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -1
  80. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -1
  81. package/src/View/Components/Popups/{AdaptablePopup/Utilities.d.ts → Utilities.d.ts} +4 -0
  82. package/src/View/Components/Popups/{AdaptablePopup/Utilities.js → Utilities.js} +5 -2
  83. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +6 -0
  84. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +32 -0
  85. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +4 -0
  86. package/src/View/Components/Popups/WindowPopups/windowFactory.js +8 -0
  87. package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +3 -0
  88. package/src/View/Layout/LayoutEditorStandalonePopup.js +76 -0
  89. package/src/View/Layout/LayoutPopup.js +3 -24
  90. package/src/View/Layout/LayoutViewPanel.d.ts +1 -4
  91. package/src/View/Layout/LayoutViewPanel.js +5 -18
  92. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.d.ts +9 -0
  93. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.js +55 -0
  94. package/src/View/Layout/Wizard/LayoutEditor/index.js +3 -68
  95. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  96. package/src/View/Layout/Wizard/LayoutEditorWizard.js +35 -7
  97. package/src/View/SystemStatus/SystemStatusEntityRow.js +1 -2
  98. package/src/agGrid/Adaptable.d.ts +4 -2
  99. package/src/agGrid/Adaptable.js +65 -69
  100. package/src/agGrid/agGridHelper.d.ts +1 -1
  101. package/src/agGrid/agGridHelper.js +23 -8
  102. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  103. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  104. package/src/components/Dialog/index.js +1 -1
  105. package/src/components/Modal/index.js +1 -1
  106. package/src/components/WindowModal/WindowModal.d.ts +10 -8
  107. package/src/components/WindowModal/WindowModal.js +4 -2
  108. package/src/components/WindowModal/useStacking.d.ts +9 -0
  109. package/src/components/WindowModal/useStacking.js +45 -0
  110. package/src/env.js +3 -3
  111. package/src/metamodel/adaptable.metamodel.d.ts +51 -11
  112. package/src/metamodel/adaptable.metamodel.js +146 -21
  113. package/src/types.d.ts +3 -2
  114. package/version.d.ts +1 -1
  115. package/version.js +1 -1
@@ -17,6 +17,8 @@ export declare const POPUP_SHOW_CONFIRMATION = "POPUP_SHOW_CONFIRMATION";
17
17
  export declare const POPUP_CONFIRM_CONFIRMATION = "POPUP_CONFIRM_CONFIRMATION";
18
18
  export declare const POPUP_CANCEL_CONFIRMATION = "POPUP_CANCEL_CONFIRMATION";
19
19
  export declare const POPUP_CLEAR_PARAM = "POPUP_CLEAR_PARAM";
20
+ export declare const POPUP_WINDOW_SHOW_SCREEN = "POPUP_WINDOW_SHOW_SCREEN";
21
+ export declare const POPUP_WINDOW_HIDE_SCREEN = "POPUP_WINDOW_HIDE_SCREEN";
20
22
  export interface PopupShowScreenAction extends Redux.Action {
21
23
  ComponentModule: AdaptableModule;
22
24
  ComponentName: string;
@@ -27,6 +29,15 @@ export interface PopupShowScreenAction extends Redux.Action {
27
29
  }
28
30
  export interface PopupHideScreenAction extends Redux.Action {
29
31
  }
32
+ export interface PopupShowWindowAction extends Redux.Action {
33
+ Id: string;
34
+ Title: string;
35
+ PopupProps: any;
36
+ Icon?: string;
37
+ }
38
+ export interface PopupHideWindowAction extends Redux.Action {
39
+ Id: string;
40
+ }
30
41
  export interface PopupShowLoadingAction extends Redux.Action {
31
42
  }
32
43
  export interface PopupHideLoadingAction extends Redux.Action {
@@ -57,6 +68,13 @@ export declare const PopupShowScreen: (componentModule?: AdaptableModule, compon
57
68
  [key: string]: any;
58
69
  }) => PopupShowScreenAction;
59
70
  export declare const PopupHideScreen: () => PopupHideScreenAction;
71
+ export declare const PopupShowWindow: (config: {
72
+ Id: string;
73
+ Title: string;
74
+ PopupProps?: any;
75
+ Icon?: string;
76
+ }) => PopupShowWindowAction;
77
+ export declare const PopupWindowHide: (id: string) => PopupHideWindowAction;
60
78
  export declare const PopupShowAlert: (alert: AdaptableAlert) => PopupShowAlertAction;
61
79
  export declare const PopupHideAlert: () => PopupHideAlertAction;
62
80
  export declare const PopupShowLoading: () => PopupShowLoadingAction;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PopupReducer = exports.PopupClearParam = exports.PopupCancelConfirmation = exports.PopupConfirmConfirmation = exports.PopupShowConfirmation = exports.PopupConfirmPrompt = exports.PopupHidePrompt = exports.PopupShowPrompt = exports.PopupHideLoading = exports.PopupShowLoading = exports.PopupHideAlert = exports.PopupShowAlert = exports.PopupHideScreen = exports.PopupShowScreen = exports.POPUP_CLEAR_PARAM = exports.POPUP_CANCEL_CONFIRMATION = exports.POPUP_CONFIRM_CONFIRMATION = exports.POPUP_SHOW_CONFIRMATION = exports.POPUP_CONFIRM_PROMPT = exports.POPUP_HIDE_PROMPT = exports.POPUP_SHOW_PROMPT = exports.POPUP_HIDE_ALERT = exports.POPUP_SHOW_ALERT = exports.POPUP_HIDE_LOADING = exports.POPUP_SHOW_LOADING = exports.POPUP_HIDE_SCREEN = exports.POPUP_SHOW_SCREEN = void 0;
3
+ exports.PopupReducer = exports.PopupClearParam = exports.PopupCancelConfirmation = exports.PopupConfirmConfirmation = exports.PopupShowConfirmation = exports.PopupConfirmPrompt = exports.PopupHidePrompt = exports.PopupShowPrompt = exports.PopupHideLoading = exports.PopupShowLoading = exports.PopupHideAlert = exports.PopupShowAlert = exports.PopupWindowHide = exports.PopupShowWindow = exports.PopupHideScreen = exports.PopupShowScreen = exports.POPUP_WINDOW_HIDE_SCREEN = exports.POPUP_WINDOW_SHOW_SCREEN = exports.POPUP_CLEAR_PARAM = exports.POPUP_CANCEL_CONFIRMATION = exports.POPUP_CONFIRM_CONFIRMATION = exports.POPUP_SHOW_CONFIRMATION = exports.POPUP_CONFIRM_PROMPT = exports.POPUP_HIDE_PROMPT = exports.POPUP_SHOW_PROMPT = exports.POPUP_HIDE_ALERT = exports.POPUP_SHOW_ALERT = exports.POPUP_HIDE_LOADING = exports.POPUP_SHOW_LOADING = exports.POPUP_HIDE_SCREEN = exports.POPUP_SHOW_SCREEN = void 0;
4
4
  exports.POPUP_SHOW_SCREEN = 'POPUP_SHOW_SCREEN';
5
5
  exports.POPUP_HIDE_SCREEN = 'POPUP_HIDE_SCREEN';
6
6
  exports.POPUP_SHOW_LOADING = 'POPUP_SHOW_LOADING';
@@ -14,6 +14,8 @@ exports.POPUP_SHOW_CONFIRMATION = 'POPUP_SHOW_CONFIRMATION';
14
14
  exports.POPUP_CONFIRM_CONFIRMATION = 'POPUP_CONFIRM_CONFIRMATION';
15
15
  exports.POPUP_CANCEL_CONFIRMATION = 'POPUP_CANCEL_CONFIRMATION';
16
16
  exports.POPUP_CLEAR_PARAM = 'POPUP_CLEAR_PARAM';
17
+ exports.POPUP_WINDOW_SHOW_SCREEN = 'POPUP_WINDOW_SHOW_SCREEN';
18
+ exports.POPUP_WINDOW_HIDE_SCREEN = 'POPUP_WINDOW_HIDE_SCREEN';
17
19
  exports.PopupShowScreen = (componentModule, componentName, params, popupProps) => ({
18
20
  type: exports.POPUP_SHOW_SCREEN,
19
21
  ComponentModule: componentModule,
@@ -24,6 +26,17 @@ exports.PopupShowScreen = (componentModule, componentName, params, popupProps) =
24
26
  exports.PopupHideScreen = () => ({
25
27
  type: exports.POPUP_HIDE_SCREEN,
26
28
  });
29
+ exports.PopupShowWindow = (config) => ({
30
+ type: exports.POPUP_WINDOW_SHOW_SCREEN,
31
+ Id: config.Id,
32
+ Title: config.Title,
33
+ PopupProps: config.PopupProps,
34
+ Icon: config.Icon,
35
+ });
36
+ exports.PopupWindowHide = (id) => ({
37
+ type: exports.POPUP_WINDOW_HIDE_SCREEN,
38
+ Id: id,
39
+ });
27
40
  exports.PopupShowAlert = (alert) => {
28
41
  return {
29
42
  type: exports.POPUP_SHOW_ALERT,
@@ -101,6 +114,9 @@ const initialState = {
101
114
  Message: '',
102
115
  ConfirmAction: null,
103
116
  },
117
+ WindowPopup: {
118
+ PopupList: [],
119
+ },
104
120
  };
105
121
  exports.PopupReducer = (state = initialState, action) => {
106
122
  switch (action.type) {
@@ -242,6 +258,25 @@ exports.PopupReducer = (state = initialState, action) => {
242
258
  };
243
259
  return Object.assign({}, state, { ScreenPopup: newScreenPopup });
244
260
  }
261
+ case exports.POPUP_WINDOW_SHOW_SCREEN: {
262
+ const showWindowAction = action;
263
+ const windowSettings = {
264
+ Id: showWindowAction.Id,
265
+ Icon: showWindowAction.Icon,
266
+ Title: showWindowAction.Title,
267
+ PopupProps: showWindowAction.PopupProps,
268
+ };
269
+ // Prevent opening the same popup twice
270
+ if (state.WindowPopup.PopupList.some((windowPopup) => windowPopup.Id === windowSettings.Id)) {
271
+ return state;
272
+ }
273
+ const PopupList = [...state.WindowPopup.PopupList, windowSettings];
274
+ return Object.assign(Object.assign({}, state), { WindowPopup: Object.assign(Object.assign({}, state.WindowPopup), { PopupList }) });
275
+ }
276
+ case exports.POPUP_WINDOW_HIDE_SCREEN: {
277
+ const PopupList = state.WindowPopup.PopupList.filter((windowPopup) => windowPopup.Id !== action.Id);
278
+ return Object.assign(Object.assign({}, state), { WindowPopup: Object.assign(Object.assign({}, state.WindowPopup), { PopupList }) });
279
+ }
245
280
  default:
246
281
  return state;
247
282
  }
@@ -12,6 +12,7 @@ import { CachedQuery } from '../../PredefinedConfig/QueryState';
12
12
  import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
13
13
  import { MathOperation, SummaryOperation } from '../../PredefinedConfig/Common/Enums';
14
14
  import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
15
+ import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
15
16
  export declare const FLASHING_CELL_ROW_KEY = "__ROW";
16
17
  export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
17
18
  export declare const SYSTEM_ALERT_DELETE = "SYSTEM_ALERT_DELETE";
@@ -37,7 +38,9 @@ export declare const SYSTEM_HIGHLIGHT_CELL_ADD = "SYSTEM_HIGHLIGHT_CELL_ADD";
37
38
  export declare const SYSTEM_HIGHLIGHT_CELL_DELETE = "SYSTEM_HIGHLIGHT_CELL_DELETE";
38
39
  export declare const SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = "SYSTEM_HIGHLIGHT_CELL_DELETE_ALL";
39
40
  export declare const SYSTEM_HIGHLIGHT_ROW_ADD = "SYSTEM_HIGHLIGHT_ROW_ADD";
41
+ export declare const SYSTEM_HIGHLIGHT_ROWS_ADD = "SYSTEM_HIGHLIGHT_ROWS_ADD";
40
42
  export declare const SYSTEM_HIGHLIGHT_ROW_DELETE = "SYSTEM_HIGHLIGHT_ROW_DELETE";
43
+ export declare const SYSTEM_HIGHLIGHT_ROWS_DELETE = "SYSTEM_HIGHLIGHT_ROWS_DELETE";
41
44
  export declare const SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = "SYSTEM_HIGHLIGHT_ROW_DELETE_ALL";
42
45
  export declare const SYSTEM_SET_NEW_COLUMN_LIST_ORDER = "SYSTEM_SET_NEW_COLUMN_LIST_ORDER";
43
46
  export declare const SYSTEM_SET_LAST_APPLIED_SHORTCUT = "SYSTEM_SET_LAST_APPLIED_SHORTCUT";
@@ -77,6 +80,12 @@ export interface SystemHighlightRowAddAction extends Redux.Action {
77
80
  export interface SystemHighlightRowDeleteAction extends Redux.Action {
78
81
  primaryKeyValue: RowHighlightInfo['primaryKeyValue'];
79
82
  }
83
+ export interface SystemHighlightRowsAddAction extends Redux.Action {
84
+ rowsHighlightInfo: RowsHighlightInfo;
85
+ }
86
+ export interface SystemHighlightRowsDeleteAction extends Redux.Action {
87
+ primaryKeyValues: RowsHighlightInfo['primaryKeyValues'];
88
+ }
80
89
  export interface SystemHighlightRowDeleteAllAction extends Redux.Action {
81
90
  }
82
91
  export interface SystemAlertAddAction extends Redux.Action {
@@ -209,7 +218,9 @@ export declare const SystemHighlightCellAdd: (cellHighlightInfo: CellHighlightIn
209
218
  export declare const SystemHighlightCellDelete: (primaryKeyValue: CellHighlightInfo['primaryKeyValue'], columnId: CellHighlightInfo['columnId']) => SystemHighlightCellDeleteAction;
210
219
  export declare const SystemHighlightCellDeleteAll: () => SystemHighlightCellDeleteAllAction;
211
220
  export declare const SystemHighlightRowAdd: (rowHighlightInfo: RowHighlightInfo) => SystemHighlightRowAddAction;
221
+ export declare const SystemHighlightRowsAdd: (rowsHighlightInfo: RowsHighlightInfo) => SystemHighlightRowsAddAction;
212
222
  export declare const SystemHighlightRowDelete: (primaryKeyValue: RowHighlightInfo['primaryKeyValue']) => SystemHighlightRowDeleteAction;
223
+ export declare const SystemHighlightRowsDelete: (primaryKeyValues: RowsHighlightInfo['primaryKeyValues']) => SystemHighlightRowsDeleteAction;
213
224
  export declare const SystemHighlightRowDeleteAll: () => SystemHighlightRowDeleteAllAction;
214
225
  export declare const SystemAlertAdd: (alert: AdaptableAlert, maxAlerts: number) => SystemAlertAddAction;
215
226
  export declare const SystemAlertDelete: (alert: AdaptableAlert) => SystemAlertDeleteAction;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SystemReducer = exports.getSystemExportCustomDestinationPopups = exports.SystemSettingsPanelSet = exports.SystemExportCustomDestinationPopupHide = exports.SystemExportCustomDestinationPopupShow = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowDelete = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
3
+ exports.SystemReducer = exports.getSystemExportCustomDestinationPopups = exports.SystemSettingsPanelSet = exports.SystemExportCustomDestinationPopupHide = exports.SystemExportCustomDestinationPopupShow = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROWS_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROWS_ADD = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
4
4
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
5
5
  const Helper_1 = require("../../Utilities/Helpers/Helper");
6
6
  /*
@@ -40,7 +40,9 @@ exports.SYSTEM_HIGHLIGHT_CELL_DELETE = 'SYSTEM_HIGHLIGHT_CELL_DELETE';
40
40
  exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = 'SYSTEM_HIGHLIGHT_CELL_DELETE_ALL';
41
41
  // Rows Highlight
42
42
  exports.SYSTEM_HIGHLIGHT_ROW_ADD = 'SYSTEM_HIGHLIGHT_ROW_ADD';
43
+ exports.SYSTEM_HIGHLIGHT_ROWS_ADD = 'SYSTEM_HIGHLIGHT_ROWS_ADD';
43
44
  exports.SYSTEM_HIGHLIGHT_ROW_DELETE = 'SYSTEM_HIGHLIGHT_ROW_DELETE';
45
+ exports.SYSTEM_HIGHLIGHT_ROWS_DELETE = 'SYSTEM_HIGHLIGHT_ROWS_DELETE';
44
46
  exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = 'SYSTEM_HIGHLIGHT_ROW_DELETE_ALL';
45
47
  // Columns
46
48
  exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = 'SYSTEM_SET_NEW_COLUMN_LIST_ORDER';
@@ -88,10 +90,18 @@ exports.SystemHighlightRowAdd = (rowHighlightInfo) => ({
88
90
  type: exports.SYSTEM_HIGHLIGHT_ROW_ADD,
89
91
  rowHighlightInfo: rowHighlightInfo,
90
92
  });
93
+ exports.SystemHighlightRowsAdd = (rowsHighlightInfo) => ({
94
+ type: exports.SYSTEM_HIGHLIGHT_ROWS_ADD,
95
+ rowsHighlightInfo: rowsHighlightInfo,
96
+ });
91
97
  exports.SystemHighlightRowDelete = (primaryKeyValue) => ({
92
98
  type: exports.SYSTEM_HIGHLIGHT_ROW_DELETE,
93
99
  primaryKeyValue: primaryKeyValue,
94
100
  });
101
+ exports.SystemHighlightRowsDelete = (primaryKeyValues) => ({
102
+ type: exports.SYSTEM_HIGHLIGHT_ROWS_DELETE,
103
+ primaryKeyValues: primaryKeyValues,
104
+ });
95
105
  exports.SystemHighlightRowDeleteAll = () => ({
96
106
  type: exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL,
97
107
  });
@@ -378,6 +388,19 @@ exports.SystemReducer = (state = initialState, action) => {
378
388
  HighlightedRows: [...state.HighlightedRows, actionTypedAdd.rowHighlightInfo],
379
389
  });
380
390
  }
391
+ case exports.SYSTEM_HIGHLIGHT_ROWS_ADD: {
392
+ const actionTypedAdd = action;
393
+ const rowHighlightInfos = actionTypedAdd.rowsHighlightInfo.primaryKeyValues.map((primaryKeyValue) => {
394
+ return {
395
+ primaryKeyValue,
396
+ highlightStyle: actionTypedAdd.rowsHighlightInfo.highlightStyle,
397
+ timeout: actionTypedAdd.rowsHighlightInfo.timeout,
398
+ };
399
+ });
400
+ return Object.assign({}, state, {
401
+ HighlightedRows: [...state.HighlightedRows, ...rowHighlightInfos],
402
+ });
403
+ }
381
404
  case exports.SYSTEM_HIGHLIGHT_ROW_DELETE: {
382
405
  const actionTypedDelete = action;
383
406
  const actionId = actionTypedDelete.primaryKeyValue;
@@ -387,6 +410,14 @@ exports.SystemReducer = (state = initialState, action) => {
387
410
  }),
388
411
  });
389
412
  }
413
+ case exports.SYSTEM_HIGHLIGHT_ROWS_DELETE: {
414
+ const actionTypedDelete = action;
415
+ return Object.assign({}, state, {
416
+ HighlightedRows: state.HighlightedRows.filter((rowHighlightInfo) => {
417
+ return !actionTypedDelete.primaryKeyValues.includes(rowHighlightInfo.primaryKeyValue);
418
+ }),
419
+ });
420
+ }
390
421
  case exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL: {
391
422
  return Object.assign({}, state, {
392
423
  HighlightedRows: [],
@@ -1,6 +1,7 @@
1
1
  import { ConfigState } from '../../PredefinedConfig/ConfigState';
2
2
  import { AdaptableState } from '../../PredefinedConfig/AdaptableState';
3
3
  export declare function AddStateSource(stateObject: any, source: 'Config' | 'User'): any;
4
+ export declare function ProcessKeepUserDefinedRevision(configState: any, currentUserState: any): any;
4
5
  export declare function MergeStateFunction(oldState: any, newState: any): any;
5
6
  export declare function MergeState(oldState: any, newState: any): any;
6
7
  declare type TypeReducer = (state: AdaptableState, action: {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mergeReducer = exports.MergeState = exports.MergeStateFunction = exports.AddStateSource = void 0;
3
+ exports.mergeReducer = exports.MergeState = exports.MergeStateFunction = exports.ProcessKeepUserDefinedRevision = exports.AddStateSource = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const mergeWith_1 = tslib_1.__importDefault(require("lodash/mergeWith"));
6
6
  const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
@@ -47,6 +47,34 @@ function AddStateSource(stateObject = {}, source) {
47
47
  return stateObject;
48
48
  }
49
49
  exports.AddStateSource = AddStateSource;
50
+ function ProcessKeepUserDefinedRevision(configState, currentUserState) {
51
+ const traverseStateObject = (configObject, stateObject) => {
52
+ Object.entries(configObject).forEach(([key, configValue]) => {
53
+ const stateValue = stateObject[key];
54
+ if (Array.isArray(configValue) && Array.isArray(stateValue)) {
55
+ const userDefinedItems = stateValue.filter((item) => {
56
+ return isAdaptableObject_1.isAdaptableObject(item) && item.Source !== 'Config';
57
+ });
58
+ configObject[key] = configValue.concat(userDefinedItems);
59
+ // we probably don't need to call traverseStateObject on the array as well,
60
+ // so we do the traversing on the else branch only
61
+ }
62
+ else {
63
+ if (configValue !== null &&
64
+ typeof configValue === 'object' &&
65
+ typeof stateValue === 'object') {
66
+ traverseStateObject(configValue, stateValue);
67
+ }
68
+ }
69
+ });
70
+ };
71
+ traverseStateObject(configState, currentUserState);
72
+ return configState;
73
+ }
74
+ exports.ProcessKeepUserDefinedRevision = ProcessKeepUserDefinedRevision;
75
+ function deepClone(obj) {
76
+ return JSON.parse(JSON.stringify(obj));
77
+ }
50
78
  function MergeStateFunction(oldState, newState) {
51
79
  // return MergeState(oldState, newState);
52
80
  var _a, _b, _c;
@@ -66,14 +94,22 @@ function MergeStateFunction(oldState, newState) {
66
94
  for (const configModuleName in config) {
67
95
  state[configModuleName] = (_a = state[configModuleName]) !== null && _a !== void 0 ? _a : config[configModuleName];
68
96
  }
69
- // any Module in state that has an older revision then the config will be replaced
97
+ // any Module in state that has an older revision than the config will be replaced
70
98
  for (const stateModuleName in state) {
71
99
  if (config[stateModuleName] != undefined) {
72
100
  // explicitly use double equals, as we want to avoid null as well
73
101
  const stateRevision = (_b = state[stateModuleName].Revision) !== null && _b !== void 0 ? _b : 0;
74
102
  const configRevision = (_c = config[stateModuleName].Revision) !== null && _c !== void 0 ? _c : 0;
75
- if (configRevision > stateRevision) {
76
- state[stateModuleName] = config[stateModuleName];
103
+ const stateRevisionKey = typeof stateRevision === 'object' ? stateRevision.Key : stateRevision;
104
+ const configRevisionBehavior = typeof configRevision === 'object' ? configRevision.Behavior : 'Override';
105
+ const configRevisionKey = typeof configRevision === 'object' ? configRevision.Key : configRevision;
106
+ if (configRevisionKey > stateRevisionKey) {
107
+ if (configRevisionBehavior === 'Override') {
108
+ state[stateModuleName] = config[stateModuleName];
109
+ }
110
+ else {
111
+ state[stateModuleName] = ProcessKeepUserDefinedRevision(deepClone(config[stateModuleName]), state[stateModuleName]);
112
+ }
77
113
  }
78
114
  }
79
115
  }
@@ -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,7 +323,7 @@ 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;
326
+ const { flashingCell: FlashingCell } = action;
323
327
  const { dataChangedInfo } = FlashingCell;
324
328
  let ret = next(action);
325
329
  if (dataChangedInfo) {
@@ -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.dataChangedInfo) {
391
+ const rowNode = adaptableAlert.dataChangedInfo.rowNode;
392
+ adaptable.refreshCells([rowNode], [adaptableAlert.dataChangedInfo.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) {
411
+ if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
412
+ AdaptableAlert_1.isAdaptableCellChangedAlert(alert) &&
413
+ alert.dataChangedInfo) {
406
414
  let rowNode = alert.dataChangedInfo.rowNode;
407
415
  adaptable.refreshCells([rowNode], [alert.dataChangedInfo.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.dataChangedInfo) {
436
+ const rowNode = adaptableAlert.dataChangedInfo.rowNode;
437
+ adaptable.refreshCells([rowNode], [adaptableAlert.dataChangedInfo.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'),
@@ -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[];