@adaptabletools/adaptable-cjs 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 +3 -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 +25 -5
  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 +10 -10
  263. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
  264. package/src/Redux/ActionsReducers/StyledColumnRedux.js +15 -1
  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 +16 -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 +2 -1
  321. package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
  322. package/src/Utilities/Extensions/ArrayExtensions.js +68 -15
  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 +18 -6
  328. package/src/Utilities/getScopeViewItems.js +6 -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 +5 -5
  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 +0 -39
  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 +37 -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 +2 -2
  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 +65 -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 +53 -0
  386. package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
  387. package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +26 -37
  388. package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
  389. package/src/agGrid/AgGridModulesAdapter.js +70 -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 +4 -4
  396. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +1 -1
  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 +114 -22
  402. package/src/components/icons/DefaultIcon.d.ts +0 -1
  403. package/src/components/icons/DefaultIcon.js +0 -8
  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 +28 -0
  417. package/src/types.d.ts +8 -9
  418. package/tsconfig.cjs.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 -136
  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 -18
  425. package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
  426. package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -21
  427. /package/src/AdaptableState/Common/{ExtendedLayoutInfo.js → ExtendedLayout.js} +0 -0
@@ -102,6 +102,7 @@ const agGridDataTypeDefinitions_1 = require("./agGridDataTypeDefinitions");
102
102
  const AgGridThemeAdapter_1 = require("./AgGridThemeAdapter");
103
103
  const VersionUpgrade20_1 = require("../migration/VersionUpgrade20");
104
104
  const adaptableOverrideCheck_1 = require("../Utilities/adaptableOverrideCheck");
105
+ const AgGridModulesAdapter_1 = require("./AgGridModulesAdapter");
105
106
  const LocalEventService_Prototype = ag_grid_enterprise_1.LocalEventService.prototype;
106
107
  const LocalEventService_dispatchEvent = LocalEventService_Prototype.dispatchEvent;
107
108
  LocalEventService_Prototype.dispatchEvent = function (event) {
@@ -112,7 +113,12 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
112
113
  }
113
114
  LocalEventService_dispatchEvent.apply(this, arguments);
