@adaptabletools/adaptable-cjs 18.0.0-canary.2 → 18.0.0-canary.20

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 (367) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +5 -21
  3. package/base.css +22 -8
  4. package/base.css.map +1 -1
  5. package/index.css +101 -75
  6. package/index.css.map +1 -1
  7. package/package.json +4 -5
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +58 -108
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -7
  10. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +11 -4
  11. package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
  12. package/src/AdaptableOptions/CommentOptions.d.ts +33 -0
  13. package/src/AdaptableOptions/GroupingOptions.d.ts +0 -7
  14. package/src/AdaptableOptions/MenuOptions.d.ts +6 -54
  15. package/src/AdaptableOptions/MenuOptions.js +72 -75
  16. package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +7 -4
  17. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  18. package/src/Api/AdaptableApi.d.ts +9 -4
  19. package/src/Api/BulkUpdateApi.d.ts +0 -5
  20. package/src/Api/ColumnApi.d.ts +4 -0
  21. package/src/Api/CommentApi.d.ts +11 -12
  22. package/src/Api/ConfigApi.d.ts +4 -5
  23. package/src/Api/EventApi.d.ts +7 -9
  24. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  25. package/src/Api/Events/CommentChanged.d.ts +11 -0
  26. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  27. package/src/Api/GridApi.d.ts +23 -13
  28. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  29. package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
  30. package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
  31. package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
  32. package/src/Api/Implementation/ApiBase.d.ts +5 -3
  33. package/src/Api/Implementation/ApiBase.js +8 -2
  34. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  35. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  36. package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
  37. package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
  38. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/ColumnApiImpl.js +10 -0
  40. package/src/Api/Implementation/CommentsApiImpl.d.ts +5 -2
  41. package/src/Api/Implementation/CommentsApiImpl.js +7 -1
  42. package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
  43. package/src/Api/Implementation/ConfigApiImpl.js +21 -13
  44. package/src/Api/Implementation/GridApiImpl.d.ts +6 -3
  45. package/src/Api/Implementation/GridApiImpl.js +49 -14
  46. package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
  47. package/src/Api/Implementation/LayoutApiImpl.js +18 -0
  48. package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
  49. package/src/Api/Implementation/NoteApiImpl.js +45 -0
  50. package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
  51. package/src/Api/Implementation/OptionsApiImpl.js +4 -4
  52. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  53. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  54. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  55. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  56. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  57. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
  58. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
  59. package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
  60. package/src/Api/Internal/ActionRowInternalApi.js +107 -0
  61. package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -7
  62. package/src/Api/Internal/AdaptableInternalApi.js +21 -19
  63. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  64. package/src/Api/Internal/CalculatedColumnInternalApi.js +72 -0
  65. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
  66. package/src/Api/Internal/ColumnFilterInternalApi.js +23 -1
  67. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  68. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  69. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  70. package/src/Api/Internal/CommentsInternalApi.js +18 -0
  71. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  72. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  73. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  74. package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
  75. package/src/Api/Internal/ExportInternalApi.js +4 -1
  76. package/src/Api/Internal/Fdc3InternalApi.js +2 -2
  77. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  78. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  79. package/src/Api/Internal/FreeTextColumnInternalApi.js +61 -0
  80. package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
  81. package/src/Api/Internal/GridFilterInternalApi.js +7 -1
  82. package/src/Api/Internal/GridInternalApi.d.ts +23 -3
  83. package/src/Api/Internal/GridInternalApi.js +141 -7
  84. package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
  85. package/src/Api/Internal/LayoutInternalApi.js +16 -0
  86. package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
  87. package/src/Api/Internal/NoteInternalApi.js +18 -0
  88. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  89. package/src/Api/InteropioPluginApi.d.ts +2 -2
  90. package/src/Api/LayoutApi.d.ts +15 -0
  91. package/src/Api/NoteApi.d.ts +48 -0
  92. package/src/Api/OptionsApi.d.ts +8 -8
  93. package/src/Api/ScopeApi.d.ts +10 -0
  94. package/src/Api/UserInterfaceApi.d.ts +0 -11
  95. package/src/EnvVars.d.ts +3 -0
  96. package/src/EnvVars.js +8 -0
  97. package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
  98. package/src/PredefinedConfig/CommentState.d.ts +27 -23
  99. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  100. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  101. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  102. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  103. package/src/PredefinedConfig/Common/AggregationColumns.js +5 -1
  104. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +4 -0
  105. package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
  106. package/src/PredefinedConfig/Common/Enums.js +1 -0
  107. package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
  108. package/src/PredefinedConfig/Common/Menu.js +98 -0
  109. package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
  110. package/src/PredefinedConfig/Common/RowSummary.js +20 -0
  111. package/src/PredefinedConfig/Common/TransposeConfig.d.ts +25 -0
  112. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  113. package/src/PredefinedConfig/Common/Types.js +4 -1
  114. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  115. package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
  116. package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
  117. package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
  118. package/src/PredefinedConfig/SystemState.d.ts +9 -3
  119. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  120. package/src/Redux/ActionsReducers/LayoutRedux.js +34 -11
  121. package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
  122. package/src/Redux/ActionsReducers/NoteRedux.js +89 -0
  123. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -1
  124. package/src/Redux/ActionsReducers/SystemRedux.js +19 -6
  125. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  126. package/src/Redux/Store/AdaptableStore.js +66 -76
  127. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
  128. package/src/Strategy/AdaptableModuleBase.d.ts +8 -8
  129. package/src/Strategy/AdaptableModuleBase.js +13 -15
  130. package/src/Strategy/AlertModule.d.ts +1 -2
  131. package/src/Strategy/AlertModule.js +3 -56
  132. package/src/Strategy/BulkUpdateModule.js +1 -1
  133. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  134. package/src/Strategy/CalculatedColumnModule.js +6 -26
  135. package/src/Strategy/CellSummaryModule.d.ts +8 -6
  136. package/src/Strategy/CellSummaryModule.js +78 -23
  137. package/src/Strategy/ChartingModule.d.ts +0 -1
  138. package/src/Strategy/ChartingModule.js +2 -22
  139. package/src/Strategy/ColumnFilterModule.d.ts +2 -3
  140. package/src/Strategy/ColumnFilterModule.js +44 -103
  141. package/src/Strategy/ColumnInfoModule.js +2 -0
  142. package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +2 -5
  143. package/src/Strategy/{CommentsModule.js → CommentModule.js} +19 -25
  144. package/src/Strategy/CustomSortModule.js +3 -2
  145. package/src/Strategy/DashboardModule.d.ts +1 -2
  146. package/src/Strategy/DashboardModule.js +9 -15
  147. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  148. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  149. package/src/Strategy/DataImportModule.d.ts +1 -1
  150. package/src/Strategy/DataImportModule.js +5 -5
  151. package/src/Strategy/DataSetModule.d.ts +1 -1
  152. package/src/Strategy/DataSetModule.js +1 -1
  153. package/src/Strategy/ExportModule.d.ts +1 -0
  154. package/src/Strategy/ExportModule.js +17 -2
  155. package/src/Strategy/Fdc3Module.js +3 -0
  156. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  157. package/src/Strategy/FlashingCellModule.js +6 -19
  158. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  159. package/src/Strategy/FormatColumnModule.js +6 -51
  160. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  161. package/src/Strategy/FreeTextColumnModule.js +1 -31
  162. package/src/Strategy/GridFilterModule.d.ts +0 -1
  163. package/src/Strategy/GridFilterModule.js +0 -37
  164. package/src/Strategy/GridInfoModule.js +2 -0
  165. package/src/Strategy/Interface/IModule.d.ts +0 -1
  166. package/src/Strategy/LayoutModule.d.ts +9 -3
  167. package/src/Strategy/LayoutModule.js +143 -63
  168. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  169. package/src/Strategy/NamedQueryModule.js +0 -19
  170. package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
  171. package/src/Strategy/NoteModule.js +62 -0
  172. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  173. package/src/Strategy/PlusMinusModule.js +2 -2
  174. package/src/Strategy/ScheduleModule.d.ts +1 -1
  175. package/src/Strategy/ScheduleModule.js +1 -1
  176. package/src/Strategy/SettingsPanelModule.js +3 -3
  177. package/src/Strategy/ShortcutModule.d.ts +1 -1
  178. package/src/Strategy/ShortcutModule.js +1 -1
  179. package/src/Strategy/SmartEditModule.js +1 -1
  180. package/src/Strategy/StyledColumnModule.d.ts +1 -1
  181. package/src/Strategy/StyledColumnModule.js +26 -26
  182. package/src/Strategy/SystemStatusModule.js +2 -2
  183. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  184. package/src/Strategy/TeamSharingModule.js +5 -5
  185. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  186. package/src/Strategy/ToolPanelModule.js +0 -23
  187. package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
  188. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  189. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  190. package/src/Utilities/Constants/GeneralConstants.js +3 -2
  191. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  192. package/src/Utilities/Constants/ModuleConstants.js +7 -7
  193. package/src/Utilities/Defaults/DefaultSettingsPanel.js +7 -6
  194. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
  195. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +430 -1
  196. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
  197. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  198. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  199. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
  200. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  201. package/src/Utilities/Extensions/ArrayExtensions.js +6 -1
  202. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  203. package/src/Utilities/Helpers/AdaptableHelper.js +20 -60
  204. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  205. package/src/Utilities/Helpers/Helper.js +6 -1
  206. package/src/Utilities/MenuItem.d.ts +7 -4
  207. package/src/Utilities/MenuItem.js +6 -3
  208. package/src/Utilities/ObjectFactory.d.ts +3 -3
  209. package/src/Utilities/ObjectFactory.js +4 -24
  210. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
  211. package/src/Utilities/Services/AggregatedScalarLiveValue.js +26 -19
  212. package/src/Utilities/Services/CellPopupService.js +2 -3
  213. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  214. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
  215. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  216. package/src/Utilities/Services/LicenseService/index.js +1 -186
  217. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  218. package/src/Utilities/Services/MetamodelService.js +6 -3
  219. package/src/Utilities/Services/ModuleService.js +4 -0
  220. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  221. package/src/Utilities/Services/QueryLanguageService.js +4 -3
  222. package/src/Utilities/Services/ReportService.d.ts +7 -5
  223. package/src/Utilities/Services/ReportService.js +238 -22
  224. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  225. package/src/Utilities/Services/RowEditService.js +3 -1
  226. package/src/Utilities/adaptableQlUtils.d.ts +2 -0
  227. package/src/Utilities/adaptableQlUtils.js +18 -0
  228. package/src/Utilities/license/decode.js +1 -70
  229. package/src/Utilities/license/hashing.js +1 -47
  230. package/src/View/AdaptableView.js +1 -3
  231. package/src/View/AdaptableViewFactory.js +2 -2
  232. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  233. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
  234. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  235. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
  236. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  237. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  238. package/src/View/Comments/CommentsEditor.js +24 -11
  239. package/src/View/Comments/CommentsPopup.js +20 -11
  240. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  241. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
  242. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +46 -0
  243. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
  244. package/src/View/Components/CellPopup/index.d.ts +1 -0
  245. package/src/View/Components/CellPopup/index.js +5 -2
  246. package/src/View/Components/FilterForm/FilterForm.js +20 -12
  247. package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
  248. package/src/View/Components/NewScopeComponent.js +34 -1
  249. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  250. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  251. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  252. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
  253. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  254. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  255. package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
  256. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  257. package/src/View/Components/ValueSelector/index.js +2 -2
  258. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  259. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -9
  260. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
  261. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
  262. package/src/View/GridFilter/GridFilterViewPanel.js +9 -5
  263. package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
  264. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  265. package/src/View/Layout/LayoutViewPanel.js +2 -1
  266. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  267. package/src/View/Layout/TransposedPopup.js +200 -0
  268. package/src/View/Layout/Wizard/LayoutWizard.js +36 -3
  269. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  270. package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
  271. package/src/View/Layout/Wizard/sections/RowSummarySection.js +181 -0
  272. package/src/View/License/LicenseWatermark.js +1 -66
  273. package/src/View/Note/NotePopup.d.ts +2 -0
  274. package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +19 -19
  275. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  276. package/src/View/Theme/ThemeSelector.js +2 -2
  277. package/src/agGrid/ActionColumnRenderer.js +7 -6
  278. package/src/agGrid/Adaptable.d.ts +3 -455
  279. package/src/agGrid/Adaptable.js +7 -5291
  280. package/src/agGrid/AdaptableAgGrid.d.ts +352 -0
  281. package/src/agGrid/AdaptableAgGrid.js +3968 -0
  282. package/src/agGrid/AdaptableLogger.js +78 -13
  283. package/src/agGrid/AgGridAdapter.d.ts +64 -0
  284. package/src/agGrid/AgGridAdapter.js +590 -0
  285. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  286. package/src/agGrid/AgGridColumnAdapter.js +836 -0
  287. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  288. package/src/agGrid/AgGridMenuAdapter.js +282 -0
  289. package/src/agGrid/AgGridOptionsService.d.ts +15 -0
  290. package/src/agGrid/AgGridOptionsService.js +80 -0
  291. package/src/agGrid/BadgeRenderer.js +1 -1
  292. package/src/agGrid/CheckboxRenderer.js +1 -1
  293. package/src/agGrid/FilterWrapper.d.ts +2 -2
  294. package/src/agGrid/FilterWrapper.js +1 -1
  295. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  296. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  297. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +74 -18
  298. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
  299. package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
  300. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
  301. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  302. package/src/agGrid/weightedAverage.d.ts +0 -2
  303. package/src/agGrid/weightedAverage.js +1 -56
  304. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  305. package/src/components/Datepicker/index.d.ts +1 -1
  306. package/src/components/Datepicker/index.js +10 -2
  307. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
  308. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
  309. package/src/components/ExpressionEditor/QueryBuilder/utils.js +3 -17
  310. package/src/components/InfiniteTable/index.js +2 -2
  311. package/src/components/Input/index.d.ts +1 -2
  312. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  313. package/src/components/Modal/index.d.ts +1 -0
  314. package/src/components/Modal/index.js +6 -4
  315. package/src/components/Select/Select.d.ts +3 -1
  316. package/src/components/Select/Select.js +4 -2
  317. package/src/components/Textarea/index.d.ts +2 -2
  318. package/src/components/icons/index.js +2 -0
  319. package/src/components/icons/note.js +2 -2
  320. package/src/components/icons/rows.d.ts +3 -0
  321. package/src/components/icons/rows.js +7 -0
  322. package/src/env.js +2 -2
  323. package/src/metamodel/adaptable.metamodel.d.ts +186 -32
  324. package/src/metamodel/adaptable.metamodel.js +1 -9316
  325. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  326. package/src/migration/AdaptableUpgradeHelper.js +52 -0
  327. package/src/migration/VersionUpgrade.d.ts +8 -0
  328. package/src/migration/VersionUpgrade.js +15 -0
  329. package/src/migration/VersionUpgrade17.d.ts +18 -0
  330. package/src/migration/VersionUpgrade17.js +347 -0
  331. package/src/migration/VersionUpgrade18.d.ts +5 -0
  332. package/src/migration/VersionUpgrade18.js +10 -0
  333. package/src/parser/src/parser.js +117 -1257
  334. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  335. package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
  336. package/src/parser/src/types.d.ts +7 -2
  337. package/src/types.d.ts +26 -19
  338. package/tsconfig.cjs.tsbuildinfo +1 -1
  339. package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
  340. package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
  341. package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
  342. package/src/Api/Implementation/NotesApiImpl.js +0 -44
  343. package/src/Api/NotesApi.d.ts +0 -48
  344. package/src/PredefinedConfig/CellAddress.d.ts +0 -13
  345. package/src/PredefinedConfig/CellAddress.js +0 -5
  346. package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -39
  347. package/src/Redux/ActionsReducers/NotesRedux.js +0 -87
  348. package/src/Strategy/NotesModule.js +0 -62
  349. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  350. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  351. package/src/View/Components/ScopeComponent.d.ts +0 -24
  352. package/src/View/Components/ScopeComponent.js +0 -138
  353. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  354. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
  355. package/src/View/Notes/NotesPopup.d.ts +0 -2
  356. package/src/agGrid/agGridHelper.d.ts +0 -57
  357. package/src/agGrid/agGridHelper.js +0 -691
  358. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  359. package/src/agGrid/agGridMenuHelper.js +0 -673
  360. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  361. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
  362. /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
  363. /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
  364. /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
  365. /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
  366. /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
  367. /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
