@adaptabletools/adaptable 23.0.4 → 23.0.5-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 (441) hide show
  1. package/agGrid.js +0 -31
  2. package/index.js +0 -31
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
  5. package/src/AdaptableOptions/AdaptablePlugin.js +1 -9
  6. package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -39
  7. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +44 -16
  8. package/src/AdaptableState/Aggregations/only.js +0 -11
  9. package/src/AdaptableState/Aggregations/weightedAverage.js +0 -26
  10. package/src/AdaptableState/Common/AdaptableColumn.js +0 -1
  11. package/src/AdaptableState/Common/AdaptableForm.js +0 -49
  12. package/src/AdaptableState/Common/AdaptableFormatPresets.js +0 -13
  13. package/src/AdaptableState/Common/AdaptablePredicate.js +3 -125
  14. package/src/AdaptableState/Common/AggregationColumns.js +0 -10
  15. package/src/AdaptableState/Common/Enums.js +0 -3
  16. package/src/AdaptableState/Common/Menu.js +1 -7
  17. package/src/AdaptableState/Common/MenuItem.js +0 -2
  18. package/src/AdaptableState/Common/Types.js +2 -5
  19. package/src/AdaptableState/StatusBarState.js +0 -3
  20. package/src/AdaptableState/StyledColumns/BadgeStyle.js +0 -1
  21. package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +0 -4
  22. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +0 -5
  23. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +0 -8
  24. package/src/AdaptableState/Uuid.js +0 -1
  25. package/src/Api/Implementation/AdaptableApiImpl.js +0 -4
  26. package/src/Api/Implementation/AlertApiImpl.js +0 -21
  27. package/src/Api/Implementation/ApiBase.js +0 -24
  28. package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -1
  29. package/src/Api/Implementation/ChartingApiImpl.js +0 -3
  30. package/src/Api/Implementation/ColumnApiImpl.js +1 -15
  31. package/src/Api/Implementation/ColumnFilterApiImpl.js +0 -9
  32. package/src/Api/Implementation/ColumnScopeApiImpl.js +0 -21
  33. package/src/Api/Implementation/DashboardApiImpl.js +0 -1
  34. package/src/Api/Implementation/EntitlementApiImpl.js +0 -1
  35. package/src/Api/Implementation/ExportApiImpl.js +0 -10
  36. package/src/Api/Implementation/ExpressionApiImpl.js +0 -1
  37. package/src/Api/Implementation/FormatColumnApiImpl.js +0 -3
  38. package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -2
  39. package/src/Api/Implementation/GridApiImpl.js +1 -22
  40. package/src/Api/Implementation/GridFilterApiImpl.js +0 -2
  41. package/src/Api/Implementation/LayoutApiImpl.js +0 -18
  42. package/src/Api/Implementation/LayoutHelpers.js +0 -16
  43. package/src/Api/Implementation/NamedQueryApiImpl.js +0 -1
  44. package/src/Api/Implementation/PredicateApiImpl.js +0 -5
  45. package/src/Api/Implementation/RowFormApiImpl.js +0 -2
  46. package/src/Api/Implementation/StateApiImpl.js +0 -7
  47. package/src/Api/Implementation/SystemStatusApiImpl.js +0 -2
  48. package/src/Api/Implementation/TeamSharingApiImpl.js +0 -3
  49. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -1
  50. package/src/Api/Internal/ActionColumnInternalApi.js +0 -1
  51. package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
  52. package/src/Api/Internal/AdaptableInternalApi.js +1 -39
  53. package/src/Api/Internal/AlertInternalApi.js +1 -102
  54. package/src/Api/Internal/CalculatedColumnInternalApi.js +0 -17
  55. package/src/Api/Internal/ChartingInternalApi.js +0 -1
  56. package/src/Api/Internal/ColumnFilterInternalApi.js +0 -52
  57. package/src/Api/Internal/ColumnInternalApi.js +0 -32
  58. package/src/Api/Internal/CustomSortInternalApi.js +0 -5
  59. package/src/Api/Internal/DashboardInternalApi.js +0 -23
  60. package/src/Api/Internal/DataImportInternalApi.js +0 -1
  61. package/src/Api/Internal/EventInternalApi.js +0 -2
  62. package/src/Api/Internal/ExportInternalApi.js +1 -16
  63. package/src/Api/Internal/ExpressionInternalApi.js +0 -23
  64. package/src/Api/Internal/Fdc3InternalApi.js +0 -9
  65. package/src/Api/Internal/FlashingCellInternalApi.js +0 -5
  66. package/src/Api/Internal/FormatColumnInternalApi.js +5 -107
  67. package/src/Api/Internal/FreeTextColumnInternalApi.js +0 -8
  68. package/src/Api/Internal/GridFilterInternalApi.js +0 -3
  69. package/src/Api/Internal/GridInternalApi.js +0 -37
  70. package/src/Api/Internal/LayoutInternalApi.js +0 -18
  71. package/src/Api/Internal/NamedQueryInternalApi.js +0 -9
  72. package/src/Api/Internal/PredicateInternalApi.js +0 -23
  73. package/src/Api/Internal/RowFormInternalApi.js +0 -18
  74. package/src/Api/Internal/StateInternalApi.js +0 -25
  75. package/src/Api/Internal/StyledColumnInternalApi.js +0 -62
  76. package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
  77. package/src/Redux/ActionsReducers/AlertRedux.js +0 -24
  78. package/src/Redux/ActionsReducers/ApplicationRedux.js +0 -9
  79. package/src/Redux/ActionsReducers/BulkUpdateRedux.js +0 -6
  80. package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +1 -16
  81. package/src/Redux/ActionsReducers/ChartingRedux.js +0 -24
  82. package/src/Redux/ActionsReducers/CommentsRedux.js +0 -24
  83. package/src/Redux/ActionsReducers/CustomSortRedux.js +0 -24
  84. package/src/Redux/ActionsReducers/DashboardRedux.js +0 -33
  85. package/src/Redux/ActionsReducers/ExportRedux.js +0 -36
  86. package/src/Redux/ActionsReducers/FlashingCellRedux.js +0 -24
  87. package/src/Redux/ActionsReducers/FormatColumnRedux.js +0 -36
  88. package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +1 -20
  89. package/src/Redux/ActionsReducers/InternalRedux.js +0 -42
  90. package/src/Redux/ActionsReducers/LayoutRedux.js +1 -67
  91. package/src/Redux/ActionsReducers/NamedQueryRedux.js +0 -15
  92. package/src/Redux/ActionsReducers/NoteRedux.js +0 -14
  93. package/src/Redux/ActionsReducers/PluginsRedux.js +0 -3
  94. package/src/Redux/ActionsReducers/PlusMinusRedux.js +0 -34
  95. package/src/Redux/ActionsReducers/PopupRedux.js +2 -6
  96. package/src/Redux/ActionsReducers/QuickSearchRedux.js +0 -15
  97. package/src/Redux/ActionsReducers/ShortcutRedux.js +0 -24
  98. package/src/Redux/ActionsReducers/SmartEditRedux.js +0 -6
  99. package/src/Redux/ActionsReducers/StatusBarRedux.js +0 -6
  100. package/src/Redux/ActionsReducers/StyledColumnRedux.js +0 -27
  101. package/src/Redux/ActionsReducers/SystemStatusRedux.js +0 -6
  102. package/src/Redux/ActionsReducers/TeamSharingRedux.js +0 -1
  103. package/src/Redux/ActionsReducers/ThemeRedux.js +0 -26
  104. package/src/Redux/ActionsReducers/ToolPanelRedux.js +0 -22
  105. package/src/Redux/ActionsReducers/UserInterfaceRedux.js +0 -3
  106. package/src/Redux/ActionsReducers/utils.js +0 -6
  107. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +0 -1
  108. package/src/Redux/Store/AdaptableReduxMerger.js +0 -25
  109. package/src/Redux/Store/AdaptableStore.js +5 -301
  110. package/src/Strategy/AdaptableModuleBase.js +0 -35
  111. package/src/Strategy/AlertModule.js +0 -9
  112. package/src/Strategy/CellSummaryModule.js +0 -12
  113. package/src/Strategy/ChartingModule.js +0 -1
  114. package/src/Strategy/ColumnFilterModule.js +1 -11
  115. package/src/Strategy/CommentModule.js +0 -2
  116. package/src/Strategy/DashboardModule.js +0 -4
  117. package/src/Strategy/ExportModule.js +0 -1
  118. package/src/Strategy/FlashingCellModule.js +0 -8
  119. package/src/Strategy/FormatColumnModule.js +0 -3
  120. package/src/Strategy/FreeTextColumnModule.js +0 -3
  121. package/src/Strategy/LayoutModule.js +0 -26
  122. package/src/Strategy/NoteModule.js +0 -3
  123. package/src/Strategy/PlusMinusModule.js +0 -3
  124. package/src/Strategy/SettingsPanelModule.js +0 -1
  125. package/src/Strategy/ShortcutModule.js +0 -1
  126. package/src/Strategy/SmartEditModule.js +0 -5
  127. package/src/Strategy/StatusBarModule.js +0 -7
  128. package/src/Strategy/StyledColumnModule.js +1 -16
  129. package/src/Strategy/TeamSharingModule.js +0 -9
  130. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +0 -5
  131. package/src/Utilities/Constants/DocumentationLinkConstants.js +0 -1
  132. package/src/Utilities/Constants/GeneralConstants.js +0 -10
  133. package/src/Utilities/Constants/ObjectDefaultConstants.js +0 -3
  134. package/src/Utilities/Constants/ReduxConstants.js +4 -8
  135. package/src/Utilities/Emitter.js +0 -9
  136. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +0 -8
  137. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +0 -15
  138. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +0 -3
  139. package/src/Utilities/ExpressionFunctions/deepMap.js +0 -16
  140. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +0 -9
  141. package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -9
  142. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +7 -78
  143. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +0 -9
  144. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +2 -16
  145. package/src/Utilities/Extensions/ArrayExtensions.js +1 -63
  146. package/src/Utilities/Extensions/NumberExtensions.js +0 -27
  147. package/src/Utilities/Extensions/ObjectExtensions.js +0 -36
  148. package/src/Utilities/Extensions/StringExtensions.js +0 -27
  149. package/src/Utilities/Helpers/ActionColumnHelper.js +0 -4
  150. package/src/Utilities/Helpers/AdaptableHelper.js +0 -8
  151. package/src/Utilities/Helpers/DateHelper.js +0 -10
  152. package/src/Utilities/Helpers/DisplayFormatHelper.js +0 -8
  153. package/src/Utilities/Helpers/Helper.js +3 -9
  154. package/src/Utilities/Helpers/PlusMinusHelper.js +0 -20
  155. package/src/Utilities/Helpers/QuickSearchHelper.js +0 -5
  156. package/src/Utilities/Helpers/Scheduling/CronExpression.js +0 -43
  157. package/src/Utilities/Helpers/Scheduling/ScheduledReportHelper.js +0 -4
  158. package/src/Utilities/Helpers/SettingsPanelHelper.js +40 -4
  159. package/src/Utilities/Helpers/StyleHelper.js +0 -56
  160. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +0 -46
  161. package/src/Utilities/Helpers/StyledColumns/GradientStyleHelper.js +0 -38
  162. package/src/Utilities/Helpers/StyledColumns/IconStyleHelper.js +0 -39
  163. package/src/Utilities/Helpers/StyledColumns/PercentBarStyleHelper.js +0 -1
  164. package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +0 -5
  165. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +0 -37
  166. package/src/Utilities/Helpers/TimingHelper.js +0 -13
  167. package/src/Utilities/ObjectFactory.js +2 -4
  168. package/src/Utilities/Services/AggregatedScalarLiveValue.js +0 -7
  169. package/src/Utilities/Services/AlertService.js +0 -1
  170. package/src/Utilities/Services/AnnotationsService.js +0 -22
  171. package/src/Utilities/Services/CalculatedColumnExpressionService.js +0 -8
  172. package/src/Utilities/Services/ChartingService.js +0 -9
  173. package/src/Utilities/Services/DataService.js +0 -11
  174. package/src/Utilities/Services/Fdc3Service.js +0 -3
  175. package/src/Utilities/Services/FlashingCellService.js +0 -6
  176. package/src/Utilities/Services/ModuleService.js +0 -8
  177. package/src/Utilities/Services/QueryLanguageService.js +2 -25
  178. package/src/Utilities/Services/RowFormService.js +0 -1
  179. package/src/Utilities/Services/RowSummaryService.js +1 -20
  180. package/src/Utilities/Services/TeamSharingService.js +0 -15
  181. package/src/Utilities/Services/ThemeService.js +0 -7
  182. package/src/Utilities/Services/ValidationService.js +0 -21
  183. package/src/Utilities/createAgStatusPanelComponent.js +0 -3
  184. package/src/Utilities/getExpressionViewItems.js +0 -2
  185. package/src/Utilities/getObjectTagsViewItems.js +0 -1
  186. package/src/Utilities/getScrollbarSize.js +0 -1
  187. package/src/Utilities/logDeprecation.js +0 -3
  188. package/src/Utilities/resolveContainerElement.js +0 -21
  189. package/src/Utilities/runIfNotResolvedIn.js +0 -7
  190. package/src/Utilities/sortColumnStateForVisibleColumns.js +2 -12
  191. package/src/Utilities/waitForTimeout.js +0 -1
  192. package/src/Utilities/wizardSelection.js +0 -2
  193. package/src/View/AdaptablePopover/index.js +1 -1
  194. package/src/View/AdaptableView.js +1 -5
  195. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -4
  196. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -23
  197. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -2
  198. package/src/View/AdaptableWizardView/Wizard.js +0 -12
  199. package/src/View/AdaptableWizardView/helper.js +0 -11
  200. package/src/View/Alert/ActiveAlertsPanel.js +0 -2
  201. package/src/View/Alert/AlertStatusSubPanel.js +0 -8
  202. package/src/View/Alert/Utilities/getAlertType.js +0 -7
  203. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +0 -5
  204. package/src/View/Alert/Utilities/mapAlertDefinition.js +0 -3
  205. package/src/View/Alert/Wizard/AlertWizard.js +0 -2
  206. package/src/View/Alert/Wizard/isValidAlertRules.js +0 -1
  207. package/src/View/BulkUpdate/BulkUpdatePopup.js +0 -1
  208. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -3
  209. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +0 -1
  210. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  211. package/src/View/CellSummary/CellSummaryPopup.js +0 -3
  212. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -7
  213. package/src/View/Charting/EditChartButton.js +1 -4
  214. package/src/View/Charting/ShowChartButton.js +0 -3
  215. package/src/View/Charting/useAgChartState.js +0 -5
  216. package/src/View/Charting/useChartingElements.js +0 -4
  217. package/src/View/Charting/useExternalChartState.js +0 -6
  218. package/src/View/ColumnInfo/ColumnInfo.js +7 -17
  219. package/src/View/Comments/CommentsEditor.js +1 -16
  220. package/src/View/Components/AdaptableButton/AdaptableButtonComponent.js +0 -1
  221. package/src/View/Components/AdaptableButton/AdaptableButtonView.js +0 -3
  222. package/src/View/Components/AdaptableDateInput/index.js +2 -9
  223. package/src/View/Components/AdaptableIconComponent/index.js +0 -4
  224. package/src/View/Components/AdaptableIconSelector/index.js +0 -3
  225. package/src/View/Components/AdaptableInput/index.js +0 -2
  226. package/src/View/Components/Badge/index.js +0 -8
  227. package/src/View/Components/Buttons/ButtonNewPage.js +1 -2
  228. package/src/View/Components/Buttons/EntityListActionButtons.js +0 -1
  229. package/src/View/Components/CellPopup/index.js +1 -2
  230. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +0 -4
  231. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +0 -4
  232. package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -46
  233. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +0 -2
  234. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -20
  235. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -16
  236. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -4
  237. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -1
  238. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -6
  239. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +0 -20
  240. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +0 -5
  241. package/src/View/Components/ColumnFilter/utils.js +2 -9
  242. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +0 -2
  243. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +0 -1
  244. package/src/View/Components/EntityRulesEditor/index.js +1 -11
  245. package/src/View/Components/ExternalRenderer.js +1 -3
  246. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -52
  247. package/src/View/Components/ModuleValueSelector/index.js +0 -2
  248. package/src/View/Components/Panels/PanelWithImage.js +1 -5
  249. package/src/View/Components/Panels/PanelWithRow.js +0 -3
  250. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +0 -6
  251. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +0 -3
  252. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +0 -6
  253. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -2
  254. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +0 -1
  255. package/src/View/Components/Popups/AdaptablePopupAlert.js +0 -3
  256. package/src/View/Components/Popups/AdaptableToaster.js +0 -2
  257. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +0 -8
  258. package/src/View/Components/RangesComponent.js +0 -57
  259. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +0 -3
  260. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -6
  261. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -18
  262. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +0 -4
  263. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
  264. package/src/View/Components/ValueSelector/index.js +0 -4
  265. package/src/View/Components/wizardColumnListStyles.js +0 -5
  266. package/src/View/Dashboard/CustomToolbar.js +1 -25
  267. package/src/View/Dashboard/PinnedToolbarsSelector.js +0 -1
  268. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -22
  269. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +0 -1
  270. package/src/View/DataImport/systemFileHandlers.js +1 -1
  271. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +0 -1
  272. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -27
  273. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +0 -1
  274. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -7
  275. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -12
  276. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -10
  277. package/src/View/GridFilter/GridFilterPopup.js +0 -1
  278. package/src/View/GridFilter/useGridFilterExpressionEditor.js +0 -2
  279. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -31
  280. package/src/View/Layout/LayoutViewPanel.js +0 -2
  281. package/src/View/Layout/PivotDetailsPopoup.js +0 -2
  282. package/src/View/Layout/TransposedPopup.js +0 -7
  283. package/src/View/Layout/Wizard/LayoutWizard.js +1 -6
  284. package/src/View/Layout/Wizard/sections/AggregationsSection.js +0 -2
  285. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -32
  286. package/src/View/Layout/Wizard/sections/RowSummarySection.js +0 -3
  287. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +0 -2
  288. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +0 -4
  289. package/src/View/Note/NotePopup.js +0 -1
  290. package/src/View/QuickSearch/QuickSearchPopup.js +0 -1
  291. package/src/View/StatusBar/AdaptableStatusBar.js +0 -4
  292. package/src/View/StatusBar/StatusBarPanel.js +0 -8
  293. package/src/View/StatusBar/StatusBarPopup.js +0 -2
  294. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +0 -11
  295. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +0 -28
  296. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +0 -13
  297. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -25
  298. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +0 -26
  299. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +0 -3
  300. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +0 -40
  301. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +0 -55
  302. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +0 -15
  303. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +0 -21
  304. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +0 -10
  305. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +0 -5
  306. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +0 -4
  307. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +0 -5
  308. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -3
  309. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +0 -13
  310. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -1
  311. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +0 -1
  312. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +0 -1
  313. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +0 -13
  314. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -13
  315. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -21
  316. package/src/View/SystemStatus/SystemStatusPopup.js +0 -1
  317. package/src/View/TeamSharing/SharedEntityObjectView.js +0 -1
  318. package/src/View/Theme/ThemeSelector.js +0 -1
  319. package/src/View/UIHelper.js +0 -6
  320. package/src/View/UIInterfaces.js +0 -1
  321. package/src/View/Wizard/CollapsibleWizardCard.js +1 -8
  322. package/src/View/Wizard/OnePageWizards.js +2 -9
  323. package/src/View/Wizard/SummaryColorTag.js +0 -1
  324. package/src/View/Wizard/useKeyboardNavigation.js +1 -3
  325. package/src/agGrid/Adaptable.js +0 -12
  326. package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
  327. package/src/agGrid/AdaptableAgGrid.js +3 -482
  328. package/src/agGrid/AdaptableFilterHandler.js +0 -5
  329. package/src/agGrid/AdaptableLogger.js +0 -6
  330. package/src/agGrid/AgGridAdapter.js +3 -90
  331. package/src/agGrid/AgGridColumnAdapter.js +6 -168
  332. package/src/agGrid/AgGridExportAdapter.js +4 -106
  333. package/src/agGrid/AgGridFilterAdapter.js +0 -5
  334. package/src/agGrid/AgGridFloatingFilterAdapter.js +0 -10
  335. package/src/agGrid/AgGridMenuAdapter.js +0 -143
  336. package/src/agGrid/AgGridModulesAdapter.js +0 -2
  337. package/src/agGrid/AgGridOptionsService.js +0 -2
  338. package/src/agGrid/AgGridThemeAdapter.js +0 -7
  339. package/src/agGrid/agGridDataTypeDefinitions.js +0 -8
  340. package/src/agGrid/cellRenderers/BadgeRenderer.js +0 -10
  341. package/src/agGrid/cellRenderers/BulletChartRenderer.js +1 -96
  342. package/src/agGrid/cellRenderers/IconRenderer.js +0 -55
  343. package/src/agGrid/cellRenderers/PercentBarRenderer.js +0 -51
  344. package/src/agGrid/cellRenderers/RangeBarRenderer.js +1 -50
  345. package/src/agGrid/cellRenderers/RatingRenderer.js +0 -40
  346. package/src/agGrid/editors/AdaptableDateEditor/index.js +0 -18
  347. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +0 -3
  348. package/src/agGrid/editors/AdaptableNumberEditor/index.js +0 -11
  349. package/src/agGrid/editors/AdaptablePercentageEditor/index.js +0 -9
  350. package/src/agGrid/index.js +1 -9
  351. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
  352. package/src/components/ColorPicker/ColorPicker.js +0 -6
  353. package/src/components/Combobox/VirtualizedList.js +0 -5
  354. package/src/components/Combobox/index.js +5 -63
  355. package/src/components/Dashboard/Dashboard.js +1 -4
  356. package/src/components/Datepicker/index.js +2 -97
  357. package/src/components/DragAndDropContext/TabList.js +2 -6
  358. package/src/components/Drawer/index.js +0 -7
  359. package/src/components/Dropdown/index.js +0 -1
  360. package/src/components/DropdownButton/index.js +0 -1
  361. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -16
  362. package/src/components/ExpressionEditor/EditorButton.js +0 -1
  363. package/src/components/ExpressionEditor/EditorInput.js +1 -7
  364. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +0 -1
  365. package/src/components/ExpressionEditor/ExpressionPreview.js +4 -14
  366. package/src/components/ExpressionEditor/NamedQueryContext.js +0 -1
  367. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -6
  368. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +0 -12
  369. package/src/components/ExpressionEditor/QueryBuilder/utils.js +0 -4
  370. package/src/components/ExpressionEditor/index.js +5 -14
  371. package/src/components/Icon/index.js +0 -2
  372. package/src/components/Input/NumberInput.js +0 -10
  373. package/src/components/Modal/Backdrop.js +0 -1
  374. package/src/components/OverlayTrigger/Overlay.js +0 -1
  375. package/src/components/OverlayTrigger/index.js +3 -15
  376. package/src/components/ProgressIndicator/ProgressIndicator.js +3 -16
  377. package/src/components/ResizeObserver/index.js +0 -7
  378. package/src/components/SelectableList/index.js +0 -7
  379. package/src/components/SimpleButton/index.js +2 -16
  380. package/src/components/Tabs/index.js +0 -3
  381. package/src/components/Tag/Tag.js +0 -1
  382. package/src/components/Tag/columnScopeTagHelpers.js +0 -2
  383. package/src/components/Textarea/index.js +1 -8
  384. package/src/components/Toggle/Toggle.js +1 -5
  385. package/src/components/Toggle/ToggleGroup.js +1 -3
  386. package/src/components/ToggleButton/index.js +1 -3
  387. package/src/components/Tree/TreeDropdown/index.js +2 -130
  388. package/src/components/Tree/treeUtils.js +0 -4
  389. package/src/components/WindowModal/WindowModal.js +1 -14
  390. package/src/components/WindowModal/useStacking.js +0 -7
  391. package/src/components/icons/bullet-chart.js +0 -4
  392. package/src/components/icons/icon-style.js +0 -4
  393. package/src/components/icons/index.js +26 -36
  394. package/src/components/icons/range-bar.js +0 -5
  395. package/src/components/icons/star.js +0 -1
  396. package/src/components/twUtils.js +3 -12
  397. package/src/components/ui/calendar.js +1 -9
  398. package/src/components/ui/combobox.js +0 -4
  399. package/src/components/utils/captureTabNavigation/getFocusableChildren.js +0 -1
  400. package/src/components/utils/useDraggable.js +0 -4
  401. package/src/components/utils/useProperty.js +0 -18
  402. package/src/devTools/index.js +0 -1
  403. package/src/env.js +2 -2
  404. package/src/layout-manager/src/LMEmitter.js +0 -5
  405. package/src/layout-manager/src/destructurePivotColumnId.js +0 -19
  406. package/src/layout-manager/src/index.js +2 -182
  407. package/src/layout-manager/src/isLayoutEqual.js +0 -1
  408. package/src/layout-manager/src/isPivotColumnTotal.js +0 -2
  409. package/src/layout-manager/src/normalizeLayoutModel.js +0 -27
  410. package/src/layout-manager/src/simplifyLayoutModel.js +0 -11
  411. package/src/layout-manager/src/sortColumnIdsByOrder.js +2 -12
  412. package/src/lib/utils.js +0 -1
  413. package/src/migration/AdaptableUpgradeHelper.js +0 -2
  414. package/src/migration/VersionUpgrade17.js +0 -33
  415. package/src/migration/VersionUpgrade20.js +1 -21
  416. package/src/migration/VersionUpgrade21.js +0 -3
  417. package/src/migration/VersionUpgrade22.js +0 -11
  418. package/src/migration/VersionUpgrade23.js +0 -73
  419. package/src/parser/src/evaluator.js +0 -1
  420. package/src/parser/src/index.js +0 -1
  421. package/src/parser/src/parser.js +4 -103
  422. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +0 -5
  423. package/src/parser/src/predicate/mapQlPredicateToExpression.js +0 -2
  424. package/src/parser/src/tokenizer.js +0 -2
  425. package/src/parser/src/utils.js +0 -1
  426. package/src/renderReactRoot.js +0 -12
  427. package/src/setupDevTools.js +0 -6
  428. package/src/twMerge.js +0 -1
  429. package/src/types.d.ts +1 -1
  430. package/src/types.js +0 -2
  431. package/tsconfig.esm.tsbuildinfo +1 -1
  432. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
  433. package/src/Utilities/Services/Interface/IMetamodelService.js +0 -1
  434. package/src/Utilities/Services/MetamodelService.d.ts +0 -17
  435. package/src/Utilities/Services/MetamodelService.js +0 -162
  436. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
  437. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -99
  438. package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
  439. package/src/metamodel/adaptable-metamodel-model.js +0 -1
  440. package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
  441. package/src/metamodel/adaptable.metamodel.js +0 -1
