@adaptabletools/adaptable 18.1.1 → 18.1.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.
- package/package.json +1 -1
- package/src/AdaptableOptions/ExpressionOptions.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +10 -8
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +72 -53
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.2",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -62,7 +62,7 @@ export interface ExpressionOptions<TData = any> {
|
|
|
62
62
|
*/
|
|
63
63
|
systemAggregatedScalarFunctions?: AggregatedScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedScalarFunctionName>) => AggregatedScalarFunctionName[]);
|
|
64
64
|
/**
|
|
65
|
-
* Bespoke Aggregated
|
|
65
|
+
* Bespoke Aggregated functions - to complement those provided by AdapTable
|
|
66
66
|
*/
|
|
67
67
|
customAggregatedFunctions?: Record<string, AggregatedExpressionFunction> | ((context: GlobalExpressionFunctionsContext<string>) => Record<string, AggregatedExpressionFunction>);
|
|
68
68
|
/**
|
|
@@ -376,7 +376,7 @@ export class QueryLanguageService {
|
|
|
376
376
|
field: aggColumnId,
|
|
377
377
|
initialValue: customExpressionDefinition.initialValue,
|
|
378
378
|
reducer: (acc, value, rowNode, dataIndex) => {
|
|
379
|
-
const context = Object.assign({ rowNode, args: contextArgs.map((arg) => {
|
|
379
|
+
const context = Object.assign({ accumulator: acc, currentValue: value, index: dataIndex, rowNode, args: contextArgs.map((arg) => {
|
|
380
380
|
// if col, replace with value
|
|
381
381
|
if (typeof arg === 'object' && arg.name === 'COL') {
|
|
382
382
|
return getValueForColId(arg.value, rowNode);
|
|
@@ -384,12 +384,13 @@ export class QueryLanguageService {
|
|
|
384
384
|
return arg;
|
|
385
385
|
}), aggColumnId,
|
|
386
386
|
groupByColumnIds, getValueForColId: (colId) => getValueForColId(colId, rowNode) }, createBaseContext(this.adaptableApi));
|
|
387
|
-
return customExpressionDefinition.reducer(
|
|
387
|
+
return customExpressionDefinition.reducer(context);
|
|
388
388
|
},
|
|
389
389
|
done: (accValue, dataArray) => {
|
|
390
390
|
if (customExpressionDefinition.processAggregatedValue) {
|
|
391
|
-
|
|
392
|
-
groupByColumnIds })
|
|
391
|
+
const context = Object.assign(Object.assign({}, createBaseContext(this.adaptableApi)), { aggregatedValue: accValue, rowNodes: dataArray, args: contextArgs, aggColumnId,
|
|
392
|
+
groupByColumnIds });
|
|
393
|
+
return customExpressionDefinition.processAggregatedValue(context);
|
|
393
394
|
}
|
|
394
395
|
return accValue;
|
|
395
396
|
},
|
|
@@ -398,21 +399,22 @@ export class QueryLanguageService {
|
|
|
398
399
|
},
|
|
399
400
|
rowValueGetter: (rowNode, aggregationValue) => {
|
|
400
401
|
if (customExpressionDefinition.prepareRowValue) {
|
|
401
|
-
|
|
402
|
+
const context = Object.assign(Object.assign({ rowNode: rowNode, aggregatedValue: aggregationValue }, createBaseContext(this.adaptableApi)), { args: contextArgs.map((arg) => {
|
|
402
403
|
// if col, replace with value
|
|
403
404
|
if (typeof arg === 'object' && arg.name === 'COL') {
|
|
404
405
|
return getValueForColId(arg.value, rowNode);
|
|
405
406
|
}
|
|
406
407
|
return arg;
|
|
407
408
|
}), aggColumnId,
|
|
408
|
-
groupByColumnIds, getValueForColId: (colId) => getValueForColId(colId, rowNode) })
|
|
409
|
+
groupByColumnIds, getValueForColId: (colId) => getValueForColId(colId, rowNode) });
|
|
410
|
+
return customExpressionDefinition.prepareRowValue(context);
|
|
409
411
|
}
|
|
410
412
|
return aggregationValue;
|
|
411
413
|
},
|
|
412
414
|
rowFilterFn: (rowNode) => {
|
|
413
415
|
var _a, _b;
|
|
414
|
-
if (customExpressionDefinition.
|
|
415
|
-
return customExpressionDefinition.
|
|
416
|
+
if (customExpressionDefinition.filterRow) {
|
|
417
|
+
return customExpressionDefinition.filterRow(Object.assign(Object.assign({ rowNode }, createBaseContext(this.adaptableApi)), { args: contextArgs.map((arg) => {
|
|
416
418
|
// if col, replace with value
|
|
417
419
|
if (typeof arg === 'object' && arg.name === 'COL') {
|
|
418
420
|
return getValueForColId(arg.value, rowNode);
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "18.1.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1718367349733 || Date.now(),
|
|
4
|
+
VERSION: "18.1.2" || '--current-version--',
|
|
5
5
|
};
|