@adaptabletools/adaptable-cjs 19.2.3 → 20.0.0-canary.0

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 (1666) hide show
  1. package/agGrid.d.ts +1 -1
  2. package/base.css +3903 -1294
  3. package/base.css.map +1 -1
  4. package/index.css +2967 -2120
  5. package/index.css.map +1 -1
  6. package/package.json +17 -16
  7. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +28 -32
  9. package/src/AdaptableOptions/ActionColumnOptions.d.ts +17 -4
  10. package/src/AdaptableOptions/AdaptableOptions.d.ts +14 -31
  11. package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -2
  12. package/src/AdaptableOptions/AlertOptions.d.ts +6 -6
  13. package/src/AdaptableOptions/CellSummaryOptions.d.ts +9 -4
  14. package/src/AdaptableOptions/ColumnMenuOptions.d.ts +4 -3
  15. package/src/AdaptableOptions/ColumnOptions.d.ts +5 -1
  16. package/src/AdaptableOptions/ContextMenuOptions.d.ts +13 -9
  17. package/src/AdaptableOptions/DashboardOptions.d.ts +12 -8
  18. package/src/AdaptableOptions/DataImportOptions.d.ts +1 -1
  19. package/src/AdaptableOptions/DefaultAdaptableOptions.d.ts +1 -1
  20. package/src/AdaptableOptions/DefaultAdaptableOptions.js +233 -250
  21. package/src/AdaptableOptions/EditOptions.d.ts +27 -1
  22. package/src/AdaptableOptions/ExportOptions.d.ts +128 -55
  23. package/src/AdaptableOptions/ExpressionOptions.d.ts +3 -7
  24. package/src/AdaptableOptions/Fdc3Options.d.ts +7 -1
  25. package/src/AdaptableOptions/FilterOptions.d.ts +219 -0
  26. package/src/AdaptableOptions/FormatColumnOptions.d.ts +1 -1
  27. package/src/AdaptableOptions/LayoutOptions.d.ts +4 -45
  28. package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +1 -1
  29. package/src/AdaptableOptions/PredicateOptions.d.ts +6 -0
  30. package/src/AdaptableOptions/QuickSearchOptions.d.ts +11 -28
  31. package/src/AdaptableOptions/RowFormOptions.d.ts +116 -0
  32. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -3
  33. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
  34. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +13 -121
  35. package/src/Api/ActionColumnApi.d.ts +5 -0
  36. package/src/Api/AdaptableApi.d.ts +10 -19
  37. package/src/Api/AlertApi.d.ts +2 -2
  38. package/src/Api/CalculatedColumnApi.d.ts +4 -0
  39. package/src/Api/CellSummaryApi.d.ts +6 -6
  40. package/src/Api/ChartingApi.d.ts +1 -1
  41. package/src/Api/ColumnApi.d.ts +41 -65
  42. package/src/Api/ColumnFilterApi.d.ts +3 -3
  43. package/src/Api/ColumnMenuApi.d.ts +62 -0
  44. package/src/Api/ColumnScopeApi.d.ts +1 -1
  45. package/src/Api/CommentApi.d.ts +4 -4
  46. package/src/Api/ConfigApi.d.ts +1 -3
  47. package/src/Api/ContextMenuApi.d.ts +62 -0
  48. package/src/Api/DashboardApi.d.ts +1 -1
  49. package/src/Api/EventApi.d.ts +22 -22
  50. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  51. package/src/Api/Events/AdaptableStateChanged.d.ts +2 -10
  52. package/src/Api/Events/AdaptableStateReloaded.d.ts +2 -6
  53. package/src/Api/Events/AlertFired.d.ts +2 -2
  54. package/src/Api/Events/CalculatedColumnChanged.d.ts +2 -2
  55. package/src/Api/Events/CellChanged.d.ts +3 -3
  56. package/src/Api/Events/CellSelectionChanged.d.ts +2 -2
  57. package/src/Api/Events/ChartChanged.d.ts +2 -3
  58. package/src/Api/Events/ColumnFilterApplied.d.ts +2 -3
  59. package/src/Api/Events/CommentChanged.d.ts +2 -3
  60. package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -2
  61. package/src/Api/Events/DashboardChanged.d.ts +2 -2
  62. package/src/Api/Events/DataImported.d.ts +3 -3
  63. package/src/Api/Events/DataSetSelected.d.ts +2 -3
  64. package/src/Api/Events/Fdc3MessageInfo.d.ts +3 -3
  65. package/src/Api/Events/FlashingCellDisplayed.d.ts +2 -2
  66. package/src/Api/Events/GridFilterApplied.d.ts +2 -3
  67. package/src/Api/Events/GridSorted.d.ts +3 -17
  68. package/src/Api/Events/LayoutChanged.d.ts +2 -2
  69. package/src/Api/Events/LiveDataChanged.d.ts +2 -2
  70. package/src/Api/Events/RowChanged.d.ts +11 -0
  71. package/src/Api/Events/RowFormSubmitted.d.ts +54 -0
  72. package/src/Api/Events/RowSelectionChanged.d.ts +2 -2
  73. package/src/Api/Events/ScheduleTriggered.d.ts +2 -2
  74. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -2
  75. package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -2
  76. package/src/Api/Events/ThemeChanged.d.ts +2 -2
  77. package/src/Api/ExportApi.d.ts +75 -69
  78. package/src/Api/ExpressionApi.d.ts +2 -2
  79. package/src/Api/Fdc3Api.d.ts +1 -9
  80. package/src/Api/FilterApi.d.ts +18 -0
  81. package/src/Api/FormatColumnApi.d.ts +7 -2
  82. package/src/Api/FreeTextColumnApi.d.ts +1 -1
  83. package/src/Api/GridApi.d.ts +51 -35
  84. package/src/Api/GridFilterApi.d.ts +1 -2
  85. package/src/Api/IPushPullApi.d.ts +1 -1
  86. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +5 -2
  87. package/src/Api/Implementation/ActionColumnApiImpl.js +8 -31
  88. package/src/Api/Implementation/AdaptableApiImpl.d.ts +5 -8
  89. package/src/Api/Implementation/AdaptableApiImpl.js +6 -11
  90. package/src/Api/Implementation/AlertApiImpl.d.ts +2 -2
  91. package/src/Api/Implementation/AlertApiImpl.js +42 -48
  92. package/src/Api/Implementation/ApiBase.d.ts +10 -7
  93. package/src/Api/Implementation/ApiBase.js +21 -18
  94. package/src/Api/Implementation/BulkUpdateApiImpl.js +1 -1
  95. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -0
  96. package/src/Api/Implementation/CalculatedColumnApiImpl.js +26 -22
  97. package/src/Api/Implementation/CellSummaryApiImpl.d.ts +3 -3
  98. package/src/Api/Implementation/CellSummaryApiImpl.js +6 -8
  99. package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
  100. package/src/Api/Implementation/ChartingApiImpl.js +30 -24
  101. package/src/Api/Implementation/ColumnApiImpl.d.ts +22 -16
  102. package/src/Api/Implementation/ColumnApiImpl.js +186 -114
  103. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +4 -4
  104. package/src/Api/Implementation/ColumnFilterApiImpl.js +53 -51
  105. package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +13 -0
  106. package/src/Api/Implementation/ColumnMenuApiImpl.js +51 -0
  107. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  108. package/src/Api/Implementation/ColumnScopeApiImpl.js +16 -21
  109. package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -4
  110. package/src/Api/Implementation/CommentsApiImpl.js +8 -11
  111. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -3
  112. package/src/Api/Implementation/ConfigApiImpl.js +17 -25
  113. package/src/Api/Implementation/ContextMenuApiImpl.d.ts +13 -0
  114. package/src/Api/Implementation/ContextMenuApiImpl.js +51 -0
  115. package/src/Api/Implementation/CustomSortApiImpl.js +5 -3
  116. package/src/Api/Implementation/DashboardApiImpl.js +8 -7
  117. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +10 -11
  118. package/src/Api/Implementation/DataSetApiImpl.js +5 -6
  119. package/src/Api/Implementation/EntitlementApiImpl.js +6 -2
  120. package/src/Api/Implementation/EventApiImpl.d.ts +2 -0
  121. package/src/Api/Implementation/EventApiImpl.js +2 -0
  122. package/src/Api/Implementation/ExportApiImpl.d.ts +22 -19
  123. package/src/Api/Implementation/ExportApiImpl.js +105 -58
  124. package/src/Api/Implementation/ExpressionApiImpl.d.ts +2 -2
  125. package/src/Api/Implementation/ExpressionApiImpl.js +11 -5
  126. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -3
  127. package/src/Api/Implementation/Fdc3ApiImpl.js +1 -33
  128. package/src/Api/Implementation/FilterApiImpl.d.ts +13 -0
  129. package/src/Api/Implementation/FilterApiImpl.js +20 -0
  130. package/src/Api/Implementation/FlashingCellApiImpl.js +16 -25
  131. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -1
  132. package/src/Api/Implementation/FormatColumnApiImpl.js +19 -12
  133. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
  134. package/src/Api/Implementation/FreeTextColumnApiImpl.js +5 -6
  135. package/src/Api/Implementation/GridApiImpl.d.ts +15 -12
  136. package/src/Api/Implementation/GridApiImpl.js +92 -82
  137. package/src/Api/Implementation/GridFilterApiImpl.js +6 -4
  138. package/src/Api/Implementation/LayoutApiImpl.d.ts +7 -9
  139. package/src/Api/Implementation/LayoutApiImpl.js +45 -50
  140. package/src/Api/Implementation/LayoutHelpers.d.ts +23 -0
  141. package/src/Api/Implementation/LayoutHelpers.js +319 -0
  142. package/src/Api/Implementation/NamedQueryApiImpl.js +1 -1
  143. package/src/Api/Implementation/NoteApiImpl.js +4 -1
  144. package/src/Api/Implementation/OptionsApiImpl.d.ts +9 -12
  145. package/src/Api/Implementation/OptionsApiImpl.js +25 -11
  146. package/src/Api/Implementation/PlusMinusApiImpl.js +2 -3
  147. package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -0
  148. package/src/Api/Implementation/PredicateApiImpl.js +22 -8
  149. package/src/Api/Implementation/QuickSearchApiImpl.js +3 -3
  150. package/src/Api/Implementation/RowFormApiImpl.d.ts +11 -0
  151. package/src/Api/Implementation/{ActionRowApiImpl.js → RowFormApiImpl.js} +10 -18
  152. package/src/Api/Implementation/ScheduleApiImpl.d.ts +0 -2
  153. package/src/Api/Implementation/ScheduleApiImpl.js +10 -14
  154. package/src/Api/Implementation/ShortcutApiImpl.js +3 -3
  155. package/src/Api/Implementation/SmartEditApiImpl.js +7 -8
  156. package/src/Api/Implementation/StatusBarApiImpl.d.ts +1 -1
  157. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -2
  158. package/src/Api/Implementation/SystemStatusApiImpl.js +8 -7
  159. package/src/Api/Implementation/TeamSharingApiImpl.js +5 -6
  160. package/src/Api/Implementation/ThemeApiImpl.js +6 -11
  161. package/src/Api/Implementation/ToolPanelApiImpl.js +3 -6
  162. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -15
  163. package/src/Api/Implementation/UserInterfaceApiImpl.js +29 -117
  164. package/src/Api/Internal/ActionColumnInternalApi.d.ts +13 -0
  165. package/src/Api/Internal/ActionColumnInternalApi.js +143 -0
  166. package/src/Api/Internal/AdaptableInternalApi.d.ts +27 -28
  167. package/src/Api/Internal/AdaptableInternalApi.js +69 -125
  168. package/src/Api/Internal/AlertInternalApi.d.ts +15 -18
  169. package/src/Api/Internal/AlertInternalApi.js +158 -139
  170. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -2
  171. package/src/Api/Internal/CalculatedColumnInternalApi.js +36 -28
  172. package/src/Api/Internal/ChartingInternalApi.js +33 -18
  173. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +6 -22
  174. package/src/Api/Internal/ColumnFilterInternalApi.js +69 -91
  175. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  176. package/src/Api/Internal/ColumnInternalApi.js +30 -1
  177. package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
  178. package/src/Api/Internal/CommentsInternalApi.js +2 -3
  179. package/src/Api/Internal/CustomSortInternalApi.d.ts +2 -0
  180. package/src/Api/Internal/CustomSortInternalApi.js +22 -7
  181. package/src/Api/Internal/DashboardInternalApi.d.ts +0 -4
  182. package/src/Api/Internal/DashboardInternalApi.js +3 -39
  183. package/src/Api/Internal/DataImportInternalApi.d.ts +0 -6
  184. package/src/Api/Internal/DataImportInternalApi.js +22 -21
  185. package/src/Api/Internal/DataSetInternalApi.d.ts +1 -5
  186. package/src/Api/Internal/DataSetInternalApi.js +15 -8
  187. package/src/Api/Internal/EntitlementInternalApi.js +2 -2
  188. package/src/Api/Internal/EventInternalApi.d.ts +27 -0
  189. package/src/Api/Internal/EventInternalApi.js +199 -0
  190. package/src/Api/Internal/ExportInternalApi.d.ts +19 -26
  191. package/src/Api/Internal/ExportInternalApi.js +175 -399
  192. package/src/Api/Internal/ExpressionInternalApi.js +21 -17
  193. package/src/Api/Internal/Fdc3InternalApi.d.ts +3 -2
  194. package/src/Api/Internal/Fdc3InternalApi.js +66 -34
  195. package/src/Api/Internal/FilterInternalApi.d.ts +3 -0
  196. package/src/Api/Internal/FilterInternalApi.js +7 -0
  197. package/src/Api/Internal/FlashingCellInternalApi.js +3 -4
  198. package/src/Api/Internal/FormatColumnInternalApi.d.ts +1 -1
  199. package/src/Api/Internal/FormatColumnInternalApi.js +34 -23
  200. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -1
  201. package/src/Api/Internal/FreeTextColumnInternalApi.js +32 -26
  202. package/src/Api/Internal/GridFilterInternalApi.d.ts +0 -1
  203. package/src/Api/Internal/GridFilterInternalApi.js +1 -11
  204. package/src/Api/Internal/GridInternalApi.d.ts +24 -73
  205. package/src/Api/Internal/GridInternalApi.js +88 -382
  206. package/src/Api/Internal/LayoutInternalApi.d.ts +7 -24
  207. package/src/Api/Internal/LayoutInternalApi.js +93 -107
  208. package/src/Api/Internal/NamedQueryInternalApi.d.ts +2 -0
  209. package/src/Api/Internal/NamedQueryInternalApi.js +39 -3
  210. package/src/Api/Internal/NoteInternalApi.js +1 -2
  211. package/src/Api/Internal/PredicateInternalApi.js +40 -19
  212. package/src/Api/Internal/RowFormInternalApi.d.ts +22 -0
  213. package/src/Api/Internal/RowFormInternalApi.js +204 -0
  214. package/src/Api/Internal/ScheduleInternalApi.d.ts +1 -8
  215. package/src/Api/Internal/ScheduleInternalApi.js +0 -13
  216. package/src/Api/Internal/StyledColumnInternalApi.d.ts +1 -1
  217. package/src/Api/Internal/StyledColumnInternalApi.js +19 -22
  218. package/src/Api/Internal/SystemStatusInternalApi.d.ts +0 -5
  219. package/src/Api/Internal/SystemStatusInternalApi.js +3 -11
  220. package/src/Api/Internal/TeamSharingInternalApi.d.ts +0 -5
  221. package/src/Api/Internal/TeamSharingInternalApi.js +2 -13
  222. package/src/Api/Internal/UserInterfaceInternalApi.d.ts +2 -1
  223. package/src/Api/Internal/UserInterfaceInternalApi.js +11 -0
  224. package/src/Api/LayoutApi.d.ts +14 -23
  225. package/src/Api/OptionsApi.d.ts +31 -17
  226. package/src/Api/PredicateApi.d.ts +1 -0
  227. package/src/Api/RowFormApi.d.ts +19 -0
  228. package/src/Api/StatusBarApi.d.ts +1 -1
  229. package/src/Api/UserInterfaceApi.d.ts +9 -42
  230. package/src/EnvVars.js +1 -1
  231. package/src/PredefinedConfig/AdaptableState.d.ts +2 -4
  232. package/src/PredefinedConfig/AlertState.d.ts +6 -6
  233. package/src/PredefinedConfig/ChartingState.d.ts +1 -1
  234. package/src/PredefinedConfig/CommentState.d.ts +2 -3
  235. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +2 -2
  236. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +37 -7
  237. package/src/PredefinedConfig/Common/AdaptableColumn.js +6 -7
  238. package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +11 -0
  239. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +1 -2
  240. package/src/PredefinedConfig/Common/AdaptableForm.js +1 -2
  241. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  242. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -0
  243. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -2
  244. package/src/PredefinedConfig/Common/AdaptablePredicate.js +99 -129
  245. package/src/PredefinedConfig/Common/AdaptableSortState.d.ts +15 -0
  246. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +11 -5
  247. package/src/PredefinedConfig/Common/AggregationColumns.js +9 -2
  248. package/src/PredefinedConfig/Common/BaseContext.d.ts +14 -2
  249. package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +1 -1
  250. package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -5
  251. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +7 -15
  252. package/src/PredefinedConfig/Common/ColumnScope.d.ts +1 -1
  253. package/src/PredefinedConfig/Common/ColumnSetupInfo.d.ts +8 -0
  254. package/src/PredefinedConfig/Common/CustomWindowConfig.d.ts +1 -1
  255. package/src/PredefinedConfig/Common/Enums.d.ts +0 -11
  256. package/src/PredefinedConfig/Common/Enums.js +12 -25
  257. package/src/PredefinedConfig/Common/Menu.d.ts +7 -5
  258. package/src/PredefinedConfig/Common/Menu.js +26 -23
  259. package/src/PredefinedConfig/Common/ProgressIndicatorConfig.d.ts +1 -1
  260. package/src/PredefinedConfig/Common/RowDataChangedInfo.d.ts +23 -0
  261. package/src/PredefinedConfig/Common/RowScope.d.ts +2 -2
  262. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +2 -1
  263. package/src/PredefinedConfig/Common/Types.d.ts +0 -4
  264. package/src/PredefinedConfig/Common/Types.js +2 -2
  265. package/src/PredefinedConfig/CustomSortState.d.ts +2 -2
  266. package/src/PredefinedConfig/ExportState.d.ts +70 -15
  267. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  268. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  269. package/src/PredefinedConfig/InternalState.d.ts +118 -7
  270. package/src/PredefinedConfig/LayoutState.d.ts +152 -32
  271. package/src/PredefinedConfig/PopupState.d.ts +7 -2
  272. package/src/PredefinedConfig/PredefinedConfig.d.ts +18 -18
  273. package/src/PredefinedConfig/Selection/GridCell.d.ts +16 -9
  274. package/src/PredefinedConfig/Selection/GridRow.d.ts +1 -1
  275. package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +1 -1
  276. package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
  277. package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
  278. package/src/PredefinedConfig/StyledColumnState.d.ts +7 -6
  279. package/src/PredefinedConfig/TeamSharingState.d.ts +2 -2
  280. package/src/Redux/ActionsReducers/AlertRedux.js +26 -8
  281. package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +11 -5
  282. package/src/Redux/ActionsReducers/ChartingRedux.js +41 -14
  283. package/src/Redux/ActionsReducers/CommentsRedux.js +49 -24
  284. package/src/Redux/ActionsReducers/CustomSortRedux.js +26 -8
  285. package/src/Redux/ActionsReducers/DashboardRedux.js +9 -9
  286. package/src/Redux/ActionsReducers/ExportRedux.d.ts +6 -16
  287. package/src/Redux/ActionsReducers/ExportRedux.js +19 -23
  288. package/src/Redux/ActionsReducers/FlashingCellRedux.js +31 -10
  289. package/src/Redux/ActionsReducers/FormatColumnRedux.js +38 -11
  290. package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +12 -7
  291. package/src/Redux/ActionsReducers/InternalRedux.d.ts +349 -0
  292. package/src/Redux/ActionsReducers/InternalRedux.js +964 -0
  293. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +13 -1
  294. package/src/Redux/ActionsReducers/LayoutRedux.js +142 -65
  295. package/src/Redux/ActionsReducers/NamedQueryRedux.js +12 -6
  296. package/src/Redux/ActionsReducers/NoteRedux.js +11 -6
  297. package/src/Redux/ActionsReducers/PluginsRedux.d.ts +1 -1
  298. package/src/Redux/ActionsReducers/PluginsRedux.js +1 -1
  299. package/src/Redux/ActionsReducers/PlusMinusRedux.js +36 -13
  300. package/src/Redux/ActionsReducers/PopupRedux.d.ts +10 -1
  301. package/src/Redux/ActionsReducers/PopupRedux.js +66 -7
  302. package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -2
  303. package/src/Redux/ActionsReducers/ScheduleRedux.js +104 -32
  304. package/src/Redux/ActionsReducers/ShortcutRedux.js +26 -8
  305. package/src/Redux/ActionsReducers/SmartEditRedux.d.ts +1 -1
  306. package/src/Redux/ActionsReducers/SmartEditRedux.js +1 -1
  307. package/src/Redux/ActionsReducers/StatusBarRedux.js +4 -1
  308. package/src/Redux/ActionsReducers/StyledColumnRedux.js +26 -8
  309. package/src/Redux/ActionsReducers/TeamSharingRedux.js +1 -1
  310. package/src/Redux/ActionsReducers/ThemeRedux.js +3 -2
  311. package/src/Redux/ActionsReducers/ToolPanelRedux.js +9 -8
  312. package/src/Redux/ActionsReducers/utils.js +13 -4
  313. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +1 -1
  314. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +7 -26
  315. package/src/Redux/Store/AdaptableReduxMerger.js +4 -5
  316. package/src/Redux/Store/AdaptableStore.d.ts +1 -1
  317. package/src/Redux/Store/AdaptableStore.js +406 -538
  318. package/src/Strategy/AlertModule.d.ts +10 -5
  319. package/src/Strategy/AlertModule.js +55 -27
  320. package/src/Strategy/BulkUpdateModule.d.ts +1 -1
  321. package/src/Strategy/BulkUpdateModule.js +6 -6
  322. package/src/Strategy/CalculatedColumnModule.d.ts +12 -11
  323. package/src/Strategy/CalculatedColumnModule.js +41 -16
  324. package/src/Strategy/CellSummaryModule.d.ts +18 -11
  325. package/src/Strategy/CellSummaryModule.js +83 -45
  326. package/src/Strategy/ChartingModule.d.ts +2 -1
  327. package/src/Strategy/ChartingModule.js +17 -3
  328. package/src/Strategy/ColumnFilterModule.d.ts +1 -2
  329. package/src/Strategy/ColumnFilterModule.js +27 -29
  330. package/src/Strategy/ColumnInfoModule.d.ts +2 -2
  331. package/src/Strategy/ColumnInfoModule.js +1 -1
  332. package/src/Strategy/CommentModule.d.ts +1 -2
  333. package/src/Strategy/CommentModule.js +18 -14
  334. package/src/Strategy/CustomSortModule.d.ts +2 -13
  335. package/src/Strategy/CustomSortModule.js +1 -1
  336. package/src/Strategy/DashboardModule.js +1 -1
  337. package/src/Strategy/DataChangeHistoryModule.d.ts +8 -3
  338. package/src/Strategy/DataChangeHistoryModule.js +22 -10
  339. package/src/Strategy/DataSetModule.js +4 -7
  340. package/src/Strategy/ExportModule.d.ts +5 -17
  341. package/src/Strategy/ExportModule.js +70 -282
  342. package/src/Strategy/Fdc3Module.d.ts +1 -1
  343. package/src/Strategy/Fdc3Module.js +10 -12
  344. package/src/Strategy/FlashingCellModule.d.ts +12 -9
  345. package/src/Strategy/FlashingCellModule.js +139 -108
  346. package/src/Strategy/FormatColumnModule.d.ts +1 -1
  347. package/src/Strategy/FormatColumnModule.js +5 -5
  348. package/src/Strategy/FreeTextColumnModule.d.ts +10 -9
  349. package/src/Strategy/FreeTextColumnModule.js +39 -17
  350. package/src/Strategy/GridFilterModule.d.ts +3 -1
  351. package/src/Strategy/GridFilterModule.js +13 -1
  352. package/src/Strategy/GridInfoModule.d.ts +2 -2
  353. package/src/Strategy/Interface/ICellDataChangeListenerModule.d.ts +6 -0
  354. package/src/Strategy/Interface/ICellSummaryModule.d.ts +2 -2
  355. package/src/Strategy/Interface/{IShortcutModule.d.ts → IKeyDownListenerModule.d.ts} +1 -1
  356. package/src/Strategy/Interface/IModule.d.ts +4 -0
  357. package/src/Strategy/Interface/IPlusMinusModule.d.ts +2 -3
  358. package/src/Strategy/LayoutModule.d.ts +6 -25
  359. package/src/Strategy/LayoutModule.js +109 -64
  360. package/src/Strategy/NamedQueryModule.d.ts +2 -15
  361. package/src/Strategy/NamedQueryModule.js +2 -2
  362. package/src/Strategy/NoteModule.d.ts +3 -1
  363. package/src/Strategy/NoteModule.js +12 -7
  364. package/src/Strategy/PlusMinusModule.d.ts +3 -2
  365. package/src/Strategy/PlusMinusModule.js +32 -24
  366. package/src/Strategy/ScheduleModule.js +2 -2
  367. package/src/Strategy/SettingsPanelModule.d.ts +2 -2
  368. package/src/Strategy/ShortcutModule.d.ts +3 -2
  369. package/src/Strategy/ShortcutModule.js +10 -2
  370. package/src/Strategy/SmartEditModule.d.ts +1 -1
  371. package/src/Strategy/SmartEditModule.js +10 -6
  372. package/src/Strategy/StatusBarModule.d.ts +1 -1
  373. package/src/Strategy/StyledColumnModule.d.ts +1 -1
  374. package/src/Strategy/StyledColumnModule.js +47 -20
  375. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  376. package/src/Strategy/TeamSharingModule.js +9 -9
  377. package/src/Strategy/Utilities/Alert/getAlertPreviewViewItems.js +1 -2
  378. package/src/Strategy/Utilities/CustomSort/getCustomSortSortOrderViewItems.d.ts +1 -1
  379. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -2
  380. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -5
  381. package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.d.ts +2 -2
  382. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +11 -18
  383. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -2
  384. package/src/Strategy/Utilities/Shortcut/getShortcutSettingsViewItems.js +2 -3
  385. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +15 -15
  386. package/src/Utilities/Constants/GeneralConstants.d.ts +31 -85
  387. package/src/Utilities/Constants/GeneralConstants.js +55 -113
  388. package/src/Utilities/Constants/ModuleConstants.d.ts +28 -30
  389. package/src/Utilities/Constants/ModuleConstants.js +30 -33
  390. package/src/Utilities/Constants/ObjectDefaultConstants.d.ts +7 -0
  391. package/src/Utilities/Constants/ObjectDefaultConstants.js +9 -0
  392. package/src/Utilities/Constants/ReduxConstants.d.ts +7 -0
  393. package/src/Utilities/Constants/ReduxConstants.js +28 -0
  394. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
  395. package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
  396. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
  397. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
  398. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +365 -71
  399. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
  400. package/src/Utilities/ExpressionFunctions/deepMap.d.ts +1 -0
  401. package/src/Utilities/ExpressionFunctions/deepMap.js +8 -8
  402. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +8 -8
  403. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +12 -13
  404. package/src/Utilities/ExpressionFunctions/groupingMap.js +4 -5
  405. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +13 -17
  406. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +2 -3
  407. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  408. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +95 -9
  409. package/src/Utilities/Extensions/ArrayExtensions.d.ts +5 -4
  410. package/src/Utilities/Extensions/ArrayExtensions.js +3 -3
  411. package/src/Utilities/Extensions/NumberExtensions.d.ts +6 -2
  412. package/src/Utilities/Extensions/NumberExtensions.js +61 -4
  413. package/src/Utilities/Extensions/ObjectExtensions.js +8 -3
  414. package/src/Utilities/Extensions/TypeExtensions.d.ts +5 -0
  415. package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -4
  416. package/src/Utilities/Helpers/AdaptableHelper.js +19 -8
  417. package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
  418. package/src/Utilities/Helpers/FormatHelper.js +5 -6
  419. package/src/Utilities/Helpers/Helper.d.ts +1 -1
  420. package/src/Utilities/Helpers/Helper.js +19 -33
  421. package/src/Utilities/Helpers/StyleHelper.js +7 -4
  422. package/src/Utilities/Interface/Preview.d.ts +1 -1
  423. package/src/Utilities/MenuItem.d.ts +3 -3
  424. package/src/Utilities/MenuItem.js +3 -3
  425. package/src/Utilities/ObjectFactory.d.ts +13 -10
  426. package/src/Utilities/ObjectFactory.js +66 -35
  427. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -1
  428. package/src/Utilities/Services/AggregatedScalarLiveValue.js +4 -7
  429. package/src/Utilities/Services/AlertService.js +3 -3
  430. package/src/Utilities/Services/{CellPopupService.d.ts → AnnotationsService.d.ts} +7 -3
  431. package/src/Utilities/Services/{CellPopupService.js → AnnotationsService.js} +47 -33
  432. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +5 -1
  433. package/src/Utilities/Services/CalculatedColumnExpressionService.js +36 -43
  434. package/src/Utilities/Services/ChartingService.d.ts +1 -1
  435. package/src/Utilities/Services/ChartingService.js +22 -12
  436. package/src/Utilities/Services/DataService.d.ts +7 -7
  437. package/src/Utilities/Services/DataService.js +23 -18
  438. package/src/Utilities/Services/Fdc3Service.js +66 -29
  439. package/src/Utilities/Services/FlashingCellService.d.ts +1 -1
  440. package/src/Utilities/Services/FlashingCellService.js +2 -2
  441. package/src/Utilities/Services/Interface/IAlertService.d.ts +7 -7
  442. package/src/Utilities/Services/Interface/IAlertService.js +4 -4
  443. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +5 -1
  444. package/src/Utilities/Services/Interface/IChartingService.d.ts +1 -1
  445. package/src/Utilities/Services/Interface/IDataService.d.ts +6 -5
  446. package/src/Utilities/Services/Interface/IModuleService.d.ts +2 -1
  447. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +4 -4
  448. package/src/Utilities/Services/LicenseService/index.js +1 -1
  449. package/src/Utilities/Services/MetamodelService.js +15 -15
  450. package/src/Utilities/Services/ModuleService.d.ts +4 -1
  451. package/src/Utilities/Services/ModuleService.js +34 -23
  452. package/src/Utilities/Services/QueryLanguageService.d.ts +4 -4
  453. package/src/Utilities/Services/QueryLanguageService.js +79 -59
  454. package/src/Utilities/Services/{RowEditService.d.ts → RowFormService.d.ts} +2 -2
  455. package/src/Utilities/Services/RowFormService.js +49 -0
  456. package/src/Utilities/Services/RowSummaryService.d.ts +3 -3
  457. package/src/Utilities/Services/RowSummaryService.js +22 -21
  458. package/src/Utilities/Services/TeamSharingService.js +29 -21
  459. package/src/Utilities/Services/ThemeService.js +1 -2
  460. package/src/Utilities/Services/ValidationService.js +30 -14
  461. package/src/Utilities/adaptableQlUtils.d.ts +1 -0
  462. package/src/Utilities/adaptableQlUtils.js +33 -5
  463. package/src/{agGrid → Utilities}/buildSortedColumnStateForLayout.d.ts +2 -2
  464. package/src/{agGrid → Utilities}/buildSortedColumnStateForLayout.js +39 -28
  465. package/src/{agGrid → Utilities}/createAgStatusPanelComponent.d.ts +3 -3
  466. package/src/{agGrid → Utilities}/createAgStatusPanelComponent.js +1 -2
  467. package/src/Utilities/getExpressionViewItems.d.ts +3 -0
  468. package/src/{Strategy/Utilities → Utilities}/getExpressionViewItems.js +2 -2
  469. package/src/Utilities/getObjectTagsViewItems.d.ts +3 -0
  470. package/src/{Strategy/Utilities → Utilities}/getObjectTagsViewItems.js +9 -8
  471. package/src/{Strategy/Utilities → Utilities}/getRuleViewItems.d.ts +1 -1
  472. package/src/Utilities/getRuleViewItems.js +14 -0
  473. package/src/Utilities/getScopeViewItems.d.ts +3 -0
  474. package/src/Utilities/isPivotLayout.d.ts +2 -0
  475. package/src/Utilities/isPivotLayout.js +5 -0
  476. package/src/Utilities/license/decode.js +1 -1
  477. package/src/Utilities/logDeprecation.d.ts +3 -3
  478. package/src/Utilities/logDeprecation.js +2 -2
  479. package/src/Utilities/runIfNotResolvedIn.js +1 -1
  480. package/src/{Strategy/Utilities → Utilities}/updateSingleToMultiplePredicates.js +1 -2
  481. package/src/{agGrid → Utilities}/weightedAverage.d.ts +1 -1
  482. package/src/{agGrid → Utilities}/weightedAverage.js +2 -3
  483. package/src/View/AdaptablePopover/index.d.ts +1 -1
  484. package/src/View/AdaptablePopover/index.js +3 -4
  485. package/src/View/AdaptableView.js +6 -9
  486. package/src/View/AdaptableViewFactory.js +1 -1
  487. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +1 -1
  488. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +16 -13
  489. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +2 -2
  490. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +25 -17
  491. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +1 -1
  492. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +25 -11
  493. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +2 -3
  494. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +23 -13
  495. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
  496. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +3 -3
  497. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +12 -7
  498. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +1 -1
  499. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +20 -10
  500. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +1 -1
  501. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +22 -8
  502. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +1 -1
  503. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +1 -5
  504. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +5 -2
  505. package/src/View/AdaptableWizardView/Wizard.d.ts +2 -2
  506. package/src/View/AdaptableWizardView/Wizard.js +24 -7
  507. package/src/View/AdaptableWizardView/helper.d.ts +1 -1
  508. package/src/View/AdaptableWizardView/helper.js +20 -11
  509. package/src/View/AdaptableWizardView/index.js +1 -1
  510. package/src/View/Alert/ActiveAlertsPanel.js +1 -1
  511. package/src/View/Alert/ActiveAlertsPanelItemLabel.js +1 -1
  512. package/src/View/Alert/AlertEmptyView.js +1 -1
  513. package/src/View/Alert/AlertStatusSubPanel.d.ts +2 -2
  514. package/src/View/Alert/AlertStatusSubPanel.js +5 -3
  515. package/src/View/Alert/AlertViewPanel.d.ts +7 -5
  516. package/src/View/Alert/AlertViewPanel.js +4 -4
  517. package/src/View/Alert/AlertsPanel.js +1 -2
  518. package/src/View/Alert/Utilities/getAlertType.js +8 -9
  519. package/src/View/Alert/Utilities/getAvailablePredicates.js +1 -8
  520. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
  521. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +5 -6
  522. package/src/View/Alert/Utilities/mapAlertDefinition.js +9 -10
  523. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +4 -4
  524. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +7 -1
  525. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +2 -2
  526. package/src/View/Alert/Wizard/AlertButtonsEditor.js +77 -52
  527. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +3 -3
  528. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +14 -5
  529. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +2 -2
  530. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +38 -19
  531. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +4 -4
  532. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +20 -11
  533. package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +2 -2
  534. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
  535. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +3 -3
  536. package/src/View/Alert/Wizard/AlertWizard.d.ts +2 -2
  537. package/src/View/Alert/Wizard/AlertWizard.js +8 -10
  538. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -2
  539. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  540. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -2
  541. package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +7 -5
  542. package/src/View/BulkUpdate/BulkUpdatePopup.js +12 -13
  543. package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +7 -6
  544. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +11 -14
  545. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +6 -3
  546. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.js +2 -2
  547. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +3 -3
  548. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +17 -7
  549. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +3 -3
  550. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +16 -5
  551. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +3 -3
  552. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +28 -14
  553. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +2 -2
  554. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +2 -2
  555. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +13 -10
  556. package/src/View/CalculatedColumn/utils.js +1 -2
  557. package/src/View/CellSummary/CellSummaryDetails.d.ts +3 -3
  558. package/src/View/CellSummary/CellSummaryDetails.js +5 -5
  559. package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -2
  560. package/src/View/CellSummary/CellSummaryPopup.d.ts +8 -6
  561. package/src/View/CellSummary/CellSummaryPopup.js +5 -6
  562. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
  563. package/src/View/CellSummary/CellSummaryStatusPanel.d.ts +2 -2
  564. package/src/View/CellSummary/CellSummaryStatusPanel.js +4 -5
  565. package/src/View/CellSummary/CellSummaryViewPanel.d.ts +9 -8
  566. package/src/View/CellSummary/CellSummaryViewPanel.js +9 -13
  567. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +1 -2
  568. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +6 -3
  569. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +33 -5
  570. package/src/View/Charting/ChartingWizard/ChartingWizard.js +3 -3
  571. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +2 -4
  572. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +4 -1
  573. package/src/View/Charting/ShowChartButton.js +18 -17
  574. package/src/View/Charting/useAgChartState.js +6 -7
  575. package/src/View/Charting/useChartingElements.d.ts +6 -6
  576. package/src/View/Charting/useChartingElements.js +4 -5
  577. package/src/View/ColumnInfo/ColumnInfo.js +144 -98
  578. package/src/View/ColumnInfo/ColumnInfoPopup.js +1 -2
  579. package/src/View/Comments/CommentsEditor.js +23 -23
  580. package/src/View/Comments/CommentsPopup.js +3 -4
  581. package/src/View/Components/AdaptableButton/index.js +1 -1
  582. package/src/View/Components/AdaptableDateInput/index.d.ts +4 -2
  583. package/src/View/Components/AdaptableDateInput/index.js +24 -17
  584. package/src/View/Components/AdaptableIconComponent/index.js +1 -1
  585. package/src/View/Components/AdaptableIconSelector/index.js +3 -4
  586. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +3 -2
  587. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +4 -7
  588. package/src/View/Components/AdaptableInput/index.d.ts +5 -3
  589. package/src/View/Components/AdaptableInput/index.js +3 -4
  590. package/src/View/Components/AdaptableObjectCollection/index.js +1 -1
  591. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +10 -12
  592. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +18 -28
  593. package/src/View/Components/Badge/index.js +1 -1
  594. package/src/View/Components/Buttons/ButtonApply.d.ts +1 -1
  595. package/src/View/Components/Buttons/ButtonApply.js +1 -1
  596. package/src/View/Components/Buttons/ButtonBase/index.d.ts +1 -1
  597. package/src/View/Components/Buttons/ButtonBase/index.js +1 -1
  598. package/src/View/Components/Buttons/ButtonClear.d.ts +1 -1
  599. package/src/View/Components/Buttons/ButtonClear.js +1 -1
  600. package/src/View/Components/Buttons/ButtonClone.d.ts +2 -2
  601. package/src/View/Components/Buttons/ButtonClone.js +1 -1
  602. package/src/View/Components/Buttons/ButtonClose.d.ts +1 -1
  603. package/src/View/Components/Buttons/ButtonClose.js +1 -1
  604. package/src/View/Components/Buttons/ButtonConfigure.d.ts +1 -1
  605. package/src/View/Components/Buttons/ButtonConfigure.js +1 -1
  606. package/src/View/Components/Buttons/ButtonDelete.d.ts +3 -8
  607. package/src/View/Components/Buttons/ButtonDelete.js +17 -27
  608. package/src/View/Components/Buttons/ButtonEdit.js +1 -2
  609. package/src/View/Components/Buttons/ButtonExpand.d.ts +1 -1
  610. package/src/View/Components/Buttons/ButtonExpand.js +1 -1
  611. package/src/View/Components/Buttons/ButtonExport.d.ts +1 -1
  612. package/src/View/Components/Buttons/ButtonExport.js +1 -1
  613. package/src/View/Components/Buttons/ButtonFunction.d.ts +1 -1
  614. package/src/View/Components/Buttons/ButtonFunction.js +1 -1
  615. package/src/View/Components/Buttons/ButtonGeneral.d.ts +1 -1
  616. package/src/View/Components/Buttons/ButtonGeneral.js +1 -1
  617. package/src/View/Components/Buttons/ButtonInfo.js +1 -1
  618. package/src/View/Components/Buttons/ButtonInvalid.d.ts +1 -1
  619. package/src/View/Components/Buttons/ButtonInvalid.js +1 -1
  620. package/src/View/Components/Buttons/ButtonLogin.d.ts +1 -1
  621. package/src/View/Components/Buttons/ButtonLogin.js +1 -1
  622. package/src/View/Components/Buttons/ButtonLogout.d.ts +1 -1
  623. package/src/View/Components/Buttons/ButtonLogout.js +1 -1
  624. package/src/View/Components/Buttons/ButtonMaximise.d.ts +1 -1
  625. package/src/View/Components/Buttons/ButtonMaximise.js +1 -1
  626. package/src/View/Components/Buttons/ButtonMinimise.d.ts +1 -1
  627. package/src/View/Components/Buttons/ButtonMinimise.js +1 -1
  628. package/src/View/Components/Buttons/ButtonNew.d.ts +2 -2
  629. package/src/View/Components/Buttons/ButtonNew.js +1 -1
  630. package/src/View/Components/Buttons/ButtonNewPage.d.ts +1 -1
  631. package/src/View/Components/Buttons/ButtonNewPage.js +2 -2
  632. package/src/View/Components/Buttons/ButtonOpen.d.ts +1 -1
  633. package/src/View/Components/Buttons/ButtonOpen.js +1 -1
  634. package/src/View/Components/Buttons/ButtonPause.d.ts +1 -3
  635. package/src/View/Components/Buttons/ButtonPause.js +13 -15
  636. package/src/View/Components/Buttons/ButtonPlay.d.ts +1 -3
  637. package/src/View/Components/Buttons/ButtonPlay.js +3 -5
  638. package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +2 -2
  639. package/src/View/Components/Buttons/ButtonPreviewDelete.js +1 -1
  640. package/src/View/Components/Buttons/ButtonSave.d.ts +1 -1
  641. package/src/View/Components/Buttons/ButtonSave.js +1 -1
  642. package/src/View/Components/Buttons/ButtonSchedule.d.ts +1 -3
  643. package/src/View/Components/Buttons/ButtonSchedule.js +3 -5
  644. package/src/View/Components/Buttons/ButtonShare.d.ts +1 -1
  645. package/src/View/Components/Buttons/ButtonShare.js +2 -3
  646. package/src/View/Components/Buttons/ButtonShow.d.ts +1 -1
  647. package/src/View/Components/Buttons/ButtonShow.js +1 -1
  648. package/src/View/Components/Buttons/ButtonShowChart.d.ts +1 -1
  649. package/src/View/Components/Buttons/ButtonShowChart.js +1 -1
  650. package/src/View/Components/Buttons/ButtonStop.d.ts +1 -1
  651. package/src/View/Components/Buttons/ButtonStop.js +1 -1
  652. package/src/View/Components/Buttons/ButtonUndo.d.ts +1 -1
  653. package/src/View/Components/Buttons/ButtonUndo.js +1 -1
  654. package/src/View/Components/Buttons/ButtonUnsuspend.d.ts +1 -1
  655. package/src/View/Components/Buttons/ButtonUnsuspend.js +1 -1
  656. package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -1
  657. package/src/View/Components/CellPopup/index.js +1 -2
  658. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +12 -0
  659. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +16 -0
  660. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.d.ts +9 -0
  661. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +36 -0
  662. package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +13 -0
  663. package/src/View/Components/ColumnFilter/ColumnFilter.js +149 -0
  664. package/src/View/Components/ColumnFilter/ColumnFilterWindow.d.ts +3 -0
  665. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +37 -0
  666. package/src/View/Components/ColumnFilter/FloatingFilter.d.ts +12 -0
  667. package/src/View/Components/ColumnFilter/FloatingFilter.js +89 -0
  668. package/src/View/Components/ColumnFilter/LayoutColumnFilter.d.ts +6 -0
  669. package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +30 -0
  670. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.d.ts +27 -0
  671. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +122 -0
  672. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.d.ts +13 -0
  673. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +61 -0
  674. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.d.ts +12 -0
  675. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +22 -0
  676. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.d.ts +13 -0
  677. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +63 -0
  678. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.d.ts +44 -0
  679. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +114 -0
  680. package/src/View/Components/ColumnFilter/hooks.d.ts +2 -0
  681. package/src/View/Components/ColumnFilter/hooks.js +15 -0
  682. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +12 -0
  683. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +67 -0
  684. package/src/View/Components/ColumnFilter/utils.d.ts +8 -0
  685. package/src/View/Components/ColumnFilter/utils.js +128 -0
  686. package/src/View/Components/ColumnSelector/index.d.ts +2 -2
  687. package/src/View/Components/ColumnSelector/index.js +1 -2
  688. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +18 -16
  689. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +23 -17
  690. package/src/View/Components/EntityRulesEditor/Utilities.js +11 -12
  691. package/src/View/Components/EntityRulesEditor/index.d.ts +2 -2
  692. package/src/View/Components/EntityRulesEditor/index.js +47 -27
  693. package/src/View/Components/ExpressionWizard.d.ts +1 -1
  694. package/src/View/Components/ExpressionWizard.js +2 -3
  695. package/src/View/Components/ExternalRenderer.js +7 -14
  696. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +8 -15
  697. package/src/View/Components/FilterForm/ListBoxFilterForm.js +29 -75
  698. package/src/View/Components/FilterForm/ListBoxMenu.d.ts +1 -1
  699. package/src/View/Components/FilterForm/Waiting.js +2 -2
  700. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +2 -1
  701. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +6 -1
  702. package/src/View/Components/ListBox/DualListBoxEditor.d.ts +1 -1
  703. package/src/View/Components/ListBox/DualListBoxEditor.js +4 -4
  704. package/src/View/Components/ListBox/ListBoxFilterSortComponent.d.ts +1 -1
  705. package/src/View/Components/ModuleValueSelector/index.d.ts +2 -2
  706. package/src/View/Components/ModuleValueSelector/index.js +4 -4
  707. package/src/View/Components/NewScopeComponent.d.ts +2 -2
  708. package/src/View/Components/NewScopeComponent.js +22 -27
  709. package/src/View/Components/Panels/PanelDashboard/index.d.ts +3 -3
  710. package/src/View/Components/Panels/PanelDashboard/index.js +4 -4
  711. package/src/View/Components/Panels/PanelFooter.js +2 -3
  712. package/src/View/Components/Panels/PanelToolPanel/index.d.ts +1 -1
  713. package/src/View/Components/Panels/PanelToolPanel/index.js +25 -2
  714. package/src/View/Components/Panels/PanelWithButton.d.ts +1 -3
  715. package/src/View/Components/Panels/PanelWithButton.js +15 -21
  716. package/src/View/Components/Panels/PanelWithImage.js +6 -3
  717. package/src/View/Components/Panels/PanelWithRow.d.ts +1 -1
  718. package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +1 -1
  719. package/src/View/Components/Panels/PanelWithTwoButtons.js +1 -1
  720. package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +1 -1
  721. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +2 -2
  722. package/src/View/Components/Popups/AdaptableLoadingScreen.js +2 -2
  723. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +7 -8
  724. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +2 -3
  725. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +13 -11
  726. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +36 -34
  727. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +7 -7
  728. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +1 -2
  729. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -11
  730. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +2 -2
  731. package/src/View/Components/Popups/AdaptablePopupAlert.js +7 -5
  732. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -3
  733. package/src/View/Components/Popups/AdaptablePopupPrompt.js +1 -2
  734. package/src/View/Components/Popups/AdaptablePopupTeamSharing.d.ts +2 -2
  735. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +3 -3
  736. package/src/View/Components/Popups/FormPopups/FormPopups.js +6 -3
  737. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +13 -14
  738. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +1 -1
  739. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +22 -10
  740. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -1
  741. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -4
  742. package/src/View/Components/PredicateEditor/PredicateEditor.js +46 -29
  743. package/src/View/Components/PreviewResultsPanel.js +23 -32
  744. package/src/View/Components/RangesComponent.d.ts +1 -1
  745. package/src/View/Components/RangesComponent.js +21 -10
  746. package/src/View/Components/ReorderDraggable/index.d.ts +12 -0
  747. package/src/View/Components/ReorderDraggable/index.js +45 -0
  748. package/src/View/Components/Selectors/{ColumnValueSelector.d.ts → BulkUpdateValueSelector.d.ts} +2 -2
  749. package/src/View/Components/Selectors/{ColumnValueSelector.js → BulkUpdateValueSelector.js} +32 -14
  750. package/src/View/Components/Selectors/ColumnSelector.d.ts +3 -2
  751. package/src/View/Components/Selectors/ColumnSelector.js +9 -7
  752. package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +1 -1
  753. package/src/View/Components/Selectors/ColumnSelectorOld.js +1 -2
  754. package/src/View/Components/Selectors/FieldSelector.js +5 -9
  755. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +13 -2
  756. package/src/View/Components/Selectors/PermittedValuesSelector.js +37 -8
  757. package/src/View/Components/SharedProps/EditableConfigEntityState.js +1 -1
  758. package/src/View/Components/StyleComponent.d.ts +1 -1
  759. package/src/View/Components/StyleComponent.js +3 -4
  760. package/src/View/Components/TagValueSelector/index.d.ts +3 -3
  761. package/src/View/Components/TagValueSelector/index.js +1 -2
  762. package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +11 -8
  763. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +15 -27
  764. package/src/View/Components/ToolPanel/CustomToolPanelContent.d.ts +2 -2
  765. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +19 -8
  766. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +7 -4
  767. package/src/View/Components/ToolPanel/ToolPanelPopup.js +8 -10
  768. package/src/View/Components/ToolPanel/ToolPanelWrapper.d.ts +2 -2
  769. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -2
  770. package/src/View/Components/ValueSelector/index.d.ts +20 -2
  771. package/src/View/Components/ValueSelector/index.js +57 -43
  772. package/src/View/Components/WizardSummaryPage.d.ts +2 -2
  773. package/src/View/Components/WizardSummaryPage.js +4 -4
  774. package/src/View/CustomSort/CustomSortSummary.d.ts +3 -1
  775. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +3 -3
  776. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +6 -2
  777. package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.js +1 -1
  778. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.d.ts +3 -3
  779. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +21 -5
  780. package/src/View/CustomSort/Wizard/CustomSortWizard.d.ts +2 -2
  781. package/src/View/CustomSort/Wizard/CustomSortWizard.js +5 -7
  782. package/src/View/Dashboard/CustomDashboardButton.d.ts +2 -2
  783. package/src/View/Dashboard/CustomDashboardButton.js +6 -4
  784. package/src/View/Dashboard/CustomToolbar.d.ts +3 -3
  785. package/src/View/Dashboard/CustomToolbar.js +13 -20
  786. package/src/View/Dashboard/Dashboard.d.ts +8 -6
  787. package/src/View/Dashboard/Dashboard.js +13 -10
  788. package/src/View/Dashboard/DashboardPopup.d.ts +6 -4
  789. package/src/View/Dashboard/DashboardPopup.js +6 -6
  790. package/src/View/Dashboard/DashboardToolbarFactory.js +1 -1
  791. package/src/View/Dashboard/DashboardViewPanel.d.ts +4 -2
  792. package/src/View/Dashboard/ModuleToolbarWrapper.d.ts +1 -1
  793. package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
  794. package/src/View/Dashboard/PinnedDashboard.js +1 -2
  795. package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -1
  796. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +2 -2
  797. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +31 -38
  798. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +10 -8
  799. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +9 -9
  800. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +10 -11
  801. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
  802. package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -4
  803. package/src/View/DataImport/DataImportPopup.js +4 -6
  804. package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +2 -2
  805. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +26 -23
  806. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +27 -14
  807. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +14 -13
  808. package/src/View/DataImport/systemFileHandlers.js +1 -2
  809. package/src/View/DataSet/DataSetSelector.js +2 -2
  810. package/src/View/DataSet/DataSetViewPanel.d.ts +9 -4
  811. package/src/View/DataSet/DataSetViewPanel.js +4 -5
  812. package/src/View/Export/ExportDestinationPicker.d.ts +9 -0
  813. package/src/View/Export/ExportDestinationPicker.js +27 -0
  814. package/src/View/Export/ExportStatusBar.d.ts +2 -0
  815. package/src/View/Export/ExportStatusBar.js +21 -0
  816. package/src/View/Export/ExportViewPanel.d.ts +2 -26
  817. package/src/View/Export/ExportViewPanel.js +40 -127
  818. package/src/View/Export/ReportFormatSelector.d.ts +10 -0
  819. package/src/View/Export/ReportFormatSelector.js +27 -0
  820. package/src/View/Export/{ReportExportDropdown.d.ts → ReportListItem.d.ts} +1 -1
  821. package/src/View/Export/ReportListItem.js +18 -0
  822. package/src/View/Export/ReportNameSelector.d.ts +10 -0
  823. package/src/View/Export/ReportNameSelector.js +25 -0
  824. package/src/View/Export/Wizard/NewReportWizard.d.ts +2 -2
  825. package/src/View/Export/Wizard/NewReportWizard.js +2 -3
  826. package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -1
  827. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +3 -3
  828. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +5 -2
  829. package/src/View/Export/Wizard/ReportNameWizardSection.d.ts +3 -3
  830. package/src/View/Export/Wizard/ReportNameWizardSection.js +5 -2
  831. package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -1
  832. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +3 -3
  833. package/src/View/Export/Wizard/ReportRowsWizardSection.js +11 -7
  834. package/src/View/Filter/ActiveFiltersPanel.js +1 -1
  835. package/src/View/Filter/FilterSummary.d.ts +4 -1
  836. package/src/View/Filter/FilterSummary.js +2 -2
  837. package/src/View/Filter/FilterViewPanel.d.ts +9 -5
  838. package/src/View/Filter/FilterViewPanel.js +14 -20
  839. package/src/View/FlashingCell/FlashingCellStyle.js +2 -2
  840. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +3 -3
  841. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -2
  842. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +2 -2
  843. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -1
  844. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +3 -3
  845. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +15 -15
  846. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +2 -2
  847. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +6 -7
  848. package/src/View/FlashingCell/Wizard/FlashingCellWizard.d.ts +2 -2
  849. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +3 -4
  850. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -2
  851. package/src/View/FormatColumn/FormatColumnSummary.d.ts +3 -1
  852. package/src/View/FormatColumn/FormatColumnSummary.js +1 -2
  853. package/src/View/FormatColumn/MoveFormatColumn.js +1 -1
  854. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +4 -4
  855. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +37 -45
  856. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +2 -2
  857. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.d.ts +3 -3
  858. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +2 -3
  859. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.d.ts +3 -3
  860. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +29 -13
  861. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +4 -4
  862. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +8 -5
  863. package/src/View/FormatColumn/Wizard/FormatColumnWizard.d.ts +2 -2
  864. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -13
  865. package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +3 -1
  866. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +3 -12
  867. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +48 -24
  868. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.d.ts +2 -2
  869. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +2 -4
  870. package/src/View/GridFilter/GridFilterExpressionEditor.d.ts +2 -2
  871. package/src/View/GridFilter/GridFilterExpressionEditor.js +3 -4
  872. package/src/View/GridFilter/GridFilterPopup.d.ts +2 -2
  873. package/src/View/GridFilter/GridFilterPopup.js +2 -2
  874. package/src/View/GridFilter/GridFilterStatusbar.js +2 -3
  875. package/src/View/GridFilter/GridFilterViewPanel.d.ts +2 -2
  876. package/src/View/GridFilter/GridFilterViewPanel.js +2 -2
  877. package/src/View/GridFilter/NamedQuerySelector.d.ts +3 -3
  878. package/src/View/GridFilter/NamedQuerySelector.js +1 -2
  879. package/src/View/GridFilter/useGridFilterExpressionEditor.js +19 -21
  880. package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +1 -1
  881. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +3 -4
  882. package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +2 -2
  883. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.d.ts +2 -2
  884. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +21 -15
  885. package/src/View/KeyHint.d.ts +2 -2
  886. package/src/View/KeyHint.js +1 -1
  887. package/src/View/Layout/EditCurrentLayoutButton.js +5 -1
  888. package/src/View/Layout/LayoutCloneButton.js +3 -2
  889. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  890. package/src/View/Layout/LayoutViewPanel.d.ts +18 -10
  891. package/src/View/Layout/LayoutViewPanel.js +64 -39
  892. package/src/View/Layout/PivotDetailsPopoup.js +23 -7
  893. package/src/View/Layout/TransposedPopup.d.ts +2 -2
  894. package/src/View/Layout/TransposedPopup.js +8 -14
  895. package/src/View/Layout/Wizard/Components/ColumnLabels.d.ts +1 -1
  896. package/src/View/Layout/Wizard/Components/ColumnLabels.js +2 -2
  897. package/src/View/Layout/Wizard/LayoutWizard.js +114 -31
  898. package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +2 -2
  899. package/src/View/Layout/Wizard/getGridFilterPreview.js +1 -2
  900. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -2
  901. package/src/View/Layout/Wizard/sections/AggregationsSection.js +78 -37
  902. package/src/View/Layout/Wizard/sections/ColumnsSection.js +211 -50
  903. package/src/View/Layout/Wizard/sections/FilterSection.js +28 -30
  904. package/src/View/Layout/Wizard/sections/GridFilterSection.js +12 -14
  905. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +9 -0
  906. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +193 -0
  907. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +2 -2
  908. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +7 -7
  909. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +8 -0
  910. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +47 -0
  911. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +78 -34
  912. package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +4 -4
  913. package/src/View/Layout/Wizard/sections/RowSummarySection.js +76 -41
  914. package/src/View/Layout/Wizard/sections/SettingsSection.js +12 -10
  915. package/src/View/Layout/Wizard/sections/SortSection.js +19 -15
  916. package/src/View/Layout/Wizard/sections/Utilities.js +1 -1
  917. package/src/View/License/LicenseWatermark.js +1 -1
  918. package/src/View/NamedQuery/EditCurrentQueryButton.d.ts +2 -2
  919. package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
  920. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +3 -3
  921. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  922. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.d.ts +3 -3
  923. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +4 -1
  924. package/src/View/NamedQuery/Wizard/NamedQueryWizard.d.ts +2 -2
  925. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -2
  926. package/src/View/Note/NoteEditor.js +2 -4
  927. package/src/View/PlusMinus/MovePlusMinus.js +1 -1
  928. package/src/View/PlusMinus/PlusMinusSummary.d.ts +3 -1
  929. package/src/View/PlusMinus/PlusMinusSummary.js +1 -2
  930. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +3 -3
  931. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +4 -2
  932. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +9 -3
  933. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
  934. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -8
  935. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +2 -2
  936. package/src/View/QuickSearch/QuickSearchInput.js +1 -2
  937. package/src/View/QuickSearch/QuickSearchPopup.d.ts +4 -2
  938. package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
  939. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -2
  940. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +40 -20
  941. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +28 -8
  942. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +8 -3
  943. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +29 -14
  944. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -3
  945. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +16 -10
  946. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +13 -13
  947. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +7 -7
  948. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
  949. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +9 -10
  950. package/src/View/Schedule/Wizard/ScheduleWizard.js +3 -4
  951. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +9 -3
  952. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +15 -8
  953. package/src/View/Shortcut/Wizard/ShortcutWizard.js +4 -8
  954. package/src/View/SmartEdit/SmartEditPopup.d.ts +9 -6
  955. package/src/View/SmartEdit/SmartEditPopup.js +8 -8
  956. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +8 -7
  957. package/src/View/SmartEdit/SmartEditViewPanel.js +11 -13
  958. package/src/View/SpecialColumnSettingsWizardStep.js +20 -19
  959. package/src/View/StateManagement/components/ClearButton.js +1 -1
  960. package/src/View/StateManagement/components/ExportDropdown.js +1 -1
  961. package/src/View/StateManagement/components/LoadButton.js +1 -1
  962. package/src/View/StatusBar/AdaptableStatusBar.d.ts +1 -1
  963. package/src/View/StatusBar/AdaptableStatusBar.js +12 -12
  964. package/src/View/StatusBar/StatusBarPanel.d.ts +1 -1
  965. package/src/View/StatusBar/StatusBarPanel.js +3 -4
  966. package/src/View/StatusBar/StatusBarPopup.js +4 -1
  967. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +1 -1
  968. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +47 -19
  969. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +51 -114
  970. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -2
  971. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +12 -15
  972. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +3 -3
  973. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +14 -5
  974. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +3 -3
  975. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +36 -11
  976. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +9 -5
  977. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +2 -2
  978. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +74 -30
  979. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +1 -1
  980. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +3 -1
  981. package/src/View/SystemStatus/SystemStatusEntityRow.js +1 -2
  982. package/src/View/SystemStatus/SystemStatusPopup.d.ts +6 -4
  983. package/src/View/SystemStatus/SystemStatusPopup.js +4 -4
  984. package/src/View/SystemStatus/SystemStatusStatusBarContent.js +1 -1
  985. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +7 -2
  986. package/src/View/SystemStatus/SystemStatusViewPanel.js +2 -2
  987. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -2
  988. package/src/View/TeamSharing/SharedEntityDependencies.js +3 -1
  989. package/src/View/TeamSharing/SharedEntityObjectView.d.ts +2 -3
  990. package/src/View/TeamSharing/SharedEntityObjectView.js +4 -5
  991. package/src/View/Theme/ThemeEditor.js +29 -13
  992. package/src/View/Theme/ThemePopup.d.ts +4 -2
  993. package/src/View/Theme/ThemeStatusbar.d.ts +2 -2
  994. package/src/View/Theme/ThemeViewPanel.d.ts +2 -2
  995. package/src/View/Theme/VariantSelector.js +1 -2
  996. package/src/View/UIHelper.d.ts +2 -2
  997. package/src/View/UIHelper.js +10 -11
  998. package/src/View/Wizard/AdaptableWizard.d.ts +2 -2
  999. package/src/View/Wizard/AdaptableWizard.js +8 -3
  1000. package/src/View/Wizard/ObjectTagsWizardSection.d.ts +3 -3
  1001. package/src/View/Wizard/ObjectTagsWizardSection.js +2 -3
  1002. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +2 -2
  1003. package/src/View/Wizard/OnePageAdaptableWizard.js +30 -11
  1004. package/src/View/Wizard/OnePageWizards.d.ts +1 -1
  1005. package/src/View/Wizard/OnePageWizards.js +40 -34
  1006. package/src/View/Wizard/TypeRadio.d.ts +5 -4
  1007. package/src/View/Wizard/TypeRadio.js +1 -1
  1008. package/src/View/Wizard/useKeyboardNavigation.d.ts +1 -1
  1009. package/src/View/renderWithAdaptableContext.d.ts +2 -1
  1010. package/src/agGrid/Adaptable.d.ts +1 -1
  1011. package/src/agGrid/Adaptable.js +12 -11
  1012. package/src/agGrid/AdaptableAgGrid.d.ts +63 -78
  1013. package/src/agGrid/AdaptableAgGrid.js +820 -1587
  1014. package/src/{AdaptableOptions → agGrid}/AdaptableFrameworkComponent.d.ts +1 -7
  1015. package/src/agGrid/AdaptableLogger.d.ts +1 -0
  1016. package/src/agGrid/AdaptableLogger.js +21 -12
  1017. package/src/agGrid/AgGridAdapter.d.ts +25 -10
  1018. package/src/agGrid/AgGridAdapter.js +329 -204
  1019. package/src/agGrid/AgGridColumnAdapter.d.ts +6 -4
  1020. package/src/agGrid/AgGridColumnAdapter.js +211 -144
  1021. package/src/agGrid/AgGridExportAdapter.d.ts +52 -0
  1022. package/src/agGrid/AgGridExportAdapter.js +778 -0
  1023. package/src/agGrid/AgGridMenuAdapter.d.ts +5 -6
  1024. package/src/agGrid/AgGridMenuAdapter.js +116 -104
  1025. package/src/agGrid/AgGridOptionsService.d.ts +1 -1
  1026. package/src/agGrid/AgGridOptionsService.js +1 -1
  1027. package/src/agGrid/FilterWrapper.js +16 -14
  1028. package/src/agGrid/FloatingFilterWrapper.js +7 -7
  1029. package/src/agGrid/agGridDataTypeDefinitions.d.ts +8 -0
  1030. package/src/agGrid/agGridDataTypeDefinitions.js +77 -0
  1031. package/src/agGrid/agGridModules.d.ts +3 -0
  1032. package/src/agGrid/agGridModules.js +18 -0
  1033. package/src/agGrid/{ActionColumnRenderer.d.ts → cellRenderers/ActionColumnRenderer.d.ts} +3 -3
  1034. package/src/agGrid/{ActionColumnRenderer.js → cellRenderers/ActionColumnRenderer.js} +35 -27
  1035. package/src/agGrid/cellRenderers/BadgeRenderer.d.ts +4 -0
  1036. package/src/agGrid/{BadgeRenderer.js → cellRenderers/BadgeRenderer.js} +28 -19
  1037. package/src/agGrid/cellRenderers/PercentBarRenderer.d.ts +4 -0
  1038. package/src/agGrid/{PercentBarRenderer.js → cellRenderers/PercentBarRenderer.js} +2 -3
  1039. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -8
  1040. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +2 -2
  1041. package/src/agGrid/editors/AdaptableDateEditor/index.js +25 -21
  1042. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +17 -7
  1043. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
  1044. package/src/agGrid/editors/AdaptableNumberEditor/index.js +21 -19
  1045. package/src/agGrid/editors/AdaptablePercentageEditor/InternalAdaptablePercentageEditor.js +10 -7
  1046. package/src/agGrid/editors/AdaptablePercentageEditor/index.d.ts +1 -1
  1047. package/src/agGrid/editors/AdaptablePercentageEditor/index.js +23 -22
  1048. package/src/components/Accordion.js +2 -4
  1049. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +3 -3
  1050. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +22 -28
  1051. package/src/components/CheckBox/index.d.ts +2 -2
  1052. package/src/components/CheckBox/index.js +5 -6
  1053. package/src/components/CodeBlock/index.d.ts +2 -2
  1054. package/src/components/CodeBlock/index.js +1 -1
  1055. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  1056. package/src/components/ColorPicker/ColorPicker.js +5 -6
  1057. package/src/components/Dashboard/Dashboard.d.ts +2 -1
  1058. package/src/components/Dashboard/Dashboard.js +1 -2
  1059. package/src/components/Dashboard/DashboardToolbar.d.ts +2 -1
  1060. package/src/components/Dashboard/DashboardToolbar.js +1 -1
  1061. package/src/components/Datepicker/DatepickerContext.d.ts +2 -0
  1062. package/src/components/Datepicker/index.d.ts +2 -1
  1063. package/src/components/Datepicker/index.js +30 -37
  1064. package/src/components/Dialog/index.js +5 -5
  1065. package/src/components/DragAndDropContext/ModuleManager.js +19 -6
  1066. package/src/components/DragAndDropContext/TabList.d.ts +5 -5
  1067. package/src/components/DragAndDropContext/TabList.js +11 -9
  1068. package/src/components/DragAndDropContext/UnusedPanel.d.ts +2 -2
  1069. package/src/components/DragAndDropContext/UnusedPanel.js +17 -7
  1070. package/src/components/Drawer/index.js +1 -2
  1071. package/src/components/Dropdown/Arrows.d.ts +2 -2
  1072. package/src/components/Dropdown/index.d.ts +1 -1
  1073. package/src/components/Dropdown/index.js +8 -4
  1074. package/src/components/DropdownButton/index.d.ts +3 -1
  1075. package/src/components/DropdownButton/index.js +36 -17
  1076. package/src/components/DropdownButton/renderItem.d.ts +1 -1
  1077. package/src/components/DropdownButton/renderItem.js +2 -2
  1078. package/src/components/EllipsisContainer/index.d.ts +1 -1
  1079. package/src/components/EllipsisContainer/index.js +6 -9
  1080. package/src/components/EmptyContent/index.d.ts +2 -1
  1081. package/src/components/EmptyContent/index.js +2 -3
  1082. package/src/components/ErrorBox/index.d.ts +2 -2
  1083. package/src/components/ErrorBox/index.js +1 -1
  1084. package/src/components/ExpressionEditor/BaseEditorInput.d.ts +2 -1
  1085. package/src/components/ExpressionEditor/BaseEditorInput.js +12 -6
  1086. package/src/components/ExpressionEditor/DataTableEditor.d.ts +2 -2
  1087. package/src/components/ExpressionEditor/DataTableEditor.js +6 -9
  1088. package/src/components/ExpressionEditor/EditorButton.d.ts +2 -2
  1089. package/src/components/ExpressionEditor/EditorButton.js +6 -8
  1090. package/src/components/ExpressionEditor/EditorInput.d.ts +2 -2
  1091. package/src/components/ExpressionEditor/EditorInput.js +4 -1
  1092. package/src/components/ExpressionEditor/EditorInputWithWhereClause.d.ts +2 -2
  1093. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +4 -1
  1094. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.d.ts +2 -2
  1095. package/src/components/ExpressionEditor/ExpressionPreview.js +1 -2
  1096. package/src/components/ExpressionEditor/NamedQueryEditor.d.ts +2 -2
  1097. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +9 -7
  1098. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -6
  1099. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +14 -18
  1100. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +61 -35
  1101. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +1 -2
  1102. package/src/components/ExpressionEditor/QueryBuilder/utils.js +10 -27
  1103. package/src/components/ExpressionEditor/index.d.ts +1 -1
  1104. package/src/components/ExpressionEditor/index.js +20 -24
  1105. package/src/components/FieldWrap/index.d.ts +2 -2
  1106. package/src/components/FieldWrap/index.js +2 -2
  1107. package/src/components/FileDroppable/index.d.ts +1 -1
  1108. package/src/components/FileDroppable/index.js +4 -5
  1109. package/src/components/FileDroppable/reducer.js +18 -5
  1110. package/src/components/Flex.d.ts +1 -0
  1111. package/src/components/Flex.js +5 -0
  1112. package/src/components/FlexWithFooter.d.ts +1 -1
  1113. package/src/components/FlexWithFooter.js +3 -3
  1114. package/src/components/FormLayout/index.d.ts +4 -5
  1115. package/src/components/FormLayout/index.js +7 -3
  1116. package/src/components/HelpBlock/index.d.ts +2 -2
  1117. package/src/components/HelpBlock/index.js +1 -1
  1118. package/src/components/Icon/index.d.ts +2 -2
  1119. package/src/components/Icon/index.js +9 -10
  1120. package/src/components/IconSelector/IconSelector.js +4 -5
  1121. package/src/components/InfiniteTable/index.d.ts +3 -1
  1122. package/src/components/InfiniteTable/index.js +6 -7
  1123. package/src/components/Input/NumberInput.d.ts +1 -1
  1124. package/src/components/Input/NumberInput.js +4 -6
  1125. package/src/components/Input/index.d.ts +1 -1
  1126. package/src/components/Input/index.js +2 -2
  1127. package/src/components/InputGroup/InputGroup.d.ts +1 -1
  1128. package/src/components/InputGroup/InputGroup.js +2 -4
  1129. package/src/components/List/GridList/index.d.ts +2 -1
  1130. package/src/components/List/GridList/index.js +4 -5
  1131. package/src/components/List/ListGroup/index.d.ts +2 -2
  1132. package/src/components/List/ListGroup/index.js +2 -2
  1133. package/src/components/List/ListGroupItem/index.d.ts +2 -3
  1134. package/src/components/List/ListGroupItem/index.js +3 -3
  1135. package/src/components/Logo/index.js +1 -1
  1136. package/src/components/Modal/Backdrop.d.ts +2 -2
  1137. package/src/components/Modal/Backdrop.js +4 -1
  1138. package/src/components/Modal/index.d.ts +1 -0
  1139. package/src/components/Modal/index.js +16 -3
  1140. package/src/components/NotifyResize/index.d.ts +2 -2
  1141. package/src/components/OverlayTrigger/Overlay.js +3 -4
  1142. package/src/components/OverlayTrigger/index.d.ts +1 -0
  1143. package/src/components/OverlayTrigger/index.js +12 -10
  1144. package/src/components/Panel/index.d.ts +3 -1
  1145. package/src/components/Panel/index.js +16 -12
  1146. package/src/components/PopupWithFooter.js +2 -2
  1147. package/src/components/ProgressIndicator/ProgressIndicator.js +2 -1
  1148. package/src/components/Radio/index.d.ts +4 -3
  1149. package/src/components/Radio/index.js +13 -6
  1150. package/src/components/ResizeObserver/index.d.ts +1 -1
  1151. package/src/components/ResizeObserver/index.js +2 -4
  1152. package/src/components/Select/Select.d.ts +17 -1
  1153. package/src/components/Select/Select.js +279 -51
  1154. package/src/components/SelectableList/index.d.ts +2 -1
  1155. package/src/components/SelectableList/index.js +2 -2
  1156. package/src/components/SimpleButton/index.d.ts +1 -1
  1157. package/src/components/SimpleButton/index.js +8 -8
  1158. package/src/components/SizedContainer/index.d.ts +2 -1
  1159. package/src/components/SizedContainer/index.js +3 -3
  1160. package/src/components/StylePreview.js +1 -4
  1161. package/src/components/Table/index.d.ts +2 -1
  1162. package/src/components/Table/index.js +1 -1
  1163. package/src/components/Tabs/index.d.ts +6 -5
  1164. package/src/components/Tabs/index.js +11 -13
  1165. package/src/components/Tag/Tag.js +1 -4
  1166. package/src/components/Textarea/index.d.ts +1 -1
  1167. package/src/components/Textarea/index.js +5 -7
  1168. package/src/components/Toggle/Toggle.js +2 -3
  1169. package/src/components/Tooltip/index.d.ts +1 -1
  1170. package/src/components/WarningBox/index.d.ts +2 -2
  1171. package/src/components/WarningBox/index.js +1 -1
  1172. package/src/components/WindowModal/WindowModal.js +4 -4
  1173. package/src/components/WindowModal/useStacking.js +1 -2
  1174. package/src/components/WizardPanel/index.d.ts +2 -2
  1175. package/src/components/WizardPanel/index.js +1 -1
  1176. package/src/components/dnd/index.d.ts +13 -0
  1177. package/src/components/dnd/index.js +61 -0
  1178. package/src/components/icons/DefaultIcon.d.ts +2 -2
  1179. package/src/components/icons/DefaultIcon.js +6 -4
  1180. package/src/components/icons/add-row.d.ts +2 -2
  1181. package/src/components/icons/add-row.js +1 -1
  1182. package/src/components/icons/alert.d.ts +2 -2
  1183. package/src/components/icons/alert.js +1 -1
  1184. package/src/components/icons/align-center.d.ts +2 -2
  1185. package/src/components/icons/align-center.js +1 -1
  1186. package/src/components/icons/align-justify.d.ts +2 -2
  1187. package/src/components/icons/align-justify.js +1 -1
  1188. package/src/components/icons/align-left.d.ts +2 -2
  1189. package/src/components/icons/align-left.js +1 -1
  1190. package/src/components/icons/align-right.d.ts +2 -2
  1191. package/src/components/icons/align-right.js +1 -1
  1192. package/src/components/icons/analysis.d.ts +2 -2
  1193. package/src/components/icons/analysis.js +1 -1
  1194. package/src/components/icons/application.d.ts +2 -2
  1195. package/src/components/icons/application.js +1 -1
  1196. package/src/components/icons/arrow-down-long.d.ts +2 -2
  1197. package/src/components/icons/arrow-down-long.js +1 -1
  1198. package/src/components/icons/arrow-down.d.ts +2 -2
  1199. package/src/components/icons/arrow-down.js +1 -1
  1200. package/src/components/icons/arrow-expand.d.ts +2 -2
  1201. package/src/components/icons/arrow-expand.js +1 -1
  1202. package/src/components/icons/arrow-left.d.ts +2 -2
  1203. package/src/components/icons/arrow-left.js +1 -1
  1204. package/src/components/icons/arrow-right.d.ts +2 -2
  1205. package/src/components/icons/arrow-right.js +1 -1
  1206. package/src/components/icons/arrow-up-long.d.ts +2 -2
  1207. package/src/components/icons/arrow-up-long.js +1 -1
  1208. package/src/components/icons/arrow-up.d.ts +2 -2
  1209. package/src/components/icons/arrow-up.js +1 -1
  1210. package/src/components/icons/attach-file.d.ts +2 -2
  1211. package/src/components/icons/attach-file.js +1 -1
  1212. package/src/components/icons/badge.d.ts +2 -2
  1213. package/src/components/icons/badge.js +1 -1
  1214. package/src/components/icons/blanks.d.ts +2 -2
  1215. package/src/components/icons/blanks.js +1 -1
  1216. package/src/components/icons/bold.d.ts +2 -2
  1217. package/src/components/icons/bold.js +1 -1
  1218. package/src/components/icons/boolean-list.d.ts +2 -2
  1219. package/src/components/icons/boolean-list.js +1 -1
  1220. package/src/components/icons/brush.d.ts +2 -2
  1221. package/src/components/icons/brush.js +1 -1
  1222. package/src/components/icons/build.d.ts +2 -2
  1223. package/src/components/icons/build.js +1 -1
  1224. package/src/components/icons/bulk-update.d.ts +2 -2
  1225. package/src/components/icons/bulk-update.js +2 -6
  1226. package/src/components/icons/calculated-column.d.ts +2 -2
  1227. package/src/components/icons/calculated-column.js +1 -1
  1228. package/src/components/icons/calendar.d.ts +2 -2
  1229. package/src/components/icons/calendar.js +1 -1
  1230. package/src/components/icons/call.d.ts +2 -2
  1231. package/src/components/icons/call.js +1 -1
  1232. package/src/components/icons/campaign.d.ts +2 -2
  1233. package/src/components/icons/campaign.js +1 -1
  1234. package/src/components/icons/case-lower.d.ts +2 -2
  1235. package/src/components/icons/case-lower.js +1 -1
  1236. package/src/components/icons/case-sentence.d.ts +2 -2
  1237. package/src/components/icons/case-sentence.js +1 -1
  1238. package/src/components/icons/case-upper.d.ts +2 -2
  1239. package/src/components/icons/case-upper.js +1 -1
  1240. package/src/components/icons/cell-summary.d.ts +2 -2
  1241. package/src/components/icons/cell-summary.js +1 -1
  1242. package/src/components/icons/cell-validation.d.ts +2 -2
  1243. package/src/components/icons/cell-validation.js +1 -1
  1244. package/src/components/icons/chart.d.ts +2 -2
  1245. package/src/components/icons/chart.js +1 -1
  1246. package/src/components/icons/chat.d.ts +2 -2
  1247. package/src/components/icons/chat.js +1 -1
  1248. package/src/components/icons/check-box-outline.d.ts +2 -2
  1249. package/src/components/icons/check-box-outline.js +1 -1
  1250. package/src/components/icons/check-box.d.ts +2 -2
  1251. package/src/components/icons/check-box.js +1 -1
  1252. package/src/components/icons/check-circle.d.ts +2 -2
  1253. package/src/components/icons/check-circle.js +1 -1
  1254. package/src/components/icons/check.d.ts +2 -2
  1255. package/src/components/icons/check.js +1 -1
  1256. package/src/components/icons/clone.d.ts +2 -2
  1257. package/src/components/icons/clone.js +1 -1
  1258. package/src/components/icons/close.d.ts +2 -2
  1259. package/src/components/icons/close.js +1 -1
  1260. package/src/components/icons/cloud-upload.d.ts +2 -2
  1261. package/src/components/icons/cloud-upload.js +1 -1
  1262. package/src/components/icons/collapse-all.d.ts +2 -2
  1263. package/src/components/icons/collapse-all.js +1 -1
  1264. package/src/components/icons/collapse.d.ts +2 -2
  1265. package/src/components/icons/collapse.js +1 -1
  1266. package/src/components/icons/column-add.d.ts +2 -2
  1267. package/src/components/icons/column-add.js +1 -1
  1268. package/src/components/icons/column-chooser.d.ts +2 -2
  1269. package/src/components/icons/column-chooser.js +1 -1
  1270. package/src/components/icons/column-filter.d.ts +2 -2
  1271. package/src/components/icons/column-filter.js +1 -1
  1272. package/src/components/icons/column-info.d.ts +2 -2
  1273. package/src/components/icons/column-info.js +1 -1
  1274. package/src/components/icons/column-outline.d.ts +2 -2
  1275. package/src/components/icons/column-outline.js +1 -1
  1276. package/src/components/icons/comment.d.ts +2 -2
  1277. package/src/components/icons/comment.js +1 -1
  1278. package/src/components/icons/comments.d.ts +2 -2
  1279. package/src/components/icons/comments.js +1 -1
  1280. package/src/components/icons/contact.d.ts +2 -2
  1281. package/src/components/icons/contact.js +1 -1
  1282. package/src/components/icons/contains.d.ts +2 -2
  1283. package/src/components/icons/contains.js +2 -2
  1284. package/src/components/icons/copy.d.ts +2 -2
  1285. package/src/components/icons/copy.js +1 -1
  1286. package/src/components/icons/csv.d.ts +2 -2
  1287. package/src/components/icons/csv.js +1 -1
  1288. package/src/components/icons/custom-sort.d.ts +2 -2
  1289. package/src/components/icons/custom-sort.js +1 -1
  1290. package/src/components/icons/dashboard.d.ts +2 -2
  1291. package/src/components/icons/dashboard.js +1 -1
  1292. package/src/components/icons/data-object.d.ts +2 -2
  1293. package/src/components/icons/data-object.js +1 -1
  1294. package/src/components/icons/data-set.d.ts +2 -2
  1295. package/src/components/icons/data-set.js +1 -1
  1296. package/src/components/icons/date-range.d.ts +2 -2
  1297. package/src/components/icons/date-range.js +1 -1
  1298. package/src/components/icons/delete.d.ts +2 -2
  1299. package/src/components/icons/delete.js +1 -1
  1300. package/src/components/icons/division.d.ts +2 -2
  1301. package/src/components/icons/division.js +1 -1
  1302. package/src/components/icons/dock.d.ts +2 -2
  1303. package/src/components/icons/dock.js +1 -1
  1304. package/src/components/icons/dollar.d.ts +2 -2
  1305. package/src/components/icons/dollar.js +1 -1
  1306. package/src/components/icons/drag.d.ts +2 -2
  1307. package/src/components/icons/drag.js +1 -1
  1308. package/src/components/icons/edit.d.ts +2 -2
  1309. package/src/components/icons/edit.js +1 -1
  1310. package/src/components/icons/ends-with.d.ts +2 -2
  1311. package/src/components/icons/ends-with.js +1 -1
  1312. package/src/components/icons/equal.d.ts +2 -2
  1313. package/src/components/icons/equal.js +1 -1
  1314. package/src/components/icons/equation.d.ts +2 -2
  1315. package/src/components/icons/equation.js +1 -1
  1316. package/src/components/icons/error.d.ts +2 -2
  1317. package/src/components/icons/error.js +1 -1
  1318. package/src/components/icons/excel.d.ts +2 -2
  1319. package/src/components/icons/excel.js +1 -1
  1320. package/src/components/icons/expand-all.d.ts +2 -2
  1321. package/src/components/icons/expand-all.js +1 -1
  1322. package/src/components/icons/expand.d.ts +2 -2
  1323. package/src/components/icons/expand.js +1 -1
  1324. package/src/components/icons/exponent.d.ts +2 -2
  1325. package/src/components/icons/exponent.js +1 -1
  1326. package/src/components/icons/export.d.ts +2 -2
  1327. package/src/components/icons/export.js +1 -1
  1328. package/src/components/icons/fast-backward.d.ts +2 -2
  1329. package/src/components/icons/fast-backward.js +1 -1
  1330. package/src/components/icons/fast-forward.d.ts +2 -2
  1331. package/src/components/icons/fast-forward.js +1 -1
  1332. package/src/components/icons/fdc3.d.ts +2 -2
  1333. package/src/components/icons/fdc3.js +1 -1
  1334. package/src/components/icons/filter-off.d.ts +2 -2
  1335. package/src/components/icons/filter-off.js +1 -1
  1336. package/src/components/icons/filter.d.ts +2 -2
  1337. package/src/components/icons/filter.js +1 -1
  1338. package/src/components/icons/flashing-cell.d.ts +2 -2
  1339. package/src/components/icons/flashing-cell.js +1 -1
  1340. package/src/components/icons/folder-open.d.ts +2 -2
  1341. package/src/components/icons/folder-open.js +1 -1
  1342. package/src/components/icons/folder-shared.d.ts +2 -2
  1343. package/src/components/icons/folder-shared.js +1 -1
  1344. package/src/components/icons/folder.d.ts +2 -2
  1345. package/src/components/icons/folder.js +1 -1
  1346. package/src/components/icons/format-column.d.ts +2 -2
  1347. package/src/components/icons/format-column.js +1 -1
  1348. package/src/components/icons/freetext-column.d.ts +2 -2
  1349. package/src/components/icons/freetext-column.js +1 -1
  1350. package/src/components/icons/function.d.ts +2 -2
  1351. package/src/components/icons/function.js +1 -1
  1352. package/src/components/icons/gradient-column.d.ts +2 -2
  1353. package/src/components/icons/gradient-column.js +1 -1
  1354. package/src/components/icons/gradient.d.ts +2 -2
  1355. package/src/components/icons/gradient.js +1 -1
  1356. package/src/components/icons/greater-than-or-equal.d.ts +2 -2
  1357. package/src/components/icons/greater-than-or-equal.js +1 -1
  1358. package/src/components/icons/greater-than.d.ts +2 -2
  1359. package/src/components/icons/greater-than.js +1 -1
  1360. package/src/components/icons/grid-filter.d.ts +2 -2
  1361. package/src/components/icons/grid-filter.js +1 -1
  1362. package/src/components/icons/grid-info.d.ts +2 -2
  1363. package/src/components/icons/grid-info.js +1 -1
  1364. package/src/components/icons/hide-column.d.ts +2 -2
  1365. package/src/components/icons/hide-column.js +1 -1
  1366. package/src/components/icons/history.d.ts +2 -2
  1367. package/src/components/icons/history.js +1 -1
  1368. package/src/components/icons/home.d.ts +2 -2
  1369. package/src/components/icons/home.js +1 -1
  1370. package/src/components/icons/import-export.d.ts +2 -2
  1371. package/src/components/icons/import-export.js +1 -1
  1372. package/src/components/icons/import.d.ts +2 -2
  1373. package/src/components/icons/import.js +1 -1
  1374. package/src/components/icons/index.d.ts +7 -4
  1375. package/src/components/icons/index.js +37 -32
  1376. package/src/components/icons/info.d.ts +2 -2
  1377. package/src/components/icons/info.js +1 -1
  1378. package/src/components/icons/instrument.d.ts +2 -2
  1379. package/src/components/icons/instrument.js +1 -1
  1380. package/src/components/icons/interactions.d.ts +2 -2
  1381. package/src/components/icons/interactions.js +1 -1
  1382. package/src/components/icons/invalid.d.ts +2 -2
  1383. package/src/components/icons/invalid.js +1 -1
  1384. package/src/components/icons/ipushpull.d.ts +2 -2
  1385. package/src/components/icons/ipushpull.js +1 -1
  1386. package/src/components/icons/italic.d.ts +2 -2
  1387. package/src/components/icons/italic.js +1 -1
  1388. package/src/components/icons/justify.d.ts +2 -2
  1389. package/src/components/icons/justify.js +1 -1
  1390. package/src/components/icons/layout.d.ts +2 -2
  1391. package/src/components/icons/layout.js +1 -1
  1392. package/src/components/icons/less-than-or-equal.d.ts +2 -2
  1393. package/src/components/icons/less-than-or-equal.js +1 -1
  1394. package/src/components/icons/less-than.d.ts +2 -2
  1395. package/src/components/icons/less-than.js +1 -1
  1396. package/src/components/icons/list.d.ts +2 -2
  1397. package/src/components/icons/list.js +1 -1
  1398. package/src/components/icons/login.d.ts +2 -2
  1399. package/src/components/icons/login.js +1 -1
  1400. package/src/components/icons/logout copy.d.ts +2 -2
  1401. package/src/components/icons/logout copy.js +1 -1
  1402. package/src/components/icons/logout.d.ts +2 -2
  1403. package/src/components/icons/logout.js +1 -1
  1404. package/src/components/icons/mail.d.ts +2 -2
  1405. package/src/components/icons/mail.js +1 -1
  1406. package/src/components/icons/menu.d.ts +2 -2
  1407. package/src/components/icons/menu.js +1 -1
  1408. package/src/components/icons/minus.d.ts +2 -2
  1409. package/src/components/icons/minus.js +1 -1
  1410. package/src/components/icons/money.d.ts +2 -2
  1411. package/src/components/icons/money.js +1 -1
  1412. package/src/components/icons/multiplication.d.ts +2 -2
  1413. package/src/components/icons/multiplication.js +1 -1
  1414. package/src/components/icons/newpage.d.ts +2 -2
  1415. package/src/components/icons/newpage.js +1 -1
  1416. package/src/components/icons/news.d.ts +2 -2
  1417. package/src/components/icons/news.js +1 -1
  1418. package/src/components/icons/non-blanks.d.ts +2 -2
  1419. package/src/components/icons/non-blanks.js +1 -1
  1420. package/src/components/icons/not-contains.d.ts +2 -2
  1421. package/src/components/icons/not-contains.js +2 -2
  1422. package/src/components/icons/not-equal.d.ts +2 -2
  1423. package/src/components/icons/not-equal.js +1 -1
  1424. package/src/components/icons/note.d.ts +2 -2
  1425. package/src/components/icons/note.js +1 -1
  1426. package/src/components/icons/open-in-new.d.ts +2 -2
  1427. package/src/components/icons/open-in-new.js +1 -1
  1428. package/src/components/icons/order.d.ts +2 -2
  1429. package/src/components/icons/order.js +1 -1
  1430. package/src/components/icons/organisation.d.ts +2 -2
  1431. package/src/components/icons/organisation.js +1 -1
  1432. package/src/components/icons/overline.d.ts +2 -2
  1433. package/src/components/icons/overline.js +1 -1
  1434. package/src/components/icons/pause.d.ts +2 -2
  1435. package/src/components/icons/pause.js +1 -1
  1436. package/src/components/icons/percent-bar.d.ts +2 -2
  1437. package/src/components/icons/percent-bar.js +1 -1
  1438. package/src/components/icons/percent.d.ts +2 -2
  1439. package/src/components/icons/percent.js +1 -1
  1440. package/src/components/icons/person.d.ts +2 -2
  1441. package/src/components/icons/person.js +1 -1
  1442. package/src/components/icons/pie-chart.d.ts +2 -2
  1443. package/src/components/icons/pie-chart.js +1 -1
  1444. package/src/components/icons/play.d.ts +2 -2
  1445. package/src/components/icons/play.js +1 -1
  1446. package/src/components/icons/plus-minus.d.ts +2 -2
  1447. package/src/components/icons/plus-minus.js +1 -1
  1448. package/src/components/icons/plus.d.ts +2 -2
  1449. package/src/components/icons/plus.js +1 -1
  1450. package/src/components/icons/query.d.ts +2 -2
  1451. package/src/components/icons/query.js +1 -1
  1452. package/src/components/icons/quick-search.d.ts +2 -2
  1453. package/src/components/icons/quick-search.js +1 -1
  1454. package/src/components/icons/quote.d.ts +2 -2
  1455. package/src/components/icons/quote.js +1 -1
  1456. package/src/components/icons/refresh.d.ts +2 -2
  1457. package/src/components/icons/refresh.js +1 -1
  1458. package/src/components/icons/regex.d.ts +2 -2
  1459. package/src/components/icons/regex.js +1 -1
  1460. package/src/components/icons/reminder.d.ts +2 -2
  1461. package/src/components/icons/reminder.js +1 -1
  1462. package/src/components/icons/resume.d.ts +2 -2
  1463. package/src/components/icons/resume.js +1 -1
  1464. package/src/components/icons/rows.d.ts +2 -2
  1465. package/src/components/icons/rows.js +1 -1
  1466. package/src/components/icons/save.d.ts +2 -2
  1467. package/src/components/icons/save.js +1 -1
  1468. package/src/components/icons/schedule.d.ts +2 -2
  1469. package/src/components/icons/schedule.js +1 -1
  1470. package/src/components/icons/science.d.ts +2 -2
  1471. package/src/components/icons/science.js +1 -1
  1472. package/src/components/icons/select-all.d.ts +2 -2
  1473. package/src/components/icons/select-all.js +1 -1
  1474. package/src/components/icons/select-fwd.d.ts +2 -2
  1475. package/src/components/icons/select-fwd.js +1 -1
  1476. package/src/components/icons/select-off.d.ts +2 -2
  1477. package/src/components/icons/select-off.js +1 -1
  1478. package/src/components/icons/settings.d.ts +2 -2
  1479. package/src/components/icons/settings.js +1 -1
  1480. package/src/components/icons/shortcut.d.ts +2 -2
  1481. package/src/components/icons/shortcut.js +1 -1
  1482. package/src/components/icons/show-column.d.ts +2 -2
  1483. package/src/components/icons/show-column.js +1 -1
  1484. package/src/components/icons/smart-edit.d.ts +2 -2
  1485. package/src/components/icons/smart-edit.js +1 -1
  1486. package/src/components/icons/sort-asc.d.ts +2 -2
  1487. package/src/components/icons/sort-asc.js +1 -1
  1488. package/src/components/icons/sort-desc.d.ts +2 -2
  1489. package/src/components/icons/sort-desc.js +1 -1
  1490. package/src/components/icons/spark-line.d.ts +2 -2
  1491. package/src/components/icons/spark-line.js +1 -1
  1492. package/src/components/icons/starts-with.d.ts +2 -2
  1493. package/src/components/icons/starts-with.js +1 -1
  1494. package/src/components/icons/state-management.d.ts +2 -2
  1495. package/src/components/icons/state-management.js +1 -1
  1496. package/src/components/icons/statusbar.d.ts +2 -2
  1497. package/src/components/icons/statusbar.js +1 -1
  1498. package/src/components/icons/stop.d.ts +2 -2
  1499. package/src/components/icons/stop.js +1 -1
  1500. package/src/components/icons/strikethrough.d.ts +2 -2
  1501. package/src/components/icons/strikethrough.js +1 -1
  1502. package/src/components/icons/styled-grid.d.ts +3 -0
  1503. package/src/components/icons/styled-grid.js +8 -0
  1504. package/src/components/icons/sync.d.ts +2 -2
  1505. package/src/components/icons/sync.js +1 -1
  1506. package/src/components/icons/system-status.d.ts +2 -2
  1507. package/src/components/icons/system-status.js +1 -1
  1508. package/src/components/icons/tab-unselected.d.ts +2 -2
  1509. package/src/components/icons/tab-unselected.js +1 -1
  1510. package/src/components/icons/table-arrow-right.d.ts +2 -2
  1511. package/src/components/icons/table-arrow-right.js +1 -1
  1512. package/src/components/icons/team-share.d.ts +2 -2
  1513. package/src/components/icons/team-share.js +1 -1
  1514. package/src/components/icons/theme.d.ts +2 -2
  1515. package/src/components/icons/theme.js +1 -1
  1516. package/src/components/icons/tool-panel.d.ts +2 -2
  1517. package/src/components/icons/tool-panel.js +1 -1
  1518. package/src/components/icons/track-changes.d.ts +2 -2
  1519. package/src/components/icons/track-changes.js +1 -1
  1520. package/src/components/icons/triangle-down.d.ts +2 -2
  1521. package/src/components/icons/triangle-down.js +1 -1
  1522. package/src/components/icons/triangle-up.d.ts +2 -2
  1523. package/src/components/icons/triangle-up.js +1 -1
  1524. package/src/components/icons/unchecked.d.ts +2 -2
  1525. package/src/components/icons/unchecked.js +1 -1
  1526. package/src/components/icons/underline.d.ts +2 -2
  1527. package/src/components/icons/underline.js +1 -1
  1528. package/src/components/icons/undo.d.ts +2 -2
  1529. package/src/components/icons/undo.js +1 -1
  1530. package/src/components/icons/updated-row.d.ts +2 -2
  1531. package/src/components/icons/updated-row.js +1 -1
  1532. package/src/components/icons/upload.d.ts +2 -2
  1533. package/src/components/icons/upload.js +1 -1
  1534. package/src/components/icons/user-filter.d.ts +2 -2
  1535. package/src/components/icons/user-filter.js +1 -1
  1536. package/src/components/icons/visibility-off.d.ts +2 -2
  1537. package/src/components/icons/visibility-off.js +1 -1
  1538. package/src/components/icons/visibility.d.ts +2 -2
  1539. package/src/components/icons/visibility.js +1 -1
  1540. package/src/components/icons/warning.d.ts +2 -2
  1541. package/src/components/icons/warning.js +1 -1
  1542. package/src/components/utils/useContainerScrollObserver/index.js +1 -2
  1543. package/src/components/utils/useDraggable.d.ts +1 -1
  1544. package/src/components/utils/useDraggable.js +2 -3
  1545. package/src/components/utils/useLatest.d.ts +1 -1
  1546. package/src/components/utils/useProperty.d.ts +1 -1
  1547. package/src/components/utils/useSelectionRange.js +1 -1
  1548. package/src/env.d.ts +1 -1
  1549. package/src/env.js +3 -3
  1550. package/src/layout-manager/src/LMEmitter.d.ts +25 -0
  1551. package/src/layout-manager/src/LMEmitter.js +59 -0
  1552. package/src/layout-manager/src/LMLogger.d.ts +20 -0
  1553. package/src/layout-manager/src/LMLogger.js +66 -0
  1554. package/src/layout-manager/src/LayoutManagerModel.d.ts +111 -0
  1555. package/src/layout-manager/src/index.d.ts +75 -0
  1556. package/src/layout-manager/src/index.js +1046 -0
  1557. package/src/layout-manager/src/isLayoutEqual.d.ts +4 -0
  1558. package/src/layout-manager/src/isLayoutEqual.js +32 -0
  1559. package/src/layout-manager/src/isPivotLayoutModel.d.ts +2 -0
  1560. package/src/layout-manager/src/isPivotLayoutModel.js +7 -0
  1561. package/src/layout-manager/src/normalizeLayoutModel.d.ts +12 -0
  1562. package/src/layout-manager/src/normalizeLayoutModel.js +158 -0
  1563. package/src/layout-manager/src/simplifyLayoutModel.d.ts +4 -0
  1564. package/src/layout-manager/src/simplifyLayoutModel.js +88 -0
  1565. package/src/layout-manager/src/sortColumnIdsByOrder.d.ts +7 -0
  1566. package/src/layout-manager/src/sortColumnIdsByOrder.js +89 -0
  1567. package/src/metamodel/adaptable.metamodel.d.ts +428 -574
  1568. package/src/metamodel/adaptable.metamodel.js +1 -1
  1569. package/src/migration/AdaptableUpgradeHelper.js +5 -4
  1570. package/src/migration/VersionUpgrade17.js +56 -50
  1571. package/src/migration/VersionUpgrade20.d.ts +7 -0
  1572. package/src/migration/VersionUpgrade20.js +134 -0
  1573. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  1574. package/src/parser/src/predicate/mapQlPredicateToExpression.d.ts +1 -1
  1575. package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -2
  1576. package/src/parser/src/predicate/types.d.ts +11 -1
  1577. package/src/parser/src/types.d.ts +6 -2
  1578. package/src/parser/src/types.js +1 -1
  1579. package/src/renderReactRoot.d.ts +3 -3
  1580. package/src/types.d.ts +32 -31
  1581. package/tsconfig.cjs.tsbuildinfo +1 -1
  1582. package/src/AdaptableOptions/ActionRowOptions.d.ts +0 -175
  1583. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +0 -311
  1584. package/src/AdaptableOptions/GridFilterOptions.d.ts +0 -26
  1585. package/src/AdaptableOptions/GroupingOptions.d.ts +0 -19
  1586. package/src/Api/ActionRowApi.d.ts +0 -24
  1587. package/src/Api/Events/ActionRowSubmitted.d.ts +0 -54
  1588. package/src/Api/Events/AdaptableSearchState.d.ts +0 -22
  1589. package/src/Api/Events/BaseEventInfo.d.ts +0 -18
  1590. package/src/Api/Events/GridDataChanged.d.ts +0 -26
  1591. package/src/Api/Implementation/ActionRowApiImpl.d.ts +0 -12
  1592. package/src/Api/Internal/ActionRowInternalApi.d.ts +0 -29
  1593. package/src/Api/Internal/ActionRowInternalApi.js +0 -285
  1594. package/src/PredefinedConfig/GridState.d.ts +0 -23
  1595. package/src/PredefinedConfig/SystemState.d.ts +0 -110
  1596. package/src/Redux/ActionsReducers/GridRedux.d.ts +0 -224
  1597. package/src/Redux/ActionsReducers/GridRedux.js +0 -433
  1598. package/src/Redux/ActionsReducers/SystemRedux.d.ts +0 -330
  1599. package/src/Redux/ActionsReducers/SystemRedux.js +0 -787
  1600. package/src/Redux/DeadRedux.d.ts +0 -27
  1601. package/src/Redux/DeadRedux.js +0 -85
  1602. package/src/Strategy/Interface/IExportModule.d.ts +0 -6
  1603. package/src/Strategy/Interface/IShortcutModule.js +0 -2
  1604. package/src/Strategy/Utilities/getExpressionViewItems.d.ts +0 -4
  1605. package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +0 -4
  1606. package/src/Strategy/Utilities/getRuleViewItems.js +0 -15
  1607. package/src/Strategy/Utilities/getScopeViewItems.d.ts +0 -3
  1608. package/src/Utilities/Constants/ConfigConstants.d.ts +0 -10
  1609. package/src/Utilities/Constants/ConfigConstants.js +0 -14
  1610. package/src/Utilities/Constants/FilterConstants.d.ts +0 -10
  1611. package/src/Utilities/Constants/FilterConstants.js +0 -11
  1612. package/src/Utilities/Services/RowEditService.js +0 -39
  1613. package/src/Utilities/divideBy100.d.ts +0 -1
  1614. package/src/Utilities/divideBy100.js +0 -34
  1615. package/src/Utilities/times100.d.ts +0 -1
  1616. package/src/Utilities/times100.js +0 -27
  1617. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.d.ts +0 -6
  1618. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +0 -35
  1619. package/src/View/Components/FilterForm/FilterForm.d.ts +0 -18
  1620. package/src/View/Components/FilterForm/FilterForm.js +0 -298
  1621. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +0 -7
  1622. package/src/View/Components/FilterForm/QuickFilterForm.js +0 -255
  1623. package/src/View/Components/FilterForm/QuickFilterValues.d.ts +0 -19
  1624. package/src/View/Components/FilterForm/QuickFilterValues.js +0 -201
  1625. package/src/View/Components/Panels/FilterFormPanel.d.ts +0 -22
  1626. package/src/View/Components/Panels/FilterFormPanel.js +0 -41
  1627. package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +0 -8
  1628. package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +0 -27
  1629. package/src/View/Components/PermittedValuesSelector/index.d.ts +0 -1
  1630. package/src/View/Components/PermittedValuesSelector/index.js +0 -5
  1631. package/src/View/Export/ExportSelector.d.ts +0 -4
  1632. package/src/View/Export/ExportSelector.js +0 -75
  1633. package/src/View/Export/ExportTablePopup.d.ts +0 -3
  1634. package/src/View/Export/ExportTablePopup.js +0 -61
  1635. package/src/View/Export/ReportExportDropdown.js +0 -39
  1636. package/src/View/Export/constants.d.ts +0 -2
  1637. package/src/View/Export/constants.js +0 -5
  1638. package/src/View/Layout/SaveLayoutButton.d.ts +0 -2
  1639. package/src/View/Layout/SaveLayoutButton.js +0 -29
  1640. package/src/agGrid/BadgeRenderer.d.ts +0 -4
  1641. package/src/agGrid/ColumnSetupInfo.d.ts +0 -8
  1642. package/src/agGrid/PercentBarRenderer.d.ts +0 -4
  1643. package/src/agGrid/attachAddaptableColumnTypes.d.ts +0 -16
  1644. package/src/agGrid/attachAddaptableColumnTypes.js +0 -23
  1645. package/src/components/Datepicker/Caption.d.ts +0 -7
  1646. package/src/components/Datepicker/Caption.js +0 -47
  1647. package/src/components/Datepicker/CaptionLabel.d.ts +0 -8
  1648. package/src/components/Datepicker/CaptionLabel.js +0 -25
  1649. /package/src/AdaptableOptions/{ActionRowOptions.js → FilterOptions.js} +0 -0
  1650. /package/src/AdaptableOptions/{AdaptableFrameworkComponent.js → RowFormOptions.js} +0 -0
  1651. /package/src/{AdaptableOptions/ColumnFilterOptions.js → Api/Events/RowChanged.js} +0 -0
  1652. /package/src/{AdaptableOptions/GridFilterOptions.js → Api/Events/RowFormSubmitted.js} +0 -0
  1653. /package/src/{AdaptableOptions/GroupingOptions.js → Api/FilterApi.js} +0 -0
  1654. /package/src/Api/{ActionRowApi.js → RowFormApi.js} +0 -0
  1655. /package/src/{Api/Events/ActionRowSubmitted.js → PredefinedConfig/Common/AdaptableColumnContext.js} +0 -0
  1656. /package/src/{Api/Events/AdaptableSearchState.js → PredefinedConfig/Common/AdaptableSortState.js} +0 -0
  1657. /package/src/{agGrid → PredefinedConfig/Common}/ColumnSetupInfo.js +0 -0
  1658. /package/src/{Api/Events/BaseEventInfo.js → PredefinedConfig/Common/RowDataChangedInfo.js} +0 -0
  1659. /package/src/{Api/Events/GridDataChanged.js → Strategy/Interface/ICellDataChangeListenerModule.js} +0 -0
  1660. /package/src/{PredefinedConfig/GridState.js → Strategy/Interface/IKeyDownListenerModule.js} +0 -0
  1661. /package/src/{Strategy/Utilities → Utilities}/getScopeViewItems.js +0 -0
  1662. /package/src/{agGrid → Utilities}/sortColumnStateForVisibleColumns.d.ts +0 -0
  1663. /package/src/{agGrid → Utilities}/sortColumnStateForVisibleColumns.js +0 -0
  1664. /package/src/{Strategy/Utilities → Utilities}/updateSingleToMultiplePredicates.d.ts +0 -0
  1665. /package/src/{PredefinedConfig/SystemState.js → agGrid/AdaptableFrameworkComponent.js} +0 -0
  1666. /package/src/{Strategy/Interface/IExportModule.js → layout-manager/src/LayoutManagerModel.js} +0 -0