114
115
  if (event.type === 'cellChanged' || event.type === 'dataChanged') {
116
+ // @ts-ignore
115
117
  const eventRowNode = event.node;
118
+ if (!eventRowNode) {
119
+ AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No RowNode found in passed event, this should never happen!`, event);
120
+ return;
121
+ }
116
122
  const extractGridApiFromRowNode = (rowNode) => {
117
123
  const rowNodeApi = rowNode?.beans?.gridApi;
118
124
  if (!rowNodeApi) {
@@ -185,6 +191,7 @@ class AdaptableAgGrid {
185
191
  this.agGridColumnAdapter = new AgGridColumnAdapter_1.AgGridColumnAdapter(this);
186
192
  this.agGridExportAdapter = new AgGridExportAdapter_1.AgGridExportAdapter(this);
187
193
  this.agGridThemeAdapter = new AgGridThemeAdapter_1.AgGridThemeAdapter(this);
194
+ this.agGridModulesAdapter = new AgGridModulesAdapter_1.AgGridModulesAdapter(this);
188
195
  this.DataService = new DataService_1.DataService(this);
189
196
  }
190
197
  static forEachAdaptable(fn) {
@@ -352,26 +359,29 @@ class AdaptableAgGrid {
352
359
  this.lifecycleState = 'setupAgGrid';
353
360
  const gridOptions = config.gridOptions;
354
361
  // Needed here because special column defs are required for deriving the adaptable column state
355
- const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
362
+ let columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
356
363
  gridOptions.columnDefs = columnDefs;
357
364
  this.setInitialGridOptions(gridOptions, config.variant);
358
- const { gridState: initialGridState, layoutModel } = this.mapAdaptableStateToAgGridState(this.adaptableStore.TheStore.getState(), gridOptions.columnDefs, { isTree: !!gridOptions.treeData });
365
+ const { gridState: initialGridState, layoutModel } = this.mapAdaptableStateToAgGridState(this.adaptableStore.TheStore.getState(), gridOptions.columnDefs, {
366
+ isTree: !!gridOptions.treeData,
367
+ colTypes: gridOptions.columnTypes,
368
+ defaultColDef: gridOptions.defaultColDef,
369
+ });
370
+ columnDefs = src_1.LayoutManager.getColumnDefsChangesForLayout(layoutModel, columnDefs) ?? columnDefs;
371
+ gridOptions.columnDefs = columnDefs;
359
372
  gridOptions.initialState = initialGridState;
360
373
  if (layoutModel) {
361
374
  if ((0, isPivotLayoutModel_1.isPivotLayoutModel)(layoutModel)) {
362
375
  gridOptions.pivotDefaultExpanded = layoutModel.PivotExpandLevel;
363
376
  }
364
- else {
365
- gridOptions.groupDisplayType =
366
- layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
367
- }
377
+ gridOptions.groupDisplayType =
378
+ layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
379
+ // fixes issue #3053
380
+ gridOptions.suppressAggFuncInHeader = !!layoutModel.SuppressAggFuncInHeader;
368
381
  }
369
382
  this.lifecycleState = 'initAgGrid';
370
383
  this.agGridAdapter.initialGridOptions = gridOptions;
371
384
  const perfInitAgGrid = this.logger.beginPerf(`initAgGrid()`);
372
- // AG Grid evaluates early on the floatingFilter params, so we need to "suppress" the floating filter temporarily
373
- // we will reset it once Adaptable is ready
374
- this.agGridColumnAdapter.setupColumnFloatingFilterTemporarily(gridOptions);
375
385
  this.validateColumnDefTypes(gridOptions.columnDefs);
376
386
  const agGridApi = await this.initializeAgGrid(gridOptions, config.modules, config.renderAgGridFrameworkComponent);
377
387
  if (agGridApi === false) {
@@ -410,7 +420,9 @@ class AdaptableAgGrid {
410
420
  this.agGridAdapter.monkeyPatchingGridOptionsUpdates();
411
421
  this.agGridAdapter.monkeyPatchingAggColumnFilters();
412
422
  this.lifecycleState = 'agGridReady';
413
- this.logger.info(`Registered AG Grid modules: `, this.agGridAdapter.getAgGridRegisteredModuleNames().sort());
423
+ this.api.entitlementApi.internalApi.setModulesAgGridDepsInfos();
424
+ this.ModuleService.logMissingAgGridDepsInfos();
425
+ this.logger.info(`Registered AG Grid modules (incl. dependent modules): `, this.agGridModulesAdapter.getAgGridRegisteredModuleNames().sort());
414
426
  /**
415
427
  * At this point AG Grid is initialized!
416
428
  */
@@ -422,6 +434,9 @@ class AdaptableAgGrid {
422
434
  this.validatePrimaryKey();
423
435
  // TODO AFL MIG: we could just patch the defautl Layout on init? instead
424
436
  this.checkShouldClearExistingFiltersOrSearches();
437
+ // FIXME AFL FILTER: talk with Radu: should ColumnFilters still be ignored?!
438
+ // see layoutModel.Ignore_ColumnFilters
439
+ // initial filter model
425
440
  this.applyFiltering();
426
441
  // apply quick search if there is one
427
442
  // yes, we could have put this on the gridOptions.findSearchValue
@@ -440,19 +455,6 @@ class AdaptableAgGrid {
440
455
  (0, LayoutHelpers_1.checkForDuplicateColumns)(currentLayout);
441
456
  this._prevLayout = currentLayout;
442
457
  this.__prevLayoutForRefresh = currentLayout;
443
- if ((0, LayoutHelpers_1.isPivotLayout)(currentLayout)) {
444
- // this is very very strange!
445
- // for some projects, if the initial layout is pivot, the columnDefs of the pivot resutl columns are NOT derived correctly from the main colDefs
446
- // doing the following line fixes the issue because it foces the pivot columns to be created again
447
- // this proj works without the hack: /tests/pages/format-column/initial-pivot-layout.page.tsx
448
- // but this proj needs the hack: /tests/pages/format-column/initial-pivot-layout-docs.page.tsx
449
- this.agGridAdapter.setGridOption('pivotMode', false);
450
- this.agGridAdapter.setGridOption('pivotMode', true);
451
- // also quick search is not working initially, although the setupColumns is called correctly
452
- // so we need to do this to make it work
453
- // see test /tests/pages/quick-search/pivot-search.spec.ts
454
- this.updateColumnModelAndRefreshGrid();
455
- }
456
458
  const layoutModelForApply = (0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout);
457
459
  this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues, layoutModelForApply.RowGroupedColumns);
458
460
  this.layoutManager.applyColumnGroupCollapseExpandState(layoutModelForApply);
@@ -576,21 +578,27 @@ You need to define at least one Layout!`);
576
578
  normalize: true,
577
579
  });
578
580
  }
