@adaptabletools/adaptable-cjs 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 +5 -5
- 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.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
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;
|
|
@@ -183,7 +183,7 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
183
183
|
return true;
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
async exportReport(reportName, format, destination = 'Download',
|
|
186
|
+
async exportReport(reportName, format, destination = 'Download', exportConfig) {
|
|
187
187
|
let report = this.getReportByName(reportName);
|
|
188
188
|
if (!this.checkItemExists(report, reportName, 'Report')) {
|
|
189
189
|
return;
|
|
@@ -201,8 +201,8 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
201
201
|
report,
|
|
202
202
|
format,
|
|
203
203
|
destination,
|
|
204
|
-
showProgressIndicator:
|
|
205
|
-
customExportParams:
|
|
204
|
+
showProgressIndicator: exportConfig?.showProgressIndicator === false ? false : true,
|
|
205
|
+
customExportParams: exportConfig?.exportParams,
|
|
206
206
|
});
|
|
207
207
|
if (!exportedReport) {
|
|
208
208
|
// for destination 'Download' and format 'Excel', 'VisualExcel' or 'Csv', AG Grid handles the download as well
|
|
@@ -515,7 +515,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
515
515
|
refreshGroupRowNodes() {
|
|
516
516
|
// see https://www.ag-grid.com/javascript-data-grid/client-side-row-stages/#refreshing-the-client-side-model
|
|
517
517
|
this.getAgGridApi().refreshClientSideRowModel('group');
|
|
518
|
-
this._adaptable.
|
|
518
|
+
this._adaptable.updateRowGroupsAndColumnGroupsExpandedState();
|
|
519
519
|
}
|
|
520
520
|
isCellEditable(gridCell) {
|
|
521
521
|
// 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,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuickSearchReducer = exports.QuickSearchReady = exports.QuickSearchSetCellMatchingStyle = exports.QuickSearchRun = exports.QUICK_SEARCH_READY = exports.QUICK_SEARCH_SET_CELL_MATCHING_STYLE = exports.QUICK_SEARCH_RUN = void 0;
|
|
3
|
+
exports.QuickSearchReducer = exports.QuickSearchReady = exports.QuickSearchSetCellMatchingStyle = exports.QuickSearchRun = exports.QUICK_SEARCH_READY = exports.QUICK_SEARCH_SET_CELL_MATCHING_STYLE = exports.QUICK_SEARCH_RUN = exports.QUICK_SEARCH_SET_CELL_MATCHING_STYLE_DEFAULT = void 0;
|
|
4
4
|
const ReduxConstants_1 = require("../../Utilities/Constants/ReduxConstants");
|
|
5
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
|
+
exports.QUICK_SEARCH_SET_CELL_MATCHING_STYLE_DEFAULT = {
|
|
7
|
+
BackColor: ReduxConstants_1.QUICK_SEARCH_DEFAULT_BACK_COLOR,
|
|
8
|
+
ForeColor: ReduxConstants_1.QUICK_SEARCH_DEFAULT_FORE_COLOR,
|
|
9
|
+
};
|
|
6
10
|
/**
|
|
7
11
|
* @ReduxAction Runs Quick Search
|
|
8
12
|
*/
|
|
@@ -32,10 +36,6 @@ const QuickSearchReady = (quickSearchState) => ({
|
|
|
32
36
|
exports.QuickSearchReady = QuickSearchReady;
|
|
33
37
|
const initialState = {
|
|
34
38
|
QuickSearchText: GeneralConstants_1.EMPTY_STRING,
|
|
35
|
-
CellMatchStyle: {
|
|
36
|
-
BackColor: ReduxConstants_1.QUICK_SEARCH_DEFAULT_BACK_COLOR,
|
|
37
|
-
ForeColor: ReduxConstants_1.QUICK_SEARCH_DEFAULT_FORE_COLOR,
|
|
38
|
-
},
|
|
39
39
|
};
|
|
40
40
|
const QuickSearchReducer = (state = initialState, action) => {
|
|
41
41
|
switch (action.type) {
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const QuickSearchStatusBarContent_1 = require("../View/QuickSearch/QuickSearchStatusBarContent");
|
|
8
|
+
const QuickSearchRedux_1 = require("../Redux/ActionsReducers/QuickSearchRedux");
|
|
8
9
|
class QuickSearchModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
9
10
|
constructor(api) {
|
|
10
11
|
super(ModuleConstants.QuickSearchModuleId, ModuleConstants.QuickSearchFriendlyName, 'search-table', 'QuickSearchPopup', 'Quickly highlight all cells in the grid that contain matching query text', api);
|
|
@@ -18,5 +19,18 @@ class QuickSearchModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
18
19
|
},
|
|
19
20
|
};
|
|
20
21
|
}
|
|
22
|
+
onAdaptableReady() {
|
|
23
|
+
const { api } = this;
|
|
24
|
+
const { internalApi, agGridApi } = api;
|
|
25
|
+
const isServerSideRowModel = agGridApi.getGridOption('rowModelType') === 'serverSide';
|
|
26
|
+
if (isServerSideRowModel &&
|
|
27
|
+
internalApi.getAdaptableState().QuickSearch.CellMatchStyle === undefined) {
|
|
28
|
+
// for server side row model,
|
|
29
|
+
// let's setup some defaults if there are no styles set
|
|
30
|
+
// as there are no defaults in the AG Grid find functionality (as it only works for non ssrm)
|
|
31
|
+
// so we need to set the defaults here
|
|
32
|
+
this.api.internalApi.dispatchReduxAction((0, QuickSearchRedux_1.QuickSearchSetCellMatchingStyle)(QuickSearchRedux_1.QUICK_SEARCH_SET_CELL_MATCHING_STYLE_DEFAULT));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
21
35
|
}
|
|
22
36
|
exports.QuickSearchModule = QuickSearchModule;
|
|
@@ -48,7 +48,7 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
48
48
|
function mapStateToProps(state, ownProps) {
|
|
49
49
|
return {
|
|
50
50
|
QuickSearchText: state.QuickSearch.QuickSearchText,
|
|
51
|
-
QuickSearchStyle: state.QuickSearch.CellMatchStyle,
|
|
51
|
+
QuickSearchStyle: state.QuickSearch.CellMatchStyle ?? {},
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
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
|
/**
|
|
@@ -1970,7 +1970,7 @@ You need to define at least one Layout!`);
|
|
|
1970
1970
|
this.addSyntheticPrimaryKey(dataSource);
|
|
1971
1971
|
}
|
|
1972
1972
|
this.agGridAdapter.setGridOption('rowData', dataSource);
|
|
1973
|
-
this.
|
|
1973
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
1974
1974
|
// this.updateColumnModelAndRefreshGrid();
|
|
1975
1975
|
}
|
|
1976
1976
|
getGridData() {
|
|
@@ -2013,12 +2013,13 @@ You need to define at least one Layout!`);
|
|
|
2013
2013
|
}
|
|
2014
2014
|
return firstRowNode;
|
|
2015
2015
|
}
|
|
2016
|
-
|
|
2016
|
+
updateRowGroupsAndColumnGroupsExpandedState(layout) {
|
|
2017
2017
|
if (!layout) {
|
|
2018
2018
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
2019
2019
|
}
|
|
2020
2020
|
const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(layout);
|
|
2021
2021
|
this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues, layoutModel.RowGroupedColumns);
|
|
2022
|
+
this.layoutManager.applyColumnGroupCollapseExpandState(layoutModel);
|
|
2022
2023
|
}
|
|
2023
2024
|
isGroupRowNode(rowNode) {
|
|
2024
2025
|
if (!rowNode) {
|
|
@@ -2104,7 +2105,7 @@ You need to define at least one Layout!`);
|
|
|
2104
2105
|
dataUpdateConfig.callback(transaction);
|
|
2105
2106
|
}
|
|
2106
2107
|
resolve(transaction?.add);
|
|
2107
|
-
this.
|
|
2108
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2108
2109
|
});
|
|
2109
2110
|
if (dataUpdateConfig.flushAsync) {
|
|
2110
2111
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
@@ -2116,7 +2117,7 @@ You need to define at least one Layout!`);
|
|
|
2116
2117
|
if (dataUpdateConfig.flushAsync) {
|
|
2117
2118
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2118
2119
|
}
|
|
2119
|
-
this.
|
|
2120
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2120
2121
|
return Promise.resolve(transaction?.add);
|
|
2121
2122
|
}
|
|
2122
2123
|
}
|
|
@@ -2144,7 +2145,7 @@ You need to define at least one Layout!`);
|
|
|
2144
2145
|
dataUpdateConfig.callback(transaction);
|
|
2145
2146
|
}
|
|
2146
2147
|
if (transaction?.add) {
|
|
2147
|
-
this.
|
|
2148
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2148
2149
|
}
|
|
2149
2150
|
resolve({
|
|
2150
2151
|
added: transaction?.add,
|
|
@@ -2163,7 +2164,7 @@ You need to define at least one Layout!`);
|
|
|
2163
2164
|
addIndex: dataUpdateConfig.addIndex,
|
|
2164
2165
|
});
|
|
2165
2166
|
if (transaction?.add) {
|
|
2166
|
-
this.
|
|
2167
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2167
2168
|
}
|
|
2168
2169
|
if (dataUpdateConfig.flushAsync) {
|
|
2169
2170
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
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:
|
|
6
|
-
VERSION: "20.2.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1751027848227 || Date.now(),
|
|
6
|
+
VERSION: "20.2.4" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -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;
|