@adaptabletools/adaptable 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 +2 -2
- package/src/AdaptableOptions/ColumnOptions.d.ts +158 -3
- package/src/Api/Implementation/ExportApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -0
- package/src/Api/Internal/ExportInternalApi.js +37 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +16 -7
- package/src/View/Export/ReportFormatSelector.js +1 -3
- package/src/View/Export/ReportNameSelector.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +33 -31
- package/src/agGrid/AgGridAdapter.js +5 -1
- package/src/agGrid/AgGridExportAdapter.js +11 -5
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.d.ts +0 -1
- package/src/layout-manager/src/index.js +0 -3
- package/src/layout-manager/src/isLayoutEqual.js +9 -0
- package/src/metamodel/adaptable.metamodel.d.ts +21 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "20.
|
|
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",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"uuid": "9.0.1"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"ag-grid-enterprise": ">=33.
|
|
66
|
+
"ag-grid-enterprise": ">=33.2.0"
|
|
67
67
|
},
|
|
68
68
|
"publishTimestamp": 0,
|
|
69
69
|
"type": "module",
|
|
@@ -38,7 +38,7 @@ export interface ColumnOptions {
|
|
|
38
38
|
/**
|
|
39
39
|
* Common properties for Column Header Context
|
|
40
40
|
*/
|
|
41
|
-
export
|
|
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
|
-
}
|
|
59
|
-
export
|
|
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
|
*/
|
|
@@ -159,8 +159,8 @@ export class ExportApiImpl extends ApiBase {
|
|
|
159
159
|
destination,
|
|
160
160
|
showProgressIndicator: true,
|
|
161
161
|
});
|
|
162
|
-
if (
|
|
163
|
-
|
|
162
|
+
if (!exportedReport) {
|
|
163
|
+
// for destination 'Download' and format 'Excel', 'VisualExcel' or 'Csv', AG Grid handles the download as well
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
this.internalApi.sendReportToDestination(exportedReport, report, format, destination);
|
|
@@ -41,7 +41,7 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
41
41
|
if (isPivotLayout(layout)) {
|
|
42
42
|
return [];
|
|
43
43
|
}
|
|
44
|
-
return layout.TableColumns.filter((colId) => layout.ColumnVisibility?.[colId] !== false);
|
|
44
|
+
return layout.TableColumns.filter((colId) => !layout.ColumnVisibility || layout.ColumnVisibility?.[colId] !== false);
|
|
45
45
|
}
|
|
46
46
|
getCurrentRowGroupsColumnIds() {
|
|
47
47
|
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;
|
|
@@ -387,6 +387,42 @@ export class ExportInternalApi extends ApiBase {
|
|
|
387
387
|
.filter(Boolean),
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
+
exportAllDataInPivotMode(exportProcessData) {
|
|
391
|
+
const { exportContext, exportParams } = exportProcessData;
|
|
392
|
+
const exportedColumns = this.getColumnApi()
|
|
393
|
+
.getExportableColumns()
|
|
394
|
+
.filter((column) => !column.isGeneratedPivotResultColumn);
|
|
395
|
+
const exportedRowData = this.getGridApi().getGridData();
|
|
396
|
+
const reportData = {
|
|
397
|
+
columns: exportedColumns,
|
|
398
|
+
rows: exportedRowData,
|
|
399
|
+
};
|
|
400
|
+
const exportFormat = exportContext.format;
|
|
401
|
+
if (exportFormat === 'JSON') {
|
|
402
|
+
return {
|
|
403
|
+
data: reportData,
|
|
404
|
+
type: 'json',
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
if (exportFormat === 'CSV') {
|
|
408
|
+
const csvExportConverter = this.buildCsvConverter(exportContext.report.Name, exportFormat, exportContext.destination);
|
|
409
|
+
const csvData = csvExportConverter(reportData);
|
|
410
|
+
return {
|
|
411
|
+
data: csvData,
|
|
412
|
+
type: 'csv',
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
// theoretically 'VisualExcel' is not a valid export format for this function and should be suppressed from UI
|
|
416
|
+
// but just in case, we handle it here and return a "raw", unstyled Excel file
|
|
417
|
+
if (exportFormat === 'Excel' || exportFormat === 'VisualExcel') {
|
|
418
|
+
const excelExportConverter = this.buildExcelConverter(exportContext.report.Name, exportFormat, exportContext.destination);
|
|
419
|
+
const excelData = excelExportConverter(reportData);
|
|
420
|
+
return {
|
|
421
|
+
data: excelData,
|
|
422
|
+
type: 'excel',
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
}
|
|
390
426
|
buildExcelConverter(reportName, reportFormat, exportDestination) {
|
|
391
427
|
return (reportData) => {
|
|
392
428
|
return this.executeGridExport(reportData, reportName, reportFormat, exportDestination, (gridApi, exportParams) => gridApi.getDataAsExcel({ ...exportParams }));
|
|
@@ -413,6 +449,7 @@ export class ExportInternalApi extends ApiBase {
|
|
|
413
449
|
rowData: reportData.rows,
|
|
414
450
|
theme: this.getAgGridApi().getGridOption('theme'),
|
|
415
451
|
dataTypeDefinitions: this.getAgGridApi().getGridOption('dataTypeDefinitions'),
|
|
452
|
+
columnTypes: this.getAgGridApi().getGridOption('columnTypes'),
|
|
416
453
|
};
|
|
417
454
|
const gridParams = {
|
|
418
455
|
modules: this.getAdaptableApi()
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
export const getFormatColumnSettingsViewItems = (formatColumn) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
let values = [];
|
|
3
|
+
if (formatColumn.CellAlignment) {
|
|
4
|
+
values.push(`Cell Alignment: ${formatColumn.CellAlignment}`);
|
|
5
|
+
}
|
|
6
|
+
if (formatColumn.RowScope) {
|
|
7
|
+
if (formatColumn.RowScope.ExcludeDataRows) {
|
|
8
|
+
values.push('Exclude Data Rows');
|
|
9
|
+
}
|
|
10
|
+
if (formatColumn.RowScope.ExcludeGroupRows) {
|
|
11
|
+
values.push('Exclude Group Rows');
|
|
12
|
+
}
|
|
13
|
+
if (formatColumn.RowScope.ExcludeSummaryRows) {
|
|
14
|
+
values.push('Exclude Summary Rows');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
8
17
|
return {
|
|
9
18
|
name: 'Settings',
|
|
10
|
-
values,
|
|
19
|
+
values: values.filter(Boolean),
|
|
11
20
|
};
|
|
12
21
|
};
|
|
@@ -16,7 +16,5 @@ export const ReportFormatSelector = (props) => {
|
|
|
16
16
|
});
|
|
17
17
|
const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
18
18
|
return (React.createElement(Flex, { "data-name": "report-format-selector", flex: 1, minWidth: 140 },
|
|
19
|
-
React.createElement(Select, {
|
|
20
|
-
// style={{ width: '100%' }}
|
|
21
|
-
size: size, placeholder: 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 })));
|
|
19
|
+
React.createElement(Select, { style: { width: '100%' }, size: size, placeholder: 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 })));
|
|
22
20
|
};
|
|
@@ -15,6 +15,6 @@ export const ReportNameSelector = (props) => {
|
|
|
15
15
|
};
|
|
16
16
|
});
|
|
17
17
|
const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
18
|
-
return (React.createElement(Flex, { flex: 1, minWidth:
|
|
18
|
+
return (React.createElement(Flex, { "data-name": "report-name-selector", flex: 1, minWidth: 160 },
|
|
19
19
|
React.createElement(Select, { style: { width: '100%' }, size: size, "data-name": "report-name-selector", placeholder: SELECT_REPORT_STRING, disabled: !allReportNames.length, className: `ab-${elementType}__Export__report-select`, options: reportItems, onChange: (report) => onReportNameSelected(report), value: reportName, isClearable: true })));
|
|
20
20
|
};
|
|
@@ -232,54 +232,56 @@ const SparklineAxisOptions = ({ options, onChange, }) => {
|
|
|
232
232
|
};
|
|
233
233
|
const SparklineTooltipOptions = ({ options, onChange, }) => {
|
|
234
234
|
const sparklineOptions = options;
|
|
235
|
-
const
|
|
236
|
-
|
|
235
|
+
const isTooltipEnabled = sparklineOptions.tooltip?.enabled ?? false;
|
|
236
|
+
const handleChange = (property, value) => {
|
|
237
|
+
onChange({
|
|
238
|
+
...options,
|
|
239
|
+
tooltip: {
|
|
240
|
+
...options.tooltip,
|
|
241
|
+
[property]: value,
|
|
242
|
+
},
|
|
243
|
+
});
|
|
237
244
|
};
|
|
238
|
-
const
|
|
239
|
-
const positionTypes = [
|
|
245
|
+
const anchorToOptions = [
|
|
240
246
|
{ value: 'pointer', label: 'Pointer' },
|
|
241
247
|
{ value: 'node', label: 'Node' },
|
|
248
|
+
{ value: 'chart', label: 'Chart' },
|
|
249
|
+
];
|
|
250
|
+
const placementOptions = [
|
|
242
251
|
{ value: 'top', label: 'Top' },
|
|
243
252
|
{ value: 'right', label: 'Right' },
|
|
244
253
|
{ value: 'bottom', label: 'Bottom' },
|
|
245
254
|
{ value: 'left', label: 'Left' },
|
|
246
|
-
{ value: 'top-left', label: 'Top Left' },
|
|
247
255
|
{ value: 'top-right', label: 'Top Right' },
|
|
248
256
|
{ value: 'bottom-right', label: 'Bottom Right' },
|
|
249
257
|
{ value: 'bottom-left', label: 'Bottom Left' },
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
{ value: 'exact', label: 'Exact' },
|
|
253
|
-
{ value: 'nearest', label: 'Nearest' },
|
|
258
|
+
{ value: 'top-left', label: 'Top Left' },
|
|
259
|
+
{ value: 'center', label: 'Center' },
|
|
254
260
|
];
|
|
255
261
|
return (React.createElement(FormLayout, null,
|
|
256
|
-
React.createElement(FormRow, { label: "
|
|
257
|
-
React.createElement(CheckBox, { checked:
|
|
258
|
-
React.createElement(FormRow, { label: "
|
|
259
|
-
React.createElement(CheckBox, { disabled: !isTooltipEnabled, checked: sparklineOptions.tooltip?.showArrow, onChange: (showArrow) => handleChange('tooltip', { ...sparklineOptions.tooltip, showArrow }) })),
|
|
260
|
-
React.createElement(FormRow, { label: "Interaction Enabled" },
|
|
261
|
-
React.createElement(CheckBox, { disabled: !isTooltipEnabled, checked: sparklineOptions.tooltip?.interaction?.enabled, onChange: (enabled) => handleChange('tooltip', {
|
|
262
|
-
...sparklineOptions.tooltip,
|
|
263
|
-
interaction: { enabled },
|
|
264
|
-
}) })),
|
|
265
|
-
React.createElement(FormRow, { label: "Range" },
|
|
262
|
+
React.createElement(FormRow, { label: "Show Tooltip" },
|
|
263
|
+
React.createElement(CheckBox, { checked: isTooltipEnabled, onChange: (enabled) => handleChange('enabled', enabled) })),
|
|
264
|
+
React.createElement(FormRow, { label: "Anchor To" },
|
|
266
265
|
React.createElement(Box, { maxWidth: 160 },
|
|
267
|
-
React.createElement(Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.
|
|
268
|
-
|
|
266
|
+
React.createElement(Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.position?.anchorTo, onChange: (value) => handleChange('position', {
|
|
267
|
+
...sparklineOptions.tooltip?.position,
|
|
268
|
+
anchorTo: value,
|
|
269
|
+
}), options: anchorToOptions }))),
|
|
270
|
+
React.createElement(FormRow, { label: "Placement" },
|
|
269
271
|
React.createElement(Box, { maxWidth: 160 },
|
|
270
|
-
React.createElement(Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.position?.
|
|
271
|
-
...sparklineOptions.tooltip,
|
|
272
|
-
|
|
273
|
-
}), options:
|
|
272
|
+
React.createElement(Select, { disabled: !isTooltipEnabled, value: sparklineOptions.tooltip?.position?.placement, onChange: (value) => handleChange('position', {
|
|
273
|
+
...sparklineOptions.tooltip?.position,
|
|
274
|
+
placement: value,
|
|
275
|
+
}), options: placementOptions }))),
|
|
274
276
|
React.createElement(FormRow, { label: "Position Offset X" },
|
|
275
|
-
React.createElement(AdaptableInput, { disabled: !isTooltipEnabled, title: "The horizontal offset in pixels for the position of the tooltip.", type: "number", value: sparklineOptions.tooltip?.position?.xOffset ?? '', onChange: (e) => handleChange('
|
|
276
|
-
...sparklineOptions.tooltip,
|
|
277
|
-
|
|
277
|
+
React.createElement(AdaptableInput, { 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', {
|
|
278
|
+
...sparklineOptions.tooltip?.position,
|
|
279
|
+
xOffset: Number(e.target.value),
|
|
278
280
|
}) })),
|
|
279
281
|
React.createElement(FormRow, { label: "Position Offset Y" },
|
|
280
|
-
React.createElement(AdaptableInput, { disabled: !isTooltipEnabled, title: "The vertical offset in pixels for the position of the tooltip.", type: "number", value: sparklineOptions.tooltip?.position?.yOffset ?? '', onChange: (e) => handleChange('
|
|
281
|
-
...sparklineOptions.tooltip,
|
|
282
|
-
|
|
282
|
+
React.createElement(AdaptableInput, { 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', {
|
|
283
|
+
...sparklineOptions.tooltip?.position,
|
|
284
|
+
yOffset: Number(e.target.value),
|
|
283
285
|
}) }))));
|
|
284
286
|
};
|
|
285
287
|
const SparklineMarkerOptions = ({ options, onChange }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColumnApiModule, } from 'ag-grid-enterprise';
|
|
2
2
|
import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
|
|
3
|
-
import { ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME } from '../Utilities/Constants/GeneralConstants';
|
|
3
|
+
import { ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME, AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_COLUMN, } from '../Utilities/Constants/GeneralConstants';
|
|
4
4
|
import { createUuid } from '../AdaptableState/Uuid';
|
|
5
5
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
6
6
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
@@ -453,6 +453,10 @@ export class AgGridAdapter {
|
|
|
453
453
|
this.logger.warn(`Column is undefined, returning 'text' for Type`);
|
|
454
454
|
return 'text';
|
|
455
455
|
}
|
|
456
|
+
if (agColumn.getId() === AG_GRID_GROUPED_COLUMN ||
|
|
457
|
+
agColumn.getId() === AG_GRID_SELECTION_COLUMN) {
|
|
458
|
+
return 'unknown';
|
|
459
|
+
}
|
|
456
460
|
const colDefType = [].concat(agColumn.getColDef()?.type || []).filter(Boolean);
|
|
457
461
|
const skippedSpecialCols = ['actionColumn', 'fdc3Column'];
|
|
458
462
|
if (skippedSpecialCols.some((specialColType) => colDefType.includes(specialColType))) {
|
|
@@ -50,6 +50,7 @@ export class AgGridExportAdapter {
|
|
|
50
50
|
}
|
|
51
51
|
async exportData(config) {
|
|
52
52
|
const { report, format, showProgressIndicator } = config;
|
|
53
|
+
let excelStylesWerePatched = false;
|
|
53
54
|
try {
|
|
54
55
|
if (showProgressIndicator) {
|
|
55
56
|
this.adaptableApi.userInterfaceApi.showProgressIndicator({
|
|
@@ -60,11 +61,19 @@ export class AgGridExportAdapter {
|
|
|
60
61
|
await waitForTimeout(16);
|
|
61
62
|
}
|
|
62
63
|
this.adaptableApi.exportApi.internalApi.setExportInProgress(config.report.Name, config.format, config.destination);
|
|
63
|
-
const
|
|
64
|
+
const exportProcessData = this.buildExportProcessData(config);
|
|
65
|
+
const { exportContext, exportParams } = exportProcessData;
|
|
66
|
+
if (this.adaptableApi.layoutApi.isCurrentLayoutPivot() &&
|
|
67
|
+
config.report.ReportRowScope === 'AllRows') {
|
|
68
|
+
// if in pivot mode but the user wants to export all rows (aka the table row data), we cannot use AG Grids row model
|
|
69
|
+
// we have to use an intermediary transient AG Grid instance
|
|
70
|
+
return this.adaptableApi.exportApi.internalApi.exportAllDataInPivotMode(exportProcessData);
|
|
71
|
+
}
|
|
64
72
|
if (exportContext.isVisualExcelReport) {
|
|
65
73
|
// FIXME AFL patch styles only for exported columns!
|
|
66
74
|
// or even better, only cells
|
|
67
75
|
this.patchExcelStyles();
|
|
76
|
+
excelStylesWerePatched = true;
|
|
68
77
|
}
|
|
69
78
|
// 1. easiest case, we download the file using AG Grid
|
|
70
79
|
// these methods will automatically handle the file download
|
|
@@ -106,7 +115,7 @@ export class AgGridExportAdapter {
|
|
|
106
115
|
* Cleanup export process
|
|
107
116
|
*/
|
|
108
117
|
this.adaptableApi.exportApi.internalApi.setExportComplete();
|
|
109
|
-
if (
|
|
118
|
+
if (excelStylesWerePatched) {
|
|
110
119
|
this.resetExcelStyles();
|
|
111
120
|
}
|
|
112
121
|
if (showProgressIndicator) {
|
|
@@ -119,9 +128,6 @@ export class AgGridExportAdapter {
|
|
|
119
128
|
*/
|
|
120
129
|
buildExportProcessData(config) {
|
|
121
130
|
const exportContext = this.buildExportProcessContext(config);
|
|
122
|
-
if (exportContext.isVisualExcelReport) {
|
|
123
|
-
this.patchExcelStyles();
|
|
124
|
-
}
|
|
125
131
|
const exportParams = this.buildExportParams(exportContext);
|
|
126
132
|
exportContext.exportedColumnIds = exportParams.columnKeys;
|
|
127
133
|
return {
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "20.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1746613770593 || Date.now(),
|
|
4
|
+
VERSION: "20.1.1" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -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;
|
|
@@ -205,9 +205,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
205
205
|
};
|
|
206
206
|
colDefs.forEach(iteration);
|
|
207
207
|
}
|
|
208
|
-
getColDefById(colId) {
|
|
209
|
-
return this.idsToColDefs[colId] ?? null;
|
|
210
|
-
}
|
|
211
208
|
onGridLayoutChanged(layout) {
|
|
212
209
|
// we want to have this check, since onGridLayoutChanged might be triggered
|
|
213
210
|
// by some AG Grid actions we're not interested - eg: filter changed
|
|
@@ -37,15 +37,24 @@ export const logChanges = (l1, l2, log) => {
|
|
|
37
37
|
export function isTableLayoutEqual(l1, l2) {
|
|
38
38
|
l1 = normalizeTableLayoutModel(l1);
|
|
39
39
|
l2 = normalizeTableLayoutModel(l2);
|
|
40
|
+
clearIgnoredProperties(l1);
|
|
41
|
+
clearIgnoredProperties(l2);
|
|
40
42
|
const res = isDeepEqual(l1, l2);
|
|
41
43
|
if (!res) {
|
|
42
44
|
logChanges(l1, l2);
|
|
43
45
|
}
|
|
44
46
|
return res;
|
|
45
47
|
}
|
|
48
|
+
//#clearIgnoredProperties
|
|
49
|
+
function clearIgnoredProperties(layout) {
|
|
50
|
+
delete layout.GridFilter;
|
|
51
|
+
delete layout.ColumnFilters;
|
|
52
|
+
}
|
|
46
53
|
export function isPivotLayoutEqual(l1, l2) {
|
|
47
54
|
l1 = normalizePivotLayoutModel(l1);
|
|
48
55
|
l2 = normalizePivotLayoutModel(l2);
|
|
56
|
+
clearIgnoredProperties(l1);
|
|
57
|
+
clearIgnoredProperties(l2);
|
|
49
58
|
const res = isDeepEqual(l1, l2);
|
|
50
59
|
if (!res) {
|
|
51
60
|
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;
|