@@ -2,10 +2,16 @@ import * as Redux from 'redux';
2
2
  import { AdaptableState } from '../../../PredefinedConfig/AdaptableState';
3
3
  import { PredefinedConfig } from '../../../types';
4
4
  import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
5
+ export interface LoadStoreConfig {
6
+ adaptable: IAdaptable;
7
+ adaptableStateKey: string;
8
+ predefinedConfig?: PredefinedConfig;
9
+ postLoadHook?: (state: AdaptableState) => AdaptableState;
10
+ }
5
11
  export interface IAdaptableStore {
6
12
  TheStore: Redux.Store<AdaptableState>;
7
- Load: PromiseLike<any>;
8
- loadStore: (adaptable: IAdaptable, adaptableStateKey: string, predefinedConfig?: PredefinedConfig) => PromiseLike<any>;
13
+ Load: Promise<any>;
14
+ loadStore: (config: LoadStoreConfig) => Promise<any>;
9
15
  getCurrentStorageState: () => AdaptableState | void;
10
16
  saveStateNow: (adaptable: IAdaptable) => Promise<any>;
11
17
  on: (eventName: string, callback: (data?: any) => any) => () => void;
@@ -3,7 +3,7 @@ import { Action } from 'redux';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
5
5
  import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
6
- import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
6
+ import { AdaptableMenuItem, AdaptableContextMenuItemName, ContextMenuContext, AdaptableColumnMenuItemName } from '../PredefinedConfig/Common/Menu';
7
7
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
8
8
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
9
9
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
@@ -29,27 +29,27 @@ export declare abstract class AdaptableModuleBase implements IModule {
29
29
  */
30
30
  isModuleObjectsShareable(): boolean;
31
31
  isModuleEditable(): boolean;
32
- updateOldConfig(): void;
33
32
  getModuleAdaptableObjects(): AdaptableObject[];
34
33
  getExplicitlyReferencedColumnIds(adaptableObject: AdaptableObject): string[];
35
34
  getReferencedNamedQueryNames(adaptableObject: AdaptableObject): string[];
36
35
  hasNamedQueryReferences(): boolean;
37
- handleAdaptableReady(): void;
38
- handleConfigReloaded(adaptableStateReloadedInfo: AdaptableStateReloadedInfo): void;
36
+ onAdaptableReady(): void;
37
+ onAdaptableStateReloaded(adaptableStateReloadedInfo: AdaptableStateReloadedInfo): void;
39
38
  setModuleEntitlement(): void;
40
39
  addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
41
40
  addModuleButtonMenuItem(): AdaptableMenuItem | undefined;
42
41
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
43
42
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
44
- createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }: {
43
+ createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }: {
44
+ Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
45
45
  Label: string;
46
46
  ComponentName: string;
47
47
  Icon: AdaptableSystemIconName;
48
48
  PopupParams?: ModuleParams;
49
49
  }): MenuItemShowPopup;
