@adaptabletools/adaptable 19.1.0-canary.0 → 19.1.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 (131) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/FormatColumnOptions.d.ts +4 -4
  3. package/src/Api/GridApi.d.ts +2 -1
  4. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +0 -2
  5. package/src/Api/Implementation/ActionColumnApiImpl.js +1 -4
  6. package/src/Api/Implementation/ActionRowApiImpl.d.ts +1 -1
  7. package/src/Api/Implementation/ActionRowApiImpl.js +4 -4
  8. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  9. package/src/Api/Implementation/AdaptableApiImpl.js +6 -0
  10. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
  11. package/src/Api/Implementation/AlertApiImpl.js +16 -15
  12. package/src/Api/Implementation/ApiBase.d.ts +12 -3
  13. package/src/Api/Implementation/ApiBase.js +39 -24
  14. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -1
  15. package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -3
  16. package/src/Api/Implementation/CalendarApiImpl.js +1 -1
  17. package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
  18. package/src/Api/Implementation/ChartingApiImpl.js +9 -9
  19. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  20. package/src/Api/Implementation/ColumnApiImpl.js +18 -18
  21. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
  22. package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
  23. package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +0 -2
  24. package/src/Api/Implementation/ColumnMenuApiImpl.js +2 -5
  25. package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -1
  26. package/src/Api/Implementation/CommentsApiImpl.js +6 -4
  27. package/src/Api/Implementation/ConfigApiImpl.js +23 -24
  28. package/src/Api/Implementation/ContextMenuApiImpl.d.ts +0 -2
  29. package/src/Api/Implementation/ContextMenuApiImpl.js +1 -4
  30. package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -1
  31. package/src/Api/Implementation/CustomSortApiImpl.js +3 -3
  32. package/src/Api/Implementation/DashboardApiImpl.d.ts +1 -1
  33. package/src/Api/Implementation/DashboardApiImpl.js +5 -5
  34. package/src/Api/Implementation/DataImportApiImpl.d.ts +1 -1
  35. package/src/Api/Implementation/DataImportApiImpl.js +3 -3
  36. package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
  37. package/src/Api/Implementation/DataSetApiImpl.js +5 -5
  38. package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
  39. package/src/Api/Implementation/EntitlementApiImpl.js +5 -5
  40. package/src/Api/Implementation/EventApiImpl.d.ts +1 -1
  41. package/src/Api/Implementation/EventApiImpl.js +2 -2
  42. package/src/Api/Implementation/ExportApiImpl.d.ts +1 -1
  43. package/src/Api/Implementation/ExportApiImpl.js +7 -7
  44. package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
  45. package/src/Api/Implementation/ExpressionApiImpl.js +5 -5
  46. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -1
  47. package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
  48. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
  49. package/src/Api/Implementation/FlashingCellApiImpl.js +7 -7
  50. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
  51. package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
  52. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
  53. package/src/Api/Implementation/FreeTextColumnApiImpl.js +4 -4
  54. package/src/Api/Implementation/GridApiImpl.d.ts +3 -2
  55. package/src/Api/Implementation/GridApiImpl.js +106 -103
  56. package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
  57. package/src/Api/Implementation/GridFilterApiImpl.js +4 -4
  58. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
  59. package/src/Api/Implementation/LayoutApiImpl.js +3 -3
  60. package/src/Api/Implementation/NamedQueryApiImpl.d.ts +1 -1
  61. package/src/Api/Implementation/NamedQueryApiImpl.js +3 -3
  62. package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
  63. package/src/Api/Implementation/NoteApiImpl.js +3 -3
  64. package/src/Api/Implementation/OptionsApiImpl.js +7 -7
  65. package/src/Api/Implementation/PluginsApiImpl.js +1 -1
  66. package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
  67. package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
  68. package/src/Api/Implementation/PredicateApiImpl.js +4 -4
  69. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -1
  70. package/src/Api/Implementation/ScheduleApiImpl.js +3 -3
  71. package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
  72. package/src/Api/Implementation/StatusBarApiImpl.js +1 -1
  73. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -1
  74. package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
  75. package/src/Api/Implementation/SystemStatusApiImpl.d.ts +1 -1
  76. package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
  77. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -1
  78. package/src/Api/Implementation/TeamSharingApiImpl.js +11 -11
  79. package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -1
  80. package/src/Api/Implementation/ThemeApiImpl.js +8 -8
  81. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  82. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  83. package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -5
  84. package/src/Api/Internal/ActionRowInternalApi.js +8 -8
  85. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  86. package/src/Api/Internal/AdaptableInternalApi.js +55 -50
  87. package/src/Api/Internal/AlertInternalApi.js +9 -9
  88. package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -9
  89. package/src/Api/Internal/ChartingInternalApi.js +1 -1
  90. package/src/Api/Internal/ColumnFilterInternalApi.js +7 -9
  91. package/src/Api/Internal/ColumnInternalApi.js +3 -3
  92. package/src/Api/Internal/CustomSortInternalApi.js +3 -3
  93. package/src/Api/Internal/DashboardInternalApi.js +4 -3
  94. package/src/Api/Internal/DataImportInternalApi.js +2 -2
  95. package/src/Api/Internal/DataSetInternalApi.js +2 -2
  96. package/src/Api/Internal/ExportInternalApi.js +21 -22
  97. package/src/Api/Internal/ExpressionInternalApi.js +4 -4
  98. package/src/Api/Internal/Fdc3InternalApi.d.ts +0 -1
  99. package/src/Api/Internal/Fdc3InternalApi.js +9 -12
  100. package/src/Api/Internal/FlashingCellInternalApi.js +2 -2
  101. package/src/Api/Internal/FormatColumnInternalApi.js +2 -3
  102. package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -2
  103. package/src/Api/Internal/GridFilterInternalApi.js +2 -2
  104. package/src/Api/Internal/GridInternalApi.js +26 -26
  105. package/src/Api/Internal/LayoutInternalApi.js +6 -5
  106. package/src/Api/Internal/NamedQueryInternalApi.js +2 -2
  107. package/src/Api/Internal/PredicateInternalApi.js +5 -5
  108. package/src/Api/Internal/ScheduleInternalApi.js +1 -1
  109. package/src/Api/Internal/StyledColumnInternalApi.js +2 -2
  110. package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
  111. package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
  112. package/src/Api/Internal/ThemeInternalApi.js +1 -1
  113. package/src/Strategy/NoteModule.d.ts +0 -1
  114. package/src/Strategy/NoteModule.js +4 -5
  115. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  116. package/src/Utilities/Services/AggregatedScalarLiveValue.js +1 -1
  117. package/src/Utilities/Services/CellPopupService.js +4 -4
  118. package/src/Utilities/Services/Fdc3Service.js +1 -3
  119. package/src/Utilities/Services/FlashingCellService.d.ts +0 -2
  120. package/src/Utilities/Services/FlashingCellService.js +2 -3
  121. package/src/Utilities/Services/RowEditService.js +3 -5
  122. package/src/View/Alert/AlertStatusSubPanel.js +4 -4
  123. package/src/View/Charting/ShowChartButton.js +4 -4
  124. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
  125. package/src/agGrid/FloatingFilterWrapper.js +4 -3
  126. package/src/components/Datepicker/index.d.ts +1 -1
  127. package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
  128. package/src/components/ExpressionEditor/ExpressionPreview.js +4 -4
  129. package/src/env.js +2 -2
  130. package/src/metamodel/adaptable.metamodel.js +1 -1
  131. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -14,7 +14,7 @@ export class AdaptableInternalApi extends ApiBase {
14
14
  }
