@adaptabletools/adaptable 19.1.2 → 19.2.0

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 (63) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/CommentOptions.d.ts +1 -1
  3. package/src/{agGrid/defaultAdaptableOptions.d.ts → AdaptableOptions/DefaultAdaptableOptions.d.ts} +1 -1
  4. package/src/{agGrid/defaultAdaptableOptions.js → AdaptableOptions/DefaultAdaptableOptions.js} +3 -3
  5. package/src/AdaptableOptions/EditOptions.d.ts +4 -0
  6. package/src/AdaptableOptions/NoteOptions.d.ts +1 -1
  7. package/src/Api/GridApi.d.ts +3 -3
  8. package/src/Api/Implementation/ActionRowApiImpl.js +2 -2
  9. package/src/Api/Implementation/AlertApiImpl.js +6 -6
  10. package/src/Api/Implementation/ChartingApiImpl.js +4 -4
  11. package/src/Api/Implementation/ColumnApiImpl.js +5 -5
  12. package/src/Api/Implementation/ColumnFilterApiImpl.js +9 -9
  13. package/src/Api/Implementation/ColumnScopeApiImpl.js +8 -8
  14. package/src/Api/Implementation/ConfigApiImpl.js +2 -2
  15. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +1 -1
  16. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -2
  17. package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
  18. package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
  19. package/src/Api/Implementation/GridApiImpl.js +16 -19
  20. package/src/Api/Implementation/LayoutApiImpl.js +4 -4
  21. package/src/Api/Implementation/PredicateApiImpl.js +2 -2
  22. package/src/Api/Implementation/ScheduleApiImpl.js +2 -2
  23. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -1
  24. package/src/Api/Implementation/ThemeApiImpl.js +2 -2
  25. package/src/Api/Implementation/UserInterfaceApiImpl.js +6 -6
  26. package/src/Api/Internal/ActionRowInternalApi.js +9 -10
  27. package/src/Api/Internal/AdaptableInternalApi.js +2 -2
  28. package/src/Api/Internal/AlertInternalApi.js +3 -3
  29. package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
  30. package/src/Api/Internal/ChartingInternalApi.js +7 -7
  31. package/src/Api/Internal/ColumnFilterInternalApi.js +8 -8
  32. package/src/Api/Internal/CustomSortInternalApi.js +1 -1
  33. package/src/Api/Internal/DashboardInternalApi.js +1 -1
  34. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  35. package/src/Api/Internal/ExportInternalApi.js +37 -37
  36. package/src/Api/Internal/ExpressionInternalApi.js +1 -1
  37. package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
  38. package/src/Api/Internal/FormatColumnInternalApi.js +8 -8
  39. package/src/Api/Internal/GridInternalApi.d.ts +7 -0
  40. package/src/Api/Internal/GridInternalApi.js +20 -3
  41. package/src/Api/Internal/LayoutInternalApi.js +3 -3
  42. package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
  43. package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
  44. package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
  45. package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
  46. package/src/Api/StatusBarApi.d.ts +2 -2
  47. package/src/PredefinedConfig/Common/AdaptableSearchState.d.ts +22 -0
  48. package/src/PredefinedConfig/Common/AdaptableSearchState.js +1 -0
  49. package/src/PredefinedConfig/PredefinedConfig.d.ts +4 -4
  50. package/src/Strategy/BulkUpdateModule.js +0 -12
  51. package/src/Strategy/PlusMinusModule.js +24 -24
  52. package/src/Strategy/SmartEditModule.js +0 -11
  53. package/src/Utilities/Services/MetamodelService.js +1 -1
  54. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +1 -1
  55. package/src/agGrid/Adaptable.js +1 -1
  56. package/src/agGrid/AdaptableAgGrid.js +1 -1
  57. package/src/agGrid/AgGridAdapter.js +4 -1
  58. package/src/agGrid/AgGridColumnAdapter.js +15 -12
  59. package/src/env.js +2 -2
  60. package/src/metamodel/adaptable.metamodel.d.ts +18 -2
  61. package/src/metamodel/adaptable.metamodel.js +1 -1
  62. package/src/types.d.ts +1 -1
  63. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -41,21 +41,21 @@ export class UserInterfaceApiImpl extends ApiBase {
41
41
  // columns id
42
42
  permittedValuesItem = permittedValues.find((permittedValue) => {
43
43
  return ('ColumnIds' in permittedValue.scope &&
44
- this.getAdaptableApi().columnScopeApi.isColumnInScope(column, permittedValue.scope));
44
+ this.getColumnScopeApi().isColumnInScope(column, permittedValue.scope));
45
45
  });
46
46
  if (permittedValuesItem) {
47
47
  return permittedValuesItem;
48
48
  }
49
49
  permittedValuesItem = permittedValues.find((permittedValue) => {
50
50
  return ('DataTypes' in permittedValue.scope &&
51
- this.getAdaptableApi().columnScopeApi.isColumnInScope(column, permittedValue.scope));
51
+ this.getColumnScopeApi().isColumnInScope(column, permittedValue.scope));
52
52
  });
53
53
  if (permittedValuesItem) {
54
54
  return permittedValuesItem;
55
55
  }
56
56
  permittedValuesItem = permittedValues.find((permittedValue) => {
57
57
  return ('All' in permittedValue.scope &&
58
- this.getAdaptableApi().columnScopeApi.isColumnInScope(column, permittedValue.scope));
58
+ this.getColumnScopeApi().isColumnInScope(column, permittedValue.scope));
59
59
  });
