@adaptabletools/adaptable 10.0.2 → 10.0.4-canary.2

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 (306) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/base.css +84 -32
  4. package/bundle.cjs.js +350 -0
  5. package/index.css +100 -34
  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 +24 -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 +22 -15
  17. package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
  18. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
  19. package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
  20. package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
  21. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
  22. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +108 -6
  23. package/src/Api/AdaptableApi.d.ts +12 -12
  24. package/src/Api/AlertApi.d.ts +1 -1
  25. package/src/Api/CalculatedColumnApi.d.ts +15 -0
  26. package/src/Api/ColumnApi.d.ts +49 -5
  27. package/src/Api/ConfigApi.d.ts +8 -0
  28. package/src/Api/EventApi.d.ts +1 -1
  29. package/src/Api/Events/AdaptableReady.d.ts +5 -8
  30. package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
  31. package/src/Api/Events/AlertFired.d.ts +2 -1
  32. package/src/Api/Events/BaseEventInfo.d.ts +10 -0
  33. package/src/{Utilities/Interface/ProgressIndicator.js → Api/Events/BaseEventInfo.js} +0 -0
  34. package/src/Api/Events/CellChanged.d.ts +2 -1
  35. package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
  36. package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
  37. package/src/Api/Events/DashboardChanged.d.ts +2 -1
  38. package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
  39. package/src/Api/Events/GridDataChanged.d.ts +2 -1
  40. package/src/Api/Events/LayoutChanged.d.ts +2 -1
  41. package/src/Api/Events/LiveDataChanged.d.ts +2 -1
  42. package/src/Api/Events/SearchChanged.d.ts +2 -1
  43. package/src/Api/Events/SelectionChanged.d.ts +2 -1
  44. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
  45. package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
  46. package/src/Api/Events/ThemeChanged.d.ts +2 -1
  47. package/src/Api/GridApi.d.ts +44 -18
  48. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
  49. package/src/Api/Implementation/AlertApiImpl.js +22 -15
  50. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
  51. package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
  52. package/src/Api/Implementation/ColumnApiImpl.d.ts +12 -3
  53. package/src/Api/Implementation/ColumnApiImpl.js +79 -44
  54. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  55. package/src/Api/Implementation/ConfigApiImpl.js +28 -41
  56. package/src/Api/Implementation/DashboardApiImpl.js +2 -1
  57. package/src/Api/Implementation/ExportApiImpl.js +4 -4
  58. package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
  59. package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
  60. package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
  61. package/src/Api/Implementation/GridApiImpl.js +30 -13
  62. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -2
  63. package/src/Api/Implementation/InternalApiImpl.js +21 -5
  64. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  65. package/src/Api/Implementation/LayoutApiImpl.js +19 -3
  66. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
  67. package/src/Api/Implementation/PluginsApiImpl.js +1 -1
  68. package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
  69. package/src/Api/Implementation/ScopeApiImpl.js +11 -11
  70. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
  71. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  72. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  73. package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
  74. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +15 -11
  75. package/src/Api/Implementation/UserInterfaceApiImpl.js +73 -91
  76. package/src/Api/InternalApi.d.ts +4 -2
  77. package/src/Api/LayoutApi.d.ts +7 -0
  78. package/src/Api/PluginsApi.d.ts +1 -7
  79. package/src/Api/TeamSharingApi.d.ts +1 -1
  80. package/src/Api/ThemeApi.d.ts +2 -2
  81. package/src/Api/UserInterfaceApi.d.ts +19 -9
  82. package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
  83. package/src/PredefinedConfig/AlertState.d.ts +5 -1
  84. package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
  85. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -38
  86. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
  87. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
  88. package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
  89. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
  90. package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
  91. package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
  92. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
  93. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
  94. package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
  95. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
  96. package/src/PredefinedConfig/Common/SpecialColumnSettings.js +2 -0
  97. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  98. package/src/PredefinedConfig/Common/Types.js +9 -7
  99. package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
  100. package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
  101. package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
  102. package/src/PredefinedConfig/ExportState.d.ts +3 -3
  103. package/src/PredefinedConfig/FilterState.d.ts +3 -3
  104. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  105. package/src/PredefinedConfig/FreeTextColumnState.d.ts +11 -1
  106. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  107. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
  108. package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
  109. package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
  110. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
  111. package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
  112. package/src/PredefinedConfig/SystemState.d.ts +4 -1
  113. package/src/PredefinedConfig/ThemeState.d.ts +5 -1
  114. package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
  115. package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
  116. package/src/Redux/ActionsReducers/GridRedux.js +2 -2
  117. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
  118. package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
  119. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  120. package/src/Redux/DeadRedux.d.ts +4 -8
  121. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
  122. package/src/Redux/Store/AdaptableStore.d.ts +3 -3
  123. package/src/Redux/Store/AdaptableStore.js +25 -16
  124. package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
  125. package/src/Strategy/AdaptableModuleBase.js +8 -8
  126. package/src/Strategy/AlertModule.d.ts +2 -2
  127. package/src/Strategy/AlertModule.js +13 -105
  128. package/src/Strategy/BulkUpdateModule.d.ts +2 -2
  129. package/src/Strategy/BulkUpdateModule.js +7 -7
  130. package/src/Strategy/CalculatedColumnModule.js +1 -1
  131. package/src/Strategy/CellSummaryModule.d.ts +2 -2
  132. package/src/Strategy/CellSummaryModule.js +3 -3
  133. package/src/Strategy/ConditionalStyleModule.js +3 -3
  134. package/src/Strategy/CustomSortModule.js +2 -2
  135. package/src/Strategy/DashboardModule.d.ts +2 -2
  136. package/src/Strategy/DataChangeHistoryModule.js +2 -2
  137. package/src/Strategy/ExportModule.d.ts +2 -4
  138. package/src/Strategy/ExportModule.js +59 -62
  139. package/src/Strategy/FilterModule.d.ts +2 -2
  140. package/src/Strategy/FilterModule.js +4 -4
  141. package/src/Strategy/FormatColumnModule.js +6 -6
  142. package/src/Strategy/FreeTextColumnModule.js +1 -1
  143. package/src/Strategy/GridInfoModule.d.ts +2 -2
  144. package/src/Strategy/Interface/IModule.d.ts +2 -2
  145. package/src/Strategy/LayoutModule.d.ts +2 -2
  146. package/src/Strategy/LayoutModule.js +22 -9
  147. package/src/Strategy/PlusMinusModule.js +8 -9
  148. package/src/Strategy/SmartEditModule.d.ts +2 -2
  149. package/src/Strategy/SmartEditModule.js +8 -9
  150. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  151. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  152. package/src/Utilities/Constants/GeneralConstants.js +2 -1
  153. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  154. package/src/Utilities/Constants/ModuleConstants.js +7 -7
  155. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -7
  156. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
  157. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  158. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  159. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  160. package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
  161. package/src/Utilities/Helpers/DateHelper.js +30 -20
  162. package/src/Utilities/Helpers/PreviewHelper.js +2 -2
  163. package/src/Utilities/Interface/Preview.d.ts +2 -1
  164. package/src/Utilities/ObjectFactory.d.ts +1 -1
  165. package/src/Utilities/ObjectFactory.js +14 -2
  166. package/src/Utilities/Services/DataService.js +5 -5
  167. package/src/Utilities/Services/LicenseService.js +16 -2
  168. package/src/Utilities/Services/ReportService.js +13 -12
  169. package/src/Utilities/Services/ValidationService.js +4 -5
  170. package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
  171. package/src/Utilities/runIfNotResolvedIn.js +23 -0
  172. package/src/View/AdaptableView.js +1 -1
  173. package/src/View/AdaptableViewFactory.d.ts +2 -1
  174. package/src/View/AdaptableViewFactory.js +2 -0
  175. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
  176. package/src/View/Alert/AlertPopup.js +1 -1
  177. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
  178. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  179. package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
  180. package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
  181. package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
  182. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
  183. package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
  184. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
  185. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  186. package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
  187. package/src/View/Components/ColumnSelector/index.js +2 -2
  188. package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
  189. package/src/View/Components/FilterForm/FilterForm.js +57 -38
  190. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
  191. package/src/View/Components/FilterForm/ListBoxFilterForm.js +18 -9
  192. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
  193. package/src/View/Components/FilterForm/QuickFilterForm.js +74 -35
  194. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
  195. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
  196. package/src/View/Components/NewScopeComponent.js +1 -1
  197. package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
  198. package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
  199. package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
  200. package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
  201. package/src/View/Components/PreviewResultsPanel.js +1 -1
  202. package/src/View/Components/RangesComponent.js +2 -2
  203. package/src/View/Components/Selectors/ColumnSelector.js +5 -5
  204. package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
  205. package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
  206. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
  207. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  208. package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
  209. package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
  210. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
  211. package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
  212. package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
  213. package/src/View/CustomSort/CustomSortPopup.js +2 -2
  214. package/src/View/CustomSort/CustomSortSummary.js +3 -3
  215. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
  216. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
  217. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
  218. package/src/View/Dashboard/Dashboard.js +2 -3
  219. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
  220. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
  221. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
  222. package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
  223. package/src/View/Export/ExportViewPanel.js +6 -6
  224. package/src/View/Filter/FilterSummary.js +2 -2
  225. package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
  226. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  227. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  228. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
  229. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
  230. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  231. package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
  232. package/src/View/GridInfo/GridInfoPopup.js +4 -1
  233. package/src/View/GridInfo/GridOptionsComponent.js +1 -1
  234. package/src/View/Layout/LayoutViewPanel.js +2 -2
  235. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
  236. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
  237. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
  238. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
  239. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
  240. package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
  241. package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
  242. package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
  243. package/src/View/Query/QueryViewPanel.js +3 -3
  244. package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
  245. package/src/View/Schedule/SchedulePopup.js +3 -3
  246. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
  247. package/src/View/SmartEdit/SmartEditPopup.js +1 -1
  248. package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
  249. package/src/View/StateManagement/StateManagementPopup.js +21 -114
  250. package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
  251. package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
  252. package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
  253. package/src/View/StateManagement/components/ClearButton.js +9 -0
  254. package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
  255. package/src/View/StateManagement/components/ExportDropdown.js +43 -0
  256. package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
  257. package/src/View/StateManagement/components/LoadButton.js +38 -0
  258. package/src/View/StateManagement/handleExportState.d.ts +1 -0
  259. package/src/View/StateManagement/handleExportState.js +22 -0
  260. package/src/View/Theme/ThemeViewPanel.js +1 -1
  261. package/src/View/UIHelper.d.ts +2 -0
  262. package/src/View/UIHelper.js +10 -1
  263. package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
  264. package/src/agGrid/ActionColumnRenderer.js +21 -4
  265. package/src/agGrid/Adaptable.d.ts +28 -11
  266. package/src/agGrid/Adaptable.js +326 -168
  267. package/src/agGrid/agGridHelper.d.ts +4 -4
  268. package/src/agGrid/agGridHelper.js +46 -46
  269. package/src/agGrid/agGridMenuHelper.d.ts +15 -13
  270. package/src/agGrid/agGridMenuHelper.js +55 -47
  271. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
  272. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
  273. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
  274. package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
  275. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
  276. package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
  277. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
  278. package/src/components/Dashboard/Dashboard.js +1 -1
  279. package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
  280. package/src/components/Datepicker/index.js +9 -5
  281. package/src/components/DropdownButton/index.js +1 -1
  282. package/src/components/ExpressionEditor/index.js +7 -7
  283. package/src/components/Loader/Loader.d.ts +7 -0
  284. package/src/components/Loader/Loader.js +13 -0
  285. package/src/components/Loader/index.d.ts +2 -0
  286. package/src/components/Loader/index.js +7 -0
  287. package/src/components/Modal/index.d.ts +1 -1
  288. package/src/components/OverlayTrigger/index.js +3 -3
  289. package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
  290. package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
  291. package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
  292. package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
  293. package/src/components/icons/index.js +2 -0
  294. package/src/components/icons/upload.d.ts +3 -0
  295. package/src/components/icons/upload.js +8 -0
  296. package/src/metamodel/adaptable.metamodel.d.ts +176 -52
  297. package/src/metamodel/adaptable.metamodel.js +659 -366
  298. package/src/types.d.ts +5 -4
  299. package/version.d.ts +1 -1
  300. package/version.js +1 -1
  301. package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
  302. package/src/PredefinedConfig/DeprecatedState.js +0 -5
  303. package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
  304. package/src/View/Export/ProgressIndicator.d.ts +0 -6
  305. package/src/View/Export/ProgressIndicator.js +0 -25
  306. package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
