@adaptabletools/adaptable-cjs 19.1.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 (129) hide show
  1. package/package.json +1 -1
  2. package/src/Api/GridApi.d.ts +2 -1
  3. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +0 -2
  4. package/src/Api/Implementation/ActionColumnApiImpl.js +1 -4
  5. package/src/Api/Implementation/ActionRowApiImpl.d.ts +1 -1
  6. package/src/Api/Implementation/ActionRowApiImpl.js +4 -4
  7. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  8. package/src/Api/Implementation/AdaptableApiImpl.js +6 -0
  9. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
  10. package/src/Api/Implementation/AlertApiImpl.js +16 -15
  11. package/src/Api/Implementation/ApiBase.d.ts +12 -3
  12. package/src/Api/Implementation/ApiBase.js +39 -24
  13. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -1
  14. package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -3
  15. package/src/Api/Implementation/CalendarApiImpl.js +1 -1
  16. package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
  17. package/src/Api/Implementation/ChartingApiImpl.js +9 -9
  18. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  19. package/src/Api/Implementation/ColumnApiImpl.js +18 -18
  20. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
  21. package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
  22. package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +0 -2
  23. package/src/Api/Implementation/ColumnMenuApiImpl.js +2 -5
  24. package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -1
  25. package/src/Api/Implementation/CommentsApiImpl.js +6 -4
  26. package/src/Api/Implementation/ConfigApiImpl.js +23 -24
  27. package/src/Api/Implementation/ContextMenuApiImpl.d.ts +0 -2
  28. package/src/Api/Implementation/ContextMenuApiImpl.js +1 -4
  29. package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -1
  30. package/src/Api/Implementation/CustomSortApiImpl.js +3 -3
  31. package/src/Api/Implementation/DashboardApiImpl.d.ts +1 -1
  32. package/src/Api/Implementation/DashboardApiImpl.js +5 -5
  33. package/src/Api/Implementation/DataImportApiImpl.d.ts +1 -1
  34. package/src/Api/Implementation/DataImportApiImpl.js +3 -3
  35. package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
  36. package/src/Api/Implementation/DataSetApiImpl.js +5 -5
  37. package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
  38. package/src/Api/Implementation/EntitlementApiImpl.js +5 -5
  39. package/src/Api/Implementation/EventApiImpl.d.ts +1 -1
  40. package/src/Api/Implementation/EventApiImpl.js +2 -2
  41. package/src/Api/Implementation/ExportApiImpl.d.ts +1 -1
  42. package/src/Api/Implementation/ExportApiImpl.js +7 -7
  43. package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
  44. package/src/Api/Implementation/ExpressionApiImpl.js +5 -5
  45. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -1
  46. package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
  47. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
  48. package/src/Api/Implementation/FlashingCellApiImpl.js +7 -7
  49. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
  50. package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
  51. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
  52. package/src/Api/Implementation/FreeTextColumnApiImpl.js +4 -4
  53. package/src/Api/Implementation/GridApiImpl.d.ts +3 -2
  54. package/src/Api/Implementation/GridApiImpl.js +106 -103
  55. package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
  56. package/src/Api/Implementation/GridFilterApiImpl.js +4 -4
  57. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
  58. package/src/Api/Implementation/LayoutApiImpl.js +3 -3
  59. package/src/Api/Implementation/NamedQueryApiImpl.d.ts +1 -1
  60. package/src/Api/Implementation/NamedQueryApiImpl.js +3 -3
  61. package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
  62. package/src/Api/Implementation/NoteApiImpl.js +3 -3
  63. package/src/Api/Implementation/OptionsApiImpl.js +7 -7
  64. package/src/Api/Implementation/PluginsApiImpl.js +1 -1
  65. package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
  66. package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
  67. package/src/Api/Implementation/PredicateApiImpl.js +4 -4
  68. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -1
  69. package/src/Api/Implementation/ScheduleApiImpl.js +3 -3
  70. package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
  71. package/src/Api/Implementation/StatusBarApiImpl.js +1 -1
  72. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -1
  73. package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
  74. package/src/Api/Implementation/SystemStatusApiImpl.d.ts +1 -1
  75. package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
  76. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -1
  77. package/src/Api/Implementation/TeamSharingApiImpl.js +11 -11
  78. package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -1
  79. package/src/Api/Implementation/ThemeApiImpl.js +8 -8
  80. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  81. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  82. package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -5
  83. package/src/Api/Internal/ActionRowInternalApi.js +8 -8
  84. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  85. package/src/Api/Internal/AdaptableInternalApi.js +55 -50
  86. package/src/Api/Internal/AlertInternalApi.js +9 -9
  87. package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -9
  88. package/src/Api/Internal/ChartingInternalApi.js +1 -1
  89. package/src/Api/Internal/ColumnFilterInternalApi.js +7 -9
  90. package/src/Api/Internal/ColumnInternalApi.js +3 -3
  91. package/src/Api/Internal/CustomSortInternalApi.js +3 -3
  92. package/src/Api/Internal/DashboardInternalApi.js +4 -3
  93. package/src/Api/Internal/DataImportInternalApi.js +2 -2
  94. package/src/Api/Internal/DataSetInternalApi.js +2 -2
  95. package/src/Api/Internal/ExportInternalApi.js +21 -22
  96. package/src/Api/Internal/ExpressionInternalApi.js +4 -4
  97. package/src/Api/Internal/Fdc3InternalApi.d.ts +0 -1
  98. package/src/Api/Internal/Fdc3InternalApi.js +9 -12
  99. package/src/Api/Internal/FlashingCellInternalApi.js +2 -2
  100. package/src/Api/Internal/FormatColumnInternalApi.js +2 -3
  101. package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -2
  102. package/src/Api/Internal/GridFilterInternalApi.js +2 -2
  103. package/src/Api/Internal/GridInternalApi.js +26 -26
  104. package/src/Api/Internal/LayoutInternalApi.js +6 -5
  105. package/src/Api/Internal/NamedQueryInternalApi.js +2 -2
  106. package/src/Api/Internal/PredicateInternalApi.js +5 -5
  107. package/src/Api/Internal/ScheduleInternalApi.js +1 -1
  108. package/src/Api/Internal/StyledColumnInternalApi.js +2 -2
  109. package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
  110. package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
  111. package/src/Api/Internal/ThemeInternalApi.js +1 -1
  112. package/src/Strategy/NoteModule.d.ts +0 -1
  113. package/src/Strategy/NoteModule.js +4 -5
  114. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  115. package/src/Utilities/Services/AggregatedScalarLiveValue.js +1 -1
  116. package/src/Utilities/Services/CellPopupService.js +4 -4
  117. package/src/Utilities/Services/Fdc3Service.js +1 -3
  118. package/src/Utilities/Services/FlashingCellService.d.ts +0 -2
  119. package/src/Utilities/Services/FlashingCellService.js +2 -3
  120. package/src/Utilities/Services/RowEditService.js +3 -5
  121. package/src/View/Alert/AlertStatusSubPanel.js +4 -4
  122. package/src/View/Charting/ShowChartButton.js +4 -4
  123. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
  124. package/src/agGrid/FloatingFilterWrapper.js +4 -3
  125. package/src/components/Datepicker/index.d.ts +1 -1
  126. package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
  127. package/src/components/ExpressionEditor/ExpressionPreview.js +4 -4
  128. package/src/env.js +2 -2
  129. package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-cjs",
