@adaptabletools/adaptable 20.3.0 → 21.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/agGrid.d.ts +2 -1
  2. package/agGrid.js +2 -1
  3. package/base.css +36 -15
  4. package/base.css.map +1 -1
  5. package/icons/add-circle.svg +1 -0
  6. package/icons/add.svg +1 -0
  7. package/icons/alert.svg +1 -0
  8. package/icons/align-center.svg +1 -0
  9. package/icons/align-justify.svg +1 -0
  10. package/icons/align-left.svg +1 -0
  11. package/icons/align-right.svg +1 -0
  12. package/icons/arrow-down-long.svg +1 -0
  13. package/icons/arrow-down.svg +1 -0
  14. package/icons/arrow-expand.svg +1 -0
  15. package/icons/arrow-left.svg +1 -0
  16. package/icons/arrow-right.svg +1 -0
  17. package/icons/arrow-up-long.svg +1 -0
  18. package/icons/arrow-up.svg +1 -0
  19. package/icons/assignment.svg +1 -0
  20. package/icons/badge.svg +1 -0
  21. package/icons/bold.svg +1 -0
  22. package/icons/boolean-list.svg +1 -0
  23. package/icons/brain.svg +1 -0
  24. package/icons/broadcast.svg +1 -0
  25. package/icons/brush.svg +1 -0
  26. package/icons/building.svg +1 -0
  27. package/icons/calculated-column.svg +1 -0
  28. package/icons/calendar.svg +1 -0
  29. package/icons/call.svg +1 -0
  30. package/icons/case-lower.svg +1 -0
  31. package/icons/case-sentence.svg +1 -0
  32. package/icons/case-upper.svg +1 -0
  33. package/icons/cells.svg +1 -0
  34. package/icons/chart.svg +1 -0
  35. package/icons/chat.svg +1 -0
  36. package/icons/check-circle.svg +1 -0
  37. package/icons/check.svg +1 -0
  38. package/icons/checked.svg +1 -0
  39. package/icons/clipboard.svg +1 -0
  40. package/icons/clone.svg +1 -0
  41. package/icons/close.svg +1 -0
  42. package/icons/cloud-upload.svg +1 -0
  43. package/icons/collapse-all.svg +1 -0
  44. package/icons/collapse.svg +1 -0
  45. package/icons/color-palette.svg +1 -0
  46. package/icons/column-add.svg +1 -0
  47. package/icons/column-outline.svg +1 -0
  48. package/icons/columns.svg +1 -0
  49. package/icons/comment.svg +1 -0
  50. package/icons/comments.svg +1 -0
  51. package/icons/contact.svg +1 -0
  52. package/icons/contains.svg +1 -0
  53. package/icons/copy.svg +1 -0
  54. package/icons/csv.svg +1 -0
  55. package/icons/dashboard.svg +1 -0
  56. package/icons/data-set.svg +1 -0
  57. package/icons/date-range.svg +1 -0
  58. package/icons/delete.svg +1 -0
  59. package/icons/division.svg +1 -0
  60. package/icons/dock.svg +1 -0
  61. package/icons/dollar.svg +1 -0
  62. package/icons/download.svg +1 -0
  63. package/icons/downloaded.svg +1 -0
  64. package/icons/drag.svg +1 -0
  65. package/icons/edit-table.svg +1 -0
  66. package/icons/edit.svg +1 -0
  67. package/icons/ends-with.svg +1 -0
  68. package/icons/equals.svg +1 -0
  69. package/icons/equation.svg +1 -0
  70. package/icons/error.svg +1 -0
  71. package/icons/excel.svg +1 -0
  72. package/icons/expand-all.svg +1 -0
  73. package/icons/expand.svg +1 -0
  74. package/icons/exponent.svg +1 -0
  75. package/icons/export-data.svg +1 -0
  76. package/icons/export.svg +1 -0
  77. package/icons/fast-backward.svg +1 -0
  78. package/icons/fast-forward.svg +1 -0
  79. package/icons/fdc3.svg +1 -0
  80. package/icons/filled-circle.svg +1 -0
  81. package/icons/filter-list.svg +1 -0
  82. package/icons/filter-off.svg +1 -0
  83. package/icons/filter.svg +1 -0
  84. package/icons/flag.svg +1 -0
  85. package/icons/folder-open.svg +1 -0
  86. package/icons/folder-shared.svg +1 -0
  87. package/icons/folder.svg +1 -0
  88. package/icons/function.svg +1 -0
  89. package/icons/gradient.svg +1 -0
  90. package/icons/greater-than-or-equal.svg +1 -0
  91. package/icons/greater-than.svg +1 -0
  92. package/icons/grid-filter.svg +1 -0
  93. package/icons/grid-info.svg +1 -0
  94. package/icons/grid.svg +1 -0
  95. package/icons/history.svg +1 -0
  96. package/icons/home.svg +1 -0
  97. package/icons/horizontal-lines.svg +1 -0
  98. package/icons/import-export.svg +1 -0
  99. package/icons/import.svg +1 -0
  100. package/icons/info.svg +1 -0
  101. package/icons/interactions.svg +1 -0
  102. package/icons/italic.svg +1 -0
  103. package/icons/json.svg +1 -0
  104. package/icons/laptop.svg +1 -0
  105. package/icons/less-than-or-equal.svg +1 -0
  106. package/icons/less-than.svg +1 -0
  107. package/icons/lightning.svg +1 -0
  108. package/icons/link.svg +1 -0
  109. package/icons/list.svg +1 -0
  110. package/icons/logout.svg +1 -0
  111. package/icons/mail.svg +1 -0
  112. package/icons/menu.svg +1 -0
  113. package/icons/minus.svg +1 -0
  114. package/icons/money.svg +1 -0
  115. package/icons/multiplication.svg +1 -0
  116. package/icons/newpage.svg +1 -0
  117. package/icons/news.svg +1 -0
  118. package/icons/not-contains.svg +1 -0
  119. package/icons/not-equal.svg +1 -0
  120. package/icons/note.svg +1 -0
  121. package/icons/open-in-new.svg +1 -0
  122. package/icons/order.svg +1 -0
  123. package/icons/organisation.svg +1 -0
  124. package/icons/overline.svg +1 -0
  125. package/icons/paperclip.svg +1 -0
  126. package/icons/pause.svg +1 -0
  127. package/icons/percent-tag.svg +1 -0
  128. package/icons/percent.svg +1 -0
  129. package/icons/person.svg +1 -0
  130. package/icons/pie-chart.svg +1 -0
  131. package/icons/play.svg +1 -0
  132. package/icons/plus.svg +1 -0
  133. package/icons/quote.svg +1 -0
  134. package/icons/refresh.svg +1 -0
  135. package/icons/regex.svg +1 -0
  136. package/icons/reminder.svg +1 -0
  137. package/icons/resume.svg +1 -0
  138. package/icons/rows.svg +1 -0
  139. package/icons/save.svg +1 -0
  140. package/icons/schedule.svg +1 -0
  141. package/icons/science.svg +1 -0
  142. package/icons/search-table.svg +1 -0
  143. package/icons/search.svg +1 -0
  144. package/icons/select-all.svg +1 -0
  145. package/icons/select-fwd.svg +1 -0
  146. package/icons/select-off.svg +1 -0
  147. package/icons/settings.svg +1 -0
  148. package/icons/sort-asc.svg +1 -0
  149. package/icons/sort-desc.svg +1 -0
  150. package/icons/spanner.svg +1 -0
  151. package/icons/spark-line.svg +1 -0
  152. package/icons/starts-with.svg +1 -0
  153. package/icons/statusbar.svg +1 -0
  154. package/icons/stop.svg +1 -0
  155. package/icons/strikethrough.svg +1 -0
  156. package/icons/styled-grid.svg +1 -0
  157. package/icons/sync.svg +1 -0
  158. package/icons/tab-unselected.svg +1 -0
  159. package/icons/target.svg +1 -0
  160. package/icons/theme.svg +1 -0
  161. package/icons/traffic-lights.svg +1 -0
  162. package/icons/triangle-down.svg +1 -0
  163. package/icons/triangle-up.svg +1 -0
  164. package/icons/unchecked.svg +1 -0
  165. package/icons/underline.svg +1 -0
  166. package/icons/undo.svg +1 -0
  167. package/icons/unfilled-circle.svg +1 -0
  168. package/icons/upload.svg +1 -0
  169. package/icons/visibility-off-bold.svg +1 -0
  170. package/icons/visibility-off.svg +1 -0
  171. package/icons/visibility-on-bold.svg +1 -0
  172. package/icons/visibility-on.svg +1 -0
  173. package/icons/warning.svg +1 -0
  174. package/index.css +32 -15
  175. package/index.css.map +1 -1
  176. package/package.json +2 -2
  177. package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -5
  178. package/src/AdaptableOptions/ColumnOptions.d.ts +38 -38
  179. package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -2
  180. package/src/AdaptableOptions/EditOptions.d.ts +4 -7
  181. package/src/AdaptableOptions/FilterOptions.d.ts +50 -15
  182. package/src/AdaptableOptions/LayoutOptions.d.ts +8 -21
  183. package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
  184. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  185. package/src/AdaptableState/Common/AdaptableColumn.d.ts +7 -0
  186. package/src/AdaptableState/Common/AdaptablePredicate.js +2 -2
  187. package/src/AdaptableState/Common/CustomWindowConfig.d.ts +2 -2
  188. package/src/AdaptableState/Common/ExtendedLayout.d.ts +50 -0
  189. package/src/AdaptableState/FormatColumnState.d.ts +8 -1
  190. package/src/AdaptableState/InternalState.d.ts +1 -1
  191. package/src/AdaptableState/LayoutState.d.ts +26 -6
  192. package/src/AdaptableState/Selection/GridCell.d.ts +32 -0
  193. package/src/AdaptableState/StyledColumnState.d.ts +2 -2
  194. package/src/Api/AlertApi.d.ts +5 -11
  195. package/src/Api/ColumnApi.d.ts +17 -1
  196. package/src/Api/ColumnFilterApi.d.ts +32 -2
  197. package/src/Api/CustomSortApi.d.ts +5 -10
  198. package/src/Api/FlashingCellApi.d.ts +10 -6
  199. package/src/Api/FormatColumnApi.d.ts +8 -18
  200. package/src/Api/Implementation/AlertApiImpl.d.ts +6 -9
  201. package/src/Api/Implementation/AlertApiImpl.js +7 -6
  202. package/src/Api/Implementation/ApiBase.d.ts +2 -12
  203. package/src/Api/Implementation/ApiBase.js +5 -5
  204. package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -2
  205. package/src/Api/Implementation/ColumnApiImpl.js +59 -23
  206. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +7 -1
  207. package/src/Api/Implementation/ColumnFilterApiImpl.js +76 -3
  208. package/src/Api/Implementation/ColumnScopeApiImpl.js +10 -2
  209. package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -10
  210. package/src/Api/Implementation/CustomSortApiImpl.js +6 -4
  211. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +7 -6
  212. package/src/Api/Implementation/FlashingCellApiImpl.js +11 -8
  213. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +8 -18
  214. package/src/Api/Implementation/FormatColumnApiImpl.js +10 -9
  215. package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -2
  216. package/src/Api/Implementation/LayoutApiImpl.js +101 -7
  217. package/src/Api/Implementation/LayoutHelpers.d.ts +1 -0
  218. package/src/Api/Implementation/LayoutHelpers.js +23 -4
  219. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +7 -5
  220. package/src/Api/Implementation/PlusMinusApiImpl.js +10 -7
  221. package/src/Api/Implementation/ScheduleApiImpl.d.ts +9 -16
  222. package/src/Api/Implementation/ScheduleApiImpl.js +15 -17
  223. package/src/Api/Implementation/ShortcutApiImpl.d.ts +5 -6
  224. package/src/Api/Implementation/ShortcutApiImpl.js +7 -8
  225. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +7 -8
  226. package/src/Api/Implementation/StyledColumnApiImpl.js +12 -9
  227. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -4
  228. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
  229. package/src/Api/Implementation/UserInterfaceApiImpl.js +10 -9
  230. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  231. package/src/Api/Internal/AdaptableInternalApi.js +3 -0
  232. package/src/Api/Internal/AlertInternalApi.d.ts +6 -6
  233. package/src/Api/Internal/AlertInternalApi.js +10 -10
  234. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +13 -0
  235. package/src/Api/Internal/ColumnFilterInternalApi.js +93 -1
  236. package/src/Api/Internal/ColumnInternalApi.d.ts +2 -1
  237. package/src/Api/Internal/ColumnInternalApi.js +4 -0
  238. package/src/Api/Internal/DashboardInternalApi.js +1 -1
  239. package/src/Api/Internal/EntitlementInternalApi.d.ts +1 -0
  240. package/src/Api/Internal/EntitlementInternalApi.js +8 -0
  241. package/src/Api/Internal/ExportInternalApi.js +1 -1
  242. package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
  243. package/src/Api/Internal/FormatColumnInternalApi.d.ts +8 -11
  244. package/src/Api/Internal/FormatColumnInternalApi.js +13 -13
  245. package/src/Api/Internal/GridInternalApi.d.ts +7 -10
  246. package/src/Api/Internal/GridInternalApi.js +76 -27
  247. package/src/Api/Internal/LayoutInternalApi.d.ts +5 -5
  248. package/src/Api/Internal/LayoutInternalApi.js +42 -5
  249. package/src/Api/Internal/PredicateInternalApi.d.ts +2 -6
  250. package/src/Api/Internal/PredicateInternalApi.js +4 -6
  251. package/src/Api/Internal/UserInterfaceInternalApi.d.ts +1 -0
  252. package/src/Api/Internal/UserInterfaceInternalApi.js +10 -3
  253. package/src/Api/LayoutApi.d.ts +7 -2
  254. package/src/Api/PlusMinusApi.d.ts +11 -7
  255. package/src/Api/ScheduleApi.d.ts +9 -16
  256. package/src/Api/ShortcutApi.d.ts +5 -6
  257. package/src/Api/StyledColumnApi.d.ts +10 -7
  258. package/src/Api/UserInterfaceApi.d.ts +5 -6
  259. package/src/Redux/ActionsReducers/InternalRedux.d.ts +4 -4
  260. package/src/Redux/ActionsReducers/InternalRedux.js +7 -7
  261. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
  262. package/src/Redux/ActionsReducers/StyledColumnRedux.js +13 -0
  263. package/src/Redux/Store/AdaptableStore.js +10 -10
  264. package/src/Strategy/AdaptableModuleBase.d.ts +14 -4
  265. package/src/Strategy/AdaptableModuleBase.js +46 -9
  266. package/src/Strategy/AlertModule.d.ts +3 -4
  267. package/src/Strategy/AlertModule.js +7 -4
  268. package/src/Strategy/CalculatedColumnModule.js +2 -2
  269. package/src/Strategy/CellSummaryModule.js +2 -2
  270. package/src/Strategy/ChartingModule.d.ts +3 -1
  271. package/src/Strategy/ChartingModule.js +9 -3
  272. package/src/Strategy/ColumnFilterModule.d.ts +1 -1
  273. package/src/Strategy/ColumnFilterModule.js +31 -15
  274. package/src/Strategy/ColumnInfoModule.js +2 -2
  275. package/src/Strategy/CommentModule.d.ts +1 -1
  276. package/src/Strategy/CommentModule.js +3 -3
  277. package/src/Strategy/CustomSortModule.d.ts +3 -4
  278. package/src/Strategy/CustomSortModule.js +2 -2
  279. package/src/Strategy/DashboardModule.js +1 -1
  280. package/src/Strategy/DataChangeHistoryModule.d.ts +2 -1
  281. package/src/Strategy/DataChangeHistoryModule.js +3 -10
  282. package/src/Strategy/DataImportModule.js +3 -3
  283. package/src/Strategy/ExportModule.js +1 -1
  284. package/src/Strategy/Fdc3Module.js +1 -1
  285. package/src/Strategy/FlashingCellModule.d.ts +3 -5
  286. package/src/Strategy/FlashingCellModule.js +3 -3
  287. package/src/Strategy/FormatColumnModule.d.ts +3 -4
  288. package/src/Strategy/FormatColumnModule.js +2 -2
  289. package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
  290. package/src/Strategy/FreeTextColumnModule.js +2 -2
  291. package/src/Strategy/GridInfoModule.js +2 -2
  292. package/src/Strategy/Interface/IModule.d.ts +7 -3
  293. package/src/Strategy/LayoutModule.js +11 -11
  294. package/src/Strategy/NoteModule.d.ts +1 -1
  295. package/src/Strategy/NoteModule.js +3 -3
  296. package/src/Strategy/PlusMinusModule.d.ts +3 -4
  297. package/src/Strategy/PlusMinusModule.js +2 -2
  298. package/src/Strategy/QuickSearchModule.d.ts +2 -0
  299. package/src/Strategy/QuickSearchModule.js +9 -0
  300. package/src/Strategy/ScheduleModule.d.ts +3 -4
  301. package/src/Strategy/ScheduleModule.js +2 -2
  302. package/src/Strategy/SettingsPanelModule.js +1 -1
  303. package/src/Strategy/ShortcutModule.d.ts +3 -4
  304. package/src/Strategy/ShortcutModule.js +2 -2
  305. package/src/Strategy/StatusBarModule.d.ts +3 -2
  306. package/src/Strategy/StatusBarModule.js +6 -3
  307. package/src/Strategy/StyledColumnModule.d.ts +3 -4
  308. package/src/Strategy/StyledColumnModule.js +2 -2
  309. package/src/Strategy/SystemStatusModule.js +2 -2
  310. package/src/Strategy/TeamSharingModule.d.ts +1 -1
  311. package/src/Strategy/TeamSharingModule.js +5 -2
  312. package/src/Strategy/ToolPanelModule.d.ts +1 -1
  313. package/src/Strategy/ToolPanelModule.js +1 -4
  314. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
  315. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  316. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
  317. package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
  318. package/src/Utilities/Extensions/ArrayExtensions.js +62 -13
  319. package/src/Utilities/ObjectFactory.js +3 -3
  320. package/src/Utilities/Services/AnnotationsService.js +1 -1
  321. package/src/Utilities/Services/Interface/IModuleService.d.ts +2 -1
  322. package/src/Utilities/Services/ModuleService.d.ts +3 -3
  323. package/src/Utilities/Services/ModuleService.js +19 -7
  324. package/src/View/AdaptableView.js +3 -1
  325. package/src/View/ColumnInfo/ColumnInfo.js +9 -3
  326. package/src/View/Components/AdaptableIconSelector/index.js +2 -3
  327. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +0 -1
  328. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +2 -3
  329. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.d.ts +0 -2
  330. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +4 -7
  331. package/src/View/Components/ColumnFilter/ColumnFilter.js +11 -4
  332. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  333. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -2
  334. package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
  335. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
  336. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +2 -2
  337. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
  338. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +2 -2
  339. package/src/View/Components/ColumnFilter/utils.d.ts +2 -2
  340. package/src/View/Components/ColumnFilter/utils.js +6 -1
  341. package/src/View/Components/EntityRulesEditor/index.js +1 -2
  342. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
  343. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +6 -6
  344. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -2
  345. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +1 -1
  346. package/src/View/Components/Selectors/ColumnSelector.js +1 -1
  347. package/src/View/Components/Selectors/FieldSelector.js +1 -1
  348. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +1 -0
  349. package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
  350. package/src/View/Dashboard/Dashboard.js +2 -2
  351. package/src/View/Dashboard/DashboardPopup.js +3 -1
  352. package/src/View/Dashboard/PinnedDashboard.js +1 -1
  353. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +9 -21
  354. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +58 -21
  355. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +11 -11
  356. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +1 -1
  357. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -1
  358. package/src/View/Layout/TransposedPopup.js +2 -2
  359. package/src/View/Layout/Wizard/sections/ColumnsSection.js +64 -9
  360. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +5 -5
  361. package/src/View/StatusBar/AdaptableStatusBar.js +1 -4
  362. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  363. package/src/View/Theme/ThemeSelector.js +1 -1
  364. package/src/agGrid/AdaptableAgGrid.d.ts +11 -7
  365. package/src/agGrid/AdaptableAgGrid.js +251 -216
  366. package/src/agGrid/AdaptableFilterHandler.d.ts +18 -0
  367. package/src/agGrid/AdaptableFilterHandler.js +61 -0
  368. package/src/agGrid/AgGridAdapter.d.ts +3 -7
  369. package/src/agGrid/AgGridAdapter.js +13 -46
  370. package/src/agGrid/AgGridColumnAdapter.d.ts +2 -2
  371. package/src/agGrid/AgGridColumnAdapter.js +81 -36
  372. package/src/agGrid/AgGridFilterAdapter.d.ts +2 -0
  373. package/src/agGrid/AgGridFilterAdapter.js +48 -0
  374. package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
  375. package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +24 -35
  376. package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
  377. package/src/agGrid/AgGridModulesAdapter.js +66 -0
  378. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
  379. package/src/agGrid/editors/AdaptablePercentageEditor/InternalAdaptablePercentageEditor.js +1 -1
  380. package/src/components/Dialog/index.js +1 -1
  381. package/src/components/Dropdown/Arrows.js +2 -2
  382. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +1 -1
  383. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +2 -2
  384. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -2
  385. package/src/components/FileDroppable/index.js +1 -1
  386. package/src/components/IconSelector/IconSelector.d.ts +2 -2
  387. package/src/components/OverlayTrigger/index.js +1 -1
  388. package/src/components/Select/Select.d.ts +1 -1
  389. package/src/components/Select/Select.js +116 -24
  390. package/src/components/icons/DefaultIcon.d.ts +0 -1
  391. package/src/components/icons/DefaultIcon.js +0 -6
  392. package/src/env.js +2 -2
  393. package/src/layout-manager/src/LayoutManagerModel.d.ts +6 -10
  394. package/src/layout-manager/src/index.d.ts +11 -3
  395. package/src/layout-manager/src/index.js +302 -87
  396. package/src/layout-manager/src/normalizeLayoutModel.js +7 -4
  397. package/src/layout-manager/src/simplifyLayoutModel.js +4 -4
  398. package/src/metamodel/adaptable.metamodel.d.ts +70 -19
  399. package/src/metamodel/adaptable.metamodel.js +1 -1
  400. package/src/migration/AdaptableUpgradeHelper.js +2 -0
  401. package/src/migration/VersionUpgrade17.js +1 -1
  402. package/src/migration/VersionUpgrade20.js +1 -0
  403. package/src/migration/VersionUpgrade21.d.ts +6 -0
  404. package/src/migration/VersionUpgrade21.js +24 -0
  405. package/src/types.d.ts +7 -8
  406. package/tsconfig.esm.tsbuildinfo +1 -1
  407. package/src/AdaptableState/Common/ExtendedLayoutInfo.d.ts +0 -27
  408. package/src/agGrid/FilterWrapper.d.ts +0 -2
  409. package/src/agGrid/FilterWrapper.js +0 -131
  410. package/src/agGrid/FloatingFilterWrapper.d.ts +0 -2
  411. package/src/agGrid/agGridModules.d.ts +0 -3
  412. package/src/agGrid/agGridModules.js +0 -15
  413. package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
  414. package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -16
  415. /package/src/AdaptableState/Common/{ExtendedLayoutInfo.js → ExtendedLayout.js} +0 -0
