@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
@@ -10,8 +10,8 @@ import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellI
10
10
  import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
11
11
  import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
12
12
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
13
- import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
14
- import { AdaptableOptions, AdaptableState, AlertButtonContext, Layout, SystemStatusMessageInfo } from '../../types';
13
+ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
14
+ import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, Layout, SystemStatusMessageInfo } from '../../types';
15
15
  import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
16
16
  import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
17
17
  import { IReportService } from '../../Utilities/Services/Interface/IReportService';
@@ -23,12 +23,13 @@ import { IEntitlementService } from '../../Utilities/Services/Interface/IEntitle
23
23
  import { IQueryLanguageService } from '../../Utilities/Services/Interface/IQueryLanguageService';
24
24
  import { IAlertService } from '../../Utilities/Services/Interface/IAlertService';
25
25
  import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
26
+ import { RowNode } from '@ag-grid-community/all-modules';
26
27
  import { ITeamSharingService } from '../../Utilities/Services/Interface/ITeamSharingService';
27
28
  import { ColumnValuesComparer } from '../../AdaptableOptions/GeneralOptions';
28
29
  import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
29
30
  import { AdaptableButton, ButtonContext } from '../../PredefinedConfig/Common/AdaptableButton';
30
31
  import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
31
- import { AlertButtonForm } from '../../PredefinedConfig/AlertState';
32
+ import { AlertButtonForm, AlertDefinition } from '../../PredefinedConfig/AlertState';
32
33
  import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
33
34
  import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFrameworkComponent';
34
35
  import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
@@ -40,6 +41,12 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
40
41
  })[];
41
42
  }) | undefined;
42
43
  getAdaptableAlerts(): AdaptableAlert[];
44
+ getAdaptableCellChangedAlerts(): AdaptableCellChangedAlert[];
45
+ getAdaptableRowChangedAlerts(): AdaptableRowChangedAlert[];
46
+ getAdaptableAlertWithHighlightCell(columnId: string, rowNode: RowNode): AdaptableAlert | undefined;
47
+ getAdaptableAlertWithHighlightRow(rowNode: RowNode): AdaptableAlert | undefined;
48
+ isAlertDefinitionForAddedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
49
+ isAlertDefinitionForRemovedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
43
50
  getAdaptableFlashingCellFor(primaryKey: string, columnId?: string): AdaptableFlashingCell | null;
44
51
  addSystemStatusMessageInfo(systemStatusMessageInfo: SystemStatusMessageInfo): void;
45
52
  getSystemStatusMessageInfos(): SystemStatusMessageInfo[];
@@ -68,7 +75,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
68
75
  setGridCells(gridCells: GridCell[]): void;
69
76
  setToolbarTitle(): string;
70
77
  setGridCell(gridCell: GridCell): void;
71
- buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): DataChangedInfo;
78
+ buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
72
79
  private createDataChangedInfoFromGridCell;
73
80
  setLastAppliedShortCut(gridCell: GridCell | undefined): void;
74
81
  updateCurrentDraftLayout(layout: Layout): void;
@@ -14,6 +14,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exte
14
14
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
15
15
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
16
16
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
17
+ const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert");
17
18
  const waitForCondition_1 = require("../../Utilities/waitForCondition");
