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

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 (369) 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 +59 -108
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -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/StateOptions.d.ts +6 -0
  18. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  19. package/src/Api/AdaptableApi.d.ts +9 -4
  20. package/src/Api/BulkUpdateApi.d.ts +0 -5
  21. package/src/Api/ColumnApi.d.ts +4 -0
  22. package/src/Api/CommentApi.d.ts +13 -14
  23. package/src/Api/ConfigApi.d.ts +4 -5
  24. package/src/Api/EventApi.d.ts +7 -9
  25. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  26. package/src/Api/Events/CommentChanged.d.ts +11 -0
  27. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  28. package/src/Api/GridApi.d.ts +23 -13
  29. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  30. package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
  31. package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
  32. package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
  33. package/src/Api/Implementation/ApiBase.d.ts +5 -3
  34. package/src/Api/Implementation/ApiBase.js +8 -2
  35. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  36. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  37. package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
  38. package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
  39. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  40. package/src/Api/Implementation/ColumnApiImpl.js +10 -0
  41. package/src/Api/Implementation/CommentsApiImpl.d.ts +5 -2
  42. package/src/Api/Implementation/CommentsApiImpl.js +7 -1
  43. package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
  44. package/src/Api/Implementation/ConfigApiImpl.js +24 -13
  45. package/src/Api/Implementation/GridApiImpl.d.ts +6 -3
  46. package/src/Api/Implementation/GridApiImpl.js +51 -14
  47. package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
  48. package/src/Api/Implementation/LayoutApiImpl.js +18 -0
  49. package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
  50. package/src/Api/Implementation/NoteApiImpl.js +45 -0
  51. package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
  52. package/src/Api/Implementation/OptionsApiImpl.js +4 -4
  53. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  54. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  55. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  56. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  57. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  58. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
  59. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
  60. package/src/Api/Internal/ActionRowInternalApi.d.ts +6 -1
  61. package/src/Api/Internal/ActionRowInternalApi.js +119 -1
  62. package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -7
  63. package/src/Api/Internal/AdaptableInternalApi.js +21 -19
  64. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  65. package/src/Api/Internal/CalculatedColumnInternalApi.js +72 -0
  66. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
  67. package/src/Api/Internal/ColumnFilterInternalApi.js +23 -1
  68. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  69. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  70. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  71. package/src/Api/Internal/CommentsInternalApi.js +18 -0
  72. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  73. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  74. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  75. package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
  76. package/src/Api/Internal/ExportInternalApi.js +4 -1
  77. package/src/Api/Internal/Fdc3InternalApi.js +2 -2
  78. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  79. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  80. package/src/Api/Internal/FreeTextColumnInternalApi.js +61 -0
  81. package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
  82. package/src/Api/Internal/GridFilterInternalApi.js +7 -1
  83. package/src/Api/Internal/GridInternalApi.d.ts +23 -3
  84. package/src/Api/Internal/GridInternalApi.js +141 -7
  85. package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
  86. package/src/Api/Internal/LayoutInternalApi.js +16 -0
  87. package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
  88. package/src/Api/Internal/NoteInternalApi.js +18 -0
  89. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  90. package/src/Api/InteropioPluginApi.d.ts +2 -2
  91. package/src/Api/LayoutApi.d.ts +15 -0
  92. package/src/Api/NoteApi.d.ts +48 -0
  93. package/src/Api/OptionsApi.d.ts +8 -8
  94. package/src/Api/ScopeApi.d.ts +10 -0
  95. package/src/Api/UserInterfaceApi.d.ts +0 -11
  96. package/src/EnvVars.d.ts +3 -0
  97. package/src/EnvVars.js +8 -0
  98. package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
  99. package/src/PredefinedConfig/CommentState.d.ts +27 -23
  100. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  101. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  102. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  103. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  104. package/src/PredefinedConfig/Common/AggregationColumns.js +5 -1
  105. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +4 -0
  106. package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
  107. package/src/PredefinedConfig/Common/Enums.js +1 -0
  108. package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
  109. package/src/PredefinedConfig/Common/Menu.js +98 -0
  110. package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
  111. package/src/PredefinedConfig/Common/RowSummary.js +20 -0
  112. package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
  113. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  114. package/src/PredefinedConfig/Common/Types.js +4 -1
  115. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  116. package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
  117. package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
  118. package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
  119. package/src/PredefinedConfig/SystemState.d.ts +9 -3
  120. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  121. package/src/Redux/ActionsReducers/LayoutRedux.js +34 -11
  122. package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
  123. package/src/Redux/ActionsReducers/NoteRedux.js +89 -0
  124. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -1
  125. package/src/Redux/ActionsReducers/SystemRedux.js +19 -6
  126. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  127. package/src/Redux/Store/AdaptableStore.js +66 -76
  128. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
  129. package/src/Strategy/AdaptableModuleBase.d.ts +8 -8
  130. package/src/Strategy/AdaptableModuleBase.js +13 -15
  131. package/src/Strategy/AlertModule.d.ts +1 -2
  132. package/src/Strategy/AlertModule.js +3 -56
  133. package/src/Strategy/BulkUpdateModule.js +1 -1
  134. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  135. package/src/Strategy/CalculatedColumnModule.js +6 -26
  136. package/src/Strategy/CellSummaryModule.d.ts +8 -6
  137. package/src/Strategy/CellSummaryModule.js +78 -23
  138. package/src/Strategy/ChartingModule.d.ts +0 -1
  139. package/src/Strategy/ChartingModule.js +2 -22
  140. package/src/Strategy/ColumnFilterModule.d.ts +2 -3
  141. package/src/Strategy/ColumnFilterModule.js +44 -103
  142. package/src/Strategy/ColumnInfoModule.js +2 -0
  143. package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +2 -5
  144. package/src/Strategy/{CommentsModule.js → CommentModule.js} +19 -25
  145. package/src/Strategy/CustomSortModule.js +3 -2
  146. package/src/Strategy/DashboardModule.d.ts +1 -2
  147. package/src/Strategy/DashboardModule.js +9 -15
  148. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  149. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  150. package/src/Strategy/DataImportModule.d.ts +1 -1
  151. package/src/Strategy/DataImportModule.js +5 -5
  152. package/src/Strategy/DataSetModule.d.ts +1 -1
  153. package/src/Strategy/DataSetModule.js +1 -1
  154. package/src/Strategy/ExportModule.d.ts +1 -0
  155. package/src/Strategy/ExportModule.js +17 -2
  156. package/src/Strategy/Fdc3Module.js +3 -0
  157. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  158. package/src/Strategy/FlashingCellModule.js +6 -19
  159. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  160. package/src/Strategy/FormatColumnModule.js +6 -51
  161. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  162. package/src/Strategy/FreeTextColumnModule.js +1 -31
  163. package/src/Strategy/GridFilterModule.d.ts +0 -1
  164. package/src/Strategy/GridFilterModule.js +0 -37
  165. package/src/Strategy/GridInfoModule.js +2 -0
  166. package/src/Strategy/Interface/IModule.d.ts +0 -1
  167. package/src/Strategy/LayoutModule.d.ts +9 -3
  168. package/src/Strategy/LayoutModule.js +148 -62
  169. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  170. package/src/Strategy/NamedQueryModule.js +0 -19
  171. package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
  172. package/src/Strategy/NoteModule.js +62 -0
  173. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  174. package/src/Strategy/PlusMinusModule.js +2 -2
  175. package/src/Strategy/ScheduleModule.d.ts +1 -1
  176. package/src/Strategy/ScheduleModule.js +1 -1
  177. package/src/Strategy/SettingsPanelModule.js +3 -3
  178. package/src/Strategy/ShortcutModule.d.ts +1 -1
  179. package/src/Strategy/ShortcutModule.js +1 -1
  180. package/src/Strategy/SmartEditModule.js +1 -1
  181. package/src/Strategy/StyledColumnModule.d.ts +1 -1
  182. package/src/Strategy/StyledColumnModule.js +26 -26
  183. package/src/Strategy/SystemStatusModule.js +2 -2
  184. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  185. package/src/Strategy/TeamSharingModule.js +5 -5
  186. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  187. package/src/Strategy/ToolPanelModule.js +0 -23
  188. package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
  189. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  190. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  191. package/src/Utilities/Constants/GeneralConstants.js +3 -2
  192. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  193. package/src/Utilities/Constants/ModuleConstants.js +7 -7
  194. package/src/Utilities/Defaults/DefaultSettingsPanel.js +7 -6
  195. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
  196. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +430 -1
  197. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
  198. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  199. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  200. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
  201. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  202. package/src/Utilities/Extensions/ArrayExtensions.js +6 -1
  203. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  204. package/src/Utilities/Helpers/AdaptableHelper.js +20 -60
  205. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  206. package/src/Utilities/Helpers/Helper.js +6 -1
  207. package/src/Utilities/MenuItem.d.ts +7 -4
  208. package/src/Utilities/MenuItem.js +6 -3
  209. package/src/Utilities/ObjectFactory.d.ts +3 -3
  210. package/src/Utilities/ObjectFactory.js +4 -24
  211. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
  212. package/src/Utilities/Services/AggregatedScalarLiveValue.js +26 -19
  213. package/src/Utilities/Services/CellPopupService.js +2 -3
  214. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  215. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
  216. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  217. package/src/Utilities/Services/LicenseService/index.js +1 -186
  218. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  219. package/src/Utilities/Services/MetamodelService.js +6 -3
  220. package/src/Utilities/Services/ModuleService.js +4 -0
  221. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  222. package/src/Utilities/Services/QueryLanguageService.js +4 -3
  223. package/src/Utilities/Services/ReportService.d.ts +7 -5
  224. package/src/Utilities/Services/ReportService.js +238 -22
  225. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  226. package/src/Utilities/Services/RowEditService.js +3 -1
  227. package/src/Utilities/adaptableQlUtils.d.ts +2 -0
  228. package/src/Utilities/adaptableQlUtils.js +18 -0
  229. package/src/Utilities/license/decode.js +1 -70
  230. package/src/Utilities/license/hashing.js +1 -47
  231. package/src/View/AdaptableView.js +1 -3
  232. package/src/View/AdaptableViewFactory.js +2 -2
  233. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  234. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
  235. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  236. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
  237. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  238. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  239. package/src/View/Comments/CommentsEditor.js +24 -11
  240. package/src/View/Comments/CommentsPopup.js +20 -11
  241. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  242. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
  243. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +46 -0
  244. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
  245. package/src/View/Components/CellPopup/index.d.ts +1 -0
  246. package/src/View/Components/CellPopup/index.js +5 -2
  247. package/src/View/Components/FilterForm/FilterForm.js +20 -12
  248. package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
  249. package/src/View/Components/FilterForm/QuickFilterValues.js +39 -23
  250. package/src/View/Components/NewScopeComponent.js +34 -1
  251. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  252. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  253. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  254. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
  255. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  256. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  257. package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
  258. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  259. package/src/View/Components/ValueSelector/index.js +2 -2
  260. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  261. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -9
  262. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
  263. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
  264. package/src/View/GridFilter/GridFilterViewPanel.js +9 -5
  265. package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
  266. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  267. package/src/View/Layout/LayoutViewPanel.js +2 -1
  268. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  269. package/src/View/Layout/TransposedPopup.js +200 -0
  270. package/src/View/Layout/Wizard/LayoutWizard.js +36 -3
  271. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  272. package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
  273. package/src/View/Layout/Wizard/sections/RowSummarySection.js +181 -0
  274. package/src/View/License/LicenseWatermark.js +1 -66
  275. package/src/View/Note/NotePopup.d.ts +2 -0
  276. package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +19 -19
  277. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  278. package/src/View/Theme/ThemeSelector.js +2 -2
  279. package/src/agGrid/ActionColumnRenderer.js +7 -6
  280. package/src/agGrid/Adaptable.d.ts +3 -455
  281. package/src/agGrid/Adaptable.js +7 -5291
  282. package/src/agGrid/AdaptableAgGrid.d.ts +354 -0
  283. package/src/agGrid/AdaptableAgGrid.js +3972 -0
  284. package/src/agGrid/AdaptableLogger.js +78 -13
  285. package/src/agGrid/AgGridAdapter.d.ts +64 -0
  286. package/src/agGrid/AgGridAdapter.js +590 -0
  287. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  288. package/src/agGrid/AgGridColumnAdapter.js +836 -0
  289. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  290. package/src/agGrid/AgGridMenuAdapter.js +282 -0
  291. package/src/agGrid/AgGridOptionsService.d.ts +15 -0
  292. package/src/agGrid/AgGridOptionsService.js +80 -0
  293. package/src/agGrid/BadgeRenderer.js +1 -1
  294. package/src/agGrid/CheckboxRenderer.js +1 -1
  295. package/src/agGrid/FilterWrapper.d.ts +2 -2
  296. package/src/agGrid/FilterWrapper.js +1 -1
  297. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  298. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  299. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +74 -18
  300. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
  301. package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
  302. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
  303. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  304. package/src/agGrid/weightedAverage.d.ts +0 -2
  305. package/src/agGrid/weightedAverage.js +1 -56
  306. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  307. package/src/components/Datepicker/index.d.ts +1 -1
  308. package/src/components/Datepicker/index.js +10 -2
  309. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
  310. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
  311. package/src/components/ExpressionEditor/QueryBuilder/utils.js +3 -17
  312. package/src/components/InfiniteTable/index.js +2 -2
  313. package/src/components/Input/index.d.ts +1 -2
  314. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  315. package/src/components/Modal/index.d.ts +1 -0
  316. package/src/components/Modal/index.js +6 -4
  317. package/src/components/Select/Select.d.ts +3 -1
  318. package/src/components/Select/Select.js +4 -2
  319. package/src/components/Textarea/index.d.ts +2 -2
  320. package/src/components/icons/index.js +2 -0
  321. package/src/components/icons/note.js +2 -2
  322. package/src/components/icons/rows.d.ts +3 -0
  323. package/src/components/icons/rows.js +7 -0
  324. package/src/env.js +2 -2
  325. package/src/metamodel/adaptable.metamodel.d.ts +179 -25
  326. package/src/metamodel/adaptable.metamodel.js +1 -9316
  327. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  328. package/src/migration/AdaptableUpgradeHelper.js +52 -0
  329. package/src/migration/VersionUpgrade.d.ts +8 -0
  330. package/src/migration/VersionUpgrade.js +15 -0
  331. package/src/migration/VersionUpgrade17.d.ts +18 -0
  332. package/src/migration/VersionUpgrade17.js +347 -0
  333. package/src/migration/VersionUpgrade18.d.ts +5 -0
  334. package/src/migration/VersionUpgrade18.js +10 -0
  335. package/src/parser/src/parser.js +117 -1257
  336. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  337. package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
  338. package/src/parser/src/types.d.ts +7 -2
  339. package/src/types.d.ts +26 -19
  340. package/tsconfig.cjs.tsbuildinfo +1 -1
  341. package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
  342. package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
  343. package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
  344. package/src/Api/Implementation/NotesApiImpl.js +0 -44
  345. package/src/Api/NotesApi.d.ts +0 -48
  346. package/src/PredefinedConfig/CellAddress.d.ts +0 -13
  347. package/src/PredefinedConfig/CellAddress.js +0 -5
  348. package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -39
  349. package/src/Redux/ActionsReducers/NotesRedux.js +0 -87
  350. package/src/Strategy/NotesModule.js +0 -62
  351. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  352. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  353. package/src/View/Components/ScopeComponent.d.ts +0 -24
  354. package/src/View/Components/ScopeComponent.js +0 -138
  355. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  356. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
  357. package/src/View/Notes/NotesPopup.d.ts +0 -2
  358. package/src/agGrid/agGridHelper.d.ts +0 -57
  359. package/src/agGrid/agGridHelper.js +0 -691
  360. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  361. package/src/agGrid/agGridMenuHelper.js +0 -673
  362. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  363. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
  364. /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
  365. /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
  366. /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
  367. /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
  368. /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
  369. /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionRowInternalApi = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const ApiBase_1 = require("../Implementation/ApiBase");
