@adaptabletools/adaptable 11.0.0-canary.6 → 11.0.0-canary.7
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/agGrid.d.ts +5 -4
- package/agGrid.js +7 -5
- package/base.css +2 -2
- package/bundle.cjs.js +120 -115
- package/index.css +2 -2
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -5
- package/src/AdaptableOptions/{QueryLanguageOptions.d.ts → AdaptableQLOptions.d.ts} +31 -2
- package/src/AdaptableOptions/{QueryLanguageOptions.js → AdaptableQLOptions.js} +0 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
- package/src/AdaptableOptions/SearchOptions.d.ts +0 -9
- package/src/AdaptableOptions/StateOptions.d.ts +7 -7
- package/src/Api/CalculatedColumnApi.d.ts +2 -9
- package/src/Api/GridApi.d.ts +11 -1
- package/src/Api/Implementation/ApiBase.d.ts +3 -2
- package/src/Api/Implementation/ApiBase.js +5 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
- package/src/Api/Implementation/GridApiImpl.js +27 -4
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -3
- package/src/Api/Implementation/InternalApiImpl.js +5 -4
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +3 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +15 -2
- package/src/Api/InternalApi.d.ts +2 -3
- package/src/Api/QueryApi.d.ts +2 -2
- package/src/Api/QueryLanguageApi.d.ts +13 -0
- package/src/Api/SettingsPanelApi.d.ts +4 -5
- package/src/PredefinedConfig/AlertState.d.ts +5 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +8 -3
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +0 -1
- package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -5
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +2 -0
- package/src/PredefinedConfig/Common/Types.js +1 -0
- package/src/PredefinedConfig/Selection/GridCellRange.d.ts +3 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +27 -2
- package/src/Strategy/AlertModule.js +3 -3
- package/src/Strategy/CalculatedColumnModule.js +4 -4
- package/src/Strategy/ChartingModule.d.ts +3 -3
- package/src/Strategy/ChartingModule.js +2 -2
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/FreeTextColumnModule.js +1 -0
- package/src/Strategy/{SetingsPanelModule.d.ts → SettingsPanelModule.d.ts} +0 -0
- package/src/Strategy/{SetingsPanelModule.js → SettingsPanelModule.js} +0 -0
- package/src/Strategy/Utilities/getAlertPreviewViewItems.js +1 -1
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +1 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +16 -12
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +18 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +311 -14
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +8 -8
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +2 -3
- package/src/Utilities/ExpressionFunctions/groupingMap.js +3 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +33 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +154 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -1
- package/src/Utilities/Services/AlertService.js +5 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +7 -3
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +143 -18
- package/src/Utilities/Services/Interface/IAdaptableService.d.ts +1 -1
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +6 -3
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +7 -1
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +9 -2
- package/src/Utilities/Services/QueryLanguageService.js +81 -22
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -3
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -2
- package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +3 -3
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +2 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +43 -12
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -2
- package/src/View/ColorPicker.d.ts +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.js +2 -3
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/agGrid/Adaptable.d.ts +1 -0
- package/src/agGrid/Adaptable.js +16 -14
- package/src/agGrid/agGridHelper.js +2 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +4 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +4 -4
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +5 -2
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +45 -0
- package/src/components/ExpressionEditor/editorButtonsReactive.js +8 -13
- package/src/components/ExpressionEditor/index.d.ts +2 -1
- package/src/components/ExpressionEditor/index.js +9 -2
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Logo/index.js +8 -7
- package/src/components/PopupWithFooter.d.ts +1 -1
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +41 -37
- package/src/metamodel/adaptable.metamodel.js +156 -133
- package/src/types.d.ts +5 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -18,5 +18,4 @@ export interface AdaptableAggregatedScalarQuery {
|
|
|
18
18
|
* An AdaptableQuery can be either a Boolean, Scalar, Observable, AggregatedBoolean, or AggregatedScalar expression
|
|
19
19
|
*/
|
|
20
20
|
export declare type AdaptableQuery = XOR<AdaptableBooleanQuery, XOR<AdaptableScalarQuery, XOR<AdaptableObservableQuery, XOR<AdaptableAggregatedBooleanQuery, AdaptableAggregatedScalarQuery>>>>;
|
|
21
|
-
export declare const getAdaptableQueryExpression: (query: Partial<AdaptableQuery>) => string | undefined;
|
|
22
21
|
export declare const isReactiveQuery: (query: Partial<AdaptableQuery>) => boolean;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isReactiveQuery =
|
|
4
|
-
exports.getAdaptableQueryExpression = (query) => {
|
|
5
|
-
var _a, _b, _c, _d;
|
|
6
|
-
return ((_d = (_c = (_b = (_a = query.BooleanExpression) !== null && _a !== void 0 ? _a : query.ScalarExpression) !== null && _b !== void 0 ? _b : query.ObservableExpression) !== null && _c !== void 0 ? _c : query.AggregatedBooleanExpression) !== null && _d !== void 0 ? _d : query.AggregatedScalarExpression);
|
|
7
|
-
};
|
|
3
|
+
exports.isReactiveQuery = void 0;
|
|
8
4
|
exports.isReactiveQuery = (query) => {
|
|
9
5
|
return !!query.ObservableExpression || !!query.AggregatedBooleanExpression;
|
|
10
6
|
};
|
|
@@ -27,3 +27,5 @@ export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Con
|
|
|
27
27
|
export declare type TypeHint<Base, Literals> = (Base & {
|
|
28
28
|
__subType?: true;
|
|
29
29
|
}) | Literals;
|
|
30
|
+
export declare type AdaptableQLModules = AdaptableQLModule[];
|
|
31
|
+
export declare type AdaptableQLModule = 'Filter' | 'Query';
|
|
@@ -64,7 +64,7 @@ function MergeStateFunction(oldState, newState) {
|
|
|
64
64
|
}
|
|
65
65
|
// any Module in config that doesn't exist in state will be added
|
|
66
66
|
for (const configModuleName in config) {
|
|
67
|
-
(_a = state[configModuleName]) !== null && _a !== void 0 ? _a :
|
|
67
|
+
state[configModuleName] = (_a = state[configModuleName]) !== null && _a !== void 0 ? _a : config[configModuleName];
|
|
68
68
|
}
|
|
69
69
|
// any Module in state that has an older revision then the config will be replaced
|
|
70
70
|
for (const stateModuleName in state) {
|
|
@@ -496,6 +496,21 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
496
496
|
/*******************
|
|
497
497
|
* SPECIAL COLUMN ACTIONS
|
|
498
498
|
*******************/
|
|
499
|
+
case CalculatedColumnRedux.CALCULATED_COLUMN_READY: {
|
|
500
|
+
// create aggregated scalar columns at grid startup
|
|
501
|
+
const aggregatedCalculatedColumns = adaptable.api.calculatedColumnApi
|
|
502
|
+
.getAllCalculatedColumn()
|
|
503
|
+
.filter((calculatedColumn) => { var _a; return (_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.AggregatedScalarExpression; });
|
|
504
|
+
aggregatedCalculatedColumns.forEach((calculatedColumn) => {
|
|
505
|
+
adaptable.api.internalApi
|
|
506
|
+
.getCalculatedColumnExpressionService()
|
|
507
|
+
.createAggregatedScalarCalculatedColumn(calculatedColumn);
|
|
508
|
+
});
|
|
509
|
+
// refresh calcualted columns
|
|
510
|
+
const aggCalculatedColumnIds = aggregatedCalculatedColumns.map((calculatedColumn) => calculatedColumn.ColumnId);
|
|
511
|
+
adaptable.refreshCells(null, aggCalculatedColumnIds, true);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
499
514
|
/**
|
|
500
515
|
* Use Case: We have added / edited / deleted a Special Column (i.e. one not in initial ColumnDefs)
|
|
501
516
|
* Action: We update the Special ColumnDefs
|
|
@@ -504,7 +519,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
504
519
|
case FreeTextColumnRedux.FREE_TEXT_COLUMN_EDIT:
|
|
505
520
|
case CalculatedColumnRedux.CALCULATED_COLUMN_ADD:
|
|
506
521
|
case CalculatedColumnRedux.CALCULATED_COLUMN_EDIT: {
|
|
507
|
-
const
|
|
522
|
+
const actionTyped = action;
|
|
523
|
+
const returnAction = next(actionTyped);
|
|
524
|
+
if (returnAction.type === CalculatedColumnRedux.CALCULATED_COLUMN_ADD ||
|
|
525
|
+
returnAction.type === CalculatedColumnRedux.CALCULATED_COLUMN_EDIT) {
|
|
526
|
+
adaptable.api.internalApi
|
|
527
|
+
.getCalculatedColumnExpressionService()
|
|
528
|
+
.createAggregatedScalarCalculatedColumn(returnAction.calculatedColumn);
|
|
529
|
+
}
|
|
508
530
|
adaptable.updateColDefsForSpecialColumns();
|
|
509
531
|
return returnAction;
|
|
510
532
|
}
|
|
@@ -524,7 +546,10 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
524
546
|
}));
|
|
525
547
|
return;
|
|
526
548
|
}
|
|
527
|
-
const returnAction = next(
|
|
549
|
+
const returnAction = next(actionTyped);
|
|
550
|
+
adaptable.api.internalApi
|
|
551
|
+
.getCalculatedColumnExpressionService()
|
|
552
|
+
.destroyAggregatedScalarCalculatedColumn(returnAction.calculatedColumn);
|
|
528
553
|
adaptable.updateColDefsForSpecialColumns();
|
|
529
554
|
return returnAction;
|
|
530
555
|
}
|
|
@@ -20,7 +20,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
20
20
|
super(ModuleConstants.AlertModuleId, 'Alert', 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
|
|
21
21
|
this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
|
|
22
22
|
if (dataChangedInfo.trigger === 'undo' || dataChangedInfo.trigger === 'aggChange') {
|
|
23
|
-
// do NOT handle reverted changes
|
|
23
|
+
// do NOT handle reverted or aggregated changes
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
|
|
@@ -44,7 +44,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
44
44
|
return this.api.alertApi.getAlertDefinitions();
|
|
45
45
|
}
|
|
46
46
|
getExplicitlyReferencedColumnIds(alertDefinition) {
|
|
47
|
-
const queryExpression =
|
|
47
|
+
const queryExpression = this.api.queryLanguageApi.getAdaptableQueryExpression(alertDefinition.Rule);
|
|
48
48
|
if (queryExpression) {
|
|
49
49
|
return this.api.queryLanguageApi.getColumnsFromExpression(queryExpression);
|
|
50
50
|
}
|
|
@@ -56,7 +56,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
56
56
|
return [];
|
|
57
57
|
}
|
|
58
58
|
getReferencedNamedQueryNames(alertDefinition) {
|
|
59
|
-
const queryExpression =
|
|
59
|
+
const queryExpression = this.api.queryLanguageApi.getAdaptableQueryExpression(alertDefinition.Rule);
|
|
60
60
|
if (!queryExpression) {
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
@@ -33,12 +33,12 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
33
33
|
this.api.calculatedColumnApi.editCalculatedColumns(oldCalculatedColumns);
|
|
34
34
|
}
|
|
35
35
|
getExplicitlyReferencedColumnIds(calculatedColumn) {
|
|
36
|
-
var _a
|
|
37
|
-
return ((
|
|
36
|
+
var _a;
|
|
37
|
+
return ((_a = this.api.queryLanguageApi.getColumnsFromExpression(this.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query))) !== null && _a !== void 0 ? _a : []);
|
|
38
38
|
}
|
|
39
39
|
getReferencedNamedQueryNames(calculatedColumn) {
|
|
40
|
-
var _a
|
|
41
|
-
return ((
|
|
40
|
+
var _a;
|
|
41
|
+
return ((_a = this.api.queryApi.getReferencedNamedQueryNames(this.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query))) !== null && _a !== void 0 ? _a : []);
|
|
42
42
|
}
|
|
43
43
|
addColumnMenuItems(column) {
|
|
44
44
|
if (column && this.isModuleEditable()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AdaptableApi } from '
|
|
1
|
+
import { IModule } from './Interface/IModule';
|
|
2
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
3
|
+
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
4
|
export declare class ChartingModule extends AdaptableModuleBase implements IModule {
|
|
5
5
|
constructor(api: AdaptableApi);
|
|
6
6
|
isModuleAvailable(): boolean;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChartingModule = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const AdaptableModuleBase_1 = require("
|
|
6
|
-
const ModuleConstants = tslib_1.__importStar(require("
|
|
5
|
+
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
|
+
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
class ChartingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
8
|
constructor(api) {
|
|
9
9
|
super(ModuleConstants.ChartingModuleId, 'Charts', 'chart', 'ChartPopup', 'Create Charts in order to see Adaptable Data visually', api);
|
|
@@ -42,7 +42,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
42
42
|
return this.api.flashingCellApi.getFlashingCellDefinitions();
|
|
43
43
|
}
|
|
44
44
|
getExplicitlyReferencedColumnIds(alertDefinition) {
|
|
45
|
-
const queryExpression =
|
|
45
|
+
const queryExpression = this.api.queryLanguageApi.getAdaptableQueryExpression(alertDefinition.Rule);
|
|
46
46
|
if (queryExpression) {
|
|
47
47
|
return this.api.queryLanguageApi.getColumnsFromExpression(queryExpression);
|
|
48
48
|
}
|
|
@@ -54,7 +54,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
54
54
|
return [];
|
|
55
55
|
}
|
|
56
56
|
getReferencedNamedQueryNames(alertDefinition) {
|
|
57
|
-
const queryExpression =
|
|
57
|
+
const queryExpression = this.api.queryLanguageApi.getAdaptableQueryExpression(alertDefinition.Rule);
|
|
58
58
|
if (!queryExpression) {
|
|
59
59
|
return [];
|
|
60
60
|
}
|
|
@@ -27,6 +27,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
27
27
|
for (const freeTextColumn of allFreeTextColumns) {
|
|
28
28
|
if (!freeTextColumn.DataType) {
|
|
29
29
|
const updatedFreeTextColumn = Object.assign(Object.assign({}, freeTextColumn), { DataType: 'String' });
|
|
30
|
+
// FIXME AFL add api method to edit multiple columns in one run
|
|
30
31
|
this.api.freeTextColumnApi.editFreeTextColumn(updatedFreeTextColumn);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -13,7 +13,7 @@ exports.getAlertPreviewViewItems = (alert, api) => {
|
|
|
13
13
|
if (!((_a = alert === null || alert === void 0 ? void 0 : alert.AlertProperties) === null || _a === void 0 ? void 0 : _a.DisplayNotification)) {
|
|
14
14
|
return React.createElement(Tag_1.Tag, null, alert.MessageType);
|
|
15
15
|
}
|
|
16
|
-
return React.createElement(AlertDisplayWizardSection_1.AlertPreview, { style: { maxWidth: 400 }, mt: 2, api: api, alertDefinition: alert });
|
|
16
|
+
return (React.createElement(AlertDisplayWizardSection_1.AlertPreview, { focusFirstButton: false, style: { maxWidth: 400 }, mt: 2, api: api, alertDefinition: alert }));
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getExpressionViewItems: (query:
|
|
1
|
+
import { AdaptableCalculatedColumnQuery } from '../../PredefinedConfig/CalculatedColumnState';
|
|
2
|
+
export declare const getExpressionViewItems: (query: AdaptableCalculatedColumnQuery) => {
|
|
3
3
|
name: string;
|
|
4
4
|
values: string[];
|
|
5
5
|
};
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getExpressionViewItems = void 0;
|
|
4
4
|
exports.getExpressionViewItems = (query) => {
|
|
5
|
+
var _a;
|
|
5
6
|
return {
|
|
6
7
|
name: 'Expression',
|
|
7
|
-
values: [query === null || query === void 0 ? void 0 : query.ScalarExpression],
|
|
8
|
+
values: [(_a = query === null || query === void 0 ? void 0 : query.ScalarExpression) !== null && _a !== void 0 ? _a : query === null || query === void 0 ? void 0 : query.AggregatedScalarExpression],
|
|
8
9
|
};
|
|
9
10
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuleViewItems = void 0;
|
|
4
|
-
const AdaptableQuery_1 = require("../../PredefinedConfig/Common/AdaptableQuery");
|
|
5
4
|
exports.getRuleViewItems = (rule, api) => {
|
|
6
5
|
return {
|
|
7
6
|
name: 'Condition',
|
|
8
7
|
values: [
|
|
9
8
|
rule.Predicate
|
|
10
9
|
? api.predicateApi.predicateToString(rule.Predicate)
|
|
11
|
-
:
|
|
10
|
+
: api.queryLanguageApi.getAdaptableQueryExpression(rule),
|
|
12
11
|
],
|
|
13
12
|
};
|
|
14
13
|
};
|
|
@@ -3,7 +3,8 @@ export declare const ExpressionEditorDocsLink: string;
|
|
|
3
3
|
export declare const BooleanQueryDocsLink: string;
|
|
4
4
|
export declare const ScalarQueryDocsLink: string;
|
|
5
5
|
export declare const ObservableQueryDocsLink: string;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const AggregatedBooleanQueryDocsLink: string;
|
|
7
|
+
export declare const AggregatedScalarQueryDocsLink: string;
|
|
7
8
|
export declare const PredicateDocsLink: string;
|
|
8
9
|
export declare const PrimaryKeyDocsLink: string;
|
|
9
10
|
export declare const LicenseDocsLink: string;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.
|
|
3
|
+
exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = void 0;
|
|
4
4
|
exports.HOST_URL_DOCS = 'https://docs.adaptabletools.com/docs';
|
|
5
5
|
exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/adaptableql/expression-editor`;
|
|
6
6
|
exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptableql/expression/#boolean-expressions`;
|
|
7
7
|
exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptableql/expression/#scalar-expressions`;
|
|
8
8
|
exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptableql/expression/#observable-expressions`;
|
|
9
|
-
exports.
|
|
9
|
+
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptableql/expression/#aggregation-expressions`;
|
|
10
|
+
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptableql/expression/#aggregation-expressions`;
|
|
10
11
|
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/adaptableql/predicate`;
|
|
11
12
|
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/key-topics/primary-key`;
|
|
12
13
|
exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/getting-started/licence`;
|
|
@@ -11,6 +11,7 @@ const observableExpressionFunctions_1 = require("../ExpressionFunctions/observab
|
|
|
11
11
|
const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
|
|
12
12
|
const AdaptablePredicate_1 = require("../../PredefinedConfig/Common/AdaptablePredicate");
|
|
13
13
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
14
|
+
const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
|
|
14
15
|
exports.DefaultAdaptableOptions = {
|
|
15
16
|
adaptableId: GeneralConstants.ADAPTABLE_ID,
|
|
16
17
|
adaptableStateKey: undefined,
|
|
@@ -52,6 +53,21 @@ exports.DefaultAdaptableOptions = {
|
|
|
52
53
|
BackColor: UIHelper_1.getHexForName(UIHelper_1.GRAY),
|
|
53
54
|
},
|
|
54
55
|
},
|
|
56
|
+
adaptableQLOptions: {
|
|
57
|
+
caseSensitiveTextComparisons: false,
|
|
58
|
+
externallyEvaluatedModules: [],
|
|
59
|
+
expressionOptions: {
|
|
60
|
+
defaultBooleanFunctions: booleanExpressionFunctions_1.booleanExpressionFunctions,
|
|
61
|
+
defaultScalarFunctions: scalarExpressionFunctions_1.scalarExpressionFunctions,
|
|
62
|
+
defaultObservableFunctions: observableExpressionFunctions_1.observableExpressionFunctions,
|
|
63
|
+
defaultAggregatedBooleanFunctions: aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions,
|
|
64
|
+
defaultAggregatedScalarFunctions: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions,
|
|
65
|
+
moduleExpressionFunctions: undefined,
|
|
66
|
+
queryableColumns: undefined,
|
|
67
|
+
performExpressionValidation: true,
|
|
68
|
+
maxTimeframeSize: 28800000,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
55
71
|
containerOptions: {
|
|
56
72
|
adaptableContainer: 'adaptable',
|
|
57
73
|
agGridContainer: 'grid',
|
|
@@ -107,7 +123,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
107
123
|
currentCalendar: 'United Kingdom',
|
|
108
124
|
cellSummaryOperations: undefined,
|
|
109
125
|
customSortComparers: undefined,
|
|
110
|
-
caseSensitiveTextComparisons: false,
|
|
111
126
|
},
|
|
112
127
|
layoutOptions: {
|
|
113
128
|
includeExpandedRowGroups: false,
|
|
@@ -155,7 +170,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
155
170
|
},
|
|
156
171
|
searchOptions: {
|
|
157
172
|
excludeColumnFromQuickSearch: undefined,
|
|
158
|
-
serverSearchOptions: undefined,
|
|
159
173
|
clearSearchesOnStartUp: false,
|
|
160
174
|
quickSearchPlaceholder: 'Search',
|
|
161
175
|
filterResultsAfterQuickSearch: false,
|
|
@@ -208,16 +222,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
208
222
|
maxWidth: undefined,
|
|
209
223
|
toolPanelOrder: ['filters', 'columns', 'adaptable'],
|
|
210
224
|
},
|
|
211
|
-
queryLanguageOptions: {
|
|
212
|
-
defaultBooleanFunctions: booleanExpressionFunctions_1.booleanExpressionFunctions,
|
|
213
|
-
defaultScalarFunctions: scalarExpressionFunctions_1.scalarExpressionFunctions,
|
|
214
|
-
defaultObservableFunctions: observableExpressionFunctions_1.observableExpressionFunctions,
|
|
215
|
-
defaultAggregatedBooleanFunctions: aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions,
|
|
216
|
-
moduleExpressionFunctions: undefined,
|
|
217
|
-
queryableColumns: undefined,
|
|
218
|
-
performExpressionValidation: true,
|
|
219
|
-
maxTimeframeSize: 28800000,
|
|
220
|
-
},
|
|
221
225
|
dataChangeHistoryOptions: {
|
|
222
226
|
activeByDefault: false,
|
|
223
227
|
showDataChange: undefined,
|
|
@@ -46,7 +46,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
46
46
|
handler(args, context) {
|
|
47
47
|
return expressionFunctionUtils_1.handleColumnFunction(args, context);
|
|
48
48
|
},
|
|
49
|
-
description: 'References a
|
|
49
|
+
description: 'References a column by its unique identifier',
|
|
50
50
|
signatures: ['[colName]', 'COL(name: string)'],
|
|
51
51
|
examples: ['[col1]', "COL('col1')"],
|
|
52
52
|
},
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
2
|
import { BaseParameter } from './expressionFunctionUtils';
|
|
3
|
-
|
|
3
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
4
|
+
import { AggregateParams } from './scalarAggregationHelper';
|
|
5
|
+
export declare type AggregatedScalarFunctionName = AggregationFunction | OperandFunction;
|
|
6
|
+
declare type AggregationFunction = 'SUM' | 'PERCENTAGE' | 'AVG' | 'MIN' | 'MAX' | 'CUMUL';
|
|
7
|
+
declare type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY';
|
|
8
|
+
export interface AggregationParameter extends BaseParameter<'aggregation', AggregationFunction> {
|
|
9
|
+
value: AggregatedScalarExpressionEvaluation;
|
|
10
|
+
}
|
|
4
11
|
export interface OverParameter extends BaseParameter<'operand', 'OVER'> {
|
|
5
12
|
value: string;
|
|
6
13
|
}
|
|
14
|
+
export interface GroupByParameter extends BaseParameter<'operand', 'GROUP_BY'> {
|
|
15
|
+
value: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AggregatedScalarExpressionEvaluation {
|
|
18
|
+
aggregationParams: AggregateParams<any, string | number>;
|
|
19
|
+
rowValueGetter?: (rowNode: RowNode, aggregationValue: number) => string | number | Date | boolean;
|
|
20
|
+
columnDependencies: string[];
|
|
21
|
+
cumulateOver?: string;
|
|
22
|
+
}
|
|
7
23
|
export declare const aggregatedScalarExpressionFunctions: Record<AggregatedScalarFunctionName, ExpressionFunction>;
|
|
24
|
+
export {};
|