@@ -98,6 +98,7 @@ import { agGridDataTypeDefinitions } from './agGridDataTypeDefinitions';
98
98
  import { AgGridThemeAdapter } from './AgGridThemeAdapter';
99
99
  import { mapOldTypeToDataType } from '../migration/VersionUpgrade20';
100
100
  import { tagProvidedByAdaptable } from '../Utilities/adaptableOverrideCheck';
101
+ import { AgGridModulesAdapter } from './AgGridModulesAdapter';
101
102
  const LocalEventService_Prototype = LocalEventService.prototype;
102
103
  const LocalEventService_dispatchEvent = LocalEventService_Prototype.dispatchEvent;
103
104
  LocalEventService_Prototype.dispatchEvent = function (event) {
@@ -108,7 +109,12 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
108
109
  }
109
110
  LocalEventService_dispatchEvent.apply(this, arguments);
110
111
  if (event.type === 'cellChanged' || event.type === 'dataChanged') {
112
+ // @ts-ignore
111
113
  const eventRowNode = event.node;
114
+ if (!eventRowNode) {
115
+ AdaptableLogger.consoleErrorBase(`No RowNode found in passed event, this should never happen!`, event);
116
+ return;
117
+ }
112
118
  const extractGridApiFromRowNode = (rowNode) => {
113
119
  const rowNodeApi = rowNode?.beans?.gridApi;
114
120
  if (!rowNodeApi) {
@@ -181,6 +187,7 @@ export class AdaptableAgGrid {
181
187
  this.agGridColumnAdapter = new AgGridColumnAdapter(this);
182
188
  this.agGridExportAdapter = new AgGridExportAdapter(this);
183
189
  this.agGridThemeAdapter = new AgGridThemeAdapter(this);
190
+ this.agGridModulesAdapter = new AgGridModulesAdapter(this);
184
191
  this.DataService = new DataService(this);
185
192
  }
186
193
  static forEachAdaptable(fn) {
@@ -348,26 +355,29 @@ export class AdaptableAgGrid {
348
355
  this.lifecycleState = 'setupAgGrid';
349
356
  const gridOptions = config.gridOptions;
350
357
  // Needed here because special column defs are required for deriving the adaptable column state
351
- const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
358
+ let columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
352
359
  gridOptions.columnDefs = columnDefs;
353
360
  this.setInitialGridOptions(gridOptions, config.variant);
354
- const { gridState: initialGridState, layoutModel } = this.mapAdaptableStateToAgGridState(this.adaptableStore.TheStore.getState(), gridOptions.columnDefs, { isTree: !!gridOptions.treeData });
361
+ const { gridState: initialGridState, layoutModel } = this.mapAdaptableStateToAgGridState(this.adaptableStore.TheStore.getState(), gridOptions.columnDefs, {
362
+ isTree: !!gridOptions.treeData,
363
+ colTypes: gridOptions.columnTypes,
364
+ defaultColDef: gridOptions.defaultColDef,
365
+ });
366
+ columnDefs = LayoutManager.getColumnDefsChangesForLayout(layoutModel, columnDefs) ?? columnDefs;
367
+ gridOptions.columnDefs = columnDefs;
355
368
  gridOptions.initialState = initialGridState;
356
369
  if (layoutModel) {
357
370
  if (isPivotLayoutModel(layoutModel)) {
358
371
  gridOptions.pivotDefaultExpanded = layoutModel.PivotExpandLevel;
359
372
  }
360
- else {
361
- gridOptions.groupDisplayType =
362
- layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
363
- }
373
+ gridOptions.groupDisplayType =
374
+ layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
375
+ // fixes issue #3053
376
+ gridOptions.suppressAggFuncInHeader = !!layoutModel.SuppressAggFuncInHeader;
364
377
  }
365
378
  this.lifecycleState = 'initAgGrid';
366
379
  this.agGridAdapter.initialGridOptions = gridOptions;
367
380
  const perfInitAgGrid = this.logger.beginPerf(`initAgGrid()`);
368
- // AG Grid evaluates early on the floatingFilter params, so we need to "suppress" the floating filter temporarily
369
- // we will reset it once Adaptable is ready
370
- this.agGridColumnAdapter.setupColumnFloatingFilterTemporarily(gridOptions);
371
381
  this.validateColumnDefTypes(gridOptions.columnDefs);
372
382
  const agGridApi = await this.initializeAgGrid(gridOptions, config.modules, config.renderAgGridFrameworkComponent);
373
383
  if (agGridApi === false) {
@@ -406,7 +416,9 @@ export class AdaptableAgGrid {
406
416
  this.agGridAdapter.monkeyPatchingGridOptionsUpdates();
407
417
  this.agGridAdapter.monkeyPatchingAggColumnFilters();
408
418
  this.lifecycleState = 'agGridReady';
409
- this.logger.info(`Registered AG Grid modules: `, this.agGridAdapter.getAgGridRegisteredModuleNames().sort());
419
+ this.api.entitlementApi.internalApi.setModulesAgGridDepsInfos();
420
+ this.ModuleService.logMissingAgGridDepsInfos();
421
+ this.logger.info(`Registered AG Grid modules (incl. dependent modules): `, this.agGridModulesAdapter.getAgGridRegisteredModuleNames().sort());
410
422
  /**
411
423
  * At this point AG Grid is initialized!
412
424
  */
@@ -418,6 +430,9 @@ export class AdaptableAgGrid {
418
430
  this.validatePrimaryKey();
419
431
  // TODO AFL MIG: we could just patch the defautl Layout on init? instead
420
432
  this.checkShouldClearExistingFiltersOrSearches();
433
+ // FIXME AFL FILTER: talk with Radu: should ColumnFilters still be ignored?!
434
+ // see layoutModel.Ignore_ColumnFilters
435
+ // initial filter model
421
436
  this.applyFiltering();
422
437
  // apply quick search if there is one
423
438
  // yes, we could have put this on the gridOptions.findSearchValue
@@ -436,19 +451,6 @@ export class AdaptableAgGrid {
436
451
  checkForDuplicateColumns(currentLayout);
437
452
  this._prevLayout = currentLayout;
438
453
  this.__prevLayoutForRefresh = currentLayout;
439
- if (isPivotLayout(currentLayout)) {
440
- // this is very very strange!
441
- // for some projects, if the initial layout is pivot, the columnDefs of the pivot resutl columns are NOT derived correctly from the main colDefs
442
- // doing the following line fixes the issue because it foces the pivot columns to be created again
443
- // this proj works without the hack: /tests/pages/format-column/initial-pivot-layout.page.tsx
444
- // but this proj needs the hack: /tests/pages/format-column/initial-pivot-layout-docs.page.tsx
445
- this.agGridAdapter.setGridOption('pivotMode', false);
446
- this.agGridAdapter.setGridOption('pivotMode', true);
447
- // also quick search is not working initially, although the setupColumns is called correctly
448
- // so we need to do this to make it work
449
- // see test /tests/pages/quick-search/pivot-search.spec.ts
450
- this.updateColumnModelAndRefreshGrid();
451
- }
452
454
  const layoutModelForApply = layoutStateToLayoutModel(currentLayout);
453
455
  this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues, layoutModelForApply.RowGroupedColumns);
454
456
  this.layoutManager.applyColumnGroupCollapseExpandState(layoutModelForApply);
@@ -572,21 +574,27 @@ You need to define at least one Layout!`);
572
574
  normalize: true,
573
575
  });
574
576
  }
575
- applyFiltering() {
577
+ applyFiltering(config) {
578
+ // default updateColumnFilterModel to TRUE, if not provided
579
+ const updateColumnFilterModel = config?.updateColumnFilterModel ?? true;
576
580
  const agGridApi = this.agGridAdapter.getAgGridApi();
577
- this._emit('AdapTableFiltersApplied');
581
+ if (updateColumnFilterModel) {
582
+ const columnFilters = this.api.filterApi.columnFilterApi
583
+ .getActiveColumnFilters()
584
+ // FIXME AFL: we need this additional filter because 'getActiveColumnFilters' checks only for suspended while 'isColumnFilterActive' also checkss for COMPLETE filters
585
+ .filter((columnFilter) => this.api.filterApi.columnFilterApi.isColumnFilterActive(columnFilter));
586
+ const filterModel = {};
587
+ columnFilters.forEach((columnFilter) => {
588
+ filterModel[columnFilter.ColumnId] = columnFilter;
589
+ });
590
+ agGridApi.setFilterModel(filterModel);
591
+ }
592
+ // FIXME AFL FILTER why is this needed???
578
593
  this.refreshSelectedCellsState();
579
594
  this.refreshSelectedRowsState();
580
- this.agGridAdapter.updateColumnFilterActiveState();
581
595
  agGridApi.onFilterChanged();
596
+ this._emit('AdapTableFiltersApplied');
582
597
  }
583
- // refreshAgGridWithAdaptableState() {
584
- // this.refreshColDefs();
585
- // this.api.themeApi.applyCurrentTheme();
586
- // this.api.internalApi.setTreeMode(this.agGridAdapter.initialGridOptions.treeData);
587
- // this.checkShouldClearExistingFiltersOrSearches();
588
- // this.applyColumnFiltering();
589
- // }
590
598
  showQuickFilter() {
591
599
  const height = this.api.optionsApi.getFilterOptions().columnFilterOptions.quickFilterHeight;
592
600
  this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', height);
@@ -770,22 +778,36 @@ You need to define at least one Layout!`);
770
778
  ? true
771
779
  : original_allowContextMenuWithControlKey;
772
780
  });
781
+ /**
782
+ * `enableFilterHandlers`
783
+ */
784
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'enableFilterHandlers', (original_enableFilterHandlers) => {
785
+ const useAdaptableFiltering = this.api.optionsApi.getFilterOptions().useAdaptableFiltering;
786
+ if (useAdaptableFiltering) {
787
+ return true;
788
+ }
789
+ return original_enableFilterHandlers;
790
+ });
791
+ /**
792
+ * `suppressSetFilterByDefault`
793
+ */
794
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'suppressSetFilterByDefault', (original_suppressSetFilterByDefault) => {
795
+ const useAdaptableFiltering = this.api.optionsApi.getFilterOptions().useAdaptableFiltering;
796
+ if (useAdaptableFiltering) {
797
+ return true;
798
+ }
799
+ return original_suppressSetFilterByDefault;
800
+ });
773
801
  /**
774
802
  * `isExternalFilterPresent`
775
803
  */
776
804
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'isExternalFilterPresent', (original_isExternalFilterPresent) => {
777
805
  return (params) => {
778
806
  if (!this.isAvailable) {
779
- return true;
807
+ return false;
780
808
  }
781
809
  const isGridFilterActive = StringExtensions.IsNotNullOrEmpty(this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression());
782
- const isTableColumnFiltersActive = ArrayExtensions.IsNotNullOrEmpty(this.api.filterApi.columnFilterApi
783
- .getActiveColumnFilters()
784
- .filter((columnFilter) => !this.api.columnApi.isPivotResultColumn(columnFilter.ColumnId)));
785
810
  return (isGridFilterActive ||
786
- // only Table ColumnFilters are handled here
787
- // see #doAggregateFiltersPassMonkeyPatcher for filtering Pivot Columns
788
- isTableColumnFiltersActive ||
789
811
  // it means that userPropertyValue will be called so we re-init that collection
790
812
  (original_isExternalFilterPresent ? original_isExternalFilterPresent(params) : false));
791
813
  };
@@ -813,20 +835,11 @@ You need to define at least one Layout!`);
813
835
  return true;
814
836
  }
815
837
  }
816
- // first assess if the Row i s filterable - if not, then return true so it appears in Grid
817
- const isRowFilterable = this.api.optionsApi.getFilterOptions().isRowFilterable;
818
- if (typeof isRowFilterable === 'function') {
819
- const rowFilterableContext = {
820
- ...this.api.internalApi.buildBaseContext(),
821
- rowNode: node,
822
- data: node.data,
823
- };
824
- if (!isRowFilterable(rowFilterableContext)) {
825
- return true;
826
- }
838
+ // first assess if the Row is filterable - if not, then return true so it always appears in Grid
839
+ const isRowFilterable = this.api.gridApi.internalApi.isRowFilterable(node);
840
+ if (!isRowFilterable) {
841
+ return true;
827
842
  }
828
- // get the Primary Key Value for the Row Node being evaluated
829
- const primaryKey = this.getPrimaryKeyValueFromRowNode(node);
830
843
  // next we assess a Grid Filter (if its running locally)
831
844
  const currentGridFilterExpression = this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
832
845
  if (StringExtensions.IsNotNullOrEmpty(currentGridFilterExpression)) {
@@ -846,29 +859,6 @@ You need to define at least one Layout!`);
846
859
  }
847
860
  }
848
861
  }
