@adaptabletools/adaptable 11.1.3 → 11.1.6

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 (125) hide show
  1. package/bundle.cjs.js +139 -139
  2. package/package.json +3 -3
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
  6. package/src/AdaptableOptions/AdaptableOptions.d.ts +49 -49
  7. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/EditOptions.d.ts +4 -0
  9. package/src/AdaptableOptions/FinancePluginOptions.d.ts +139 -9
  10. package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +3 -3
  11. package/src/AdaptableOptions/SmartEdit.d.ts +34 -0
  12. package/src/AdaptableOptions/SmartEdit.js +2 -0
  13. package/src/Api/AdaptableApi.d.ts +4 -1
  14. package/src/Api/EventApi.d.ts +1 -1
  15. package/src/Api/Implementation/ColumnApiImpl.js +5 -2
  16. package/src/Api/Implementation/FilterApiImpl.js +8 -2
  17. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
  18. package/src/Api/Implementation/FormatColumnApiImpl.js +11 -7
  19. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  20. package/src/Api/Implementation/GridApiImpl.js +6 -8
  21. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
  22. package/src/Api/Implementation/InternalApiImpl.js +9 -0
  23. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  24. package/src/Api/Implementation/ScopeApiImpl.js +12 -0
  25. package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
  26. package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
  27. package/src/Api/Implementation/ThemeApiImpl.js +3 -0
  28. package/src/Api/InternalApi.d.ts +4 -0
  29. package/src/Api/ScopeApi.d.ts +10 -0
  30. package/src/Api/SmartEditApi.d.ts +3 -2
  31. package/src/Api/ThemeApi.d.ts +4 -0
  32. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +8 -0
  33. package/src/PredefinedConfig/Common/FDC3Context.d.ts +144 -3
  34. package/src/PredefinedConfig/Common/Menu.d.ts +4 -0
  35. package/src/PredefinedConfig/ExportState.d.ts +0 -5
  36. package/src/PredefinedConfig/PopupState.d.ts +2 -1
  37. package/src/PredefinedConfig/SystemState.d.ts +2 -5
  38. package/src/Redux/ActionsReducers/PopupRedux.d.ts +22 -3
  39. package/src/Redux/ActionsReducers/PopupRedux.js +42 -8
  40. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -23
  41. package/src/Redux/ActionsReducers/SystemRedux.js +3 -32
  42. package/src/Redux/Store/AdaptableStore.js +11 -1
  43. package/src/Strategy/AlertModule.js +5 -4
  44. package/src/Strategy/CalculatedColumnModule.js +1 -1
  45. package/src/Strategy/ExportModule.js +14 -4
  46. package/src/Strategy/SmartEditModule.d.ts +2 -2
  47. package/src/Strategy/SmartEditModule.js +24 -13
  48. package/src/Strategy/Utilities/getExportColumnsViewItems.js +1 -1
  49. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  50. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
  51. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  52. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
  53. package/src/Utilities/Helpers/FormatHelper.js +6 -0
  54. package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
  55. package/src/Utilities/Services/AlertService.d.ts +3 -3
  56. package/src/Utilities/Services/AlertService.js +6 -6
  57. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +3 -3
  58. package/src/Utilities/Services/CalculatedColumnExpressionService.js +20 -20
  59. package/src/Utilities/Services/EntitlementService.d.ts +3 -3
  60. package/src/Utilities/Services/EntitlementService.js +12 -8
  61. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
  62. package/src/Utilities/Services/MetamodelService.d.ts +3 -3
  63. package/src/Utilities/Services/MetamodelService.js +4 -4
  64. package/src/Utilities/Services/ModuleService.d.ts +3 -3
  65. package/src/Utilities/Services/ModuleService.js +12 -12
  66. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  67. package/src/Utilities/Services/QueryLanguageService.js +20 -19
  68. package/src/Utilities/Services/ReportService.d.ts +4 -4
  69. package/src/Utilities/Services/ReportService.js +50 -44
  70. package/src/Utilities/Services/TeamSharingService.d.ts +3 -3
  71. package/src/Utilities/Services/TeamSharingService.js +19 -16
  72. package/src/Utilities/Services/ValidationService.d.ts +3 -3
  73. package/src/Utilities/Services/ValidationService.js +19 -17
  74. package/src/View/AdaptableView.js +2 -2
  75. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +46 -9
  76. package/src/View/Alert/Wizard/AlertWizard.js +22 -24
  77. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +5 -5
  78. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -3
  79. package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +10 -0
  80. package/src/View/Components/Popups/FormPopups/FormPopups.js +37 -0
  81. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +1 -1
  82. package/src/View/Components/Selectors/ColumnSelector.js +1 -1
  83. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -3
  84. package/src/View/DataSource/DataSourceViewPanel.d.ts +3 -3
  85. package/src/View/DataSource/DataSourceViewPanel.js +15 -13
  86. package/src/View/Export/ExportViewPanel.d.ts +1 -3
  87. package/src/View/Export/ExportViewPanel.js +1 -17
  88. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -1
  89. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
  90. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +15 -2
  91. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +2 -1
  92. package/src/View/GridInfo/AdaptableObjectsSummary.js +1 -1
  93. package/src/View/SmartEdit/SmartEditPopup.d.ts +3 -3
  94. package/src/View/SmartEdit/SmartEditPopup.js +15 -3
  95. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +3 -4
  96. package/src/View/SmartEdit/SmartEditViewPanel.js +15 -6
  97. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  98. package/src/agGrid/Adaptable.d.ts +4 -4
  99. package/src/agGrid/Adaptable.js +37 -27
  100. package/src/agGrid/agGridMenuHelper.js +1 -0
  101. package/src/components/StylePreview.js +2 -2
  102. package/src/components/icons/analysis.d.ts +3 -0
  103. package/src/components/icons/analysis.js +8 -0
  104. package/src/components/icons/call.d.ts +3 -0
  105. package/src/components/icons/call.js +7 -0
  106. package/src/components/icons/chat.d.ts +3 -0
  107. package/src/components/icons/chat.js +8 -0
  108. package/src/components/icons/index.js +14 -0
  109. package/src/components/icons/instrument.d.ts +3 -0
  110. package/src/components/icons/instrument.js +8 -0
  111. package/src/components/icons/news.d.ts +3 -0
  112. package/src/components/icons/news.js +8 -0
  113. package/src/components/icons/person.d.ts +3 -0
  114. package/src/components/icons/person.js +7 -0
  115. package/src/components/icons/quote.d.ts +3 -0
  116. package/src/components/icons/quote.js +7 -0
  117. package/src/metamodel/adaptable.metamodel.d.ts +112 -5
  118. package/src/metamodel/adaptable.metamodel.js +219 -22
  119. package/src/types.d.ts +2 -2
  120. package/version.d.ts +1 -1
  121. package/version.js +1 -1
  122. package/src/View/Export/ExportCustomDestinationDialog.d.ts +0 -11
  123. package/src/View/Export/ExportCustomDestinationDialog.js +0 -47
  124. package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +0 -5
  125. package/src/View/Export/ExportCustomDestinationFormPopups.js +0 -15
