@adaptabletools/adaptable 20.3.0-canary.2 → 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 (427) 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 +71 -187
  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 +11 -11
  188. package/src/AdaptableState/Common/ExtendedLayout.d.ts +50 -0
  189. package/src/AdaptableState/Common/ProgressIndicatorConfig.d.ts +1 -4
  190. package/src/AdaptableState/Common/RowScope.d.ts +1 -1
  191. package/src/AdaptableState/FormatColumnState.d.ts +16 -9
  192. package/src/AdaptableState/InternalState.d.ts +1 -1
  193. package/src/AdaptableState/LayoutState.d.ts +26 -6
  194. package/src/AdaptableState/Selection/GridCell.d.ts +32 -0
  195. package/src/AdaptableState/StyledColumnState.d.ts +2 -2
  196. package/src/Api/AlertApi.d.ts +5 -11
  197. package/src/Api/ColumnApi.d.ts +17 -1
  198. package/src/Api/ColumnFilterApi.d.ts +32 -2
  199. package/src/Api/CustomSortApi.d.ts +5 -10
  200. package/src/Api/FlashingCellApi.d.ts +10 -6
  201. package/src/Api/FormatColumnApi.d.ts +8 -18
  202. package/src/Api/Implementation/AlertApiImpl.d.ts +6 -9
  203. package/src/Api/Implementation/AlertApiImpl.js +7 -6
  204. package/src/Api/Implementation/ApiBase.d.ts +2 -12
  205. package/src/Api/Implementation/ApiBase.js +5 -5
  206. package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -2
  207. package/src/Api/Implementation/ColumnApiImpl.js +59 -23
  208. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +7 -1
  209. package/src/Api/Implementation/ColumnFilterApiImpl.js +76 -3
  210. package/src/Api/Implementation/ColumnScopeApiImpl.js +10 -2
  211. package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -10
  212. package/src/Api/Implementation/CustomSortApiImpl.js +6 -4
  213. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +7 -6
  214. package/src/Api/Implementation/FlashingCellApiImpl.js +11 -8
  215. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +8 -18
  216. package/src/Api/Implementation/FormatColumnApiImpl.js +10 -9
  217. package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -2
  218. package/src/Api/Implementation/LayoutApiImpl.js +101 -7
  219. package/src/Api/Implementation/LayoutHelpers.d.ts +1 -0
  220. package/src/Api/Implementation/LayoutHelpers.js +23 -4
  221. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +7 -5
  222. package/src/Api/Implementation/PlusMinusApiImpl.js +10 -7
  223. package/src/Api/Implementation/ScheduleApiImpl.d.ts +9 -16
  224. package/src/Api/Implementation/ScheduleApiImpl.js +15 -17
  225. package/src/Api/Implementation/ShortcutApiImpl.d.ts +5 -6
  226. package/src/Api/Implementation/ShortcutApiImpl.js +7 -8
  227. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +7 -8
  228. package/src/Api/Implementation/StyledColumnApiImpl.js +12 -9
  229. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -4
  230. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
  231. package/src/Api/Implementation/UserInterfaceApiImpl.js +10 -9
  232. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  233. package/src/Api/Internal/AdaptableInternalApi.js +3 -0
  234. package/src/Api/Internal/AlertInternalApi.d.ts +6 -6
  235. package/src/Api/Internal/AlertInternalApi.js +10 -10
  236. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +13 -0
  237. package/src/Api/Internal/ColumnFilterInternalApi.js +93 -1
  238. package/src/Api/Internal/ColumnInternalApi.d.ts +2 -1
  239. package/src/Api/Internal/ColumnInternalApi.js +6 -2
  240. package/src/Api/Internal/DashboardInternalApi.js +1 -1
  241. package/src/Api/Internal/EntitlementInternalApi.d.ts +1 -0
  242. package/src/Api/Internal/EntitlementInternalApi.js +8 -0
  243. package/src/Api/Internal/ExportInternalApi.js +1 -1
  244. package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
  245. package/src/Api/Internal/FormatColumnInternalApi.d.ts +12 -13
  246. package/src/Api/Internal/FormatColumnInternalApi.js +45 -16
  247. package/src/Api/Internal/GridInternalApi.d.ts +7 -10
  248. package/src/Api/Internal/GridInternalApi.js +76 -27
  249. package/src/Api/Internal/LayoutInternalApi.d.ts +5 -5
  250. package/src/Api/Internal/LayoutInternalApi.js +42 -5
  251. package/src/Api/Internal/PredicateInternalApi.d.ts +2 -6
  252. package/src/Api/Internal/PredicateInternalApi.js +4 -6
  253. package/src/Api/Internal/UserInterfaceInternalApi.d.ts +1 -0
  254. package/src/Api/Internal/UserInterfaceInternalApi.js +10 -3
  255. package/src/Api/LayoutApi.d.ts +7 -2
  256. package/src/Api/PlusMinusApi.d.ts +11 -7
  257. package/src/Api/ScheduleApi.d.ts +9 -16
  258. package/src/Api/ShortcutApi.d.ts +5 -6
  259. package/src/Api/StyledColumnApi.d.ts +10 -7
  260. package/src/Api/UserInterfaceApi.d.ts +5 -6
  261. package/src/Redux/ActionsReducers/InternalRedux.d.ts +4 -4
  262. package/src/Redux/ActionsReducers/InternalRedux.js +7 -7
  263. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
  264. package/src/Redux/ActionsReducers/StyledColumnRedux.js +13 -0
  265. package/src/Redux/Store/AdaptableStore.js +10 -10
  266. package/src/Strategy/AdaptableModuleBase.d.ts +14 -4
  267. package/src/Strategy/AdaptableModuleBase.js +46 -9
  268. package/src/Strategy/AlertModule.d.ts +3 -4
  269. package/src/Strategy/AlertModule.js +7 -4
  270. package/src/Strategy/CalculatedColumnModule.js +2 -2
  271. package/src/Strategy/CellSummaryModule.js +2 -2
  272. package/src/Strategy/ChartingModule.d.ts +3 -1
  273. package/src/Strategy/ChartingModule.js +9 -3
  274. package/src/Strategy/ColumnFilterModule.d.ts +1 -1
  275. package/src/Strategy/ColumnFilterModule.js +31 -15
  276. package/src/Strategy/ColumnInfoModule.js +2 -2
  277. package/src/Strategy/CommentModule.d.ts +1 -1
  278. package/src/Strategy/CommentModule.js +3 -3
  279. package/src/Strategy/CustomSortModule.d.ts +3 -4
  280. package/src/Strategy/CustomSortModule.js +2 -2
  281. package/src/Strategy/DashboardModule.js +1 -1
  282. package/src/Strategy/DataChangeHistoryModule.d.ts +2 -1
  283. package/src/Strategy/DataChangeHistoryModule.js +3 -10
  284. package/src/Strategy/DataImportModule.js +3 -3
  285. package/src/Strategy/ExportModule.js +1 -1
  286. package/src/Strategy/Fdc3Module.js +1 -1
  287. package/src/Strategy/FlashingCellModule.d.ts +3 -5
  288. package/src/Strategy/FlashingCellModule.js +3 -3
  289. package/src/Strategy/FormatColumnModule.d.ts +3 -4
  290. package/src/Strategy/FormatColumnModule.js +4 -2
  291. package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
  292. package/src/Strategy/FreeTextColumnModule.js +2 -2
  293. package/src/Strategy/GridInfoModule.js +2 -2
  294. package/src/Strategy/Interface/IModule.d.ts +7 -3
  295. package/src/Strategy/LayoutModule.js +11 -11
  296. package/src/Strategy/NoteModule.d.ts +1 -1
  297. package/src/Strategy/NoteModule.js +3 -3
  298. package/src/Strategy/PlusMinusModule.d.ts +3 -4
  299. package/src/Strategy/PlusMinusModule.js +2 -2
  300. package/src/Strategy/QuickSearchModule.d.ts +2 -0
  301. package/src/Strategy/QuickSearchModule.js +9 -0
  302. package/src/Strategy/ScheduleModule.d.ts +3 -4
  303. package/src/Strategy/ScheduleModule.js +2 -2
  304. package/src/Strategy/SettingsPanelModule.js +1 -1
  305. package/src/Strategy/ShortcutModule.d.ts +3 -4
  306. package/src/Strategy/ShortcutModule.js +2 -2
  307. package/src/Strategy/StatusBarModule.d.ts +3 -2
  308. package/src/Strategy/StatusBarModule.js +6 -3
  309. package/src/Strategy/StyledColumnModule.d.ts +3 -4
  310. package/src/Strategy/StyledColumnModule.js +2 -2
  311. package/src/Strategy/SystemStatusModule.js +2 -2
  312. package/src/Strategy/TeamSharingModule.d.ts +1 -1
  313. package/src/Strategy/TeamSharingModule.js +5 -2
  314. package/src/Strategy/ToolPanelModule.d.ts +1 -1
  315. package/src/Strategy/ToolPanelModule.js +1 -4
  316. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.d.ts +5 -0
  317. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +12 -0
  318. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
  319. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  320. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
  321. package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
  322. package/src/Utilities/Extensions/ArrayExtensions.js +62 -13
  323. package/src/Utilities/ObjectFactory.js +3 -2
  324. package/src/Utilities/Services/AnnotationsService.js +1 -1
  325. package/src/Utilities/Services/Interface/IModuleService.d.ts +2 -1
  326. package/src/Utilities/Services/ModuleService.d.ts +3 -3
  327. package/src/Utilities/Services/ModuleService.js +19 -7
  328. package/src/Utilities/getScopeViewItems.js +5 -2
  329. package/src/View/AdaptableView.js +3 -1
  330. package/src/View/ColumnInfo/ColumnInfo.js +9 -3
  331. package/src/View/Components/AdaptableIconSelector/index.js +2 -3
  332. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +0 -1
  333. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +2 -3
  334. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.d.ts +0 -2
  335. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +4 -7
  336. package/src/View/Components/ColumnFilter/ColumnFilter.js +11 -4
  337. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  338. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -2
  339. package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
  340. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
  341. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +2 -2
  342. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
  343. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +2 -2
  344. package/src/View/Components/ColumnFilter/utils.d.ts +2 -2
  345. package/src/View/Components/ColumnFilter/utils.js +6 -1
  346. package/src/View/Components/EntityRulesEditor/index.js +1 -2
  347. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
  348. package/src/View/Components/NewScopeComponent.js +5 -1
  349. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +6 -6
  350. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -2
  351. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +1 -1
  352. package/src/View/Components/Selectors/ColumnSelector.js +1 -1
  353. package/src/View/Components/Selectors/FieldSelector.js +1 -1
  354. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +1 -0
  355. package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
  356. package/src/View/Dashboard/Dashboard.js +2 -2
  357. package/src/View/Dashboard/DashboardPopup.js +3 -1
  358. package/src/View/Dashboard/PinnedDashboard.js +1 -1
  359. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +9 -21
  360. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +59 -22
  361. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +4 -0
  362. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -40
  363. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +13 -12
  364. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +8 -0
  365. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +31 -0
  366. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +18 -4
  367. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +1 -1
  368. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -1
  369. package/src/View/Layout/TransposedPopup.js +2 -2
  370. package/src/View/Layout/Wizard/sections/ColumnsSection.js +64 -9
  371. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +5 -5
  372. package/src/View/StatusBar/AdaptableStatusBar.js +1 -4
  373. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  374. package/src/View/Theme/ThemeSelector.js +1 -1
  375. package/src/agGrid/AdaptableAgGrid.d.ts +11 -7
  376. package/src/agGrid/AdaptableAgGrid.js +256 -218
  377. package/src/agGrid/AdaptableFilterHandler.d.ts +18 -0
  378. package/src/agGrid/AdaptableFilterHandler.js +61 -0
  379. package/src/agGrid/AgGridAdapter.d.ts +3 -7
  380. package/src/agGrid/AgGridAdapter.js +13 -46
  381. package/src/agGrid/AgGridColumnAdapter.d.ts +3 -3
  382. package/src/agGrid/AgGridColumnAdapter.js +86 -40
  383. package/src/agGrid/AgGridExportAdapter.js +1 -1
  384. package/src/agGrid/AgGridFilterAdapter.d.ts +2 -0
  385. package/src/agGrid/AgGridFilterAdapter.js +48 -0
  386. package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
  387. package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +24 -35
  388. package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
  389. package/src/agGrid/AgGridModulesAdapter.js +66 -0
  390. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
  391. package/src/agGrid/editors/AdaptablePercentageEditor/InternalAdaptablePercentageEditor.js +1 -1
  392. package/src/components/Dialog/index.js +1 -1
  393. package/src/components/Dropdown/Arrows.js +2 -2
  394. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +1 -1
  395. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +2 -2
  396. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -2
  397. package/src/components/FileDroppable/index.js +1 -1
  398. package/src/components/IconSelector/IconSelector.d.ts +2 -2
  399. package/src/components/OverlayTrigger/index.js +1 -1
  400. package/src/components/Select/Select.d.ts +1 -1
  401. package/src/components/Select/Select.js +116 -24
  402. package/src/components/icons/DefaultIcon.d.ts +0 -1
  403. package/src/components/icons/DefaultIcon.js +0 -6
  404. package/src/env.js +2 -2
  405. package/src/layout-manager/src/LayoutManagerModel.d.ts +6 -10
  406. package/src/layout-manager/src/index.d.ts +11 -3
  407. package/src/layout-manager/src/index.js +302 -87
  408. package/src/layout-manager/src/normalizeLayoutModel.js +7 -4
  409. package/src/layout-manager/src/simplifyLayoutModel.js +4 -4
  410. package/src/metamodel/adaptable.metamodel.d.ts +172 -20
  411. package/src/metamodel/adaptable.metamodel.js +1 -1
  412. package/src/migration/AdaptableUpgradeHelper.js +2 -0
  413. package/src/migration/VersionUpgrade17.js +1 -1
  414. package/src/migration/VersionUpgrade20.js +1 -0
  415. package/src/migration/VersionUpgrade21.d.ts +6 -0
  416. package/src/migration/VersionUpgrade21.js +24 -0
  417. package/src/types.d.ts +8 -9
  418. package/tsconfig.esm.tsbuildinfo +1 -1
  419. package/src/AdaptableState/Common/ExtendedLayoutInfo.d.ts +0 -27
  420. package/src/agGrid/FilterWrapper.d.ts +0 -2
  421. package/src/agGrid/FilterWrapper.js +0 -131
  422. package/src/agGrid/FloatingFilterWrapper.d.ts +0 -2
  423. package/src/agGrid/agGridModules.d.ts +0 -3
  424. package/src/agGrid/agGridModules.js +0 -15
  425. package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
  426. package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -16
  427. /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);
