@adaptabletools/adaptable 20.2.2 → 20.2.3

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",
3
- "version": "20.2.2",
3
+ "version": "20.2.3",
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",
@@ -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
+ }
@@ -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 config - optional configuration
147
- * @param config.exportParams - function to modify the default export parameters; it will be called with the default export parameters and should return the modified export parameters
148
- * @param config.showProgressIndicator - whether to show progress indicator
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, config?: {
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', config) {
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: config?.showProgressIndicator === false ? false : true,
201
- customExportParams: config?.exportParams,
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
@@ -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) {
@@ -4,4 +4,5 @@ import { AdaptableApi } from '../Api/AdaptableApi';
4
4
  export declare class QuickSearchModule extends AdaptableModuleBase implements IModule {
5
5
  constructor(api: AdaptableApi);
6
6
  getViewProperties(): AdaptableModuleView;
7
+ onAdaptableReady(): void;
7
8
  }
@@ -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) {
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: 1750862989331 || Date.now(),
4
- VERSION: "20.2.2" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1750939303696 || Date.now(),
4
+ VERSION: "20.2.3" || '--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
- ref: string;
4733
- })[];
4737
+ }[];
4734
4738
  };
4735
4739
  RaiseIntentConfig: {
4736
4740
  name: string;