@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.
Files changed (118) hide show
  1. package/agGrid.d.ts +5 -4
  2. package/agGrid.js +7 -5
  3. package/base.css +2 -2
  4. package/bundle.cjs.js +120 -115
  5. package/index.css +2 -2
  6. package/package.json +1 -1
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
  10. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -5
  11. package/src/AdaptableOptions/{QueryLanguageOptions.d.ts → AdaptableQLOptions.d.ts} +31 -2
  12. package/src/AdaptableOptions/{QueryLanguageOptions.js → AdaptableQLOptions.js} +0 -0
  13. package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
  14. package/src/AdaptableOptions/SearchOptions.d.ts +0 -9
  15. package/src/AdaptableOptions/StateOptions.d.ts +7 -7
  16. package/src/Api/CalculatedColumnApi.d.ts +2 -9
  17. package/src/Api/GridApi.d.ts +11 -1
  18. package/src/Api/Implementation/ApiBase.d.ts +3 -2
  19. package/src/Api/Implementation/ApiBase.js +5 -2
  20. package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -4
  21. package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
  22. package/src/Api/Implementation/GridApiImpl.js +27 -4
  23. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -3
  24. package/src/Api/Implementation/InternalApiImpl.js +5 -4
  25. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +3 -0
  26. package/src/Api/Implementation/QueryLanguageApiImpl.js +15 -2
  27. package/src/Api/InternalApi.d.ts +2 -3
  28. package/src/Api/QueryApi.d.ts +2 -2
  29. package/src/Api/QueryLanguageApi.d.ts +13 -0
  30. package/src/Api/SettingsPanelApi.d.ts +4 -5
  31. package/src/PredefinedConfig/AlertState.d.ts +5 -1
  32. package/src/PredefinedConfig/CalculatedColumnState.d.ts +8 -3
  33. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +0 -1
  34. package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -5
  35. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
  36. package/src/PredefinedConfig/Common/Types.d.ts +2 -0
  37. package/src/PredefinedConfig/Common/Types.js +1 -0
  38. package/src/PredefinedConfig/Selection/GridCellRange.d.ts +3 -1
  39. package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
  40. package/src/Redux/Store/AdaptableStore.js +27 -2
  41. package/src/Strategy/AlertModule.js +3 -3
  42. package/src/Strategy/CalculatedColumnModule.js +4 -4
  43. package/src/Strategy/ChartingModule.d.ts +3 -3
  44. package/src/Strategy/ChartingModule.js +2 -2
  45. package/src/Strategy/FlashingCellModule.js +2 -2
  46. package/src/Strategy/FreeTextColumnModule.js +1 -0
  47. package/src/Strategy/{SetingsPanelModule.d.ts → SettingsPanelModule.d.ts} +0 -0
  48. package/src/Strategy/{SetingsPanelModule.js → SettingsPanelModule.js} +0 -0
  49. package/src/Strategy/Utilities/getAlertPreviewViewItems.js +1 -1
  50. package/src/Strategy/Utilities/getExpressionViewItems.d.ts +2 -2
  51. package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
  52. package/src/Strategy/Utilities/getRuleViewItems.js +1 -2
  53. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -1
  54. package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -2
  55. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +16 -12
  56. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  57. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +18 -1
  58. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +311 -14
  59. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  60. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +8 -8
  61. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +2 -3
  62. package/src/Utilities/ExpressionFunctions/groupingMap.js +3 -2
  63. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  64. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +33 -0
  65. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +154 -0
  66. package/src/Utilities/Helpers/AdaptableHelper.js +2 -1
  67. package/src/Utilities/Services/AlertService.js +5 -1
  68. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +7 -3
  69. package/src/Utilities/Services/CalculatedColumnExpressionService.js +143 -18
  70. package/src/Utilities/Services/Interface/IAdaptableService.d.ts +1 -1
  71. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +6 -3
  72. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +7 -1
  73. package/src/Utilities/Services/LicenseService.js +1 -1
  74. package/src/Utilities/Services/QueryLanguageService.d.ts +9 -2
  75. package/src/Utilities/Services/QueryLanguageService.js +81 -22
  76. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -3
  77. package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +1 -0
  78. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -2
  79. package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +3 -3
  80. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +2 -4
  81. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +43 -12
  82. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -2
  83. package/src/View/ColorPicker.d.ts +1 -1
  84. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  85. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  86. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  87. package/src/View/Components/EntityRulesEditor/index.js +2 -3
  88. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  89. package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
  90. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +1 -0
  91. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  92. package/src/View/Components/ValueSelector/index.js +1 -1
  93. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  94. package/src/View/License/LicenseWatermark.js +1 -1
  95. package/src/agGrid/Adaptable.d.ts +1 -0
  96. package/src/agGrid/Adaptable.js +16 -14
  97. package/src/agGrid/agGridHelper.js +2 -2
  98. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +4 -2
  99. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +4 -4
  100. package/src/components/Datepicker/index.d.ts +1 -1
  101. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  102. package/src/components/ExpressionEditor/EditorInput.js +5 -2
  103. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  104. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.d.ts +2 -0
  105. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +45 -0
  106. package/src/components/ExpressionEditor/editorButtonsReactive.js +8 -13
  107. package/src/components/ExpressionEditor/index.d.ts +2 -1
  108. package/src/components/ExpressionEditor/index.js +9 -2
  109. package/src/components/Input/index.d.ts +1 -1
  110. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  111. package/src/components/Logo/index.js +8 -7
  112. package/src/components/PopupWithFooter.d.ts +1 -1
  113. package/src/components/Textarea/index.d.ts +1 -1
  114. package/src/metamodel/adaptable.metamodel.d.ts +41 -37
  115. package/src/metamodel/adaptable.metamodel.js +156 -133
  116. package/src/types.d.ts +5 -5
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
package/index.css CHANGED
@@ -3254,7 +3254,7 @@ input[type='number'].ab-Input:hover::-webkit-inner-spin-button:active {
3254
3254
  position: relative;
3255
3255
  display: inline-block;
3256
3256
  min-width: 40px;
3257
- width: 87px;
3257
+ width: 77px;
3258
3258
  height: 32px; }