@@ -640,12 +648,15 @@ You need to define at least one Layout!`);
640
648
  */
641
649
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColDef', (original_defaultColDef) => {
642
650
  if (original_defaultColDef?.headerValueGetter) {
643
- this.logger.warn(`defaultColDef.headerValueGetter and overrides the Adaptable custom header mechanism! We recommend using a ColumnOptions.tableColumnHeader instead!`);
651
+ this.logger.warn(`defaultColDef.headerValueGetter and overrides the Adaptable custom header mechanism! We recommend using a ColumnOptions.columnHeader instead!`);
644
652
  return original_defaultColDef;
645
653
  }
654
+ // #customize_header
646
655
  const defaultColDef = { ...original_defaultColDef };
647
656
  defaultColDef.headerValueGetter = tagProvidedByAdaptable((params) => {
648
- return this.api.columnApi.internalApi.getColumnHeaderName(params);
657
+ const columnHeaderName = this.api.columnApi.internalApi.getColumnHeaderName(params);
658
+ const formattedHeaderName = this.api.formatColumnApi.internalApi.formatColumnHeaderName(columnHeaderName, params);
659
+ return formattedHeaderName;
649
660
  });
650
661
  return defaultColDef;
651
662
  });
@@ -767,22 +778,36 @@ You need to define at least one Layout!`);
767
778
  ? true
