@adaptabletools/adaptable 20.2.2 → 20.2.4
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 +16 -5
- package/src/Api/ExportApi.d.ts +4 -9
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -5
- package/src/Api/Implementation/ExportApiImpl.js +3 -3
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +4 -0
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +4 -4
- package/src/Strategy/QuickSearchModule.d.ts +1 -0
- package/src/Strategy/QuickSearchModule.js +14 -0
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +7 -6
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +13 -9
- 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.2.
|
|
3
|
+
"version": "20.2.4",
|
|
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;
|
|
@@ -346,10 +346,21 @@ export interface DataFormatDataType {
|
|
|
346
346
|
date?: DataFormatType;
|
|
347
347
|
}
|
|
348
348
|
/**
|
|
349
|
-
* Custom Export Parameters which extend AG Grid's base export parameters.
|
|
350
|
-
* Use
|
|
351
|
-
* - `ExcelExportParams` for Excel format exports
|
|
352
|
-
* - `CsvExportParams` for CSV, JSON and any custom format exports
|
|
353
|
-
* These parameters allow overriding AdapTable's default export behavior.
|
|
349
|
+
* Custom Export Parameters which extend AG Grid's base export parameters, allowing overriding of AdapTable's default export behaviour.
|
|
350
|
+
* Use `ExcelExportParams` for Excel format exports and `CsvExportParams` for CSV, JSON and any custom format exports
|
|
354
351
|
*/
|
|
355
352
|
export type CustomExportParams = ExcelExportParams | CsvExportParams;
|
|
353
|
+
/**
|
|
354
|
+
* Config used when Exporting via API, allows fine grained exporting
|
|
355
|
+
*/
|
|
356
|
+
export interface ExportConfig {
|
|
357
|
+
/**
|
|
358
|
+
*
|
|
359
|
+
* Function to modify export params; receives default params & returns modified params
|
|
360
|
+
*/
|
|
361
|
+
exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
|
|
362
|
+
/**
|
|
363
|
+
* Whether to show progress indicator
|
|
364
|
+
*/
|
|
365
|
+
showProgressIndicator?: boolean;
|
|
366
|
+
}
|
package/src/Api/ExportApi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableForm } from '../AdaptableState/Common/AdaptableForm';
|
|
2
2
|
import { ExportState, Report, ReportFormatType, ReportNameType, SystemReportFormat, SystemReportName } from '../AdaptableState/ExportState';
|
|
3
|
-
import { CustomDestination, CustomExportParams, ExportDestinationType, ExportFormContext, ExportResultData, SystemExportDestination } from '../AdaptableOptions/ExportOptions';
|
|
3
|
+
import { CustomDestination, CustomExportParams, ExportConfig, ExportDestinationType, ExportFormContext, ExportResultData, SystemExportDestination } from '../AdaptableOptions/ExportOptions';
|
|
4
4
|
import { AdaptableColumn } from '../types';
|
|
5
5
|
/**
|
|
6
6
|
* Provides run-time access to the Export Module and Report state
|
|
@@ -143,14 +143,9 @@ export interface ExportApi {
|
|
|
143
143
|
* @param reportName - name of the report
|
|
144
144
|
* @param format - format of the report
|
|
145
145
|
* @param destination - destination to export to
|
|
146
|
-
* @param
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*/
|
|
150
|
-
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, config?: {
|
|
151
|
-
exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
|
|
152
|
-
showProgressIndicator?: boolean;
|
|
153
|
-
}): Promise<void>;
|
|
146
|
+
* @param exportConfig - optional export configuration
|
|
147
|
+
*/
|
|
148
|
+
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): Promise<void>;
|
|
154
149
|
/**
|
|
155
150
|
* Gets the data for the Report with the given Name in the given Format
|
|
156
151
|
* @param reportName - name of the report
|
|
@@ -2,7 +2,7 @@ import { ExportApi } from '../ExportApi';
|
|
|
2
2
|
import { ExportState, Report, ReportFormatType, ReportNameType, SystemReportFormat, SystemReportName } from '../../AdaptableState/ExportState';
|
|
3
3
|
import { ApiBase } from './ApiBase';
|
|
4
4
|
import { AdaptableForm } from '../../AdaptableState/Common/AdaptableForm';
|
|
5
|
-
import { CustomDestination, CustomExportParams, ExportDestinationType, ExportFormContext, ExportResultData, SystemExportDestination } from '../../AdaptableOptions/ExportOptions';
|
|
5
|
+
import { CustomDestination, CustomExportParams, ExportConfig, ExportDestinationType, ExportFormContext, ExportResultData, SystemExportDestination } from '../../AdaptableOptions/ExportOptions';
|
|
6
6
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
7
7
|
import { ExportInternalApi } from '../Internal/ExportInternalApi';
|
|
8
8
|
import { AdaptableColumn } from '../../types';
|
|
@@ -37,10 +37,7 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
37
37
|
getCustomReports(): Report[];
|
|
38
38
|
isColumnExportable(adaptableColumn: AdaptableColumn): boolean;
|
|
39
39
|
getSupportedExportDestinations(reportFormat: ReportFormatType): ExportDestinationType[];
|
|
40
|
-
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType,
|
|
41
|
-
exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
|
|
42
|
-
showProgressIndicator?: boolean;
|
|
43
|
-
}): Promise<void>;
|
|
40
|
+
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): Promise<void>;
|
|
44
41
|
getReportData(reportName: ReportNameType, format: ReportFormatType, config?: {
|
|
45
42
|
exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
|
|
46
43
|
showProgressIndicator?: boolean;
|
|
@@ -179,7 +179,7 @@ export class ExportApiImpl extends ApiBase {
|
|
|
179
179
|
return true;
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
async exportReport(reportName, format, destination = 'Download',
|
|
182
|
+
async exportReport(reportName, format, destination = 'Download', exportConfig) {
|
|
183
183
|
let report = this.getReportByName(reportName);
|
|
184
184
|
if (!this.checkItemExists(report, reportName, 'Report')) {
|
|
185
185
|
return;
|
|
@@ -197,8 +197,8 @@ export class ExportApiImpl extends ApiBase {
|
|
|
197
197
|
report,
|
|
198
198
|
format,
|
|
199
199
|
destination,
|
|
200
|
-
showProgressIndicator:
|
|
201
|
-
customExportParams:
|
|
200
|
+
showProgressIndicator: exportConfig?.showProgressIndicator === false ? false : true,
|
|
201
|
+
customExportParams: exportConfig?.exportParams,
|
|
202
202
|
});
|
|
203
203
|
if (!exportedReport) {
|
|
204
204
|
// for destination 'Download' and format 'Excel', 'VisualExcel' or 'Csv', AG Grid handles the download as well
|
|
@@ -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)
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as Redux from 'redux';
|
|
2
2
|
import { QuickSearchState } from '../../AdaptableState/QuickSearchState';
|
|
3
3
|
import { AdaptableStyle } from '../../AdaptableState/Common/AdaptableStyle';
|
|
4
|
+
export declare const QUICK_SEARCH_SET_CELL_MATCHING_STYLE_DEFAULT: {
|
|
5
|
+
BackColor: string;
|
|
6
|
+
ForeColor: string;
|
|
7
|
+
};
|
|
4
8
|
/**
|
|
5
9
|
* @ReduxAction Runs Quick Search
|
|
6
10
|
*/
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { QUICK_SEARCH_DEFAULT_BACK_COLOR, QUICK_SEARCH_DEFAULT_FORE_COLOR, } from '../../Utilities/Constants/ReduxConstants';
|
|
2
2
|
import { EMPTY_STRING } from '../../Utilities/Constants/GeneralConstants';
|
|
3
|
+
export const QUICK_SEARCH_SET_CELL_MATCHING_STYLE_DEFAULT = {
|
|
4
|
+
BackColor: QUICK_SEARCH_DEFAULT_BACK_COLOR,
|
|
5
|
+
ForeColor: QUICK_SEARCH_DEFAULT_FORE_COLOR,
|
|
6
|
+
};
|
|
3
7
|
/**
|
|
4
8
|
* @ReduxAction Runs Quick Search
|
|
5
9
|
*/
|
|
@@ -26,10 +30,6 @@ export const QuickSearchReady = (quickSearchState) => ({
|
|
|
26
30
|
});
|
|
27
31
|
const initialState = {
|
|
28
32
|
QuickSearchText: EMPTY_STRING,
|
|
29
|
-
CellMatchStyle: {
|
|
30
|
-
BackColor: QUICK_SEARCH_DEFAULT_BACK_COLOR,
|
|
31
|
-
ForeColor: QUICK_SEARCH_DEFAULT_FORE_COLOR,
|
|
32
|
-
},
|
|
33
33
|
};
|
|
34
34
|
export const QuickSearchReducer = (state = initialState, action) => {
|
|
35
35
|
switch (action.type) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
3
|
import { QuickSearchStatusBarContent } from '../View/QuickSearch/QuickSearchStatusBarContent';
|
|
4
|
+
import { QUICK_SEARCH_SET_CELL_MATCHING_STYLE_DEFAULT, QuickSearchSetCellMatchingStyle, } from '../Redux/ActionsReducers/QuickSearchRedux';
|
|
4
5
|
export class QuickSearchModule extends AdaptableModuleBase {
|
|
5
6
|
constructor(api) {
|
|
6
7
|
super(ModuleConstants.QuickSearchModuleId, ModuleConstants.QuickSearchFriendlyName, 'search-table', 'QuickSearchPopup', 'Quickly highlight all cells in the grid that contain matching query text', api);
|
|
@@ -14,4 +15,17 @@ export class QuickSearchModule extends AdaptableModuleBase {
|
|
|
14
15
|
},
|
|
15
16
|
};
|
|
16
17
|
}
|
|
18
|
+
onAdaptableReady() {
|
|
19
|
+
const { api } = this;
|
|
20
|
+
const { internalApi, agGridApi } = api;
|
|
21
|
+
const isServerSideRowModel = agGridApi.getGridOption('rowModelType') === 'serverSide';
|
|
22
|
+
if (isServerSideRowModel &&
|
|
23
|
+
internalApi.getAdaptableState().QuickSearch.CellMatchStyle === undefined) {
|
|
24
|
+
// for server side row model,
|
|
25
|
+
// let's setup some defaults if there are no styles set
|
|
26
|
+
// as there are no defaults in the AG Grid find functionality (as it only works for non ssrm)
|
|
27
|
+
// so we need to set the defaults here
|
|
28
|
+
this.api.internalApi.dispatchReduxAction(QuickSearchSetCellMatchingStyle(QUICK_SEARCH_SET_CELL_MATCHING_STYLE_DEFAULT));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
17
31
|
}
|
|
@@ -44,7 +44,7 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
44
44
|
function mapStateToProps(state, ownProps) {
|
|
45
45
|
return {
|
|
46
46
|
QuickSearchText: state.QuickSearch.QuickSearchText,
|
|
47
|
-
QuickSearchStyle: state.QuickSearch.CellMatchStyle,
|
|
47
|
+
QuickSearchStyle: state.QuickSearch.CellMatchStyle ?? {},
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
function mapDispatchToProps(dispatch) {
|
|
@@ -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: 1751027819726 || Date.now(),
|
|
4
|
+
VERSION: "20.2.4" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -3074,6 +3074,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3074
3074
|
ref: string;
|
|
3075
3075
|
})[];
|
|
3076
3076
|
};
|
|
3077
|
+
ExportConfig: {
|
|
3078
|
+
name: string;
|
|
3079
|
+
kind: string;
|
|
3080
|
+
desc: string;
|
|
3081
|
+
props: {
|
|
3082
|
+
name: string;
|
|
3083
|
+
kind: string;
|
|
3084
|
+
desc: string;
|
|
3085
|
+
isOpt: boolean;
|
|
3086
|
+
}[];
|
|
3087
|
+
};
|
|
3077
3088
|
ExportDataFormatContext: {
|
|
3078
3089
|
name: string;
|
|
3079
3090
|
kind: string;
|
|
@@ -4718,19 +4729,12 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4718
4729
|
name: string;
|
|
4719
4730
|
kind: string;
|
|
4720
4731
|
desc: string;
|
|
4721
|
-
props:
|
|
4722
|
-
name: string;
|
|
4723
|
-
kind: string;
|
|
4724
|
-
desc: string;
|
|
4725
|
-
isOpt: boolean;
|
|
4726
|
-
ref?: undefined;
|
|
4727
|
-
} | {
|
|
4732
|
+
props: {
|
|
4728
4733
|
name: string;
|
|
4729
4734
|
kind: string;
|
|
4730
4735
|
desc: string;
|
|
4731
4736
|
isOpt: boolean;
|
|
4732
|
-
|
|
4733
|
-
})[];
|
|
4737
|
+
}[];
|
|
4734
4738
|
};
|
|
4735
4739
|
RaiseIntentConfig: {
|
|
4736
4740
|
name: string;
|