@adaptabletools/adaptable 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 (366) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +9 -26
  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 +71 -74
  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 +40 -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 +106 -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 +71 -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 +14 -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 +60 -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 +14 -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 +4 -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 +3 -0
  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 +97 -1
  109. package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
  110. package/src/PredefinedConfig/Common/RowSummary.js +17 -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 +32 -10
  121. package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
  122. package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +29 -28
  123. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -1
  124. package/src/Redux/ActionsReducers/SystemRedux.js +16 -4
  125. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  126. package/src/Redux/Store/AdaptableStore.js +67 -77
  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} +17 -23
  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 +57 -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 +1 -0
  191. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  192. package/src/Utilities/Constants/ModuleConstants.js +6 -6
  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 +429 -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 +4 -0
  202. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  203. package/src/Utilities/Helpers/AdaptableHelper.js +18 -58
  204. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  205. package/src/Utilities/Helpers/Helper.js +4 -0
  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 -181
  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 +14 -0
  228. package/src/Utilities/license/decode.js +1 -65
  229. package/src/Utilities/license/hashing.js +1 -43
  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 +42 -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 +3 -0
  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 +195 -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 +174 -0
  272. package/src/View/License/LicenseWatermark.js +1 -61
  273. package/src/View/Note/NotePopup.d.ts +2 -0
  274. package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +17 -17
  275. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  276. package/src/View/Theme/ThemeSelector.js +3 -3
  277. package/src/agGrid/ActionColumnRenderer.js +7 -6
  278. package/src/agGrid/Adaptable.d.ts +3 -455
  279. package/src/agGrid/Adaptable.js +8 -5292
  280. package/src/agGrid/AdaptableAgGrid.d.ts +352 -0
  281. package/src/agGrid/AdaptableAgGrid.js +3963 -0
  282. package/src/agGrid/AdaptableLogger.js +77 -11
  283. package/src/agGrid/AgGridAdapter.d.ts +64 -0
  284. package/src/agGrid/AgGridAdapter.js +585 -0
  285. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  286. package/src/agGrid/AgGridColumnAdapter.js +831 -0
  287. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  288. package/src/agGrid/AgGridMenuAdapter.js +277 -0
  289. package/src/agGrid/AgGridOptionsService.d.ts +15 -0
  290. package/src/agGrid/AgGridOptionsService.js +76 -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} +71 -17
  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 +0 -54
  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 +1 -14
  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 +4 -3
  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 +4 -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 -9313
  325. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  326. package/src/migration/AdaptableUpgradeHelper.js +48 -0
  327. package/src/migration/VersionUpgrade.d.ts +8 -0
  328. package/src/migration/VersionUpgrade.js +11 -0
  329. package/src/migration/VersionUpgrade17.d.ts +18 -0
  330. package/src/migration/VersionUpgrade17.js +342 -0
  331. package/src/migration/VersionUpgrade18.d.ts +5 -0
  332. package/src/migration/VersionUpgrade18.js +6 -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.esm.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 -39
  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 -4
  346. package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -39
  347. package/src/Strategy/NotesModule.js +0 -57
  348. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  349. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  350. package/src/View/Components/ScopeComponent.d.ts +0 -24
  351. package/src/View/Components/ScopeComponent.js +0 -133
  352. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  353. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
  354. package/src/View/Notes/NotesPopup.d.ts +0 -2
  355. package/src/agGrid/agGridHelper.d.ts +0 -57
  356. package/src/agGrid/agGridHelper.js +0 -686
  357. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  358. package/src/agGrid/agGridMenuHelper.js +0 -668
  359. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  360. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
  361. /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
  362. /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
  363. /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
  364. /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
  365. /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
  366. /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