768
779
  : original_allowContextMenuWithControlKey;
769
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
+ });
770
801
  /**
771
802
  * `isExternalFilterPresent`
772
803
  */
773
804
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'isExternalFilterPresent', (original_isExternalFilterPresent) => {
774
805
  return (params) => {
775
806
  if (!this.isAvailable) {
776
- return true;
807
+ return false;
777
808
  }
778
809
  const isGridFilterActive = StringExtensions.IsNotNullOrEmpty(this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression());
779
- const isTableColumnFiltersActive = ArrayExtensions.IsNotNullOrEmpty(this.api.filterApi.columnFilterApi
780
- .getActiveColumnFilters()
781
- .filter((columnFilter) => !this.api.columnApi.isPivotResultColumn(columnFilter.ColumnId)));
782
810
  return (isGridFilterActive ||
783
- // only Table ColumnFilters are handled here
784
- // see #doAggregateFiltersPassMonkeyPatcher for filtering Pivot Columns
785
- isTableColumnFiltersActive ||
786
811
  // it means that userPropertyValue will be called so we re-init that collection
787
812
  (original_isExternalFilterPresent ? original_isExternalFilterPresent(params) : false));
788
813
  };
@@ -810,20 +835,11 @@ You need to define at least one Layout!`);
810
835
  return true;
811
836
  }
812
837
  }
813
- // first assess if the Row i s filterable - if not, then return true so it appears in Grid
814
- const isRowFilterable = this.api.optionsApi.getFilterOptions().isRowFilterable;
815
- if (typeof isRowFilterable === 'function') {
816
- const rowFilterableContext = {
817
- ...this.api.internalApi.buildBaseContext(),
818
- rowNode: node,
819
- data: node.data,
820
- };
821
- if (!isRowFilterable(rowFilterableContext)) {
822
- return true;
823
- }
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;
824
842
  }
825
- // get the Primary Key Value for the Row Node being evaluated
826
- const primaryKey = this.getPrimaryKeyValueFromRowNode(node);
827
843
  // next we assess a Grid Filter (if its running locally)
828
844
  const currentGridFilterExpression = this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
829
845
  if (StringExtensions.IsNotNullOrEmpty(currentGridFilterExpression)) {
@@ -843,29 +859,6 @@ You need to define at least one Layout!`);
843
859
  }
