@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
@@ -16,10 +16,10 @@ import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
16
16
  export declare class agGridHelper {
17
17
  private adaptable;
18
18
  private gridOptions;
19
- private vendorInitialColDefs;
19
+ private initialAgGridColDefs;
20
20
  constructor(adaptable: IAdaptable, gridOptions: GridOptions);
21
- getVendorLightThemeName(): string;
22
- getVendorDarkThemeName(): string;
21
+ getAgGridLightThemeName(): string;
22
+ getAgGridDarkThemeName(): string;
23
23
  setUpModules(): Map<AdaptableModule, IModule>;
24
24
  TrySetUpNodeIds(): boolean;
25
25
  createSparklineCellRendererComp(sparkline: SparklineColumn): ICellRendererFunc | undefined;
@@ -27,7 +27,7 @@ export declare class agGridHelper {
27
27
  createNumericStyleRendererFunc(formatColumn: FormatColumn): ICellRendererFunc;
28
28
  getCleanValue(value: string): string | undefined;
29
29
  getRenderedValue(colDef: ColDef, valueToRender: any): any;
30
- createAdaptableColumnFromVendorColumn(vendorColumn: Column, colsToGroups: Record<string, AdaptableColumnGroup>): AdaptableColumn;
30
+ createAdaptableColumnFromAgGridColumn(agGridColumn: Column, colsToGroups: Record<string, AdaptableColumnGroup>): AdaptableColumn;
31
31
  createAdaptableSideBarDefs(showFilterPanel: boolean, showColumnsPanel: boolean): SideBarDef;
32
32
  createAdaptableToolPanel(): ToolPanelDef;
33
33
  orderToolPanels(toolPanelDefs: (ToolPanelDef | string)[]): void;
@@ -49,17 +49,17 @@ class agGridHelper {
49
49
  constructor(adaptable, gridOptions) {
50
50
  this.adaptable = adaptable;
51
51
  this.gridOptions = gridOptions;
52
- this.vendorInitialColDefs = {};
52
+ this.initialAgGridColDefs = {};
53
53
  this.adaptable = adaptable;
54
54
  this.gridOptions = gridOptions;
55
55
  }
56
- getVendorLightThemeName() {
56
+ getAgGridLightThemeName() {
57
57
  // we try not to call these two methods, as we try to detect the default grid
58
58
  // theme from the grid container element - users should set their aggrid theme in html, on the container element
59
59
  // so we read it from there. if we don't find it there, we'll call this method, as a last resort.
60
60
  return 'ag-theme-balham';
61
61
  }
62
- getVendorDarkThemeName() {
62
+ getAgGridDarkThemeName() {
63
63
  return 'ag-theme-balham-dark';
64
64
  }
65
65
  setUpModules() {
@@ -74,6 +74,7 @@ class agGridHelper {
74
74
  modules.set(ModuleConstants.CellSummaryModuleId, new CellSummaryModule_1.CellSummaryModule(api));
75
75
  modules.set(ModuleConstants.ConditionalStyleModuleId, new ConditionalStyleModule_1.ConditionalStyleModule(api));
76
76
  modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule_1.CustomSortModule(api));
77
+ modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule_1.DataChangeHistoryModule(api));
77
78
  modules.set(ModuleConstants.DataSourceModuleId, new DataSourceModule_1.DataSourceModule(api));
78
79
  modules.set(ModuleConstants.ExportModuleId, new ExportModule_1.ExportModule(api));
79
80
  modules.set(ModuleConstants.FilterModuleId, new FilterModule_1.FilterModule(api));
@@ -92,7 +93,6 @@ class agGridHelper {
92
93
  modules.set(ModuleConstants.SystemStatusModuleId, new SystemStatusModule_1.SystemStatusModule(api));
93
94
  modules.set(ModuleConstants.ThemeModuleId, new ThemeModule_1.ThemeModule(api));
94
95
  modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule_1.GridInfoModule(api));
95
- modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule_1.DataChangeHistoryModule(api));
96
96
  return modules;
97
97
  }
98
98
  TrySetUpNodeIds() {
@@ -203,53 +203,52 @@ class agGridHelper {
203
203
  }
204
204
  return render({ value: valueToRender }) || '';
205
205
  }
206
- createAdaptableColumnFromVendorColumn(vendorColumn, colsToGroups) {
207
- const colId = vendorColumn.getColId();
208
- const colDef = vendorColumn.getColDef();
209
- const FriendlyName = this.gridOptions.columnApi.getDisplayNameForColumn(vendorColumn, 'header');
210
- if (!this.vendorInitialColDefs[colId]) {
211
- this.vendorInitialColDefs[colId] = Object.assign({}, vendorColumn.getUserProvidedColDef());
206
+ createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups) {
207
+ const colId = agGridColumn.getColId();
208
+ const colDef = agGridColumn.getColDef();
209
+ const FriendlyName = this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header');
210
+ if (!this.initialAgGridColDefs[colId]) {
211
+ this.initialAgGridColDefs[colId] = Object.assign({}, agGridColumn.getUserProvidedColDef());
212
212
  }
213
213
  const ColumnId = colId;
214
214
  const pkColumn = this.adaptable.adaptableOptions.primaryKey;
215
215
  let ColumnGroup = colsToGroups === null || colsToGroups === void 0 ? void 0 : colsToGroups[ColumnId];
216
216
  const abColumn = {
217
217
  Uuid: Uuid_1.createUuid(),
218
- ColumnId,
219
- FriendlyName,
220
- IsPrimaryKey: ColumnId === pkColumn,
221
- DataType: this.getColumnDataType(vendorColumn, false),
222
- Visible: vendorColumn.isVisible(),
223
- ReadOnly: this.isColumnReadonly(colDef),
224
- ColumnGroup,
225
- Sortable: this.isColumnSortable(colDef),
226
- Filterable: this.isColumnFilterable(colDef),
227
- Groupable: this.isColumnGroupable(colDef),
228
- Pivotable: this.isColumnPivotable(colDef),
229
- Aggregatable: this.isColumnAggregetable(colDef),
230
- AvailableAggregationFunctions: null,
231
- AggregationFunction: null,
232
- Moveable: this.isColumnMoveable(colDef),
233
- Hideable: this.isColumnHideable(colDef),
234
- Queryable: this.isColumnQueryable(colDef, ColumnId),
235
- IsGrouped: this.isColumnGrouped(colDef),
236
- IsFixed: this.isColumnFixed(colDef),
218
+ columnId: ColumnId,
219
+ friendlyName: FriendlyName,
220
+ isPrimaryKey: ColumnId === pkColumn,
221
+ dataType: this.getColumnDataType(agGridColumn, false),
222
+ visible: agGridColumn.isVisible(),
223
+ readOnly: this.isColumnReadonly(colDef),
224
+ columnGroup: ColumnGroup,
225
+ sortable: this.isColumnSortable(colDef),
226
+ filterable: this.isColumnFilterable(colDef),
227
+ groupable: this.isColumnGroupable(colDef),
228
+ pivotable: this.isColumnPivotable(colDef),
229
+ aggregatable: this.isColumnAggregetable(colDef),
230
+ availableAggregationFunctions: null,
231
+ aggregationFunction: null,
232
+ moveable: this.isColumnMoveable(colDef),
233
+ hideable: this.isColumnHideable(colDef),
234
+ queryable: this.isColumnQueryable(colDef, ColumnId),
235
+ isGrouped: this.isColumnGrouped(colDef),
236
+ isFixed: this.isColumnFixed(colDef),
237
237
  //TODO add IsPinned??
238
- IsSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
239
- IsExcludedFromQuickSearch: false,
238
+ isSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
239
+ isExcludedFromQuickSearch: false,
240
240
  };
241
- if (abColumn.Aggregatable) {
242
- abColumn.AvailableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
241
+ if (abColumn.aggregatable) {
242
+ abColumn.availableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
243
243
  if (typeof colDef.aggFunc === 'string') {
244
- abColumn.AggregationFunction = colDef.aggFunc;
244
+ abColumn.aggregationFunction = colDef.aggFunc;
245
245
  }
246
246
  }
247
247
  // lets set this here one as the function cannot change the result so dont need to run it each time
248
- let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.searchOptions
249
- .excludeColumnFromQuickSearch;
248
+ let excludeColumnFromQuickSearch = this.adaptable.adaptableOptions.searchOptions.excludeColumnFromQuickSearch;
250
249
  if (excludeColumnFromQuickSearch) {
251
250
  if (excludeColumnFromQuickSearch(abColumn)) {
252
- abColumn.IsExcludedFromQuickSearch = true;
251
+ abColumn.isExcludedFromQuickSearch = true;
253
252
  }
254
253
  }
255
254
  return abColumn;
@@ -286,10 +285,10 @@ class agGridHelper {
286
285
  }
287
286
  createAdaptableToolPanel() {
288
287
  return {
289
- id: 'AdaptableToolPanel',
288
+ id: 'adaptable',
290
289
  toolPanel: 'AdaptableToolPanel',
291
290
  labelDefault: this.adaptable.adaptableOptions.toolPanelOptions.adaptableToolPanelTitle,
292
- labelKey: 'AdaptableToolPanel',
291
+ labelKey: 'adaptable',
293
292
  iconKey: this.adaptable.adaptableOptions.toolPanelOptions.iconKey,
294
293
  width: this.adaptable.adaptableOptions.toolPanelOptions.width,
295
294
  minWidth: this.adaptable.adaptableOptions.toolPanelOptions.minWidth,
@@ -322,6 +321,7 @@ class agGridHelper {
322
321
  }
323
322
  fireSelectionChangedEvent() {
324
323
  let selectionChangedInfo = {
324
+ adaptableApi: this.adaptable.api,
325
325
  selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
326
326
  selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
327
327
  };
@@ -435,8 +435,8 @@ class agGridHelper {
435
435
  let dataType = Enums_1.DataType.Unknown;
436
436
  // get the column type if already in store (and not unknown)
437
437
  const existingColumn = this.adaptable.api.columnApi.getColumnFromId(column.getId(), logWarning);
438
- if (existingColumn && existingColumn.DataType != Enums_1.DataType.Unknown) {
439
- return existingColumn.DataType;
438
+ if (existingColumn && existingColumn.dataType != Enums_1.DataType.Unknown) {
439
+ return existingColumn.dataType;
440
440
  }
441
441
  // check for column type
442
442
  const colType = column.getColDef().type;
@@ -574,7 +574,7 @@ class agGridHelper {
574
574
  return function compareItemsOfCustomSort(nodeA, nodeB) {
575
575
  let firstGroupedColumn = adaptable.getFirstGroupedColumn();
576
576
  if (firstGroupedColumn) {
577
- const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.ColumnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.ColumnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
577
+ const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.columnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.columnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
578
578
  if (definedColumnComparator) {
579
579
  return definedColumnComparator(nodeA.key, nodeB.key);
580
580
  }
@@ -610,10 +610,10 @@ class agGridHelper {
610
610
  headerFontWeight: headerColStyle.fontWeight,
611
611
  height: Number(headerColStyle.height.replace('px', '')),
612
612
  Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
613
- const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.ColumnId}']`);
613
+ const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.columnId}']`);
614
614
  const headerColumnStyle = window.getComputedStyle(headerColumn || headerFirstCol, null);
615
615
  return {
616
- columnFriendlyName: col.FriendlyName,
616
+ columnFriendlyName: col.friendlyName,
617
617
  width: Number(headerColumnStyle.width.replace('px', '')),
618
618
  textAlign: headerColumnStyle.textAlign,
619
619
  };
@@ -629,10 +629,10 @@ class agGridHelper {
629
629
  fontWeight: firstRowStyle.fontWeight,
630
630
  height: Number(firstRowStyle.height.replace('px', '')),
631
631
  Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
632
- const cellElement = document.querySelector(`.ag-cell[col-id='${col.ColumnId}']`);
632
+ const cellElement = document.querySelector(`.ag-cell[col-id='${col.columnId}']`);
633
633
  const headerColumnStyle = window.getComputedStyle(cellElement || firstRow, null);
634
634
  return {
635
- columnFriendlyName: col.FriendlyName,
635
+ columnFriendlyName: col.friendlyName,
636
636
  width: Number(headerColumnStyle.width.replace('px', '')),
637
637
  textAlign: headerColumnStyle.textAlign,
638
638
  };
@@ -1,5 +1,5 @@
1
1
  import { GridOptions, MenuItemDef, GetContextMenuItemsParams, GetMainMenuItems, GetMainMenuItemsParams, GetContextMenuItems, Column } from '@ag-grid-community/all-modules';
2
- import { AdaptableMenuItem, MenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
2
+ import { AdaptableMenuItem, ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../PredefinedConfig/Common/Menu';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { IAdaptable } from '../AdaptableInterfaces/IAdaptable';
5
5
  export declare class agGridMenuHelper {
@@ -10,20 +10,22 @@ export declare class agGridMenuHelper {
10
10
  buildContextMenu(params: GetContextMenuItemsParams, originalgetContextMenuItems: GetContextMenuItems): (string | MenuItemDef)[];
11
11
  createRemoveGroupsMenuItem(x: AdaptableMenuItem): MenuItemDef;
12
12
  createAgGridMenuDefFromAdaptableMenu(adaptableMenuItem: AdaptableMenuItem): MenuItemDef;
13
- createAgGridMenuDefFromUserMenu(menuItem: UserMenuItem, menuContext: MenuContext): MenuItemDef;
14
- createAdaptableMenuItemFromUserMenu(menuItem: UserMenuItem, menuContext: MenuContext): AdaptableMenuItem;
15
- createVendorGridColumnMenuItems(originalgetMainMenuItems: GetMainMenuItems, params: GetMainMenuItemsParams): (string | MenuItemDef)[] | undefined;
13
+ createAgGridColumnMenuDefFromUserMenu(menuItem: UserMenuItem<ColumnMenuContext>, menuContext: ColumnMenuContext): MenuItemDef;
14
+ createAgGridContextMenuDefFromUserMenu(menuItem: UserMenuItem<ContextMenuContext>, menuContext: ContextMenuContext): MenuItemDef;
15
+ createAdaptableColumnMenuItemFromUserMenu(menuItem: UserMenuItem<ColumnMenuContext>, menuContext: ColumnMenuContext): AdaptableMenuItem;
16
+ createAgGridColumnMenuItems(originalgetMainMenuItems: GetMainMenuItems, params: GetMainMenuItemsParams): (string | MenuItemDef)[] | undefined;
16
17
  createGroupedColumnMenuItem(): MenuItemDef | undefined;
17
- createAdaptableColumnMenuItems(adaptableColumn: AdaptableColumn, menuContext: MenuContext): MenuItemDef[];
18
- createUserColumnMenuItems(menuContext: MenuContext): MenuItemDef[];
19
- createColumnMenuContextObject(adaptableColumn: AdaptableColumn, vendorColumn: Column): MenuContext;
20
- createContextMenuContextObject(params: GetContextMenuItemsParams, adaptableColumn: AdaptableColumn): MenuContext;
21
- createVendorGridContextMenuItems(originalgetContextMenuItems: GetContextMenuItems, params: GetContextMenuItemsParams): (string | MenuItemDef)[] | undefined;
22
- createAdaptableContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[];
23
- createAgGridAdaptableContextMenuItems(adaptableMenuItems: AdaptableMenuItem[], menuContext: MenuContext): MenuItemDef[];
24
- createAgGridUserContextMenuItems(userContextMenuItems: UserMenuItem[], menuContext: MenuContext): MenuItemDef[];
18
+ createAdaptableColumnMenuItems(adaptableColumn: AdaptableColumn, menuContext: ColumnMenuContext): MenuItemDef[];
19
+ createUserColumnMenuItems(menuContext: ColumnMenuContext): MenuItemDef[];
20
+ createColumnMenuContextObject(adaptableColumn: AdaptableColumn, agGridColumn: Column): ColumnMenuContext;
21
+ createContextMenuContextObject(params: GetContextMenuItemsParams, adaptableColumn: AdaptableColumn): ContextMenuContext;
22
+ createAgGridContextMenuItems(originalgetContextMenuItems: GetContextMenuItems, params: GetContextMenuItemsParams): (string | MenuItemDef)[] | undefined;
23
+ createAdaptableContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[];
24
+ createAgGridAdaptableContextMenuItems(adaptableMenuItems: AdaptableMenuItem[], menuContext: ContextMenuContext): MenuItemDef[];
25
+ createAgGridUserContextMenuItems(userContextMenuItems: UserMenuItem<ContextMenuContext>[], menuContext: ContextMenuContext): MenuItemDef[];
25
26
  private getAdaptableMenuItemsColumnHeader;
26
- private getLabelFromUserMenuItem;
27
+ private getLabelFromUserColumnMenuItem;
28
+ private getLabelFromUserContextMenuItem;
27
29
  private getUserMenuItemsColumnHeader;
28
30
  buildStandaloneColumnHeader(adaptableColumn: AdaptableColumn): AdaptableMenuItem[];
29
31
  }
@@ -16,16 +16,15 @@ class agGridMenuHelper {
16
16
  buildColumnMenu(params, originalgetMainMenuItems) {
17
17
  // couldnt find a way to listen for menu close. There is a Menu Item Select, but you can also close menu from filter and clicking outside menu....
18
18
  const colId = params.column.getColId();
19
- let vendorGridColumnMenuItems = [];
19
+ let agGridColumnMenuItems = [];
20
20
  let adaptableColumnMenuItems = [];
21
21
  let userColumnMenuItems = [];
22
- //First get Vendor Grid Column Items
23
- vendorGridColumnMenuItems.push(...this.createVendorGridColumnMenuItems(originalgetMainMenuItems, params));
24
- let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
25
- .showAdaptableColumnMenu;
22
+ //First get Ag Grid Column Items
23
+ agGridColumnMenuItems.push(...this.createAgGridColumnMenuItems(originalgetMainMenuItems, params));
24
+ let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableColumnMenu;
26
25
  let hasAdaptableColumnMenuItems = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
27
26
  if (hasAdaptableColumnMenuItems) {
28
- vendorGridColumnMenuItems.push('separator');
27
+ agGridColumnMenuItems.push('separator');
29
28
  }
30
29
  const adaptableColumn = this.adaptable.api.columnApi.getColumnFromId(colId);
31
30
  const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
@@ -44,7 +43,7 @@ class agGridMenuHelper {
44
43
  // Finally get all the User Menu Items
45
44
  userColumnMenuItems.push(...this.createUserColumnMenuItems(menuContext));
46
45
  const map = {
47
- vendor: vendorGridColumnMenuItems,
46
+ aggrid: agGridColumnMenuItems,
48
47
  adaptable: adaptableColumnMenuItems,
49
48
  user: userColumnMenuItems,
50
49
  };
@@ -53,19 +52,18 @@ class agGridMenuHelper {
53
52
  }));
54
53
  }
55
54
  buildContextMenu(params, originalgetContextMenuItems) {
56
- let vendorGridContextMenuItems = [];
55
+ let agGridContextMenuItems = [];
57
56
  let adaptableContextMenuItems = [];
58
57
  let userContextMenuItems = [];
59
- let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
60
- .showAdaptableContextMenu;
58
+ let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableContextMenu;
61
59
  let hasAdaptableContextMenuItems = showAdaptableContextMenu == null || showAdaptableContextMenu !== false;
62
60
  let userDefinedContextMenuItems = this.adaptable.adaptableOptions.menuOptions.contextMenuItems;
63
61
  let hasUserDefinedContextMenuItems = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userDefinedContextMenuItems);
64
- const vendorItems = this.createVendorGridContextMenuItems(originalgetContextMenuItems, params);
65
- if (vendorItems) {
66
- vendorGridContextMenuItems.push(...vendorItems);
62
+ const agGridMenuItems = this.createAgGridContextMenuItems(originalgetContextMenuItems, params);
63
+ if (agGridMenuItems) {
64
+ agGridContextMenuItems.push(...agGridMenuItems);
67
65
  if (hasAdaptableContextMenuItems || hasUserDefinedContextMenuItems) {
68
- vendorGridContextMenuItems.push('separator');
66
+ agGridContextMenuItems.push('separator');
69
67
  }
70
68
  }
71
69
  const adaptableMenuItems = [];
@@ -91,7 +89,7 @@ class agGridMenuHelper {
91
89
  }
92
90
  }
93
91
  const map = {
94
- vendor: vendorGridContextMenuItems,
92
+ aggrid: agGridContextMenuItems,
95
93
  adaptable: adaptableContextMenuItems,
96
94
  user: userContextMenuItems,
97
95
  };
@@ -133,25 +131,40 @@ class agGridMenuHelper {
133
131
  subMenu: subMenuItems,
134
132
  };
135
133
  }
136
- createAgGridMenuDefFromUserMenu(menuItem, menuContext) {
134
+ createAgGridColumnMenuDefFromUserMenu(menuItem, menuContext) {
137
135
  const fn = menuItem.onClick;
138
136
  const disabled = menuItem.disabled && menuItem.disabled(menuContext);
139
137
  return {
140
- name: this.getLabelFromUserMenuItem(menuItem, menuContext),
138
+ name: this.getLabelFromUserColumnMenuItem(menuItem, menuContext),
141
139
  action: () => (fn ? fn(menuContext) : null),
142
140
  icon: menuItem.icon,
143
141
  disabled: disabled,
144
142
  subMenu: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(menuItem.subMenuItems)
145
143
  ? undefined
146
144
  : menuItem.subMenuItems.map((subMenuItem) => {
147
- return this.createAgGridMenuDefFromUserMenu(subMenuItem, menuContext);
145
+ return this.createAgGridColumnMenuDefFromUserMenu(subMenuItem, menuContext);
148
146
  }),
149
147
  };
150
148
  }
151
- createAdaptableMenuItemFromUserMenu(menuItem, menuContext) {
149
+ createAgGridContextMenuDefFromUserMenu(menuItem, menuContext) {
150
+ const fn = menuItem.onClick;
151
+ const disabled = menuItem.disabled && menuItem.disabled(menuContext);
152
+ return {
153
+ name: this.getLabelFromUserContextMenuItem(menuItem, menuContext),
154
+ action: () => (fn ? fn(menuContext) : null),
155
+ icon: menuItem.icon,
156
+ disabled: disabled,
157
+ subMenu: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(menuItem.subMenuItems)
158
+ ? undefined
159
+ : menuItem.subMenuItems.map((subMenuItem) => {
160
+ return this.createAgGridContextMenuDefFromUserMenu(subMenuItem, menuContext);
161
+ }),
162
+ };
163
+ }
164
+ createAdaptableColumnMenuItemFromUserMenu(menuItem, menuContext) {
152
165
  const fn = menuItem.onClick;
153
166
  let adaptableMenuItem = {
154
- label: this.getLabelFromUserMenuItem(menuItem, menuContext),
167
+ label: this.getLabelFromUserColumnMenuItem(menuItem, menuContext),
155
168
  reduxAction: null,
156
169
  onClick: () => (fn ? fn(menuContext) : null),
157
170
  isVisible: true,
@@ -159,7 +172,7 @@ class agGridMenuHelper {
159
172
  };
160
173
  return adaptableMenuItem;
161
174
  }
162
- createVendorGridColumnMenuItems(originalgetMainMenuItems, params) {
175
+ createAgGridColumnMenuItems(originalgetMainMenuItems, params) {
163
176
  // if there was an initial implementation we init the list of menu items with this one; otherwise we take the default items
164
177
  return originalgetMainMenuItems
165
178
  ? originalgetMainMenuItems(params)
@@ -195,26 +208,18 @@ class agGridMenuHelper {
195
208
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userColumnMenuItems)) {
196
209
  userColumnMenuItems.forEach((userMenuItem) => {
197
210
  // And then convert them into Menu Item Defs
198
- let menuItem = this.createAgGridMenuDefFromUserMenu(userMenuItem, menuContext);
211
+ let menuItem = this.createAgGridColumnMenuDefFromUserMenu(userMenuItem, menuContext);
199
212
  columnMenuItems.push(menuItem);
200
213
  });
201
214
  }
202
215
  return columnMenuItems;
203
216
  }
204
- createColumnMenuContextObject(adaptableColumn, vendorColumn) {
217
+ createColumnMenuContextObject(adaptableColumn, agGridColumn) {
205
218
  return {
206
- gridCell: undefined,
207
219
  adaptableColumn: adaptableColumn,
208
- vendorColumn: vendorColumn,
209
- isSelectedCell: false,
210
- isSingleSelectedColumn: false,
211
- isGroupedNode: false,
212
- rowNode: undefined,
213
- primaryKeyValue: undefined,
214
- selectedCellInfo: this.adaptable.api.gridApi.getSelectedCellInfo(),
215
- selectedRowInfo: this.adaptable.api.gridApi.getSelectedRowInfo(),
220
+ agGridColumn: agGridColumn,
216
221
  adaptableApi: this.adaptable.api,
217
- isRowGroupColumn: this.adaptable.api.columnApi.isRowGroupColumn(vendorColumn.getColId()),
222
+ isRowGroupColumn: this.adaptable.api.columnApi.isRowGroupColumn(agGridColumn.getColId()),
218
223
  };
219
224
  }
220
225
  createContextMenuContextObject(params, adaptableColumn) {
@@ -223,12 +228,12 @@ class agGridMenuHelper {
223
228
  let isSelectedCell = false;
224
229
  let clickedCell = undefined;
225
230
  if (adaptableColumn) {
226
- clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.ColumnId);
231
+ clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.columnId);
227
232
  }
228
233
  let selectedCellInfo = this.adaptable.setSelectedCells();
229
234
  if (clickedCell && selectedCellInfo) {
230
235
  let matchedCell = selectedCellInfo.gridCells.find((gc) => gc != null &&
231
- gc.columnId == clickedCell.columnId &&
236
+ gc.column == clickedCell.column &&
232
237
  gc.primaryKeyValue == clickedCell.primaryKeyValue);
233
238
  isSelectedCell = matchedCell != null;
234
239
  if (isSelectedCell) {
@@ -240,7 +245,7 @@ class agGridMenuHelper {
240
245
  isSelectedCell: isSelectedCell,
241
246
  gridCell: clickedCell,
242
247
  adaptableColumn: adaptableColumn,
243
- vendorColumn: params.column,
248
+ agGridColumn: params.column,
244
249
  rowNode: params.node,
245
250
  isGroupedNode: params.node ? params.node.group : false,
246
251
  isSingleSelectedColumn: isSingleSelectedColumn,
@@ -251,7 +256,7 @@ class agGridMenuHelper {
251
256
  isRowGroupColumn: this.adaptable.api.columnApi.isRowGroupColumn(params.column.getColId()),
252
257
  };
253
258
  }
254
- createVendorGridContextMenuItems(originalgetContextMenuItems, params) {
259
+ createAgGridContextMenuItems(originalgetContextMenuItems, params) {
255
260
  // if there was an initial implementation we init the list of menu items with this one, otherwise we take default items
256
261
  // this allows us to ensure that devs can still create their own agGrid context menu without losing ours
257
262
  return originalgetContextMenuItems
@@ -278,8 +283,7 @@ class agGridMenuHelper {
278
283
  // here we create agGrid Menu items based on Adaptable Menu Items
279
284
  // user has ability to decide whether to show or not
280
285
  let contextMenuItems = [];
281
- let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
282
- .showAdaptableContextMenu;
286
+ let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableContextMenu;
283
287
  if (showAdaptableContextMenu == null || showAdaptableContextMenu !== false) {
284
288
  adaptableMenuItems.forEach((adaptableMenuItem) => {
285
289
  if (adaptableMenuItem) {
@@ -306,7 +310,7 @@ class agGridMenuHelper {
306
310
  return userMenuItem.hidden ? !userMenuItem.hidden(menuContext) : true;
307
311
  })
308
312
  .forEach((userMenuItem) => {
309
- let menuItem = this.createAgGridMenuDefFromUserMenu(userMenuItem, menuContext);
313
+ let menuItem = this.createAgGridContextMenuDefFromUserMenu(userMenuItem, menuContext);
310
314
  contextMenuItems.push(menuItem);
311
315
  });
312
316
  return contextMenuItems;
@@ -314,8 +318,7 @@ class agGridMenuHelper {
314
318
  // method to get all the Adaptable Menu Items - together with running the function where user can choose whether or not to display
315
319
  getAdaptableMenuItemsColumnHeader(adaptableColumn, menuContext) {
316
320
  const adaptableMenuItems = [];
317
- let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
318
- .showAdaptableColumnMenu;
321
+ let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions.showAdaptableColumnMenu;
319
322
  let runCheck = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
320
323
  // if (adaptableColumn != null) {
321
324
  this.adaptable.modules.forEach((s) => {
@@ -343,10 +346,15 @@ class agGridMenuHelper {
343
346
  // }
344
347
  return adaptableMenuItems;
345
348
  }
346
- getLabelFromUserMenuItem(userMenuItem, menuContext) {
347
- return typeof userMenuItem.label === 'function'
348
- ? userMenuItem.label(menuContext)
349
- : userMenuItem.label;
349
+ getLabelFromUserColumnMenuItem(userColumnMenuItem, menuContext) {
350
+ return typeof userColumnMenuItem.label === 'function'
351
+ ? userColumnMenuItem.label(menuContext)
352
+ : userColumnMenuItem.label;
353
+ }
354
+ getLabelFromUserContextMenuItem(userContextMenuItem, menuContext) {
355
+ return typeof userContextMenuItem.label === 'function'
356
+ ? userContextMenuItem.label(menuContext)
357
+ : userContextMenuItem.label;
350
358
  }
351
359
  getUserMenuItemsColumnHeader(menuContext) {
352
360
  var _a, _b;
@@ -361,7 +369,7 @@ class agGridMenuHelper {
361
369
  let userColumnMenuItems = this.getUserMenuItemsColumnHeader(menuContext);
362
370
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userColumnMenuItems)) {
363
371
  userColumnMenuItems.forEach((userMenuItem) => {
364
- let adaptableMenuItem = this.createAdaptableMenuItemFromUserMenu(userMenuItem, menuContext);
372
+ let adaptableMenuItem = this.createAdaptableColumnMenuItemFromUserMenu(userMenuItem, menuContext);
365
373
  returnMenuItems.push(adaptableMenuItem);
366
374
  });
367
375
  }
@@ -7,7 +7,7 @@ export declare type InternalAdaptableDateEditorProps = {
7
7
  value?: string | Date | number | null;
8
8
  dateFormat: string;
9
9
  onValueChange?: (value: Date | null) => void;
10
- onCancelEdit?: VoidFunction;
10
+ onStopEdit?: (keyboardEventKey?: string) => void;
11
11
  showClearButton?: boolean;
12
12
  };
13
13
  export declare const InternalAdaptableDateEditor: React.ForwardRefExoticComponent<InternalAdaptableDateEditorProps & React.RefAttributes<InternalAdaptableDateEditorApi>>;
@@ -34,9 +34,14 @@ exports.InternalAdaptableDateEditor = React.forwardRef((props, ref) => {
34
34
  };
35
35
  const [value, setValue] = useProperty_1.default(props, 'value', props.defaultValue, {
36
36
  onChange: (value) => {
37
- var _a;
38
- const date = typeof value === 'string' ? parseISO_1.default(value) : new Date(value);
39
- (_a = props.onValueChange) === null || _a === void 0 ? void 0 : _a.call(props, date);
37
+ var _a, _b;
38
+ if (value === '' || value == undefined) {
39
+ (_a = props.onValueChange) === null || _a === void 0 ? void 0 : _a.call(props, null);
40
+ }
41
+ else {
42
+ const date = typeof value === 'string' ? parseISO_1.default(value) : new Date(value);
43
+ (_b = props.onValueChange) === null || _b === void 0 ? void 0 : _b.call(props, date);
44
+ }
40
45
  },
41
46
  });
42
47
  React.useImperativeHandle(ref, () => {
@@ -50,12 +55,12 @@ exports.InternalAdaptableDateEditor = React.forwardRef((props, ref) => {
50
55
  }, []);
51
56
  return (React.createElement("div", { style: hostStyle },
52
57
  React.createElement(DatepickerContext_1.DatepickerContext.Provider, { value: {
53
- onHide: () => {
58
+ onHide: (keyboardEventKey) => {
54
59
  var _a;
55
- (_a = props.onCancelEdit) === null || _a === void 0 ? void 0 : _a.call(props);
60
+ (_a = props.onStopEdit) === null || _a === void 0 ? void 0 : _a.call(props, keyboardEventKey);
56
61
  },
57
62
  onShow: () => { },
58
- showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a : false,
63
+ showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a : true,
59
64
  } },
60
65
  React.createElement(AdaptableInput_1.default, { type: 'date', value: stringValue, onChange: onChange, style: inputStyle, ref: inputRef }))));
61
66
  });
@@ -9,13 +9,13 @@ import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
9
9
  * field: 'tradeDate',
10
10
  * type: 'abColDefDate',
11
11
  * cellEditorParams: {
12
- * showClearButton: false
12
+ * showClearButton: true
13
13
  * }
14
14
  * }
15
15
  *
16
16
  * For now, there is just 1 editor param you can configure:
17
17
  *
18
- * cellEditorParams.showClearButton - defaults to `false` - whether to show the clear button.
18
+ * cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button.
19
19
  *
20
20
  * When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
21
21
  * This is useful because dates can be stored as strings, numbers or Date instances - the value parser will be called with a `Date` instance,
@@ -37,4 +37,5 @@ export declare class AdaptableDateEditor implements ICellEditorComp {
37
37
  getAdaptableInstance(params: ICellEditorParams): IAdaptable;
38
38
  afterGuiAttached(): void;
39
39
  destroy(): void;
40
+ private shouldClearExistingValue;
40
41
  }
@@ -6,6 +6,7 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_dom_1 = require("react-dom");
7
7
  const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
8
8
  const InternalAdaptableDateEditor_1 = require("./InternalAdaptableDateEditor");
9
+ const all_modules_1 = require("@ag-grid-community/all-modules");
9
10
  const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
10
11
  /**
11
12
  * Used by default for all `abColDefDate` columns.
@@ -16,13 +17,13 @@ const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
16
17
  * field: 'tradeDate',
17
18
  * type: 'abColDefDate',
18
19
  * cellEditorParams: {
19
- * showClearButton: false
20
+ * showClearButton: true
20
21
  * }
21
22
  * }
22
23
  *
23
24
  * For now, there is just 1 editor param you can configure:
24
25
  *
25
- * cellEditorParams.showClearButton - defaults to `false` - whether to show the clear button.
26
+ * cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button.
26
27
  *
27
28
  * When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
28
29
  * This is useful because dates can be stored as strings, numbers or Date instances - the value parser will be called with a `Date` instance,
@@ -40,7 +41,7 @@ class AdaptableDateEditor {
40
41
  };
41
42
  }
42
43
  init(params) {
43
- this.value = params.value;
44
+ this.value = this.shouldClearExistingValue(params) ? '' : params.value;
44
45
  const { valueParser } = params.column.getColDef();
45
46
  this.params = params;
46
47
  if (typeof valueParser === 'function') {
@@ -75,7 +76,8 @@ class AdaptableDateEditor {
75
76
  afterGuiAttached() {
76
77
  var _a;
77
78
  const adaptable = this.getAdaptableInstance(this.params);
78
- const editorElement = (React.createElement(InternalAdaptableDateEditor_1.InternalAdaptableDateEditor, { defaultValue: this.params.value, dateFormat: adaptable.adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat, onValueChange: (value) => {
79
+ const defaultValue = this.shouldClearExistingValue(this.params) ? '' : this.params.value;
80
+ const editorElement = (React.createElement(InternalAdaptableDateEditor_1.InternalAdaptableDateEditor, { defaultValue: defaultValue, dateFormat: adaptable.adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat, onValueChange: (value) => {
79
81
  const invalid = isNaN(+value);
80
82
  if (this.valueParser) {
81
83
  const params = Object.assign(Object.assign({}, this.params), { oldValue: this.params.value, newValue: value, defaultParser: (value) => {
@@ -98,8 +100,13 @@ class AdaptableDateEditor {
98
100
  this.params.stopEditing();
99
101
  });
100
102
  }
101
- }, showClearButton: (_a = this.params.showClearButton) !== null && _a !== void 0 ? _a : false, onCancelEdit: () => {
102
- this.params.stopEditing();
103
+ }, showClearButton: (_a = this.params.showClearButton) !== null && _a !== void 0 ? _a : true, onStopEdit: (keyboardEventKey) => {
104
+ if (keyboardEventKey === 'Escape') {
105
+ this.params.api.stopEditing(true);
106
+ }
107
+ else {
108
+ this.params.stopEditing();
109
+ }
103
110
  }, ref: (editor) => {
104
111
  this.editor = editor;
105
112
  editor === null || editor === void 0 ? void 0 : editor.focus();
@@ -109,5 +116,8 @@ class AdaptableDateEditor {
109
116
  destroy() {
110
117
  react_dom_1.unmountComponentAtNode(this.el);
111
118
  }
119
+ shouldClearExistingValue(params) {
120
+ return params.keyPress === all_modules_1.KeyCode.BACKSPACE || params.keyPress === all_modules_1.KeyCode.DELETE;
121
+ }
112
122
  }
113
123
  exports.AdaptableDateEditor = AdaptableDateEditor;
@@ -50,5 +50,6 @@ export declare class AdaptableNumberEditor implements ICellEditorComp {
50
50
  afterGuiAttached(): void;
51
51
  destroy(): void;
52
52
  private onValueChange;
53
+ private shouldClearExistingValue;
53
54
  }
54
55
  export {};