@@ -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,28 +20,36 @@ 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
+ /**
27
+ * Retrieves all data from the grid
28
+ */
29
+ getGridData(): any[];
30
+ /**
31
+ * Retrieves filtered data from the grid
32
+ */
33
+ getFilteredData(): any[];
26
34
  /**
27
35
  * Loads grid with given data
28
- * @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
29
37
  */
30
38
  loadGridData(data: any): void;
31
39
  /**
32
- * Updates Adaptable (and underlying grid) with rows that have changed
40
+ * Updates Adaptable (and AG Grid) with rows that have changed
33
41
  * @param dataRows rows which have been updated - send whole row and Adaptable will take care of the rest
34
42
  * @param config batch option and callback function to run post update
35
43
  */
36
44
  updateGridData(dataRows: any[], config?: DataUpdateConfig): void;
37
45
  /**
38
- * Adds rows to Adaptable (and underlying grid)
46
+ * Adds rows to Adaptable (and AG Grid)
39
47
  * @param dataRows rows to add; ensure all 'mandatory' fields are included and Primary Key is unique
40
48
  * @param config batch option and callback function to run post addition
41
49
  */
42
50
  addGridData(dataRows: any[], config?: DataUpdateConfig): void;
43
51
  /**
44
- * Deletes rows from Adaptable (and underlying grid)
52
+ * Deletes rows from Adaptable (and AG Grid)
45
53
  * @param dataRows rows which should be deleted
46
54
  * @param config batch option and callback function to run post deletion
47
55
  */
