@adaptabletools/adaptable-cjs 20.0.13 → 20.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-cjs",
3
- "version": "20.0.13",
3
+ "version": "20.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",
@@ -64,7 +64,7 @@
64
64
  "uuid": "9.0.1"
65
65
  },
66
66
  "peerDependencies": {
67
- "ag-grid-enterprise": ">=33.0.0"
67
+ "ag-grid-enterprise": ">=33.2.0"
68
68
  },
69
69
  "publishTimestamp": 0
70
70
  }
@@ -38,7 +38,7 @@ export interface ColumnOptions {
38
38
  /**
39
39
  * Common properties for Column Header Context
40
40
  */
41
- export type BaseColumnHeaderContext = {
41
+ export interface BaseColumnHeaderContext extends BaseContext {
42
42
  /**
43
43
  * The default header name for the column
44
44
  */
@@ -55,8 +55,163 @@ export type BaseColumnHeaderContext = {
55
55
  * The current Layout
56
56
  */
57
57
  currentLayout: Layout;
58
- } & BaseContext;
59
- export type ColumnHeaderContext = BaseColumnHeaderContext & ({
58
+ }
59
+ export interface AutoGroupColumnHeaderContext extends BaseColumnHeaderContext {
60
+ /**
61
+ * Auto-generated Group Column when GroupDisplayType is `single` column
62
+ */
63
+ columnType: 'autoGroupColumn';
64
+ /**
65
+ * Technical ID of the Column
66
+ */
67
+ columnId: string;
68
+ /**
69
+ * IDs of the Columns that are grouped
70
+ */
71
+ groupedColumnIds: string[];
72
+ }
73
+ export interface RowGroupColumnHeaderContext extends BaseColumnHeaderContext {
74
+ /**
75
+ * Group Columns - see `TableLayout.RowGroupedColumns` or `PivotLayout.PivotGroupedColumns`
76
+ */
77
+ columnType: 'groupColumn';
78
+ /**
79
+ * Technical ID of the Column
80
+ */
81
+ columnId: string;
82
+ /**
83
+ * ID of the grouped Column
84
+ */
85
+ groupColumnId: string;
86
+ }
87
+ export interface TableColumnHeaderContext extends BaseColumnHeaderContext {
88
+ /**
89
+ * Table Column - see `TableLayout.TableColumns`
90
+ */
91
+ columnType: 'tableColumn';
92
+ /**
93
+ * Technical ID of the Column
94
+ */
95
+ columnId: string;
96
+ /**
97
+ * Optional Aggregation function of the Column - see `TableLayout.TableAggregationColumns`
98
+ */
99
+ aggregation?: string;
100
+ }
101
+ export interface TableColumnGroupHeaderContext extends BaseColumnHeaderContext {
102
+ /**
103
+ * Column Group - see https://www.ag-grid.com/javascript-data-grid/column-groups/
104
+ */
105
+ columnType: 'tableColumnGroup';
106
+ /**
107
+ * Technical ID of the Column Group - see `ColGroupDef.groupId`
108
+ */
109
+ groupId: string;
110
+ /**
111
+ * IDs of the Column Group children - see `ColGroupDef.children`
112
+ */
113
+ childrenColumnIds: string[];
114
+ /**
115
+ * State of the Column Group
116
+ */
117
+ state: 'expanded' | 'collapsed';
118
+ }
119
+ export interface PivotColumnGroupHeaderContext extends BaseColumnHeaderContext {
120
+ /**
121
+ * Pivot Column - see `PivotLayout.PivotColumns`
122
+ */
123
+ columnType: 'pivotColumnGroup';
124
+ /**
125
+ * Technical ID of the generated Column Group
126
+ */
127
+ groupId: string;
128
+ /**
129
+ * Pivot Keys for the current Column Group
130
+ */
131
+ pivotKeys: string[];
132
+ /**
133
+ * State of the Column Group
134
+ */
135
+ state: 'expanded' | 'collapsed';
136
+ }
137
+ export interface PivotAggregationColumnHeaderContext extends BaseColumnHeaderContext {
138
+ /**
139
+ * Pivot Aggregation Column - see `PivotLayout.PivotAggregationColumns`
140
+ */
141
+ columnType: 'pivotAggregationColumn';
142
+ /**
143
+ * Technical ID of the generated Column
144
+ */
145
+ columnId: string;
146
+ /**
147
+ * Current Pivot Keys
148
+ */
149
+ pivotKeys: string[];
150
+ /**
151
+ * ID of the Aggregated Column - see `PivotLayout.PivotAggregationColumns`
152
+ */
153
+ aggregatedColumnId: string;
154
+ /**
155
+ * Aggregation function of the Column - see `PivotLayout.PivotAggregationColumns.AggregationColumnValue`
156
+ */
157
+ aggregation: string;
158
+ }
159
+ export interface PivotGrandTotalHeaderContext extends BaseColumnHeaderContext {
160
+ /**
161
+ * Pivot Grand Total - see `PivotLayout.PivotGrandTotal`
162
+ */
163
+ columnType: 'pivotGrandTotal';
164
+ /**
165
+ * ID of the Aggregated Column - see `PivotLayout.PivotAggregationColumns`
166
+ */
167
+ aggregatedColumnId: string;
168
+ /**
169
+ * Aggregation function of the Column - see `PivotLayout.PivotAggregationColumns.AggregationColumnValue`
170
+ */
171
+ aggregation: string;
172
+ }
173
+ export interface PivotColumnTotalHeaderContext extends BaseColumnHeaderContext {
174
+ /**
175
+ * Pivot Column Total - see `PivotLayout.PivotColumnTotal`
176
+ */
177
+ columnType: 'pivotColumnTotal';
178
+ /**
179
+ * Current Pivot Keys
180
+ */
181
+ pivotKey: string;
182
+ /**
183
+ * ID of the Pivot Column - see `PivotLayout.PivotColumns`
184
+ */
185
+ pivotColumnId: string;
186
+ /**
187
+ * Aggregation function of the Column - see `PivotLayout.PivotAggregationColumns.AggregationColumnValue`
188
+ */
189
+ aggregation: string;
190
+ }
191
+ export interface PivotAggregationTotalHeaderContext extends BaseColumnHeaderContext {
192
+ /**
193
+ * Pivot Aggregation Total Column - see `PivotLayout.PivotAggregationColumns.TotalColumn`
194
+ */
195
+ columnType: 'pivotAggregationTotal';
196
+ /**
197
+ * ID of the Aggregated Column - see `PivotLayout.PivotAggregationColumns`
198
+ */
199
+ aggregatedColumnId: string;
200
+ /**
201
+ * Aggregation function of the Column - see `PivotLayout.PivotAggregationColumns.AggregationColumnValue`
202
+ */
203
+ aggregation: string;
204
+ /**
205
+ * ID of the Pivot Column - see `PivotLayout.PivotColumns`
206
+ */
207
+ pivotColumnId: string;
208
+ /**
209
+ * Current Pivot Keys
210
+ */
211
+ pivotKey: string;
212
+ }
213
+ export type ColumnHeaderContext = TableColumnHeaderContext | TableColumnGroupHeaderContext | AutoGroupColumnHeaderContext | RowGroupColumnHeaderContext | PivotColumnGroupHeaderContext | PivotAggregationColumnHeaderContext | PivotGrandTotalHeaderContext | PivotColumnTotalHeaderContext | PivotAggregationTotalHeaderContext;
214
+ export type ColumnHeaderContextOld = BaseColumnHeaderContext & ({
60
215
  /**
61
216
  * Auto-generated Group Column when GroupDisplayType is `single` column
62
217
  */
@@ -163,8 +163,8 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
163
163
  destination,
164
164
  showProgressIndicator: true,
165
165
  });
166
- if (destination === 'Download' &&
167
- (format === 'Excel' || format === 'VisualExcel' || format === 'Csv')) {
166
+ if (!exportedReport) {
167
+ // for destination 'Download' and format 'Excel', 'VisualExcel' or 'Csv', AG Grid handles the download as well
168
168
  return;
169
169
  }
170
170
  this.internalApi.sendReportToDestination(exportedReport, report, format, destination);
@@ -45,7 +45,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
45
45
  if ((0, LayoutHelpers_1.isPivotLayout)(layout)) {
46
46
  return [];
47
47
  }
48
- return layout.TableColumns.filter((colId) => layout.ColumnVisibility?.[colId] !== false);
48
+ return layout.TableColumns.filter((colId) => !layout.ColumnVisibility || layout.ColumnVisibility?.[colId] !== false);
49
49
  }
50
50
  getCurrentRowGroupsColumnIds() {
51
51
  const layout = this.getCurrentLayout();
@@ -4,6 +4,7 @@ import { Report, ReportData, ReportFormatType, ReportNameType, SystemReportName
4
4
  import { CsvCell, ExcelCell, ExcelDataType, IRowNode } from 'ag-grid-enterprise';
5
5
  import { AdaptableColumn, AdaptableColumnDataType } from '../../AdaptableState/Common/AdaptableColumn';
6
6
  import { BaseExportContext, DataFormatType, ExportDestinationType, ExportResultData, ProcessExportContext } from '../../AdaptableOptions/ExportOptions';
7
+ import { ExportProcessData } from '../../agGrid/AgGridExportAdapter';
7
8
  export declare class ExportInternalApi extends ApiBase {
8
9
  /**
9
10
  * Value Items for Report Name Selection
@@ -35,6 +36,7 @@ export declare class ExportInternalApi extends ApiBase {
35
36
  createCellExcel(cellContent: any, cellType: ExcelDataType): ExcelCell;
36
37
  createCellHeader(cellContent: any): ExcelCell;
37
38
  buildProcessExportContext(report: Report, format: ReportFormatType, destination: ExportDestinationType): ProcessExportContext;
39
+ exportAllDataInPivotMode(exportProcessData: ExportProcessData): ExportResultData | null;
38
40
  private buildExcelConverter;
39
41
  private buildCsvConverter;
40
42
  private executeGridExport;
@@ -391,6 +391,42 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
391
391
  .filter(Boolean),
392
392
  };
393
393
  }
394
+ exportAllDataInPivotMode(exportProcessData) {
395
+ const { exportContext, exportParams } = exportProcessData;
396
+ const exportedColumns = this.getColumnApi()
397
+ .getExportableColumns()
398
+ .filter((column) => !column.isGeneratedPivotResultColumn);
399
+ const exportedRowData = this.getGridApi().getGridData();
400
+ const reportData = {
401
+ columns: exportedColumns,
402
+ rows: exportedRowData,
403
+ };
404
+ const exportFormat = exportContext.format;
405
+ if (exportFormat === 'JSON') {
406
+ return {
407
+ data: reportData,
408
+ type: 'json',
409
+ };
410
+ }
411
+ if (exportFormat === 'CSV') {
412
+ const csvExportConverter = this.buildCsvConverter(exportContext.report.Name, exportFormat, exportContext.destination);
413
+ const csvData = csvExportConverter(reportData);
414
+ return {
415
+ data: csvData,
416
+ type: 'csv',
417
+ };
418
+ }
419
+ // theoretically 'VisualExcel' is not a valid export format for this function and should be suppressed from UI
420
+ // but just in case, we handle it here and return a "raw", unstyled Excel file
421
+ if (exportFormat === 'Excel' || exportFormat === 'VisualExcel') {
422
+ const excelExportConverter = this.buildExcelConverter(exportContext.report.Name, exportFormat, exportContext.destination);
423
+ const excelData = excelExportConverter(reportData);
424
+ return {
425
+ data: excelData,
426
+ type: 'excel',
427
+ };
428
+ }
429
+ }
394
430
  buildExcelConverter(reportName, reportFormat, exportDestination) {
395
431
  return (reportData) => {
396
432
  return this.executeGridExport(reportData, reportName, reportFormat, exportDestination, (gridApi, exportParams) => gridApi.getDataAsExcel({ ...exportParams }));
@@ -417,6 +453,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
417
453
  rowData: reportData.rows,
418
454
  theme: this.getAgGridApi().getGridOption('theme'),
419
455
  dataTypeDefinitions: this.getAgGridApi().getGridOption('dataTypeDefinitions'),
456
+ columnTypes: this.getAgGridApi().getGridOption('columnTypes'),
420
457
  };
421
458
  const gridParams = {
422
459
  modules: this.getAdaptableApi()
@@ -1,4 +1,4 @@
1
- import { FormatColumn } from '../../../../types';
1
+ import { FormatColumn } from '../../../AdaptableState/FormatColumnState';
2
2
  export declare const getFormatColumnSettingsViewItems: (formatColumn: FormatColumn) => {
3
3
  name: string;
4
4
  values: string[];
@@ -2,15 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFormatColumnSettingsViewItems = void 0;
4
4
  const getFormatColumnSettingsViewItems = (formatColumn) => {
5
- const values = [
6
- `Cell alignment: ${formatColumn.CellAlignment ?? 'default'}`,
7
- `Data Rows: ${formatColumn.RowScope?.ExcludeDataRows ? 'Yes' : 'No'}`,
8
- `Group Rows: ${formatColumn.RowScope?.ExcludeGroupRows ? 'Yes' : 'No'}`,
9
- `Row Summaries: ${formatColumn.RowScope?.ExcludeSummaryRows ? 'Yes' : 'No'}`,
10
- ].filter(Boolean);
5
+ let values = [];
6
+ if (formatColumn.CellAlignment) {
7
+ values.push(`Cell Alignment: ${formatColumn.CellAlignment}`);
8
+ }
9
+ if (formatColumn.RowScope) {
10
+ if (formatColumn.RowScope.ExcludeDataRows) {
11
+ values.push('Exclude Data Rows');
12
+ }
13
+ if (formatColumn.RowScope.ExcludeGroupRows) {
14
+ values.push('Exclude Group Rows');
15
+ }
16
+ if (formatColumn.RowScope.ExcludeSummaryRows) {
17
+ values.push('Exclude Summary Rows');
18
+ }
19
+ }
11
20
  return {
12
21
  name: 'Settings',
13
- values,
22
+ values: values.filter(Boolean),
14
23
  };
15
24
  };
16
25
  exports.getFormatColumnSettingsViewItems = getFormatColumnSettingsViewItems;
@@ -20,8 +20,6 @@ const ReportFormatSelector = (props) => {
20
20
  });
21
21
  const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
22
22
  return (react_1.default.createElement(rebass_1.Flex, { "data-name": "report-format-selector", flex: 1, minWidth: 140 },
23
- react_1.default.createElement(Select_1.Select, {
24
- // style={{ width: '100%' }}
25
- size: size, placeholder: GeneralConstants_1.SELECT_REPORT_FORMAT_STRING, disabled: !allFormats.length || reportName == undefined, className: `ab-${elementType}__Export__format-select`, options: formatItems, onChange: (format) => onReportFormatSelected(format), value: reportFormat, isClearable: true })));
23
+ react_1.default.createElement(Select_1.Select, { style: { width: '100%' }, size: size, placeholder: GeneralConstants_1.SELECT_REPORT_FORMAT_STRING, disabled: !allFormats.length || reportName == undefined, className: `ab-${elementType}__Export__format-select`, options: formatItems, onChange: (format) => onReportFormatSelected(format), value: reportFormat, isClearable: true })));
26
24
  };
27
25
  exports.ReportFormatSelector = ReportFormatSelector;
@@ -19,7 +19,7 @@ const ReportNameSelector = (props) => {
19
19
  };
20
20
  });
21
21
  const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
22
- return (react_1.default.createElement(rebass_1.Flex, { flex: 1, minWidth: props.viewType !== 'StatusBar' ? 160 : undefined },
22
+ return (react_1.default.createElement(rebass_1.Flex, { "data-name": "report-name-selector", flex: 1, minWidth: 160 },
23
23
  react_1.default.createElement(Select_1.Select, { style: { width: '100%' }, size: size, "data-name": "report-name-selector", placeholder: GeneralConstants_1.SELECT_REPORT_STRING, disabled: !allReportNames.length, className: `ab-${elementType}__Export__report-select`, options: reportItems, onChange: (report) => onReportNameSelected(report), value: reportName, isClearable: true })));
24
24
  };
25
25
  exports.ReportNameSelector = ReportNameSelector;
@@ -237,54 +237,56 @@ const SparklineAxisOptions = ({ options, onChange, }) => {
237
237
  };
238
238
  const SparklineTooltipOptions = ({ options, onChange, }) => {
239
239
  const sparklineOptions = options;
240
- const handleChange = (key, value) => {
241
- onChange({ ...options, [key]: value });
240
+ const isTooltipEnabled = sparklineOptions.tooltip?.enabled ?? false;
241
+ const handleChange = (property, value) => {
242
+ onChange({
243
+ ...options,
244
+ tooltip: {
245
+ ...options.tooltip,
246
+ [property]: value,
247
+ },
248
+ });
242
249
  };
243
- const isTooltipEnabled = sparklineOptions.tooltip?.enabled;
244
- const positionTypes = [
250
+ const anchorToOptions = [
245
251
  { value: 'pointer', label: 'Pointer' },
246
252
  { value: 'node', label: 'Node' },
253
+ { value: 'chart', label: 'Chart' },
254
+ ];
255
+ const placementOptions = [
247
256
  { value: 'top', label: 'Top' },
248
257
  { value: 'right', label: 'Right' },
249
258
  { value: 'bottom', label: 'Bottom' },
250
259
  { value: 'left', label: 'Left' },
251
- { value: 'top-left', label: 'Top Left' },
252
260
  { value: 'top-right', label: 'Top Right' },
253
261
  { value: 'bottom-right', label: 'Bottom Right' },
254
262
  { value: 'bottom-left', label: 'Bottom Left' },
255
- ];
256
- const interactionRanges = [
257
- { value: 'exact', label: 'Exact' },
258
- { value: 'nearest', label: 'Nearest' },
263
+ { value: 'top-left', label: 'Top Left' },
264
+ { value: 'center', label: 'Center' },
259
265
  ];
260
266
  return (React.createElement(FormLayout_1.default, null,
261
- React.createElement(FormLayout_1.FormRow, { label: "Enabled" },
262
- React.createElement(CheckBox_1.CheckBox, { checked: sparklineOptions.tooltip?.enabled, onChange: (enabled) => handleChange('tooltip', { ...sparklineOptions.tooltip, enabled }) })),
263
- React.createElement(FormLayout_1.FormRow, { label: "Show Arrow" },
264
- React.createElement(CheckBox_1.CheckBox, { disabled: !isTooltipEnabled, checked: sparklineOptions.tooltip?.showArrow, onChange: (showArrow) => handleChange('tooltip', { ...sparklineOptions.tooltip, showArrow }) })),
265
- React.createElement(FormLayout_1.FormRow, { label: "Interaction Enabled" },
266
- React.createElement(CheckBox_1.CheckBox, { disabled: !isTooltipEnabled, checked: sparklineOptions.tooltip?.interaction?.enabled, onChange: (enabled) => handleChange('tooltip', {
267
- ...sparklineOptions.tooltip,
268
- interaction: { enabled },
269
- }) })),
270
- React.createElement(FormLayout_1.FormRow, { label: "Range" },
267
+ React.createElement(FormLayout_1.FormRow, { label: "Show Tooltip" },
268
+ React.createElement(CheckBox_1.CheckBox, { checked: isTooltipEnabled, onChange: (enabled) => handleChange('enabled', enabled) })),
269
+ React.createElement(FormLayout_1.FormRow, { label: "Anchor To" },
271
270
  React.createElement(rebass_1.Box, { maxWidth: 160 },
272
- React.createElement(Select_1.Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.range ?? 'nearest', onChange: (range) => handleChange('tooltip', { ...sparklineOptions.tooltip, range }), options: interactionRanges }))),
273
- React.createElement(FormLayout_1.FormRow, { label: "Position Type" },
271
+ React.createElement(Select_1.Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.position?.anchorTo, onChange: (value) => handleChange('position', {
272
+ ...sparklineOptions.tooltip?.position,
273
+ anchorTo: value,
274
+ }), options: anchorToOptions }))),
275
+ React.createElement(FormLayout_1.FormRow, { label: "Placement" },
274
276
  React.createElement(rebass_1.Box, { maxWidth: 160 },
275
- React.createElement(Select_1.Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.position?.type ?? 'pointer', onChange: (type) => handleChange('tooltip', {
276
- ...sparklineOptions.tooltip,
277
- position: { ...sparklineOptions.tooltip?.position, type },
278
- }), options: positionTypes }))),
277
+ React.createElement(Select_1.Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.position?.placement, onChange: (value) => handleChange('position', {
278
+ ...sparklineOptions.tooltip?.position,
279
+ placement: value,
280
+ }), options: placementOptions }))),
279
281
  React.createElement(FormLayout_1.FormRow, { label: "Position Offset X" },
280
- React.createElement(AdaptableInput_1.default, { disabled: !isTooltipEnabled, title: "The horizontal offset in pixels for the position of the tooltip.", type: "number", value: sparklineOptions.tooltip?.position?.xOffset ?? '', onChange: (e) => handleChange('tooltip', {
281
- ...sparklineOptions.tooltip,
282
- position: { ...sparklineOptions.tooltip?.position, xOffset: Number(e.target.value) },
282
+ React.createElement(AdaptableInput_1.default, { disabled: !isTooltipEnabled, title: "The horizontal offset in pixels for the position of the tooltip.", type: "number", value: sparklineOptions.tooltip?.position?.xOffset ?? '', onChange: (e) => handleChange('position', {
283
+ ...sparklineOptions.tooltip?.position,
284
+ xOffset: Number(e.target.value),
283
285
  }) })),
284
286
  React.createElement(FormLayout_1.FormRow, { label: "Position Offset Y" },
285
- React.createElement(AdaptableInput_1.default, { disabled: !isTooltipEnabled, title: "The vertical offset in pixels for the position of the tooltip.", type: "number", value: sparklineOptions.tooltip?.position?.yOffset ?? '', onChange: (e) => handleChange('tooltip', {
286
- ...sparklineOptions.tooltip,
287
- position: { ...sparklineOptions.tooltip?.position, yOffset: Number(e.target.value) },
287
+ React.createElement(AdaptableInput_1.default, { disabled: !isTooltipEnabled, title: "The vertical offset in pixels for the position of the tooltip.", type: "number", value: sparklineOptions.tooltip?.position?.yOffset ?? '', onChange: (e) => handleChange('position', {
288
+ ...sparklineOptions.tooltip?.position,
289
+ yOffset: Number(e.target.value),
288
290
  }) }))));
289
291
  };
290
292
  const SparklineMarkerOptions = ({ options, onChange }) => {
@@ -457,6 +457,10 @@ class AgGridAdapter {
457
457
  this.logger.warn(`Column is undefined, returning 'text' for Type`);
458
458
  return 'text';
459
459
  }
460
+ if (agColumn.getId() === GeneralConstants_1.AG_GRID_GROUPED_COLUMN ||
461
+ agColumn.getId() === GeneralConstants_1.AG_GRID_SELECTION_COLUMN) {
462
+ return 'unknown';
463
+ }
460
464
  const colDefType = [].concat(agColumn.getColDef()?.type || []).filter(Boolean);
461
465
  const skippedSpecialCols = ['actionColumn', 'fdc3Column'];
462
466
  if (skippedSpecialCols.some((specialColType) => colDefType.includes(specialColType))) {
@@ -54,6 +54,7 @@ class AgGridExportAdapter {
54
54
  }
55
55
  async exportData(config) {
56
56
  const { report, format, showProgressIndicator } = config;
57
+ let excelStylesWerePatched = false;
57
58
  try {
58
59
  if (showProgressIndicator) {
59
60
  this.adaptableApi.userInterfaceApi.showProgressIndicator({
@@ -64,11 +65,19 @@ class AgGridExportAdapter {
64
65
  await (0, waitForTimeout_1.waitForTimeout)(16);
65
66
  }
66
67
  this.adaptableApi.exportApi.internalApi.setExportInProgress(config.report.Name, config.format, config.destination);
67
- const { exportContext, exportParams } = this.buildExportProcessData(config);
68
+ const exportProcessData = this.buildExportProcessData(config);
69
+ const { exportContext, exportParams } = exportProcessData;
70
+ if (this.adaptableApi.layoutApi.isCurrentLayoutPivot() &&
71
+ config.report.ReportRowScope === 'AllRows') {
72
+ // if in pivot mode but the user wants to export all rows (aka the table row data), we cannot use AG Grids row model
73
+ // we have to use an intermediary transient AG Grid instance
74
+ return this.adaptableApi.exportApi.internalApi.exportAllDataInPivotMode(exportProcessData);
75
+ }
68
76
  if (exportContext.isVisualExcelReport) {
69
77
  // FIXME AFL patch styles only for exported columns!
70
78
  // or even better, only cells
71
79
  this.patchExcelStyles();
80
+ excelStylesWerePatched = true;
72
81
  }
73
82
  // 1. easiest case, we download the file using AG Grid
74
83
  // these methods will automatically handle the file download
@@ -110,7 +119,7 @@ class AgGridExportAdapter {
110
119
  * Cleanup export process
111
120
  */
112
121
  this.adaptableApi.exportApi.internalApi.setExportComplete();
113
- if (format === 'VisualExcel') {
122
+ if (excelStylesWerePatched) {
114
123
  this.resetExcelStyles();
115
124
  }
116
125
  if (showProgressIndicator) {
@@ -123,9 +132,6 @@ class AgGridExportAdapter {
123
132
  */
124
133
  buildExportProcessData(config) {
125
134
  const exportContext = this.buildExportProcessContext(config);
126
- if (exportContext.isVisualExcelReport) {
127
- this.patchExcelStyles();
128
- }
129
135
  const exportParams = this.buildExportParams(exportContext);
130
136
  exportContext.exportedColumnIds = exportParams.columnKeys;
131
137
  return {
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
5
- PUBLISH_TIMESTAMP: 1746196695957 || Date.now(),
6
- VERSION: "20.0.13" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1746613800736 || Date.now(),
6
+ VERSION: "20.1.1" || '--current-version--',
7
7
  };
@@ -32,7 +32,6 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
32
32
  private globalAgGridEventListener;
33
33
  private columnDefsChanged;
34
34
  private indexColumns;
35
- private getColDefById;
36
35
  private onGridLayoutChanged;
37
36
  private triggerGridLayoutChange;
38
37
  onChange(fn: (layout: TableLayoutModel | PivotLayoutModel) => void): () => void;
@@ -208,9 +208,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
208
208
  };
209
209
  colDefs.forEach(iteration);
210
210
  }
211
- getColDefById(colId) {
212
- return this.idsToColDefs[colId] ?? null;
213
- }
214
211
  onGridLayoutChanged(layout) {
215
212
  // we want to have this check, since onGridLayoutChanged might be triggered
216
213
  // by some AG Grid actions we're not interested - eg: filter changed
@@ -43,6 +43,8 @@ exports.logChanges = logChanges;
43
43
  function isTableLayoutEqual(l1, l2) {
44
44
  l1 = (0, normalizeLayoutModel_1.normalizeTableLayoutModel)(l1);
45
45
  l2 = (0, normalizeLayoutModel_1.normalizeTableLayoutModel)(l2);
46
+ clearIgnoredProperties(l1);
47
+ clearIgnoredProperties(l2);
46
48
  const res = (0, isEqual_1.default)(l1, l2);
47
49
  if (!res) {
48
50
  (0, exports.logChanges)(l1, l2);
@@ -50,9 +52,16 @@ function isTableLayoutEqual(l1, l2) {
50
52
  return res;
51
53
  }
52
54
  exports.isTableLayoutEqual = isTableLayoutEqual;
55
+ //#clearIgnoredProperties
56
+ function clearIgnoredProperties(layout) {
57
+ delete layout.GridFilter;
58
+ delete layout.ColumnFilters;
59
+ }
53
60
  function isPivotLayoutEqual(l1, l2) {
54
61
  l1 = (0, normalizeLayoutModel_1.normalizePivotLayoutModel)(l1);
55
62
  l2 = (0, normalizeLayoutModel_1.normalizePivotLayoutModel)(l2);
63
+ clearIgnoredProperties(l1);
64
+ clearIgnoredProperties(l2);
56
65
  const res = (0, isEqual_1.default)(l1, l2);
57
66
  if (!res) {
58
67
  (0, exports.logChanges)(l1, l2);
@@ -1501,6 +1501,22 @@ export declare const ADAPTABLE_METAMODEL: {
1501
1501
  kind: string;
1502
1502
  desc: string;
1503
1503
  };
1504
+ BaseColumnHeaderContext: {
1505
+ name: string;
1506
+ kind: string;
1507
+ desc: string;
1508
+ props: ({
1509
+ name: string;
1510
+ kind: string;
1511
+ desc: string;
1512
+ ref: string;
1513
+ } | {
1514
+ name: string;
1515
+ kind: string;
1516
+ desc: string;
1517
+ ref?: undefined;
1518
+ })[];
1519
+ };
1504
1520
  BaseContext: {
1505
1521
  name: string;
1506
1522
  kind: string;
@@ -4413,6 +4429,11 @@ export declare const ADAPTABLE_METAMODEL: {
4413
4429
  ref: string;
4414
4430
  })[];
4415
4431
  };
4432
+ PivotTotalPosition: {
4433
+ name: string;
4434
+ kind: string;
4435
+ desc: string;
4436
+ };
4416
4437
  PlusMinusNudge: {
4417
4438
  name: string;
4418
4439
  kind: string;