849
- // finally we evaluate column filters
850
- const tableColumnFilters = this.api.filterApi.columnFilterApi
851
- .getActiveColumnFilters()
852
- .filter((columnFilter) => !this.api.columnApi.isPivotResultColumn(columnFilter.ColumnId));
853
- try {
854
- // only Table ColumnFilters are handled here
855
- // see #doAggregateFiltersPassMonkeyPatcher for filtering Pivot Columns
856
- if (tableColumnFilters.length > 0) {
857
- for (const columnFilter of tableColumnFilters) {
858
- const evaluateColumnFilterOnClient = this.api.expressionApi.internalApi.shouldEvaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, columnFilter.Predicates);
859
- if (evaluateColumnFilterOnClient) {
860
- const columnFilterEvaluationResult = this.api.filterApi.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, node);
861
- if (!columnFilterEvaluationResult) {
862
- return false;
863
- }
864
- }
865
- }
866
- }
867
- }
868
- catch (ex) {
869
- this.logger.error(ex);
870
- return false;
871
- }
872
862
  const result = original_doesExternalFilterPass
873
863
  ? original_doesExternalFilterPass(node)
874
864
  : true;
@@ -916,107 +906,111 @@ You need to define at least one Layout!`);
916
906
  /**
917
907
  * `sidebar`
918
908
  */
919
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
920
- if (!original_sideBar) {
921
- // lucky us, no sideBar is defined, so we don't have to do anything
922
- return original_sideBar;
923
- }
924
- const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
925
- const adaptableToolPanelDef = {
926
- id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
927
- toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
928
- labelDefault: GeneralConstants.ADAPTABLE,
929
- labelKey: 'adaptable',
930
- iconKey: 'menu',
931
- width: UIHelper.getAdaptableToolPanelWidth(),
932
- minWidth: UIHelper.getAdaptableToolPanelWidth(),
933
- // maxWidth = undefined,
934
- };
935
- const mapToolPanelDefs = (toolPanelDefs = []) => {
936
- // if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
937
- return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
938
- ? adaptableToolPanelDef
939
- : toolPanelDef);
940
- };
941
- const isSideBarDefObject = (sidebarDef) => {
942
- return Array.isArray(sidebarDef?.toolPanels);
943
- };
944
- let result;
945
- if (original_sideBar === true) {
946
- // create all tool panels with default settings
947
- const toolPanels = [];
948
- toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_FILTERS);
949
- toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_COLUMNS);
950
- if (!isAdaptableToolPanelHidden) {
951
- toolPanels.push(adaptableToolPanelDef);
909
+ if (gridOptions.sideBar != undefined) {
910
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
911
+ if (!original_sideBar) {
912
+ // lucky us, no sideBar is defined, so we don't have to do anything
913
+ return original_sideBar;
952
914
  }
953
- result = {
954
- toolPanels: toolPanels,
915
+ const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
916
+ const adaptableToolPanelDef = {
917
+ id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
918
+ toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
919
+ labelDefault: GeneralConstants.ADAPTABLE,
920
+ labelKey: 'adaptable',
921
+ iconKey: 'menu',
922
+ width: UIHelper.getAdaptableToolPanelWidth(),
923
+ minWidth: UIHelper.getAdaptableToolPanelWidth(),
924
+ // maxWidth = undefined,
955
925
  };
956
- }
957
- // if there is only one tool panel, and it's the adaptable one => we have to handle it
958
- else if (typeof original_sideBar === 'string') {
959
- if (gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
960
- if (!isAdaptableToolPanelHidden)
961
- result = {
962
- toolPanels: [adaptableToolPanelDef],
963
- };
964
- }
965
- else {
966
- result = original_sideBar;
926
+ const mapToolPanelDefs = (toolPanelDefs = []) => {
927
+ // if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
928
+ return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
929
+ ? adaptableToolPanelDef
930
+ : toolPanelDef);
931
+ };
932
+ const isSideBarDefObject = (sidebarDef) => {
933
+ return Array.isArray(sidebarDef?.toolPanels);
934
+ };
935
+ let result;
936
+ if (original_sideBar === true) {
937
+ // create all tool panels with default settings
938
+ const toolPanels = [];
939
+ toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_FILTERS);
940
+ toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_COLUMNS);
941
+ if (!isAdaptableToolPanelHidden) {
942
+ toolPanels.push(adaptableToolPanelDef);
943
+ }
944
+ result = {
945
+ toolPanels: toolPanels,
946
+ };
967
947
  }
968
- }
969
- // if it's an array, process the tool panel definitions
970
- else if (Array.isArray(original_sideBar)) {
971
- if (!original_sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID) ||
972
- isAdaptableToolPanelHidden) {
973
- result = original_sideBar;
948
+ // if there is only one tool panel, and it's the adaptable one => we have to handle it
949
+ else if (typeof original_sideBar === 'string') {
950
+ if (gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
951
+ if (!isAdaptableToolPanelHidden)
952
+ result = {
953
+ toolPanels: [adaptableToolPanelDef],
954
+ };
955
+ }
956
+ else {
957
+ result = original_sideBar;
958
+ }
974
959
  }
975
960
  // if it's an array, process the tool panel definitions
976
- const sidebarDef = {};
977
- sidebarDef.toolPanels = mapToolPanelDefs(original_sideBar);
978
- result = sidebarDef;
979
- }
980
- // if it's fully-fledged SideBarDef, process its tool panel definitions
981
- else if (isSideBarDefObject(original_sideBar)) {
982
- if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
983
- toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
984
- !isAdaptableToolPanelHidden)) {
985
- // if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
986
- result = original_sideBar;
987
- }
988
- else {
989
- result = {
990
- ...original_sideBar,
991
- toolPanels: mapToolPanelDefs(original_sideBar.toolPanels),
992
- };
961
+ else if (Array.isArray(original_sideBar)) {
962
+ if (!original_sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID) ||
963
+ isAdaptableToolPanelHidden) {
964
+ result = original_sideBar;
965
+ }
966
+ // if it's an array, process the tool panel definitions
967
+ const sidebarDef = {};
968
+ sidebarDef.toolPanels = mapToolPanelDefs(original_sideBar);
969
+ result = sidebarDef;
993
970
  }
994
- }
995
- this.hasAdaptableToolPanel =
996
- isSideBarDefObject(result) &&
997
- result.toolPanels?.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
998
- toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID);
999
- return result;
1000
- });
1001
- /**
1002
- * `statusBar`
1003
- */
1004
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
1005
- const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
1006
- if (statusPanel.statusPanel === ADAPTABLE_STATUS_PANEL) {
1007
- this.adaptableStatusPanelKeys.push(statusPanel.key);
1008
- const context = {
1009
- Key: statusPanel.key,
1010
- };
1011
- return {
1012
- ...statusPanel,
1013
- statusPanel: createAgStatusPanelComponent(AdaptableStatusBar, this, context),
1014
- };
971
+ // if it's fully-fledged SideBarDef, process its tool panel definitions
972
+ else if (isSideBarDefObject(original_sideBar)) {
973
+ if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
974
+ toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
975
+ !isAdaptableToolPanelHidden)) {
976
+ // if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
977
+ result = original_sideBar;
978
+ }
979
+ else {
980
+ result = {
981
+ ...original_sideBar,
982
+ toolPanels: mapToolPanelDefs(original_sideBar.toolPanels),
983
+ };
984
+ }
1015
985
  }
1016
- return statusPanel;
986
+ this.hasAdaptableToolPanel =
987
+ isSideBarDefObject(result) &&
988
+ result.toolPanels?.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
989
+ toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID);
990
+ return result;
1017
991
  });
1018
- return { ...original_statusBar, statusPanels };
1019
- });
992
+ }
993
+ if (gridOptions.statusBar != undefined) {
994
+ /**
995
+ * `statusBar`
996
+ */
997
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
998
+ const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
999
+ if (statusPanel.statusPanel === ADAPTABLE_STATUS_PANEL) {
1000
+ this.adaptableStatusPanelKeys.push(statusPanel.key);
1001
+ const context = {
1002
+ Key: statusPanel.key,
1003
+ };
1004
+ return {
1005
+ ...statusPanel,
1006
+ statusPanel: createAgStatusPanelComponent(AdaptableStatusBar, this, context),
1007
+ };
1008
+ }
1009
+ return statusPanel;
1010
+ });
1011
+ return { ...original_statusBar, statusPanels };
1012
+ });
1013
+ }
1020
1014
  /**
1021
1015
  * `getRowStyle`
1022
1016
  */
@@ -1136,7 +1130,6 @@ You need to define at least one Layout!`);
1136
1130
  result = await renderAgGridFrameworkComponent(gridOptions);