579
- applyFiltering() {
581
+ applyFiltering(config) {
582
+ // default updateColumnFilterModel to TRUE, if not provided
583
+ const updateColumnFilterModel = config?.updateColumnFilterModel ?? true;
580
584
  const agGridApi = this.agGridAdapter.getAgGridApi();
581
- this._emit('AdapTableFiltersApplied');
585
+ if (updateColumnFilterModel) {
586
+ const columnFilters = this.api.filterApi.columnFilterApi
587
+ .getActiveColumnFilters()
588
+ // FIXME AFL: we need this additional filter because 'getActiveColumnFilters' checks only for suspended while 'isColumnFilterActive' also checkss for COMPLETE filters
589
+ .filter((columnFilter) => this.api.filterApi.columnFilterApi.isColumnFilterActive(columnFilter));
590
+ const filterModel = {};
591
+ columnFilters.forEach((columnFilter) => {
592
+ filterModel[columnFilter.ColumnId] = columnFilter;
593
+ });
594
+ agGridApi.setFilterModel(filterModel);
595
+ }
596
+ // FIXME AFL FILTER why is this needed???
582
597
  this.refreshSelectedCellsState();
583
598
  this.refreshSelectedRowsState();
584
- this.agGridAdapter.updateColumnFilterActiveState();
585
599
  agGridApi.onFilterChanged();
600
+ this._emit('AdapTableFiltersApplied');
586
601
  }
587
- // refreshAgGridWithAdaptableState() {
588
- // this.refreshColDefs();
589
- // this.api.themeApi.applyCurrentTheme();
590
- // this.api.internalApi.setTreeMode(this.agGridAdapter.initialGridOptions.treeData);
591
- // this.checkShouldClearExistingFiltersOrSearches();
592
- // this.applyColumnFiltering();
593
- // }
594
602
  showQuickFilter() {
595
603
  const height = this.api.optionsApi.getFilterOptions().columnFilterOptions.quickFilterHeight;
596
604
  this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', height);
@@ -644,12 +652,15 @@ You need to define at least one Layout!`);
644
652
  */
645
653
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColDef', (original_defaultColDef) => {
646
654
  if (original_defaultColDef?.headerValueGetter) {
647
- this.logger.warn(`defaultColDef.headerValueGetter and overrides the Adaptable custom header mechanism! We recommend using a ColumnOptions.tableColumnHeader instead!`);
655
+ this.logger.warn(`defaultColDef.headerValueGetter and overrides the Adaptable custom header mechanism! We recommend using a ColumnOptions.columnHeader instead!`);
648
656
  return original_defaultColDef;
649
657
  }
658
+ // #customize_header
650
659
  const defaultColDef = { ...original_defaultColDef };
651
660
  defaultColDef.headerValueGetter = (0, adaptableOverrideCheck_1.tagProvidedByAdaptable)((params) => {
652
- return this.api.columnApi.internalApi.getColumnHeaderName(params);
661
+ const columnHeaderName = this.api.columnApi.internalApi.getColumnHeaderName(params);
662
+ const formattedHeaderName = this.api.formatColumnApi.internalApi.formatColumnHeaderName(columnHeaderName, params);
663
+ return formattedHeaderName;
653
664
  });
654
665
  return defaultColDef;
655
666
  });
@@ -771,22 +782,36 @@ You need to define at least one Layout!`);
771
782
  ? true
772
783
  : original_allowContextMenuWithControlKey;
773
784
  });
785
+ /**
786
+ * `enableFilterHandlers`
787
+ */
788
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'enableFilterHandlers', (original_enableFilterHandlers) => {
789
+ const useAdaptableFiltering = this.api.optionsApi.getFilterOptions().useAdaptableFiltering;
790
+ if (useAdaptableFiltering) {
791
+ return true;
792
+ }
793
+ return original_enableFilterHandlers;
794
+ });
795
+ /**
796
+ * `suppressSetFilterByDefault`
797
+ */
798
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'suppressSetFilterByDefault', (original_suppressSetFilterByDefault) => {
799
+ const useAdaptableFiltering = this.api.optionsApi.getFilterOptions().useAdaptableFiltering;
800
+ if (useAdaptableFiltering) {
801
+ return true;
802
+ }
803
+ return original_suppressSetFilterByDefault;
804
+ });
774
805
  /**
775
806
  * `isExternalFilterPresent`
776
807
  */
777
808
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'isExternalFilterPresent', (original_isExternalFilterPresent) => {
778
809
  return (params) => {
779
810
  if (!this.isAvailable) {
780
- return true;
811
+ return false;
781
812
  }
782
813
  const isGridFilterActive = StringExtensions_1.default.IsNotNullOrEmpty(this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression());
783
- const isTableColumnFiltersActive = ArrayExtensions_1.default.IsNotNullOrEmpty(this.api.filterApi.columnFilterApi
784
- .getActiveColumnFilters()
785
- .filter((columnFilter) => !this.api.columnApi.isPivotResultColumn(columnFilter.ColumnId)));
786
814
  return (isGridFilterActive ||
787
- // only Table ColumnFilters are handled here
788
- // see #doAggregateFiltersPassMonkeyPatcher for filtering Pivot Columns
789
- isTableColumnFiltersActive ||
790
815
  // it means that userPropertyValue will be called so we re-init that collection
791
816
  (original_isExternalFilterPresent ? original_isExternalFilterPresent(params) : false));
792
817
  };
@@ -814,20 +839,11 @@ You need to define at least one Layout!`);
814
839
  return true;
815
840
  }
816
841
  }
817
- // first assess if the Row i s filterable - if not, then return true so it appears in Grid
818
- const isRowFilterable = this.api.optionsApi.getFilterOptions().isRowFilterable;
819
- if (typeof isRowFilterable === 'function') {
820
- const rowFilterableContext = {
821
- ...this.api.internalApi.buildBaseContext(),
822
- rowNode: node,
823
- data: node.data,
824
- };
825
- if (!isRowFilterable(rowFilterableContext)) {
826
- return true;
827
- }
842
+ // first assess if the Row is filterable - if not, then return true so it always appears in Grid
843
+ const isRowFilterable = this.api.gridApi.internalApi.isRowFilterable(node);
844
+ if (!isRowFilterable) {
845
+ return true;
828
846
  }
829
- // get the Primary Key Value for the Row Node being evaluated
830
- const primaryKey = this.getPrimaryKeyValueFromRowNode(node);
831
847
  // next we assess a Grid Filter (if its running locally)
832
848
  const currentGridFilterExpression = this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
833
849
  if (StringExtensions_1.default.IsNotNullOrEmpty(currentGridFilterExpression)) {
@@ -847,29 +863,6 @@ You need to define at least one Layout!`);
847
863
  }