15
15
  getAdaptableJSXElement() {
16
16
  var _a;
17
- return (_a = this.adaptable._PRIVATE_adaptableJSXElement) !== null && _a !== void 0 ? _a : null;
17
+ return (_a = this._adaptable._PRIVATE_adaptableJSXElement) !== null && _a !== void 0 ? _a : null;
18
18
  }
19
19
  // Popup Redux Actions
20
20
  showPopupConfirmation(confirmation) {
@@ -62,9 +62,9 @@ export class AdaptableInternalApi extends ApiBase {
62
62
  return this.getAdaptableState().Grid.IsGridInTreeMode;
63
63
  }
64
64
  getToolbarTitle() {
65
- let toolbarTitle = this.adaptable.api.dashboardApi.getDashboardState().DashboardTitle;
65
+ let toolbarTitle = this._adaptable.api.dashboardApi.getDashboardState().DashboardTitle;
66
66
  if (StringExtensions.IsNullOrEmpty(toolbarTitle)) {
67
- toolbarTitle = this.adaptable.adaptableOptions.adaptableId;
67
+ toolbarTitle = this.getOptions().adaptableId;
68
68
  if (toolbarTitle == ADAPTABLE_ID) {
69
69
  toolbarTitle = 'Adaptable ';
70
70
  }
@@ -76,62 +76,65 @@ export class AdaptableInternalApi extends ApiBase {
76
76
  return Object.assign(Object.assign({}, config), { rowData: (_a = config.rowNode) === null || _a === void 0 ? void 0 : _a.data, changedAt: Date.now() });
77
77
  }
78
78
  getAdaptableInstance() {
79
- return this.adaptable;
79
+ return this._adaptable;
80
+ }
81
+ getAgGridAdapter() {
82
+ return this._adaptable.agGridAdapter;
80
83
  }
81
84
  getPredefinedConfig() {
82
- return this.adaptable.adaptableOptions.predefinedConfig;
85
+ return this.getOptions().predefinedConfig;
83
86
  }
84
87
  getState() {
85
88
  return this.getAdaptableState();
86
89
  }
87
90
  getValidationService() {
88
- return this.adaptable.ValidationService;
91
+ return this._adaptable.ValidationService;
89
92
  }
90
93
  getModuleService() {
91
- return this.adaptable.ModuleService;
94
+ return this._adaptable.ModuleService;
92
95
  }
93
96
  getDataService() {
94
- return this.adaptable.DataService;
97
+ return this._adaptable.DataService;
95
98
  }
96
99
  getCellPopupService() {
97
- return this.adaptable.CellPopupService;
100
+ return this._adaptable.CellPopupService;
98
101
  }
99
102
  getCalculatedColumnExpressionService() {
100
- return this.adaptable.CalculatedColumnExpressionService;
103
+ return this._adaptable.CalculatedColumnExpressionService;
101
104
  }
102
105
  getQueryLanguageService() {
103
- return this.adaptable.QueryLanguageService;
106
+ return this._adaptable.QueryLanguageService;
104
107
  }
105
108
  getAlertService() {
106
- return this.adaptable.AlertService;
109
+ return this._adaptable.AlertService;
107
110
  }
108
111
  getTeamSharingService() {
109
- return this.adaptable.TeamSharingService;
112
+ return this._adaptable.TeamSharingService;
110
113
  }
111
114
  getMetamodelService() {
112
- return this.adaptable.MetamodelService;
115
+ return this._adaptable.MetamodelService;
113
116
  }
114
117
  getRowEditService() {
115
- return this.adaptable.RowEditService;
118
+ return this._adaptable.RowEditService;
116
119
  }
117
120
  getFdc3Service() {
118
- return this.adaptable.Fdc3Service;
121
+ return this._adaptable.Fdc3Service;
119
122
  }
120
123
  getFlashingCellService() {
121
- return this.adaptable.FlashingCellService;
124
+ return this._adaptable.FlashingCellService;
122
125
  }
123
126
  getModules() {
124
- return this.adaptable.adaptableModules;
127
+ return this._adaptable.adaptableModules;
125
128
  }
126
129
  getModuleFriendlyName(adaptableModule) {
127
130
  var _a, _b;
128
- return ((_b = (_a = this.adaptable.ModuleService.getModuleInfoByModule(adaptableModule)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : adaptableModule);
131
+ return ((_b = (_a = this._adaptable.ModuleService.getModuleInfoByModule(adaptableModule)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : adaptableModule);
129
132
  }
130
133
  forAllRowNodesDo(func, config) {
131
- this.adaptable.forAllRowNodesDo(func, config);
134
+ this._adaptable.forAllRowNodesDo(func, config);
132
135
  }
133
136
  forAllVisibleRowNodesDo(func, config) {
134
- this.adaptable.forAllVisibleRowNodesDo(func, config);
137
+ this._adaptable.forAllVisibleRowNodesDo(func, config);
135
138
  }
136
139
  getLabelForButton(button, context) {
137
140
  if (!button.label) {
@@ -190,24 +193,24 @@ export class AdaptableInternalApi extends ApiBase {
190
193
  return buttonIcon;
191
194
  }
192
195
  isDocumentationLinksDisplayed() {
193
- return this.adaptable.adaptableOptions.userInterfaceOptions.showDocumentationLinks;
196
+ return this.getUserInterfaceOptions().showDocumentationLinks;
194
197
  }
195
198
  // the row data which is used to preview the expression evaluation (usually the first row data)
196
199
  getQueryPreviewData() {
197
200
  var _a;
198
- const firstRowNode = this.adaptable.api.gridApi.getFirstRowNode();
201
+ const firstRowNode = this._adaptable.api.gridApi.getFirstRowNode();
199
202
  if (firstRowNode == undefined) {
200
203
  return {};
201
204
  }
202
205
  const firstRowData = (_a = Object.assign({}, firstRowNode === null || firstRowNode === void 0 ? void 0 : firstRowNode.data)) !== null && _a !== void 0 ? _a : {};
203
206
  // handle CalcCols which are not persisted in the rowModel
204
- this.adaptable.api.calculatedColumnApi.getCalculatedColumns().forEach((calculatedColumn) => {
205
- const columnRawValue = this.adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, calculatedColumn.ColumnId);
207
+ this._adaptable.api.calculatedColumnApi.getCalculatedColumns().forEach((calculatedColumn) => {
208
+ const columnRawValue = this._adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, calculatedColumn.ColumnId);
206
209
  firstRowData[calculatedColumn.ColumnId] = columnRawValue;
207
210
  });
208
211
  // handle FreeTextCols which are not persisted in the rowModel
209
- this.adaptable.api.freeTextColumnApi.getFreeTextColumns().forEach((freeTextColumn) => {
210
- const columnRawValue = this.adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, freeTextColumn.ColumnId);
212
+ this._adaptable.api.freeTextColumnApi.getFreeTextColumns().forEach((freeTextColumn) => {
213
+ const columnRawValue = this._adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, freeTextColumn.ColumnId);
211
214
  firstRowData[freeTextColumn.ColumnId] = columnRawValue;
212
215
  });
213
216
  return firstRowData;
@@ -215,25 +218,25 @@ export class AdaptableInternalApi extends ApiBase {
215
218
  createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
216
219
  const createComponentFn = () =>
217
220
  // delegate the logic to framework wrapper
218
- this.adaptable._emitSync('FrameworkComponentChange', {
221
+ this._adaptable._emitSync('FrameworkComponentChange', {
219
222
  command: 'create',
220
223
  containerDomNode,
221
224
  frameworkComponent,
222
225
  componentType,
223
226
  });
224
- if (this.adaptable.isReady) {
227
+ if (this.isAdapTableReady()) {
225
228
  createComponentFn();
226
229
  }
227
230
  else {
228
231
  // adaptable may not be initialized yet if the framework component is part of the initial render
229
232
  // AFL 2021.10.14 - not really sure if this is necessary anymore?! (see the other changes in this commit)
230
- waitForCondition(() => this.adaptable.isReady).then(() => {
233
+ waitForCondition(() => this.isAdapTableReady()).then(() => {
231
234
  createComponentFn();
232
235
  });
233
236
  }
234
237
  }
235
238
  destroyFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
236
- this.adaptable._emitSync('FrameworkComponentChange', {
239
+ this._adaptable._emitSync('FrameworkComponentChange', {
237
240
  command: 'destroy',
238
241
  containerDomNode,
239
242
  frameworkComponent,
@@ -241,7 +244,7 @@ export class AdaptableInternalApi extends ApiBase {
241
244
  });
242
245
  }
243
246
  initializeDataChangeHistory() {
244
- if (this.adaptable.adaptableOptions.dataChangeHistoryOptions.activeByDefault) {
247
+ if (this.getDataChangeHistoryOptions().activeByDefault) {
245
248
  this.dispatchAction(SystemRedux.SystemDataChangeHistoryEnable());
246
249
  }
247
250
  else {
@@ -258,7 +261,7 @@ export class AdaptableInternalApi extends ApiBase {
258
261
  catch (error) {
259
262
  errorHandlingFn === null || errorHandlingFn === void 0 ? void 0 : errorHandlingFn();
260
263
  this.getUserInterfaceApi().hideProgressIndicator();
261
- this.adaptable.logger.error('Unexpected error while executing a function with a progress indicator', error);
264
+ this.logError('Unexpected error while executing a function with a progress indicator', error);
262
265
  }
263
266
  }, 16);
264
267
  }
@@ -282,34 +285,36 @@ export class AdaptableInternalApi extends ApiBase {
282
285
  return [...(layoutTags || []), ...(objectTags || [])];
283
286
  }
284
287
  getObjectTags() {
285
- if (!this.adaptable.adaptableOptions.userInterfaceOptions.objectTags) {
288
+ const userInterfaceOptions = this.getUserInterfaceOptions();
289
+ if (!this.getUserInterfaceOptions().objectTags) {
286
290
  return;
287
291
  }
288
- if (Array.isArray(this.adaptable.adaptableOptions.userInterfaceOptions.objectTags)) {
289
- return this.adaptable.adaptableOptions.userInterfaceOptions.objectTags;
292
+ if (Array.isArray(userInterfaceOptions.objectTags)) {
293
+ return userInterfaceOptions.objectTags;
290
294
  }
291
- if (typeof this.adaptable.adaptableOptions.userInterfaceOptions.objectTags === 'function') {
295
+ if (typeof userInterfaceOptions.objectTags === 'function') {
292
296
  // sanitize the provided tags, just to be sure that the user does NOT break the UI
293
- return this.adaptable.adaptableOptions.userInterfaceOptions
297
+ return userInterfaceOptions
294
298
  .objectTags(this.buildBaseContext())
295
299
  .filter((tag) => typeof tag === 'string');
296
300
  }
297
301
  }
298
302
  getLayoutTags() {
299
303
  var _a;
300
- if (!((_a = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions) === null || _a === void 0 ? void 0 : _a.autoGenerateTagsForLayouts)) {
304
+ const layoutOptions = this.getLayoutOptions();
305
+ if (!((_a = layoutOptions.layoutTagOptions) === null || _a === void 0 ? void 0 : _a.autoGenerateTagsForLayouts)) {
301
306
  return;
302
307
  }
303
- if (this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts ===
304
- true) {
305
- return this.adaptable.api.layoutApi.getLayouts().map((layout) => {
308
+ if (layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts === true) {
309
+ return this.getLayoutApi()
310
+ .getLayouts()
311
+ .map((layout) => {
306
312
  return layout.Name;
307
313
  });
308
314
  }
309
- if (typeof this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions
310
- .autoGenerateTagsForLayouts === 'function') {
311
- const autoGenerateTagsForLayoutsContext = Object.assign({ layouts: this.adaptable.api.layoutApi.getLayouts(), objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags() }, this.buildBaseContext());
312
- const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
315
+ if (typeof layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts === 'function') {
316
+ const autoGenerateTagsForLayoutsContext = Object.assign({ layouts: this._adaptable.api.layoutApi.getLayouts(), objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags() }, this.buildBaseContext());
317
+ const customGeneratedTags = layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
313
318
  // sanitize the provided tags, just to be sure that the user does NOT break the UI
314
319
  return customGeneratedTags.filter((tag) => typeof tag === 'string');
315
320
  }
@@ -335,10 +340,10 @@ export class AdaptableInternalApi extends ApiBase {
335
340
  if (!query) {
336
341
  return '';
337
342
  }
338
- const displayColumnFriendlyNames = (_a = this.adaptable.adaptableOptions.expressionOptions) === null || _a === void 0 ? void 0 : _a.displayColumnFriendlyNamesForExpressions;
343
+ const displayColumnFriendlyNames = (_a = this.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.displayColumnFriendlyNamesForExpressions;
339
344
  return displayColumnFriendlyNames
340
- ? this.adaptable.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(query)
341
- : this.adaptable.api.expressionApi.getAdaptableQueryExpression(query);
345
+ ? this._adaptable.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(query)
346
+ : this._adaptable.api.expressionApi.getAdaptableQueryExpression(query);
342
347
  }
343
348
  deleteConditionalStyles(conditionalStyles) {
344
349
  conditionalStyles.forEach((cs) => {
@@ -471,7 +476,7 @@ export class AdaptableInternalApi extends ApiBase {
471
476
  };
472
477
  }
473
478
  if (!actionColumn) {
474
- actionColumn = (_a = this.adaptable.api.actionColumnApi
479
+ actionColumn = (_a = this._adaptable.api.actionColumnApi
475
480
  .getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colDef.colId);
476
481
  }
477
482
  if (!(actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.actionColumnButton)) {
@@ -80,8 +80,7 @@ export class AlertInternalApi extends ApiBase {
80
80
  * @param alertToFire Alerts which has just triggered
81
81
  */
82
82
  publishAlertFiredEvent(alertToFire) {
83
- const adaptableApi = this.getAdaptableApi();
84
- const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableApi().internalApi.buildBaseContext());
83
+ const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableInternalApi().buildBaseContext());
85
84
  this.getEventApi().emit('AlertFired', alertFiredInfo);
86
85
  }
87
86
  /**
@@ -333,7 +332,7 @@ export class AlertInternalApi extends ApiBase {
333
332
  */
334
333
  getCustomAlertDescription(alertDefinition, dataChangedInfo) {
335
334
  var _a;
336
- const alertMessageFunction = (_a = this.adaptable.adaptableOptions.alertOptions) === null || _a === void 0 ? void 0 : _a.alertMessageText;
335
+ const alertMessageFunction = (_a = this.getAlertOptions()) === null || _a === void 0 ? void 0 : _a.alertMessageText;
337
336
  if (alertMessageFunction) {
338
337
  const alertMessageContext = {
339
338
  alertDefinition: alertDefinition,
@@ -354,7 +353,7 @@ export class AlertInternalApi extends ApiBase {
354
353
  */
355
354
  getCustomAlertMessageHeader(alertDefinition, dataChangedInfo) {
356
355
  var _a;
357
- const alertMessageFunction = (_a = this.adaptable.adaptableOptions.alertOptions) === null || _a === void 0 ? void 0 : _a.alertMessageHeader;
356
+ const alertMessageFunction = (_a = this.getAlertOptions()) === null || _a === void 0 ? void 0 : _a.alertMessageHeader;
358
357
  if (alertMessageFunction) {
359
358
  const returnText = alertMessageFunction({
360
359
  alertDefinition,
@@ -378,7 +377,7 @@ export class AlertInternalApi extends ApiBase {
378
377
  var _a, _b, _c, _d;
379
378
  let ruleDescription = ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length)
380
379
  ? (_d = (_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.map((predicate) => this.getPredicateApi().predicateToString(predicate)).join(' AND ')
381
- : this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(alertDefinition.Rule);
380
+ : this.getAdaptableInternalApi().getAdaptableQueryExpressionText(alertDefinition.Rule);
382
381
  return ruleDescription;
383
382
  }
384
383
  /**
@@ -434,14 +433,14 @@ export class AlertInternalApi extends ApiBase {
434
433
  adaptableAlertForm.buttons = (_b = adaptableAlertForm.buttons) === null || _b === void 0 ? void 0 : _b.map((button) => {
435
434
  let buttonStyle = isActionForm
436
435
  ? button.ButtonStyle
437
- : this.getAdaptableApi().internalApi.getStyleForButton(button, context);
436
+ : this.getAdaptableInternalApi().getStyleForButton(button, context);
438
437
  if (defaultMessageType && !(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone)) {
439
438
  // force the button tone to be the alert tone, if the tone is missing from button style (or button style non-existent)
440
439
  buttonStyle = Object.assign(Object.assign({}, buttonStyle), { tone: defaultMessageType.toLowerCase() });
441
440
  }
442
441
  let label = isActionForm
443
442
  ? button.Label
444
- : this.getAdaptableApi().internalApi.getLabelForButton(button, context);
443
+ : this.getAdaptableInternalApi().getLabelForButton(button, context);
445
444
  return Object.assign(Object.assign({}, button), { buttonStyle,
446
445
  label });
447
446
  });
@@ -557,7 +556,7 @@ export class AlertInternalApi extends ApiBase {
557
556
  var _a;
558
557
  const predicateDefHandlerContext = Object.assign({ value: dataChangedEvent.newValue, oldValue: dataChangedEvent.oldValue,
559
558
  // TODO send real display value
560
- displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.getAdaptableApi().internalApi.buildBaseContext());
559
+ displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.getAdaptableInternalApi().buildBaseContext());
561
560
  return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
562
561
  }
563
562
  isAlertDefinitionForRowChangeEvent(alertDefinition) {
@@ -676,7 +675,8 @@ export class AlertInternalApi extends ApiBase {
676
675
  }
677
676
  }
678
677
  if (text.indexOf('[context') !== -1) {
679
- const agGridContext = (_c = (_b = this.adaptable.agGridAdapter).getGridOption) === null || _c === void 0 ? void 0 : _c.call(_b, 'context');
678
+ const agGridContext = (_c = (_b = this.getAdaptableInternalApi()
679
+ .getAgGridAdapter()).getGridOption) === null || _c === void 0 ? void 0 : _c.call(_b, 'context');
680
680
  const agGridContextKeys = Helper.extractContextKeysFromText(text);
681
681
  for (const key of agGridContextKeys) {
682
682
  if (agGridContext[key]) {
@@ -10,7 +10,9 @@ export class CalculatedColumnInternalApi extends ApiBase {
10
10
  */
11
11
  getCalculatedColumnModuleReferences(calculatedColumn) {
12
12
  const references = [];
13
- this.adaptable.adaptableModules.forEach((module) => {
13
+ this.getAdaptableInternalApi()
14
+ .getModules()
15
+ .forEach((module) => {
14
16
  if (module
15
17
  .getModuleCalculatedColumnReferences()
16
18
  .some((moduleReference) => moduleReference.Uuid === calculatedColumn.Uuid)) {
@@ -81,7 +83,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
81
83
  }
82
84
  fireCalculatedColumnChangedEvent(trigger, calculatedColumn) {
83
85
  const adaptableApi = this.getAdaptableApi();
84
- const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.getAdaptableApi().internalApi.buildBaseContext());
86
+ const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.getAdaptableInternalApi().buildBaseContext());
85
87
  this.getAdaptableApi().eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
86
88
  }
87
89
  getColDefsForCalculatedColumns() {
@@ -92,9 +94,9 @@ export class CalculatedColumnInternalApi extends ApiBase {
92
94
  .map((calculatedColumn) => {
93
95
  const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
94
96
  if (!calculatedColumnSettings.DataType) {
95
- calculatedColumnSettings.DataType = this.getAdaptableApi()
96
- .internalApi.getAdaptableInstance()
97
- .CalculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumn.Query);
97
+ calculatedColumnSettings.DataType = this.getAdaptableInternalApi()
98
+ .getCalculatedColumnExpressionService()
99
+ .getCalculatedColumnDataType(calculatedColumn.Query);
98
100
  }
99
101
  const columnTypes = [
100
102
  AB_SPECIAL_COLUMN,
@@ -114,9 +116,9 @@ export class CalculatedColumnInternalApi extends ApiBase {
114
116
  StringExtensions.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
115
117
  return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
116
118
  }
117
- return this.getAdaptableApi()
118
- .internalApi.getAdaptableInstance()
119
- .CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
119
+ return this.getAdaptableInternalApi()
120
+ .getCalculatedColumnExpressionService()
121
+ .evaluateCalculatedColumnQuery(calculatedColumn, params.node);
120
122
  };
121
123
  const newColDef = {
122
124
  headerName: calculatedColumn.FriendlyName
@@ -141,7 +143,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
141
143
  if (calculatedColumnSettings.ShowToolTip != null &&
142
144
  calculatedColumnSettings.ShowToolTip == true) {
143
145
  newColDef.tooltipValueGetter = () => {
144
- return this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(calculatedColumn.Query);
146
+ return this.getAdaptableInternalApi().getAdaptableQueryExpressionText(calculatedColumn.Query);
145
147
  };
146
148
  }
147
149
  if (calculatedColumnSettings.HeaderToolTip) {
@@ -6,7 +6,7 @@ export class ChartingInternalApi extends ApiBase {
6
6
  ? document.querySelector(chartContainer.element)
7
7
  : chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element;
8
8
  if (!element && typeof (chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element) === 'string') {
9
- this.adaptable.logger.consoleLogByMessageType(`Chart container element not found: ${chartContainer.element}`, 'Error');
9
+ this.getAdatableLogger().consoleLogByMessageType(`Chart container element not found: ${chartContainer.element}`, 'Error');
10
10
  return null;
11
11
  }
12
12
  return element;
@@ -100,7 +100,7 @@ export class ColumnFilterInternalApi extends ApiBase {
100
100
  }
101
101
  let value = gridCell.normalisedValue;
102
102
  const predicateDefHandlerContext = Object.assign({ value: value, oldValue: null, displayValue: gridCell.displayValue, node,
103
- column }, this.getAdaptableApi().internalApi.buildBaseContext());
103
+ column }, this.getAdaptableInternalApi().buildBaseContext());
104
104
  return this.getAdaptableApi().predicateApi.handlePredicate(columnFilter.Predicate, predicateDefHandlerContext, true);
105
105
  }
106
106
  /**
@@ -163,16 +163,14 @@ export class ColumnFilterInternalApi extends ApiBase {
163
163
  * Fires Column Filter Applied Event - typically used to enable filtering on the server
164
164
  */
165
165
  fireColumnFilterAppliedEvent() {
166
- if (this.adaptable.isReady) {
167
- const adaptableApi = this.getAdaptableApi();
168
- const columnFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableApi().internalApi.buildBaseContext());
166
+ if (this.isAdapTableReady()) {
167
+ const columnFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
169
168
  this.getAdaptableApi().eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
170
169
  }
171
170
  }
172
171
  fireGridFilterAppliedEvent() {
173
- if (this.adaptable.isReady) {
174
- const adaptableApi = this.getAdaptableApi();
175
- const gridFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableApi().internalApi.buildBaseContext());
172
+ if (this.isAdapTableReady()) {
173
+ const gridFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
176
174
  this.getAdaptableApi().eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
177
175
  }
178
176
  }
@@ -199,7 +197,7 @@ export class ColumnFilterInternalApi extends ApiBase {
199
197
  getFilterValuesMaxNumberOfItems(column) {
200
198
  const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
201
199
  if (typeof maxFilterValues === 'function') {
202
- const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
200
+ const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column });
203
201
  return maxFilterValues(columnFilterContext);
204
202
  }
205
203
  else {
@@ -212,7 +210,7 @@ export class ColumnFilterInternalApi extends ApiBase {
212
210
  const availablePredicates = this.getPredicateApi().getPredicateDefsByModuleScope('columnFilter');
213
211
  let predicateIds = [];
214
212
  if (typeof (valuesFilterPredicateOptions === null || valuesFilterPredicateOptions === void 0 ? void 0 : valuesFilterPredicateOptions.predicates) === 'function') {
215
- const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
213
+ const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column });
216
214
  predicateIds = valuesFilterPredicateOptions.predicates(columnFilterContext);
217
215
  }
218
216
  else if (Array.isArray(valuesFilterPredicateOptions === null || valuesFilterPredicateOptions === void 0 ? void 0 : valuesFilterPredicateOptions.predicates)) {
@@ -12,7 +12,7 @@ export class ColumnInternalApi extends ApiBase {
12
12
  * @param columnId Column to use
13
13
  */
14
14
  getAgGridColumnType(columnId) {
15
- return this.adaptable.getAgGridColumnType(columnId);
15
+ return this._adaptable.getAgGridColumnType(columnId);
16
16
  }
17
17
  /**
18
18
  * Retrieves a list providing the Friendly Name / Caption for all columns
@@ -40,12 +40,12 @@ export class ColumnInternalApi extends ApiBase {
40
40
  * @param columnId columnId to look up
41
41
  */
42
42
  getAgGridColumnForAdaptableColumn(columnId) {
43
- return this.adaptable.getAgGridColumnForColumnId(columnId);
43
+ return this._adaptable.getAgGridColumnForColumnId(columnId);
44
44
  }
45
45
  getActiveColumnComparator(columnId, customSort, customSortComparer) {
46
46
  if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
47
47
  // defaults to AG-Grid column definition comparator if no CustomSort is defined&active
48
- const colDefComparator = this.adaptable.agGridColumnAdapter.getUserColDefProperty(columnId, 'comparator');
48
+ const colDefComparator = this._adaptable.agGridColumnAdapter.getUserColDefProperty(columnId, 'comparator');
49
49
  return colDefComparator;
50
50
  }
51
51
  // CustomSort Comparer function takes precedence over CustomSort SortedValues
@@ -7,11 +7,11 @@ export class CustomSortInternalApi extends ApiBase {
7
7
  }
8
8
  getDefaultCustomSortComparer(columnId, columnValues) {
9
9
  // have to return a function that may not have access to this
10
- const adaptable = this.adaptable;
10
+ const gridApi = this.getGridApi();
11
11
  return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
12
12
  var _a, _b;
13
- let firstElementValueString = (_a = (nodeA && adaptable.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
14
- let secondElementValueString = (_b = (nodeB && adaptable.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
13
+ let firstElementValueString = (_a = (nodeA && gridApi.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
14
+ let secondElementValueString = (_b = (nodeB && gridApi.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
15
15
  let indexFirstElement = columnValues.indexOf(firstElementValueString);
16
16
  let containsFirstElement = indexFirstElement >= 0;
17
17
  let indexSecondElement = columnValues.indexOf(secondElementValueString);
@@ -26,7 +26,7 @@ export class DashboardInternalApi extends ApiBase {
26
26
  }
27
27
  return visibleInOldState && !visibleInNewState;
28
28
  };
29
- const dashboardChangedInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { actionName: trigger, oldDashboardState,
29
+ const dashboardChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { actionName: trigger, oldDashboardState,
30
30
  newDashboardState,
31
31
  isToolbarStateChangedToVisible,
32
32
  isToolbarStateChangedToHidden });
@@ -65,13 +65,14 @@ export class DashboardInternalApi extends ApiBase {
65
65
  return `ab-CustomToolbar__${customToolbarName}__component`;
66
66
  }
67
67
  getModuleToolbars() {
68
+ const moduleService = this.getAdaptableInternalApi().getModuleService();
68
69
  return ALL_TOOLBARS.filter((moduleName) => {
69
- return this.adaptable.ModuleService.isModuleAvailable(moduleName);
70
+ return moduleService.isModuleAvailable(moduleName);
70
71
  }).map((moduleName) => {
71
72
  var _a, _b;
72
73
  return {
73
74
  id: moduleName,
74
- friendlyName: (_b = (_a = this.adaptable.ModuleService.getModuleInfoByModule(moduleName)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : moduleName,
75
+ friendlyName: (_b = (_a = moduleService.getModuleInfoByModule(moduleName)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : moduleName,
75
76
  };
76
77
  });
77
78
  }
@@ -54,8 +54,8 @@ export class DataImportInternalApi extends ApiBase {
54
54
  publishDataImportedEvent(importData, addedRows, updatedRows) {
55
55
  const dataImportedInfo = Object.assign({ importData,
56
56
  addedRows,
57
- updatedRows }, this.getAdaptableApi().internalApi.buildBaseContext());
58
- this.getAdaptableApi().internalApi.dispatchReduxAction(SystemRedux.DataImportCompleted(dataImportedInfo));
57
+ updatedRows }, this.getAdaptableInternalApi().buildBaseContext());
58
+ this.getAdaptableInternalApi().dispatchReduxAction(SystemRedux.DataImportCompleted(dataImportedInfo));
59
59
  this.getEventApi().emit('DataImported', dataImportedInfo);
60
60
  }
61
61
  }
@@ -5,8 +5,8 @@ export class DataSetInternalApi extends ApiBase {
5
5
  * @param dataSet Data Set which has been selected
6
6
  */
7
7
  fireDataSetSelectedEvent(dataSet) {
8
- if (this.adaptable.isReady) {
9
- const dataSetSelectedInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { dataSet });
8
+ if (this.isAdapTableReady()) {
9
+ const dataSetSelectedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { dataSet });
10
10
  this.getAdaptableApi().eventApi.emit('DataSetSelected', dataSetSelectedInfo);
11
11
  }
12
12
  }