1137
1131
  }
1138
1132
  catch (err) {
1139
- console.log('Failed to get AG Grid API');
1140
1133
  result = false;
1141
1134
  }
1142
1135
  if (result === false) {
@@ -1147,7 +1140,6 @@ You need to define at least one Layout!`);
1147
1140
  // in that case, we have to re-populate it with the Adaptable context values
1148
1141
  const agGridContext = agGridApi.getGridOption('context');
1149
1142
  if (!agGridContext) {
1150
- console.log('Failed to get AG Grid context');
1151
1143
  return false;
1152
1144
  }
1153
1145
  if (!agGridContext.__adaptable) {
@@ -1187,9 +1179,6 @@ You need to define at least one Layout!`);
1187
1179
  useRowNodeLookUp() {
1188
1180
  return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
1189
1181
  }
1190
- getAgGridRegisteredModules() {
1191
- return this.agGridAdapter.getAgGridRegisteredModules();
1192
- }
1193
1182
  getAgGridContainerElement() {
1194
1183
  if (!this.DANGER_USE_GETTER_agGridContainerElement) {
1195
1184
  this.DANGER_USE_GETTER_agGridContainerElement =
@@ -1238,6 +1227,9 @@ You need to define at least one Layout!`);
1238
1227
  return selectedRowInfo;
1239
1228
  }
1240
1229
  isGridRowSelectable() {
1230
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('RowSelectionModule')) {
1231
+ return false;
1232
+ }
1241
1233
  const rowSelection = this.agGridAdapter.getAgGridApi().getGridOption('rowSelection');
1242
1234
  if (rowSelection == undefined) {
1243
1235
  return false;
@@ -1251,9 +1243,11 @@ You need to define at least one Layout!`);
1251
1243
  return false;
1252
1244
  }
