@adaptabletools/adaptable-cjs 20.0.0-canary.1 → 20.0.0-canary.10

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 (93) hide show
  1. package/base.css +317 -866
  2. package/base.css.map +1 -1
  3. package/index.css +317 -866
  4. package/index.css.map +1 -1
  5. package/package.json +3 -3
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  7. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  8. package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
  10. package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -2
  11. package/src/AdaptableOptions/EditOptions.d.ts +14 -3
  12. package/src/AdaptableOptions/ExportOptions.d.ts +11 -20
  13. package/src/AdaptableOptions/FilterOptions.d.ts +2 -2
  14. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  15. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
  16. package/src/Api/ColumnScopeApi.d.ts +2 -2
  17. package/src/Api/ExportApi.d.ts +1 -6
  18. package/src/Api/Fdc3Api.d.ts +5 -3
  19. package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
  20. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  21. package/src/Api/Implementation/ColumnScopeApiImpl.js +1 -1
  22. package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
  23. package/src/Api/Implementation/ExportApiImpl.js +17 -10
  24. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
  25. package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
  26. package/src/Api/Implementation/LayoutHelpers.js +8 -27
  27. package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
  28. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
  29. package/src/Api/Implementation/ThemeApiImpl.js +3 -1
  30. package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
  31. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  32. package/src/Api/Internal/EventInternalApi.js +6 -1
  33. package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
  34. package/src/Api/Internal/ExportInternalApi.js +105 -136
  35. package/src/Api/Internal/RowFormInternalApi.js +1 -1
  36. package/src/Api/ThemeApi.d.ts +2 -0
  37. package/src/PredefinedConfig/AlertState.d.ts +1 -1
  38. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -5
  39. package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
  40. package/src/PredefinedConfig/Common/AdaptablePredicate.js +0 -16
  41. package/src/PredefinedConfig/Common/RowSummary.d.ts +1 -1
  42. package/src/PredefinedConfig/Common/RowSummary.js +3 -3
  43. package/src/PredefinedConfig/ExportState.d.ts +10 -17
  44. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  45. package/src/PredefinedConfig/LayoutState.d.ts +20 -16
  46. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  47. package/src/Redux/Store/AdaptableStore.js +1 -1
  48. package/src/Strategy/StyledColumnModule.js +6 -6
  49. package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
  50. package/src/Utilities/Helpers/AdaptableHelper.js +12 -1
  51. package/src/Utilities/ObjectFactory.js +1 -0
  52. package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
  53. package/src/Utilities/Services/Fdc3Service.js +7 -2
  54. package/src/Utilities/Services/RowSummaryService.js +1 -1
  55. package/src/Utilities/Services/ThemeService.d.ts +1 -1
  56. package/src/Utilities/Services/ThemeService.js +5 -5
  57. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
  58. package/src/View/Components/ColumnFilter/utils.js +2 -2
  59. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
  60. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  61. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
  62. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  63. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  64. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
  65. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
  66. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
  67. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
  68. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
  69. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
  70. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
  71. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  72. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
  73. package/src/agGrid/AdaptableAgGrid.d.ts +3 -8
  74. package/src/agGrid/AdaptableAgGrid.js +40 -117
  75. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  76. package/src/agGrid/AgGridAdapter.js +5 -6
  77. package/src/agGrid/AgGridColumnAdapter.js +6 -11
  78. package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
  79. package/src/agGrid/AgGridExportAdapter.js +24 -25
  80. package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
  81. package/src/agGrid/AgGridThemeAdapter.js +126 -0
  82. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
  83. package/src/components/ColorPicker/ColorPicker.js +2 -2
  84. package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
  85. package/src/components/Select/Select.d.ts +1 -0
  86. package/src/components/Select/Select.js +29 -6
  87. package/src/env.js +2 -2
  88. package/src/metamodel/adaptable.metamodel.d.ts +26 -20
  89. package/src/metamodel/adaptable.metamodel.js +1 -1
  90. package/src/migration/VersionUpgrade20.d.ts +1 -0
  91. package/src/migration/VersionUpgrade20.js +103 -3
  92. package/src/types.d.ts +3 -3
  93. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -1,5 +1,5 @@
1
1
  import { IRowNode } from 'ag-grid-enterprise';
