@adaptabletools/adaptable 11.0.0-canary.5 → 11.0.0

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 (159) hide show
  1. package/agGrid.d.ts +5 -4
  2. package/agGrid.js +9 -7
  3. package/base.css +2 -2
  4. package/bundle.cjs.js +103 -98
  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 +4 -6
  11. package/src/AdaptableOptions/{QueryLanguageOptions.d.ts → AdaptableQLOptions.d.ts} +37 -5
  12. package/src/AdaptableOptions/{QueryLanguageOptions.js → AdaptableQLOptions.js} +0 -0
  13. package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
  15. package/src/AdaptableOptions/SearchOptions.d.ts +0 -9
  16. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +4 -3
  17. package/src/AdaptableOptions/StateOptions.d.ts +7 -7
  18. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  19. package/src/Api/AdaptableApi.d.ts +5 -0
  20. package/src/Api/CalculatedColumnApi.d.ts +2 -9
  21. package/src/Api/ColumnApi.d.ts +0 -4
  22. package/src/Api/GridApi.d.ts +11 -1
  23. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
  24. package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
  25. package/src/Api/Implementation/AlertApiImpl.js +4 -1
  26. package/src/Api/Implementation/ApiBase.d.ts +3 -2
  27. package/src/Api/Implementation/ApiBase.js +5 -2
  28. package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -4
  29. package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
  30. package/src/Api/Implementation/ColumnApiImpl.js +0 -5
  31. package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
  32. package/src/Api/Implementation/GridApiImpl.js +27 -4
  33. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -3
  34. package/src/Api/Implementation/InternalApiImpl.js +5 -4
  35. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +4 -1
  36. package/src/Api/Implementation/QueryLanguageApiImpl.js +17 -4
  37. package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
  38. package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
  39. package/src/Api/InternalApi.d.ts +2 -3
  40. package/src/Api/QueryApi.d.ts +2 -2
  41. package/src/Api/QueryLanguageApi.d.ts +23 -10
  42. package/src/Api/SettingsPanelApi.d.ts +16 -0
  43. package/src/Api/SettingsPanelApi.js +2 -0
  44. package/src/PredefinedConfig/AlertState.d.ts +6 -2
  45. package/src/PredefinedConfig/CalculatedColumnState.d.ts +8 -3
  46. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -0
  47. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -5
  48. package/src/PredefinedConfig/Common/AdaptableQuery.js +2 -6
  49. package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
  50. package/src/PredefinedConfig/Common/Enums.js +0 -2
  51. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
  52. package/src/PredefinedConfig/Common/Types.d.ts +6 -1
  53. package/src/PredefinedConfig/Common/Types.js +1 -0
  54. package/src/PredefinedConfig/ConditionalStyleState.d.ts +2 -2
  55. package/src/PredefinedConfig/FormatColumnState.d.ts +15 -0
  56. package/src/PredefinedConfig/Selection/GridCellRange.d.ts +3 -1
  57. package/src/PredefinedConfig/ToolPanelState.d.ts +3 -0
  58. package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
  59. package/src/Redux/Store/AdaptableStore.js +27 -2
  60. package/src/Strategy/AlertModule.js +12 -3
  61. package/src/Strategy/CalculatedColumnModule.js +4 -4
  62. package/src/Strategy/ChartingModule.d.ts +3 -3
  63. package/src/Strategy/ChartingModule.js +2 -2
  64. package/src/Strategy/FlashingCellModule.js +2 -2
  65. package/src/Strategy/FreeTextColumnModule.js +1 -0
  66. package/src/Strategy/{SetingsPanelModule.d.ts → SettingsPanelModule.d.ts} +0 -0
  67. package/src/Strategy/{SetingsPanelModule.js → SettingsPanelModule.js} +0 -0
  68. package/src/Strategy/Utilities/getAlertPreviewViewItems.js +1 -1
  69. package/src/Strategy/Utilities/getExpressionViewItems.d.ts +2 -2
  70. package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
  71. package/src/Strategy/Utilities/getRuleViewItems.js +1 -2
  72. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +3 -2
  73. package/src/Utilities/Constants/DocumentationLinkConstants.js +12 -10
  74. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +17 -13
  75. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
  76. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
  77. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +24 -0
  78. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +339 -0
  79. package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
  80. package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
  81. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  82. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +8 -8
  83. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +35 -0
  84. package/src/Utilities/ExpressionFunctions/groupingMap.js +105 -0
  85. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  86. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +33 -0
  87. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +154 -0
  88. package/src/Utilities/Helpers/AdaptableHelper.js +2 -1
  89. package/src/Utilities/Services/AlertService.js +8 -4
  90. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +7 -3
  91. package/src/Utilities/Services/CalculatedColumnExpressionService.js +143 -18
  92. package/src/Utilities/Services/Interface/IAdaptableService.d.ts +1 -1
  93. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +6 -3
  94. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +9 -3
  95. package/src/Utilities/Services/LicenseService.js +1 -1
  96. package/src/Utilities/Services/ModuleService.js +33 -40
  97. package/src/Utilities/Services/QueryLanguageService.d.ts +11 -4
  98. package/src/Utilities/Services/QueryLanguageService.js +84 -25
  99. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -3
  100. package/src/View/AdaptableWizardView/helper.js +2 -2
  101. package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +1 -0
  102. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -2
  103. package/src/View/Alert/Wizard/AlertWizard.js +2 -2
  104. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -2
  105. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
  106. package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
  107. package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +3 -3
  108. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +2 -4
  109. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +43 -12
  110. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -2
  111. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
  112. package/src/View/ColorPicker.d.ts +1 -1
  113. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  114. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  115. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  116. package/src/View/Components/EntityRulesEditor/index.js +11 -12
  117. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  118. package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
  119. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -8
  120. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -2
  121. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +1 -0
  122. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  123. package/src/View/Components/ValueSelector/index.js +1 -1
  124. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
  125. package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
  126. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +2 -2
  127. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  128. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  129. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  130. package/src/View/License/LicenseWatermark.js +1 -1
  131. package/src/View/Query/Wizard/NamedQueryWizard.js +3 -3
  132. package/src/View/Schedule/Wizard/ScheduleWizard.js +3 -3
  133. package/src/agGrid/Adaptable.d.ts +1 -0
  134. package/src/agGrid/Adaptable.js +13 -14
  135. package/src/agGrid/agGridHelper.js +3 -7
  136. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +4 -2
  137. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +4 -4
  138. package/src/components/Datepicker/index.d.ts +1 -1
  139. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  140. package/src/components/ExpressionEditor/EditorInput.js +5 -2
  141. package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
  142. package/src/components/ExpressionEditor/EditorInputReactive.js +1 -1
  143. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  144. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.d.ts +2 -0
  145. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +45 -0
  146. package/src/components/ExpressionEditor/editorButtonsReactive.js +8 -13
  147. package/src/components/ExpressionEditor/index.d.ts +2 -1
  148. package/src/components/ExpressionEditor/index.js +11 -4
  149. package/src/components/Input/index.d.ts +1 -1
  150. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  151. package/src/components/Logo/index.js +8 -7
  152. package/src/components/PopupWithFooter.d.ts +1 -1
  153. package/src/components/Textarea/index.d.ts +1 -1
  154. package/src/components/icons/calculated-column.js +2 -1
  155. package/src/metamodel/adaptable.metamodel.d.ts +233 -37
  156. package/src/metamodel/adaptable.metamodel.js +448 -149
  157. package/src/types.d.ts +5 -4
  158. package/version.d.ts +1 -1
  159. 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.5",