848
864
  }
849
865
  }
850
- // finally we evaluate column filters
851
- const tableColumnFilters = this.api.filterApi.columnFilterApi
852
- .getActiveColumnFilters()
853
- .filter((columnFilter) => !this.api.columnApi.isPivotResultColumn(columnFilter.ColumnId));
854
- try {
855
- // only Table ColumnFilters are handled here
856
- // see #doAggregateFiltersPassMonkeyPatcher for filtering Pivot Columns
857
- if (tableColumnFilters.length > 0) {
858
- for (const columnFilter of tableColumnFilters) {
859
- const evaluateColumnFilterOnClient = this.api.expressionApi.internalApi.shouldEvaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, columnFilter.Predicates);
860
- if (evaluateColumnFilterOnClient) {
861
- const columnFilterEvaluationResult = this.api.filterApi.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, node);
862
- if (!columnFilterEvaluationResult) {
863
- return false;
864
- }
865
- }
866
- }
867
- }
868
- }
869
- catch (ex) {
870
- this.logger.error(ex);
871
- return false;
872
- }
873
866
  const result = original_doesExternalFilterPass
874
867
  ? original_doesExternalFilterPass(node)
875
868
  : true;
@@ -917,107 +910,111 @@ You need to define at least one Layout!`);
917
910
  /**
918
911
  * `sidebar`
919
912
  */
920
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
921
- if (!original_sideBar) {
922
- // lucky us, no sideBar is defined, so we don't have to do anything
923
- return original_sideBar;
924
- }
925
- const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
926
- const adaptableToolPanelDef = {
927
- id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
928
- toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
929
- labelDefault: GeneralConstants.ADAPTABLE,
930
- labelKey: 'adaptable',
931
- iconKey: 'menu',
932
- width: UIHelper_1.default.getAdaptableToolPanelWidth(),
933
- minWidth: UIHelper_1.default.getAdaptableToolPanelWidth(),
934
- // maxWidth = undefined,
935
- };
936
- const mapToolPanelDefs = (toolPanelDefs = []) => {
937
- // if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
938
- return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
939
- ? adaptableToolPanelDef
940
- : toolPanelDef);
941
- };
942
- const isSideBarDefObject = (sidebarDef) => {
943
- return Array.isArray(sidebarDef?.toolPanels);
944
- };
945
- let result;
946
- if (original_sideBar === true) {
947
- // create all tool panels with default settings
948
- const toolPanels = [];
949
- toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_FILTERS);
950
- toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_COLUMNS);
951
- if (!isAdaptableToolPanelHidden) {
952
- toolPanels.push(adaptableToolPanelDef);
913
+ if (gridOptions.sideBar != undefined) {
914
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
915
+ if (!original_sideBar) {
916
+ // lucky us, no sideBar is defined, so we don't have to do anything
917
+ return original_sideBar;
953
918
  }
954
- result = {
955
- toolPanels: toolPanels,
919
+ const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
920
+ const adaptableToolPanelDef = {
921
+ id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
922
+ toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
923
+ labelDefault: GeneralConstants.ADAPTABLE,
924
+ labelKey: 'adaptable',
925
+ iconKey: 'menu',
926
+ width: UIHelper_1.default.getAdaptableToolPanelWidth(),
927
+ minWidth: UIHelper_1.default.getAdaptableToolPanelWidth(),
928
+ // maxWidth = undefined,
956
929
  };
957
- }
958
- // if there is only one tool panel, and it's the adaptable one => we have to handle it
959
- else if (typeof original_sideBar === 'string') {
960
- if (gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
961
- if (!isAdaptableToolPanelHidden)
962
- result = {
963
- toolPanels: [adaptableToolPanelDef],
964
- };
965
- }
966
- else {
967
- result = original_sideBar;
930
+ const mapToolPanelDefs = (toolPanelDefs = []) => {
931
+ // if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
932
+ return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
933
+ ? adaptableToolPanelDef
934
+ : toolPanelDef);
935
+ };
936
+ const isSideBarDefObject = (sidebarDef) => {
937
+ return Array.isArray(sidebarDef?.toolPanels);
938
+ };
939
+ let result;
940
+ if (original_sideBar === true) {
941
+ // create all tool panels with default settings
942
+ const toolPanels = [];
943
+ toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_FILTERS);
944
+ toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_COLUMNS);
945
+ if (!isAdaptableToolPanelHidden) {
946
+ toolPanels.push(adaptableToolPanelDef);
947
+ }
948
+ result = {
949
+ toolPanels: toolPanels,
950
+ };
968
951
  }
969
- }
970
- // if it's an array, process the tool panel definitions
971
- else if (Array.isArray(original_sideBar)) {
972
- if (!original_sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID) ||
973
- isAdaptableToolPanelHidden) {
974
- result = original_sideBar;
952
+ // if there is only one tool panel, and it's the adaptable one => we have to handle it
953
+ else if (typeof original_sideBar === 'string') {
954
+ if (gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
955
+ if (!isAdaptableToolPanelHidden)
956
+ result = {
957
+ toolPanels: [adaptableToolPanelDef],
958
+ };
959
+ }
960
+ else {
961
+ result = original_sideBar;
962
+ }
975
963
  }
976
964
  // if it's an array, process the tool panel definitions
977
- const sidebarDef = {};
978
- sidebarDef.toolPanels = mapToolPanelDefs(original_sideBar);
979
- result = sidebarDef;
980
- }
981
- // if it's fully-fledged SideBarDef, process its tool panel definitions
982
- else if (isSideBarDefObject(original_sideBar)) {
983
- if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
984
- toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
985
- !isAdaptableToolPanelHidden)) {
986
- // if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
987
- result = original_sideBar;
988
- }
989
- else {
990
- result = {
991
- ...original_sideBar,
992
- toolPanels: mapToolPanelDefs(original_sideBar.toolPanels),
993
- };
965
+ else if (Array.isArray(original_sideBar)) {
966
+ if (!original_sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID) ||
967
+ isAdaptableToolPanelHidden) {
968
+ result = original_sideBar;
969
+ }
970
+ // if it's an array, process the tool panel definitions
971
+ const sidebarDef = {};
972
+ sidebarDef.toolPanels = mapToolPanelDefs(original_sideBar);
973
+ result = sidebarDef;
994
974
  }
995
- }
996
- this.hasAdaptableToolPanel =
997
- isSideBarDefObject(result) &&
998
- result.toolPanels?.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
999
- toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID);
1000
- return result;
1001
- });
1002
- /**
1003
- * `statusBar`
1004
- */
1005
- this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
1006
- const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
1007
- if (statusPanel.statusPanel === StatusBarState_1.ADAPTABLE_STATUS_PANEL) {
1008
- this.adaptableStatusPanelKeys.push(statusPanel.key);
1009
- const context = {
1010
- Key: statusPanel.key,
1011
- };
1012
- return {
1013
- ...statusPanel,
1014
- statusPanel: (0, createAgStatusPanelComponent_1.createAgStatusPanelComponent)(AdaptableStatusBar_1.AdaptableStatusBar, this, context),
1015
- };
975
+ // if it's fully-fledged SideBarDef, process its tool panel definitions
976
+ else if (isSideBarDefObject(original_sideBar)) {
977
+ if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
978
+ toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
979
+ !isAdaptableToolPanelHidden)) {
980
+ // if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
981
+ result = original_sideBar;
982
+ }
983
+ else {
984
+ result = {
985
+ ...original_sideBar,
986
+ toolPanels: mapToolPanelDefs(original_sideBar.toolPanels),
987
+ };
988
+ }
1016
989
  }
1017
- return statusPanel;
990
+ this.hasAdaptableToolPanel =
991
+ isSideBarDefObject(result) &&
992
+ result.toolPanels?.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
993
+ toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID);
994
+ return result;
1018
995
  });
1019
- return { ...original_statusBar, statusPanels };
1020
- });
996
+ }
997
+ if (gridOptions.statusBar != undefined) {
998
+ /**
999
+ * `statusBar`
1000
+ */
1001
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
1002
+ const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
1003
+ if (statusPanel.statusPanel === StatusBarState_1.ADAPTABLE_STATUS_PANEL) {
1004
+ this.adaptableStatusPanelKeys.push(statusPanel.key);
1005
+ const context = {
1006
+ Key: statusPanel.key,
1007
+ };
1008
+ return {
1009
+ ...statusPanel,
1010
+ statusPanel: (0, createAgStatusPanelComponent_1.createAgStatusPanelComponent)(AdaptableStatusBar_1.AdaptableStatusBar, this, context),
1011
+ };
1012
+ }
1013
+ return statusPanel;
1014
+ });
1015
+ return { ...original_statusBar, statusPanels };
1016
+ });
1017
+ }
1021
1018
  /**
1022
1019
  * `getRowStyle`
1023
1020
  */
@@ -1137,7 +1134,6 @@ You need to define at least one Layout!`);
1137
1134
  result = await renderAgGridFrameworkComponent(gridOptions);