@@ -24,7 +24,6 @@ import { expandCellDataChangedInfosWithCalculatedColumns } from '../Utilities/Se
24
24
  import { QueryLanguageService } from '../Utilities/Services/QueryLanguageService';
25
25
  import { AlertService } from '../Utilities/Services/AlertService';
26
26
  import { TeamSharingService } from '../Utilities/Services/TeamSharingService';
27
- import { MetamodelService } from '../Utilities/Services/MetamodelService';
28
27
  import { LicenseService } from '../Utilities/Services/LicenseService';
29
28
  import { ALL_TOOL_PANELS } from '../AdaptableState/Common/Types';
30
29
  import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
@@ -114,12 +113,10 @@ const LocalEventService_dispatchEvent = LocalEventService_Prototype.dispatchEven
114
113
  LocalEventService_Prototype.dispatchEvent = function (event) {
115
114
  const agGridApi = event.api;
116
115
  if (agGridApi?.isDestroyed()) {
117
- // do nothing if AG Grid was destroyed in the meantime
118
116
  return;
119
117
  }
120
118
  LocalEventService_dispatchEvent.apply(this, arguments);
121
119
  if (event.type === 'cellChanged' || event.type === 'dataChanged') {
122
- // @ts-ignore
123
120
  const eventRowNode = event.node;
124
121
  if (!eventRowNode) {
125
122
  AdaptableLogger.consoleErrorBase(`No RowNode found in passed event, this should never happen!`, event);
@@ -132,21 +129,14 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
132
129
  }
133
130
  return rowNodeApi;
134
131
  };
135
- // we don't know from which instance of aggrid this is coming,
136
- // as this fn is shared by all instances
137
132
  if (eventRowNode) {
138
133
  AdaptableAgGrid.forEachAdaptable((adaptable) => {
139
134
  if (extractGridApiFromRowNode(eventRowNode) !== adaptable.agGridAdapter?.getAgGridApi(true)) {
140
- // the event is coming from another aggrid instance
141
- // so IGNORE IT
142
135
  return;
143
136
  }
144
137
  if (adaptable.isDestroyed) {
145
- // do nothing if adaptable is destroyed (this is a rare case and happens when Adaptable is quickly destroyed and recreated)
146
138
  return;
147
139
  }
148
- // we're on the correct instance, so do this
149
- //@ts-ignore
150
140
  const fn = adaptable.rowListeners ? adaptable.rowListeners[event.type] : null;
151
141
  if (fn) {
152
142
  fn(event);
@@ -163,9 +153,6 @@ export class AdaptableAgGrid {
163
153
  lifecycleState;
164
154
  variant;
165
155
  emitter;
166
- /**
167
- * Runtime flags
168
- */
169
156
  hasAutogeneratedPrimaryKey;
170
157
  hasAdaptableToolPanel;
171
158
  initWithLazyData;
@@ -192,7 +179,6 @@ export class AdaptableAgGrid {
192
179
  QueryLanguageService;
193
180
  AlertService;
194
181
  TeamSharingService;
195
- MetamodelService;
196
182
  RowFormService;
197
183
  Fdc3Service;
198
184
  AnnotationsService;
@@ -219,13 +205,9 @@ export class AdaptableAgGrid {
219
205
  renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
220
206
  unmountReactRoot;
221
207
  unmountLoadingScreen;
222
- /**
223
- * Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
224
- */
225
208
  adaptableStatusPanelKeys = [];
226
209
  adaptableStatusPanelDefs = [];
227
210
  hasAdaptableStatusBar;
228
- // see #no_additional_react_root
229
211
  _PRIVATE_adaptableJSXElement;
230
212
  _prevLayout;
231
213
  __prevLayoutForRefresh;
@@ -265,8 +247,6 @@ export class AdaptableAgGrid {
265
247
  get isDestroyed() {
266
248
  return this.lifecycleState === 'preDestroyed';
267
249
  }
268
- // only for our private / internal events used within Adaptable
269
- // public events are emitted through the EventApi
270
250
  _emit = (eventName, data) => {
271
251
  if (this.emitter) {
272
252
  return this.emitter.emit(eventName, data);
@@ -289,10 +269,6 @@ export class AdaptableAgGrid {
289
269
  }
290
270
  return this.emitter.onIncludeFired(eventName, callback);
291
271
  };
292
- /**
293
- * Internal initializer for Adaptable, directly called by the React and Angular Adaptable wrappers
294
- * @private
295
- */
296
272
  static async _initInternal(config) {
297
273
  let promise = null;
298
274
  if (Array.isArray(config.adaptableOptions.plugins)) {
@@ -308,11 +284,7 @@ export class AdaptableAgGrid {
308
284
  })
309
285
  : plugin.beforeInit(config.adaptableOptions, agGridOptions);
310
286
  }
311
- // if gridOptions changed, we need to update the runtimeConfig
312
287
  if (agGridOptions.gridOptions !== config.gridOptions) {
313
- // This allows plugins to modify
314
- // FIXME AFL MIG: clarify if this is still needed (for NoCode Plugin?)
315
- // it looks like a code smell, ideally we should get rid of it
316
288
  config.gridOptions = agGridOptions.gridOptions;
317
289
  }
318
290
  }
@@ -343,7 +315,6 @@ export class AdaptableAgGrid {
343
315
  }
344
316
  }
345
317
  async _initAdaptableAgGrid(config) {
346
- // Phase 1: Preprocess Adaptable Options
347
318
  this._isDetailGrid = config.isDetailGrid === true;
348
319
  this._isDetailGridForIndex = config.isDetailGridForRowIndex;
349
320
  this.lifecycleState = 'preprocessOptions';
@@ -366,11 +337,6 @@ export class AdaptableAgGrid {
366
337
  const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions.loadingScreenOptions;
367
338
  if (showLoadingScreen) {
368
339
  this.logger.info('Showing loading screen');
369
- // it's important to use ensureLoadingScreenPortalElement
370
- // and not ensurePortalElement, because multiple adaptable instances share the same portal element
371
- // so when displaying the second one, the react root associated to the portal element
372
- // seems to be somewhat shared via the html element, so the portal element of the first one is destroyed
373
- // resulting in the settings popup not being displayed anymore
374
340
  const portalElement = ensureLoadingScreenPortalElement();
375
341
  if (portalElement) {
376
342
  this.unmountLoadingScreen = this.renderReactRoot(createElement(AdaptableLoadingScreen, {
@@ -399,16 +365,10 @@ export class AdaptableAgGrid {
399
365
  await this.adaptableStore.loadStore({
400
366
  adaptable: this,
401
367
  adaptableStateKey: this.adaptableOptions.adaptableStateKey,
402
- /**
403
- * This method is called after the store is loaded;
404
- * it allows to modify the state before it is used by the application
405
- * e.g. migrating deprecated state, etc.
406
- */
407
368
  postLoadHook: (state) => {
408
369
  if (this.adaptableOptions.stateOptions.autoMigrateState) {
409
370
  this.api.logError;
410
371
  const config = {
411
- // version 16 actually includes all versions up until 16
412
372
  fromVersion: 16,
413
373
  logger: this.logger,
414
374
  };
@@ -420,24 +380,15 @@ export class AdaptableAgGrid {
420
380
  });
421
381
  perfLoadStore.end();
422
382
  loadStoreMarker.end();
423
- // just in case Adaptable was destroyed while loading the store (which is an async operation)
424
383
  if (this.isDestroyed) {
425
384
  this.midwayDestroy();
426
385
  return Promise.reject('Adaptable was destroyed while loading the store.');
427
- // FIXME AFL MIG: is this enough?! talk with the team
428
386
  }
429
387
  this.forPlugins((plugin) => plugin.afterInitialStateLoaded(this));
430
- // do this now so it sets module entitlements
431
388
  this.api.entitlementApi.internalApi.setModulesEntitlements();
432
- /**
433
- * At this point it's mandatory to have the ALL the Adaptable blocks initialized:
434
- * Store, APIs, Services, Modules
435
- */
436
389
  this.lifecycleState = 'setupAgGrid';
437
390
  const gridOptions = config.gridOptions;
438
- // Needed here because special column defs are required for deriving the adaptable column state
439
391
  let columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
440
- // see #map_dateString_to_date
441
392
  this.agGridAdapter.patchColDefs(columnDefs, (colDef) => {
442
393
  if (colDef.cellDataType === 'dateString') {
443
394
  this.logger.consoleError(`Column "${colDef.colId}" uses cellDataType="dateString" which is no longer supported. It has been replaced with cellDataType="date". Please update your column definition.`);
@@ -460,7 +411,6 @@ export class AdaptableAgGrid {
460
411
  gridOptions.pivotDefaultExpanded = layoutModel.PivotExpandLevel;
461
412
  }
462
413
  gridOptions.groupDisplayType = rowGroupDisplayTypeToGridOption(layoutModel.RowGroupDisplayType);
463
- // fixes issue #3053
464
414
  gridOptions.suppressAggFuncInHeader = !!layoutModel.SuppressAggFuncInHeader;
465
415
  if (!isPivotLayoutModel(layoutModel) &&
466
416
  LayoutManager.shouldUnlockSelectionColumnPosition(layoutModel)) {
@@ -488,12 +438,6 @@ export class AdaptableAgGrid {
488
438
  initialRowSelection,
489
439
  });
490
440
  this.silentUpdateCurrentLayoutModel(layoutModel);
491
- // this shouldn't be needed
492
- // but AG Grid has a bug, and in pivot layout,
493
- // even if we provide an initial AG Grid state with
494
- // the aggregations in the correct order,
495
- // they will end up in the wrong order
496
- // so we need to force the layout to be applied again
497
441
  if (isPivotLayoutModel(layoutModel)) {
498
442
  this.layoutManager.setLayout(layoutModel, {
499
443
  force: true,
@@ -510,7 +454,6 @@ export class AdaptableAgGrid {
510
454
  this.unmountLoadingScreen?.();
511
455
  perfInitAgGrid.end();
512
456
  initAgGridMarker.end();
513
- // we need to intercept several AG Grid Api methods and trigger Adaptable state changes
514
457
  this.agGridAdapter.setAgGridApi(agGridApi);
515
458
  this.agGridAdapter.monkeyPatchingGridOptionsUpdates();
516
459
  this.agGridAdapter.monkeyPatchingAggColumnFilters();
@@ -519,29 +462,16 @@ export class AdaptableAgGrid {
519
462
  this.api.entitlementApi.internalApi.setModulesAgGridDepsInfos();
520
463
  this.ModuleService.logMissingAgGridDepsInfos();
521
464
  this.logger.info('Registered AG Grid modules (including dependents):', this.agGridModulesAdapter.getAgGridRegisteredModuleNames().sort());
522
- /**
523
- * At this point AG Grid is initialized!
524
- */
525
465
  this.deriveAdaptableColumnStateFromAgGrid();
526
466
  this.agGridColumnAdapter.setupColumns();
527
- // we need this because we need the internal Column state to be ready before doing any extra business logic
528
467
  this.lifecycleState = 'available';
529
468
  this.api.themeApi.applyCurrentTheme();
530
469
  this.validatePrimaryKey();
531
470
  this.checkShouldClearExistingFiltersOrSearches();
532
- // initial filter model
533
471
  const filteringApplied = this.applyFiltering();
534
- // We may need to re-apply sort if there are ColumnSorts for columns with CustomSort defined
535
- // This is required because AG Grid wasn't aware of the CustomSort when applying sorting initially
536
- // this is not required when filtering was applied because filtering also triggers a sort refresh internally
537
472
  if (!filteringApplied) {
538
473
  this.refreshInitialSortIfNeeded();
539
474
  }
540
- // apply quick search if there is one
541
- // yes, we could have put this on the gridOptions.findSearchValue
542
- // but we need to wait for setupColumns to run first so as to correctly
543
- // determine on which columns the quick search should be applied or not
544
- // and also to setup the quick search style
545
475
  const quickSearchState = this.api.stateApi.getQuickSearchState();
546
476
  if (quickSearchState.QuickSearchText) {
547
477
  this.setAgGridFindSearchValue(quickSearchState.QuickSearchText);
@@ -566,13 +496,6 @@ export class AdaptableAgGrid {
566
496
  if (adaptableContainerElem != null) {
567
497
  adaptableContainerElem.innerHTML = '';
568
498
  if (this.variant === 'react') {
569
- /**
570
- * #no_additional_react_root
571
- * This is only used for the React variant
572
- * Where we don't want to create a new React render tree here
573
- * by rendering it as a React root, but instead we want to
574
- * render it as is in the React tree of our AdaptableReact component
575
- */
576
499
  this._PRIVATE_adaptableJSXElement = AdaptableApp({ Adaptable: this });
577
500
  }
578
501
  else {
@@ -582,11 +505,6 @@ export class AdaptableAgGrid {
582
505
  this.lifecycleState = 'ready';
583
506
  this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
584
507
  setTimeout(() => {
585
- // without the setTimeout, calling autoSizeAllColumns immediately in the onAdaptableReady
586
- // does not work. (I prefer setTimeout to rAF, as raf is not running when you switch tabs)
587
- //
588
- // it also makes it possible to listen to CALCULATED_COLUMN_READY, DASHBOARD_READY, etc.
589
- // in onAdaptableReady - without this those event listeners are not triggered
590
508
  this.api?.eventApi?.emit('AdaptableReady', {
591
509
  adaptableApi: this.api,
592
510
  agGridApi: this.agGridAdapter.getAgGridApi(),
@@ -609,19 +527,13 @@ export class AdaptableAgGrid {
609
527
  }
610
528
  normaliseLayoutState(state, gridOptions) {
611
529
  const layoutState = state.Layout;
612
- // ensure that at least one Layout has been provided
613
530
  if (!layoutState || !layoutState.Layouts?.length) {
614
531
  this.logger.consoleError('No Layouts defined in InitialState.Layout.Layouts[]. At least one Layout is required.');
615
532
  }
616
- // ensure CurrentLayout is valid
617
533
  if (!layoutState.CurrentLayout ||
618
534
  !layoutState.Layouts.find((l) => l.Name === layoutState.CurrentLayout)) {
619
535
  layoutState.CurrentLayout = layoutState.Layouts?.[0]?.Name;
620
536
  }
621
- /**
622
- * Viewport mode does not support a few AG Grid features which are contained in a Layout
623
- * Accordingly we remove this when using this Row Model
624
- */
625
537
  if (gridOptions.rowModelType === 'viewport') {
626
538
  if (state.Layout.Layouts) {
627
539
  state.Layout.Layouts = state.Layout.Layouts.filter((layout) => {
@@ -642,16 +554,7 @@ export class AdaptableAgGrid {
642
554
  const normalizeOptions = {
643
555
  isTree: !!gridOptions.treeData,
644
556
  };
645
- // it's very important that we do this here
646
- // as the layout may not be fully specified in the initialState
647
- // eg: might not include the generated row group columns in the column order
648
- // but the normalization does this for us
649
557
  state.Layout.Layouts = state.Layout.Layouts.map((layout) => normalizeLayout(layout, normalizeOptions));
650
- //now let's normalize the In/NotIn predicate for the group column
651
- // the inputs in this predicate should be an array of arrays
652
- // but for ease of use (and also for similarity with the In predicate for
653
- // other columns) we allow the inputs to be an array of strings
654
- // and change them to an array of arrays
655
558
  state.Layout.Layouts = state.Layout.Layouts.map((layout) => {
656
559
  if (Array.isArray(layout.ColumnFilters)) {
657
560
  layout.ColumnFilters = layout.ColumnFilters.map((columnFilter) => {
@@ -684,7 +587,6 @@ export class AdaptableAgGrid {
684
587
  if (state?.ToolPanel?.ToolPanels) {
685
588
  return state;
686
589
  }
687
- // no Initial Adaptable State provided, we will display all the panels collapsed (custom & module)
688
590
  const defaultToolPanels = [];
689
591
  this.adaptableOptions.toolPanelOptions?.customToolPanels?.forEach((customToolPanel) => defaultToolPanels.push({ Name: customToolPanel.name }));
690
592
  ALL_TOOL_PANELS.forEach((moduleToolPanel) => defaultToolPanels.push({ Name: moduleToolPanel }));
@@ -711,20 +613,13 @@ export class AdaptableAgGrid {
711
613
  getDefaultColumnWidthForCol(columnId) {
712
614
  return this.layoutManager.getDefaultColumnWidthForCol(columnId);
713
615
  }
714
- /**
715
- * Returns TRUE if filtering was applied, FALSE otherwise
716
- * This is important in the INIT phase because applying filtering will automatically refresh AG Grids columnState,
717
- * implicitly refreshing the sorting state too (hence we don't need to apply sorting separately)
718
- */
719
616
  applyFiltering(config) {
720
617
  let filteringApplied = false;
721
- // default updateColumnFilterModel to TRUE, if not provided
722
618
  const updateColumnFilterModel = config?.updateColumnFilterModel ?? true;
723
619
  const agGridApi = this.agGridAdapter.getAgGridApi();
724
620
  if (updateColumnFilterModel) {
725
621
  const columnFilters = this.api.filterApi.columnFilterApi
726
622
  .getActiveColumnFilters()
727
- // we need this additional filter because 'getActiveColumnFilters' checks only for suspended while 'isColumnFilterActive' also checkss for COMPLETE filters
728
623
  .filter((columnFilter) => this.api.filterApi.columnFilterApi.isColumnFilterActive(columnFilter));
729
624
  const filterModel = {};
730
625
  columnFilters.forEach((columnFilter) => {
@@ -733,10 +628,8 @@ export class AdaptableAgGrid {
733
628
  agGridApi.setFilterModel(filterModel);
734
629
  filteringApplied = Object.keys(filterModel).length > 0;
735
630
  }
736
- // FIXME AFL FILTER why is this needed???
737
631
  this.refreshSelectedCellsState();
738
632
  this.refreshSelectedRowsState();
739
- // agGridApi.setFilterModel() already triggered onFilterChanged(), so we skip it if updateColumnFilterModel is TRUE
740
633
  if (!filteringApplied) {
741
634
  agGridApi.onFilterChanged();
742
635
  filteringApplied = true;
@@ -744,10 +637,6 @@ export class AdaptableAgGrid {
744
637
  this._emit('AdapTableFiltersApplied');
745
638
  return filteringApplied;
746
639
  }
747
- /**
748
- * Checks if the current layout has ColumnSorts for columns that have CustomSort defined
749
- * (either via initialState CustomSorts or via customSortComparers option) and refreshes the sort if needed.
750
- */
751
640
  refreshInitialSortIfNeeded() {
752
641
  const currentLayout = this.api.layoutApi.getCurrentLayout();
753
642
  const columnSorts = currentLayout?.ColumnSorts;
@@ -755,12 +644,10 @@ export class AdaptableAgGrid {
755
644
  return;
756
645
  }
757
646
  const hasCustomSortForSortedColumn = columnSorts.some((columnSort) => {
758
- // Check if there's a CustomSort defined in state for this column
759
647
  const customSort = this.api.customSortApi.getCustomSortForColumn(columnSort.ColumnId);
760
648
  if (customSort && !customSort.IsSuspended) {
761
649
  return true;
762
650
  }
763
- // Check if there's a customSortComparer defined in options for this column
764
651
  if (this.api.customSortApi.internalApi.columnHasCustomSortComparer(columnSort.ColumnId)) {
765
652
  return true;
766
653
  }
@@ -779,7 +666,6 @@ export class AdaptableAgGrid {
779
666
  }
780
667
  showAdaptableToolPanel() {
781
668
  if (!this.hasAdaptableToolPanel) {
782
- // don't re-add the ToolPanel if it's hidden by entitlement
783
669
  if (this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel')) {
784
670
  return;
785
671
  }
@@ -796,7 +682,6 @@ export class AdaptableAgGrid {
796
682
  }
797
683
  hideAdaptableToolPanel() {
798
684
  if (this.hasAdaptableToolPanel) {
799
- // close the tool panel if it's currently open
800
685
  this.api.toolPanelApi.closeAdapTableToolPanel();
801
686
  const currentSideBar = this.agGridAdapter.getGridOption('sideBar');
802
687
  if (currentSideBar?.toolPanels) {
@@ -829,7 +714,6 @@ export class AdaptableAgGrid {
829
714
  if (!this.hasAdaptableStatusBar && this.adaptableStatusPanelDefs.length > 0) {
830
715
  const currentStatusBar = this.agGridAdapter.getGridOption('statusBar');
831
716
  if (currentStatusBar) {
832
- // filter out any Adaptable panels that may already exist to avoid duplicates
833
717
  const existingNonAdaptablePanels = (currentStatusBar.statusPanels ?? []).filter((panel) => !this.adaptableStatusPanelKeys.includes(panel.key));
834
718
  const updatedStatusBar = {
835
719
  ...currentStatusBar,
@@ -865,9 +749,6 @@ export class AdaptableAgGrid {
865
749
  return adaptableOptions;
866
750
  }
867
751
  setInitialGridOptions(gridOptions, variant) {
868
- /**
869
- * set Adaptable instance on the AG Grid context
870
- */
871
752
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'context', (original_context) => {
872
753
  const userContext = original_context || {};
873
754
  return {
@@ -876,9 +757,6 @@ export class AdaptableAgGrid {
876
757
  adaptableApi: this.api,
877
758
  };
878
759
  });
879
- /**
880
- * `gridId`
881
- */
882
760
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'gridId', (original_gridId) => {
883
761
  let agGridId = original_gridId || this.adaptableOptions.adaptableId;
884
762
  if (this._isDetailGridForIndex != null) {
@@ -887,15 +765,11 @@ export class AdaptableAgGrid {
887
765
  this.agGridAdapter.setAgGridId(agGridId);
888
766
  return agGridId;
889
767
  });
890
- /**
891
- * `defaultColDef`
892
- */
893
768
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColDef', (original_defaultColDef) => {
894
769
  if (original_defaultColDef?.headerValueGetter) {
895
770
  this.logger.warn('defaultColDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.columnHeader instead.');
896
771
  return original_defaultColDef;
897
772
  }
898
- // #customize_header
899
773
  const defaultColDef = { ...original_defaultColDef };
900
774
  defaultColDef.headerValueGetter = tagProvidedByAdaptable((params) => {
901
775
  const columnHeaderName = this.api.columnApi.internalApi.getColumnHeaderName(params);
@@ -904,9 +778,6 @@ export class AdaptableAgGrid {
904
778
  });
905
779
  return defaultColDef;
906
780
  });
907
- /**
908
- * `defaultColGroupDef`
909
- */
910
781
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColGroupDef', (original_defaultColGroupDef) => {
911
782
  if (original_defaultColGroupDef?.headerValueGetter) {
912
783
  this.logger.warn('defaultColGroupDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.tableColumnHeader instead.');
@@ -918,17 +789,12 @@ export class AdaptableAgGrid {
918
789
  });
919
790
  return defaultColGroupDef;
920
791
  });
921
- /**
922
- * `autoGroupColumnDef`
923
- */
924
792
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'autoGroupColumnDef', (original_autoGroupColumnDef) => {
925
- // #autoGroupColumnDef
926
793
  const useAdaptableFilter = this.adaptableOptions.filterOptions.useAdaptableFiltering;
927
794
  if (!useAdaptableFilter) {
928
795
  return original_autoGroupColumnDef;
929
796
  }
930
797
  if (original_autoGroupColumnDef?.filter === false) {
931
- // if user disables filter on autoGroupColumnDef, we respect that
932
798
  this.logger.info('autoGroupColumnDef.filter is disabled via user configuration.');
933
799
  return original_autoGroupColumnDef;
934
800
  }
@@ -937,18 +803,12 @@ export class AdaptableAgGrid {
937
803
  return original_autoGroupColumnDef;
938
804
  }
939
805
  const autoGroupColumnDef = { ...original_autoGroupColumnDef };
940
- // this is required to make sure that AG Grid doesn't disable the filter
941
- // !! DO NOT REMOVE THIS !!
942
- // see https://github.com/ag-grid/ag-grid/blob/6f43ff257c2e285068eb425b655e58d6eeb89816/packages/ag-grid-enterprise/src/rowHierarchy/autoColService.ts#L225
943
806
  autoGroupColumnDef.filterValueGetter = (params) => {
944
807
  this.logger.consoleWarn('Unexpected invocation of autoGroupColumnDef.filterValueGetter. This is not expected under normal operation. Please contact support.', params);
945
808
  return '';
946
809
  };
947
- // !! it is important that we always return the same component / handler instances
948
- // otherwise AG Grid will re-create the filter instance on each filterModel change
949
810
  const autoGroupFilterComponent = AgGridFilterAdapterFactory(this);
950
811
  const autoGroupFilterHandlerGenerator = () => new AdaptableFilterHandler(this.api);
951
- // Use a getter to dynamically return different filter values based on Layout.RowGroupDisplayType
952
812
  Object.defineProperty(autoGroupColumnDef, 'filter', {
953
813
  get: () => {
954
814
  if (this.isDestroyed) {
@@ -981,7 +841,6 @@ export class AdaptableAgGrid {
981
841
  if (rowGroupDisplayType === 'single') {
982
842
  return true;
983
843
  }
984
- // this is required because of AG Grid bug, see https://github.com/AdaptableTools/adaptable/issues/3212
985
844
  if (rowGroupDisplayType === 'multi') {
986
845
  const groupedColumnFilterConfig = this.api.layoutApi.internalApi.areAllGroupedColumnsFilterable();
987
846
  if (groupedColumnFilterConfig.floatingFilter) {
@@ -993,10 +852,7 @@ export class AdaptableAgGrid {
993
852
  enumerable: true,
994
853
  configurable: true,
995
854
  });
996
- // !! it is important that we always return the same component / handler instances
997
- // otherwise AG Grid will re-create the filter instance on each filterModel change
998
855
  const autoGroupFloatingFilterComponent = AgGridFloatingFilterAdapterFactory(this);
999
- // Use a getter to dynamically return different floatingFilterComponent values based on Layout.RowGroupDisplayType
1000
856
  Object.defineProperty(autoGroupColumnDef, 'floatingFilterComponent', {
1001
857
  get: () => {
1002
858
  if (this.isDestroyed) {
@@ -1014,31 +870,20 @@ export class AdaptableAgGrid {
1014
870
  }
1015
871
  return autoGroupColumnDef;
1016
872
  });
1017
- /**
1018
- * `theme`
1019
- */
1020
873
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'theme', (original_theme) => {
1021
874
  this.agGridThemeAdapter.setAgGridThemeMode(original_theme === 'legacy' ? 'legacy' : 'themingApi');
1022
875
  return original_theme;
1023
876
  });
1024
- /**
1025
- * `getRowId`
1026
- */
1027
877
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'getRowId', (original_getRowId) => {
1028
878
  if (original_getRowId) {
1029
879
  return original_getRowId;
1030
880
  }
1031
881
  const primaryKey = this.adaptableOptions.primaryKey;
1032
882
  if (StringExtensions.IsNullOrEmpty(primaryKey)) {
1033
- // if no valid PK then do nothing
1034
883
  return original_getRowId;
1035
884
  }
1036
885
  if (this.hasAutogeneratedPrimaryKey) {
1037
886
  return (params) => {
1038
- // if the PK value is autogenerated, we need to make sure that the rowData has a valid PK value
1039
- // this should be taken care of in the Adaptable.[loadDataSource/setDataSource/updateRows]() methods, but the users will always make silly decisions
1040
- // so just to be safe we'll check here and add a PK value is missing
1041
- // thus adding a side-effect in a getter, but what can we do against it?! :)
1042
887
  if (Helper.objectNotExists(params.data[primaryKey])) {
1043
888
  params.data[primaryKey] = createUuid();
1044
889
  }
@@ -1046,7 +891,6 @@ export class AdaptableAgGrid {
1046
891
  };
1047
892
  }
1048
893
  return (params) => {
1049
- // might be a summary row
1050
894
  if (params.data?.[ROW_SUMMARY_ROW_ID] != undefined) {
1051
895
  return params.data[ROW_SUMMARY_ROW_ID];
1052
896
  }
@@ -1069,7 +913,6 @@ export class AdaptableAgGrid {
1069
913
  ? `${primaryKeyValue}`
1070
914
  : params.data[primaryKey];
1071
915
  }
1072
- // fallback
1073
916
  const parentKeys = params.parentKeys ?? [];
1074
917
  const values = Object.values(params.data);
1075
918
  if (values.length) {
@@ -1078,10 +921,6 @@ export class AdaptableAgGrid {
1078
921
  }
1079
922
  };
1080
923
  });
1081
- // this is necessary here for the initialisation of the LayoutManager
1082
- /**
1083
- * `grandTotalRow`
1084
- */
1085
924
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'grandTotalRow', (original_grandTotalRow) => {
1086
925
  const currentLayout = this.api.layoutApi.getCurrentLayout();
1087
926
  if (!currentLayout) {
@@ -1093,10 +932,6 @@ export class AdaptableAgGrid {
1093
932
  ? undefined
1094
933
  : currentLayout.GrandTotalRow;
1095
934
  });
1096
- // this is necessary here for the initialisation of the LayoutManager
1097
- /**
1098
- * `suppressAggFuncInHeader`
1099
- */
1100
935
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'suppressAggFuncInHeader', (original_suppressAggFuncInHeader) => {
1101
936
  const currentLayout = this.api.layoutApi.getCurrentLayout();
1102
937
  if (!currentLayout) {
@@ -1104,9 +939,6 @@ export class AdaptableAgGrid {
1104
939
  }
1105
940
  return currentLayout.SuppressAggFuncInHeader;
1106
941
  });
1107
- /**
1108
- * `aggFuncs`
1109
- */
1110
942
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'aggFuncs', (original_aggFuncs) => {
1111
943
  const aggregationFunctions = original_aggFuncs || {};
1112
944
  aggregationFunctions[ONLY_AGG_FN_NAME] = (params) => {
@@ -1125,17 +957,11 @@ export class AdaptableAgGrid {
1125
957
  };
1126
958
  return aggregationFunctions;
1127
959
  });
1128
- /**
1129
- * `allowContextMenuWithControlKey`
1130
- */
1131
960
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'allowContextMenuWithControlKey', (original_allowContextMenuWithControlKey) => {
1132
961
  return original_allowContextMenuWithControlKey === undefined
1133
962
  ? true
1134
963
  : original_allowContextMenuWithControlKey;
1135
964
  });
1136
- /**
1137
- * `enableFilterHandlers`
1138
- */
1139
965
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'enableFilterHandlers', (original_enableFilterHandlers) => {
1140
966
  const useAdaptableFiltering = this.api.optionsApi.getFilterOptions().useAdaptableFiltering;
1141
967
  if (useAdaptableFiltering) {
@@ -1143,9 +969,6 @@ export class AdaptableAgGrid {
1143
969
  }
1144
970
  return original_enableFilterHandlers;
1145
971
  });
1146
- /**
1147
- * `suppressSetFilterByDefault`
1148
- */
1149
972
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'suppressSetFilterByDefault', (original_suppressSetFilterByDefault) => {
1150
973
  const useAdaptableFiltering = this.api.optionsApi.getFilterOptions().useAdaptableFiltering;
1151
974
  if (useAdaptableFiltering) {
@@ -1153,9 +976,6 @@ export class AdaptableAgGrid {
1153
976
  }
1154
977
  return original_suppressSetFilterByDefault;
1155
978
  });
1156
- /**
1157
- * `isExternalFilterPresent`
1158
- */
1159
979
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'isExternalFilterPresent', (original_isExternalFilterPresent) => {
1160
980
  return (params) => {
1161
981
  if (!this.isAvailable) {
@@ -1163,13 +983,9 @@ export class AdaptableAgGrid {
1163
983
  }
1164
984
  const isGridFilterActive = StringExtensions.IsNotNullOrEmpty(this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression());
1165
985
  return (isGridFilterActive ||
1166
- // it means that userPropertyValue will be called so we re-init that collection
1167
986
  (original_isExternalFilterPresent ? original_isExternalFilterPresent(params) : false));
1168
987
  };
1169
988
  });
1170
- /**
1171
- * `doesExternalFilterPass`
1172
- */
1173
989
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'doesExternalFilterPass', (original_doesExternalFilterPass) => {
1174
990
  return (node) => {
1175
991
  if (!this.isAvailable) {
@@ -1178,31 +994,22 @@ export class AdaptableAgGrid {
1178
994
  if (this.isGroupRowNode(node)) {
1179
995
  if (this.api.gridApi.isTreeDataGrid()) {
1180
996
  if (node.data == undefined) {
1181
- // Filler Groups are not filterable
1182
- // see https://www.ag-grid.com/javascript-data-grid/tree-data-paths/#filler-groups
1183
997
  return false;
1184
998
  }
1185
999
  }
1186
1000
  else {
1187
- // for non-Tree Data Grids, we don't filter Group Rows
1188
- // not sure if that's 100% correct, but we did it like this in the past
1189
- // so we keep it like this for now until bugs are reported
1190
1001
  return true;
1191
1002
  }
1192
1003
  }
1193
- // first assess if the Row is filterable - if not, then return true so it always appears in Grid
1194
1004
  const isRowFilterable = this.api.gridApi.internalApi.isRowFilterable(node);
1195
1005
  if (!isRowFilterable) {
1196
1006
  return true;
1197
1007
  }
1198
- // next we assess a Grid Filter (if its running locally)
1199
1008
  const currentGridFilterExpression = this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
1200
1009
  if (StringExtensions.IsNotNullOrEmpty(currentGridFilterExpression)) {
1201
1010
  const evaluateGridFilterOnClient = this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('GridFilter', undefined, currentGridFilterExpression);
1202
1011
  if (evaluateGridFilterOnClient) {
1203
1012
  const isCurrentGridFilterValid = this.api.expressionApi.isValidBooleanExpression(currentGridFilterExpression, GridFilterModuleId, `Invalid Grid Filter '${currentGridFilterExpression}'`);
1204
- // Not sure about this - what should we do with an invalid Grid Filter?
1205
- // Here we essentially clear the Grid for invalid Grid Filter by returning false for each row
1206
1013
  if (!isCurrentGridFilterValid) {
1207
1014
  return false;
1208
1015
  }
@@ -1220,26 +1027,16 @@ export class AdaptableAgGrid {
1220
1027
  return result;
1221
1028
  };
1222
1029
  });
1223
- /**
1224
- * `getMainMenuItems`
1225
- */
1226
1030
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'getMainMenuItems', (original_getMainMenuItems) => {
1227
1031
  return (params) => {
1228
- // couldnt find a way to listen for menu close. There is a Menu Item Select, but you can also close menu from filter and clicking outside menu....
1229
1032
  return this.agGridMenuAdapter.buildColumnMenu(params, original_getMainMenuItems);
1230
1033
  };
1231
1034
  });
1232
- /**
1233
- * `getContextMenuItems`
1234
- */
1235
1035
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'getContextMenuItems', (original_getContextMenuItems) => {
1236
1036
  return (params) => {
1237
1037
  return this.agGridMenuAdapter.buildContextMenu(params, original_getContextMenuItems);
1238
1038
  };
1239
1039
  });
1240
- /**
1241
- * `components`
1242
- */
1243
1040
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'components', (original_components) => {
1244
1041
  const AdaptableToolPanel = getAdaptableToolPanelAgGridComponent(this);
1245
1042
  const components = original_components || {};
@@ -1250,27 +1047,15 @@ export class AdaptableAgGrid {
1250
1047
  return adaptableComponents;
1251
1048
  });
1252
1049
  if (variant === 'react') {
1253
- // TODO very soon we have to transition to reactiveCustomComponents in React
1254
- // but for now, if we simply set it to true, it will break our editors, etc
1255
- // this.agGridOptionsService.setGridOptionsProperty(
1256
- // gridOptions,
1257
- // 'reactiveCustomComponents',
1258
- // () => true
1259
- // );
1260
- }
1261
- /**
1262
- * `sidebar`
1263
- */
1050
+ }
1264
1051
  if (gridOptions.sideBar != undefined) {
1265
1052
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
1266
1053
  if (!original_sideBar) {
1267
- // lucky us, no sideBar is defined, so we don't have to do anything
1268
1054
  return original_sideBar;
1269
1055
  }
1270
1056
  const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
1271
1057
  const adaptableToolPanelDef = this.buildAdaptableToolPanelDef();
1272
1058
  const mapToolPanelDefs = (toolPanelDefs = []) => {
1273
- // if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
1274
1059
  return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
1275
1060
  ? adaptableToolPanelDef
1276
1061
  : toolPanelDef);
@@ -1280,7 +1065,6 @@ export class AdaptableAgGrid {
1280
1065
  };
1281
1066
  let result;
1282
1067
  if (original_sideBar === true) {
1283
- // create all tool panels with default settings
1284
1068
  const toolPanels = [];
1285
1069
  toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_FILTERS);
1286
1070
  toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_COLUMNS);
@@ -1291,7 +1075,6 @@ export class AdaptableAgGrid {
1291
1075
  toolPanels: toolPanels,
1292
1076
  };
1293
1077
  }
1294
- // if there is only one tool panel, and it's the adaptable one => we have to handle it
1295
1078
  else if (typeof original_sideBar === 'string') {
1296
1079
  if (gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
1297
1080
  if (!isAdaptableToolPanelHidden)
@@ -1303,23 +1086,19 @@ export class AdaptableAgGrid {
1303
1086
  result = original_sideBar;
1304
1087
  }
1305
1088
  }
1306
- // if it's an array, process the tool panel definitions
1307
1089
  else if (Array.isArray(original_sideBar)) {
1308
1090
  if (!original_sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID) ||
1309
1091
  isAdaptableToolPanelHidden) {
1310
1092
  result = original_sideBar;
1311
1093
  }
1312
- // if it's an array, process the tool panel definitions
1313
1094
  const sidebarDef = {};
1314
1095
  sidebarDef.toolPanels = mapToolPanelDefs(original_sideBar);
1315
1096
  result = sidebarDef;
1316
1097
  }
1317
- // if it's fully-fledged SideBarDef, process its tool panel definitions
1318
1098
  else if (isSideBarDefObject(original_sideBar)) {
1319
1099
  if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
1320
1100
  toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
1321
1101
  !isAdaptableToolPanelHidden)) {
1322
- // if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
1323
1102
  result = original_sideBar;
1324
1103
  }
1325
1104
  else {
@@ -1337,9 +1116,6 @@ export class AdaptableAgGrid {
1337
1116
  });
1338
1117
  }
1339
1118
  if (gridOptions.statusBar != undefined) {
1340
- /**
1341
- * `statusBar`
1342
- */
1343
1119
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
1344
1120
  const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
1345
1121
  if (statusPanel.statusPanel === ADAPTABLE_STATUS_PANEL) {
@@ -1367,9 +1143,6 @@ export class AdaptableAgGrid {
1367
1143
  else {
1368
1144
  this.hasAdaptableStatusBar = false;
1369
1145
  }
1370
- /**
1371
- * `getRowStyle`
1372
- */
1373
1146
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'getRowStyle', (original_getRowStyle) => {
1374
1147
  return (params) => {
1375
1148
  const result = {
@@ -1380,9 +1153,6 @@ export class AdaptableAgGrid {
1380
1153
  return result;
1381
1154
  };
1382
1155
  });
1383
- /**
1384
- * `getRowClass`
1385
- */
1386
1156
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'getRowClass', (original_getRowClass) => {
1387
1157
  return (params) => {
1388
1158
  const alertHighlightClassName = this.api.gridApi.internalApi.getAlertRowClass(params);
@@ -1394,37 +1164,26 @@ export class AdaptableAgGrid {
1394
1164
  highlightClassName,
1395
1165
  alertHighlightClassName,
1396
1166
  ]
1397
- // we flatten it because 'original_getRowClass' might return a string[]
1398
1167
  .flat()
1399
1168
  .filter((x) => !!x);
1400
1169
  return returnValue?.length ? returnValue : undefined;
1401
1170
  };
1402
1171
  });
1403
- /**
1404
- * `floatingFiltersHeight`
1405
- */
1406
1172
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'floatingFiltersHeight', (original_floatingFiltersHeight) => {
1407
1173
  if (this.api.layoutApi.isCurrentLayoutPivot()) {
1408
- // if Current Layout is Pivot, hide the floating filters from the beginning, otherwise we get an annoying flicker
1409
1174
  return 0;
1410
1175
  }
1411
1176
  return original_floatingFiltersHeight;
1412
1177
  });
1413
- /**
1414
- * `excelStyles`
1415
- */
1416
1178
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'excelStyles', (original_excelStyles) => {
1417
1179
  const excelStyles = original_excelStyles || [];
1418
- // see ##masterDetailHeader
1419
1180
  excelStyles.push({
1420
1181
  id: '_masterDetailHeader',
1421
1182
  interior: {
1422
1183
  color: '#aaaaaa',
1423
1184
  pattern: 'Solid',
1424
1185
  },
1425
- },
1426
- // see #EXCEL_EXPORT_DATA_TYPES
1427
- {
1186
+ }, {
1428
1187
  id: 'stringExcelType',
1429
1188
  dataType: 'String',
1430
1189
  }, {
@@ -1435,30 +1194,17 @@ export class AdaptableAgGrid {
1435
1194
  dataType: 'DateTime',
1436
1195
  }, {
1437
1196
  id: 'numberExcelType',
1438
- // dataType: 'Number',
1439
- // AG Grid requires either dataType or numberFormat to be set for Numbers
1440
1197
  numberFormat: {
1441
1198
  format: `#,##0.00`,
1442
1199
  },
1443
1200
  });
1444
- // store original excel styles, we will have to revert to them after each VISUAL EXPORT
1445
1201
  this.agGridExportAdapter.originalExcelStyles = [...excelStyles];
1446
1202
  this.agGridExportAdapter.DANGER_excelStyles = excelStyles;
1447
- // this array reference will be used for the entire AG Grid session
1448
1203
  return this.agGridExportAdapter.DANGER_excelStyles;
1449
1204
  });
1450
- /**
1451
- * `maintainColumnOrder`
1452
- */
1453
1205
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'maintainColumnOrder', () => {
1454
- // see https://www.ag-grid.com/javascript-data-grid/column-updating-definitions/#maintain-column-order
1455
- // we want to always maintain the column order (provided by Adaptable Layouts), even when column definitions change
1456
1206
  return true;
1457
1207
  });
1458
- /**
1459
- * `columnTypes`
1460
- */
1461
- // this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
1462
1208
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
1463
1209
  const providedColumnTypes = original_columnTypes || {};
1464
1210
  const adaptableSpecialColumnTypes = {
@@ -1481,9 +1227,6 @@ export class AdaptableAgGrid {
1481
1227
  }
1482
1228
  return patchedColumnTypes;
1483
1229
  });
1484
- /**
1485
- * `dataTypeDefinitions`
1486
- */
1487
1230
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'dataTypeDefinitions', () => {
1488
1231
  const revertedDateTypeDefinitions = agGridDataTypeDefinitions;
1489
1232
  return revertedDateTypeDefinitions;
@@ -1494,12 +1237,7 @@ export class AdaptableAgGrid {
1494
1237
  caseSensitive: !!this.adaptableOptions.quickSearchOptions.isQuickSearchCaseSensitive,
1495
1238
  };
1496
1239
  });
1497
- /**
1498
- * suppressOverlays
1499
- */
1500
1240
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'suppressOverlays', (original_suppressOverlays) => {
1501
- // we want to suppress the exporting overlay because having it enabled will turn api.exportDataAsExcel() and api.exportDataAsCsv() into async operations,
1502
- // see #export_data_synchronously
1503
1241
  let suppressOverlays = original_suppressOverlays || [];
1504
1242
  if (!suppressOverlays.includes('exporting')) {
1505
1243
  suppressOverlays.push('exporting');
@@ -1507,9 +1245,6 @@ export class AdaptableAgGrid {
1507
1245
  return suppressOverlays;
1508
1246
  });
1509
1247
  }
1510
- /**
1511
- * Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
1512
- */
1513
1248
  async initializeAgGrid(gridOptions, modules, renderAgGridFrameworkComponent) {
1514
1249
  if (renderAgGridFrameworkComponent) {
1515
1250
  let result = false;
@@ -1523,8 +1258,6 @@ export class AdaptableAgGrid {
1523
1258
  return false;
1524
1259
  }
1525
1260
  const agGridApi = result;
1526
- // framework wrapper may have altered the context value via props
1527
- // in that case, we have to re-populate it with the Adaptable context values
1528
1261
  const agGridContext = agGridApi.getGridOption('context');
1529
1262
  if (!agGridContext) {
1530
1263
  return false;
@@ -1533,14 +1266,12 @@ export class AdaptableAgGrid {
1533
1266
  agGridContext.__adaptable = this;
1534
1267
  agGridContext.adaptableApi = this.api;
1535
1268
  }
1536
- // framework wrapper may pass the rowData as a prop
1537
1269
  const rowData = agGridApi.getGridOption('rowData');
1538
1270
  this.initWithLazyData = rowData == undefined || rowData.length === 0;
1539
1271
  if (this.initWithLazyData) {
1540
1272
  this.logger.info('Initializing with lazy data (no initial rowData).');
1541
1273
  }
1542
1274
  if (!this.getAgGridContainerElement()) {
1543
- // initialize the agGridContainerElement from the AgGrid instance
1544
1275
  const gridRoot = this.agGridAdapter.getAgGridRootElement();
1545
1276
  const gridContainer = gridRoot?.closest('[class*="ag-theme"]');
1546
1277
  if (!gridContainer) {
@@ -1584,8 +1315,6 @@ export class AdaptableAgGrid {
1584
1315
  }
1585
1316
  return this.DANGER_USE_GETTER_adaptableContainerElement;
1586
1317
  }
1587
- // This method returns selected cells ONLY (if selection mode is cells or multiple cells).
1588
- // If the selection mode is row it will returns nothing - use the setSelectedRows() method
1589
1318
  refreshSelectedCellsState() {
1590
1319
  if (!this.isGridRangeSelectable()) {
1591
1320
  return;
@@ -1671,36 +1400,18 @@ export class AdaptableAgGrid {
1671
1400
  };
1672
1401
  }
1673
1402
  addGridEventListeners() {
1674
- /**
1675
- * Intercept 3 DOM events and emit them as Adaptable events:
1676
- * KeyDown
1677
- * MouseEnter
1678
- * MouseLeave
1679
- */
1680
1403
  const gridContainerElement = this.getAgGridContainerElement();
1681
1404
  if (gridContainerElement) {
1682
- gridContainerElement.addEventListener('keydown', (this.agGridListenerKeydown = (event) => this._emit('KeyDown', event)),
1683
- // This is needed to be able to prevent the editor to be opened
1684
- // in bubling phase the opening is not prevented with ag-grid v30
1685
- true);
1405
+ gridContainerElement.addEventListener('keydown', (this.agGridListenerKeydown = (event) => this._emit('KeyDown', event)), true);
1686
1406
  gridContainerElement.addEventListener('mouseenter', (this.agGridListenerMouseEnter = (event) => {
1687
1407
  this._emit('MouseEnter', event);
1688
1408
  }), true);
1689
1409
  gridContainerElement.addEventListener('mouseleave', (this.agGridListenerMouseLeave = (event) => this._emit('MouseLeave', event)));
1690
1410
  }
1691
- /**
1692
- * Use Case: User has started inline editing but its disabled in Row Form Options
1693
- * Action: Stop editing
1694
- */
1695
1411
  this.agGridAdapter.getAgGridApi().addEventListener('cellEditingStarted', (this.listenerCellEditingStarted = () => {
1696
1412
  if (this.adaptableOptions.rowFormOptions.disableInlineEditing)
1697
1413
  this.agGridAdapter.getAgGridApi().stopEditing();
1698
1414
  }));
1699
- /**
1700
- * Use Case: Grid was already set up and now the initial data has been displayed
1701
- * Action1: Update the Column Model
1702
- * Action2: Refresh Calculated Columns
1703
- */
1704
1415
  this.agGridAdapter.getAgGridApi().addEventListener('firstDataRendered', (this.listenerFirstDataRendered = () => {
1705
1416
  if (this.initWithLazyData) {
1706
1417
  this.updateColumnModelAndRefreshGrid();
@@ -1709,10 +1420,6 @@ export class AdaptableAgGrid {
1709
1420
  }
1710
1421
  this.autoSizeLayoutIfNeeded();
1711
1422
  }));
1712
- /**
1713
- * Use Case: A format column that has ColumnGroupScope needs to be re-evaluated
1714
- * whenever a column group is expanded or collapsed
1715
- */
1716
1423
  this.agGridAdapter.getAgGridApi().addEventListener('columnGroupOpened', (this.listenerColumnGroupOpened = () => {
1717
1424
  if (this.api.formatColumnApi.getActiveFormatColumns().some((fc) => {
1718
1425
  return fc.ColumnGroupScope != null;
@@ -1720,10 +1427,6 @@ export class AdaptableAgGrid {
1720
1427
  this.updateColumnModelAndRefreshGrid();
1721
1428
  }
1722
1429
  }));
1723
- /**
1724
- * Use Case: A pivot column has changed
1725
- * Action: Autosize pivot columns (if autosize pivot in Layout is true)
1726
- */
1727
1430
  this.agGridAdapter.getAgGridApi().addEventListener('columnPivotChanged', (this.listenerPivotChanged = (params) => {
1728
1431
  if (params.type == 'columnPivotChanged' &&
1729
1432
  params.columnApi != null &&
@@ -1734,10 +1437,6 @@ export class AdaptableAgGrid {
1734
1437
  }
1735
1438
  }
1736
1439
  }));
1737
- /**
1738
- * Use Case: User has selected Rows or opened a Row Group
1739
- * Action: Set Selected Rows (on a debounce of 500ms)
1740
- */
1741
1440
  this.debouncedSetSelectedRows = debounce(() => {
1742
1441
  if (!this.isReady) {
1743
1442
  return;
@@ -1754,10 +1453,6 @@ export class AdaptableAgGrid {
1754
1453
  this.debouncedSetSelectedRows();
1755
1454
  }
1756
1455
  }));
1757
- /**
1758
- * Use Case: User has selected a range of cells
1759
- * Action: Set Selected Cells (on a debounce of 250ms)
1760
- */
1761
1456
  this.debouncedSetSelectedCells = debounce(() => {
1762
1457
  if (!this.isReady) {
1763
1458
  return;
@@ -1769,19 +1464,10 @@ export class AdaptableAgGrid {
1769
1464
  this.debouncedSetSelectedCells();
1770
1465
  }
1771
1466
  }));
1772
- /**
1773
- * Use Case: Sort has changed in the Grid
1774
- * Action1: Fire the Grid Sorted Event
1775
- * Action2: Set Selected Cells (on a debounce)
1776
- */
1777
1467
  this.agGridAdapter.getAgGridApi().addEventListener('sortChanged', (this.listenerSortChanged = () => {
1778
1468
  this.debouncedSetSelectedCells();
1779
1469
  this.api.eventApi.internalApi.fireGridSortedEvent();
1780
1470
  }));
1781
- /**
1782
- * Use Case: Charts have been created or destroyed, Chart ranges selected or Chart options changed
1783
- * Action: Call onChartModelChange in Charting Service
1784
- */
1785
1471
  const eventsThatTriggerChartingChanges = [
1786
1472
  'chartCreated',
1787
1473
  'chartRangeSelectionChanged',
@@ -1789,17 +1475,13 @@ export class AdaptableAgGrid {
1789
1475
  'chartDestroyed',
1790
1476
  ];
1791
1477
  if (this.ModuleService.isAdapTableModulePresent('Charting')) {
1792
- // We need to break the loop of charting changes for 'chartOptionsChanged', which is triggered by the subsequent agGridApi.updateChart(...)
1793
- // see #ag_grid_update_chart_loop
1794
1478
  let lastChartOptionsChangePayload = '';
1795
1479
  this.listenerGlobalChartingChanges = (type, params) => {
1796
1480
  if (eventsThatTriggerChartingChanges.includes(type)) {
1797
1481
  if (type === 'chartOptionsChanged') {
1798
- // Exclude api and context
1799
1482
  const { api, context, ...sanitizedParams } = params || {};
1800
1483
  const eventPayload = JSON.stringify(sanitizedParams);
1801
1484
  if (eventPayload === lastChartOptionsChangePayload) {
1802
- // this is a loop, so we ignore it
1803
1485
  return;
1804
1486
  }
1805
1487
  lastChartOptionsChangePayload = eventPayload;
@@ -1809,10 +1491,6 @@ export class AdaptableAgGrid {
1809
1491
  };
1810
1492
  this.agGridAdapter.getAgGridApi().addGlobalListener(this.listenerGlobalChartingChanges);
1811
1493
  }
1812
- /**
1813
- * Row and Cell listeners created in 2020
1814
- * These have supplanted many of the events we previously had and simplified things
1815
- */
1816
1494
  this.rowListeners = {
1817
1495
  dataChanged: (event) => {
1818
1496
  this.onRowDataChanged({
@@ -1876,7 +1554,6 @@ export class AdaptableAgGrid {
1876
1554
  return thePlugin;
1877
1555
  }
1878
1556
  initServices() {
1879
- // create the services
1880
1557
  this.LicenseService = this.initLicenseService();
1881
1558
  this.ChartingService = new ChartingService(this.api);
1882
1559
  this.ThemeService = new ThemeService(this.api);
@@ -1890,7 +1567,6 @@ export class AdaptableAgGrid {
1890
1567
  this.AnnotationsService = new AnnotationsService(this.api);
1891
1568
  this.FlashingCellService = new FlashingCellService(this.api);
1892
1569
  this.RowFormService = new RowFormService(this.api);
1893
- this.MetamodelService = new MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
1894
1570
  }
1895
1571
  initLicenseService() {
1896
1572
  const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
@@ -1938,20 +1614,13 @@ export class AdaptableAgGrid {
1938
1614
  modules.set(ModuleConstants.ToolPanelModuleId, new ToolPanelModule(this.api));
1939
1615
  return modules;
1940
1616
  }
1941
- /**
1942
- * This method contains all the updates on the AdaptableState which were made AFTER Adaptbale was ready
1943
- * This was contidioned because we required AG Grid to be ready before we could make these updates
1944
- * We should be able to refactor the code, no that we no fore sure that Adaptable State is ready BEFORE AG Grid init
1945
- */
1946
1617
  temporaryAdaptableStateUpdates() {
1947
1618
  this.api.eventApi.on('AdaptableReady', () => {
1948
- // update status bar state
1949
1619
  const adaptableStatusPanels = this.agGridAdapter
1950
1620
  .getAgGridApi()
1951
1621
  .getGridOption('statusBar')
1952
1622
  ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key)) ?? [];
1953
1623
  const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
1954
- // need to add only the adaptable panels
1955
1624
  statusBarModule.syncStateWithOptions(adaptableStatusPanels);
1956
1625
  });
1957
1626
  }
@@ -1960,16 +1629,13 @@ export class AdaptableAgGrid {
1960
1629
  return;
1961
1630
  }
1962
1631
  const primaryKey = this.adaptableOptions.primaryKey;
1963
- // first check if there is a primary key column
1964
1632
  const primaryKeyColDef = this.agGridAdapter.getAgGridApi().getColumnDef(primaryKey);
1965
1633
  if (!primaryKeyColDef) {
1966
1634
  let errorMessage;
1967
- // if no primary key column then lets check the first row to see if its a data item
1968
1635
  const primaryKeyDataItem = this.getFirstRowNode()?.data[primaryKey];
1969
1636
  if (!primaryKeyDataItem) {
1970
1637
  errorMessage = `Primary key column "${this.adaptableOptions.primaryKey}" not found. This will affect many Adaptable features.`;
1971
1638
  if (this.adaptableOptions.alertOptions.showMissingPrimaryKeyAlert) {
1972
- // show an alert if that is the option
1973
1639
  this.api.alertApi.showAlertError('No Primary Key', errorMessage);
1974
1640
  }
1975
1641
  else {
@@ -2022,12 +1688,10 @@ export class AdaptableAgGrid {
2022
1688
  this.api.gridApi.internalApi.setColumns(allColumns);
2023
1689
  }
2024
1690
  checkShouldClearExistingFiltersOrSearches() {
2025
- // if they have selected to clear Filters on startup then do it
2026
1691
  if (this.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
2027
1692
  this.logger.warn('Clearing saved filters (clearFiltersOnStartUp is enabled).');
2028
1693
  this.api.filterApi.clearAllFilters();
2029
1694
  }
2030
- // if they have selected to clear searches on startup then do it
2031
1695
  if (this.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
2032
1696
  this.logger.warn('Clearing saved Quick Search (clearQuickSearchOnStartUp is enabled).');
2033
1697
  this.api.quickSearchApi.clearQuickSearch();
@@ -2050,9 +1714,6 @@ export class AdaptableAgGrid {
2050
1714
  const foundNode = parentRowNode.childrenAfterFilter?.find((c) => c.id == rowNode.id);
2051
1715
  return foundNode != null;
2052
1716
  }
2053
- /**
2054
- * Use (lazy evaluated) getters to avoid unnecessary calculations and memoization to avoid recalculating the same values
2055
- */
2056
1717
  createGridCell(rowNode, columnId, defaults) {
2057
1718
  let _column;
2058
1719
  let _primaryKeyValue;
@@ -2075,12 +1736,9 @@ export class AdaptableAgGrid {
2075
1736
  if (_rawValue === undefined) {
2076
1737
  _rawValue = self.getRawValueFromRowNode(rowNode, columnId);
2077
1738
  if (_rawValue?.value != undefined && getIsPivotCell()) {
2078
- // for pivot result columns, the raw value is an object with a value property
2079
- // we want to return the value property as the raw value
2080
1739
  _rawValue = _rawValue.value;
2081
1740
  }
2082
1741
  if (_rawValue?.value != undefined && typeof _rawValue.toString === 'function') {
2083
- // handle columns with custom valueGetters
2084
1742
  _rawValue = _rawValue.value;
2085
1743
  }
2086
1744
  }
@@ -2139,17 +1797,12 @@ export class AdaptableAgGrid {
2139
1797
  const agGridApi = gridApi || this.agGridAdapter.getAgGridApi();
2140
1798
  let result;
2141
1799
  if (!this.hasAutogeneratedPrimaryKey) {
2142
- // support both AG Grid pre & post v31.3.x
2143
- // TODO remove this with the next major Adaptable version
2144
1800
  result = this.agGridAdapter._agGridApi_getValue(this.adaptableOptions.primaryKey, rowNode, agGridApi);
2145
1801
  }
2146
1802
  if (result == undefined && rowNode.data) {
2147
1803
  result = rowNode.data[this.adaptableOptions.primaryKey];
2148
1804
  }
2149
1805
  if (result == undefined && rowNode.id != undefined) {
2150
- // when getPrimaryKeyValueFromRowNode is called for group rows,
2151
- // which don't have a rowNode.data object, the result is undefined
2152
- // but we do have an id property on the rowNode object, so we'll use that
2153
1806
  result = rowNode.id;
2154
1807
  }
2155
1808
  return result;
@@ -2202,7 +1855,6 @@ export class AdaptableAgGrid {
2202
1855
  if (!column) {
2203
1856
  return rawValue;
2204
1857
  }
2205
- // prevents from null
2206
1858
  if (rawValue === undefined || rawValue === null) {
2207
1859
  return rawValue;
2208
1860
  }
@@ -2214,11 +1866,9 @@ export class AdaptableAgGrid {
2214
1866
  if (typeof rawValue === 'number') {
2215
1867
  return rawValue;
2216
1868
  }
2217
- // empty string or space should not be converted to 0
2218
1869
  if (typeof rawValue === 'string') {
2219
1870
  return StringExtensions.IsNumeric(rawValue) ? Number(rawValue) : rawValue;
2220
1871
  }
2221
- // handle objects with toString() (e.g. from valueGetters)
2222
1872
  const numValue = Number(rawValue);
2223
1873
  return isNaN(numValue) ? rawValue : numValue;
2224
1874
  }
@@ -2261,9 +1911,6 @@ export class AdaptableAgGrid {
2261
1911
  refreshHeader() {
2262
1912
  this.agGridAdapter.getAgGridApi().refreshHeader();
2263
1913
  }
2264
- // TODO AFL: this method seems to be used A LOT
2265
- // we should check if we couldn't use the `refresh` method instead for some cases
2266
- // see https://www.ag-grid.com/react-data-grid/view-refresh/#redraw-rows
2267
1914
  redrawRows(rowNodes) {
2268
1915
  const redrawRowsParams = rowNodes
2269
1916
  ? {
@@ -2350,7 +1997,6 @@ export class AdaptableAgGrid {
2350
1997
  this.agGridAdapter.getAgGridApi().selectAll();
2351
1998
  }
2352
1999
  deselectAll() {
2353
- // need to do both as first just clears selected rows and second clears ranges
2354
2000
  this.agGridAdapter.getAgGridApi().deselectAll();
2355
2001
  this.agGridAdapter.getAgGridApi().clearCellSelection();
2356
2002
  }
@@ -2363,7 +2009,6 @@ export class AdaptableAgGrid {
2363
2009
  }
2364
2010
  this.agGridAdapter.setGridOption('rowData', dataSource);
2365
2011
  this.updateRowGroupsAndColumnGroupsExpandedState();
2366
- // this.updateColumnModelAndRefreshGrid();
2367
2012
  }
2368
2013
  getGridData() {
2369
2014
  const data = [];
@@ -2379,7 +2024,6 @@ export class AdaptableAgGrid {
2379
2024
  rowData[i][AUTOGENERATED_PK_COLUMN] = createUuid();
2380
2025
  }
2381
2026
  }
2382
- // add a synthetic PK only if missing (useful in case of updating row data)
2383
2027
  addSyntheticPrimaryKeyIfMissing(rowData = []) {
2384
2028
  this.adaptableOptions.primaryKey = AUTOGENERATED_PK_COLUMN;
2385
2029
  for (let i = 0; i < rowData.length; i++) {
@@ -2397,8 +2041,6 @@ export class AdaptableAgGrid {
2397
2041
  getFirstRowNode() {
2398
2042
  let firstRowNode = this.getFirstDisplayedRowNode();
2399
2043
  if (firstRowNode?.group) {
2400
- // all groups may be closed so it is safer to get first leaf node
2401
- // all groups should have at least one leafe node (though not necessarily if using SSRM)
2402
2044
  if (ArrayExtensions.IsNotNullOrEmpty(firstRowNode.allLeafChildren)) {
2403
2045
  firstRowNode = firstRowNode.allLeafChildren[0];
2404
2046
  }
@@ -2437,10 +2079,6 @@ export class AdaptableAgGrid {
2437
2079
  });
2438
2080
  return data;
2439
2081
  }
2440
- /**
2441
- * This method internally differentiates between server-side and client-side row model
2442
- * and correctly calls the appropriate method as per the current row model type
2443
- */
2444
2082
  applyAgGridTransaction(transaction) {
2445
2083
  const isServerSideRowModel = this.getAgGridRowModelType() === 'serverSide';
2446
2084
  const agGridApi = this.agGridAdapter.getAgGridApi();
@@ -2448,10 +2086,6 @@ export class AdaptableAgGrid {
2448
2086
  ? agGridApi.applyServerSideTransaction(transaction)
2449
2087
  : agGridApi.applyTransaction(transaction);
2450
2088
  }
2451
- /**
2452
- * This method internally differentiates between server-side and client-side row model
2453
- * and correctly calls the appropriate method as per the current row model type
2454
- */
2455
2089
  applyAgGridTransactionAsync(transaction, callback) {
2456
2090
  const isServerSideRowModel = this.getAgGridRowModelType() === 'serverSide';
2457
2091
  const agGridApi = this.agGridAdapter.getAgGridApi();
@@ -2713,12 +2347,8 @@ export class AdaptableAgGrid {
2713
2347
  async getDistinctFilterValuesForColumn(options) {
2714
2348
  const { column, previousResult } = options;
2715
2349
  const self = this;
2716
- // First get the Grid Cells in the Column
2717
2350
  let currentGridCells;
2718
2351
  const getCurrentGridCells = () => {
2719
- // we do this in a function so it's lazy
2720
- // but we also store in the outside closure, so we can reuse the value if
2721
- // already called
2722
2352
  if (currentGridCells) {
2723
2353
  return currentGridCells;
2724
2354
  }
@@ -2729,7 +2359,6 @@ export class AdaptableAgGrid {
2729
2359
  ? this.getDistinctGridCellsForDateColumn(column)
2730
2360
  : this.getDistinctGridCellsForColumn(column));
2731
2361
  };
2732
- // No distinct values so lets return unique grid cells
2733
2362
  const mapFn = (gridCell, level) => {
2734
2363
  if (level || Array.isArray(gridCell.children)) {
2735
2364
  const cell = gridCell;
@@ -2758,7 +2387,6 @@ export class AdaptableAgGrid {
2758
2387
  label: gridCell.displayValue,
2759
2388
  };
2760
2389
  };
2761
- // If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
2762
2390
  const customInFilterValues = this.adaptableOptions.filterOptions.customInFilterValues;
2763
2391
  if (customInFilterValues) {
2764
2392
  const gridApiInternal = this.api.gridApi.internalApi;
@@ -2872,9 +2500,7 @@ export class AdaptableAgGrid {
2872
2500
  }
2873
2501
  async getDistinctEditValuesForColumn(options) {
2874
2502
  const { column, gridCell } = options;
2875
- // First get the Grid Cells in the Column
2876
2503
  const currentGridCells = this.getDistinctGridCellsForColumn(column);
2877
- // If there are custom distinct value, return them, but only if a module has been specifically set
2878
2504
  const customEditColumnValues = this.adaptableOptions.editOptions.customEditColumnValues;
2879
2505
  if (customEditColumnValues) {
2880
2506
  const customEditValuesContext = {
@@ -2908,7 +2534,6 @@ export class AdaptableAgGrid {
2908
2534
  return customDistinctValues ?? [];
2909
2535
  }
2910
2536
  }
2911
- // No distinct values so lets return unique grid cells
2912
2537
  return currentGridCells.map((gridCell) => {
2913
2538
  const result = {
2914
2539
  value: gridCell.rawValue,
@@ -2920,8 +2545,6 @@ export class AdaptableAgGrid {
2920
2545
  getDistinctGridCellsForGroupedColumn(rowNodes) {
2921
2546
  const groupedColumns = this.api.columnApi.getRowGroupedColumns();
2922
2547
  const treeMode = this.api.gridApi.isTreeDataGrid();
2923
- // if we're not in tree mode, return if there are no grouped columns
2924
- // but in tree mode, we have to continue, even if there are no grouped columns
2925
2548
  if (!groupedColumns.length && !treeMode) {
2926
2549
  return [];
2927
2550
  }
@@ -2941,15 +2564,11 @@ export class AdaptableAgGrid {
2941
2564
  currentParentGridCells.length = level;
2942
2565
  }
2943
2566
  prevLevel = level;
2944
- // for non-tree mode
2945
- // or for tree mode, if the rowNode has data - so it's not a filler group
2946
2567
  if (!treeMode || (treeMode && rowNode.data)) {
2947
2568
  currentGroupKey.push(key);
2948
2569
  }
2949
2570
  const parentGridCell = currentParentGridCells[currentParentGridCells.length - 1];
2950
2571
  const gridCell = this.addDistinctColumnValue(rowNode, AG_GRID_GROUPED_COLUMN, false);
2951
- // for tree-mode filler nodes, we might end up without a gridCell
2952
- // so we need to make sure it's defined
2953
2572
  if (gridCell) {
2954
2573
  gridCell.leafChildrenCount = rowNode.allLeafChildren?.length ?? 0;
2955
2574
  currentParentGridCells.push(gridCell);
@@ -2984,7 +2603,6 @@ export class AdaptableAgGrid {
2984
2603
  const initialCell = this.addDistinctColumnValue(rowNode, column.columnId, isPivotResultColumn);
2985
2604
  if (initialCell) {
2986
2605
  const value = initialCell.rawValue;
2987
- // we want to filter out empty values
2988
2606
  if (value === '' || value === null || value === undefined) {
2989
2607
  return;
2990
2608
  }
@@ -3024,7 +2642,6 @@ export class AdaptableAgGrid {
3024
2642
  treeDeepMap.set([year, month, day], dayCells);
3025
2643
  if (includeTime) {
3026
2644
  const timeCells = treeDeepMap.get([year, month, day, dateInstance.getTime()]) || [];
3027
- // if the value is a string, let's use it as the final raw value
3028
2645
  const timeRawValue = typeof value === 'string' ? value : `${dateInstance.toISOString()}`;
3029
2646
  let timeDisplayValue = typeof value === 'string'
3030
2647
  ? value
@@ -3057,7 +2674,6 @@ export class AdaptableAgGrid {
3057
2674
  for (const keys of years) {
3058
2675
  const [year] = keys;
3059
2676
  const yearCells = treeDeepMap.get([year]) || [];
3060
- // should only be one item in the uniqueYearCells array
3061
2677
  const uniqueYearCell = this.getUniqueGridCells(column, yearCells)[0];
3062
2678
  if (!uniqueYearCell) {
3063
2679
  continue;
@@ -3077,7 +2693,6 @@ export class AdaptableAgGrid {
3077
2693
  }
3078
2694
  uniqueMonthCell.children = [];
3079
2695
  uniqueYearCell.children.push(uniqueMonthCell);
3080
- // those are all the days for which there are values in this year/month
3081
2696
  const keysForMonth = treeDeepMap.getKeysStartingWith([year, month], {
3082
2697
  depthLimit: 1,
3083
2698
  excludeSelf: true,
@@ -3136,12 +2751,7 @@ export class AdaptableAgGrid {
3136
2751
  const gridCell = this.addDistinctColumnValue(rowNode, column.columnId, isPivotResultColumn);
3137
2752
  if (gridCell) {
3138
2753
  const value = gridCell.rawValue;
3139
- // we want to filter out empty values
3140
2754
  if (value === '' || value === null || value === undefined) {
3141
- // 2025-10-31: we want to allow empty values to be included
3142
- // after all - they are not displayed by default
3143
- // but will be accessible in the customInFilterValues callback
3144
- // return;
3145
2755
  }
3146
2756
  gridCells.push(gridCell);
3147
2757
  }
@@ -3161,17 +2771,11 @@ export class AdaptableAgGrid {
3161
2771
  if (!isPivotResultColumn && this.isGroupRowNode(rowNode)) {
3162
2772
  if (this.api.gridApi.isTreeDataGrid()) {
3163
2773
  if (rowNode.data == undefined) {
3164
- // skip Tree Filler Groups
3165
- // see https://www.ag-grid.com/javascript-data-grid/tree-data-paths/#filler-groups
3166
2774
  return;
3167
2775
  }
3168
- // if (columnId !== AG_GRID_GROUPED_COLUMN) {
3169
- // return;
3170
- // }
3171
2776
  return this.getGridCellFromRowNode(rowNode, columnId);
3172
2777
  }
3173
2778
  else {
3174
- // for normal Table Columns we do NOT return the values of the aggregates
3175
2779
  if (columnId !== AG_GRID_GROUPED_COLUMN) {
3176
2780
  return;
3177
2781
  }
@@ -3179,12 +2783,10 @@ export class AdaptableAgGrid {
3179
2783
  }
3180
2784
  }
3181
2785
  if (isPivotResultColumn) {
3182
- // if it's a Pivot Result Column, we are interested only in the aggregated(pivoted) data
3183
2786
  if (!rowNode.aggData) {
3184
2787
  return;
3185
2788
  }
3186
2789
  if (!rowNode.leafGroup) {
3187
- // if it's a Pivot Result Column, we are interested only in the leaf groups (pivot results, NOT group aggregates)
3188
2790
  return;
3189
2791
  }
3190
2792
  }
@@ -3206,17 +2808,12 @@ export class AdaptableAgGrid {
3206
2808
  return value;
3207
2809
  };
3208
2810
  const self = this;
3209
- // handle the special case where GridCells have arrays as values
3210
- // in this case we want to treat each value in the array as a separate value
3211
2811
  if (this.api.columnApi.internalApi.hasArrayDataType(column)) {
3212
2812
  gridCellsToUse = gridCellsToUse.flatMap((gridCell) => {
3213
2813
  const rawValueArray = gridCell.rawValue;
3214
2814
  if (Array.isArray(rawValueArray)) {
3215
2815
  return rawValueArray.map((rawValue) => ({
3216
2816
  ...gridCell,
3217
- // for now just map the rawValue
3218
- // extracting displayValue and normalisedValue is possible
3219
- // but it could have a significant performance impact
3220
2817
  rawValue: rawValue,
3221
2818
  displayValue: rawValue,
3222
2819
  normalisedValue: rawValue,
@@ -3225,12 +2822,6 @@ export class AdaptableAgGrid {
3225
2822
  return [gridCell];
3226
2823
  });
3227
2824
  }
3228
- // those are grid cells unique per primary key - so cells corresponding to this column
3229
- // by for every row in the grid
3230
- // but here we want to collapse them down to values/cells unique by the
3231
- // value of this column: eg - if this is country column and we have multiple rownodes
3232
- // in the grid with country: UK, and multiple with country: France, then the end result
3233
- // of the current function should be 2 cells: one for UK and one for France
3234
2825
  gridCellsToUse.forEach((dataItem) => {
3235
2826
  const value = getter(dataItem);
3236
2827
  if (!cache.has(value)) {
@@ -3250,7 +2841,6 @@ export class AdaptableAgGrid {
3250
2841
  cache.forEach(({ count, cell, rowNodesWithSameCellValue }) => {
3251
2842
  const cellWithCount = cell;
3252
2843
  cellWithCount.count = count;
3253
- // the visibility of this cell is true if any of the row nodes with this value is visible
3254
2844
  Object.defineProperty(cellWithCount, 'visible', {
3255
2845
  get: () => {
3256
2846
  return (rowNodesWithSameCellValue.findIndex((pk) => self.isRowNodeAvailableAfterFiltering(pk) === true) !== -1);
@@ -3313,14 +2903,11 @@ export class AdaptableAgGrid {
3313
2903
  return this.agGridAdapter.getGridOption('statusBar')?.statusPanels ?? [];
3314
2904
  }
3315
2905
  updateCell(cellUpdateRequest) {
3316
- // note: because we use RowNode.setDataValue() this will cause Validation to fire
3317
- // see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
3318
2906
  const rowNode = cellUpdateRequest.rowNode ?? this.getRowNodeForPrimaryKey(cellUpdateRequest.primaryKeyValue);
3319
2907
  if (!rowNode) {
3320
2908
  this.logger.warn(`updateCell() - rowNode not found for primaryKeyValue: ${cellUpdateRequest.primaryKeyValue}`);
3321
2909
  return;
3322
2910
  }
3323
- // update the row node and set it as an edit (for AG Grid Cell Change Detection)
3324
2911
  rowNode.setDataValue(cellUpdateRequest.columnId, cellUpdateRequest.newValue, 'edit');
3325
2912
  }
3326
2913
  forAllRowNodesDo(func, config) {
@@ -3334,8 +2921,6 @@ export class AdaptableAgGrid {
3334
2921
  }
3335
2922
  forAllVisibleRowNodesDo(func, config) {
3336
2923
  if (this.getAgGridRowModelType() !== 'clientSide') {
3337
- // only in client-side row model can we loop through filtered&sorted rows
3338
- // see https://www.ag-grid.com/javascript-data-grid/accessing-data/#iterating-rows
3339
2924
  this.logger.warn('forAllVisibleRowNodesDo() is only supported with client-side row model. Falling back to forAllRowNodesDo().');
3340
2925
  return this.forAllRowNodesDo(func, config);
3341
2926
  }
@@ -3348,8 +2933,6 @@ export class AdaptableAgGrid {
3348
2933
  });
3349
2934
  }
3350
2935
  getAgGridRowModelType(gridOptions) {
3351
- // it seems that this can be null so we need explicitly to return "clientSide" in this case
3352
- // need to check that for ServerSideRowModel it is ALWAYS returned...
3353
2936
  if (gridOptions) {
3354
2937
  return gridOptions.rowModelType ?? 'clientSide';
3355
2938
  }
@@ -3486,16 +3069,10 @@ export class AdaptableAgGrid {
3486
3069
  this.logger.consoleError('Cannot call showChart before Adaptable is fully initialized.');
3487
3070
  return null;
3488
3071
  }
3489
- /**
3490
- * Ag-grid always creates new charts behind the sences.
3491
- * So we need to update the model inside adaptable state.
3492
- * This is important to be done as soon as possible so it is not considered new.
3493
- */
3494
3072
  const chartRef = this.agGridAdapter
3495
3073
  .getAgGridApi()
3496
3074
  .restoreChart(chartDefinition.Model, container);
3497
3075
  const chartModel = this.getChartModels().find((chartModel) => chartModel.chartId === chartRef.chartId);
3498
- // Update the definition in state so it is not considered new
3499
3076
  this.api.chartingApi.editChartDefinition({
3500
3077
  ...chartDefinition,
3501
3078
  Model: chartModel,
@@ -3508,16 +3085,12 @@ export class AdaptableAgGrid {
3508
3085
  return;
3509
3086
  }
3510
3087
  const upgradableProperties = {
3511
- // Only Range charts are supported to be created at run time
3512
- // the other two are pivot & cross-filter
3513
3088
  type: 'rangeChartUpdate',
3514
3089
  chartId: chart.Model.chartId,
3515
3090
  unlinkChart: Boolean(chart.Model.unlinkChart),
3516
3091
  suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
3517
3092
  aggFunc: chart.Model.aggFunc,
3518
3093
  };
3519
- // Skip the AG Grid API call if the upgradable properties haven't changed
3520
- // to avoid unnecessary chartOptionsChanged events (see #ag_grid_update_chart_loop)
3521
3094
  const currentModel = this.getChartModels().find((model) => model.chartId === chart.Model.chartId);
3522
3095
  if (currentModel &&
3523
3096
  Boolean(currentModel.unlinkChart) === upgradableProperties.unlinkChart &&
@@ -3525,7 +3098,6 @@ export class AdaptableAgGrid {
3525
3098
  currentModel.aggFunc === upgradableProperties.aggFunc) {
3526
3099
  return;
3527
3100
  }
3528
- // see also #ag_grid_update_chart_loop
3529
3101
  this.agGridAdapter.getAgGridApi().updateChart(upgradableProperties);
3530
3102
  }
3531
3103
  getChartModels() {
@@ -3612,9 +3184,6 @@ export class AdaptableAgGrid {
3612
3184
  const themeClassNamesToRemove = [];
3613
3185
  const themesToRemove = [];
3614
3186
  const allThemes = this.api.themeApi.getThemes().map((t) => {
3615
- // we mutate the theme later,
3616
- // and since we don't want the mutation to end up in state
3617
- // we better clone it here
3618
3187
  return { ...t };
3619
3188
  });
3620
3189
  const allThemesMap = allThemes.reduce((acc, theme) => {
@@ -3622,8 +3191,6 @@ export class AdaptableAgGrid {
3622
3191
  return acc;
3623
3192
  }, {});
3624
3193
  const themeObject = allThemesMap[themeName];
3625
- // REMOVE PREVIOUS THEME
3626
- // const themePrefix = 'ab--theme-'
3627
3194
  const el = document.documentElement;
3628
3195
  el.classList.forEach((cssClassName) => {
3629
3196
  const index = cssClassName.indexOf(GeneralConstants.THEME_STYLE);
@@ -3636,17 +3203,14 @@ export class AdaptableAgGrid {
3636
3203
  }
3637
3204
  });
3638
3205
  themeClassNamesToRemove.forEach((cssClassName) => el.classList.remove(cssClassName));
3639
- // remove infinite table classnames
3640
3206
  themesToRemove.forEach((theme) => {
3641
3207
  el.classList.remove(`infinite-theme-mode--${theme.Name}`);
3642
3208
  });
3643
3209
  el.classList.remove(`infinite-theme-name--default`);
3644
- // VARIANT
3645
3210
  let variantTheme = '';
3646
3211
  if (!isSystemTheme && themeObject.Variant) {
3647
3212
  variantTheme = themeObject.Variant;
3648
3213
  }
3649
- // APPLY NEW THEME
3650
3214
  const newTheme = allThemesMap[themeName];
3651
3215
  const getClassName = (theme) => GeneralConstants.THEME_STYLE + theme;
3652
3216
  el.classList.add(getClassName(themeName));
@@ -3654,16 +3218,13 @@ export class AdaptableAgGrid {
3654
3218
  el.classList.add(getClassName(variantTheme));
3655
3219
  }
3656
3220
  if (isSystemTheme) {
3657
- // add infinite table classname for theme
3658
3221
  el.classList.add(`infinite-theme-mode--${themeName}`);
3659
3222
  }
3660
3223
  else if (variantTheme) {
3661
3224
  el.classList.add(`infinite-theme-mode--${variantTheme}`);
3662
3225
  }
3663
3226
  el.classList.add(`infinite-theme-name--default`);
3664
- // Update AG THEME
3665
3227
  this.agGridThemeAdapter.applyAgGridThemeOnAdaptableThemeChange(newTheme, variantTheme, container, themesToRemove);
3666
- // MAC LIKE SCROLLBARS
3667
3228
  if (this.adaptableOptions.userInterfaceOptions &&
3668
3229
  this.adaptableOptions.userInterfaceOptions.useCustomMacLikeScrollbars &&
3669
3230
  getScrollbarSize() > 0) {
@@ -3746,7 +3307,6 @@ export class AdaptableAgGrid {
3746
3307
  value = sum / distinctRawValues.length;
3747
3308
  }
3748
3309
  else {
3749
- // median - sort a shallow copy so we don't mutate the source
3750
3310
  const sorted = [...distinctRawValues].sort((a, b) => a - b);
3751
3311
  const mid = Math.floor(sorted.length / 2);
3752
3312
  value = sorted.length % 2 === 0 ? (sorted[mid - 1] + sorted[mid]) / 2 : sorted[mid];
@@ -3765,7 +3325,6 @@ export class AdaptableAgGrid {
3765
3325
  };
3766
3326
  }
3767
3327
  else {
3768
- // should not happen unless someone ignored the TypeScript warnings
3769
3328
  if (config.unmount == undefined) {
3770
3329
  config.unmount = true;
3771
3330
  }
@@ -3858,7 +3417,6 @@ export class AdaptableAgGrid {
3858
3417
  this.columnMinMaxValuesCache = null;
3859
3418
  this.lifecycleState = 'preDestroyed';
3860
3419
  AdaptableAgGrid.dismissInstance(this);
3861
- // !! this has to be before clearing up references to container and/or adaptableOptions
3862
3420
  if (config?.unmount) {
3863
3421
  const abContainerElement = this.getAdaptableContainerElement();
3864
3422
  if (abContainerElement != null) {
@@ -3896,8 +3454,6 @@ export class AdaptableAgGrid {
3896
3454
  this.TeamSharingService = null;
3897
3455
  this.RowFormService?.destroy?.();
3898
3456
  this.RowFormService = null;
3899
- this.MetamodelService?.destroy?.();
3900
- this.MetamodelService = null;
3901
3457
  this.LicenseService?.destroy?.();
3902
3458
  this.LicenseService = null;
3903
3459
  this.FlashingCellService?.destroy?.();
@@ -3964,7 +3520,6 @@ export class AdaptableAgGrid {
3964
3520
  const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
3965
3521
  const setLayoutMarker = getMarker(this.adaptableOptions.adaptableId).track.Runtime.label.SetLayout.start();
3966
3522
  const isPivot = isPivotLayout(layout);
3967
- // update the header name for all columns
3968
3523
  this.agGridAdapter
3969
3524
  .getAgGridApi()
3970
3525
  .getColumns()
@@ -3980,9 +3535,6 @@ export class AdaptableAgGrid {
3980
3535
  };
3981
3536
  this.agGridColumnAdapter.setupColumnHeader(colSetupInfo);
3982
3537
  });
3983
- // need to refresh the header,
3984
- // as the Layout.ColumnHeaders state property is not implemented in the LayoutManager
3985
- // and is specific to Adaptable, therefore we need to refresh it manually
3986
3538
  if (!prevLayout ||
3987
3539
  JSON.stringify(prevLayout.ColumnHeaders) !== JSON.stringify(layout.ColumnHeaders)) {
3988
3540
  this.refreshHeader();
@@ -4007,7 +3559,6 @@ export class AdaptableAgGrid {
4007
3559
  });
4008
3560
  }
4009
3561
  }
4010
- // this.showQuickFilter()
4011
3562
  this.forPlugins((plugin) => {
4012
3563
  if (plugin.afterSetLayout) {
4013
3564
  plugin.afterSetLayout(this, layout);
@@ -4097,10 +3648,6 @@ export class AdaptableAgGrid {
4097
3648
  oldValue: oldValue,
4098
3649
  newValue: newValue,
4099
3650
  column: abColumn,
4100
- /**
4101
- * A grouped row does not have an underling data item.
4102
- * Because of this we use the rowNode.id as an identifier.
4103
- */
4104
3651
  primaryKeyValue: rowNode.id,
4105
3652
  rowNode: rowNode,
4106
3653
  trigger: 'aggChange',
@@ -4126,29 +3673,21 @@ export class AdaptableAgGrid {
4126
3673
  this.performPostEditChecks(rowNode, [cellDataChangedInfo]);
4127
3674
  }
4128
3675
  isUndoChange(dataChange) {
4129
- // check if this is not a reverted change
4130
3676
  const undoChange = this.api.internalApi.getDataService().extractUndoChange(dataChange);
4131
3677
  return !!undoChange;
4132
3678
  }
4133
- /**
4134
- * There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
4135
- */
4136
3679
  performPostEditChecks(rowNode, cellDataChangedInfos) {
4137
3680
  cellDataChangedInfos = expandCellDataChangedInfosWithCalculatedColumns(this.api, cellDataChangedInfos);
4138
3681
  cellDataChangedInfos.forEach((cellDataChangedInfo) => {
4139
- // if a Cell Data Change is undone, log to the Console
4140
3682
  if (cellDataChangedInfo.trigger === 'undo') {
4141
3683
  this.logger.info(`Data change reverted: column="${cellDataChangedInfo.column}", primaryKey="${cellDataChangedInfo.primaryKeyValue}", from=${cellDataChangedInfo.newValue} to=${cellDataChangedInfo.oldValue}`);
4142
3684
  }
4143
- // For Changes except Aggregations, reset cell selection if required
4144
3685
  if (cellDataChangedInfo.trigger === 'edit' ||
4145
3686
  cellDataChangedInfo.trigger === 'undo' ||
4146
3687
  cellDataChangedInfo.trigger === 'tick') {
4147
3688
  this.checkIfChangedCellCurrentlySelected(cellDataChangedInfo);
4148
3689
  }
4149
- // Call the Data Service to create an Internal Event so other parts of App can respond
4150
3690
  this.DataService.CreateCellDataChangedEvent(cellDataChangedInfo);
4151
- // Reset Min and Max values for the Column
4152
3691
  this.resetMinMaxCachedValueForColumn(cellDataChangedInfo.column);
4153
3692
  });
4154
3693
  this.refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos);
@@ -4163,20 +3702,16 @@ export class AdaptableAgGrid {
4163
3702
  }
4164
3703
  }
4165
3704
  refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos) {
4166
- // Check if node is visible as otherwise AG Grid wont refresh
4167
3705
  if (this.agGridAdapter.isVisibleNode(rowNode)) {
4168
3706
  let dataChangedScope = {
4169
3707
  wholeRow: false,
4170
3708
  columnIds: new Set(),
4171
3709
  };
4172
- // First check Format Column Expressions
4173
3710
  this.checkFormatColumnExpressionStyleChanges(dataChangedScope, cellDataChangedInfos);
4174
- // If Scope is whole row then redraw row and return
4175
3711
  if (dataChangedScope.wholeRow) {
4176
3712
  this.redrawRow(rowNode);
4177
3713
  return;
4178
3714
  }
4179
- // Next check for Format Column Predicates, Styled Columns and FreeText Columns to update the ColumnIds refresh list as required
4180
3715
  this.checkFormatColumnPredicateStyleChanges(dataChangedScope, cellDataChangedInfos);
4181
3716
  this.checkFreeTextColumnChanges(dataChangedScope, cellDataChangedInfos);
4182
3717
  this.checkStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos);
@@ -4187,7 +3722,6 @@ export class AdaptableAgGrid {
4187
3722
  }
4188
3723
  refreshColumnsBasedOnCellDataChange(cellDataChangedInfos) {
4189
3724
  const columnIdsToUpdate = [];
4190
- // The only use case is Styled Columns with a Relative Cell Range
4191
3725
  cellDataChangedInfos.forEach((cellDataChangeInfo) => {
4192
3726
  const styledColumn = this.api.styledColumnApi.getActiveStyledColumnForColumn(cellDataChangeInfo.column);
4193
3727
  if (styledColumn &&
@@ -4296,15 +3830,8 @@ export class AdaptableAgGrid {
4296
3830
  }
4297
3831
  refreshLayout() {
4298
3832
  const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns();
4299
- // this setGridOption call will also trigger layout.onColumnDefsChanged()
4300
- // which will in turn call updateColumnModelAndRefreshGrid
4301
3833
  this.agGridAdapter.setGridOption('columnDefs', columnDefs);
4302
- // the setGridOption call above already triggered updateColumnModelAndRefreshGrid,
4303
- // setting the dedup guard. We force the next call so that the column model
4304
- // is re-derived after the layout store has been updated.
4305
3834
  this.__forceUpdateColumnModel = true;
4306
- // this is needed here for when we call setAdaptableStateKey
4307
- // and pass a new config
4308
3835
  this.updateLayoutInManagerAfterStoreHasChanged();
4309
3836
  this.applyFiltering();
4310
3837
  }
@@ -4342,11 +3869,8 @@ export class AdaptableAgGrid {
4342
3869
  refreshAdaptableAfterLayoutChange(layout) {
4343
3870
  this.logger.info('Refreshing Adaptable after layout change.');
4344
3871
  const prevLayoutForRefresh = this.__prevLayoutForRefresh || this.api.layoutApi.getCurrentLayout();
4345
- // see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
4346
3872
  const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevLayoutForRefresh, layout);
4347
3873
  if (rowGroupsChanged) {
4348
- // when grouping changes, if we have a filter on the grouped column, we need to remove it
4349
- // as it is no longer valid
4350
3874
  if (layout.ColumnFilters) {
4351
3875
  const newFilters = layout.ColumnFilters.filter((filter) => filter.ColumnId !== AG_GRID_GROUPED_COLUMN);
4352
3876
  if (newFilters.length != layout.ColumnFilters.length) {
@@ -4354,7 +3878,6 @@ export class AdaptableAgGrid {
4354
3878
  layout.ColumnFilters = newFilters;
4355
3879
  }
4356
3880
  }
4357
- // also we need to reset the cache for the group column, when we have rowGripDisplayType single
4358
3881
  if (layout.RowGroupDisplayType === 'single' &&
4359
3882
  (layout.RowGroupedColumns?.length || layout.PivotGroupedColumns?.length)) {
4360
3883
  this.api.filterApi.columnFilterApi.resetFilterValues(AG_GRID_GROUPED_COLUMN);
@@ -4372,8 +3895,6 @@ export class AdaptableAgGrid {
4372
3895
  return layout;
4373
3896
  }
4374
3897
  validateColumnDefTypes(columnDefs) {
4375
- // in Adaptable version 20 we switched from colDef.type to colDef.cellDataType
4376
- // although we documented this change and try to infer the correct cellDataTypes, it's best to also check if the client dev forgot to adjust his colDefs
4377
3898
  columnDefs.forEach((colDef) => {
4378
3899
  if (colDef.children?.length) {
4379
3900
  this.validateColumnDefTypes(colDef.children);