2
- import { AppIdentifier, Context, ContextType, DesktopAgent, Intent, IntentResolution } from '@finos/fdc3';
2
+ import { AppIdentifier, Channel, Context, ContextType, DesktopAgent, Intent, IntentResolution } from '@finos/fdc3';
3
3
  /**
4
4
  * Provides run-time access to AdapTable's FDC3 functionality
5
5
  */
@@ -59,14 +59,16 @@ export interface Fdc3Api {
59
59
  * Broadcasts the given Context from the given Row Node
60
60
  * @param rowNode - The Row Node
61
61
  * @param contextType - The FDC3 Context Type
62
+ * @param channel - (optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to
62
63
  */
63
- broadcastFromRow(rowNode: IRowNode, contextType: ContextType): Promise<void>;
64
+ broadcastFromRow(rowNode: IRowNode, contextType: ContextType, channel?: Channel): Promise<void>;
64
65
  /**
65
66
  * Broadcasts the given Context from the given Row Node with the given Primary Key Value
66
67
  * @param primaryKeyValue - The Primary Key Value
67
68
  * @param contextType - The FDC3 Context Type
69
+ * @param channel - (optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to
68
70
  */
69
- broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType): Promise<void> | undefined;
71
+ broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, channel?: Channel): Promise<void> | undefined;
70
72
  /**
71
73
  * Checks if the given Context Type is a FDC3 standard Context Type
72
74
  */
@@ -144,6 +144,7 @@ class AdaptableApiImpl {
144
144
  this.formatColumnApi = null;
145
145
  this.freeTextColumnApi = null;
146
146
  this.gridApi = null;
147
+ this.rowFormApi = null;
147
148
  this.internalApi = null;
148
149
  this.layoutApi = null;
149
150
  this.pluginsApi = null;
@@ -25,7 +25,7 @@ export declare class ColumnScopeApiImpl extends ApiBase implements ColumnScopeAp
25
25
  getColumnTypesInScope(scope: ColumnScope): string[] | undefined;
26
26
  getDataTypesInScope(scope: ColumnScope): ScopeDataType[] | undefined;
27
27
  isColumnInNumericScope(column: AdaptableColumn, scope: ColumnScope): boolean;
28
- isColumnInStringsScope(column: AdaptableColumn, scope: ColumnScope): boolean;
28
+ isColumnInTextScope(column: AdaptableColumn, scope: ColumnScope): boolean;
29
29
  isColumnInDateScope(column: AdaptableColumn, scope: ColumnScope): boolean;
30
30
  isScopeInScope(a: ColumnScope, b: ColumnScope): boolean;
31
31
  createCellColorRangesForScope(scope: ColumnScope): CellColorRange[];
@@ -187,7 +187,7 @@ class ColumnScopeApiImpl extends ApiBase_1.ApiBase {
187
187
  }
188
188
  return false;
189
189
  }