1138
1135
  }
1139
1136
  catch (err) {
1140
- console.log('Failed to get AG Grid API');
1141
1137
  result = false;
1142
1138
  }
1143
1139
  if (result === false) {
@@ -1148,7 +1144,6 @@ You need to define at least one Layout!`);
1148
1144
  // in that case, we have to re-populate it with the Adaptable context values
1149
1145
  const agGridContext = agGridApi.getGridOption('context');
1150
1146
  if (!agGridContext) {
1151
- console.log('Failed to get AG Grid context');
1152
1147
  return false;
1153
1148
  }
1154
1149
  if (!agGridContext.__adaptable) {
@@ -1188,9 +1183,6 @@ You need to define at least one Layout!`);
1188
1183
  useRowNodeLookUp() {
1189
1184
  return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
1190
1185
  }
1191
- getAgGridRegisteredModules() {
1192
- return this.agGridAdapter.getAgGridRegisteredModules();
1193
- }
1194
1186
  getAgGridContainerElement() {
1195
1187
  if (!this.DANGER_USE_GETTER_agGridContainerElement) {
1196
1188
  this.DANGER_USE_GETTER_agGridContainerElement =
@@ -1239,6 +1231,9 @@ You need to define at least one Layout!`);
1239
1231
  return selectedRowInfo;
1240
1232
  }
1241
1233
  isGridRowSelectable() {
1234
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('RowSelectionModule')) {
1235
+ return false;
1236
+ }
1242
1237
  const rowSelection = this.agGridAdapter.getAgGridApi().getGridOption('rowSelection');
1243
1238
  if (rowSelection == undefined) {
1244
1239
  return false;
@@ -1252,9 +1247,11 @@ You need to define at least one Layout!`);
1252
1247
  return false;
1253
1248
  }