18
19
  class InternalApiImpl extends ApiBase_1.ApiBase {
19
20
  getSystemState() {
@@ -60,7 +61,42 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
60
61
  return adaptableAlertForm;
61
62
  }
62
63
  getAdaptableAlerts() {
63
- return this.getSystemState().AdaptableAlerts;
64
+ var _a;
65
+ return (_a = this.getSystemState().AdaptableAlerts) !== null && _a !== void 0 ? _a : [];
66
+ }
67
+ getAdaptableCellChangedAlerts() {
68
+ return this.getAdaptableAlerts().filter(AdaptableAlert_1.isAdaptableCellChangedAlert);
69
+ }
70
+ getAdaptableRowChangedAlerts() {
71
+ return this.getAdaptableAlerts().filter(AdaptableAlert_1.isAdaptableRowChangedAlert);
72
+ }
73
+ getAdaptableAlertWithHighlightCell(columnId, rowNode) {
74
+ // only alerts triggered by cell changes are relevant for HighlightCell actions
75
+ return this.getAdaptableCellChangedAlerts().find((alert) => {
76
+ var _a, _b, _c, _d;
77
+ return ((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
78
+ ((_c = (_b = alert.cellDataChangedInfo) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c.columnId) === columnId &&
79
+ ((_d = alert.cellDataChangedInfo) === null || _d === void 0 ? void 0 : _d.rowNode) === rowNode;
80
+ });
81
+ }
82
+ getAdaptableAlertWithHighlightRow(rowNode) {
83
+ // only alerts triggered by row changes are relevant for HighlightRow actions
84
+ return this.getAdaptableRowChangedAlerts().find((alert) => {
85
+ var _a;
86
+ if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightRow) && alert.gridDataChangedInfo) {
87
+ return alert.gridDataChangedInfo.rowNodes.map((rowNode) => rowNode.id).includes(rowNode.id);
88
+ }
89
+ });
90
+ }
91
+ isAlertDefinitionForAddedRowChangeEvent(alertDefinition) {
92
+ var _a, _b;
93
+ const addedRowPredicate = 'AddedRow';
94
+ return ((_b = (_a = alertDefinition === null || alertDefinition === void 0 ? void 0 : alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) === null || _b === void 0 ? void 0 : _b.PredicateId) === addedRowPredicate;
95
+ }
96
+ isAlertDefinitionForRemovedRowChangeEvent(alertDefinition) {
97
+ var _a, _b;
98
+ const removedRowPredicate = 'RemovedRow';
99
+ return ((_b = (_a = alertDefinition === null || alertDefinition === void 0 ? void 0 : alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) === null || _b === void 0 ? void 0 : _b.PredicateId) === removedRowPredicate;
64
100
  }
65
101
  getAdaptableFlashingCellFor(primaryKey, columnId) {
66
102
  var _a;
@@ -161,8 +197,8 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
161
197
  return toolbarTitle;
162
198
  }
163
199
  setGridCell(gridCell) {
164
- const dataChangedInfo = this.createDataChangedInfoFromGridCell(gridCell);
165
- this.adaptable.setValue(dataChangedInfo);
200
+ const cellDataChangedInfo = this.createDataChangedInfoFromGridCell(gridCell);
201
+ this.adaptable.setValue(cellDataChangedInfo);
166
202
  }
167
203
  buildDataChangedInfo(config) {
168
204
  var _a;
@@ -171,14 +207,14 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
171
207
  createDataChangedInfoFromGridCell(gridCell) {
172
208
  let currentValue = this.adaptable.getDisplayValue(gridCell.primaryKeyValue, gridCell.column.columnId);
173
209
  const currentRowNode = this.adaptable.getRowNodeForPrimaryKey(gridCell.primaryKeyValue);
174
- const dataChangedInfo = this.buildDataChangedInfo({
210
+ const cellDataChangedInfo = this.buildDataChangedInfo({
175
211
  oldValue: currentValue,
176
212
  newValue: gridCell.rawValue,
177
213
  column: gridCell.column,
178
214
  primaryKeyValue: gridCell.primaryKeyValue,
179
215
  rowNode: currentRowNode,
180
216
  });
181
- return dataChangedInfo;
217
+ return cellDataChangedInfo;
182
218
  }
183
219
  setLastAppliedShortCut(gridCell) {
184
220
  this.dispatchAction(SystemRedux.SetLastAppliedShortcut(gridCell));
@@ -32,10 +32,11 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
32
32
  createDefaultLayoutIfNeeded(): Layout | null;
33
33
  showChangeColumnCaption(column: AdaptableColumn): void;
34
34
  showLayoutPopup(): void;
35
- showLayoutEditor(): void;
35
+ showLayoutEditor(layoutName?: string, action?: string): void;
36
36
  isCurrentLayoutReadOnly(): boolean;
37
37
  deleteLayout(layout: Layout): void;
38
38
  deleteLayoutByName(layoutName: string): void;
39
39
  isDefaultLayout(layout: Layout): boolean;
40
40
  isCurrentLayoutDefault(): boolean;
41
+ areExpandedRowGroupsSavedInLayouts(): boolean;
41
42
  }
@@ -17,6 +17,7 @@ const Enums_1 = require("../../PredefinedConfig/Common/Enums");
17
17
  const ArrayExtensions_1 = require("../../Utilities/Extensions/ArrayExtensions");
18
18
  const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
19
19
  const LayoutRedux_1 = require("../../Redux/ActionsReducers/LayoutRedux");
20
+ const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windowFactory");
20
21
  class LayoutApiImpl extends ApiBase_1.ApiBase {
21
22
  constructor() {
22
23
  super(...arguments);
@@ -249,10 +250,20 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
249
250
  showLayoutPopup() {
250
251
  this.showModulePopup(ModuleConstants.LayoutModuleId);
251
252
  }
252
- showLayoutEditor() {
253
- this.dispatchAction(PopupRedux.PopupShowScreen(ModuleConstants.LayoutModuleId, 'LayoutPopup', {
254
- action: 'Edit',
255
- source: 'Other',
253
+ showLayoutEditor(layoutName, action = 'Edit') {
254
+ const layout = layoutName ? this.getLayoutByName(layoutName) : this.getCurrentLayout();
255
+ let preparedAction = action;
256
+ if (!['Edit', 'New', 'Clone'].includes(action)) {
257
+ preparedAction = 'Edit';
258
+ LoggingHelper_1.LogAdaptableError(`When opening the layout editor the action must be one of: New, Clone, Edit; given: ${action}`);
259
+ }
260
+ this.dispatchAction(PopupRedux.PopupShowWindow({
261
+ Id: windowFactory_1.WINDOW_LAYOUT_EDITOR,
262
+ Title: `Edit Layout: ${layout.Name}`,
263
+ PopupProps: {
264
+ action: preparedAction,
265
+ layout,
266
+ },
256
267
  }));
257
268
  }
258
269
  isCurrentLayoutReadOnly() {
@@ -288,5 +299,9 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
288
299
  isCurrentLayoutDefault() {
289
300
  return this.isDefaultLayout(this.getCurrentLayout());
290
301
  }
302
+ areExpandedRowGroupsSavedInLayouts() {
303
+ return (this.getLayoutOptions().includeExpandedRowGroups ||
304
+ this.getLayoutOptions().displayRowGroups === 'dynamic');
305
+ }
291
306
  }
292
307
  exports.LayoutApiImpl = LayoutApiImpl;
@@ -167,6 +167,7 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
167
167
  const reminderSchedule = schedule;
168
168
  // const reminder: Reminder = reminderSchedule.Reminder;
169
169
  const alert = {
170
+ alertType: 'generic',
170
171
  header: reminderSchedule.Header,
171
172
  message: reminderSchedule.Message,
172
173
  alertDefinition: {
@@ -4,9 +4,15 @@ exports.SettingsPanelApiImpl = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const ApiBase_1 = require("./ApiBase");
6
6
  const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
7
+ const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
7
8
  class SettingsPanelApiImpl extends ApiBase_1.ApiBase {
8
9
  showSettingsPanel(moduleName) {
9
- this.dispatchAction(PopupRedux.PopupShowScreen(moduleName));
10
+ const moduleInfo = this.adaptable.ModuleService.getModuleInfoByModule(moduleName);
11
+ if (!moduleInfo) {
12
+ LoggingHelper_1.LogAdaptableError(`${moduleName} module does not exist`);
13
+ return;
14
+ }
15
+ this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo.Popup));
10
16
  }
11
17
  showCustomSettingsPanel(name) {
12
18
  this.dispatchAction(PopupRedux.PopupShowScreen(null, name));
@@ -15,9 +15,9 @@ import { IReportService } from '../Utilities/Services/Interface/IReportService';
15
15
  import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService';
16
16
  import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
17
17
  import { Layout } from '../PredefinedConfig/LayoutState';
18
- import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
18
+ import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
19
19
  import { IDataService } from '../Utilities/Services/Interface/IDataService';
20
- import { AdaptableMessageType, DataChangedInfo, SystemStatusMessageInfo } from '../types';
20
+ import { AdaptableMessageType, AlertDefinition, CellDataChangedInfo, SystemStatusMessageInfo } from '../types';
21
21
  import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
22
22
  import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
23
23
  import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
@@ -31,6 +31,7 @@ import { AdaptableForm } from '../PredefinedConfig/Common/AdaptableForm';
31
31
  import { AlertButtonForm } from '../PredefinedConfig/AlertState';
32
32
  import { AdaptableFrameworkComponent } from '../AdaptableOptions/AdaptableFrameworkComponent';
33
33
  import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelService';
34
+ import { RowNode } from '@ag-grid-community/all-modules';
34
35
  /**
35
36
  * This set of api methods is designed for **internal use of Adaptable** only.
36
37
  *
@@ -44,6 +45,12 @@ export interface InternalApi {
44
45
  })[];
45
46
  };
46
47
  getAdaptableAlerts(): AdaptableAlert[];
48
+ getAdaptableCellChangedAlerts(): AdaptableCellChangedAlert[];
49
+ getAdaptableRowChangedAlerts(): AdaptableRowChangedAlert[];
50
+ getAdaptableAlertWithHighlightCell(columnId: string, rowNode: RowNode): AdaptableAlert | undefined;
51
+ getAdaptableAlertWithHighlightRow(rowNode: RowNode): AdaptableAlert | undefined;
52
+ isAlertDefinitionForAddedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
53
+ isAlertDefinitionForRemovedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
47
54
  showPopupConfirmation(confirmation: UIConfirmation): void;
48
55
  getAdaptableFlashingCellFor(primaryKey: string, columnId?: string): AdaptableFlashingCell | null;
49
56
  addSystemStatusMessageInfo(systemStatusMessageInfo: SystemStatusMessageInfo): void;
@@ -73,7 +80,7 @@ export interface InternalApi {
73
80
  setGridCell(gridCell: GridCell): void;
74
81
  setToolbarTitle(): string;
75
82
  getQueryPreviewData(): any;
76
- buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): DataChangedInfo;
83
+ buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
77
84
  setLastAppliedShortCut(gridCell: GridCell | undefined): void;
78
85
  updateCurrentDraftLayout(layout: Layout): void;
79
86
  getPrimaryKey(): any;
@@ -124,13 +124,20 @@ export interface LayoutApi {
124
124
  */
125
125
  createDefaultLayoutIfNeeded(): Layout | null;
126
126
  /**
127
- * Opens Settings Panel with Layout section selected and visible
127
+ * Opens Settings Panel with Layout section selected
128
128
  */
129
129
  showLayoutPopup(): void;
130
130
  /**
131
- * Opens the Layout Editor for the current Layout
131
+ * Opens Layout Editor - for Current or a named Layout
132
+ *
133
+ * @param layoutName Name of Layout to be edited or cloned; if not specified, uses Current Layout
134
+ * @param action Whether to edit/clone, or create a new, Layout
135
+ */
136
+ showLayoutEditor(layoutName?: string,
137
+ /**
138
+ * @defaultValue 'Edit'
132
139
  */
133
- showLayoutEditor(): void;
140
+ action?: 'New' | 'Clone' | 'Edit'): void;
134
141
  /**
135
142
  * Sets a new Caption / Header for a Column (this Layout only)
136
143
  * @param columnId Column to Update
@@ -166,4 +173,8 @@ export interface LayoutApi {
166
173
  * Checks if the Current Layout is Default Layout
167
174
  */
168
175
  isCurrentLayoutDefault(): boolean;
176
+ /**
177
+ * Returns true if Layouts will contain Expanded Row Groups information
178
+ */
179
+ areExpandedRowGroupsSavedInLayouts(): boolean;
169
180
  }
@@ -65,7 +65,7 @@ export declare type AlertRule = XOR<{
65
65
  * Alert Query which may be either a Boolean, Observable or AggregatedBoolean Expression
66
66
  */
67
67
  export declare type AdaptableAlertQuery = XOR<AdaptableBooleanQuery, XOR<AdaptableObservableQuery, AdaptableAggregatedBooleanQuery>>;
68
- export declare type AdaptableAlertAction = 'highlight-cell' | 'jump-to-cell' | 'jump-to-row' | 'jump-to-column' | 'suspend' | 'undo';
68
+ export declare type AdaptableAlertAction = 'highlight-cell' | 'highlight-row' | 'jump-to-cell' | 'jump-to-row' | 'jump-to-column' | 'suspend' | 'undo';
69
69
  /**
70
70
  * Defines a button that appears in an Alert Form
71
71
  */
@@ -105,9 +105,13 @@ export interface AlertProperties {
105
105
  */
106
106
  HighlightRow?: boolean | AdaptableStyle;
107
107
  /**
108
- * Grid will 'jump' to the cell which triggered the Alert
108
+ * Grid will 'jump' to the changed cell which triggered the Alert
109
109
  */
110
110
  JumpToCell?: boolean;
111
+ /**
112
+ * Grid will 'jump' to the newly added row which triggered the Alert
113
+ */
114
+ JumpToRow?: boolean;
111
115
  /**
112
116
  * Shows Alert text in the div specificed in `alertContainer` property of Container Options
113
117
  */
@@ -122,4 +126,4 @@ export interface AlertProperties {
122
126
  */
123
127
  PreventEdit?: boolean;
124
128
  }
125
- export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'Any';
129
+ export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'AddedRow' | 'RemovedRow' | 'Any';
@@ -1,9 +1,40 @@
1
1
  import { AdaptableObject } from './AdaptableObject';
2
- import { AlertDefinition, DataChangedInfo } from '../../types';
2
+ import { CellDataChangedInfo } from './CellDataChangedInfo';
3
+ import { GridDataChangedInfo } from '../../Api/Events/GridDataChanged';
4
+ import { AlertDefinition } from '../AlertState';
3
5
  /**
4
6
  * Defines an Alert fired by AdapTable
5
7
  */
6
- export interface AdaptableAlert extends AdaptableObject {
8
+ export declare type AdaptableAlert = AdaptableCellChangedAlert | AdaptableRowChangedAlert | AdaptableGenericAlert;
9
+ export declare type AdaptableAlertType = 'generic' | 'cellChange' | 'rowChange';
10
+ export interface AdaptableGenericAlert extends AdaptableAlertBase<'generic'> {
11
+ }
12
+ /**
13
+ * Defines an Alert fired by AdapTable when a cell is changed
14
+ */
15
+ export interface AdaptableCellChangedAlert extends AdaptableAlertBase<'cellChanged'> {
16
+ /**
17
+ * Cell DataChange which triggered Alert
18
+ */
19
+ cellDataChangedInfo: CellDataChangedInfo;
20
+ }
21
+ /**
22
+ * Defines an Alert fired by AdapTable when a row is changed
23
+ */
24
+ export interface AdaptableRowChangedAlert extends AdaptableAlertBase<'rowChanged'> {
25
+ /**
26
+ * Row DataChange which triggered Alert
27
+ */
28
+ gridDataChangedInfo: GridDataChangedInfo;
29
+ }
30
+ /**
31
+ * Defines the base(common) properties of an Alert fired by AdapTable, regardless of the type of change
32
+ */
33
+ export interface AdaptableAlertBase<T> extends AdaptableObject {
34
+ /**
35
+ * The type of Alert
36
+ */
37
+ alertType: T;
7
38
  /**
8
39
  * Alert Header text
9
40
  */
@@ -16,8 +47,6 @@ export interface AdaptableAlert extends AdaptableObject {
16
47
  * Rule that caused Alert to fire
17
48
  */
18
49
  alertDefinition: AlertDefinition;
19
- /**
20
- * DataChange which triggered Alert
21
- */
22
- dataChangedInfo?: DataChangedInfo;
23
50
  }
51
+ export declare const isAdaptableCellChangedAlert: (alert: AdaptableAlert) => alert is AdaptableCellChangedAlert;
52
+ export declare const isAdaptableRowChangedAlert: (alert: AdaptableAlert) => alert is AdaptableRowChangedAlert;
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAdaptableRowChangedAlert = exports.isAdaptableCellChangedAlert = void 0;
4
+ exports.isAdaptableCellChangedAlert = (alert) => {
5
+ return alert.alertType === 'cellChanged';
6
+ };
7
+ exports.isAdaptableRowChangedAlert = (alert) => {
8
+ return alert.alertType === 'rowChanged';
9
+ };
@@ -1,5 +1,5 @@
1
1
  import { AdaptableObject } from './AdaptableObject';
2
- import { DataChangedInfo } from '../../types';
2
+ import { CellDataChangedInfo } from '../../types';
3
3
  import { FlashingCellDefinition } from '../../../types';
4
4
  /**
5
5
  * Defines an Alert fired by AdapTable
@@ -12,7 +12,7 @@ export interface AdaptableFlashingCell extends AdaptableObject {
12
12
  /**
13
13
  * Data change which triggered the FlashingCell
14
14
  */
15
- dataChangedInfo?: DataChangedInfo;
15
+ cellDataChangedInfo?: CellDataChangedInfo;
16
16
  /**
17
17
  * Direction of the change: 'up', 'down' or 'neutral'
18
18
  */
@@ -495,5 +495,25 @@ exports.SystemPredicateDefs = [
495
495
  return distinctValues.includes(value);
496
496
  },
497
497
  },
498
+ {
499
+ id: 'AddedRow',
500
+ label: 'Added Row(s)',
501
+ columnScope: { All: true },
502
+ moduleScope: ['alert'],
503
+ handler: () => {
504
+ // handled in AlertModule as an eventHandler
505
+ return false;
506
+ },
507
+ },
508
+ {
509
+ id: 'RemovedRow',
510
+ label: 'Removed Row(s)',
511
+ columnScope: { All: true },
512
+ moduleScope: ['alert'],
513
+ handler: () => {
514
+ // handled in AlertModule as an eventHandler
515
+ return false;
516
+ },
517
+ },
498
518
  ];
499
519
  exports.SystemFilterPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('filter')).map((p) => p.id);
@@ -3,9 +3,9 @@ import { AdaptableColumn } from './AdaptableColumn';
3
3
  /**
4
4
  * Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row
5
5
  */
6
- export interface DataChangedInfo {
6
+ export interface CellDataChangedInfo {
7
7
  /**
8
- * Timestamp of change occurence (in milliseconds)
8
+ * Timestamp of change occurrence (in milliseconds)
9
9
  */
10
10
  changedAt: number;
11
11
  /**
@@ -37,7 +37,3 @@ export interface DataChangedInfo {
37
37
  */
38
38
  trigger?: 'edit' | 'tick' | 'undo' | 'aggChange';
39
39
  }
40
- export interface DataChangedScope {
41
- wholeRow: boolean;
42
- columnIds: Set<string>;
43
- }
@@ -12,7 +12,7 @@ export interface CellHighlightInfo {
12
12
  */
13
13
  primaryKeyValue: any;
14
14
  /**
15
- * Time after which Cell should be unhilighted
15
+ * Time after which Cell should be unhighlighted
16
16
  */
17
17
  timeout?: number;
18
18
  /**
@@ -0,0 +1,4 @@
1
+ export interface DataChangedScope {
2
+ wholeRow: boolean;
3
+ columnIds: Set<string>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,11 +5,11 @@ export interface Entitlement {
5
5
  */
6
6
  adaptableModule: AdaptableModule;
7
7
  /**
8
- * Access Level for an Entitlement; options are: 'Full', ''ReadOnly', 'Hidden'
8
+ * Access Level for an Entitlement; options are: `Full` `ReadOnly` `Hidden`
9
9
  */
10
10
  accessLevel: AccessLevel;
11
11
  }
12
12
  /**
13
- * Defines Access Level for an Entitlement - can be 'ReadOnly', 'Hidden' or 'Full'
13
+ * Defines Access Level for an Entitlement - can be `ReadOnly`, `Hidden` or `Full`
14
14
  */
15
15
  export declare type AccessLevel = 'ReadOnly' | 'Hidden' | 'Full';
@@ -68,6 +68,9 @@ export interface UserMenuItem<CONTEXT_TYPE extends BaseMenuContext> {
68
68
  */
69
69
  subMenuItems?: UserMenuItem<CONTEXT_TYPE>[];
70
70
  }
71
+ /**
72
+ * Base Context object used for both Column and Context Menu Context
73
+ */
71
74
  export interface BaseMenuContext {
72
75
  /**
73
76
  * The Adaptable Api - included as a convenience
@@ -0,0 +1,15 @@
1
+ import { AdaptableStyle } from '../../../types';
2
+ export interface RowsHighlightInfo {
3
+ /**
4
+ * Primary key valuse for the rows to be highlighted
5
+ */
6
+ primaryKeyValues: any[];
7
+ /**
8
+ * Timeout after which the highlight is removed
9
+ */
10
+ timeout?: number;
11
+ /**
12
+ * Highlight style
13
+ */
14
+ highlightStyle: AdaptableStyle;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,5 +5,8 @@ export interface ConfigState {
5
5
  /**
6
6
  * Version number of the Item - allows developers to update one section in Predefined Config while keeping others unchanged
7
7
  */
8
- Revision?: number;
8
+ Revision?: number | {
9
+ Key: number;
10
+ UpdateStrategy: 'Override' | 'KeepUserDefined';
11
+ };
9
12
  }
@@ -41,7 +41,7 @@ export interface Layout extends AdaptableObject {
41
41
  */
42
42
  RowGroupedColumns?: string[];
43
43
  /**
44
- * Values of opened row groups
44
+ * Opened Row Groups - set if `displayRowGroups` in LayoutOptions is 'dynamic'
45
45
  */
46
46
  ExpandedRowGroupValues?: any[];
47
47
  /**
@@ -1,10 +1,11 @@
1
- import { ScreenPopup, AlertPopup, ConfirmationPopup, PromptPopup, LoadingPopup } from '../Utilities/Interface/MessagePopups';
1
+ import { ScreenPopup, AlertPopup, ConfirmationPopup, PromptPopup, LoadingPopup, WindowPopup } from '../Utilities/Interface/MessagePopups';
2
2
  import { InternalState } from './InternalState';
3
3
  /**
4
4
  * Internal state to manage open popups - NOT persisted by Redux
5
5
  */
6
6
  export interface PopupState extends InternalState {
7
7
  ScreenPopup: ScreenPopup;
8
+ WindowPopup: WindowPopup;
8
9
  AlertPopup: AlertPopup;
9
10
  ConfirmationPopup: ConfirmationPopup;
10
11
  PromptPopup: PromptPopup;
@@ -1,7 +1,7 @@
1
1
  import { PreviewInfo } from '../Utilities/Interface/Preview';
2
2
  import { InternalState } from './InternalState';
3
3
  import { BulkUpdateValidationResult } from '../Strategy/Interface/IBulkUpdateModule';
4
- import { DataChangedInfo, GridCell } from '../types';
4
+ import { CellDataChangedInfo, GridCell } from '../types';
5
5
  import type { IPushPullState, IPushPullReport, IPushPullDomain } from './IPushPullState';
6
6
  import { Glue42State, Glue42Report } from './Glue42State';
7
7
  import { OpenFinState, OpenFinReport } from './OpenFinState';
@@ -54,7 +54,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
54
54
  disablePersistence: boolean;
55
55
  };
56
56
  DataChangeHistory: {
57
- logs: Record<string, DataChangedInfo>;
57
+ logs: Record<string, CellDataChangedInfo>;
58
58
  currentMode: DataChangeHistoryMode;
59
59
  enableTime: Date;
60
60
  suspendTime: Date;
@@ -64,28 +64,24 @@ exports.FlashingCellReducer = (state = initialState, action) => {
64
64
  let flashingCellDefinitions;
65
65
  switch (action.type) {
66
66
  case exports.FLASHING_CELL_DEFINITION_SET: {
67
- const actionFlashingCellDefinition = action
68
- .flashingCellDefinitions;
67
+ const actionFlashingCellDefinition = action.flashingCellDefinitions;
69
68
  return Object.assign(Object.assign({}, state), { FlashingCellDefinitions: actionFlashingCellDefinition });
70
69
  }
71
70
  case exports.FLASHING_CELL_DEFINITION_ADD: {
72
- const actionFlashingCellDefinition = action
73
- .flashingCellDefinition;
71
+ const actionFlashingCellDefinition = action.flashingCellDefinition;
74
72
  AdaptableHelper_1.default.addUuidAndSource(actionFlashingCellDefinition);
75
73
  flashingCellDefinitions = [].concat(state.FlashingCellDefinitions);
76
74
  flashingCellDefinitions.push(actionFlashingCellDefinition);
77
75
  return Object.assign(Object.assign({}, state), { FlashingCellDefinitions: flashingCellDefinitions });
78
76
  }
79
77
  case exports.FLASHING_CELL_DEFINITION_EDIT: {
80
- const actionFlashingCellDefinition = action
81
- .flashingCellDefinition;
78
+ const actionFlashingCellDefinition = action.flashingCellDefinition;
82
79
  return Object.assign(Object.assign({}, state), { FlashingCellDefinitions: state.FlashingCellDefinitions.map((abObject) => abObject.Uuid === actionFlashingCellDefinition.Uuid
83
80
  ? actionFlashingCellDefinition
84
81
  : abObject) });
85
82
  }
86
83
  case exports.FLASHING_CELL_DEFINITION_DELETE: {
87
- const actionFlashingCellDefinition = action
88
- .flashingCellDefinition;
84
+ const actionFlashingCellDefinition = action.flashingCellDefinition;
89
85
  return Object.assign(Object.assign({}, state), { FlashingCellDefinitions: state.FlashingCellDefinitions.filter((abObject) => abObject.Uuid !== actionFlashingCellDefinition.Uuid) });
90
86
  }
91
87
  case exports.FLASHING_CELL_DEFINITION_SUSPEND: {