@adaptabletools/adaptable 11.0.0-canary.5 → 11.0.0-canary.6

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 (67) hide show
  1. package/agGrid.d.ts +1 -1
  2. package/agGrid.js +3 -3
  3. package/bundle.cjs.js +117 -117
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/QueryLanguageOptions.d.ts +3 -3
  10. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  11. package/src/Api/AdaptableApi.d.ts +5 -0
  12. package/src/Api/ColumnApi.d.ts +0 -4
  13. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
  14. package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
  15. package/src/Api/Implementation/AlertApiImpl.js +4 -1
  16. package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
  17. package/src/Api/Implementation/ColumnApiImpl.js +0 -5
  18. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -1
  19. package/src/Api/Implementation/QueryLanguageApiImpl.js +2 -2
  20. package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
  21. package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
  22. package/src/Api/QueryLanguageApi.d.ts +10 -10
  23. package/src/Api/SettingsPanelApi.d.ts +17 -0
  24. package/src/Api/SettingsPanelApi.js +2 -0
  25. package/src/PredefinedConfig/AlertState.d.ts +2 -2
  26. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -4
  27. package/src/PredefinedConfig/Common/AdaptableQuery.js +3 -3
  28. package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
  29. package/src/PredefinedConfig/Common/Enums.js +0 -2
  30. package/src/Strategy/AlertModule.js +9 -0
  31. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -2
  32. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
  33. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +3 -3
  34. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +7 -0
  35. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +42 -0
  36. package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
  37. package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
  38. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +36 -0
  39. package/src/Utilities/ExpressionFunctions/groupingMap.js +104 -0
  40. package/src/Utilities/Services/AlertService.js +3 -3
  41. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -2
  42. package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
  43. package/src/Utilities/Services/QueryLanguageService.js +6 -6
  44. package/src/View/AdaptableWizardView/helper.js +2 -2
  45. package/src/View/Alert/Wizard/AlertWizard.js +2 -2
  46. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -2
  47. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
  48. package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
  49. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
  50. package/src/View/Components/EntityRulesEditor/index.js +9 -9
  51. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
  52. package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
  53. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +2 -2
  54. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  55. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  56. package/src/View/Query/Wizard/NamedQueryWizard.js +3 -3
  57. package/src/agGrid/Adaptable.js +1 -2
  58. package/src/agGrid/agGridHelper.js +1 -5
  59. package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
  60. package/src/components/ExpressionEditor/EditorInputReactive.js +1 -1
  61. package/src/components/ExpressionEditor/index.d.ts +1 -1
  62. package/src/components/ExpressionEditor/index.js +3 -3
  63. package/src/metamodel/adaptable.metamodel.d.ts +11 -0
  64. package/src/metamodel/adaptable.metamodel.js +36 -16
  65. package/src/types.d.ts +2 -1
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "11.0.0-canary.5",
3
+ "version": "11.0.0-canary.6",
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: 1645013151802;
1
+ declare const _default: 1645166555862;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1645013151802;
3
+ exports.default = 1645166555862;
@@ -72,7 +72,7 @@ export interface AdaptableOptions {
72
72
  */
73
73
  userName?: string;
74
74
  /**
75
- * The AG Grid object which AdapTable interacts with. Note: if using React or Angular Wrapper, no need to populate this property as AdapTable wires it up differently
75
+ * The AG Grid object which AdapTable interacts with. Note: if using AdapTable React or AdapTable Angular, no need to populate this property as AdapTable wires it up differently
76
76
  *
77
77
  * @defaultValue n/a (Mandatory)
78
78
  */
@@ -17,7 +17,7 @@ export interface ContainerOptions {
17
17
  */
18
18
  agGridContainer?: string | HTMLElement;
19
19
  /**
20
- * how long AdapTable waits for AG Grid before giving up connecting to it; useful when AG Grid is instantiated separately (eg: by React or Angular Wrappers)
20
+ * how long AdapTable waits for AG Grid before giving up connecting to it; useful when AG Grid is instantiated separately (eg: by AdapTable React or AdapTable Angular)
21
21
  *
22
22
  * @defaultValue 60s
23
23
  * @gridInfoItem
@@ -26,12 +26,12 @@ export interface QueryLanguageOptions {
26
26
  */
27
27
  defaultObservableFunctions?: ExpressionFunctionMap;
28
28
  /**
29
- * Aggregation Expression Functions available in AdapTableQL
29
+ * Aggregated Boolean Expression Functions available in AdapTableQL
30
30
  *
31
31
  * @defaultValue null (sets all)
32
32
  * @gridInfoItem
33
33
  */
34
- defaultAggregationFunctions?: ExpressionFunctionMap;
34
+ defaultAggregatedBooleanFunctions?: ExpressionFunctionMap;
35
35
  /**
36
36
  * Module specific ExpressionFunctions; if not defined, it falls back to the defined default values
37
37
  *
@@ -70,5 +70,5 @@ export interface ModuleExpressionFunctions {
70
70
  booleanFunctions?: ExpressionFunctionMap;
71
71
  scalarFunctions?: ExpressionFunctionMap;
72
72
  observableFunctions?: ExpressionFunctionMap;
73
- aggregationFunctions?: ExpressionFunctionMap;
73
+ aggregatedBooleanFunctions?: ExpressionFunctionMap;
74
74
  }
@@ -89,7 +89,7 @@ export interface UserInterfaceOptions {
89
89
  /**
90
90
  * Which sections to show in the Grid Info Screen
91
91
  *
92
- * @defaultValue ['GridSummary', 'AdaptableOptions','ColumnInfo']
92
+ * @defaultValue ['GridSummary', 'AdaptableOptions', 'ColumnInfo']
93
93
  */
94
94
  gridInfoSections?: GridInfoSections;
95
95
  }
@@ -35,6 +35,7 @@ import { PredicateApi } from './PredicateApi';
35
35
  import { DataChangeHistoryApi } from './DataChangeHistoryApi';
36
36
  import { FlashingCellApi } from './FlashingCellApi';
37
37
  import { ChartingApi } from './ChartingApi';
38
+ import { SettingsPanelApi } from './SettingsPanelApi';
38
39
  /**
39
40
  *
40
41
  * The `AdaptableApi` provides developers with run-time access to AdapTable.
@@ -147,6 +148,10 @@ export interface AdaptableApi {
147
148
  * Provides access to the Schedule Module
148
149
  */
149
150
  scheduleApi: ScheduleApi;
151
+ /**
152
+ * Provides access to the Settings Panel
153
+ */
154
+ settingsPanelApi: SettingsPanelApi;
150
155
  /**
151
156
  * Manages the `Scope` object - used widely to determine where objects are applied
152
157
  */
@@ -35,10 +35,6 @@ export interface ColumnApi {
35
35
  * Returns all boolean Columns
36
36
  */
37
37
  getBooleanColumns(): AdaptableColumn[];
38
- /**
39
- * Returns all numeric array Columns
40
- */
41
- getNumericArrayColumns(): AdaptableColumn[];
42
38
  /**
43
39
  * Returns all Sortable Columns
44
40
  */
@@ -1,5 +1,5 @@
1
1
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
2
- import { AdaptableApi } from '../../types';
2
+ import { AdaptableApi, SettingsPanelApi } from '../../types';
3
3
  import { AlertApi } from '../AlertApi';
4
4
  import { BulkUpdateApi } from '../BulkUpdateApi';
5
5
  import { CalculatedColumnApi } from '../CalculatedColumnApi';
@@ -71,6 +71,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
71
71
  userInterfaceApi: UserInterfaceApi;
72
72
  queryApi: QueryApi;
73
73
  queryLanguageApi: QueryLanguageApi;
74
+ settingsPanelApi: SettingsPanelApi;
74
75
  toolPanelApi: ToolPanelApi;
75
76
  teamSharingApi: TeamSharingApi;
76
77
  scopeApi: ScopeApi;
@@ -38,6 +38,7 @@ const DataChangeHistoryApiImpl_1 = require("./DataChangeHistoryApiImpl");
38
38
  const QueryLanguageApiImpl_1 = require("./QueryLanguageApiImpl");
39
39
  const FlashingCellApiImpl_1 = require("./FlashingCellApiImpl");
40
40
  const ChartingApiImpl_1 = require("./ChartingApiImpl");
41
+ const SettingsPanelApiImpl_1 = require("./SettingsPanelApiImpl");
41
42
  class AdaptableApiImpl {
42
43
  constructor(adaptable) {
43
44
  this.adaptable = adaptable;
@@ -69,6 +70,7 @@ class AdaptableApiImpl {
69
70
  this.smartEditApi = new SmartEditApiImpl_1.SmartEditApiImpl(adaptable);
70
71
  this.filterApi = new FilterApiImpl_1.FilterApiImpl(adaptable);
71
72
  this.systemStatusApi = new SystemStatusApiImpl_1.SystemStatusApiImpl(adaptable);
73
+ this.settingsPanelApi = new SettingsPanelApiImpl_1.SettingsPanelApiImpl(adaptable);
72
74
  this.themeApi = new ThemeApiImpl_1.ThemeApiImpl(adaptable);
73
75
  this.userInterfaceApi = new UserInterfaceApiImpl_1.UserInterfaceApiImpl(adaptable);
74
76
  this.queryApi = new QueryApiImpl_1.QueryApiImpl(adaptable);
@@ -79,10 +79,13 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
79
79
  switch (highhlightType) {
80
80
  case 'Error':
81
81
  backgroundColor = 'var(--ab-color-error)';
82
+ break;
82
83
  case 'Info':
83
84
  backgroundColor = 'var(--ab-color-info)';
85
+ break;
84
86
  case 'Success':
85
87
  backgroundColor = 'var(--ab-color-success)';
88
+ break;
86
89
  case 'Warning':
87
90
  backgroundColor = 'var(--ab-color-warn)';
88
91
  }
@@ -266,7 +269,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
266
269
  var _a, _b;
267
270
  let ruleDescription = alert.Rule.Predicate
268
271
  ? this.adaptable.api.predicateApi.predicateToString(alert.Rule.Predicate)
269
- : (_b = (_a = alert.Rule.BooleanExpression) !== null && _a !== void 0 ? _a : alert.Rule.ObservableExpression) !== null && _b !== void 0 ? _b : alert.Rule.AggregationExpression;
272
+ : (_b = (_a = alert.Rule.BooleanExpression) !== null && _a !== void 0 ? _a : alert.Rule.ObservableExpression) !== null && _b !== void 0 ? _b : alert.Rule.AggregatedBooleanExpression;
270
273
  return ruleDescription;
271
274
  }
272
275
  }
@@ -42,7 +42,6 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
42
42
  getColumnFromFriendlyName(columnName: string, logWarning?: boolean): AdaptableColumn;
43
43
  getColumnsOfType(dataType: DataType): AdaptableColumn[];
44
44
  getNumericColumns(): AdaptableColumn[];
45
- getNumericArrayColumns(): AdaptableColumn[];
46
45
  getStringColumns(): AdaptableColumn[];
47
46
  getDateColumns(): AdaptableColumn[];
48
47
  getBooleanColumns(): AdaptableColumn[];
@@ -224,8 +224,6 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
224
224
  return this.getDateColumns();
225
225
  case Enums_1.DataType.Number:
226
226
  return this.getNumericColumns();
227
- case Enums_1.DataType.NumberArray:
228
- return this.getNumericArrayColumns();
229
227
  case Enums_1.DataType.String:
230
228
  return this.getStringColumns();
231
229
  default:
@@ -235,9 +233,6 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
235
233
  getNumericColumns() {
236
234
  return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.Number);
237
235
  }
238
- getNumericArrayColumns() {
239
- return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.NumberArray);
240
- }
241
236
  getStringColumns() {
242
237
  return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.String);
243
238
  }