@@ -4,7 +4,7 @@ exports.AdaptableAgGrid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
6
6
  const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
7
- const core_1 = require("ag-grid-community");
7
+ const ag_grid_enterprise_1 = require("ag-grid-enterprise");
8
8
  const AdaptableLogger_1 = require("./AdaptableLogger");
9
9
  const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
10
10
  const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
@@ -17,7 +17,7 @@ const DataService_1 = require("../Utilities/Services/DataService");
17
17
  const AdaptableStore_1 = require("../Redux/Store/AdaptableStore");
18
18
  const AdaptableApiImpl_1 = require("../Api/Implementation/AdaptableApiImpl");
19
19
  const Fdc3Service_1 = require("../Utilities/Services/Fdc3Service");
20
- const CellPopupService_1 = require("../Utilities/Services/CellPopupService");
20
+ const AnnotationsService_1 = require("../Utilities/Services/AnnotationsService");
21
21
  const ChartingService_1 = require("../Utilities/Services/ChartingService");
22
22
  const ThemeService_1 = require("../Utilities/Services/ThemeService");
23
23
  const ValidationService_1 = require("../Utilities/Services/ValidationService");
@@ -72,7 +72,6 @@ const uuid_1 = require("../components/utils/uuid");
72
72
  const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
73
73
  const AdaptableToolPanel_1 = require("../View/Components/ToolPanel/AdaptableToolPanel");