60
60
  if (permittedValuesItem) {
61
61
  return permittedValuesItem;
@@ -137,7 +137,7 @@ export class UserInterfaceApiImpl extends ApiBase {
137
137
  if (!editLookUpItem || !gridCell || !gridCell.column) {
138
138
  return undefined;
139
139
  }
140
- return this.getAdaptableApi().gridApi.internalApi.getEditLookUpValuesForColumn(editLookUpItem, gridCell.column, gridCell);
140
+ return this.getGridApi().internalApi.getEditLookUpValuesForColumn(editLookUpItem, gridCell.column, gridCell);
141
141
  }
142
142
  getEditableCellStyle() {
143
143
  return this.getUserInterfaceOptions().editableCellStyle;
@@ -161,9 +161,9 @@ export class UserInterfaceApiImpl extends ApiBase {
161
161
  }
162
162
  }
163
163
  getCustomIconDefinition(iconName) {
164
- var _a, _b;
164
+ var _a;
165
165
  let customIcon = undefined;
166
- const customIcons = (_b = (_a = this.getAdaptableApi().optionsApi.getAdaptableOptions().userInterfaceOptions) === null || _a === void 0 ? void 0 : _a.customIcons) !== null && _b !== void 0 ? _b : [];
166
+ const customIcons = (_a = this.getUserInterfaceOptions().customIcons) !== null && _a !== void 0 ? _a : [];
167
167
  customIcon = customIcons.find((icon) => icon.name === iconName);
168
168
  if (customIcon) {
169
169
  return customIcon.icon;
@@ -45,13 +45,12 @@ export class ActionRowInternalApi extends ApiBase {
45
45
  return Object.assign(Object.assign({ rowNode }, this.getAdaptableInternalApi().buildBaseContext()), { type: type });
46
46
  }
47
47
  buildActionRowFields(actionRowType, rowNode) {
48
- const relevantColumns = this.getAdaptableApi()
49
- .columnApi.getColumns()
48
+ const relevantColumns = this.getColumnApi().getColumns()
50
49
  .filter((column) => {
51
50
  // if there is NO rowNode, do NOT display the non-editable fields as they will be empty
52
51
  return !!rowNode || this.isCellEditable(column, rowNode);
53
52
  })
54
- .filter((column) => !this.getAdaptableApi().columnApi.isActionRowButtonColumn(column.columnId) &&
53
+ .filter((column) => !this.getColumnApi().isActionRowButtonColumn(column.columnId) &&
55
54
  this.showColumnInActionRowForm(column, actionRowType));
56
55
  return relevantColumns.map((column) => this.buildFormField(actionRowType, column, rowNode));
57
56
  }
@@ -88,7 +87,7 @@ export class ActionRowInternalApi extends ApiBase {
88
87
  // we need to filter out the textOutput fields and add the primaryKey
89
88
  const eventInfo = type === 'rowCreated'
90
89
  ? Object.assign(Object.assign({ type: 'rowCreated', formData: this.prepareCreateData(formFields, context) }, this.getAdaptableInternalApi().buildBaseContext()), { clonedRowNode: rowNode }) : Object.assign({ type: 'rowEdited', formData: this.prepareEditData(formFields, context), rowNode: rowNode }, this.getAdaptableInternalApi().buildBaseContext());
91
- this.getAdaptableApi().eventApi.emit('ActionRowSubmitted', eventInfo);
90
+ this.getEventApi().emit('ActionRowSubmitted', eventInfo);
92
91
  (_b = (_a = this.actionRowFormOptions) === null || _a === void 0 ? void 0 : _a.onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
93
92
  },
94
93
  };
@@ -120,8 +119,8 @@ export class ActionRowInternalApi extends ApiBase {
120
119
  if (!rowNode) {
121
120
  return !column.readOnly;
122
121
  }
123
- const gridCell = this.getAdaptableApi().gridApi.getGridCellFromRowNode(rowNode, column.columnId);
124
- return this.getAdaptableApi().gridApi.isCellEditable(gridCell);
122
+ const gridCell = this.getGridApi().getGridCellFromRowNode(rowNode, column.columnId);
123
+ return this.getGridApi().isCellEditable(gridCell);
125
124
  }
126
125
  buildFormField(type, column, rowNode) {
127
126
  const isCellEditable = this.isCellEditable(column, rowNode);
@@ -133,8 +132,8 @@ export class ActionRowInternalApi extends ApiBase {
133
132
  : 'textOutput';
134
133
  const defaultValue = rowNode
135
134
  ? isCellEditable
136
- ? this.getAdaptableApi().gridApi.getRawValueFromRowNode(rowNode, column.columnId)
137
- : this.getAdaptableApi().gridApi.getDisplayValueFromRowNode(rowNode, column.columnId)
135
+ ? this.getGridApi().getRawValueFromRowNode(rowNode, column.columnId)
136
+ : this.getGridApi().getDisplayValueFromRowNode(rowNode, column.columnId)
138
137
  : null;
139
138
  return {
140
139
  label: this.getFormFieldLabel(type, column, rowNode),
@@ -173,9 +172,9 @@ export class ActionRowInternalApi extends ApiBase {
173
172
  return;
174
173
  }
175
174
  const gridCell = rowNode
176
- ? this.getAdaptableApi().gridApi.getGridCellFromRowNode(rowNode, column.columnId)
175
+ ? this.getGridApi().getGridCellFromRowNode(rowNode, column.columnId)
177
176
  : undefined;
178
- const editLookUpValues = this.getAdaptableApi().gridApi.internalApi.getEditLookUpValuesForColumn(editLookUpItem, column, gridCell);
177
+ const editLookUpValues = this.getGridApi().internalApi.getEditLookUpValuesForColumn(editLookUpItem, column, gridCell);
179
178
  return editLookUpValues === null || editLookUpValues === void 0 ? void 0 : editLookUpValues.map((value) => ({
180
179
  value,
181
180
  label: value,
@@ -439,7 +439,7 @@ export class AdaptableInternalApi extends ApiBase {
439
439
  }
440
440
  // lastly filter by scope
441
441
  if (scope) {
442
- locatedAdaptableObjects = locatedAdaptableObjects.filter((adaptableObject) => this.getAdaptableApi().columnScopeApi.isScopeInScope(adaptableObject.Scope, scope));
442
+ locatedAdaptableObjects = locatedAdaptableObjects.filter((adaptableObject) => this.getColumnScopeApi().isScopeInScope(adaptableObject.Scope, scope));
443
443
  }
444
444
  return locatedAdaptableObjects;
445
445
  }
@@ -453,7 +453,7 @@ export class AdaptableInternalApi extends ApiBase {
453
453
  getActionButtonsAndActionColumn(colDef) {
454
454
  var _a;
455
455
  let actionColumn;
456
- if (this.getAdaptableApi().columnApi.isActionRowButtonColumn(colDef.colId)) {
456
+ if (this.getColumnApi().isActionRowButtonColumn(colDef.colId)) {
457
457
  const actionButtons = this.getActionRowApi().internalApi.getActionRowButtonDefs();
458
458
  actionColumn = {
459
459
  columnId: ADAPTABLE_ROW_ACTION_BUTTONS,
@@ -502,7 +502,7 @@ export class AlertInternalApi extends ApiBase {
502
502
  getAlertDefinitionsForCellDataChange(dataChangedEvent) {
503
503
  const allActiveNonReactiveDefinitions = this.getActiveNonReactiveAlertDefinitions();
504
504
  let relatedAlertDefinitions = allActiveNonReactiveDefinitions
505
- .filter((v) => this.getAdaptableApi().columnScopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
505
+ .filter((v) => this.getColumnScopeApi().isColumnInScope(dataChangedEvent.column, v.Scope))
506
506
  .filter((alertDefinition) => !isReactiveQuery(alertDefinition.Rule));
507
507
  let triggeredAlerts = [];
508
508
  if (ArrayExtensions.IsNotNullOrEmpty(relatedAlertDefinitions)) {
@@ -511,7 +511,7 @@ export class AlertInternalApi extends ApiBase {
511
511
  let expression = alertDefinition.Rule.BooleanExpression;
512
512
  let rowNode = dataChangedEvent.rowNode;
513
513
  if (!rowNode) {
514
- rowNode = this.getAdaptableApi().gridApi.getRowNodeForPrimaryKey(dataChangedEvent.primaryKeyValue);
514
+ rowNode = this.getGridApi().getRowNodeForPrimaryKey(dataChangedEvent.primaryKeyValue);
515
515
  }
516
516
  const isValidExpression = this.getAdaptableApi().expressionApi.isValidBooleanExpression(expression, 'Alert', `Invalid Alert boolean expression '${expression}'`);
517
517
  const isSatisfiedExpression = isValidExpression &&
@@ -557,7 +557,7 @@ export class AlertInternalApi extends ApiBase {
557
557
  const predicateDefHandlerContext = Object.assign({ value: dataChangedEvent.newValue, oldValue: dataChangedEvent.oldValue,
558
558
  // TODO send real display value
559
559
  displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.getAdaptableInternalApi().buildBaseContext());
560
- return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
560
+ return this.getPredicateApi().handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
561
561
  }
562
562
  isAlertDefinitionForRowChangeEvent(alertDefinition) {
563
563
  return (this.isAlertDefinitionForAddedRowChangeEvent(alertDefinition) ||
@@ -84,7 +84,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
84
84
  fireCalculatedColumnChangedEvent(trigger, calculatedColumn) {
85
85
  const adaptableApi = this.getAdaptableApi();
86
86
  const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.getAdaptableInternalApi().buildBaseContext());
87
- this.getAdaptableApi().eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
87
+ this.getEventApi().emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
88
88
  }
89
89
  getColDefsForCalculatedColumns() {
90
90
  const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
@@ -12,8 +12,8 @@ export class ChartingInternalApi extends ApiBase {
12
12
  return element;
13
13
  }
14
14
  getContainerElemetnByName(containerName) {
15
- var _a, _b, _c;
16
- const chartContainers = (_c = (_b = (_a = this.getAdaptableApi().optionsApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.chartingOptions) === null || _b === void 0 ? void 0 : _b.chartContainers) !== null && _c !== void 0 ? _c : [];
15
+ var _a;
16
+ const chartContainers = (_a = this.getChartingOptions().chartContainers) !== null && _a !== void 0 ? _a : [];
17
17
  const chartContainer = chartContainers.find((container) => container.name === containerName);
18
18
  return this.getContainerElement(chartContainer);
19
19
  }
@@ -24,7 +24,7 @@ export class ChartingInternalApi extends ApiBase {
24
24
  }
25
25
  // External lib charting service
26
26
  isExternalChartOpened(chartDefinition) {
27
- const externalChartingOptions = this.getAdaptableApi().optionsApi.getChartingOptions().externalChartingOptions;
27
+ const externalChartingOptions = this.getChartingOptions().externalChartingOptions;
28
28
  if (!(externalChartingOptions === null || externalChartingOptions === void 0 ? void 0 : externalChartingOptions.isChartOpened)) {
29
29
  return false;
30
30
  }
@@ -34,28 +34,28 @@ export class ChartingInternalApi extends ApiBase {
34
34
  return externalChartingOptions.isChartOpened(Object.assign({ chartDefinition: chartDefinition }, createBaseContext(this.getAdaptableApi())));
35
35
  }
36
36
  onHideExternalChart(chartDefinition) {
37
- const externalChartingOptions = this.getAdaptableApi().optionsApi.getChartingOptions().externalChartingOptions;
37
+ const externalChartingOptions = this.getChartingOptions().externalChartingOptions;
38
38
  if (!(externalChartingOptions === null || externalChartingOptions === void 0 ? void 0 : externalChartingOptions.onHideChart)) {
39
39
  return;
40
40
  }
41
41
  externalChartingOptions.onHideChart(Object.assign({ chartDefinition: chartDefinition }, createBaseContext(this.getAdaptableApi())));
42
42
  }
43
43
  onShowExternalChart(chartDefinition, container) {
44
- const externalChartingOptions = this.getAdaptableApi().optionsApi.getChartingOptions().externalChartingOptions;
44
+ const externalChartingOptions = this.getChartingOptions().externalChartingOptions;
45
45
  if (!(externalChartingOptions === null || externalChartingOptions === void 0 ? void 0 : externalChartingOptions.onShowChart)) {
46
46
  return;
47
47
  }
48
48
  externalChartingOptions.onShowChart(Object.assign({ chartDefinition: chartDefinition, container: container }, createBaseContext(this.getAdaptableApi())));
49
49
  }
50
50
  onPreviewExternalChart(chartDefinition, container) {
51
- const externalChartingOptions = this.getAdaptableApi().optionsApi.getChartingOptions().externalChartingOptions;
51
+ const externalChartingOptions = this.getChartingOptions().externalChartingOptions;
52
52
  if (!(externalChartingOptions === null || externalChartingOptions === void 0 ? void 0 : externalChartingOptions.onPreviewChart)) {
53
53
  return;
54
54
  }
55
55
  return externalChartingOptions.onPreviewChart(Object.assign({ chartDefinition: chartDefinition, container: container }, createBaseContext(this.getAdaptableApi())));
56
56
  }
57
57
  onDeleteExternalChart(chartDefinition) {
58
- const externalChartingOptions = this.getAdaptableApi().optionsApi.getChartingOptions().externalChartingOptions;
58
+ const externalChartingOptions = this.getChartingOptions().externalChartingOptions;
59
59
  if (!(externalChartingOptions === null || externalChartingOptions === void 0 ? void 0 : externalChartingOptions.onDeleteChart)) {
60
60
  return;
61
61
  }
@@ -43,7 +43,7 @@ export class ColumnFilterInternalApi extends ApiBase {
43
43
  const filter = {
44
44
  ColumnId: column.columnId,
45
45
  Predicate: {
46
- PredicateId: this.getAdaptableApi().predicateApi.internalApi.getEqualityPredicateForDataType(column.dataType),
46
+ PredicateId: this.getPredicateApi().internalApi.getEqualityPredicateForDataType(column.dataType),
47
47
  Inputs: [...new Set([gridCell.rawValue])],
48
48
  },
49
49
  };
@@ -55,11 +55,11 @@ export class ColumnFilterInternalApi extends ApiBase {
55
55
  * @param columnFilter Column Filter to use
56
56
  */
57
57
  columnFilterToString(columnFilter) {
58
- const friendlyName = this.getAdaptableApi().columnApi.getFriendlyNameForColumnId(columnFilter.ColumnId);
58
+ const friendlyName = this.getColumnApi().getFriendlyNameForColumnId(columnFilter.ColumnId);
59
59
  return ('[' +
60
60
  friendlyName +
61
61
  '] ' +
62
- this.getAdaptableApi().predicateApi.predicateToString(columnFilter.Predicate));
62
+ this.getPredicateApi().predicateToString(columnFilter.Predicate));
63
63
  }
64
64
  /**
65
65
  * Retrieves descriptions of given Column Filters
@@ -90,18 +90,18 @@ export class ColumnFilterInternalApi extends ApiBase {
90
90
  if (someInputsAreEmpty) {
91
91
  return true;
92
92
  }
93
- const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnFilter.ColumnId);
93
+ const column = this.getColumnApi().getColumnWithColumnId(columnFilter.ColumnId);
94
94
  if (!column) {
95
95
  return true;
96
96
  }
97
- const gridCell = this.getAdaptableApi().gridApi.getGridCellFromRowNode(node, columnFilter.ColumnId);
97
+ const gridCell = this.getGridApi().getGridCellFromRowNode(node, columnFilter.ColumnId);
98
98
  if (!gridCell) {
99
99
  return true;
100
100
  }
101
101
  let value = gridCell.normalisedValue;
102
102
  const predicateDefHandlerContext = Object.assign({ value: value, oldValue: null, displayValue: gridCell.displayValue, node,
103
103
  column }, this.getAdaptableInternalApi().buildBaseContext());
104
- return this.getAdaptableApi().predicateApi.handlePredicate(columnFilter.Predicate, predicateDefHandlerContext, true);
104
+ return this.getPredicateApi().handlePredicate(columnFilter.Predicate, predicateDefHandlerContext, true);
105
105
  }
106
106
  /**
107
107
  * Checks if the filter action should trigger Column Filtering
@@ -165,13 +165,13 @@ export class ColumnFilterInternalApi extends ApiBase {
165
165
  fireColumnFilterAppliedEvent() {
166
166
  if (this.isAdapTableReady()) {
167
167
  const columnFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
168
- this.getAdaptableApi().eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
168
+ this.getEventApi().emit('ColumnFilterApplied', columnFilterAppliedInfo);
169
169
  }
170
170
  }
171
171
  fireGridFilterAppliedEvent() {
172
172
  if (this.isAdapTableReady()) {
173
173
  const gridFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
174
- this.getAdaptableApi().eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
174
+ this.getEventApi().emit('GridFilterApplied', gridFilterAppliedInfo);
175
175
  }
176
176
  }
177
177
  /**
@@ -3,7 +3,7 @@ export class CustomSortInternalApi extends ApiBase {
3
3
  getCustomSortComparer(columnId) {
4
4
  var _a;
5
5
  const column = this.getColumnApi().getColumnWithColumnId(columnId);
6
- return (_a = this.getCustomSortOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.getAdaptableApi().columnScopeApi.isColumnInScope(column, csc.scope));
6
+ return (_a = this.getCustomSortOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.getColumnScopeApi().isColumnInScope(column, csc.scope));
7
7
  }
8
8
  getDefaultCustomSortComparer(columnId, columnValues) {
9
9
  // have to return a function that may not have access to this
@@ -31,7 +31,7 @@ export class DashboardInternalApi extends ApiBase {
31
31
  isToolbarStateChangedToVisible,
32
32
  isToolbarStateChangedToHidden });
33
33
  if (!isEqual(oldDashboardState, newDashboardState)) {
34
- setTimeout(() => this.getAdaptableApi().eventApi.emit('DashboardChanged', dashboardChangedInfo));
34
+ setTimeout(() => this.getEventApi().emit('DashboardChanged', dashboardChangedInfo));
35
35
  }
36
36
  }
37
37
  isToolbarInActiveTab(toolbarName, dashboardState) {
@@ -7,7 +7,7 @@ export class DataSetInternalApi extends ApiBase {
7
7
  fireDataSetSelectedEvent(dataSet) {
8
8
  if (this.isAdapTableReady()) {
9
9
  const dataSetSelectedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { dataSet });
10
- this.getAdaptableApi().eventApi.emit('DataSetSelected', dataSetSelectedInfo);
10
+ this.getEventApi().emit('DataSetSelected', dataSetSelectedInfo);
11
11
  }
12
12
  }
13
13
  }
@@ -33,12 +33,12 @@ export class ExportInternalApi extends ApiBase {
33
33
  break;
34
34
  case 'ScopeColumns':
35
35
  // use the Scope object which will tell us if the Column is relevant
36
- if (!this.getAdaptableApi().columnScopeApi.isColumnInScopeColumns(cellDataChangedInfo.column, report.Scope)) {
36
+ if (!this.getColumnScopeApi().isColumnInScopeColumns(cellDataChangedInfo.column, report.Scope)) {
37
37
  return false;
38
38
  }
39
39
  break;
40
40
  case 'SelectedColumns':
41
- let selectedCellInfo = this.getAdaptableApi().gridApi.getSelectedCellInfo();
41
+ let selectedCellInfo = this.getGridApi().getSelectedCellInfo();
42
42
  if (selectedCellInfo) {
43
43
  if (selectedCellInfo.columns.find((c) => c.columnId == cellDataChangedInfo.column.columnId) == null) {
44
44
  return false;
@@ -59,7 +59,7 @@ export class ExportInternalApi extends ApiBase {
59
59
  case 'ExpressionRows':
60
60
  return true; // TODO this is the only difficult one - do we check AdapTableQL? if we can then that is good as we can then do a delta after all...
61
61
  case 'SelectedCellRows':
62
- let selectedCellInfo = this.getAdaptableApi().gridApi.getSelectedCellInfo();
62
+ let selectedCellInfo = this.getGridApi().getSelectedCellInfo();
63
63
  if (selectedCellInfo && selectedCellInfo.gridCells) {
64
64
  if (selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == cellDataChangedInfo.primaryKeyValue)) {
65
65
  return true;
@@ -67,7 +67,7 @@ export class ExportInternalApi extends ApiBase {
67
67
  }
68
68
  return false;
69
69
  case 'SelectedRows':
70
- let selectedRowInfo = this.getAdaptableApi().gridApi.getSelectedRowInfo();
70
+ let selectedRowInfo = this.getGridApi().getSelectedRowInfo();
71
71
  if (selectedRowInfo && selectedRowInfo.gridRows) {
72
72
  if (selectedRowInfo.gridRows.find((gr) => gr.primaryKeyValue == cellDataChangedInfo.primaryKeyValue)) {
73
73
  return true;
@@ -217,10 +217,10 @@ export class ExportInternalApi extends ApiBase {
217
217
  }
218
218
  isSystemReportActive(reportName) {
219
219
  if (reportName == SELECTED_CELLS_REPORT) {
220
- return this.getAdaptableApi().gridApi.isGridRangeSelectable();
220
+ return this.getGridApi().isGridRangeSelectable();
221
221
  }
222
222
  if (reportName == SELECTED_ROWS_REPORT) {
223
- return this.getAdaptableApi().gridApi.isGridRowSelectable();
223
+ return this.getGridApi().isGridRowSelectable();
224
224
  }
225
225
  if (reportName === VISUAL_DATA_REPORT) {
226
226
  return this.getAdaptableApi()
@@ -231,13 +231,13 @@ export class ExportInternalApi extends ApiBase {
231
231
  }
232
232
  isSystemExportDestinationActive(exportDestination) {
233
233
  if (exportDestination === ExportDestination.Excel) {
234
- return this.getAdaptableApi().exportApi.canExportToExcel();
234
+ return this.getExportApi().canExportToExcel();
235
235
  }
236
236
  return true;
237
237
  }
238
238
  getReportColumnScopeShortDescription(report) {
239
239
  var _a, _b;
240
- if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
240
+ if (this.getExportApi().isExternalReport(report)) {
241
241
  return ['[Custom Columns]'];
242
242
  }
243
243
  switch (report.ReportColumnScope) {
@@ -249,13 +249,13 @@ export class ExportInternalApi extends ApiBase {
249
249
  return ['[Selected Columns]'];
250
250
  case 'ScopeColumns':
251
251
  if ('ColumnIds' in (report === null || report === void 0 ? void 0 : report.Scope)) {
252
- return (_b = (_a = report.Scope.ColumnIds).map) === null || _b === void 0 ? void 0 : _b.call(_a, (columnId) => { var _a; return (_a = this.getAdaptableApi().columnApi.getFriendlyNameForColumnId(columnId)) !== null && _a !== void 0 ? _a : columnId; });
252
+ return (_b = (_a = report.Scope.ColumnIds).map) === null || _b === void 0 ? void 0 : _b.call(_a, (columnId) => { var _a; return (_a = this.getColumnApi().getFriendlyNameForColumnId(columnId)) !== null && _a !== void 0 ? _a : columnId; });
253
253
  }
254
254
  return ['[Bespoke Columns]'];
255
255
  }
256
256
  }
257
257
  getReportColumnScopeLongDescription(report) {
258
- if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
258
+ if (this.getExportApi().isExternalReport(report)) {
259
259
  return '[Custom Columns]';
260
260
  }
261
261
  switch (report.ReportColumnScope) {
@@ -266,11 +266,11 @@ export class ExportInternalApi extends ApiBase {
266
266
  case 'SelectedColumns':
267
267
  return '[Selected Columns]';
268
268
  case 'ScopeColumns':
269
- return this.getAdaptableApi().columnScopeApi.getScopeDescription(report.Scope);
269
+ return this.getColumnScopeApi().getScopeDescription(report.Scope);
270
270
  }
271
271
  }
272
272
  getReportExpressionDescription(report, cols) {
273
- if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
273
+ if (this.getExportApi().isExternalReport(report)) {
274
274
  return '[Custom Data]';
275
275
  }
276
276
  if (this.isSystemReport(report.Name)) {
@@ -305,8 +305,8 @@ export class ExportInternalApi extends ApiBase {
305
305
  }
306
306
  getReportDataColumns(report, includePrimaryKey = false) {
307
307
  let reportColumns = [];
308
- let gridColumns = this.getAdaptableApi().columnApi.getExportableColumns();
309
- if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
308
+ let gridColumns = this.getColumnApi().getExportableColumns();
309
+ if (this.getExportApi().isExternalReport(report)) {
310
310
  return reportColumns;
311
311
  }
312
312
  // first get the cols depending on the Column Scope
@@ -326,10 +326,10 @@ export class ExportInternalApi extends ApiBase {
326
326
  break;
327
327
  case 'ScopeColumns':
328
328
  if ('ColumnIds' in report.Scope) {
329
- reportColumns = report.Scope.ColumnIds.map((columnId) => this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId)).filter((c) => c);
329
+ reportColumns = report.Scope.ColumnIds.map((columnId) => this.getColumnApi().getColumnWithColumnId(columnId)).filter((c) => c);
330
330
  }
331
331
  else {
332
- reportColumns = this.getAdaptableApi().columnScopeApi.getColumnsForScope(report.Scope);
332
+ reportColumns = this.getColumnScopeApi().getColumnsForScope(report.Scope);
333
333
  }
334
334
  break;
335
335
  }
@@ -337,8 +337,8 @@ export class ExportInternalApi extends ApiBase {
337
337
  const pkColumn = reportColumns.find((column) => column.columnId === this.getAdaptableApi().optionsApi.getPrimaryKey());
338
338
  // TODO simplify after we fix the IsPrimaryKey bug
339
339
  // const pkColumn = reportColumns.find(column => column.IsPrimaryKey);
340
- if (!pkColumn && !!this.getAdaptableApi().columnApi.getPrimaryKeyColumn()) {
341
- reportColumns.push(this.getAdaptableApi().columnApi.getPrimaryKeyColumn());
340
+ if (!pkColumn && !!this.getColumnApi().getPrimaryKeyColumn()) {
341
+ reportColumns.push(this.getColumnApi().getPrimaryKeyColumn());
342
342
  }
343
343
  }
344
344
  return reportColumns.map((column) => {
@@ -380,12 +380,12 @@ export class ExportInternalApi extends ApiBase {
380
380
  });
381
381
  break;
382
382
  case 'SelectedCellRows':
383
- const selectedCellInfo = this.getAdaptableApi().gridApi.getSelectedCellInfo();
383
+ const selectedCellInfo = this.getGridApi().getSelectedCellInfo();
384
384
  const { gridCells: GridCells } = selectedCellInfo;
385
385
  let selectedCellsByPrimaryKey = groupBy(GridCells, 'primaryKeyValue');
386
386
  // we iterate over all visibleRowNodes to preserve the current order
387
387
  this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
388
- const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
388
+ const rowPrimaryKeyValue = this.getGridApi().getPrimaryKeyValueForRowNode(rowNode);
389
389
  const selectedRowCells = selectedCellsByPrimaryKey[rowPrimaryKeyValue];
390
390
  if (selectedRowCells) {
391
391
  const selectedRowColumnIds = selectedRowCells.map((rowCell) => rowCell.column.columnId);
@@ -399,11 +399,11 @@ export class ExportInternalApi extends ApiBase {
399
399
  });
400
400
  break;
401
401
  case 'SelectedRows':
402
- const selectedRowInfo = this.getAdaptableApi().gridApi.getSelectedRowInfo();
402
+ const selectedRowInfo = this.getGridApi().getSelectedRowInfo();
403
403
  const selectedGridRowPrimaryKeys = (_b = (_a = selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows) === null || _a === void 0 ? void 0 : _a.filter((gr) => gr.rowInfo.isGroup == false).map((gridRow) => gridRow.primaryKeyValue)) !== null && _b !== void 0 ? _b : [];
404
404
  if (selectedGridRowPrimaryKeys.length) {
405
405
  this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
406
- const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
406
+ const rowPrimaryKeyValue = this.getGridApi().getPrimaryKeyValueForRowNode(rowNode);
407
407
  if (selectedGridRowPrimaryKeys.includes(rowPrimaryKeyValue)) {
408
408
  resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
409
409
  }
@@ -414,8 +414,8 @@ export class ExportInternalApi extends ApiBase {
414
414
  return resultRowData;
415
415
  }
416
416
  getReportData(report, includePrimaryKey = false) {
417
- if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
418
- return this.getAdaptableApi().exportApi.runExternalReport(report.Name);
417
+ if (this.getExportApi().isExternalReport(report)) {
418
+ return this.getExportApi().runExternalReport(report.Name);
419
419
  }
420
420
  const columns = this.getReportDataColumns(report, includePrimaryKey);
421
421
  const rows = this.getReportDataRows(report, columns, includePrimaryKey);
@@ -439,16 +439,16 @@ export class ExportInternalApi extends ApiBase {
439
439
  }
440
440
  publishLiveLiveDataChangedEvent(reportDestination, liveDataTrigger, liveReport) {
441
441
  const liveDataChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { reportDestination: reportDestination, liveDataTrigger: liveDataTrigger, liveReport: liveReport });
442
- this.getAdaptableApi().eventApi.emit('LiveDataChanged', liveDataChangedInfo);
442
+ this.getEventApi().emit('LiveDataChanged', liveDataChangedInfo);
443
443
  }
444
444
  getCellExportValueFromRowNode(rowNode, columnId, reportName) {
445
- return this.getCellExportValueFromRawValue(rowNode, this.getAdaptableApi().gridApi.getRawValueFromRowNode(rowNode, columnId), columnId, reportName);
445
+ return this.getCellExportValueFromRawValue(rowNode, this.getGridApi().getRawValueFromRowNode(rowNode, columnId), columnId, reportName);
446
446
  }
447
447
  getCellExportValueFromRawValue(rowNode, cellRawValue, columnId, reportName) {
448
448
  if (StringExtensions.IsNullOrEmpty(cellRawValue)) {
449
449
  return cellRawValue;
450
450
  }
451
- const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
451
+ const column = this.getColumnApi().getColumnWithColumnId(columnId);
452
452
  const columnDataType = column.dataType;
453
453
  // 1. if it is a Visual Data report then we always ONLY send the formatted value and ignore all other properties
454
454
  if (reportName == VISUAL_DATA_REPORT) {
@@ -462,12 +462,12 @@ export class ExportInternalApi extends ApiBase {
462
462
  });
463
463
  }
464
464
  // 3. in all other cases check the general export format types
465
- const cellExportFormat = this.getAdaptableApi().exportApi.internalApi.getCellExportFormatType(column, columnDataType);
465
+ const cellExportFormat = this.getExportApi().internalApi.getCellExportFormatType(column, columnDataType);
466
466
  return this.getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId, cellExportFormat);
467
467
  }
468
468
  getReportFileName(reportName, destination) {
469
469
  let fileName;
470
- const reportFilename = this.getAdaptableApi().optionsApi.getExportOptions().reportFilename;
470
+ const reportFilename = this.getExportOptions().reportFilename;
471
471
  if (reportFilename) {
472
472
  const reportFileNameContext = Object.assign(Object.assign({}, createBaseContext(this.getAdaptableApi())), { reportName,
473
473
  destination });
@@ -475,7 +475,7 @@ export class ExportInternalApi extends ApiBase {
475
475
  }
476
476
  else {
477
477
  fileName = StringExtensions.ReplaceEmptySpacesWithUnderscore(reportName);
478
- if (this.getAdaptableApi().optionsApi.getExportOptions().appendFileTimestamp) {
478
+ if (this.getExportOptions().appendFileTimestamp) {
479
479
  fileName = `${fileName}_${DateFormatter(new Date(), {
480
480
  Pattern: 'yyyyMMdd_HHmmss',
481
481
  })}`;
@@ -484,7 +484,7 @@ export class ExportInternalApi extends ApiBase {
484
484
  return fileName;
485
485
  }
486
486
  getCustomExportDateFormat() {
487
- return this.getAdaptableApi().optionsApi.getExportOptions().exportDateFormat;
487
+ return this.getExportOptions().exportDateFormat;
488
488
  }
489
489
  getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId,
490
490
  // default to rawValue if, for some reason, the configs provide invalid values
@@ -492,7 +492,7 @@ export class ExportInternalApi extends ApiBase {
492
492
  return type === 'rawValue'
493
493
  ? cellRawValue
494
494
  : // type === formattedValue
495
- this.getAdaptableApi().gridApi.getDisplayValueFromRawValue(rowNode, columnId, cellRawValue);
495
+ this.getGridApi().getDisplayValueFromRawValue(rowNode, columnId, cellRawValue);
496
496
  }
497
497
  // aggregate and merge all acive Adaptable styles with the user proviided ExcelStyles
498
498
  buildExcelStylesForVisualReports() {
@@ -510,7 +510,7 @@ export class ExportInternalApi extends ApiBase {
510
510
  if (memoizedColumn) {
511
511
  return memoizedColumn;
512
512
  }
513
- const abColumn = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
513
+ const abColumn = this.getColumnApi().getColumnWithColumnId(columnId);
514
514
  adaptableColumnMap[columnId] = abColumn;
515
515
  return abColumn;
516
516
  };
@@ -547,7 +547,7 @@ export class ExportInternalApi extends ApiBase {
547
547
  var _a, _b, _c;
548
548
  const colDef = colDefs[columnIndex];
549
549
  const columnId = column.getId();
550
- const adaptableColumn = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
550
+ const adaptableColumn = this.getColumnApi().getColumnWithColumnId(columnId);
551
551
  const isDateCellExportedAsFormattedValue = this.isDateCellExportedAsFormattedValue(adaptableColumn);
552
552
  let cellClassParams;
553
553
  const getLazyCellClassParams = () => {
@@ -557,7 +557,7 @@ export class ExportInternalApi extends ApiBase {
557
557
  node,
558
558
  column,
559
559
  data: node.data,
560
- value: this.getAdaptableApi().gridApi.getRawValueFromRowNode(node, columnId),
560
+ value: this.getGridApi().getRawValueFromRowNode(node, columnId),
561
561
  rowIndex,
562
562
  api: agGridApi,
563
563
  context: {},
@@ -594,7 +594,7 @@ export class ExportInternalApi extends ApiBase {
594
594
  excelStyles.push(this.convertCSSToExcelStyle(sanitizedAdaptableStyle));
595
595
  }
596
596
  const excelDataType = this.getExcelDataType(colDef === null || colDef === void 0 ? void 0 : colDef.type);
597
- const rawValue = this.getAdaptableApi().gridApi.getRawValueFromRowNode(node, column.getId());
597
+ const rawValue = this.getGridApi().getRawValueFromRowNode(node, column.getId());
598
598
  // don't add the cell style if it has no adaptable custom styles
599
599
  if (!excelStyles.length &&
600
600
  // if this is a formatted Date value, we still need to add the AG GRID specific type & numberFormat below
@@ -604,7 +604,7 @@ export class ExportInternalApi extends ApiBase {
604
604
  const cellClassId = this._adaptable.agGridColumnAdapter.getExcelClassNameForCell(column.getId(), this._adaptable.getPrimaryKeyValueFromRowNode(node), userDefinedCellClass);
605
605
  const finalCellExcelStyle = Object.assign({}, ...excelStyles);
606
606
  if (excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue) {
607
- let dateFormatPattern = this.getAdaptableApi().optionsApi.getExportOptions().exportDateFormat;
607
+ let dateFormatPattern = this.getExportOptions().exportDateFormat;
608
608
  const abColumn = getAdaptableColumnWithColumnId(column.getColId());
609
609
  if (!dateFormatPattern) {
610
610
  const mostRelevantFormatColumn = this.getAdaptableApi().formatColumnApi.internalApi.getMostRelevantFormatColumnForColumn(getFormatColumnsWithDisplayFormatForColumn(column.getColId()), abColumn, { node, value: rawValue });
@@ -24,7 +24,7 @@ export class ExpressionInternalApi extends ApiBase {
24
24
  context.expression = expression;
25
25
  context.referencedColumns = this.getAdaptableApi()
26
26
  .expressionApi.getColumnsFromExpression(expression)
27
- .map((columnId) => this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId));
27
+ .map((columnId) => this.getColumnApi().getColumnWithColumnId(columnId));
28
28
  }
29
29
  return !evaluateExpressionExternallyFn(context);
30
30
  }
@@ -42,7 +42,7 @@ export class FlashingCellInternalApi extends ApiBase {
42
42
  ? toFlashingAlert(forPrimaryKey[columnId])
43
43
  : toFlashingAlert(forPrimaryKey[FLASHING_CELL_ROW_KEY]);
44
44
  if ((adaptableFlashingCell === null || adaptableFlashingCell === void 0 ? void 0 : adaptableFlashingCell.flashingCellDefinition) &&
45
- !this.getAdaptableApi().layoutApi.internalApi.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getAdaptableApi().layoutApi.getCurrentLayout())) {
45
+ !this.getLayoutApi().internalApi.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getLayoutApi().getCurrentLayout())) {
46
46
  return;
47
47
  }
48
48
  return adaptableFlashingCell;