1254
1249
  isGridRangeSelectable() {
1255
- return (this.agGridAdapter.isAgGridModuleRegistered('CellSelection') &&
1256
- (this.agGridAdapter.getGridOption('enableRangeSelection') ||
1257
- !!this.agGridAdapter.getGridOption('cellSelection')));
1250
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('CellSelectionModule')) {
1251
+ return false;
1252
+ }
1253
+ return (this.agGridAdapter.getGridOption('enableRangeSelection') ||
1254
+ !!this.agGridAdapter.getGridOption('cellSelection'));
1258
1255
  }
1259
1256
  initAdaptableStore() {
1260
1257
  const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
@@ -1406,8 +1403,7 @@ You need to define at least one Layout!`);
1406
1403
  'chartOptionsChanged',
1407
1404
  'chartDestroyed',
1408
1405
  ];
1409
- const chartingModule = this.ModuleService.getModuleById('Charting');
1410
- if (chartingModule.isModuleAvailable()) {
1406
+ if (this.ModuleService.isAdapTableModulePresent('Charting')) {
1411
1407
  // We need to break the loop of charting changes for 'chartOptionsChanged', which is triggered by the subsequent agGridApi.updateChart(...)
1412
1408
  // see #ag_grid_update_chart_loop
1413
1409
  let lastChartOptionsChangePayload = '';
@@ -1455,7 +1451,7 @@ You need to define at least one Layout!`);
1455
1451
  shouldAutoSizeLayout() {
1456
1452
  const { layoutApi } = this.api;
1457
1453
  const currentLayout = layoutApi.getCurrentLayout();
1458
- if (currentLayout.ColumnWidths && Object.keys(currentLayout.ColumnWidths).length > 0) {
1454
+ if (currentLayout.ColumnSizing && Object.keys(currentLayout.ColumnSizing).length > 0) {
1459
1455
  return;
1460
1456
  }
1461
1457
  return currentLayout.AutoSizeColumns;
@@ -1569,7 +1565,7 @@ You need to define at least one Layout!`);
1569
1565
  const adaptableStatusPanels = this.agGridAdapter
1570
1566
  .getAgGridApi()
1571
1567
  .getGridOption('statusBar')
1572
- ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
1568
+ ?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key)) ?? [];
1573
1569
  const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
1574
1570
  // need to add only the adaptable panels
1575
1571
  statusBarModule.syncStateWithOptions(adaptableStatusPanels);
@@ -1600,10 +1596,14 @@ You need to define at least one Layout!`);
1600
1596
  }
1601
1597
  }
1602
1598
  }