844
860
  }
845
861
  }
846
- // finally we evaluate column filters
847
- const tableColumnFilters = this.api.filterApi.columnFilterApi
848
- .getActiveColumnFilters()
849
- .filter((columnFilter) => !this.api.columnApi.isPivotResultColumn(columnFilter.ColumnId));
850
- try {
851
- // only Table ColumnFilters are handled here
852
- // see #doAggregateFiltersPassMonkeyPatcher for filtering Pivot Columns
853
- if (tableColumnFilters.length > 0) {
854
- for (const columnFilter of tableColumnFilters) {
855
- const evaluateColumnFilterOnClient = this.api.expressionApi.internalApi.shouldEvaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, columnFilter.Predicates);
856
- if (evaluateColumnFilterOnClient) {
857
- const columnFilterEvaluationResult = this.api.filterApi.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, node);
858
- if (!columnFilterEvaluationResult) {
859
- return false;
860
- }
861
- }
862
- }
863
- }
864
- }
865
- catch (ex) {
866
- this.logger.error(ex);
867
- return false;
868
- }
869
862
  const result = original_doesExternalFilterPass
870
863
  ? original_doesExternalFilterPass(node)
871
864
  : true;
@@ -913,107 +906,111 @@ You need to define at least one Layout!`);
913
906
  /**
914
907
  * `sidebar`
915
908
  */
916
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
917
- if (!original_sideBar) {
918
- // lucky us, no sideBar is defined, so we don't have to do anything
919
- return original_sideBar;
920
- }
921
- const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
922
- const adaptableToolPanelDef = {
923
- id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
924
- toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
925
- labelDefault: GeneralConstants.ADAPTABLE,
926
- labelKey: 'adaptable',
927
- iconKey: 'menu',
928
- width: UIHelper.getAdaptableToolPanelWidth(),
929
- minWidth: UIHelper.getAdaptableToolPanelWidth(),
930
- // maxWidth = undefined,
931
- };
932
- const mapToolPanelDefs = (toolPanelDefs = []) => {
933
- // if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
934
- return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
935
- ? adaptableToolPanelDef
936
- : toolPanelDef);
937
- };
938
- const isSideBarDefObject = (sidebarDef) => {
939
- return Array.isArray(sidebarDef?.toolPanels);
940
- };
941
- let result;
942
- if (original_sideBar === true) {
943
- // create all tool panels with default settings
944
- const toolPanels = [];
945
- toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_FILTERS);
946
- toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_COLUMNS);
947
- if (!isAdaptableToolPanelHidden) {
948
- 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;
949
914
  }
950
- result = {
951
- 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,
952
925
  };
953
- }
954
- // if there is only one tool panel, and it's the adaptable one => we have to handle it
955
- else if (typeof original_sideBar === 'string') {
956
- if (gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
957
- if (!isAdaptableToolPanelHidden)
958
- result = {
959
- toolPanels: [adaptableToolPanelDef],
960
- };
961
- }
962
- else {
963
- 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
+ };
964
947
  }
965
- }
966
- // if it's an array, process the tool panel definitions
967
- else if (Array.isArray(original_sideBar)) {
968
- if (!original_sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID) ||
969
- isAdaptableToolPanelHidden) {
970
- 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
+ }
971
959
  }
972
960
  // if it's an array, process the tool panel definitions
973
- const sidebarDef = {};
974
- sidebarDef.toolPanels = mapToolPanelDefs(original_sideBar);
975
- result = sidebarDef;
976
- }
977
- // if it's fully-fledged SideBarDef, process its tool panel definitions
978
- else if (isSideBarDefObject(original_sideBar)) {
979
- if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
980
- toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
981
- !isAdaptableToolPanelHidden)) {
982
- // if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
983
- result = original_sideBar;
984
- }
985
- else {
986
- result = {
987
- ...original_sideBar,
988
- toolPanels: mapToolPanelDefs(original_sideBar.toolPanels),
989
- };
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;
990
970
  }
991
- }
992
- this.hasAdaptableToolPanel =
993
- isSideBarDefObject(result) &&
994
- result.toolPanels?.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
995
- toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID);
996
- return result;
997
- });
998
- /**
999
- * `statusBar`
1000
- */
1001
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
1002
- const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
1003
- if (statusPanel.statusPanel === ADAPTABLE_STATUS_PANEL) {
1004
- this.adaptableStatusPanelKeys.push(statusPanel.key);
1005
- const context = {
1006
- Key: statusPanel.key,
1007
- };
1008
- return {
1009
- ...statusPanel,
1010
- statusPanel: createAgStatusPanelComponent(AdaptableStatusBar, this, context),
1011
- };
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
+ }
1012
985
  }
1013
- 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;
1014
991
  });
1015
- return { ...original_statusBar, statusPanels };
1016
- });
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
+ }
1017
1014
  /**
1018
1015
  * `getRowStyle`
1019
1016
  */
@@ -1133,7 +1130,6 @@ You need to define at least one Layout!`);
1133
1130
  result = await renderAgGridFrameworkComponent(gridOptions);
