@adaptabletools/adaptable 18.1.6 → 18.1.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.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -4
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +3 -0
- package/src/AdaptableOptions/ExpressionOptions.d.ts +3 -0
- package/src/AdaptableOptions/GridFilterOptions.d.ts +4 -1
- package/src/AdaptableOptions/StateOptions.d.ts +1 -1
- package/src/Api/AdaptableApi.d.ts +1 -4
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/AlertInternalApi.d.ts +0 -3
- package/src/Api/Internal/AlertInternalApi.js +12 -39
- package/src/Api/Internal/CommentsInternalApi.js +0 -4
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +6 -6
- package/src/Api/Internal/GridInternalApi.js +2 -2
- package/src/Api/Internal/NoteInternalApi.js +0 -4
- package/src/Api/StatusBarApi.d.ts +5 -5
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +6 -0
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/ColumnFilterModule.js +13 -11
- package/src/Strategy/CommentModule.js +3 -0
- package/src/Strategy/NoteModule.js +3 -0
- package/src/Utilities/Helpers/FormatHelper.d.ts +23 -4
- package/src/Utilities/Helpers/FormatHelper.js +73 -14
- package/src/Utilities/Helpers/Helper.d.ts +6 -0
- package/src/Utilities/Helpers/Helper.js +31 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +17 -24
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -0
- package/src/components/Select/Select.d.ts +1 -0
- package/src/components/Select/Select.js +8 -2
- package/src/components/icons/index.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +149 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +25 -4
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { IRowNode } from '@ag-grid-community/core';
|
|
2
2
|
import { BaseContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* An AST Expression
|
|
5
|
+
*/
|
|
3
6
|
export type AST = AST_Expression[];
|
|
4
7
|
export type PredicateType = 'VALUE_REF' | 'INFIX' | 'UNARY' | 'FUNCTION' | 'CONDITIONAL';
|
|
5
8
|
/**
|
|
@@ -15,6 +18,9 @@ export type AST_Function = {
|
|
|
15
18
|
range?: [number, number];
|
|
16
19
|
metaInfo?: PredicateType;
|
|
17
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Token used by the AdapTableQL parser
|
|
23
|
+
*/
|
|
18
24
|
export type Token = {
|
|
19
25
|
type: string;
|
|
20
26
|
value: string;
|
|
@@ -129,6 +135,9 @@ args: any[],
|
|
|
129
135
|
*/
|
|
130
136
|
context: ExpressionContext) => any;
|
|
131
137
|
export declare const isAST_Function: (node: AST_Expression) => node is AST_Function;
|
|
138
|
+
/**
|
|
139
|
+
* Defines an AdapTableQL function that aggregates data
|
|
140
|
+
*/
|
|
132
141
|
export interface AggregatedExpressionFunction {
|
|
133
142
|
/**
|
|
134
143
|
* Description of the Aggregated Expression Function
|
|
@@ -154,7 +163,7 @@ export interface AggregatedExpressionFunction {
|
|
|
154
163
|
* Called AFTER the reducer() has processed all values / rows
|
|
155
164
|
* Can be used to change result of reducer based on the values array (e.g. average = aggregated value / count)
|
|
156
165
|
*/
|
|
157
|
-
processAggregatedValue?: (context:
|
|
166
|
+
processAggregatedValue?: (context: AggregatedExpressionProcessAggValueContext) => any;
|
|
158
167
|
/**
|
|
159
168
|
* Called for each row AFTER the reducer() and processAggregatedValue() functions
|
|
160
169
|
* Can be used when each row has a different aggregated value (e.g. percentage = row value / aggregated value).
|
|
@@ -164,12 +173,15 @@ export interface AggregatedExpressionFunction {
|
|
|
164
173
|
/**
|
|
165
174
|
* Optional filter which is applied to each row before the reducer is called. If the filter returns false, the row is NOT included in the aggregation.
|
|
166
175
|
*/
|
|
167
|
-
filterRow?: (context:
|
|
176
|
+
filterRow?: (context: AggregatedExpressionFilterRowContext) => boolean;
|
|
168
177
|
/**
|
|
169
178
|
* Optional argument types.
|
|
170
179
|
*/
|
|
171
180
|
inputTypes?: ExpressionFunctionInputType[];
|
|
172
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Context used by the reducer property in Aggregated Expressions
|
|
184
|
+
*/
|
|
173
185
|
export interface AggregatedExpressionReducerContext extends BaseContext {
|
|
174
186
|
/**
|
|
175
187
|
* Value returned by the previous call to the reducer function, or the initialValue if this is the first call. You return the new accumulator value from this function.
|
|
@@ -205,7 +217,10 @@ export interface AggregatedExpressionReducerContext extends BaseContext {
|
|
|
205
217
|
*/
|
|
206
218
|
getValueForColId: (colId: string) => any;
|
|
207
219
|
}
|
|
208
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Context used by processAggregatedValue property in Aggregated Expressions
|
|
222
|
+
*/
|
|
223
|
+
export interface AggregatedExpressionProcessAggValueContext extends BaseContext {
|
|
209
224
|
/**
|
|
210
225
|
* Result of the reducer
|
|
211
226
|
*/
|
|
@@ -227,6 +242,9 @@ export interface AggregatedExpressionProcessAggregatedValueContext extends BaseC
|
|
|
227
242
|
*/
|
|
228
243
|
groupByColumnIds?: string[];
|
|
229
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* Context used by prepareRowValue property in Aggregated Expressions
|
|
247
|
+
*/
|
|
230
248
|
export interface AggregatedExpressionPrepareRowValueContext extends BaseContext {
|
|
231
249
|
/**
|
|
232
250
|
* Current Row Node
|
|
@@ -254,7 +272,10 @@ export interface AggregatedExpressionPrepareRowValueContext extends BaseContext
|
|
|
254
272
|
*/
|
|
255
273
|
getValueForColId: (colId: string) => any;
|
|
256
274
|
}
|
|
257
|
-
|
|
275
|
+
/**
|
|
276
|
+
* Context used when applying a filter to Rows before Reducer is called
|
|
277
|
+
*/
|
|
278
|
+
export interface AggregatedExpressionFilterRowContext extends BaseContext {
|
|
258
279
|
/**
|
|
259
280
|
* Current row node
|
|
260
281
|
*/
|
package/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ExpressionFunction, ExpressionFunctionDocBlock, ExpressionFunctionHandler, ExpressionContext, ExpressionFunctionMap, ExpressionCategory, ExpressionFunctionInputType, AggregatedExpressionFunction, AggregatedExpressionReducerContext,
|
|
1
|
+
export type { ExpressionFunction, ExpressionFunctionDocBlock, ExpressionFunctionHandler, ExpressionContext, ExpressionFunctionMap, ExpressionCategory, ExpressionFunctionInputType, AggregatedExpressionFunction, AggregatedExpressionReducerContext, AggregatedExpressionProcessAggValueContext, AggregatedExpressionPrepareRowValueContext, AggregatedExpressionFilterRowContext, AST, AST_Function, AST_Expression, Token, } from './../src/parser/src/types';
|
|
2
2
|
export type { AgGridConfig } from './AdaptableInterfaces/IAdaptable';
|
|
3
3
|
export type { AdaptableConfig } from './View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig';
|
|
4
4
|
export type { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard, } from './AdaptableInterfaces/AdaptableNoCodeWizard';
|