@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
@@ -83,6 +83,7 @@ class AdaptableReduxLocalStorageEngine {
83
83
  return this.saveNow(state, getState);
84
84
  }
85
85
  saveNow(state, getState) {
86
+ var _a;
86
87
  const config = {
87
88
  adaptableId: this.adaptableId,
88
89
  adaptableStateKey: this.adaptableStateKey,
@@ -92,7 +93,11 @@ class AdaptableReduxLocalStorageEngine {
92
93
  if (getState) {
93
94
  result = getState(state, config);
94
95
  }
95
- return (this.persistState || persistState)(result, config).catch(rejectWithMessage);
96
+ const promise = (_a = (this.persistState || persistState)(result, config)) === null || _a === void 0 ? void 0 : _a.catch(rejectWithMessage);
97
+ if (!(promise instanceof Promise)) {
98
+ LoggingHelper_1.ConsoleLogByMessageType('stateOptions.persistState should return a promise, it returned', 'Error', promise);
99
+ }
100
+ return promise;
96
101
  }
97
102
  }
98
103
  function rejectWithMessage(error) {
@@ -22,7 +22,7 @@ export declare const LoadState: (State: {
22
22
  [s: string]: ConfigState;
23
23
  }) => LoadStateAction;
24
24
  export declare class AdaptableStore implements IAdaptableStore {
25
- private isVendorReady;
25
+ private isAgGridReady;
26
26
  TheStore: Redux.Store<AdaptableState>;
27
27
  Load: Promise<any>;
28
28
  private emitter;
@@ -36,9 +36,9 @@ export declare class AdaptableStore implements IAdaptableStore {
36
36
  /**
37
37
  *
38
38
  * @param adaptable The Adaptable instance
39
- * @param isVendorReady A promise which is resolved when the underlying grid is ready for binding
39
+ * @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
40
40
  */
41
- constructor(adaptable: IAdaptable, isVendorReady: Promise<any>);
41
+ constructor(adaptable: IAdaptable, isAgGridReady: Promise<any>);
42
42
  getCurrentStorageState(): AdaptableState;
43
43
  saveStateNow(adaptable: IAdaptable): Promise<any>;
44
44
  loadStore: (adaptable: IAdaptable, adaptableStateKey: string, predefinedConfig?: PredefinedConfig) => Promise<any>;
@@ -43,6 +43,7 @@ const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
43
43
  const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
44
44
  const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
45
45
  const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
46
+ const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
46
47
  exports.INIT_STATE = 'INIT_STATE';
47
48
  exports.LOAD_STATE = 'LOAD_STATE';
48
49
  const NON_PERSIST_ACTIONS = {
@@ -50,6 +51,9 @@ const NON_PERSIST_ACTIONS = {
50
51
  '@@INIT': true,
51
52
  '@@redux/init': true,
52
53
  [exports.INIT_STATE]: true,
54
+ // progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
55
+ [SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_SHOW]: true,
56
+ [SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_HIDE]: true,
53
57
  };
54
58
  exports.InitState = () => ({
55
59
  type: exports.INIT_STATE,
@@ -62,13 +66,13 @@ class AdaptableStore {
62
66
  /**
63
67
  *
64
68
  * @param adaptable The Adaptable instance
65
- * @param isVendorReady A promise which is resolved when the underlying grid is ready for binding
69
+ * @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
66
70
  */
67
- constructor(adaptable, isVendorReady) {
71
+ constructor(adaptable, isAgGridReady) {
68
72
  /*
69
- This is the main store for Adaptable State
70
- */
71
- this.isVendorReady = isVendorReady;
73
+ This is the main store for Adaptable State
74
+ */
75
+ this.isAgGridReady = isAgGridReady;
72
76
  this.loadStorageInProgress = false;
73
77
  this.loadStateOnStartup = true; // set to false if you want no state
74
78
  this.on = (eventName, callback) => {
@@ -91,8 +95,8 @@ class AdaptableStore {
91
95
  this.TheStore.dispatch(exports.LoadState(adaptable.adaptableOptions.stateOptions.applyState(storedState)));
92
96
  }
93
97
  })
94
- // we need the vendor grid to be ready because several states(ex. Layout) depend on its API
95
- .then(() => this.isVendorReady)
98
+ // we need AG Grid to be ready because several states(ex. Layout) depend on its API
99
+ .then(() => this.isAgGridReady)
96
100
  .then(() => {
97
101
  this.TheStore.dispatch(exports.InitState());
98
102
  // END STATE LOAD
@@ -309,7 +313,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
309
313
  *******************/
310
314
  case SystemRedux.SYSTEM_FLASHING_ALERT_ADD:
311
315
  case SystemRedux.SYSTEM_FLASHING_ALERT_DELETE: {
312
- const { flashingAlert: FlashingAlert, } = action;
316
+ const { flashingAlert: FlashingAlert } = action;
313
317
  const { dataChangedInfo } = FlashingAlert;
314
318
  let ret = next(action);
315
319
  if (dataChangedInfo) {
@@ -382,7 +386,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
382
386
  if (((_c = actionTyped.alert.alertDefinition.AlertProperties) === null || _c === void 0 ? void 0 : _c.HighlightCell) &&
383
387
  actionTyped.alert.dataChangedInfo) {
384
388
  let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
385
- adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
389
+ adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
386
390
  }
387
391
  return ret;
388
392
  }
@@ -398,7 +402,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
398
402
  var _a;
399
403
  if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) && alert.dataChangedInfo) {
400
404
  let rowNode = alert.dataChangedInfo.rowNode;
401
- adaptable.refreshCells([rowNode], [alert.dataChangedInfo.columnId], true);
405
+ adaptable.refreshCells([rowNode], [alert.dataChangedInfo.column.columnId], true);
402
406
  }
403
407
  });
404
408
  return ret;
@@ -412,7 +416,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
412
416
  let ret = next(action);
413
417
  if (actionTyped.alert.dataChangedInfo) {
414
418
  let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
415
- adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
419
+ adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
416
420
  }
417
421
  return ret;
418
422
  }
@@ -678,13 +682,15 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
678
682
  case LayoutRedux.LAYOUT_EDIT:
679
683
  case LayoutRedux.LAYOUT_SAVE:
680
684
  case LayoutRedux.LAYOUT_DELETE:
685
+ case LayoutRedux.LAYOUT_SET_COLUMN_CAPTION:
681
686
  case LayoutRedux.LAYOUT_SELECT: {
682
687
  const oldLayoutState = middlewareAPI.getState().Layout;
683
688
  let returnAction = next(action);
684
689
  const newLayoutState = middlewareAPI.getState().Layout;
685
690
  adaptable.api.layoutApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
686
691
  if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
687
- returnAction.type == LayoutRedux.LAYOUT_DELETE) {
692
+ returnAction.type == LayoutRedux.LAYOUT_DELETE ||
693
+ returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
688
694
  let gridState = middlewareAPI.getState().Grid;
689
695
  let currentLayout = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout);
690
696
  if (gridState.CurrentLayout) {
@@ -1045,7 +1051,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1045
1051
  case TeamSharingRedux.TEAMSHARING_IMPORT_ITEM: {
1046
1052
  let returnAction = next(action);
1047
1053
  const actionTyped = action;
1048
- const [importStepActions, needsOverwriteConfirmation,] = adaptable.api.internalApi
1054
+ const [importStepActions, needsOverwriteConfirmation] = adaptable.api.internalApi
1049
1055
  .getTeamSharingService()
1050
1056
  .buildSharedEntityImportActions(actionTyped.SharedEntity);
1051
1057
  const processImportAction = TeamSharingRedux.TeamSharingProcessImport(importStepActions);
@@ -1118,14 +1124,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1118
1124
  .getSharedEntities(adaptableId)
1119
1125
  .then((sharedEntities) => {
1120
1126
  // check if remote server has a newer revision
1121
- const [localRevision, remoteRevision,] = adaptable.api.internalApi
1127
+ const [localRevision, remoteRevision] = adaptable.api.internalApi
1122
1128
  .getTeamSharingService()
1123
1129
  .getSharedEntityLocalAndRemoteRevisions(ChangedAdaptableObject.Uuid, sharedEntities);
1124
1130
  if (remoteRevision > localRevision) {
1125
1131
  // if remote has a newer version, we will NOT overwrite it
1126
1132
  return;
1127
1133
  }
1128
- const [updatedSharedEntities, newActiveEntities,] = adaptable.api.internalApi
1134
+ const [updatedSharedEntities, newActiveEntities] = adaptable.api.internalApi
1129
1135
  .getTeamSharingService()
1130
1136
  .updateActiveSharedEntity(ChangedAdaptableObject, UserName, sharedEntities);
1131
1137
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...newActiveEntities));
@@ -1191,7 +1197,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1191
1197
  case GridRedux.GRID_REFRESH_CELLS: {
1192
1198
  const actionTyped = action;
1193
1199
  let ret = next(action);
1194
- adaptable.refreshCells(actionTyped.rows, actionTyped.columnIds, true);
1200
+ adaptable.refreshCells(actionTyped.rowNodes, actionTyped.columnIds, true);
1195
1201
  return ret;
1196
1202
  }
1197
1203
  case GridRedux.GRID_SET_SORT: {
@@ -1242,6 +1248,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1242
1248
  *******************/
1243
1249
  case exports.INIT_STATE: {
1244
1250
  let returnAction = next(action);
1251
+ if (adaptable.isDestroyed) {
1252
+ return returnAction;
1253
+ }
1245
1254
  // make sure we have the grid columns in state, before we do any layout work
1246
1255
  adaptable.updateColumnsIntoStore();
1247
1256
  const layoutState = middlewareAPI.getState().Layout;
@@ -3,7 +3,7 @@ import { Action } from 'redux';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
5
5
  import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
6
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
6
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
7
7
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
8
8
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
9
9
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
@@ -33,7 +33,7 @@ export declare abstract class AdaptableModuleBase implements IModule {
33
33
  addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
34
34
  addModuleButtonMenuItem(): AdaptableMenuItem | undefined;
35
35
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
36
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
36
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
37
37
  createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }: {
38
38
  Label: string;
39
39
  ComponentName: string;
@@ -118,26 +118,26 @@ class AdaptableModuleBase {
118
118
  return false;
119
119
  }
120
120
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(functionType)) {
121
- if (functionType == 'sort' && !column.IsSparkline) {
122
- return column.Sortable;
121
+ if (functionType == 'sort' && !column.isSparkline) {
122
+ return column.sortable;
123
123
  }
124
124
  else if (functionType == 'editable') {
125
- return !column.ReadOnly;
125
+ return !column.readOnly;
126
126
  }
127
127
  else if (functionType == 'style') {
128
- return !column.IsSparkline;
128
+ return !column.isSparkline;
129
129
  }
130
130
  else if (functionType == 'sparkline') {
131
- return column.IsSparkline;
131
+ return column.isSparkline;
132
132
  }
133
133
  else if (functionType == 'numeric') {
134
- return column.DataType == Enums_1.DataType.Number;
134
+ return column.dataType == Enums_1.DataType.Number;
135
135
  }
136
136
  else if (functionType == 'filter') {
137
- return column.Filterable;
137
+ return column.filterable;
138
138
  }
139
139
  else if (functionType == 'quickfilter') {
140
- return this.api.columnApi.usesAdaptableQuickFilter(column.ColumnId);
140
+ return this.api.columnApi.usesAdaptableQuickFilter(column.columnId);
141
141
  }
142
142
  }
143
143
  return true;
@@ -2,7 +2,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
2
2
  import { AlertDefinition } from '../PredefinedConfig/AlertState';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
5
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
5
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
6
6
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
7
7
  import { AdaptableModuleBase } from './AdaptableModuleBase';
8
8
  import { IModule } from './Interface/IModule';
@@ -14,7 +14,7 @@ export declare class AlertModule extends AdaptableModuleBase implements IModule
14
14
  getReferencedNamedQueryNames(alertDefinition: AlertDefinition): string[];
15
15
  updateOldConfig(): void;
16
16
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
17
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
17
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
18
18
  protected handleDataSourceChanged(dataChangedInfo: DataChangedInfo): void;
19
19
  private handleReactiveAlertTriggered;
20
20
  private showAlertForDefinitions;
@@ -22,7 +22,8 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
22
22
  }
23
23
  if (this.api.internalApi.getAdaptableOptions().notificationsOptions
24
24
  .dataChangeDetectionPolicy === 'formattedValue') {
25
- const { oldValue, newValue, columnId } = dataChangedInfo;
25
+ const { oldValue, newValue } = dataChangedInfo;
26
+ const columnId = dataChangedInfo.column.columnId;
26
27
  const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
27
28
  const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
28
29
  if (oldFormattedValue === newFormattedValue) {
@@ -50,7 +51,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
50
51
  else if (this.api.scopeApi.scopeHasColumns(alertDefinition.Scope)) {
51
52
  return this.api.scopeApi
52
53
  .getColumnsForScope(alertDefinition.Scope)
53
- .map((adaptableColumn) => adaptableColumn.ColumnId);
54
+ .map((adaptableColumn) => adaptableColumn.columnId);
54
55
  }
55
56
  return [];
56
57
  }
@@ -62,7 +63,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
62
63
  return this.api.queryApi.getReferencedNamedQueryNames(queryExpression);
63
64
  }
64
65
  updateOldConfig() {
65
- var _a, _b, _c;
66
+ var _a, _b;
66
67
  /*
67
68
  Need to do 4 things here:
68
69
  1. Make all (new) Flashing Alerts have a Predicate if none exists
@@ -71,7 +72,6 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
71
72
  4. Convert old Updated Rows into Flashing Alerts
72
73
  */
73
74
  let oldAlertDefinitions = [];
74
- let newAlertDefinitions = [];
75
75
  // 1. Make all (new) Flashing Alerts have a Predicate if none exists
76
76
  (_a = this.api.alertApi
77
77
  .getAlertState()
@@ -97,102 +97,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
97
97
  oldAlertDefinitions.push(alertDefinition);
98
98
  }
99
99
  });
100
- // 3. Convert old Flashing Cells into Flashing Alerts
101
- let flashingCellState = this.api.internalApi.getState().FlashingCell;
102
- (_c = flashingCellState === null || flashingCellState === void 0 ? void 0 : flashingCellState.FlashingCells) === null || _c === void 0 ? void 0 : _c.forEach((flashingCell) => {
103
- if (flashingCell.IsLive) {
104
- let upColor = flashingCell.UpColor
105
- ? flashingCell.UpColor
106
- : flashingCellState.DefaultUpColor
107
- ? flashingCellState.DefaultUpColor
108
- : this.api.internalApi.getAdaptableOptions().notificationsOptions
109
- .flashingAlertDefaultProperties.UpChangeStyle.BackColor;
110
- let downColor = flashingCell.UpColor
111
- ? flashingCell.DownColor
112
- : flashingCellState.DefautDownColor
113
- ? flashingCellState.DefautDownColor
114
- : this.api.internalApi.getAdaptableOptions().notificationsOptions
115
- .flashingAlertDefaultProperties.DownChangeStyle.BackColor;
116
- let duration = flashingCell.FlashingCellDuration
117
- ? flashingCell.FlashingCellDuration
118
- : flashingCellState.DefaultDuration
119
- ? flashingCellState.DefaultDuration
120
- : this.api.internalApi.getAdaptableOptions().notificationsOptions
121
- .flashingAlertDefaultProperties.FlashDuration;
122
- let flashingAlertDefinition = {
123
- Rule: {
124
- Predicate: ANY_PREDICATE,
125
- },
126
- FlashTarget: 'cell',
127
- FlashDuration: duration,
128
- Scope: {
129
- ColumnIds: [flashingCell.ColumnId],
130
- },
131
- UpChangeStyle: {
132
- BackColor: upColor,
133
- },
134
- DownChangeStyle: {
135
- BackColor: downColor,
136
- },
137
- };
138
- // this.api.alertApi.addFlashingAlertDefinition(flashingAlertDefinition);
139
- newAlertDefinitions.push(flashingAlertDefinition);
140
- LoggingHelper_1.LogAdaptableWarning(`Updating incorrect Predefined Config for Flashing Alert: ${flashingCell.ColumnId}`);
141
- }
142
- });
143
- // 4. Convert old Updated Rows into Flashing Alerts
144
- let updatedRowState = this.api.internalApi.getState().UpdatedRow;
145
- if (updatedRowState === null || updatedRowState === void 0 ? void 0 : updatedRowState.EnableUpdatedRow) {
146
- let flashingAlertDefinition = {
147
- Rule: {
148
- Predicate: ANY_PREDICATE,
149
- },
150
- FlashTarget: 'row',
151
- Scope: {
152
- All: true,
153
- },
154
- };
155
- if (updatedRowState.Duration) {
156
- flashingAlertDefinition.FlashDuration =
157
- updatedRowState.Duration == 'Always' ? 'always' : updatedRowState.Duration;
158
- }
159
- else {
160
- flashingAlertDefinition.FlashDuration = 'always';
161
- }
162
- if (updatedRowState.UpColor) {
163
- flashingAlertDefinition.UpChangeStyle = {
164
- BackColor: updatedRowState.UpColor,
165
- };
166
- }
167
- else {
168
- flashingAlertDefinition.UpChangeStyle = undefined;
169
- }
170
- if (updatedRowState.DownColor) {
171
- flashingAlertDefinition.DownChangeStyle = {
172
- BackColor: updatedRowState.DownColor,
173
- };
174
- }
175
- else {
176
- flashingAlertDefinition.DownChangeStyle = undefined;
177
- }
178
- if (updatedRowState.NeutralColor) {
179
- flashingAlertDefinition.NeutralChangeStyle = {
180
- BackColor: updatedRowState.NeutralColor,
181
- };
182
- }
183
- else {
184
- flashingAlertDefinition.NeutralChangeStyle = undefined;
185
- }
186
- newAlertDefinitions.push(flashingAlertDefinition);
187
- }
188
- this.api.alertApi.addFlashingAlertDefinitions(newAlertDefinitions);
189
- this.api.alertApi.editFlashingAlertDefinitions(oldAlertDefinitions);
190
- this.api.internalApi.clearUpdatedRowState();
191
- this.api.internalApi.clearFlashingCellState();
192
100
  }
193
101
  addColumnMenuItems(column) {
194
102
  if (column && this.isModuleEditable()) {
195
- if (!this.api.columnApi.isCalculatedColumn(column.ColumnId)) {
103
+ if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
196
104
  const flashingAlertDefinitions = this.api.alertApi.getFlashingAlertDefinitions();
197
105
  const flashingAlertForCurrentColumn = flashingAlertDefinitions.find((flashingAlertDefinition) => {
198
106
  return this.api.scopeApi.isColumnInScope(column, flashingAlertDefinition.Scope);
@@ -205,7 +113,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
205
113
  return [
206
114
  this.createColumnMenuItemReduxAction('Add Flashing Alert', this.moduleInfo.Glyph, AlertRedux.FlashingAlertDefinitionAdd({
207
115
  Scope: {
208
- ColumnIds: [column.ColumnId],
116
+ ColumnIds: [column.columnId],
209
117
  },
210
118
  Rule: {
211
119
  Predicate: { PredicateId: 'Any' },
@@ -229,7 +137,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
229
137
  }
230
138
  }
231
139
  const flashingAlertForRow = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue);
232
- const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.ColumnId);
140
+ const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
233
141
  if (flashingAlertForRow && flashingAlertForRow.flashTarget === 'row') {
234
142
  items.push(this.createColumnMenuItemReduxAction('Clear Flashing Alert for Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingAlertDelete(flashingAlertForRow)));
235
143
  }
@@ -272,12 +180,12 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
272
180
  showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
273
181
  alertDefinitions.forEach((alertDefinition) => {
274
182
  // might be better to do a single alert with all the messages?
275
- this.api.alertApi.showAlert(this.api.columnApi.getFriendlyNameFromColumnId(dataChangedInfo.columnId), this.api.alertApi.getAlertDescription(alertDefinition), alertDefinition, dataChangedInfo);
183
+ this.api.alertApi.showAlert(dataChangedInfo.column.friendlyName, this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
276
184
  });
277
185
  }
278
186
  showFlashingAlertsForDefinitions(dataChangedInfo, flashingAlertDefinitions = []) {
279
- const allColumnIds = this.api.columnApi.getColumns().map((c) => c.ColumnId);
280
- const columnDataType = this.api.columnApi.getColumnDataTypeFromColumnId(dataChangedInfo.columnId);
187
+ const allColumnIds = this.api.columnApi.getColumns().map((c) => c.columnId);
188
+ const columnDataType = dataChangedInfo.column.dataType;
281
189
  const numeric = columnDataType === 'Number';
282
190
  const isComparableType = numeric || columnDataType === 'Date';
283
191
  let up = false;
@@ -292,7 +200,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
292
200
  }
293
201
  flashingAlertDefinitions.forEach((flashingAlertDefinition) => {
294
202
  const flashTarget = this.api.alertApi.getFlashingAlertFlashTarget(flashingAlertDefinition);
295
- const flashColumnIds = { [dataChangedInfo.columnId]: true };
203
+ const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
296
204
  if (flashTarget === 'row') {
297
205
  allColumnIds.forEach((colId) => {
298
206
  flashColumnIds[colId] = true;
@@ -319,7 +227,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
319
227
  }
320
228
  getBaseAlertDefinitionsForDataChange(dataChangedEvent, definitions, defaultNoPredicateReturn = false) {
321
229
  let relatedAlertDefinitions = definitions
322
- .filter((v) => this.api.scopeApi.isColumnInScope(this.api.columnApi.getColumnFromId(dataChangedEvent.columnId), v.Scope))
230
+ .filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
323
231
  .filter((alertDefinition) => !AdaptableQuery_1.isReactiveQuery(alertDefinition.Rule));
324
232
  let triggeredAlerts = [];
325
233
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(relatedAlertDefinitions)) {
@@ -353,7 +261,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
353
261
  // TODO send real display value
354
262
  displayValue: null,
355
263
  node: dataChangedEvent.rowNode,
356
- column: this.api.columnApi.getColumnFromId(dataChangedEvent.columnId),
264
+ column: dataChangedEvent.column,
357
265
  }, defaultNoPredicateReturn);
358
266
  }
359
267
  getTeamSharingAction() {
@@ -1,12 +1,12 @@
1
1
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
2
  import { IBulkUpdateModule, BulkUpdateValidationResult } from './Interface/IBulkUpdateModule';
3
3
  import { PreviewInfo } from '../Utilities/Interface/Preview';
4
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
4
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
5
5
  import { AccessLevel, AdaptableApi } from '../types';
6
6
  export declare class BulkUpdateModule extends AdaptableModuleBase implements IBulkUpdateModule {
7
7
  constructor(api: AdaptableApi);
8
8
  getViewAccessLevel(): AccessLevel;
9
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
9
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
10
10
  checkCorrectCellSelection(): BulkUpdateValidationResult;
11
11
  buildPreviewValues(bulkUpdateValue: any): PreviewInfo;
12
12
  }
@@ -20,7 +20,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
20
20
  let menuItemShowPopup = undefined;
21
21
  if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
22
22
  if (menuContext.adaptableColumn &&
23
- !menuContext.adaptableColumn.ReadOnly &&
23
+ !menuContext.adaptableColumn.readOnly &&
24
24
  menuContext.isSelectedCell &&
25
25
  menuContext.isSingleSelectedColumn &&
26
26
  this.api.gridApi.areCellsEditable(menuContext.selectedCellInfo.gridCells)) {
@@ -70,7 +70,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
70
70
  };
71
71
  }
72
72
  let selectedColumn = selectedCellInfo.columns[0];
73
- if (selectedColumn && selectedColumn.ReadOnly) {
73
+ if (selectedColumn && selectedColumn.readOnly) {
74
74
  return {
75
75
  IsValid: false,
76
76
  Alert: {
@@ -99,12 +99,12 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
99
99
  return null;
100
100
  }
101
101
  let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
102
- let columnId = '';
102
+ let column;
103
103
  if (!this.api.internalApi.isGridInPivotMode()) {
104
104
  if (selectedCellInfo != null && selectedCellInfo.columns.length > 0) {
105
- columnId = selectedCellInfo.columns[0].ColumnId;
105
+ column = this.api.columnApi.getColumnFromId(selectedCellInfo.columns[0].columnId);
106
106
  let typedBulkUpdateValue;
107
- switch (selectedCellInfo.columns[0].DataType) {
107
+ switch (column.dataType) {
108
108
  case Enums_1.DataType.Number:
109
109
  typedBulkUpdateValue = Number(bulkUpdateValue);
110
110
  break;
@@ -119,7 +119,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
119
119
  const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
120
120
  oldValue: selectedCell.rawValue,
121
121
  newValue: typedBulkUpdateValue,
122
- columnId: selectedCell.columnId,
122
+ column: selectedCell.column,
123
123
  primaryKeyValue: selectedCell.primaryKeyValue,
124
124
  rowNode: selectedCell.rowNode,
125
125
  trigger: 'edit',
@@ -139,7 +139,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
139
139
  }
140
140
  }
141
141
  return {
142
- columnId: columnId,
142
+ column: column,
143
143
  previewResults: previewResults,
144
144
  previewValidationSummary: PreviewHelper_1.PreviewHelper.GetPreviewValidationSummary(previewResults),
145
145
  };
@@ -40,7 +40,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
40
40
  if (column && this.isModuleEditable()) {
41
41
  if (this.api.calculatedColumnApi
42
42
  .getAllCalculatedColumn()
43
- .find((cc) => cc.ColumnId == column.ColumnId)) {
43
+ .find((cc) => cc.ColumnId == column.columnId)) {
44
44
  let popupParam = {
45
45
  column: column,
46
46
  action: 'Edit',
@@ -1,13 +1,13 @@
1
1
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
2
  import { ICellSummaryModule } from './Interface/ICellSummaryModule';
3
3
  import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
4
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
4
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
5
5
  import { AdaptableApi } from '../Api/AdaptableApi';
6
6
  import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
7
7
  import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
8
8
  export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
9
9
  constructor(api: AdaptableApi);
10
10
  getViewAccessLevel(): AccessLevel;
11
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
11
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
12
12
  createCellSummary(selectedCellInfo: SelectedCellInfo): CellSummmary;
13
13
  }
@@ -38,14 +38,14 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
38
38
  let allValues = [];
39
39
  let numericColumns = [];
40
40
  selectedCellInfo.columns.map((c) => {
41
- if (c && c.DataType == Enums_1.DataType.Number) {
42
- numericColumns.push(c.ColumnId);
41
+ if (c && c.dataType == Enums_1.DataType.Number) {
42
+ numericColumns.push(c.columnId);
43
43
  }
44
44
  });
45
45
  selectedCellInfo.gridCells.forEach((selectedCell) => {
46
46
  let value = selectedCell.rawValue;
47
47
  allValues.push(value);
48
- if (ArrayExtensions_1.ArrayExtensions.ContainsItem(numericColumns, selectedCell.columnId)) {
48
+ if (ArrayExtensions_1.ArrayExtensions.ContainsItem(numericColumns, selectedCell.column.columnId)) {
49
49
  let valueAsNumber = Number(value);
50
50
  // possible that its not a number despite it being a numeric column
51
51
  if (!isNaN(Number(valueAsNumber))) {
@@ -22,7 +22,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
22
22
  else if (this.api.scopeApi.scopeHasColumns(conditionalStyle.Scope)) {
23
23
  return this.api.scopeApi
24
24
  .getColumnsForScope(conditionalStyle.Scope)
25
- .map((adaptableColumn) => adaptableColumn.ColumnId);
25
+ .map((adaptableColumn) => adaptableColumn.columnId);
26
26
  }
27
27
  return [];
28
28
  }
@@ -73,7 +73,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
73
73
  this.api.conditionalStyleApi.editConditionalStyles(oldConditionalStyles);
74
74
  }
75
75
  addColumnMenuItems(column) {
76
- if (column && this.isModuleEditable() && !column.IsSparkline) {
76
+ if (column && this.isModuleEditable() && !column.isSparkline) {
77
77
  let conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(column);
78
78
  let firstConditionalStyle = ArrayExtensions_1.default.IsNotNullOrEmpty(conditionalStyles)
79
79
  ? conditionalStyles.find((cs) => this.api.scopeApi.isColumnInScopeColumns(column, cs.Scope))
@@ -160,7 +160,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
160
160
  value: value,
161
161
  oldValue: null,
162
162
  displayValue: column
163
- ? this.api.gridApi.getDisplayValueFromRowNode(node, column.ColumnId)
163
+ ? this.api.gridApi.getDisplayValueFromRowNode(node, column.columnId)
164
164
  : value,
165
165
  node: node,
166
166
  column: column,
@@ -19,10 +19,10 @@ class CustomSortModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
19
  return false;
20
20
  }
21
21
  addColumnMenuItems(column) {
22
- if (column && this.isModuleEditable() && column.Sortable) {
22
+ if (column && this.isModuleEditable() && column.sortable) {
23
23
  let customSort = this.api.customSortApi
24
24
  .getAllCustomSort()
25
- .find((x) => x.ColumnId == column.ColumnId);
25
+ .find((x) => x.ColumnId == column.columnId);
26
26
  let label = customSort ? 'Edit ' : 'Create ';
27
27
  // dont show a menu item if there is a custom sort that uses a comparer function
28
28
  const columnSortComparer = this.api.internalApi.getCustomSortComparer(column);
@@ -1,5 +1,5 @@
1
1
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
- import { AdaptableMenuItem, MenuContext } from '../PredefinedConfig/Common/Menu';
2
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
3
3
  import { IModule } from './Interface/IModule';
4
4
  import { AdaptableApi } from '../Api/AdaptableApi';
5
5
  export declare class DashboardModule extends AdaptableModuleBase implements IModule {
@@ -8,6 +8,6 @@ export declare class DashboardModule extends AdaptableModuleBase implements IMod
8
8
  updateOldConfig(): void;
9
9
  handleAdaptableReady(): void;
10
10
  addColumnMenuItems(): AdaptableMenuItem[] | undefined;
11
- addContextMenuItems(menuContext: MenuContext): AdaptableMenuItem[] | undefined;
11
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
12
12
  private buildMenuItems;
13
13
  }
@@ -27,10 +27,10 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
27
27
  if (this.api.internalApi.getState().System.DataChangeHistory.currentMode !== 'ACTIVE') {
28
28
  return false;
29
29
  }
30
- if (this.api.internalApi.getAdaptableOptions().dataChangeHistoryOptions.filterDataChange) {
30
+ if (this.api.internalApi.getAdaptableOptions().dataChangeHistoryOptions.showDataChange) {
31
31
  return this.api.internalApi
32
32
  .getAdaptableOptions()
33
- .dataChangeHistoryOptions.filterDataChange(dataChangedInfo);
33
+ .dataChangeHistoryOptions.showDataChange(dataChangedInfo);
34
34
  }
35
35
  return true;
36
36
  }