3
+ "version": "11.0.0",
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: 1645637438183;
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 = 1645637438183;
@@ -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
  */
@@ -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
  */
@@ -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,33 @@
1
1
  import { ExpressionFunctionMap } from '../parser/src/types';
2
- import { AdaptableModule } from '../PredefinedConfig/Common/Types';
2
+ import { AdaptableModule, AdaptableQLModules } from '../PredefinedConfig/Common/Types';
3
+ /**
4
+ * Options for managing AdaptableQL - the Adaptable Query Lanaguage which evaluates Predicates and Expressions
5
+ */
6
+ export interface AdaptableQLOptions {
7
+ /**
8
+ * Perform case-sensitive text comparisons in all search and filter operations: QuickSearch, Filters, Query, Predicates
9
+ *
10
+ * @defaultValue false
11
+ * @gridInfoItem
12
+ */
13
+ caseSensitiveTextComparisons?: boolean;
14
+ /**
15
+ * Which searching and filtering options should take place on server
16
+ *
17
+ * @defaultValue undefined
18
+ * @gridInfoItem
19
+ */
20
+ externallyEvaluatedModules?: AdaptableQLModules;
21
+ /**
22
+ * Options for managing Expressions in AdapTableQL
23
+ *
24
+ */
25
+ expressionOptions?: ExpressionOptions;
26
+ }
3
27
  /**
4
28
  * Options for managing Expressions using AdapTableQL
5
29
  */