1134
1131
  }
1135
1132
  catch (err) {
1136
- console.log('Failed to get AG Grid API');
1137
1133
  result = false;
1138
1134
  }
1139
1135
  if (result === false) {
@@ -1144,7 +1140,6 @@ You need to define at least one Layout!`);
1144
1140
  // in that case, we have to re-populate it with the Adaptable context values
1145
1141
  const agGridContext = agGridApi.getGridOption('context');
1146
1142
  if (!agGridContext) {
1147
- console.log('Failed to get AG Grid context');
1148
1143
  return false;
1149
1144
  }
1150
1145
  if (!agGridContext.__adaptable) {
@@ -1184,9 +1179,6 @@ You need to define at least one Layout!`);
1184
1179
  useRowNodeLookUp() {
1185
1180
  return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
1186
1181
  }
1187
- getAgGridRegisteredModules() {
1188
- return this.agGridAdapter.getAgGridRegisteredModules();
1189
- }
1190
1182
  getAgGridContainerElement() {
1191
1183
  if (!this.DANGER_USE_GETTER_agGridContainerElement) {
1192
1184
  this.DANGER_USE_GETTER_agGridContainerElement =
@@ -1235,6 +1227,9 @@ You need to define at least one Layout!`);
1235
1227
  return selectedRowInfo;
1236
1228
  }
1237
1229
  isGridRowSelectable() {
1230
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('RowSelectionModule')) {
1231
+ return false;
1232
+ }
1238
1233
  const rowSelection = this.agGridAdapter.getAgGridApi().getGridOption('rowSelection');
1239
1234
  if (rowSelection == undefined) {
1240
1235
  return false;
@@ -1248,9 +1243,11 @@ You need to define at least one Layout!`);
1248
1243
  return false;
1249
1244
  }