74
74
  const StatusBarState_1 = require("../PredefinedConfig/StatusBarState");
75
- const createAgStatusPanelComponent_1 = require("./createAgStatusPanelComponent");
76
75
  const AdaptableStatusBar_1 = require("../View/StatusBar/AdaptableStatusBar");
77
76
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
78
77
  const AgGridMenuAdapter_1 = require("./AgGridMenuAdapter");
@@ -81,46 +80,33 @@ const renderReactRoot_1 = require("../renderReactRoot");
81
80
  const AgGridOptionsService_1 = require("./AgGridOptionsService");
82
81
  const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
83
82
  const AgGridColumnAdapter_1 = require("./AgGridColumnAdapter");
84
- const uniqBy_1 = tslib_1.__importDefault(require("lodash/uniqBy"));
85
83
  const getScrollbarSize_1 = tslib_1.__importDefault(require("../Utilities/getScrollbarSize"));
86
84
  const AggregationColumns_1 = require("../PredefinedConfig/Common/AggregationColumns");
87
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
88
- const RowEditService_1 = require("../Utilities/Services/RowEditService");
89
- const weightedAverage_1 = require("./weightedAverage");
85
+ const RowFormService_1 = require("../Utilities/Services/RowFormService");
90
86
  const Enums_1 = require("../PredefinedConfig/Common/Enums");
91
- const ObjectFactory_1 = tslib_1.__importStar(require("../Utilities/ObjectFactory"));
92
87
  const EnvVars_1 = require("../EnvVars");
93
88
  const AdaptableUpgradeHelper_1 = require("../migration/AdaptableUpgradeHelper");
94
89
  const Modal_1 = require("../components/Modal");
95
90
  const AdaptableLoadingScreen_1 = require("../View/Components/Popups/AdaptableLoadingScreen");
96
91
  const react_1 = require("react");
97
- const AdaptableHelper_1 = require("../Utilities/Helpers/AdaptableHelper");
98
- const buildSortedColumnStateForLayout_1 = require("./buildSortedColumnStateForLayout");
92
+ const createAgStatusPanelComponent_1 = require("../Utilities/createAgStatusPanelComponent");
93
+ const weightedAverage_1 = require("../Utilities/weightedAverage");
99
94
  const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
100
95
  const FlashingCellService_1 = require("../Utilities/Services/FlashingCellService");
101
- const LocalEventService_Prototype = core_1.LocalEventService.prototype;
96
+ const AgGridExportAdapter_1 = require("./AgGridExportAdapter");
97
+ const LayoutHelpers_1 = require("../Api/Implementation/LayoutHelpers");
98
+ const src_1 = require("../layout-manager/src");
99
+ const isPivotLayoutModel_1 = require("../layout-manager/src/isPivotLayoutModel");
100
+ const AdaptableColumn_1 = require("../PredefinedConfig/Common/AdaptableColumn");
101
+ const agGridDataTypeDefinitions_1 = require("./agGridDataTypeDefinitions");
102
+ const LocalEventService_Prototype = ag_grid_enterprise_1.LocalEventService.prototype;
102
103
  const LocalEventService_dispatchEvent = LocalEventService_Prototype.dispatchEvent;
