@adaptabletools/adaptable 10.0.3 → 10.0.4-canary.3

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 (267) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/base.css +16 -6
  4. package/bundle.cjs.js +350 -0
  5. package/index.css +20 -6
  6. package/package.json +1 -5
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +14 -12
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
  12. package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
  13. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
  15. package/src/AdaptableOptions/EditOptions.d.ts +2 -3
  16. package/src/AdaptableOptions/FilterOptions.d.ts +8 -8
  17. package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
  18. package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
  19. package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
  20. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
  21. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +29 -12
  22. package/src/Api/AdaptableApi.d.ts +12 -12
  23. package/src/Api/CalculatedColumnApi.d.ts +15 -0
  24. package/src/Api/ColumnApi.d.ts +16 -5
  25. package/src/Api/EventApi.d.ts +1 -1
  26. package/src/Api/Events/AdaptableReady.d.ts +5 -8
  27. package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
  28. package/src/Api/Events/AlertFired.d.ts +2 -1
  29. package/src/Api/Events/BaseEventInfo.d.ts +10 -0
  30. package/src/Api/Events/BaseEventInfo.js +2 -0
  31. package/src/Api/Events/CellChanged.d.ts +2 -1
  32. package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
  33. package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
  34. package/src/Api/Events/DashboardChanged.d.ts +2 -1
  35. package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
  36. package/src/Api/Events/GridDataChanged.d.ts +2 -1
  37. package/src/Api/Events/LayoutChanged.d.ts +2 -1
  38. package/src/Api/Events/LiveDataChanged.d.ts +2 -1
  39. package/src/Api/Events/SearchChanged.d.ts +2 -1
  40. package/src/Api/Events/SelectionChanged.d.ts +2 -1
  41. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
  42. package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
  43. package/src/Api/Events/ThemeChanged.d.ts +2 -1
  44. package/src/Api/GridApi.d.ts +10 -10
  45. package/src/Api/Implementation/AlertApiImpl.js +17 -17
  46. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
  47. package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
  48. package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -3
  49. package/src/Api/Implementation/ColumnApiImpl.js +43 -44
  50. package/src/Api/Implementation/ConfigApiImpl.js +0 -24
  51. package/src/Api/Implementation/DashboardApiImpl.js +2 -1
  52. package/src/Api/Implementation/ExportApiImpl.js +4 -4
  53. package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
  54. package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -2
  55. package/src/Api/Implementation/GridApiImpl.d.ts +2 -2
  56. package/src/Api/Implementation/GridApiImpl.js +14 -13
  57. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -2
  58. package/src/Api/Implementation/InternalApiImpl.js +5 -5
  59. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  60. package/src/Api/Implementation/LayoutApiImpl.js +19 -3
  61. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
  62. package/src/Api/Implementation/PluginsApiImpl.js +1 -1
  63. package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
  64. package/src/Api/Implementation/ScopeApiImpl.js +11 -11
  65. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
  66. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  67. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  68. package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
  69. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
  70. package/src/Api/Implementation/UserInterfaceApiImpl.js +18 -13
  71. package/src/Api/InternalApi.d.ts +2 -2
  72. package/src/Api/LayoutApi.d.ts +7 -0
  73. package/src/Api/PluginsApi.d.ts +1 -7
  74. package/src/Api/TeamSharingApi.d.ts +1 -1
  75. package/src/Api/ThemeApi.d.ts +2 -2
  76. package/src/Api/UserInterfaceApi.d.ts +6 -5
  77. package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
  78. package/src/PredefinedConfig/AlertState.d.ts +2 -3
  79. package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
  80. package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
  81. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
  82. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
  83. package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
  84. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
  85. package/src/PredefinedConfig/Common/AdaptablePredicate.js +3 -3
  86. package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
  87. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
  88. package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
  89. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
  90. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  91. package/src/PredefinedConfig/Common/Types.js +9 -7
  92. package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
  93. package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
  94. package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
  95. package/src/PredefinedConfig/ExportState.d.ts +3 -3
  96. package/src/PredefinedConfig/FilterState.d.ts +2 -2
  97. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  98. package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
  99. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  100. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
  101. package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
  102. package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
  103. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
  104. package/src/PredefinedConfig/ThemeState.d.ts +5 -1
  105. package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
  106. package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
  107. package/src/Redux/ActionsReducers/GridRedux.js +2 -2
  108. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
  109. package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
  110. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  111. package/src/Redux/DeadRedux.d.ts +4 -8
  112. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
  113. package/src/Redux/Store/AdaptableStore.d.ts +3 -3
  114. package/src/Redux/Store/AdaptableStore.js +21 -16
  115. package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
  116. package/src/Strategy/AdaptableModuleBase.js +8 -8
  117. package/src/Strategy/AlertModule.d.ts +2 -2
  118. package/src/Strategy/AlertModule.js +13 -105
  119. package/src/Strategy/BulkUpdateModule.d.ts +2 -2
  120. package/src/Strategy/BulkUpdateModule.js +7 -7
  121. package/src/Strategy/CalculatedColumnModule.js +1 -1
  122. package/src/Strategy/CellSummaryModule.d.ts +2 -2
  123. package/src/Strategy/CellSummaryModule.js +3 -3
  124. package/src/Strategy/ConditionalStyleModule.js +3 -3
  125. package/src/Strategy/CustomSortModule.js +2 -2
  126. package/src/Strategy/DashboardModule.d.ts +2 -2
  127. package/src/Strategy/DataChangeHistoryModule.js +2 -2
  128. package/src/Strategy/ExportModule.d.ts +2 -2
  129. package/src/Strategy/ExportModule.js +1 -1
  130. package/src/Strategy/FilterModule.d.ts +2 -2
  131. package/src/Strategy/FilterModule.js +4 -4
  132. package/src/Strategy/FormatColumnModule.js +6 -6
  133. package/src/Strategy/FreeTextColumnModule.js +1 -1
  134. package/src/Strategy/GridInfoModule.d.ts +2 -2
  135. package/src/Strategy/Interface/IModule.d.ts +2 -2
  136. package/src/Strategy/LayoutModule.d.ts +2 -2
  137. package/src/Strategy/LayoutModule.js +22 -9
  138. package/src/Strategy/PlusMinusModule.js +8 -9
  139. package/src/Strategy/SmartEditModule.d.ts +2 -2
  140. package/src/Strategy/SmartEditModule.js +8 -9
  141. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  142. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  143. package/src/Utilities/Constants/GeneralConstants.js +2 -1
  144. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  145. package/src/Utilities/Constants/ModuleConstants.js +7 -7
  146. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -7
  147. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
  148. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  149. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  150. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  151. package/src/Utilities/Helpers/PreviewHelper.js +2 -2
  152. package/src/Utilities/Interface/Preview.d.ts +2 -1
  153. package/src/Utilities/ObjectFactory.js +1 -1
  154. package/src/Utilities/Services/DataService.js +5 -5
  155. package/src/Utilities/Services/LicenseService.js +16 -2
  156. package/src/Utilities/Services/MetamodelService.js +0 -1
  157. package/src/Utilities/Services/ReportService.js +12 -11
  158. package/src/Utilities/Services/ValidationService.js +4 -5
  159. package/src/View/AdaptableViewFactory.d.ts +2 -1
  160. package/src/View/AdaptableViewFactory.js +2 -0
  161. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
  162. package/src/View/Alert/AlertPopup.js +1 -1
  163. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  164. package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -3
  165. package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
  166. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
  167. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  168. package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
  169. package/src/View/Components/ColumnSelector/index.js +2 -2
  170. package/src/View/Components/FilterForm/FilterForm.js +18 -20
  171. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +1 -1
  172. package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
  173. package/src/View/Components/FilterForm/QuickFilterForm.js +15 -17
  174. package/src/View/Components/NewScopeComponent.js +1 -1
  175. package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
  176. package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
  177. package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
  178. package/src/View/Components/PreviewResultsPanel.js +1 -1
  179. package/src/View/Components/RangesComponent.js +2 -2
  180. package/src/View/Components/Selectors/ColumnSelector.js +5 -5
  181. package/src/View/Components/Selectors/ColumnValueSelector.js +4 -4
  182. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
  183. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  184. package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
  185. package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
  186. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
  187. package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
  188. package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
  189. package/src/View/CustomSort/CustomSortPopup.js +2 -2
  190. package/src/View/CustomSort/CustomSortSummary.js +3 -3
  191. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
  192. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
  193. package/src/View/Dashboard/Dashboard.js +2 -3
  194. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
  195. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
  196. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
  197. package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
  198. package/src/View/Export/ExportViewPanel.js +6 -6
  199. package/src/View/Filter/FilterSummary.js +2 -2
  200. package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
  201. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  202. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  203. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +1 -1
  204. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +2 -2
  205. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  206. package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
  207. package/src/View/GridInfo/GridOptionsComponent.js +1 -1
  208. package/src/View/Layout/LayoutViewPanel.js +2 -2
  209. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
  210. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
  211. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
  212. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
  213. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
  214. package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
  215. package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
  216. package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
  217. package/src/View/Query/QueryViewPanel.js +3 -3
  218. package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
  219. package/src/View/Schedule/SchedulePopup.js +3 -3
  220. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
  221. package/src/View/SmartEdit/SmartEditPopup.js +1 -1
  222. package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
  223. package/src/View/StateManagement/StateManagementPopup.js +21 -114
  224. package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
  225. package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
  226. package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
  227. package/src/View/StateManagement/components/ClearButton.js +9 -0
  228. package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
  229. package/src/View/StateManagement/components/ExportDropdown.js +43 -0
  230. package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
  231. package/src/View/StateManagement/components/LoadButton.js +38 -0
  232. package/src/View/StateManagement/handleExportState.d.ts +1 -0
  233. package/src/View/StateManagement/handleExportState.js +22 -0
  234. package/src/View/Theme/ThemeViewPanel.js +1 -1
  235. package/src/agGrid/ActionColumnRenderer.js +1 -1
  236. package/src/agGrid/Adaptable.d.ts +9 -8
  237. package/src/agGrid/Adaptable.js +174 -132
  238. package/src/agGrid/agGridHelper.d.ts +4 -4
  239. package/src/agGrid/agGridHelper.js +46 -46
  240. package/src/agGrid/agGridMenuHelper.d.ts +15 -13
  241. package/src/agGrid/agGridMenuHelper.js +55 -47
  242. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
  243. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
  244. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
  245. package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
  246. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
  247. package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
  248. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
  249. package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
  250. package/src/components/Datepicker/index.js +9 -5
  251. package/src/components/ExpressionEditor/index.js +7 -7
  252. package/src/components/Modal/index.d.ts +1 -1
  253. package/src/components/OverlayTrigger/index.js +3 -3
  254. package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
  255. package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
  256. package/src/components/ProgressIndicator/ProgressIndicator.js +1 -1
  257. package/src/components/icons/index.js +2 -0
  258. package/src/components/icons/upload.d.ts +3 -0
  259. package/src/components/icons/upload.js +8 -0
  260. package/src/metamodel/adaptable.metamodel.d.ts +104 -50
  261. package/src/metamodel/adaptable.metamodel.js +358 -300
  262. package/src/types.d.ts +2 -2
  263. package/version.d.ts +1 -1
  264. package/version.js +1 -1
  265. package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
  266. package/src/PredefinedConfig/DeprecatedState.js +0 -5
  267. package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
