@adaptabletools/adaptable 20.2.3 → 20.2.5
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 +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +25 -8
- package/src/AdaptableState/Common/AggregationColumns.d.ts +6 -0
- package/src/AdaptableState/LayoutState.d.ts +17 -16
- package/src/Api/ExportApi.d.ts +7 -8
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ExportApiImpl.js +20 -11
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/ExportInternalApi.js +4 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +7 -6
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +19 -19
- package/src/metamodel/adaptable.metamodel.d.ts +34 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "20.2.
|
|
3
|
+
"version": "20.2.5",
|
|
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",
|
|
@@ -212,7 +212,7 @@ export interface IAdaptable {
|
|
|
212
212
|
getGroupRowNodes(config?: {
|
|
213
213
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
214
214
|
}): IRowNode[];
|
|
215
|
-
|
|
215
|
+
updateRowGroupsAndColumnGroupsExpandedState(layout?: Layout): void;
|
|
216
216
|
getRowsInViewport(): IRowNode[];
|
|
217
217
|
isGroupRowNode(rowNode: IRowNode): boolean;
|
|
218
218
|
isRowNodeVisible(rowNode: IRowNode): boolean;
|
|
@@ -24,7 +24,7 @@ export interface ExportOptions<TData = any> {
|
|
|
24
24
|
/**
|
|
25
25
|
* User-provided Report Destinations (in addition to those shipped in AdapTable)
|
|
26
26
|
*/
|
|
27
|
-
customDestinations?: CustomDestination[];
|
|
27
|
+
customDestinations?: CustomDestination[] | ((context: CustomDestinationsContext) => CustomDestination[]);
|
|
28
28
|
/**
|
|
29
29
|
* System Reports to use; leave unset for all, empty array for none
|
|
30
30
|
*
|
|
@@ -104,7 +104,7 @@ export interface SystemReportNamesContext extends BaseContext {
|
|
|
104
104
|
*/
|
|
105
105
|
defaultSystemReportNames: SystemReportName[];
|
|
106
106
|
/**
|
|
107
|
-
* Name of
|
|
107
|
+
* Name of current Layout
|
|
108
108
|
*/
|
|
109
109
|
currentLayoutName: string;
|
|
110
110
|
}
|
|
@@ -117,11 +117,11 @@ export interface SystemReportFormatsContext extends BaseContext {
|
|
|
117
117
|
*/
|
|
118
118
|
defaultSystemReportFormats: SystemReportFormat[];
|
|
119
119
|
/**
|
|
120
|
-
* Name of
|
|
120
|
+
* Name of current Layout
|
|
121
121
|
*/
|
|
122
122
|
currentLayoutName: string;
|
|
123
123
|
/**
|
|
124
|
-
* Name of
|
|
124
|
+
* Name of current Report
|
|
125
125
|
*/
|
|
126
126
|
currentReportName?: ReportNameType;
|
|
127
127
|
}
|
|
@@ -130,19 +130,36 @@ export interface SystemReportFormatsContext extends BaseContext {
|
|
|
130
130
|
*/
|
|
131
131
|
export interface SystemExportDestinationsContext extends BaseContext {
|
|
132
132
|
/**
|
|
133
|
-
* Default System
|
|
133
|
+
* Default System Export Destinations
|
|
134
134
|
*/
|
|
135
135
|
defaultSystemExportDestinations: SystemExportDestination[];
|
|
136
136
|
/**
|
|
137
|
-
* Name of
|
|
137
|
+
* Name of current Layout
|
|
138
|
+
*/
|
|
139
|
+
currentLayoutName: string;
|
|
140
|
+
/**
|
|
141
|
+
* Name of current Report
|
|
142
|
+
*/
|
|
143
|
+
currentReportName?: ReportNameType;
|
|
144
|
+
/**
|
|
145
|
+
* Format of current Report
|
|
146
|
+
*/
|
|
147
|
+
currentReportFormat?: ReportFormatType;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Context provided to `ExportOptions.customDestinations` callback
|
|
151
|
+
*/
|
|
152
|
+
export interface CustomDestinationsContext extends BaseContext {
|
|
153
|
+
/**
|
|
154
|
+
* Name of current Layout
|
|
138
155
|
*/
|
|
139
156
|
currentLayoutName: string;
|
|
140
157
|
/**
|
|
141
|
-
* Name of
|
|
158
|
+
* Name of current Report
|
|
142
159
|
*/
|
|
143
160
|
currentReportName?: ReportNameType;
|
|
144
161
|
/**
|
|
145
|
-
* Format of
|
|
162
|
+
* Format of current Report
|
|
146
163
|
*/
|
|
147
164
|
currentReportFormat?: ReportFormatType;
|
|
148
165
|
}
|
|
@@ -7,7 +7,13 @@ export type AggregationColumnValue = string | true | WeightedAverageAggregation;
|
|
|
7
7
|
* Defines an Aggregated Column in a Table Layout
|
|
8
8
|
*/
|
|
9
9
|
export type TableAggregationColumns = {
|
|
10
|
+
/**
|
|
11
|
+
* The Column being Aggretated
|
|
12
|
+
*/
|
|
10
13
|
ColumnId: string;
|
|
14
|
+
/**
|
|
15
|
+
* The type of Aggregation
|
|
16
|
+
*/
|
|
11
17
|
AggFunc: AggregationColumnValue;
|
|
12
18
|
}[];
|
|
13
19
|
/**
|
|
@@ -80,12 +80,7 @@ export interface LayoutBase extends AdaptableObject {
|
|
|
80
80
|
*/
|
|
81
81
|
AutoSizeColumns?: boolean;
|
|
82
82
|
/**
|
|
83
|
-
* Position of the Grand Total Row in the Layout
|
|
84
|
-
* @property {boolean | string} GrandTotalRow
|
|
85
|
-
* - 'top' | 'bottom' - Scrollable position at grid edges
|
|
86
|
-
* - 'pinnedTop' | 'pinnedBottom' - Fixed position at grid edges
|
|
87
|
-
* - true - Same as 'pinnedTop'
|
|
88
|
-
* - false/null - Hidden
|
|
83
|
+
* Position of the Grand Total Row in the Layout
|
|
89
84
|
*/
|
|
90
85
|
GrandTotalRow?: 'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom' | boolean;
|
|
91
86
|
}
|
|
@@ -191,22 +186,28 @@ export type RowGroupValuesWithExceptionKeys = {
|
|
|
191
186
|
RowGroupDefaultBehavior: 'expanded' | 'collapsed';
|
|
192
187
|
} & XOR<{
|
|
193
188
|
/**
|
|
194
|
-
* @deprecated - use GroupKeys instead
|
|
195
|
-
* to configure the row group expand / collapse behaviour for each combination of row grouped columns.
|
|
189
|
+
* @deprecated - use GroupKeys instead which enables listing exceptions on a per Column basis
|
|
196
190
|
*/
|
|
197
191
|
ExceptionGroupKeys?: any[][];
|
|
198
192
|
}, {
|
|
199
193
|
/**
|
|
200
|
-
*
|
|
201
|
-
* The default value is configured via RowGroupDefaultBehavior, but exceptions are configured by the GroupKeys array.
|
|
202
|
-
* Each item in the GroupKeys array is a an object with `RowGroupedColumns` and `ExceptionGroupKeys`. Those properties
|
|
203
|
-
* configure the collapse/expand exceptions for the specific row group columns.
|
|
194
|
+
* Configures Row Group Expand / Collapse behaviour together with per Column Exceptions
|
|
204
195
|
*/
|
|
205
|
-
GroupKeys?:
|
|
206
|
-
RowGroupedColumns: string[];
|
|
207
|
-
ExceptionGroupKeys?: any[][];
|
|
208
|
-
}[];
|
|
196
|
+
GroupKeys?: GroupKeys[];
|
|
209
197
|
}>;
|
|
198
|
+
/**
|
|
199
|
+
* Enables setting Row Group behaviour with exceptions
|
|
200
|
+
*/
|
|
201
|
+
export interface GroupKeys {
|
|
202
|
+
/**
|
|
203
|
+
* Columns that are Row Grouped
|
|
204
|
+
*/
|
|
205
|
+
RowGroupedColumns: string[];
|
|
206
|
+
/**
|
|
207
|
+
* Exceptions to default behaviour, provided as array or arrays
|
|
208
|
+
*/
|
|
209
|
+
ExceptionGroupKeys?: any[][];
|
|
210
|
+
}
|
|
210
211
|
/**
|
|
211
212
|
* Manages Column Group expand / collapse behaviour, including exceptions
|
|
212
213
|
*/
|
package/src/Api/ExportApi.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export interface ExportApi {
|
|
|
22
22
|
* Retrieves available System Export Destinations (configured in Export Options)
|
|
23
23
|
*/
|
|
24
24
|
getAvailableSystemDestinations(): SystemExportDestination[];
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves available Custom Destinations (configured in Export Options)
|
|
27
|
+
*/
|
|
28
|
+
getAvailableCustomDestinations(): CustomDestination[];
|
|
25
29
|
/**
|
|
26
30
|
* Retrieves name of currently selected Report
|
|
27
31
|
*/
|
|
@@ -60,11 +64,6 @@ export interface ExportApi {
|
|
|
60
64
|
* Retrieves all Report Formats that are available
|
|
61
65
|
*/
|
|
62
66
|
getAllFormats(): ReportFormatType[];
|
|
63
|
-
/**
|
|
64
|
-
* Retrieves all Custom Destinations from Export Options
|
|
65
|
-
* @returns custom destinations
|
|
66
|
-
*/
|
|
67
|
-
getCustomDestinations(): CustomDestination[];
|
|
68
67
|
/**
|
|
69
68
|
* Retrieves Destination with the given name
|
|
70
69
|
* @param destinationName destination to retrieve
|
|
@@ -120,10 +119,10 @@ export interface ExportApi {
|
|
|
120
119
|
*/
|
|
121
120
|
updateReports(reports: Report[]): Report[];
|
|
122
121
|
/**
|
|
123
|
-
* If the given destination is a
|
|
122
|
+
* If the given destination is a System one
|
|
124
123
|
* @param destination destination to check
|
|
125
124
|
*/
|
|
126
|
-
|
|
125
|
+
isExportDestinationSystem(destinationName: ExportDestinationType): boolean;
|
|
127
126
|
/**
|
|
128
127
|
* Retrieves the Export Destinations that are supported for the given Report Format
|
|
129
128
|
* @param reportFormat - report format to check
|
|
@@ -144,7 +143,7 @@ export interface ExportApi {
|
|
|
144
143
|
* @param format - format of the report
|
|
145
144
|
* @param destination - destination to export to
|
|
146
145
|
* @param exportConfig - optional export configuration
|
|
147
|
-
|
|
146
|
+
*/
|
|
148
147
|
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): Promise<void>;
|
|
149
148
|
/**
|
|
150
149
|
* Gets the data for the Report with the given Name in the given Format
|
|
@@ -19,6 +19,8 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
19
19
|
getAvailableSystemReports(): SystemReportName[];
|
|
20
20
|
getAvailableSystemFormats(): SystemReportFormat[];
|
|
21
21
|
getAvailableSystemDestinations(): SystemExportDestination[];
|
|
22
|
+
getAvailableCustomDestinations(): CustomDestination[];
|
|
23
|
+
isExportDestinationSystem(destinationName: string): boolean;
|
|
22
24
|
getAllExportDestinations(): ExportDestinationType[];
|
|
23
25
|
getAllFormats(): ReportFormatType[];
|
|
24
26
|
getAllReports(): Report[];
|
|
@@ -26,8 +28,6 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
26
28
|
clearReport(): void;
|
|
27
29
|
selectFormat(reportFormat: ReportFormatType | null): void;
|
|
28
30
|
clearFormat(): void;
|
|
29
|
-
getCustomDestinations(): CustomDestination[];
|
|
30
|
-
isExportDestinationCustom(destinationName: string): boolean;
|
|
31
31
|
getExportDestinationForm(destinationName: string): AdaptableForm<ExportFormContext> | undefined;
|
|
32
32
|
canExportToExcel(): boolean;
|
|
33
33
|
canExportToCsv(): boolean;
|
|
@@ -2,7 +2,7 @@ import * as ExportRedux from '../../Redux/ActionsReducers/ExportRedux';
|
|
|
2
2
|
import { ApiBase } from './ApiBase';
|
|
3
3
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
4
4
|
import { ExportInternalApi } from '../Internal/ExportInternalApi';
|
|
5
|
-
import { ALL_DATA_REPORT, EMPTY_STRING, SYSTEM_EXPORT_DESTINATIONS, SYSTEM_REPORT_FORMATS, SYSTEM_REPORT_NAMES, VISUAL_EXCEL_FORMAT_REPORT, } from '../../Utilities/Constants/GeneralConstants';
|
|
5
|
+
import { ALL_DATA_REPORT, CLIPBOARD_EXPORT_DESTINATION, DOWNLOAD_EXPORT_DESTINATION, EMPTY_STRING, SYSTEM_EXPORT_DESTINATIONS, SYSTEM_REPORT_FORMATS, SYSTEM_REPORT_NAMES, VISUAL_EXCEL_FORMAT_REPORT, } from '../../Utilities/Constants/GeneralConstants';
|
|
6
6
|
export class ExportApiImpl extends ApiBase {
|
|
7
7
|
constructor(_adaptable) {
|
|
8
8
|
super(_adaptable);
|
|
@@ -38,7 +38,7 @@ export class ExportApiImpl extends ApiBase {
|
|
|
38
38
|
if (this.internalApi.isSystemDestination(destinationName)) {
|
|
39
39
|
return destinationName;
|
|
40
40
|
}
|
|
41
|
-
return this.
|
|
41
|
+
return this.getAvailableCustomDestinations().find((destination) => destination.name === destinationName);
|
|
42
42
|
}
|
|
43
43
|
getAvailableSystemReports() {
|
|
44
44
|
const systemReportNamesOption = this.getExportOptions().systemReportNames;
|
|
@@ -93,10 +93,26 @@ export class ExportApiImpl extends ApiBase {
|
|
|
93
93
|
return true;
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
+
getAvailableCustomDestinations() {
|
|
97
|
+
const customDestinationsOption = this.getExportOptions().customDestinations;
|
|
98
|
+
const customDestinations = typeof customDestinationsOption === 'function'
|
|
99
|
+
? customDestinationsOption({
|
|
100
|
+
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
101
|
+
currentLayoutName: this.getLayoutApi().getCurrentLayoutName(),
|
|
102
|
+
currentReportName: this.getExportApi().getCurrentReportName(),
|
|
103
|
+
currentReportFormat: this.getExportApi().getCurrentReportFormat(),
|
|
104
|
+
})
|
|
105
|
+
: customDestinationsOption;
|
|
106
|
+
return customDestinations ?? [];
|
|
107
|
+
}
|
|
108
|
+
isExportDestinationSystem(destinationName) {
|
|
109
|
+
return (destinationName == DOWNLOAD_EXPORT_DESTINATION ||
|
|
110
|
+
destinationName == CLIPBOARD_EXPORT_DESTINATION);
|
|
111
|
+
}
|
|
96
112
|
getAllExportDestinations() {
|
|
97
113
|
const destinationItems = [
|
|
98
114
|
...this.getAvailableSystemDestinations(),
|
|
99
|
-
...this.
|
|
115
|
+
...this.getAvailableCustomDestinations().map((destination) => destination.name),
|
|
100
116
|
];
|
|
101
117
|
return destinationItems;
|
|
102
118
|
}
|
|
@@ -122,15 +138,8 @@ export class ExportApiImpl extends ApiBase {
|
|
|
122
138
|
clearFormat() {
|
|
123
139
|
this.selectFormat(null);
|
|
124
140
|
}
|
|
125
|
-
getCustomDestinations() {
|
|
126
|
-
return this.getExportOptions().customDestinations ?? [];
|
|
127
|
-
}
|
|
128
|
-
isExportDestinationCustom(destinationName) {
|
|
129
|
-
return this.getCustomDestinations().some((destination) => destination.name === destinationName);
|
|
130
|
-
}
|
|
131
141
|
getExportDestinationForm(destinationName) {
|
|
132
|
-
return this.
|
|
133
|
-
?.form;
|
|
142
|
+
return this.getAvailableCustomDestinations().find((destination) => destination.name === destinationName)?.form;
|
|
134
143
|
}
|
|
135
144
|
canExportToExcel() {
|
|
136
145
|
return this._adaptable.canExportToExcel();
|
|
@@ -511,7 +511,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
511
511
|
refreshGroupRowNodes() {
|
|
512
512
|
// see https://www.ag-grid.com/javascript-data-grid/client-side-row-stages/#refreshing-the-client-side-model
|
|
513
513
|
this.getAgGridApi().refreshClientSideRowModel('group');
|
|
514
|
-
this._adaptable.
|
|
514
|
+
this._adaptable.updateRowGroupsAndColumnGroupsExpandedState();
|
|
515
515
|
}
|
|
516
516
|
isCellEditable(gridCell) {
|
|
517
517
|
// If not Grid Cell or Column then return false - GridCell.column may be undefined for cells from synthetic columns created by AG Grid (ex. autoGroup columns)
|
|
@@ -209,7 +209,7 @@ export class ExportInternalApi extends ApiBase {
|
|
|
209
209
|
this.logWarn(`No report result to send to destination for report '${report.Name}, format '${format}' and destination '${destination}'`);
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
|
-
if (this.getExportApi().
|
|
212
|
+
if (!this.getExportApi().isExportDestinationSystem(destination)) {
|
|
213
213
|
this.sendReportToCustomDestination(reportResult, report, format, destination);
|
|
214
214
|
}
|
|
215
215
|
if (destination === 'Download') {
|
|
@@ -232,9 +232,9 @@ export class ExportInternalApi extends ApiBase {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
sendReportToCustomDestination(reportResult, report, format, destination) {
|
|
235
|
-
const customDestination = this.
|
|
236
|
-
.
|
|
237
|
-
.
|
|
235
|
+
const customDestination = this.getExportApi()
|
|
236
|
+
.getAvailableCustomDestinations()
|
|
237
|
+
.find((cd) => cd.name == destination);
|
|
238
238
|
if (customDestination?.form) {
|
|
239
239
|
this.getAdaptableInternalApi().dispatchReduxAction(PopupRedux.PopupShowForm({
|
|
240
240
|
Id: 'export-destination-form',
|
|
@@ -221,7 +221,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
221
221
|
private addSyntheticPrimaryKeyIfMissing;
|
|
222
222
|
getFirstDisplayedRowNode(): IRowNode;
|
|
223
223
|
getFirstRowNode(): IRowNode | undefined;
|
|
224
|
-
|
|
224
|
+
updateRowGroupsAndColumnGroupsExpandedState(layout?: Layout): void;
|
|
225
225
|
isGroupRowNode(rowNode: IRowNode): boolean;
|
|
226
226
|
getFilteredData(): any[];
|
|
227
227
|
/**
|
|
@@ -1966,7 +1966,7 @@ You need to define at least one Layout!`);
|
|
|
1966
1966
|
this.addSyntheticPrimaryKey(dataSource);
|
|
1967
1967
|
}
|
|
1968
1968
|
this.agGridAdapter.setGridOption('rowData', dataSource);
|
|
1969
|
-
this.
|
|
1969
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
1970
1970
|
// this.updateColumnModelAndRefreshGrid();
|
|
1971
1971
|
}
|
|
1972
1972
|
getGridData() {
|
|
@@ -2009,12 +2009,13 @@ You need to define at least one Layout!`);
|
|
|
2009
2009
|
}
|
|
2010
2010
|
return firstRowNode;
|
|
2011
2011
|
}
|
|
2012
|
-
|
|
2012
|
+
updateRowGroupsAndColumnGroupsExpandedState(layout) {
|
|
2013
2013
|
if (!layout) {
|
|
2014
2014
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
2015
2015
|
}
|
|
2016
2016
|
const layoutModel = layoutStateToLayoutModel(layout);
|
|
2017
2017
|
this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues, layoutModel.RowGroupedColumns);
|
|
2018
|
+
this.layoutManager.applyColumnGroupCollapseExpandState(layoutModel);
|
|
2018
2019
|
}
|
|
2019
2020
|
isGroupRowNode(rowNode) {
|
|
2020
2021
|
if (!rowNode) {
|
|
@@ -2100,7 +2101,7 @@ You need to define at least one Layout!`);
|
|
|
2100
2101
|
dataUpdateConfig.callback(transaction);
|
|
2101
2102
|
}
|
|
2102
2103
|
resolve(transaction?.add);
|
|
2103
|
-
this.
|
|
2104
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2104
2105
|
});
|
|
2105
2106
|
if (dataUpdateConfig.flushAsync) {
|
|
2106
2107
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
@@ -2112,7 +2113,7 @@ You need to define at least one Layout!`);
|
|
|
2112
2113
|
if (dataUpdateConfig.flushAsync) {
|
|
2113
2114
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2114
2115
|
}
|
|
2115
|
-
this.
|
|
2116
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2116
2117
|
return Promise.resolve(transaction?.add);
|
|
2117
2118
|
}
|
|
2118
2119
|
}
|
|
@@ -2140,7 +2141,7 @@ You need to define at least one Layout!`);
|
|
|
2140
2141
|
dataUpdateConfig.callback(transaction);
|
|
2141
2142
|
}
|
|
2142
2143
|
if (transaction?.add) {
|
|
2143
|
-
this.
|
|
2144
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2144
2145
|
}
|
|
2145
2146
|
resolve({
|
|
2146
2147
|
added: transaction?.add,
|
|
@@ -2159,7 +2160,7 @@ You need to define at least one Layout!`);
|
|
|
2159
2160
|
addIndex: dataUpdateConfig.addIndex,
|
|
2160
2161
|
});
|
|
2161
2162
|
if (transaction?.add) {
|
|
2162
|
-
this.
|
|
2163
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2163
2164
|
}
|
|
2164
2165
|
if (dataUpdateConfig.flushAsync) {
|
|
2165
2166
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
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.2.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1751286758695 || Date.now(),
|
|
4
|
+
VERSION: "20.2.5" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -223,21 +223,9 @@ export class LayoutManager extends LMEmitter {
|
|
|
223
223
|
const shouldSkipTriggerChange = options?.skipTriggerChange === true;
|
|
224
224
|
this._prevFiredLayout = layout;
|
|
225
225
|
this.currentLayout = layout;
|
|
226
|
-
if (
|
|
227
|
-
layout.RowGroupedColumns &&
|
|
228
|
-
layout.RowGroupedColumns.length > 0 &&
|
|
229
|
-
layout.RowGroupValues) {
|
|
230
|
-
// most likely the user has changed grouping via some AG Grid action
|
|
231
|
-
// and we need to make sure the expand/collapse state is applied
|
|
232
|
-
// but we want to suspend the listener
|
|
233
|
-
// as it would re-trigger another change
|
|
234
|
-
const unsupress = this.suspendAgGridListener();
|
|
235
|
-
this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
|
|
236
|
-
unsupress();
|
|
237
|
-
}
|
|
238
|
-
if ((!prevLayout?.RowGroupedColumns || !prevLayout?.RowGroupedColumns.length) &&
|
|
239
|
-
layout.RowGroupedColumns &&
|
|
226
|
+
if (layout.RowGroupedColumns &&
|
|
240
227
|
layout.RowGroupedColumns.length > 0 &&
|
|
228
|
+
(prevLayout?.RowGroupedColumns || []).join(',') !== layout.RowGroupedColumns.join(',') &&
|
|
241
229
|
layout.RowGroupValues) {
|
|
242
230
|
// most likely the user has changed grouping via some AG Grid action
|
|
243
231
|
// and we need to make sure the expand/collapse state is applied
|
|
@@ -473,12 +461,24 @@ export class LayoutManager extends LMEmitter {
|
|
|
473
461
|
});
|
|
474
462
|
}
|
|
475
463
|
if (RowGroupedColumns && RowGroupedColumns.length) {
|
|
464
|
+
const LayoutRowGroupedColumns = this.currentLayout?.RowGroupedColumns || this.currentLayout?.PivotGroupedColumns || [];
|
|
476
465
|
// if it's a new grouping, try and take it
|
|
477
|
-
const isGroupingNew = RowGroupedColumns &&
|
|
478
|
-
!this.currentLayout?.RowGroupedColumns &&
|
|
479
|
-
!this.currentLayout?.PivotGroupedColumns;
|
|
466
|
+
const isGroupingNew = RowGroupedColumns && RowGroupedColumns.join(',') !== LayoutRowGroupedColumns.join(',');
|
|
480
467
|
if (this.currentLayout?.RowGroupValues) {
|
|
481
468
|
const currentRowGroupValues = this.currentLayout.RowGroupValues;
|
|
469
|
+
let currentRowGroupValuesGroupKeys = [];
|
|
470
|
+
if (currentRowGroupValues.RowGroupDisplay === 'expanded' ||
|
|
471
|
+
currentRowGroupValues.RowGroupDisplay === 'collapsed') {
|
|
472
|
+
if (Array.isArray(currentRowGroupValues.GroupKeys)) {
|
|
473
|
+
currentRowGroupValuesGroupKeys =
|
|
474
|
+
currentRowGroupValues.GroupKeys.find((item) => {
|
|
475
|
+
return ((item.RowGroupedColumns || []).join(',') === (RowGroupedColumns || []).join(','));
|
|
476
|
+
})?.Values || [];
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
currentRowGroupValuesGroupKeys = currentRowGroupValues.Values || [];
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
482
|
if (currentRowGroupValues.RowGroupDisplay === 'always-collapsed') {
|
|
483
483
|
RowGroupValues = {
|
|
484
484
|
RowGroupDisplay: 'always-collapsed',
|
|
@@ -491,7 +491,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
491
491
|
}
|
|
492
492
|
else if (currentRowGroupValues.RowGroupDisplay === 'collapsed') {
|
|
493
493
|
const ExpandedValues = isGroupingNew
|
|
494
|
-
?
|
|
494
|
+
? currentRowGroupValuesGroupKeys || []
|
|
495
495
|
: this.getRowGroupNodePathsAs({
|
|
496
496
|
expanded: true,
|
|
497
497
|
});
|
|
@@ -518,7 +518,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
518
518
|
}
|
|
519
519
|
else if (currentRowGroupValues.RowGroupDisplay === 'expanded') {
|
|
520
520
|
const CollapsedValues = isGroupingNew
|
|
521
|
-
?
|
|
521
|
+
? currentRowGroupValuesGroupKeys || []
|
|
522
522
|
: this.getRowGroupNodePathsAs({
|
|
523
523
|
expanded: false,
|
|
524
524
|
});
|
|
@@ -2325,6 +2325,24 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2325
2325
|
isOpt?: undefined;
|
|
2326
2326
|
})[];
|
|
2327
2327
|
};
|
|
2328
|
+
CustomDestinationsContext: {
|
|
2329
|
+
name: string;
|
|
2330
|
+
kind: string;
|
|
2331
|
+
desc: string;
|
|
2332
|
+
props: ({
|
|
2333
|
+
name: string;
|
|
2334
|
+
kind: string;
|
|
2335
|
+
desc: string;
|
|
2336
|
+
isOpt?: undefined;
|
|
2337
|
+
ref?: undefined;
|
|
2338
|
+
} | {
|
|
2339
|
+
name: string;
|
|
2340
|
+
kind: string;
|
|
2341
|
+
desc: string;
|
|
2342
|
+
isOpt: boolean;
|
|
2343
|
+
ref: string;
|
|
2344
|
+
})[];
|
|
2345
|
+
};
|
|
2328
2346
|
CustomDisplayFormatter: {
|
|
2329
2347
|
name: string;
|
|
2330
2348
|
kind: string;
|
|
@@ -3855,6 +3873,22 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3855
3873
|
ref: string;
|
|
3856
3874
|
})[];
|
|
3857
3875
|
};
|
|
3876
|
+
GroupKeys: {
|
|
3877
|
+
name: string;
|
|
3878
|
+
kind: string;
|
|
3879
|
+
desc: string;
|
|
3880
|
+
props: ({
|
|
3881
|
+
name: string;
|
|
3882
|
+
kind: string;
|
|
3883
|
+
desc: string;
|
|
3884
|
+
isOpt: boolean;
|
|
3885
|
+
} | {
|
|
3886
|
+
name: string;
|
|
3887
|
+
kind: string;
|
|
3888
|
+
desc: string;
|
|
3889
|
+
isOpt?: undefined;
|
|
3890
|
+
})[];
|
|
3891
|
+
};
|
|
3858
3892
|
HandleFdc3Context: {
|
|
3859
3893
|
name: string;
|
|
3860
3894
|
kind: string;
|