1253
1245
  isGridRangeSelectable() {
1254
- return (this.agGridAdapter.isAgGridModuleRegistered('CellSelection') &&
1255
- (this.agGridAdapter.getGridOption('enableRangeSelection') ||
1256
- !!this.agGridAdapter.getGridOption('cellSelection')));
1246
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('CellSelectionModule')) {
1247
+ return false;
1248
+ }
1249
+ return (this.agGridAdapter.getGridOption('enableRangeSelection') ||
1250
+ !!this.agGridAdapter.getGridOption('cellSelection'));
1257
1251
  }
1258
1252
  initAdaptableStore() {
1259
1253
  const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
@@ -1405,8 +1399,7 @@ You need to define at least one Layout!`);
1405
1399
  'chartOptionsChanged',
1406
1400
  'chartDestroyed',
1407
1401
  ];
1408
- const chartingModule = this.ModuleService.getModuleById('Charting');
1409
- if (chartingModule.isModuleAvailable()) {
1402
+ if (this.ModuleService.isAdapTableModulePresent('Charting')) {
1410
1403
  // We need to break the loop of charting changes for 'chartOptionsChanged', which is triggered by the subsequent agGridApi.updateChart(...)
1411
1404
  // see #ag_grid_update_chart_loop
1412
1405
  let lastChartOptionsChangePayload = '';
@@ -1454,7 +1447,7 @@ You need to define at least one Layout!`);
1454
1447
  shouldAutoSizeLayout() {
1455
1448
  const { layoutApi } = this.api;
1456
1449
  const currentLayout = layoutApi.getCurrentLayout();
1457
- if (currentLayout.ColumnWidths && Object.keys(currentLayout.ColumnWidths).length > 0) {
1450
+ if (currentLayout.ColumnSizing && Object.keys(currentLayout.ColumnSizing).length > 0) {
1458
1451
  return;
1459
1452
  }
1460
1453
  return currentLayout.AutoSizeColumns;
@@ -1568,7 +1561,7 @@ You need to define at least one Layout!`);
1568
1561
  const adaptableStatusPanels = this.agGridAdapter
1569
1562
  .getAgGridApi()
1570
1563
  .getGridOption('statusBar')
1571
- ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
1564
+ ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key)) ?? [];
1572
1565
  const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
1573
1566
  // need to add only the adaptable panels
1574
1567
  statusBarModule.syncStateWithOptions(adaptableStatusPanels);
@@ -1599,10 +1592,14 @@ You need to define at least one Layout!`);
1599
1592
  }
