@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "19.1.0-canary.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",
@@ -16,19 +16,19 @@ export interface FormatColumnOptions {
16
16
  */
17
17
  export interface CustomDisplayFormatter {
18
18
  /**
19
- * Format Id
19
+ * Custom Format Id
20
20
  */
21
21
  id: string;
22
22
  /**
23
- * Format Description
23
+ * Custom Format Description
24
24
  */
25
25
  label?: string;
26
26
  /**
27
- * Function used to render Custom Display Format
27
+ * Function used to render the Custom Display Format
28
28
  */
29
29
  handler: (customDisplayFormatterContext: CustomDisplayFormatterContext) => any;
30
30
  /**
31
- * Where Custom Display Format can be applied
31
+ * Used by Format Columns wizard to show where Custom Display Format can be applied
32
32
  */
33
33
  scope: ColumnScope;
34
34
  }
@@ -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
  }
@@ -2,9 +2,6 @@ import { ApiBase } from './ApiBase';
2
2
  import { ActionColumnRenderer, ReactActionColumnRenderer } from '../../agGrid/ActionColumnRenderer';
3
3
  import { AB_SPECIAL_COLUMN } from '../../Utilities/Constants/GeneralConstants';
4
4
  export class ActionColumnApiImpl extends ApiBase {
5
- constructor(adaptable) {
6
- super(adaptable);
7
- }
8
5
  getActionColumns() {
9
6
  var _a;
10
7
  return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
@@ -28,7 +25,7 @@ export class ActionColumnApiImpl extends ApiBase {
28
25
  filter: false,
29
26
  sortable: false,
30
27
  enableRowGroup: false,
31
- cellRenderer: this.getAdaptableApi().internalApi.getAdaptableInstance().variant === 'react'
28
+ cellRenderer: this.getGridApi().getVariant() === 'react'
32
29
  ? ReactActionColumnRenderer
33
30
  : ActionColumnRenderer,
34
31
  type: [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;
@@ -2,14 +2,14 @@ import { PopupShowForm } from '../../Redux/ActionsReducers/PopupRedux';
2
2
  import { ApiBase } from './ApiBase';
3
3
  import { ActionRowInternalApi } from '../Internal/ActionRowInternalApi';
4
4
  export class ActionRowApiImpl extends ApiBase {
5
- constructor(adaptable) {
6
- super(adaptable);
7
- this.internalApi = new ActionRowInternalApi(adaptable);
5
+ constructor(_adaptable) {
6
+ super(_adaptable);
7
+ this.internalApi = new ActionRowInternalApi(_adaptable);
8
8
  }
9
9
  getActionRowButtons() {
10
10
  var actionRowButtons = this.getActionRowOptions().actionRowButtons;
11
11
  if (typeof actionRowButtons === 'function') {
12
- const context = this.getAdaptableApi().internalApi.buildBaseContext();
12
+ const context = this.getAdaptableInternalApi().buildBaseContext();
13
13
  actionRowButtons = actionRowButtons(context);
14
14
  }
15
15
  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
  }
@@ -166,6 +166,9 @@ export class AdaptableApiImpl {
166
166
  isDestroyed() {
167
167
  return this.destroyed;
168
168
  }
169
+ logConsoleMessage(message, ...optionalParams) {
170
+ this.adaptable.logger.consoleLog(message, optionalParams);
171
+ }
169
172
  logInfo(message, ...optionalParams) {
170
173
  this.adaptable.logger.info(message, optionalParams);
171
174
  }
@@ -178,6 +181,9 @@ export class AdaptableApiImpl {
178
181
  logError(message, ...optionalParams) {
179
182
  this.adaptable.logger.error(message, optionalParams);
180
183
  }
184
+ consoleLog(message, ...optionalParams) {
185
+ this.adaptable.logger.consoleLog(message, optionalParams);
186
+ }
181
187
  consoleError(message, ...optionalParams) {
182
188
  this.adaptable.logger.consoleError(message, optionalParams);
183
189
  }
@@ -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?: {
@@ -8,9 +8,9 @@ import { isAdaptableCellChangedAlert, isAdaptableRowChangedAlert, } from '../../
8
8
  import StringExtensions from '../../Utilities/Extensions/StringExtensions';
9
9
  import { AlertInternalApi } from '../Internal/AlertInternalApi';
10
10
  export class AlertApiImpl extends ApiBase {
11
- constructor(adaptable) {
12
- super(adaptable);
13
- this.internalApi = new AlertInternalApi(adaptable);
11
+ constructor(_adaptable) {
12
+ super(_adaptable);
13
+ this.internalApi = new AlertInternalApi(_adaptable);
14
14
  }
15
15
  getAlertState() {
16
16
  return this.getAdaptableState().Alert;
@@ -43,7 +43,7 @@ export class AlertApiImpl extends ApiBase {
43
43
  this.addUidToAdaptableObject(alertToShow);
44
44
  this.dispatchAction(SystemRedux.SystemAlertAdd(alertToShow, this.getAlertOptions().maxAlertsInStore));
45
45
  // 2. Publish the Alert Fired Event
46
- const alertFiredInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { alert: alertToShow });
46
+ const alertFiredInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { alert: alertToShow });
47
47
  const results = await this.getAdaptableApi().eventApi.emit('AlertFired', alertFiredInfo);
48
48
  const showPopup = results.reduce((endResult, aResult) => {
49
49
  return endResult && aResult !== false;
@@ -59,7 +59,7 @@ export class AlertApiImpl extends ApiBase {
59
59
  }
60
60
  // 2. Log to console
61
61
  if (alertProperties.LogToConsole) {
62
- this.adaptable.logger.consoleLogByMessageType(alertToShow.header + ': ' + alertToShow.message, alertDefinition.MessageType);
62
+ this.getAdatableLogger().consoleLogByMessageType(alertToShow.header + ': ' + alertToShow.message, alertDefinition.MessageType);
63
63
  }
64
64
  // 3. Show it in a Div (if one has been set)
65
65
  if (alertProperties.ShowInDiv) {
@@ -79,7 +79,7 @@ export class AlertApiImpl extends ApiBase {
79
79
  if (alertProperties.JumpToCell &&
80
80
  isAdaptableCellChangedAlert(alertToShow) &&
81
81
  alertToShow.cellDataChangedInfo) {
82
- this.adaptable.jumpToCell(alertToShow.cellDataChangedInfo.column.columnId, alertToShow.cellDataChangedInfo.rowNode);
82
+ this._adaptable.jumpToCell(alertToShow.cellDataChangedInfo.column.columnId, alertToShow.cellDataChangedInfo.rowNode);
83
83
  }
84
84
  // 5: Jump to the Row
85
85
  else if (alertProperties.JumpToRow &&
@@ -87,7 +87,7 @@ export class AlertApiImpl extends ApiBase {
87
87
  ((_a = alertToShow.gridDataChangedInfo) === null || _a === void 0 ? void 0 : _a.rowTrigger) === 'Add') {
88
88
  const [firstRowNode] = alertToShow.gridDataChangedInfo.rowNodes;
89
89
  if (firstRowNode) {
90
- this.adaptable.jumpToRow(firstRowNode);
90
+ this._adaptable.jumpToRow(firstRowNode);
91
91
  }
92
92
  }
93
93
  // 6: For CellChanged Alerts either Highlight the cell or row
@@ -97,20 +97,20 @@ export class AlertApiImpl extends ApiBase {
97
97
  (alertProperties.HighlightCell || alertProperties.HighlightRow)) {
98
98
  let alertNode = alertToShow.cellDataChangedInfo.rowNode;
99
99
  if (!alertNode) {
100
- alertNode = this.adaptable.getRowNodeForPrimaryKey(alertToShow.cellDataChangedInfo.primaryKeyValue);
100
+ alertNode = this.getGridApi().getRowNodeForPrimaryKey(alertToShow.cellDataChangedInfo.primaryKeyValue);
101
101
  }
102
102
  if (alertNode) {
103
103
  if (alertProperties.HighlightRow) {
104
104
  this.getAdaptableApi().gridApi.refreshRowNodes([alertNode]);
105
105
  setTimeout(() => {
106
106
  this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
107
- }, this.adaptable.adaptableOptions.alertOptions.rowHighlightDuration);
107
+ }, this.getAlertOptions().rowHighlightDuration);
108
108
  }
109
109
  if (alertProperties.HighlightCell) {
110
110
  this.getAdaptableApi().gridApi.refreshCells([alertNode], [alertToShow.cellDataChangedInfo.column.columnId]);
111
111
  setTimeout(() => {
112
112
  this.dispatchAction(SystemRedux.SystemAlertRemoveCellHighlight(alertToShow));
113
- }, this.adaptable.adaptableOptions.alertOptions.cellHighlightDuration);
113
+ }, this.getAlertOptions().cellHighlightDuration);
114
114
  }
115
115
  }
116
116
  }
@@ -121,7 +121,7 @@ export class AlertApiImpl extends ApiBase {
121
121
  this.getAdaptableApi().gridApi.refreshRowNodes(alertToShow.gridDataChangedInfo.rowNodes);
122
122
  setTimeout(() => {
123
123
  this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
124
- }, this.adaptable.adaptableOptions.alertOptions.rowHighlightDuration);
124
+ }, this.getAlertOptions().rowHighlightDuration);
125
125
  }
126
126
  }
127
127
  }
@@ -195,7 +195,7 @@ export class AlertApiImpl extends ApiBase {
195
195
  });
196
196
  }
197
197
  findAlertDefinitions(criteria) {
198
- return this.getAdaptableApi().internalApi.findAdaptableObjectsByLookupCriteria(criteria, this.getAlertDefinitions({
198
+ return this.getAdaptableInternalApi().findAdaptableObjectsByLookupCriteria(criteria, this.getAlertDefinitions({
199
199
  includeLayoutNotAssociatedObjects: true,
200
200
  }));
201
201
  }
@@ -220,11 +220,12 @@ export class AlertApiImpl extends ApiBase {
220
220
  }
221
221
  createCellDataChangeInfoStubs(relevantColumnIds) {
222
222
  const cellDataChangeInfos = [];
223
+ //const adaptable: IAdaptable = this.getAdaptableInternalApi().getAdaptableInstance();
223
224
  const relevantColumns = this.getAdaptableApi()
224
225
  .columnApi.getColumnsWithColumnIds(relevantColumnIds)
225
226
  .filter(Boolean);
226
227
  const changedAt = Date.now();
227
- this.adaptable.forAllRowNodesDo((rowNode) => {
228
+ this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
228
229
  relevantColumns.forEach((column) => {
229
230
  const cellDataChangeInfoStub = {
230
231
  changedAt,
@@ -232,8 +233,8 @@ export class AlertApiImpl extends ApiBase {
232
233
  column,
233
234
  rowData: rowNode.data,
234
235
  oldValue: null,
235
- newValue: this.adaptable.getRawValueFromRowNode(rowNode, column.columnId),
236
- primaryKeyValue: this.adaptable.getPrimaryKeyValueFromRowNode(rowNode),
236
+ newValue: this.getGridApi().getRawValueFromRowNode(rowNode, column.columnId),
237
+ primaryKeyValue: this.getGridApi().getPrimaryKeyValueForRowNode(rowNode),
237
238
  };
238
239
  cellDataChangeInfos.push(cellDataChangeInfoStub);
239
240
  });
@@ -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;
@@ -4,25 +4,31 @@ import { createUuid } from '../../PredefinedConfig/Uuid';
4
4
  export class ApiBase {
5
5
  /**
6
6
  * Constructor for all the api classes which simply takes and assigns an instance of Adaptable
7
- * @param adaptable the core IAdaptable object
7
+ * @param _adaptable the core IAdaptable object
8
8
  */
9
- constructor(adaptable) {
10
- this.adaptable = adaptable;
9
+ constructor(_adaptable) {
10
+ this._adaptable = _adaptable;
11
+ }
12
+ getAdatableLogger() {
13
+ return this._adaptable.logger;
11
14
  }
12
15
  logInfo(message, ...optionalParams) {
13
- this.adaptable.logger.info(message, ...optionalParams);
16
+ this._adaptable.logger.info(message, ...optionalParams);
14
17
  }
15
18
  logSuccess(message, ...optionalParams) {
16
- this.adaptable.logger.success(message, ...optionalParams);
19
+ this._adaptable.logger.success(message, ...optionalParams);
17
20
  }
18
21
  logWarn(message, ...optionalParams) {
19
- this.adaptable.logger.warn(message, ...optionalParams);
22
+ this._adaptable.logger.warn(message, ...optionalParams);
20
23
  }
21
24
  logError(message, ...optionalParams) {
22
- this.adaptable.logger.error(message, ...optionalParams);
25
+ this._adaptable.logger.error(message, ...optionalParams);
23
26
  }
24
27
  getAdaptableVariant() {
25
- return this.adaptable.variant;
28
+ return this._adaptable.variant;
29
+ }
30
+ isAdapTableReady() {
31
+ return this._adaptable.isReady;
26
32
  }
27
33
  /**
28
34
  * Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
@@ -51,19 +57,19 @@ export class ApiBase {
51
57
  return objectList;
52
58
  }
53
59
  const associatedLayout = (config === null || config === void 0 ? void 0 : config.associatedWithLayout)
54
- ? this.adaptable.api.layoutApi.getLayoutByName(config.associatedWithLayout)
60
+ ? this._adaptable.api.layoutApi.getLayoutByName(config.associatedWithLayout)
55
61
  : this.getAdaptableApi().layoutApi.getCurrentLayout();
56
- return objectList.filter((objectItem) => this.adaptable.api.layoutApi.internalApi.isObjectAvailableInLayout(objectItem, module, associatedLayout));
62
+ return objectList.filter((objectItem) => this._adaptable.api.layoutApi.internalApi.isObjectAvailableInLayout(objectItem, module, associatedLayout));
57
63
  }
58
64
  /**
59
65
  * Base api Helper method that dispatches a *Redux Action* to the Store
60
66
  * @param action the Redux Action to be dispatched
61
67
  */
62
68
  dispatchAction(action) {
63
- if (this.adaptable.isDestroyed) {
69
+ if (this._adaptable.isDestroyed) {
64
70
  return;
65
71
  }
66
- this.adaptable.adaptableStore.TheStore.dispatch(action);
72
+ this._adaptable.adaptableStore.TheStore.dispatch(action);
67
73
  }
68
74
  /**
69
75
  * Returns the entire State from the Store
@@ -71,7 +77,10 @@ export class ApiBase {
71
77
  * This is a simple *getState()* call
72
78
  */
73
79
  getAdaptableState() {
74
- return this.adaptable.adaptableStore.TheStore.getState();
80
+ return this.getAdaptableSore().TheStore.getState();
81
+ }
82
+ getAdaptableSore() {
83
+ return this._adaptable.adaptableStore;
75
84
  }
76
85
  // Add the Uuid to the object if not present;
77
86
  // It's generally done in Redux also but no harm checking in Api also in case we missed it.
@@ -81,16 +90,16 @@ export class ApiBase {
81
90
  }
82
91
  }
83
92
  getModuleInfoByModuleId(module) {
84
- return this.adaptable.ModuleService.getModuleInfoByModule(module);
93
+ return this._adaptable.ModuleService.getModuleInfoByModule(module);
85
94
  }
86
95
  showModulePopup(module, moduleParams) {
87
96
  let moduleInfo = this.getModuleInfoByModuleId(module);
88
97
  if (moduleInfo) {
89
- this.adaptable.api.internalApi.showPopupScreen(moduleInfo.ModuleName, moduleInfo.Popup, moduleParams);
98
+ this._adaptable.api.internalApi.showPopupScreen(moduleInfo.ModuleName, moduleInfo.Popup, moduleParams);
90
99
  }
91
100
  }
92
101
  getOptions() {
93
- return this.adaptable.adaptableOptions;
102
+ return this._adaptable.adaptableOptions;
94
103
  }
95
104
  getActionColumnOptions() {
96
105
  return this.getOptions().actionColumnOptions;
@@ -177,25 +186,31 @@ export class ApiBase {
177
186
  return this.getOptions().toolPanelOptions;
178
187
  }
179
188
  getChartingOptions() {
180
- return this.adaptable.adaptableOptions.chartingOptions;
189
+ return this.getOptions().chartingOptions;
181
190
  }
182
191
  getDataChangeHistoryOptions() {
183
- return this.adaptable.adaptableOptions.dataChangeHistoryOptions;
192
+ return this.getOptions().dataChangeHistoryOptions;
184
193
  }
185
194
  getEntitlementOptions() {
186
- return this.adaptable.adaptableOptions.entitlementOptions;
195
+ return this.getOptions().entitlementOptions;
187
196
  }
188
197
  getFlashingCellOptions() {
189
- return this.adaptable.adaptableOptions.flashingCellOptions;
198
+ return this.getOptions().flashingCellOptions;
190
199
  }
191
200
  getSettingsPanelOptions() {
192
- return this.adaptable.adaptableOptions.settingsPanelOptions;
201
+ return this.getOptions().settingsPanelOptions;
193
202
  }
194
203
  getFdc3Options() {
195
- return this.adaptable.adaptableOptions.fdc3Options;
204
+ return this.getOptions().fdc3Options;
196
205
  }
197
206
  getAdaptableApi() {
198
- return this.adaptable.api;
207
+ return this._adaptable.api;
208
+ }
209
+ getAgGridApi() {
210
+ return this.getAdaptableApi().agGridApi;
211
+ }
212
+ getAdaptableInternalApi() {
213
+ return this.getAdaptableApi().internalApi;
199
214
  }
200
215
  getActionColumnApi() {
201
216
  return this.getAdaptableApi().actionColumnApi;
@@ -330,6 +345,6 @@ export class ApiBase {
330
345
  return this.getAdaptableApi().fdc3Api;
331
346
  }
332
347
  destroy() {
333
- delete this.adaptable;
348
+ delete this._adaptable;
334
349
  }
335
350
  }
@@ -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;
@@ -3,9 +3,9 @@ import { ApiBase } from './ApiBase';
3
3
  import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
4
4
  import { CalculatedColumnInternalApi } from '../Internal/CalculatedColumnInternalApi';
5
5
  export class CalculatedColumnApiImpl extends ApiBase {
6
- constructor(adaptable) {
7
- super(adaptable);
8
- this.internalApi = new CalculatedColumnInternalApi(adaptable);
6
+ constructor(_adaptable) {
7
+ super(_adaptable);
8
+ this.internalApi = new CalculatedColumnInternalApi(_adaptable);
9
9
  }
10
10
  getCalculatedColumnState() {
11
11
  return this.getAdaptableState().CalculatedColumn;
@@ -42,7 +42,7 @@ export class CalendarApiImpl extends ApiBase {
42
42
  const holidays = this.getCalendarOptions().holidays;
43
43
  if (holidays) {
44
44
  if (typeof holidays === 'function') {
45
- return holidays(this.getAdaptableApi().internalApi.buildBaseContext());
45
+ return holidays(this.getAdaptableInternalApi().buildBaseContext());
46
46
  }
47
47
  else {
48
48
  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;
@@ -5,18 +5,18 @@ import ObjectFactory from '../../Utilities/ObjectFactory';
5
5
  import StringExtensions from '../../Utilities/Extensions/StringExtensions';
6
6
  import { ChartingInternalApi } from '../Internal/ChartingInternalApi';
7
7
  export class ChartingApiImpl extends ApiBase {
8
- constructor(adaptable) {
9
- super(adaptable);
10
- this.internalApi = new ChartingInternalApi(adaptable);
8
+ constructor(_adaptable) {
9
+ super(_adaptable);
10
+ this.internalApi = new ChartingInternalApi(_adaptable);
11
11
  }
12
12
  isChartingEnabled() {
13
- return this.adaptable.canGenerateCharts();
13
+ return this._adaptable.canGenerateCharts();
14
14
  }
15
15
  getCurrentChartModels() {
16
- return this.adaptable.getChartModels();
16
+ return this._adaptable.getChartModels();
17
17
  }
18
18
  getChartRef(chartId) {
19
- return this.adaptable.getChartRef(chartId);
19
+ return this._adaptable.getChartRef(chartId);
20
20
  }
21
21
  saveCurrentCharts() {
22
22
  const currentCharts = this.getCurrentChartModels();
@@ -45,14 +45,14 @@ export class ChartingApiImpl extends ApiBase {
45
45
  }
46
46
  }
47
47
  showPersistedCharts() {
48
- return this.adaptable.showCharts(this.getChartDefinitions());
48
+ return this._adaptable.showCharts(this.getChartDefinitions());
49
49
  }
50
50
  showChartDefinition(chartDefiniton, container) {
51
51
  let containerElement = container;
52
52
  if (typeof containerElement === 'string') {
53
53
  containerElement = this.internalApi.getContainerElemetnByName(containerElement);
54
54
  }
55
- return this.adaptable.showChart(chartDefiniton, containerElement);
55
+ return this._adaptable.showChart(chartDefiniton, containerElement);
56
56
  }
57
57
  showChartDefinitionOnce(chartDefinition, container) {
58
58
  var _a;
@@ -73,7 +73,7 @@ export class ChartingApiImpl extends ApiBase {
73
73
  this.updateAgChart(editedChartDefinition);
74
74
  }
75
75
  updateAgChart(chartDefinition) {
76
- this.adaptable.updateChart(chartDefinition);
76
+ this._adaptable.updateChart(chartDefinition);
77
77
  }
78
78
  addChartDefinition(chart) {
79
79
  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[];