103
- const GridOptionsService_updateGridOptions = core_1.GridOptionsService.prototype.updateGridOptions;
104
- const EventService_Prototype = core_1.EventService.prototype;
105
- const EventService_wireBeans = EventService_Prototype.wireBeans;
106
- // AG GRID obfuscates its internals, this is (currently) the best way to get hold of its internal services
107
- const DANGER_AG_GRID_BEANS_MAP = {};
108
- EventService_Prototype.wireBeans = function (beans) {
109
- var _a;
110
- EventService_wireBeans.apply(this, arguments);
111
- const gridId = (_a = beans === null || beans === void 0 ? void 0 : beans.context) === null || _a === void 0 ? void 0 : _a.getGridId();
112
- if (!gridId) {
113
- console.error('CRITICAL: No gridId found in beans, this should never happen!');
114
- }
115
- DANGER_AG_GRID_BEANS_MAP[gridId] = beans;
116
- };
117
104
  LocalEventService_Prototype.dispatchEvent = function (event) {
118
105
  LocalEventService_dispatchEvent.apply(this, arguments);
119
106
  if (event.type === 'cellChanged' || event.type === 'dataChanged') {
120
107
  const eventRowNode = event.node;
121
108
  const extractGridApiFromRowNode = (rowNode) => {
122
- var _a;
123
- const rowNodeApi = (_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.beans) === null || _a === void 0 ? void 0 : _a.gridApi;
109
+ const rowNodeApi = rowNode?.beans?.gridApi;
124
110
  if (!rowNodeApi) {
125
111
  AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No GridAPI found in passed RowNode, this should never happen!`, rowNode);
126
112
  }
@@ -130,8 +116,7 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
130
116
  // as this fn is shared by all instances
131
117
  if (eventRowNode) {
132
118
  AdaptableAgGrid.forEachAdaptable((adaptable) => {
133
- var _a;
134
- if (extractGridApiFromRowNode(eventRowNode) !== ((_a = adaptable.agGridAdapter) === null || _a === void 0 ? void 0 : _a.getAgGridApi(true))) {
119
+ if (extractGridApiFromRowNode(eventRowNode) !== adaptable.agGridAdapter?.getAgGridApi(true)) {
135
120
  // the event is coming from another aggrid instance
136
121
  // so IGNORE IT
137
122
  return;
@@ -149,19 +134,15 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
149
134
  const adaptableInstances = {};
150
135
  const publishTimestamp = Number(EnvVars_1.ADAPTABLE_PUBLISH_TIMESTAMP);
151
136
  class AdaptableAgGrid {
152
- constructor() {
137
+ constructor(config) {
153
138
  /**
154
139
  * once layouts are properly handled with the new aggrid methods & events
155
140
  * we can remove this hack
156
141
  */
157
142
  this.previousAgGridLayoutState = '';
143
+ this.filteredOutPrimaryKeys = new Set();
158
144
  this.columnMinMaxValuesCache = {};
159
145
  this.renderReactRoot = (node, container) => (0, renderReactRoot_1.renderReactRoot)(node, container);
160
- /**
161
- * do NOT mutate this array reference, this is passed only initially to AG Grid and we can only change it's internal state
162
- */
163
- this.DANGER_excelStyles = [];
164
- this.originalExcelStyles = [];
165
146
  /**
166
147
  * Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
167
148
  */
@@ -193,9 +174,10 @@ class AdaptableAgGrid {
193
174
  this.lifecycleState = 'initial';
194
175
  this.emitter = new Emitter_1.default();
195
176
  this.agGridOptionsService = new AgGridOptionsService_1.AgGridOptionsService(this);
196
- this.agGridAdapter = new AgGridAdapter_1.AgGridAdapter(this);
177
+ this.agGridAdapter = new AgGridAdapter_1.AgGridAdapter(this, config);
197
178
  this.agGridMenuAdapter = new AgGridMenuAdapter_1.AgGridMenuAdapter(this);
198
179
  this.agGridColumnAdapter = new AgGridColumnAdapter_1.AgGridColumnAdapter(this);
180
+ this.agGridExportAdapter = new AgGridExportAdapter_1.AgGridExportAdapter(this);
199
181
  this.DataService = new DataService_1.DataService(this);
200
182
  }
201
183
  static forEachAdaptable(fn) {
@@ -261,17 +243,20 @@ class AdaptableAgGrid {
261
243
  };
262
244
  if (promise && promise.then) {
263
245
  return promise.then(() => {
264
- const adaptableInstance = new AdaptableAgGrid();
246
+ const adaptableInstance = new AdaptableAgGrid({
247
+ getAgGridColumnApiModuleReference: config.getAgGridColumnApiModuleReference,
248
+ });
265
249
  return doInit(adaptableInstance);
266
250
  });
267
251
  }
268
252
  else {
269
- const adaptableInstance = new AdaptableAgGrid();
253
+ const adaptableInstance = new AdaptableAgGrid({
254
+ getAgGridColumnApiModuleReference: config.getAgGridColumnApiModuleReference,
255
+ });
270
256
  return doInit(adaptableInstance);
271
257
  }
272
258
  }
273
259
  async _initAdaptableAgGrid(config) {
274
- var _a, _b;
275
260
  // Phase 1: Preprocess Adaptable Options
276
261
  this._isDetailGrid = config.isDetailGrid === true;
277
262
  this._isDetailGridForIndex = config.isDetailGridForRowIndex;
@@ -280,7 +265,7 @@ class AdaptableAgGrid {
280
265
  if (StringExtensions_1.default.IsNullOrEmptyOrWhiteSpace(this._rawAdaptableOptions.adaptableId)) {
281
266
  this._rawAdaptableOptions.adaptableId = `adaptable_id_${Date.now()}`;
282
267
  }
283
- this.logger = (_a = this.logger) !== null && _a !== void 0 ? _a : new AdaptableLogger_1.AdaptableLogger(this._rawAdaptableOptions.adaptableId);
268
+ this.logger = this.logger ?? new AdaptableLogger_1.AdaptableLogger(this._rawAdaptableOptions.adaptableId);
284
269
  const perfInitAdaptableAgGrid = this.logger.beginPerf(`Adaptable._initAdaptableAgGrid()`);
285
270
  AdaptableAgGrid.collectInstance(this, this._rawAdaptableOptions.adaptableId);
286
271
  this.variant = config.variant;
@@ -289,10 +274,15 @@ class AdaptableAgGrid {
289
274
  this.hasAutogeneratedPrimaryKey = !!this._rawAdaptableOptions.autogeneratePrimaryKey;
290
275
  this.adaptableOptions = (0, DefaultAdaptableOptions_1.applyDefaultAdaptableOptions)(this._rawAdaptableOptions);
291
276
  this.adaptableOptions = this.normalizeAdaptableOptions(this.adaptableOptions);
292
- const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions;
277
+ const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions.loadingScreenOptions;
293
278
  if (showLoadingScreen) {
294
279
  this.logger.info(`Show Loading Screen`);
295
- const portalElement = (0, Modal_1.ensurePortalElement)();
280
+ // it's important to use ensureLoadingScreenPortalElement
281
+ // and not ensurePortalElement, because multiple adaptable instances share the same portal element
282
+ // so when displaying the second one, the react root associated to the portal element
283
+ // seems to be somewhat shared via the html element, so the portal element of the first one is destroyed
284
+ // resulting in the settings popup not being displayed anymore
285
+ const portalElement = (0, Modal_1.ensureLoadingScreenPortalElement)();
296
286
  if (portalElement) {
297
287
  this.unmountLoadingScreen = this.renderReactRoot((0, react_1.createElement)(AdaptableLoadingScreen_1.AdaptableLoadingScreen, {
298
288
  showLoadingScreen,
@@ -327,7 +317,7 @@ class AdaptableAgGrid {
327
317
  /**
328
318
  * This method is called after the store is loaded;
329
319
  * it allows to modify the state before it is used by the application
330
- * e.g. adding default Layout, migrating deprecated state, etc.
320
+ * e.g. migrating deprecated state, etc.
331
321
  */
332
322
  postLoadHook: (state) => {
333
323
  if (this.adaptableOptions.stateOptions.autoMigrateState) {
@@ -357,10 +347,20 @@ class AdaptableAgGrid {
357
347
  this.lifecycleState = 'setupAgGrid';
358
348
  const gridOptions = config.gridOptions;
359
349
  // Needed here because special column defs are required for deriving the adaptable column state
360
- const columnDefs = this.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
350
+ const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
361
351
  gridOptions.columnDefs = columnDefs;
362
352
  this.setInitialGridOptions(gridOptions, config.variant);
363
- gridOptions.initialState = this.mapAdaptableStateToAgGridState(this.adaptableStore.TheStore.getState(), gridOptions.columnDefs);
353
+ const { gridState: initialGridState, layoutModel } = this.mapAdaptableStateToAgGridState(this.adaptableStore.TheStore.getState(), gridOptions.columnDefs, { isTree: !!gridOptions.treeData });
354
+ gridOptions.initialState = initialGridState;
355
+ if (layoutModel) {
356
+ if ((0, isPivotLayoutModel_1.isPivotLayoutModel)(layoutModel)) {
357
+ gridOptions.pivotDefaultExpanded = layoutModel.PivotExpandLevel;
358
+ }
359
+ else {
360
+ gridOptions.groupDisplayType =
361
+ layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
362
+ }
363
+ }
364
364
  this.lifecycleState = 'initAgGrid';
365
365
  this.agGridAdapter.initialGridOptions = gridOptions;
366
366
  const perfInitAgGrid = this.logger.beginPerf(`initAgGrid()`);
@@ -372,14 +372,40 @@ class AdaptableAgGrid {
372
372
  this.logger.consoleError(`Adaptable failed to initialize AG Grid!`);
373
373
  return Promise.reject('Adaptable failed to initialize AG Grid!');
374
374
  }
375
+ this.layoutManager = new src_1.LayoutManager({
376
+ gridApi: agGridApi,
377
+ debugId: this.adaptableOptions.adaptableId,
378
+ });
379
+ this.layoutManager.silentSetCurrentLayout(layoutModel, {
380
+ normalize: true,
381
+ });
382
+ // this shouldn't be needed
383
+ // but AG Grid has a bug, and in pivot layout,
384
+ // even if we provide an initial AG Grid state with
385
+ // the aggregations in the correct order,
386
+ // they will end up in the wrong order
387
+ // so we need to force the layout to be applied again
388
+ if ((0, isPivotLayoutModel_1.isPivotLayoutModel)(layoutModel)) {
389
+ this.layoutManager.setLayout(layoutModel, {
390
+ force: true,
391
+ });
392
+ }
393
+ this.layoutManager.onChange((layoutModel) => {
394
+ const currentLayout = this.api.layoutApi.getCurrentLayout();
395
+ const newLayoutObject = (0, LayoutHelpers_1.layoutModelToLayoutState)(layoutModel, currentLayout);
396
+ this.onLayoutChange(newLayoutObject);
397
+ });
398
+ this.layoutManager.onColumnDefsChanged(() => {
399
+ this.updateColumnModelAndRefreshGrid();
400
+ });
375
401
  this.logger.info(`Hide Loading Screen`);
376
- (_b = this.unmountLoadingScreen) === null || _b === void 0 ? void 0 : _b.call(this);
402
+ this.unmountLoadingScreen?.();
377
403
  perfInitAgGrid.end();
378
404
  // we need to intercept several AG Grid Api methods and trigger Adaptale state changes
379
- this.monkeyPatchingGridOptionsUpdates(agGridApi);
380
405
  this.agGridAdapter.setAgGridApi(agGridApi);
406
+ this.agGridAdapter.monkeyPatchingGridOptionsUpdates(agGridApi);
381
407
  this.lifecycleState = 'agGridReady';
382
- this.logger.info(`Registered AG Grid modules: `, this.agGridAdapter.getRegisteredModuleNames().sort());
408
+ this.logger.info(`Registered AG Grid modules: `, this.agGridAdapter.getAgGridRegisteredModuleNames().sort());
383
409
  /**
384
410
  * At this point AG Grid is initialized!
385
411
  */
@@ -389,17 +415,17 @@ class AdaptableAgGrid {
389
415
  this.lifecycleState = 'available';
390
416
  this.api.themeApi.applyCurrentTheme();
391
417
  this.validatePrimaryKey();
392
- this.embedColumnMenu = this.agGridAdapter.isModulePresent(core_1.ModuleNames.MenuModule);
393
- this.api.internalApi.setTreeMode(!!this.agGridAdapter.getAgGridApi().getGridOption('treeData'));
394
418
  // TODO AFL MIG: we could just patch the defautl Layout on init? instead
395
419
  this.checkShouldClearExistingFiltersOrSearches();
396
- this.applyColumnFiltering();
420
+ this.applyFiltering();
397
421
  this.addGridEventListeners();
398
422
  this.temporaryAdaptableStateUpdates();
399
423
  this.redrawBody();
400
424
  this.refreshHeader();
401
425
  const currentLayout = this.api.layoutApi.getCurrentLayout();
402
- if (currentLayout.EnablePivot) {
426
+ (0, LayoutHelpers_1.checkForDuplicateColumns)(currentLayout);
427
+ this.layoutManager.silentSetCurrentLayout((0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout));
428
+ if ((0, LayoutHelpers_1.isPivotLayout)(currentLayout)) {
403
429
  // this is very very strange!
404
430
  // for some projects, if the initial layout is pivot, the columnDefs of the pivot resutl columns are NOT derived correctly from the main colDefs
405
431
  // doing the following line fixes the issue because it foces the pivot columns to be created again
@@ -407,12 +433,16 @@ class AdaptableAgGrid {
407
433
  // but this proj needs the hack: /tests/pages/format-column/initial-pivot-layout-docs.page.tsx
408
434
  this.agGridAdapter.setGridOption('pivotMode', false);
409
435
  this.agGridAdapter.setGridOption('pivotMode', true);
436
+ // also quick search is not working initially, although the setupColumns is called correctly
437
+ // so we need to do this to make it work
438
+ // see test /tests/pages/quick-search/pivot-search.spec.ts
439
+ this.updateColumnModelAndRefreshGrid();
410
440
  }
411
- // create the module menu (for use in the dashboard and the toolpanel)
412
- // TODO see #create-create-module-menu - make sure it's the same here and there
413
- this.ModuleService.createModuleMenus();
414
- // update initial mode of DataChangeHistory
415
- this.api.internalApi.initializeDataChangeHistory();
441
+ else {
442
+ this.layoutManager.applyRowGroupValues((0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout).RowGroupValues);
443
+ }
444
+ this.autoSizeLayoutIfNeeded();
445
+ this.ModuleService.createModuleUIItems();
416
446
  const adaptableContainerElem = this.getAdaptableContainerElement();
417
447
  if (adaptableContainerElem != null) {
418
448
  adaptableContainerElem.innerHTML = '';
@@ -433,13 +463,12 @@ class AdaptableAgGrid {
433
463
  this.lifecycleState = 'ready';
434
464
  this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
435
465
  setTimeout(() => {
436
- var _a, _b;
437
466
  // without the setTimeout, calling autoSizeAllColumns immediately in the onAdaptableReady
438
467
  // does not work. (I prefer setTimeout to rAF, as raf is not running when you switch tabs)
439
468
  //
440
469
  // it also makes it possible to listen to CALCULATED_COLUMN_READY, DASHBOARD_READY, etc.
441
470
  // in onAdaptableReady - without this those event listeners are not triggered
442
- (_b = (_a = this.api) === null || _a === void 0 ? void 0 : _a.eventApi) === null || _b === void 0 ? void 0 : _b.emit('AdaptableReady', {
471
+ this.api?.eventApi?.emit('AdaptableReady', {
443
472
  adaptableApi: this.api,
444
473
  agGridApi: this.agGridAdapter.getAgGridApi(),
445
474
  });
@@ -453,95 +482,70 @@ class AdaptableAgGrid {
453
482
  return state;
454
483
  }
455
484
  normaliseLayoutState(state, gridOptions) {
456
- var _a, _b, _c, _d, _e, _f;
457
- if (this.shouldCreateDefaultLayout(state, this.adaptableOptions)) {
458
- const defaultLayout = this.createDefaultLayout(state, gridOptions);
459
- const layoutState = state.Layout || {};
460
- const availableLayouts = layoutState.Layouts || [];
461
- availableLayouts.push(defaultLayout);
462
- layoutState.Layouts = availableLayouts;
463
- layoutState.CurrentLayout = defaultLayout.Name;
464
- state.Layout = layoutState;
465
- }
466
- else {
467
- const layoutState = state.Layout;
468
- // ensure CurrentLayout is valid
469
- if (!layoutState.CurrentLayout ||
470
- !layoutState.Layouts.find((l) => l.Name === layoutState.CurrentLayout)) {
471
- layoutState.CurrentLayout = (_b = (_a = layoutState.Layouts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.Name;
472
- }
485
+ const layoutState = state.Layout;
486
+ // ensure that at least one Layout has been provided
487
+ if (!layoutState || !layoutState.Layouts?.length) {
488
+ this.logger
489
+ .consoleError(`You have not defined any Layout in your predefinedConfig.Layout.Layouts[] state!
490
+
491
+ You need to define at least one Layout!`);
473
492
  }
474
- // for the initial state, we need to dynamically add the ActionRowColumn (if necessary)
475
- // for subsequent layout changes, the `Adaptable.setLayout()` method handles this
476
- // this is a serious code smell, hopefully we will delete `setLayout()` at some point
477
- const hasActionRowButtons = !!((_c = this.adaptableOptions.actionRowOptions) === null || _c === void 0 ? void 0 : _c.actionRowButtons);
478
- if (hasActionRowButtons) {
479
- const currentLayout = state.Layout.Layouts.find((l) => l.Name === state.Layout.CurrentLayout);
480
- if (currentLayout && !currentLayout.Columns.includes(GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS)) {
481
- currentLayout.Columns.push(GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS);
482
- const columnPosition = (_e = (_d = this.adaptableOptions.actionRowOptions) === null || _d === void 0 ? void 0 : _d.actionRowButtonOptions) === null || _e === void 0 ? void 0 : _e.position;
483
- currentLayout.PinnedColumnsMap = currentLayout.PinnedColumnsMap || {};
484
- currentLayout.PinnedColumnsMap[GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS] =
485
- columnPosition === 'pinnedRight' ? 'right' : 'left';
486
- }
493
+ // ensure CurrentLayout is valid
494
+ if (!layoutState.CurrentLayout ||
495
+ !layoutState.Layouts.find((l) => l.Name === layoutState.CurrentLayout)) {
496
+ layoutState.CurrentLayout = layoutState.Layouts?.[0]?.Name;
487
497
  }
488
498
  /**
489
- * Viewport mode does not support a few
490
- * features instead of complicating the
491
- * logic where layout is applied, it is easier and
492
- * less error prone to just remove it.
499
+ * Viewport mode does not support a few AG Grid features which are contained in a Layout
500
+ * Accordingly we remove this when using this Row Model
493
501
  */
494
502
  if (gridOptions.rowModelType === 'viewport') {
495
- (_f = state.Layout.Layouts) === null || _f === void 0 ? void 0 : _f.forEach((layout) => {
496
- if (layout.RowGroupedColumns) {
497
- delete layout.RowGroupedColumns;
498
- }
499
- if (layout.AggregationColumns) {
500
- delete layout.AggregationColumns;
501
- }
502
- if (layout.PivotColumns) {
503
- delete layout.PivotColumns;
504
- delete layout.EnablePivot;
505
- }
506
- });
503
+ if (state.Layout.Layouts) {
504
+ state.Layout.Layouts = state.Layout.Layouts.filter((layout) => {
505
+ if ((0, LayoutHelpers_1.isPivotLayout)(layout)) {
506
+ return false;
507
+ }
508
+ if (layout.RowGroupedColumns) {
509
+ delete layout.RowGroupedColumns;
510
+ }
511
+ if (layout.TableAggregationColumns) {
512
+ delete layout.TableAggregationColumns;
513
+ }
514
+ return true;
515
+ });
516
+ }
517
+ }
518
+ if (state.Layout.Layouts) {
519
+ const normalizeOptions = {
520
+ isTree: !!gridOptions.treeData,
521
+ };
522
+ // it's very important that we do this here
523
+ // as the layout may not be fully specified in the predefinedConfig
524
+ // eg: might not include the generated row group columns in the column order
525
+ // but the normalization does this for us
526
+ state.Layout.Layouts = state.Layout.Layouts.map((layout) => (0, LayoutHelpers_1.normalizeLayout)(layout, normalizeOptions));
507
527
  }
508
528
  return state;
509
529
  }
510
530
  normaliseToolPanelState(state) {
511
- var _a, _b, _c;
512
- if ((_a = state === null || state === void 0 ? void 0 : state.ToolPanel) === null || _a === void 0 ? void 0 : _a.ToolPanels) {
531
+ if (state?.ToolPanel?.ToolPanels) {
513
532
  return state;
514
533
  }
515
534
  // no predefined config provided, we will display all the panels collapsed (custom & module)
516
535
  const defaultToolPanels = [];
517
- (_c = (_b = this.adaptableOptions.toolPanelOptions) === null || _b === void 0 ? void 0 : _b.customToolPanels) === null || _c === void 0 ? void 0 : _c.forEach((customToolPanel) => defaultToolPanels.push({ Name: customToolPanel.name }));
536
+ this.adaptableOptions.toolPanelOptions?.customToolPanels?.forEach((customToolPanel) => defaultToolPanels.push({ Name: customToolPanel.name }));
518
537
  Types_1.ALL_TOOL_PANELS.forEach((moduleToolPanel) => defaultToolPanels.push({ Name: moduleToolPanel }));
519
538
  const toolPanelState = state.ToolPanel || {};
520
539
  toolPanelState.ToolPanels = defaultToolPanels;
521
540
  state.ToolPanel = toolPanelState;
522
541
  return state;
523
542
  }
524
- refreshQuickFilter() {
525
- const isQuickFilterVisible = this.api.internalApi.getSystemState().IsQuickFilterVisible;
526
- if (this.isQuickFilterAvailable()) {
527
- if (isQuickFilterVisible) {
528
- this.api.columnFilterApi.showQuickFilterBar();
529
- }
530
- else {
531
- this.api.columnFilterApi.hideQuickFilterBar();
532
- }
533
- }
534
- }
535
- applyColumnFiltering() {
536
- this.refreshQuickFilter();
537
- this.applyGridFiltering();
538
- this.agGridAdapter.updateColumnFilterActiveState();
539
- }
540
- applyGridFiltering() {
543
+ applyFiltering() {
541
544
  this.agGridAdapter.getAgGridApi().onFilterChanged();
542
545
  this._emit('AdapTableFiltersApplied');
543
546
  this.refreshSelectedCellsState();
544
547
  this.refreshSelectedRowsState();
548
+ this.agGridAdapter.updateColumnFilterActiveState();
545
549
  }
546
550
  // refreshAgGridWithAdaptableState() {
547
551
  // this.refreshColDefs();
@@ -550,12 +554,8 @@ class AdaptableAgGrid {
550
554
  // this.checkShouldClearExistingFiltersOrSearches();
551
555
  // this.applyColumnFiltering();
552
556
  // }
553
- refreshColDefs(agGridColDefs) {
554
- const freshColDefs = this.getColumnDefinitionsInclSpecialColumns(agGridColDefs);
555
- this.agGridAdapter.setGridOption('columnDefs', freshColDefs);
556
- }
557
557
  showQuickFilter() {
558
- const height = this.api.optionsApi.getColumnFilterOptions().quickFilterOptions.quickFilterHeight;
558
+ const height = this.api.optionsApi.getFilterOptions().columnFilterOptions.quickFilterHeight;
559
559
  this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', height);
560
560
  }
561
561
  hideQuickFilter() {
@@ -585,7 +585,11 @@ class AdaptableAgGrid {
585
585
  */
586
586
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'context', (original_context) => {
587
587
  const userContext = original_context || {};
588
- return Object.assign(Object.assign({}, userContext), { __adaptable: this, adaptableApi: this.api });
588
+ return {
589
+ ...userContext,
590
+ __adaptable: this,
591
+ adaptableApi: this.api,
592
+ };
589
593
  });
590
594
  /**
591
595
  * `gridId`
@@ -595,9 +599,16 @@ class AdaptableAgGrid {
595
599
  if (this._isDetailGridForIndex != null) {
596
600
  agGridId = `${agGridId}_detail-${this._isDetailGridForIndex}`;
597
601
  }
598
- this._agGridId = agGridId;
602
+ this.agGridAdapter.setAgGridId(agGridId);
599
603
  return agGridId;
600
604
  });
605
+ // FIXME AFL: handle both ThemingApi and legacy CSS
606
+ /**
607
+ * `theme`
608
+ */
609
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'theme', (original_gridId) => {
610
+ return 'legacy';
611
+ });
601
612
  /**
602
613
  * `getRowId`
603
614
  */
@@ -623,20 +634,19 @@ class AdaptableAgGrid {
623
634
  };
624
635
  }
625
636
  return (params) => {
626
- var _a, _b, _c;
627
- if ((_a = params.data) === null || _a === void 0 ? void 0 : _a[primaryKey]) {
637
+ if (params.data?.[primaryKey]) {
628
638
  const primaryKeyValue = params.data[primaryKey];
629
639
  return typeof primaryKeyValue === 'number'
630
640
  ? `${primaryKeyValue}`
631
641
  : params.data[primaryKey];
632
642
  }
633
643
  // might be a summary row
634
- if ((_b = params.data) === null || _b === void 0 ? void 0 : _b[RowSummary_1.ROW_SUMMARY_ROW_ID]) {
644
+ if (params.data?.[RowSummary_1.ROW_SUMMARY_ROW_ID]) {
635
645
  return params.data[RowSummary_1.ROW_SUMMARY_ROW_ID];
636
646
  }
637
647
  // AFL 2024.08.17 - no idea why is this here and when it's used
638
648
  // might be a group row
639
- const parentKeys = (_c = params.parentKeys) !== null && _c !== void 0 ? _c : [];
649
+ const parentKeys = params.parentKeys ?? [];
640
650
  const values = Object.values(params.data);
641
651
  if (values.length) {
642
652
  const id = [...parentKeys, values[0]].join('/');
@@ -688,9 +698,8 @@ class AdaptableAgGrid {
688
698
  if (!this.isAvailable) {
689
699
  return true;
690
700
  }
691
- const columnFilters = this.api.columnFilterApi.getActiveColumnFilters();
692
- const isColumnFiltersActive = ArrayExtensions_1.default.IsNotNullOrEmpty(columnFilters);
693
- const isGridFilterActive = StringExtensions_1.default.IsNotNullOrEmpty(this.api.gridFilterApi.getCurrentGridFilterExpression());
701
+ const isColumnFiltersActive = ArrayExtensions_1.default.IsNotNullOrEmpty(this.api.filterApi.columnFilterApi.getActiveColumnFilters());
702
+ const isGridFilterActive = StringExtensions_1.default.IsNotNullOrEmpty(this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression());
694
703
  return (isColumnFiltersActive ||
695
704
  isGridFilterActive ||
696
705
  // it means that userPropertyValue will be called so we re-init that collection
@@ -701,39 +710,65 @@ class AdaptableAgGrid {
701
710
  * `doesExternalFilterPass`
702
711
  */
703
712
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'doesExternalFilterPass', (original_doesExternalFilterPass) => {
713
+ const { filteredOutPrimaryKeys } = this;
714
+ filteredOutPrimaryKeys.clear();
704
715
  return (node) => {
716
+ if (node.rowIndex === 0) {
717
+ filteredOutPrimaryKeys.clear();
718
+ }
705
719
  if (!this.isAvailable) {
706
720
  return true;
707
721
  }
708
- // first we assess a Grid Filter (if its running locally)
709
- if (!this.isGroupRowNode(node)) {
710
- const currentGridFilter = this.api.gridFilterApi.getCurrentGridFilterExpression();
711
- if (currentGridFilter) {
712
- const evaluateGridFilterOnClient = this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('GridFilter', undefined, currentGridFilter);
713
- if (evaluateGridFilterOnClient) {
714
- const isCurrentGridFilterValid = this.api.expressionApi.isValidBooleanExpression(currentGridFilter, ModuleConstants_1.GridFilterModuleId, `Invalid Grid Filter '${currentGridFilter}'`);
715
- if (!isCurrentGridFilterValid ||
716
- !this.api.internalApi
717
- .getQueryLanguageService()
718
- .evaluateBooleanExpression(currentGridFilter, ModuleConstants_1.GridFilterModuleId, node)) {
719
- return false;
720
- }
722
+ // Note: not sure we need this check as doubtful AG Grid ever passes in a Group Row node to filter...
723
+ // But if it does, then we might change this IF we allow Column filtering (but not Grid Filters) for Group nodes
724
+ if (this.isGroupRowNode(node)) {
725
+ return true;
726
+ }
727
+ // first assess if the Row is filterable - if not, then return true so it appears in Grid
728
+ const isRowFilterable = this.api.optionsApi.getFilterOptions().isRowFilterable;
729
+ if (typeof isRowFilterable === 'function') {
730
+ const rowFilterableContext = {
731
+ ...this.api.internalApi.buildBaseContext(),
732
+ rowNode: node,
733
+ data: node.data,
734
+ };
735
+ if (!isRowFilterable(rowFilterableContext)) {
736
+ return true;
737
+ }
738
+ }
739
+ // get the Primary Key Value for the Row Node being evaluated
740
+ const primaryKey = this.getPrimaryKeyValueFromRowNode(node);
741
+ // next we assess a Grid Filter (if its running locally)
742
+ const currentGridFilterExpression = this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
743
+ if (StringExtensions_1.default.IsNotNullOrEmpty(currentGridFilterExpression)) {
744
+ const evaluateGridFilterOnClient = this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('GridFilter', undefined, currentGridFilterExpression);
745
+ if (evaluateGridFilterOnClient) {
746
+ const isCurrentGridFilterValid = this.api.expressionApi.isValidBooleanExpression(currentGridFilterExpression, ModuleConstants_1.GridFilterModuleId, `Invalid Grid Filter '${currentGridFilterExpression}'`);
747
+ // Not sure about this - what should we do with an invalid Grid Filter?
748
+ // Here we essentially clear the Grid for invalid Grid Filter by returning false for each row
749
+ if (!isCurrentGridFilterValid) {
750
+ filteredOutPrimaryKeys.add(primaryKey);
751
+ return false;
752
+ }
753
+ const gridFilterEvaluationResult = this.api.internalApi
754
+ .getQueryLanguageService()
755
+ .evaluateBooleanExpression(currentGridFilterExpression, ModuleConstants_1.GridFilterModuleId, node);
756
+ if (!gridFilterEvaluationResult) {
757
+ filteredOutPrimaryKeys.add(primaryKey);
758
+ return false;
721
759
  }
722
760
  }
723
761
  }
724
- const columnFilters = this.api.columnFilterApi.getActiveColumnFilters();
762
+ // finally we evaluate column filters
763
+ const columnFilters = this.api.filterApi.columnFilterApi.getActiveColumnFilters();
725
764
  try {
726
765
  if (columnFilters.length > 0) {
727
- const isRowFiltrable = this.api.optionsApi.getColumnFilterOptions().isRowFilterable;
728
766
  for (const columnFilter of columnFilters) {
729
- const evaluateFilterOnClient = this.api.expressionApi.internalApi.evaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, [columnFilter.Predicate]);
730
- if (evaluateFilterOnClient) {
731
- // we then assess filters (if running locally)
732
- if (typeof isRowFiltrable === 'function' &&
733
- !isRowFiltrable(Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.api)), { rowNode: node, data: node.data }))) {
734
- return true;
735
- }
736
- if (!this.api.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, node)) {
767
+ const evaluateColumnFilterOnClient = this.api.expressionApi.internalApi.evaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, columnFilter.Predicates);
768
+ if (evaluateColumnFilterOnClient) {
769
+ const columnFilterEvaluationResult = this.api.filterApi.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, node);
770
+ if (!columnFilterEvaluationResult) {
771
+ filteredOutPrimaryKeys.add(primaryKey);
737
772
  return false;
738
773
  }
739
774
  }
@@ -742,9 +777,16 @@ class AdaptableAgGrid {
742
777
  }
743
778
  catch (ex) {
744
779
  this.logger.error(ex);
780
+ filteredOutPrimaryKeys.add(primaryKey);
745
781
  return false;
746
782
  }
747
- return original_doesExternalFilterPass ? original_doesExternalFilterPass(node) : true;
783
+ const result = original_doesExternalFilterPass
784
+ ? original_doesExternalFilterPass(node)
785
+ : true;
786
+ if (!result) {
787
+ filteredOutPrimaryKeys.add(primaryKey);
788
+ }
789
+ return result;
748
790
  };
749
791
  });
750
792
  /**
@@ -764,59 +806,16 @@ class AdaptableAgGrid {
764
806
  return this.agGridMenuAdapter.buildContextMenu(params, original_getContextMenuItems);
765
807
  };
766
808
  });
767
- /**
768
- * `initialGroupOrderComparator
769
- */
770
- // Build the default group sort comparator - will get custom sort values (but not functions) in real time
771
- // TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
772
- if (this.getAgGridRowModelType(gridOptions) === 'clientSide' &&
773
- this.adaptableOptions.groupingOptions.autoOrderGroupedColumns) {
774
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'initialGroupOrderComparator', (original_initialGroupOrderComparator) => {
775
- if (original_initialGroupOrderComparator) {
776
- return original_initialGroupOrderComparator;
777
- }
778
- return (params) => {
779
- const { nodeA, nodeB } = params;
780
- const firstGroupedColumnId = this.agGridAdapter.getFirstGroupedColumn();
781
- if (firstGroupedColumnId) {
782
- const definedColumnComparator = this.api.columnApi.internalApi.getActiveColumnComparator(firstGroupedColumnId, this.api.customSortApi.getCustomSortForColumn(firstGroupedColumnId), this.api.customSortApi.internalApi.getCustomSortComparer(firstGroupedColumnId));
783
- if (definedColumnComparator) {
784
- return definedColumnComparator(nodeA.key, nodeB.key);
785
- }
786
- const sortOder = this.api.layoutApi.getCurrentLayoutColumnSort(firstGroupedColumnId);
787
- if (sortOder === 'Desc') {
788
- return nodeA.key > nodeB.key ? -1 : 1;
789
- }
790
- }
791
- // if no comparator available, just sort alphanumerically
792
- if (nodeA.key == nodeB.key) {
793
- return 0;
794
- }
795
- return nodeA.key < nodeB.key ? -1 : 1;
796
- };
797
- });
798
- /**
799
- * `autoSizeStrategy`
800
- *
801
- * This is needed here, even if we do auto sizing on FIRST_DATA_RENDERED.
802
- * Sometimes FIRST_DATA_RENDERED is triggered too early and autoSizing doesn't work initially
803
- * so we need this block
804
- */
805
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'autoSizeStrategy', (original_autoSizeStrategy) => {
806
- return this.shouldAutoSizeLayout()
807
- ? {
808
- type: 'fitCellContents',
809
- }
810
- : original_autoSizeStrategy;
811
- });
812
- }
813
809
  /**
814
810
  * `components`
815
811
  */
816
812
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'components', (original_components) => {
817
813
  const AdaptableToolPanel = (0, AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent)(this);
818
814
  const components = original_components || {};
819
- const adaptableComponents = Object.assign(Object.assign({}, components), { AdaptableToolPanel });
815
+ const adaptableComponents = {
816
+ ...components,
817
+ AdaptableToolPanel,
818
+ };
820
819
  return adaptableComponents;
821
820
  });
822
821
  if (variant === 'react') {
@@ -832,7 +831,6 @@ class AdaptableAgGrid {
832
831
  * `sidebar`
833
832
  */
834
833
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
835
- var _a, _b;
836
834
  if (!original_sideBar) {
837
835
  // lucky us, no sideBar is defined, so we don't have to do anything
838
836
  return original_sideBar;
@@ -855,7 +853,7 @@ class AdaptableAgGrid {
855
853
  : toolPanelDef);
856
854
  };
857
855
  const isSideBarDefObject = (sidebarDef) => {
858
- return Array.isArray(sidebarDef === null || sidebarDef === void 0 ? void 0 : sidebarDef.toolPanels);
856
+ return Array.isArray(sidebarDef?.toolPanels);
859
857
  };
860
858
  let result;
861
859
  if (original_sideBar === true) {
@@ -895,45 +893,54 @@ class AdaptableAgGrid {
895
893
  }
896
894
  // if it's fully-fledged SideBarDef, process its tool panel definitions
897
895
  else if (isSideBarDefObject(original_sideBar)) {
898
- if ((_a = original_sideBar.toolPanels) === null || _a === void 0 ? void 0 : _a.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
896
+ if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
899
897
  toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
900
898
  !isAdaptableToolPanelHidden)) {
901
899
  // if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
902
900
  result = original_sideBar;
903
901
  }
904
902
  else {
905
- result = Object.assign(Object.assign({}, original_sideBar), { toolPanels: mapToolPanelDefs(original_sideBar.toolPanels) });
903
+ result = {
904
+ ...original_sideBar,
905
+ toolPanels: mapToolPanelDefs(original_sideBar.toolPanels),
906
+ };
906
907
  }
907
908
  }
908
909
  this.hasAdaptableToolPanel =
909
910
  isSideBarDefObject(result) &&
910
- ((_b = result.toolPanels) === null || _b === void 0 ? void 0 : _b.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
911
- toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID));
911
+ result.toolPanels?.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
912
+ toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID);
912
913
  return result;
913
914
  });
914
915
  /**
915
916
  * `statusBar`
916
917
  */
917
918
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
918
- var _a, _b;
919
- const statusPanels = (_b = ((_a = original_statusBar === null || original_statusBar === void 0 ? void 0 : original_statusBar.statusPanels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.map((statusPanel) => {
919
+ const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
920
920
  if (statusPanel.statusPanel === StatusBarState_1.ADAPTABLE_STATUS_PANEL) {
921
921
  this.adaptableStatusPanelKeys.push(statusPanel.key);
922
922
  const context = {
923
923
  Key: statusPanel.key,
924
924
  };
925
- return Object.assign(Object.assign({}, statusPanel), { statusPanel: (0, createAgStatusPanelComponent_1.createAgStatusPanelComponent)(AdaptableStatusBar_1.AdaptableStatusBar, this, context) });
925
+ return {
926
+ ...statusPanel,
927
+ statusPanel: (0, createAgStatusPanelComponent_1.createAgStatusPanelComponent)(AdaptableStatusBar_1.AdaptableStatusBar, this, context),
928
+ };
926
929
  }
927
930
  return statusPanel;
928
931
  });
929
- return Object.assign(Object.assign({}, original_statusBar), { statusPanels });
932
+ return { ...original_statusBar, statusPanels };
930
933
  });
931
934
  /**
932
935
  * `getRowStyle`
933
936
  */
934
937
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'getRowStyle', (original_getRowStyle) => {
935
938
  return (params) => {
936
- const result = Object.assign(Object.assign(Object.assign({}, original_getRowStyle === null || original_getRowStyle === void 0 ? void 0 : original_getRowStyle(params)), this.api.gridApi.internalApi.getRowHighlightStyle(params)), this.api.gridApi.internalApi.getAlertRowStyle(params));
939
+ const result = {
940
+ ...original_getRowStyle?.(params),
941
+ ...this.api.gridApi.internalApi.getRowHighlightStyle(params),
942
+ ...this.api.gridApi.internalApi.getAlertRowStyle(params),
943
+ };
937
944
  return result;
938
945
  };
939
946
  });
@@ -954,15 +961,15 @@ class AdaptableAgGrid {
954
961
  // we flatten it because 'original_getRowClass' might return a string[]
955
962
  .flat()
956
963
  .filter((x) => !!x);
957
- return (returnValue === null || returnValue === void 0 ? void 0 : returnValue.length) ? returnValue : undefined;
964
+ return returnValue?.length ? returnValue : undefined;
958
965
  };
