@adaptabletools/adaptable 13.0.6 → 13.0.8

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 (40) hide show
  1. package/bundle.cjs.js +188 -188
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +9 -205
  6. package/src/AdaptableOptions/ExpressionOptions.d.ts +204 -0
  7. package/src/AdaptableOptions/ExpressionOptions.js +2 -0
  8. package/src/AdaptableOptions/FilterOptions.d.ts +2 -1
  9. package/src/AdaptableOptions/PredicateOptions.d.ts +32 -0
  10. package/src/AdaptableOptions/PredicateOptions.js +2 -0
  11. package/src/Api/AlertApi.d.ts +20 -4
  12. package/src/Api/FilterApi.d.ts +1 -5
  13. package/src/Api/FlashingCellApi.d.ts +0 -4
  14. package/src/Api/FormatColumnApi.d.ts +0 -4
  15. package/src/Api/Implementation/AlertApiImpl.d.ts +4 -1
  16. package/src/Api/Implementation/AlertApiImpl.js +15 -4
  17. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  18. package/src/Api/Implementation/ColumnApiImpl.js +0 -1
  19. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -3
  20. package/src/Api/Implementation/FilterApiImpl.js +4 -12
  21. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +0 -1
  22. package/src/Api/Implementation/FlashingCellApiImpl.js +3 -4
  23. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +0 -1
  24. package/src/Api/Implementation/FormatColumnApiImpl.js +3 -4
  25. package/src/Api/Implementation/PredicateApiImpl.d.ts +10 -2
  26. package/src/Api/Implementation/PredicateApiImpl.js +83 -0
  27. package/src/Api/PredicateApi.d.ts +18 -2
  28. package/src/PredefinedConfig/AlertState.d.ts +8 -1
  29. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +5 -2
  30. package/src/PredefinedConfig/Common/AdaptablePredicate.js +4 -1
  31. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
  32. package/src/PredefinedConfig/FlashingCellState.d.ts +8 -1
  33. package/src/PredefinedConfig/FormatColumnState.d.ts +8 -1
  34. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +7 -1
  35. package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
  36. package/src/metamodel/adaptable.metamodel.d.ts +30 -0
  37. package/src/metamodel/adaptable.metamodel.js +1 -1
  38. package/src/types.d.ts +7 -5
  39. package/version.d.ts +1 -1
  40. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "13.0.6",
3
+ "version": "13.0.8",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1667290792339;
1
+ declare const _default: 1667373400182;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1667290792339;
3
+ exports.default = 1667373400182;
@@ -1,13 +1,9 @@
1
- import { ExpressionFunction } from '../parser/src/types';
2
1
  import { AdaptablePredicateDef } from '../PredefinedConfig/Common/AdaptablePredicate';
3
- import { AdaptableModule, AdaptableQLModule, AdaptableQLModules } from '../PredefinedConfig/Common/Types';
2
+ import { AdaptableQLModule, AdaptableQLModules } from '../PredefinedConfig/Common/Types';
4
3
  import { BaseContext } from '../PredefinedConfig/Common/BaseContext';
5
- import { AdaptableColumn, AdaptableColumnBase } from '../PredefinedConfig/Common/AdaptableColumn';
6
- import { BooleanFunctionName } from '../Utilities/ExpressionFunctions/booleanExpressionFunctions';
7
- import { ScalarFunctionName } from '../Utilities/ExpressionFunctions/scalarExpressionFunctions';
8
- import { ObservableFunctionName } from '../Utilities/ExpressionFunctions/observableExpressionFunctions';
9
- import { AggregatedBooleanFunctionName } from '../Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions';
10
- import { AggregatedScalarFunctionName } from '../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
4
+ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
5
+ import { ExpressionOptions } from './ExpressionOptions';
6
+ import { PredicateOptions } from './PredicateOptions';
11
7
  /**
12
8
  * Options for managing AdaptableQL - the Adaptable Query Language which evaluates Predicates and Expressions
13
9
  */