1599
+ isInPivotMode() {
1600
+ return (this.agGridModulesAdapter.isAgGridModuleRegistered('PivotModule') &&
1601
+ this.agGridAdapter.getAgGridApi().isPivotMode());
1602
+ }
1603
1603
  deriveAdaptableColumnStateFromAgGrid() {
1604
1604
  const allColumns = [];
1605
1605
  const gridApi = this.agGridAdapter.getAgGridApi();
1606
- const isPivot = gridApi.isPivotMode();
1606
+ const isPivot = this.isInPivotMode();
1607
1607
  let agGridCols = isPivot
1608
1608
  ? gridApi.getColumns()
1609
1609
  : // we call getAllGridColumns because we want to also have the generated group columns
@@ -2238,9 +2238,17 @@ You need to define at least one Layout!`);
2238
2238
  this.autoSizeColumns([columnId]);
2239
2239
  }
2240
2240
  autoSizeColumns(columnIds) {
2241
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
2242
+ this.logger.consoleError(`Could not auto-size columns [${columnIds}] - missing required AG Grid module 'ColumnAutoSizeModule'`);
2243
+ return;
2244
+ }
2241
2245
  this.layoutManager.autoSizeColumns(columnIds);
2242
2246
  }
2243
2247
  autoSizeAllColumns() {
2248
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
2249
+ this.logger.consoleError(`Could not auto-size all columns - missing required AG Grid module 'ColumnAutoSizeModule'`);
2250
+ return;
2251
+ }
2244
2252
  const agGridApi = this.agGridAdapter.getAgGridApi();
2245
2253
  if (agGridApi) {
2246
2254
  agGridApi.autoSizeAllColumns();
@@ -2251,6 +2259,7 @@ You need to define at least one Layout!`);
2251
2259
  }
2252
2260
  async getDistinctFilterValuesForColumn(options) {
2253
2261
  const { column } = options;
2262
+ const self = this;
2254
2263
  // First get the Grid Cells in the Column
2255
2264
  const currentGridCells = this.getDistinctGridCellsForColumn(column);
2256
2265
  // If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
@@ -2272,6 +2281,7 @@ You need to define at least one Layout!`);
2272
2281
  value: gridCell.rawValue,
2273
2282
  isSelected: gridCell.rowNode.displayed,
2274
2283
  count: gridCell.count,
2284
+ tooltip: false,
2275
2285
  get visible() {
2276
2286
  return gridCell.visible;
2277
2287
  },
@@ -2289,6 +2299,27 @@ You need to define at least one Layout!`);
2289
2299
  value: gridCell.rawValue,
2290
2300
  isSelected: gridCell.rowNode.displayed,
2291
2301
  count: gridCell.count,
2302
+ tooltip: false,
2303
+ get visible() {
2304
+ return gridCell.visible;
2305
+ },
2306
+ get visibleCount() {
2307
+ return gridCell.visibleCount;
2308
+ },
2309
+ };
2310
+ });
2311
+ return result;
2312
+ },
2313
+ get orderedValues() {
2314
+ const rowNodes = gridApiInternal.getSortedRowNodesWithCurrentLayoutSortOrder();
2315
+ const currentGridCells = self.getDistinctGridCellsForColumn(column, rowNodes);
2316
+ const result = currentGridCells.map((gridCell) => {
2317
+ return {
2318
+ label: gridCell.displayValue,
2319
+ value: gridCell.rawValue,
2320
+ isSelected: gridCell.rowNode.displayed,
2321
+ count: gridCell.count,
2322
+ tooltip: false,
2292
2323
  get visible() {
2293
2324
  return gridCell.visible;
2294
2325
  },
@@ -2307,12 +2338,16 @@ You need to define at least one Layout!`);
2307
2338
  catch (error) {
2308
2339
  this.logger.consoleError(`Failed to fetch custom filter values`, column, error);
2309
2340
  }
2310
- if (customDistinctValues) {
2311
- return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2312
- }
2341
+ return customDistinctValues ?? [];
2313
2342
  }
2314
2343
  // No distinct values so lets return unique grid cells
2315
- return currentGridCells;
2344
+ return currentGridCells.map((gridCell) => {
2345
+ const inFilterValue = {
2346
+ value: gridCell.rawValue,
2347
+ label: gridCell.displayValue,
2348
+ };
2349
+ return inFilterValue;
2350
+ });
2316
2351
  }
2317
2352
  async getDistinctEditValuesForColumn(options) {
2318
2353
  const { column, gridCell } = options;
@@ -2349,42 +2384,34 @@ You need to define at least one Layout!`);
2349
2384
  catch (error) {
2350
2385
  this.logger.consoleError(`Failed to fetch custom edit values`, column, error);
2351
2386
  }
2352
- if (customDistinctValues) {
2353
- return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
2354
- }
2387
+ return customDistinctValues ?? [];
2355
2388
  }
2356
2389
  }
2357
2390
  // No distinct values so lets return unique grid cells
2358
- return currentGridCells;
2391
+ return currentGridCells.map((gridCell) => {
2392
+ const result = {
2393
+ value: gridCell.rawValue,
2394
+ label: gridCell.displayValue,
2395
+ };
2396
+ return result;
2397
+ });
2359
2398
  }