190
- isColumnInStringsScope(column, scope) {
190
+ isColumnInTextScope(column, scope) {
191
191
  // if column is not even string then return false
192
192
  if (column == null || column == undefined || column.dataType !== 'text') {
193
193
  return false;
@@ -1,5 +1,5 @@
1
1
  import { ExportApi } from '../ExportApi';
2
- import { ExportState, Report, ReportData, ReportFormatType, ReportNameType, SystemReportFormat, SystemReportName } from '../../PredefinedConfig/ExportState';
2
+ import { ExportState, Report, ReportFormatType, ReportNameType, SystemReportFormat, SystemReportName } from '../../PredefinedConfig/ExportState';
3
3
  import { ApiBase } from './ApiBase';
4
4
  import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
5
5
  import { CustomDestination, ExportDestinationType, ExportFormContext, ExportResultData, ExternalReport, SystemExportDestination } from '../../AdaptableOptions/ExportOptions';
@@ -36,7 +36,6 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
36
36
  getCustomReports(): Report[];
37
37
  getExternalReports(): ExternalReport[];
38
38
  isExternalReport(report: Report): boolean;
39
- runExternalReport(externalReportName: string): ReportData | undefined;
40
39
  isColumnExportable(adaptableColumn: AdaptableColumn): boolean;
41
40
  getSupportedExportDestinations(reportFormat: ReportFormatType): ExportDestinationType[];
42
41
  exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType): void;
@@ -136,21 +136,14 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
136
136
  isExternalReport(report) {
137
137
  return this.getExternalReports()?.find((cr) => cr.name == report.Name) != null;
138
138
  }
139
- runExternalReport(externalReportName) {
140
- const externalReport = this.getExternalReports()?.find((cr) => cr.name == externalReportName);
141
- if (!externalReport) {
142
- this.logWarn(`External Report '${externalReportName}' not found!`);
143
- return undefined;
144
- }
145
- return externalReport.onRunReport();
146
- }
147
139
  isColumnExportable(adaptableColumn) {
148
140
  const isExportableFn = this.getExportOptions().isColumnExportable;
149
141
  if (typeof isExportableFn === 'function') {
150
- return isExportableFn({
142
+ const adaptableColumnContext = {
151
143
  ...this.getAdaptableInternalApi().buildBaseContext(),
152
144
  column: adaptableColumn,
153
- });
145
+ };
146
+ return isExportableFn(adaptableColumnContext);
154
147
  }
155
148
  return true;
156
149
  }
@@ -171,6 +164,20 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
171
164
  exportReport(reportName, format, destination = 'Download') {
172
165
  let report = this.getReportByName(reportName);
173
166
  if (this.checkItemExists(report, reportName, 'Report')) {
167
+ if (this.isExternalReport(report)) {
168
+ // Handle external report
169
+ this.internalApi
170
+ .getExternalReportData(reportName, format, destination)
171
+ .then((reportData) => {
172
+ if (reportData) {
173
+ this.internalApi.sendReportToDestination(reportData, report, format, destination);
174
+ }
175
+ })
176
+ .catch((error) => {
177
+ this.logWarn(`Failed to get external report data for '${reportName}': ${error}`);
178
+ });
179
+ return;
180
+ }
174
181
  this._adaptable.agGridExportAdapter
175
182
  .exportData({
176
183
  report,
@@ -1,5 +1,5 @@
1
1
  import { IRowNode } from 'ag-grid-enterprise';
2
- import { Context, ContextType, DesktopAgent, Intent, IntentResolution, StandardContextType, StandardIntent } from '@finos/fdc3';
2
+ import { Channel, Context, ContextType, DesktopAgent, Intent, IntentResolution, StandardContextType, StandardIntent } from '@finos/fdc3';
3
3
  import { ApiBase } from './ApiBase';
4
4
  import { Fdc3Api } from '../Fdc3Api';
5
5
  import { Fdc3InternalApi } from '../Internal/Fdc3InternalApi';
@@ -15,8 +15,8 @@ export declare class Fdc3ApiImpl extends ApiBase implements Fdc3Api {
15
15
  raiseIntentFromRow(rowNode: IRowNode, intent: Intent, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
16
16
  raiseIntentForContextFromRow(rowNode: IRowNode, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
17
17
  raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
18
- broadcastFromRow(rowNode: IRowNode, contextType: ContextType): Promise<void>;
19
- broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType): Promise<void> | undefined;
18
+ broadcastFromRow(rowNode: IRowNode, contextType: ContextType, channel?: Channel): Promise<void>;
19
+ broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, channel?: Channel): Promise<void> | undefined;
20
20
  getContextLabel(contextType: ContextType): string;
21
21
  isStandardContextType(contextType: string): contextType is StandardContextType;
22
22
  isStandardIntentType(intentType: string): intentType is StandardIntent;
@@ -47,17 +47,17 @@ class Fdc3ApiImpl extends ApiBase_1.ApiBase {
47
47
  }
48
48
  return this.raiseIntentForContextFromRow(rowNode, contextType, appIdentifier);
49
49
  }
50
- broadcastFromRow(rowNode, contextType) {
50
+ broadcastFromRow(rowNode, contextType, channel) {
51
51
  const contextData = this.buildContextDataFromRow(contextType, rowNode);
52
- return this.getFdc3Service().broadcast(contextData);
52
+ return this.getFdc3Service().broadcast(contextData, channel);
53
53
  }
54
- broadcastFromPrimaryKey(primaryKeyValue, contextType) {
54
+ broadcastFromPrimaryKey(primaryKeyValue, contextType, channel) {
55
55
  const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKeyValue);
56
56
  if (!rowNode) {
57
57
  this.logWarn(`No row found for primary key value '${primaryKeyValue}'`);
58
58
  return undefined;
59
59
  }
60
- return this.broadcastFromRow(rowNode, contextType);
60
+ return this.broadcastFromRow(rowNode, contextType, channel);
61
61
  }
62
62
  getContextLabel(contextType) {
63
63
  return this.isStandardContextType(contextType)
@@ -7,6 +7,7 @@ const isPivotLayoutModel_1 = require("../../layout-manager/src/isPivotLayoutMode
7
7
  const normalizeLayoutModel_1 = require("../../layout-manager/src/normalizeLayoutModel");
8
8
  const simplifyLayoutModel_1 = require("../../layout-manager/src/simplifyLayoutModel");
9
9
  const AggregationColumns_1 = require("../../PredefinedConfig/Common/AggregationColumns");
10
+ const AdaptableHelper_1 = require("../../Utilities/Helpers/AdaptableHelper");
10
11
  const layoutStateToLayoutModel = (layout) => {
11
12
  if ((0, exports.isPivotLayout)(layout)) {
12
13
  return (0, exports.pivotLayoutToPivotLayoutModel)(layout);
@@ -24,44 +25,23 @@ exports.layoutModelToLayoutState = layoutModelToLayoutState;
24
25
  function cleanupAdaptableObjectPrimitives(layout) {
25
26
  if (layout.TableAggregationColumns) {
26
27
  layout.TableAggregationColumns.forEach((AggValue) => {
27
- // @ts-ignore
28
- delete AggValue.Source;
29
- // @ts-ignore
30
- delete AggValue.Uuid;
31
- // @ts-ignore
32
- delete AggValue.AdaptableVersion;
28
+ (0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(AggValue);
33
29
  if (typeof AggValue.AggFunc === 'object' && AggValue.AggFunc) {
34
- // @ts-ignore
35
- delete AggValue.AggFunc.Source;
36
- // @ts-ignore
37
- delete AggValue.AggFunc.Uuid;
38
- // @ts-ignore
39
- delete AggValue.AggFunc.AdaptableVersion;
30
+ (0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(AggValue.AggFunc);
40
31
  }
41
32
  });
42
33
  }
43
34
  if (layout.ColumnHeaders) {
44
- delete layout.ColumnHeaders.Source;
45
- delete layout.ColumnHeaders.Uuid;
46
- delete layout.ColumnHeaders.AdaptableVersion;
35
+ (0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.ColumnHeaders);
47
36
  }
48
37
  if (layout.ColumnVisibility) {
49
- delete layout.ColumnVisibility.Source;
50
- delete layout.ColumnVisibility.Uuid;
51
- delete layout.ColumnVisibility.AdaptableVersion;
38
+ (0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.ColumnVisibility);
52
39
  }
53
40
  if (layout.ColumnWidths) {
54
- delete layout.ColumnWidths.Source;
55
- delete layout.ColumnWidths.Uuid;
56
- delete layout.ColumnWidths.AdaptableVersion;
41
+ (0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.ColumnWidths);
57
42
  }
58
43
  if (layout.RowGroupValues) {
59
- // @ts-ignore
60
- delete layout.RowGroupValues.Source;
61
- // @ts-ignore
62
- delete layout.RowGroupValues.Uuid;
63
- // @ts-ignore
64
- delete layout.RowGroupValues.AdaptableVersion;
44
+ (0, AdaptableHelper_1.removeAdaptableObjectPrimitivesInline)(layout.RowGroupValues);
65
45
  }
66
46
  }
67
47
  /**
@@ -271,6 +251,7 @@ const tableLayoutModelToTableLayout = (layoutModel, defaults) => {
271
251
  else {
272
252
  delete tableLayout.TableAggregationColumns;
273
253
  }
254
+ cleanupAdaptableObjectPrimitives(tableLayout);
274
255
  return tableLayout;
275
256
  };
276
257
  exports.tableLayoutModelToTableLayout = tableLayoutModelToTableLayout;
@@ -163,7 +163,7 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
163
163
  }
164
164
  else if (scheduleType == 'Report') {
165
165
  const reportSchedule = schedule;
166
- this.getExportApi().exportReport(reportSchedule.ReportName, reportSchedule.ReportFormat, 'Download');
166
+ this.getExportApi().exportReport(reportSchedule.ReportName, reportSchedule.ReportFormat, reportSchedule.ExportDestination ?? 'Download');
167
167
  }
168
168
  else if (scheduleType == 'ipushpull') {
169
169
  const ippApi = this.getAdaptableApi().pluginsApi.getipushpullPluginApi();
@@ -39,7 +39,7 @@ class StyledColumnApiImpl extends ApiBase_1.ApiBase {
39
39
  if (!column) {
40
40
  return false;
41
41
  }
42
- return !!this.getStyledColumns().find((styledColumn) => !!styledColumn.SparkLineStyle && styledColumn.ColumnId === column.columnId);
42
+ return !!this.getStyledColumns().find((styledColumn) => !!styledColumn.SparklineStyle && styledColumn.ColumnId === column.columnId);
43
43
  }
44
44
  getActiveStyledColumnForColumn(column) {
45
45
  const styledColumns = this.getActiveStyledColumns();
@@ -8,6 +8,7 @@ const ApiBase_1 = require("./ApiBase");
8
8
  const themes_1 = require("../../themes");
9
9
  const ThemeInternalApi_1 = require("../Internal/ThemeInternalApi");
10
10
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
11
+ const logDeprecation_1 = require("../../Utilities/logDeprecation");
11
12
  class ThemeApiImpl extends ApiBase_1.ApiBase {
12
13
  constructor(_adaptable) {
13
14
  super(_adaptable);
@@ -74,7 +75,8 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
74
75
  this.showModulePopup(ModuleConstants.ThemeModuleId);
75
76
  }
76
77
  getAgGridCurrentThemeName() {
77
- return this._adaptable.getAgGridCurrentThemeName();
78
+ (0, logDeprecation_1.logDeprecation)(this._adaptable.logger, 'ThemeApi', 'getAgGridCurrentThemeName', null, `This is required only for AG Grid's legacy themes. See https://www.ag-grid.com/javascript-data-grid/theming-v32/`);
79
+ return this._adaptable.agGridThemeAdapter.getAgGridCurrentThemeClassNames();
78
80
  }
79
81
  editTheme(theme) {
80
82
  this.dispatchAction(ThemeRedux.ThemeEdit(theme));
@@ -81,13 +81,14 @@ class ActionColumnInternalApi extends ApiBase_1.ApiBase {
81
81
  return { actionButtons, actionColumn };
82
82
  }
83
83
  updateAllActionColumnButtons(actionButtons) {
84
- return actionButtons.map((actionButton) => ({
85
- ...actionButton,
86
- Uuid: (0, Uuid_1.createUuid)(),
87
- command: actionButton.command == undefined
88
- ? undefined
89
- : this.updateActionButtonCommand(actionButton),
90
- }));
84
+ return actionButtons.map((actionButton) => {
85
+ actionButton = { ...actionButton };
86
+ actionButton.Uuid = (0, Uuid_1.createUuid)();
87
+ if (actionButton.command) {
88
+ this.updateActionButtonCommand(actionButton);
89
+ }
90
+ return actionButton;
91
+ });
91
92
  }
92
93
  updateActionButtonCommand(button) {
93
94
  switch (button.command) {
@@ -96,7 +97,7 @@ class ActionColumnInternalApi extends ApiBase_1.ApiBase {
96
97
  this.getRowFormApi().displayCreateRowForm();
97
98
  };
98
99
  button.tooltip = button.tooltip ? button.tooltip : 'Create Row';
99
- button.icon = {
100
+ button.icon = button.icon ?? {
100
101
  name: 'add',
101
102
  };
102
103
  break;
@@ -105,7 +106,7 @@ class ActionColumnInternalApi extends ApiBase_1.ApiBase {
105
106
  this.getRowFormApi().displayCloneRowForm(context.primaryKeyValue);
106
107
  };
107
108
  button.tooltip = button.tooltip ? button.tooltip : 'Clone Row';
108
- button.icon = {
109
+ button.icon = button.icon ?? {
109
110
  name: 'clone',
110
111
  };
111
112
  break;
@@ -120,22 +121,18 @@ class ActionColumnInternalApi extends ApiBase_1.ApiBase {
120
121
  this.getRowFormOptions().onRowFormSubmit?.(eventInfo);
121
122
  };
122
123
  button.tooltip = button.tooltip ? button.tooltip : 'Delete Row';
123
- button.icon = button.icon
124
- ? button.icon
125
- : {
126
- name: 'delete',
127
- };
124
+ button.icon = button.icon ?? {
125
+ name: 'delete',
126
+ };
128
127
  break;
129
128
  case 'edit':
130
129
  button.onClick = (button, context) => {
131
130
  this.getRowFormApi().displayEditRowForm(context.primaryKeyValue);
132
131
  };
133
132
  button.tooltip = button.tooltip ? button.tooltip : 'Edit Row';
134
- button.icon = button.icon
135
- ? button.icon
136
- : {
137
- name: 'edit',
138
- };
133
+ button.icon = button.icon ?? {
134
+ name: 'edit',
135
+ };
139
136
  break;
140
137
  }
141
138
  }
@@ -191,7 +191,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
191
191
  if (firstRowNode == undefined) {
192
192
  return {};
193
193
  }
194
- const firstRowData = { ...firstRowNode?.data } ?? {};
194
+ const firstRowData = firstRowNode?.data ? { ...firstRowNode?.data } : {};
195
195
  // handle CalcCols which are not persisted in the rowModel
196
196
  this.getCalculatedColumnApi()
197
197
  .getCalculatedColumns()
@@ -63,7 +63,12 @@ class EventInternalApi extends ApiBase_1.ApiBase {
63
63
  isToolbarStateChangedToHidden,
64
64
  };
65
65
  if (!(0, isEqual_1.default)(oldDashboardState, newDashboardState)) {
66
- setTimeout(() => this.getEventApi().emit('DashboardChanged', dashboardChangedInfo));
66
+ setTimeout(() => {
67
+ const eventApi = this.getEventApi();
68
+ if (eventApi) {
69
+ eventApi.emit('DashboardChanged', dashboardChangedInfo);
70
+ }
71
+ });
67
72
  }
68
73
  }
69
74
  fireAlertFiredEvent(alertToFire) {
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
3
3
  import { Report, ReportData, ReportFormatType, ReportNameType, SystemReportName } from '../../PredefinedConfig/ExportState';
4
- import { IRowNode } from 'ag-grid-enterprise';
4
+ import { CsvCell, ExcelCell, ExcelDataType, IRowNode } from 'ag-grid-enterprise';
5
5
  import { AdaptableColumn, AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
6
6
  import { BaseExportContext, DataFormatType, ExportDestinationType, ExportResultData } from '../../AdaptableOptions/ExportOptions';
7
7
  export declare class ExportInternalApi extends ApiBase {
@@ -21,12 +21,7 @@ export declare class ExportInternalApi extends ApiBase {
21
21
  getReportColumnScopeShortDescription(report: Report): string[];
22
22
  getReportColumnScopeLongDescription(report: Report): string;
23
23
  getReportExpressionDescription(report: Report, cols: AdaptableColumn[]): string;
24
- getReportDataColumns(report: Report, includePrimaryKey?: boolean): AdaptableColumn[];
25
- getReportDataRows(report: Report, columns: AdaptableColumn[], includePrimaryKey?: boolean): Record<string, any>[];
26
- getReportData(report: Report, includePrimaryKey?: boolean): ReportData;
27
- getReportDataAsArray(report: Report, includePrimaryKey?: boolean): any[][];
28
24
  convertReportDataToArray(reportData: ReportData): any[][];
29
- getRowObjectForColumnIds(rowNode: IRowNode, columnIds: string[], reportName: string): Record<string, any>;
30
25
  publishLiveLiveDataChangedEvent(reportDestination: 'ipushpull' | 'OpenFin', liveDataTrigger: 'Connected' | 'Disconnected' | 'SnapshotSent' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated', liveReport?: any): void;
31
26
  getCellExportValueFromRowNode(rowNode: IRowNode, columnId: string, isVisualReport?: boolean): any;
32
27
  getCellExportValueFromRawValue(rowNode: IRowNode, cellRawValue: any, columnId: string, isVisualReport?: boolean): any;
@@ -36,4 +31,13 @@ export declare class ExportInternalApi extends ApiBase {
36
31
  sendReportToDestination(reportResult: ExportResultData, report: Report, format: ReportFormatType, destination: ExportDestinationType): void;
37
32
  private sendReportToCustomDestination;
38
33
  buildBaseExportContext(reportName: ReportNameType, reportFormat: ReportFormatType, exportDestination?: ExportDestinationType): BaseExportContext;
34
+ createCellCsv(cellContent: any): CsvCell;
35
+ createCellExcel(cellContent: any, cellType: ExcelDataType): ExcelCell;
36
+ createCellHeader(cellContent: any): ExcelCell;
37
+ getExternalReportData(externalReportName: ReportNameType, reportFormat: ReportFormatType, exportDestination: ExportDestinationType): Promise<ExportResultData | undefined>;
38
+ private buildGridReportColumns;
39
+ private buildExcelConverter;
40
+ private buildCsvConverter;
41
+ private executeGridExport;
42
+ private buildCsvExportParams;
39
43
  }