@adaptabletools/adaptable 18.1.1 → 18.1.3
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 +1 -1
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -13
- package/src/AdaptableOptions/CommentOptions.d.ts +5 -0
- package/src/AdaptableOptions/ExpressionOptions.d.ts +1 -1
- package/src/AdaptableOptions/NoteOptions.d.ts +6 -0
- package/src/Api/CommentApi.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +3 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +3 -8
- package/src/Api/Internal/AlertInternalApi.d.ts +1 -0
- package/src/Api/Internal/AlertInternalApi.js +9 -8
- package/src/Api/UserInterfaceApi.d.ts +4 -8
- package/src/PredefinedConfig/Common/CustomWindowConfig.d.ts +13 -0
- package/src/PredefinedConfig/Common/CustomWindowConfig.js +1 -0
- package/src/PredefinedConfig/Common/ProgressIndicatorConfig.d.ts +23 -0
- package/src/PredefinedConfig/Common/ProgressIndicatorConfig.js +1 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +8 -1
- package/src/PredefinedConfig/SystemState.d.ts +3 -5
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +4 -9
- package/src/Redux/ActionsReducers/SystemRedux.js +5 -7
- package/src/Strategy/LayoutModule.js +4 -2
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +3 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +9 -0
- package/src/Utilities/Services/QueryLanguageService.js +11 -8
- package/src/Utilities/Services/RowSummaryService.js +12 -3
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +9 -1
- package/src/View/Comments/CommentsEditor.js +13 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +39 -11
- package/src/View/Note/NoteEditor.js +12 -5
- package/src/agGrid/AdaptableAgGrid.d.ts +3 -3
- package/src/agGrid/AdaptableAgGrid.js +9 -5
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
- package/src/agGrid/defaultAdaptableOptions.js +6 -0
- package/src/components/ExpressionEditor/ExpressionPreview.js +12 -6
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +17 -5
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +24 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +80 -57
- package/src/types.d.ts +4 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -129,13 +129,66 @@ args: any[],
|
|
|
129
129
|
*/
|
|
130
130
|
context: ExpressionContext) => any;
|
|
131
131
|
export declare const isAST_Function: (node: AST_Expression) => node is AST_Function;
|
|
132
|
+
export interface AggregatedExpressionFunction {
|
|
133
|
+
/**
|
|
134
|
+
* Description of the Aggregated Expression Function
|
|
135
|
+
*/
|
|
136
|
+
description?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Example Signatures for the Aggregated Expression Function
|
|
139
|
+
*/
|
|
140
|
+
signatures?: string[];
|
|
141
|
+
/**
|
|
142
|
+
* Examples to use the Aggregated Expression Function
|
|
143
|
+
*/
|
|
144
|
+
examples?: string[];
|
|
145
|
+
/**
|
|
146
|
+
* Mandatory Initial Value for the aggregation
|
|
147
|
+
*/
|
|
148
|
+
initialValue: any;
|
|
149
|
+
/**
|
|
150
|
+
* Mandatory Reducer function which is called for each value(row) in the Column Data
|
|
151
|
+
*/
|
|
152
|
+
reducer: (context: AggregatedExpressionReducerContext) => any;
|
|
153
|
+
/**
|
|
154
|
+
* Called AFTER the reducer() has processed all values / rows
|
|
155
|
+
* Can be used to change result of reducer based on the values array (e.g. average = aggregated value / count)
|
|
156
|
+
*/
|
|
157
|
+
processAggregatedValue?: (context: AggregatedExpressionProcessAggregatedValueContext) => any;
|
|
158
|
+
/**
|
|
159
|
+
* Called for each row AFTER the reducer() and processAggregatedValue() functions
|
|
160
|
+
* Can be used when each row has a different aggregated value (e.g. percentage = row value / aggregated value).
|
|
161
|
+
* Returns return value for each individual row
|
|
162
|
+
*/
|
|
163
|
+
prepareRowValue?: (context: AggregatedExpressionPrepareRowValueContext) => number | string | Date | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* 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
|
+
*/
|
|
167
|
+
filterRow?: (context: AggregatedExpressionFilteRowContext) => boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Optional argument types.
|
|
170
|
+
*/
|
|
171
|
+
inputTypes?: ExpressionFunctionInputType[];
|
|
172
|
+
}
|
|
132
173
|
export interface AggregatedExpressionReducerContext extends BaseContext {
|
|
174
|
+
/**
|
|
175
|
+
* 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.
|
|
176
|
+
*/
|
|
177
|
+
accumulator: any;
|
|
178
|
+
/**
|
|
179
|
+
* Current value being processed in the Column Data
|
|
180
|
+
*/
|
|
181
|
+
currentValue: any;
|
|
182
|
+
/**
|
|
183
|
+
* Index of the current value in the Column Data
|
|
184
|
+
*/
|
|
185
|
+
index: number;
|
|
133
186
|
/**
|
|
134
187
|
* Current row node
|
|
135
188
|
*/
|
|
136
189
|
rowNode: IRowNode;
|
|
137
190
|
/**
|
|
138
|
-
* Arguments passed to the function
|
|
191
|
+
* Arguments passed to the function
|
|
139
192
|
*/
|
|
140
193
|
args: any[];
|
|
141
194
|
/**
|
|
@@ -149,13 +202,20 @@ export interface AggregatedExpressionReducerContext extends BaseContext {
|
|
|
149
202
|
/**
|
|
150
203
|
* Helper function to get the value of a column
|
|
151
204
|
* @param colId column id
|
|
152
|
-
* @returns
|
|
153
205
|
*/
|
|
154
206
|
getValueForColId: (colId: string) => any;
|
|
155
207
|
}
|
|
156
|
-
export interface
|
|
208
|
+
export interface AggregatedExpressionProcessAggregatedValueContext extends BaseContext {
|
|
209
|
+
/**
|
|
210
|
+
* Result of the reducer
|
|
211
|
+
*/
|
|
212
|
+
aggregatedValue: any;
|
|
157
213
|
/**
|
|
158
|
-
*
|
|
214
|
+
* Array of row nodes; if aggregation is grouped, this will be the array of row nodes for the group
|
|
215
|
+
*/
|
|
216
|
+
rowNodes: IRowNode[];
|
|
217
|
+
/**
|
|
218
|
+
* Arguments passed to the function
|
|
159
219
|
*/
|
|
160
220
|
args: any[];
|
|
161
221
|
/**
|
|
@@ -169,7 +229,15 @@ export interface AggregatedExpressionProcessReducerValueContext extends BaseCont
|
|
|
169
229
|
}
|
|
170
230
|
export interface AggregatedExpressionPrepareRowValueContext extends BaseContext {
|
|
171
231
|
/**
|
|
172
|
-
*
|
|
232
|
+
* Current Row Node
|
|
233
|
+
*/
|
|
234
|
+
rowNode: IRowNode;
|
|
235
|
+
/**
|
|
236
|
+
* Result of the reducer
|
|
237
|
+
*/
|
|
238
|
+
aggregatedValue: any;
|
|
239
|
+
/**
|
|
240
|
+
* Arguments passed to the function
|
|
173
241
|
*/
|
|
174
242
|
args: any[];
|
|
175
243
|
/**
|
|
@@ -186,14 +254,18 @@ export interface AggregatedExpressionPrepareRowValueContext extends BaseContext
|
|
|
186
254
|
*/
|
|
187
255
|
getValueForColId: (colId: string) => any;
|
|
188
256
|
}
|
|
189
|
-
export interface
|
|
257
|
+
export interface AggregatedExpressionFilteRowContext extends BaseContext {
|
|
258
|
+
/**
|
|
259
|
+
* Current row node
|
|
260
|
+
*/
|
|
261
|
+
rowNode: IRowNode;
|
|
190
262
|
/**
|
|
191
|
-
* Arguments passed to the function
|
|
263
|
+
* Arguments passed to the function
|
|
192
264
|
*/
|
|
193
265
|
args: any[];
|
|
194
266
|
/**
|
|
195
267
|
* Column Id of the column being aggregated
|
|
196
|
-
*
|
|
268
|
+
* Usually the first Col argument, e.g. [colId]
|
|
197
269
|
*/
|
|
198
270
|
aggColumnId: string;
|
|
199
271
|
/**
|
|
@@ -203,55 +275,6 @@ export interface AggregatedExpressionRowFilterContext extends BaseContext {
|
|
|
203
275
|
/**
|
|
204
276
|
* Utility function to get the value of a column
|
|
205
277
|
* @param colId column id
|
|
206
|
-
* @returns
|
|
207
278
|
*/
|
|
208
279
|
getValueForColId: (colId: string) => any;
|
|
209
280
|
}
|
|
210
|
-
export interface AggregatedExpressionFunction {
|
|
211
|
-
/**
|
|
212
|
-
* Expression description.
|
|
213
|
-
*/
|
|
214
|
-
description?: string;
|
|
215
|
-
/**
|
|
216
|
-
* Examples how this function ca be used.
|
|
217
|
-
*/
|
|
218
|
-
signatures?: string[];
|
|
219
|
-
/**
|
|
220
|
-
* How the function can be used.
|
|
221
|
-
*/
|
|
222
|
-
examples?: string[];
|
|
223
|
-
/**
|
|
224
|
-
* Initial Value for the aggregation
|
|
225
|
-
*/
|
|
226
|
-
initialValue: any;
|
|
227
|
-
/**
|
|
228
|
-
* Reducer function which is called for each value(row) in the Column Data.
|
|
229
|
-
* @param accumulator - the 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.
|
|
230
|
-
* @param currentValue - the current value being processed in the Column Data
|
|
231
|
-
* @param index - index of the current value in the Column Data
|
|
232
|
-
* @param context - context object with the current row node, adaptableApi, aggColumnId and other possible custom arguments
|
|
233
|
-
*/
|
|
234
|
-
reducer: (accumulator: any, currentValue: any, index: number, context: AggregatedExpressionReducerContext) => any;
|
|
235
|
-
/**
|
|
236
|
-
* If specified, this function is called after the reducer has processed all values (rows).
|
|
237
|
-
* Can be used to change the result of the reducer based on the values array (e.g. average = aggregated value / count).
|
|
238
|
-
* @param aggregatedValue - result of the reducer
|
|
239
|
-
* @param rowNodes - array of row nodes. If aggregation was grouped, this will be the array of row nodes for the group.
|
|
240
|
-
* @param context - context object with the args
|
|
241
|
-
*/
|
|
242
|
-
processAggregatedValue?: (aggregatedValue: any, rowNodes: IRowNode[], context: AggregatedExpressionProcessReducerValueContext) => any;
|
|
243
|
-
/**
|
|
244
|
-
* If specified, this function is be called for each row AFTER the reducer() and processReducedValue() functions.
|
|
245
|
-
* This can be used when each row has a different aggregated value (e.g. percentage = row value / aggregated value).
|
|
246
|
-
* @param rowNode - current row node
|
|
247
|
-
* @param context - context object with the args, aggColumnId, getValueForColId
|
|
248
|
-
* @returns return value for each individual row
|
|
249
|
-
*/
|
|
250
|
-
prepareRowValue?: (rowNode: IRowNode, aggregatedValue: any, context: AggregatedExpressionPrepareRowValueContext) => number | string | Date;
|
|
251
|
-
/**
|
|
252
|
-
* If specified, this function filters the rows that are included in the aggregation.
|
|
253
|
-
* @param rowNode - current row node
|
|
254
|
-
* @param context - context object with the aggColumnId, getValueForColId
|
|
255
|
-
*/
|
|
256
|
-
rowFilter?: (rowNode: IRowNode, context: AggregatedExpressionRowFilterContext) => boolean;
|
|
257
|
-
}
|
package/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ExpressionFunction, ExpressionFunctionDocBlock, ExpressionFunctionHandler, ExpressionContext, ExpressionFunctionMap, ExpressionCategory, ExpressionFunctionInputType, AggregatedExpressionFunction, AggregatedExpressionReducerContext, AST, AST_Function, AST_Expression, Token, } from './../src/parser/src/types';
|
|
1
|
+
export type { ExpressionFunction, ExpressionFunctionDocBlock, ExpressionFunctionHandler, ExpressionContext, ExpressionFunctionMap, ExpressionCategory, ExpressionFunctionInputType, AggregatedExpressionFunction, AggregatedExpressionReducerContext, AggregatedExpressionProcessAggregatedValueContext, AggregatedExpressionPrepareRowValueContext, AggregatedExpressionFilteRowContext, 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';
|
|
@@ -209,8 +209,10 @@ export type { Shortcut, ShortcutState, ShortcutScopeDataType, } from './Predefin
|
|
|
209
209
|
export type { SharedEntity, AdaptableSharedEntity, CustomSharedEntity, TeamSharingState, SharedEntityType, AdaptableSharedEntityConfig, CustomSharedEntityConfig, } from './PredefinedConfig/TeamSharingState';
|
|
210
210
|
export type { AdaptableTheme, ThemeState } from './PredefinedConfig/ThemeState';
|
|
211
211
|
export type { ToolPanelState, AdaptableToolPanelDefinition, ToolPanelVisibilityMode, } from './PredefinedConfig/ToolPanelState';
|
|
212
|
-
export type { AdaptableFrameworkComponent, AngularFrameworkComponent, ReactFrameworkComponent, CustomRenderFunction, CustomRenderContext,
|
|
212
|
+
export type { AdaptableFrameworkComponent, AngularFrameworkComponent, ReactFrameworkComponent, VueFrameworkComponent, CustomRenderFunction, CustomRenderContext, } from './AdaptableOptions/AdaptableFrameworkComponent';
|
|
213
213
|
export type { Fdc3Options, GridDataContextMapping, ActionColumnDefaultConfiguration, ResolveContextDataContext, RaiseIntentConfig, BroadcastConfig, HandleFdc3IntentContext, HandleFdc3Context, Fdc3ButtonContext, Fdc3AdaptableButton, HandleFdc3IntentResolutionContext, UIControlConfig, Fdc3IntentOptions, Fdc3ContextOptions, RaiseIntentConfiguration, BroadcastConfiguration, FDC3ActionColumn, } from './AdaptableOptions/Fdc3Options';
|
|
214
214
|
export type { CommentState, CommentThread, AdaptableComment, } from './PredefinedConfig/CommentState';
|
|
215
215
|
export type { UpgradeConfig } from '../agGrid';
|
|
216
|
+
export type { ProgressIndicatorConfig } from './PredefinedConfig/Common/ProgressIndicatorConfig';
|
|
217
|
+
export type { CustomWindowConfig } from './PredefinedConfig/Common/CustomWindowConfig';
|
|
216
218
|
export type { TransposeConfig } from './PredefinedConfig/Common/TransposeConfig';
|