@@ -55,6 +63,15 @@ export interface GridApi {
55
63
  *
56
64
  */
57
65
  setCellValue(columnId: string, newValue: any, primaryKeyValue: any, forceFilter: boolean): void;
66
+ /**
67
+ * Updates multiple cells
68
+ * @param gridCells cells to update
69
+ */
70
+ setCellsValue(gridCells: {
71
+ columnId: any;
72
+ newValue: any;
73
+ primaryKeyValue: any;
74
+ }[]): void;
58
75
  /**
59
76
  * Reverses a data change (if triggered by cell edit)
60
77
  * @param dataChangedInfo data change to undo
@@ -69,9 +86,9 @@ export interface GridApi {
69
86
  */
70
87
  getSelectedRowInfo(): SelectedRowInfo;
71
88
  /**
72
- * Returns underlying Vendor Grid (object passed into Adaptable Options at start-up)
89
+ * Returns Ag Grid instance (passed into Adaptable Options at start-up)
73
90
  */
74
- getVendorGrid(): any;
91
+ getAgGridInstance(): GridOptions;
75
92
  /**
76
93
  * Returns Column Sort information in Adaptable
77
94
  */
@@ -185,10 +202,10 @@ export interface GridApi {
185
202
  getPrimaryKeyValueForRowNode(rowNode: RowNode): any;
186
203
  /**
187
204
  * Retrieves Cell in given Row and Column
188
- * @param rowwNode Row to use
205
+ * @param rowNode Row to use
189
206
  * @param columnId ColumnId to lookup
190
207
  */
191
- getGridCellFromRowNode(rowwNode: RowNode, columnId: string): GridCell | undefined;
208
+ getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
192
209
  /**
193
210
  * Retrieves Display Value for a given cell
194
211
  * @param primaryKeyValue (unique) value in Primary Key Column
@@ -209,10 +226,10 @@ export interface GridApi {
209
226
  getCellNormalisedValue(primaryKeyValue: any, columnId: string): any | undefined;
210
227
  /**
211
228
  * Retrieves Raw Value for Cell in given Row and Column
212
- * @param rowwNode Row to use
229
+ * @param rowNode Row to use
213
230
  * @param columnId ColumnId to lookup
214
231
  */
215
- getRawValueFromRowNode(rowwNode: RowNode, columnId: string): any | undefined;
232
+ getRawValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
216
233
  /**
217
234
  * Retrieves Formatted Value for a given Raw Value in given Column
218
235
  * @param columnId ColumnId to lookup
@@ -221,16 +238,16 @@ export interface GridApi {
221
238
  getFormattedValueFromRawValue(columnId: string, rawValue: any): string | undefined;
222
239
  /**
223
240
  * Retrieves Display Value for Cell in given Row and Column
224
- * @param rowwNode Row to use
241
+ * @param rowNode Row to use
225
242
  * @param columnId ColumnId to lookup
226
243
  */
227
- getDisplayValueFromRowNode(rowwNode: RowNode, columnId: string): any | undefined;
244
+ getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
228
245
  /**
229
246
  * Retrieves Normalised Value for Cell in given Row and Column
230
- * @param rowwNode Row to use
247
+ * @param rowNode Row to use
231
248
  * @param columnId ColumnId to lookup
232
249
  */
233
- getNormalisedValueFromRowNode(rowwNode: RowNode, columnId: string): any | undefined;
250
+ getNormalisedValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
234
251
  /**
235
252
  * Sets the grid to Row Group
236
253
  * @param columnIds ColumnIds to row group
@@ -291,11 +308,11 @@ export interface GridApi {
291
308
  */
292
309
  fireSearchChangedEvent(searchChangedTrigger: 'DataSource' | 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort', searchAtDate?: Date): void;
293
310
  /**
294
- * 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
295
312
  */
296
313
  fireCellChangedEvent(cellChangedInfo: DataChangedInfo): void;
297
314
  /**
298
- * 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
299
316
  */
300
317
  fireGridDataChangedEvent(dataRows: any[], rowTigger: 'Add' | 'Edit' | 'Delete'): void;
301
318
  /**
@@ -335,6 +352,11 @@ export interface GridApi {
335
352
  * @param columnIds ColumnIds which contain cells to refresh
336
353
  */
337
354
  refreshCells(rowNodes: RowNode[], columnIds: string[]): void;
355
+ /**
356
+ * Forces a render of a row
357
+ * @param primaryKey row primary key
358
+ */
359
+ refreshRow(primaryKey: any): void;
338
360
  /**
339
361
  * Returns number of rows in Data Source
340
362
  */
@@ -373,4 +395,8 @@ export interface GridApi {
373
395
  * Deselects all selected rows, cells and ranges
374
396
  */
375
397
  deselectAll(): void;
398
+ /**
399
+ * Returns the Grid Container in which the Adaptable Instance is present
400
+ */
401
+ getGridContainerElement(): HTMLElement | null;
376
402
  }
@@ -54,6 +54,6 @@ export declare class AlertApiImpl extends ApiBase implements AlertApi {
54
54
  unSuspendFlashingAlertDefinition(flashingAlertDefinition: FlashingAlertDefinition): FlashingAlertDefinition;
55
55
  addFlashingAlertDefinitions(flashingAlertDefinitions: FlashingAlertDefinition[]): FlashingAlertDefinition[];
56
56
  editFlashingAlertDefinitions(flashingAlertDefinitions: FlashingAlertDefinition[]): FlashingAlertDefinition[];
57
- getAlertDescription(alert: AlertDefinition): string;
57
+ getAlertDescription(alertDefinition: AlertDefinition, dataChangedInfo?: DataChangedInfo): string;
58
58
  getAlertRuleDescription(alert: BaseAlertDefinition): string;
59
59
  }
@@ -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) {
@@ -284,7 +281,6 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
284
281
  }
285
282
  addFlashingAlertDefinition(flashingAlertDefinition) {
286
283
  this.dispatchAction(AlertRedux.FlashingAlertDefinitionAdd(flashingAlertDefinition));
287
- console.log('flasing alert', flashingAlertDefinition);
288
284
  return this.getFlashingAlertDefinitionById(flashingAlertDefinition.Uuid);
289
285
  }
290
286
  editFlashingAlertDefinition(flashingAlertDefinition) {
@@ -311,9 +307,20 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
311
307
  });
312
308
  return flashingAlertDefinitions === null || flashingAlertDefinitions === void 0 ? void 0 : flashingAlertDefinitions.map((alert) => this.getFlashingAlertDefinitionById(alert === null || alert === void 0 ? void 0 : alert.Uuid));
313
309
  }