@@ -1,7 +1,8 @@
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.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;
3
+ exports.SystemReducer = exports.SystemSettingsPanelSet = 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_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
+ const Enums_1 = require("../../PredefinedConfig/Common/Enums");
5
6
  const Helper_1 = require("../../Utilities/Helpers/Helper");
6
7
  /*
7
8
  Bit of a mixed bag of actions but essentially its those that are related to Strategies but where we DONT want to persist state
@@ -52,14 +53,6 @@ exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = 'SYSTEM_SET_LAST_APPLIED_SHORTCUT';
52
53
  exports.SYSTEM_CACHED_QUERY_ADD = 'SYSTEM_CACHED_QUERY_ADD';
53
54
  // Cell Summary
54
55
  exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = 'SYSTEM_CELL_SUMMARY_CHANGE_OPERATION';
55
- /**
56
- * @ReduxAction A report Destination pop-up from is opened
57
- */
58
- exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW = 'SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW';
59
- /**
60
- * @ReduxAction A report Destination pop-up form is closed
61
- */
62
- exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = 'SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE';
63
56
  // Progress Indicator
64
57
  exports.SYSTEM_PROGRESS_INDICATOR_SHOW = 'SYSTEM_PROGRESS_INDICATOR_SHOW';
65
58
  exports.SYSTEM_PROGRESS_INDICATOR_HIDE = 'SYSTEM_PROGRESS_INDICATOR_HIDE';