@@ -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): {
@@ -47,11 +47,13 @@ export class AdaptableInternalApi extends ApiBase {
47
47
  isGridInPivotMode() {
48
48
  return this.getAdaptableState().Grid.IsGridInPivotMode;
49
49
  }
50
- setTreeModeOn() {
51
- this.dispatchAction(GridRedux.SetTreeModeOn());
52
- }
53
- setTreeModeOff() {
54
- this.dispatchAction(GridRedux.SetTreeModeOff());
50
+ setTreeMode(mode) {
51
+ if (!!mode) {
52
+ this.dispatchAction(GridRedux.SetTreeModeOn());
53
+ }
54
+ else {
55
+ this.dispatchAction(GridRedux.SetTreeModeOff());
56
+ }
55
57
  }
56
58
  isGridInTreeMode() {
57
59
  return this.getAdaptableState().Grid.IsGridInTreeMode;
@@ -219,13 +221,13 @@ export class AdaptableInternalApi extends ApiBase {
219
221
  frameworkComponent,
220
222
  componentType,
221
223
  });
222
- if (this.adaptable.isInitialised) {
224
+ if (this.adaptable.isReady) {
223
225
  createComponentFn();
224
226
  }
225
227
  else {
226
228
  // adaptable may not be initialized yet if the framework component is part of the initial render
227
229
  // AFL 2021.10.14 - not really sure if this is necessary anymore?! (see the other changes in this commit)
228
- waitForCondition(() => this.adaptable.isInitialised).then(() => {
230
+ waitForCondition(() => this.adaptable.isReady).then(() => {
229
231
  createComponentFn();
230
232
  });
231
233
  }
@@ -364,17 +366,17 @@ export class AdaptableInternalApi extends ApiBase {
364
366
  return (_a = SystemRedux.SystemPreviousGroupedColumnsSelector(this.getAdaptableState().System)) === null || _a === void 0 ? void 0 : _a[layoutId];
365
367
  }
366
368
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/utils/object.ts#L205
367
- getValueUsingField(rowData, columnValueKey) {
368
- if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
369
+ getValueUsingField(rowData, fieldName) {
370
+ if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
369
371
  return;
370
372
  }
371
- const isColumnValueKeyNested = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
373
+ const isColumnValueKeyNested = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
372
374
  // if no '.', then it's not a deep value
373
375
  if (!isColumnValueKeyNested) {
374
- return rowData[columnValueKey];
376
+ return rowData[fieldName];
375
377
  }
376
378
  // otherwise it is a deep value, so need to dig for it
377
- const fields = columnValueKey.split('.');
379
+ const fields = fieldName.split('.');
378
380
  let currentObject = rowData;
379
381
  for (let i = 0; i < fields.length; i++) {
380
382
  if (currentObject == null) {
@@ -385,22 +387,22 @@ export class AdaptableInternalApi extends ApiBase {
385
387
  return currentObject;
386
388
  }
387
389
  // "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/valueService/valueService.ts#L236
388
- setValueUsingField(rowData, columnValueKey, newValue) {
389
- if (!rowData || !(columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.length)) {
390
+ setValueUsingField(rowData, fieldName, newValue) {
391
+ if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
390
392
  return;
391
393
  }
392
- const isColumnValueKeyContainsDots = columnValueKey === null || columnValueKey === void 0 ? void 0 : columnValueKey.includes('.');
394
+ const isColumnValueKeyContainsDots = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
393
395
  let valuesAreSame = false;
394
396
  if (!isColumnValueKeyContainsDots) {
395
397
  // soft comparison to match strings and numbers
396
- valuesAreSame = rowData[columnValueKey] == newValue;
398
+ valuesAreSame = rowData[fieldName] == newValue;
397
399
  if (!valuesAreSame) {
398
- rowData[columnValueKey] = newValue;
400
+ rowData[fieldName] = newValue;
399
401
  }
400
402
  }
401
403
  else {
402
404
  // otherwise it is a deep value, so need to dig for it
403
- const fieldPieces = columnValueKey.split('.');
405
+ const fieldPieces = fieldName.split('.');
404
406
  let currentObject = rowData;
405
407
  while (fieldPieces.length > 0 && currentObject) {
406
408
  const fieldPiece = fieldPieces.shift();
@@ -448,7 +450,7 @@ export class AdaptableInternalApi extends ApiBase {
448
450
  var _a;
449
451
  let actionColumn;
450
452
  if (colDef.colId == ADAPTABLE_ROW_ACTION_BUTTONS) {
451
- const actionButtons = this.adaptable.getActionRowButtonDefs();
453
+ const actionButtons = this.getActionRowApi().internalApi.getActionRowButtonDefs();
452
454
  actionColumn = {
453
455
  columnId: ADAPTABLE_ROW_ACTION_BUTTONS,
454
456
  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,4 +1,8 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { CreateEmptyCalculatedColumn } from '../../Utilities/ObjectFactory';
3
+ import { AB_SPECIAL_COLUMN } from '../../Utilities/Constants/GeneralConstants';
4
+ import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
5
+ import StringExtensions from '../../Utilities/Extensions/StringExtensions';
2
6
  export class CalculatedColumnInternalApi extends ApiBase {
3
7
  /**
4
8
  * Returns all the references in the AdaptableState of the given CalculatedColumn
@@ -87,4 +91,71 @@ export class CalculatedColumnInternalApi extends ApiBase {
87
91
  };
88
92
  this.adaptable.api.eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
89
93
  }
94
+ getColDefsForCalculatedColumns() {
95
+ const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
96
+ const defaultCalculatedColumnSettings = CreateEmptyCalculatedColumn(defaultSpecialColumnSettings).CalculatedColumnSettings;
97
+ return this.getCalculatedColumnApi()
98
+ .getCalculatedColumns()
99
+ .map((calculatedColumn) => {
100
+ const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
101
+ if (!calculatedColumnSettings.DataType) {
102
+ calculatedColumnSettings.DataType = this.getAdaptableApi()
103
+ .internalApi.getAdaptableInstance()
104
+ .CalculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumn.Query);
105
+ }
106
+ const columnTypes = [
107
+ AB_SPECIAL_COLUMN,
108
+ this.getGridApi().internalApi.getAgGridDataType(calculatedColumnSettings.DataType),
109
+ ];
110
+ if (ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
111
+ columnTypes.push(...calculatedColumnSettings.ColumnTypes);
112
+ }
113
+ const isExternalEvaluation = !this.getExpressionApi().internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.getExpressionApi().getAdaptableQueryExpression(calculatedColumn.Query));
114
+ const valueGetter = (params) => {
115
+ var _a, _b;
116
+ if (isExternalEvaluation) {
117
+ return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
118
+ }
119
+ // if the grid data is NOT client side, we can aggregate only simple scalar expression (which depend on row data, not on other rows)
120
+ if (this.getGridApi().getAgGridRowModelType() !== 'clientSide' &&
121
+ StringExtensions.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
122
+ return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
123
+ }
124
+ return this.getAdaptableApi()
125
+ .internalApi.getAdaptableInstance()
126
+ .CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
127
+ };
128
+ const newColDef = {
129
+ headerName: calculatedColumn.FriendlyName
130
+ ? calculatedColumn.FriendlyName
131
+ : calculatedColumn.ColumnId,
132
+ colId: calculatedColumn.ColumnId,
133
+ hide: false,
134
+ editable: false,
135
+ width: calculatedColumnSettings.Width,
136
+ enableValue: calculatedColumnSettings.Aggregatable,
137
+ filter: calculatedColumnSettings.Filterable,
138
+ floatingFilter: calculatedColumnSettings.Filterable,
139
+ resizable: calculatedColumnSettings.Resizable,
140
+ enableRowGroup: calculatedColumnSettings.Groupable,
141
+ sortable: calculatedColumnSettings.Sortable,
142
+ enablePivot: calculatedColumnSettings.Pivotable,
143
+ suppressHeaderMenuButton: calculatedColumnSettings.SuppressMenu,
144
+ suppressMovable: calculatedColumnSettings.SuppressMovable,
145
+ type: columnTypes,
146
+ valueGetter,
147
+ };
148
+ if (calculatedColumnSettings.ShowToolTip != null &&
149
+ calculatedColumnSettings.ShowToolTip == true) {
150
+ newColDef.tooltipValueGetter = () => {
151
+ return this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(calculatedColumn.Query);
152
+ };
153
+ }
154
+ if (calculatedColumnSettings.HeaderToolTip) {
155
+ newColDef.headerTooltip = calculatedColumnSettings.HeaderToolTip;
156
+ }
157
+ this.getAdaptableApi().logInfo('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
158
+ return newColDef;
159
+ });
160
+ }
90
161
  }
@@ -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
  }
@@ -171,7 +171,7 @@ export class ColumnFilterInternalApi extends ApiBase {
171
171
  * Fires Column Filter Applied Event - typically used to enable filtering on the server
172
172
  */
173
173
  fireColumnFilterAppliedEvent() {
174
- if (this.adaptable.isLive) {
174
+ if (this.adaptable.isReady) {
175
175
  const adaptableApi = this.getAdaptableApi();
176
176
  const columnFilterAppliedInfo = {
177
177
  columnFilters: this.getColumnFilterApi().getColumnFilters(),
@@ -182,6 +182,18 @@ export class ColumnFilterInternalApi extends ApiBase {
182
182
  this.adaptable.api.eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
183
183
  }
184
184
  }
185
+ fireGridFilterAppliedEvent() {
186
+ if (this.adaptable.isReady) {
187
+ const adaptableApi = this.getAdaptableApi();
188
+ const gridFilterAppliedInfo = {
189
+ columnFilters: this.getColumnFilterApi().getColumnFilters(),
190
+ adaptableApi: adaptableApi,
191
+ userName: adaptableApi.optionsApi.getUserName(),
192
+ adaptableId: adaptableApi.optionsApi.getAdaptableId(),
193
+ };
194
+ this.adaptable.api.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
195
+ }
196
+ }
185
197
  /**
186
198
  * Compares to sets of Column Filters to see if they are identical
187
199
  * @param filters1
@@ -202,4 +214,14 @@ export class ColumnFilterInternalApi extends ApiBase {
202
214
  }
203
215
  return predicateShortcuts;
204
216
  }
217
+ getFilterValuesMaxNumberOfItems(column) {
218
+ const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
219
+ if (typeof maxFilterValues === 'function') {
220
+ const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
221
+ return maxFilterValues(columnFilterContext);
222
+ }
223
+ else {
224
+ return maxFilterValues;
225
+ }
226
+ }
205
227
  }
@@ -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
  }
@@ -39,4 +39,16 @@ export class ColumnInternalApi extends ApiBase {
39
39
  isActionRowButtonColumn(columnId) {
40
40
  return columnId === ADAPTABLE_ROW_ACTION_BUTTONS;
41
41
  }
42
+ getActiveColumnComparator(columnId, customSort, customSortComparer) {
43
+ if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
44
+ // defaults to AG-Grid column definition comparator if no CustomSort is defined&active
45
+ const colDefComparator = this.adaptable.agGridColumnAdapter.getUserColDefProperty(columnId, 'comparator');
46
+ return colDefComparator;
47
+ }
48
+ // CustomSort Comparer function takes precedence over CustomSort SortedValues
49
+ const comparerFunction = customSortComparer
50
+ ? customSortComparer.comparer
51
+ : this.getCustomSortApi().internalApi.getDefaultCustomSortComparer(customSort.ColumnId, customSort.SortedValues);
52
+ return comparerFunction;
53
+ }
42
54
  }
@@ -0,0 +1,4 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export declare class CommentsInternalApi extends ApiBase {
3
+ areCommentsAvailable(): boolean;
4
+ }
@@ -0,0 +1,14 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export class CommentsInternalApi extends ApiBase {
3
+ areCommentsAvailable() {
4
+ var _a;
5
+ const currentLayout = this.getLayoutApi().getCurrentLayout();
6
+ if (currentLayout.EnablePivot) {
7
+ return false;
8
+ }
9
+ if ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) {
10
+ return false;
11
+ }
12
+ return true;
13
+ }
14
+ }
@@ -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
  }
@@ -1,7 +1,38 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  export class CustomSortInternalApi extends ApiBase {
3
- getCustomSortComparer(column) {
3
+ getCustomSortComparer(columnId) {
4
4
  var _a;
5
+ const column = this.getColumnApi().getColumnWithColumnId(columnId);
5
6
  return (_a = this.getCustomSortOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.adaptable.api.scopeApi.isColumnInScope(column, csc.scope));
6
7
  }
8
+ getDefaultCustomSortComparer(columnId, columnValues) {
9
+ // have to return a function that may not have access to this
10
+ const adaptable = this.adaptable;
11
+ return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
12
+ var _a, _b;
13
+ let firstElementValueString = (_a = (nodeA && adaptable.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
14
+ let secondElementValueString = (_b = (nodeB && adaptable.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
15
+ let indexFirstElement = columnValues.indexOf(firstElementValueString);
16
+ let containsFirstElement = indexFirstElement >= 0;
17
+ let indexSecondElement = columnValues.indexOf(secondElementValueString);
18
+ let containsSecondElement = indexSecondElement >= 0;
19
+ //if none of the element are in the list we jsut return normal compare
20
+ if (!containsFirstElement && !containsSecondElement) {
21
+ if (valueA == valueB) {
22
+ return 0;
23
+ }
24
+ return valueA < valueB ? -1 : 1;
25
+ }
26
+ //if first item not in the list make sure we put it after the second item
27
+ if (!containsFirstElement) {
28
+ return 1;
29
+ }
30
+ //if second item not in the list make sure we put it after the first item
31
+ if (!containsSecondElement) {
32
+ return -1;
33
+ }
34
+ //return the comparison from the list if the two items are in the list
35
+ return indexFirstElement - indexSecondElement;
36
+ };
37
+ }
7
38
  }
@@ -5,7 +5,7 @@ export class DataSetInternalApi extends ApiBase {
5
5
  * @param dataSet Data Set which has been selected
6
6
  */
7
7
  fireDataSetSelectedEvent(dataSet) {
8
- if (this.adaptable.isLive) {
8
+ if (this.adaptable.isReady) {
9
9
  const dataSetSelectedInfo = {
10
10
  adaptableApi: this.adaptable.api,
11
11
  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
  }
@@ -92,7 +92,7 @@ export class ExportInternalApi extends ApiBase {
92
92
  }
93
93
  }
94
94
  isVisualDataExportInProgress() {
95
- return this.getAdaptableState().System.Export.inProgressVisualData;
95
+ return this.getAdaptableState().System.Export.visualDataExportInProgress;
96
96
  }
97
97
  isDateCellExportedAsFormattedValue() {
98
98
  return (!!this.getExportOptions().exportDateFormat ||
@@ -123,4 +123,7 @@ export class ExportInternalApi extends ApiBase {
123
123
  }
124
124
  return true;
125
125
  }
126
+ getExcelStylesForVisualDataExport(original_excelStyles) {
127
+ return [];
128
+ }
126
129
  }
@@ -39,7 +39,7 @@ export class Fdc3InternalApi extends ApiBase {
39
39
  editable: false,
40
40
  width: actionColumnConfig.width,
41
41
  resizable: actionColumnConfig.resizable,
42
- suppressMenu: true,
42
+ suppressHeaderMenuButton: true,
43
43
  suppressMovable: !actionColumnConfig.movable,
44
44
  filter: false,
45
45
  sortable: false,
@@ -59,7 +59,7 @@ export class Fdc3InternalApi extends ApiBase {
59
59
  editable: false,
60
60
  width: actionColumnConfig.defaultWidth,
61
61
  resizable: true,
62
- suppressMenu: true,
62
+ suppressHeaderMenuButton: true,
63
63
  suppressMovable: false,
64
64
  filter: false,
65
65
  sortable: false,
@@ -69,8 +69,9 @@ export class FormatColumnInternalApi extends ApiBase {
69
69
  // this.getFormatColumnsWithColumnScope(formatColumns)
70
70
  (this.adaptable.api.scopeApi.scopeHasColumns(fc.Scope) ||
71
71
  // this.getFormatColumnsWithDataTypeScope(formatColumns)
72
- this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) || // this.getFormatColumnsWithAllScope(formatColumns)
73
- this.adaptable.api.scopeApi.scopeIsAll(fc.Scope))
72
+ this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) ||
73
+ // this.getFormatColumnsWithAllScope(formatColumns)
74
+ this.adaptable.api.scopeApi.scopeIsAll(fc.Scope) || this.adaptable.api.scopeApi.scopeHasColumnType(fc.Scope))
74
75
  );
75
76
  });
76
77
  }
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
3
3
  import { FreeTextColumn } from '../../PredefinedConfig/FreeTextColumnState';
4
+ import { ColDef } from '@ag-grid-community/core';
4
5
  export declare class FreeTextColumnInternalApi extends ApiBase {
5
6
  /**
6
7
  * Checks if a User Edit was in a Free Text Column
@@ -12,4 +13,5 @@ export declare class FreeTextColumnInternalApi extends ApiBase {
12
13
  * @param freeTextColumn FreeTextColumn to be checked
13
14
  */
14
15
  getFreeTextColumnModuleReferences(freeTextColumn: FreeTextColumn): string[];
16
+ getColDefsForFreeTextColumns(): ColDef<any, any>[];
15
17
  }
@@ -1,4 +1,9 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { CreateEmptyFreeTextColumn } from '../../Utilities/ObjectFactory';
3
+ import { AdaptableNumberEditor } from '../../agGrid/editors/AdaptableNumberEditor';
4
+ import { AdaptableDateEditor } from '../../agGrid/editors/AdaptableDateEditor';
5
+ import { AB_SPECIAL_COLUMN } from '../../Utilities/Constants/GeneralConstants';
6
+ import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
2
7
  export class FreeTextColumnInternalApi extends ApiBase {
3
8
  /**
4
9
  * Checks if a User Edit was in a Free Text Column
@@ -37,4 +42,59 @@ export class FreeTextColumnInternalApi extends ApiBase {
37
42
  });
38
43
  return references;
39
44
  }
45
+ getColDefsForFreeTextColumns() {
46
+ const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
47
+ const defaultFreeTextColumnSettings = CreateEmptyFreeTextColumn(defaultSpecialColumnSettings).FreeTextColumnSettings;
48
+ return this.getFreeTextColumnApi()
49
+ .getFreeTextColumns()
50
+ .map((freeTextColumn) => {
51
+ var _a;
52
+ const freeTextColumnSettings = Object.assign(Object.assign({}, defaultFreeTextColumnSettings), freeTextColumn.FreeTextColumnSettings);
53
+ const dataTypeEditor = freeTextColumnSettings.DataType === 'Number'
54
+ ? AdaptableNumberEditor
55
+ : freeTextColumnSettings.DataType === 'Date'
56
+ ? AdaptableDateEditor
57
+ : null;
58
+ const columnTypes = [
59
+ AB_SPECIAL_COLUMN,
60
+ this.getGridApi().internalApi.getAgGridDataType(freeTextColumnSettings.DataType),
61
+ ];
62
+ if (ArrayExtensions.IsNotNullOrEmpty((_a = freeTextColumn === null || freeTextColumn === void 0 ? void 0 : freeTextColumn.FreeTextColumnSettings) === null || _a === void 0 ? void 0 : _a.ColumnTypes)) {
63
+ columnTypes.push(...freeTextColumn.FreeTextColumnSettings.ColumnTypes);
64
+ }
65
+ const newColDef = {
66
+ headerName: freeTextColumn.FriendlyName || freeTextColumn.ColumnId,
67
+ colId: freeTextColumn.ColumnId,
68
+ editable: true,
69
+ hide: false,
70
+ width: freeTextColumnSettings.Width,
71
+ enableValue: freeTextColumnSettings.Aggregatable,
72
+ filter: freeTextColumnSettings.Filterable,
73
+ floatingFilter: freeTextColumnSettings.Filterable,
74
+ resizable: freeTextColumnSettings.Resizable,
75
+ enableRowGroup: freeTextColumnSettings.Groupable,
76
+ sortable: freeTextColumnSettings.Sortable,
77
+ enablePivot: freeTextColumnSettings.Pivotable,
78
+ suppressHeaderMenuButton: freeTextColumnSettings.SuppressMenu,
79
+ suppressMovable: freeTextColumnSettings.SuppressMovable,
80
+ cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
81
+ ? 'agLargeTextCellEditor'
82
+ : 'agTextCellEditor'),
83
+ type: columnTypes,
84
+ valueSetter: (params) => {
85
+ return (params.data[freeTextColumn.ColumnId] = params.newValue);
86
+ },
87
+ // use a Boolean Cell Data Type if the Free Text Column is boolean
88
+ cellDataType: freeTextColumnSettings.DataType && freeTextColumnSettings.DataType == 'Boolean'
89
+ ? 'boolean'
90
+ : undefined,
91
+ valueGetter: (params) => this.getFreeTextColumnApi().getFreeTextColumnValueForRowNode(freeTextColumn, params.node),
92
+ };
93
+ if (freeTextColumnSettings.HeaderToolTip) {
94
+ newColDef.headerTooltip = freeTextColumnSettings.HeaderToolTip;
95
+ }
96
+ this.getAdaptableApi().logInfo('Setting up FreeText Column: ' + freeTextColumn.ColumnId);
97
+ return newColDef;
98
+ });
99
+ }
40
100
  }
@@ -1,4 +1,9 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { GridFilter } from '../../types';
2
3
  export declare class GridFilterInternalApi extends ApiBase {
3
4
  fireGridFilterAppliedEvent(): void;
5
+ /**
6
+ * Compares to Grid Filters to see if they are identical
7
+ */
8
+ isGridFilterDifferent(oldFilter: GridFilter, newFilter: GridFilter): boolean;
4
9
  }
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  export class GridFilterInternalApi extends ApiBase {
3
3
  fireGridFilterAppliedEvent() {
4
- if (this.adaptable.isLive) {
4
+ if (this.adaptable.isReady) {
5
5
  const currentGridFilter = this.getGridFilterApi().getCurrentGridFilter();
6
6
  const adaptableApi = this.getAdaptableApi();
7
7
  const gridFilterAppliedInfo = {
@@ -16,4 +16,10 @@ export class GridFilterInternalApi extends ApiBase {
16
16
  adaptableApi.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
17
17
  }
18
18
  }
19
+ /**
20
+ * Compares to Grid Filters to see if they are identical
21
+ */
22
+ isGridFilterDifferent(oldFilter, newFilter) {
23
+ return (oldFilter === null || oldFilter === void 0 ? void 0 : oldFilter.Expression) === (newFilter === null || newFilter === void 0 ? void 0 : newFilter.Expression);
24
+ }
19
25
  }