@adaptabletools/adaptable 15.0.0-canary.1 → 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 (79) hide show
  1. package/bundle.cjs.js +210 -210
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  6. package/src/AdaptableOptions/ActionOptions.d.ts +30 -30
  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 +23 -23
  21. package/src/Api/ChartingApi.d.ts +18 -19
  22. package/src/Api/EventApi.d.ts +13 -1
  23. package/src/Api/Events/ActionRowSubmitted.d.ts +7 -7
  24. package/src/Api/Events/GridDataChanged.d.ts +3 -3
  25. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  26. package/src/Api/GridApi.d.ts +4 -4
  27. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  28. package/src/Api/Implementation/ThemeApiImpl.d.ts +4 -0
  29. package/src/Api/Implementation/ThemeApiImpl.js +14 -0
  30. package/src/Api/OptionsApi.d.ts +1 -1
  31. package/src/Api/ThemeApi.d.ts +18 -0
  32. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +7 -7
  33. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +2 -2
  34. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +4 -4
  35. package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +4 -4
  36. package/src/PredefinedConfig/Common/CellSummary.d.ts +4 -4
  37. package/src/PredefinedConfig/Common/Menu.d.ts +8 -8
  38. package/src/PredefinedConfig/Selection/GridCell.d.ts +3 -3
  39. package/src/PredefinedConfig/Selection/GridRow.d.ts +3 -3
  40. package/src/PredefinedConfig/Selection/SelectedCellInfo.d.ts +3 -3
  41. package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +2 -2
  42. package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
  43. package/src/PredefinedConfig/StatusBarState.js +1 -1
  44. package/src/PredefinedConfig/SystemState.d.ts +1 -2
  45. package/src/PredefinedConfig/ThemeState.d.ts +4 -0
  46. package/src/Redux/ActionsReducers/GridRedux.d.ts +2 -2
  47. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +27 -0
  48. package/src/Redux/ActionsReducers/ThemeRedux.js +63 -1
  49. package/src/Strategy/ExportModule.js +1 -1
  50. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  51. package/src/Utilities/Constants/GeneralConstants.js +3 -2
  52. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
  53. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  54. package/src/Utilities/ObjectFactory.d.ts +3 -1
  55. package/src/Utilities/ObjectFactory.js +10 -1
  56. package/src/Utilities/Services/Interface/IThemeService.d.ts +3 -0
  57. package/src/Utilities/Services/Interface/IThemeService.js +2 -0
  58. package/src/Utilities/Services/MetamodelService.d.ts +2 -0
  59. package/src/Utilities/Services/MetamodelService.js +26 -19
  60. package/src/Utilities/Services/ThemeService.d.ts +12 -0
  61. package/src/Utilities/Services/ThemeService.js +49 -0
  62. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +5 -5
  63. package/src/View/Charting/ShowChartButton.js +2 -1
  64. package/src/View/Charting/useChartingElements.js +2 -1
  65. package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
  66. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  67. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
  68. package/src/View/Theme/ThemeEditor.d.ts +7 -0
  69. package/src/View/Theme/ThemeEditor.js +186 -0
  70. package/src/View/Theme/ThemePopup.d.ts +3 -0
  71. package/src/View/Theme/ThemePopup.js +30 -6
  72. package/src/agGrid/Adaptable.d.ts +3 -2
  73. package/src/agGrid/Adaptable.js +8 -17
  74. package/src/agGrid/createAgStatusPanelComponent.js +1 -1
  75. package/src/metamodel/adaptable-metamodel-model.d.ts +9 -9
  76. package/src/metamodel/adaptable.metamodel.d.ts +1698 -3141
  77. package/src/metamodel/adaptable.metamodel.js +1 -1
  78. package/version.d.ts +1 -1
  79. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "15.0.0-canary.1",