6
- export interface QueryLanguageOptions {
30
+ export interface ExpressionOptions {
7
31
  /**
8
32
  * Boolean Expression Functions available in AdapTableQL
9
33
  *
@@ -26,12 +50,19 @@ export interface QueryLanguageOptions {
26
50
  */
27
51
  defaultObservableFunctions?: ExpressionFunctionMap;
28
52
  /**
29
- * Aggregation Expression Functions available in AdapTableQL
53
+ * Aggregated Boolean Expression Functions available in AdapTableQL
54
+ *
55
+ * @defaultValue null (sets all)
56
+ * @gridInfoItem
57
+ */
58
+ defaultAggregatedBooleanFunctions?: ExpressionFunctionMap;
59
+ /**
60
+ * Aggregated Scalar Expression Functions available in AdapTableQL
30
61
  *
31
62
  * @defaultValue null (sets all)
32
63
  * @gridInfoItem
33
64
  */
34
- defaultAggregationFunctions?: ExpressionFunctionMap;
65
+ defaultAggregatedScalarFunctions?: ExpressionFunctionMap;
35
66
  /**
36
67
  * Module specific ExpressionFunctions; if not defined, it falls back to the defined default values
37
68
  *
@@ -70,5 +101,6 @@ export interface ModuleExpressionFunctions {
70
101
  booleanFunctions?: ExpressionFunctionMap;
71
102
  scalarFunctions?: ExpressionFunctionMap;
72
103
  observableFunctions?: ExpressionFunctionMap;
73
- aggregationFunctions?: ExpressionFunctionMap;
104
+ aggregatedBooleanFunctions?: ExpressionFunctionMap;
105
+ aggregatedScalarFunctions?: ExpressionFunctionMap;
74
106
  }
@@ -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
@@ -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';
@@ -61,11 +61,12 @@ export interface SettingsPanelOptions {
61
61
  */
62
62
  customSettingsPanels?: CustomSettingsPanel[];
63
63
  }
64
+ /**
65
+ * Definition of a Custom Panel to add to the Adaptable Settings Panel
66
+ */
64
67
  export interface CustomSettingsPanel {
65
68
  /**
66
- * Name appears in Settings Panel Navigation
67
- * To be shown you must include it in settingsPanelOptions.navigation.
68
- * By default is added to the end.
69
+ * Appears in Settings Panel Navigation and must be included in settingsPanelOptions.navigation for it to be displayed (by default added to the end)
69
70
  */
70
71
  name: string;
71
72
  /**
@@ -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
  *
@@ -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
  */
@@ -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
  *
@@ -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
  */
@@ -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;
@@ -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
  }
@@ -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) {
@@ -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
  }
@@ -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
- isValidAggregationExpression(expression: string, module: AdaptableModule, validationErrorMessage?: string): boolean;
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
  }