1600
1593
  }
1601
1594
  }
1595
+ isInPivotMode() {
1596
+ return (this.agGridModulesAdapter.isAgGridModuleRegistered('PivotModule') &&
1597
+ this.agGridAdapter.getAgGridApi().isPivotMode());
1598
+ }
1602
1599
  deriveAdaptableColumnStateFromAgGrid() {
1603
1600
  const allColumns = [];
1604
1601
  const gridApi = this.agGridAdapter.getAgGridApi();
1605
- const isPivot = gridApi.isPivotMode();
1602
+ const isPivot = this.isInPivotMode();
1606
1603
  let agGridCols = isPivot
1607
1604
  ? gridApi.getColumns()
1608
1605
  : // we call getAllGridColumns because we want to also have the generated group columns
@@ -2237,9 +2234,17 @@ You need to define at least one Layout!`);
2237
2234
  this.autoSizeColumns([columnId]);
2238
2235
  }
2239
2236
  autoSizeColumns(columnIds) {
2237
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
2238
+ this.logger.consoleError(`Could not auto-size columns [${columnIds}] - missing required AG Grid module 'ColumnAutoSizeModule'`);
2239
+ return;
2240
+ }
2240
2241
  this.layoutManager.autoSizeColumns(columnIds);
2241
2242
  }
2242
2243
  autoSizeAllColumns() {
2244
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
2245
+ this.logger.consoleError(`Could not auto-size all columns - missing required AG Grid module 'ColumnAutoSizeModule'`);
2246
+ return;
2247
+ }
2243
2248
  const agGridApi = this.agGridAdapter.getAgGridApi();
2244
2249
  if (agGridApi) {
2245
2250
  agGridApi.autoSizeAllColumns();
@@ -2250,6 +2255,7 @@ You need to define at least one Layout!`);
2250
2255
  }