@@ -1,6 +1,6 @@
1
1
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
2
2
  import { DataType } from '../PredefinedConfig/Common/Enums';
3
- import { RowNode } from '@ag-grid-community/all-modules';
3
+ import { Column, RowNode } from '@ag-grid-community/all-modules';
4
4
  import { GridCell } from '../../types';
5
5
  /**
6
6
  * A large range of column-related functions in AdapTable
@@ -14,7 +14,7 @@ export interface ColumnApi {
14
14
  * Retrieves 'ColumnType' property for a given Column
15
15
  * @param columnId Colmun to use
16
16
  */
17
- getVendorColumnType(columnId: string): string | string[];
17
+ getAgGridColumnType(columnId: string): string | string[];
18
18
  /**
19
19
  * Returns all visible Columns
20
20
  * */
@@ -255,10 +255,15 @@ export interface ColumnApi {
255
255
  */
256
256
  getAllColumnFriendlyNames(): string[];
257
257
  /**
258
- * Retrieves the field property for the column
259
- * @param columnId string
258
+ * Retrieves AG Grid's field property for the column
259
+ * @param columnId columnId to look up
260
260
  */
261
- getVendorGridColumnFieldForColumn(columnId: string): string;
261
+ getAgGridColumnFieldForAdaptableColumn(columnId: string): string;
262
+ /**
263
+ * Retrieves AG Grid's column for an Adaptable column
264
+ * @param columnId columnId to look up
265
+ */
266
+ getAgGridColumnForAdaptableColumn(columnId: string): Column;
262
267
  /**
263
268
  * Does Column use AdapTable's Filter Form
264
269
  * @param columnId Column to Check
@@ -269,4 +274,10 @@ export interface ColumnApi {
269
274
  * @param columnId Column to Check
270
275
  */
271
276
  usesAdaptableQuickFilter(columnId: string): boolean;
277
+ /**
278
+ * Checks if a column is referenced in a given Expression
279
+ * @param columnId Column to Check
280
+ * @param expression Expression to Lookup
281
+ */
282
+ isColumnReferencedInExpression(columnId: string, expression: string): boolean;
272
283
  }
