@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
@@ -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
  *
@@ -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
  *
@@ -5,11 +5,11 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
5
5
  import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
6
6
  import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
7
7
  import { BaseContext, GridCell } from '../../types';
8
- import { RowNode } from '@ag-grid-community/core';
8
+ 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
  /**
@@ -228,5 +228,5 @@ export interface CustomDisplayFormatterContext extends BaseContext {
228
228
  /**
229
229
  * Node where Custom Display Format will apply
230
230
  */
231
- rowNode: RowNode;
231
+ rowNode: IRowNode;
232
232
  }
@@ -46,51 +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
+ */
73
+ setChartReadOnly(chartDefinition: ChartDefinition): void;
74
+ /**
75
+ * Make a Chart Editable (i.e. not Read-Only)
76
+ * @param chartDefinition Chart to make Editable
72
77
  */
73
- setMakeReadOnly(chartDefinition: ChartDefinition): void;
78
+ setChartEditable(chartDefinition: ChartDefinition): void;
74
79
  /**
75
- * Add new Chart Definition
76
- * @param chartDefinition Chart Definition to add
80
+ * Add new Chart
81
+ * @param chartDefinition Chart to add
77
82
  */
78
83
  addChartDefinition(chartDefinition: ChartDefinition): void;
79
84
  /**
80
- * TO BE REMOVED
85
+ * Get info about all saved charts, incl. their open state
81
86
  */
87
+ getChartingOpenState(): ChartingOpenState;
82
88
  /**
83
- * @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
84
91
  */
85
- getAllChartDefinitions(): ChartDefinition[];
92
+ getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
86
93
  /**
87
- * Returns information about all saved charts, including their open state.
94
+ * TO BE REMOVED
88
95
  */
89
- getChartingOpenState(): ChartingOpenState;
90
96
  /**
91
- * Retrieves the name of the container in which the chart is open.
92
- * Return null if the chart is not open.
93
- * @param chartDefinition
97
+ * @deprecated use `getChartDefinitions()` instead
94
98
  */
95
- getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
99
+ getAllChartDefinitions(): ChartDefinition[];
96
100
  }
@@ -1,4 +1,4 @@
1
- import { Column, RowNode } from '@ag-grid-community/core';
1
+ import { Column, IRowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableColumn, AdaptableColumnDataType, GridCell } from '../../types';
3
3
  /**
4
4
  * Provides run-time access to Adaptable Column related features
@@ -334,11 +334,11 @@ export interface ColumnApi {
334
334
  /**
335
335
  * @deprecated internal method, will be removed in next major release
336
336
  */
337
- getDistinctRawValuesForColumn(columnId: string, skipRowNode?: RowNode): any[];
337
+ getDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
338
338
  /**
339
339
  * @deprecated internal method, will be removed in next major release
340
340
  */
341
- getUnsortedDistinctRawValuesForColumn(columnId: string, skipRowNode?: RowNode): any[];
341
+ getUnsortedDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
342
342
  /**
343
343
  * @deprecated internal method, will be removed in next major release
344
344
  */
@@ -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
  }
@@ -1,10 +1,10 @@
1
1
  import { BaseEventInfo } from './BaseEventInfo';
2
2
  import { AdaptableFormData } from '../../PredefinedConfig/Common/AdaptableForm';
3
- import { RowNode } from '@ag-grid-community/core';
3
+ 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?: RowNode;
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: RowNode;
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: RowNode;
57
+ rowNode: IRowNode<TData>;
58
58
  }
@@ -1,9 +1,9 @@
1
- import { RowNode } from '@ag-grid-community/core';
1
+ import { IRowNode } from '@ag-grid-community/core';
2
2
  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: RowNode[];
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
+ }
@@ -1,7 +1,7 @@
1
1
  import { AdaptableColumn, ColumnFilter, GridCell } from '../types';
2
2
  import * as Redux from 'redux';
3
3
  import { AdaptablePredicateDef, ColumnFilterDef } from '../PredefinedConfig/Common/AdaptablePredicate';
4
- import { RowNode } from '@ag-grid-community/core';
4
+ import { IRowNode } from '@ag-grid-community/core';
5
5
  import { LayoutColumnFilterAction } from '../Redux/ActionsReducers/LayoutRedux';
6
6
  /**
7
7
  * Provides run-time access to Filter section of Adaptable State.
@@ -164,7 +164,7 @@ export interface FilterApi {
164
164
  /**
165
165
  * @deprecated internal method, will be removed in next major release
166
166
  */
167
- evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
167
+ evaluateColumnFilter(columnFilter: ColumnFilter, node: IRowNode): boolean;
168
168
  /**
169
169
  * @deprecated internal method, will be removed in next major release
170
170
  */