6
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
7
+ const UIHelper_1 = tslib_1.__importDefault(require("../../View/UIHelper"));
8
+ const ActionColumnRenderer_1 = require("../../agGrid/ActionColumnRenderer");
5
9
  class ActionRowInternalApi extends ApiBase_1.ApiBase {
6
10
  buildRowEditForm(rowNode) {
7
11
  return this.buildActionRow('rowEdited', rowNode);
@@ -100,7 +104,7 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
100
104
  const eventInfo = type === 'rowCreated'
101
105
  ? {
102
106
  type: 'rowCreated',
103
- formData: context.formData,
107
+ formData: this.prepareCreateData(formFields, context),
104
108
  adaptableApi: context.adaptableApi,
105
109
  userName: this.getOptions().userName,
106
110
  adaptableId: this.getOptions().adaptableId,
@@ -120,6 +124,17 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
120
124
  };
121
125
  return [cancelButton, saveButton];
122
126
  }
127
+ // private getNullValueForColumn(column: AdaptableColumn) {}
128
+ prepareCreateData(formFields, context) {
129
+ // when creating we just omit values that are not set
130
+ const dataToSave = Object.assign({}, context.formData);
131
+ for (const formField of formFields) {
132
+ if (dataToSave[formField.name] === '') {
133
+ delete dataToSave[formField.name];
134
+ }
135
+ }
136
+ return dataToSave;
137
+ }
123
138
  prepareEditData(formFields, context) {
124
139
  const dataToSave = Object.assign({}, context.formData);
125
140
  for (const formField of formFields) {
@@ -200,5 +215,108 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
200
215
  label: value,
201
216
  }));