3
- "version": "19.1.0",
3
+ "version": "19.1.1",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -456,7 +456,8 @@ export interface GridApi {
456
456
  * @param rowNodes agGrid RowNodes which contain cells to refresh
457
457
  * @param columnIds ColumnIds which contain cells to refresh
458
458
  */
459
- refreshCells(rowNodes: IRowNode[], columnIds: string[]): void;
459
+ refreshCells(rowNodes: IRowNode[], columnIds: string[], suppressFlash?: boolean): void;
460
+ refreshAllCells(forceUpdate?: boolean): void;
460
461
  /**
461
462
  * Refreshes a single Grid Cell
462
463
  * @param gridCell GridCell to refresh
@@ -1,9 +1,7 @@
1
1
  import { ActionColumn, ActionColumnApi } from '../../../types';
2
2
  import { ApiBase } from './ApiBase';
3
- import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
4
3
  import { ColDef } from '@ag-grid-community/core';
5
4
  export declare class ActionColumnApiImpl extends ApiBase implements ActionColumnApi {
6
- constructor(adaptable: IAdaptable);
7
5
  getActionColumns(): ActionColumn[];
8
6
  getColDefsForActionColumns(): ColDef[];
9
7
  }
@@ -5,9 +5,6 @@ const ApiBase_1 = require("./ApiBase");
5
5
  const ActionColumnRenderer_1 = require("../../agGrid/ActionColumnRenderer");
6
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
7
7
  class ActionColumnApiImpl extends ApiBase_1.ApiBase {
8
- constructor(adaptable) {
9
- super(adaptable);
10
- }
11
8
  getActionColumns() {
12
9
  var _a;
13
10
  return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
@@ -31,7 +28,7 @@ class ActionColumnApiImpl extends ApiBase_1.ApiBase {
31
28
  filter: false,
32
29
  sortable: false,
33
30
  enableRowGroup: false,
34
- cellRenderer: this.getAdaptableApi().internalApi.getAdaptableInstance().variant === 'react'
31
+ cellRenderer: this.getGridApi().getVariant() === 'react'
35
32
  ? ActionColumnRenderer_1.ReactActionColumnRenderer
36
33
  : ActionColumnRenderer_1.ActionColumnRenderer,
37
34
  type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
@@ -4,7 +4,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
4
4
  import { ActionRowInternalApi } from '../Internal/ActionRowInternalApi';
5
5
  export declare class ActionRowApiImpl extends ApiBase implements ActionRowApi {
6
6
  internalApi: ActionRowInternalApi;
7
- constructor(adaptable: IAdaptable);
7
+ constructor(_adaptable: IAdaptable);
8
8
  getActionRowButtons(): ActionRowButtonType[];
9
9
  displayEditActionRow(primaryKey: any): void;
10
10
  displayCreateActionRow(): void;
@@ -5,14 +5,14 @@ const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
5
5
  const ApiBase_1 = require("./ApiBase");
6
6
  const ActionRowInternalApi_1 = require("../Internal/ActionRowInternalApi");
7
7
  class ActionRowApiImpl extends ApiBase_1.ApiBase {
8
- constructor(adaptable) {
9
- super(adaptable);
10
- this.internalApi = new ActionRowInternalApi_1.ActionRowInternalApi(adaptable);
8
+ constructor(_adaptable) {
9
+ super(_adaptable);
10
+ this.internalApi = new ActionRowInternalApi_1.ActionRowInternalApi(_adaptable);
11
11
  }
12
12
  getActionRowButtons() {
13
13
  var actionRowButtons = this.getActionRowOptions().actionRowButtons;
14
14
  if (typeof actionRowButtons === 'function') {
15
- const context = this.getAdaptableApi().internalApi.buildBaseContext();
15
+ const context = this.getAdaptableInternalApi().buildBaseContext();
16
16
  actionRowButtons = actionRowButtons(context);
17
17
  }
18
18
  return actionRowButtons !== null && actionRowButtons !== void 0 ? actionRowButtons : [];
@@ -110,10 +110,12 @@ export declare class AdaptableApiImpl implements AdaptableApi {
110
110
  destroyApi?: boolean;
111
111
  }): void;
112
112
  isDestroyed(): boolean;
113
+ logConsoleMessage(message: string, ...optionalParams: any[]): void;
113
114
  logInfo(message: string, ...optionalParams: any[]): void;
114
115
  logSuccess(message: string, ...optionalParams: any[]): void;
115
116
  logWarn(message: string, ...optionalParams: any[]): void;
116
117
  logError(message: string, ...optionalParams: any[]): void;
118
+ consoleLog(message: string, ...optionalParams: any[]): void;
117
119
  consoleError(message: string, ...optionalParams: any[]): void;
118
120
  consoleWarn(message: string, ...optionalParams: any[]): void;
119
121
  }
@@ -169,6 +169,9 @@ class AdaptableApiImpl {
169
169
  isDestroyed() {
170
170
  return this.destroyed;
171
171
  }
172
+ logConsoleMessage(message, ...optionalParams) {
173
+ this.adaptable.logger.consoleLog(message, optionalParams);
174
+ }
172
175
  logInfo(message, ...optionalParams) {
173
176
  this.adaptable.logger.info(message, optionalParams);
174
177
  }
@@ -181,6 +184,9 @@ class AdaptableApiImpl {
181
184
  logError(message, ...optionalParams) {
182
185
  this.adaptable.logger.error(message, optionalParams);
183
186
  }
187
+ consoleLog(message, ...optionalParams) {
188
+ this.adaptable.logger.consoleLog(message, optionalParams);
189
+ }
184
190
  consoleError(message, ...optionalParams) {
185
191
  this.adaptable.logger.consoleError(message, optionalParams);
186
192
  }
@@ -8,7 +8,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
8
8
  import { AlertInternalApi } from '../Internal/AlertInternalApi';
9
9
  export declare class AlertApiImpl extends ApiBase implements AlertApi {
10
10
  internalApi: AlertInternalApi;
11
- constructor(adaptable: IAdaptable);
11
+ constructor(_adaptable: IAdaptable);
12
12
  getAlertState(): AlertState;
13
13
  getAlertDefinitions(config?: LayoutAssociatedObjectLoadConfig): AlertDefinition[];
14
14
  getSuspendedAlertDefinitions(config?: {
@@ -12,9 +12,9 @@ const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert")
12
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
13
13
  const AlertInternalApi_1 = require("../Internal/AlertInternalApi");
14
14
  class AlertApiImpl extends ApiBase_1.ApiBase {
15
- constructor(adaptable) {
16
- super(adaptable);
17
- this.internalApi = new AlertInternalApi_1.AlertInternalApi(adaptable);
15
+ constructor(_adaptable) {
16
+ super(_adaptable);
17
+ this.internalApi = new AlertInternalApi_1.AlertInternalApi(_adaptable);
18
18
  }
19
19
  getAlertState() {
20
20
  return this.getAdaptableState().Alert;
@@ -47,7 +47,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
47
47
  this.addUidToAdaptableObject(alertToShow);
48
48
  this.dispatchAction(SystemRedux.SystemAlertAdd(alertToShow, this.getAlertOptions().maxAlertsInStore));
49
49
  // 2. Publish the Alert Fired Event
50
- const alertFiredInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { alert: alertToShow });
50
+ const alertFiredInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { alert: alertToShow });
51
51
  const results = await this.getAdaptableApi().eventApi.emit('AlertFired', alertFiredInfo);
52
52
  const showPopup = results.reduce((endResult, aResult) => {
53
53
  return endResult && aResult !== false;
@@ -63,7 +63,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
63
63
  }
64
64
  // 2. Log to console
65
65
  if (alertProperties.LogToConsole) {
66
- this.adaptable.logger.consoleLogByMessageType(alertToShow.header + ': ' + alertToShow.message, alertDefinition.MessageType);
66
+ this.getAdatableLogger().consoleLogByMessageType(alertToShow.header + ': ' + alertToShow.message, alertDefinition.MessageType);
67
67
  }
68
68
  // 3. Show it in a Div (if one has been set)
69
69
  if (alertProperties.ShowInDiv) {
@@ -83,7 +83,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
83
83
  if (alertProperties.JumpToCell &&
84
84
  (0, AdaptableAlert_1.isAdaptableCellChangedAlert)(alertToShow) &&
85
85
  alertToShow.cellDataChangedInfo) {
86
- this.adaptable.jumpToCell(alertToShow.cellDataChangedInfo.column.columnId, alertToShow.cellDataChangedInfo.rowNode);
86
+ this._adaptable.jumpToCell(alertToShow.cellDataChangedInfo.column.columnId, alertToShow.cellDataChangedInfo.rowNode);
87
87
  }
88
88
  // 5: Jump to the Row
89
89
  else if (alertProperties.JumpToRow &&
@@ -91,7 +91,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
91
91
  ((_a = alertToShow.gridDataChangedInfo) === null || _a === void 0 ? void 0 : _a.rowTrigger) === 'Add') {
92
92
  const [firstRowNode] = alertToShow.gridDataChangedInfo.rowNodes;
93
93
  if (firstRowNode) {
94
- this.adaptable.jumpToRow(firstRowNode);
94
+ this._adaptable.jumpToRow(firstRowNode);
95
95
  }
96
96
  }
97
97
  // 6: For CellChanged Alerts either Highlight the cell or row
@@ -101,20 +101,20 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
101
101
  (alertProperties.HighlightCell || alertProperties.HighlightRow)) {
102
102
  let alertNode = alertToShow.cellDataChangedInfo.rowNode;
103
103
  if (!alertNode) {
104
- alertNode = this.adaptable.getRowNodeForPrimaryKey(alertToShow.cellDataChangedInfo.primaryKeyValue);
104
+ alertNode = this.getGridApi().getRowNodeForPrimaryKey(alertToShow.cellDataChangedInfo.primaryKeyValue);
105
105
  }
106
106
  if (alertNode) {
107
107
  if (alertProperties.HighlightRow) {
108
108
  this.getAdaptableApi().gridApi.refreshRowNodes([alertNode]);
109
109
  setTimeout(() => {
110
110
  this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
111
- }, this.adaptable.adaptableOptions.alertOptions.rowHighlightDuration);
111
+ }, this.getAlertOptions().rowHighlightDuration);
112
112
  }
113
113
  if (alertProperties.HighlightCell) {
114
114
  this.getAdaptableApi().gridApi.refreshCells([alertNode], [alertToShow.cellDataChangedInfo.column.columnId]);
115
115
  setTimeout(() => {
116
116
  this.dispatchAction(SystemRedux.SystemAlertRemoveCellHighlight(alertToShow));
117
- }, this.adaptable.adaptableOptions.alertOptions.cellHighlightDuration);
117
+ }, this.getAlertOptions().cellHighlightDuration);
118
118
  }
119
119
  }
120
120
  }
@@ -125,7 +125,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
125
125
  this.getAdaptableApi().gridApi.refreshRowNodes(alertToShow.gridDataChangedInfo.rowNodes);
126
126
  setTimeout(() => {
127
127
  this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
128
- }, this.adaptable.adaptableOptions.alertOptions.rowHighlightDuration);
128
+ }, this.getAlertOptions().rowHighlightDuration);
129
129
  }
130
130
  }
131
131
  }
@@ -199,7 +199,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
199
199
  });
200
200
  }
201
201
  findAlertDefinitions(criteria) {
202
- return this.getAdaptableApi().internalApi.findAdaptableObjectsByLookupCriteria(criteria, this.getAlertDefinitions({
202
+ return this.getAdaptableInternalApi().findAdaptableObjectsByLookupCriteria(criteria, this.getAlertDefinitions({
203
203
  includeLayoutNotAssociatedObjects: true,
204
204
  }));
205
205
  }
@@ -224,11 +224,12 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
224
224
  }
225
225
  createCellDataChangeInfoStubs(relevantColumnIds) {
226
226
  const cellDataChangeInfos = [];
227
+ //const adaptable: IAdaptable = this.getAdaptableInternalApi().getAdaptableInstance();
227
228
  const relevantColumns = this.getAdaptableApi()
228
229
  .columnApi.getColumnsWithColumnIds(relevantColumnIds)
229
230
  .filter(Boolean);
230
231
  const changedAt = Date.now();
231
- this.adaptable.forAllRowNodesDo((rowNode) => {
232
+ this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
232
233
  relevantColumns.forEach((column) => {
233
234
  const cellDataChangeInfoStub = {
234
235
  changedAt,
@@ -236,8 +237,8 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
236
237
  column,
237
238
  rowData: rowNode.data,
238
239
  oldValue: null,
239
- newValue: this.adaptable.getRawValueFromRowNode(rowNode, column.columnId),
240
- primaryKeyValue: this.adaptable.getPrimaryKeyValueFromRowNode(rowNode),
240
+ newValue: this.getGridApi().getRawValueFromRowNode(rowNode, column.columnId),
241
+ primaryKeyValue: this.getGridApi().getPrimaryKeyValueForRowNode(rowNode),
241
242
  };
242
243
  cellDataChangeInfos.push(cellDataChangeInfoStub);
243
244
  });
@@ -6,21 +6,27 @@ import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
6
6
  import { ModuleInfo } from '../../Strategy/Interface/IModule';
7
7
  import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
8
8
  import { AdaptableApi } from '../AdaptableApi';
9
+ import { GridApi as AgGridApi } from '@ag-grid-community/core';
9
10
  import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
10
11
  import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ColumnFilterApi, ColumnFilterOptions, ColumnOptions, CommentOptions, ConfigApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, GroupingOptions, LayoutApi, LayoutAssociatedObject, LayoutOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ColumnScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions, ColumnMenuOptions, ContextMenuOptions } from '../../types';
11
12
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
13
+ import { AdaptableInternalApi } from '../Internal/AdaptableInternalApi';
14
+ import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
15
+ import { IAdaptableStore } from '../../Redux/Store/Interface/IAdaptableStore';
12
16
  export declare abstract class ApiBase {
13
- protected adaptable: IAdaptable;
17
+ protected _adaptable: IAdaptable;
14
18
  /**
15
19
  * Constructor for all the api classes which simply takes and assigns an instance of Adaptable
16
- * @param adaptable the core IAdaptable object
20
+ * @param _adaptable the core IAdaptable object
17
21
  */
18
- constructor(adaptable: IAdaptable);
22
+ constructor(_adaptable: IAdaptable);
23
+ protected getAdatableLogger(): AdaptableLogger;
19
24
  protected logInfo(message: string, ...optionalParams: any[]): void;
20
25
  protected logSuccess(message: string, ...optionalParams: any[]): void;
21
26
  protected logWarn(message: string, ...optionalParams: any[]): void;
22
27
  protected logError(message: string, ...optionalParams: any[]): void;
23
28
  protected getAdaptableVariant(): AdaptableVariant;
29
+ protected isAdapTableReady(): boolean;
24
30
  /**
25
31
  * Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
26
32
  *
@@ -46,6 +52,7 @@ export declare abstract class ApiBase {
46
52
  * This is a simple *getState()* call
47
53
  */
48
54
  getAdaptableState(): AdaptableState;
55
+ protected getAdaptableSore(): IAdaptableStore;
49
56
  protected addUidToAdaptableObject(adaptableObject: AdaptableObject): void;
50
57
  protected getModuleInfoByModuleId(module: AdaptableModule): ModuleInfo;
51
58
  protected showModulePopup(module: AdaptableModule, moduleParams?: ModuleParams): void;
@@ -85,6 +92,8 @@ export declare abstract class ApiBase {
85
92
  protected getSettingsPanelOptions(): SettingsPanelOptions;
86
93
  protected getFdc3Options(): Fdc3Options;
87
94
  protected getAdaptableApi(): AdaptableApi;
95
+ protected getAgGridApi(): AgGridApi;
96
+ protected getAdaptableInternalApi(): AdaptableInternalApi;
88
97
  protected getActionColumnApi(): ActionColumnApi;
89
98
  protected getActionRowApi(): ActionRowApi;
90
99
  protected getApplicationApi(): ApplicationApi;
@@ -8,25 +8,31 @@ const Uuid_1 = require("../../PredefinedConfig/Uuid");
8
8
  class ApiBase {
9
9
  /**
10
10
  * Constructor for all the api classes which simply takes and assigns an instance of Adaptable
11
- * @param adaptable the core IAdaptable object
11
+ * @param _adaptable the core IAdaptable object
12
12
  */
13
- constructor(adaptable) {
14
- this.adaptable = adaptable;
13
+ constructor(_adaptable) {
14
+ this._adaptable = _adaptable;
15
+ }
16
+ getAdatableLogger() {
17
+ return this._adaptable.logger;
15
18
  }
16
19
  logInfo(message, ...optionalParams) {
17
- this.adaptable.logger.info(message, ...optionalParams);
20
+ this._adaptable.logger.info(message, ...optionalParams);
18
21
  }
19
22
  logSuccess(message, ...optionalParams) {
20
- this.adaptable.logger.success(message, ...optionalParams);
23
+ this._adaptable.logger.success(message, ...optionalParams);
21
24
  }
22
25
  logWarn(message, ...optionalParams) {
23
- this.adaptable.logger.warn(message, ...optionalParams);
26
+ this._adaptable.logger.warn(message, ...optionalParams);
24
27
  }
25
28
  logError(message, ...optionalParams) {
26
- this.adaptable.logger.error(message, ...optionalParams);
29
+ this._adaptable.logger.error(message, ...optionalParams);
27
30
  }
28
31
  getAdaptableVariant() {
29
- return this.adaptable.variant;
32
+ return this._adaptable.variant;
33
+ }
34
+ isAdapTableReady() {
35
+ return this._adaptable.isReady;
30
36
  }
31
37
  /**
32
38
  * Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
@@ -55,19 +61,19 @@ class ApiBase {
55
61
  return objectList;
56
62
  }
57
63
  const associatedLayout = (config === null || config === void 0 ? void 0 : config.associatedWithLayout)
58
- ? this.adaptable.api.layoutApi.getLayoutByName(config.associatedWithLayout)
64
+ ? this._adaptable.api.layoutApi.getLayoutByName(config.associatedWithLayout)
59
65
  : this.getAdaptableApi().layoutApi.getCurrentLayout();
60
- return objectList.filter((objectItem) => this.adaptable.api.layoutApi.internalApi.isObjectAvailableInLayout(objectItem, module, associatedLayout));
66
+ return objectList.filter((objectItem) => this._adaptable.api.layoutApi.internalApi.isObjectAvailableInLayout(objectItem, module, associatedLayout));
61
67
  }
62
68
  /**
63
69
  * Base api Helper method that dispatches a *Redux Action* to the Store
64
70
  * @param action the Redux Action to be dispatched
65
71
  */
66
72
  dispatchAction(action) {
67
- if (this.adaptable.isDestroyed) {
73
+ if (this._adaptable.isDestroyed) {
68
74
  return;
69
75
  }
70
- this.adaptable.adaptableStore.TheStore.dispatch(action);
76
+ this._adaptable.adaptableStore.TheStore.dispatch(action);
71
77
  }
72
78
  /**
73
79
  * Returns the entire State from the Store
@@ -75,7 +81,10 @@ class ApiBase {
75
81
  * This is a simple *getState()* call
76
82
  */
77
83
  getAdaptableState() {
78
- return this.adaptable.adaptableStore.TheStore.getState();
84
+ return this.getAdaptableSore().TheStore.getState();
85
+ }
86
+ getAdaptableSore() {
87
+ return this._adaptable.adaptableStore;
79
88
  }
80
89
  // Add the Uuid to the object if not present;
81
90
  // It's generally done in Redux also but no harm checking in Api also in case we missed it.
@@ -85,16 +94,16 @@ class ApiBase {
85
94
  }
86
95
  }
87
96
  getModuleInfoByModuleId(module) {
88
- return this.adaptable.ModuleService.getModuleInfoByModule(module);
97
+ return this._adaptable.ModuleService.getModuleInfoByModule(module);
89
98
  }
90
99
  showModulePopup(module, moduleParams) {
91
100
  let moduleInfo = this.getModuleInfoByModuleId(module);
92
101
  if (moduleInfo) {
93
- this.adaptable.api.internalApi.showPopupScreen(moduleInfo.ModuleName, moduleInfo.Popup, moduleParams);
102
+ this._adaptable.api.internalApi.showPopupScreen(moduleInfo.ModuleName, moduleInfo.Popup, moduleParams);
94
103
  }
95
104
  }
96
105
  getOptions() {
97
- return this.adaptable.adaptableOptions;
106
+ return this._adaptable.adaptableOptions;
98
107
  }
99
108
  getActionColumnOptions() {
100
109
  return this.getOptions().actionColumnOptions;
@@ -181,25 +190,31 @@ class ApiBase {
181
190
  return this.getOptions().toolPanelOptions;
182
191
  }
183
192
  getChartingOptions() {
184
- return this.adaptable.adaptableOptions.chartingOptions;
193
+ return this.getOptions().chartingOptions;
185
194
  }
186
195
  getDataChangeHistoryOptions() {
187
- return this.adaptable.adaptableOptions.dataChangeHistoryOptions;
196
+ return this.getOptions().dataChangeHistoryOptions;
188
197
  }
189
198
  getEntitlementOptions() {
190
- return this.adaptable.adaptableOptions.entitlementOptions;
199
+ return this.getOptions().entitlementOptions;
191
200
  }
192
201
  getFlashingCellOptions() {
193
- return this.adaptable.adaptableOptions.flashingCellOptions;
202
+ return this.getOptions().flashingCellOptions;
194
203
  }
195
204
  getSettingsPanelOptions() {
196
- return this.adaptable.adaptableOptions.settingsPanelOptions;
205
+ return this.getOptions().settingsPanelOptions;
197
206
  }
198
207
  getFdc3Options() {
199
- return this.adaptable.adaptableOptions.fdc3Options;
208
+ return this.getOptions().fdc3Options;
200
209
  }
201
210
  getAdaptableApi() {
202
- return this.adaptable.api;
211
+ return this._adaptable.api;
212
+ }
213
+ getAgGridApi() {
214
+ return this.getAdaptableApi().agGridApi;
215
+ }
216
+ getAdaptableInternalApi() {
217
+ return this.getAdaptableApi().internalApi;
203
218
  }
204
219
  getActionColumnApi() {
205
220
  return this.getAdaptableApi().actionColumnApi;
@@ -334,7 +349,7 @@ class ApiBase {
334
349
  return this.getAdaptableApi().fdc3Api;
335
350
  }
336
351
  destroy() {
337
- delete this.adaptable;
352
+ delete this._adaptable;
338
353
  }
339
354
  }
340
355
  exports.ApiBase = ApiBase;
@@ -5,7 +5,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
5
5
  import { CalculatedColumnInternalApi } from '../Internal/CalculatedColumnInternalApi';
6
6
  export declare class CalculatedColumnApiImpl extends ApiBase implements CalculatedColumnApi {
7
7
  internalApi: CalculatedColumnInternalApi;
8
- constructor(adaptable: IAdaptable);
8
+ constructor(_adaptable: IAdaptable);
9
9
  getCalculatedColumnState(): CalculatedColumnState;
10
10
  getCalculatedColumns(): CalculatedColumn[];
11
11
  getCalculatedColumnById(id: CalculatedColumn['Uuid']): CalculatedColumn;
@@ -7,9 +7,9 @@ const ApiBase_1 = require("./ApiBase");
7
7
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
8
  const CalculatedColumnInternalApi_1 = require("../Internal/CalculatedColumnInternalApi");
9
9
  class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
10
- constructor(adaptable) {
11
- super(adaptable);
12
- this.internalApi = new CalculatedColumnInternalApi_1.CalculatedColumnInternalApi(adaptable);
10
+ constructor(_adaptable) {
11
+ super(_adaptable);
12
+ this.internalApi = new CalculatedColumnInternalApi_1.CalculatedColumnInternalApi(_adaptable);
13
13
  }
14
14
  getCalculatedColumnState() {
15
15
  return this.getAdaptableState().CalculatedColumn;
@@ -45,7 +45,7 @@ class CalendarApiImpl extends ApiBase_1.ApiBase {
45
45
  const holidays = this.getCalendarOptions().holidays;
46
46
  if (holidays) {
47
47
  if (typeof holidays === 'function') {
48
- return holidays(this.getAdaptableApi().internalApi.buildBaseContext());
48
+ return holidays(this.getAdaptableInternalApi().buildBaseContext());
49
49
  }
50
50
  else {
51
51
  return holidays;
@@ -5,7 +5,7 @@ import { ChartContainer, ChartDefinition } from '../../types';
5
5
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
6
6
  import { ExternalChartDefinition } from '../../PredefinedConfig/ChartingState';
7
7
  export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
8
- constructor(adaptable: IAdaptable);
8
+ constructor(_adaptable: IAdaptable);
9
9
  isChartingEnabled(): boolean;
10
10
  getCurrentChartModels(): ChartModel[];
11
11
  getChartRef(chartId: string): ChartRef;
@@ -9,18 +9,18 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectF
9
9
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
10
10
  const ChartingInternalApi_1 = require("../Internal/ChartingInternalApi");
11
11
  class ChartingApiImpl extends ApiBase_1.ApiBase {
12
- constructor(adaptable) {
13
- super(adaptable);
14
- this.internalApi = new ChartingInternalApi_1.ChartingInternalApi(adaptable);
12
+ constructor(_adaptable) {
13
+ super(_adaptable);
14
+ this.internalApi = new ChartingInternalApi_1.ChartingInternalApi(_adaptable);
15
15
  }
16
16
  isChartingEnabled() {
17
- return this.adaptable.canGenerateCharts();
17
+ return this._adaptable.canGenerateCharts();
18
18
  }
19
19
  getCurrentChartModels() {
20
- return this.adaptable.getChartModels();
20
+ return this._adaptable.getChartModels();
21
21
  }
22
22
  getChartRef(chartId) {
23
- return this.adaptable.getChartRef(chartId);
23
+ return this._adaptable.getChartRef(chartId);
24
24
  }
25
25
  saveCurrentCharts() {
26
26
  const currentCharts = this.getCurrentChartModels();
@@ -49,14 +49,14 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
49
49
  }
50
50
  }
51
51
  showPersistedCharts() {
52
- return this.adaptable.showCharts(this.getChartDefinitions());
52
+ return this._adaptable.showCharts(this.getChartDefinitions());
53
53
  }
54
54
  showChartDefinition(chartDefiniton, container) {
55
55
  let containerElement = container;
56
56
  if (typeof containerElement === 'string') {
57
57
  containerElement = this.internalApi.getContainerElemetnByName(containerElement);
58
58
  }
59
- return this.adaptable.showChart(chartDefiniton, containerElement);
59
+ return this._adaptable.showChart(chartDefiniton, containerElement);
60
60
  }
61
61
  showChartDefinitionOnce(chartDefinition, container) {
62
62
  var _a;
@@ -77,7 +77,7 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
77
77
  this.updateAgChart(editedChartDefinition);
78
78
  }
79
79
  updateAgChart(chartDefinition) {
80
- this.adaptable.updateChart(chartDefinition);
80
+ this._adaptable.updateChart(chartDefinition);
81
81
  }
82
82
  addChartDefinition(chart) {
83
83
  this.dispatchAction(ChartingRedux.ChartingAddChart(chart));
@@ -8,7 +8,7 @@ export declare function isAutoRowGroupColumn(columnId: string): boolean;
8
8
  export declare function isAutoPivotColumn(columnId: string): boolean;
9
9
  export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
10
10
  internalApi: ColumnInternalApi;
11
- constructor(adaptable: IAdaptable);
11
+ constructor(_adaptable: IAdaptable);
12
12
  getColumns(): AdaptableColumn[];
13
13
  getStandardColumns(): AdaptableColumn[];
14
14
  getNonSpecialColumns(): AdaptableColumn[];
@@ -23,9 +23,9 @@ function isAutoPivotColumn(columnId) {
23
23
  }
24
24
  exports.isAutoPivotColumn = isAutoPivotColumn;
25
25
  class ColumnApiImpl extends ApiBase_1.ApiBase {
26
- constructor(adaptable) {
27
- super(adaptable);
28
- this.internalApi = new ColumnInternalApi_1.ColumnInternalApi(adaptable);
26
+ constructor(_adaptable) {
27
+ super(_adaptable);
28
+ this.internalApi = new ColumnInternalApi_1.ColumnInternalApi(_adaptable);
29
29
  }
30
30
  getColumns() {
31
31
  var _a;
@@ -50,34 +50,34 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
50
50
  return this.getColumns().filter((c) => visibleCols[c.columnId]);
51
51
  }
52
52
  selectColumn(columnId) {
53
- this.adaptable.selectColumn(columnId);
53
+ this._adaptable.selectColumn(columnId);
54
54
  }
55
55
  selectColumns(columnIds) {
56
- this.adaptable.selectColumns(columnIds);
56
+ this._adaptable.selectColumns(columnIds);
57
57
  }
58
58
  addColumnToSelection(columnId) {
59
- this.adaptable.selectColumn(columnId, { keepExistingSelection: true });
59
+ this._adaptable.selectColumn(columnId, { keepExistingSelection: true });
60
60
  }
61
61
  addColumnsToSelection(columnIds) {
62
- this.adaptable.selectColumns(columnIds, { keepExistingSelection: true });
62
+ this._adaptable.selectColumns(columnIds, { keepExistingSelection: true });
63
63
  }
64
64
  selectAllColumns() {
65
- this.adaptable.selectAll();
65
+ this._adaptable.selectAll();
66
66
  }
67
67
  autosizeColumn(columnId) {
68
- this.adaptable.autoSizeColumn(columnId);
68
+ this._adaptable.autoSizeColumn(columnId);
69
69
  }
70
70
  autosizeColumns(columnIds) {
71
- this.adaptable.autoSizeColumns(columnIds);
71
+ this._adaptable.autoSizeColumns(columnIds);
72
72
  }
73
73
  autosizeAllColumns() {
74
- this.adaptable.autoSizeAllColumns();
74
+ this._adaptable.autoSizeAllColumns();
75
75
  }
76
76
  hideColumn(columnId) {
77
- this.adaptable.hideColumn(columnId);
77
+ this._adaptable.hideColumn(columnId);
78
78
  }
79
79
  showColumn(columnId) {
80
- this.adaptable.showColumn(columnId);
80
+ this._adaptable.showColumn(columnId);
81
81
  }
82
82
  isAutoRowGroupColumn(columnId) {
83
83
  return isAutoRowGroupColumn(columnId);
@@ -334,7 +334,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
334
334
  return this.getColumns().filter((c) => c.exportable);
335
335
  }
336
336
  logMissingColumnWarning(columnId) {
337
- if (this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning === true) {
337
+ if (this.getColumnOptions().showMissingColumnsWarning === true) {
338
338
  if (!this.isAutoRowGroupColumn(columnId) &&
339
339
  !this.isCalculatedColumn(columnId) &&
340
340
  !this.isFreeTextColumn(columnId) &&
@@ -344,7 +344,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
344
344
  }
345
345
  }
346
346
  getPrimaryKeyColumn() {
347
- return this.getColumnWithColumnId(this.adaptable.adaptableOptions.primaryKey);
347
+ return this.getColumnWithColumnId(this.getOptions().primaryKey);
348
348
  }
349
349
  getDefaultAggFunc(columnId) {
350
350
  var _a, _b, _c;
@@ -391,15 +391,15 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
391
391
  return this.getAdaptableApi().layoutApi.setColumnCaption(columnId, caption);
392
392
  }
393
393
  updateColumnConfiguration(columnConfig) {
394
- (0, logDeprecation_1.logDeprecationExternal)(this.adaptable.logger, 'ColumnApi', 'updateColumnConfiguration', 'GridApi', 'updateAgGridColumnState');
394
+ (0, logDeprecation_1.logDeprecationExternal)(this.getAdatableLogger(), 'ColumnApi', 'updateColumnConfiguration', 'GridApi', 'updateAgGridColumnState');
395
395
  this.getGridApi().updateAgGridColumnState(columnConfig);
396
396
  }
397
397
  updateColumnConfigurations(columnConfigs) {
398
- (0, logDeprecation_1.logDeprecationExternal)(this.adaptable.logger, 'ColumnApi', 'updateColumnConfigurations', 'GridApi', 'updateAgGridColumnStates');
398
+ (0, logDeprecation_1.logDeprecationExternal)(this.getAdatableLogger(), 'ColumnApi', 'updateColumnConfigurations', 'GridApi', 'updateAgGridColumnStates');
399
399
  this.getGridApi().updateAgGridColumnStates(columnConfigs);
400
400
  }
401
401
  setColumnDefinitions(columnDefinitions) {
402
- (0, logDeprecation_1.logDeprecationExternal)(this.adaptable.logger, 'ColumnApi', 'setColumnDefinitions', 'GridApi', 'setAgGridColumnDefinitions');
402
+ (0, logDeprecation_1.logDeprecationExternal)(this.getAdatableLogger(), 'ColumnApi', 'setColumnDefinitions', 'GridApi', 'setAgGridColumnDefinitions');
403
403
  this.getGridApi().setAgGridColumnDefinitions(columnDefinitions);
404
404
  }
405
405
  }
@@ -7,7 +7,7 @@ import { ColumnFilterInternalApi } from '../Internal/ColumnFilterInternalApi';
7
7
  import { ColumnFilterApi } from '../ColumnFilterApi';
8
8
  export declare class ColumnFilterApiImpl extends ApiBase implements ColumnFilterApi {
9
9
  internalApi: ColumnFilterInternalApi;
10
- constructor(adaptable: IAdaptable);
10
+ constructor(_adaptable: IAdaptable);
11
11
  getFilterPredicateDefsForColumn(column: AdaptableColumn): AdaptablePredicateDef[];
12
12
  getFilterPredicateDefsForColumnId(columnId: string): AdaptablePredicateDef[] | undefined;
13
13
  showQuickFilterBar(): void;