@@ -196,7 +196,7 @@ export interface EventApi {
196
196
  /**
197
197
  * Fired when Adaptable is up and running - has no arguments.
198
198
  * @param eventName AdaptableReady - use as: adaptableApi.eventApi.on('AdaptableReady', (adaptableReadyInfo: AdaptableReadyInfo) => { .....[do stuff]...})
199
- * @param callback An `AdaptableReadyInfo` object which contains the adaptableApi and the vendorGrid
199
+ * @param callback An `AdaptableReadyInfo` object which contains the adaptableApi and GridOptions
200
200
  * @returns the unsubscribe function
201
201
  */
202
202
  on(eventName: 'AdaptableReady', callback: (adaptableReadyInfo: AdaptableReadyInfo) => void): VoidFunction;
@@ -1,14 +1,11 @@
1
- import { AdaptableApi } from '../AdaptableApi';
1
+ import { GridOptions } from '@ag-grid-community/all-modules';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * Object returned by `AdaptableReady` event - fired when AdapTable has loaded
4
5
  */
5
- export interface AdaptableReadyInfo {
6
+ export interface AdaptableReadyInfo extends BaseEventInfo {
6
7
  /**
7
- * Instance of the underlying vendor grid (e.g. for AG Grid its the GridOptions object)
8
+ * Underlying AG Grid instance
8
9
  */
9
- vendorGrid: any;
10
- /**
11
- * Adaptable API object used for runtime programmatic access to AdapTable
12
- */
13
- adaptableApi: AdaptableApi;
10
+ gridOptions: GridOptions;
14
11
  }
@@ -1,9 +1,10 @@
1
1
  import * as Redux from 'redux';
2
2
  import { AdaptableState } from '../../PredefinedConfig/AdaptableState';
3
+ import { BaseEventInfo } from './BaseEventInfo';
3
4
  /**
4
5
  * Object returned by the `AdaptableStateChanged` event
5
6
  */
6
- export interface AdaptableStateChangedInfo {
7
+ export interface AdaptableStateChangedInfo extends BaseEventInfo {
7
8
  /**
8
9
  * Name of the Action
9
10
  */
@@ -1,8 +1,9 @@
1
1
  import { AdaptableAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * Object returned by the `AlertFired` event
4
5
  */
5
- export interface AlertFiredInfo {
6
+ export interface AlertFiredInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Alert which has been fired
8
9
  */
@@ -0,0 +1,10 @@
1
+ import { AdaptableApi } from '../AdaptableApi';
2
+ /**
3
+ * Base Object returned by all events - contains the Adaptable API
4
+ */
5
+ export interface BaseEventInfo {
6
+ /**
7
+ * Adaptable API object used for runtime programmatic access to AdapTable
8
+ */
9
+ adaptableApi: AdaptableApi;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,9 @@
1
1
  import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * EventInfo returned by CellChanged event
4
5
  */
5
- export interface CellChangedInfo {
6
+ export interface CellChangedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Object providing full information of the cell (and column and row) that changed
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * Event Info published by CheckboxColumnClicked event
4
5
  */
5
- export interface CheckboxColumnClickedInfo {
6
+ export interface CheckboxColumnClickedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Name of Column where Checkbox was clicked
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { CustomToolbar } from '../../AdaptableOptions/DashboardOptions';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * EventInfo returned by the CustomToolbarConfigured event
4
5
  */
5
- export interface CustomToolbarConfiguredInfo {
6
+ export interface CustomToolbarConfiguredInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Custom Toolbar in which the 'Configure' button has been clicked
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { DashboardState } from '../../PredefinedConfig/DashboardState';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * Object returned by the `DashboardChanged` event
4
5
  */
5
- export interface DashboardChangedInfo {
6
+ export interface DashboardChangedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * What caused Dashboard State to change
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { AdaptableFlashingAlert } from '../../PredefinedConfig/Common/AdaptableFlashingAlert';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * Object returned by the `FlashingAlertFired` event
4
5
  */
5
- export interface FlashingAlertFiredInfo {
6
+ export interface FlashingAlertFiredInfo extends BaseEventInfo {
6
7
  /**
7
8
  * FlashingAlert which has been fired
8
9
  */
@@ -1,7 +1,8 @@
1
+ import { BaseEventInfo } from './BaseEventInfo';
1
2
  /**
2
3
  * EventInfo returned by GridDataChanged event
3
4
  */
4
- export interface GridDataChangedInfo {
5
+ export interface GridDataChangedInfo extends BaseEventInfo {
5
6
  /**
6
7
  * Rows that have been added, updated, or deleted
7
8
  */
@@ -1,8 +1,9 @@
1
1
  import { LayoutState } from '../../PredefinedConfig/LayoutState';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * EventInfo returned by LayoutChanged event
4
5
  */
5
- export interface LayoutChangedInfo {
6
+ export interface LayoutChangedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * What caused Layout State to change
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { Report } from '../../PredefinedConfig/ExportState';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * EventInfo returned by LiveDataChanged event
4
5
  */
5
- export interface LiveDataChangedInfo {
6
+ export interface LiveDataChangedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Which Adaptable partner is the export destination for the live data
8
9
  */
@@ -2,10 +2,11 @@ import { DataSource } from '../../PredefinedConfig/DataSourceState';
2
2
  import { CustomSort } from '../../PredefinedConfig/CustomSortState';
3
3
  import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
4
4
  import { ColumnFilter } from '../../PredefinedConfig/FilterState';
5
+ import { BaseEventInfo } from './BaseEventInfo';
5
6
  /**
6
7
  * EventInfo returned by SearchChanged event; includes full AdapTable search and sort info plus the event's trigger
7
8
  */
8
- export interface SearchChangedInfo {
9
+ export interface SearchChangedInfo extends BaseEventInfo {
9
10
  /**
10
11
  * What action caused event to fire: DataSource, CurrentQuery, Filter, DataChange or Sort
11
12
  */
@@ -1,9 +1,10 @@
1
1
  import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellInfo';
2
2
  import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
3
+ import { BaseEventInfo } from './BaseEventInfo';
3
4
  /**
4
5
  * Event Info published by SelectionChanged event
5
6
  */
6
- export interface SelectionChangedInfo {
7
+ export interface SelectionChangedInfo extends BaseEventInfo {
7
8
  /**
8
9
  * Details of cells currently selected in the Grid
9
10
  */
@@ -1,8 +1,9 @@
1
1
  import { SystemStatusMessageInfo } from '../../PredefinedConfig/Common/SystemStatusMessageInfo';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * Object returned by the `SystemStatusMessageDisplayed' event
4
5
  */
5
- export interface SystemStatusMessageDisplayedInfo {
6
+ export interface SystemStatusMessageDisplayedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Details of the System Status Message and Type
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { SharedEntity } from '../../PredefinedConfig/TeamSharingState';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * EventInfo returned by TeamSharingEntityChanged event
4
5
  */
5
- export interface TeamSharingEntityChangedInfo {
6
+ export interface TeamSharingEntityChangedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Object containing the Shared Entity that has changed
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { AdaptableTheme } from '../../PredefinedConfig/ThemeState';
2
+ import { BaseEventInfo } from './BaseEventInfo';
2
3
  /**
3
4
  * Object returned by the `ThemeChanged` event
4
5
  */
5
- export interface ThemeChangedInfo {
6
+ export interface ThemeChangedInfo extends BaseEventInfo {
6
7
  /**
7
8
  * Selected Theme: either name of a (System) theme or the (Custom) Theme itself
8
9
  */
@@ -8,7 +8,7 @@ import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
8
8
  import { CellHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo';
9
9
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
10
10
  import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
11
- import { RowNode } from '@ag-grid-community/all-modules';
11
+ import { GridOptions, RowNode } from '@ag-grid-community/all-modules';
12
12
  import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
13
13
  /**
14
14
  * Provides access to important properites of AdapTable e.g. sorting, selected cells etc.
@@ -20,7 +20,7 @@ export interface GridApi {
20
20
  getGridState(): GridState;
21
21
  /**
22
22
  * Repopulates grid with given data
23
- * @param data any data from any datasource that is suitable for the underlying grid.
23
+ * @param data any data from any datasource that is suitable for AG Grid
24
24
  */
25
25
  setGridData(data: any): void;
26
26
  /**
@@ -33,23 +33,23 @@ export interface GridApi {
33
33
  getFilteredData(): any[];
34
34
  /**
35
35
  * Loads grid with given data
36
- * @param data any data from any datasource that is suitable for the underlying grid.
36
+ * @param data any data from any datasource that is suitable for AG Grid
37
37
  */
38
38
  loadGridData(data: any): void;
39
39
  /**
40
- * Updates Adaptable (and underlying grid) with rows that have changed
40
+ * Updates Adaptable (and AG Grid) with rows that have changed
41
41
  * @param dataRows rows which have been updated - send whole row and Adaptable will take care of the rest
42
42
  * @param config batch option and callback function to run post update
43
43
  */
44
44
  updateGridData(dataRows: any[], config?: DataUpdateConfig): void;
45
45
  /**
46
- * Adds rows to Adaptable (and underlying grid)
46
+ * Adds rows to Adaptable (and AG Grid)
47
47
  * @param dataRows rows to add; ensure all 'mandatory' fields are included and Primary Key is unique
48
48
  * @param config batch option and callback function to run post addition
49
49
  */
50
50
  addGridData(dataRows: any[], config?: DataUpdateConfig): void;
51
51
  /**
52
- * Deletes rows from Adaptable (and underlying grid)
52
+ * Deletes rows from Adaptable (and AG Grid)
53
53
  * @param dataRows rows which should be deleted
54
54
  * @param config batch option and callback function to run post deletion
55
55
  */
@@ -86,9 +86,9 @@ export interface GridApi {
86
86
  */
87
87
  getSelectedRowInfo(): SelectedRowInfo;
88
88
  /**
89
- * Returns underlying Vendor Grid (object passed into Adaptable Options at start-up)
89
+ * Returns Ag Grid instance (passed into Adaptable Options at start-up)
90
90
  */
91
- getVendorGrid(): any;
91
+ getAgGridInstance(): GridOptions;
92
92
  /**
93
93
  * Returns Column Sort information in Adaptable
94
94
  */
@@ -308,11 +308,11 @@ export interface GridApi {
308
308
  */
309
309
  fireSearchChangedEvent(searchChangedTrigger: 'DataSource' | 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort', searchAtDate?: Date): void;
310
310
  /**
311
- * Fires Grid Data Changed Event - when any data in vendor grid data set has changed
311
+ * Fires Cell Changed Changed Event - when any data in AG Grid's dataset has changed
312
312
  */
313
313
  fireCellChangedEvent(cellChangedInfo: DataChangedInfo): void;
314
314
  /**
315
- * Fires Grid Data Changed Event - when any data in vendor grid data set has changed
315
+ * Fires Grid Data Changed Event - when a row has changed in AG Grid
316
316
  */
317
317
  fireGridDataChangedEvent(dataRows: any[], rowTigger: 'Add' | 'Edit' | 'Delete'): void;
318
318
  /**
@@ -117,7 +117,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
117
117
  }
118
118
  if (actionName === 'highlight-cell') {
119
119
  this.adaptable.api.gridApi.highlightCell({
120
- columnId: dataChangedInfo.columnId,
120
+ columnId: dataChangedInfo.column.columnId,
121
121
  primaryKeyValue: dataChangedInfo.primaryKeyValue,
122
122
  highlightType: alertDefinition.MessageType,
123
123
  timeout: this.getNotificationsOptions().cellHighlightDuration,
@@ -125,11 +125,11 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
125
125
  return;
126
126
  }
127
127
  if (actionName === 'jump-to-cell') {
128
- this.adaptable.api.gridApi.jumpToCell(dataChangedInfo.primaryKeyValue, dataChangedInfo.columnId);
128
+ this.adaptable.api.gridApi.jumpToCell(dataChangedInfo.primaryKeyValue, dataChangedInfo.column.columnId);
129
129
  return;
130
130
  }
131
131
  if (actionName === 'jump-to-column') {
132
- this.adaptable.api.gridApi.jumpToColumn(dataChangedInfo.columnId);
132
+ this.adaptable.api.gridApi.jumpToColumn(dataChangedInfo.column.columnId);
133
133
  return;
134
134
  }
135
135
  if (actionName === 'suspend') {
@@ -159,6 +159,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
159
159
  showFlashingAlert(alertToShow) {
160
160
  this.addUidToAdaptableObject(alertToShow);
161
161
  const flashingAlertFiredInfo = {
162
+ adaptableApi: this.adaptable.api,
162
163
  flashingAlert: alertToShow,
163
164
  };
164
165
  const results = this.adaptable.api.eventApi.emitSync('FlashingAlertFired', flashingAlertFiredInfo);
@@ -181,9 +182,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
181
182
  this.addUidToAdaptableObject(alertToShow);
182
183
  this.dispatchAction(SystemRedux.SystemAlertAdd(alertToShow, this.getNotificationsOptions().maxAlertsInStore));
183
184
  // 2. Publish the Alert Fired Event
184
- const alertFiredInfo = {
185
- alert: alertToShow,
186
- };
185
+ const alertFiredInfo = { adaptableApi: this.adaptable.api, alert: alertToShow };
187
186
  const results = await this.adaptable.api.eventApi.emit('AlertFired', alertFiredInfo);
188
187
  const showPopup = results.reduce((endResult, aResult) => {
189
188
  return endResult && aResult !== false;
@@ -212,7 +211,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
212
211
  }
213
212
  // 4: Jump to the Cell
214
213
  if (alertProperties.JumpToCell && dataChangedInfo) {
215
- this.adaptable.jumpToCell(dataChangedInfo.columnId, dataChangedInfo.rowNode);
214
+ this.adaptable.jumpToCell(dataChangedInfo.column.columnId, dataChangedInfo.rowNode);
216
215
  }
217
216
  // 5: Hight the cell - though that is taken care of in the Style Service
218
217
  if (alertProperties.HighlightCell && dataChangedInfo) {
@@ -221,7 +220,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
221
220
  alertNode = this.adaptable.getRowNodeForPrimaryKey(dataChangedInfo.primaryKeyValue);
222
221
  }
223
222
  if (alertNode) {
224
- this.adaptable.api.gridApi.refreshCells([alertNode], [dataChangedInfo.columnId]);
223
+ this.adaptable.api.gridApi.refreshCells([alertNode], [dataChangedInfo.column.columnId]);
225
224
  setTimeout(() => {
226
225
  this.dispatchAction(SystemRedux.SystemAlertRemoveHighlight(alertToShow));
227
226
  }, this.adaptable.adaptableOptions.notificationsOptions.cellHighlightDuration);
@@ -233,9 +232,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
233
232
  }
234
233
  }
235
234
  publishAlertFiredEvent(alertToFire) {
236
- const alertFiredInfo = {
237
- alert: alertToFire,
238
- };
235
+ const alertFiredInfo = { adaptableApi: this.adaptable.api, alert: alertToFire };
239
236
  this.adaptable.api.eventApi.emit('AlertFired', alertFiredInfo);
240
237
  }
241
238
  displayMessageAlertPopup(alertToDisplayAsPopup) {
@@ -311,14 +308,17 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
311
308
  return flashingAlertDefinitions === null || flashingAlertDefinitions === void 0 ? void 0 : flashingAlertDefinitions.map((alert) => this.getFlashingAlertDefinitionById(alert === null || alert === void 0 ? void 0 : alert.Uuid));
312
309
  }
313
310
  getAlertDescription(alertDefinition, dataChangedInfo) {
314
- if (alertDefinition.MessageText != null) {
315
- if (typeof alertDefinition.MessageText === 'function') {
316
- return alertDefinition.MessageText(alertDefinition.Scope, alertDefinition.Rule, dataChangedInfo);
317
- }
318
- else {
319
- return alertDefinition.MessageText;
311
+ var _a;
312
+ const alertMessageFunction = (_a = this.adaptable.adaptableOptions.notificationsOptions) === null || _a === void 0 ? void 0 : _a.alertMessageText;
313
+ if (alertMessageFunction) {
314
+ const returnText = alertMessageFunction(alertDefinition, dataChangedInfo);
315
+ if (returnText) {
316
+ return returnText;
320
317
  }
321
318
  }
319
+ if (alertDefinition.MessageText != null) {
320
+ return alertDefinition.MessageText;
321
+ }
322
322
  let scopeDescription = this.adaptable.api.scopeApi.getScopeDescription(alertDefinition.Scope);
323
323
  let ruleDescription = this.getAlertRuleDescription(alertDefinition);
324
324
  return scopeDescription + ' - ' + ruleDescription;
@@ -13,4 +13,7 @@ export declare class CalculatedColumnApiImpl extends ApiBase implements Calculat
13
13
  deleteCalculatedColumn(column: string): void;
14
14
  showCalculatedColumnPopup(): void;
15
15
  getCalculatedColumnModuleReferences(calculatedColumn: CalculatedColumn): string[];
16
+ getCalculatedColumnsReferencingColumnId(columnId: string): CalculatedColumn[];
17
+ getReferencedColumnIdsForCalculatedColumn(calculatedColumn: CalculatedColumn): string[];
18
+ getReferencedColumnIdsForCalculatedColumnId(calculatedColumnId: string): string[];
16
19
  }
@@ -60,5 +60,28 @@ class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
60
60
  });
61
61
  return references;
62
62
  }
63
+ getCalculatedColumnsReferencingColumnId(columnId) {
64
+ var calcColumns = [];
65
+ 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)) {
68
+ calcColumns.push(calculatedColumn);
69
+ }
70
+ });
71
+ return calcColumns;
72
+ }
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);
76
+ return columnIds;
77
+ }
78
+ getReferencedColumnIdsForCalculatedColumnId(calculatedColumnId) {
79
+ const calculatedColumn = this.adaptable.api.calculatedColumnApi
80
+ .getAllCalculatedColumn()
81
+ .find((cc) => cc.ColumnId == calculatedColumnId);
82
+ if (calculatedColumn) {
83
+ return this.getReferencedColumnIdsForCalculatedColumn(calculatedColumn);
84
+ }
85
+ }
63
86
  }
64
87
  exports.CalculatedColumnApiImpl = CalculatedColumnApiImpl;
@@ -3,7 +3,7 @@ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { DataType } from '../../PredefinedConfig/Common/Enums';
4
4
  import { ColumnApi } from '../ColumnApi';
5
5
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
6
- import { RowNode } from '@ag-grid-community/all-modules';
6
+ import { Column, RowNode } from '@ag-grid-community/all-modules';
7
7
  export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
8
8
  getColumns(): AdaptableColumn[];
9
9
  getVisibleColumns(): AdaptableColumn[];
@@ -15,7 +15,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
15
15
  selectColumns(columnIds: string[]): void;
16
16
  hideColumn(columnId: string): void;
17
17
  showColumn(columnId: string): void;
18
- getVendorColumnType(columnId: string): string | string[];
18
+ getAgGridColumnType(columnId: string): string | string[];
19
19
  isRowGroupColumn(columnId: string): boolean;
20
20
  isCalculatedColumn(columnId: string): boolean;
21
21
  isFreeTextColumn(columnId: string): boolean;
@@ -35,7 +35,8 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
35
35
  doesColumnExist(columnId: string): boolean;
36
36
  getColumnFromId(columnId: string, logWarning?: boolean): AdaptableColumn | undefined;
37
37
  getColumnIdsFromId(columnId: string, logWarning?: boolean): string[] | undefined;
38
- getVendorGridColumnFieldForColumn(colId: string): string;
38
+ getAgGridColumnFieldForAdaptableColumn(colId: string): string;
39
+ getAgGridColumnForAdaptableColumn(columnId: string): Column;
39
40
  getColumnFromFriendlyName(columnName: string, logWarning?: boolean): AdaptableColumn;
40
41
  getColumnsOfType(dataType: DataType): AdaptableColumn[];
41
42
  getNumericColumns(): AdaptableColumn[];
@@ -64,4 +65,5 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
64
65
  getAllColumnFriendlyNames(): string[];
65
66
  usesAdaptableFilterForm(columnId: string): boolean;
66
67
  usesAdaptableQuickFilter(columnId: string): boolean;
68
+ isColumnReferencedInExpression(columnId: string, expression: string): boolean;
67
69
  }