3
+ "version": "15.0.0-canary.2",
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",
@@ -1,2 +1,2 @@
1
- declare const _default: 1675780258346;
1
+ declare const _default: 1675951692246;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1675780258346;
3
+ exports.default = 1675951692246;
@@ -188,8 +188,8 @@ export interface IAdaptable {
188
188
  setCellValue(cellDataChangedInfo: CellDataChangedInfo): void;
189
189
  cancelEdit(): any;
190
190
  isCellEditable(rowNode: IRowNode, column: Column): boolean;
191
- getFirstRowNode(): IRowNode;
192
- getFirstDisplayedRowNode(): IRowNode;
191
+ getFirstRowNode(): IRowNode | undefined;
192
+ getFirstDisplayedRowNode(): IRowNode | undefined;
193
193
  forAllRowNodesDo(func: (rowNode: IRowNode) => void, config?: {
194
194
  includeGroupRows?: boolean;
195
195
  filterFn?: (rowNode: IRowNode) => boolean;
@@ -3,12 +3,12 @@ import { ActionRowSubmittedInfo, ActionRowType, AdaptableButton, AdaptableColumn
3
3
  /**
4
4
  * Options related to Action Columns and Buttons in Adaptable.
5
5
  */
6
- export interface ActionOptions {
6
+ export interface ActionOptions<TData = any> {
7
7
  /**
8
8
  * Columns which contain an AdapTable Button - used for performing Actions
9
9
  * @defaultValue undefined
10
10
  */
11
- actionColumns?: ActionColumn[];
11
+ actionColumns?: ActionColumn<TData>[];
12
12
  /**
13
13
  * Action buttons to display for each row
14
14
  * @defaultValue undefined
@@ -18,18 +18,18 @@ export interface ActionOptions {
18
18
  * Additional options for managing Action Row Buttons
19
19
  * @defaultValue undefined
20
20
  */
21
- actionRowButtonOptions?: ActionRowButtonOptions;
21
+ actionRowButtonOptions?: ActionRowButtonOptions<TData>;
22
22
  }
23
23
  /**
24
24
  * The context for the SetPrimaryKeyValueContext function
25
25
  */
26
- export interface SetPrimaryKeyValueContext extends BaseContext {
27
- rowData: any;
26
+ export interface SetPrimaryKeyValueContext<TData = any> extends BaseContext {
27
+ rowData: TData;
28
28
  }
29
29
  /**
30
30
  * A Special Column that wraps an AdapTable Button
31
31
  */
32
- export interface ActionColumn extends AdaptableObject {
32
+ export interface ActionColumn<TData = any> extends AdaptableObject {
33
33
  /**
34
34
  * Mandatory 'Id'; if no value set for `FriendlyName`, this will also be Column name
35
35
  */
@@ -41,7 +41,7 @@ export interface ActionColumn extends AdaptableObject {
41
41
  /**
42
42
  * Button (or list of buttons) to display in the Column
43
43
  */
44
- actionColumnButton: AdaptableButton<ActionColumnContext> | AdaptableButton<ActionColumnContext>[];
44
+ actionColumnButton: AdaptableButton<ActionColumnContext<TData>> | AdaptableButton<ActionColumnContext<TData>>[];
45
45
  /**
46
46
  * Shows Action Column also in grouped rows
47
47
  */
@@ -54,11 +54,11 @@ export interface ActionColumn extends AdaptableObject {
54
54
  /**
55
55
  * Context required by functions when using an Action Column Button
56
56
  */
57
- export interface ActionColumnContext extends BaseContext {
57
+ export interface ActionColumnContext<TData = any> extends BaseContext {
58
58
  /**
59
59
  * Action Column in question
60
60
  */
61
- actionColumn: ActionColumn;
61
+ actionColumn: ActionColumn<TData>;
62
62
  /**
63
63
  * Primary Key Value in current row
64
64
  */
@@ -66,11 +66,11 @@ export interface ActionColumnContext extends BaseContext {
66
66
  /**
67
67
  * Current AG Grid Row Node
68
68
  */
69
- rowNode: IRowNode;
69
+ rowNode: IRowNode<TData>;
70
70
  /**
71
71
  * The current row's data
72
72
  */
73
- data: any;
73
+ data: TData;
74
74
  }
75
75
  /**
76
76
  * Set of optional properties that define an Action Columns behaviour
@@ -99,12 +99,12 @@ export interface ActionColumnSettings {
99
99
  /**
100
100
  * Options for managing the Buttons in Action Rows
101
101
  */
102
- export interface ActionRowButtonOptions {
102
+ export interface ActionRowButtonOptions<TData = any> {
103
103
  /**
104
104
  * Optional configuration that merges with built-in action row button and overrides default configuration
105
105
  * @defaultValue undefined
106
106
  */
107
- customConfiguration?: (context: ActionRowButtonConfigurationContext) => Partial<AdaptableButton<ActionColumnContext>>;
107
+ customConfiguration?: (context: ActionRowButtonConfigurationContext) => Partial<AdaptableButton<ActionColumnContext<TData>>>;
108
108
  /**
109
109
  * Action Row Buttons position: 'pinnedLeft' | 'pinnedRight
110
110
  * @defaultValue 'pinnedLeft'
@@ -119,52 +119,52 @@ export interface ActionRowButtonOptions {
119
119
  * Function called when auto-handling 'create' Action Row Button; returned row value should have a valid(unique) primary key value
120
120
  * @defaultValue undefined
121
121
  */
122
- setPrimaryKeyValue?: (context: SetPrimaryKeyValueContext) => any;
122
+ setPrimaryKeyValue?: (context: SetPrimaryKeyValueContext<TData>) => any;
123
123
  /**
124
124
  * Options for managing the Form which the Action Row displays
125
125
  * @defaultValue undefined
126
126
  */
127
- actionRowFormOptions?: ActionRowFormOptions;
127
+ actionRowFormOptions?: ActionRowFormOptions<TData>;
128
128
  }
129
129
  /**
130
130
  * Options for Form displayed when Action Row Button is clicked
131
131
  */
132
- export interface ActionRowFormOptions {
132
+ export interface ActionRowFormOptions<TData = any> {
133
133
  /**
134
134
  * Custom form title provider
135
135
  * @defaultValue 'Create New Row'/'Edit Row'
136
136
  */
137
- formTitle?: string | ((context: ActionRowParamContext) => string);
137
+ formTitle?: string | ((context: ActionRowParamContext<TData>) => string);
138
138
  /**
139
139
  * Custom form description provider
140
140
  * @defaultValue undefined
141
141
  */
142
- formDescription?: string | ((context: ActionRowParamContext) => string);
142
+ formDescription?: string | ((context: ActionRowParamContext<TData>) => string);
143
143
  /**
144
144
  * Custom form field label provider
145
145
  * @defaultValue undefined
146
146
  */
147
- formFieldLabel?: (context: ActionRowParamFieldContext) => string;
147
+ formFieldLabel?: (context: ActionRowParamFieldContext<TData>) => string;
148
148
  /**
149
149
  * Custom form buttons provider. If provided, the custom implementation is responsible for firing the 'ActionRowSubmitted' and/or invoking the 'onFormSubmit' callback (if necessary).
150
150
  */
151
- formButtons?: AdaptableButton<ActionRowFormContext>[];
151
+ formButtons?: AdaptableButton<ActionRowFormContext<TData>>[];
152
152
  /**
153
153
  * Function invoked when the form in an Action Row is submitted via a standard button (provided by AdapTable). This is not invoked when custom form buttons are provided!
154
154
  *
155
155
  * @param actionRowSubmittedInfo the form submitted info
156
156
  * @defaultValue undefined
157
157
  */
158
- onFormSubmit?: (actionRowSubmittedInfo: ActionRowSubmittedInfo) => void;
158
+ onFormSubmit?: (actionRowSubmittedInfo: ActionRowSubmittedInfo<TData>) => void;
159
159
  }
160
160
  /**
161
161
  * Context passed into a Row Form - can be `CreateActionRowContext` or `EditActionRowContext`
162
162
  */
163
- export declare type ActionRowFormContext = CreateActionRowFormContext | EditActionRowFormContext;
163
+ export declare type ActionRowFormContext<TData = any> = CreateActionRowFormContext<TData> | EditActionRowFormContext<TData>;
164
164
  /**
165
165
  * Context used in a Create Row Form
166
166
  */
167
- export interface CreateActionRowFormContext extends FormContext {
167
+ export interface CreateActionRowFormContext<TData = any> extends FormContext {
168
168
  /**
169
169
  * Type of the Context
170
170
  */
@@ -172,12 +172,12 @@ export interface CreateActionRowFormContext extends FormContext {
172
172
  /**
173
173
  * The RowNode being cloned
174
174
  */
175
- clonedRowNode?: IRowNode;
175
+ clonedRowNode?: IRowNode<TData>;
176
176
  }
177
177
  /**
178
178
  * Context used in an Edit Row Form
179
179
  */
180
- export interface EditActionRowFormContext extends FormContext {
180
+ export interface EditActionRowFormContext<TData = any> extends FormContext {
181
181
  /**
182
182
  * Type of the Context
183
183
  */
@@ -185,20 +185,20 @@ export interface EditActionRowFormContext extends FormContext {
185
185
  /**
186
186
  * The RowNode being edited
187
187
  */
188
- rowNode: IRowNode;
188
+ rowNode: IRowNode<TData>;
189
189
  }
190
190
  /**
191
191
  * Context used for overriding Title and Description of Action Row Form
192
192
  */
193
- export interface ActionRowParamContext extends BaseContext {
193
+ export interface ActionRowParamContext<TData = any> extends BaseContext {
194
194
  type: Extract<ActionRowType, 'rowEdited' | 'rowCreated'>;
195
- rowNode?: IRowNode;
195
+ rowNode?: IRowNode<TData>;
196
196
  }
197
197
  /**
198
198
  * Context used for overriding Field elements in Action Row Form
199
199
  */
200
- export interface ActionRowParamFieldContext extends ActionRowParamContext {
201
- column: AdaptableColumn;
200
+ export interface ActionRowParamFieldContext<TData = any> extends ActionRowParamContext {
201
+ column: AdaptableColumn<TData>;
202
202
  }
203
203
  /**
204
204
  * Type of Action Row Button: 'create' | 'clone' | 'edit' | 'delete'
@@ -27,7 +27,7 @@ import { ChartingOptions } from './ChartingOptions';
27
27
  /**
28
28
  * Group of property options enabling developers to set up AdapTable at design time to fit precise requirements - provides AG Grid, Predefined Config and other information required to ensure a full, rich user experience
29
29
  */
30
- export interface AdaptableOptions {
30
+ export interface AdaptableOptions<TData = any> {
31
31
  /**
32
32
  * Identifier for this instance of AdapTable
33
33
  *
@@ -53,7 +53,7 @@ export interface AdaptableOptions {
53
53
  /**
54
54
  * The AG Grid object which AdapTable interacts with. Note: if using AdapTable React or AdapTable Angular, no need to populate this property as AdapTable wires it up differently
55
55
  */
56
- gridOptions?: GridOptions;
56
+ gridOptions?: GridOptions<TData>;
57
57
  /**
58
58
  * Commercial license key. If the license is not provided or is expired, various visual information notes will be displayed and some functionality may be limited.
59
59
  */
@@ -70,7 +70,7 @@ export interface AdaptableOptions {
70
70
  * @defaultValue n/a (Mandatory)
71
71
  * @gridInfoItem
72
72
  */
73
- primaryKey: string;
73
+ primaryKey: Extract<keyof TData, string>;
74
74
  /**
75
75
  * Name of current AdapTable user
76
76
  *
@@ -81,19 +81,19 @@ export interface AdaptableOptions {
81
81
  /**
82
82
  * Options for managing Action Columns and Action Rows
83
83
  */
84
- actionOptions?: ActionOptions;
84
+ actionOptions?: ActionOptions<TData>;
85
85
  /**
86
86
  * Options for managing AdapTableQL
87
87
  * @noCodeContainer
88
88
  */
89
- adaptableQLOptions?: AdaptableQLOptions;
89
+ adaptableQLOptions?: AdaptableQLOptions<TData>;
90
90
  /**
91
91
  * Options for managing Alerts in AdapTable
92
92
  *
93
93
  * @gridInfoContainer
94
94
  * @noCodeContainer
95
95
  */
96
- alertOptions?: AlertOptions;
96
+ alertOptions?: AlertOptions<TData>;
97
97
  /**
98
98
  * Options for managing AG Grid's Charting
99
99
  * @noCodeContainer
@@ -121,13 +121,13 @@ export interface AdaptableOptions {
121
121
  * @gridInfoContainer
122
122
  * @noCodeContainer
123
123
  */
124
- dataChangeHistoryOptions?: DataChangeHistoryOptions;
124
+ dataChangeHistoryOptions?: DataChangeHistoryOptions<TData>;
125
125
  /**
126
126
  * Options related to Editing in AdapTable including Server Validation
127
127
  *
128
128
  * @gridInfoContainer
129
129
  */
130
- editOptions?: EditOptions;
130
+ editOptions?: EditOptions<TData>;
131
131
  /**
132
132
  * Options for managing Entitlements
133
133
  *
@@ -147,7 +147,7 @@ export interface AdaptableOptions {
147
147
  * @noCodeContainer
148
148
  *
149
149
  */
150
- filterOptions?: FilterOptions;
150
+ filterOptions?: FilterOptions<TData>;
151
151
  /**
152
152
  * Options for managing Flashing Cells - primarily default values
153
153
  *
@@ -160,7 +160,7 @@ export interface AdaptableOptions {
160
160
  * @gridInfoContainer
161
161
  * @noCodeContainer
162
162
  */
163
- generalOptions?: GeneralOptions;
163
+ generalOptions?: GeneralOptions<TData>;
164
164
  /**
165
165
  * Options related to Layouts
166
166
  *
@@ -173,7 +173,7 @@ export interface AdaptableOptions {
173
173
  *
174
174
  * @gridInfoContainer
175
175
  */
176
- menuOptions?: MenuOptions;
176
+ menuOptions?: MenuOptions<TData>;
177
177
  /**
178
178
  * Options for managing Notifications in AdapTable
179
179
  *
@@ -187,7 +187,7 @@ export interface AdaptableOptions {
187
187
  * @gridInfoContainer
188
188
  * @noCodeContainer
189
189
  */
190
- searchOptions?: SearchOptions;
190
+ searchOptions?: SearchOptions<TData>;
191
191
  /**
192
192
  * Setting panel options
193
193
  *
@@ -217,7 +217,7 @@ export interface AdaptableOptions {
217
217
  *
218
218
  * @gridInfoContainer
219
219
  */
220
- userInterfaceOptions?: UserInterfaceOptions;
220
+ userInterfaceOptions?: UserInterfaceOptions<TData>;
221
221
  /**
222
222
  * Used for managing the AdapTable Plugins
223
223
  */
@@ -7,7 +7,7 @@ import { PredicateOptions } from './PredicateOptions';
7
7
  /**
8
8
  * Options for managing AdapTableQL - the Adaptable Query Language which evaluates Predicates and Expressions
9
9
  */
10
- export interface AdaptableQLOptions {
10
+ export interface AdaptableQLOptions<TData = any> {
11
11
  /**
12
12
  * Perform case-sensitive text comparisons when evaluating Predicates and Expressions
13
13
  *
@@ -20,7 +20,7 @@ export interface AdaptableQLOptions {
20
20
  * Whether a Module (or a specific expression) should be evaluated by AdapTableQL
21
21
  * @defaultValue All Modules are evaluated by AdapTable
22
22
  */
23
- evaluateAdaptableQLExternally?: (context: EvaluateExpressionExternallyContext) => boolean;
23
+ evaluateAdaptableQLExternally?: (context: EvaluateExpressionExternallyContext<TData>) => boolean;
24
24
  /**
25
25
  * Options for managing Expressions in AdapTableQL
26
26
  */
@@ -44,7 +44,7 @@ export interface AdaptableQLOptions {
44
44
  /**
45
45
  * Context passed when evaluating `AdaptableQLOptions.evaluateExpressionExternally()`
46
46
  */
47
- export interface EvaluateExpressionExternallyContext extends BaseContext {
47
+ export interface EvaluateExpressionExternallyContext<TData = any> extends BaseContext {
48
48
  /**
49
49
  * Module where Expression is being evaluated
50
50
  */
@@ -56,5 +56,5 @@ export interface EvaluateExpressionExternallyContext extends BaseContext {
56
56
  /**
57
57
  * Columns contained in Expression
58
58
  */
59
- referencedColumns?: AdaptableColumn[];
59
+ referencedColumns?: AdaptableColumn<TData>[];
60
60
  }
@@ -6,7 +6,7 @@ import { CellDataChangedInfo } from '../types';
6
6
  /**
7
7
  * Options related to Alerts in Adaptable.
8
8
  */
9
- export interface AlertOptions {
9
+ export interface AlertOptions<TData = any> {
10
10
  /**
11
11
  * How many alerts held in State at any one time; when limit is breached, oldest alert will be removed
12
12
  *
@@ -38,11 +38,11 @@ export interface AlertOptions {
38
38
  /**
39
39
  * Custom onClick Handlers for Buttons (displayed in Alert Forms)
40
40
  */
41
- actionHandlers?: ActionHandler[];
41
+ actionHandlers?: ActionHandler<TData>[];
42
42
  /**
43
43
  * Full definitions of Alert Forms - the names of which are provided in Alert State
44
44
  */
45
- alertForms?: AlertForm[];
45
+ alertForms?: AlertForm<TData>[];
46
46
  /**
47
47
  * Whether Alert rule is evaluated against the `rawValue` or `formattedValue` of the changed cell data
48
48
  *
@@ -53,16 +53,16 @@ export interface AlertOptions {
53
53
  /**
54
54
  * Function providing Title to display in Alert; if empty, AdapTable provides dynamically
55
55
  */
56
- alertMessageTitle?: (alertMessageContext: AlertMessageContext) => string | undefined;
56
+ alertMessageTitle?: (alertMessageContext: AlertMessageContext<TData>) => string | undefined;
57
57
  /**
58
58
  * Function providing Message to display in Alert; if empty, AdapTable provides dynamically
59
59
  */
60
- alertMessageText?: (alertMessageContext: AlertMessageContext) => string | undefined;
60
+ alertMessageText?: (alertMessageContext: AlertMessageContext<TData>) => string | undefined;
61
61
  }
62
62
  /**
63
63
  * Handles a Form Button Action
64
64
  */
65
- export declare type ActionHandler = {
65
+ export declare type ActionHandler<TData = any> = {
66
66
  /**
67
67
  * Name of the Handler
68
68
  */
@@ -70,12 +70,12 @@ export declare type ActionHandler = {
70
70
  /**
71
71
  * Handler function to call when the Button is clicked
72
72
  */
73
- handler: (button: AlertButton<AlertFormContext>, context: AlertFormContext) => void;
73
+ handler: (button: AlertButton<AlertFormContext<TData>>, context: AlertFormContext<TData>) => void;
74
74
  };
75
75
  /**
76
76
  * Form to show in an Alert
77
77
  */
78
- export declare type AlertForm = {
78
+ export declare type AlertForm<TData = any> = {
79
79
  /**
80
80
  * Name of the Form
81
81
  */
@@ -83,21 +83,21 @@ export declare type AlertForm = {
83
83
  /**
84
84
  * The Form to display in the Alert
85
85
  */
86
- form: AdaptableForm<AlertFormContext>;
86
+ form: AdaptableForm<AlertFormContext<TData>>;
87
87
  };
88
88
  /**
89
89
  * Context required by functions when using an Alert Button
90
90
  */
91
- export interface AlertFormContext extends FormContext {
91
+ export interface AlertFormContext<TData = any> extends FormContext {
92
92
  /**
93
93
  * Alert that has been triggered
94
94
  */
95
- alert: AdaptableAlert;
95
+ alert: AdaptableAlert<TData>;
96
96
  }
97
97
  /**
98
98
  * Context used for creating bespoke Alert messages
99
99
  */
100
- export interface AlertMessageContext {
100
+ export interface AlertMessageContext<TData = any> {
101
101
  /**
102
102
  * Current Alert Definition
103
103
  */
@@ -105,10 +105,10 @@ export interface AlertMessageContext {
105
105
  /**
106
106
  * Data change that might have triggered the Alert
107
107
  */
108
- cellDataChangedInfo?: CellDataChangedInfo;
108
+ cellDataChangedInfo?: CellDataChangedInfo<TData>;
109
109
  /**
110
110
  * When alert is triggered by a Grid Data Change
111
111
  * e.g. Row Added, Row Removed
112
112
  */
113
- gridDataChangedInfo?: GridDataChangedInfo;
113
+ gridDataChangedInfo?: GridDataChangedInfo<TData>;
114
114
  }
@@ -13,9 +13,8 @@ export interface ChartingOptions {
13
13
  */
14
14
  chartContainers?: ChartContainer[];
15
15
  /**
16
- * Name of the ag-grid window container.
17
- *
18
- * @default 'Ag Grid Window'
16
+ * Name of AG Grid Chart Container
17
+ * @defaultValue 'AG Grid Window'
19
18
  */
20
19
  agGridContainerName?: string;
21
20
  }
@@ -3,7 +3,7 @@ import { ActionColumnContext, AdaptableButton } from '../types';
3
3
  /**
4
4
  * Options to manage the 'Data Change History Module', which provides an overview of all previous changes, giving the possibility to undo specific changes
5
5
  */
6
- export interface DataChangeHistoryOptions {
6
+ export interface DataChangeHistoryOptions<TData = any> {
7
7
  /**
8
8
  * Whether data change history should be active by default
9
9
  *
@@ -18,13 +18,13 @@ export interface DataChangeHistoryOptions {
18
18
  * @defaultValue undefined (all data changes are logged)
19
19
  * @gridInfoItem
20
20
  */
21
- showDataChange?: (cellDataChangedInfo: CellDataChangedInfo) => boolean;
21
+ showDataChange?: (cellDataChangedInfo: CellDataChangedInfo<TData>) => boolean;
22
22
  /**
23
23
  * Action button definition; can be used to implement undo functionality
24
24
  *
25
25
  * @defaultValue undefined
26
26
  */
27
- changeHistoryButton?: DataChangeHistoryButton | DataChangeHistoryButton[];
27
+ changeHistoryButton?: DataChangeHistoryButton<TData> | DataChangeHistoryButton<TData>[];
28
28
  }
29
29
  /**
30
30
  * Built in `undo` data change action
@@ -33,7 +33,7 @@ export declare type AdaptableDataChangeHistoryAction = 'undo';
33
33
  /**
34
34
  * The context for the DataChangeHistoryButton
35
35
  */
36
- export interface DataChangeHistoryContext extends ActionColumnContext {
36
+ export interface DataChangeHistoryContext<TData = any> extends ActionColumnContext {
37
37
  /**
38
38
  * Helper function to undo the change.
39
39
  */
@@ -45,11 +45,11 @@ export interface DataChangeHistoryContext extends ActionColumnContext {
45
45
  /**
46
46
  * The initial data change
47
47
  */
48
- dataChangedInfo: CellDataChangedInfo;
48
+ dataChangedInfo: CellDataChangedInfo<TData>;
49
49
  }
50
50
  /**
51
51
  * A custom AdaptableButton which provides a build in `undo` action
52
52
  */
53
- export interface DataChangeHistoryButton extends AdaptableButton<DataChangeHistoryContext> {
53
+ export interface DataChangeHistoryButton<TData = any> extends AdaptableButton<DataChangeHistoryContext<TData>> {
54
54
  action?: AdaptableDataChangeHistoryAction;
55
55
  }
@@ -5,11 +5,11 @@ import { GridCell } from '../PredefinedConfig/Selection/GridCell';
5
5
  /**
6
6
  * Options related to Editing in Adaptable - includes Server Validation, Smart Edit Operations and Row Forms
7
7
  */
8
- export interface EditOptions {
8
+ export interface EditOptions<TData = any> {
9
9
  /**
10
10
  * Function to validate Adaptable data edits on Server
11
11
  */
12
- validateOnServer?: (cellDataChangedInfo: CellDataChangedInfo) => Promise<ValidationResult>;
12
+ validateOnServer?: (cellDataChangedInfo: CellDataChangedInfo<TData>) => Promise<ValidationResult>;
13
13
  /**
14
14
  * Whether to display message after Server Validation runs
15
15
  *
@@ -20,11 +20,11 @@ export interface EditOptions {
20
20
  /**
21
21
  * Function which checks if a given Grid Cell is editable
22
22
  */
23
- isCellEditable?: (gridCell: GridCell) => boolean;
23
+ isCellEditable?: (gridCell: GridCell<TData>) => boolean;
24
24
  /**
25
25
  * Custom Operations to use in Smart Edit
26
26
  */
27
- smartEditCustomOperations?: SmartEditCustomOperation[];
27
+ smartEditCustomOperations?: SmartEditCustomOperation<TData>[];
28
28
  }
29
29
  /**
30
30
  * Used for Server Validation ie. after an edit has been made in Adaptable which should be checked on the Server
@@ -42,7 +42,7 @@ export interface ValidationResult {
42
42
  /**
43
43
  * Custom Operation used in Smart Edit Module
44
44
  */
45
- export declare type SmartEditCustomOperation = {
45
+ export declare type SmartEditCustomOperation<TData = any> = {
46
46
  /**
47
47
  * Name of the Custom Operation (as appears in AdapTable UI)
48
48
  */
@@ -50,7 +50,7 @@ export declare type SmartEditCustomOperation = {
50
50
  /**
51
51
  * Custom Operation function - returns a number
52
52
  */
53
- operation: (context: SmartEditOperationContext) => number;
53
+ operation: (context: SmartEditOperationContext<TData>) => number;
54
54
  };
55
55
  /**
56
56
  * Operation used by Smart Edit - either System or Custom
@@ -59,7 +59,7 @@ export declare type SmartEditOperation = SmartEditCustomOperation | MathOperatio
59
59
  /**
60
60
  * Context used in Custom Smart Edit Operations
61
61
  */
62
- export interface SmartEditOperationContext extends BaseContext {
62
+ export interface SmartEditOperationContext<TData = any> extends BaseContext {
63
63
  /**
64
64
  * Smart Edit value
65
65
  */
@@ -67,5 +67,5 @@ export interface SmartEditOperationContext extends BaseContext {
67
67
  /**
68
68
  * Current selected grid cell - contains column, row and cell value information
69
69
  */
70
- currentCell: GridCell;
70
+ currentCell: GridCell<TData>;
71
71
  }
@@ -1,6 +1,6 @@
1
1
  import { AdaptableForm } from '../PredefinedConfig/Common/AdaptableForm';
2
2
  import { FormContext } from '../PredefinedConfig/Common/FormContext';
3
- import { ReportData, Report, SystemReportNames } from '../PredefinedConfig/ExportState';
3
+ import { Report, ReportData, SystemReportNames } from '../PredefinedConfig/ExportState';
4
4
  import { AdaptableColumnBase, BaseContext } from '../types';
5
5
  /**
6
6
  * Options regarding Exporting data from AdapTable
@@ -4,7 +4,7 @@ import { ScalarFunctionName } from '../Utilities/ExpressionFunctions/scalarExpre
4
4
  import { ObservableFunctionName } from '../Utilities/ExpressionFunctions/observableExpressionFunctions';
5
5
  import { AggregatedBooleanFunctionName } from '../Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions';
6
6
  import { AggregatedScalarFunctionName } from '../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
7
- import { AdaptableModule, BaseContext, AdaptableColumnBase } from '../types';
7
+ import { AdaptableColumnBase, AdaptableModule, BaseContext } from '../types';
8
8
  /**
9
9
  * Options for managing Expressions using AdapTableQL
10
10
  */
@@ -5,19 +5,19 @@ import { StrictExtract } from '../Utilities/Extensions/TypeExtensions';
5
5
  /**
6
6
  * Options for managing Filtering in AdapTable
7
7
  */
8
- export interface FilterOptions {
8
+ export interface FilterOptions<TData = any> {
9
9
  /**
10
10
  * Hides the Dropdown in Quick Filter Bar for a given Column
11
11
  *
12
12
  * @defaultValue undefined
13
13
  */
14
- hideQuickFilterDropdown?: (column: AdaptableColumn) => boolean;
14
+ hideQuickFilterDropdown?: (column: AdaptableColumn<TData>) => boolean;
15
15
  /**
16
16
  * Hides the Input in Quick Filter Bar for a given Column
17
17
  *
18
18
  * @defaultValue undefined
19
19
  */
20
- hideQuickFilterInput?: (column: AdaptableColumn) => boolean;
20
+ hideQuickFilterInput?: (column: AdaptableColumn<TData>) => boolean;
21
21
  /**
22
22
  * Distinct column items to display in Filter Form; useful with large datasource (though AdapTable offers virtualisation)
23
23
  *