@adaptabletools/adaptable 15.0.0-canary.0 → 15.0.0-canary.2

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.
Files changed (108) hide show
  1. package/bundle.cjs.js +247 -262
  2. package/package.json +2 -2
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +42 -42
  6. package/src/AdaptableOptions/ActionOptions.d.ts +31 -31
  7. package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -13
  8. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +4 -4
  9. package/src/AdaptableOptions/AlertOptions.d.ts +14 -14
  10. package/src/AdaptableOptions/ChartingOptions.d.ts +2 -3
  11. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -6
  12. package/src/AdaptableOptions/EditOptions.d.ts +8 -8
  13. package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/ExpressionOptions.d.ts +1 -1
  15. package/src/AdaptableOptions/FilterOptions.d.ts +3 -3
  16. package/src/AdaptableOptions/GeneralOptions.d.ts +9 -9
  17. package/src/AdaptableOptions/MenuOptions.d.ts +3 -3
  18. package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
  19. package/src/AdaptableOptions/SearchOptions.d.ts +2 -2
  20. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +25 -25
  21. package/src/Api/ChartingApi.d.ts +22 -18
  22. package/src/Api/ColumnApi.d.ts +3 -3
  23. package/src/Api/EventApi.d.ts +13 -1
  24. package/src/Api/Events/ActionRowSubmitted.d.ts +8 -8
  25. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  26. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  27. package/src/Api/FilterApi.d.ts +2 -2
  28. package/src/Api/FinanceApi.d.ts +9 -9
  29. package/src/Api/FormatColumnApi.d.ts +6 -6
  30. package/src/Api/FreeTextColumnApi.d.ts +3 -3
  31. package/src/Api/GridApi.d.ts +30 -30
  32. package/src/Api/Implementation/ChartingApiImpl.d.ts +2 -1
  33. package/src/Api/Implementation/ChartingApiImpl.js +4 -1
  34. package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
  35. package/src/Api/Implementation/FilterApiImpl.d.ts +2 -2
  36. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -6
  37. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +3 -3
  38. package/src/Api/Implementation/GridApiImpl.d.ts +29 -29
  39. package/src/Api/Implementation/ThemeApiImpl.d.ts +4 -0
  40. package/src/Api/Implementation/ThemeApiImpl.js +14 -0
  41. package/src/Api/Internal/ActionInternalApi.d.ts +3 -3
  42. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -3
  43. package/src/Api/Internal/AlertInternalApi.d.ts +3 -3
  44. package/src/Api/Internal/FilterInternalApi.d.ts +2 -2
  45. package/src/Api/Internal/FormatColumnInternalApi.d.ts +7 -7
  46. package/src/Api/Internal/GridInternalApi.d.ts +4 -4
  47. package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -3
  48. package/src/Api/OptionsApi.d.ts +1 -1
  49. package/src/Api/ThemeApi.d.ts +18 -0
  50. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +7 -7
  51. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +2 -2
  52. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +5 -6
  53. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
  54. package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +5 -5
  55. package/src/PredefinedConfig/Common/CellSummary.d.ts +4 -4
  56. package/src/PredefinedConfig/Common/Menu.d.ts +9 -9
  57. package/src/PredefinedConfig/Selection/GridCell.d.ts +4 -4
  58. package/src/PredefinedConfig/Selection/GridRow.d.ts +4 -4
  59. package/src/PredefinedConfig/Selection/SelectedCellInfo.d.ts +3 -3
  60. package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +2 -2
  61. package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
  62. package/src/PredefinedConfig/StatusBarState.js +1 -1
  63. package/src/PredefinedConfig/SystemState.d.ts +1 -2
  64. package/src/PredefinedConfig/ThemeState.d.ts +4 -0
  65. package/src/Redux/ActionsReducers/GridRedux.d.ts +5 -5
  66. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +27 -0
  67. package/src/Redux/ActionsReducers/ThemeRedux.js +63 -1
  68. package/src/Strategy/ExportModule.js +1 -1
  69. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  70. package/src/Utilities/Constants/GeneralConstants.js +3 -2
  71. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
  72. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  73. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
  74. package/src/Utilities/Interface/Preview.d.ts +2 -2
  75. package/src/Utilities/ObjectFactory.d.ts +5 -3
  76. package/src/Utilities/ObjectFactory.js +10 -1
  77. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +2 -2
  78. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -2
  79. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
  80. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
  81. package/src/Utilities/Services/Interface/IReportService.d.ts +3 -3
  82. package/src/Utilities/Services/Interface/IThemeService.d.ts +3 -0
  83. package/src/Utilities/Services/Interface/IThemeService.js +2 -0
  84. package/src/Utilities/Services/MetamodelService.d.ts +2 -0
  85. package/src/Utilities/Services/MetamodelService.js +26 -19
  86. package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
  87. package/src/Utilities/Services/ReportService.d.ts +4 -4
  88. package/src/Utilities/Services/ThemeService.d.ts +12 -0
  89. package/src/Utilities/Services/ThemeService.js +49 -0
  90. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +5 -5
  91. package/src/View/Charting/ShowChartButton.js +2 -1
  92. package/src/View/Charting/useChartingElements.js +2 -1
  93. package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
  94. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  95. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
  96. package/src/View/Theme/ThemeEditor.d.ts +7 -0
  97. package/src/View/Theme/ThemeEditor.js +186 -0
  98. package/src/View/Theme/ThemePopup.d.ts +3 -0
  99. package/src/View/Theme/ThemePopup.js +30 -6
  100. package/src/agGrid/ActionColumnRenderer.js +1 -0
  101. package/src/agGrid/Adaptable.d.ts +42 -41
  102. package/src/agGrid/Adaptable.js +20 -27
  103. package/src/agGrid/createAgStatusPanelComponent.js +1 -1
  104. package/src/metamodel/adaptable-metamodel-model.d.ts +9 -9
  105. package/src/metamodel/adaptable.metamodel.d.ts +1698 -3141
  106. package/src/metamodel/adaptable.metamodel.js +1 -1
  107. package/version.d.ts +1 -1
  108. package/version.js +1 -1