2251
2256
  async getDistinctFilterValuesForColumn(options) {
2252
2257
  const { column } = options;
2258
+ const self = this;
2253
2259
  // First get the Grid Cells in the Column
2254
2260
  const currentGridCells = this.getDistinctGridCellsForColumn(column);
2255
2261
  // If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
@@ -2271,6 +2277,7 @@ You need to define at least one Layout!`);
2271
2277
  value: gridCell.rawValue,
2272
2278
  isSelected: gridCell.rowNode.displayed,
2273
2279
  count: gridCell.count,
2280
+ tooltip: false,
2274
2281
  get visible() {
2275
2282
  return gridCell.visible;
2276
2283
  },
@@ -2288,6 +2295,27 @@ You need to define at least one Layout!`);
2288
2295
  value: gridCell.rawValue,
2289
2296
  isSelected: gridCell.rowNode.displayed,
2290
2297
  count: gridCell.count,
2298
+ tooltip: false,
2299
+ get visible() {
2300
+ return gridCell.visible;
2301
+ },
2302
+ get visibleCount() {
2303
+ return gridCell.visibleCount;
2304
+ },
2305
+ };
2306
+ });
2307
+ return result;
2308
+ },
2309
+ get orderedValues() {
2310
+ const rowNodes = gridApiInternal.getSortedRowNodesWithCurrentLayoutSortOrder();
2311
+ const currentGridCells = self.getDistinctGridCellsForColumn(column, rowNodes);
2312
+ const result = currentGridCells.map((gridCell) => {
2313
+ return {
2314
+ label: gridCell.displayValue,
2315
+ value: gridCell.rawValue,
2316
+ isSelected: gridCell.rowNode.displayed,
2317
+ count: gridCell.count,
2318
+ tooltip: false,
2291
2319
  get visible() {
2292
2320
  return gridCell.visible;
2293
2321
  },
@@ -2306,12 +2334,16 @@ You need to define at least one Layout!`);
2306
2334
  catch (error) {
2307
2335
  this.logger.consoleError(`Failed to fetch custom filter values`, column, error);
2308
2336
  }
2309
- if (customDistinctValues) {
2310
- return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2311
- }
2337
+ return customDistinctValues ?? [];
2312
2338
  }
2313
2339
  // No distinct values so lets return unique grid cells
2314
- return currentGridCells;
2340
+ return currentGridCells.map((gridCell) => {
2341
+ const inFilterValue = {
2342
+ value: gridCell.rawValue,
2343
+ label: gridCell.displayValue,
2344
+ };
2345
+ return inFilterValue;
2346
+ });
2315
2347
  }
2316
2348
  async getDistinctEditValuesForColumn(options) {
2317
2349
  const { column, gridCell } = options;
@@ -2348,42 +2380,34 @@ You need to define at least one Layout!`);
2348
2380
  catch (error) {
2349
2381
  this.logger.consoleError(`Failed to fetch custom edit values`, column, error);
2350
2382
  }
2351
- if (customDistinctValues) {
2352
- return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2353
- }
2383
+ return customDistinctValues ?? [];
2354
2384
  }
2355
2385
  }
2356
2386
  // No distinct values so lets return unique grid cells
2357
- return currentGridCells;
2387
+ return currentGridCells.map((gridCell) => {
2388
+ const result = {
2389
+ value: gridCell.rawValue,
2390
+ label: gridCell.displayValue,
2391
+ };
2392
+ return result;
2393
+ });
2358
2394
  }
