@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
@@ -1,8 +1,9 @@
1
1
  import { ConfigState } from './ConfigState';
2
2
  import { AdaptableObject } from './Common/AdaptableObject';
3
3
  import { AdaptableScalarQuery } from './Common/AdaptableQuery';
4
+ import { SpecialColumnSettings } from './Common/SpecialColumnSettings';
4
5
  /**
5
- * Predefined Configuration for Calculated Column function
6
+ * Predefined Configuration for Calculated Column Module
6
7
  **/
7
8
  export interface CalculatedColumnState extends ConfigState {
8
9
  /**
@@ -24,7 +25,7 @@ export interface CalculatedColumn extends AdaptableObject {
24
25
  */
25
26
  FriendlyName?: string;
26
27
  /**
27
- * Addtional optional properties for Column (e.g. filterable, resizable)
28
+ * Additional optional properties for Column (e.g. filterable, resizable)
28
29
  */
29
30
  CalculatedColumnSettings?: CalculatedColumnSettings;
30
31
  /**
@@ -35,9 +36,9 @@ export interface CalculatedColumn extends AdaptableObject {
35
36
  /**
36
37
  * Set of optional properties that define a Calculated Column's behaviour
37
38
  */
38
- export interface CalculatedColumnSettings {
39
+ export interface CalculatedColumnSettings extends SpecialColumnSettings {
39
40
  /**
40
- * Expression's return value DataType; inferred by AdapTable but setable by User
41
+ * Expression's return value DataType; inferred by AdapTable but settable by User
41
42
  */
42
43
  DataType?: 'String' | 'Number' | 'Boolean' | 'Date';
43
44
  /**
@@ -45,38 +46,4 @@ export interface CalculatedColumnSettings {
45
46
  * @defaultValue false
46
47
  */
47
48
  ShowToolTip?: boolean;
48
- /**
49
- * Preferred width (in pixels) for Column; if unset, calculated dynamically by underlying Grid
50
- */
51
- Width?: number;
52
- /**
53
- * Whether Column is filterable
54
- * @defaultValue true
55
- */
56
- Filterable?: boolean;
57
- /**
58
- * Whether Column can be resized (by dragging column header edges)
59
- * @defaultValue true
60
- */
61
- Resizable?: boolean;
62
- /**
63
- * Whether Column can be grouped
64
- * @defaultValue true
65
- */
66
- Groupable?: boolean;
67
- /**
68
- * Whether Column is sortable
69
- * @defaultValue true
70
- */
71
- Sortable?: boolean;
72
- /**
73
- * Whether Column can be used when grid is in pivot mode
74
- * @defaultValue true
75
- */
76
- Pivotable?: boolean;
77
- /**
78
- * Whether Column can be used in an aggregation when grouping
79
- * @defaultValue true
80
- */
81
- Aggregatable?: boolean;
82
49
  }
@@ -36,5 +36,5 @@ export interface AdaptableButton<CONTEXT_TYPE extends ButtonContext> extends Ada
36
36
  hidden?: (button: AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean;
37
37
  }
38
38
  export interface ButtonContext {
39
- api: AdaptableApi;
39
+ adaptableApi: AdaptableApi;
40
40
  }
@@ -4,17 +4,17 @@ import { AdaptableObject } from './AdaptableObject';
4
4
  */
5
5
  export interface AdaptableColumnBase extends AdaptableObject {
6
6
  /**
7
- * Name of Column in underlying grid (e.g. field or colId)
7
+ * Name of Column in AG Grid (e.g. field or colId)
8
8
  */
9
- ColumnId: string;
9
+ columnId: string;
10
10
  /**
11
- * How Column is referred to in Adaptable UI; 'Caption' or 'Header' property in underlying grid
11
+ * How Column is referred to in Adaptable UI; `Caption` property in AG Grid
12
12
  */
13
- FriendlyName: string;
13
+ friendlyName: string;
14
14
  /**
15
15
  * DataType of the column
16
16
  */
17
- DataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown';
17
+ dataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown';
18
18
  }
19
19
  export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }: {
20
20
  oldColumns: AdaptableColumn[];
@@ -24,101 +24,101 @@ export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }:
24
24
  * Defines a Column Group
25
25
  */
26
26
  export interface AdaptableColumnGroup {
27
- AllowGroupSplit: boolean;
28
- ColumnGroupId: string;
29
- FriendlyName: string;
30
- GroupCount: number;
27
+ allowGroupSplit: boolean;
28
+ columnGroupId: string;
29
+ friendlyName: string;
30
+ groupCount: number;
31
31
  }
32
32
  /**
33
- * Defines an Adaptable Column - created at run-time based on vendor grid column definition
33
+ * Defines an Adaptable Column - created at run-time based on AG Grid column definition
34
34
  */
35
35
  export interface AdaptableColumn extends AdaptableColumnBase {
36
36
  /**
37
37
  * Is this the Primary Key column
38
38
  */
39
- IsPrimaryKey: boolean;
39
+ isPrimaryKey: boolean;
40
40
  /**
41
41
  * Column width
42
42
  */
43
- Width?: number;
43
+ width?: number;
44
44
  /**
45
45
  * Flex details of the column
46
46
  */
47
- Flex?: number;
47
+ flex?: number;
48
48
  /**
49
49
  * Is column editable
50
50
  */
51
- ReadOnly: boolean;
51
+ readOnly: boolean;
52
52
  /**
53
53
  * Is Column currently visible
54
54
  */
55
- Visible: boolean;
55
+ visible: boolean;
56
56
  /**
57
57
  * Is Column sortable
58
58
  */
59
- Sortable: boolean;
59
+ sortable: boolean;
60
60
  /**
61
61
  * Is Column able to be filtered
62
62
  */
63
- Filterable: boolean;
63
+ filterable: boolean;
64
64
  /**
65
65
  * Can Column be moved at run-time to a new position
66
66
  */
67
- Moveable: boolean;
67
+ moveable: boolean;
68
68
  /**
69
69
  * Can Column be removed from the grid
70
70
  */
71
- Hideable: boolean;
71
+ hideable: boolean;
72
72
  /**
73
73
  * Can Column form a Row Group
74
74
  */
75
- Groupable: boolean;
75
+ groupable: boolean;
76
76
  /**
77
77
  * Can Column be used in a Pivot Grid
78
78
  */
79
- Pivotable: boolean;
79
+ pivotable: boolean;
80
80
  /**
81
81
  * Is Column able to display aggregations (e.g. 'sum') when grouped
82
82
  */
83
- Aggregatable: boolean;
83
+ aggregatable: boolean;
84
84
  /**
85
85
  * Can the Column be in included in Queries / Expressions
86
86
  */
87
- Queryable: boolean;
87
+ queryable: boolean;
88
88
  /**
89
89
  * Available aggregations for the Column
90
90
  */
91
- AvailableAggregationFunctions?: string[];
91
+ availableAggregationFunctions?: string[];
92
92
  /**
93
93
  * Custom aggregation function for the Column
94
94
  */
95
- AggregationFunction?: string;
95
+ aggregationFunction?: string;
96
96
  /**
97
97
  * Is Column currently grouped
98
98
  */
99
- IsGrouped: boolean;
99
+ isGrouped: boolean;
100
100
  /**
101
101
  * Is Column pinned or locked into position
102
102
  */
103
- IsFixed: boolean;
103
+ isFixed: boolean;
104
104
  /**
105
105
  * Is it a Sparkline Column
106
106
  */
107
- IsSparkline: boolean;
107
+ isSparkline: boolean;
108
108
  /**
109
109
  * Has colummn been excluded from Quick Search results
110
110
  */
111
- IsExcludedFromQuickSearch: boolean;
111
+ isExcludedFromQuickSearch: boolean;
112
112
  /**
113
113
  * The parent column group, if the column belongs to one
114
114
  */
115
- ColumnGroup?: AdaptableColumnGroup;
115
+ columnGroup?: AdaptableColumnGroup;
116
116
  }
117
117
  export interface AdaptableColumnProperties {
118
- Sortable: boolean;
119
- Filterable: boolean;
120
- Moveable: boolean;
121
- Groupable: boolean;
122
- Pivotable: boolean;
123
- Aggregatable: boolean;
118
+ sortable: boolean;
119
+ filterable: boolean;
120
+ moveable: boolean;
121
+ groupable: boolean;
122
+ pivotable: boolean;
123
+ aggregatable: boolean;
124
124
  }
@@ -8,14 +8,14 @@ exports.isValidOrderForColumnGroups = ({ oldColumns, newColumns, }) => {
8
8
  let count = 0;
9
9
  columns.forEach((column) => {
10
10
  var _a, _b;
11
- if (column.ColumnGroup &&
12
- column.ColumnGroup.GroupCount > 1 &&
13
- !column.ColumnGroup.AllowGroupSplit) {
14
- if (prevGroup !== column.ColumnGroup.ColumnGroupId) {
11
+ if (column.columnGroup &&
12
+ column.columnGroup.groupCount > 1 &&
13
+ !column.columnGroup.allowGroupSplit) {
14
+ if (prevGroup !== column.columnGroup.columnGroupId) {
15
15
  count++;
16
16
  }
17
17
  }
18
- prevGroup = (_b = (_a = column.ColumnGroup) === null || _a === void 0 ? void 0 : _a.ColumnGroupId) !== null && _b !== void 0 ? _b : '';
18
+ prevGroup = (_b = (_a = column.columnGroup) === null || _a === void 0 ? void 0 : _a.columnGroupId) !== null && _b !== void 0 ? _b : '';
19
19
  });
20
20
  return count;
21
21
  };
@@ -7,11 +7,11 @@ import { RowNode } from '@ag-grid-community/all-modules';
7
7
  */
8
8
  export interface AdaptablePredicate {
9
9
  /**
10
- * Id of Predicate (e.g. 'Equals', 'GreaterThan')
10
+ * Id of Predicate (e.g. `Equals`, `GreaterThan`)
11
11
  */
12
12
  PredicateId: string;
13
13
  /**
14
- * Optional inputs - needed to evaluate some Predicates (e.g. 'GreaterThan')
14
+ * Optional Inputs that might be needed for evaluation
15
15
  */
16
16
  Inputs?: any[];
17
17
  }
@@ -32,7 +32,7 @@ export interface AdaptablePredicateDef {
32
32
  */
33
33
  columnScope: AdaptableScope;
34
34
  /**
35
- * Adaptable Modules where Predicate can run
35
+ * Modules where Predicate can run: 'filter', 'alert', 'conditionalstyle'
36
36
  */
37
37
  moduleScope: ModuleScope[];
38
38
  /**
@@ -60,7 +60,7 @@ export interface AdaptablePredicateDef {
60
60
  */
61
61
  shortcuts?: string[];
62
62
  /**
63
- * Wether to display this predicate only in QuickFilter (and NOT in Column Filter)
63
+ * Display this predicate only in Quick Filter Bar (and NOT in Filter Form)
64
64
  */
65
65
  onlyQuickFilter?: boolean;
66
66
  }
@@ -16,6 +16,7 @@ const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
16
16
  const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
17
17
  const isSameDay_1 = tslib_1.__importDefault(require("date-fns/isSameDay"));
18
18
  const CalendarHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/CalendarHelper"));
19
+ const DateHelper_1 = require("../../Utilities/Helpers/DateHelper");
19
20
  /**
20
21
  * Array of Predicate Defs which are shipped by AdapTable
21
22
  */
@@ -273,7 +274,7 @@ exports.SystemPredicateDefs = [
273
274
  icon: { path: 'calendar' },
274
275
  columnScope: { DataTypes: ['Date'] },
275
276
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
276
- handler: ({ value }) => isToday_1.default(value),
277
+ handler: ({ value }) => isToday_1.default(DateHelper_1.parseDateValue(value)),
277
278
  },
278
279
  {
279
280
  id: 'Yesterday',
@@ -281,7 +282,7 @@ exports.SystemPredicateDefs = [
281
282
  icon: { path: 'calendar' },
282
283
  columnScope: { DataTypes: ['Date'] },
283
284
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
284
- handler: ({ value }) => isYesterday_1.default(value),
285
+ handler: ({ value }) => isYesterday_1.default(DateHelper_1.parseDateValue(value)),
285
286
  },
286
287
  {
287
288
  id: 'Tomorrow',
@@ -289,7 +290,7 @@ exports.SystemPredicateDefs = [
289
290
  icon: { path: 'calendar' },
290
291
  columnScope: { DataTypes: ['Date'] },
291
292
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
292
- handler: ({ value }) => isTomorrow_1.default(value),
293
+ handler: ({ value }) => isTomorrow_1.default(DateHelper_1.parseDateValue(value)),
293
294
  },
294
295
  {
295
296
  id: 'ThisWeek',
@@ -297,7 +298,7 @@ exports.SystemPredicateDefs = [
297
298
  icon: { path: 'calendar' },
298
299
  columnScope: { DataTypes: ['Date'] },
299
300
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
300
- handler: ({ value }) => isThisWeek_1.default(value),
301
+ handler: ({ value }) => isThisWeek_1.default(DateHelper_1.parseDateValue(value)),
301
302
  },
302
303
  {
303
304
  id: 'ThisMonth',
@@ -305,7 +306,7 @@ exports.SystemPredicateDefs = [
305
306
  icon: { path: 'calendar' },
306
307
  columnScope: { DataTypes: ['Date'] },
307
308
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
308
- handler: ({ value }) => isThisMonth_1.default(value),
309
+ handler: ({ value }) => isThisMonth_1.default(DateHelper_1.parseDateValue(value)),
309
310
  },
310
311
  {
311
312
  id: 'ThisQuarter',
@@ -313,7 +314,7 @@ exports.SystemPredicateDefs = [
313
314
  icon: { path: 'calendar' },
314
315
  columnScope: { DataTypes: ['Date'] },
315
316
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
316
- handler: ({ value }) => isThisQuarter_1.default(value),
317
+ handler: ({ value }) => isThisQuarter_1.default(DateHelper_1.parseDateValue(value)),
317
318
  },
318
319
  {
319
320
  id: 'ThisYear',
@@ -321,7 +322,7 @@ exports.SystemPredicateDefs = [
321
322
  icon: { path: 'calendar' },
322
323
  columnScope: { DataTypes: ['Date'] },
323
324
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
324
- handler: ({ value }) => isThisYear_1.default(value),
325
+ handler: ({ value }) => isThisYear_1.default(DateHelper_1.parseDateValue(value)),
325
326
  },
326
327
  {
327
328
  id: 'InPast',
@@ -329,7 +330,7 @@ exports.SystemPredicateDefs = [
329
330
  icon: { path: 'calendar' },
330
331
  columnScope: { DataTypes: ['Date'] },
331
332
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
332
- handler: ({ value }) => isPast_1.default(value),
333
+ handler: ({ value }) => isPast_1.default(DateHelper_1.parseDateValue(value)),
333
334
  },
334
335
  {
335
336
  id: 'InFuture',
@@ -337,7 +338,7 @@ exports.SystemPredicateDefs = [
337
338
  icon: { path: 'calendar' },
338
339
  columnScope: { DataTypes: ['Date'] },
339
340
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
340
- handler: ({ value }) => isFuture_1.default(value),
341
+ handler: ({ value }) => isFuture_1.default(DateHelper_1.parseDateValue(value)),
341
342
  },
342
343
  {
343
344
  id: 'After',
@@ -346,7 +347,7 @@ exports.SystemPredicateDefs = [
346
347
  columnScope: { DataTypes: ['Date'] },
347
348
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
348
349
  inputs: [{ type: 'date' }],
349
- handler: ({ value, inputs }) => isAfter_1.default(value, new Date(inputs[0])),
350
+ handler: ({ value, inputs }) => isAfter_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
350
351
  toString: ({ inputs }) => `> ${inputs[0]}`,
351
352
  },
352
353
  {
@@ -356,7 +357,7 @@ exports.SystemPredicateDefs = [
356
357
  columnScope: { DataTypes: ['Date'] },
357
358
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
358
359
  inputs: [{ type: 'date' }],
359
- handler: ({ value, inputs }) => isBefore_1.default(value, new Date(inputs[0])),
360
+ handler: ({ value, inputs }) => isBefore_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
360
361
  toString: ({ inputs }) => `< ${inputs[0]}`,
361
362
  },
362
363
  {
@@ -366,7 +367,7 @@ exports.SystemPredicateDefs = [
366
367
  columnScope: { DataTypes: ['Date'] },
367
368
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
368
369
  inputs: [{ type: 'date' }],
369
- handler: ({ value, inputs }) => isSameDay_1.default(value, new Date(inputs[0])),
370
+ handler: ({ value, inputs }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
370
371
  toString: ({ inputs }) => `= ${inputs[0]}`,
371
372
  },
372
373
  {
@@ -376,7 +377,7 @@ exports.SystemPredicateDefs = [
376
377
  columnScope: { DataTypes: ['Date'] },
377
378
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
378
379
  inputs: [{ type: 'date' }],
379
- handler: ({ value, inputs }) => !isSameDay_1.default(value, new Date(inputs[0])),
380
+ handler: ({ value, inputs }) => !isSameDay_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
380
381
  toString: ({ inputs }) => `!= ${inputs[0]}`,
381
382
  },
382
383
  {
@@ -385,7 +386,7 @@ exports.SystemPredicateDefs = [
385
386
  icon: { path: 'calendar' },
386
387
  columnScope: { DataTypes: ['Date'] },
387
388
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
388
- handler: ({ value, api }) => isSameDay_1.default(value, CalendarHelper_1.default.getNextWorkingDay()),
389
+ handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), CalendarHelper_1.default.getNextWorkingDay()),
389
390
  },
390
391
  {
391
392
  id: 'LastWorkDay',
@@ -393,7 +394,7 @@ exports.SystemPredicateDefs = [
393
394
  icon: { path: 'calendar' },
394
395
  columnScope: { DataTypes: ['Date'] },
395
396
  moduleScope: ['filter', 'alert', 'conditionalstyle'],
396
- handler: ({ value, api }) => isSameDay_1.default(value, CalendarHelper_1.default.getPreviousWorkingDay()),
397
+ handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), CalendarHelper_1.default.getPreviousWorkingDay()),
397
398
  },
398
399
  {
399
400
  id: 'InRange',
@@ -466,7 +467,7 @@ exports.SystemPredicateDefs = [
466
467
  columnScope: { All: true },
467
468
  moduleScope: ['alert'],
468
469
  handler: ({ value, column, api, node }) => {
469
- return (column === null || column === void 0 ? void 0 : column.IsPrimaryKey) ? api.columnApi.getDistinctRawValuesForColumn(column.ColumnId, node).includes(value)
470
+ return (column === null || column === void 0 ? void 0 : column.isPrimaryKey) ? api.columnApi.getDistinctRawValuesForColumn(column.columnId, node).includes(value)
470
471
  : false;
471
472
  },
472
473
  },
@@ -477,7 +478,7 @@ exports.SystemPredicateDefs = [
477
478
  moduleScope: ['alert'],
478
479
  handler: ({ value, api, column, node }) => {
479
480
  const distinctValues = column
480
- ? api.columnApi.getDistinctRawValuesForColumn(column.ColumnId, node)
481
+ ? api.columnApi.getDistinctRawValuesForColumn(column.columnId, node)
481
482
  : [];
482
483
  return !distinctValues.includes(value);
483
484
  },
@@ -489,7 +490,7 @@ exports.SystemPredicateDefs = [
489
490
  moduleScope: ['alert'],
490
491
  handler: ({ value, api, column, node }) => {
491
492
  const distinctValues = column
492
- ? api.columnApi.getDistinctRawValuesForColumn(column.ColumnId, node)
493
+ ? api.columnApi.getDistinctRawValuesForColumn(column.columnId, node)
493
494
  : [];
494
495
  return distinctValues.includes(value);
495
496
  },
@@ -3,31 +3,31 @@
3
3
  */
4
4
  export interface AdaptableStyle {
5
5
  /**
6
- * Colour background of cell - provide a hex value.
6
+ * Colour background of cell: provide hex value or name
7
7
  */
8
8
  BackColor?: string;
9
9
  /**
10
- * Font colour in cell - provide a hex value.
10
+ * Font colour in cell: provide hex value or name
11
11
  */
12
12
  ForeColor?: string;
13
13
  /**
14
- * Whether font appears as 'Normal' or 'Bold'
14
+ * Weight of font: `Normal` or `Bold`
15
15
  */
16
16
  FontWeight?: 'Normal' | 'Bold';
17
17
  /**
18
- * Style of the font: 'Normal' or 'Italic'
18
+ * Style of font: `Normal` or `Italic`
19
19
  */
20
20
  FontStyle?: 'Normal' | 'Italic';
21
21
  /**
22
- * Size of font: 'XSmall', 'Small', 'Medium', 'Large' or 'XLarge'
22
+ * Size of font: `XSmall`, `Small`, `Medium`, `Large` or `XLarge`
23
23
  */
24
24
  FontSize?: 'XSmall' | 'Small' | 'Medium' | 'Large' | 'XLarge';
25
25
  /**
26
- * Colour of cell border - provide a hex value.
26
+ * Colour of cell border: provide hex value or name
27
27
  */
28
28
  BorderColor?: string;
29
29
  /**
30
- * Name of existing Css Class; use instead of setting other object properties
30
+ * Existing CSS Class; use instead of setting other object properties
31
31
  */
32
32
  ClassName?: string;
33
33
  }
@@ -1,4 +1,5 @@
1
1
  import { RowNode } from '@ag-grid-community/all-modules';
2
+ import { AdaptableColumn } from './AdaptableColumn';
2
3
  /**
3
4
  * Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row
4
5
  */
@@ -16,15 +17,15 @@ export interface DataChangedInfo {
16
17
  */
17
18
  newValue: any;
18
19
  /**
19
- * Id of the Column in which the cell is situated
20
+ * Column in which cell is situated
20
21
  */
21
- columnId: string;
22
+ column: AdaptableColumn;
22
23
  /**
23
24
  * Primary Key Column's value for the row where edited cell is situated
24
25
  */
25
26
  primaryKeyValue: any;
26
27
  /**
27
- * RowNode that contains the cell (an AG Grid object)
28
+ * AG Grid RowNode that contains the cell
28
29
  */
29
30
  rowNode?: RowNode;
30
31
  /**
@@ -3,11 +3,15 @@
3
3
  */
4
4
  export interface DataUpdateConfig {
5
5
  /**
6
- * Whether data should be updated aysnchoronously
6
+ * Whether data should be updated asynchronously
7
7
  */
8
8
  runAsync?: boolean;
9
9
  /**
10
10
  * Callback function invoked when a batch successfully updates
11
11
  */
12
12
  callback?: (res: any) => void;
13
+ /**
14
+ * Index where to add new rows
15
+ */
16
+ addIndex?: number;
13
17
  }
@@ -6,6 +6,12 @@ import { AdaptableApi } from '../../Api/AdaptableApi';
6
6
  import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
7
7
  import { SelectedRowInfo } from '../Selection/SelectedRowInfo';
8
8
  import { Column, RowNode } from '@ag-grid-community/all-modules';
9
+ export interface MenuContext {
10
+ /**
11
+ * The Adaptable Api - included as a convenience
12
+ */
13
+ adaptableApi: AdaptableApi;
14
+ }
9
15
  /**
10
16
  * Menu item used by Adaptable in 3 places: Module Menu (at left of Dashboard Header), Column Header Menu and Context Menu
11
17
  */
@@ -15,15 +21,15 @@ export interface AdaptableMenuItem {
15
21
  */
16
22
  label: string;
17
23
  /**
18
- * Adaptable Module associated with (shipped) menu item.
24
+ * Adaptable Module associated with (Adaptable) menu item.
19
25
  */
20
26
  module?: AdaptableModule | 'General';
21
27
  /**
22
- * Adaptable Redux Action to invoke when (shipped) menu item is clicked
28
+ * Adaptable Redux Action to invoke when (Adaptable) menu item is clicked
23
29
  */
24
30
  reduxAction?: Redux.Action;
25
31
  /**
26
- * Function to invoice when (custom) menu item is clicked
32
+ * Function to invoke when (custom) menu item is clicked
27
33
  */
28
34
  onClick?: () => void;
29
35
  /**
@@ -40,38 +46,55 @@ export interface AdaptableMenuItem {
40
46
  subItems?: AdaptableMenuItem[];
41
47
  }
42
48
  /**
43
- * Defines a Menu Item created at design-time, can be added to Column Header or Context Menu, and can contain sub items.
49
+ * Menu Item created at design-time which is added to Column Header or Context Menu, and can contain sub items
44
50
  */
45
- export interface UserMenuItem {
51
+ export interface UserMenuItem<CONTEXT_TYPE extends MenuContext> {
46
52
  /**
47
53
  * The text that will appear in the Menu Item
48
54
  */
49
- label: string | ((menuContext: MenuContext) => string);
55
+ label: string | ((context: CONTEXT_TYPE) => string);
50
56
  /**
51
57
  * Function to invoke when the Menu Item is clicked
52
58
  */
53
- onClick?: (menuContext: MenuContext) => void;
59
+ onClick?: (menuContext: CONTEXT_TYPE) => void;
54
60
  /**
55
61
  * Function to evaluate whether Menu Item is visible
56
62
  */
57
- hidden?: (menuContext: MenuContext) => boolean;
63
+ hidden?: (menuContext: CONTEXT_TYPE) => boolean;
58
64
  /**
59
65
  * Function to evaluate whether Menu Item is enabled
60
66
  */
61
- disabled?: (menuContext: MenuContext) => boolean;
67
+ disabled?: (menuContext: CONTEXT_TYPE) => boolean;
62
68
  /**
63
- * Optional icon to show in the Menu Item
69
+ * Optional icon to show in the Column Menu Item
64
70
  */
65
71
  icon?: string;
66
72
  /**
67
73
  * Array of Menu Items, enabling creation of (limitless levels of) sub menus
68
74
  */
69
- subMenuItems?: UserMenuItem[];
75
+ subMenuItems?: UserMenuItem<CONTEXT_TYPE>[];
70
76
  }
71
77
  /**
72
- * Provides full details about current Menu; used for both Column and Context Menus
78
+ * Provides full details about current Column where Column Header Menu will appear
73
79
  */
74
- export interface MenuContext {
80
+ export interface ColumnMenuContext extends MenuContext {
81
+ /**
82
+ * Current Adaptable Column
83
+ */
84
+ adaptableColumn: AdaptableColumn;
85
+ /**
86
+ * Current AG Grid Column
87
+ */
88
+ agGridColumn: Column;
89
+ /**
90
+ * Whether current Column is Row Group
91
+ */
92
+ isRowGroupColumn: boolean;
93
+ }
94
+ /**
95
+ * Provides full details about current cell (and selected cells) where Context Menu will appear
96
+ */
97
+ export interface ContextMenuContext extends MenuContext {
75
98
  /**
76
99
  * Cell that has been clicked; contains cell value
77
100
  */
@@ -81,9 +104,9 @@ export interface MenuContext {
81
104
  */
82
105
  adaptableColumn: AdaptableColumn;
83
106
  /**
84
- * Current Vendor Grid Column
107
+ * Current AG Grid Column
85
108
  */
86
- vendorColumn: Column;
109
+ agGridColumn: Column;
87
110
  /**
88
111
  * Whether cell that was clicked is also currently selected
89
112
  */
@@ -97,11 +120,11 @@ export interface MenuContext {
97
120
  */
98
121
  rowNode: RowNode;
99
122
  /**
100
- * Whether current row node is grouped
123
+ * Whether current AG Grid row node is grouped
101
124
  */
102
125
  isGroupedNode: boolean;
103
126
  /**
104
- * Whether current Column is Row Group
127
+ * Whether current Column is Row Grouped
105
128
  */
106
129
  isRowGroupColumn: boolean;
107
130
  /**