3259
3259
 
3260
3260
  .ab-ToggleButton:hover:not(.ab-ToggleButton--disabled) {
@@ -3292,7 +3292,7 @@ input[type='number'].ab-Input:hover::-webkit-inner-spin-button:active {
3292
3292
  background-color: var(--ab-cmp-toggle-button--active__background); }
3293
3293
 
3294
3294
  .ab-ToggleButton__input:checked + .ab-ToggleButton__slider:before {
3295
- transform: translateX(54px); }
3295
+ transform: translateX(45px); }
3296
3296
 
3297
3297
  .ab-ToggleButton__input:focus + .ab-ToggleButton__slider {
3298
3298
  box-shadow: var(--ab-focus__box-shadow); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "11.0.0-canary.6",
3
+ "version": "11.0.0-canary.7",
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: 1645166555862;
1
+ declare const _default: 1645536652959;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1645166555862;
3
+ exports.default = 1645536652959;
@@ -158,6 +158,7 @@ export interface IAdaptable {
158
158
  getDataRowFromRowNode(rowNode: RowNode): any;
159
159
  getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
160
160
  getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
161
+ getRowNodeByIndex(index: number): RowNode;
161
162
  forPlugins(callback: (plugin: AdaptablePlugin) => any): void;
162
163
  lookupPlugins(propertyName: string, ...args: any): any;
163
164
  getPluginProperty(pluginId: string, propertyName: string, ...args: any): any;
@@ -16,12 +16,12 @@ import { NotificationsOptions } from './NotificationsOptions';
16
16
  import { DashboardOptions } from './DashboardOptions';
17
17
  import { ToolPanelOptions } from './ToolPanelOptions';
18
18
  import { FilterOptions } from './FilterOptions';
19
- import { QueryLanguageOptions } from './QueryLanguageOptions';
20
19
  import { DataChangeHistoryOptions } from './DataChangeHistoryOptions';
21
20
  import { SettingsPanelOptions } from './SettingsPanelOptions';
22
21
  import { GridOptions, Module } from '@ag-grid-community/all-modules';
23
22
  import { FlashingCellOptions } from './FlashingCellOptions';
24
23
  import { AlertOptions } from './AlertOptions';
24
+ import { AdaptableQLOptions } from './AdaptableQLOptions';
25
25
  /**
26
26
  * Group of property options enabling developers to set up AdapTable at design time to fit precise requirements - provides AG Grid, Predefined Config and other information required to ensure a full, rich user experience
27
27
  */
@@ -180,11 +180,9 @@ export interface AdaptableOptions {
180
180
  */
181
181
  toolPanelOptions?: ToolPanelOptions;
182
182
  /**
183
- * Options for managing queries in AdapTableQL
184
- *
185
- * @gridInfoContainer
183
+ * Options for managing AdapTableQL
186
184
  */
187
- queryLanguageOptions?: QueryLanguageOptions;
185
+ adaptableQLOptions?: AdaptableQLOptions;
188
186
  /**
189
187
  * Options to manage Data Change History Module which provides an overview of all data changes
190
188
  *
@@ -1,9 +1,30 @@
1
1
  import { ExpressionFunctionMap } from '../parser/src/types';
2
- import { AdaptableModule } from '../PredefinedConfig/Common/Types';
2
+ import { AdaptableModule, AdaptableQLModules } from '../PredefinedConfig/Common/Types';
3
+ export interface AdaptableQLOptions {
4
+ /**
5
+ * Perform case-sensitive text comparisons in all search and filter operations: QuickSearch, Filters, Query, Predicates
6
+ *
7
+ * @defaultValue false
8
+ * @gridInfoItem
9
+ */
10
+ caseSensitiveTextComparisons?: boolean;
11
+ /**
12
+ * Which searching and filtering options should take place on server
13
+ *
14
+ * @defaultValue undefined
15
+ * @gridInfoItem
16
+ */
17
+ externallyEvaluatedModules?: AdaptableQLModules;
18
+ /**
19
+ * Options for managing Expressions in AdapTableQL
20
+ *
21
+ */
22
+ expressionOptions?: ExpressionOptions;
23
+ }
3
24
  /**
4
25
  * Options for managing Expressions using AdapTableQL
5
26
  */
6
- export interface QueryLanguageOptions {
27
+ export interface ExpressionOptions {
7
28
  /**
8
29
  * Boolean Expression Functions available in AdapTableQL
9
30
  *
@@ -32,6 +53,13 @@ export interface QueryLanguageOptions {
32
53
  * @gridInfoItem
33
54
  */
34
55
  defaultAggregatedBooleanFunctions?: ExpressionFunctionMap;
56
+ /**
57
+ * Aggregated Scalar Expression Functions available in AdapTableQL
58
+ *
59
+ * @defaultValue null (sets all)
60
+ * @gridInfoItem
61
+ */
62
+ defaultAggregatedScalarFunctions?: ExpressionFunctionMap;
35
63
  /**
36
64
  * Module specific ExpressionFunctions; if not defined, it falls back to the defined default values
37
65
  *
@@ -71,4 +99,5 @@ export interface ModuleExpressionFunctions {
71
99
  scalarFunctions?: ExpressionFunctionMap;
72
100
  observableFunctions?: ExpressionFunctionMap;
73
101
  aggregatedBooleanFunctions?: ExpressionFunctionMap;
102
+ aggregatedScalarFunctions?: ExpressionFunctionMap;
74
103
  }
@@ -70,13 +70,6 @@ export interface GeneralOptions {
70
70
  * CustomSort column comparer functions
71
71
  */
72
72
  customSortComparers?: ColumnValuesComparer[];
73
- /**
74
- * Perform case-sensitive text comparisons in all search and filter operations: QuickSearch, Filters, Query, Predicates
75
- *
76
- * @defaultValue false
77
- * @gridInfoItem
78
- */
79
- caseSensitiveTextComparisons?: boolean;
80
73
  }
81
74
  /**
82
75
  * Comparer object for Column Values - used for custom sorting
@@ -16,13 +16,6 @@ export interface SearchOptions {
16
16
  * @gridInfoItem
17
17
  */
18
18
  quickSearchPlaceholder?: string;
19
- /**
20
- * Which searching and filtering options, if any, should take place on server
21
- *
22
- * @defaultValue undefined
23
- * @gridInfoItem
24
- */
25
- serverSearchOptions?: ServerSearchOptions;
26
19
  /**
27
20
  * Clears saved searches when AdapTable loads
28
21
  *
@@ -38,5 +31,3 @@ export interface SearchOptions {
38
31
  */
39
32
  filterResultsAfterQuickSearch?: boolean;
40
33
  }
41
- export declare type ServerSearchOptions = ServerSearchOption[];
42
- export declare type ServerSearchOption = 'Query' | 'Filter' | 'Sort';
@@ -1,30 +1,30 @@
1
1
  import { AdaptableState } from '../PredefinedConfig/AdaptableState';
2
2
  /**
3
- * Options related to state hydration/dehydration - allows users to intercept state persistence and state loading with custom functionality.
3
+ * Options related to Adaptable State hydration/dehydration - allows users to intercept state persistence and state loading with custom functionality
4
4
  */
5
5
  export interface StateOptions {
6
6
  /**
7
- * Allows the customization of state persistence.
7
+ * Allows the customization of state persistence
8
8
  */
9
9
  persistState?: AdaptablePersistStateFunction;
10
10
  /**
11
- * Allows the customization of state loading.
11
+ * Allows the customization of Adaptable State loading
12
12
  */
13
13
  loadState?: AdaptableLoadStateFunction;
14
14
  /**
15
- * Allows the customization of the state that is going to be persisted
15
+ * Allows the customization of the Adaptable State that is going to be persisted
16
16
  */
17
17
  saveState?: AdaptableSaveStateFunction;
18
18
  /**
19
- * Allows hooking into AdaptableState hydration
19
+ * Allows hooking into Adaptable State hydration
20
20
  */
21
21
  applyState?: (state: any) => any;
22
22
  /**
23
- * Allows clearing of remote state.
23
+ * Allows clearing of remote Adaptable State
24
24
  */
25
25
  clearState?: AdaptableClearStateFunction;
26
26
  /**
27
- * Delay (in ms) to debounce saveState/persistState calls enabling grouping multiple sequential calls in single one (e.g. elevator doors)
27
+ * Delay (in ms) to debounce `saveState` / `persistState` calls enabling grouping multiple sequential calls in single one (e.g. elevator doors)
28
28
  *
29
29
  * **Defaults to: 400**. Also, the wait will be max 1000ms, at which point the save/persist calls will happen anyway.
30
30
  *
@@ -12,8 +12,8 @@ export interface CalculatedColumnApi {
12
12
  */
13
13
  getAllCalculatedColumn(): CalculatedColumn[];
14
14
  /**
15
- * Retrieves Calculated column by id
16
- * @param id Calculated column id
15
+ * Retrieves Calculated Column by the unique identifier of the Adaptable Object in the CalculatedColumnState
16
+ * @param id - Calculated Column state unique identifier
17
17
  * @returns calculated column
18
18
  */
19
19
  getCalculatedColumnById(id: CalculatedColumn['Uuid']): CalculatedColumn;
@@ -41,13 +41,6 @@ export interface CalculatedColumnApi {
41
41
  * @returns calculated columns
42
42
  */
43
43
  editCalculatedColumns(calcColumns: CalculatedColumn[]): CalculatedColumn[];
44
- /**
45
- * Replaces Expression in given Calculated Column with new value
46
- * @param calcColumn Calculated Column for which Expression should change
47
- * @param columnExpression New Expression for Calculated Column
48
- * @returns calculated columns
49
- */
50
- editCalculatedColumnExpression(calcColumn: string, columnExpression: string): CalculatedColumn;
51
44
  /**
52
45
  * Removes Calculated Column from State
53
46
  *
@@ -143,6 +143,16 @@ export interface GridApi {
143
143
  * @param clearSelection Whether to clear current selection in grid
144
144
  */
145
145
  deSelectNode(rowNode: RowNode, clearSelection: boolean): void;
146
+ /**
147
+ * Selects a Column in AG Grid
148
+ * @param columnId Id of Column to Select
149
+ */
150
+ selectColumn(columnId: string): void;
151
+ /**
152
+ * Selects Columns in AG Grid
153
+ * @param columnIds Ids of Columns to Select
154
+ */
155
+ selectColumns(columnIds: string[]): void;
146
156
  /**
147
157
  * AG Grid Row Nodes in AdapTable
148
158
  * @param rowNodes Nodes to DeSelect
@@ -174,7 +184,7 @@ export interface GridApi {
174
184
  */
175
185
  deSelectRows(primaryKeyValues: any[], clearSelection: boolean): void;
176
186
  /**
177
- * Selects a group of cells in a given range
187
+ * Selects a group of cells in a given range - provide either primary keys or row indexes
178
188
  * @param gridCellRange range to select
179
189
  */
180
190
  selectCellRange(gridCellRange: GridCellRange): void;
@@ -11,7 +11,7 @@ import { ContainerOptions, DashboardOptions, EditOptions, FilterOptions, General
11
11
  import { NotificationsOptions } from '../../AdaptableOptions/NotificationsOptions';
12
12
  import { ToolPanelOptions } from '../../AdaptableOptions/ToolPanelOptions';
13
13
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
14
- import { QueryLanguageOptions } from '../../AdaptableOptions/QueryLanguageOptions';
14
+ import { AdaptableQLOptions, ExpressionOptions } from '../../AdaptableOptions/AdaptableQLOptions';
15
15
  import { AlertOptions } from '../../AdaptableOptions/AlertOptions';
16
16
  export declare abstract class ApiBase {
17
17
  protected adaptable: IAdaptable;
@@ -55,11 +55,12 @@ export declare abstract class ApiBase {
55
55
  protected getLayoutOptions(): LayoutOptions;
56
56
  protected getMenuOptions(): MenuOptions;
57
57
  protected getFilterOptions(): FilterOptions;
58
+ protected getAdaptableQLOptions(): AdaptableQLOptions;
58
59
  protected getSearchOptions(): SearchOptions;
59
60
  protected getStateOptions(): StateOptions;
60
61
  protected getTeamSharingOptions(): TeamSharingOptions;
61
62
  protected getUserInterfaceOptions(): UserInterfaceOptions;
62
63
  protected getToolPanelOptions(): ToolPanelOptions;
63
- protected getQueryLanguageOptions(): QueryLanguageOptions;
64
+ protected getExpressionOptions(): ExpressionOptions;
64
65
  protected getAdaptableApi(): AdaptableApi;
65
66
  }
@@ -101,6 +101,9 @@ class ApiBase {
101
101
  getFilterOptions() {
102
102
  return this.getOptions().filterOptions;
103
103
  }
104
+ getAdaptableQLOptions() {
105
+ return this.getOptions().adaptableQLOptions;
106
+ }
104
107
  getSearchOptions() {
105
108
  return this.getOptions().searchOptions;
106
109
  }
@@ -116,8 +119,8 @@ class ApiBase {
116
119
  getToolPanelOptions() {
117
120
  return this.getOptions().toolPanelOptions;
118
121
  }
119
- getQueryLanguageOptions() {
120
- return this.getOptions().queryLanguageOptions;
122
+ getExpressionOptions() {
123
+ return this.getAdaptableQLOptions().expressionOptions;
121
124
  }
122
125
  getAdaptableApi() {
123
126
  return this.adaptable.api;
@@ -29,6 +29,7 @@ class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
29
29
  return this.getCalculatedColumnById(calculatedColumn.Uuid);
30
30
  }
31
31
  editCalculatedColumns(calculatedColumns) {
32
+ // FIXME AFL extend Redux to handle all the edits in one run
32
33
  calculatedColumns.forEach((cc) => {
33
34
  this.editCalculatedColumn(cc);
34
35
  });
@@ -63,16 +64,14 @@ class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
63
64
  getCalculatedColumnsReferencingColumnId(columnId) {
64
65
  var calcColumns = [];
65
66
  this.getAllCalculatedColumn().forEach((calculatedColumn) => {
66
- var _a;
67
- if (this.adaptable.api.columnApi.isColumnReferencedInExpression(columnId, (_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression)) {
67
+ if (this.adaptable.api.columnApi.isColumnReferencedInExpression(columnId, this.adaptable.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query))) {
68
68
  calcColumns.push(calculatedColumn);
69
69
  }
70
70
  });
71
71
  return calcColumns;
72
72
  }
73
73
  getReferencedColumnIdsForCalculatedColumn(calculatedColumn) {
74
- var _a;
75
- const columnIds = this.adaptable.api.queryLanguageApi.getColumnsFromExpression((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
74
+ const columnIds = this.adaptable.api.queryLanguageApi.getColumnsFromExpression(this.adaptable.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query));
76
75
  return columnIds;
77
76
  }
78
77
  getReferencedColumnIdsForCalculatedColumnId(calculatedColumnId) {
@@ -51,6 +51,8 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
51
51
  deSelectNode(rowNode: RowNode, clearSelection: boolean): void;
52
52
  deSelectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
53
53
  selectCellRange(gridCellRange: GridCellRange): void;
54
+ selectColumn(columnId: string): void;
55
+ selectColumns(columnIds: string[]): void;
54
56
  getFirstRowNode(): RowNode;
55
57
  getVisibleRowNodes(): RowNode[];
56
58
  getGridCellFromRowNode(rowwNode: RowNode, columnId: string): GridCell | undefined;
@@ -149,14 +149,37 @@ class GridApiImpl extends ApiBase_1.ApiBase {
149
149
  this.adaptable.deSelectNodes(rowNodes, clearSelection);
150
150
  }
151
151
  selectCellRange(gridCellRange) {
152
- const startNode = this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueStart);
153
- const endNode = gridCellRange.primaryKeyValueEnd
154
- ? this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueEnd)
155
- : startNode;
152
+ if (gridCellRange == undefined) {
153
+ return;
154
+ }
155
+ if (gridCellRange.primaryKeyValueStart == undefined &&
156
+ gridCellRange.rowIndexStart == undefined) {
157
+ return;
158
+ }
159
+ let startNode;
160
+ let endNode;
161
+ startNode = gridCellRange.primaryKeyValueEnd
162
+ ? this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueStart)
163
+ : this.adaptable.getRowNodeByIndex(gridCellRange.rowIndexStart);
164
+ if (gridCellRange.primaryKeyValueEnd) {
165
+ endNode = this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueEnd);
166
+ }
167
+ else if (gridCellRange.rowIndexEnd) {
168
+ endNode = this.adaptable.getRowNodeByIndex(gridCellRange.rowIndexEnd);
169
+ }
170
+ else {
171
+ endNode = startNode;
172
+ }
156
173
  if (startNode && endNode) {
157
174
  this.adaptable.selectCells(gridCellRange.columnIds, startNode, endNode);
158
175
  }
159
176
  }
177
+ selectColumn(columnId) {
178
+ this.selectColumns([columnId]);
179
+ }
180
+ selectColumns(columnIds) {
181
+ this.adaptable.api.columnApi.selectColumns(columnIds);
182
+ }
160
183
  getFirstRowNode() {
161
184
  return this.adaptable.getFirstRowNode();
162
185
  }
@@ -8,7 +8,7 @@ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
8
8
  import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
9
9
  import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellInfo';
10
10
  import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
11
- import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
11
+ import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
12
12
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
13
13
  import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
14
14
  import { AdaptableOptions, AdaptableState, AlertButtonContext, Layout, SystemStatusMessageInfo } from '../../types';
@@ -16,7 +16,6 @@ import { IValidationService } from '../../Utilities/Services/Interface/IValidati
16
16
  import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
17
17
  import { IReportService } from '../../Utilities/Services/Interface/IReportService';
18
18
  import { ICalculatedColumnExpressionService } from '../../Utilities/Services/Interface/ICalculatedColumnExpressionService';
19
- import { ServerSearchOption } from '../../AdaptableOptions/SearchOptions';
20
19
  import { AdaptableAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
21
20
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
22
21
  import { IDataService } from '../../Utilities/Services/Interface/IDataService';
@@ -90,7 +89,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
90
89
  getTeamSharingService(): ITeamSharingService;
91
90
  getMetamodelService(): IMetamodelService;
92
91
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
93
- isServerSearchOptionSet(serverSearchOption: ServerSearchOption): boolean;
92
+ runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
94
93
  buildStandaloneColumnHeader(column: AdaptableColumn): AdaptableMenuItem[];
95
94
  clearFlashingCellState(): void;
96
95
  clearUpdatedRowState(): void;
@@ -238,9 +238,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
238
238
  var _a, _b;
239
239
  return ((_b = (_a = this.adaptable.ModuleService.getModuleInfoByModule(adaptableModule)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : adaptableModule);
240
240
  }
241
- isServerSearchOptionSet(serverSearchOption) {
242
- const serverSearchOptions = this.getSearchOptions().serverSearchOptions;
243
- return serverSearchOptions != undefined && serverSearchOptions.includes(serverSearchOption);
241
+ runModuleInAdaptableQL(adaptableQLModule) {
242
+ const adaptableQLModules = this.getAdaptableQLOptions().externallyEvaluatedModules;
243
+ return !adaptableQLModules.includes(adaptableQLModule);
244
244
  }
245
245
  buildStandaloneColumnHeader(column) {
246
246
  return this.adaptable.buildStandaloneColumnHeader(column);
@@ -310,6 +310,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
310
310
  .forEach((calculatedColumn) => {
311
311
  firstRowData[calculatedColumn.ColumnId] = this.adaptable.api.gridApi.getCellRawValue(firstRowPrimaryKeyValue, calculatedColumn.ColumnId);
312
312
  });
313
+ // FIXME AFL shouldn't here be also the FreeTextColumn??
313
314
  }
314
315
  return firstRowData;
315
316
  }
@@ -379,7 +380,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
379
380
  }
380
381
  }
381
382
  isTextComparisonCaseSensitive() {
382
- return this.adaptable.adaptableOptions.generalOptions.caseSensitiveTextComparisons;
383
+ return this.adaptable.adaptableOptions.adaptableQLOptions.caseSensitiveTextComparisons;
383
384
  }
384
385
  executeWithProgressIndicator(label, executeFn) {
385
386
  this.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorShow(label));
@@ -2,12 +2,15 @@ import { ApiBase } from './ApiBase';
2
2
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
3
3
  import { QueryLanguageApi } from '../QueryLanguageApi';
4
4
  import { ExpressionFunctionMap } from '../../types';
5
+ import { AdaptableQuery } from '../../PredefinedConfig/Common/AdaptableQuery';
5
6
  export declare class QueryLanguageApiImpl extends ApiBase implements QueryLanguageApi {
6
7
  isValidBooleanExpression(query: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
7
8
  isValidObservableExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
8
9
  isValidAggregatedBooleanExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
10
+ isValidAggregatedScalarExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
9
11
  getASTForExpression(query: string): any;
10
12
  getColumnsFromExpression(expression: string): string[];
11
13
  getQueryableColumnIds(): string[] | undefined;
12
14
  getModuleExpressionFunctionMap(): ExpressionFunctionMap;
15
+ getAdaptableQueryExpression(query: Partial<AdaptableQuery>): string | undefined;
13
16
  }
@@ -34,6 +34,15 @@ class QueryLanguageApiImpl extends ApiBase_1.ApiBase {
34
34
  }
35
35
  return isValid;
36
36
  }
37
+ isValidAggregatedScalarExpression(expression, module, validationErrorMessage) {
38
+ const { isValid, errorMessage } = this.adaptable.api.internalApi
39
+ .getQueryLanguageService()
40
+ .validateAggregatedScalar(expression, module);
41
+ if (!isValid && validationErrorMessage) {
42
+ LoggingHelper_1.LogAdaptableWarning(`${validationErrorMessage} :: ${errorMessage}`);
43
+ }
44
+ return isValid;
45
+ }
37
46
  getASTForExpression(query) {
38
47
  return parser.getAST(query);
39
48
  }
@@ -51,7 +60,7 @@ class QueryLanguageApiImpl extends ApiBase_1.ApiBase {
51
60
  }
52
61
  }
53
62
  getQueryableColumnIds() {
54
- let queryableColumns = this.getQueryLanguageOptions().queryableColumns;
63
+ let queryableColumns = this.getExpressionOptions().queryableColumns;
55
64
  if (!queryableColumns) {
56
65
  return undefined;
57
66
  }
@@ -67,7 +76,11 @@ class QueryLanguageApiImpl extends ApiBase_1.ApiBase {
67
76
  }
68
77
  }
69
78
  getModuleExpressionFunctionMap() {
70
- return this.getQueryLanguageOptions().moduleExpressionFunctions;
79
+ return this.getExpressionOptions().moduleExpressionFunctions;
80
+ }
81
+ getAdaptableQueryExpression(query) {
82
+ var _a, _b, _c, _d;
83
+ 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);
71
84
  }
72
85
  }
73
86
  exports.QueryLanguageApiImpl = QueryLanguageApiImpl;
@@ -6,7 +6,7 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
6
6
  import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
7
7
  import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
8
8
  import { SelectedRowInfo } from '../PredefinedConfig/Selection/SelectedRowInfo';
9
- import { AdaptableModule } from '../PredefinedConfig/Common/Types';
9
+ import { AdaptableModule, AdaptableQLModule } from '../PredefinedConfig/Common/Types';
10
10
  import { GridCell } from '../PredefinedConfig/Selection/GridCell';
11
11
  import { IAdaptable } from '../AdaptableInterfaces/IAdaptable';
12
12
  import { IValidationService } from '../Utilities/Services/Interface/IValidationService';
@@ -15,7 +15,6 @@ import { IReportService } from '../Utilities/Services/Interface/IReportService';
15
15
  import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService';
16
16
  import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
17
17
  import { Layout } from '../PredefinedConfig/LayoutState';
18
- import { ServerSearchOption } from '../AdaptableOptions/SearchOptions';
19
18
  import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
20
19
  import { IDataService } from '../Utilities/Services/Interface/IDataService';
21
20
  import { AdaptableMessageType, DataChangedInfo, SystemStatusMessageInfo } from '../types';
@@ -94,7 +93,7 @@ export interface InternalApi {
94
93
  getTeamSharingService(): ITeamSharingService;
95
94
  getMetamodelService(): IMetamodelService;
96
95
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
97
- isServerSearchOptionSet(serverSearchOption: ServerSearchOption): boolean;
96
+ runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
98
97
  buildStandaloneColumnHeader(column: AdaptableColumn): AdaptableMenuItem[];
99
98
  getCustomSortComparer(column: AdaptableColumn): ColumnValuesComparer | undefined;
100
99
  clearFlashingCellState(): void;
@@ -45,7 +45,7 @@ export interface QueryApi {
45
45
  showExpandedQueryPopup(): void;
46
46
  /**
47
47
  * Set a Query as Current Query
48
- * @param query Query to set
48
+ * @param query - Query to set
49
49
  */
50
50
  setCurrentQuery(query: string): void;
51
51
  /**
@@ -53,7 +53,7 @@ export interface QueryApi {
53
53
  */
54
54
  clearCurrentQuery(): void;
55
55
  /**
56
- * Retuns the Current Query
56
+ * Returns the Current Query
57
57
  */
58
58
  getCurrentQuery(): string | undefined;
59
59
  }
@@ -1,5 +1,6 @@
1
1
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
2
2
  import { ExpressionFunctionMap } from '../types';
3
+ import { AdaptableQuery } from '../PredefinedConfig/Common/AdaptableQuery';
3
4
  /**
4
5
  * Manages AdapTableQL (Query Language)
5
6
  */
@@ -25,6 +26,13 @@ export interface QueryLanguageApi {
25
26
  * @param validationErrorMessage - optional validation error message; if provided, the error will be logged
26
27
  */
27
28
  isValidAggregatedBooleanExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
29
+ /**
30
+ * Whether the given AggregatedScalarExpression is valid
31
+ * @param expression - AggregatedScalarExpression to check
32
+ * @param module - module specific query
33
+ * @param validationErrorMessage - optional validation error message; if provided, the error will be logged
34
+ */
35
+ isValidAggregatedScalarExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
28
36
  /**
29
37
  * Returns all Columns referenced in a QueryExpression
30
38
  * @param expression - expression to check
@@ -43,4 +51,9 @@ export interface QueryLanguageApi {
43
51
  * @param expression expression to be run
44
52
  */
45
53
  getASTForExpression(expression: string): any;
54
+ /**
55
+ * Returns the Expression string of the given AdaptableQuery, which may be either a Boolean, an AggregatedBoolean, a Scalar, an AggregatedScalar or an ObservableExpression expression
56
+ * @param query - the AdaptableQuery
57
+ */
58
+ getAdaptableQueryExpression(query: Partial<AdaptableQuery>): string | undefined;
46
59
  }
@@ -4,14 +4,13 @@ import { AdaptableModule } from '../../types';
4
4
  **/
5
5
  export interface SettingsPanelApi {
6
6
  /**
7
- * Opens settings panel to specified module,
8
- * when not specified it opens the first available module
9
- * @param moduleName module name
7
+ * Opens Settings Panel and displays specified Module (if provided) or first available one
8
+ * @param moduleName name of Module to display
10
9
  */
11
10
  showSettingsPanel(moduleName?: AdaptableModule): void;
12
11
  /**
13
- * Opens a the settings panel to the custom module
14
- * @param name name of the custom settings panel
12
+ * Opens Settings Panel with the Custom Settings Panel, provided by name, displayed
13
+ * @param name name of Custom Settings Panel to display
15
14
  */
16
15
  showCustomSettingsPanel(name: string): void;
17
16
  }
@@ -60,7 +60,11 @@ export interface AlertDefinitionPredicate extends AdaptablePredicate {
60
60
  */
61
61
  export declare type AlertRule = XOR<{
62
62
  Predicate: AlertDefinitionPredicate;
63
- }, XOR<AdaptableBooleanQuery, XOR<AdaptableObservableQuery, AdaptableAggregatedBooleanQuery>>>;
63
+ }, AdaptableAlertQuery>;
64
+ /**
65
+ * Alert Query which may be either a Boolean, Observable or AggregatedBoolean Expression
66
+ */
67
+ export declare type AdaptableAlertQuery = XOR<AdaptableBooleanQuery, XOR<AdaptableObservableQuery, AdaptableAggregatedBooleanQuery>>;
64
68
  export declare type AdaptableAlertAction = 'highlight-cell' | 'jump-to-cell' | 'jump-to-row' | 'jump-to-column' | 'suspend' | 'undo';
65
69
  /**
66
70
  * Defines a button that appears in an Alert Form
@@ -1,7 +1,8 @@
1
1
  import { ConfigState } from './ConfigState';
2
2
  import { AdaptableObject } from './Common/AdaptableObject';
3
- import { AdaptableScalarQuery } from './Common/AdaptableQuery';
3
+ import { AdaptableAggregatedScalarQuery, AdaptableScalarQuery } from './Common/AdaptableQuery';
4
4
  import { SpecialColumnSettings } from './Common/SpecialColumnSettings';
5
+ import { XOR } from '../Utilities/Extensions/TypeExtensions';
5
6
  /**
6
7
  * Predefined Configuration for Calculated Column Module
7
8
  **/
@@ -28,9 +29,9 @@ export interface CalculatedColumn extends AdaptableObject {
28
29
  */
29
30
  CalculatedColumnSettings?: CalculatedColumnSettings;
30
31
  /**
31
- * Scalar Expression used by AdapTableQL to evaluate Column's value
32
+ * Scalar/AggregatedScalar Query used by AdapTableQL to evaluate Column's value
32
33
  */
33
- Query?: AdaptableScalarQuery;
34
+ Query?: AdaptableCalculatedColumnQuery;
34
35
  }
35
36
  /**
36
37
  * Set of optional properties that define a Calculated Column's behaviour
@@ -46,3 +47,7 @@ export interface CalculatedColumnSettings extends SpecialColumnSettings {
46
47
  */
47
48
  ShowToolTip?: boolean;
48
49
  }
50
+ /**
51
+ * Calculated Column Query which may be a Scalar or an AggregatedScalar Expression
52
+ */
53
+ export declare type AdaptableCalculatedColumnQuery = XOR<AdaptableScalarQuery, AdaptableAggregatedScalarQuery>;