1250
1245
  isGridRangeSelectable() {
1251
- return (this.agGridAdapter.isAgGridModuleRegistered('CellSelection') &&
1252
- (this.agGridAdapter.getGridOption('enableRangeSelection') ||
1253
- !!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'));
1254
1251
  }
1255
1252
  initAdaptableStore() {
1256
1253
  const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
@@ -1402,8 +1399,7 @@ You need to define at least one Layout!`);
1402
1399
  'chartOptionsChanged',
1403
1400
  'chartDestroyed',
1404
1401
  ];
1405
- const chartingModule = this.ModuleService.getModuleById('Charting');
1406
- if (chartingModule.isModuleAvailable()) {
1402
+ if (this.ModuleService.isAdapTableModulePresent('Charting')) {
1407
1403
  // We need to break the loop of charting changes for 'chartOptionsChanged', which is triggered by the subsequent agGridApi.updateChart(...)
1408
1404
  // see #ag_grid_update_chart_loop
1409
1405
  let lastChartOptionsChangePayload = '';
@@ -1451,7 +1447,7 @@ You need to define at least one Layout!`);
1451
1447
  shouldAutoSizeLayout() {
1452
1448
  const { layoutApi } = this.api;
1453
1449
  const currentLayout = layoutApi.getCurrentLayout();
1454
- if (currentLayout.ColumnWidths && Object.keys(currentLayout.ColumnWidths).length > 0) {
1450
+ if (currentLayout.ColumnSizing && Object.keys(currentLayout.ColumnSizing).length > 0) {
1455
1451
  return;
1456
1452
  }
1457
1453
  return currentLayout.AutoSizeColumns;
@@ -1565,7 +1561,7 @@ You need to define at least one Layout!`);
1565
1561
  const adaptableStatusPanels = this.agGridAdapter
1566
1562
  .getAgGridApi()
1567
1563
  .getGridOption('statusBar')
1568
- ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
1564
+ ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key)) ?? [];
1569
1565
  const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
1570
1566
  // need to add only the adaptable panels
1571
1567
  statusBarModule.syncStateWithOptions(adaptableStatusPanels);
@@ -1596,10 +1592,14 @@ You need to define at least one Layout!`);
1596
1592
  }
1597
1593
  }
1598
1594
  }