202
217
  }
218
+ getColDefsForActionRowColumns() {
219
+ const actionButtons = this.getActionRowButtonDefs();
220
+ if (!actionButtons.length) {
221
+ return [];
222
+ }
223
+ return [
224
+ {
225
+ headerName: '',
226
+ colId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
227
+ hide: false,
228
+ editable: false,
229
+ // 15px is the icon width + left&right padding + left&right border
230
+ width: Math.max(actionButtons.length * (UIHelper_1.default.getSimpleButtonPaddingWidth() * 2 + 15) + 2,
231
+ // If the width of the column is to small, the width will not be applied
232
+ // this triggers the setLayout an infinite loop because the width read from the grid is always different
233
+ 40),
234
+ resizable: false,
235
+ lockVisible: true,
236
+ suppressColumnsToolPanel: true,
237
+ suppressFiltersToolPanel: true,
238
+ suppressHeaderMenuButton: true,
239
+ suppressMovable: true,
240
+ filter: false,
241
+ sortable: false,
242
+ enableRowGroup: false,
243
+ pinned: this.getActionRowOptions().actionRowButtonOptions.position === 'pinnedRight'
244
+ ? 'right'
245
+ : 'left',
246
+ cellRenderer: this.getAdaptableVariant() === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
247
+ cellClass: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
248
+ type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
249
+ },
250
+ ];
251
+ }
252
+ getActionRowButtonDefs() {
253
+ const actionRowButtons = this.getActionRowApi().getActionRowButtons();
254
+ if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
255
+ return [];
256
+ }
257
+ const defaultActionRowButtonConfiguration = {
258
+ create: {
259
+ icon: {
260
+ name: 'add',
261
+ },
262
+ tooltip: 'Create',
263
+ onClick: () => {
264
+ this.getActionRowApi().displayCreateActionRow();
265
+ },
266
+ },
267
+ edit: {
268
+ icon: {
269
+ name: 'edit',
270
+ },
271
+ tooltip: 'Edit',
272
+ onClick: (button, context) => {
273
+ this.getActionRowApi().displayEditActionRow(context.primaryKeyValue);
274
+ },
275
+ },
276
+ clone: {
277
+ icon: {
278
+ name: 'clone',
279
+ },
280
+ tooltip: 'Clone',
281
+ onClick: (button, context) => {
282
+ this.getActionRowApi().displayCloneActionRow(context.primaryKeyValue);
283
+ },
284
+ },
285
+ delete: {
286
+ icon: {
287
+ name: 'delete',
288
+ },
289
+ tooltip: 'Delete',
290
+ onClick: (button, context) => {
291
+ var _a, _b;
292
+ const eventInfo = {
293
+ type: 'rowDeleted',
294
+ rowNode: context.rowNode,
295
+ adaptableApi: context.adaptableApi,
296
+ userName: context.userName,
297
+ adaptableId: context.adaptableId,
298
+ };
299
+ this.getEventApi().emit('ActionRowSubmitted', eventInfo);
300
+ (_b = (_a = this.getActionRowOptions().actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
301
+ },
302
+ },
303
+ };
304
+ const actionButtons = actionRowButtons
305
+ .map((actionRowButtonType) => {
306
+ var _a, _b;
307
+ const defaultButtonConfig = defaultActionRowButtonConfiguration[actionRowButtonType];
308
+ if (!defaultButtonConfig) {
309
+ // should NOT happen unless the user sent some invalid button type in the predefined config
310
+ return;
311
+ }
312
+ const customButtonConfig = (_b = (_a = this.getActionRowOptions().actionRowButtonOptions).customConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { actionRowButtonType }));
313
+ if (!customButtonConfig) {
314
+ return defaultButtonConfig;
315
+ }
316
+ return Object.assign(Object.assign({}, defaultButtonConfig), customButtonConfig);
317
+ })
318
+ .filter(Boolean);
319
+ return actionButtons;
320
+ }
203
321
  }