50
- createColumnMenuItemClickFunction(Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
51
- createColumnMenuItemReduxAction(Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
52
- createColumnMenuItemShowPopup(Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
50
+ createMenuItemClickFunction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
51
+ createMenuItemReduxAction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
52
+ createMenuItemShowPopup(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
53
53
  getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
54
54
  getModuleNamedQueryReferences(): string[];
55
55
  getModuleCalculatedColumnReferences(): CalculatedColumn[];
@@ -20,11 +20,11 @@ class AdaptableModuleBase {
20
20
  };
21
21
  this.api = api;
22
22
  this.api.eventApi.on('AdaptableReady', () => {
23
- this.handleAdaptableReady();
23
+ this.onAdaptableReady();
24
24
  this.api.configApi.dispatchStateReadyAction(this.moduleInfo.ModuleName);
25
25
  });
26
26
  this.api.eventApi.on('AdaptableStateReloaded', (adaptableStateReloadedInfo) => {
27
- this.handleConfigReloaded(adaptableStateReloadedInfo);
27
+ this.onAdaptableStateReloaded(adaptableStateReloadedInfo);
28
28
  });
29
29
  }
30
30
  getViewAccessLevel() {
@@ -47,9 +47,6 @@ class AdaptableModuleBase {
47
47
  isModuleEditable() {
48
48
  return this.hasRequiredAccessLevel(this.getEditAccessLevel());
49
49
  }
50
- updateOldConfig() {
51
- // override where deprecated configs have to be migrated
52
- }
53
50
  getModuleAdaptableObjects() {
54
51
  // override where necessary in base classes
55
52
  return [];
@@ -67,10 +64,10 @@ class AdaptableModuleBase {
67
64
  // this will skip the unnecessary evaluation of modules which do not have Named Query references
68
65
  return true;
69
66
  }
70
- handleAdaptableReady() {
67
+ onAdaptableReady() {
71
68
  // override where necessary in base classes
72
69
  }
73
- handleConfigReloaded(adaptableStateReloadedInfo) {
70
+ onAdaptableStateReloaded(adaptableStateReloadedInfo) {
74
71
  // override where necessary in base classes
75
72
  }
76
73
  setModuleEntitlement() {
@@ -85,6 +82,7 @@ class AdaptableModuleBase {
85
82
  maxWidth: this.getPopupMaxWidth(),
86
83
  };
87
84
  return this.createMainMenuItemShowPopup({
85
+ Name: 'internal',
88
86
  Label: this.moduleInfo.FriendlyName,
89
87
  ComponentName: this.moduleInfo.Popup,
90
88
  Icon: this.moduleInfo.Glyph,
@@ -105,20 +103,20 @@ class AdaptableModuleBase {
105
103
  return undefined;
106
104
  }
107
105
  // creates the menu items in the main dropdown
108
- createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }) {
109
- return new MenuItem_1.MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
106
+ createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }) {
107
+ return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
110
108
  }
111
109
  // creates a menu item for the column menu to perform a function
112
- createColumnMenuItemClickFunction(Label, Icon, ClickFunction) {
113
- return new MenuItem_1.MenuItemDoClickFunction(Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
110
+ createMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
111
+ return new MenuItem_1.MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
114
112
  }
115
113
  // creates a menu item for the column menu to enact a Redux action
116
- createColumnMenuItemReduxAction(Label, Icon, Action) {
117
- return new MenuItem_1.MenuItemDoReduxAction(Label, this.moduleInfo.ModuleName, Action, Icon, true);
114
+ createMenuItemReduxAction(Name, Label, Icon, Action) {
115
+ return new MenuItem_1.MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
118
116
  }
119
117
  // popups called by the column menu - invisible if module is hidden or readonly
120
- createColumnMenuItemShowPopup(Label, ComponentName, Icon, PopupParams) {
121
- return new MenuItem_1.MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
118
+ createMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
119
+ return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
122
120
  }
123
121
  getTeamSharingAction() {
124
122
  return undefined;
@@ -8,13 +8,12 @@ import { AdaptableModuleView, AdaptableObjectCompactView, AdaptableObjectView, I
8
8
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
9
9
  export declare class AlertModule extends AdaptableModuleBase implements IModule {
10
10
  constructor(api: AdaptableApi);
11
+ onAdaptableReady(): void;
11
12
  getModuleAdaptableObjects(config?: {
12
13
  includeLayoutNotAssociatedObjects?: boolean;
13
14
  }): AdaptableObject[];
14
15
  getExplicitlyReferencedColumnIds(alertDefinition: AlertDefinition): string[];
15
16
  getReferencedNamedQueryNames(alertDefinition: AlertDefinition): string[];
16
- updateOldConfig(): void;
17
- private updateAlertSingleToMultiplePredicates;
18
17
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
19
18
  private handleCellDataChanged;
20
19
  private handleGridDataChanged;
@@ -17,12 +17,12 @@ const AlertEmptyView_1 = require("../View/Alert/AlertEmptyView");
17
17
  const AlertStatusSubPanel_1 = require("../View/Alert/AlertStatusSubPanel");
18
18
  const ActiveAlertsPanelItemLabel_1 = require("../View/Alert/ActiveAlertsPanelItemLabel");
19
19
  const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
20
- const updateSingleToMultiplePredicates_1 = require("./Utilities/updateSingleToMultiplePredicates");
21
- const Helper_1 = require("../Utilities/Helpers/Helper");
22
20
  const getAlertType_1 = require("../View/Alert/Utilities/getAlertType");
23
21
  class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
24
22
  constructor(api) {
25
23
  super(ModuleConstants.AlertModuleId, ModuleConstants.AlertModuleFriendlyName, 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
24
+ }
25
+ onAdaptableReady() {
26
26
  this.api.internalApi
27
27
  .getDataService()
28
28
  .on('CellDataChanged', (cellDataChangedInfo) => {
@@ -75,59 +75,6 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
75
75
  }
76
76
  return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
77
77
  }
78
- updateOldConfig() {
79
- var _a;
80
- this.updateAlertSingleToMultiplePredicates();
81
- // 1. Make all (new) Flashing Cells have a Predicate if none exists
82
- const alertState = this.api.alertApi.getAlertState();
83
- const flashingAlertDefinitions = alertState.FlashingAlertDefinitions;
84
- const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
85
- if (ArrayExtensions_1.ArrayExtensions.IsEmpty(flashingCellDefinitions) &&
86
- ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(flashingAlertDefinitions)) {
87
- this.api.flashingCellApi.setFlashingCellDefinitions(flashingAlertDefinitions);
88
- // TODO: state does not clear
89
- this.api.flashingCellApi.internalApi.clearFlashingCellState();
90
- }
91
- (_a = alertState.AlertDefinitions) === null || _a === void 0 ? void 0 : _a.forEach((alertDefinition) => {
92
- // if ShowPopup then change to DisplayNotificate
93
- if (alertDefinition.AlertProperties &&
94
- alertDefinition.AlertProperties.ShowPopup &&
95
- alertDefinition.AlertProperties.ShowPopup == true &&
96
- !alertDefinition.AlertProperties.DisplayNotification) {
97
- alertDefinition.AlertProperties.DisplayNotification = true;
98
- alertDefinition.AlertProperties.ShowPopup = undefined;
99
- }
100
- // if no rule but a predicate then use that
101
- if (!alertDefinition.Rule) {
102
- if (alertDefinition.Predicate && alertDefinition.Predicate != undefined) {
103
- const predicate = alertDefinition.Predicate;
104
- alertDefinition.Rule = {
105
- Predicate: predicate,
106
- };
107
- alertDefinition.Predicate = undefined;
108
- }
109
- }
110
- else {
111
- //migrate alert definitions with `AggregationExpression` (now `AggregatedBooleanExpression`)
112
- const obsoleteAggregationExpression = alertDefinition.Rule['AggregationExpression'];
113
- if (obsoleteAggregationExpression) {
114
- alertDefinition.Rule.AggregatedBooleanExpression = obsoleteAggregationExpression;
115
- }
116
- }
117
- });
118
- }
119
- updateAlertSingleToMultiplePredicates() {
120
- const alertDefinitions = this.api.alertApi.getAlertDefinitions({
121
- includeLayoutNotAssociatedObjects: true,
122
- });
123
- alertDefinitions.forEach((alertDefinition) => {
124
- if (alertDefinition.Rule && 'Predicate' in alertDefinition.Rule) {
125
- const preparedAlertDefinition = (0, Helper_1.cloneObject)(alertDefinition);
126
- (0, updateSingleToMultiplePredicates_1.updateSingleToMultiplePredicates)(preparedAlertDefinition.Rule);
127
- this.api.alertApi.editAlertDefinition(preparedAlertDefinition);
128
- }
129
- });
130
- }
131
78
  addContextMenuItems(menuContext) {
132
79
  const items = [];
133
80
  if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
@@ -140,7 +87,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
140
87
  relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
141
88
  }
142
89
  if (relevantAlert) {
143
- items.push(this.createColumnMenuItemReduxAction('Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
90
+ items.push(this.createMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
144
91
  }
145
92
  }
146
93
  }
@@ -26,7 +26,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
26
26
  let popUpParams = {
27
27
  source: 'ContextMenu',
28
28
  };
29
- menuItemShowPopup = this.createMainMenuItemShowPopup({
29
+ menuItemShowPopup = this.createMainMenuItemShowPopup({ Name: 'bulk-update-apply',
30
30
  Label: 'Apply Bulk Update',
31
31
  ComponentName: this.moduleInfo.Popup,
32
32
  Icon: this.moduleInfo.Glyph,
@@ -8,12 +8,11 @@ import { CalculatedColumn } from '../PredefinedConfig/CalculatedColumnState';
8
8
  import { AdaptableObjectItemView, IModule } from './Interface/IModule';
9
9
  import { AdaptableApi } from '../Api/AdaptableApi';
10
10
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
11
- import { AdaptableStateReloadedInfo } from '../Api/Events/AdaptableStateReloaded';
12
11
  export declare class CalculatedColumnModule extends AdaptableModuleBase implements IModule {
13
12
  constructor(api: AdaptableApi);
14
- handleConfigReloaded(adaptableStateReloadedInfo: AdaptableStateReloadedInfo): void;
13
+ onAdaptableReady(): void;
14
+ onAdaptableStateReloaded(): void;
15
15
  getModuleAdaptableObjects(): AdaptableObject[];
16
- updateOldConfig(): void;
17
16
  getExplicitlyReferencedColumnIds(calculatedColumn: CalculatedColumn): string[];
18
17
  getReferencedNamedQueryNames(calculatedColumn: CalculatedColumn): string[];
19
18
  private isCalculatedColumn;
@@ -15,35 +15,15 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
15
15
  constructor(api) {
16
16
  super(ModuleConstants.CalculatedColumnModuleId, ModuleConstants.CalculatedColumnFriendlyName, 'chart-and-grid', 'CalculatedColumnPopup', 'Create bespoke columns whose cell value is derived dynamically from an Expression', api);
17
17
  }
18
- handleConfigReloaded(adaptableStateReloadedInfo) {
19
- // re-dispatch the CalculatedColumnReady action to recreate all the aggregated scalar columns
20
- this.api.internalApi.dispatchReduxAction(CalculatedColumnRedux.CalculatedColumnReady(this.api.calculatedColumnApi.getCalculatedColumnState()));
18
+ onAdaptableReady() {
19
+ this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
20
+ }
21
+ onAdaptableStateReloaded() {
22
+ this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
21
23
  }
22
24
  getModuleAdaptableObjects() {
23
25
  return this.api.calculatedColumnApi.getCalculatedColumns();
24
26
  }
25
- updateOldConfig() {
26
- const calcColumns = this.api.calculatedColumnApi.getCalculatedColumns();
27
- let oldCalculatedColumns = [];
28
- calcColumns.forEach((cc) => {
29
- if (cc.ColumnExpression && !cc.Query) {
30
- cc.Query = {
31
- ScalarExpression: cc.ColumnExpression,
32
- };
33
- cc.ColumnExpression = undefined;
34
- oldCalculatedColumns.push(cc);
35
- this.api.logWarn(`Updating incorrect Predefined Config for Calculated Column: ${cc.ColumnId}`);
36
- }
37
- if (!cc.CalculatedColumnSettings) {
38
- cc.CalculatedColumnSettings = {
39
- DataType: 'Number',
40
- };
41
- oldCalculatedColumns.push(cc);
42
- this.api.logWarn(`Updating incorrect Predefined Config for Calculated Column: ${cc.ColumnId}`);
43
- }
44
- });
45
- oldCalculatedColumns.forEach((oldCalcCol) => this.api.calculatedColumnApi.editCalculatedColumn(oldCalcCol));
46
- }
47
27
  getExplicitlyReferencedColumnIds(calculatedColumn) {
48
28
  var _a;
49
29
  return ((_a = this.api.expressionApi.getColumnsFromExpression(this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query))) !== null && _a !== void 0 ? _a : []);
@@ -81,7 +61,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
81
61
  source: 'ColumnMenu',
82
62
  };
83
63
  return [
84
- this.createColumnMenuItemShowPopup('Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
64
+ this.createMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
85
65
  ];
86
66
  }
87
67
  getTeamSharingAction() {
@@ -1,19 +1,21 @@
1
1
  /// <reference types="react" />
2
- import { AdaptableModuleBase } from './AdaptableModuleBase';
3
- import { ICellSummaryModule } from './Interface/ICellSummaryModule';
4
- import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
5
- import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
6
2
  import { AdaptableApi } from '../Api/AdaptableApi';
7
- import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
8
- import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
9
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
+ import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
5
+ import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
6
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
7
+ import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
8
+ import { AdaptableModuleBase } from './AdaptableModuleBase';
9
+ import { ICellSummaryModule } from './Interface/ICellSummaryModule';
10
10
  export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
11
+ cachedCellSummary: WeakMap<SelectedCellInfo<any>, CellSummmary>;
11
12
  constructor(api: AdaptableApi);
12
13
  getViewAccessLevel(): AccessLevel;
13
14
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
14
15
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
15
16
  private createCellSummaryMenuItem;
16
17
  createCellSummary(selectedCellInfo: SelectedCellInfo): CellSummmary;
18
+ private getWeightedAverageCellSummary;
17
19
  getViewProperties(): {
18
20
  getStatusBarPanelProps(): {
19
21
  view: () => JSX.Element;
@@ -2,14 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CellSummaryModule = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
6
5
  const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
7
6
  const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
8
7
  const Helper_1 = require("../Utilities/Helpers/Helper");
8
+ const AggregatedScalarLiveValue_1 = require("../Utilities/Services/AggregatedScalarLiveValue");
9
9
  const CellSummaryStatusPanel_1 = require("../View/CellSummary/CellSummaryStatusPanel");
10
+ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
10
11
  class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
11
12
  constructor(api) {
12
13
  super(ModuleConstants.CellSummaryModuleId, ModuleConstants.CellSummaryFriendlyName, 'cells', 'CellSummaryPopup', 'See summary information on a group of cells using multiple summary operations', api);
14
+ this.cachedCellSummary = new WeakMap();
13
15
  }
14
16
  getViewAccessLevel() {
15
17
  return 'Full';
@@ -39,6 +41,7 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
39
41
  }
40
42
  createCellSummaryMenuItem(popUpParams) {
41
43
  return this.createMainMenuItemShowPopup({
44
+ Name: 'cell-summary-show',
42
45
  Label: 'See Cell Summary',
43
46
  ComponentName: this.moduleInfo.Popup,
44
47
  Icon: this.moduleInfo.Glyph,
@@ -46,6 +49,9 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
46
49
  });
47
50
  }
48
51
  createCellSummary(selectedCellInfo) {
52
+ if (this.cachedCellSummary.has(selectedCellInfo)) {
53
+ return this.cachedCellSummary.get(selectedCellInfo);
54
+ }
49
55
  let selectedCellSummary;
50
56
  if (selectedCellInfo && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.columns)) {
51
57
  let numericValues = [];
@@ -74,37 +80,65 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
74
80
  // copying so that we keep the order - needed for others
75
81
  const newNumericValues = [...numericValues];
76
82
  let hasNumericColumns = numericValues.length > 0;
77
- let distinctCount = ArrayExtensions_1.ArrayExtensions.RetrieveDistinct(allValues).length;
83
+ if (selectedCellInfo.columns.length > 1) {
84
+ return {
85
+ Sum: null,
86
+ Average: null,
87
+ Median: null,
88
+ Mode: null,
89
+ Distinct: null,
90
+ Max: null,
91
+ Min: null,
92
+ Count: null,
93
+ Std_Deviation: null,
94
+ Only: '',
95
+ };
96
+ }
97
+ const columnId = selectedCellInfo.columns[0].columnId;
98
+ const rowNodes = selectedCellInfo.gridCells.map((gc) => gc.rowNode);
99
+ const handleExpression = (functionName) => {
100
+ const aggScalarValue = new AggregatedScalarLiveValue_1.AggregatedScalarLiveValue({
101
+ aggregatedScalarExpression: `${functionName}([${columnId}])`,
102
+ }, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
103
+ let value = aggScalarValue.getGlobalAggregatedValue();
104
+ if (typeof value === 'number' && !isNaN(value)) {
105
+ value = Helper_1.Helper.roundNumber(value, 2);
106
+ }
107
+ return value;
108
+ };
109
+ const sumValue = hasNumericColumns ? handleExpression('SUM') : null;
110
+ const avgValue = hasNumericColumns ? Helper_1.Helper.roundNumber(handleExpression('AVG'), 2) : null;
111
+ const modeValue = hasNumericColumns ? handleExpression('MODE') : null;
112
+ const medianValue = hasNumericColumns ? handleExpression('MEDIAN') : null;
113
+ const distinctValue = handleExpression('DISTINCT');
114
+ const maxValue = hasNumericColumns ? handleExpression('MAX') : null;
115
+ const minValue = hasNumericColumns ? handleExpression('MIN') : null;
116
+ const stdDeviation = hasNumericColumns
117
+ ? Helper_1.Helper.roundNumberTo4dp(handleExpression('STD_DEVIATION'))
118
+ : null;
78
119
  selectedCellSummary = {
79
- Sum: hasNumericColumns
80
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.sumNumberArray(numericValues))
81
- : undefined,
82
- Average: hasNumericColumns
83
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.meanNumberArray(numericValues))
84
- : undefined,
85
- Median: hasNumericColumns
86
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.medianNumberArray(numericValues))
87
- : undefined,
88
- Mode: hasNumericColumns
89
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.modeNumberArray(numericValues))
90
- : undefined,
91
- Distinct: distinctCount,
92
- Max: hasNumericColumns ? Helper_1.Helper.roundNumberTo4dp(Math.max(...numericValues)) : undefined,
93
- Min: hasNumericColumns ? Helper_1.Helper.roundNumberTo4dp(Math.min(...numericValues)) : undefined,
120
+ Sum: sumValue,
121
+ Average: avgValue,
122
+ Median: medianValue,
123
+ Mode: modeValue,
124
+ Distinct: distinctValue,
125
+ Max: maxValue,
126
+ Min: minValue,
94
127
  Count: allValues.length,
95
- Std_Deviation: hasNumericColumns
96
- ? Helper_1.Helper.roundNumberTo4dp(Helper_1.Helper.standardDeviationNumberArray(numericValues))
97
- : undefined,
98
- Only: distinctCount == 1 ? JSON.stringify(allValues[0]) : '',
128
+ Std_Deviation: stdDeviation,
129
+ Only: distinctValue == 1 ? JSON.stringify(allValues[0]) : '',
99
130
  };
100
131
  numericValues = [...newNumericValues];
132
+ const weightedAverage = this.getWeightedAverageCellSummary(columnId, rowNodes);
133
+ if (weightedAverage !== null) {
134
+ selectedCellSummary.Weighted_Average = weightedAverage;
135
+ }
101
136
  const operationDefinitions = this.api.cellSummaryApi.getCellSummaryOperationDefinitions();
102
- const api = this.api;
103
137
  operationDefinitions === null || operationDefinitions === void 0 ? void 0 : operationDefinitions.forEach((operation) => {
104
138
  if (operation.operationFunction) {
105
139
  const cellSummaryOperationContext = {
106
140
  selectedCellInfo,
107
- distinctCount,
141
+ distinctCount: distinctValue,
108
142
  allValues,
109
143
  numericValues,
110
144
  numericColumns,
@@ -115,9 +149,30 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
115
149
  selectedCellSummary[operation.operationName] = operation.operationFunction(cellSummaryOperationContext);
116
150
  }
117
151
  });
152
+ this.cachedCellSummary.set(selectedCellInfo, selectedCellSummary);
118
153
  }
119
154
  return selectedCellSummary;
120
155
  }
156
+ getWeightedAverageCellSummary(columnId, rowNodes) {
157
+ const currentLayout = this.api.layoutApi.getCurrentLayout();
158
+ if (currentLayout.AggregationColumns == undefined) {
159
+ return false;
160
+ }
161
+ const weightedAverageConfig = Object.entries(currentLayout.AggregationColumns).find(([colId, aggCol]) => typeof aggCol === 'object' && aggCol.type === 'weightedAverage' && colId === columnId);
162
+ if (!weightedAverageConfig) {
163
+ return null;
164
+ }
165
+ const { weightedColumnId } = weightedAverageConfig[1];
166
+ const expression = `AVG([${columnId}], WEIGHT([${weightedColumnId}]))`;
167
+ const aggScalarValue = new AggregatedScalarLiveValue_1.AggregatedScalarLiveValue({
168
+ aggregatedScalarExpression: expression,
169
+ }, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
170
+ let value = aggScalarValue.getGlobalAggregatedValue();
171
+ if (typeof value === 'number' && !isNaN(value)) {
172
+ value = Helper_1.Helper.roundNumber(value, 2);
173
+ }
174
+ return value;
175
+ }
121
176
  getViewProperties() {
122
177
  return {
123
178
  getStatusBarPanelProps() {
@@ -5,7 +5,6 @@ import { ChartDefinition } from '../types';
5
5
  import { ExternalChartDefinition } from '../PredefinedConfig/ChartingState';
6
6
  export declare class ChartingModule extends AdaptableModuleBase implements IModule {
7
7
  constructor(api: AdaptableApi);
8
- updateOldConfig(): void;
9
8
  isModuleAvailable(): boolean;
10
9
  getModuleAdaptableObjects(): (ChartDefinition | ExternalChartDefinition)[];
11
10
  toViewAll(): AdaptableObjectView[];
@@ -10,34 +10,14 @@ const ChartingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/Cha
10
10
  const ChartingStatusBarPopover_1 = require("../View/Charting/ChartingStatusBarPopover");
11
11
  const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
12
12
  const ChartingState_1 = require("../PredefinedConfig/ChartingState");
13
+ const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
13
14
  class ChartingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
14
15
  constructor(api) {
15
16
  super(ModuleConstants.ChartingModuleId, ModuleConstants.ChartingFriendlyName, 'chart', 'ChartPopup', 'Create AG Grid Charts in order to see Adaptable Data visually', api);
16
17
  }
17
- updateOldConfig() {
18
- const allChartDefinitions = this.api.chartingApi.getChartDefinitions();
19
- const chartDefinitionsToUpdate = allChartDefinitions
20
- .filter((chartDefinition) => 'model' in chartDefinition || !('Name' in chartDefinition))
21
- .map((charDefinition) => {
22
- const newChartDefinition = Object.assign({}, charDefinition);
23
- if ('model' in newChartDefinition) {
24
- newChartDefinition.Model = charDefinition.model;
25
- delete newChartDefinition.model;
26
- }
27
- if (!('Name' in newChartDefinition)) {
28
- // default to chartId
29
- // @ts-ignore possible because First iteration had no 'Name' and model was under 'model' key (lowercase)
30
- newChartDefinition.Name = newChartDefinition.Model.chartId;
31
- }
32
- return newChartDefinition;
33
- });
34
- if (chartDefinitionsToUpdate.length > 0) {
35
- chartDefinitionsToUpdate.forEach((chartDefinition) => this.api.chartingApi.editChartDefinition(chartDefinition));
36
- }
37
- }
38
18
  isModuleAvailable() {
39
19
  const agChartsAvailable = this.api.chartingApi.isChartingEnabled() && super.isModuleAvailable();
40
- const externalChartsAvailable = this.api.optionsApi.getChartingOptions().externalChartingOptions;
20
+ const externalChartsAvailable = Helper_1.default.objectHasKeys(this.api.optionsApi.getChartingOptions().externalChartingOptions);
41
21
  return Boolean(agChartsAvailable || externalChartsAvailable);
42
22
  }
43
23
  getModuleAdaptableObjects() {
@@ -12,10 +12,9 @@ export declare class ColumnFilterModule extends AdaptableModuleBase implements I
12
12
  getModuleAdaptableObjects(): AdaptableObject[];
13
13
  getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
14
14
  hasNamedQueryReferences(): boolean;
15
- updateOldConfig(): void;
16
- handleAdaptableReady(): void;
17
- addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
15
+ onAdaptableReady(): void;
18
16
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
17
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
19
18
  private getExistingColumnFilter;
20
19
  getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
21
20
  toViewCompact(filter: ColumnFilter): AdaptableObjectCompactView;