1595
+ isInPivotMode() {
1596
+ return (this.agGridModulesAdapter.isAgGridModuleRegistered('PivotModule') &&
1597
+ this.agGridAdapter.getAgGridApi().isPivotMode());
1598
+ }
1599
1599
  deriveAdaptableColumnStateFromAgGrid() {
1600
1600
  const allColumns = [];
1601
1601
  const gridApi = this.agGridAdapter.getAgGridApi();
1602
- const isPivot = gridApi.isPivotMode();
1602
+ const isPivot = this.isInPivotMode();
1603
1603
  let agGridCols = isPivot
1604
1604
  ? gridApi.getColumns()
1605
1605
  : // we call getAllGridColumns because we want to also have the generated group columns
@@ -2234,9 +2234,17 @@ You need to define at least one Layout!`);
2234
2234
  this.autoSizeColumns([columnId]);
2235
2235
  }
2236
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
+ }
2237
2241
  this.layoutManager.autoSizeColumns(columnIds);
2238
2242
  }
2239
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
+ }
2240
2248
  const agGridApi = this.agGridAdapter.getAgGridApi();
2241
2249
  if (agGridApi) {
2242
2250
  agGridApi.autoSizeAllColumns();
@@ -2247,6 +2255,7 @@ You need to define at least one Layout!`);
2247
2255
  }
2248
2256
  async getDistinctFilterValuesForColumn(options) {
2249
2257
  const { column } = options;
2258
+ const self = this;
2250
2259
  // First get the Grid Cells in the Column
2251
2260
  const currentGridCells = this.getDistinctGridCellsForColumn(column);
2252
2261
  // If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
@@ -2268,6 +2277,7 @@ You need to define at least one Layout!`);
2268
2277
  value: gridCell.rawValue,
2269
2278
  isSelected: gridCell.rowNode.displayed,
2270
2279
  count: gridCell.count,
2280
+ tooltip: false,
2271
2281
  get visible() {
2272
2282
  return gridCell.visible;
2273
2283
  },
@@ -2285,6 +2295,27 @@ You need to define at least one Layout!`);
2285
2295
  value: gridCell.rawValue,
2286
2296
  isSelected: gridCell.rowNode.displayed,
2287
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,
2288
2319
  get visible() {
2289
2320
  return gridCell.visible;
2290
2321
  },
@@ -2303,12 +2334,16 @@ You need to define at least one Layout!`);
2303
2334
  catch (error) {
2304
2335
  this.logger.consoleError(`Failed to fetch custom filter values`, column, error);
2305
2336
  }
2306
- if (customDistinctValues) {
2307
- return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2308
- }
2337
+ return customDistinctValues ?? [];
2309
2338
  }
2310
2339
  // No distinct values so lets return unique grid cells
2311
- return currentGridCells;
2340
+ return currentGridCells.map((gridCell) => {
2341
+ const inFilterValue = {
2342
+ value: gridCell.rawValue,
2343
+ label: gridCell.displayValue,
2344
+ };
2345
+ return inFilterValue;
2346
+ });
2312
2347
  }
2313
2348
  async getDistinctEditValuesForColumn(options) {
2314
2349
  const { column, gridCell } = options;
@@ -2345,42 +2380,34 @@ You need to define at least one Layout!`);
2345
2380
  catch (error) {
2346
2381
  this.logger.consoleError(`Failed to fetch custom edit values`, column, error);
2347
2382
  }
2348
- if (customDistinctValues) {
2349
- return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2350
- }
2383
+ return customDistinctValues ?? [];
2351
2384
  }
2352
2385
  }
2353
2386
  // No distinct values so lets return unique grid cells
2354
- return currentGridCells;
2387
+ return currentGridCells.map((gridCell) => {
2388
+ const result = {
2389
+ value: gridCell.rawValue,
2390
+ label: gridCell.displayValue,
2391
+ };
2392
+ return result;
2393
+ });
2355
2394
  }