@@ -5,7 +5,7 @@ import { ExpressionFunctionMap } from '../../types';
5
5
  export declare class QueryLanguageApiImpl extends ApiBase implements QueryLanguageApi {
6
6
  isValidBooleanExpression(query: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
7
7
  isValidObservableExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
8
- isValidAggregationExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
8
+ isValidAggregatedBooleanExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
9
9
  getASTForExpression(query: string): any;
10
10
  getColumnsFromExpression(expression: string): string[];
11
11
  getQueryableColumnIds(): string[] | undefined;
@@ -25,10 +25,10 @@ class QueryLanguageApiImpl extends ApiBase_1.ApiBase {
25
25
  }
26
26
  return isValid;
27
27
  }
28
- isValidAggregationExpression(expression, module, validationErrorMessage) {
28
+ isValidAggregatedBooleanExpression(expression, module, validationErrorMessage) {
29
29
  const { isValid, errorMessage } = this.adaptable.api.internalApi
30
30
  .getQueryLanguageService()
31
- .validateAggregation(expression, module);
31
+ .validateAggregatedBoolean(expression, module);
32
32
  if (!isValid && validationErrorMessage) {
33
33
  LoggingHelper_1.LogAdaptableWarning(`${validationErrorMessage} :: ${errorMessage}`);
34
34
  }
@@ -0,0 +1,7 @@
1
+ import { SettingsPanelApi } from '../SettingsPanelApi';
2
+ import { ApiBase } from './ApiBase';
3
+ import { AdaptableModule } from '../../../types';
4
+ export declare class SettingsPanelApiImpl extends ApiBase implements SettingsPanelApi {
5
+ showSettingsPanel(moduleName?: AdaptableModule): void;
6
+ showCustomSettingsPanel(name: string): void;
7
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsPanelApiImpl = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ApiBase_1 = require("./ApiBase");
6
+ const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
7
+ class SettingsPanelApiImpl extends ApiBase_1.ApiBase {
8
+ showSettingsPanel(moduleName) {
9
+ this.dispatchAction(PopupRedux.PopupShowScreen(moduleName));
10
+ }
11
+ showCustomSettingsPanel(name) {
12
+ this.dispatchAction(PopupRedux.PopupShowScreen('CustomSettingsPanelModule', name));
13
+ }
14
+ }
15
+ exports.SettingsPanelApiImpl = SettingsPanelApiImpl;
@@ -13,21 +13,21 @@ export interface QueryLanguageApi {
13
13
  isValidBooleanExpression(query: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
14
14
  /**
15
15
  * Whether the given ObservableExpression is valid
16
- * @param query query to Check
17
- * @param module module specific query
18
- * @param validationErrorMessage optional validation error message; if provided, the error will be logged
16
+ * @param expression - ObservableExpression to check
17
+ * @param module - module specific query
18
+ * @param validationErrorMessage - optional validation error message; if provided, the error will be logged
19
19
  */
20
20
  isValidObservableExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
21
21
  /**
22
- * Whether the given AggregationExpression is valid
23
- * @param query query to Check
24
- * @param module module specific query
25
- * @param validationErrorMessage optional validation error message; if provided, the error will be logged
22
+ * Whether the given AggregatedBooleanExpression is valid
23
+ * @param expression - AggregatedBooleanExpression to check
24
+ * @param module - module specific query
25
+ * @param validationErrorMessage - optional validation error message; if provided, the error will be logged
26
26
  */
27
- isValidAggregationExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
27
+ isValidAggregatedBooleanExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
28
28
  /**
29
- * Returns all Columns referenced in a Query
30
- * @param adaptableQuery Query to check
29
+ * Returns all Columns referenced in a QueryExpression
30
+ * @param expression - expression to check
31
31
  */
32
32
  getColumnsFromExpression(expression: string): string[];
33
33
  /**
@@ -0,0 +1,17 @@
1
+ import { AdaptableModule } from '../../types';
2
+ /**
3
+ * Provides run-time access to the Settings Panel
4
+ **/
5
+ export interface SettingsPanelApi {
6
+ /**
7
+ * Opens settings panel to specified module,
8
+ * when not specified it opens the first available module
9
+ * @param moduleName module name
10
+ */
11
+ showSettingsPanel(moduleName?: AdaptableModule): void;
12
+ /**
13
+ * Opens a the settings panel to the custom module
14
+ * @param name name of the custom settings panel
15
+ */
16
+ showCustomSettingsPanel(name: string): void;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,7 +8,7 @@ import { AdaptableButton, ButtonContext } from './Common/AdaptableButton';
8
8
  import { SuspendableObject } from './Common/SuspendableObject';
9
9
  import { AdaptableStyle } from './Common/AdaptableStyle';
10
10
  import { XOR } from '../Utilities/Extensions/TypeExtensions';
11
- import { AdaptableAggregationQuery, AdaptableBooleanQuery, AdaptableObservableQuery } from './Common/AdaptableQuery';
11
+ import { AdaptableAggregatedBooleanQuery, AdaptableBooleanQuery, AdaptableObservableQuery } from './Common/AdaptableQuery';
12
12
  import { ButtonStyle } from './Common/ButtonStyle';
13
13
  import { AlertButtonContext } from '../types';
14
14
  /**
@@ -60,7 +60,7 @@ export interface AlertDefinitionPredicate extends AdaptablePredicate {
60
60
  */
61
61
  export declare type AlertRule = XOR<{
62
62
  Predicate: AlertDefinitionPredicate;
63
- }, XOR<AdaptableBooleanQuery, XOR<AdaptableObservableQuery, AdaptableAggregationQuery>>>;
63
+ }, XOR<AdaptableBooleanQuery, XOR<AdaptableObservableQuery, AdaptableAggregatedBooleanQuery>>>;
64
64
  export declare type AdaptableAlertAction = 'highlight-cell' | 'jump-to-cell' | 'jump-to-row' | 'jump-to-column' | 'suspend' | 'undo';
65
65
  /**
66
66
  * Defines a button that appears in an Alert Form
@@ -8,12 +8,15 @@ export interface AdaptableScalarQuery {
8
8
  export interface AdaptableObservableQuery {
9
9
  ObservableExpression: string;
10
10
  }
11
- export interface AdaptableAggregationQuery {
12
- AggregationExpression: string;
11
+ export interface AdaptableAggregatedBooleanQuery {
12
+ AggregatedBooleanExpression: string;
13
+ }
14
+ export interface AdaptableAggregatedScalarQuery {
15
+ AggregatedScalarExpression: string;
13
16
  }
14
17
  /**
15
- * An AdaptableQuery can be either a Boolean, Scalar, Observable or Aggregation expression
18
+ * An AdaptableQuery can be either a Boolean, Scalar, Observable, AggregatedBoolean, or AggregatedScalar expression
16
19
  */
17
- export declare type AdaptableQuery = XOR<AdaptableBooleanQuery, XOR<AdaptableScalarQuery, XOR<AdaptableObservableQuery, AdaptableAggregationQuery>>>;
20
+ export declare type AdaptableQuery = XOR<AdaptableBooleanQuery, XOR<AdaptableScalarQuery, XOR<AdaptableObservableQuery, XOR<AdaptableAggregatedBooleanQuery, AdaptableAggregatedScalarQuery>>>>;
18
21
  export declare const getAdaptableQueryExpression: (query: Partial<AdaptableQuery>) => string | undefined;
19
22
  export declare const isReactiveQuery: (query: Partial<AdaptableQuery>) => boolean;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isReactiveQuery = exports.getAdaptableQueryExpression = void 0;
4
4
  exports.getAdaptableQueryExpression = (query) => {
5
- var _a, _b, _c;
6
- return ((_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.AggregationExpression);
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
7
  };
8
8
  exports.isReactiveQuery = (query) => {
9
- return !!query.ObservableExpression || !!query.AggregationExpression;
9
+ return !!query.ObservableExpression || !!query.AggregatedBooleanExpression;
10
10
  };
@@ -1,7 +1,6 @@
1
1
  export declare enum DataType {
2
2
  String = "String",
3
3
  Number = "Number",
4
- NumberArray = "NumberArray",
5
4
  Boolean = "Boolean",
6
5
  Date = "Date",
7
6
  Object = "Object",
@@ -6,8 +6,6 @@ var DataType;
6
6
  (function (DataType) {
7
7
  DataType["String"] = "String";
8
8
  DataType["Number"] = "Number";
9
- // FIXME AFL keep it or extend it to support https://www.ag-grid.com/javascript-data-grid/sparklines-data/ ?
10
- DataType["NumberArray"] = "NumberArray";
11
9
  DataType["Boolean"] = "Boolean";
12
10
  DataType["Date"] = "Date";
13
11
  DataType["Object"] = "Object";
@@ -63,6 +63,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
63
63
  return this.api.queryApi.getReferencedNamedQueryNames(queryExpression);
64
64
  }
65
65
  updateOldConfig() {
66
+ var _a;
66
67
  // 1. Make all (new) Flashing Alerts have a Predicate if none exists
67
68
  const alertState = this.api.alertApi.getAlertState();
68
69
  const flashingAlertDefinitions = alertState.FlashingAlertDefinitions;
@@ -73,6 +74,14 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
73
74
  // TODO: state does not clear
74
75
  this.api.internalApi.clearFlashingCellState();
75
76
  }
77
+ //migrate alert definitions with `AggregationExpression` (now `AggregatedBooleanExpression`)
78
+ (_a = alertState.AlertDefinitions) === null || _a === void 0 ? void 0 : _a.forEach((alertDefinition) => {
79
+ // @ts-ignore
80
+ const obsoleteAggregationExpression = alertDefinition.Rule['AggregationExpression'];
81
+ if (obsoleteAggregationExpression) {
82
+ alertDefinition.Rule.AggregatedBooleanExpression = obsoleteAggregationExpression;
83
+ }
84
+ });
76
85
  }
77
86
  addContextMenuItems(menuContext) {
78
87
  const items = [];
@@ -8,7 +8,7 @@ const UIHelper_1 = tslib_1.__importStar(require("../../View/UIHelper"));
8
8
  const booleanExpressionFunctions_1 = require("../ExpressionFunctions/booleanExpressionFunctions");
9
9
  const scalarExpressionFunctions_1 = require("../ExpressionFunctions/scalarExpressionFunctions");
10
10
  const observableExpressionFunctions_1 = require("../ExpressionFunctions/observableExpressionFunctions");
11
- const aggregationExpressionFunctions_1 = require("../ExpressionFunctions/aggregationExpressionFunctions");
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
14
  exports.DefaultAdaptableOptions = {
@@ -212,7 +212,7 @@ exports.DefaultAdaptableOptions = {
212
212
  defaultBooleanFunctions: booleanExpressionFunctions_1.booleanExpressionFunctions,
213
213
  defaultScalarFunctions: scalarExpressionFunctions_1.scalarExpressionFunctions,
214
214
  defaultObservableFunctions: observableExpressionFunctions_1.observableExpressionFunctions,
215
- defaultAggregationFunctions: aggregationExpressionFunctions_1.aggregationExpressionFunctions,
215
+ defaultAggregatedBooleanFunctions: aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions,
216
216
  moduleExpressionFunctions: undefined,
217
217
  queryableColumns: undefined,
218
218
  performExpressionValidation: true,
@@ -2,5 +2,5 @@ import { ExpressionFunction } from '../../parser/src/types';
2
2
  declare type AggregationFunctionName = 'WHERE' | 'COL' | AggregationFunction | ComparisonFunction;
3
3
  declare type AggregationFunction = 'SUM';
4
4
  declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
5
- export declare const aggregationExpressionFunctions: Record<AggregationFunctionName, ExpressionFunction>;
5
+ export declare const aggregatedBooleanExpressionFunctions: Record<AggregationFunctionName, ExpressionFunction>;
6
6
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.aggregationExpressionFunctions = void 0;
3
+ exports.aggregatedBooleanExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const rxjs_1 = require("rxjs");
6
6
  const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
@@ -14,7 +14,7 @@ const aggregationScalarOperandMap = {
14
14
  // 1. block containing a numeric value (any digits) (required)
15
15
  // 2. block containing a single 'K', 'M' or 'B' letter (optional) (case insensitive)
16
16
  const CRITERIA_REGEX = /^(?:\s*)(\d+)(K|M|B)?$/i;
17
- exports.aggregationExpressionFunctions = {
17
+ exports.aggregatedBooleanExpressionFunctions = {
18
18
  WHERE: {
19
19
  handler(args, context) {
20
20
  return expressionFunctionUtils_1.handleWhereFunction(args, context);
@@ -55,7 +55,7 @@ exports.aggregationExpressionFunctions = {
55
55
  return handleAggregationCondition(args, context, '=', (aggregatedValue, conditionValue) => aggregatedValue === conditionValue);
56
56
  },
57
57
  isHiddenFromMenu: true,
58
- description: 'Evaluates if the aggregation result is equals a numerical value defined either as a number or a string abbreviation for thousands(K), millions(M) or billions(B)',
58
+ description: 'Evaluates if the aggregation result equals a numerical value defined either as a number or a string abbreviation for thousands(K), millions(M) or billions(B)',
59
59
  signatures: [
60
60
  'SUM() = number',
61
61
  `SUM() = '%number%(K|M|B)'`,
@@ -0,0 +1,7 @@
1
+ import { ExpressionFunction } from '../../parser/src/types';
2
+ import { BaseParameter } from './expressionFunctionUtils';
3
+ export declare type AggregatedScalarFunctionName = 'CUMSUM' | 'OVER' | 'COL';
4
+ export interface OverParameter extends BaseParameter<'operand', 'OVER'> {
5
+ value: string;
6
+ }
7
+ export declare const aggregatedScalarExpressionFunctions: Record<AggregatedScalarFunctionName, ExpressionFunction>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aggregatedScalarExpressionFunctions = void 0;
4
+ const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
5
+ exports.aggregatedScalarExpressionFunctions = {
6
+ CUMSUM: {
7
+ handler(args, context) {
8
+ const cumulatedColumnParameter = expressionFunctionUtils_1.extractColumnParameter('SUM', args);
9
+ expressionFunctionUtils_1.validateColumnType(cumulatedColumnParameter.value, ['Number'], 'CUMSUM', context.api);
10
+ const overColumnParameter = expressionFunctionUtils_1.extractParameter('CUMSUM', 'operand', ['OVER'], args);
11
+ // sort over all rowNodes by overColumn
12
+ // cumulate
13
+ //save to map
14
+ },
15
+ description: 'TODO',
16
+ signatures: ['TODO'],
17
+ examples: ['TODO'],
18
+ },
19
+ OVER: {
20
+ handler(args, context) {
21
+ const columnParameter = expressionFunctionUtils_1.extractColumnParameter('OVER', args);
22
+ expressionFunctionUtils_1.validateColumnType(columnParameter.value, ['Number', 'Date'], 'OVER', context.api);
23
+ const result = {
24
+ type: 'operand',
25
+ name: 'OVER',
26
+ value: columnParameter.value,
27
+ };
28
+ return result;
29
+ },
30
+ description: 'TODO',
31
+ signatures: ['TODO'],
32
+ examples: ['TODO'],
33
+ },
34
+ COL: {
35
+ handler(args, context) {
36
+ return expressionFunctionUtils_1.handleColumnFunction(args, context);
37
+ },
38
+ description: 'Returns the value of a column',
39
+ signatures: ['[colName]', 'COL(name: string)'],
40
+ examples: ['[col1]', 'COL("col1")'],
41
+ },
42
+ };
@@ -0,0 +1,35 @@
1
+ declare type VoidFn = () => void;
2
+ declare type Pair<KeyType, ValueType> = {
3
+ value?: ValueType;
4
+ map?: Map<KeyType, Pair<KeyType, ValueType>>;
5
+ revision?: number;
6
+ };
7
+ export declare type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn) => void;
8
+ export declare class DeepMap<KeyType, ValueType> {
9
+ private map;
10
+ private length;
11
+ private revision;
12
+ static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
13
+ constructor(initial?: [KeyType[], ValueType][]);
14
+ set(keys: KeyType[] & {
15
+ length: Omit<number, 0>;
16
+ }, value: ValueType): this;
17
+ get(keys: KeyType[]): ValueType | undefined;
18
+ get size(): number;
19
+ clear(): void;
20
+ delete(keys: KeyType[]): boolean;
21
+ has(keys: KeyType[]): boolean;
22
+ private visitKey;
23
+ visit: (fn: DeepMapVisitFn<KeyType, ValueType>) => void;
24
+ visitDepthFirst: (fn: (value: ValueType, keys: KeyType[], indexInGroup: number, next?: VoidFn) => void) => void;
25
+ private visitWithNext;
26
+ private getArray;
27
+ values(): Generator<ValueType, void, unknown>;
28
+ keys(): Generator<KeyType[], void, unknown>;
29
+ entries(): Generator<[KeyType[], ValueType], void, unknown>;
30
+ topDownEntries(): [KeyType[], ValueType][];
31
+ topDownKeys(): KeyType[][];
32
+ topDownValues(): ValueType[];
33
+ private sortedIterator;
34
+ }
35
+ export {};