@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
@@ -132,24 +132,35 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
132
132
  return adaptableSortState;
133
133
  }
134
134
  setAdaptableStateKey(adaptableStateKey, config) {
135
- this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
136
- const flushCurrentState = !config || config.flushCurrentState !== false;
137
- // make sure we persist any "pending" changes to state - since stateOptions.debounceStateDelay can cause
138
- // the state to be persisted with a delay, which we dont want in this case
139
- const flushStatePromise = flushCurrentState
140
- ? this.adaptable.adaptableStore.saveStateNow(this.adaptable)
141
- : Promise.resolve(true);
142
- return flushStatePromise.then(() => {
143
- let predefinedConfig = config === null || config === void 0 ? void 0 : config.predefinedConfig;
144
- if (predefinedConfig) {
145
- predefinedConfig = AdaptableHelper_1.initPredefinedConfigWithUuids(predefinedConfig);
146
- }
147
- const promise = this.adaptable.adaptableStore.loadStore(this.adaptable, adaptableStateKey, predefinedConfig);
148
- promise.then(() => {
149
- this.adaptable.prepareGrid();
150
- this.adaptable.api.internalApi.hideLoadingScreen();
135
+ return new Promise((resolve, reject) => {
136
+ this.adaptable.api.internalApi.executeWithProgressIndicator(`Initialising...`, () => {
137
+ this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
138
+ const flushCurrentState = !config || config.flushCurrentState !== false;
139
+ // make sure we persist any "pending" changes to state - since stateOptions.debounceStateDelay can cause
140
+ // the state to be persisted with a delay, which we dont want in this case
141
+ const flushStatePromise = flushCurrentState
142
+ ? this.adaptable.adaptableStore.saveStateNow(this.adaptable)
143
+ : Promise.resolve(true);
144
+ flushStatePromise.then(() => {
145
+ let predefinedConfig = config === null || config === void 0 ? void 0 : config.predefinedConfig;
146
+ if (predefinedConfig) {
147
+ predefinedConfig = AdaptableHelper_1.initPredefinedConfigWithUuids(predefinedConfig);
148
+ }
149
+ const promise = this.adaptable.adaptableStore.loadStore(this.adaptable, adaptableStateKey, predefinedConfig);
150
+ promise
151
+ .then(() => {
152
+ this.adaptable.prepareGrid();
153
+ this.adaptable.api.internalApi.hideLoadingScreen();
154
+ })
155
+ .then(() => {
156
+ // resolve main(result) promise
157
+ resolve();
158
+ }, () => {
159
+ // reject main(result) promise
160
+ reject();
161
+ });
162
+ });
151
163
  });
152
- return promise;
153
164
  });
154
165
  }
155
166
  getDescriptionForModule(module) {
@@ -168,18 +179,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
168
179
  return returnJson
169
180
  ? JSON.stringify(this.getAdaptableState().Application)
170
181
  : this.getAdaptableState().Application;
171
- case 'BulkUpdate':
172
- return returnJson
173
- ? JSON.stringify(this.getAdaptableState().BulkUpdate)
174
- : this.getAdaptableState().BulkUpdate;
175
182
  case 'CalculatedColumn':
176
183
  return returnJson
177
184
  ? JSON.stringify(this.getAdaptableState().CalculatedColumn)
178
185
  : this.getAdaptableState().CalculatedColumn;
179
- case 'CellSummary':
180
- return returnJson
181
- ? JSON.stringify(this.getAdaptableState().SelectedCells)
182
- : this.getAdaptableState().CellSummary;
183
186
  case 'Chart':
184
187
  return returnJson
185
188
  ? JSON.stringify(this.getAdaptableState().Chart)
@@ -200,10 +203,6 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
200
203
  return returnJson
201
204
  ? JSON.stringify(this.getAdaptableState().DataSource)
202
205
  : this.getAdaptableState().DataSource;
203
- case 'Entitlement':
204
- return returnJson
205
- ? JSON.stringify(this.getAdaptableState().Entitlements)
206
- : this.getAdaptableState().Entitlements;
207
206
  case 'Export':
208
207
  return returnJson
209
208
  ? JSON.stringify(this.getAdaptableState().Export)
@@ -244,18 +243,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
244
243
  return returnJson
245
244
  ? JSON.stringify(this.getAdaptableState().Shortcut)
246
245
  : this.getAdaptableState().Shortcut;
247
- case 'SmartEdit':
248
- return returnJson
249
- ? JSON.stringify(this.getAdaptableState().SmartEdit)
250
- : this.getAdaptableState().SmartEdit;
251
246
  case 'SparklineColumn':
252
247
  return returnJson
253
248
  ? JSON.stringify(this.getAdaptableState().SparklineColumn)
254
249
  : this.getAdaptableState().SparklineColumn;
255
- case 'SystemStatus':
256
- return returnJson
257
- ? JSON.stringify(this.getAdaptableState().SystemStatus)
258
- : this.getAdaptableState().SystemStatus;
259
250
  case 'Theme':
260
251
  return returnJson
261
252
  ? JSON.stringify(this.getAdaptableState().Theme)
@@ -264,10 +255,6 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
264
255
  return returnJson
265
256
  ? JSON.stringify(this.getAdaptableState().ToolPanel)
266
257
  : this.getAdaptableState().ToolPanel;
267
- case 'UserInterface':
268
- return returnJson
269
- ? JSON.stringify(this.getAdaptableState().UserInterface)
270
- : this.getAdaptableState().UserInterface;
271
258
  }
272
259
  }
273
260
  incrementUerStateRevision(stateKey) {
@@ -18,6 +18,7 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
18
18
  // so we debounced to only get tha latest call
19
19
  this.fireDashboardChangedEvent = (trigger, oldDashboardState, newDashboardState) => {
20
20
  const dashboardChangedInfo = {
21
+ adaptableApi: this.adaptable.api,
21
22
  actionName: trigger,
22
23
  oldDashboardState: oldDashboardState,
23
24
  newDashboardState: newDashboardState,
@@ -39,7 +40,7 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
39
40
  getCustomDashboardButtonByLabel(buttonLabel) {
40
41
  const api = this.getAdaptableApi();
41
42
  const dashboardContext = {
42
- api,
43
+ adaptableApi: api,
43
44
  dashboardState: api.dashboardApi.getDashboardState(),
44
45
  };
45
46
  return this.getDashboardOptions().customDashboardButtons.find((cb) => {
@@ -103,7 +103,6 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
103
103
  if (report.ReportRowScope == 'CustomRows' || report.ReportColumnScope == 'CustomColumns') {
104
104
  return false;
105
105
  }
106
- let abColumn = this.adaptable.api.columnApi.getColumnFromId(dataChangedInfo.columnId);
107
106
  // Start with the DataChanged Column and go through all possibilities
108
107
  switch (report.ReportColumnScope) {
109
108
  case 'AllColumns':
@@ -111,21 +110,22 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
111
110
  break;
112
111
  case 'ScopeColumns':
113
112
  // use the Scope object which will tell us if the Column is relevant
114
- if (!this.adaptable.api.scopeApi.isColumnInScopeColumns(abColumn, report.Scope)) {
113
+ if (!this.adaptable.api.scopeApi.isColumnInScopeColumns(dataChangedInfo.column, report.Scope)) {
115
114
  return false;
116
115
  }
117
116
  break;
118
117
  case 'SelectedColumns':
119
118
  let selectedCellInfo = this.adaptable.api.gridApi.getSelectedCellInfo();
120
119
  if (selectedCellInfo) {
121
- if (selectedCellInfo.columns.find((c) => c.ColumnId == dataChangedInfo.columnId) == null) {
120
+ if (selectedCellInfo.columns.find((c) => c.columnId == dataChangedInfo.column.columnId) ==
121
+ null) {
122
122
  return false;
123
123
  }
124
124
  }
125
125
  break;
126
126
  case 'VisibleColumns':
127
127
  // hope that visibile column property is updated whenever the layout changes... (need to check!)
128
- if (!abColumn.Visible) {
128
+ if (!dataChangedInfo.column.visible) {
129
129
  return false;
130
130
  }
131
131
  break;
@@ -243,7 +243,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
243
243
  }
244
244
  getCheckBoxStyleFormatColumn(column) {
245
245
  var _a;
246
- if (column.DataType != 'Boolean') {
246
+ if (column.dataType != 'Boolean') {
247
247
  return undefined;
248
248
  }
249
249
  const checkBoxFormatColumns = (_a = this.getFormatColumnState().FormatColumns) === null || _a === void 0 ? void 0 : _a.filter((fc) => { var _a; return (_a = fc.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle; });
@@ -256,6 +256,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
256
256
  }
257
257
  fireCheckboxColumnClickedEvent(columnId, rowData, primaryKeyValue, isChecked) {
258
258
  let checkboxColumnClickedInfo = {
259
+ adaptableApi: this.adaptable.api,
259
260
  column: this.adaptable.api.columnApi.getColumnFromId(columnId),
260
261
  rowData: rowData,
261
262
  primaryKeyValue: primaryKeyValue,
@@ -68,7 +68,8 @@ class FreeTextColumnApiImpl extends ApiBase_1.ApiBase {
68
68
  }
69
69
  }
70
70
  createFreeTextColumn({ columnName, columnId, defaultValue = null, }) {
71
- let freeTextColumn = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn();
71
+ let freeTextColumn = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn(this.adaptable.api.internalApi.getAdaptableOptions().filterOptions
72
+ .enableFilterOnSpecialColumns);
72
73
  freeTextColumn.ColumnId = columnId;
73
74
  freeTextColumn.FriendlyName = columnName || columnId;
74
75
  freeTextColumn.DefaultValue = defaultValue;
@@ -103,14 +104,19 @@ class FreeTextColumnApiImpl extends ApiBase_1.ApiBase {
103
104
  }
104
105
  }
105
106
  checkFreeTextColumnForDataChange(dataChangedInfo) {
106
- let freeTextColumn = this.getAllFreeTextColumn().find((fc) => fc.ColumnId == dataChangedInfo.columnId);
107
+ let freeTextColumn = this.getAllFreeTextColumn().find((fc) => fc.ColumnId == dataChangedInfo.column.columnId);
107
108
  if (freeTextColumn) {
108
109
  let freeTextStoredValue = {
109
110
  PrimaryKey: dataChangedInfo.primaryKeyValue,
110
111
  FreeText: dataChangedInfo.newValue,
111
112
  };
112
113
  this.addEditFreeTextColumnStoredValue(freeTextColumn, freeTextStoredValue);
113
- this.adaptable.refreshCells([dataChangedInfo.rowNode], [dataChangedInfo.columnId], false);
114
+ var colsToRefresh = [dataChangedInfo.column.columnId];
115
+ const refencedCalcColumns = this.adaptable.api.calculatedColumnApi.getCalculatedColumnsReferencingColumnId(dataChangedInfo.column.columnId);
116
+ refencedCalcColumns.forEach((calculatedColumn) => {
117
+ colsToRefresh.push(calculatedColumn.ColumnId);
118
+ });
119
+ this.adaptable.refreshCells([dataChangedInfo.rowNode], colsToRefresh, false);
114
120
  }
115
121
  }
116
122
  getFreeTextColumnModuleReferences(freeTextColumn) {
@@ -8,17 +8,24 @@ import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
8
8
  import { DataUpdateConfig } from '../../PredefinedConfig/Common/DataUpdateConfig';
9
9
  import { DataChangedInfo, AccessLevel, AdaptableModule } from '../../types';
10
10
  import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
11
- import { RowNode } from '@ag-grid-community/all-modules';
11
+ import { GridOptions, RowNode } from '@ag-grid-community/all-modules';
12
12
  import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
13
13
  export declare class GridApiImpl extends ApiBase implements GridApi {
14
14
  getGridState(): GridState;
15
15
  setGridData(dataSource: any): void;
16
+ getGridData(): any[];
17
+ getFilteredData(): any[];
16
18
  loadGridData(dataSource: any): void;
17
19
  updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): void;
18
20
  addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): void;
19
21
  undoCellEdit(dataChangedInfo: DataChangedInfo): boolean;
20
22
  deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): void;
21
23
  setCellValue(columnId: string, newValue: any, primaryKeyValue: any): void;
24
+ setCellsValue(gridCells: {
25
+ columnId: any;
26
+ newValue: any;
27
+ primaryKeyValue: any;
28
+ }[]): void;
22
29
  getSelectedCellInfo(): SelectedCellInfo;
23
30
  getSelectedRowInfo(): SelectedRowInfo;
24
31
  getCellDisplayValue(primaryKeyValue: any, columnId: string): any | undefined;
@@ -27,7 +34,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
27
34
  hideFilterForm(): void;
28
35
  applyGridFiltering(): void;
29
36
  clearGridFiltering(): void;
30
- getVendorGrid(): any;
37
+ getAgGridInstance(): GridOptions;
31
38
  getColumnSorts(): ColumnSort[];
32
39
  getColumnSortForColumn(columnId: string): ColumnSort | undefined;
33
40
  setAdaptableSorting(columnSorts: ColumnSort[]): void;
@@ -76,6 +83,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
76
83
  unhighlightCell(cellHighlightInfo: CellHighlightInfo): void;
77
84
  unhighlightAllCells(): void;
78
85
  refreshCells(rowNodes: RowNode[], columnIds: string[]): void;
86
+ refreshRow(primaryKey: string): void;
79
87
  areCellsEditable(gridCells: GridCell[]): boolean;
80
88
  getRowCount(): number;
81
89
  getVisibleRowCount(): number;
@@ -85,4 +93,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
85
93
  selectAll(): void;
86
94
  deselectAll(): void;
87
95
  destroy(): void;
96
+ getGridContainerElement(): HTMLElement | null;
88
97
  }
@@ -12,6 +12,12 @@ class GridApiImpl extends ApiBase_1.ApiBase {
12
12
  setGridData(dataSource) {
13
13
  this.adaptable.setDataSource(dataSource);
14
14
  }
15
+ getGridData() {
16
+ return this.adaptable.getGridData();
17
+ }
18
+ getFilteredData() {
19
+ return this.adaptable.getFilteredData();
20
+ }
15
21
  loadGridData(dataSource) {
16
22
  this.adaptable.loadDataSource(dataSource);
17
23
  }
@@ -26,7 +32,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
26
32
  undoCellEdit(dataChangedInfo) {
27
33
  // for the reason of this hacky solution see the comments in DataService
28
34
  this.adaptable.api.internalApi.getDataService().logUndoChange(dataChangedInfo);
29
- this.setCellValue(dataChangedInfo.columnId, dataChangedInfo.oldValue, dataChangedInfo.primaryKeyValue);
35
+ this.setCellValue(dataChangedInfo.column.columnId, dataChangedInfo.oldValue, dataChangedInfo.primaryKeyValue);
30
36
  return true;
31
37
  }
32
38
  deleteGridData(dataRows, dataUpdateConfig) {
@@ -36,20 +42,23 @@ class GridApiImpl extends ApiBase_1.ApiBase {
36
42
  }
37
43
  }
38
44
  setCellValue(columnId, newValue, primaryKeyValue) {
39
- let gridCell = {
45
+ const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
46
+ if (!abColumn || abColumn.readOnly) {
47
+ return;
48
+ }
49
+ const gridCell = {
40
50
  primaryKeyValue: primaryKeyValue,
41
- columnId: columnId,
42
51
  rawValue: newValue,
43
52
  displayValue: newValue,
44
53
  normalisedValue: newValue,
45
54
  rowNode: this.getRowNodeForPrimaryKey(primaryKeyValue),
55
+ column: abColumn,
46
56
  };
47
- const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
48
- if (!abColumn || abColumn.ReadOnly) {
49
- return;
50
- }
51
57
  this.adaptable.api.internalApi.setGridCell(gridCell);
52
58
  }
59
+ setCellsValue(gridCells) {
60
+ gridCells === null || gridCells === void 0 ? void 0 : gridCells.forEach((gridCell) => this.setCellValue(gridCell.columnId, gridCell.newValue, gridCell.primaryKeyValue));
61
+ }
53
62
  getSelectedCellInfo() {
54
63
  return this.getGridState().SelectedCellInfo;
55
64
  }
@@ -78,7 +87,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
78
87
  // slightly round the houses but we have to call FilterAPI as it does it properly
79
88
  this.adaptable.api.filterApi.clearAllColumnFilter();
80
89
  }
81
- getVendorGrid() {
90
+ getAgGridInstance() {
82
91
  return this.adaptable.adaptableOptions.vendorGrid;
83
92
  }
84
93
  getColumnSorts() {
@@ -161,7 +170,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
161
170
  return gridCell ? gridCell.displayValue : undefined;
162
171
  }
163
172
  getFormattedValueFromRawValue(columnId, rawValue) {
164
- return this.adaptable.getDisplayValueFromRawValue(columnId, rawValue, true);
173
+ return this.adaptable.getDisplayValueFromRawValue(columnId, rawValue);
165
174
  }
166
175
  getNormalisedValueFromRowNode(rowNode, columnId) {
167
176
  const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
@@ -221,6 +230,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
221
230
  const adaptableSearchState = this.adaptable.api.configApi.getAdaptableSearchState();
222
231
  const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
223
232
  const searchChangedInfo = {
233
+ adaptableApi: this.adaptable.api,
224
234
  searchChangedTrigger,
225
235
  adaptableSearchState: adaptableSearchState,
226
236
  adaptableSortState: adaptableSortState,
@@ -231,6 +241,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
231
241
  fireCellChangedEvent(dataChangedInfo) {
232
242
  if (this.adaptable.isInitialised) {
233
243
  const cellChangedInfo = {
244
+ adaptableApi: this.adaptable.api,
234
245
  cellChange: dataChangedInfo,
235
246
  };
236
247
  this.adaptable.api.eventApi.emit('CellChanged', cellChangedInfo);
@@ -239,6 +250,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
239
250
  fireGridDataChangedEvent(dataRows, rowTigger) {
240
251
  if (this.adaptable.isInitialised) {
241
252
  const gridDataChangedInfo = {
253
+ adaptableApi: this.adaptable.api,
242
254
  rowTigger: rowTigger,
243
255
  dataRows: dataRows,
244
256
  };
@@ -273,19 +285,21 @@ class GridApiImpl extends ApiBase_1.ApiBase {
273
285
  refreshCells(rowNodes, columnIds) {
274
286
  this.adaptable.refreshCells(rowNodes, columnIds, true);
275
287
  }
288
+ refreshRow(primaryKey) {
289
+ const rowNode = this.getRowNodeForPrimaryKey(primaryKey);
290
+ this.adaptable.redrawRow(rowNode);
291
+ }
276
292
  areCellsEditable(gridCells) {
277
293
  let returnValue = true;
278
294
  gridCells.forEach((gridCell) => {
279
295
  if (returnValue) {
280
- let abColumn = this.adaptable.api.columnApi.getColumnFromId(gridCell.columnId);
281
- if (abColumn.ReadOnly) {
296
+ if (gridCell.column.readOnly) {
282
297
  returnValue = false;
283
298
  return;
284
299
  }
285
300
  let cellEditableFn = this.adaptable.adaptableOptions.editOptions.isCellEditable;
286
301
  if (cellEditableFn) {
287
- let rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(gridCell.primaryKeyValue);
288
- let functionReturnValue = cellEditableFn(gridCell, rowNode);
302
+ let functionReturnValue = cellEditableFn(gridCell);
289
303
  if (!functionReturnValue) {
290
304
  returnValue = false;
291
305
  }
@@ -318,5 +332,8 @@ class GridApiImpl extends ApiBase_1.ApiBase {
318
332
  destroy() {
319
333
  this.adaptable.destroy();
320
334
  }
335
+ getGridContainerElement() {
336
+ return this.adaptable.getAgGridContainerElement();
337
+ }
321
338
  }
322
339
  exports.GridApiImpl = GridApiImpl;
@@ -73,14 +73,14 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
73
73
  setGridCells(gridCells: GridCell[]): void;
74
74
  setToolbarTitle(): string;
75
75
  setGridCell(gridCell: GridCell): void;
76
- buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | 'columnId' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): DataChangedInfo;
76
+ buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): DataChangedInfo;
77
77
  private createDataChangedInfoFromGridCell;
78
78
  setLastAppliedShortCut(gridCell: GridCell | undefined): void;
79
79
  updateCurrentDraftLayout(layout: Layout): void;
80
80
  setDefaultDashboardTab(): void;
81
81
  getPrimaryKey(): any;
82
82
  getAdaptableInstance(): IAdaptable;
83
- getVendorGridInstance(): any;
83
+ getAgGridInstance(): any;
84
84
  getPredefinedConfig(): any;
85
85
  getState(): AdaptableState;
86
86
  getAdaptableOptions(): AdaptableOptions;
@@ -113,5 +113,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
113
113
  destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
114
114
  initializeDataChangeHistory(): void;
115
115
  isTextComparisonCaseSensitive(): boolean;
116
+ executeWithProgressIndicator(label: string, executeFn: () => void): void;
117
+ hideProgressIndicator(): void;
116
118
  dispatchReduxAction(action: Action): void;
117
119
  }
@@ -144,7 +144,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
144
144
  this.dispatchAction(GridRedux.GridAddColumns(AdaptableColumns));
145
145
  }
146
146
  removeAdaptableColumn(colId) {
147
- const col = this.getAdaptableState().Grid.Columns.find((c) => c.ColumnId === colId);
147
+ const col = this.getAdaptableState().Grid.Columns.find((c) => c.columnId === colId);
148
148
  if (col) {
149
149
  this.dispatchAction(GridRedux.GridRemoveColumn(col));
150
150
  }
@@ -175,12 +175,12 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
175
175
  return Object.assign(Object.assign({}, config), { rowData: (_a = config.rowNode) === null || _a === void 0 ? void 0 : _a.data, changedAt: Date.now() });
176
176
  }
177
177
  createDataChangedInfoFromGridCell(gridCell) {
178
- let currentValue = this.adaptable.getDisplayValue(gridCell.primaryKeyValue, gridCell.columnId);
178
+ let currentValue = this.adaptable.getDisplayValue(gridCell.primaryKeyValue, gridCell.column.columnId);
179
179
  const currentRowNode = this.adaptable.getRowNodeForPrimaryKey(gridCell.primaryKeyValue);
180
180
  const dataChangedInfo = this.buildDataChangedInfo({
181
181
  oldValue: currentValue,
182
182
  newValue: gridCell.rawValue,
183
- columnId: gridCell.columnId,
183
+ column: gridCell.column,
184
184
  primaryKeyValue: gridCell.primaryKeyValue,
185
185
  rowNode: currentRowNode,
186
186
  });
@@ -205,7 +205,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
205
205
  getAdaptableInstance() {
206
206
  return this.adaptable;
207
207
  }
208
- getVendorGridInstance() {
208
+ getAgGridInstance() {
209
209
  return this.adaptable.adaptableOptions.vendorGrid;
210
210
  }
211
211
  getPredefinedConfig() {
@@ -272,7 +272,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
272
272
  }
273
273
  getCustomSortComparer(column) {
274
274
  var _a;
275
- return (_a = this.getGeneralOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => csc.columnId == column.ColumnId);
275
+ return (_a = this.getGeneralOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.adaptable.api.scopeApi.isColumnInScope(column, csc.scope));
276
276
  }
277
277
  getLabelForButton(button, context) {
278
278
  if (!button.label) {
@@ -394,6 +394,22 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
394
394
  isTextComparisonCaseSensitive() {
395
395
  return this.adaptable.adaptableOptions.generalOptions.caseSensitiveTextComparisons;
396
396
  }
397
+ executeWithProgressIndicator(label, executeFn) {
398
+ this.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorShow(label));
399
+ // setTimeout required to give the ProgressIndicator rendering a head-start (see RAF in ProgressIndicator implementation)
400
+ setTimeout(() => {
401
+ try {
402
+ executeFn();
403
+ }
404
+ catch (error) {
405
+ this.hideProgressIndicator();
406
+ LoggingHelper_1.LogAdaptableError('Unexpected error while executing a function with a progress indicator', error);
407
+ }
408
+ }, 16);
409
+ }
410
+ hideProgressIndicator() {
411
+ this.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorHide());
412
+ }
397
413
  // General way to get to store from inside Adaptable...
398
414
  dispatchReduxAction(action) {
399
415
  this.dispatchAction(action);
@@ -21,10 +21,12 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
21
21
  createLayout(layoutToCreate: Layout): Layout | undefined;
22
22
  cloneAndSetLayout(layoutToClone: Layout, layoutName: string): Layout;
23
23
  cloneLayout(layoutToClone: Layout, layoutName: string): Layout;
24
+ setColumnCaption(columnId: string, caption: string): void;
24
25
  saveLayout(layoutToSave: Layout): void;
25
26
  areLayoutsEqual(layout1: Layout, layout2: Layout): boolean;
26
27
  getLayoutDescription(layout: Layout): string;
27
28
  private getColumnSort;
28
29
  createDefaultLayoutIfNeeded(): Layout | null;
29
30
  showLayoutPopup(): void;
31
+ isCurrentLayoutReadOnly(): boolean;
30
32
  }
@@ -50,6 +50,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
50
50
  }
51
51
  fireLayoutChangedEvent(trigger, oldSate, newState) {
52
52
  const layoutChangedInfo = {
53
+ adaptableApi: this.adaptable.api,
53
54
  actionName: trigger,
54
55
  oldLayoutState: oldSate,
55
56
  newLayoutState: newState,
@@ -138,6 +139,14 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
138
139
  this.dispatchAction(LayoutRedux.LayoutAdd(newLayout));
139
140
  return this.getLayoutById(newLayout.Uuid);
140
141
  }
142
+ setColumnCaption(columnId, caption) {
143
+ if (StringExtensions_1.default.IsNotNullOrEmpty(columnId) && StringExtensions_1.default.IsNotNullOrEmpty(caption)) {
144
+ const currentLayoutName = this.getCurrentLayoutName();
145
+ if (StringExtensions_1.default.IsNotNullOrEmpty(currentLayoutName)) {
146
+ this.dispatchAction(LayoutRedux.LayoutSetColumnCaption(currentLayoutName, columnId, caption));
147
+ }
148
+ }
149
+ }
141
150
  saveLayout(layoutToSave) {
142
151
  if (!this.doesLayoutExist(layoutToSave)) {
143
152
  this.addUidToAdaptableObject(layoutToSave);
@@ -188,9 +197,9 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
188
197
  let gridState = this.getAdaptableApi().gridApi.getGridState();
189
198
  let layoutState = this.getLayoutState();
190
199
  const isLayoutDefined = (layoutName) => !!layoutState.Layouts.filter((layout) => layout.Name === layoutName)[0];
191
- let defaultLayoutColumns = gridState.Columns.filter((column) => column.Visible);
200
+ let defaultLayoutColumns = gridState.Columns.filter((column) => column.visible);
192
201
  const columnsMap = gridState.Columns.reduce((acc, col) => {
193
- acc[col.ColumnId] = col;
202
+ acc[col.columnId] = col;
194
203
  return acc;
195
204
  }, {});
196
205
  let shouldCreateDefaultLayout = this.getLayoutOptions().createDefaultLayout;
@@ -201,7 +210,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
201
210
  if (!layoutState.Layouts || !isLayoutDefined(GeneralConstants_1.DEFAULT_LAYOUT)) {
202
211
  let defaultLayout = ObjectFactory_1.default.CreateEmptyLayout({
203
212
  Name: GeneralConstants_1.DEFAULT_LAYOUT,
204
- Columns: defaultLayoutColumns.map((c) => c.ColumnId),
213
+ Columns: defaultLayoutColumns.map((c) => c.columnId),
205
214
  }, gridState.Columns);
206
215
  this.saveLayout(defaultLayout);
207
216
  return defaultLayout;
@@ -211,5 +220,12 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
211
220
  showLayoutPopup() {
212
221
  this.showModulePopup(ModuleConstants.LayoutModuleId);
213
222
  }
223
+ isCurrentLayoutReadOnly() {
224
+ const currentLayout = this.getCurrentLayout();
225
+ if (currentLayout) {
226
+ return currentLayout.IsReadOnly;
227
+ }
228
+ return true;
229
+ }
214
230
  }
215
231
  exports.LayoutApiImpl = LayoutApiImpl;
@@ -11,8 +11,8 @@ export declare class PluginsApiImpl extends ApiBase implements PluginsApi {
11
11
  getPluginState(pluginId: string): any;
12
12
  registerPlugin(pluginId: string, initialPluginState: any): void;
13
13
  setPluginState(pluginId: string, newPluginState: any): void;
14
- getPluginApi(pluginId: string): any | IPushPullApi | Glue42Api | OpenFinApi | FinanceApi | ChartApi;
15
- getIpushpullPluginApi(): IPushPullApi;
14
+ private getPluginApi;
15
+ getipushpullPluginApi(): IPushPullApi;
16
16
  getGlue42PluginApi(): Glue42Api;
17
17
  getOpenFinPluginApi(): OpenFinApi;
18
18
  getChartsPluginApi(): ChartApi;
@@ -41,7 +41,7 @@ class PluginsApiImpl extends ApiBase_1.ApiBase {
41
41
  return null;
42
42
  }
43
43
  }
44
- getIpushpullPluginApi() {
44
+ getipushpullPluginApi() {
45
45
  return this.getPluginApi('ipushpull');
46
46
  }
47
47
  getGlue42PluginApi() {
@@ -76,7 +76,7 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
76
76
  return this.getScheduleById(schedule.Uuid);
77
77
  }
78
78
  getAllIPushPullSchedule() {
79
- const ippApi = this.adaptable.api.pluginsApi.getPluginApi('ipushpull');
79
+ const ippApi = this.adaptable.api.pluginsApi.getipushpullPluginApi();
80
80
  return ippApi ? ippApi.getIPushPullSchedules() : [];
81
81
  }
82
82
  getAllActiveIPushPullSchedule() {
@@ -105,7 +105,7 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
105
105
  return this.getScheduleById(schedule.Uuid);
106
106
  }
107
107
  getAllGlue42Schedule() {
108
- const glue42Api = this.adaptable.api.pluginsApi.getPluginApi('glue42');
108
+ const glue42Api = this.adaptable.api.pluginsApi.getGlue42PluginApi();
109
109
  return glue42Api ? glue42Api.getGlue42Schedules() : [];
110
110
  }
111
111
  getAllActiveGlue42Schedule() {
@@ -134,7 +134,7 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
134
134
  return this.getScheduleById(schedule.Uuid);
135
135
  }
136
136
  getAllOpenFinSchedule() {
137
- const openFinApi = this.adaptable.api.pluginsApi.getPluginApi('openfin');
137
+ const openFinApi = this.adaptable.api.pluginsApi.getOpenFinPluginApi();
138
138
  return openFinApi ? openFinApi.getOpenFinSchedules() : [];
139
139
  }
140
140
  getAllActiveOpenFinSchedule() {
@@ -185,7 +185,7 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
185
185
  this.adaptable.api.exportApi.sendReport(reportSchedule.ReportName, reportSchedule.ExportDestination);
186
186
  }
187
187
  else if (scheduleType == 'ipushpull') {
188
- const ippApi = this.adaptable.api.pluginsApi.getPluginApi('ipushpull');
188
+ const ippApi = this.adaptable.api.pluginsApi.getipushpullPluginApi();
189
189
  const iPushPullSchedule = schedule;
190
190
  if (iPushPullSchedule.Transmission == 'Snapshot') {
191
191
  ippApi.sendSnapshot(iPushPullSchedule.IPushPullReport);
@@ -195,12 +195,12 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
195
195
  }
196
196
  }
197
197
  else if (scheduleType == 'Glue42') {
198
- const glue42Api = this.adaptable.api.pluginsApi.getPluginApi('glue42');
198
+ const glue42Api = this.adaptable.api.pluginsApi.getGlue42PluginApi();
199
199
  const glue42Schedule = schedule;
200
200
  glue42Api.sendSnapshotToDo(glue42Schedule.Glue42Report);
201
201
  }
202
202
  else if (scheduleType == 'OpenFin') {
203
- const openFinApi = this.adaptable.api.pluginsApi.getPluginApi('openfin');
203
+ const openFinApi = this.adaptable.api.pluginsApi.getOpenFinPluginApi();
204
204
  const openFinSchedule = schedule;
205
205
  openFinApi.startLiveData(openFinSchedule.OpenFinReport);
206
206
  }