2359
- getDistinctGridCellsForColumn(column) {
2395
+ getDistinctGridCellsForColumn(column, rowNodes) {
2360
2396
  let gridCells = [];
2361
2397
  const isPivotResultColumn = column.isGeneratedPivotResultColumn;
2362
- this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
2398
+ const rowNodeCallback = (rowNode) => {
2363
2399
  const gridCell = this.addDistinctColumnValue(rowNode, column.columnId, isPivotResultColumn);
2364
2400
  if (gridCell) {
2365
2401
  gridCells.push(gridCell);
2366
2402
  }
2367
- });
2368
- return this.getUniqueGridCells(column, gridCells);
2369
- }
2370
- getGridCellsForCustomColumnValues(customColumnValues, column) {
2371
- let gridCells = [];
2372
- if (ArrayExtensions.IsNotNullOrEmpty(customColumnValues)) {
2373
- gridCells = customColumnValues.map((pv) => {
2374
- return {
2375
- rawValue: pv.value,
2376
- displayValue: pv.label ?? pv.value,
2377
- normalisedValue: pv.value,
2378
- columnId: column.columnId,
2379
- column: column,
2380
- rowNode: undefined,
2381
- isPivotCell: false,
2382
- isRowGroupCell: false,
2383
- };
2384
- });
2385
- return gridCells;
2403
+ };
2404
+ if (rowNodes) {
2405
+ rowNodes.forEach(rowNodeCallback);
2386
2406
  }
2407
+ else {
2408
+ this.agGridAdapter.getAgGridApi().forEachNode(rowNodeCallback);
2409
+ }
2410
+ return this.getUniqueGridCells(column, gridCells);
2387
2411
  }
2388
2412
  addDistinctColumnValue(rowNode, columnId, isPivotResultColumn) {
2389
2413
  if (!rowNode) {
@@ -2720,11 +2744,11 @@ You need to define at least one Layout!`);
2720
2744
  });
2721
2745
  }
2722
2746
  canGenerateCharts() {
2723
- return (this.agGridAdapter.isAgGridModuleRegistered('IntegratedCharts') &&
2724
- this.agGridAdapter.getAgGridApi().getGridOption('enableCharts'));
2747
+ const chartingModule = this.ModuleService.getModuleById('Charting');
2748
+ return chartingModule.isModuleEnabled() && chartingModule.isModuleAvailable();
2725
2749
  }
2726
2750
  canDisplaySparklines() {
2727
- return this.agGridAdapter.isAgGridModuleRegistered('Sparklines');
2751
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('SparklinesModule');
2728
2752
  }
2729
2753
  showCharts(chartsDefinitions, chartContainer) {
2730
2754
  return chartsDefinitions.map((chartDefinition) => this.showChart(chartDefinition, chartContainer));
@@ -2802,12 +2826,20 @@ You need to define at least one Layout!`);
2802
2826
  return isGroupedActive;
2803
2827
  }
2804
2828
  setAgGridQuickSearch(searchText) {
2829
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('QuickFilterModule')) {
2830
+ this.logger.consoleError(`Can NOT set Quick Search text - missing required AG Grid module 'QuickFilterModule'`);
2831
+ return;
2832
+ }
2805
2833
  this.agGridAdapter.setGridOption('quickFilterText', searchText);
2806
2834
  }
2807
2835
  clearAgGridQuickSearch() {
2808
2836
  this.setAgGridQuickSearch('');
2809
2837
  }
2810
2838
  setAgGridFindSearchValue(searchText) {
2839
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('FindModule')) {
2840
+ this.logger.consoleError(`Can NOT set Find Search text - missing required AG Grid module 'FindModule'`);
2841
+ return;
2842
+ }
2811
2843
  this.agGridAdapter.setGridOption('findSearchValue', searchText);
2812
2844
  }
2813
2845
  applyAdaptableTheme(theme) {
@@ -3013,6 +3045,7 @@ You need to define at least one Layout!`);
3013
3045
  'sideBar',
3014
3046
  'statusBar',
3015
3047
  'suppressAggFuncInHeader',
3048
+ 'defaultColDef',
3016
3049
  ]);
3017
3050
  if (liveGridOptions.components) {
3018
3051
  liveGridOptions.components.AdaptableToolPanel = null;
@@ -3044,6 +3077,8 @@ You need to define at least one Layout!`);
3044
3077
  this.agGridExportAdapter = null;
3045
3078
  this.agGridThemeAdapter?.destroy();
3046
3079
  this.agGridThemeAdapter = null;
3080
+ this.agGridModulesAdapter?.destroy();
3081
+ this.agGridModulesAdapter = null;
3047
3082
  this.rowListeners = null;
3048
3083
  this.emitter.destroy();
3049
3084
  this.emitter = null;
@@ -3105,10 +3140,10 @@ You need to define at least one Layout!`);
3105
3140
  this.unmountLoadingScreen = null;
3106
3141
  }
3107
3142
  canExportToExcel() {
3108
- return this.agGridAdapter.isAgGridModuleRegistered('ExcelExport');
3143
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('ExcelExportModule');
3109
3144
  }
3110
3145
  canExportToCsv() {
3111
- return this.agGridAdapter.isAgGridModuleRegistered('CsvExport');
3146
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('CsvExportModule');
3112
3147
  }
3113
3148
  isQuickFilterAvailable() {
3114
3149
  if (this.api.layoutApi.isCurrentLayoutPivot() &&