@@ -37,6 +33,11 @@ export interface AdaptableQLOptions {
37
33
  *
38
34
  */
39
35
  expressionOptions?: ExpressionOptions;
36
+ /**
37
+ * Options for managing Predicates in AdaptableQL
38
+ *
39
+ */
40
+ predicateOptions?: PredicateOptions;
40
41
  /**
41
42
  * Definitions for Custom provided Predicates
42
43
  */
@@ -48,194 +49,6 @@ export interface AdaptableQLOptions {
48
49
  */
49
50
  displayColumnFriendlyNamesForExpressions?: boolean;
50
51
  }
51
- /**
52
- * Options for managing Expressions using AdaptableQL
53
- */
54
- export interface ExpressionOptions {
55
- /**
56
- * System (built-in) Boolean Expression Functions available in AdaptableQL
57
- *
58
- * @defaultValue null (sets all)
59
- * @gridInfoItem
60
- */
61
- systemBooleanFunctions?: BooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => BooleanFunctionName[]);
62
- /**
63
- * Custom (user defined) Boolean Expression Functions available in AdaptableQL
64
- *
65
- * @defaultValue null (none)
66
- * @gridInfoItem
67
- */
68
- customBooleanFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => Record<string, ExpressionFunction>);
69
- /**
70
- * System (built-in) Scalar Expression Functions available in AdaptableQL
71
- *
72
- * @defaultValue null (sets all)
73
- * @gridInfoItem
74
- */
75
- systemScalarFunctions?: ScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => ScalarFunctionName[]);
76
- /**
77
- * Custom (user defined) Scalar Expression Functions available in AdaptableQL
78
- *
79
- * @defaultValue null (none)
80
- * @gridInfoItem
81
- */
82
- customScalarFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => Record<string, ExpressionFunction>);
83
- /**
84
- * System (built-in) Observable Expression Functions available in AdaptableQL
85
- *
86
- * @defaultValue null (sets all)
87
- * @gridInfoItem
88
- */
89
- systemObservableFunctions?: ObservableFunctionName[] | ((context: GlobalExpressionFunctionsContext<ObservableFunctionName>) => ObservableFunctionName[]);
90
- /**
91
- * System (built-in) AggregatedBoolean Expression Functions available in AdaptableQL
92
- *
93
- * @defaultValue null (sets all)
94
- * @gridInfoItem
95
- */
96
- systemAggregatedBooleanFunctions?: AggregatedBooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedBooleanFunctionName>) => AggregatedBooleanFunctionName[]);
97
- /**
98
- * System (built-in) AggregatedScalar Expression Functions available in AdaptableQL
99
- *
100
- * @defaultValue undefined (sets all)
101
- * @gridInfoItem
102
- */
103
- systemAggregatedScalarFunctions?: AggregatedScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedScalarFunctionName>) => AggregatedScalarFunctionName[]);
104
- /**
105
- * Module specific ExpressionFunctions; if not defined, it falls back to the generally defined system and custom values
106
- *
107
- * @defaultValue undefined (defaults to available system & custom values)
108
- * @gridInfoItem
109
- */
110
- moduleExpressionFunctions?: ModuleExpressionFunctionsMap | ((context: ModuleExpressionFunctionsContext) => ModuleExpressionFunctions | undefined);
111
- /**
112
- * Specifies if a given column can be included in Queries
113
- */
114
- isColumnQueryable?: (queryableColumnContext: QueryableColumnContext) => boolean;
115
- /**
116
- * Validate Expressions before they can be run or saved
117
- *
118
- * @defaultValue true
119
- * @gridInfoItem
120
- */
121
- performExpressionValidation?: boolean;
122
- /**
123
- * Maximum time (in milliseconds) to hold a Data Change event in a trailing timeframe (see observableExpressionFunctions); value is capped at 86400000 (~24 hours) for performance reasons
124
- *
125
- * @defaultValue 28800000 (~8 hours)
126
- * @gridInfoItem
127
- */
128
- maxTimeframeSize?: number;
129
- /**
130
- * Custom query variables allow values to be attached to variables so that a single value can easily be expressed multiple times within a query, or quickly changed to affect the results of a query. Variables are evaluated synchronously with each expression evaluation.
131
- */
132
- customQueryVariables?: Record<string, string | number | boolean | Date | ((context: CustomQueryVariableContext) => string | number | boolean | Date)>;
133
- }
134
- /**
135
- * Module specific Expression Functions
136
- */
137
- export declare type ModuleExpressionFunctionsMap = Partial<Record<AdaptableModule, ModuleExpressionFunctions>>;
138
- /**
139
- * Type specific Expression Functions
140
- */
141
- export interface ModuleExpressionFunctions {
142
- /**
143
- * System (built-in) Boolean Expression Functions available in AdaptableQL
144
- *
145
- * @defaultValue null (sets all)
146
- * @gridInfoItem
147
- */
148
- systemBooleanFunctions?: BooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => BooleanFunctionName[]);
149
- /**
150
- * Custom (user defined) Boolean Expression Functions available in AdaptableQL
151
- *
152
- * @defaultValue null (none)
153
- * @gridInfoItem
154
- */
155
- customBooleanFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => Record<string, ExpressionFunction>);
156
- /**
157
- * System (built-in) Scalar Expression Functions available in AdaptableQL
158
- *
159
- * @defaultValue null (sets all)
160
- * @gridInfoItem
161
- */
162
- systemScalarFunctions?: ScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => ScalarFunctionName[]);
163
- /**
164
- * Custom (user defined) Scalar Expression Functions available in AdaptableQL
165
- *
166
- * @defaultValue null (none)
167
- * @gridInfoItem
168
- */
169
- customScalarFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => Record<string, ExpressionFunction>);
170
- /**
171
- * System (built-in) Observable Expression Functions available in AdaptableQL
172
- *
173
- * @defaultValue null (sets all)
174
- * @gridInfoItem
175
- */
176
- systemObservableFunctions?: ObservableFunctionName[] | ((context: GlobalExpressionFunctionsContext<ObservableFunctionName>) => ObservableFunctionName[]);
177
- /**
178
- * System (built-in) AggregatedBoolean Expression Functions available in AdaptableQL
179
- *
180
- * @defaultValue null (sets all)
181
- * @gridInfoItem
182
- */
183
- systemAggregatedBooleanFunctions?: AggregatedBooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedBooleanFunctionName>) => AggregatedBooleanFunctionName[]);
184
- /**
185
- * System (built-in) AggregatedScalar Expression Functions available in AdaptableQL
186
- *
187
- * @defaultValue null (sets all)
188
- * @gridInfoItem
189
- */
190
- systemAggregatedScalarFunctions?: AggregatedScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedScalarFunctionName>) => AggregatedScalarFunctionName[]);
191
- }
192
- /**
193
- * Context provided to global expression functions properties property callback
194
- */
195
- export interface GlobalExpressionFunctionsContext<T> extends BaseContext {
196
- /**
197
- * The names of all expression functions available in this context
198
- */
199
- availableExpressionFunctionNames: T[];
200
- }
201
- /**
202
- * Context provided to ExpressionOptions.moduleExpressionFunctions property callback
203
- */
204
- export interface ModuleExpressionFunctionsContext extends BaseContext {
205
- /**
206
- * The Adaptable Module requesting the expression functions
207
- */
208
- module: AdaptableModule;
209
- /**
210
- * The global boolean expression functions
211
- */
212
- availableBooleanFunctionNames: BooleanFunctionName[];
213
- /**
214
- * The global scalar expression functions
215
- */
216
- availableScalarFunctionNames: ScalarFunctionName[];
217
- /**
218
- * The global observable expression functions
219
- */
220
- availableObservableFunctionNames: ObservableFunctionName[];
221
- /**
222
- * The global aggregated boolean expression functions
223
- */
224
- availableAggregatedBooleanFunctionNames: AggregatedBooleanFunctionName[];
225
- /**
226
- * The global aggregated scalar expression functions
227
- */
228
- availableAggregatedScalarFunctionNames: AggregatedScalarFunctionName[];
229
- }
230
- /**
231
- * Context passed when evaluating `ExpressionOptions.customQueryVariables`
232
- */
233
- export interface CustomQueryVariableContext extends BaseContext {
234
- /**
235
- * Optional variable arguments
236
- */
237
- args?: any[];
238
- }
239
52
  /**
240
53
  * Context passed when evaluating `AdaptableQLOptions.evaluateExpressionExternally()`
241
54
  */