959
966
  });
960
967
  /**
961
968
  * `floatingFiltersHeight`
962
969
  */
963
970
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'floatingFiltersHeight', (original_floatingFiltersHeight) => {
964
- if (this.api.layoutApi.getCurrentLayout().EnablePivot) {
965
- // if the default layout is a pivot on, hide the floating filters from the beginning, otherwise we get an annoying flicker
971
+ if (this.api.layoutApi.isCurrentLayoutPivot()) {
972
+ // if Current Layout is Pivot, hide the floating filters from the beginning, otherwise we get an annoying flicker
966
973
  return 0;
967
974
  }
968
975
  return original_floatingFiltersHeight;
@@ -971,21 +978,30 @@ class AdaptableAgGrid {
971
978
  * `excelStyles`
972
979
  */
973
980
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'excelStyles', (original_excelStyles) => {
974
- this.originalExcelStyles = original_excelStyles !== null && original_excelStyles !== void 0 ? original_excelStyles : [];
975
- this.DANGER_excelStyles = this.originalExcelStyles;
981
+ const excelStyles = original_excelStyles || [];
982
+ // see ##masterDetailHeader
983
+ excelStyles.push({
984
+ id: '_masterDetailHeader',
985
+ interior: {
986
+ color: '#aaaaaa',
987
+ pattern: 'Solid',
988
+ },
989
+ });
990
+ this.agGridExportAdapter.originalExcelStyles = excelStyles;
991
+ this.agGridExportAdapter.DANGER_excelStyles = this.agGridExportAdapter.originalExcelStyles;
976
992
  // this array reference will be used for the entire AG Grid session
977
- return this.DANGER_excelStyles;
993
+ return this.agGridExportAdapter.DANGER_excelStyles;
978
994
  });
979
995
  /**
980
996
  * `processPivotResultColDef`
981
997
  */
982
998
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', (original_processPivotResultColDef) => {
983
999
  return (colDef) => {
984
- if (this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
1000
+ if (this.adaptableOptions.filterOptions.useAdaptableFiltering) {
985
1001
  colDef.floatingFilter = false;
986
1002
  colDef.filter = false;
987
1003
  }
988
- original_processPivotResultColDef === null || original_processPivotResultColDef === void 0 ? void 0 : original_processPivotResultColDef(colDef);
1004
+ original_processPivotResultColDef?.(colDef);
989
1005
  };
990
1006
  });
991
1007
  /**
@@ -1001,80 +1017,34 @@ class AdaptableAgGrid {
1001
1017
  */
1002
1018
  // this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
1003
1019
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
1004
- var _a;
1005
1020
  const providedColumnTypes = original_columnTypes || {};
1006
- const gridOptionsColumnTypes = gridOptions.columnTypes || {};
1007
- const patchedColumnTypes = Object.assign({}, providedColumnTypes, {
1008
- [GeneralConstants_1.AB_SPECIAL_COLUMN]: {},
1009
- [GeneralConstants_1.AB_FDC3_COLUMN]: {},
1010
- abColDefNumber: Object.assign({}, gridOptionsColumnTypes.abColDefNumber),
1011
- abColDefString: Object.assign({}, gridOptionsColumnTypes.abColDefString),
1012
- abColDefBoolean: Object.assign({}, gridOptionsColumnTypes.abColDefBoolean),
1013
- abColDefDate: Object.assign({}, gridOptionsColumnTypes.abColDefDate),
1014
- abColDefObject: Object.assign({}, gridOptionsColumnTypes.abColDefObject),
1015
- abColDefCustom: Object.assign({}, gridOptionsColumnTypes.abColDefCustom),
1016
- abColDefStringArray: Object.assign({}, gridOptionsColumnTypes.abColDefStringArray),
1017
- abColDefNumberArray: Object.assign({}, gridOptionsColumnTypes.abColDefNumberArray),
1018
- abColDefTupleNumberArray: Object.assign({}, gridOptionsColumnTypes.abColDefTupleNumberArray),
1019
- abColDefObjectNumberArray: Object.assign({}, gridOptionsColumnTypes.abColDefObjectNumberArray),
1020
- });
1021
- const customColumnTypes = (_a = this.api.columnApi.getColumnTypes()) !== null && _a !== void 0 ? _a : [];
1021
+ const adaptableColumnTypes = {
1022
+ [AdaptableColumn_1.CALCULATED_COLUMN_TYPE]: {},
1023
+ [AdaptableColumn_1.FREE_TEXT_COLUMN_TYPE]: {},
1024
+ [AdaptableColumn_1.ACTION_COLUMN_TYPE]: {},
1025
+ [AdaptableColumn_1.FDC3_COLUMN_TYPE]: {},
1026
+ };
1027
+ const patchedColumnTypes = Object.assign({}, providedColumnTypes, adaptableColumnTypes);
1028
+ const customColumnTypes = this.api.columnApi.getColumnTypes() ?? [];
1022
1029
  for (const customColumnType of customColumnTypes) {
1023
1030
  if (!patchedColumnTypes[customColumnType]) {
1024
1031
  patchedColumnTypes[customColumnType] = {};
1025
1032
  }
1026
1033
  }
1027
- const colTypesToEditors = (0, AgGridColumnAdapter_1.getEditorsForColumnTypes)(this.variant);
1028
- // we used to patch here the column types
1029
- // and have the editors for abColDefNumber and abColDefDate set here
1030
- // but AG Grid seems to have a bug where if we have a custom editor
1031
- // for a specific number column, it's applied to all abColDefNumber columns, because they
1032
- // share the same column type
1033
- // so we're now doing this logic in AgGridColumnAdaptapter.setupColumnCellEditor
1034
- // and instead, here we're just assigning the editor to null
1035
- // because if we don't assign to null, the default that AG Grid provides
1036
- // will be used instead, and we don't want that for those column types
1037
- Object.keys(colTypesToEditors).forEach((colType) => {
1038
- if (patchedColumnTypes[colType].cellEditor == undefined) {
1039
- patchedColumnTypes[colType].cellEditor = null; // colTypesToEditors[colType];
1040
- // if you dont believe me, just put colTypesToEditors[colType] in the line above instead of the null value
1041
- // and see the editing/percentage-editor.spec.ts test fail as it wont be using the correct editor
1042
- }
1043
- });
1044
1034
  return patchedColumnTypes;
1045
1035
  });
1046
1036
  /**
1047
1037
  * `dataTypeDefinitions`
1048
1038
  */
1049
1039
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'dataTypeDefinitions', () => {
1050
- // temporary workaround until https://github.com/AdaptableTools/adaptable/issues/2230
1051
- const revertedDateTypeDefinitions = {
1052
- date: {
1053
- baseDataType: 'date',
1054
- extendsDataType: 'date',
1055
- valueParser: null,
1056
- valueFormatter: null,
1057
- suppressDefaultProperties: true,
1058
- },
1059
- dateString: {
1060
- baseDataType: 'dateString',
1061
- extendsDataType: 'dateString',
1062
- valueParser: null,
1063
- valueFormatter: null,
1064
- suppressDefaultProperties: true,
1065
- },
1066
- };
1040
+ const revertedDateTypeDefinitions = agGridDataTypeDefinitions_1.agGridDataTypeDefinitions;
1067
1041
  return revertedDateTypeDefinitions;
1068
1042
  });
1069
1043
  }
1070
- isDetailGrid() {
1071
- return this._isDetailGrid;
1072
- }
1073
1044
  /**
1074
1045
  * Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
1075
1046
  */
1076
1047
  async initializeAgGrid(gridOptions, modules, renderAgGridFrameworkComponent) {
1077
- var _a;
1078
1048
  if (renderAgGridFrameworkComponent) {
1079
1049
  const result = await renderAgGridFrameworkComponent(gridOptions);
1080
1050
  if (result === false) {
@@ -1096,9 +1066,8 @@ class AdaptableAgGrid {
1096
1066
  }
1097
1067
  if (!this.getAgGridContainerElement()) {
1098
1068
  // initialize the agGridContainerElement from the AgGrid instance
1099
- // @ts-ignore
1100
- const gridRoot = (_a = this.DANGER_getPrivateAgGridBeans()) === null || _a === void 0 ? void 0 : _a.eGridDiv;
1101
- const gridContainer = gridRoot === null || gridRoot === void 0 ? void 0 : gridRoot.closest('[class*="ag-theme"]');
1069
+ const gridRoot = this.agGridAdapter.getAgGridRootElement();
1070
+ const gridContainer = gridRoot?.closest('[class*="ag-theme"]');
1102
1071
  if (!gridContainer) {
1103
1072
  this.logger.consoleError(`No AG Grid container could be derived from the Adaptable framework wrapper.
1104
1073
  Please contact AdapTable Support and in the meantime provide a valid container element in 'ContainerOptions.agGridContainer'!`);
@@ -1113,108 +1082,33 @@ class AdaptableAgGrid {
1113
1082
  return Promise.resolve(false);
1114
1083
  }
1115
1084
  let gridParams;
1116
- if (modules === null || modules === void 0 ? void 0 : modules.length) {
1085
+ if (modules?.length) {
1117
1086
  gridParams = { modules };
1118
1087
  }
1119
- const agGridApi = (0, core_1.createGrid)(agGridContainer, gridOptions, gridParams);
1088
+ const agGridApi = (0, ag_grid_enterprise_1.createGrid)(agGridContainer, gridOptions, gridParams);
1120
1089
  return agGridApi;
1121
1090
  }
1122
- getColumnDefinitionsInclSpecialColumns(agGridColDefs) {
1123
- const allColDefs = this.enhanceColDefsWithSpecialColumns(agGridColDefs !== null && agGridColDefs !== void 0 ? agGridColDefs : this.agGridAdapter.getAgGridApi().getColumnDefs());
1124
- return allColDefs;
1125
- }
1126
- getSpecialColDefs() {
1127
- const specialColDefs = [
1128
- ...this.api.calculatedColumnApi.internalApi.getColDefsForCalculatedColumns(),
1129
- ...this.api.actionColumnApi.getColDefsForActionColumns(),
1130
- ...this.api.freeTextColumnApi.internalApi.getColDefsForFreeTextColumns(),
1131
- ...this.api.actionRowApi.internalApi.getColDefsForActionRowColumns(),
1132
- ...this.api.fdc3Api.internalApi.getFdc3ActionColDefs(),
1133
- ];
1134
- this.agGridAdapter.assignColumnIdsToColDefs(specialColDefs);
1135
- return specialColDefs;
1136
- }
1137
- enhanceColDefsWithSpecialColumns(agGridColDefs) {
1138
- this.agGridAdapter.assignColumnIdsToColDefs(agGridColDefs);
1139
- const specialColDefs = this.getSpecialColDefs();
1140
- const isSpecialColDef = (colDef) => {
1141
- const { type } = colDef;
1142
- if (type === GeneralConstants_1.AB_SPECIAL_COLUMN || (Array.isArray(type) && type.includes(GeneralConstants_1.AB_SPECIAL_COLUMN))) {
1143
- return true;
1144
- }
1145
- return false;
1146
- };
1147
- const processedSpecialColDefIds = [];
1148
- const mapColDefs = (colDefs) => {
1149
- return colDefs.map((colDef) => {
1150
- if (this.agGridColumnAdapter.isColGroupDef(colDef)) {
1151
- // if it's a group column, recursively map its children
1152
- colDef.children = mapColDefs(colDef.children);
1153
- return colDef;
1154
- }
1155
- else {
1156
- if (!isSpecialColDef(colDef)) {
1157
- // if it's not a special column, return it as is
1158
- // without a minWidth, columns in details grid are VERY wide
1159
- // so the line below fixes https://github.com/AdaptableTools/adaptable/issues/2559
1160
- return Object.assign({ minWidth: 10 }, colDef);
1161
- }
1162
- const newlyCreatedSpecialColDef = specialColDefs.find((specialColDef) => specialColDef.colId === colDef.colId);
1163
- if (newlyCreatedSpecialColDef) {
1164
- // if it's a special column and we have a special col def for it, return the special col def
1165
- processedSpecialColDefIds.push(colDef.colId);
1166
- // merge the user defined colDef with the special col def
1167
- // this way the user may provide some custom settings for the special col def (tooltip, etc)
1168
- const mergedColDef = Object.assign(Object.assign({
1169
- // see above comment for minWidth
1170
- minWidth: 10 }, colDef), newlyCreatedSpecialColDef);
1171
- return mergedColDef;
1172
- }
1173
- else {
1174
- // otherwise, return the original col def
1175
- return colDef;
1176
- }
1177
- }
1178
- });
1179
- };
1180
- let resultColDefs = mapColDefs(agGridColDefs);
1181
- // check if there are any special colDefs that were not processed
1182
- // in that case, add them to the end of the colDefs
1183
- specialColDefs.forEach((specialColDef) => {
1184
- if (!processedSpecialColDefIds.includes(specialColDef.colId)) {
1185
- resultColDefs.push(specialColDef);
1186
- }
1187
- });
1188
- // remove special column that are no longer defined
1189
- resultColDefs = resultColDefs.filter((colDef) => {
1190
- if (isSpecialColDef(colDef)) {
1191
- // must be in specialColDefs
1192
- return specialColDefs.some((specialColDef) => specialColDef.colId === colDef.colId);
1193
- }
1194
- return true;
1195
- });
1196
- return resultColDefs;
1197
- }
1198
1091
  useRowNodeLookUp() {
1199
1092
  return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
1200
1093
  }
1094
+ getAgGridRegisteredModules() {
1095
+ return this.agGridAdapter.getAgGridRegisteredModules();
1096
+ }
1201
1097
  getAgGridContainerElement() {
1202
- var _a, _b, _c, _d, _e, _f;
1203
1098
  if (!this.DANGER_USE_GETTER_agGridContainerElement) {
1204
1099
  this.DANGER_USE_GETTER_agGridContainerElement =
1205
- typeof ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.containerOptions) === null || _b === void 0 ? void 0 : _b.agGridContainer) === 'string'
1206
- ? document.getElementById((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.containerOptions) === null || _d === void 0 ? void 0 : _d.agGridContainer)
1207
- : (_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.containerOptions) === null || _f === void 0 ? void 0 : _f.agGridContainer;
1100
+ typeof this.adaptableOptions?.containerOptions?.agGridContainer === 'string'
1101
+ ? document.getElementById(this.adaptableOptions?.containerOptions?.agGridContainer)
1102
+ : this.adaptableOptions?.containerOptions?.agGridContainer;
1208
1103
  }
1209
1104
  return this.DANGER_USE_GETTER_agGridContainerElement;
1210
1105
  }
1211
1106
  getAdaptableContainerElement() {
1212
- var _a, _b, _c, _d, _e, _f;
1213
1107
  if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
1214
1108
  this.DANGER_USE_GETTER_adaptableContainerElement =
1215
- typeof ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.containerOptions) === null || _b === void 0 ? void 0 : _b.adaptableContainer) === 'string'
1216
- ? document.getElementById((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.containerOptions) === null || _d === void 0 ? void 0 : _d.adaptableContainer)
1217
- : (_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.containerOptions) === null || _f === void 0 ? void 0 : _f.adaptableContainer;
1109
+ typeof this.adaptableOptions?.containerOptions?.adaptableContainer === 'string'
1110
+ ? document.getElementById(this.adaptableOptions?.containerOptions?.adaptableContainer)
1111
+ : this.adaptableOptions?.containerOptions?.adaptableContainer;
1218
1112
  }
1219
1113
  return this.DANGER_USE_GETTER_adaptableContainerElement;
1220
1114
  }
@@ -1227,7 +1121,10 @@ class AdaptableAgGrid {
1227
1121
  const selectedCellInfo = this.agGridAdapter.deriveSelectedCellInfoFromAgGrid();
1228
1122
  this.api.gridApi.internalApi.setSelectedCells(selectedCellInfo);
1229
1123
  this._emit('CellsSelected');
1230
- let cellSelectionChangedInfo = Object.assign(Object.assign({}, this.api.internalApi.buildBaseContext()), { selectedCellInfo: this.api.gridApi.getGridState().SelectedCellInfo });
1124
+ let cellSelectionChangedInfo = {
1125
+ ...this.api.internalApi.buildBaseContext(),
1126
+ selectedCellInfo: this.api.gridApi.getInternalState().SelectedCellInfo,
1127
+ };
1231
1128
  this.api.eventApi.emit('CellSelectionChanged', cellSelectionChangedInfo);
1232
1129
  return selectedCellInfo;
1233
1130
  }
@@ -1237,7 +1134,10 @@ class AdaptableAgGrid {
1237
1134
  }
1238
1135
  const selectedRowInfo = this.agGridAdapter.deriveSelectedRowInfoFromAgGrid();
1239
1136
  this.api.gridApi.internalApi.setSelectedRows(selectedRowInfo);
1240
- const rowSelectionChangedInfo = Object.assign(Object.assign({}, this.api.internalApi.buildBaseContext()), { selectedRowInfo: this.api.gridApi.getGridState().SelectedRowInfo });
1137
+ const rowSelectionChangedInfo = {
1138
+ ...this.api.internalApi.buildBaseContext(),
1139
+ selectedRowInfo: this.api.gridApi.getInternalState().SelectedRowInfo,
1140
+ };
1241
1141
  this.api.eventApi.emit('RowSelectionChanged', rowSelectionChangedInfo);
1242
1142
  return selectedRowInfo;
1243
1143
  }
@@ -1255,7 +1155,7 @@ class AdaptableAgGrid {
1255
1155
  return false;
1256
1156
  }
1257
1157
  isGridRangeSelectable() {
1258
- return (this.agGridAdapter.isModulePresent(core_1.ModuleNames.RangeSelectionModule) &&
1158
+ return (this.agGridAdapter.isAgGridModuleRegistered('CellSelection') &&
1259
1159
  (this.agGridAdapter.getGridOption('enableRangeSelection') ||
1260
1160
  !!this.agGridAdapter.getGridOption('cellSelection')));
1261
1161
  }
@@ -1263,114 +1163,34 @@ class AdaptableAgGrid {
1263
1163
  const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
1264
1164
  const adaptableStore = new AdaptableStore_1.AdaptableStore(this);
1265
1165
  adaptableStore.onAny((eventName, data) => {
1266
- this.performAudit(data.action, data.state, data.newState);
1166
+ if (this.isReady) {
1167
+ this.api.eventApi.internalApi.fireAdaptableStateChangedEvent(data.action, data.state, data.newState);
1168
+ }
1267
1169
  this.forPlugins((plugin) => plugin.onStoreEvent(eventName, data, this.adaptableStore));
1268
1170
  });
1269
1171
  perfNewAdaptableStore.end();
1270
1172
  return adaptableStore;
1271
1173
  }
1272
- mapAdaptableStateToAgGridState(adaptableState, agGridColDefs) {
1273
- var _a, _b, _c;
1274
- const agGridState = {};
1275
- const currentLayoutName = (_a = adaptableState.Layout) === null || _a === void 0 ? void 0 : _a.CurrentLayout;
1276
- const _currentLayout = currentLayoutName &&
1277
- ((_c = (_b = adaptableState.Layout) === null || _b === void 0 ? void 0 : _b.Layouts) === null || _c === void 0 ? void 0 : _c.find((l) => l.Name === currentLayoutName));
1278
- if (!_currentLayout) {
1279
- return agGridState;
1280
- }
1281
- const currentLayout = (0, AdaptableHelper_1.removeUuidAndSource)(_currentLayout);
1282
- const allAgGridFlattenedColDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
1283
- const allAgGridColDefIds = allAgGridFlattenedColDefs.map((colDef) => colDef.colId);
1284
- const { columnApi } = this.api;
1285
- // also add the row group columns, if they are specified in the layout
1286
- currentLayout.Columns.forEach((colId) => {
1287
- if (columnApi.isAutoRowGroupColumn(colId)) {
1288
- allAgGridColDefIds.push(colId);
1289
- }
1290
- });
1291
- const getColDef = (colId) => allAgGridFlattenedColDefs.find((colDef) => colDef.colId === colId);
1292
- agGridState.columnVisibility = {
1293
- hiddenColIds: allAgGridFlattenedColDefs
1294
- .filter((colDef) => { var _a; return !((_a = currentLayout.Columns) === null || _a === void 0 ? void 0 : _a.includes(colDef.colId)) || colDef.hide || colDef.initialHide; })
1295
- .map((colDef) => colDef.colId),
1296
- };
1297
- agGridState.columnOrder = {
1298
- orderedColIds: ArrayExtensions_1.default.sortArrayWithOrder(allAgGridColDefIds, currentLayout.Columns || [], {
1299
- sortUnorderedItems: false,
1300
- }),
1301
- };
1302
- if (currentLayout.ColumnWidthMap) {
1303
- agGridState.columnSizing = {
1304
- columnSizingModel: Object.keys(currentLayout.ColumnWidthMap).map((colId) => {
1305
- const width = currentLayout.ColumnWidthMap[colId];
1306
- return {
1307
- colId,
1308
- width,
1309
- };
1310
- }),
1311
- };
1312
- }
1313
- if (currentLayout.ColumnSorts) {
1314
- agGridState.sort = {
1315
- sortModel: currentLayout.ColumnSorts.map((columnSort) => {
1316
- return {
1317
- colId: columnSort.ColumnId,
1318
- sort: columnSort.SortOrder === 'Asc' ? 'asc' : 'desc',
1319
- };
1320
- }),
1321
- };
1322
- }
1323
- if (currentLayout.RowGroupedColumns) {
1324
- agGridState.rowGroup = {
1325
- groupColIds: currentLayout.RowGroupedColumns,
1326
- };
1327
- }
1328
- if (currentLayout.AggregationColumns) {
1329
- agGridState.aggregation = {
1330
- aggregationModel: Object.keys(currentLayout.AggregationColumns).map((colId) => {
1331
- let aggFunc = currentLayout.AggregationColumns[colId];
1332
- if (aggFunc === true) {
1333
- const colDef = getColDef(colId);
1334
- // fallback to SUM if no defaultAggFunc is defined
1335
- aggFunc = (colDef === null || colDef === void 0 ? void 0 : colDef.defaultAggFunc) || 'sum';
1336
- }
1337
- if ((0, AggregationColumns_1.isWeightedAverageAggregation)(aggFunc)) {
1338
- aggFunc = AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME;
1339
- }
1340
- return {
1341
- colId,
1342
- aggFunc,
1343
- };
1344
- }),
1345
- };
1346
- }
1347
- if (currentLayout.PivotColumns || currentLayout.EnablePivot) {
1348
- agGridState.pivot = {
1349
- pivotMode: currentLayout.EnablePivot,
1350
- pivotColIds: currentLayout.PivotColumns || [],
1351
- };
1352
- }
1353
- if (currentLayout.PinnedColumnsMap) {
1354
- const columnPinning = {
1355
- leftColIds: [],
1356
- rightColIds: [],
1357
- };
1358
- Object.keys(currentLayout.PinnedColumnsMap).forEach((colId) => {
1359
- const pinned = currentLayout.PinnedColumnsMap[colId];
1360
- if (pinned === 'left') {
1361
- columnPinning.leftColIds.push(colId);
1362
- }
1363
- else if (pinned === 'right') {
1364
- columnPinning.rightColIds.push(colId);
1365
- }
1366
- });
1367
- agGridState.columnPinning = columnPinning;
1174
+ mapAdaptableStateToAgGridState(adaptableState, agGridColDefs, options) {
1175
+ const currentLayoutName = adaptableState.Layout?.CurrentLayout;
1176
+ let currentLayout = currentLayoutName &&
1177
+ adaptableState.Layout?.Layouts?.find((l) => l.Name === currentLayoutName);
1178
+ if (!currentLayout) {
1179
+ currentLayout = GeneralConstants_1.ERROR_LAYOUT;
1368
1180
  }
1369
- return agGridState;
1181
+ const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout);
1182
+ return {
1183
+ gridState: src_1.LayoutManager.getAGGridInitialStateForLayout(layoutModel, agGridColDefs, options),
1184
+ currentLayout: currentLayout,
1185
+ layoutModel,
1186
+ };
1370
1187
  }
1371
1188
  addGridEventListeners() {
1372
1189
  /**
1373
- * Intercept DOM events and emit them as Adaptable events
1190
+ * Intercept 3 DOM events and emit them as Adaptable events:
1191
+ * KeyDown
1192
+ * MouseEnter
1193
+ * MouseLeave
1374
1194
  */
1375
1195
  const gridContainerElement = this.getAgGridContainerElement();
1376
1196
  if (gridContainerElement) {
@@ -1383,80 +1203,33 @@ class AdaptableAgGrid {
1383
1203
  }), true);
1384
1204
  gridContainerElement.addEventListener('mouseleave', (this.agGridListenerMouseLeave = (event) => this._emit('MouseLeave', event)));
1385
1205
  }
1386
- this.throttleFilterOnEditDataChange = (0, throttle_1.default)(
1206
+ this.throttleFilterOnDataChange = (0, throttle_1.default)(
1387
1207
  // the extra function is to make sure we have a reference to ag-grid-api
1388
- () => { var _a; return (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.onFilterChanged(); }, this.adaptableOptions.columnFilterOptions.filterActionOnUserDataChange.throttleDelay, {
1389
- trailing: true,
1390
- leading: false,
1391
- });
1392
- this.throttleFilterOnTickingDataChange = (0, throttle_1.default)(() => { var _a; return (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.onFilterChanged(); }, this.adaptableOptions.columnFilterOptions.filterActionOnExternalDataChange.throttleDelay, {
1208
+ () => this.agGridAdapter.getAgGridApi()?.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnDataChange.throttleDelay, {
1393
1209
  trailing: true,
1394
1210
  leading: false,
1395
1211
  });
1396
1212
  /**
1397
- * Use Case: AG Grid columns have changed
1398
- * Action: Set Columns in store and filter grid
1399
- */
1400
- this.debouncedSetColumnIntoStore = (0, debounce_1.default)(() => {
1401
- if (!this.isReady) {
1402
- return;
1403
- }
1404
- this.deriveAdaptableColumnStateFromAgGrid();
1405
- }, GeneralConstants_1.HALF_SECOND);
1406
- const columnEventsThatTriggersStateChange = [
1407
- 'columnMoved',
1408
- 'gridColumnsChanged',
1409
- 'displayedColumnsChanged',
1410
- 'columnVisible',
1411
- 'newColumnsLoaded',
1412
- ];
1413
- this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerStateChange = (type) => {
1414
- if (columnEventsThatTriggersStateChange.indexOf(type) > -1) {
1415
- this.debouncedSetColumnIntoStore();
1416
- }
1417
- }));
1418
- /**
1419
- * Use Case: User has started inline editing but its distabled in Action Row Options
1213
+ * Use Case: User has started inline editing but its disabled in Row Form Options
1420
1214
  * Action: Stop editing
1421
1215
  */
1422
1216
  this.agGridAdapter.getAgGridApi().addEventListener('cellEditingStarted', (this.listenerCellEditingStarted = () => {
1423
- var _a;
1424
- if ((_a = this.adaptableOptions.actionRowOptions) === null || _a === void 0 ? void 0 : _a.disableInlineEditing)
1217
+ if (this.adaptableOptions.rowFormOptions.disableInlineEditing)
1425
1218
  this.agGridAdapter.getAgGridApi().stopEditing();
1426
1219
  }));
1427
1220
  /**
1428
- * Use Case: initial data has been displayed in grid
1429
- * Action1: Set the Layout
1430
- * Action2: Ensure that we have set column data types
1431
- * Note: Deals with scenario where the data is provided to AdapTable after grid has been setup
1221
+ * Use Case: Grid was already set up and now the initial data has been displayed
1222
+ * Action1: Update the Column Model
1223
+ * Action2: Refresh Calculated Columns
1432
1224
  */
1433
1225
  this.agGridAdapter.getAgGridApi().addEventListener('firstDataRendered', (this.listenerFirstDataRendered = () => {
1434
1226
  if (this.initWithLazyData) {
1435
- this.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
1227
+ this.updateColumnModelAndRefreshGrid();
1436
1228
  this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
1437
1229
  this._emit('FirstDataRendered');
1438
1230
  }
1439
1231
  this.autoSizeLayoutIfNeeded();
1440
1232
  }));
1441
- /**
1442
- * Use Case: Entered or Left Pivot Mode
1443
- * Action 1: Autosize pivot columns when entering pivot mode (if autosize pivot in Layout is true)
1444
- * Action 2: Set pivot mode on / off in api as necessary
1445
- */
1446
- this.agGridAdapter.getAgGridApi().addEventListener('columnPivotModeChanged', (this.listenerPivotModeChanged = (params) => {
1447
- if (params.type == 'columnPivotModeChanged' &&
1448
- params.columnApi != null &&
1449
- params.columnApi.columnController != null &&
1450
- params.columnApi.columnController.pivotMode == true) {
1451
- if (this.adaptableOptions.layoutOptions.autoSizeColumnsInPivotLayout == true) {
1452
- this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
1453
- }
1454
- this.api.internalApi.setPivotModeOn();
1455
- }
1456
- else {
1457
- this.api.internalApi.setPivotModeOff();
1458
- }
1459
- }));
1460
1233
  /**
1461
1234
  * Use Case: A pivot column has changed
1462
1235
  * Action: Autosize pivot columns (if autosize pivot in Layout is true)
@@ -1466,77 +1239,14 @@ class AdaptableAgGrid {
1466
1239
  params.columnApi != null &&
1467
1240
  params.columnApi.columnController != null &&
1468
1241
  params.columnApi.columnController.pivotMode == true) {
1469
- if (this.adaptableOptions.layoutOptions.autoSizeColumnsInPivotLayout == true) {
1242
+ if (this.api.layoutApi.getCurrentLayout().AutoSizeColumns) {
1470
1243
  this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
1471
1244
  }
1472
1245
  }
1473
1246
  }));
1474
1247
  /**
1475
- * Use Case: Things have changed in the grid that require the Layout to be saved
1476
- * Action: Save the Layout (on a debounce)
1477
- */
1478
- const columnEventsThatTriggersAutoLayoutSave = [
1479
- 'columnPinned',
1480
- 'columnPivotChanged',
1481
- 'columnPivotModeChanged',
1482
- 'displayedColumnsChanged',
1483
- 'sortChanged',
1484
- 'columnRowGroupChanged',
1485
- 'columnValueChanged',
1486
- ];
1487
- // ADD filter event
1488
- this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
1489
- if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
1490
- this.debouncedSaveGridLayout(type);
1491
- }
1492
- }));
1493
- /**
1494
- * Save Layout if Display Row Groups is "dynamic
1495
- */
1496
- this.debouncedSaveGridLayout = (0, debounce_1.default)((type) => {
1497
- if (!this.isReady) {
1498
- return;
1499
- }
1500
- this.logger.info('Event Triggering Auto Layout Save', type || '');
1501
- this.updateLayoutFromGrid();
1502
- }, GeneralConstants_1.HALF_SECOND);
1503
- const rowGroupEventsThatTriggersAutoLayoutSave = [
1504
- 'rowGroupOpened',
1505
- 'expandOrCollapseAll',
1506
- ];
1507
- this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = (type) => {
1508
- if (rowGroupEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
1509
- if (this.adaptableOptions.layoutOptions.displayRowGroups == 'dynamic') {
1510
- this.debouncedSaveGridLayout(type);
1511
- }
1512
- }
1513
- }));
1514
- /**
1515
- * Use Case: Column Row Grouping changes and 'restoreUngroupedColumns' is true
1516
- * Action: Make the column invisiblel
1517
- */
1518
- this.agGridAdapter.getAgGridApi().addEventListener('columnRowGroupChanged', (this.listenerColumnRowGroupChanged = (params) => {
1519
- var _a, _b;
1520
- if (this.api.internalApi.isGridInPivotMode()) {
1521
- return;
1522
- }
1523
- if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
1524
- this.persistColumnIndexBeforeGrouping(params);
1525
- }
1526
- }));
1527
- /**
1528
- * Use Case: A Column has finished being resized
1529
- * Action 1: Save the Layout (on a debounce)
1530
- * Action 2: Emit the internal ColumnResized event - used by Sparkline Column (in Charts)
1531
- */
1532
- this.agGridAdapter.getAgGridApi().addEventListener('columnResized', (this.listenerColumnResized = (params) => {
1533
- if (params.finished == true && params.type == 'columnResized' && params.column) {
1534
- this.debouncedSaveGridLayout(params.type);
1535
- }
1536
- }));
1537
- /**
1538
- * Use Case: Row Selection has changed
1539
- * Action: Set Selected Rows (on a debeounce)
1248
+ * Use Case: User has selected Rows or opened a Row Group
1249
+ * Action: Set Selected Rows (on a debounce of 500ms)
1540
1250
  */