@@ -17,7 +17,7 @@ import { IDataService } from '../../Utilities/Services/Interface/IDataService';
17
17
  import { IEntitlementService } from '../../Utilities/Services/Interface/IEntitlementService';
18
18
  import { IQueryLanguageService } from '../../Utilities/Services/Interface/IQueryLanguageService';
19
19
  import { IAlertService } from '../../Utilities/Services/Interface/IAlertService';
20
- import { RowNode } from '@ag-grid-community/core';
20
+ import { IRowNode } from '@ag-grid-community/core';
21
21
  import { ITeamSharingService } from '../../Utilities/Services/Interface/ITeamSharingService';
22
22
  import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
23
23
  import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
@@ -77,8 +77,8 @@ export declare class AdaptableInternalApi extends ApiBase {
77
77
  getRowEditService(): IRowEditService;
78
78
  getModules(): IModuleCollection;
79
79
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
80
- forAllRowNodesDo(func: (rowNode: RowNode) => void): void;
81
- forAllVisibleRowNodesDo(func: (rowNode: RowNode) => void): void;
80
+ forAllRowNodesDo(func: (rowNode: IRowNode) => void): void;
81
+ forAllVisibleRowNodesDo(func: (rowNode: IRowNode) => void): void;
82
82
  getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
83
83
  getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
84
84
  getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
@@ -10,7 +10,7 @@ import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePr
10
10
  import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
11
11
  import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
12
12
  import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
13
- import { RowNode } from '@ag-grid-community/core';
13
+ import { IRowNode } from '@ag-grid-community/core';
14
14
  export declare class AlertInternalApi extends ApiBase {
15
15
  /**
16
16
  * Retrieves the Adaptable Form with the given name
@@ -136,8 +136,8 @@ export declare class AlertInternalApi extends ApiBase {
136
136
  getAdaptableAlerts(): AdaptableAlert[];
137
137
  getAdaptableCellChangedAlerts(): AdaptableCellChangedAlert[];
138
138
  getAdaptableRowChangedAlerts(): AdaptableRowChangedAlert[];
139
- getAdaptableAlertWithHighlightCell(columnId: string, rowNode: RowNode): AdaptableAlert | undefined;
140
- getAdaptableAlertWithHighlightRow(rowNode: RowNode): AdaptableAlert | undefined;
139
+ getAdaptableAlertWithHighlightCell(columnId: string, rowNode: IRowNode): AdaptableAlert | undefined;
140
+ getAdaptableAlertWithHighlightRow(rowNode: IRowNode): AdaptableAlert | undefined;
141
141
  isAlertDefinitionForAddedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
142
142
  isAlertDefinitionForRemovedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
143
143
  getAlertDefinitionsForCellDataChange(dataChangedEvent: CellDataChangedInfo): AlertDefinition[];
@@ -3,7 +3,7 @@ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
4
4
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
5
5
  import { ColumnFilter } from '../../PredefinedConfig/Common/ColumnFilter';
6
- import { RowNode } from '@ag-grid-community/core';
6
+ import { IRowNode } from '@ag-grid-community/core';
7
7
  import { LayoutColumnFilterAction } from '../../Redux/ActionsReducers/LayoutRedux';
8
8
  import * as Redux from 'redux';
9
9
  export declare class FilterInternalApi extends ApiBase {
@@ -38,7 +38,7 @@ export declare class FilterInternalApi extends ApiBase {
38
38
  * @param columnFilter Column Filter to use
39
39
  * @param node Row Node to evaluate
40
40
  */
41
- evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
41
+ evaluateColumnFilter(columnFilter: ColumnFilter, node: IRowNode): boolean;
42
42
  /**
43
43
  * Checks if the filter action should trigger grid filtering.
44
44
  *
@@ -1,6 +1,6 @@
1
1
  import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, AdaptableScope, FormatColumn, StringFormatterOptions } from '../../types';
2
2
  import { ApiBase } from '../Implementation/ApiBase';
3
- import { RowNode } from '@ag-grid-community/core';
3
+ import { IRowNode } from '@ag-grid-community/core';
4
4
  export declare class FormatColumnInternalApi extends ApiBase {
5
5
  /**
6
6
  * Retrieves all Format Columns in Adaptable State with the `Style` property set
@@ -56,21 +56,21 @@ export declare class FormatColumnInternalApi extends ApiBase {
56
56
  * @param customDisplayFormatterContext context that includes value to format
57
57
  * @param options formatter options
58
58
  */
59
- getNumberFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): any;
59
+ getNumberFormattedValue(value: any, node: IRowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): any;
60
60
  /**
61
61
  * Format value according to format options.
62
62
  *
63
63
  * @param value context that includes value to format
64
64
  * @param options formatter options
65
65
  */
66
- getStringFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: StringFormatterOptions): string;
66
+ getStringFormattedValue(value: any, node: IRowNode, abColumn: AdaptableColumn, options: StringFormatterOptions): string;
67
67
  /**
68
68
  * Format value according to format options.
69
69
  *
70
70
  * @param customDisplayFormatterContext context that includes value to format
71
71
  * @param options formatter options
72
72
  */