204
322
  exports.ActionRowInternalApi = ActionRowInternalApi;
@@ -24,9 +24,9 @@ import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFra
24
24
  import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
25
25
  import { IModuleCollection } from '../../Strategy/Interface/IModule';
26
26
  import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../PredefinedConfig/Common/AdaptableObject';
27
- import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
28
27
  import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
29
28
  import { CellPopupService } from '../../Utilities/Services/CellPopupService';
29
+ import { RowEditService } from '../../Utilities/Services/RowEditService';
30
30
  export declare class AdaptableInternalApi extends ApiBase {
31
31
  getSystemState(): SystemState;
32
32
  showPopupConfirmation(confirmation: UIConfirmation): void;
@@ -46,8 +46,7 @@ export declare class AdaptableInternalApi extends ApiBase {
46
46
  setPivotModeOn(): void;
47
47
  setPivotModeOff(): void;
48
48
  isGridInPivotMode(): boolean;
49
- setTreeModeOn(): void;
50
- setTreeModeOff(): void;
49
+ setTreeMode(mode: boolean): void;
51
50
  isGridInTreeMode(): boolean;
52
51
  getToolbarTitle(): string;
53
52
  buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
@@ -65,7 +64,7 @@ export declare class AdaptableInternalApi extends ApiBase {
65
64
  getAlertService(): IAlertService;
66
65
  getTeamSharingService(): ITeamSharingService;
67
66
  getMetamodelService(): IMetamodelService;
68
- getRowEditService(): IRowEditService;
67
+ getRowEditService(): RowEditService;
69
68
  getFdc3Service(): Fdc3Service;
70
69
  getModules(): IModuleCollection;
71
70
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
@@ -73,7 +72,7 @@ export declare class AdaptableInternalApi extends ApiBase {
73
72
  includeGroupRows?: boolean;
74
73
  filterFn?: (rowNode: IRowNode) => boolean;
75
74
  }): void;
76
- forAllVisibleRowNodesDo(func: (rowNode: IRowNode) => void, config?: {
75
+ forAllVisibleRowNodesDo(func: (rowNode: IRowNode, index: number) => void, config?: {
77
76
  includeGroupRows?: boolean;
78
77
  filterFn?: (rowNode: IRowNode) => boolean;
79
78
  }): void;
@@ -106,8 +105,8 @@ export declare class AdaptableInternalApi extends ApiBase {
106
105
  getPreviousGroupedColumnsIndex(layoutId: string): {
107
106
  [key: string]: number;
108
107
  };
109
- getValueUsingField(rowData: Record<string, any>, columnValueKey: string): any;
110
- setValueUsingField(rowData: Record<string, any>, columnValueKey: string, newValue: any): Record<string, any>;
108
+ getValueUsingField(rowData: Record<string, any>, fieldName: string): any;
109
+ setValueUsingField(rowData: Record<string, any>, fieldName: string, newValue: any): Record<string, any>;
111
110
  findAdaptableObjectsByLookupCriteria<T extends AdaptableObjectWithScope>({ scope, tag, ids }: AdaptableObjectLookupCriteria, specificAdaptableObjects: T[]): T[];
112
111
  buildBaseContext(): BaseContext;
113
112
  getActionButtonsAndActionColumn(colDef: ColDef): {
@@ -51,11 +51,13 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
51
51
  isGridInPivotMode() {
52
52
  return this.getAdaptableState().Grid.IsGridInPivotMode;
53
53
  }
54
- setTreeModeOn() {
55
- this.dispatchAction(GridRedux.SetTreeModeOn());
56
- }
57
- setTreeModeOff() {
58
- this.dispatchAction(GridRedux.SetTreeModeOff());
54
+ setTreeMode(mode) {
55
+ if (!!mode) {
56
+ this.dispatchAction(GridRedux.SetTreeModeOn());
57
+ }
58
+ else {
59
+ this.dispatchAction(GridRedux.SetTreeModeOff());
60
+ }
59
61
  }
60
62
  isGridInTreeMode() {
61
63
  return this.getAdaptableState().Grid.IsGridInTreeMode;
@@ -223,13 +225,13 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
223
225
  frameworkComponent,
224
226
  componentType,
225
227
  });
226
- if (this.adaptable.isInitialised) {
228
+ if (this.adaptable.isReady) {
227
229
  createComponentFn();
228
230
  }
229
231
  else {
230
232
  // adaptable may not be initialized yet if the framework component is part of the initial render
231
233
  // AFL 2021.10.14 - not really sure if this is necessary anymore?! (see the other changes in this commit)
232
- (0, waitForCondition_1.waitForCondition)(() => this.adaptable.isInitialised).then(() => {
234
+ (0, waitForCondition_1.waitForCondition)(() => this.adaptable.isReady).then(() => {
233
235
  createComponentFn();
234
236
  });
235
237
  }
@@ -368,17 +370,17 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
368
370
  return (_a = SystemRedux.SystemPreviousGroupedColumnsSelector(this.getAdaptableState().System)) === null || _a === void 0 ? void 0 : _a[layoutId];
369
371
  }
370
372
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/utils/object.ts#L205
371
- getValueUsingField(rowData, columnValueKey) {
372
- if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
373
+ getValueUsingField(rowData, fieldName) {
374
+ if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
373
375
  return;
374
376
  }
375
- const isColumnValueKeyNested = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
377
+ const isColumnValueKeyNested = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
376
378
  // if no '.', then it's not a deep value
377
379
  if (!isColumnValueKeyNested) {
378
- return rowData[columnValueKey];
380
+ return rowData[fieldName];
379
381
  }
380
382
  // otherwise it is a deep value, so need to dig for it
381
- const fields = columnValueKey.split('.');
383
+ const fields = fieldName.split('.');
382
384
  let currentObject = rowData;
383
385
  for (let i = 0; i < fields.length; i++) {
384
386
  if (currentObject == null) {
@@ -389,22 +391,22 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
389
391
  return currentObject;
390
392
  }
391
393
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/valueService/valueService.ts#L236
392
- setValueUsingField(rowData, columnValueKey, newValue) {
393
- if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
394
+ setValueUsingField(rowData, fieldName, newValue) {
395
+ if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
394
396
  return;
395
397
  }
396
- const isColumnValueKeyContainsDots = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
398
+ const isColumnValueKeyContainsDots = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
397
399
  let valuesAreSame = false;
398
400
  if (!isColumnValueKeyContainsDots) {
399
401
  // soft comparison to match strings and numbers
400
- valuesAreSame = rowData[columnValueKey] == newValue;
402
+ valuesAreSame = rowData[fieldName] == newValue;
401
403
  if (!valuesAreSame) {
402
- rowData[columnValueKey] = newValue;
404
+ rowData[fieldName] = newValue;
403
405
  }
404
406
  }
405
407
  else {
406
408
  // otherwise it is a deep value, so need to dig for it
407
- const fieldPieces = columnValueKey.split('.');
409
+ const fieldPieces = fieldName.split('.');
408
410
  let currentObject = rowData;
409
411
  while (fieldPieces.length > 0 && currentObject) {
410
412
  const fieldPiece = fieldPieces.shift();
@@ -452,7 +454,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
452
454
  var _a;
453
455
  let actionColumn;
454
456
  if (colDef.colId == GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS) {
455
- const actionButtons = this.adaptable.getActionRowButtonDefs();
457
+ const actionButtons = this.getActionRowApi().internalApi.getActionRowButtonDefs();
456
458
  actionColumn = {
457
459
  columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
458
460
  actionColumnButton: actionButtons,
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
3
3
  import { AdaptableColumn } from '../../types';
4
+ import { ColDef } from '@ag-grid-community/core';
4
5
  export declare class CalculatedColumnInternalApi extends ApiBase {
5
6
  /**
6
7
  * Returns all the references in the AdaptableState of the given CalculatedColumn
@@ -27,4 +28,5 @@ export declare class CalculatedColumnInternalApi extends ApiBase {
27
28
  isQuantileAggregatedExpression(input: string): boolean;
28
29
  getExpressionFromCalculatedColumn(calculatedColumn: CalculatedColumn): string;
29
30
  fireCalculatedColumnChangedEvent(trigger: string, calculatedColumn: CalculatedColumn): void;
31
+ getColDefsForCalculatedColumns(): ColDef[];
30
32
  }
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CalculatedColumnInternalApi = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const ApiBase_1 = require("../Implementation/ApiBase");
6
+ const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
7
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
8
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
9
+ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
5
10
  class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
6
11
  /**
7
12
  * Returns all the references in the AdaptableState of the given CalculatedColumn
@@ -90,5 +95,72 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
90
95
  };
91
96
  this.adaptable.api.eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
92
97
  }
98
+ getColDefsForCalculatedColumns() {
99
+ const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
100
+ const defaultCalculatedColumnSettings = (0, ObjectFactory_1.CreateEmptyCalculatedColumn)(defaultSpecialColumnSettings).CalculatedColumnSettings;
101
+ return this.getCalculatedColumnApi()
102
+ .getCalculatedColumns()
103
+ .map((calculatedColumn) => {
104
+ const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
105
+ if (!calculatedColumnSettings.DataType) {
106
+ calculatedColumnSettings.DataType = this.getAdaptableApi()
107
+ .internalApi.getAdaptableInstance()
108
+ .CalculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumn.Query);
109
+ }
110
+ const columnTypes = [
111
+ GeneralConstants_1.AB_SPECIAL_COLUMN,
112
+ this.getGridApi().internalApi.getAgGridDataType(calculatedColumnSettings.DataType),
113
+ ];
114
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
115
+ columnTypes.push(...calculatedColumnSettings.ColumnTypes);
116
+ }
117
+ const isExternalEvaluation = !this.getExpressionApi().internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.getExpressionApi().getAdaptableQueryExpression(calculatedColumn.Query));
118
+ const valueGetter = (params) => {
119
+ var _a, _b;
120
+ if (isExternalEvaluation) {
121
+ return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
122
+ }
123
+ // if the grid data is NOT client side, we can aggregate only simple scalar expression (which depend on row data, not on other rows)
124
+ if (this.getGridApi().getAgGridRowModelType() !== 'clientSide' &&
125
+ StringExtensions_1.default.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
126
+ return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
127
+ }
128
+ return this.getAdaptableApi()
129
+ .internalApi.getAdaptableInstance()
130
+ .CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
131
+ };
132
+ const newColDef = {
133
+ headerName: calculatedColumn.FriendlyName
134
+ ? calculatedColumn.FriendlyName
135
+ : calculatedColumn.ColumnId,
136
+ colId: calculatedColumn.ColumnId,
137
+ hide: false,
138
+ editable: false,
139
+ width: calculatedColumnSettings.Width,
140
+ enableValue: calculatedColumnSettings.Aggregatable,
141
+ filter: calculatedColumnSettings.Filterable,
142
+ floatingFilter: calculatedColumnSettings.Filterable,
143
+ resizable: calculatedColumnSettings.Resizable,
144
+ enableRowGroup: calculatedColumnSettings.Groupable,
145
+ sortable: calculatedColumnSettings.Sortable,
146
+ enablePivot: calculatedColumnSettings.Pivotable,
147
+ suppressHeaderMenuButton: calculatedColumnSettings.SuppressMenu,
148
+ suppressMovable: calculatedColumnSettings.SuppressMovable,
149
+ type: columnTypes,
150
+ valueGetter,
151
+ };
152
+ if (calculatedColumnSettings.ShowToolTip != null &&
153
+ calculatedColumnSettings.ShowToolTip == true) {
154
+ newColDef.tooltipValueGetter = () => {
155
+ return this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(calculatedColumn.Query);
156
+ };
157
+ }
158
+ if (calculatedColumnSettings.HeaderToolTip) {
159
+ newColDef.headerTooltip = calculatedColumnSettings.HeaderToolTip;
160
+ }
161
+ this.getAdaptableApi().logInfo('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
162
+ return newColDef;
163
+ });
164
+ }
93
165
  }
94
166
  exports.CalculatedColumnInternalApi = CalculatedColumnInternalApi;
@@ -49,6 +49,7 @@ export declare class ColumnFilterInternalApi extends ApiBase {
49
49
  * Fires Column Filter Applied Event - typically used to enable filtering on the server
50
50
  */
51
51
  fireColumnFilterAppliedEvent(): void;
52
+ fireGridFilterAppliedEvent(): void;
52
53
  /**
53
54
  * Compares to sets of Column Filters to see if they are identical
54
55
  * @param filters1
@@ -56,4 +57,5 @@ export declare class ColumnFilterInternalApi extends ApiBase {
56
57
  */
57
58
  areColumnFiltersDifferent(oldFilters: ColumnFilter[], newFilters: ColumnFilter[]): boolean;
58
59
  getPredicateDefShortcuts(predicateDef: AdaptablePredicateDef): string[];
60
+ getFilterValuesMaxNumberOfItems(column: AdaptableColumn): number | undefined;
59
61
  }
@@ -175,7 +175,7 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
175
175
  * Fires Column Filter Applied Event - typically used to enable filtering on the server
176
176
  */
177
177
  fireColumnFilterAppliedEvent() {
178
- if (this.adaptable.isLive) {
178
+ if (this.adaptable.isReady) {
179
179
  const adaptableApi = this.getAdaptableApi();
180
180
  const columnFilterAppliedInfo = {
181
181
  columnFilters: this.getColumnFilterApi().getColumnFilters(),
@@ -186,6 +186,18 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
186
186
  this.adaptable.api.eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
187
187
  }
188
188
  }
189
+ fireGridFilterAppliedEvent() {
190
+ if (this.adaptable.isReady) {
191
+ const adaptableApi = this.getAdaptableApi();
192
+ const gridFilterAppliedInfo = {
193
+ columnFilters: this.getColumnFilterApi().getColumnFilters(),
194
+ adaptableApi: adaptableApi,
195
+ userName: adaptableApi.optionsApi.getUserName(),
196
+ adaptableId: adaptableApi.optionsApi.getAdaptableId(),
197
+ };
198
+ this.adaptable.api.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
199
+ }
200
+ }
189
201
  /**
190
202
  * Compares to sets of Column Filters to see if they are identical
191
203
  * @param filters1
@@ -206,5 +218,15 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
206
218
  }
207
219
  return predicateShortcuts;
208
220
  }
221
+ getFilterValuesMaxNumberOfItems(column) {
222
+ const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
223
+ if (typeof maxFilterValues === 'function') {
224
+ const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
225
+ return maxFilterValues(columnFilterContext);
226
+ }
227
+ else {
228
+ return maxFilterValues;
229
+ }
230
+ }
209
231
  }
210
232
  exports.ColumnFilterInternalApi = ColumnFilterInternalApi;
@@ -1,5 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
- import { Column } from '@ag-grid-community/core';
2
+ import { Column, IRowNode } from '@ag-grid-community/core';
3
+ import { CustomSort } from '../../PredefinedConfig/CustomSortState';
4
+ import { ColumnValuesComparer } from '../../AdaptableOptions/CustomSortOptions';
3
5
  export declare class ColumnInternalApi extends ApiBase {
4
6
  /**
5
7
  * Retrieves 'ColumnType' property for a given Column
@@ -24,4 +26,5 @@ export declare class ColumnInternalApi extends ApiBase {
24
26
  */
25
27
  getAgGridColumnForAdaptableColumn(columnId: string): Column;
26
28
  isActionRowButtonColumn(columnId: string): boolean;
29
+ getActiveColumnComparator(columnId: string, customSort?: CustomSort, customSortComparer?: ColumnValuesComparer): (valueA: any, valueB: any, nodeA?: IRowNode, nodeB?: IRowNode, isInverted?: boolean) => number | undefined;
27
30
  }
@@ -42,5 +42,17 @@ class ColumnInternalApi extends ApiBase_1.ApiBase {
42
42
  isActionRowButtonColumn(columnId) {
43
43
  return columnId === GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS;
44
44
  }
45
+ getActiveColumnComparator(columnId, customSort, customSortComparer) {
46
+ if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
47
+ // defaults to AG-Grid column definition comparator if no CustomSort is defined&active
48
+ const colDefComparator = this.adaptable.agGridColumnAdapter.getUserColDefProperty(columnId, 'comparator');
49
+ return colDefComparator;
50
+ }
51
+ // CustomSort Comparer function takes precedence over CustomSort SortedValues
52
+ const comparerFunction = customSortComparer
53
+ ? customSortComparer.comparer
54
+ : this.getCustomSortApi().internalApi.getDefaultCustomSortComparer(customSort.ColumnId, customSort.SortedValues);
55
+ return comparerFunction;
56
+ }
45
57
  }
46
58
  exports.ColumnInternalApi = ColumnInternalApi;
@@ -0,0 +1,4 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export declare class CommentsInternalApi extends ApiBase {
3
+ areCommentsAvailable(): boolean;
4
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommentsInternalApi = void 0;
4
+ const ApiBase_1 = require("../Implementation/ApiBase");
5
+ class CommentsInternalApi extends ApiBase_1.ApiBase {
6
+ areCommentsAvailable() {
7
+ var _a;
8
+ const currentLayout = this.getLayoutApi().getCurrentLayout();
9
+ if (currentLayout.EnablePivot) {
10
+ return false;
11
+ }
12
+ if ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) {
13
+ return false;
14
+ }
15
+ return true;
16
+ }
17
+ }
18
+ exports.CommentsInternalApi = CommentsInternalApi;
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
- import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
2
  import { ColumnValuesComparer } from '../../AdaptableOptions/CustomSortOptions';
3
+ import { AdaptableComparerFunction } from '../../PredefinedConfig/Common/AdaptableComparerFunction';
4
4
  export declare class CustomSortInternalApi extends ApiBase {
5
- getCustomSortComparer(column: AdaptableColumn): ColumnValuesComparer | undefined;
5
+ getCustomSortComparer(columnId: string): ColumnValuesComparer | undefined;
6
+ getDefaultCustomSortComparer(columnId: string, columnValues: any[]): AdaptableComparerFunction;
6
7
  }
@@ -3,9 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CustomSortInternalApi = void 0;
4
4
  const ApiBase_1 = require("../Implementation/ApiBase");
5
5
  class CustomSortInternalApi extends ApiBase_1.ApiBase {
6
- getCustomSortComparer(column) {
6
+ getCustomSortComparer(columnId) {
7
7
  var _a;
8
+ const column = this.getColumnApi().getColumnWithColumnId(columnId);
8
9
  return (_a = this.getCustomSortOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.adaptable.api.scopeApi.isColumnInScope(column, csc.scope));
9
10
  }
11
+ getDefaultCustomSortComparer(columnId, columnValues) {
12
+ // have to return a function that may not have access to this
13
+ const adaptable = this.adaptable;
14
+ return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
15
+ var _a, _b;
16
+ let firstElementValueString = (_a = (nodeA && adaptable.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
17
+ let secondElementValueString = (_b = (nodeB && adaptable.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
18
+ let indexFirstElement = columnValues.indexOf(firstElementValueString);
19
+ let containsFirstElement = indexFirstElement >= 0;
20
+ let indexSecondElement = columnValues.indexOf(secondElementValueString);
21
+ let containsSecondElement = indexSecondElement >= 0;
22
+ //if none of the element are in the list we jsut return normal compare
23
+ if (!containsFirstElement && !containsSecondElement) {
24
+ if (valueA == valueB) {
25
+ return 0;
26
+ }
27
+ return valueA < valueB ? -1 : 1;
28
+ }
29
+ //if first item not in the list make sure we put it after the second item
30
+ if (!containsFirstElement) {
31
+ return 1;
32
+ }
33
+ //if second item not in the list make sure we put it after the first item
34
+ if (!containsSecondElement) {
35
+ return -1;
36
+ }
37
+ //return the comparison from the list if the two items are in the list
38
+ return indexFirstElement - indexSecondElement;
39
+ };
40
+ }
10
41
  }
11
42
  exports.CustomSortInternalApi = CustomSortInternalApi;
@@ -8,7 +8,7 @@ class DataSetInternalApi extends ApiBase_1.ApiBase {
8
8
  * @param dataSet Data Set which has been selected
9
9
  */
10
10
  fireDataSetSelectedEvent(dataSet) {
11
- if (this.adaptable.isLive) {
11
+ if (this.adaptable.isReady) {
12
12
  const dataSetSelectedInfo = {
13
13
  adaptableApi: this.adaptable.api,
14
14
  dataSet,
@@ -2,7 +2,7 @@ import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
3
3
  import { Report } from '../../PredefinedConfig/ExportState';
4
4
  import { AdaptableColumnType } from '../../PredefinedConfig/Common/Types';
5
- import { ExcelDataType } from '@ag-grid-community/core';
5
+ import { ExcelDataType, ExcelStyle } from '@ag-grid-community/core';
6
6
  import { AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
7
7
  import { DataFormatType } from '../../AdaptableOptions/ExportOptions';
8
8
  export declare class ExportInternalApi extends ApiBase {
@@ -17,4 +17,5 @@ export declare class ExportInternalApi extends ApiBase {
17
17
  isDateCellExportedAsFormattedValue(): boolean;
18
18
  getCellExportFormatType(columnDataType: AdaptableColumnDataType): DataFormatType;
19
19
  isDestinationEnabled(destination: string): boolean;
20
+ getExcelStylesForVisualDataExport(original_excelStyles: ExcelStyle[]): ExcelStyle[];
20
21
  }
@@ -95,7 +95,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
95
95
  }
96
96
  }
97
97
  isVisualDataExportInProgress() {
98
- return this.getAdaptableState().System.Export.inProgressVisualData;
98
+ return this.getAdaptableState().System.Export.visualDataExportInProgress;
99
99
  }
100
100
  isDateCellExportedAsFormattedValue() {
101
101
  return (!!this.getExportOptions().exportDateFormat ||
@@ -126,5 +126,8 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
126
126
  }
127
127
  return true;
128
128
  }
129
+ getExcelStylesForVisualDataExport(original_excelStyles) {
130
+ return [];
131
+ }
129
132
  }
130
133
  exports.ExportInternalApi = ExportInternalApi;
@@ -42,7 +42,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
42
42
  editable: false,
43
43
  width: actionColumnConfig.width,
44
44
  resizable: actionColumnConfig.resizable,
45
- suppressMenu: true,
45
+ suppressHeaderMenuButton: true,
46
46
  suppressMovable: !actionColumnConfig.movable,
47
47
  filter: false,
48
48
  sortable: false,
@@ -62,7 +62,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
62
62
  editable: false,
63
63
  width: actionColumnConfig.defaultWidth,
64
64
  resizable: true,
65
- suppressMenu: true,
65
+ suppressHeaderMenuButton: true,
66
66
  suppressMovable: false,
67
67
  filter: false,
68
68
  sortable: false,
@@ -73,8 +73,9 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
73
73
  // this.getFormatColumnsWithColumnScope(formatColumns)
74
74
  (this.adaptable.api.scopeApi.scopeHasColumns(fc.Scope) ||
75
75
  // this.getFormatColumnsWithDataTypeScope(formatColumns)
76
- this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) || // this.getFormatColumnsWithAllScope(formatColumns)
77
- this.adaptable.api.scopeApi.scopeIsAll(fc.Scope))
76
+ this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) ||
77
+ // this.getFormatColumnsWithAllScope(formatColumns)
78
+ this.adaptable.api.scopeApi.scopeIsAll(fc.Scope) || this.adaptable.api.scopeApi.scopeHasColumnType(fc.Scope))
78
79
  );
79
80
  });
80
81
  }