1541
1251
  this.debouncedSetSelectedRows = (0, debounce_1.default)(() => {
1542
1252
  if (!this.isReady) {
@@ -1556,14 +1266,14 @@ class AdaptableAgGrid {
1556
1266
  }));
1557
1267
  /**
1558
1268
  * Use Case: User has selected a range of cells
1559
- * Action: Set Selected Cells (on a debounce)
1269
+ * Action: Set Selected Cells (on a debounce of 250ms)
1560
1270
  */
1561
1271
  this.debouncedSetSelectedCells = (0, debounce_1.default)(() => {
1562
1272
  if (!this.isReady) {
1563
1273
  return;
1564
1274
  }
1565
1275
  this.refreshSelectedCellsState();
1566
- }, 250);
1276
+ }, GeneralConstants_1.QUARTER_SECOND);
1567
1277
  this.agGridAdapter.getAgGridApi().addEventListener('cellSelectionChanged', (this.listenerCellSelectionChanged = (params) => {
1568
1278
  if (params.finished == true) {
1569
1279
  this.debouncedSetSelectedCells();
@@ -1571,20 +1281,21 @@ class AdaptableAgGrid {
1571
1281
  }));
1572
1282
  /**
1573
1283
  * Use Case: Sort has changed in the Grid
1574
- * Action1: Update AdapTable Sort Info
1284
+ * Action1: Fire the Grid Sorted Event
1575
1285
  * Action2: Set Selected Cells (on a debounce)
1576
1286
  */
1577
1287
  this.agGridAdapter.getAgGridApi().addEventListener('sortChanged', (this.listenerSortChanged = () => {
1578
- this.onSortChanged();
1288
+ this.api.eventApi.internalApi.fireGridSortedEvent();
1579
1289
  this.debouncedSetSelectedCells();
1580
1290
  }));
1291
+ /**
1292
+ * Use Case: Charts have been created or destroyed, Chart ranges selected or Chart options changed
1293
+ * Action: Call onChartModelChange in Charting Service
1294
+ */
1581
1295
  const eventsThatTriggerChartingChanges = [
1582
1296
  'chartCreated',
1583
- /** Chart Range selection has changed */
1584
1297
  'chartRangeSelectionChanged',
1585
- /** Chart Options have changed */
1586
1298
  'chartOptionsChanged',
1587
- /** Chart was destroyed */
1588
1299
  'chartDestroyed',
1589
1300
  ];
1590
1301
  const chartingModule = this.ModuleService.getModuleById('Charting');
@@ -1621,32 +1332,21 @@ class AdaptableAgGrid {
1621
1332
  }
1622
1333
  shouldAutoSizeLayout() {
1623
1334
  const { layoutApi } = this.api;
1624
- const { layoutOptions } = this.adaptableOptions;
1625
1335
  const currentLayout = layoutApi.getCurrentLayout();
1626
- if (currentLayout.ColumnWidthMap && Object.keys(currentLayout.ColumnWidthMap).length > 0) {
1336
+ if (currentLayout.ColumnWidths && Object.keys(currentLayout.ColumnWidths).length > 0) {
1627
1337
  return;
1628
1338
  }
1629
- const autoSize = currentLayout.EnablePivot
1630
- ? layoutOptions.autoSizeColumnsInPivotLayout
1631
- : layoutOptions.autoSizeColumnsInLayout;
1632
- return autoSize;
1339
+ return currentLayout.AutoSizeColumns;
1633
1340
  }
1634
1341
  autoSizeLayoutIfNeeded() {
1635
1342
  if (this.shouldAutoSizeLayout()) {
1636
1343
  requestAnimationFrame(() => {
1637
- var _a;
1638
1344
  if (this.isAvailable) {
1639
- (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.autoSizeAllColumns();
1345
+ this.autoSizeAllColumns();
1640
1346
  }
1641
1347
  });
1642
1348
  }
1643
1349
  }
1644
- performAudit(action, oldState, newState) {
1645
- if (this.isReady) {
1646
- const adaptableStateChangedInfo = Object.assign(Object.assign({ actionName: action.type, clientTimestamp: new Date() }, this.api.internalApi.buildBaseContext()), { adaptableStateKey: this.adaptableOptions.adaptableStateKey, action: action, oldState: oldState, newState: newState });
1647
- this.api.eventApi.emit('AdaptableStateChanged', adaptableStateChangedInfo);
1648
- }
1649
- }
1650
1350
  forPlugins(callback) {
1651
1351
  if (Array.isArray(this.adaptableOptions.plugins)) {
1652
1352
  this.adaptableOptions.plugins.forEach((plugin) => {
@@ -1684,9 +1384,9 @@ class AdaptableAgGrid {
1684
1384
  this.AlertService = new AlertService_1.AlertService(this.api);
1685
1385
  this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
1686
1386
  this.Fdc3Service = new Fdc3Service_1.Fdc3Service(this.api);
1687
- this.CellPopupService = new CellPopupService_1.CellPopupService(this.api);
1387
+ this.AnnotationsService = new AnnotationsService_1.AnnotationsService(this.api);
1688
1388
  this.FlashingCellService = new FlashingCellService_1.FlashingCellService(this.api);
1689
- this.RowEditService = new RowEditService_1.RowEditService(this.api);
1389
+ this.RowFormService = new RowFormService_1.RowFormService(this.api);
1690
1390
  this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
1691
1391
  }
1692
1392
  initLicenseService() {
@@ -1743,18 +1443,17 @@ class AdaptableAgGrid {
1743
1443
  */
1744
1444
  temporaryAdaptableStateUpdates() {
1745
1445
  this.api.eventApi.on('AdaptableReady', () => {
1746
- var _a, _b;
1747
1446
  // update status bar state
1748
- const adaptableStatusPanels = (_b = (_a = this.agGridAdapter
1447
+ const adaptableStatusPanels = this.agGridAdapter
1749
1448
  .getAgGridApi()
1750
- .getGridOption('statusBar')) === null || _a === void 0 ? void 0 : _a.statusPanels) === null || _b === void 0 ? void 0 : _b.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
1449
+ .getGridOption('statusBar')
1450
+ ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
1751
1451
  const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
1752
1452
  // need to add only the adaptable panels
1753
1453
  statusBarModule.syncStateWithOptions(adaptableStatusPanels);
1754
1454
  });
1755
1455
  }
1756
1456
  validatePrimaryKey() {
1757
- var _a;
1758
1457
  if (this.hasAutogeneratedPrimaryKey) {
1759
1458
  return;
1760
1459
  }
@@ -1764,7 +1463,7 @@ class AdaptableAgGrid {
1764
1463
  if (!primaryKeyColDef) {
1765
1464
  let errorMessage;
1766
1465
  // if no primary key column then lets check the first row to see if its a data item
1767
- const primaryKeyDataItem = (_a = this.getFirstRowNode()) === null || _a === void 0 ? void 0 : _a.data[primaryKey];
1466
+ const primaryKeyDataItem = this.getFirstRowNode()?.data[primaryKey];
1768
1467
  if (!primaryKeyDataItem) {
1769
1468
  errorMessage = `The Primary Key '${this.adaptableOptions.primaryKey}' does not exist. This will affect many functions in AdapTable.`;
1770
1469
  if (this.adaptableOptions.alertOptions.showMissingPrimaryKeyAlert) {
@@ -1781,21 +1480,31 @@ class AdaptableAgGrid {
1781
1480
  }
1782
1481
  deriveAdaptableColumnStateFromAgGrid() {
1783
1482
  const allColumns = [];
1784
- const agGridCols = this.agGridAdapter.getAgGridApi().getColumns();
1785
- const columnGroupChildren = this.agGridAdapter
1786
- .getAgGridApi()
1483
+ const gridApi = this.agGridAdapter.getAgGridApi();
1484
+ const isPivot = gridApi.isPivotMode();
1485
+ let agGridCols = isPivot
1486
+ ? gridApi.getColumns()
1487
+ : // we call getAllGridColumns because we want to also have the generated group columns
1488
+ gridApi.getAllGridColumns();
1489
+ if (isPivot) {
1490
+ // let's also support the pivot result columns
1491
+ const pivotResultColumns = gridApi.getPivotResultColumns() || [];
1492
+ if (pivotResultColumns.length) {
1493
+ agGridCols = [...agGridCols, ...pivotResultColumns];
1494
+ }
1495
+ }
1496
+ const columnGroupChildren = gridApi
1787
1497
  // TODO AFL MIG: check why this assertion is here
1788
1498
  .getAllDisplayedColumnGroups();
1789
1499
  const groupsCount = {};
1790
- const colsToGroups = (columnGroupChildren !== null && columnGroupChildren !== void 0 ? columnGroupChildren : []).reduce((acc, columnGroup) => {
1791
- var _a, _b, _c;
1792
- if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
1500
+ const colsToGroups = (columnGroupChildren ?? []).reduce((acc, columnGroup) => {
1501
+ if (!columnGroup.getProvidedColumnGroup?.()?.getColGroupDef()) {
1793
1502
  return acc;
1794
1503
  }
1795
1504
  const ColumnGroupId = columnGroup.getGroupId();
1796
1505
  const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
1797
1506
  .marryChildren;
1798
- const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
1507
+ const FriendlyName = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName ?? ColumnGroupId;
1799
1508
  const columnsInGroup = columnGroup.getLeafColumns();
1800
1509
  columnsInGroup.forEach((col) => {
1801
1510
  const group = {
@@ -1813,58 +1522,96 @@ class AdaptableAgGrid {
1813
1522
  Object.keys(colsToGroups).forEach((colId) => {
1814
1523
  colsToGroups[colId].groupCount = groupsCount[colsToGroups[colId].columnGroupId];
1815
1524
  });
1816
- // TODO sort the visible columns by layout order
1525
+ agGridCols = agGridCols.filter((agGridColumn) => !this.agGridColumnAdapter.shouldSkipColumn(agGridColumn.getId()));
1817
1526
  agGridCols.forEach((agGridColumn) => {
1818
- const colId = agGridColumn.getColId();
1819
- if (!this.api.columnApi.isAutoRowGroupColumn(colId)) {
1820
- allColumns.push(this.agGridAdapter.createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups));
1821
- }
1527
+ allColumns.push(this.agGridAdapter.createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups));
1822
1528
  });
1823
1529
  this.api.gridApi.internalApi.setColumns(allColumns);
1824
1530
  }
1825
1531
  checkShouldClearExistingFiltersOrSearches() {
1826
- // if they have selected to clear column filters on startup then do it
1827
- if (this.adaptableOptions.columnFilterOptions.clearColumnFiltersOnStartUp) {
1828
- if (ArrayExtensions_1.default.IsNotNullOrEmpty(this.api.columnFilterApi.getColumnFilters())) {
1829
- this.logger.warn('Clearing existing Column Filters as "clearColumnFiltersOnStartUp" is true');
1830
- this.api.columnFilterApi.clearColumnFilters();
1831
- }
1832
- }
1833
- // if they have selected to clear the Grid filter on startup then do it
1834
- if (this.adaptableOptions.gridFilterOptions.clearGridFilterOnStartUp) {
1835
- if (StringExtensions_1.default.IsNotNullOrEmpty(this.api.gridFilterApi.getCurrentGridFilterExpression())) {
1836
- this.logger.warn('Clearing existing Grid Filter as "clearGridFilterOnStartUp" is true');
1837
- this.api.gridFilterApi.setGridFilterExpression('');
1838
- }
1532
+ // if they have selected to clear Filters on startup then do it
1533
+ if (this.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
1534
+ this.logger.warn('Clearing any saved Filters as "clearFiltersOnStartUp" is true');
1535
+ this.api.filterApi.clearAllFilters();
1839
1536
  }
1840
1537
  // if they have selected to clear searches on startup then do it
1841
1538
  if (this.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
1842
- if (StringExtensions_1.default.IsNotNullOrEmpty(this.api.quickSearchApi.getQuickSearchState().QuickSearchText)) {
1843
- this.logger.warn('Clearing existing Searches as "clearQuickSearchOnStartUp" is true');
1844
- this.api.quickSearchApi.clearQuickSearch();
1845
- }
1539
+ this.logger.warn('Clearing any saved Searches as "clearQuickSearchOnStartUp" is true');
1540
+ this.api.quickSearchApi.clearQuickSearch();
1846
1541
  }
1847
1542
  }
1848
1543
  getGridCellFromRowNode(rowNode, columnId) {
1849
1544
  if (rowNode == null) {
1850
1545
  return undefined;
1851
1546
  }
1852
- const abColumn = this.api.columnApi.getColumnWithColumnId(columnId);
1853
- const pkValue = this.getPrimaryKeyValueFromRowNode(rowNode);
1854
- const rawValue = this.getRawValueFromRowNode(rowNode, columnId);
1855
- const displayValue = this.getDisplayValueFromRawValue(rowNode, columnId, rawValue);
1856
- const normalisedValue = this.getNormalisedValueFromRawValue(rawValue, abColumn);
1857
- const isPivotCell = this.api.columnApi.isAutoPivotColumn(columnId);
1858
- const isRowGroupCell = rowNode.group;
1547
+ return this.createGridCell(rowNode, columnId);
1548
+ }
1549
+ /**
1550
+ * Use (lazy evaluated) getters to avoid unnecessary calculations and memoization to avoid recalculating the same values
1551
+ */
1552
+ createGridCell(rowNode, columnId) {
1553
+ let _column;
1554
+ let _primaryKeyValue;
1555
+ let _rawValue;
1556
+ let _displayValue;
1557
+ let _normalisedValue;
1558
+ let _isPivotCell;
1559
+ let _isRowGroupCell;
1560
+ const self = this;
1561
+ const api = this.api;
1562
+ const getRawValue = () => {
1563
+ if (_rawValue === undefined) {
1564
+ _rawValue = self.getRawValueFromRowNode(rowNode, columnId);
1565
+ }
1566
+ return _rawValue;
1567
+ };
1568
+ const getColumn = () => {
1569
+ if (_column === undefined) {
1570
+ _column = api.columnApi.getColumnWithColumnId(columnId);
1571
+ }
1572
+ return _column;
1573
+ };
1859
1574
  return {
1860
- rawValue: rawValue,
1861
- displayValue: displayValue,
1862
- normalisedValue: normalisedValue,
1863
- column: abColumn,
1864
- primaryKeyValue: pkValue,
1575
+ get rawValue() {
1576
+ return getRawValue();
1577
+ },
1578
+ get visible() {
1579
+ return self.isPrimaryKeyVisible(this.primaryKeyValue);
1580
+ },
1581
+ get displayValue() {
1582
+ if (_displayValue === undefined) {
1583
+ _displayValue = self.getDisplayValueFromRawValue(rowNode, columnId, getRawValue());
1584
+ }
1585
+ return _displayValue;
1586
+ },
1587
+ get normalisedValue() {
1588
+ if (_normalisedValue === undefined) {
1589
+ _normalisedValue = self.getNormalisedValueFromRawValue(getRawValue(), getColumn());
1590
+ }
1591
+ return _normalisedValue;
1592
+ },
1593
+ get column() {
1594
+ return getColumn();
1595
+ },
1596
+ get primaryKeyValue() {
1597
+ if (_primaryKeyValue === undefined) {
1598
+ _primaryKeyValue = self.getPrimaryKeyValueFromRowNode(rowNode);
1599
+ }
1600
+ return _primaryKeyValue;
1601
+ },
1602
+ get isPivotCell() {
1603
+ if (_isPivotCell === undefined) {
1604
+ _isPivotCell = api.columnApi.isPivotResultColumn(columnId);
1605
+ }
1606
+ return _isPivotCell;
1607
+ },
1608
+ get isRowGroupCell() {
1609
+ if (_isRowGroupCell === undefined) {
1610
+ _isRowGroupCell = rowNode.group;
1611
+ }
1612
+ return _isRowGroupCell;
1613
+ },
1865
1614
  rowNode: rowNode,
1866
- isPivotCell,
1867
- isRowGroupCell,
1868
1615
  };
1869
1616
  }
1870
1617
  getPrimaryKeyValueFromRowNode(rowNode, gridApi) {
@@ -1944,31 +1691,25 @@ class AdaptableAgGrid {
1944
1691
  return rawValue;
1945
1692
  }
1946
1693
  const dataType = column.dataType;
1947
- if (dataType === 'String') {
1694
+ if (dataType === 'text') {
1948
1695
  return typeof rawValue !== 'string' ? String(rawValue) : rawValue;
1949
1696
  }
1950
- if (dataType === 'Number') {
1697
+ if (dataType === 'number') {
1951
1698
  // empty string or space should not be converted to 0
1952
1699
  return typeof rawValue !== 'number' && StringExtensions_1.default.IsNumeric(rawValue)
1953
1700
  ? Number(rawValue)
1954
1701
  : rawValue;
1955
1702
  }
1956
- if (dataType === 'Boolean') {
1703
+ if (dataType === 'boolean') {
1957
1704
  return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
1958
1705
  }
1959
- if (dataType === 'Date') {
1706
+ if (dataType === 'date' || dataType === 'dateString') {
1960
1707
  return rawValue instanceof Date ? rawValue : (0, DateHelper_1.parseDateValue)(rawValue);
1961
1708
  }
1962
1709
  return rawValue;
1963
1710
  }
1964
- updateColumnModelAndRefreshGrid(config) {
1965
- this.logger.info(`Updating Column Model and Refreshing Grid ${config ? `with config ${JSON.stringify(config)}` : ''}`);
1966
- if (config === null || config === void 0 ? void 0 : config.preemptiveColumnStateRefresh) {
1967
- this.deriveAdaptableColumnStateFromAgGrid();
1968
- }
1969
- if (!(config === null || config === void 0 ? void 0 : config.skipColDefsRefresh)) {
1970
- this.refreshColDefs();
1971
- }
1711
+ updateColumnModelAndRefreshGrid() {
1712
+ this.logger.info(`Updating Column Model and Refreshing Grid.`);
1972
1713
  this.deriveAdaptableColumnStateFromAgGrid();
1973
1714
  this.agGridColumnAdapter.setupColumns();
1974
1715
  this.redrawBody();
@@ -2000,9 +1741,12 @@ class AdaptableAgGrid {
2000
1741
  redrawRow(rowNode) {
2001
1742
  this.redrawRows([rowNode]);
2002
1743
  }
2003
- refreshCells(rowNodes, columns, forceUpdate, suppressFlash = false) {
1744
+ refreshCell(rowNode, column, forceUpdate, suppressFlash = false) {
1745
+ this.refreshCells(rowNode, [column], forceUpdate, suppressFlash);
1746
+ }
1747
+ refreshCells(rowNode, columns, forceUpdate, suppressFlash = false) {
2004
1748
  const refreshCellParams = {
2005
- rowNodes,
1749
+ rowNodes: [rowNode],
2006
1750
  columns: columns,
2007
1751
  force: forceUpdate,
2008
1752
  suppressFlash,
@@ -2013,7 +1757,13 @@ class AdaptableAgGrid {
2013
1757
  this.agGridAdapter.getAgGridApi().refreshCells({ force: forceUpdate });
2014
1758
  }
2015
1759
  refreshColumns(columns, forceUpdate, suppressFlash) {
2016
- this.refreshCells(null, columns, forceUpdate, suppressFlash);
1760
+ const refreshCellParams = {
1761
+ rowNodes: null,
1762
+ columns: columns,
1763
+ force: forceUpdate,
1764
+ suppressFlash,
1765
+ };
1766
+ this.agGridAdapter.getAgGridApi().refreshCells(refreshCellParams);
2017
1767
  }
2018
1768
  jumpToRow(rowNode) {
2019
1769
  this.agGridAdapter.getAgGridApi().ensureNodeVisible(rowNode, 'middle');
@@ -2026,7 +1776,7 @@ class AdaptableAgGrid {
2026
1776
  this.jumpToColumn(columnId);
2027
1777
  }
2028
1778
  selectColumn(columnId, config) {
2029
- if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
1779
+ if (!config?.keepExistingSelection) {
2030
1780
  this.agGridAdapter.getAgGridApi().clearCellSelection();
2031
1781
  }
2032
1782
  const cellRangeParams = {
@@ -2038,7 +1788,7 @@ class AdaptableAgGrid {
2038
1788
  this.agGridAdapter.getAgGridApi().addCellRange(cellRangeParams);
2039
1789
  }
2040
1790
  selectColumns(columnIds, config) {
2041
- if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
1791
+ if (!config?.keepExistingSelection) {
2042
1792
  this.agGridAdapter.getAgGridApi().clearCellSelection();
2043
1793
  }
2044
1794
  const rowCount = this.agGridAdapter.getAgGridApi().getDisplayedRowCount();
@@ -2069,7 +1819,7 @@ class AdaptableAgGrid {
2069
1819
  }
2070
1820
  this.agGridAdapter.setGridOption('rowData', dataSource);
2071
1821
  this.updateRowGroupsExpandedState();
2072
- this.updateColumnModelAndRefreshGrid();
1822
+ // this.updateColumnModelAndRefreshGrid();
2073
1823
  }
2074
1824
  getGridData() {
2075
1825
  const data = [];
@@ -2102,7 +1852,7 @@ class AdaptableAgGrid {
2102
1852
  }
2103
1853
  getFirstRowNode() {
2104
1854
  let firstRowNode = this.getFirstDisplayedRowNode();
2105
- if (firstRowNode === null || firstRowNode === void 0 ? void 0 : firstRowNode.group) {
1855
+ if (firstRowNode?.group) {
2106
1856
  // all groups may be closed so it is safer to get first leaf node
2107
1857
  // all groups should have at least one leafe node (though not necessarily if using SSRM)
2108
1858
  if (ArrayExtensions_1.default.IsNotNullOrEmpty(firstRowNode.allLeafChildren)) {
@@ -2115,12 +1865,10 @@ class AdaptableAgGrid {
2115
1865
  if (!layout) {
2116
1866
  layout = this.api.layoutApi.getCurrentLayout();
2117
1867
  }
2118
- if (this.api.layoutApi.internalApi.areExpandedRowGroupsSavedInLayouts() &&
2119
- ArrayExtensions_1.default.IsNotNullOrEmpty(layout.ExpandedRowGroupValues)) {
2120
- this.expandRowGroupsForValues(layout.ExpandedRowGroupValues);
2121
- }
2122
- if (this.adaptableOptions.layoutOptions.displayRowGroups === 'expanded') {
2123
- this.expandAllRowGroups();
1868
+ if (!(0, LayoutHelpers_1.isPivotLayout)(layout)) {
1869
+ const layoutModel = (0, LayoutHelpers_1.tableLayoutToTableLayoutModel)(layout);
1870
+ this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues);
1871
+ return;
2124
1872
  }
2125
1873
  }
2126
1874
  isGroupRowNode(rowNode) {
@@ -2154,7 +1902,7 @@ class AdaptableAgGrid {
2154
1902
  if (typeof dataUpdateConfig.callback === 'function') {
2155
1903
  dataUpdateConfig.callback(transaction);
2156
1904
  }
2157
- resolve(transaction === null || transaction === void 0 ? void 0 : transaction.update);
1905
+ resolve(transaction?.update);
2158
1906
  });
2159
1907
  if (dataUpdateConfig.flushAsync) {
2160
1908
  this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
@@ -2168,7 +1916,7 @@ class AdaptableAgGrid {
2168
1916
  if (dataUpdateConfig.flushAsync) {
2169
1917
  this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
2170
1918
  }
2171
- return Promise.resolve(transaction === null || transaction === void 0 ? void 0 : transaction.update);
1919
+ return Promise.resolve(transaction?.update);
2172
1920
  }
2173
1921
  }
2174
1922
  addRows(dataRows, dataUpdateConfig) {
@@ -2186,7 +1934,7 @@ class AdaptableAgGrid {
2186
1934
  if (typeof dataUpdateConfig.callback === 'function') {
2187
1935
  dataUpdateConfig.callback(transaction);
2188
1936
  }
2189
- resolve(transaction === null || transaction === void 0 ? void 0 : transaction.add);
1937
+ resolve(transaction?.add);
2190
1938
  this.updateRowGroupsExpandedState();
2191
1939
  });
2192
1940
  if (dataUpdateConfig.flushAsync) {
@@ -2200,7 +1948,7 @@ class AdaptableAgGrid {
2200
1948
  this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
2201
1949
  }
2202
1950
  this.updateRowGroupsExpandedState();
2203
- return Promise.resolve(transaction === null || transaction === void 0 ? void 0 : transaction.add);
1951
+ return Promise.resolve(transaction?.add);
2204
1952
  }
2205
1953
  }
2206
1954
  addOrUpdateRows(dataRows, dataUpdateConfig) {
@@ -2228,12 +1976,12 @@ class AdaptableAgGrid {
2228
1976
  if (typeof dataUpdateConfig.callback === 'function') {
2229
1977
  dataUpdateConfig.callback(transaction);
2230
1978
  }
2231
- if (transaction === null || transaction === void 0 ? void 0 : transaction.add) {
1979
+ if (transaction?.add) {
2232
1980
  this.updateRowGroupsExpandedState();
2233
1981
  }
2234
1982
  resolve({
2235
- added: transaction === null || transaction === void 0 ? void 0 : transaction.add,
2236
- updated: transaction === null || transaction === void 0 ? void 0 : transaction.update,
1983
+ added: transaction?.add,
1984
+ updated: transaction?.update,
2237
1985
  });
2238
1986
  });
2239
1987
  if (dataUpdateConfig.flushAsync) {
@@ -2247,15 +1995,15 @@ class AdaptableAgGrid {
2247
1995
  add: addDataRows,
2248
1996
  addIndex: dataUpdateConfig.addIndex,
2249
1997
  });
2250
- if (transaction === null || transaction === void 0 ? void 0 : transaction.add) {
1998
+ if (transaction?.add) {
2251
1999
  this.updateRowGroupsExpandedState();
2252
2000
  }
2253
2001
  if (dataUpdateConfig.flushAsync) {
2254
2002
  this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
2255
2003
  }
2256
2004
  return Promise.resolve({
2257
- added: transaction === null || transaction === void 0 ? void 0 : transaction.add,
2258
- updated: transaction === null || transaction === void 0 ? void 0 : transaction.update,
2005
+ added: transaction?.add,
2006
+ updated: transaction?.update,
2259
2007
  });
2260
2008
  }
2261
2009
  }
@@ -2269,7 +2017,7 @@ class AdaptableAgGrid {
2269
2017
  if (typeof dataUpdateConfig.callback === 'function') {
2270
2018
  dataUpdateConfig.callback(transaction);
2271
2019
  }
2272
- resolve(transaction === null || transaction === void 0 ? void 0 : transaction.remove);
2020
+ resolve(transaction?.remove);
2273
2021
  });
2274
2022
  if (dataUpdateConfig.flushAsync) {
2275
2023
  this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
@@ -2316,51 +2064,137 @@ class AdaptableAgGrid {
2316
2064
  this.autoSizeColumns([columnId]);
2317
2065
  }
2318
2066
  autoSizeColumns(columnIds) {
2319
- this.agGridAdapter.getAgGridApi().autoSizeColumns(columnIds);
2067
+ this.layoutManager.autoSizeColumns(columnIds);
2320
2068
  }
2321
2069
  autoSizeAllColumns() {
2322
- this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
2323
- }
2324
- setColumnOrder(VisibleColumnList) {
2325
- const newColumnState = this.getSortedColumnStateForVisibleColumns(VisibleColumnList);
2326
- this.agGridAdapter.getAgGridApi().applyColumnState({
2327
- state: newColumnState,
2328
- applyOrder: true,
2329
- });
2330
- this.deriveAdaptableColumnStateFromAgGrid();
2331
- }
2332
- getSortedColumnStateForVisibleColumns(visibleColumnList, columnState, layout) {
2333
- layout = layout || this.api.layoutApi.getCurrentLayout();
2334
- visibleColumnList = visibleColumnList || layout.Columns;
2335
- columnState = columnState || this.agGridAdapter.getAgGridApi().getColumnState();
2336
- return (0, buildSortedColumnStateForLayout_1.buildSortedColumnStateForLayout)({
2337
- columnState: columnState.map((colState) => {
2338
- return {
2339
- colId: colState.colId,
2340
- hide: colState.hide,
2341
- };
2342
- }),
2343
- layout: Object.assign(Object.assign({}, layout), { Columns: visibleColumnList }),
2344
- groupDisplayType: this.agGridAdapter.getGridOption('groupDisplayType'),
2345
- });
2346
- }
2347
- getDistinctValuesForColumn(column, distinctValuesParams) {
2348
- let gridCells = this.getGridCellsForPermittedValues(column, distinctValuesParams);
2349
- if (ArrayExtensions_1.default.IsNullOrEmpty(gridCells)) {
2350
- gridCells = this.getDistinctGridCellsForColumn(column, distinctValuesParams);
2351
- }
2352
- return this.getUniqueGridCells(column, gridCells);
2353
- }
2354
- getGridCellsForPermittedValues(column, distinctValuesParams) {
2355
- var _a;
2356
- let gridCells = [];
2357
- const permittedValues = (_a = distinctValuesParams.permittedValues) !== null && _a !== void 0 ? _a : this.api.userInterfaceApi.getPermittedValuesForColumn(column);
2358
- if (ArrayExtensions_1.default.IsNotNullOrEmpty(permittedValues)) {
2359
- gridCells = permittedValues.map((pv) => {
2070
+ const agGridApi = this.agGridAdapter.getAgGridApi();
2071
+ if (agGridApi) {
2072
+ agGridApi.autoSizeAllColumns();
2073
+ }
2074
+ }
2075
+ async getDistinctValuesForColumn(column) {
2076
+ return this.getDistinctGridCellsForColumn(column);
2077
+ }
2078
+ async getDistinctFilterValuesForColumn(options) {
2079
+ const { column } = options;
2080
+ // First get the Grid Cells in the Column
2081
+ const currentGridCells = this.getDistinctGridCellsForColumn(column);
2082
+ // If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
2083
+ const customInFilterValues = this.adaptableOptions.filterOptions.customInFilterValues;
2084
+ if (customInFilterValues) {
2085
+ const gridApiInternal = this.api.gridApi.internalApi;
2086
+ const customInFilterValuesContext = {
2087
+ ...this.api.internalApi.buildBaseContext(),
2088
+ column,
2089
+ get currentSearchValue() {
2090
+ return options.currentSearchValue;
2091
+ },
2092
+ get sortedValues() {
2093
+ const result = gridApiInternal
2094
+ .sortDistinctValues(currentGridCells, column)
2095
+ .map((gridCell) => {
2096
+ return {
2097
+ label: gridCell.displayValue,
2098
+ value: gridCell.rawValue,
2099
+ isSelected: gridCell.rowNode.displayed,
2100
+ count: gridCell.count,
2101
+ get visible() {
2102
+ return gridCell.visible;
2103
+ },
2104
+ };
2105
+ });
2106
+ return result;
2107
+ },
2108
+ get defaultValues() {
2109
+ const result = currentGridCells.map((gridCell) => {
2110
+ return {
2111
+ label: gridCell.displayValue,
2112
+ value: gridCell.rawValue,
2113
+ isSelected: gridCell.rowNode.displayed,
2114
+ count: gridCell.count,
2115
+ get visible() {
2116
+ return gridCell.visible;
2117
+ },
2118
+ };
2119
+ });
2120
+ return result;
2121
+ },
2122
+ };
2123
+ let customDistinctValues;
2124
+ try {
2125
+ customDistinctValues = await customInFilterValues(customInFilterValuesContext);
2126
+ }
2127
+ catch (error) {
2128
+ this.logger.consoleError(`Failed to fetch custom filter values`, column, error);
2129
+ }
2130
+ if (customDistinctValues) {
2131
+ return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2132
+ }
2133
+ }
2134
+ // No distinct values so lets return unique grid cells
2135
+ return currentGridCells;
2136
+ }
2137
+ async getDistinctEditValuesForColumn(options) {
2138
+ const { column, gridCell } = options;
2139
+ // First get the Grid Cells in the Column
2140
+ const currentGridCells = this.getDistinctGridCellsForColumn(column);
2141
+ // If there are custom distinct value, return them, but only if a module has been specifically set
2142
+ const customEditColumnValues = this.adaptableOptions.editOptions.customEditColumnValues;
2143
+ if (customEditColumnValues) {
2144
+ const customEditValuesContext = {
2145
+ ...this.api.internalApi.buildBaseContext(),
2146
+ column,
2147
+ gridCell: gridCell,
2148
+ get currentSearchValue() {
2149
+ return options.currentSearchValue;
2150
+ },
2151
+ get defaultValues() {
2152
+ const result = currentGridCells.map((gridCell) => {
2153
+ return {
2154
+ label: gridCell.displayValue,
2155
+ value: gridCell.rawValue,
2156
+ get visible() {
2157
+ return gridCell.visible;
2158
+ },
2159
+ };
2160
+ });
2161
+ return result;
2162
+ },
2163
+ };
2164
+ if (customEditColumnValues) {
2165
+ let customDistinctValues;
2166
+ try {
2167
+ customDistinctValues = await customEditColumnValues(customEditValuesContext);
2168
+ }
2169
+ catch (error) {
2170
+ this.logger.consoleError(`Failed to fetch custom edit values`, column, error);
2171
+ }
2172
+ if (customDistinctValues) {
2173
+ return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2174
+ }
2175
+ }
2176
+ }
2177
+ // No distinct values so lets return unique grid cells
2178
+ return currentGridCells;
2179
+ }
2180
+ getDistinctGridCellsForColumn(column) {
2181
+ let gridCells = [];
2182
+ this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
2183
+ const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
2184
+ if (gridCell) {
2185
+ gridCells.push(gridCell);
2186
+ }
2187
+ });
2188
+ return this.getUniqueGridCells(column, gridCells);
2189
+ }
2190
+ getGridCellsForCustomColumnValues(customColumnValues, column) {
2191
+ let gridCells = [];
2192
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(customColumnValues)) {
2193
+ gridCells = customColumnValues.map((pv) => {
2360
2194
  return {
2361
- rawValue: pv,
2362
- displayValue: pv,
2363
- normalisedValue: pv,
2195
+ rawValue: pv.value,
2196
+ displayValue: pv.label ?? pv.value,
2197
+ normalisedValue: pv.value,
2364
2198
  columnId: column.columnId,
2365
2199
  column: column,
2366
2200
  rowNode: undefined,
@@ -2371,25 +2205,8 @@ class AdaptableAgGrid {
2371
2205
  return gridCells;
2372
2206
  }
2373
2207
  }
2374
- getDistinctGridCellsForColumn(column, distinctValuesParams) {
2375
- let gridCells = [];
2376
- if (distinctValuesParams.visibleRowsOnly === true) {
2377
- this.agGridAdapter.getAgGridApi().forEachNodeAfterFilter((rowNode) => {
2378
- const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
2379
- if (gridCell && gridCell.rowNode !== distinctValuesParams.skipRowNode) {
2380
- gridCells.push(gridCell);
2381
- }
2382
- });
2383
- }
2384
- else {
2385
- this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
2386
- const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
2387
- if (gridCell && gridCell.rowNode !== distinctValuesParams.skipRowNode) {
2388
- gridCells.push(gridCell);
2389
- }
2390
- });
2391
- }
2392
- return gridCells;
2208
+ isPrimaryKeyVisible(primaryKey) {
2209
+ return !this.filteredOutPrimaryKeys.has(primaryKey);
2393
2210
  }
2394
2211
  addDistinctColumnValue(rowNode, columnId) {
2395
2212
  // we do not return the values of the aggregates when in grouping mode
@@ -2405,17 +2222,43 @@ class AdaptableAgGrid {
2405
2222
  }
2406
2223
  }
2407
2224
  getUniqueGridCells(column, gridCells) {
2408
- let uniqueVals = (0, uniqBy_1.default)(gridCells, (dataItem) => {
2409
- const value = dataItem.rawValue;
2225
+ const cache = new Map();
2226
+ const lowercase = this.api.predicateApi.useCaseSensitivity();
2227
+ const getter = (dataItem) => {
2228
+ let value = dataItem.rawValue;
2410
2229
  if (value instanceof Date) {
2411
2230
  return value.toISOString();
2412
2231
  }
2232
+ if (lowercase && column.dataType == 'text') {
2233
+ value = dataItem.displayValue.toLowerCase();
2234
+ }
2413
2235
  return value;
2236
+ };
2237
+ gridCells.forEach((dataItem) => {
2238
+ const value = getter(dataItem);
2239
+ const primaryKey = dataItem.primaryKeyValue;
2240
+ if (!cache.has(value)) {
2241
+ cache.set(value, {
2242
+ count: 1,
2243
+ cell: dataItem,
2244
+ visible: this.isPrimaryKeyVisible(primaryKey),
2245
+ });
2246
+ }
2247
+ else {
2248
+ const data = cache.get(value);
2249
+ data.count++;
2250
+ data.visible = data.visible || this.isPrimaryKeyVisible(primaryKey);
2251
+ }
2414
2252
  });
2415
- if (column.dataType == 'String' && this.api.predicateApi.useCaseSensitivity()) {
2416
- uniqueVals = (0, uniqBy_1.default)(uniqueVals, (d) => d.displayValue.toLowerCase());
2417
- }
2418
- return uniqueVals.slice(0, this.api.columnFilterApi.internalApi.getFilterValuesMaxNumberOfItems(column));
2253
+ const result = [];
2254
+ cache.forEach(({ count, cell, visible }) => {
2255
+ result.push({
2256
+ ...cell,
2257
+ count,
2258
+ visible,
2259
+ });
2260
+ });
2261
+ return result;
2419
2262
  }
2420
2263
  getGridCellsForColumn(columnId, onlyVisibleRows = false) {
2421
2264
  let returnValues = [];
@@ -2435,27 +2278,6 @@ class AdaptableAgGrid {
2435
2278
  }
2436
2279
  return returnValues;
2437
2280
  }
2438
- // This horrible method is temporary until we can get rid of having predicates inside values which is coming soon
2439
- // We need it in case Blanks is requested
2440
- // once we go to the new multi predicate screen then we wont show blanks any more - which we should never have done
2441
- getGridCellsForColumnTemp(columnId, onlyVisibleRows) {
2442
- let returnValues = [];
2443
- const handler = (rowNode) => {
2444
- if (!this.isGroupRowNode(rowNode)) {
2445
- const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
2446
- if (gridCell) {
2447
- returnValues.push(gridCell);
2448
- }
2449
- }
2450
- };
2451
- if (onlyVisibleRows) {
2452
- this.agGridAdapter.getAgGridApi().forEachNodeAfterFilter(handler);
2453
- }
2454
- else {
2455
- this.agGridAdapter.getAgGridApi().forEachNode(handler);
2456
- }
2457
- return returnValues;
2458
- }
2459
2281
  getRowNodesForPrimaryKeys(primaryKeyValues) {
2460
2282
  let rowNodes = [];
2461
2283
  if (this.useRowNodeLookUp) {
@@ -2483,15 +2305,14 @@ class AdaptableAgGrid {
2483
2305
  return this.agGridAdapter.getAgGridApi().getDisplayedRowAtIndex(index);
2484
2306
  }
2485
2307
  getAgGridStatusPanels() {
2486
- var _a, _b;
2487
- return (_b = (_a = this.agGridAdapter.getGridOption('statusBar')) === null || _a === void 0 ? void 0 : _a.statusPanels) !== null && _b !== void 0 ? _b : [];
2308
+ return this.agGridAdapter.getGridOption('statusBar')?.statusPanels ?? [];
2488
2309
  }
2489
2310
  setDataValue(value, column, primaryKeyValue, rowNode) {
2490
2311
  // note: because we use RowNode.setDataValue() this will cause Validation to fire
2491
2312
  // see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
2492
2313
  let newValue;
2493
2314
  let dataType = column.dataType;
2494
- newValue = dataType == 'Number' ? Number(value) : value;
2315
+ newValue = dataType == 'number' ? Number(value) : value;
2495
2316
  if (dataType == undefined) {
2496
2317
  return; // no point continuing as probably a wrong column
2497
2318
  }
@@ -2521,8 +2342,8 @@ class AdaptableAgGrid {
2521
2342
  }
2522
2343
  forAllRowNodesDo(func, config) {
2523
2344
  this.agGridAdapter.getAgGridApi().forEachNode((rowNode, rowIndex) => {
2524
- const includeGroupRows = (config === null || config === void 0 ? void 0 : config.includeGroupRows) || !this.isGroupRowNode(rowNode);
2525
- const filterFnFulfilled = !(config === null || config === void 0 ? void 0 : config.filterFn) || (config === null || config === void 0 ? void 0 : config.filterFn(rowNode));
2345
+ const includeGroupRows = config?.includeGroupRows || !this.isGroupRowNode(rowNode);
2346
+ const filterFnFulfilled = !config?.filterFn || config?.filterFn(rowNode);
2526
2347
  if (includeGroupRows && filterFnFulfilled) {
2527
2348
  func(rowNode, rowIndex);
2528
2349
  }
@@ -2536,8 +2357,8 @@ class AdaptableAgGrid {
2536
2357
  return this.forAllRowNodesDo(func, config);
2537
2358
  }
2538
2359
  this.agGridAdapter.getAgGridApi().forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
2539
- const includeGroupRows = (config === null || config === void 0 ? void 0 : config.includeGroupRows) || !this.isGroupRowNode(rowNode);
2540
- const filterFnFulfilled = !(config === null || config === void 0 ? void 0 : config.filterFn) || (config === null || config === void 0 ? void 0 : config.filterFn(rowNode));
2360
+ const includeGroupRows = config?.includeGroupRows || !this.isGroupRowNode(rowNode);
2361
+ const filterFnFulfilled = !config?.filterFn || config?.filterFn(rowNode);
2541
2362
  if (includeGroupRows && filterFnFulfilled) {
2542
2363
  func(rowNode, rowIndex);
2543
2364
  }
@@ -2546,11 +2367,10 @@ class AdaptableAgGrid {
2546
2367
  getAgGridRowModelType(gridOptions) {
2547
2368
  // it seems that this can be null so we need explicitly to return "clientSide" in this case
2548
2369
  // need to check that for ServerSideRowModel it is ALWAYS returned...
2549
- var _a, _b;
2550
2370
  if (gridOptions) {
2551
- return (_a = gridOptions.rowModelType) !== null && _a !== void 0 ? _a : 'clientSide';
2371
+ return gridOptions.rowModelType ?? 'clientSide';
2552
2372
  }
2553
- return (_b = this.agGridAdapter.getAgGridApi().getGridOption('rowModelType')) !== null && _b !== void 0 ? _b : 'clientSide';
2373
+ return this.agGridAdapter.getAgGridApi().getGridOption('rowModelType') ?? 'clientSide';
2554
2374
  }
2555
2375
  getAllRowNodes(config) {
2556
2376
  let rowNodes = [];
@@ -2609,16 +2429,18 @@ class AdaptableAgGrid {
2609
2429
  this.agGridAdapter.getAgGridApi().addCellRange(cellRangeParams);
2610
2430
  }
2611
2431
  getAgGridColumnType(columnId) {
2612
- var _a;
2613
- const { type } = (_a = this.agGridAdapter.getAgGridApi().getColumnDef(columnId)) !== null && _a !== void 0 ? _a : {};
2432
+ const { type } = this.agGridAdapter.getAgGridApi().getColumnDef(columnId) ?? {};
2614
2433
  return type || '';
2615
2434
  }
2616
2435
  setColumnSort(columnSorts) {
2617
2436
  if (!this.isReady) {
2618
2437
  return;
2619
2438
  }
2620
- const columnSortsMap = columnSorts === null || columnSorts === void 0 ? void 0 : columnSorts.reduce((acc, columnSort, index) => {
2621
- acc[columnSort.ColumnId] = Object.assign(Object.assign({}, columnSort), { SortIndex: index });
2439
+ const columnSortsMap = columnSorts?.reduce((acc, columnSort, index) => {
2440
+ acc[columnSort.ColumnId] = {
2441
+ ...columnSort,
2442
+ SortIndex: index,
2443
+ };
2622
2444
  return acc;
2623
2445
  }, {});
2624
2446
  const newColumnState = this.agGridAdapter
@@ -2626,7 +2448,7 @@ class AdaptableAgGrid {
2626
2448
  .getColumnState()
2627
2449
  .map((colState) => {
2628
2450
  const { colId } = colState;
2629
- const state = Object.assign({}, colState);
2451
+ const state = { ...colState };
2630
2452
  const colSort = columnSortsMap ? columnSortsMap[colId] : undefined;
2631
2453
  if (colSort) {
2632
2454
  state.sort = colSort.SortOrder === 'Asc' ? 'asc' : 'desc';
@@ -2647,11 +2469,6 @@ class AdaptableAgGrid {
2647
2469
  clearColumnSort() {
2648
2470
  this.setColumnSort(null);
2649
2471
  }
2650
- hideColumnFilterForm() {
2651
- if (this.hideFilterFormPopup) {
2652
- this.hideFilterFormPopup();
2653
- }
2654
- }
2655
2472
  clearColumnFiltering() {
2656
2473
  this.agGridAdapter
2657
2474
  .getAgGridApi()
@@ -2672,11 +2489,11 @@ class AdaptableAgGrid {
2672
2489
  });
2673
2490
  }
2674
2491
  canGenerateCharts() {
2675
- return (this.agGridAdapter.isModulePresent(core_1.ModuleNames.GridChartsModule) &&
2492
+ return (this.agGridAdapter.isAgGridModuleRegistered('IntegratedCharts') &&
2676
2493
  this.agGridAdapter.getAgGridApi().getGridOption('enableCharts'));
2677
2494
  }
2678
2495
  canDisplaySparklines() {
2679
- return this.agGridAdapter.isModulePresent(core_1.ModuleNames.SparklinesModule);
2496
+ return this.agGridAdapter.isAgGridModuleRegistered('Sparklines');
2680
2497
  }
2681
2498
  showCharts(chartsDefinitions, chartContainer) {
2682
2499
  return chartsDefinitions.map((chartDefinition) => this.showChart(chartDefinition, chartContainer));
@@ -2696,7 +2513,10 @@ class AdaptableAgGrid {
2696
2513
  .restoreChart(chartDefinition.Model, container);
2697
2514
  const chartModel = this.getChartModels().find((chartModel) => chartModel.chartId === chartRef.chartId);
2698
2515
  // Update the definition in state so it is not considered new
2699
- this.api.chartingApi.editChartDefinition(Object.assign(Object.assign({}, chartDefinition), { Model: chartModel }));
2516
+ this.api.chartingApi.editChartDefinition({
2517
+ ...chartDefinition,
2518
+ Model: chartModel,
2519
+ });
2700
2520
  return chartRef;
2701
2521
  }
2702
2522
  updateChart(chart) {
@@ -2726,17 +2546,13 @@ class AdaptableAgGrid {
2726
2546
  return this.agGridAdapter.getAgGridApi().getDisplayedRowCount();
2727
2547
  }
2728
2548
  getColumnCount() {
2729
- var _a, _b;
2730
- return (_b = (_a = this.agGridAdapter.getAgGridApi().getColumns()) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
2549
+ return this.agGridAdapter.getAgGridApi().getColumns()?.length ?? 0;
2731
2550
  }
2732
2551
  getVisibleColumnCount() {
2733
- var _a, _b;
2734
- return ((_b = (_a = this.agGridAdapter
2552
+ return (this.agGridAdapter
2735
2553
  .getAgGridApi()
2736
- .getColumns()) === null || _a === void 0 ? void 0 : _a.filter((c) => c.isVisible()).length) !== null && _b !== void 0 ? _b : 0);
2737
- }
2738
- isGridGroupable() {
2739
- return !this.api.internalApi.isGridInTreeMode();
2554
+ .getColumns()
2555
+ ?.filter((c) => c.isVisible()).length ?? 0);
2740
2556
  }
2741
2557
  isGridGroupingActive() {
2742
2558
  let isGroupedActive = false;
@@ -2752,6 +2568,9 @@ class AdaptableAgGrid {
2752
2568
  setAgGridQuickSearch(searchText) {
2753
2569
  this.agGridAdapter.setGridOption('quickFilterText', searchText);
2754
2570
  }
2571
+ clearAgGridQuickSearch() {
2572
+ this.setAgGridQuickSearch('');
2573
+ }
2755
2574
  getAgGridCurrentThemeName() {
2756
2575
  const container = this.getAgGridContainerElement();
2757
2576
  if (container && container.classList) {
@@ -2790,7 +2609,7 @@ class AdaptableAgGrid {
2790
2609
  const container = this.getAgGridContainerElement();
2791
2610
  if (container != null) {
2792
2611
  container.classList.add('ab-Grid');
2793
- if (this.adaptableOptions.columnFilterOptions.indicateFilteredColumns) {
2612
+ if (this.adaptableOptions.filterOptions.columnFilterOptions.indicateFilteredColumns) {
2794
2613
  container.classList.add('ab-Grid--indicate-filtered-columns');
2795
2614
  }
2796
2615
  }
@@ -2806,7 +2625,7 @@ class AdaptableAgGrid {
2806
2625
  // we mutate the theme later,
2807
2626
  // and since we don't want the mutation to end up in state
2808
2627
  // we better clone it here
2809
- return Object.assign({}, t);
2628
+ return { ...t };
2810
2629
  });
2811
2630
  const allThemesMap = allThemes.reduce((acc, theme) => {
2812
2631
  acc[theme.Name] = theme;
@@ -2938,36 +2757,15 @@ class AdaptableAgGrid {
2938
2757
  this.agGridAdapter.getAgGridApi().onGroupExpandedOrCollapsed();
2939
2758
  }
2940
2759
  }
2941
- getExpandRowGroupsKeys() {
2942
- let returnValues = [];
2943
- if (this.api.layoutApi.internalApi.areExpandedRowGroupsSavedInLayouts()) {
2944
- this.agGridAdapter.getAgGridApi().forEachNode((node) => {
2945
- if (node.group && node.expanded) {
2946
- let current = node;
2947
- const path = [];
2948
- while (current) {
2949
- path.push(current.key);
2950
- current = current.parent;
2951
- }
2952
- returnValues.push(path
2953
- .filter((x) => !!x)
2954
- .reverse()
2955
- .join(GeneralConstants_1.GROUP_PATH_SEPARATOR));
2956
- }
2957
- });
2958
- }
2959
- return returnValues;
2960
- }
2961
2760
  getAgGridColumnForColumnId(columnId) {
2962
2761
  return this.agGridAdapter.getAgGridApi().getColumn(columnId);
2963
2762
  }
2964
2763
  getMinMaxCachedValueForColumn(column, minMax) {
2965
- var _a;
2966
2764
  const { columnId, dataType } = column;
2967
- if (dataType !== 'Number') {
2765
+ if (dataType !== 'number') {
2968
2766
  return undefined;
2969
2767
  }
2970
- let value = (_a = this.columnMinMaxValuesCache[columnId]) === null || _a === void 0 ? void 0 : _a[minMax];
2768
+ let value = this.columnMinMaxValuesCache[columnId]?.[minMax];
2971
2769
  if (value !== undefined) {
2972
2770
  return value;
2973
2771
  }
@@ -2975,14 +2773,13 @@ class AdaptableAgGrid {
2975
2773
  .getUnsortedDistinctRawValuesForColumn(columnId)
2976
2774
  .map((item) => item.rawValue);
2977
2775
  value = minMax === 'min' ? Math.min(...distinctRawValues) : Math.max(...distinctRawValues);
2978
- this.columnMinMaxValuesCache[columnId] = Object.assign(Object.assign({}, this.columnMinMaxValuesCache[columnId]), { [minMax]: value });
2776
+ this.columnMinMaxValuesCache[columnId] = {
2777
+ ...this.columnMinMaxValuesCache[columnId],
2778
+ [minMax]: value,
2779
+ };
2979
2780
  return value;
2980
2781
  }
2981
- getAgGridRegisteredModules() {
2982
- return this.agGridAdapter.getRegisteredModules();
2983
- }
2984
2782
  destroy(config) {
2985
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
2986
2783
  if (!config) {
2987
2784
  config = {
2988
2785
  unmount: true,
@@ -2998,16 +2795,13 @@ class AdaptableAgGrid {
2998
2795
  config.destroyAgGrid = true;
2999
2796
  }
3000
2797
  }
3001
- if ((config === null || config === void 0 ? void 0 : config.destroyApi) === true) {
3002
- this.logger.warn(`Use of 'destroyApi' is deprecated. Use 'destroyAgGrid' instead.`);
3003
- }
3004
- if (((_a = this.agGridAdapter) === null || _a === void 0 ? void 0 : _a.getAgGridApi()) && !this.agGridAdapter.getAgGridApi().isDestroyed()) {
2798
+ this.__prevLayoutForOnChange = undefined;
2799
+ this.layoutManager.destroy();
2800
+ this.filteredOutPrimaryKeys.clear();
2801
+ if (this.agGridAdapter?.getAgGridApi() && !this.agGridAdapter.getAgGridApi().isDestroyed()) {
3005
2802
  this.agGridAdapter
3006
2803
  .getAgGridApi()
3007
2804
  .removeEventListener('firstDataRendered', this.listenerFirstDataRendered);
3008
- this.agGridAdapter
3009
- .getAgGridApi()
3010
- .removeEventListener('columnPivotModeChanged', this.listenerPivotModeChanged);
3011
2805
  this.agGridAdapter
3012
2806
  .getAgGridApi()
3013
2807
  .removeEventListener('columnPivotChanged', this.listenerPivotChanged);
@@ -3040,7 +2834,6 @@ class AdaptableAgGrid {
3040
2834
  .getAgGridApi()
3041
2835
  .removeGlobalListener(this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave);
3042
2836
  this.listenerFirstDataRendered = null;
3043
- this.listenerPivotModeChanged = null;
3044
2837
  this.listenerPivotChanged = null;
3045
2838
  this.listenerCellEditingStarted = null;
3046
2839
  this.listenerColumnRowGroupChanged = null;
@@ -3052,9 +2845,8 @@ class AdaptableAgGrid {
3052
2845
  this.listenerGlobalColumnEventsThatTriggerStateChange = null;
3053
2846
  this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = null;
3054
2847
  this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = null;
3055
- this.throttleFilterOnEditDataChange = null;
3056
- this.throttleFilterOnTickingDataChange = null;
3057
- const liveGridOptions = this.DANGER_getPrivateAgGridBeans().gridOptions;
2848
+ this.throttleFilterOnDataChange = null;
2849
+ const liveGridOptions = this.agGridAdapter.DANGER_getLiveGridOptions();
3058
2850
  if (liveGridOptions) {
3059
2851
  this.agGridOptionsService.revertGridOptionsPropertiesToUserValue(liveGridOptions, [
3060
2852
  'aggFuncs',
@@ -3071,7 +2863,6 @@ class AdaptableAgGrid {
3071
2863
  'getRowId',
3072
2864
  'getRowStyle',
3073
2865
  'gridId',
3074
- 'initialGroupOrderComparator',
3075
2866
  'isExternalFilterPresent',
3076
2867
  'sideBar',
3077
2868
  'statusBar',
@@ -3082,10 +2873,8 @@ class AdaptableAgGrid {
3082
2873
  }
3083
2874
  }
3084
2875
  }
3085
- DANGER_AG_GRID_BEANS_MAP[this._agGridId] = null;
3086
- this.DANGER_updateGridOptionsMonkeyPatcher = null;
3087
- if ((config === null || config === void 0 ? void 0 : config.destroyApi) === true || (config === null || config === void 0 ? void 0 : config.destroyAgGrid) === true) {
3088
- (_b = this.agGridAdapter.getAgGridApi()) === null || _b === void 0 ? void 0 : _b.destroy();
2876
+ if (config?.destroyAgGrid === true) {
2877
+ this.agGridAdapter.getAgGridApi()?.destroy();
3089
2878
  }
3090
2879
  this.previousAgGridLayoutState = '';
3091
2880
  const gridContainerElement = this.getAgGridContainerElement();
@@ -3098,14 +2887,18 @@ class AdaptableAgGrid {
3098
2887
  this.agGridListenerMouseLeave = null;
3099
2888
  }
3100
2889
  this.api._internalDestroySelf();
3101
- (_c = this.agGridOptionsService) === null || _c === void 0 ? void 0 : _c.destroy();
2890
+ this.layoutManager?.destroy();
2891
+ this.layoutManager = null;
2892
+ this.agGridOptionsService?.destroy();
3102
2893
  this.agGridOptionsService = null;
3103
- (_d = this.agGridAdapter) === null || _d === void 0 ? void 0 : _d.destroy();
2894
+ this.agGridAdapter?.destroy();
3104
2895
  this.agGridAdapter = null;
3105
- (_e = this.agGridMenuAdapter) === null || _e === void 0 ? void 0 : _e.destroy();
2896
+ this.agGridMenuAdapter?.destroy();
3106
2897
  this.agGridMenuAdapter = null;
3107
- (_f = this.agGridColumnAdapter) === null || _f === void 0 ? void 0 : _f.destroy();
2898
+ this.agGridColumnAdapter?.destroy();
3108
2899
  this.agGridColumnAdapter = null;
2900
+ this.agGridExportAdapter?.destroy();
2901
+ this.agGridExportAdapter = null;
3109
2902
  this.rowListeners = null;
3110
2903
  this.emitter.destroy();
3111
2904
  this.emitter = null;
@@ -3114,189 +2907,65 @@ class AdaptableAgGrid {
3114
2907
  this.lifecycleState = 'preDestroyed';
3115
2908
  AdaptableAgGrid.dismissInstance(this);
3116
2909
  // !! this has to be before clearing up references to container and/or adaptableOptions
3117
- if (config === null || config === void 0 ? void 0 : config.unmount) {
2910
+ if (config?.unmount) {
3118
2911
  const abContainerElement = this.getAdaptableContainerElement();
3119
2912
  if (abContainerElement != null) {
3120
- (_g = this.unmountReactRoot) === null || _g === void 0 ? void 0 : _g.call(this);
2913
+ this.unmountReactRoot?.();
3121
2914
  }
3122
2915
  this.unmountReactRoot = null;
3123
2916
  }
3124
2917
  this.DANGER_USE_GETTER_adaptableContainerElement = null;
3125
2918
  this.DANGER_USE_GETTER_agGridContainerElement = null;
3126
- this.debouncedSaveGridLayout = null;
3127
- this.debouncedSetColumnIntoStore = null;
3128
2919
  this.debouncedSetSelectedCells = null;
3129
2920
  this.debouncedSetSelectedRows = null;
3130
- (_h = this.adaptableStore) === null || _h === void 0 ? void 0 : _h.destroy();
2921
+ this.adaptableStore?.destroy();
3131
2922
  this.adaptableStore = null;
3132
- (_j = this.adaptableModules) === null || _j === void 0 ? void 0 : _j.clear();
2923
+ this.adaptableModules?.clear();
3133
2924
  this.adaptableModules = null;
3134
2925
  this.adaptableOptions = null;
3135
2926
  this.adaptableStatusPanelKeys = null;
3136
- (_l = (_k = this.CalculatedColumnExpressionService) === null || _k === void 0 ? void 0 : _k.destroy) === null || _l === void 0 ? void 0 : _l.call(_k);
2927
+ this.CalculatedColumnExpressionService?.destroy?.();
3137
2928
  this.CalculatedColumnExpressionService = null;
3138
- (_o = (_m = this.DataService) === null || _m === void 0 ? void 0 : _m.destroy) === null || _o === void 0 ? void 0 : _o.call(_m);
2929
+ this.DataService?.destroy?.();
3139
2930
  this.DataService = null;
3140
- (_q = (_p = this.Fdc3Service) === null || _p === void 0 ? void 0 : _p.destroy) === null || _q === void 0 ? void 0 : _q.call(_p);
2931
+ this.Fdc3Service?.destroy?.();
3141
2932
  this.Fdc3Service = null;
3142
- (_s = (_r = this.ModuleService) === null || _r === void 0 ? void 0 : _r.destroy) === null || _s === void 0 ? void 0 : _s.call(_r);
2933
+ this.ModuleService?.destroy?.();
3143
2934
  this.ModuleService = null;
3144
- (_u = (_t = this.ValidationService) === null || _t === void 0 ? void 0 : _t.destroy) === null || _u === void 0 ? void 0 : _u.call(_t);
2935
+ this.ValidationService?.destroy?.();
3145
2936
  this.ValidationService = null;
3146
- (_w = (_v = this.QueryLanguageService) === null || _v === void 0 ? void 0 : _v.destroy) === null || _w === void 0 ? void 0 : _w.call(_v);
2937
+ this.QueryLanguageService?.destroy?.();
3147
2938
  this.QueryLanguageService = null;
3148
- (_y = (_x = this.AlertService) === null || _x === void 0 ? void 0 : _x.destroy) === null || _y === void 0 ? void 0 : _y.call(_x);
2939
+ this.AlertService?.destroy?.();
3149
2940
  this.AlertService = null;
3150
- (_0 = (_z = this.TeamSharingService) === null || _z === void 0 ? void 0 : _z.destroy) === null || _0 === void 0 ? void 0 : _0.call(_z);
2941
+ this.TeamSharingService?.destroy?.();
3151
2942
  this.TeamSharingService = null;
3152
- (_2 = (_1 = this.RowEditService) === null || _1 === void 0 ? void 0 : _1.destroy) === null || _2 === void 0 ? void 0 : _2.call(_1);
3153
- this.RowEditService = null;
3154
- (_4 = (_3 = this.MetamodelService) === null || _3 === void 0 ? void 0 : _3.destroy) === null || _4 === void 0 ? void 0 : _4.call(_3);
2943
+ this.RowFormService?.destroy?.();
2944
+ this.RowFormService = null;
2945
+ this.MetamodelService?.destroy?.();
3155
2946
  this.MetamodelService = null;
3156
- (_6 = (_5 = this.LicenseService) === null || _5 === void 0 ? void 0 : _5.destroy) === null || _6 === void 0 ? void 0 : _6.call(_5);
2947
+ this.LicenseService?.destroy?.();
3157
2948
  this.LicenseService = null;
3158
- (_8 = (_7 = this.FlashingCellService) === null || _7 === void 0 ? void 0 : _7.destroy) === null || _8 === void 0 ? void 0 : _8.call(_7);
2949
+ this.FlashingCellService?.destroy?.();
3159
2950
  this.FlashingCellService = null;
3160
- (_10 = (_9 = this.ThemeService) === null || _9 === void 0 ? void 0 : _9.destroy) === null || _10 === void 0 ? void 0 : _10.call(_9);
2951
+ this.ThemeService?.destroy?.();
3161
2952
  this.ThemeService = null;
3162
- (_12 = (_11 = this.ChartingService) === null || _11 === void 0 ? void 0 : _11.destroy) === null || _12 === void 0 ? void 0 : _12.call(_11);
2953
+ this.ChartingService?.destroy?.();
3163
2954
  this.ChartingService = null;
3164
- (_14 = (_13 = this.CellPopupService) === null || _13 === void 0 ? void 0 : _13.destroy) === null || _14 === void 0 ? void 0 : _14.call(_13);
3165
- this.CellPopupService = null;
3166
- (_15 = this.unmountLoadingScreen) === null || _15 === void 0 ? void 0 : _15.call(this);
2955
+ this.AnnotationsService?.destroy?.();
2956
+ this.AnnotationsService = null;
2957
+ this.unmountLoadingScreen?.();
3167
2958
  this.unmountLoadingScreen = null;
3168
2959
  }
3169
2960
  canExportToExcel() {
3170
- return this.agGridAdapter.isModulePresent(core_1.ModuleNames.ExcelExportModule);
2961
+ return this.agGridAdapter.isAgGridModuleRegistered('ExcelExport');
3171
2962
  }
3172
- exportToExcel(reportData, fileName) {
3173
- const columnDefs = reportData.columns.map((column) => ({
3174
- field: column.columnId,
3175
- headerName: column.friendlyName,
3176
- }));
3177
- const NESTED_COL_SEPARATOR = '.';
3178
- const nestedColumns = reportData.columns.filter((column) => column.columnId.includes(NESTED_COL_SEPARATOR));
3179
- if (nestedColumns.length) {
3180
- // the rowData of nested fields (containing dots) was flattened during the report data extraction and we need to un-flatten it back
3181
- // ex.
3182
- // current state: { field: 'outerKey.innerKey', value: 2}
3183
- // original (desired) state: { field: 'outerKey.innerKey', value: {outerKey: {innerKey: 2}}}
3184
- reportData.rows.forEach((rowDataEntry) => nestedColumns.forEach((nestedColumn) => {
3185
- const cellExportValue = rowDataEntry[nestedColumn.columnId];
3186
- let intermediaryValue = rowDataEntry;
3187
- // augment the rowDataEntry with the new object
3188
- nestedColumn.columnId
3189
- .split(NESTED_COL_SEPARATOR)
3190
- .forEach((nestedKey, index, nestedCols) => {
3191
- // we reached the leaf node, so we set the cell value and break
3192
- if (index === nestedCols.length - 1) {
3193
- intermediaryValue[nestedKey] = cellExportValue;
3194
- return;
3195
- }
3196
- if (intermediaryValue[nestedKey] == undefined) {
3197
- intermediaryValue[nestedKey] = {};
3198
- } // else means that the object already has a property with this key
3199
- intermediaryValue = intermediaryValue[nestedKey];
3200
- });
3201
- // delete the obsolete flattened property
3202
- delete rowDataEntry[nestedColumn.columnId];
3203
- }));
3204
- }
3205
- const gridOptions = {
3206
- columnDefs,
3207
- rowData: reportData.rows,
3208
- };
3209
- let gridParams = { modules: this.getAgGridRegisteredModules() };
3210
- const ephemeralGridApi = (0, core_1.createGrid)(document.createElement('div'), gridOptions, gridParams);
3211
- ephemeralGridApi.exportDataAsExcel({
3212
- sheetName: 'Sheet 1',
3213
- fileName: fileName,
3214
- });
3215
- ephemeralGridApi.destroy();
3216
- }
3217
- exportVisualDataToExcel() {
3218
- try {
3219
- const exportExcelStyles = this.api.exportApi.internalApi.buildExcelStylesForVisualReports();
3220
- // set DANGER_excelStyles without changing the array reference
3221
- this.DANGER_excelStyles.splice(0, this.DANGER_excelStyles.length, ...exportExcelStyles);
3222
- // this.agGridOptionsService.CAREFUL_patchGridOptionsProperty('excelStyles', exportExcelStyles);
3223
- this.agGridAdapter.getAgGridApi().exportDataAsExcel({
3224
- sheetName: 'Sheet 1',
3225
- fileName: this.api.exportApi.internalApi.getReportFileName(this.adaptableOptions.adaptableId, 'Excel'),
3226
- // delegate the cell value processing to Adaptable
3227
- processCellCallback: ({ node, column, value }) => {
3228
- var _a;
3229
- const columnId = column.getColId();
3230
- if ((node === null || node === void 0 ? void 0 : node.group) &&
3231
- (this.api.columnApi.isAutoRowGroupColumn(columnId) ||
3232
- // we would still need to process the cell if this is a group row with an aggregated value
3233
- ((_a = node === null || node === void 0 ? void 0 : node.aggData) === null || _a === void 0 ? void 0 : _a[columnId]) == undefined)) {
3234
- // skip processing of row groups, this was already handled in processRowGroupCallback()
3235
- return value;
3236
- }
3237
- return this.processCellForExcelExport(node, columnId);
3238
- },
3239
- processRowGroupCallback: (params) => {
3240
- var _a;
3241
- // recreating the standard AG Grid styling for row groups: 'Parent -> Child'
3242
- // additionally the values are formatted
3243
- let rowGroupNode = params.node;
3244
- const isFooterRow = rowGroupNode.footer;
3245
- const rowGroupSummary = [(_a = this.processRowGroupForExcelExport(rowGroupNode)) !== null && _a !== void 0 ? _a : ''];
3246
- while (rowGroupNode.parent) {
3247
- rowGroupNode = rowGroupNode.parent;
3248
- const formattedParentNode = this.processRowGroupForExcelExport(rowGroupNode);
3249
- if (formattedParentNode) {
3250
- rowGroupSummary.push(formattedParentNode);
3251
- }
3252
- }
3253
- let summary = rowGroupSummary.reverse().join(' -> ');
3254
- if (isFooterRow) {
3255
- summary = `Total: ${summary}`;
3256
- }
3257
- return summary;
3258
- },
3259
- });
3260
- this.DANGER_excelStyles.splice(0, this.DANGER_excelStyles.length, ...this.originalExcelStyles);
3261
- }
3262
- catch (error) {
3263
- this.logger.consoleError('Error exporting visual data to Excel', error);
3264
- }
3265
- }
3266
- processRowGroupForExcelExport(rowNode) {
3267
- var _a, _b, _c, _d, _e;
3268
- const columnId = (_c = (_a = rowNode.field) !== null && _a !== void 0 ? _a : (_b = rowNode.rowGroupColumn) === null || _b === void 0 ? void 0 : _b.getColId()) !== null && _c !== void 0 ? _c : (_e = (_d = rowNode.rowGroupColumn) === null || _d === void 0 ? void 0 : _d.getColDef()) === null || _e === void 0 ? void 0 : _e.field;
3269
- if (!columnId || !rowNode.key) {
3270
- return;
3271
- }
3272
- let rawValue = rowNode.key;
3273
- if (this.api.columnApi.getColumnDataTypeForColumnId(columnId) === 'Date' &&
3274
- typeof rawValue === 'string' &&
3275
- // rawValue is composed only of digits
3276
- /^\d+$/.test(rawValue)) {
3277
- // AG-Grid converts the value to string, we have to reconvert it back
3278
- const dateRawValue = parseInt(rawValue);
3279
- if (dateRawValue != undefined) {
3280
- // @ts-ignore
3281
- rawValue = dateRawValue;
3282
- }
3283
- }
3284
- return this.api.exportApi.internalApi.getCellExportValueFromRawValue(rowNode, rawValue, columnId, GeneralConstants.VISUAL_DATA_REPORT);
3285
- }
3286
- processCellForExcelExport(rowNode, columnId) {
3287
- if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
3288
- const cellKey = this.agGridColumnAdapter.getExcelClassNameForCell(columnId, this.getPrimaryKeyValueFromRowNode(rowNode));
3289
- const isoFormattedDate = this.api.exportApi.internalApi.getExcelStyleWithFormattedDate(cellKey);
3290
- if (isoFormattedDate) {
3291
- // this is a Date cell which will be formatted by Excel
3292
- return isoFormattedDate;
3293
- }
3294
- }
3295
- return this.api.exportApi.internalApi.getCellExportValueFromRowNode(rowNode, columnId, GeneralConstants.VISUAL_DATA_REPORT);
2963
+ canExportToCsv() {
2964
+ return this.agGridAdapter.isAgGridModuleRegistered('CsvExport');
3296
2965
  }
3297
2966
  isQuickFilterAvailable() {
3298
2967
  if (this.api.layoutApi.isCurrentLayoutPivot() &&
3299
- this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
2968
+ this.adaptableOptions.filterOptions.useAdaptableFiltering) {
3300
2969
  // hide completely the quick filter if pivot is enabled
3301
2970
  return false;
3302
2971
  }
@@ -3320,152 +2989,23 @@ class AdaptableAgGrid {
3320
2989
  return this.agGridAdapter.getAgGridApi().getChartRef(chartId);
3321
2990
  }
3322
2991
  setLayout(layout) {
3323
- var _a, _b, _c, _d, _e, _f;
3324
2992
  if (!layout) {
3325
2993
  layout = this.api.layoutApi.getCurrentLayout();
3326
2994
  }
2995
+ (0, LayoutHelpers_1.checkForDuplicateColumns)(layout);
2996
+ const isLayoutSwitch = this._prevLayout && layout.Name != this._prevLayout.Name;
2997
+ let shouldUpdateExpandState = isLayoutSwitch;
2998
+ if (!isLayoutSwitch &&
2999
+ this._prevLayout &&
3000
+ layout.RowGroupValues?.RowGroupDefaultBehavior &&
3001
+ this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
3002
+ layout.RowGroupValues?.RowGroupDefaultBehavior) {
3003
+ shouldUpdateExpandState = true;
3004
+ }
3005
+ this._prevLayout = layout;
3327
3006
  const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
3328
- layout.Columns = layout.Columns || [];
3329
- const actionRowColumn = this.api.actionRowApi.internalApi.getColDefsForActionRowColumns()[0];
3330
- if (actionRowColumn) {
3331
- layout.Columns.push(actionRowColumn.colId);
3332
- layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
3333
- layout.PinnedColumnsMap[actionRowColumn.colId] = actionRowColumn.pinned;
3334
- }
3335
- const columnsState = this.agGridAdapter.getAgGridApi().getColumnState();
3336
- const columnsStateIndexes = {};
3337
- const columnsStateMap = columnsState.reduce((acc, colState, index) => {
3338
- columnsStateIndexes[colState.colId] = index;
3339
- acc[colState.colId] = colState;
3340
- return acc;
3341
- }, {});
3342
- let sortIndex = 0;
3343
- const sortModelMap = ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).reduce((acc, customSort) => {
3344
- const colId = customSort.ColumnId;
3345
- acc[colId] = {
3346
- colId,
3347
- sort: customSort.SortOrder === 'Asc' ? 'asc' : 'desc',
3348
- sortIndex,
3349
- };
3350
- sortIndex++;
3351
- return acc;
3352
- }, {});
3353
- const groupedColumnsIndexesMap = (layout.RowGroupedColumns || []).reduce((acc, colId, index) => {
3354
- acc[colId] = index;
3355
- return acc;
3356
- }, {});
3357
- let pivotedColumnsIndexesMap = {};
3358
- const aggregationFunctionsColumnsMap = layout.AggregationColumns || {};
3359
- const columnsToShow = !layout.EnablePivot
3360
- ? layout.Columns
3361
- : ((_b = this.agGridAdapter
3362
- .getAgGridApi()
3363
- .getPivotResultColumns()) === null || _b === void 0 ? void 0 : _b.map((column) => column.getColId())) || [];
3364
- let isChanged = false;
3365
- const colsToAutoSize = {};
3366
- let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState, layout);
3367
- newColumnsState = newColumnsState
3368
- .map((colState) => {
3369
- var _a, _b, _c;
3370
- const { colId } = colState;
3371
- const oldColState = columnsStateMap[colId];
3372
- // it's important to have width here, so it's not inherited from the existing colState
3373
- // which could be from a different layout
3374
- const newColState = Object.assign(Object.assign(Object.assign({}, oldColState), { width: null }), colState);
3375
- if (layout.ColumnWidthMap && layout.ColumnWidthMap[colId] != null) {
3376
- newColState.width = layout.ColumnWidthMap[colId];
3377
- }
3378
- else if (!colState.hide) {
3379
- // autosize only the columns which are part of the selected layout
3380
- colsToAutoSize[colId] = true;
3381
- }
3382
- if (actionRowColumn && actionRowColumn.colId === colId) {
3383
- newColState.width = actionRowColumn.width;
3384
- }
3385
- newColState.rowGroupIndex =
3386
- groupedColumnsIndexesMap[colId] != null ? groupedColumnsIndexesMap[colId] : null;
3387
- newColState.rowGroup = newColState.rowGroupIndex != null;
3388
- const normalizePinned = (pinnedValue) => {
3389
- if (typeof pinnedValue === 'string') {
3390
- return pinnedValue;
3391
- }
3392
- return pinnedValue == true ? 'left' : !!pinnedValue;
3393
- };
3394
- const newValuePinned = normalizePinned(layout.PinnedColumnsMap ? layout.PinnedColumnsMap[colId] : false);
3395
- const stateValuePinned = normalizePinned(newColState.pinned);
3396
- if (newValuePinned !== stateValuePinned) {
3397
- newColState.pinned = newValuePinned;
3398
- }
3399
- newColState.pivotIndex = null;
3400
- if (pivotedColumnsIndexesMap[colId] != null) {
3401
- newColState.pivotIndex = pivotedColumnsIndexesMap[colId];
3402
- }
3403
- newColState.aggFunc = null;
3404
- if (aggregationFunctionsColumnsMap[colId] != null) {
3405
- const colDef = this.agGridAdapter.getAgGridApi().getColumnDef(colId);
3406
- let aggFunc = null;
3407
- const aggFuncFromLayout = aggregationFunctionsColumnsMap[colId];
3408
- const adaptableAggFunc = this.getActiveAdaptableAggFuncForCol(colId);
3409
- if (aggFuncFromLayout === true) {
3410
- // if we have true, it means - take the default aggFunc from colDef
3411
- // NOTE: colState gives us the current aggFunc, which can be null,
3412
- // while the colDef gives us the initially configured aggFunc for that column
3413
- aggFunc =
3414
- (_c = (_b = (_a = colState.aggFunc) !== null && _a !== void 0 ? _a : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _b !== void 0 ? _b :
3415
- // @ts-ignore available only wth ag-Grid v27.3.x
3416
- colDef === null || colDef === void 0 ? void 0 : colDef.defaultAggFunc) !== null && _c !== void 0 ? _c : 'sum';
3417
- }
3418
- else if (adaptableAggFunc && adaptableAggFunc.type === 'weightedAverage') {
3419
- aggFunc = AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME;
3420
- }
3421
- else if (typeof aggFuncFromLayout === 'string') {
3422
- aggFunc = aggFuncFromLayout;
3423
- }
3424
- newColState.aggFunc = aggFunc;
3425
- }
3426
- if (sortModelMap[colId]) {
3427
- newColState.sort = sortModelMap[colId].sort;
3428
- newColState.sortIndex = sortModelMap[colId].sortIndex;
3429
- }
3430
- else {
3431
- newColState.sort = null;
3432
- newColState.sortIndex = null;
3433
- }
3434
- isChanged = isChanged || !(0, isEqual_1.default)(newColState, oldColState);
3435
- return newColState;
3436
- })
3437
- .filter((x) => !!x);
3438
- if (!isChanged) {
3439
- // order changed
3440
- const toString = (c) => `${c.colId}-${c.rowGroupIndex}-${c.pivotIndex}-${c.aggFunc}-${c.pinned}-${c.width}-${c.hide}`;
3441
- const oldColStateString = columnsState.map(toString).join(',');
3442
- const newColStateString = newColumnsState.map(toString).join(',');
3443
- isChanged = newColStateString != oldColStateString;
3444
- }
3445
- const pivoted = !!layout.EnablePivot;
3446
- const shouldUpdatePivoted = this.agGridAdapter.getAgGridApi().isPivotMode() !== pivoted;
3447
- /**
3448
- * Pivot columns are secondary columns that are created on the fly and base
3449
- * their configuration on the main columns by copying that configuration.
3450
- * Because they copy the colDefs they might have an old copy of the colldefs.
3451
- * This is why when the layout is pivoted we need to set columns before pivoting is applied.
3452
- * e.g. {
3453
- * field: 'pivot-1',
3454
- * pivotValueColumn: {
3455
- * colDef: {
3456
- * field: 'price',
3457
- * // this is a copy of the original column
3458
- * }
3459
- * }
3460
- *
3461
- */
3462
- if (shouldUpdatePivoted) {
3463
- this.updateColumnModelAndRefreshGrid();
3464
- }
3465
- isChanged = isChanged || shouldUpdatePivoted;
3466
- let shouldUpdateHeaders = false;
3007
+ const isPivot = (0, LayoutHelpers_1.isPivotLayout)(layout);
3467
3008
  // update the header name for all columns
3468
- // there should be a simpler solution for this, once the Layout Management is refactored
3469
3009
  this.agGridAdapter
3470
3010
  .getAgGridApi()
3471
3011
  .getColumns()
@@ -3479,66 +3019,27 @@ class AdaptableAgGrid {
3479
3019
  colId,
3480
3020
  abColumn,
3481
3021
  };
3482
- shouldUpdateHeaders =
3483
- this.agGridColumnAdapter.setupColumnHeader(colSetupInfo) || shouldUpdateHeaders;
3022
+ this.agGridColumnAdapter.setupColumnHeader(colSetupInfo);
3484
3023
  });
3485
- isChanged = isChanged || shouldUpdateHeaders;
3486
- if (isChanged) {
3487
- // it's important we set pivot mode
3488
- // before we set column state
3489
- // as otherwise column order is not preserved properly when
3490
- // going from pivoted to unpivoted layout
3491
- if (shouldUpdatePivoted) {
3492
- this.agGridAdapter.setGridOption('pivotMode', pivoted);
3493
- }
3494
- const perfApplyColumnState = this.logger.beginPerf('applyColumnState (layout.isChanged)');
3495
- this.agGridAdapter.getAgGridApi().applyColumnState({
3496
- state: newColumnsState,
3497
- applyOrder: true,
3498
- });
3499
- perfApplyColumnState.end();
3500
- this.api.gridApi.setColumnSorts(layout.ColumnSorts);
3501
- if (shouldUpdatePivoted) {
3502
- // simply setting PivotColumns fires an AG Grid 'modelChanged' event which cascades to a full row reload in SSRM
3503
- // this includes the case when we simply set an empty array of pivot columns
3504
- this.agGridAdapter.getAgGridApi().setPivotColumns(layout.PivotColumns || []);
3505
- }
3506
- // aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
3507
- // the group column is not possitioned correctly at the start of the layout
3508
- // see the test in layout/layout-switch/"should be able to switch from grouped to non-grouped and back"
3509
- // so we figured out the following line fixes the issue
3510
- // this.gridOptions.api.setColumnDefs(this.gridOptions.api.getColumnDefs()); //TODO find a solution for weighted averages - column floating filters are not showing
3511
- // these updates need to be at the end, the methods are based on the grid state/col defs
3512
- // the layout needs to be applied for them to work
3513
- this.updateRowGroupsExpandedState(layout);
3514
- }
3515
- const colsToAutoSizeArray = Object.keys(colsToAutoSize);
3516
- if (pivoted && ((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.layoutOptions) === null || _d === void 0 ? void 0 : _d.autoSizeColumnsInPivotLayout)) {
3517
- // when a pivoted layout loads, autosize all cols
3518
- requestAnimationFrame(() => {
3519
- if (this.isAvailable) {
3520
- this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
3521
- }
3522
- });
3523
- // //but if it's also the first time the grid is loading
3524
- // //it's not timely enough the above call, so we keep trying... I know it's ugly, we need to find a better way
3525
- // setTimeout(() => {
3526
- // this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
3527
- // setTimeout(() => {
3528
- // this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
3529
- // }, 200);
3530
- // }, 100);
3531
- }
3532
- else {
3533
- if (((_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.layoutOptions) === null || _f === void 0 ? void 0 : _f.autoSizeColumnsInLayout) &&
3534
- colsToAutoSizeArray.length) {
3024
+ const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(layout);
3025
+ this.layoutManager?.setLayout(layoutModel, {
3026
+ skipApplyRowGroupsExpandedState: !shouldUpdateExpandState,
3027
+ });
3028
+ if (layout.AutoSizeColumns) {
3029
+ if (isPivot) {
3535
3030
  requestAnimationFrame(() => {
3536
3031
  if (this.isAvailable) {
3537
- this.autoSizeColumns(colsToAutoSizeArray);
3032
+ this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
3538
3033
  }
3539
3034
  });
3540
3035
  }
3036
+ else {
3037
+ requestAnimationFrame(() => {
3038
+ this.autoSizeColumns();
3039
+ });
3040
+ }
3541
3041
  }
3042
+ // this.showQuickFilter()
3542
3043
  this.forPlugins((plugin) => {
3543
3044
  if (plugin.afterSetLayout) {
3544
3045
  plugin.afterSetLayout(this, layout);
@@ -3551,7 +3052,12 @@ class AdaptableAgGrid {
3551
3052
  return null;
3552
3053
  }
3553
3054
  const currentLayout = this.api.layoutApi.getCurrentLayout();
3554
- const aggregationFunctionsColumnsMap = currentLayout.AggregationColumns || {};
3055
+ const aggregationFunctionsColumnsMap = ((0, LayoutHelpers_1.isPivotLayout)(currentLayout)
3056
+ ? currentLayout.PivotAggregationColumns
3057
+ : currentLayout.TableAggregationColumns).reduce((acc, col) => {
3058
+ acc[col.ColumnId] = col.AggFunc;
3059
+ return acc;
3060
+ }, {});
3555
3061
  const adaptableAggFunc = aggregationFunctionsColumnsMap[columnId];
3556
3062
  if (typeof adaptableAggFunc === 'object' &&
3557
3063
  'type' in adaptableAggFunc &&
@@ -3571,14 +3077,13 @@ class AdaptableAgGrid {
3571
3077
  if (!primaryKeyValue) {
3572
3078
  return;
3573
3079
  }
3574
- // rowNode = this.getRowNodeForPrimaryKey(primaryKeyValue);
3575
3080
  let cellDataChangedInfos = [];
3576
3081
  Object.keys(oldData).forEach((key) => {
3577
3082
  if (this.api.columnApi.isColumnInGrid(key)) {
3578
3083
  const oldValue = oldData[key];
3579
3084
  const newValue = newData[key];
3580
3085
  if (oldValue != newValue) {
3581
- const cellDataChangedInfo = this.api.internalApi.buildDataChangedInfo({
3086
+ const cellDataChangedInfo = this.api.internalApi.buildCellDataChangedInfo({
3582
3087
  oldValue: oldValue,
3583
3088
  newValue: newValue,
3584
3089
  column: this.api.columnApi.getColumnWithColumnId(key),
@@ -3593,7 +3098,7 @@ class AdaptableAgGrid {
3593
3098
  }
3594
3099
  }
3595
3100
  });
3596
- this.performPostEditChecks(cellDataChangedInfos);
3101
+ this.performPostEditChecks(rowNode, cellDataChangedInfos);
3597
3102
  }
3598
3103
  onCellDataChanged({ rowNode, oldValue, newValue, colId, }) {
3599
3104
  if (oldValue == newValue) {
@@ -3604,7 +3109,7 @@ class AdaptableAgGrid {
3604
3109
  return;
3605
3110
  }
3606
3111
  if (this.isGroupRowNode(rowNode)) {
3607
- const cellDataChangedInfo = this.api.internalApi.buildDataChangedInfo({
3112
+ const cellDataChangedInfo = this.api.internalApi.buildCellDataChangedInfo({
3608
3113
  oldValue: oldValue,
3609
3114
  newValue: newValue,
3610
3115
  column: abColumn,
@@ -3616,14 +3121,14 @@ class AdaptableAgGrid {
3616
3121
  rowNode: rowNode,
3617
3122
  trigger: 'aggChange',
3618
3123
  });
3619
- this.DataService.CreateDataChangedEvent(cellDataChangedInfo);
3124
+ this.DataService.CreateCellDataChangedEvent(cellDataChangedInfo);
3620
3125
  return;
3621
3126
  }
3622
3127
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
3623
3128
  if (!primaryKeyValue) {
3624
3129
  return;
3625
3130
  }
3626
- const cellDataChangedInfo = this.api.internalApi.buildDataChangedInfo({
3131
+ const cellDataChangedInfo = this.api.internalApi.buildCellDataChangedInfo({
3627
3132
  oldValue: oldValue,
3628
3133
  newValue: newValue,
3629
3134
  column: abColumn,
@@ -3634,7 +3139,7 @@ class AdaptableAgGrid {
3634
3139
  if (this.isUndoChange(cellDataChangedInfo)) {
3635
3140
  cellDataChangedInfo.trigger = 'undo';
3636
3141
  }
3637
- this.performPostEditChecks([cellDataChangedInfo]);
3142
+ this.performPostEditChecks(rowNode, [cellDataChangedInfo]);
3638
3143
  }
3639
3144
  isUndoChange(dataChange) {
3640
3145
  // check if this is not a reverted change
@@ -3642,70 +3147,67 @@ class AdaptableAgGrid {
3642
3147
  return !!undoChange;
3643
3148
  }
3644
3149
  /**
3645
- * There are a few things that we need to do AFTER we edit a cell and it makes sense to put them in one place
3150
+ * There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
3646
3151
  */
3647
- performPostEditChecks(cellDataChangedInfos) {
3648
- const firstInfo = cellDataChangedInfos[0];
3649
- if (!firstInfo || !firstInfo.rowNode) {
3650
- return;
3651
- }
3152
+ performPostEditChecks(rowNode, cellDataChangedInfos) {
3652
3153
  cellDataChangedInfos.forEach((cellDataChangedInfo) => {
3154
+ // if a Cell Data Change is undone, log to the Console
3653
3155
  if (cellDataChangedInfo.trigger === 'undo') {
3654
3156
  this.logger.info(`Undo data change: PK(${cellDataChangedInfo.primaryKeyValue}) Col(${cellDataChangedInfo.column}) RevertedValue(${cellDataChangedInfo.oldValue}) OriginalValue(${cellDataChangedInfo.newValue})`);
3655
3157
  }
3158
+ // For Changes except Aggregations, reset cell selection if required
3656
3159
  if (cellDataChangedInfo.trigger === 'edit' ||
3657
3160
  cellDataChangedInfo.trigger === 'undo' ||
3658
3161
  cellDataChangedInfo.trigger === 'tick') {
3659
- this.checkChangedCellCurrentlySelected(cellDataChangedInfo);
3660
- this.api.freeTextColumnApi.internalApi.handleFreeTextColumnDataChange(cellDataChangedInfo);
3162
+ this.checkIfChangedCellCurrentlySelected(cellDataChangedInfo);
3661
3163
  }
3662
- this.DataService.CreateDataChangedEvent(cellDataChangedInfo);
3164
+ // Call the Data Service to create an Internal Event so other parts of App can respond
3165
+ this.DataService.CreateCellDataChangedEvent(cellDataChangedInfo);
3166
+ // Reset Min and Max values for the Column
3663
3167
  this.resetMinMaxCachedValueForColumn(cellDataChangedInfo.column);
3664
3168
  });
3665
- this.refreshCellsBasedOnCellDataChange(cellDataChangedInfos);
3666
- firstInfo.trigger == 'tick' ? this.filterOnTickingDataChange() : this.filterOnEditDataChange();
3667
- }
3668
- refreshCellsBasedOnCellDataChange(cellDataChangedInfos) {
3669
- const [firstInfo] = cellDataChangedInfos;
3670
- // if node is visible then check if need to refresh other columns / whole row if the updating column is:
3671
- // 1. referenced in Format Column Styles that have Expressions (refreshing whole row if Scope is All)
3672
- // 2. referenced in Format Column styles that use Column Comparisons (which might also be calculated columns)
3673
- if (this.agGridAdapter.isVisibleNode(firstInfo.rowNode)) {
3169
+ this.refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos);
3170
+ this.refreshColumnsBasedOnCellDataChange(cellDataChangedInfos);
3171
+ this.filterOnDataChange();
3172
+ }
3173
+ refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos) {
3174
+ // Check if node is visible as otherwise AG Grid wont refresh
3175
+ if (this.agGridAdapter.isVisibleNode(rowNode)) {
3674
3176
  let dataChangedScope = {
3675
3177
  wholeRow: false,
3676
3178
  columnIds: new Set(),
3677
3179
  };
3678
- this.getFormatColumnExpressionStylesChanges(dataChangedScope, cellDataChangedInfos);
3679
- if (dataChangedScope.wholeRow === false) {
3680
- this.getFormatColumnPredicateStyleChanges(dataChangedScope, cellDataChangedInfos);
3681
- }
3180
+ // First check Format Column Expressions
3181
+ this.checkFormatColumnExpressionStyleChanges(dataChangedScope, cellDataChangedInfos);
3182
+ // If Scope is whole row then redraw row and return
3682
3183
  if (dataChangedScope.wholeRow) {
3683
- this.redrawRow(firstInfo.rowNode);
3184
+ this.redrawRow(rowNode);
3185
+ return;
3684
3186
  }
3685
- else {
3686
- this.getStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos);
3687
- if (dataChangedScope.columnIds.size > 0) {
3688
- this.refreshCells([firstInfo.rowNode], Array.from(dataChangedScope.columnIds.values()), true);
3689
- }
3187
+ // Next check for Format Column Predicates, Styled Columns and FreeText Columns to update the ColumnIds refresh list as required
3188
+ this.checkFormatColumnPredicateStyleChanges(dataChangedScope, cellDataChangedInfos);
3189
+ this.checkFreeTextColumnChanges(dataChangedScope, cellDataChangedInfos);
3190
+ this.checkStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos);
3191
+ if (dataChangedScope.columnIds.size > 0) {
3192
+ this.refreshCells(rowNode, Array.from(dataChangedScope.columnIds.values()), true);
3690
3193
  }
3691
3194
  }
3692
- this.refreshColumnForRelativeRangeStyledColumns(cellDataChangedInfos);
3693
3195
  }
3694
- refreshColumnForRelativeRangeStyledColumns(cellDataChangedInfos) {
3695
- const columnIdMap = new Set();
3196
+ refreshColumnsBasedOnCellDataChange(cellDataChangedInfos) {
3197
+ const columnIdsToUpdate = [];
3198
+ // The only use case is Styled Columns with a Relative Cell Range
3696
3199
  cellDataChangedInfos.forEach((cellDataChangeInfo) => {
3697
3200
  const styledColumn = this.api.styledColumnApi.getActiveStyledColumnForColumn(cellDataChangeInfo.column);
3698
3201
  if (styledColumn &&
3699
3202
  this.api.styledColumnApi.internalApi.hasStyledColumnRelativeCellRange(styledColumn)) {
3700
- columnIdMap.add(styledColumn.ColumnId);
3203
+ columnIdsToUpdate.push(styledColumn.ColumnId);
3701
3204
  }
3702
3205
  });
3703
- const columnIdsToUpdate = [...columnIdMap];
3704
- if (columnIdsToUpdate.length) {
3206
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(columnIdsToUpdate)) {
3705
3207
  this.refreshColumns(columnIdsToUpdate, true);
3706
3208
  }
3707
3209
  }
3708
- getStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos) {
3210
+ checkStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos) {
3709
3211
  this.api.styledColumnApi.getStyledColumns().forEach((sc) => {
3710
3212
  let columnComparison = this.api.styledColumnApi.internalApi.getColumnComparisonForStyledColumn(sc);
3711
3213
  if (columnComparison) {
@@ -3720,7 +3222,7 @@ class AdaptableAgGrid {
3720
3222
  }
3721
3223
  });
3722
3224
  }
3723
- getFormatColumnPredicateStyleChanges(dataChangedScope, cellDataChangedInfos) {
3225
+ checkFormatColumnPredicateStyleChanges(dataChangedScope, cellDataChangedInfos) {
3724
3226
  cellDataChangedInfos.forEach((cellDataChangeInfo) => {
3725
3227
  const dependentColumns = this.api.formatColumnApi.internalApi.getFormatColumnColumnsDependentOnColumnChange(cellDataChangeInfo.column);
3726
3228
  for (let colId of dependentColumns) {
@@ -3728,7 +3230,21 @@ class AdaptableAgGrid {
3728
3230
  }
3729
3231
  });
3730
3232
  }
3731
- getFormatColumnExpressionStylesChanges(dataChangedScope, cellDataChangedInfos) {
3233
+ checkFreeTextColumnChanges(dataChangedScope, cellDataChangedInfos) {
3234
+ cellDataChangedInfos.forEach((cellDataChangedInfo) => {
3235
+ const freeTextColumn = this.api.freeTextColumnApi
3236
+ .getFreeTextColumns()
3237
+ .find((fc) => fc.ColumnId == cellDataChangedInfo.column.columnId);
3238
+ if (freeTextColumn) {
3239
+ dataChangedScope.columnIds.add(freeTextColumn.ColumnId);
3240
+ const refencedCalcColumns = this.api.calculatedColumnApi.internalApi.getCalculatedColumnsReferencingColumnId(cellDataChangedInfo.column.columnId);
3241
+ refencedCalcColumns.forEach((calculatedColumn) => {
3242
+ dataChangedScope.columnIds.add(calculatedColumn.ColumnId);
3243
+ });
3244
+ }
3245
+ });
3246
+ }
3247
+ checkFormatColumnExpressionStyleChanges(dataChangedScope, cellDataChangedInfos) {
3732
3248
  const formatColumnsWithExpression = [];
3733
3249
  formatColumnsWithExpression.push(...this.api.formatColumnApi.internalApi.getFormatColumnsWithExpression());
3734
3250
  if (ArrayExtensions_1.default.IsNullOrEmpty(formatColumnsWithExpression)) {
@@ -3736,17 +3252,17 @@ class AdaptableAgGrid {
3736
3252
  }
3737
3253
  cellDataChangedInfos.forEach((cellDataChangedInfo) => {
3738
3254
  if (!dataChangedScope.wholeRow) {
3739
- formatColumnsWithExpression.forEach((styleModule) => {
3255
+ formatColumnsWithExpression.forEach((formatColumn) => {
3740
3256
  if (!dataChangedScope.wholeRow) {
3741
- const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
3257
+ const columnIds = this.api.expressionApi.getColumnsFromExpression(formatColumn.Rule.BooleanExpression);
3742
3258
  if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
3743
- if (this.api.columnScopeApi.scopeIsAll(styleModule.Scope)) {
3259
+ if (this.api.columnScopeApi.scopeIsAll(formatColumn.Scope)) {
3744
3260
  dataChangedScope.wholeRow = true;
3745
3261
  return;
3746
3262
  }
3747
3263
  else {
3748
3264
  this.api.columnScopeApi
3749
- .getColumnsForScope(styleModule.Scope)
3265
+ .getColumnsInScope(formatColumn.Scope)
3750
3266
  .map((c) => c.columnId)
3751
3267
  .forEach((colId) => {
3752
3268
  dataChangedScope.columnIds.add(colId);
@@ -3758,7 +3274,7 @@ class AdaptableAgGrid {
3758
3274
  }
3759
3275
  });
3760
3276
  }
3761
- checkChangedCellCurrentlySelected(cellDataChangedInfo) {
3277
+ checkIfChangedCellCurrentlySelected(cellDataChangedInfo) {
3762
3278
  let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
3763
3279
  if (selectedCellInfo && ArrayExtensions_1.default.IsNotNullOrEmpty(selectedCellInfo.gridCells)) {
3764
3280
  let matchingCell = selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == cellDataChangedInfo.primaryKeyValue &&
@@ -3783,298 +3299,60 @@ class AdaptableAgGrid {
3783
3299
  this.columnMinMaxValuesCache[column.columnId] = undefined;
3784
3300
  }
3785
3301
  }
3786
- filterOnTickingDataChange() {
3787
- var _a;
3788
- if (this.adaptableOptions.columnFilterOptions.filterActionOnExternalDataChange.applyFilter ==
3789
- Enums_1.FilterOnDataChangeOptions.Always) {
3790
- (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.onFilterChanged();
3791
- }
3792
- else if (this.adaptableOptions.columnFilterOptions.filterActionOnExternalDataChange.applyFilter ==
3793
- Enums_1.FilterOnDataChangeOptions.Throttle) {
3794
- this.throttleFilterOnTickingDataChange();
3795
- }
3796
- }
3797
- filterOnEditDataChange() {
3798
- var _a;
3799
- if (this.adaptableOptions.columnFilterOptions.filterActionOnUserDataChange.applyFilter ==
3302
+ filterOnDataChange() {
3303
+ if (this.adaptableOptions.filterOptions.filterActionOnDataChange.applyFilter ==
3800
3304
  Enums_1.FilterOnDataChangeOptions.Always) {
3801
- (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.onFilterChanged();
3305
+ this.agGridAdapter.getAgGridApi()?.onFilterChanged();
3802
3306
  }
3803
- else if (this.adaptableOptions.columnFilterOptions.filterActionOnUserDataChange.applyFilter ==
3307
+ else if (this.adaptableOptions.filterOptions.filterActionOnDataChange.applyFilter ==
3804
3308
  Enums_1.FilterOnDataChangeOptions.Throttle) {
3805
- this.throttleFilterOnEditDataChange();
3806
- }
3807
- }
3808
- shouldCreateDefaultLayout(adaptableState, adaptableOptions) {
3809
- var _a, _b, _c;
3810
- const layoutState = adaptableState.Layout || {};
3811
- if (((_a = adaptableOptions.layoutOptions) === null || _a === void 0 ? void 0 : _a.createDefaultLayout) &&
3812
- !((_b = layoutState.Layouts) === null || _b === void 0 ? void 0 : _b.find((layout) => layout.Name === GeneralConstants_1.DEFAULT_LAYOUT))) {
3309
+ this.throttleFilterOnDataChange();
3310
+ }
3311
+ }
3312
+ refreshLayout() {
3313
+ const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns();
3314
+ // this setGridOption call will also trigger layout.onColumnDefsChanged()
3315
+ // which will in turn call updateColumnModelAndRefreshGrid
3316
+ this.agGridAdapter.setGridOption('columnDefs', columnDefs);
3317
+ // this is needed here for when we call setAdaptableStateKey
3318
+ // and pass a new config
3319
+ this.setLayout();
3320
+ this.applyFiltering();
3321
+ }
3322
+ isRowGroupDifferentInLayout(one, other) {
3323
+ const prevRowGroupedColumns = one.RowGroupedColumns || one.PivotGroupedColumns || [];
3324
+ const currentRowGroupedColumns = other.RowGroupedColumns || other.PivotGroupedColumns || [];
3325
+ const prevRowGroupDisplayType = one.RowGroupDisplayType;
3326
+ const currentRowGroupDisplayType = other.RowGroupDisplayType;
3327
+ if (prevRowGroupDisplayType !== currentRowGroupDisplayType) {
3813
3328
  return true;
3814
3329
  }
3815
- return !((_c = layoutState.Layouts) === null || _c === void 0 ? void 0 : _c.length);
3816
- }
3817
- createDefaultLayout(state, agGridOptions) {
3818
- var _a, _b, _c;
3819
- const agGridColDefs = agGridOptions.columnDefs;
3820
- const agGridAutoGroupColDef = agGridOptions.autoGroupColumnDef;
3821
- const allColumnDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
3822
- const defaultLayout = ObjectFactory_1.default.CreateEmptyLayout({
3823
- Name: GeneralConstants_1.DEFAULT_LAYOUT,
3824
- Columns: allColumnDefs.map((c) => c.colId),
3825
- AggregationColumns: allColumnDefs.reduce((acc, col) => {
3826
- if (typeof col.aggFunc === 'string') {
3827
- acc[col.colId] = col.aggFunc;
3828
- }
3829
- return acc;
3830
- }, {}),
3831
- PinnedColumnsMap: allColumnDefs.reduce((acc, col) => {
3832
- const pinned = col.pinned;
3833
- if (pinned) {
3834
- acc[col.colId] = pinned === true ? 'left' : pinned;
3835
- }
3836
- return acc;
3837
- }, {}),
3838
- RowGroupedColumns: allColumnDefs.reduce((acc, col) => {
3839
- if (col.rowGroup) {
3840
- acc.push(col.colId);
3841
- }
3842
- return acc;
3843
- }, []),
3844
- });
3845
- // handle optional 'gridOptions.autoGroupColumnDefs' parameter
3846
- if (agGridAutoGroupColDef &&
3847
- (((_a = defaultLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) || agGridOptions.treeData)) {
3848
- defaultLayout.Columns = [GeneralConstants_1.AG_GRID_GROUPED_COLUMN, ...defaultLayout.Columns];
3849
- }
3850
- if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.pinned) {
3851
- defaultLayout.PinnedColumnsMap[GeneralConstants_1.AG_GRID_GROUPED_COLUMN] =
3852
- agGridAutoGroupColDef.pinned === true ? 'left' : agGridAutoGroupColDef.pinned;
3853
- }
3854
- if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.width) {
3855
- defaultLayout.ColumnWidthMap[GeneralConstants_1.AG_GRID_GROUPED_COLUMN] = agGridAutoGroupColDef.width;
3856
- }
3857
- // ADD special columns
3858
- const calculatedColumns = ((_b = state.CalculatedColumn) === null || _b === void 0 ? void 0 : _b.CalculatedColumns) || [];
3859
- if (calculatedColumns.length) {
3860
- defaultLayout.Columns.push(...calculatedColumns.map((c) => c.ColumnId));
3861
- }
3862
- const freeTextColumns = ((_c = state.FreeTextColumn) === null || _c === void 0 ? void 0 : _c.FreeTextColumns) || [];
3863
- if (freeTextColumns.length) {
3864
- defaultLayout.Columns.push(...freeTextColumns.map((c) => c.ColumnId));
3865
- }
3866
- return defaultLayout;
3330
+ return prevRowGroupedColumns.join(',') !== currentRowGroupedColumns.join(',');
3867
3331
  }
3868
- /*
3869
- * This is the opposite of setLayout
3870
- */
3871
- updateLayoutFromGrid() {
3872
- var _a, _b;
3873
- this.logger.info('updateLayoutFromGrid()');
3874
- const agGridApi = this.agGridAdapter.getAgGridApi();
3875
- const columnState = agGridApi.getColumnState();
3876
- const expandedState = agGridApi.getState().rowGroupExpansion || { expandedRowGroupIds: [] };
3877
- const currentLayoutState = { columnState, expandedState };
3878
- try {
3879
- const stringifiedLayoutState = JSON.stringify(currentLayoutState);
3880
- if (stringifiedLayoutState === this.previousAgGridLayoutState) {
3881
- // same grid column state as a previous,
3882
- // so no need to update, as the layout has already been updated
3883
- // for this grid column state
3884
- return;
3885
- }
3886
- this.previousAgGridLayoutState = stringifiedLayoutState;
3887
- }
3888
- catch (ex) {
3889
- this.logger.consoleError('Error stringifying column state', ex);
3890
- }
3891
- const currentLayout = this.api.layoutApi.getCurrentLayout();
3892
- if (currentLayout.IsReadOnly) {
3893
- // reaply the layout so the grid is reverted
3894
- this.setLayout();
3895
- return;
3896
- }
3897
- const layout = Object.assign({}, currentLayout);
3898
- let columnOrder = [];
3899
- const columnFlexes = {};
3900
- const pinnedColumns = {};
3901
- const columnSorts = [];
3902
- let groupedColumns = [...new Array(columnState.length)];
3903
- let pivotedColumns = [...new Array(columnState.length)];
3904
- const pivotColumns = [];
3905
- const aggregatedColumns = {};
3906
- const columnWidths = columnState.reduce((acc, colState) => {
3907
- const { colId } = colState;
3908
- if (colState.sort && colState.sortIndex != null) {
3909
- columnSorts.push({
3910
- ColumnId: colId,
3911
- SortOrder: colState.sort === 'asc' ? 'Asc' : 'Desc',
3912
- SortIndex: colState.sortIndex,
3913
- });
3914
- }
3915
- if (colState.width != null) {
3916
- acc[colId] = colState.width;
3917
- }
3918
- if (colState.flex != null) {
3919
- columnFlexes[colId] = colState.flex;
3920
- }
3921
- if (colState.pinned === 'left') {
3922
- pinnedColumns[colId] = 'left';
3923
- }
3924
- if (colState.pinned === 'right') {
3925
- pinnedColumns[colId] = 'right';
3926
- }
3927
- if (!colState.hide) {
3928
- columnOrder.push(colId);
3929
- }
3930
- if (colState.rowGroupIndex != null) {
3931
- groupedColumns[colState.rowGroupIndex] = colId;
3932
- }
3933
- if (colState.pivotIndex != null) {
3934
- pivotedColumns[colState.pivotIndex] = colId;
3935
- }
3936
- if (colState.aggFunc && typeof colState.aggFunc === 'string') {
3937
- aggregatedColumns[colId] = colState.aggFunc;
3938
- }
3939
- return acc;
3940
- }, {});
3941
- columnSorts.sort((a, b) => a.SortIndex - b.SortIndex);
3942
- this.agGridAdapter
3943
- .getAgGridApi()
3944
- .getPivotColumns()
3945
- .forEach((col) => {
3946
- pivotColumns.push(col.getColId());
3947
- });
3948
- groupedColumns = groupedColumns.filter((x) => !!x);
3949
- pivotedColumns = pivotedColumns.filter((x) => !!x);
3950
- if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
3951
- columnOrder = this.restoreUnGroupColumnOrder({
3952
- columnOrder,
3953
- newGroupColumns: groupedColumns,
3954
- });
3955
- }
3956
- layout.ColumnWidthMap = columnWidths;
3957
- // layout.ColumnFlexMap = columnFlexes;
3958
- layout.PinnedColumnsMap = pinnedColumns;
3959
- layout.Columns = columnOrder;
3960
- layout.ColumnSorts = columnSorts;
3961
- layout.RowGroupedColumns = groupedColumns;
3962
- if (Object.keys(aggregatedColumns).length) {
3963
- // AG Grid aggregations are not 1-1 with adaptable column-aggregations
3964
- layout.AggregationColumns = this.mapAggregationColumnsFromGrid(aggregatedColumns, currentLayout);
3965
- }
3966
- else {
3967
- layout.AggregationColumns = {};
3968
- }
3969
- layout.EnablePivot = this.agGridAdapter.getAgGridApi().isPivotMode();
3970
- layout.PivotColumns = pivotColumns;
3971
- if (
3972
- // check first row node for presence of data without iterating over whole grid
3973
- this.api.layoutApi.internalApi.areExpandedRowGroupsSavedInLayouts() &&
3974
- this.api.gridApi.getFirstDisplayedRowNode()) {
3975
- layout.ExpandedRowGroupValues = this.getExpandRowGroupsKeys();
3976
- }
3977
- const previousVisibleColumns = currentLayout.Columns;
3978
- const newVisibleColumns = layout.Columns;
3979
- // check if all new columns were previously visible
3980
- const someColumnsAreNew = newVisibleColumns.some((colId) => !previousVisibleColumns.includes(colId));
3981
- if (someColumnsAreNew) {
3332
+ onLayoutChange(layout) {
3333
+ this.logger.info('onLayoutChange()');
3334
+ const prevOnChangeLayout = this.__prevLayoutForOnChange || this.api.layoutApi.getCurrentLayout();
3335
+ // see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
3336
+ const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevOnChangeLayout, layout);
3337
+ const pivotColsChanged = JSON.stringify(layout.PivotColumns) !== JSON.stringify(prevOnChangeLayout.PivotColumns);
3338
+ if (rowGroupsChanged || pivotColsChanged) {
3982
3339
  this.updateColumnModelAndRefreshGrid();
3983
3340
  }
3984
- this.persistLayout(layout);
3985
- }
3986
- persistLayout(layout) {
3987
- if (this.api.layoutApi.shouldAutoSaveLayouts()) {
3988
- this.api.layoutApi.createOrUpdateLayout(layout);
3989
- }
3990
3341
  else {
3991
- this.api.layoutApi.internalApi.updateCurrentDraftLayout(layout);
3992
- }
3993
- }
3994
- /**
3995
- * When reading the state from the grid, we have to make sure 'avg' is not overriden with the 'avg' string.
3996
- */
3997
- mapAggregationColumnsFromGrid(aggFuncFromGrid, currentLayout) {
3998
- return Object.entries(aggFuncFromGrid).reduce((acc, [colId, agg]) => {
3999
- const adaptableAggFunc = this.getActiveAdaptableAggFuncForCol(colId);
4000
- if ((adaptableAggFunc === null || adaptableAggFunc === void 0 ? void 0 : adaptableAggFunc.type) === 'weightedAverage' && agg === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME) {
4001
- // do not override the agg func
4002
- acc[colId] = currentLayout.AggregationColumns[colId];
4003
- }
4004
- else {
4005
- acc[colId] = agg;
4006
- }
4007
- return acc;
4008
- }, {});
4009
- }
4010
- persistColumnIndexBeforeGrouping(params) {
4011
- const layout = this.api.layoutApi.getCurrentLayout();
4012
- const columnGroupsInLayout = layout.RowGroupedColumns;
4013
- const columnGroupsInGrid = params.columns.map((col) => col.getColId());
4014
- // what is new
4015
- const newGroups = columnGroupsInGrid.filter((colId) => !columnGroupsInLayout.includes(colId));
4016
- newGroups.forEach((colId) => {
4017
- const columnIndex = layout.Columns.filter((colId) => !(this.api.columnApi.isAutoRowGroupColumn(colId) ||
4018
- this.api.columnApi.isAutoPivotColumn(colId))).findIndex((columnIdInLayout) => columnIdInLayout === colId);
4019
- // user may group after a column not in layout
4020
- if (columnIndex !== -1) {
4021
- this.api.internalApi.persistPreviousGroupedColumnsIndex(layout.Uuid, colId, columnIndex);
4022
- }
4023
- });
4024
- }
4025
- /**
4026
- * Restores the order previous grouping order.
4027
- */
4028
- restoreUnGroupColumnOrder({ newGroupColumns, columnOrder, }) {
4029
- var _a;
4030
- const newColumnOrder = [...columnOrder];
4031
- const currentLayout = this.api.layoutApi.getCurrentLayout();
4032
- const previousGroupedColumnsIndex = this.api.internalApi.getPreviousGroupedColumnsIndex(currentLayout.Uuid);
4033
- const isUnGroup = newGroupColumns.length < ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length);
4034
- if (!isUnGroup) {
4035
- return columnOrder;
4036
- }
4037
- if (!previousGroupedColumnsIndex) {
4038
- return columnOrder;
4039
- }
4040
- for (let [colId, previousIndex] of Object.entries(previousGroupedColumnsIndex)) {
4041
- const isStillGrouped = newGroupColumns.includes(colId);
4042
- const isAlreadyInGrid = currentLayout.Columns.includes(colId); // was not just added by ungrouping
4043
- if (isStillGrouped) {
4044
- continue;
4045
- }
4046
- if (isAlreadyInGrid) {
4047
- // no longer grouped, but already in grid, this means it was already in grid before ungrouping
4048
- // in this case the state can be cleared
4049
- this.api.internalApi.persistPreviousGroupedColumnsIndex(currentLayout.Uuid, colId, null);
4050
- continue;
4051
- }
4052
- // need to ajust index based if grouped
4053
- const numberOfGroupedColumns = newColumnOrder.filter((colId) => this.api.columnApi.isAutoRowGroupColumn(colId)).length;
4054
- const adjustedPreviousIndex = previousIndex + numberOfGroupedColumns;
4055
- const indexInGrid = newColumnOrder.indexOf(colId);
4056
- const hasDifferentPositionAsPreviousLayout = adjustedPreviousIndex !== null && // if null, the reorder was already applied
4057
- indexInGrid > 0 && // needs to be in grid
4058
- adjustedPreviousIndex !== indexInGrid;
4059
- const isPreviousPositionInRange = adjustedPreviousIndex < newColumnOrder.length;
4060
- if (hasDifferentPositionAsPreviousLayout && isPreviousPositionInRange) {
4061
- newColumnOrder.splice(indexInGrid, 1);
4062
- newColumnOrder.splice(adjustedPreviousIndex, 0, colId);
4063
- }
4064
- this.api.internalApi.persistPreviousGroupedColumnsIndex(currentLayout.Uuid, colId, null);
3342
+ this.deriveAdaptableColumnStateFromAgGrid();
4065
3343
  }
4066
- return newColumnOrder;
4067
- }
4068
- onSortChanged() {
4069
- const columnSorts = this.getColumnSorts();
4070
- this.api.gridApi.setColumnSorts(columnSorts);
4071
- this._emit('SortChanged', columnSorts);
3344
+ this.__prevLayoutForOnChange = layout;
3345
+ this.api.layoutApi.createOrUpdateLayout(layout);
4072
3346
  }
4073
3347
  getColumnSorts() {
4074
3348
  const columnSorts = [];
3349
+ const { columnApi } = this.api;
4075
3350
  const columnState = this.agGridAdapter.getAgGridApi().getColumnState();
4076
3351
  columnState.forEach((colState) => {
4077
3352
  const { colId } = colState;
3353
+ if (columnApi.isAutoRowGroupColumn(colId)) {
3354
+ return;
3355
+ }
4078
3356
  if (colState.sort && colState.sortIndex != null) {
4079
3357
  columnSorts.push({
4080
3358
  ColumnId: colId,
@@ -4091,50 +3369,5 @@ class AdaptableAgGrid {
4091
3369
  };
4092
3370
  });
4093
3371
  }
4094
- // #gridOpts_monkey_patch
4095
- // we need to intercept some of the GridOptions updates and refresh the Adaptable state
4096
- monkeyPatchingGridOptionsUpdates(agGridApi) {
4097
- var _a;
4098
- const gridOptionsService = (_a = this.DANGER_getPrivateAgGridBeans()) === null || _a === void 0 ? void 0 : _a.gos;
4099
- if (!gridOptionsService) {
4100
- this.logger.consoleError('Could not get hold of GridOptionsService! This is a critical error and will prevent Adaptable from working correctly.');
4101
- }
4102
- const self = this;
4103
- this.DANGER_updateGridOptionsMonkeyPatcher = function ({ options, force, source = 'api', }) {
4104
- // `columnDefs`
4105
- const passedColumnDefs = options.columnDefs;
4106
- if (passedColumnDefs) {
4107
- const colDefsWithSpecialColumns = self.getColumnDefinitionsInclSpecialColumns(passedColumnDefs);
4108
- const allDisplayedColIds = self.agGridAdapter
4109
- .getAgGridApi()
4110
- .getAllDisplayedColumns()
4111
- .map((col) => col.getColId());
4112
- // mark as hidden the colDefs of special columns which are not visible
4113
- self.agGridAdapter.patchColDefs(colDefsWithSpecialColumns, (colDef) => {
4114
- if (self.api.columnApi.isSpecialColumn(colDef.colId)) {
4115
- colDef.hide = !allDisplayedColIds.includes(colDef.colId);
4116
- }
4117
- });
4118
- options['columnDefs'] = colDefsWithSpecialColumns;
4119
- self.logger.info(`Added SpecialColumns on GridOptions.columnDefs update (source=${source})`);
4120
- }
4121
- // `context`
4122
- const passedContext = options.context;
4123
- if (passedContext) {
4124
- passedContext['__adaptable'] = self;
4125
- passedContext['adaptableApi'] = self.api;
4126
- }
4127
- // we mutated the options array, so it's OK to use the 'arguments' object
4128
- GridOptionsService_updateGridOptions.apply(this, arguments);
4129
- };
4130
- gridOptionsService.updateGridOptions = this.DANGER_updateGridOptionsMonkeyPatcher;
4131
- }
4132
- DANGER_getPrivateAgGridBeans() {
4133
- const beans = DANGER_AG_GRID_BEANS_MAP[this._agGridId];
4134
- if (!beans) {
4135
- this.logger.consoleError('Could not get hold of AgGridBeans! This is a critical error and will prevent Adaptable from working correctly.');
4136
- }
4137
- return beans;
4138
- }
4139
3372
  }
4140
3373
  exports.AdaptableAgGrid = AdaptableAgGrid;