@@ -230,25 +223,13 @@ exports.SystemDataChangeHistorySuspend = () => ({
230
223
  exports.SystemDataChangeHistoryResume = () => ({
231
224
  type: exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME,
232
225
  });
233
- exports.SystemExportCustomDestinationPopupShow = (data) => ({
234
- type: exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW,
235
- data,
236
- });
237
- exports.SystemExportCustomDestinationPopupHide = (data) => ({
238
- type: exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE,
239
- data,
240
- });
241
226
  exports.SystemSettingsPanelSet = (name, settings) => ({
242
227
  type: exports.SYSTEM_SETTINGS_PANEL_SET,
243
228
  name,
244
229
  settings,
245
230
  });
246
- exports.getSystemExportCustomDestinationPopups = (state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.System.Export.CustomDestinationPopups) !== null && _a !== void 0 ? _a : []; };
247
231
  const initialState = {
248
232
  AdaptableAlerts: GeneralConstants_1.EMPTY_ARRAY,
249
- Export: {
250
- CustomDestinationPopups: GeneralConstants_1.EMPTY_ARRAY,
251
- },
252
233
  AdaptableFlashingCells: {},
253
234
  AdaptableFlashingCellsMap: {},
254
235
  SystemStatusMessages: GeneralConstants_1.EMPTY_ARRAY,
@@ -264,7 +245,7 @@ const initialState = {
264
245
  CachedQueries: GeneralConstants_1.EMPTY_ARRAY,
265
246
  BulkUpdateValue: GeneralConstants_1.EMPTY_STRING,
266
247
  SmartEditValue: 1,
267
- SmartEditOperation: 'Multiply',
248
+ SmartEditOperation: Enums_1.MathOperation.Multiply,
268
249
  CellSummaryOperation: GeneralConstants_1.CELL_SUMMARY_DEFAULT_OPERATION,
269
250
  ProgressIndicator: { active: false, label: '' },
270
251
  License: {
@@ -280,7 +261,6 @@ const initialState = {
280
261
  SettingsPanel: {},
281
262
  };
282
263
  exports.SystemReducer = (state = initialState, action) => {
283
- var _a;
284
264
  let alerts;
285
265
  let systemStatusMessages;
286
266
  switch (action.type) {
@@ -519,15 +499,6 @@ exports.SystemReducer = (state = initialState, action) => {
519
499
  case exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE: {
520
500
  return Object.assign(Object.assign({}, state), { License: Object.assign(Object.assign({}, state.License), { disablePersistence: true }) });
521
501
  }
522
- // this allows multiple export forms to be open at the same time
523
- // you may have scheduled multiple exports at the same time
524
- case exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW:
525
- return Object.assign(Object.assign({}, state), { Export: Object.assign(Object.assign({}, state.Export), { CustomDestinationPopups: [
526
- ...(state.Export.CustomDestinationPopups || []),
527
- action.data,
528
- ] }) });
529
- case exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE:
530
- return Object.assign(Object.assign({}, state), { Export: Object.assign(Object.assign({}, state.Export), { CustomDestinationPopups: (_a = state.Export.CustomDestinationPopups) === null || _a === void 0 ? void 0 : _a.filter((data) => data !== action.data) }) });
531
502
  case exports.SYSTEM_DATA_CHANGE_HISTORY_ADD: {
532
503
  const actionTypedAdd = action;
533
504
  const cellDataChangedInfo = actionTypedAdd.changeInfo;
@@ -201,6 +201,14 @@ class AdaptableStore {
201
201
  ConfigConstants.POPUP,
202
202
  ConfigConstants.PLUGINS,
203
203
  ];
204
+ const didPersistentStateChange = (state, newState) => {
205
+ return Object.keys(newState).some((key) => {
206
+ if (nonPersistentReduxKeys.includes(key)) {
207
+ return false;
208
+ }
209
+ return (state === null || state === void 0 ? void 0 : state[key]) !== (newState === null || newState === void 0 ? void 0 : newState[key]);
210
+ });
211
+ };
204
212
  // this is now VERY BADLY NAMED!
205
213
  let rootReducer = AdaptableReduxMerger_1.mergeReducer(rootReducerWithResetManagement, exports.LOAD_STATE);
206
214
  const composeEnhancers = (x) => x;
@@ -214,7 +222,9 @@ class AdaptableStore {
214
222
  const emitterArg = { action, state, newState };
215
223
  this.emitter.emit(action.type, emitterArg);
216
224
  const finalState = emitterArg.newState;
217
- const shouldPersist = !((_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.License) === null || _b === void 0 ? void 0 : _b.disablePersistence) &&
225
+ const shouldPersist = state !== finalState &&
226
+ didPersistentStateChange(state, finalState) &&
227
+ !((_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.License) === null || _b === void 0 ? void 0 : _b.disablePersistence) &&
218
228
  !NON_PERSIST_ACTIONS[action.type] &&
219
229
  !init &&
220
230
  !this.loadStorageInProgress;
@@ -141,10 +141,13 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
141
141
  const numberOfChangedRows = gridDataChangedInfo.rowNodes.length;
142
142
  const actionName = rowAdded ? 'Added' : 'Removed';
143
143
  const alertHeader = numberOfChangedRows > 1 ? `${actionName} Rows` : `${actionName} Row `;
144
- const alertMessage = numberOfChangedRows > 1
144
+ const dynamicAlertMessage = numberOfChangedRows > 1
145
145
  ? `${numberOfChangedRows} rows were ${actionName.toLowerCase()}`
146
146
  : `${numberOfChangedRows} row was ${actionName.toLowerCase()}`;
147
147
  alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.forEach((alertDefinition) => {
148
+ const alertMessage = alertDefinition.MessageText
149
+ ? alertDefinition.MessageText
150
+ : dynamicAlertMessage;
148
151
  const alert = ObjectFactory_1.default.CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, gridDataChangedInfo);
149
152
  this.api.alertApi.displayAlert(alert);
150
153
  });
@@ -153,9 +156,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
153
156
  var _a;
154
157
  // the row node data is most probably stale because the reactive queries buffer the changed data
155
158
  // so we have to refresh it
156
- reactiveAlertInfo.dataChangeLogEntry.rowNode = this.api.internalApi
157
- .getAdaptableInstance()
158
- .getRowNodeForPrimaryKey(reactiveAlertInfo.dataChangeLogEntry.primaryKeyValue);
159
+ reactiveAlertInfo.dataChangeLogEntry.rowNode = this.api.gridApi.getRowNodeForPrimaryKey(reactiveAlertInfo.dataChangeLogEntry.primaryKeyValue);
159
160
  reactiveAlertInfo.dataChangeLogEntry.rowData = (_a = reactiveAlertInfo.dataChangeLogEntry.rowNode) === null || _a === void 0 ? void 0 : _a.data;
160
161
  if (reactiveAlertInfo.type === 'alert') {
161
162
  this.showAlertForDefinitions(reactiveAlertInfo.dataChangeLogEntry, [
@@ -77,7 +77,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
77
77
  values: [calculateColumn.FriendlyName],
78
78
  },
79
79
  getExpressionViewItems_1.getExpressionViewItems(calculateColumn.Query),
80
- ];
80
+ ].filter(Boolean);
81
81
  if (ArrayExtensions_1.default.IsNotNullOrEmpty(settingsTags)) {
82
82
  items.push({
83
83
  name: 'Settings',
@@ -7,7 +7,6 @@ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/Mod
7
7
  const Enums_1 = require("../PredefinedConfig/Common/Enums");
8
8
  const Helper_1 = require("../Utilities/Helpers/Helper");
9
9
  const ExportRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/ExportRedux"));
10
- const SystemRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/SystemRedux"));
11
10
  const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
12
11
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
13
12
  const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
@@ -89,9 +88,20 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
89
88
  .getAdaptableOptions()
90
89
  .exportOptions.customDestinations) === null || _a === void 0 ? void 0 : _a.find((cd) => cd.name == exportDestination);
91
90
  if (customDestination === null || customDestination === void 0 ? void 0 : customDestination.form) {
92
- this.api.internalApi.dispatchReduxAction(SystemRedux.SystemExportCustomDestinationPopupShow({
93
- ReportName: report.Name,
94
- ExportDestination: customDestination,
91
+ this.api.internalApi.dispatchReduxAction(PopupRedux.PopupShowForm({
92
+ Id: 'export-destination-form',
93
+ Form: customDestination === null || customDestination === void 0 ? void 0 : customDestination.form,
94
+ prepareContext: (context) => {
95
+ // we want to give the current popup time to close
96
+ // and we reopen with a delay in case this button action causes another popup
97
+ return new Promise((resolve) => {
98
+ setTimeout(() => {
99
+ const preparedContext = Object.assign(Object.assign({}, context), { report,
100
+ customDestination, reportData: this.api.internalApi.getReportService().getReportData(report) });
101
+ resolve(preparedContext);
102
+ }, 20);
103
+ });
104
+ },
95
105
  }));
96
106
  }
97
107
  else if (customDestination) {
@@ -1,5 +1,4 @@
1
1
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
- import { MathOperation } from '../PredefinedConfig/Common/Enums';
3
2
  import { IModuleActionReturn } from './Interface/IModuleActionReturn';
4
3
  import { ISmartEditModule } from './Interface/ISmartEditModule';
5
4
  import { PreviewInfo } from '../Utilities/Interface/Preview';
@@ -7,11 +6,12 @@ import { GridCell } from '../PredefinedConfig/Selection/GridCell';
7
6
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
8
7
  import { AdaptableApi } from '../Api/AdaptableApi';
9
8
  import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
9
+ import { SmartEditOperation } from '../AdaptableOptions/SmartEdit';
10
10
  export declare class SmartEditModule extends AdaptableModuleBase implements ISmartEditModule {
11
11
  constructor(api: AdaptableApi);
12
12
  getViewAccessLevel(): AccessLevel;
13
13
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
14
14
  ApplySmartEdit(newValues: GridCell[]): void;
15
15
  CheckCorrectCellSelection(): IModuleActionReturn<boolean>;
16
- BuildPreviewValues(smartEditValue: number, smartEditOperation: MathOperation): PreviewInfo;
16
+ BuildPreviewValues(smartEditValue: number, smartEditOperation: SmartEditOperation): PreviewInfo;
17
17
  }
@@ -122,19 +122,30 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
122
122
  if (column) {
123
123
  selectedCellInfo.gridCells.forEach((selectedCell) => {
124
124
  let newValue;
125
- switch (smartEditOperation) {
126
- case Enums_1.MathOperation.Add:
127
- newValue = Number(selectedCell.rawValue) + smartEditValue;
128
- break;
129
- case Enums_1.MathOperation.Subtract:
130
- newValue = Number(selectedCell.rawValue) - smartEditValue;
131
- break;
132
- case Enums_1.MathOperation.Multiply:
133
- newValue = Number(selectedCell.rawValue) * smartEditValue;
134
- break;
135
- case Enums_1.MathOperation.Divide:
136
- newValue = Number(selectedCell.rawValue) / smartEditValue;
137
- break;
125
+ if (typeof smartEditOperation === 'object') {
126
+ newValue = smartEditOperation.Operation({
127
+ smartEditValue,
128
+ column,
129
+ adaptableApi: this.api,
130
+ currentCell: selectedCell,
131
+ value: selectedCell.rawValue,
132
+ });
133
+ }
134
+ else {
135
+ switch (smartEditOperation) {
136
+ case Enums_1.MathOperation.Add:
137
+ newValue = Number(selectedCell.rawValue) + smartEditValue;
138
+ break;
139
+ case Enums_1.MathOperation.Subtract:
140
+ newValue = Number(selectedCell.rawValue) - smartEditValue;
141
+ break;
142
+ case Enums_1.MathOperation.Multiply:
143
+ newValue = Number(selectedCell.rawValue) * smartEditValue;
144
+ break;
145
+ case Enums_1.MathOperation.Divide:
146
+ newValue = Number(selectedCell.rawValue) / smartEditValue;
147
+ break;
148
+ }
138
149
  }
139
150
  //avoid the 0.0000000000x
140
151
  if (newValue) {
@@ -4,6 +4,6 @@ exports.getExportColumnsViewItems = void 0;
4
4
  exports.getExportColumnsViewItems = (report, api) => {
5
5
  return {
6
6
  name: 'Columns',
7
- values: [api.internalApi.getReportService().GetReportColumnScopeShortDescription(report)],
7
+ values: [...api.internalApi.getReportService().GetReportColumnScopeShortDescription(report)],
8
8
  };
9
9
  };
@@ -195,7 +195,7 @@ const getSumAggregation$ = (source$, initialSum) => {
195
195
  };
196
196
  const getColumnValueSum = (column, context) => {
197
197
  let sum = 0;
198
- context.api.internalApi.getAdaptableInstance().forAllRowNodesDo((rowNode) => {
198
+ context.api.internalApi.forAllRowNodesDo((rowNode) => {
199
199
  var _a;
200
200
  // if there is a WHERE clause defined, check if the current rowNode satisfies the condition
201
201
  if (context.filterFn && !context.filterFn(rowNode)) {
@@ -226,8 +226,10 @@ exports.booleanExpressionFunctions = {
226
226
  var _a;
227
227
  const searchTerm = expressionFunctionUtils_1.getStringValue(context, String(args[0]));
228
228
  return (_a = context.api) === null || _a === void 0 ? void 0 : _a.columnApi.getColumns().some((column) => {
229
- var _a;
230
- const value = (_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getNormalisedValueFromRowNode(context.node, column.columnId);
229
+ var _a, _b;
230
+ const value = column.dataType === 'Date'
231
+ ? // for Date columns use the display value, as we do a textual comparison
232
+ (_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getDisplayValueFromRowNode(context.node, column.columnId) : (_b = context.api) === null || _b === void 0 ? void 0 : _b.gridApi.getNormalisedValueFromRowNode(context.node, column.columnId);
231
233
  const columnValue = expressionFunctionUtils_1.getStringValue(context, String(value));
232
234
  return columnValue.indexOf(searchTerm) !== -1;
233
235
  });
@@ -233,7 +233,7 @@ const getDataChangedInfoStub = (context) => {
233
233
  }
234
234
  else {
235
235
  // if there is a WHERE clause defined, find the first rowNode which satisfies the condition
236
- context.api.internalApi.getAdaptableInstance().forAllRowNodesDo((rowNode) => {
236
+ context.api.internalApi.forAllRowNodesDo((rowNode) => {
237
237
  if (!rowNodeStub) {
238
238
  if (context.filterFn(rowNode)) {
239
239
  rowNodeStub = rowNode;
@@ -93,9 +93,6 @@ exports.scalarExpressionFunctions = {
93
93
  if (!column.queryable) {
94
94
  throw new ExpressionEvaluationError_1.ExpressionEvaluationError('COL', `Column name "${columnId}" is not queryable`);
95
95
  }
96
- // return context.api?.gridApi.getNormalisedValueFromRowNode(context.node, columnId);
97
- // const gridCell = context.api?.gridApi.getGridCellFromRowNode(context.node, columnId);
98
- // return gridCell.rawValue;
99
96
  return (_b = context.api) === null || _b === void 0 ? void 0 : _b.gridApi.getRawValueFromRowNode(context.node, columnId);
100
97
  },
101
98
  description: 'Returns the value of a column',
@@ -87,6 +87,12 @@ function StringFormatter(input, options = {}) {
87
87
  return undefined;
88
88
  }
89
89
  let s = input;
90
+ if (options.Prefix !== undefined) {
91
+ s = options.Prefix + s;
92
+ }
93
+ if (options.Suffix !== undefined) {
94
+ s = s + options.Suffix;
95
+ }
90
96
  if (options.Case !== undefined) {
91
97
  if (options.Case == 'Lower') {
92
98
  s = s.toLowerCase();
@@ -3,6 +3,7 @@ import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupP
3
3
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
4
4
  import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
5
5
  import { AdaptableAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
6
+ import { AdaptableForm, ButtonContext } from '../../types';
6
7
  export interface UIConfirmation {
7
8
  Header: string;
8
9
  Msg: string;
@@ -71,3 +72,14 @@ export interface WindowPopup {
71
72
  Icon?: string;
72
73
  }[];
73
74
  }
75
+ export interface FormPopup {
76
+ FormList: {
77
+ Id: string;
78
+ FormProps: any;
79
+ /**
80
+ * Allows to customise the context before submitting the form
81
+ */
82
+ prepareContext?: (context: ButtonContext) => Promise<ButtonContext> | ButtonContext;
83
+ Form: AdaptableForm<ButtonContext>;
84
+ }[];
85
+ }
@@ -1,12 +1,12 @@
1
1
  import { IAlertService } from './Interface/IAlertService';
2
2
  import { AlertDefinition } from '../../PredefinedConfig/AlertState';
3
3
  import { EmitterCallback } from '../Emitter';
4
- import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
4
+ import { AdaptableApi } from '../../types';
5
5
  export declare class AlertService implements IAlertService {
6
- private adaptable;
6
+ private adaptableApi;
7
7
  private emitter;
8
8
  private reactiveAlertsMap;
9
- constructor(adaptable: IAdaptable);
9
+ constructor(adaptableApi: AdaptableApi);
10
10
  onReactiveAlertTriggered: (callback: EmitterCallback) => (() => void);
11
11
  createReactiveAlert(alertDefinition: AlertDefinition): void;
12
12
  deleteReactiveAlert(alertDefinition: AlertDefinition): void;
@@ -7,8 +7,8 @@ const rxjs_1 = require("rxjs");
7
7
  const LoggingHelper_1 = require("../Helpers/LoggingHelper");
8
8
  const ModuleConstants_1 = require("../Constants/ModuleConstants");
9
9
  class AlertService {
10
- constructor(adaptable) {
11
- this.adaptable = adaptable;
10
+ constructor(adaptableApi) {
11
+ this.adaptableApi = adaptableApi;
12
12
  this.reactiveAlertsMap = new Map();
13
13
  this.onReactiveAlertTriggered = (callback) => {
14
14
  return this.emitter.on('ReactiveAlertTriggered', callback);
@@ -58,17 +58,17 @@ class AlertService {
58
58
  }
59
59
  isValidExpression(rule) {
60
60
  return rule.ObservableExpression
61
- ? this.adaptable.api.queryLanguageApi.isValidObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with observable expression `)
61
+ ? this.adaptableApi.queryLanguageApi.isValidObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with observable expression `)
62
62
  : rule.AggregatedBooleanExpression
63
- ? this.adaptable.api.queryLanguageApi.isValidAggregatedBooleanExpression(rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with aggregation expression `)
63
+ ? this.adaptableApi.queryLanguageApi.isValidAggregatedBooleanExpression(rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with aggregation expression `)
64
64
  : false;
65
65
  }
66
66
  evaluateReactiveExpression(rule) {
67
67
  return rule.ObservableExpression
68
- ? this.adaptable.api.internalApi
68
+ ? this.adaptableApi.internalApi
69
69
  .getQueryLanguageService()
70
70
  .evaluateObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId)
71
- : this.adaptable.api.internalApi
71
+ : this.adaptableApi.internalApi
72
72
  .getQueryLanguageService()
73
73
  .evaluateAggregatedBooleanExpression(rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId);
74
74
  }
@@ -1,11 +1,11 @@
1
- import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
2
1
  import { ICalculatedColumnExpressionService } from './Interface/ICalculatedColumnExpressionService';
3
2
  import { RowNode } from '@ag-grid-community/all-modules';
4
3
  import { AdaptableCalculatedColumnQuery, CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
4
+ import { AdaptableApi } from '../../../types';
5
5
  export declare class CalculatedColumnExpressionService implements ICalculatedColumnExpressionService {
6
- private adaptable;
6
+ private adaptableApi;
7
7
  private aggregatedScalarCalculatedColumnsMap;
8
- constructor(adaptable: IAdaptable);
8
+ constructor(adaptableApi: AdaptableApi);
9
9
  getCalculatedColumnDataType(calculatedColumnQuery: AdaptableCalculatedColumnQuery): 'String' | 'Number' | 'Boolean' | 'Date';
10
10
  isCalculatedColumnQueryValid(calculatedColumnQuery: AdaptableCalculatedColumnQuery): boolean;
11
11
  evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, node: RowNode): any;
@@ -6,11 +6,11 @@ const LoggingHelper_1 = require("../Helpers/LoggingHelper");
6
6
  const ModuleConstants_1 = require("../Constants/ModuleConstants");
7
7
  const scalarAggregationHelper_1 = require("../ExpressionFunctions/scalarAggregationHelper");
8
8
  class CalculatedColumnExpressionService {
9
- constructor(adaptable) {
10
- this.adaptable = adaptable;
9
+ constructor(adaptableApi) {
10
+ this.adaptableApi = adaptableApi;
11
11
  this.aggregatedScalarCalculatedColumnsMap = new Map();
12
- this.adaptable = adaptable;
13
- this.adaptable.api.internalApi
12
+ this.adaptableApi = adaptableApi;
13
+ this.adaptableApi.internalApi
14
14
  .getDataService()
15
15
  .on('CellDataChanged', (cellDataChangedInfo) => {
16
16
  if (cellDataChangedInfo.trigger === 'aggChange') {
@@ -27,7 +27,7 @@ class CalculatedColumnExpressionService {
27
27
  }
28
28
  });
29
29
  if (refreshedCalculatedColumns.length) {
30
- this.adaptable.api.gridApi.refreshCells(null, refreshedCalculatedColumns);
30
+ this.adaptableApi.gridApi.refreshCells(null, refreshedCalculatedColumns);
31
31
  }
32
32
  });
33
33
  }
@@ -39,8 +39,8 @@ class CalculatedColumnExpressionService {
39
39
  // we definitely don't want to aggregate everything only to get the data type
40
40
  return Enums_1.DataType.Number;
41
41
  }
42
- let firstRowNode = this.adaptable.api.gridApi.getFirstRowNode();
43
- let firstRowValue = this.adaptable.api.internalApi
42
+ let firstRowNode = this.adaptableApi.gridApi.getFirstRowNode();
43
+ let firstRowValue = this.adaptableApi.internalApi
44
44
  .getQueryLanguageService()
45
45
  .evaluateScalarExpression(calculatedColumnQuery.ScalarExpression, ModuleConstants_1.CalculatedColumnModuleId, firstRowNode);
46
46
  if (firstRowValue instanceof Date) {
@@ -57,7 +57,7 @@ class CalculatedColumnExpressionService {
57
57
  }
58
58
  }
59
59
  catch (e) {
60
- LoggingHelper_1.LogAdaptableWarning(`Invalid CalculatedColumn expression ${this.adaptable.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumnQuery)} :: ${e}`);
60
+ LoggingHelper_1.LogAdaptableWarning(`Invalid CalculatedColumn expression ${this.adaptableApi.queryLanguageApi.getAdaptableQueryExpression(calculatedColumnQuery)} :: ${e}`);
61
61
  return Enums_1.DataType.Number;
62
62
  }
63
63
  }
@@ -65,8 +65,8 @@ class CalculatedColumnExpressionService {
65
65
  if (calculatedColumnQuery.ScalarExpression) {
66
66
  try {
67
67
  // TODO AFL add a cached validation for ScalarExpression, just like for all the other types
68
- let firstRowNode = this.adaptable.getFirstRowNode();
69
- this.adaptable.api.internalApi
68
+ let firstRowNode = this.adaptableApi.gridApi.getFirstRowNode();
69
+ this.adaptableApi.internalApi
70
70
  .getQueryLanguageService()
71
71
  .evaluateScalarExpression(calculatedColumnQuery.ScalarExpression, ModuleConstants_1.CalculatedColumnModuleId, firstRowNode);
72
72
  return true;
@@ -77,7 +77,7 @@ class CalculatedColumnExpressionService {
77
77
  }
78
78
  }
79
79
  if (calculatedColumnQuery.AggregatedScalarExpression) {
80
- const validationResult = this.adaptable.api.internalApi
80
+ const validationResult = this.adaptableApi.internalApi
81
81
  .getQueryLanguageService()
82
82
  .validateAggregatedScalar(calculatedColumnQuery.AggregatedScalarExpression, ModuleConstants_1.CalculatedColumnModuleId);
83
83
  return validationResult.isValid;
@@ -88,12 +88,12 @@ class CalculatedColumnExpressionService {
88
88
  evaluateCalculatedColumnQuery(calculatedColumn, node) {
89
89
  var _a, _b, _c, _d, _e;
90
90
  try {
91
- if (this.adaptable.api.gridApi.isGroupRowNode(node)) {
91
+ if (this.adaptableApi.gridApi.isGroupRowNode(node)) {
92
92
  return undefined;
93
93
  }
94
94
  // no validation here, this function has to be as performant as possible
95
95
  if ((_a = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression) {
96
- return this.adaptable.api.internalApi
96
+ return this.adaptableApi.internalApi
97
97
  .getQueryLanguageService()
98
98
  .evaluateScalarExpression(calculatedColumn.Query.ScalarExpression, ModuleConstants_1.CalculatedColumnModuleId, node);
99
99
  }
@@ -112,10 +112,10 @@ class CalculatedColumnExpressionService {
112
112
  // if there is already an aggregated scalar, delete it (possible when editing)
113
113
  this.destroyAggregatedScalarCalculatedColumn(calculatedColumn);
114
114
  if ((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.AggregatedScalarExpression) {
115
- const aggregationConfig = this.adaptable.api.internalApi
115
+ const aggregationConfig = this.adaptableApi.internalApi
116
116
  .getQueryLanguageService()
117
117
  .evaluateAggregatedScalarExpression(calculatedColumn.Query.AggregatedScalarExpression, ModuleConstants_1.CalculatedColumnModuleId);
118
- const aggregatedScalarCalculatedColumn = new AggregatedScalarCalculatedColumn(aggregationConfig.value, calculatedColumn, this.adaptable);
118
+ const aggregatedScalarCalculatedColumn = new AggregatedScalarCalculatedColumn(aggregationConfig.value, calculatedColumn, this.adaptableApi);
119
119
  this.aggregatedScalarCalculatedColumnsMap.set(calculatedColumn.Uuid, aggregatedScalarCalculatedColumn);
120
120
  }
121
121
  }
@@ -128,10 +128,10 @@ class CalculatedColumnExpressionService {
128
128
  }
129
129
  exports.CalculatedColumnExpressionService = CalculatedColumnExpressionService;
130
130
  class AggregatedScalarCalculatedColumn {
131
- constructor(expressionEvaluation, calculatedColumn, adaptable) {
131
+ constructor(expressionEvaluation, calculatedColumn, adaptableApi) {
132
132
  this.expressionEvaluation = expressionEvaluation;
133
133
  this.calculatedColumn = calculatedColumn;
134
- this.adaptable = adaptable;
134
+ this.adaptableApi = adaptableApi;
135
135
  this.aggregationResult = this.computeAggregatedValue(expressionEvaluation);
136
136
  // currently we support only one reducer
137
137
  this.aggregationReducerName = Object.keys(expressionEvaluation.aggregationParams.reducers)[0];
@@ -153,7 +153,7 @@ class AggregatedScalarCalculatedColumn {
153
153
  return this.expressionEvaluation.columnDependencies;
154
154
  }
155
155
  computeAggregatedValue(expressionEvaluation) {
156
- const gridData = this.adaptable.api.gridApi.getGridData();
156
+ const gridData = this.adaptableApi.gridApi.getGridData();
157
157
  if (!expressionEvaluation.cumulateOver) {
158
158
  return scalarAggregationHelper_1.aggregate(expressionEvaluation.aggregationParams, gridData);
159
159
  }
@@ -174,7 +174,7 @@ class AggregatedScalarCalculatedColumn {
174
174
  if (!expressionEvaluation.aggregationParams.groupBy) {
175
175
  expressionEvaluation.aggregationParams.groupBy = [];
176
176
  }
177
- const gridPrimaryKey = this.adaptable.adaptableOptions.primaryKey;
177
+ const gridPrimaryKey = this.adaptableApi.internalApi.getAdaptableOptions().primaryKey;
178
178
  // !! aggregationParams mutated
179
179
  expressionEvaluation.aggregationParams.groupBy.push({ field: gridPrimaryKey });
180
180
  // 3. cumulate
@@ -185,7 +185,7 @@ class AggregatedScalarCalculatedColumn {
185
185
  var _a, _b;
186
186
  if ((_a = this.expressionEvaluation.aggregationParams.groupBy) === null || _a === void 0 ? void 0 : _a.length) {
187
187
  const groupColumns = this.expressionEvaluation.aggregationParams.groupBy.map((groupByParam) => groupByParam.field);
188
- const groupKeys = groupColumns.map((groupColumnName) => this.adaptable.api.gridApi.getRawValueFromRowNode(rowNode, groupColumnName));
188
+ const groupKeys = groupColumns.map((groupColumnName) => this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, groupColumnName));
189
189
  return (_b = this.aggregationResult.deepMap.get(groupKeys)) === null || _b === void 0 ? void 0 : _b.reducerResults[this.aggregationReducerName];
190
190
  }
191
191
  return this.aggregationResult.reducerResults[this.aggregationReducerName];
@@ -1,10 +1,10 @@
1
- import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
2
1
  import { IEntitlementService } from './Interface/IEntitlementService';
3
2
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
4
3
  import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
4
+ import { AdaptableApi } from '../../../types';
5
5
  export declare class EntitlementService implements IEntitlementService {
6
- private adaptable;
7
- constructor(adaptable: IAdaptable);
6
+ private adaptableApi;
7
+ constructor(adaptableApi: AdaptableApi);
8
8
  setModulesEntitlements(): void;
9
9
  isModuleHiddenEntitlement(adaptableModule: AdaptableModule): boolean;
10
10
  isModuleFullEntitlement(adaptableModule: AdaptableModule): boolean;
@@ -2,12 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EntitlementService = void 0;
4
4
  class EntitlementService {
5
- constructor(adaptable) {
6
- this.adaptable = adaptable;
7
- this.adaptable = adaptable;
5
+ constructor(adaptableApi) {
6
+ this.adaptableApi = adaptableApi;
7
+ this.adaptableApi = adaptableApi;
8
8
  }
9
9
  setModulesEntitlements() {
10
- this.adaptable.adaptableModules.forEach((module) => {
10
+ this.adaptableApi.internalApi
11
+ .getModuleService()
12
+ .getModuleCollection()
13
+ .forEach((module) => {
11
14
  module.setModuleEntitlement();
12
15
  });
13
16
  }
@@ -21,15 +24,16 @@ class EntitlementService {
21
24
  return this.getEntitlementAccessLevelForModule(adaptableModule) == 'ReadOnly';
22
25
  }
23
26
  getEntitlementAccessLevelForModule(adaptableModule) {
24
- let entitlementOptions = this.adaptable.adaptableOptions.entitlementOptions;
27
+ let adaptableOptions = this.adaptableApi.internalApi.getAdaptableOptions();
28
+ let entitlementOptions = adaptableOptions.entitlementOptions;
25
29
  if (entitlementOptions) {
26
30
  const defaultAccessLevel = typeof entitlementOptions.defaultAccessLevel === 'function'
27
- ? entitlementOptions.defaultAccessLevel(this.adaptable.adaptableOptions.userName, this.adaptable.adaptableOptions.adaptableId)
31
+ ? entitlementOptions.defaultAccessLevel(adaptableOptions.userName, adaptableOptions.adaptableId)
28
32
  : entitlementOptions.defaultAccessLevel;
29
33
  const moduleEntitlements = entitlementOptions.moduleEntitlements;
30
34
  if (moduleEntitlements) {
31
35
  if (typeof moduleEntitlements === 'function') {
32
- const dynamicModuleEntitlement = moduleEntitlements(adaptableModule, this.adaptable.adaptableOptions.userName, this.adaptable.adaptableOptions.adaptableId, defaultAccessLevel);
36
+ const dynamicModuleEntitlement = moduleEntitlements(adaptableModule, adaptableOptions.userName, adaptableOptions.adaptableId, defaultAccessLevel);
33
37
  return dynamicModuleEntitlement !== null && dynamicModuleEntitlement !== void 0 ? dynamicModuleEntitlement : defaultAccessLevel;
34
38
  }
35
39
  else {
@@ -48,7 +52,7 @@ class EntitlementService {
48
52
  if (this.isModuleHiddenEntitlement('GridInfo')) {
49
53
  return false;
50
54
  }
51
- return this.adaptable.api.internalApi
55
+ return this.adaptableApi.internalApi
52
56
  .getAdaptableOptions()
53
57
  .userInterfaceOptions.gridInfoSections.includes(section);
54
58
  }
@@ -8,7 +8,7 @@ export interface IReportService extends IAdaptableService {
8
8
  IsSystemReport(reportName: string): boolean;
9
9
  IsSystemReportActive(reportName: SystemReportName): boolean;
10
10
  IsSystemExportDestinationActive(exportDestination: SystemExportDestination): boolean;
11
- GetReportColumnScopeShortDescription(report: Report): string;
11
+ GetReportColumnScopeShortDescription(report: Report): string[];
12
12
  GetReportColumnScopeLongDescription(report: Report): string;
13
13
  GetReportExpressionDescription(Report: Report, cols: AdaptableColumn[]): string;
14
14
  GetReportColumnsForReport(report: Report): AdaptableColumn[];