@adaptabletools/adaptable 11.0.0-canary.6 → 11.0.1

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 (164) hide show
  1. package/README.md +4 -4
  2. package/agGrid.d.ts +5 -4
  3. package/agGrid.js +7 -5
  4. package/base.css +3 -4
  5. package/bundle.cjs.js +120 -115
  6. package/index.css +3 -4
  7. package/package.json +1 -1
  8. package/publishTimestamp.d.ts +1 -1
  9. package/publishTimestamp.js +1 -1
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -1
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -5
  12. package/src/AdaptableOptions/{QueryLanguageOptions.d.ts → AdaptableQLOptions.d.ts} +34 -2
  13. package/src/AdaptableOptions/{QueryLanguageOptions.js → AdaptableQLOptions.js} +0 -0
  14. package/src/AdaptableOptions/FilterOptions.d.ts +4 -0
  15. package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
  16. package/src/AdaptableOptions/SearchOptions.d.ts +0 -9
  17. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +7 -6
  18. package/src/AdaptableOptions/StateOptions.d.ts +7 -7
  19. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
  20. package/src/Api/CalculatedColumnApi.d.ts +2 -9
  21. package/src/Api/GridApi.d.ts +12 -3
  22. package/src/Api/Implementation/AlertApiImpl.js +1 -2
  23. package/src/Api/Implementation/ApiBase.d.ts +3 -2
  24. package/src/Api/Implementation/ApiBase.js +5 -2
  25. package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -4
  26. package/src/Api/Implementation/ColumnApiImpl.js +1 -1
  27. package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
  28. package/src/Api/Implementation/GridApiImpl.js +41 -21
  29. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -3
  30. package/src/Api/Implementation/InternalApiImpl.js +5 -4
  31. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +3 -0
  32. package/src/Api/Implementation/QueryLanguageApiImpl.js +15 -2
  33. package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
  34. package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
  35. package/src/Api/InternalApi.d.ts +2 -3
  36. package/src/Api/QueryApi.d.ts +2 -2
  37. package/src/Api/QueryLanguageApi.d.ts +13 -0
  38. package/src/Api/SettingsPanelApi.d.ts +4 -5
  39. package/src/PredefinedConfig/AlertState.d.ts +5 -1
  40. package/src/PredefinedConfig/CalculatedColumnState.d.ts +8 -3
  41. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  42. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -0
  43. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +0 -1
  44. package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -5
  45. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
  46. package/src/PredefinedConfig/Common/Types.d.ts +6 -1
  47. package/src/PredefinedConfig/Common/Types.js +1 -0
  48. package/src/PredefinedConfig/ConditionalStyleState.d.ts +2 -2
  49. package/src/PredefinedConfig/FormatColumnState.d.ts +15 -0
  50. package/src/PredefinedConfig/PlusMinusState.d.ts +1 -1
  51. package/src/PredefinedConfig/Selection/GridCellRange.d.ts +3 -1
  52. package/src/PredefinedConfig/ToolPanelState.d.ts +3 -0
  53. package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
  54. package/src/Redux/ActionsReducers/AlertRedux.js +4 -4
  55. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
  56. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +4 -4
  57. package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
  58. package/src/Redux/ActionsReducers/CustomSortRedux.js +4 -4
  59. package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +12 -12
  60. package/src/Redux/ActionsReducers/FlashingCellRedux.js +33 -29
  61. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
  62. package/src/Redux/ActionsReducers/FormatColumnRedux.js +4 -4
  63. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
  64. package/src/Redux/ActionsReducers/PlusMinusRedux.js +4 -4
  65. package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
  66. package/src/Redux/ActionsReducers/ScheduleRedux.js +16 -16
  67. package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
  68. package/src/Redux/ActionsReducers/ShortcutRedux.js +4 -4
  69. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  70. package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
  71. package/src/Redux/Store/AdaptableStore.js +47 -22
  72. package/src/Strategy/AlertModule.js +4 -4
  73. package/src/Strategy/CalculatedColumnModule.js +4 -4
  74. package/src/Strategy/ChartingModule.d.ts +3 -3
  75. package/src/Strategy/ChartingModule.js +2 -2
  76. package/src/Strategy/FlashingCellModule.js +4 -4
  77. package/src/Strategy/FreeTextColumnModule.js +1 -0
  78. package/src/Strategy/{SetingsPanelModule.d.ts → SettingsPanelModule.d.ts} +0 -0
  79. package/src/Strategy/{SetingsPanelModule.js → SettingsPanelModule.js} +0 -0
  80. package/src/Strategy/Utilities/getAlertPreviewViewItems.js +1 -1
  81. package/src/Strategy/Utilities/getExpressionViewItems.d.ts +2 -2
  82. package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
  83. package/src/Strategy/Utilities/getRuleViewItems.js +1 -2
  84. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +3 -2
  85. package/src/Utilities/Constants/DocumentationLinkConstants.js +12 -10
  86. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +18 -13
  87. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  88. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +18 -1
  89. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +311 -14
  90. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  91. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +8 -8
  92. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +2 -3
  93. package/src/Utilities/ExpressionFunctions/groupingMap.js +3 -2
  94. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  95. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +33 -0
  96. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +154 -0
  97. package/src/Utilities/Helpers/AdaptableHelper.js +2 -1
  98. package/src/Utilities/Services/AlertService.js +5 -1
  99. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +7 -3
  100. package/src/Utilities/Services/CalculatedColumnExpressionService.js +143 -18
  101. package/src/Utilities/Services/Interface/IAdaptableService.d.ts +1 -1
  102. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +6 -3
  103. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +7 -1
  104. package/src/Utilities/Services/LicenseService.js +1 -1
  105. package/src/Utilities/Services/ModuleService.js +33 -40
  106. package/src/Utilities/Services/QueryLanguageService.d.ts +9 -2
  107. package/src/Utilities/Services/QueryLanguageService.js +81 -22
  108. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -3
  109. package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +1 -0
  110. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -2
  111. package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
  112. package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +3 -3
  113. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +2 -4
  114. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +43 -12
  115. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -2
  116. package/src/View/ColorPicker.d.ts +1 -1
  117. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  118. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  119. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  120. package/src/View/Components/EntityRulesEditor/index.d.ts +1 -1
  121. package/src/View/Components/EntityRulesEditor/index.js +3 -4
  122. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  123. package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
  124. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -8
  125. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -2
  126. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +1 -0
  127. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  128. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  129. package/src/View/Components/ValueSelector/index.js +1 -1
  130. package/src/View/Dashboard/DashboardPopup.js +1 -1
  131. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  132. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  133. package/src/View/License/LicenseWatermark.js +1 -1
  134. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +1 -1
  135. package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +2 -2
  136. package/src/View/Schedule/Wizard/ScheduleWizard.js +3 -3
  137. package/src/agGrid/Adaptable.d.ts +4 -1
  138. package/src/agGrid/Adaptable.js +71 -48
  139. package/src/agGrid/CheckboxRenderer.d.ts +8 -1
  140. package/src/agGrid/CheckboxRenderer.js +18 -3
  141. package/src/agGrid/agGridHelper.d.ts +1 -1
  142. package/src/agGrid/agGridHelper.js +9 -10
  143. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +4 -2
  144. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +4 -4
  145. package/src/components/Datepicker/index.d.ts +1 -1
  146. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  147. package/src/components/ExpressionEditor/EditorInput.js +5 -2
  148. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  149. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.d.ts +2 -0
  150. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +45 -0
  151. package/src/components/ExpressionEditor/editorButtonsReactive.js +8 -13
  152. package/src/components/ExpressionEditor/index.d.ts +2 -1
  153. package/src/components/ExpressionEditor/index.js +9 -2
  154. package/src/components/Input/index.d.ts +1 -1
  155. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  156. package/src/components/Logo/index.js +8 -7
  157. package/src/components/PopupWithFooter.d.ts +1 -1
  158. package/src/components/Textarea/index.d.ts +1 -1
  159. package/src/components/icons/calculated-column.js +2 -1
  160. package/src/metamodel/adaptable.metamodel.d.ts +235 -41
  161. package/src/metamodel/adaptable.metamodel.js +435 -149
  162. package/src/types.d.ts +5 -5
  163. package/version.d.ts +1 -1
  164. package/version.js +1 -1