314
- getAlertDescription(alert) {
315
- let scopeDescription = this.adaptable.api.scopeApi.getScopeDescription(alert.Scope);
316
- let ruleDescription = this.getAlertRuleDescription(alert);
310
+ getAlertDescription(alertDefinition, dataChangedInfo) {
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;
317
+ }
318
+ }
319
+ if (alertDefinition.MessageText != null) {
320
+ return alertDefinition.MessageText;
321
+ }
322
+ let scopeDescription = this.adaptable.api.scopeApi.getScopeDescription(alertDefinition.Scope);
323
+ let ruleDescription = this.getAlertRuleDescription(alertDefinition);
317
324
  return scopeDescription + ' - ' + ruleDescription;
318
325
  }
319
326
  getAlertRuleDescription(alert) {
@@ -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;
@@ -2,7 +2,8 @@ import { ApiBase } from './ApiBase';
2
2
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { DataType } from '../../PredefinedConfig/Common/Enums';
4
4
  import { ColumnApi } from '../ColumnApi';
5
- import { RowNode } from '@ag-grid-community/all-modules';
5
+ import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
6
+ import { Column, RowNode } from '@ag-grid-community/all-modules';
6
7
  export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
7
8
  getColumns(): AdaptableColumn[];
8
9
  getVisibleColumns(): AdaptableColumn[];
@@ -14,7 +15,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
14
15
  selectColumns(columnIds: string[]): void;
15
16
  hideColumn(columnId: string): void;
16
17
  showColumn(columnId: string): void;
17
- getVendorColumnType(columnId: string): string | string[];
18
+ getAgGridColumnType(columnId: string): string | string[];
18
19
  isRowGroupColumn(columnId: string): boolean;
19
20
  isCalculatedColumn(columnId: string): boolean;
20
21
  isFreeTextColumn(columnId: string): boolean;
@@ -34,7 +35,8 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
34
35
  doesColumnExist(columnId: string): boolean;
35
36
  getColumnFromId(columnId: string, logWarning?: boolean): AdaptableColumn | undefined;
36
37
  getColumnIdsFromId(columnId: string, logWarning?: boolean): string[] | undefined;
37
- getVendorGridColumnFieldForColumn(colId: string): string;
38
+ getAgGridColumnFieldForAdaptableColumn(colId: string): string;
39
+ getAgGridColumnForAdaptableColumn(columnId: string): Column;
38
40
  getColumnFromFriendlyName(columnName: string, logWarning?: boolean): AdaptableColumn;
39
41
  getColumnsOfType(dataType: DataType): AdaptableColumn[];
40
42
  getNumericColumns(): AdaptableColumn[];
@@ -49,6 +51,12 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
49
51
  getQueryableColumns(): AdaptableColumn[];
50
52
  private LogMissingColumnWarning;
51
53
  getDistinctDisplayValuesForColumn(columnId: string): any[];
54
+ getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string): Promise<{
55
+ values: any[];
56
+ suppressClientSideFilter: boolean;
57
+ }>;
58
+ getDistinctCustomSortDisplayValuesForColumn(columnId: string): Promise<any[]>;
59
+ getDistinctBulkUpdateDisplayValuesForColumn(columnId: string, selectedGridCells: GridCell[]): Promise<any[]>;
52
60
  getDistinctVisibleDisplayValuesForColumn(columnId: string): any[];
