@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
@@ -7,7 +7,7 @@ import { KeyCreatorParams } from '@ag-grid-community/core';
7
7
  /**
8
8
  * General options for configuring AdapTable including managing Primary Keys
9
9
  */
10
- export interface GeneralOptions {
10
+ export interface GeneralOptions<TData = any> {
11
11
  /**
12
12
  * Shows Alert if Primary Key column in Adaptable Options is not present or incorrect
13
13
  *
@@ -45,11 +45,11 @@ export interface GeneralOptions {
45
45
  /**
46
46
  * Custom Cell Summary Operations to add to shipped set
47
47
  */
48
- cellSummaryOperations?: CellSummaryOperation[];
48
+ cellSummaryOperations?: CellSummaryOperation<TData>[];
49
49
  /**
50
50
  * CustomSort column comparer functions
51
51
  */
52
- customSortComparers?: ColumnValuesComparer[];
52
+ customSortComparers?: ColumnValuesComparer<TData>[];
53
53
  /**
54
54
  * Collection of Data Sets to provide Data to AdapTable
55
55
  */
@@ -57,7 +57,7 @@ export interface GeneralOptions {
57
57
  /**
58
58
  * Value to use for 'Unbalanced Groups' (string columns)
59
59
  */
60
- unbalancedGroupsKey?: string | ((context: UnbalancedGroupsKeyContext) => string);
60
+ unbalancedGroupsKey?: string | ((context: UnbalancedGroupsKeyContext<TData>) => string);
61
61
  /**
62
62
  * Places ungrouped columns at pre-grouping indexed position
63
63
  * @defaultValue false
@@ -74,7 +74,7 @@ export interface GeneralOptions {
74
74
  /**
75
75
  * Comparer object for Column Values - used for custom sorting
76
76
  */
77
- export interface ColumnValuesComparer {
77
+ export interface ColumnValuesComparer<TData = any> {
78
78
  /**
79
79
  * Column for which to compare values
80
80
  */
@@ -82,7 +82,7 @@ export interface ColumnValuesComparer {
82
82
  /**
83
83
  * Comparer function to use
84
84
  */
85
- comparer: AdaptableComparerFunction;
85
+ comparer: AdaptableComparerFunction<TData>;
86
86
  }
87
87
  /**
88
88
  * Defines a Data Set object that can provide data to AdapTable
@@ -113,15 +113,15 @@ export interface DataSetFormContext extends FormContext {
113
113
  /**
114
114
  * Context used when setting a value for Unbalanced Row Groups
115
115
  */
116
- export interface UnbalancedGroupsKeyContext extends BaseContext {
116
+ export interface UnbalancedGroupsKeyContext<TData = any> extends BaseContext {
117
117
  /**
118
118
  * Adaptable Column being grouped
119
119
  */
120
- adaptableColumn: AdaptableColumn;
120
+ adaptableColumn: AdaptableColumn<TData>;
121
121
  /**
122
122
  * AG Grid's Key Creator Params
123
123
  */
124
- params: KeyCreatorParams;
124
+ params: KeyCreatorParams<TData>;
125
125
  }
126
126
  /**
127
127
  * Holidays - can be list or function (latter takes preference)
@@ -2,21 +2,21 @@ import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext, UserMenuItem
2
2
  /**
3
3
  * Options for managing menus in AdapTable
4
4
  */
5
- export interface MenuOptions {
5
+ export interface MenuOptions<TData = any> {
6
6
  /**
7
7
  * Show Adaptable Context Menu (or specific items); can be boolean value or function invoked for each menu item
8
8
  *
9
9
  * @defaultValue true
10
10
  * @gridInfoItem
11
11
  */
12
- showAdaptableContextMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ContextMenuContext) => boolean);
12
+ showAdaptableContextMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ContextMenuContext<TData>) => boolean);
13
13
  /**
14
14
  * Show Adaptable Column Menu (or specific items); can be boolean value or function invoked for each menu item
15
15
  *
16
16
  * @defaultValue true
17
17
  * @gridInfoItem
18
18
  */
19
- showAdaptableColumnMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ColumnMenuContext) => boolean);
19
+ showAdaptableColumnMenu?: boolean | ((menuItem: AdaptableMenuItem, menuContext: ColumnMenuContext<TData>) => boolean);
20
20
  /**
21
21
  * Adds 'Ungroup' Column Menu item to a row grouped column
22
22
  *
@@ -1,4 +1,4 @@
1
- import { AdaptablePredicateDef, BaseContext, SystemAlertPredicateIds, SystemFilterPredicateIds, SystemFormatColumnPredicateIds, SystemFlashingCellPredicateIds, PredicateModuleScope } from '../types';
1
+ import { AdaptablePredicateDef, BaseContext, PredicateModuleScope, SystemAlertPredicateIds, SystemFilterPredicateIds, SystemFlashingCellPredicateIds, SystemFormatColumnPredicateIds } from '../types';
2
2
  /**
3
3
  * Options for managing Adaptable Predicates using AdaptableQL
4
4
  */
@@ -2,13 +2,13 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
2
2
  /**
3
3
  * Search options section of Adaptable Options; includes options for running some (or all) search functions on the server
4
4
  */
5
- export interface SearchOptions {
5
+ export interface SearchOptions<TData = any> {
6
6
  /**
7
7
  * Function enabling specific Columns to be excluded from Quick Search
8
8
  *
9
9
  * @defaultValue undefined
10
10
  */
11
- excludeColumnFromQuickSearch?: (column: AdaptableColumn) => boolean;
11
+ excludeColumnFromQuickSearch?: (column: AdaptableColumn<TData>) => boolean;
12
12
  /**
13
13
  * Value to use as placeholder in QuickSearch controls (e.g. in Dashboard)
14
14
  *
@@ -9,7 +9,7 @@ import { IRowNode } from '@ag-grid-community/core';
9
9
  /**
10
10
  * Options for managing the User Interface of AdapTable
11
11
  */
12
- export interface UserInterfaceOptions {
12
+ export interface UserInterfaceOptions<TData = any> {
13
13
  /**
14
14
  * Show Mac-like scrollbars; size is configurable via CSS variable `--ab-custom-scrollbar-size` (default: `10px`)
15
15
  *
@@ -30,23 +30,23 @@ export interface UserInterfaceOptions {
30
30
  /**
31
31
  * List of values which are permitted (e.g. to show in filter)
32
32
  */
33
- permittedValues?: PermittedValues[];
33
+ permittedValues?: PermittedValues<TData>[];
34
34
  /**
35
35
  * Dropdown values displayed when column is being edited; when not defined defaults to permittedValues
36
36
  */
37
- editLookUpItems?: EditLookUpPermittedValues[];
37
+ editLookUpItems?: EditLookUpPermittedValues<TData>[];
38
38
  /**
39
39
  * Custom column values for 'IN' filter; when not defined defaults to permittedValues
40
40
  */
41
- filterPermittedValues?: FilterPermittedValues[];
41
+ filterPermittedValues?: FilterPermittedValues<TData>[];
42
42
  /**
43
43
  * Custom column values for defining Custom Sort; when not defined defaults to permittedValues
44
44
  */
45
- customSortPermittedValues?: CustomSortPermittedValues[];
45
+ customSortPermittedValues?: CustomSortPermittedValues<TData>[];
46
46
  /**
47
47
  * Custom column values for editing via bulk-update; when not defined defaults to permittedValues
48
48
  */
49
- bulkUpdatePermittedValues?: BulkUpdatePermittedValues[];
49
+ bulkUpdatePermittedValues?: BulkUpdatePermittedValues<TData>[];
50
50
  /**
51
51
  * Colours to display in Colour Picker (in place of AdapTable's default set); can be hardcoded list or function
52
52
  */
@@ -102,25 +102,25 @@ export interface BasePermittedValues {
102
102
  /**
103
103
  * Permitted/possible values, when column values can be selected (e.g. sort, bulk-update)
104
104
  */
105
- export interface PermittedValues extends BasePermittedValues {
105
+ export interface PermittedValues<TData = any> extends BasePermittedValues {
106
106
  /**
107
107
  * Values to display: either hardcoded list or a function that returns a list
108
108
  */
109
- values?: any[] | ((context: PermittedValuesContext) => any[]);
109
+ values?: any[] | ((context: PermittedValuesContext<TData>) => any[]);
110
110
  }
111
111
  /**
112
112
  * Used to define permitted values for inline column editor
113
113
  */
114
- export interface EditLookUpPermittedValues extends BasePermittedValues {
114
+ export interface EditLookUpPermittedValues<TData = any> extends BasePermittedValues {
115
115
  /**
116
116
  * Values to display in Edit Look Up: either hardcoded list or a function that returns a list
117
117
  */
118
- values?: any[] | ((context: EditLookUpContext) => any[]);
118
+ values?: any[] | ((context: EditLookUpContext<TData>) => any[]);
119
119
  }
120
120
  /**
121
121
  * Used to define values inside the floating filter and floating filter (quick filter)
122
122
  */
123
- export interface FilterPermittedValues extends BasePermittedValues {
123
+ export interface FilterPermittedValues<TData = any> extends BasePermittedValues {
124
124
  /**
125
125
  * Prevents AdapTable from filtering the list of values client-side; When true, values is called each time the search bar is changed
126
126
  * @defaultValue false
@@ -129,48 +129,48 @@ export interface FilterPermittedValues extends BasePermittedValues {
129
129
  /**
130
130
  * Values to display in 'IN' Filter: either hardcoded list or a function that returns a list
131
131
  */
132
- values: (context: FilterPermittedValuesContext) => any[] | Promise<any[]>;
132
+ values: (context: FilterPermittedValuesContext<TData>) => any[] | Promise<any[]>;
133
133
  }
134
134
  /**
135
135
  * Custom column values for Custom Sort
136
136
  */
137
- export interface CustomSortPermittedValues extends BasePermittedValues {
137
+ export interface CustomSortPermittedValues<TData = any> extends BasePermittedValues {
138
138
  /**
139
139
  * Values to display in Custom Sort Wizard: either hardcoded list or a function that returns a list
140
140
  */
141
- values: (context: PermittedValuesContext) => any[] | Promise<any[]>;
141
+ values: (context: PermittedValuesContext<TData>) => any[] | Promise<any[]>;
142
142
  }
143
143
  /**
144
144
  * User to define permitted values when updating cells via bulk update
145
145
  */
146
- export interface BulkUpdatePermittedValues extends BasePermittedValues {
146
+ export interface BulkUpdatePermittedValues<TData = any> extends BasePermittedValues {
147
147
  /**
148
148
  * Values to display in Bulk Update Wizard: either hardcoded list or a function that returns a list
149
149
  */
150
- values: (context: BulkUpdatePermittedValuesContext) => any[] | Promise<any[]>;
150
+ values: (context: BulkUpdatePermittedValuesContext<TData>) => any[] | Promise<any[]>;
151
151
  }
152
152
  /**
153
153
  * Context used when getting PermittedValues via a function
154
154
  */
155
- export interface PermittedValuesContext extends BaseContext {
155
+ export interface PermittedValuesContext<TData = any> extends BaseContext {
156
156
  /**
157
157
  * Column whose values are being displayed
158
158
  */
159
- column: AdaptableColumn;
159
+ column: AdaptableColumn<TData>;
160
160
  }
161
161
  /**
162
162
  * Context used when getting EditLookUpPermittedValues via a function
163
163
  */
164
- export interface EditLookUpContext extends PermittedValuesContext {
164
+ export interface EditLookUpContext<TData = any> extends PermittedValuesContext {
165
165
  /**
166
166
  * Cell being edited
167
167
  */
168
- gridCell?: GridCell;
168
+ gridCell?: GridCell<TData>;
169
169
  }
170
170
  /**
171
171
  * Context used when getting FilterPermittedValues via a function
172
172
  */
173
- export interface FilterPermittedValuesContext extends PermittedValuesContext {
173
+ export interface FilterPermittedValuesContext<TData = any> extends PermittedValuesContext<TData> {
174
174
  /**
175
175
  * A search string
176
176
  */
@@ -179,11 +179,11 @@ export interface FilterPermittedValuesContext extends PermittedValuesContext {
179
179
  /**
180
180
  * Context used when getting BulkUpdatePermittedValues via a function
181
181
  */
182
- export interface BulkUpdatePermittedValuesContext extends PermittedValuesContext {
182
+ export interface BulkUpdatePermittedValuesContext<TData = any> extends PermittedValuesContext<TData> {
183
183
  /**
184
184
  * Cells which will be modified in the Bulk Update
185
185
  */
186
- gridCells: GridCell[];
186
+ gridCells: GridCell<TData>[];
187
187
  }
188
188
  export declare type GridInfoSections = GridInfoSection[];
189
189
  /**
@@ -46,56 +46,55 @@ export interface ChartingApi {
46
46
  /**
47
47
  * Opens a Chart Definition
48
48
  *
49
- * @param chartDefinition chart definition
49
+ * @param chartDefinition Chart Definition
50
50
  * @param container container element or container name
51
51
  */
52
52
  showChartDefinition(chartDefinition: ChartDefinition, container?: HTMLElement | string): ChartRef;
53
53
  /**
54
- * Close chart definition
54
+ * Close Chart definition
55
55
  * @param chartDefinition Chart Definition
56
56
  */
57
57
  closeChartDefinition(chartDefinition: ChartDefinition): void;
58
58
  /**
59
59
  * Displays a Chart; if Chart is already open, 2nd Chart is not opened
60
- * @param chartDefinition Chart Definition to show
60
+ * @param chartDefinition Chart to show
61
61
  * @param container Container in which to display the Chart
62
62
  */
63
63
  showChartDefinitionOnce(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
64
64
  /**
65
65
  * Edit existing Chart
66
- * @param chartDefinition Chart Definition to edit
66
+ * @param chartDefinition Chart to edit
67
67
  */
68
68
  editChartDefinition(chartDefinition: ChartDefinition): void;
69
69
  /**
70
- * Marks chart as readonly
71
- * @param chartDefinition charting definition
70
+ * Make a Chart Read-Only
71
+ * @param chartDefinition Chart to make Read-Only
72
72
  */
73
73
  setChartReadOnly(chartDefinition: ChartDefinition): void;
74
74
  /**
75
- * Marks chart as editable (NOT readonly)
76
- * @param chartDefinition charting definition
75
+ * Make a Chart Editable (i.e. not Read-Only)
76
+ * @param chartDefinition Chart to make Editable
77
77
  */
78
78
  setChartEditable(chartDefinition: ChartDefinition): void;
79
79
  /**
80
- * Add new Chart Definition
81
- * @param chartDefinition Chart Definition to add
80
+ * Add new Chart
81
+ * @param chartDefinition Chart to add
82
82
  */
83
83
  addChartDefinition(chartDefinition: ChartDefinition): void;
84
84
  /**
85
- * TO BE REMOVED
85
+ * Get info about all saved charts, incl. their open state
86
86
  */
87
+ getChartingOpenState(): ChartingOpenState;
87
88
  /**
88
- * @deprecated use `getChartDefinitions()` instead
89
+ * Retrieve name of container in which Chart is open; returns null if Chart is not open
90
+ * @param chartDefinition Chart to add
89
91
  */
90
- getAllChartDefinitions(): ChartDefinition[];
92
+ getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
91
93
  /**
92
- * Returns information about all saved charts, including their open state.
94
+ * TO BE REMOVED
93
95
  */
94
- getChartingOpenState(): ChartingOpenState;
95
96
  /**
96
- * Retrieves the name of the container in which the chart is open.
97
- * Return null if the chart is not open.
98
- * @param chartDefinition
97
+ * @deprecated use `getChartDefinitions()` instead
99
98
  */
100
- getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
99
+ getAllChartDefinitions(): ChartDefinition[];
101
100
  }
@@ -1,5 +1,6 @@
1
1
  import { AdaptableFDC3EventInfo, SelectionChangedInfo, LiveDataChangedInfo, DashboardChangedInfo, ThemeChangedInfo, AlertFiredInfo, LayoutChangedInfo, SearchChangedInfo, AdaptableReadyInfo, CustomToolbarConfiguredInfo, CellChangedInfo, SystemStatusMessageDisplayedInfo, CheckboxColumnClickedInfo, AdaptableStateChangedInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, TeamSharingEntityChangedInfo, ActionRowSubmittedInfo, DataSetSelectedInfo, AdaptableStateReloadedInfo, GridSortedInfo, QueryRunInfo, FilterAppliedInfo } from '../types';
2
2
  import { ChartChangedInfo } from './Events/ChartChanged';
3
+ import { ThemeEditedInfo } from './Events/ThemeChanged';
3
4
  /**
4
5
  * Responsible for publishing the many Events that AdapTable fires
5
6
  */
@@ -104,6 +105,17 @@ export interface EventApi {
104
105
  * Unsubscribe from ThemeChanged
105
106
  */
106
107
  off(eventName: 'ThemeChanged', callback: (themeChangedInfo: ThemeChangedInfo) => void): void;
108
+ /**
109
+ * Event fired whenever the a theme has been edited
110
+ * @param eventName ThemeEdited
111
+ * @param callback ThemeChangedInfo which just contains the name of the current Theme
112
+ * @returns the unsubscribe function
113
+ */
114
+ on(eventName: 'ThemeEdited', callback: (themeEditedInfo: ThemeEditedInfo) => void): VoidFunction;
115
+ /**
116
+ * Unsubscribe from ThemeEdited
117
+ */
118
+ off(eventName: 'ThemeEdited', callback: (themeEditedInfo: ThemeEditedInfo) => void): void;
107
119
  /**
108
120
  * Event fired whenever a **System Status Message is displayed** in AdapTable
109
121
  * @param eventName SystemStatusMessageDisplayed
@@ -306,6 +318,6 @@ export interface EventApi {
306
318
  emitSync(eventName: 'DashboardChanged', data?: any): any[];
307
319
  emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
308
320
  emitSync(eventName: 'AdaptableDestroy'): any[];
309
- emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FDC3MessageSent' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged', data?: any): Promise<any>;
321
+ emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FDC3MessageSent' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited', data?: any): Promise<any>;
310
322
  destroy(): void;
311
323
  }
@@ -4,7 +4,7 @@ import { IRowNode } from '@ag-grid-community/core';
4
4
  /**
5
5
  * Info passed into ActionRowSubmitted Event - can be `CreatedActionRowInfo` or `EditedActionRowInfo` or `DeletedActionRowInfo`
6
6
  */
7
- export declare type ActionRowSubmittedInfo = CreatedActionRowInfo | EditedActionRowInfo | DeletedActionRowInfo;
7
+ export declare type ActionRowSubmittedInfo<TData = any> = CreatedActionRowInfo<TData> | EditedActionRowInfo<TData> | DeletedActionRowInfo<TData>;
8
8
  /**
9
9
  * Type of Action Row - Created, Edited or Deleted
10
10
  */
@@ -12,7 +12,7 @@ export declare type ActionRowType = 'rowCreated' | 'rowEdited' | 'rowDeleted';
12
12
  /**
13
13
  * Info passed into ActionRowSubmitted Event for Created Rows
14
14
  */
15
- export interface CreatedActionRowInfo extends BaseEventInfo {
15
+ export interface CreatedActionRowInfo<TData = any> extends BaseEventInfo {
16
16
  /**
17
17
  * Specifies its a Created Action Row
18
18
  */
@@ -24,12 +24,12 @@ export interface CreatedActionRowInfo extends BaseEventInfo {
24
24
  /**
25
25
  * Node being cloned
26
26
  */
27
- clonedRowNode?: IRowNode;
27
+ clonedRowNode?: IRowNode<TData>;
28
28
  }
29
29
  /**
30
30
  * Info passed into ActionRowSubmitted Event for Edited Rows
31
31
  */
32
- export interface EditedActionRowInfo extends BaseEventInfo {
32
+ export interface EditedActionRowInfo<TData = any> extends BaseEventInfo {
33
33
  /**
34
34
  * Specifies its an Edited Action Row
35
35
  */
@@ -41,12 +41,12 @@ export interface EditedActionRowInfo extends BaseEventInfo {
41
41
  /**
42
42
  * Node being edited
43
43
  */
44
- rowNode: IRowNode;
44
+ rowNode: IRowNode<TData>;
45
45
  }
46
46
  /**
47
47
  * Info passed into ActionRowSubmitted Event for Deleted Rows
48
48
  */
49
- export interface DeletedActionRowInfo extends BaseEventInfo {
49
+ export interface DeletedActionRowInfo<TData = any> extends BaseEventInfo {
50
50
  /**
51
51
  * Specifies its a Deleted Action Row
52
52
  */
@@ -54,5 +54,5 @@ export interface DeletedActionRowInfo extends BaseEventInfo {
54
54
  /**
55
55
  * Node being deleted
56
56
  */
57
- rowNode: IRowNode;
57
+ rowNode: IRowNode<TData>;
58
58
  }
@@ -3,7 +3,7 @@ import { BaseEventInfo } from './BaseEventInfo';
3
3
  /**
4
4
  * EventInfo returned by GridDataChanged event
5
5
  */
6
- export interface GridDataChangedInfo extends BaseEventInfo {
6
+ export interface GridDataChangedInfo<TData = any> extends BaseEventInfo {
7
7
  /**
8
8
  * Timestamp of change occurrence (in milliseconds)
9
9
  */
@@ -11,7 +11,7 @@ export interface GridDataChangedInfo extends BaseEventInfo {
11
11
  /**
12
12
  * Data rows that have been added, updated, or deleted
13
13
  */
14
- dataRows: any[];
14
+ dataRows: TData[];
15
15
  /**
16
16
  * Trigger for row change: 'Add', 'Edit' or 'Delete'
17
17
  */
@@ -19,5 +19,5 @@ export interface GridDataChangedInfo extends BaseEventInfo {
19
19
  /**
20
20
  * Row Nodes that were affected by this change
21
21
  */
22
- rowNodes: IRowNode[];
22
+ rowNodes: IRowNode<TData>[];
23
23
  }
@@ -9,3 +9,9 @@ export interface ThemeChangedInfo extends BaseEventInfo {
9
9
  */
10
10
  theme: AdaptableTheme | string;
11
11
  }
12
+ export interface ThemeEditedInfo extends BaseEventInfo {
13
+ /**
14
+ * The has been edited
15
+ */
16
+ theme: AdaptableTheme;
17
+ }
@@ -200,11 +200,11 @@ export interface GridApi {
200
200
  /**
201
201
  * Retrieves the first Row Node in AdapTable
202
202
  */
203
- getFirstRowNode(): IRowNode;
203
+ getFirstRowNode(): IRowNode | undefined;
204
204
  /**
205
205
  * Retrieves the first Displayed Row Node in AdapTable
206
206
  */
207
- getFirstDisplayedRowNode(): IRowNode;
207
+ getFirstDisplayedRowNode(): IRowNode | undefined;
208
208
  /**
209
209
  * Retrieves all filtered Row Nodes currently in the Grid (i.e. after applying the current filter)
210
210
  */
@@ -414,12 +414,12 @@ export interface GridApi {
414
414
  refreshRowByPrimaryKey(primaryKey: any): void;
415
415
  /**
416
416
  * Forces a re-render of the given row
417
- * @param rowNode ag-grid row
417
+ * @param rowNode AG Grid Row
418
418
  */
419
419
  refreshRowNode(rowNode: IRowNode): void;
420
420
  /**
421
421
  * Forces a re-render of the given rows
422
- * @param rowNodes ag-grid rows
422
+ * @param rowNodes AG Grid rows
423
423
  */
424
424
  refreshRowNodes(rowNodes: IRowNode[]): void;
425
425
  /**
@@ -85,7 +85,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
85
85
  getDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
86
86
  getUnsortedDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
87
87
  getDistinctVisibleRawValuesForColumn(columnId: string): any[];
88
- getPrimaryKeyColumn(): AdaptableColumn;
88
+ getPrimaryKeyColumn(): AdaptableColumn<any>;
89
89
  getAllColumnFriendlyNames(): string[];
90
90
  usesAdaptableFilterForm(columnId: string): boolean;
91
91
  usesAdaptableQuickFilter(columnId: string): boolean;
@@ -7,6 +7,7 @@ export declare class ThemeApiImpl extends ApiBase implements ThemeApi {
7
7
  loadLightTheme(): void;
8
8
  loadDarkTheme(): void;
9
9
  getCurrentTheme(): string;
10
+ getCurrentThemeObject(): AdaptableTheme;
10
11
  setSystemThemes(systemThemes: AdaptableTheme[]): void;
11
12
  setUserThemes(userThemes: AdaptableTheme[]): void;
12
13
  getAllSystemTheme(): AdaptableTheme[];
@@ -19,4 +20,7 @@ export declare class ThemeApiImpl extends ApiBase implements ThemeApi {
19
20
  showThemePopup(): void;
20
21
  openThemeSettingsPanel(): void;
21
22
  getAgGridCurrentThemeName(): string;
23
+ editTheme(theme: AdaptableTheme): void;
24
+ addUserTheme(theme: AdaptableTheme): void;
25
+ deleteUserTheme(theme: AdaptableTheme): void;
22
26
  }
@@ -23,6 +23,10 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
23
23
  getCurrentTheme() {
24
24
  return this.getAdaptableState().Theme.CurrentTheme;
25
25
  }
26
+ getCurrentThemeObject() {
27
+ const currentTheme = this.getCurrentTheme();
28
+ return this.getThemes().find((themeObj) => themeObj.Name === currentTheme);
29
+ }
26
30
  setSystemThemes(systemThemes) {
27
31
  this.dispatchAction(ThemeRedux.ThemeSetSystemThemes(systemThemes));
28
32
  }
@@ -87,5 +91,15 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
87
91
  getAgGridCurrentThemeName() {
88
92
  return this.adaptable.getAgGridCurrentThemeName();
89
93
  }
94
+ editTheme(theme) {
95
+ this.dispatchAction(ThemeRedux.ThemeEdit(theme));
96
+ this.getEventApi().emit('ThemeEdited', theme);
97
+ }
98
+ addUserTheme(theme) {
99
+ this.dispatchAction(ThemeRedux.ThemeAdd(theme));
100
+ }
101
+ deleteUserTheme(theme) {
102
+ this.dispatchAction(ThemeRedux.ThemeDelete(theme));
103
+ }
90
104
  }
91
105
  exports.ThemeApiImpl = ThemeApiImpl;
@@ -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
  */