2356
- getDistinctGridCellsForColumn(column) {
2395
+ getDistinctGridCellsForColumn(column, rowNodes) {
2357
2396
  let gridCells = [];
2358
2397
  const isPivotResultColumn = column.isGeneratedPivotResultColumn;
2359
- this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
2398
+ const rowNodeCallback = (rowNode) => {
2360
2399
  const gridCell = this.addDistinctColumnValue(rowNode, column.columnId, isPivotResultColumn);
2361
2400
  if (gridCell) {
2362
2401
  gridCells.push(gridCell);
2363
2402
  }
2364
- });
2365
- return this.getUniqueGridCells(column, gridCells);
2366
- }
2367
- getGridCellsForCustomColumnValues(customColumnValues, column) {
2368
- let gridCells = [];
2369
- if (ArrayExtensions.IsNotNullOrEmpty(customColumnValues)) {
2370
- gridCells = customColumnValues.map((pv) => {
2371
- return {
2372
- rawValue: pv.value,
2373
- displayValue: pv.label ?? pv.value,
2374
- normalisedValue: pv.value,
2375
- columnId: column.columnId,
2376
- column: column,
2377
- rowNode: undefined,
2378
- isPivotCell: false,
2379
- isRowGroupCell: false,
2380
- };
2381
- });
2382
- return gridCells;
2403
+ };
2404
+ if (rowNodes) {
2405
+ rowNodes.forEach(rowNodeCallback);
2383
2406
  }
2407
+ else {
2408
+ this.agGridAdapter.getAgGridApi().forEachNode(rowNodeCallback);
2409
+ }
2410
+ return this.getUniqueGridCells(column, gridCells);
2384
2411
  }
2385
2412
  addDistinctColumnValue(rowNode, columnId, isPivotResultColumn) {
2386
2413
  if (!rowNode) {
@@ -2717,11 +2744,11 @@ You need to define at least one Layout!`);
2717
2744
  });
2718
2745
  }
2719
2746
  canGenerateCharts() {
2720
- return (this.agGridAdapter.isAgGridModuleRegistered('IntegratedCharts') &&
2721
- this.agGridAdapter.getAgGridApi().getGridOption('enableCharts'));
2747
+ const chartingModule = this.ModuleService.getModuleById('Charting');
2748
+ return chartingModule.isModuleEnabled() && chartingModule.isModuleAvailable();
2722
2749
  }
2723
2750
  canDisplaySparklines() {
2724
- return this.agGridAdapter.isAgGridModuleRegistered('Sparklines');
2751
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('SparklinesModule');
2725
2752
  }
2726
2753
  showCharts(chartsDefinitions, chartContainer) {
2727
2754
  return chartsDefinitions.map((chartDefinition) => this.showChart(chartDefinition, chartContainer));
@@ -2799,12 +2826,20 @@ You need to define at least one Layout!`);
2799
2826
  return isGroupedActive;
2800
2827
  }
2801
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
+ }
2802
2833
  this.agGridAdapter.setGridOption('quickFilterText', searchText);
2803
2834
  }
2804
2835
  clearAgGridQuickSearch() {
2805
2836
  this.setAgGridQuickSearch('');
2806
2837
  }
2807
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
+ }
2808
2843
  this.agGridAdapter.setGridOption('findSearchValue', searchText);
2809
2844
  }
2810
2845
  applyAdaptableTheme(theme) {
@@ -3010,6 +3045,7 @@ You need to define at least one Layout!`);
3010
3045
  'sideBar',
3011
3046
  'statusBar',
3012
3047
  'suppressAggFuncInHeader',
3048
+ 'defaultColDef',
3013
3049
  ]);
3014
3050
  if (liveGridOptions.components) {
3015
3051
  liveGridOptions.components.AdaptableToolPanel = null;
@@ -3041,6 +3077,8 @@ You need to define at least one Layout!`);
3041
3077
  this.agGridExportAdapter = null;
3042
3078
  this.agGridThemeAdapter?.destroy();
3043
3079
  this.agGridThemeAdapter = null;
3080
+ this.agGridModulesAdapter?.destroy();
3081
+ this.agGridModulesAdapter = null;
3044
3082
  this.rowListeners = null;
3045
3083
  this.emitter.destroy();
3046
3084
  this.emitter = null;
@@ -3102,10 +3140,10 @@ You need to define at least one Layout!`);
3102
3140
  this.unmountLoadingScreen = null;
3103
3141
  }
3104
3142
  canExportToExcel() {
3105
- return this.agGridAdapter.isAgGridModuleRegistered('ExcelExport');
3143
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('ExcelExportModule');
3106
3144
  }
3107
3145
  canExportToCsv() {
3108
- return this.agGridAdapter.isAgGridModuleRegistered('CsvExport');
3146
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('CsvExportModule');
3109
3147
  }
3110
3148
  isQuickFilterAvailable() {
3111
3149
  if (this.api.layoutApi.isCurrentLayoutPivot() &&