@@ -253,12 +66,3 @@ export interface EvaluateExpressionExternallyContext extends BaseContext {
253
66
  */
254
67
  referencedColumns?: AdaptableColumn[];
255
68
  }
256
- /**
257
- * Context passed when evaluating Queryable Columns
258
- */
259
- export interface QueryableColumnContext extends BaseContext {
260
- /**
261
- * Basic Column Info - just ColumnId, DataType and FriendlyName
262
- */
263
- adaptableColumn: AdaptableColumnBase;
264
- }
@@ -0,0 +1,204 @@
1
+ import { ExpressionFunction } from '../parser/src/types';
2
+ import { BooleanFunctionName } from '../Utilities/ExpressionFunctions/booleanExpressionFunctions';
3
+ import { ScalarFunctionName } from '../Utilities/ExpressionFunctions/scalarExpressionFunctions';
4
+ import { ObservableFunctionName } from '../Utilities/ExpressionFunctions/observableExpressionFunctions';
5
+ import { AggregatedBooleanFunctionName } from '../Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions';
6
+ import { AggregatedScalarFunctionName } from '../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
7
+ import { AdaptableModule, BaseContext, AdaptableColumnBase } from '../types';
8
+ /**
9
+ * Options for managing Expressions using AdaptableQL
10
+ */
11
+ export interface ExpressionOptions {
12
+ /**
13
+ * System (built-in) Boolean Expression Functions available in AdaptableQL
14
+ *
15
+ * @defaultValue null (sets all)
16
+ * @gridInfoItem
17
+ */
18
+ systemBooleanFunctions?: BooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => BooleanFunctionName[]);
19
+ /**
20
+ * Custom (user defined) Boolean Expression Functions available in AdaptableQL
21
+ *
22
+ * @defaultValue null (none)
23
+ * @gridInfoItem
24
+ */
25
+ customBooleanFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => Record<string, ExpressionFunction>);
26
+ /**
27
+ * System (built-in) Scalar Expression Functions available in AdaptableQL
28
+ *
29
+ * @defaultValue null (sets all)
30
+ * @gridInfoItem
31
+ */
32
+ systemScalarFunctions?: ScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => ScalarFunctionName[]);
33
+ /**
34
+ * Custom (user defined) Scalar Expression Functions available in AdaptableQL
35
+ *
36
+ * @defaultValue null (none)
37
+ * @gridInfoItem
38
+ */
39
+ customScalarFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => Record<string, ExpressionFunction>);
40
+ /**
41
+ * System (built-in) Observable Expression Functions available in AdaptableQL
42
+ *
43
+ * @defaultValue null (sets all)
44
+ * @gridInfoItem
45
+ */
46
+ systemObservableFunctions?: ObservableFunctionName[] | ((context: GlobalExpressionFunctionsContext<ObservableFunctionName>) => ObservableFunctionName[]);
47
+ /**
48
+ * System (built-in) AggregatedBoolean Expression Functions available in AdaptableQL
49
+ *
50
+ * @defaultValue null (sets all)
51
+ * @gridInfoItem
52
+ */
53
+ systemAggregatedBooleanFunctions?: AggregatedBooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedBooleanFunctionName>) => AggregatedBooleanFunctionName[]);
54
+ /**
55
+ * System (built-in) AggregatedScalar Expression Functions available in AdaptableQL
56
+ *
57
+ * @defaultValue undefined (sets all)
58
+ * @gridInfoItem
59
+ */
60
+ systemAggregatedScalarFunctions?: AggregatedScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedScalarFunctionName>) => AggregatedScalarFunctionName[]);
61
+ /**
62
+ * Module specific ExpressionFunctions; if not defined, it falls back to the generally defined system and custom values
63
+ *
64
+ * @defaultValue undefined (defaults to available system & custom values)
65
+ * @gridInfoItem
66
+ */
67
+ moduleExpressionFunctions?: ModuleExpressionFunctionsMap | ((context: ModuleExpressionFunctionsContext) => ModuleExpressionFunctions | undefined);
68
+ /**
69
+ * Specifies if a given column can be included in Queries
70
+ */
71
+ isColumnQueryable?: (queryableColumnContext: QueryableColumnContext) => boolean;
72
+ /**
73
+ * Validate Expressions before they can be run or saved
74
+ *
75
+ * @defaultValue true
76
+ * @gridInfoItem
77
+ */
78
+ performExpressionValidation?: boolean;
79
+ /**
80
+ * Maximum time (in milliseconds) to hold a Data Change event in a trailing timeframe (see observableExpressionFunctions); value is capped at 86400000 (~24 hours) for performance reasons
81
+ *
82
+ * @defaultValue 28800000 (~8 hours)
83
+ * @gridInfoItem
84
+ */
85
+ maxTimeframeSize?: number;
86
+ /**
87
+ * Custom query variables allow values to be attached to variables so that a single value can easily be expressed multiple times within a query, or quickly changed to affect the results of a query. Variables are evaluated synchronously with each expression evaluation.
88
+ */
89
+ customQueryVariables?: Record<string, string | number | boolean | Date | ((context: CustomQueryVariableContext) => string | number | boolean | Date)>;
90
+ }
91
+ /**
92
+ * Module specific Expression Functions
93
+ */
94
+ export declare type ModuleExpressionFunctionsMap = Partial<Record<AdaptableModule, ModuleExpressionFunctions>>;
95
+ /**
96
+ * Type specific Expression Functions
97
+ */
98
+ export interface ModuleExpressionFunctions {
99
+ /**
100
+ * System (built-in) Boolean Expression Functions available in AdaptableQL
101
+ *
102
+ * @defaultValue null (sets all)
103
+ * @gridInfoItem
104
+ */
105
+ systemBooleanFunctions?: BooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => BooleanFunctionName[]);
106
+ /**
107
+ * Custom (user defined) Boolean Expression Functions available in AdaptableQL
108
+ *
109
+ * @defaultValue null (none)
110
+ * @gridInfoItem
111
+ */
112
+ customBooleanFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<BooleanFunctionName>) => Record<string, ExpressionFunction>);
113
+ /**
114
+ * System (built-in) Scalar Expression Functions available in AdaptableQL
115
+ *
116
+ * @defaultValue null (sets all)
117
+ * @gridInfoItem
118
+ */
119
+ systemScalarFunctions?: ScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => ScalarFunctionName[]);
120
+ /**
121
+ * Custom (user defined) Scalar Expression Functions available in AdaptableQL
122
+ *
123
+ * @defaultValue null (none)
124
+ * @gridInfoItem
125
+ */
126
+ customScalarFunctions?: Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<ScalarFunctionName>) => Record<string, ExpressionFunction>);
127
+ /**
128
+ * System (built-in) Observable Expression Functions available in AdaptableQL
129
+ *
130
+ * @defaultValue null (sets all)
131
+ * @gridInfoItem
132
+ */
133
+ systemObservableFunctions?: ObservableFunctionName[] | ((context: GlobalExpressionFunctionsContext<ObservableFunctionName>) => ObservableFunctionName[]);
134
+ /**
135
+ * System (built-in) AggregatedBoolean Expression Functions available in AdaptableQL
136
+ *
137
+ * @defaultValue null (sets all)
138
+ * @gridInfoItem
139
+ */
140
+ systemAggregatedBooleanFunctions?: AggregatedBooleanFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedBooleanFunctionName>) => AggregatedBooleanFunctionName[]);
141
+ /**
142
+ * System (built-in) AggregatedScalar Expression Functions available in AdaptableQL
143
+ *
144
+ * @defaultValue null (sets all)
145
+ * @gridInfoItem
146
+ */
147
+ systemAggregatedScalarFunctions?: AggregatedScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedScalarFunctionName>) => AggregatedScalarFunctionName[]);
148
+ }
149
+ /**
150
+ * Context provided to global expression functions properties property callback
151
+ */
152
+ export interface GlobalExpressionFunctionsContext<T> extends BaseContext {
153
+ /**
154
+ * The names of all expression functions available in this context
155
+ */
156
+ availableExpressionFunctionNames: T[];
157
+ }
158
+ /**
159
+ * Context provided to ExpressionOptions.moduleExpressionFunctions property callback
160
+ */
161
+ export interface ModuleExpressionFunctionsContext extends BaseContext {
162
+ /**
163
+ * The Adaptable Module requesting the expression functions
164
+ */
165
+ module: AdaptableModule;
166
+ /**
167
+ * The global boolean expression functions
168
+ */
169
+ availableBooleanFunctionNames: BooleanFunctionName[];
170
+ /**
171
+ * The global scalar expression functions
172
+ */
173
+ availableScalarFunctionNames: ScalarFunctionName[];
174
+ /**
175
+ * The global observable expression functions
176
+ */
177
+ availableObservableFunctionNames: ObservableFunctionName[];
178
+ /**
179
+ * The global aggregated boolean expression functions
180
+ */
181
+ availableAggregatedBooleanFunctionNames: AggregatedBooleanFunctionName[];
182
+ /**
183
+ * The global aggregated scalar expression functions
184
+ */
185
+ availableAggregatedScalarFunctionNames: AggregatedScalarFunctionName[];
186
+ }
187
+ /**
188
+ * Context passed when evaluating `ExpressionOptions.customQueryVariables`
189
+ */
190
+ export interface CustomQueryVariableContext extends BaseContext {
191
+ /**
192
+ * Optional variable arguments
193
+ */
194
+ args?: any[];
195
+ }
196
+ /**
197
+ * Context passed when evaluating Queryable Columns
198
+ */
199
+ export interface QueryableColumnContext extends BaseContext {
200
+ /**
201
+ * Basic Column Info - just ColumnId, DataType and FriendlyName
202
+ */
203
+ adaptableColumn: AdaptableColumnBase;
204
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -148,7 +148,8 @@ export interface FilterOptions {
148
148
  */
149
149
  enableFilterOnSpecialColumns?: boolean;
150
150
  /**
151
- * Which Adaptable System Filter Predicates are available
151
+ * Set which System Filter Predicates are available
152
+ * @deprecated use systemFilterPredicates in PredicateOptions
152
153
  */
153
154
  systemFilters?: SystemFilterPredicateIds;
154
155
  /**
@@ -0,0 +1,32 @@
1
+ import { AdaptablePredicateDef, BaseContext, SystemAlertPredicateIds, SystemFilterPredicateIds, SystemFormatColumnPredicateIds, SystemFlashingCellPredicateIds, PredicateModuleScope } from '../types';
2
+ /**
3
+ * Options for managing Adaptable Predicates using AdaptableQL
4
+ */
5
+ export interface PredicateOptions {
6
+ /**
7
+ * Set which System Filter Predicates are available - by List or Function
8
+ */
9
+ systemFilterPredicates?: SystemFilterPredicateIds | ((context: SystemPredicatesContext) => SystemFilterPredicateIds);
10
+ /**
11
+ * Set which System Alert Predicates are available - by List or Function
12
+ */
13
+ systemAlertPredicates?: SystemAlertPredicateIds | ((context: SystemPredicatesContext) => SystemAlertPredicateIds);
14
+ /**
15
+ * Set which System Format Column Predicates are available - by List or Function
16
+ */
17
+ systemFormatColumnPredicates?: SystemFormatColumnPredicateIds | ((context: SystemPredicatesContext) => SystemFormatColumnPredicateIds);
18
+ /**
19
+ * Set which System Flashing Cell Predicates are available - by List or Function
20
+ */
21
+ systemFlashingCellPredicates?: SystemFlashingCellPredicateIds | ((context: SystemPredicatesContext) => SystemFlashingCellPredicateIds);
22
+ }
23
+ export interface SystemPredicatesContext extends BaseContext {
24
+ /**
25
+ * AdapTable-provided System Predicate Definitions
26
+ */
27
+ systemPredicateDefs: AdaptablePredicateDef[];
28
+ /**
29
+ * Module for which Predicates are being retrieved
30
+ */
31
+ moduleScope: PredicateModuleScope;
32
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -135,10 +135,6 @@ export interface AlertApi {
135
135
  * Opens Settings Panel with Alert section selected and visible
136
136
  */
137
137
  showAlertPopup(): void;
138
- /**
139
- * Retrieves all Predicate Defs with Module Scope of Alert
140
- */
141
- getAlertPredicateDefs(): AdaptablePredicateDef[];
142
138
  /**
143
139
  * Retrieves all Predicate Defs that match given Scope
144
140
  * @param scope the Scope to check
@@ -172,4 +168,24 @@ export interface AlertApi {
172
168
  * @param alertDefinition Alert Definition to use
173
169
  */
174
170
  getAlertRuleDescription(alertDefinition: AlertDefinition): string;
171
+ /**
172
+ * Was Adaptable Alert fired due to a Cell Change
173
+ * @param alert AdaptableAlert to check
174
+ */
175
+ isCellChangedAdaptableAlert(alert: AdaptableAlert): boolean;
176
+ /**
177
+ * Was Adaptable Alert fired due to a Row Change
178
+ * @param alert AdaptableAlert to check
179
+ */
180
+ isRowChangedAdaptableAlert(alert: AdaptableAlert): boolean;
181
+ /**
182
+ * Is Adaptable Alert a Generic one
183
+ * @param alert AdaptableAlert to check
184
+ */
185
+ isGenericAdaptableAlert(alert: AdaptableAlert): boolean;
186
+ /**
187
+ * Returns for the Alert Type for an Adaptable Alert
188
+ * @param alert AdaptableAlert to check
189
+ */
190
+ getAlertTypeForAdaptableAlert(alert: AdaptableAlert): 'cellChanged' | 'rowChanged' | 'generic';
175
191
  }
@@ -1,4 +1,4 @@
1
- import { AdaptableColumn, ColumnFilter, GridCell, SystemFilterPredicateIds } from '../types';
1
+ import { AdaptableColumn, ColumnFilter, GridCell } from '../types';
2
2
  import * as Redux from 'redux';
3
3
  import { ColumnFilterDef, AdaptablePredicateDef } from '../PredefinedConfig/Common/AdaptablePredicate';
4
4
  import { RowNode } from '@ag-grid-community/core';
@@ -23,10 +23,6 @@ export interface FilterApi {
23
23
  * @param columnId Id of Column to lookup
24
24
  */
25
25
  getFilterPredicateDefsForColumnId(columnId: string): AdaptablePredicateDef[] | undefined;
26
- /**
27
- * Retrieves Ids for all System Filters
28
- */
29
- getAllSystemFilterIds(): SystemFilterPredicateIds;
30
26
  /**
31
27
  * Makes Quick Filter Bar appear
32
28
  */
@@ -83,10 +83,6 @@ export interface FlashingCellApi {
83
83
  * @returns flashing cell definition
84
84
  */
85
85
  unSuspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
86
- /**
87
- * Retrieves all Predicate Defs with Module Scope of Flashing Cell
88
- */
89
- getFlashingCellPredicateDefs(): AdaptablePredicateDef[];
90
86
  /**
91
87
  * Retrieves all Predicate Defs that match given Scope
92
88
  * @param scope the Scope to check
@@ -177,10 +177,6 @@ export interface FormatColumnApi {
177
177
  * @param formatColumn Format Column
178
178
  */
179
179
  hasCustomDisplayFormatter(formatColumn: FormatColumn): boolean;
180
- /**
181
- * Returns all Predicates usable in Format Columns
182
- */
183
- getFormatColumnPredicateDefs(): AdaptablePredicateDef[];
184
180
  /**
185
181
  * Returns all Predicates appropriate for the given Scope
186
182
  * @param scope Scope to check
@@ -37,11 +37,14 @@ export declare class AlertApiImpl extends ApiBase implements AlertApi {
37
37
  showAlertWarning(alertHeader: string, alertMessage: string, alertProperties?: AlertProperties): void;
38
38
  showAlertError(alertHeader: string, alertMessage: string, alertProperties?: AlertProperties): void;
39
39
  showAlertPopup(): void;
40
- getAlertPredicateDefs(): AdaptablePredicateDef[];
41
40
  getAlertPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
42
41
  editAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
43
42
  suspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
44
43
  unSuspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
45
44
  getAlertDescription(alertDefinition: AlertDefinition, cellDataChangedInfo?: CellDataChangedInfo): string;
46
45
  getAlertRuleDescription(alert: AlertDefinition): string;
46
+ isCellChangedAdaptableAlert(alert: AdaptableAlert): boolean;
47
+ isRowChangedAdaptableAlert(alert: AdaptableAlert): boolean;
48
+ isGenericAdaptableAlert(alert: AdaptableAlert): boolean;
49
+ getAlertTypeForAdaptableAlert(alert: AdaptableAlert): 'cellChanged' | 'rowChanged' | 'generic';
47
50
  }
@@ -279,11 +279,10 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
279
279
  showAlertPopup() {
280
280
  this.showModulePopup(ModuleConstants.AlertModuleId);
281
281
  }
282
- getAlertPredicateDefs() {
283
- return this.adaptable.api.predicateApi.getPredicateDefsByModuleScope('alert');
284
- }
285
282
  getAlertPredicateDefsForScope(scope) {
286
- return this.getAlertPredicateDefs().filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
283
+ return this.getAdaptableApi()
284
+ .predicateApi.getAlertPredicateDefs()
285
+ .filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
287
286
  }
288
287
  editAlertDefinition(alertDefinition) {
289
288
  this.dispatchAction(AlertRedux.AlertDefinitionEdit(alertDefinition));
@@ -323,5 +322,17 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
323
322
  : this.adaptable.api.internalApi.getAdaptableQueryExpressionText(alert.Rule);
324
323
  return ruleDescription;
325
324
  }
325
+ isCellChangedAdaptableAlert(alert) {
326
+ return alert.alertType === 'cellChanged';
327
+ }
328
+ isRowChangedAdaptableAlert(alert) {
329
+ return alert.alertType === 'rowChanged';
330
+ }
331
+ isGenericAdaptableAlert(alert) {
332
+ return alert.alertType === 'generic';
333
+ }
334
+ getAlertTypeForAdaptableAlert(alert) {
335
+ return alert.alertType;
336
+ }
326
337
  }
327
338
  exports.AlertApiImpl = AlertApiImpl;
@@ -11,7 +11,8 @@ import { ActionOptions, ContainerOptions, DashboardOptions, EditOptions, FilterO
11
11
  import { NotificationsOptions } from '../../AdaptableOptions/NotificationsOptions';
12
12
  import { ToolPanelOptions } from '../../AdaptableOptions/ToolPanelOptions';
13
13
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
14
- import { AdaptableQLOptions, ExpressionOptions } from '../../AdaptableOptions/AdaptableQLOptions';
14
+ import { AdaptableQLOptions } from '../../AdaptableOptions/AdaptableQLOptions';
15
+ import { ExpressionOptions } from '../../AdaptableOptions/ExpressionOptions';
15
16
  import { AlertOptions } from '../../AdaptableOptions/AlertOptions';
16
17
  import { ColumnOptions } from '../../AdaptableOptions/ColumnOptions';
17
18
  export declare abstract class ApiBase {
@@ -275,7 +275,6 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
275
275
  return this.getColumns().filter((c) => c.queryable);
276
276
  }
277
277
  LogMissingColumnWarning(columnId) {
278
- console.log('MISSING', columnId);
279
278
  if (this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning &&
280
279
  this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning === true) {
281
280
  if (!this.isAutoRowGroupColumn(columnId) &&