53
61
  getDistinctRawValuesForColumn(columnId: string, skipRowNode?: RowNode): any[];
54
62
  getDistinctVisibleRawValuesForColumn(columnId: string): any[];
@@ -57,4 +65,5 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
57
65
  getAllColumnFriendlyNames(): string[];
58
66
  usesAdaptableFilterForm(columnId: string): boolean;
59
67
  usesAdaptableQuickFilter(columnId: string): boolean;
68
+ isColumnReferencedInExpression(columnId: string, expression: string): boolean;
60
69
  }
@@ -18,7 +18,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
18
18
  acc[colId] = true;
19
19
  return acc;
20
20
  }, {});
21
- return this.getColumns().filter((c) => visibleCols[c.ColumnId]);
21
+ return this.getColumns().filter((c) => visibleCols[c.columnId]);
22
22
  }
23
23
  selectColumn(columnId) {
24
24
  this.adaptable.selectColumn(columnId);
@@ -44,14 +44,14 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
44
44
  showColumn(columnId) {
45
45
  this.adaptable.showColumn(columnId);
46
46
  }
47
- getVendorColumnType(columnId) {
48
- return this.adaptable.getVendorColumnType(columnId);
47
+ getAgGridColumnType(columnId) {
48
+ return this.adaptable.getAgGridColumnType(columnId);
49
49
  }
50
50
  isRowGroupColumn(columnId) {
51
51
  // put this here as there might be other indicators we are not aware of
52
52
  // perhaps with non auto groups ?
53
53
  //https://www.ag-grid.com/javascript-grid-grouping/
54
- return columnId.startsWith(GeneralConstants_1.AG_GRID_GROUPED_COLUMN);
54
+ return columnId === null || columnId === void 0 ? void 0 : columnId.startsWith(GeneralConstants_1.AG_GRID_GROUPED_COLUMN);
55
55
  }
56
56
  isCalculatedColumn(columnId) {
57
57
  return (this.adaptable.api.calculatedColumnApi
@@ -78,33 +78,33 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
78
78
  return false;
79
79
  }
80
80
  isNumericColumn(column) {
81
- return column.DataType == Enums_1.DataType.Number;
81
+ return column.dataType == Enums_1.DataType.Number;
82
82
  }
83
83
  isBooleanColumn(column) {
84
- return column.DataType == Enums_1.DataType.Boolean;
84
+ return column.dataType == Enums_1.DataType.Boolean;
85
85
  }
86
86
  isDateColumn(column) {
87
- return column.DataType == Enums_1.DataType.Date;
87
+ return column.dataType == Enums_1.DataType.Date;
88
88
  }
89
89
  getColumnDataTypeFromColumnId(columnId) {
90
90
  const column = this.getColumnFromId(columnId); // this.getColumns().find(c => c.ColumnId == columnId);
91
91
  if (!column) {
92
92
  return undefined;
93
93
  }
94
- return column.DataType;
94
+ return column.dataType;
95
95
  }
96
96
  getFriendlyNameFromColumn(columnId, column) {
97
97
  if (columnId.includes(GeneralConstants.MISSING_COLUMN)) {
98
98
  return columnId;
99
99
  }
100
100
  if (column) {
101
- return column.FriendlyName;
101
+ return column.friendlyName;
102
102
  }
103
103
  this.LogMissingColumnWarning(columnId);
104
104
  return columnId + GeneralConstants.MISSING_COLUMN;
105
105
  }
106
106
  getFriendlyNameFromColumnId(columnId) {
107
- const foundColumn = this.getColumns().find((c) => c.ColumnId == columnId);
107
+ const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
108
108
  if (foundColumn) {
109
109
  return this.getFriendlyNameFromColumn(columnId, foundColumn);
110
110
  }
@@ -130,9 +130,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
130
130
  if (friendlyName.includes(GeneralConstants.MISSING_COLUMN)) {
131
131
  return friendlyName.replace(GeneralConstants.MISSING_COLUMN, ''); // Ids should stay "pure"
132
132
  }
133
- const foundColumn = this.getColumns().find((c) => c.FriendlyName == friendlyName);
133
+ const foundColumn = this.getColumns().find((c) => c.friendlyName == friendlyName);
134
134
  if (foundColumn) {
135
- return foundColumn.ColumnId;
135
+ return foundColumn.columnId;
136
136
  }
137
137
  this.LogMissingColumnWarning(friendlyName);
138
138
  return friendlyName + GeneralConstants.MISSING_COLUMN;
@@ -149,7 +149,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
149
149
  }
150
150
  getColumnsFromFriendlyNames(friendlyNames) {
151
151
  // not sure if this is right as might ignore bad cols
152
- return friendlyNames.map((friendlyName) => this.getColumns().find((x) => x.FriendlyName == friendlyName));
152
+ return friendlyNames.map((friendlyName) => this.getColumns().find((x) => x.friendlyName == friendlyName));
153
153
  }
154
154
  getColumnsFromIds(columnIds, logWarning = true) {
155
155
  let returnCols = [];
@@ -166,7 +166,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
166
166
  if (ArrayExtensions_1.default.IsNullOrEmpty(this.getColumns())) {
167
167
  return null;
168
168
  }
169
- const foundColumn = this.getColumns().find((c) => c.ColumnId == columnId);
169
+ const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
170
170
  if (foundColumn) {
171
171
  return foundColumn;
172
172
  }
@@ -176,33 +176,30 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
176
176
  return undefined;
177
177
  }
178
178
  getColumnIdsFromId(columnId, logWarning = false) {
179
- var _a;
180
179
  const col = this.getColumnFromId(columnId, logWarning);
181
180
  if (col) {
182
- if (this.isCalculatedColumn(col.ColumnId)) {
183
- const calculatedColumn = this.adaptable.api.calculatedColumnApi
184
- .getAllCalculatedColumn()
185
- .find((cc) => cc.ColumnId == col.ColumnId);
186
- if (calculatedColumn) {
187
- const columnIds = this.adaptable.api.queryLanguageApi.getColumnsFromExpression((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
188
- return columnIds;
189
- }
181
+ if (this.isCalculatedColumn(col.columnId)) {
182
+ return this.adaptable.api.calculatedColumnApi.getReferencedColumnIdsForCalculatedColumnId(col.columnId);
190
183
  }
191
184
  else {
192
- return [col.ColumnId];
185
+ return [col.columnId];
193
186
  }
194
187
  }
195
188
  return undefined;
196
189
  }
197
- getVendorGridColumnFieldForColumn(colId) {
198
- return this.adaptable.getVendorGridColumnFieldForColumn(this.getColumnFromId(colId));
190
+ getAgGridColumnFieldForAdaptableColumn(colId) {
191
+ const agGridColumn = this.getAgGridColumnForAdaptableColumn(colId);
192
+ return agGridColumn.getColDef().field || '';
193
+ }
194
+ getAgGridColumnForAdaptableColumn(columnId) {
195
+ return this.adaptable.getAgGridColumnForAdaptableColumn(this.getColumnFromId(columnId));
199
196
  }
200
197
  getColumnFromFriendlyName(columnName, logWarning = true) {
201
198
  // just return null if no columns rather than logging a warning - otherwise get lots at startup
202
199
  if (ArrayExtensions_1.default.IsNullOrEmpty(this.getColumns())) {
203
200
  return null;
204
201
  }
205
- const foundColumn = this.getColumns().find((c) => c.FriendlyName == columnName);
202
+ const foundColumn = this.getColumns().find((c) => c.friendlyName == columnName);
206
203
  if (foundColumn) {
207
204
  return foundColumn;
208
205
  }
@@ -230,36 +227,36 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
230
227
  }
231
228
  }
232
229
  getNumericColumns() {
233
- return this.getColumns().filter((c) => c.DataType == Enums_1.DataType.Number);
230
+ return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.Number);
234
231
  }
235
232
  getNumericArrayColumns() {
236
- return this.getColumns().filter((c) => c.DataType == Enums_1.DataType.NumberArray);
233
+ return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.NumberArray);
237
234
  }
238
235
  getStringColumns() {
239
- return this.getColumns().filter((c) => c.DataType == Enums_1.DataType.String);
236
+ return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.String);
240
237
  }
241
238
  getDateColumns() {
242
- return this.getColumns().filter((c) => c.DataType == Enums_1.DataType.Date);
239
+ return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.Date);
243
240
  }
244
241
  getBooleanColumns() {
245
- return this.getColumns().filter((c) => c.DataType == Enums_1.DataType.Boolean);
242
+ return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.Boolean);
246
243
  }
247
244
  getSortableColumns() {
248
- return this.getColumns().filter((c) => c.Sortable);
245
+ return this.getColumns().filter((c) => c.sortable);
249
246
  }
250
247
  getGroupableColumns() {
251
- return this.getColumns().filter((c) => c.Groupable);
248
+ return this.getColumns().filter((c) => c.groupable);
252
249
  }
253
250
  getPivotableColumns() {
254
- return this.getColumns().filter((c) => c.Pivotable);
251
+ return this.getColumns().filter((c) => c.pivotable);
255
252
  }
256
253
  getAggregetableColumns() {
257
254
  return this.getColumns()
258
- .filter((c) => c.Aggregatable)
259
- .filter((c) => c.DataType == Enums_1.DataType.Number);
255
+ .filter((c) => c.aggregatable)
256
+ .filter((c) => c.dataType == Enums_1.DataType.Number);
260
257
  }
261
258
  getQueryableColumns() {
262
- return this.getColumns().filter((c) => c.Queryable);
259
+ return this.getColumns().filter((c) => c.queryable);
263
260
  }
264
261
  LogMissingColumnWarning(columnId) {
265
262
  if (this.adaptable.adaptableOptions.generalOptions.showMissingColumnsWarning &&
@@ -282,6 +279,42 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
282
279
  return cv.displayValue;
283
280
  });
284
281
  }