2360
- getDistinctGridCellsForColumn(column) {
2399
+ getDistinctGridCellsForColumn(column, rowNodes) {
2361
2400
  let gridCells = [];
2362
2401
  const isPivotResultColumn = column.isGeneratedPivotResultColumn;
2363
- this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
2402
+ const rowNodeCallback = (rowNode) => {
2364
2403
  const gridCell = this.addDistinctColumnValue(rowNode, column.columnId, isPivotResultColumn);
2365
2404
  if (gridCell) {
2366
2405
  gridCells.push(gridCell);
2367
2406
  }
2368
- });
2369
- return this.getUniqueGridCells(column, gridCells);
2370
- }
2371
- getGridCellsForCustomColumnValues(customColumnValues, column) {
2372
- let gridCells = [];
2373
- if (ArrayExtensions_1.default.IsNotNullOrEmpty(customColumnValues)) {
2374
- gridCells = customColumnValues.map((pv) => {
2375
- return {
2376
- rawValue: pv.value,
2377
- displayValue: pv.label ?? pv.value,
2378
- normalisedValue: pv.value,
2379
- columnId: column.columnId,
2380
- column: column,
2381
- rowNode: undefined,
2382
- isPivotCell: false,
2383
- isRowGroupCell: false,
2384
- };
2385
- });
2386
- return gridCells;
2407
+ };
2408
+ if (rowNodes) {
2409
+ rowNodes.forEach(rowNodeCallback);
2387
2410
  }
2411
+ else {
2412
+ this.agGridAdapter.getAgGridApi().forEachNode(rowNodeCallback);
2413
+ }
2414
+ return this.getUniqueGridCells(column, gridCells);
2388
2415
  }
2389
2416
  addDistinctColumnValue(rowNode, columnId, isPivotResultColumn) {
2390
2417
  if (!rowNode) {
@@ -2721,11 +2748,11 @@ You need to define at least one Layout!`);
2721
2748
  });
2722
2749
  }
2723
2750
  canGenerateCharts() {
2724
- return (this.agGridAdapter.isAgGridModuleRegistered('IntegratedCharts') &&
2725
- this.agGridAdapter.getAgGridApi().getGridOption('enableCharts'));
2751
+ const chartingModule = this.ModuleService.getModuleById('Charting');
2752
+ return chartingModule.isModuleEnabled() && chartingModule.isModuleAvailable();
2726
2753
  }
2727
2754
  canDisplaySparklines() {
2728
- return this.agGridAdapter.isAgGridModuleRegistered('Sparklines');
2755
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('SparklinesModule');
2729
2756
  }
2730
2757
  showCharts(chartsDefinitions, chartContainer) {
2731
2758
  return chartsDefinitions.map((chartDefinition) => this.showChart(chartDefinition, chartContainer));
@@ -2803,12 +2830,20 @@ You need to define at least one Layout!`);
2803
2830
  return isGroupedActive;
2804
2831
  }
2805
2832
  setAgGridQuickSearch(searchText) {
2833
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('QuickFilterModule')) {
2834
+ this.logger.consoleError(`Can NOT set Quick Search text - missing required AG Grid module 'QuickFilterModule'`);
2835
+ return;
2836
+ }
2806
2837
  this.agGridAdapter.setGridOption('quickFilterText', searchText);
2807
2838
  }
2808
2839
  clearAgGridQuickSearch() {
2809
2840
  this.setAgGridQuickSearch('');
2810
2841
  }
2811
2842
  setAgGridFindSearchValue(searchText) {
2843
+ if (!this.agGridModulesAdapter.isAgGridModuleRegistered('FindModule')) {
2844
+ this.logger.consoleError(`Can NOT set Find Search text - missing required AG Grid module 'FindModule'`);
2845
+ return;
2846
+ }
2812
2847
  this.agGridAdapter.setGridOption('findSearchValue', searchText);
2813
2848
  }
2814
2849
  applyAdaptableTheme(theme) {
@@ -3014,6 +3049,7 @@ You need to define at least one Layout!`);
3014
3049
  'sideBar',
3015
3050
  'statusBar',
3016
3051
  'suppressAggFuncInHeader',
3052
+ 'defaultColDef',
3017
3053
  ]);
3018
3054
  if (liveGridOptions.components) {
3019
3055
  liveGridOptions.components.AdaptableToolPanel = null;
@@ -3045,6 +3081,8 @@ You need to define at least one Layout!`);
3045
3081
  this.agGridExportAdapter = null;
3046
3082
  this.agGridThemeAdapter?.destroy();
3047
3083
  this.agGridThemeAdapter = null;
3084
+ this.agGridModulesAdapter?.destroy();
3085
+ this.agGridModulesAdapter = null;
3048
3086
  this.rowListeners = null;
3049
3087
  this.emitter.destroy();
3050
3088
  this.emitter = null;
@@ -3106,10 +3144,10 @@ You need to define at least one Layout!`);
3106
3144
  this.unmountLoadingScreen = null;
3107
3145
  }
3108
3146
  canExportToExcel() {
3109
- return this.agGridAdapter.isAgGridModuleRegistered('ExcelExport');
3147
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('ExcelExportModule');
3110
3148
  }
3111
3149
  canExportToCsv() {
3112
- return this.agGridAdapter.isAgGridModuleRegistered('CsvExport');
3150
+ return this.agGridModulesAdapter.isAgGridModuleRegistered('CsvExportModule');
3113
3151
  }
3114
3152
  isQuickFilterAvailable() {
3115
3153
  if (this.api.layoutApi.isCurrentLayoutPivot() &&