package/index.css CHANGED
@@ -3103,8 +3103,7 @@ input[type='number'].ab-Input:hover::-webkit-inner-spin-button:active {
3103
3103
  align-items: stretch;
3104
3104
  flex: 1;
3105
3105
  overflow-x: auto;
3106
- padding-top: var(--ab-dashboard-gap-size);
3107
- padding-bottom: var(--ab-dashboard-gap-size); }
3106
+ padding: var(--ab-dashboard-gap-size); }
3108
3107
 
3109
3108
  .ab-Dashboard__container {
3110
3109
  display: flex;
@@ -3254,7 +3253,7 @@ input[type='number'].ab-Input:hover::-webkit-inner-spin-button:active {
3254
3253
  position: relative;
3255
3254
  display: inline-block;
3256
3255
  min-width: 40px;
3257
- width: 87px;
3256
+ width: 77px;
3258
3257
  height: 32px; }
3259
3258
 
3260
3259
  .ab-ToggleButton:hover:not(.ab-ToggleButton--disabled) {
@@ -3292,7 +3291,7 @@ input[type='number'].ab-Input:hover::-webkit-inner-spin-button:active {
3292
3291
  background-color: var(--ab-cmp-toggle-button--active__background); }
3293
3292
 
3294
3293
  .ab-ToggleButton__input:checked + .ab-ToggleButton__slider:before {
3295
- transform: translateX(54px); }
3294
+ transform: translateX(45px); }
3296
3295
 
3297
3296
  .ab-ToggleButton__input:focus + .ab-ToggleButton__slider {
3298
3297
  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.1",
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: 1646327668940;
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 = 1646327668940;
@@ -158,12 +158,14 @@ 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;
164
165
  getPlugin(pluginId: string): AdaptablePlugin;
165
166
  setValue(dataChangedInfo: DataChangedInfo): void;
166
167
  cancelEdit(): any;
168
+ isCellEditable(rowNode: RowNode, column: Column): boolean;
167
169
  getFirstRowNode(): RowNode;
168
170
  forAllRowNodesDo(func: (rowNode: RowNode) => void): void;
169
171
  forAllVisibleRowNodesDo(func: (rowNode: RowNode) => void): void;
@@ -227,5 +229,5 @@ export interface IAdaptable {
227
229
  updateColDefsForSpecialColumns({ skipSetupColumns }?: {
228
230
  skipSetupColumns?: boolean;
229
231
  }): void;
230
- getAgGridColumnForAdaptableColumn(abColumn: AdaptableColumn): Column;
232
+ getAgGridColumnForColumnId(columnId: string): Column;
231
233
  }
@@ -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,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
  *
@@ -32,6 +56,13 @@ export interface QueryLanguageOptions {
32
56
  * @gridInfoItem
33
57
  */
34
58
  defaultAggregatedBooleanFunctions?: ExpressionFunctionMap;
59
+ /**
60
+ * Aggregated Scalar Expression Functions available in AdapTableQL
61
+ *
62
+ * @defaultValue null (sets all)
63
+ * @gridInfoItem
64
+ */
65
+ defaultAggregatedScalarFunctions?: ExpressionFunctionMap;
35
66
  /**
36
67
  * Module specific ExpressionFunctions; if not defined, it falls back to the defined default values
37
68
  *
@@ -71,4 +102,5 @@ export interface ModuleExpressionFunctions {
71
102
  scalarFunctions?: ExpressionFunctionMap;
72
103
  observableFunctions?: ExpressionFunctionMap;
73
104
  aggregatedBooleanFunctions?: ExpressionFunctionMap;
105
+ aggregatedScalarFunctions?: ExpressionFunctionMap;
74
106
  }
@@ -65,6 +65,10 @@ export interface FilterOptions {
65
65
  * @gridInfoItem
66
66
  */
67
67
  quickFilterValuesTrigger?: 'mouseenter' | 'click';
68
+ /**
69
+ * TODO: add comment
70
+ */
71
+ quickFilterHeight?: number;
68
72
  /**
69
73
  * When to re-filter grid after user edits data: 'Always', 'Never' or 'Throttle' (which requires a 'ThrottleDelay')
70
74
  *
@@ -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';
@@ -11,7 +11,7 @@ export interface SettingsPanelOptions {
11
11
  /**
12
12
  * Icon for Settings Panel Can be `ConfigurationIcon`, `ApplicationIcon` or a custom Icon
13
13
  *
14
- * @defaultValue 'ConfigurationIcon'
14
+ * @defaultValue `ConfigurationIcon`
15
15
  */
16
16
  icon?: 'ConfigurationIcon' | 'ApplicationIcon' | AdaptableIcon;
17
17
  /**
@@ -35,7 +35,7 @@ export interface SettingsPanelOptions {
35
35
  /**
36
36
  * Initial position of Settings Panel window
37
37
  *
38
- * @defaultValue 'Middle of Screen'
38
+ * @defaultValue Middle of Screen
39
39
  */
40
40
  position?: {
41
41
  x: number;
@@ -44,7 +44,7 @@ export interface SettingsPanelOptions {
44
44
  /**
45
45
  * Initial size of Settings Panel
46
46
  *
47
- * @defaultValue 'Computed based on size of screen'
47
+ * @defaultValue Computed based on size of screen
48
48
  */
49
49
  size?: {
50
50
  width: number;
@@ -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
  *
@@ -59,7 +59,7 @@ export interface ToolPanelOptions {
59
59
  /**
60
60
  * ToolPanel Buttons provided by Users which perform custom behaviour
61
61
  */
62
- customToolPanelButtons?: AdaptableButton<ToolPanelButtonContext>[];
62
+ customButtons?: AdaptableButton<ToolPanelButtonContext>[];
63
63
  /**
64
64
  * ToolPanels provided by Users which contain custom content
65
65
  */
@@ -80,7 +80,7 @@ export interface CustomToolPanel extends AdaptableObject {
80
80
  /**
81
81
  * Optional set of buttons to show in the ToolPanel
82
82
  */
83
- toolPanelButtons?: AdaptableButton<CustomToolPanelButtonContext>[];
83
+ buttons?: AdaptableButton<CustomToolPanelButtonContext>[];
84
84
  /**
85
85
  * Function to provide bespoke content when NOT using a Framework wrapper
86
86
  */
@@ -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
  *
@@ -60,10 +60,9 @@ export interface GridApi {
60
60
  * @param columnId column to update
61
61
  * @param newValue new value to use
62
62
  * @param primaryKeyValue primaryKeyValue of the row (i.e. the value in the PrimaryKeyColumn identified in Adaptable Options)
63
- * @param forceFilter whether to refilter the Grid (and update aggregations) on data change - default is false
64
63
  *
65
64
  */
66
- setCellValue(columnId: string, newValue: any, primaryKeyValue: any, forceFilter: boolean): void;
65
+ setCellValue(columnId: string, newValue: any, primaryKeyValue: any): void;
67
66
  /**
68
67
  * Updates multiple cells
69
68
  * @param gridCells cells to update
@@ -143,6 +142,16 @@ export interface GridApi {
143
142
  * @param clearSelection Whether to clear current selection in grid
144
143
  */
145
144
  deSelectNode(rowNode: RowNode, clearSelection: boolean): void;
145
+ /**
146
+ * Selects a Column in AG Grid
147
+ * @param columnId Id of Column to Select
148
+ */
149
+ selectColumn(columnId: string): void;
150
+ /**
151
+ * Selects Columns in AG Grid
152
+ * @param columnIds Ids of Columns to Select
153
+ */
154
+ selectColumns(columnIds: string[]): void;
146
155
  /**
147
156
  * AG Grid Row Nodes in AdapTable
148
157
  * @param rowNodes Nodes to DeSelect
@@ -174,7 +183,7 @@ export interface GridApi {
174
183
  */
175
184
  deSelectRows(primaryKeyValues: any[], clearSelection: boolean): void;
176
185
  /**
177
- * Selects a group of cells in a given range
186
+ * Selects a group of cells in a given range - provide either primary keys or row indexes
178
187
  * @param gridCellRange range to select
179
188
  */
180
189
  selectCellRange(gridCellRange: GridCellRange): void;
@@ -125,8 +125,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
125
125
  this.adaptable.api.gridApi.setCellValue(
126
126
  dataChangedInfo.columnId,
127
127
  value,
128
- dataChangedInfo.primaryKeyValue,
129
- true
128
+ dataChangedInfo.primaryKeyValue
130
129
  );
131
130
  }
132
131
  */
@@ -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) {
@@ -198,7 +198,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
198
198
  return agGridColumn.getColDef().field || '';
199
199
  }
200
200
  getAgGridColumnForAdaptableColumn(columnId) {
201
- return this.adaptable.getAgGridColumnForAdaptableColumn(this.getColumnFromId(columnId));
201
+ return this.adaptable.getAgGridColumnForColumnId(columnId);
202
202
  }
203
203
  getColumnFromFriendlyName(columnName, logWarning = true) {
204
204
  // just return null if no columns rather than logging a warning - otherwise get lots at startup
@@ -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;
@@ -51,12 +51,16 @@ class GridApiImpl extends ApiBase_1.ApiBase {
51
51
  if (!abColumn || abColumn.readOnly) {
52
52
  return;
53
53
  }
54
+ const rowNode = this.getRowNodeForPrimaryKey(primaryKeyValue);
55
+ if (!this.adaptable.isCellEditable(rowNode, this.adaptable.getAgGridColumnForColumnId(columnId))) {
56
+ return;
57
+ }
54
58
  const gridCell = {
55
59
  primaryKeyValue: primaryKeyValue,
56
60
  rawValue: newValue,
57
61
  displayValue: newValue,
58
62
  normalisedValue: newValue,
59
- rowNode: this.getRowNodeForPrimaryKey(primaryKeyValue),
63
+ rowNode: rowNode,
60
64
  column: abColumn,
61
65
  };
62
66
  this.adaptable.api.internalApi.setGridCell(gridCell);
@@ -149,14 +153,37 @@ class GridApiImpl extends ApiBase_1.ApiBase {
149
153
  this.adaptable.deSelectNodes(rowNodes, clearSelection);
150
154
  }
151
155
  selectCellRange(gridCellRange) {
152
- const startNode = this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueStart);
153
- const endNode = gridCellRange.primaryKeyValueEnd
154
- ? this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueEnd)
155
- : startNode;
156
+ if (gridCellRange == undefined) {
157
+ return;
158
+ }
159
+ if (gridCellRange.primaryKeyValueStart == undefined &&
160
+ gridCellRange.rowIndexStart == undefined) {
161
+ return;
162
+ }
163
+ let startNode;
164
+ let endNode;
165
+ startNode = gridCellRange.primaryKeyValueEnd
166
+ ? this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueStart)
167
+ : this.adaptable.getRowNodeByIndex(gridCellRange.rowIndexStart);
168
+ if (gridCellRange.primaryKeyValueEnd) {
169
+ endNode = this.adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueEnd);
170
+ }
171
+ else if (gridCellRange.rowIndexEnd) {
172
+ endNode = this.adaptable.getRowNodeByIndex(gridCellRange.rowIndexEnd);
173
+ }
174
+ else {
175
+ endNode = startNode;
176
+ }
156
177
  if (startNode && endNode) {
157
178
  this.adaptable.selectCells(gridCellRange.columnIds, startNode, endNode);
158
179
  }
159
180
  }
181
+ selectColumn(columnId) {
182
+ this.selectColumns([columnId]);
183
+ }
184
+ selectColumns(columnIds) {
185
+ this.adaptable.api.columnApi.selectColumns(columnIds);
186
+ }
160
187
  getFirstRowNode() {
161
188
  return this.adaptable.getFirstRowNode();
162
189
  }
@@ -313,23 +340,16 @@ class GridApiImpl extends ApiBase_1.ApiBase {
313
340
  this.adaptable.redrawRow(rowNode);
314
341
  }
315
342
  areCellsEditable(gridCells) {
316
- let returnValue = true;
317
- gridCells.forEach((gridCell) => {
318
- if (returnValue) {
319
- if (gridCell.column.readOnly) {
320
- returnValue = false;
321
- return;
322
- }
323
- let cellEditableFn = this.adaptable.adaptableOptions.editOptions.isCellEditable;
324
- if (cellEditableFn) {
325
- let functionReturnValue = cellEditableFn(gridCell);
326
- if (!functionReturnValue) {
327
- returnValue = false;
328
- }
329
- }
343
+ for (let gridCell of gridCells) {
344
+ if (gridCell.column.readOnly) {
345
+ return false;
330
346
  }
331
- });
332
- return returnValue;
347
+ const isCellEditable = this.adaptable.isCellEditable(gridCell.rowNode, this.adaptable.getAgGridColumnForColumnId(gridCell.column.columnId));
348
+ if (!isCellEditable) {
349
+ return false;
350
+ }
351
+ }
352
+ return true;
333
353
  }
334
354
  getRowCount() {
335
355
  return this.adaptable.getRowCount();
@@ -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
  }