282
+ async getDistinctFilterDisplayValuesForColumn(columnId, filter) {
283
+ const abColumn = this.getColumnFromId(columnId);
284
+ if (abColumn == undefined) {
285
+ return {
286
+ values: [],
287
+ suppressClientSideFilter: false,
288
+ };
289
+ }
290
+ const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterValuesForColumn(abColumn, false, filter);
291
+ return {
292
+ values: this.sortDistinctValues(gridCells, abColumn).map((cv) => {
293
+ return cv.displayValue;
294
+ }),
295
+ suppressClientSideFilter,
296
+ };
297
+ }
298
+ async getDistinctCustomSortDisplayValuesForColumn(columnId) {
299
+ const abColumn = this.getColumnFromId(columnId);
300
+ if (abColumn == undefined) {
301
+ return [];
302
+ }
303
+ const gridCells = await this.adaptable.getDistinctCustomSortValuesForColumn(abColumn, false);
304
+ return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
305
+ return cv.displayValue;
306
+ });
307
+ }
308
+ async getDistinctBulkUpdateDisplayValuesForColumn(columnId, selectedGridCells) {
309
+ const abColumn = this.getColumnFromId(columnId);
310
+ if (abColumn == undefined) {
311
+ return [];
312
+ }
313
+ const gridCells = await this.adaptable.getDistinctBulkUpdateValuesForColumn(abColumn, false, selectedGridCells);
314
+ return this.sortDistinctValues(gridCells, abColumn).map((cv) => {
315
+ return cv.displayValue;
316
+ });
317
+ }
285
318
  getDistinctVisibleDisplayValuesForColumn(columnId) {
286
319
  const abColumn = this.getColumnFromId(columnId);
287
320
  if (abColumn == undefined) {
@@ -316,7 +349,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
316
349
  // this does NOT into account Custom Sort - far too hard for now...
317
350
  let sortOrder = Enums_1.SortOrder.Asc;
318
351
  if (this.getFilterOptions().sortColumnValuesInFilter) {
319
- let columnSort = this.adaptable.api.gridApi.getColumnSortForColumn(column.ColumnId);
352
+ let columnSort = this.adaptable.api.gridApi.getColumnSortForColumn(column.columnId);
320
353
  if (columnSort && columnSort.SortOrder == 'Desc') {
321
354
  sortOrder = Enums_1.SortOrder.Desc;
322
355
  }
@@ -337,12 +370,11 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
337
370
  }
338
371
  getAllColumnFriendlyNames() {
339
372
  return this.getColumns().map((c) => {
340
- return c.FriendlyName;
373
+ return c.friendlyName;
341
374
  });
342
375
  }
343
376
  usesAdaptableFilterForm(columnId) {
344
- const useAdaptableFilterForm = this.getFilterOptions()
345
- .useAdaptableFilterForm;
377
+ const useAdaptableFilterForm = this.getFilterOptions().useAdaptableFilterForm;
346
378
  if (useAdaptableFilterForm == null || useAdaptableFilterForm == false) {
347
379
  return false;
348
380
  }
@@ -352,8 +384,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
352
384
  return true;
353
385
  }
354
386
  usesAdaptableQuickFilter(columnId) {
355
- const useAdaptableQuickFilter = this.getFilterOptions()
356
- .useAdaptableQuickFilter;
387
+ const useAdaptableQuickFilter = this.getFilterOptions().useAdaptableQuickFilter;
357
388
  if (useAdaptableQuickFilter == null || useAdaptableQuickFilter == false) {
358
389
  return false;
359
390
  }
@@ -362,5 +393,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
362
393
  }
363
394
  return true;
364
395
  }
396
+ isColumnReferencedInExpression(columnId, expression) {
397
+ const colIds = this.adaptable.api.queryLanguageApi.getColumnsFromExpression(expression);
398
+ return colIds.some((c) => c === columnId);
399
+ }
365
400
  }
366
401
  exports.ColumnApiImpl = ColumnApiImpl;
@@ -43,7 +43,7 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
43
43
  setAdaptableStateKey(adaptableStateKey: string, config?: {
44
44
  predefinedConfig: PredefinedConfig;
45
45
  flushCurrentState?: boolean;
46
- }): PromiseLike<any>;
46
+ }): Promise<any>;
47
47
  getDescriptionForModule(module: AdaptableModule): string;
48
48
  getHelpPageForModule(module: AdaptableModule): string;
49
49
  getUserStateByStateKey(stateKey: AdaptableStateKey, returnJson?: boolean): ConfigState | string;