73
- getDateFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
73
+ getDateFormattedValue(value: any, node: IRowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
74
74
  private applyCustomFormatters;
75
75
  /**
76
76
  * Returns all Predicates appropriate for the given Scope
@@ -85,7 +85,7 @@ export declare class FormatColumnInternalApi extends ApiBase {
85
85
  * @param params
86
86
  */
87
87
  isFormatColumnRelevantForColumn(formatColumn: FormatColumn, column: AdaptableColumn, params: {
88
- node: RowNode;
88
+ node: IRowNode;
89
89
  value: any;
90
90
  }): boolean;
91
91
  private evaluatePredicate;
@@ -98,7 +98,7 @@ export declare class FormatColumnInternalApi extends ApiBase {
98
98
  * @param params
99
99
  */
100
100
  getFormatColumnsRelevantForColumn(formatColumns: FormatColumn[], column: AdaptableColumn, params: {
101
- node: RowNode;
101
+ node: IRowNode;
102
102
  value: any;
103
103
  }): FormatColumn[];
104
104
  /**
@@ -109,7 +109,7 @@ export declare class FormatColumnInternalApi extends ApiBase {
109
109
  * @param params
110
110
  */
111
111
  getMostRelevantFormatColumnForColumn(formatColumns: FormatColumn[], column: AdaptableColumn, params: {
112
- node: RowNode;
112
+ node: IRowNode;
113
113
  value: any;
114
114
  }): FormatColumn | undefined;
115
115
  /**
@@ -1,6 +1,6 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
3
- import { RowNode } from '@ag-grid-community/core';
3
+ import { IRowNode } from '@ag-grid-community/core';
4
4
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
5
5
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
6
6
  import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellInfo';
@@ -19,7 +19,7 @@ export declare class GridInternalApi extends ApiBase {
19
19
  /**
20
20
  * Fires Grid Data Changed Event - when a row has changed in AG Grid
21
21
  */
22
- fireGridDataChangedEvent(dataRows: any[], rowNodes: RowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
22
+ fireGridDataChangedEvent(dataRows: any[], rowNodes: IRowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
23
23
  /**
24
24
  * Gets all distinct display values in the Column with the given ColumnId
25
25
  * @param columnId Column to check
@@ -58,13 +58,13 @@ export declare class GridInternalApi extends ApiBase {
58
58
  * @param columnId Column to check
59
59
  * @param skipRowNode optional RowNode which should be skipped when collecting the distinct rawValues
60
60
  */
61
- getDistinctRawValuesForColumn(columnId: string, skipRowNode?: RowNode): any[];
61
+ getDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
62
62
  /**
63
63
  * Gets all distinct raw values in Column. Values are un-sorted.
64
64
  * @param columnId Column to check
65
65
  * @param skipRowNode optional RowNode which should be skipped when collecting the distinct rawValues
66
66
  */
67
- getUnsortedDistinctRawValuesForColumn(columnId: string, skipRowNode?: RowNode): any[];
67
+ getUnsortedDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
68
68
  /**
69
69
  * Gets all distinct visible raw values in the Column
70
70
  * @param columnId Column to check
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { CellColorRange, ColumnComparison, NumericStyledColumn, StyledColumn } from '../../PredefinedConfig/StyledColumnState';
4
- import { RowNode } from '@ag-grid-community/core/dist/cjs/es5/entities/rowNode';
4
+ import { IRowNode } from '@ag-grid-community/core';
5
5
  export declare class StyledColumnInternalApi extends ApiBase {
6
6
  getMinValueForNumericColumn(column: AdaptableColumn): number | undefined;
7
7
  getMaxValueForNumericColumn(column: AdaptableColumn): number | undefined;
@@ -11,7 +11,7 @@ export declare class StyledColumnInternalApi extends ApiBase {
11
11
  * @param rowNode current Row Node
12
12
  * @param cellValue current Cell Value
13
13
  */
14
- getNumericStyleMinValue(styledColumn: Omit<StyledColumn, 'ColumnId'>, column: AdaptableColumn, rowNode: RowNode, cellValue: any): number;
14
+ getNumericStyleMinValue(styledColumn: Omit<StyledColumn, 'ColumnId'>, column: AdaptableColumn, rowNode: IRowNode, cellValue: any): number;
15
15
  /**
16
16
  * Returns last range that matches the cell value.
17
17
  *
@@ -27,7 +27,7 @@ export declare class StyledColumnInternalApi extends ApiBase {
27
27
  * @param rowNode current Row Node
28
28
  * @param cellValue current Cell Value
29
29
  */
30
- getNumericStyleMaxValue(styledColumn: Omit<StyledColumn, 'ColumnId'>, column: AdaptableColumn, rowNode: RowNode, cellValue: any): number;
30
+ getNumericStyleMaxValue(styledColumn: Omit<StyledColumn, 'ColumnId'>, column: AdaptableColumn, rowNode: IRowNode, cellValue: any): number;
31
31
  /**
32
32
  * Returns the smallest number in a Range
33
33
  * @param range Range to check
@@ -35,7 +35,7 @@ export interface OptionsApi {
35
35
  /**
36
36
  * Returns provided `AdaptableOptions`
37
37
  */
38
- getAdaptableOptions(): AdaptableOptions;
38
+ getAdaptableOptions(): Readonly<AdaptableOptions>;
39
39
  /**
40
40
  * Returns `AdaptableOptions.actionOptions`
41
41
  */
@@ -28,6 +28,14 @@ export interface ThemeApi {
28
28
  * Retrieves name of Current Theme
29
29
  */
30
30
  getCurrentTheme(): string;
31
+ /**
32
+ * Retrieves the current theme object
33
+ */
34
+ getCurrentThemeObject(): AdaptableTheme;
35
+ /**
36
+ * Edits an existing theme
37
+ */
38
+ editTheme(theme: AdaptableTheme): void;
31
39
  /**
32
40
  * Sets available System Themes; if empty array is passed none will be
33
41
  *
@@ -40,6 +48,16 @@ export interface ThemeApi {
40
48
  * @param userThemes User themes to set - each has name, description
41
49
  */
42
50
  setUserThemes(userThemes: AdaptableTheme[]): void;
51
+ /**
52
+ * Adds a User Theme to State
53
+ * @param theme
54
+ */
55
+ addUserTheme(theme: AdaptableTheme): void;
56
+ /**
57
+ * Deletes a User Theme from State
58
+ * @param theme
59
+ */
60
+ deleteUserTheme(theme: AdaptableTheme): void;
43
61
  /**
44
62
  * Retrieves System Themes in State
45
63
  */
@@ -5,7 +5,7 @@ import { AlertDefinition } from '../AlertState';
5
5
  /**
6
6
  * Defines an Alert fired by AdapTable
7
7
  */
8
- export declare type AdaptableAlert = AdaptableCellChangedAlert | AdaptableRowChangedAlert | AdaptableGenericAlert;
8
+ export declare type AdaptableAlert<TData = any> = AdaptableCellChangedAlert<TData> | AdaptableRowChangedAlert<TData> | AdaptableGenericAlert;
9
9
  /**
10
10
  * Type of AdapTable Alert: generic, cellChange or rowChange
11
11
  */
@@ -18,20 +18,20 @@ export interface AdaptableGenericAlert extends AdaptableAlertBase<'generic'> {
18
18
  /**
19
19
  * Defines an Alert fired by AdapTable when a cell is changed
20
20
  */
21
- export interface AdaptableCellChangedAlert extends AdaptableAlertBase<'cellChanged'> {
21
+ export interface AdaptableCellChangedAlert<TData = any> extends AdaptableAlertBase<'cellChanged'> {
22
22
  /**
23
23
  * Cell DataChange which triggered Alert
24
24
  */
25
- cellDataChangedInfo: CellDataChangedInfo;
25
+ cellDataChangedInfo: CellDataChangedInfo<TData>;
26
26
  }
27
27
  /**
28
28
  * Defines an Alert fired by AdapTable when a row is changed
29
29
  */
30
- export interface AdaptableRowChangedAlert extends AdaptableAlertBase<'rowChanged'> {
30
+ export interface AdaptableRowChangedAlert<TData = any> extends AdaptableAlertBase<'rowChanged'> {
31
31
  /**
32
32
  * Row DataChange which triggered Alert
33
33
  */
34
- gridDataChangedInfo: GridDataChangedInfo;
34
+ gridDataChangedInfo: GridDataChangedInfo<TData>;
35
35
  }
36
36
  /**
37
37
  * Defines the base(common) properties of an Alert fired by AdapTable, regardless of the type of change
@@ -54,5 +54,5 @@ export interface AdaptableAlertBase<T> extends AdaptableObject {
54
54
  */
55
55
  alertDefinition: AlertDefinition;
56
56
  }
57
- export declare const isAdaptableCellChangedAlert: (alert: AdaptableAlert) => alert is AdaptableCellChangedAlert;
58
- export declare const isAdaptableRowChangedAlert: (alert: AdaptableAlert) => alert is AdaptableRowChangedAlert;
57
+ export declare const isAdaptableCellChangedAlert: (alert: AdaptableAlert) => alert is AdaptableCellChangedAlert<any>;
58
+ export declare const isAdaptableRowChangedAlert: (alert: AdaptableAlert) => alert is AdaptableRowChangedAlert<any>;
@@ -36,11 +36,11 @@ export interface AdaptableColumnGroup {
36
36
  /**
37
37
  * Defines an Adaptable Column - created at run-time based on AG Grid ColDef
38
38
  */
39
- export interface AdaptableColumn extends AdaptableColumnBase {
39
+ export interface AdaptableColumn<TData = any> extends AdaptableColumnBase {
40
40
  /**
41
41
  * Field in the row to get cell data from
42
42
  */
43
- field?: string;
43
+ field?: Extract<keyof TData, string>;
44
44
  /**
45
45
  * Is this the Primary Key Column
46
46
  */
@@ -1,9 +1,8 @@
1
- import { RowNode } from '@ag-grid-community/core';
2
- import { InitialGroupOrderComparatorParams } from '@ag-grid-community/core/dist/cjs/es5/entities/iCallbackParams';
1
+ import { InitialGroupOrderComparatorParams, IRowNode } from '@ag-grid-community/core';
3
2
  /**
4
3
  * Standard comparer function used to evaluate custom sorts, returns -1, 0, 1 as required
5
4
  */
6
- export declare type AdaptableComparerFunction = (
5
+ export declare type AdaptableComparerFunction<TData = any> = (
7
6
  /**
8
7
  * First Cell to compare
9
8
  */
@@ -15,9 +14,9 @@ valueB: any,
15
14
  /**
16
15
  * First Row Node to compare
17
16
  */
18
- nodeA?: RowNode,
17
+ nodeA?: IRowNode<TData>,
19
18
  /**
20
19
  * Second Row Node to compare
21
20
  */
22
- nodeB?: RowNode) => number;
23
- export declare type AdaptableNodeComparerFunction = (params: InitialGroupOrderComparatorParams) => number;
21
+ nodeB?: IRowNode<TData>) => number;
22
+ export declare type AdaptableNodeComparerFunction<TData = any> = (params: InitialGroupOrderComparatorParams<TData>) => number;
@@ -1,7 +1,7 @@
1
1
  import { AdaptableScope } from './AdaptableScope';
2
2
  import { AdaptableColumn, AdaptableColumnDataType } from './AdaptableColumn';
3
3
  import { AdaptableApi, AdaptableIcon, ColumnFilter } from '../../types';
4
- import { RowNode } from '@ag-grid-community/core';
4
+ import { IRowNode } from '@ag-grid-community/core';
5
5
  /**
6
6
  * Predicate object used by AdapTableQL - essentially a boolean function
7
7
  */
@@ -92,7 +92,7 @@ export interface PredicateDefHandlerParams {
92
92
  /**
93
93
  * AG Grid Row node which contains the cell
94
94
  */
95
- node: RowNode;
95
+ node: IRowNode;
96
96
  /**
97
97
  * Any inputs required to perform evaluation
98
98
  */
@@ -1,9 +1,9 @@
1
- import { RowNode } from '@ag-grid-community/core';
1
+ import { IRowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableColumn } from './AdaptableColumn';
3
3
  /**
4
4
  * Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row
5
5
  */
6
- export interface CellDataChangedInfo {
6
+ export interface CellDataChangedInfo<TData = any> {
7
7
  /**
8
8
  * Timestamp of change occurrence (in milliseconds)
9
9
  */
@@ -19,7 +19,7 @@ export interface CellDataChangedInfo {
19
19
  /**
20
20
  * Column in which cell is situated
21
21
  */
22
- column: AdaptableColumn;
22
+ column: AdaptableColumn<TData>;
23
23
  /**
24
24
  * Primary Key Column's value for the row where edited cell is situated
25
25
  */
@@ -27,11 +27,11 @@ export interface CellDataChangedInfo {
27
27
  /**
28
28
  * AG Grid RowNode that contains the cell
29
29
  */
30
- rowNode?: RowNode;
30
+ rowNode?: IRowNode<TData>;
31
31
  /**
32
32
  * Data in the Row
33
33
  */
34
- rowData?: any;
34
+ rowData?: TData;
35
35
  /**
36
36
  * What triggered the change - user, background change or a reverted change?
37
37
  */
@@ -17,7 +17,7 @@ export interface CellSummmary {
17
17
  /**
18
18
  * Defines a Custom Cell Summary operation provided by a user
19
19
  */
20
- export interface CellSummaryOperation {
20
+ export interface CellSummaryOperation<TData = any> {
21
21
  /**
22
22
  * Name of the Operation - will be displayed in the Cell Summary components
23
23
  */
@@ -25,16 +25,16 @@ export interface CellSummaryOperation {
25
25
  /**
26
26
  * Function to run when a summary result is required
27
27
  */
28
- operationFunction: (operationContext: CellSummaryOperationContext) => any;
28
+ operationFunction: (operationContext: CellSummaryOperationContext<TData>) => any;
29
29
  }
30
30
  /**
31
31
  * Context provided to a custom Cell Summary Operation function
32
32
  */
33
- export interface CellSummaryOperationContext extends BaseContext {
33
+ export interface CellSummaryOperationContext<TData = any> extends BaseContext {
34
34
  /**
35
35
  * Currently selected cells
36
36
  */
37
- selectedCellInfo: SelectedCellInfo;
37
+ selectedCellInfo: SelectedCellInfo<TData>;
38
38
  /**
39
39
  * All values of selected cells
40
40
  */
@@ -4,7 +4,7 @@ import { AdaptableColumn } from './AdaptableColumn';
4
4
  import { AdaptableModule } from './Types';
5
5
  import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
6
6
  import { SelectedRowInfo } from '../Selection/SelectedRowInfo';
7
- import { Column, RowNode } from '@ag-grid-community/core';
7
+ import { Column, IRowNode } from '@ag-grid-community/core';
8
8
  import { AdaptableIcon, BaseContext } from '../../types';
9
9
  /**
10
10
  * Menu item used by Adaptable in both Column and Context Menus
@@ -71,11 +71,11 @@ export interface UserMenuItem<CONTEXT_TYPE extends BaseContext> {
71
71
  /**
72
72
  * Provides full details about the Column in which the Column Menu will appear
73
73
  */
74
- export interface ColumnMenuContext extends BaseContext {
74
+ export interface ColumnMenuContext<TData = any> extends BaseContext {
75
75
  /**
76
76
  * Current Adaptable Column
77
77
  */
78
- adaptableColumn: AdaptableColumn;
78
+ adaptableColumn: AdaptableColumn<TData>;
79
79
  /**
80
80
  * Current AG Grid Column
81
81
  */
@@ -88,15 +88,15 @@ export interface ColumnMenuContext extends BaseContext {
88
88
  /**
89
89
  * Provides full details about current cell (and selected cells) where the Context Menu will appear
90
90
  */
91
- export interface ContextMenuContext extends BaseContext {
91
+ export interface ContextMenuContext<TData = any> extends BaseContext {
92
92
  /**
93
93
  * Cell that has been clicked; contains cell value
94
94
  */
95
- gridCell: GridCell;
95
+ gridCell: GridCell<TData>;
96
96
  /**
97
97
  * Current Adaptable Column
98
98
  */
99
- adaptableColumn: AdaptableColumn;
99
+ adaptableColumn: AdaptableColumn<TData>;
100
100
  /**
101
101
  * Current AG Grid Column
102
102
  */
@@ -116,7 +116,7 @@ export interface ContextMenuContext extends BaseContext {
116
116
  /**
117
117
  * Current AG Grid row node
118
118
  */
119
- rowNode: RowNode;
119
+ rowNode: IRowNode<TData>;
120
120
  /**
121
121
  * Whether current AG Grid row node is grouped
122
122
  */
@@ -132,9 +132,9 @@ export interface ContextMenuContext extends BaseContext {
132
132
  /**
133
133
  * Currently selected cells in the grid
134
134
  */
135
- selectedCellInfo: SelectedCellInfo;
135
+ selectedCellInfo: SelectedCellInfo<TData>;
136
136
  /**
137
137
  * Currently selected rows in the grid
138
138
  */
139
- selectedRowInfo: SelectedRowInfo;
139
+ selectedRowInfo: SelectedRowInfo<TData>;
140
140
  }
@@ -1,13 +1,13 @@
1
- import { RowNode } from '@ag-grid-community/core';
1
+ import { IRowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableColumn } from '../Common/AdaptableColumn';
3
3
  /**
4
4
  * Defines a Cell in Adaptable - every cell is an intersection of a Column Id and a Primary Key Value
5
5
  */
6
- export interface GridCell {
6
+ export interface GridCell<TData = any> {
7
7
  /**
8
8
  * Column in which cell is situated
9
9
  */
10
- column: AdaptableColumn;
10
+ column: AdaptableColumn<TData>;
11
11
  /**
12
12
  * Actual raw value of cell
13
13
  */
@@ -27,5 +27,5 @@ export interface GridCell {
27
27
  /**
28
28
  * AG Grid Row Node that holds the cell
29
29
  */
30
- rowNode: RowNode;
30
+ rowNode: IRowNode<TData>;
31
31
  }
@@ -1,8 +1,8 @@
1
- import { RowNode } from '@ag-grid-community/core';
1
+ import { IRowNode } from '@ag-grid-community/core';
2
2
  /**
3
3
  * Detailed information about a Row in AdapTable
4
4
  */
5
- export interface GridRow {
5
+ export interface GridRow<TData = any> {
6
6
  /**
7
7
  * Primary Key column's value for Row - how Adaptable locates a cell
8
8
  */
@@ -10,7 +10,7 @@ export interface GridRow {
10
10
  /**
11
11
  * Actual data in the Row
12
12
  */
13
- rowData?: any;
13
+ rowData?: TData;
14
14
  /**
15
15
  * Object which provides 'meta data' about the Row
16
16
  */
@@ -18,7 +18,7 @@ export interface GridRow {
18
18
  /**
19
19
  * AG Grid Row Node object for the Row
20
20
  */
21
- rowNode?: RowNode;
21
+ rowNode?: IRowNode<TData>;
22
22
  }
23
23
  /**
24
24
  * Provides meta data about a Row in Adaptable
@@ -3,13 +3,13 @@ import { GridCell } from './GridCell';
3
3
  /**
4
4
  * Describes which Cells are currently selected in AdapTable
5
5
  */
6
- export interface SelectedCellInfo {
6
+ export interface SelectedCellInfo<TData = any> {
7
7
  /**
8
8
  * Array of Columns which have selected cells
9
9
  */
10
- columns: AdaptableColumn[];
10
+ columns: AdaptableColumn<TData>[];
11
11
  /**
12
12
  * Array of GridCells (which provide cell value, primary kev value and other info)
13
13
  */
14
- gridCells: GridCell[];
14
+ gridCells: GridCell<TData>[];
15
15
  }
@@ -2,9 +2,9 @@ import { GridRow } from './GridRow';
2
2
  /**
3
3
  * Describes which Rows are currently selected in AdapTable
4
4
  */
5
- export interface SelectedRowInfo {
5
+ export interface SelectedRowInfo<TData = any> {
6
6
  /**
7
7
  * Array of Grid Rows containing full information about a row in AdapTable
8
8
  */
9
- gridRows: GridRow[];
9
+ gridRows: GridRow<TData>[];
10
10
  }
@@ -11,7 +11,7 @@ export interface StatusBarState extends ConfigState {
11
11
  StatusBars?: AdaptableStatusBar[];
12
12
  }
13
13
  /**
14
- * Name of the component specified in ag-grid gridOptions.statusBar.statusPanels
14
+ * Name of the component specified in AG Grid gridOptions.statusBar.statusPanels
15
15
  */
16
16
  export declare const ADAPTABLE_STATUS_PANEL = "AdaptableStatusPanel";
17
17
  /**
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ADAPTABLE_STATUS_PANEL = void 0;
4
4
  /**
5
- * Name of the component specified in ag-grid gridOptions.statusBar.statusPanels
5
+ * Name of the component specified in AG Grid gridOptions.statusBar.statusPanels
6
6
  */
7
7
  exports.ADAPTABLE_STATUS_PANEL = 'AdaptableStatusPanel';
@@ -74,8 +74,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
74
74
  CurrentDataSet: string;
75
75
  /**
76
76
  * Chart modes are saved here for every chart event.
77
- * This way any part of the application can listen to chart-model changes without
78
- * directly listening to ag-grid events.
77
+ * This way any part of the application can listen to chart-model changes without directly listening to AG Grid events
79
78
  */
80
79
  Charting: {
81
80
  currentChartModels: ChartModel[];
@@ -34,4 +34,8 @@ export interface AdaptableTheme extends AdaptableObject {
34
34
  * Ag Grid theme to apply when loading theme
35
35
  */
36
36
  AgGridClassName?: string;
37
+ /**
38
+ * Variables to be applied at runtime
39
+ */
40
+ CSSVariables?: Record<string, string>;
37
41
  }
@@ -7,7 +7,7 @@ import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
7
7
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
8
8
  import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
9
9
  import { Layout, CellSummmary, ColumnFilter } from '../../types';
10
- import { RowNode } from '@ag-grid-community/core';
10
+ import { IRowNode } from '@ag-grid-community/core';
11
11
  /**
12
12
  * @ReduxAction Columns have been set in the Grid
13
13
  */
@@ -140,7 +140,7 @@ export interface GridSetCellSummaryAction extends Redux.Action {
140
140
  cellSummary: CellSummmary;
141
141
  }
142
142
  export interface GridRefreshCellsAction extends Redux.Action {
143
- rowNodes: RowNode[];
143
+ rowNodes: IRowNode[];
144
144
  columnIds: string[];
145
145
  }
146
146
  export interface SetSettingPanelModuleMenuItemsAction extends Redux.Action {
@@ -195,11 +195,11 @@ export declare const GridRemoveColumn: (Column: AdaptableColumn) => GridRemoveCo
195
195
  export declare const GridEditColumn: (Column: AdaptableColumn) => GridEditColumnAction;
196
196
  export declare const GridSetSort: (ColumnSorts: ColumnSort[]) => GridSetSortAction;
197
197
  export declare const GridClearSort: () => GridClearSortAction;
198
- export declare const GridSetSelectedCells: (SelectedCellInfo: SelectedCellInfo) => GridSetSelectedCellsAction;
199
- export declare const GridSetSelectedRows: (SelectedRowInfo: SelectedRowInfo) => GridSetSelectedRowsAction;
198
+ export declare const GridSetSelectedCells: (SelectedCellInfo: SelectedCellInfo<any>) => GridSetSelectedCellsAction;
199
+ export declare const GridSetSelectedRows: (SelectedRowInfo: SelectedRowInfo<any>) => GridSetSelectedRowsAction;
200
200
  export declare const GridCreateCellSummary: () => GridCreateCellSummaryAction;
201
201
  export declare const GridSetCellSummary: (CellSummary: CellSummmary) => GridSetCellSummaryAction;
202
- export declare const GridRefreshCells: (rowNodes: RowNode[], columnIds: string[]) => GridRefreshCellsAction;
202
+ export declare const GridRefreshCells: (rowNodes: IRowNode[], columnIds: string[]) => GridRefreshCellsAction;
203
203
  export declare const SetPivotModeOn: () => SetPivotModeOnAction;
204
204
  export declare const SetPivotModeOff: () => SetPivotModeOffAction;
205
205
  export declare const SetTreeModeOn: () => SetTreeModeOnAction;