@adaptabletools/adaptable 11.2.4-canary.0 → 12.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/base.css +22 -4
  2. package/bundle.cjs.js +111 -111
  3. package/index.css +26 -4
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
  8. package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
  9. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ActionOptions.js} +0 -0
  10. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
  13. package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
  14. package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
  15. package/src/AdaptableOptions/{SmartEdit.js → ColumnOptions.js} +0 -0
  16. package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
  17. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
  18. package/src/AdaptableOptions/EditOptions.d.ts +92 -4
  19. package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
  20. package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
  21. package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
  22. package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
  23. package/src/AdaptableOptions/GeneralOptions.d.ts +22 -23
  24. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
  25. package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
  26. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
  27. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
  28. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +81 -54
  29. package/src/Api/AdaptableApi.d.ts +6 -3
  30. package/src/Api/ColumnApi.d.ts +6 -3
  31. package/src/Api/ConditionalStyleApi.d.ts +10 -0
  32. package/src/Api/ConfigApi.d.ts +0 -12
  33. package/src/Api/DashboardApi.d.ts +6 -19
  34. package/src/Api/DataSetApi.d.ts +40 -0
  35. package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
  36. package/src/Api/EventApi.d.ts +18 -1
  37. package/src/Api/Events/DataSetChanged.d.ts +5 -0
  38. package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
  39. package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
  40. package/src/Api/Events/RowFormSubmitted.js +2 -0
  41. package/src/Api/Events/SearchChanged.d.ts +3 -4
  42. package/src/Api/FilterApi.d.ts +1 -77
  43. package/src/Api/FinanceApi.d.ts +3 -2
  44. package/src/Api/FormatColumnApi.d.ts +28 -1
  45. package/src/Api/GridApi.d.ts +15 -1
  46. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  47. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  48. package/src/Api/Implementation/AlertApiImpl.js +5 -1
  49. package/src/Api/Implementation/ApiBase.d.ts +3 -0
  50. package/src/Api/Implementation/ApiBase.js +6 -0
  51. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
  52. package/src/Api/Implementation/ColumnApiImpl.js +6 -3
  53. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
  54. package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
  55. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  56. package/src/Api/Implementation/ConfigApiImpl.js +2 -24
  57. package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
  58. package/src/Api/Implementation/DashboardApiImpl.js +5 -29
  59. package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
  60. package/src/Api/Implementation/DataSetApiImpl.js +42 -0
  61. package/src/Api/Implementation/EventApiImpl.js +1 -0
  62. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -16
  63. package/src/Api/Implementation/FilterApiImpl.js +5 -164
  64. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -0
  65. package/src/Api/Implementation/FormatColumnApiImpl.js +34 -0
  66. package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
  67. package/src/Api/Implementation/GridApiImpl.js +41 -1
  68. package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
  69. package/src/Api/Implementation/InternalApiImpl.js +51 -10
  70. package/src/Api/Implementation/LayoutApiImpl.d.ts +18 -1
  71. package/src/Api/Implementation/LayoutApiImpl.js +172 -0
  72. package/src/Api/Implementation/PredicateApiImpl.js +1 -1
  73. package/src/Api/Implementation/SmartEditApiImpl.d.ts +5 -2
  74. package/src/Api/Implementation/SmartEditApiImpl.js +9 -0
  75. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
  76. package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
  77. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  78. package/src/Api/Implementation/UserInterfaceApiImpl.js +7 -25
  79. package/src/Api/InternalApi.d.ts +6 -2
  80. package/src/Api/LayoutApi.d.ts +88 -1
  81. package/src/Api/SmartEditApi.d.ts +14 -3
  82. package/src/Api/TeamSharingApi.d.ts +18 -5
  83. package/src/Api/UserInterfaceApi.d.ts +4 -4
  84. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  85. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
  86. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
  87. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
  88. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
  89. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +6 -3
  90. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
  91. package/src/PredefinedConfig/Common/AdaptablePredicate.js +35 -2
  92. package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
  93. package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
  94. package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
  95. package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
  96. package/src/PredefinedConfig/Common/Enums.js +1 -1
  97. package/src/PredefinedConfig/Common/FDC3Context.d.ts +5 -1
  98. package/src/PredefinedConfig/Common/Types.d.ts +6 -5
  99. package/src/PredefinedConfig/Common/Types.js +2 -3
  100. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  101. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  102. package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
  103. package/src/PredefinedConfig/SystemState.d.ts +4 -2
  104. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
  105. package/src/Redux/ActionsReducers/LayoutRedux.js +135 -1
  106. package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -1
  107. package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
  108. package/src/Redux/Store/AdaptableStore.js +37 -39
  109. package/src/Strategy/AlertModule.d.ts +11 -0
  110. package/src/Strategy/AlertModule.js +14 -0
  111. package/src/Strategy/CellSummaryModule.d.ts +3 -0
  112. package/src/Strategy/CellSummaryModule.js +28 -14
  113. package/src/Strategy/DataSetModule.d.ts +25 -0
  114. package/src/Strategy/DataSetModule.js +65 -0
  115. package/src/Strategy/ExportModule.js +6 -1
  116. package/src/Strategy/FilterModule.d.ts +7 -11
  117. package/src/Strategy/FilterModule.js +24 -15
  118. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  119. package/src/Strategy/FlashingCellModule.js +2 -2
  120. package/src/Strategy/FormatColumnModule.js +1 -1
  121. package/src/Strategy/Interface/IModule.d.ts +3 -1
  122. package/src/Strategy/LayoutModule.js +24 -2
  123. package/src/Strategy/SmartEditModule.d.ts +1 -1
  124. package/src/Strategy/SmartEditModule.js +5 -6
  125. package/src/Strategy/StatusBarModule.js +1 -3
  126. package/src/Strategy/TeamSharingModule.js +1 -1
  127. package/src/Strategy/ToolPanelModule.js +1 -4
  128. package/src/Utilities/Constants/GeneralConstants.d.ts +6 -2
  129. package/src/Utilities/Constants/GeneralConstants.js +6 -2
  130. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
  131. package/src/Utilities/Constants/ModuleConstants.js +2 -2
  132. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +22 -13
  133. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  134. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
  135. package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
  136. package/src/Utilities/ObjectFactory.d.ts +3 -6
  137. package/src/Utilities/ObjectFactory.js +3 -7
  138. package/src/Utilities/Services/EntitlementService.js +7 -1
  139. package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
  140. package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
  141. package/src/Utilities/Services/ModuleService.js +1 -1
  142. package/src/Utilities/Services/ReportService.js +2 -3
  143. package/src/Utilities/Services/RowEditService.d.ts +25 -0
  144. package/src/Utilities/Services/RowEditService.js +165 -0
  145. package/src/Utilities/Services/TeamSharingService.js +4 -4
  146. package/src/View/AdaptablePopover/index.d.ts +1 -0
  147. package/src/View/AdaptablePopover/index.js +5 -6
  148. package/src/View/AdaptableView.js +1 -1
  149. package/src/View/AdaptableViewFactory.js +2 -2
  150. package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
  151. package/src/View/Alert/ActiveAlertsPanel.js +15 -0
  152. package/src/View/Alert/AlertStatusSubPanel.js +3 -8
  153. package/src/View/Alert/AlertViewPanel.js +2 -2
  154. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
  155. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  156. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  157. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
  158. package/src/View/CellSummary/CellSummaryDetails.js +2 -2
  159. package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
  160. package/src/View/CellSummary/CellSummaryPopover.js +3 -6
  161. package/src/View/CellSummary/CellSummaryPopup.js +8 -0
  162. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
  163. package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
  164. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  165. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
  166. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
  167. package/src/View/Components/ExternalRenderer.d.ts +3 -6
  168. package/src/View/Components/ExternalRenderer.js +5 -5
  169. package/src/View/Components/FilterForm/FilterForm.d.ts +5 -2
  170. package/src/View/Components/FilterForm/FilterForm.js +9 -7
  171. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
  172. package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
  173. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
  174. package/src/View/Components/FilterForm/QuickFilterForm.js +21 -7
  175. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  176. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
  177. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
  178. package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
  179. package/src/View/Components/Popups/AdaptableToaster.js +29 -9
  180. package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
  181. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
  182. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
  183. package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
  184. package/src/View/Dashboard/CustomDashboardButton.js +47 -0
  185. package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
  186. package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
  187. package/src/View/Dashboard/Dashboard.d.ts +1 -0
  188. package/src/View/Dashboard/Dashboard.js +8 -34
  189. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
  190. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
  191. package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
  192. package/src/View/DataSet/DataSetSelector.d.ts +7 -0
  193. package/src/View/DataSet/DataSetSelector.js +18 -0
  194. package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
  195. package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
  196. package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
  197. package/src/View/DataSet/DataSetViewPanel.js +58 -0
  198. package/src/View/Filter/ActiveFiltersPanel.js +1 -1
  199. package/src/View/Filter/FilterSummary.d.ts +5 -5
  200. package/src/View/Filter/FilterSummary.js +6 -5
  201. package/src/View/Filter/FilterViewPanel.d.ts +4 -4
  202. package/src/View/Filter/FilterViewPanel.js +11 -14
  203. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
  204. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +51 -22
  205. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  206. package/src/View/GridInfo/GridInfoPopup.js +1 -1
  207. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
  208. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  209. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -1
  210. package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
  211. package/src/View/SmartEdit/SmartEditPopup.js +3 -4
  212. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
  213. package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
  214. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  215. package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
  216. package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
  217. package/src/View/StatusBar/StatusBarPanel.js +5 -4
  218. package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
  219. package/src/View/UIHelper.d.ts +4 -4
  220. package/src/View/UIHelper.js +4 -4
  221. package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
  222. package/src/agGrid/ActionColumnRenderer.js +9 -6
  223. package/src/agGrid/Adaptable.d.ts +7 -2
  224. package/src/agGrid/Adaptable.js +217 -87
  225. package/src/agGrid/FilterWrapper.js +1 -1
  226. package/src/agGrid/agGridHelper.d.ts +6 -6
  227. package/src/agGrid/agGridHelper.js +34 -56
  228. package/src/agGrid/agGridMenuHelper.js +4 -1
  229. package/src/agGrid/rowEditIcons.d.ts +4 -0
  230. package/src/agGrid/rowEditIcons.js +9 -0
  231. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
  232. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  233. package/src/components/Datepicker/index.js +19 -18
  234. package/src/components/SelectList.d.ts +10 -0
  235. package/src/components/SelectList.js +9 -0
  236. package/src/components/WindowModal/WindowModal.d.ts +2 -0
  237. package/src/components/WindowModal/WindowModal.js +1 -1
  238. package/src/components/icons/{data-source.d.ts → data-set.d.ts} +0 -0
  239. package/src/components/icons/{data-source.js → data-set.js} +0 -0
  240. package/src/components/icons/index.js +2 -2
  241. package/src/metamodel/adaptable.metamodel.d.ts +242 -70
  242. package/src/metamodel/adaptable.metamodel.js +620 -376
  243. package/src/types.d.ts +19 -15
  244. package/version.d.ts +1 -1
  245. package/version.js +1 -1
  246. package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
  247. package/src/Api/DataSourceApi.d.ts +0 -58
  248. package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
  249. package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
  250. package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
  251. package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
  252. package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
  253. package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
  254. package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
  255. package/src/Strategy/DataSourceModule.d.ts +0 -20
  256. package/src/Strategy/DataSourceModule.js +0 -56
  257. package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
  258. package/src/View/Components/Forms/AdaptableForm.js +0 -21
  259. package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
  260. package/src/View/DataSource/DataSourceViewPanel.js +0 -69
  261. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
  262. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
  263. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
  264. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
  265. package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
  266. package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
@@ -18,6 +18,7 @@ import { SelectedRowInfo } from '../PredefinedConfig/Selection/SelectedRowInfo';
18
18
  import { AdaptableTheme } from '../PredefinedConfig/ThemeState';
19
19
  import { IAdaptableStore } from '../Redux/Store/Interface/IAdaptableStore';
20
20
  import { IModuleCollection } from '../Strategy/Interface/IModule';
21
+ import { AdaptableColumnType } from '../types';
21
22
  import { EmitterCallback } from '../Utilities/Emitter';
22
23
  import { IPPStyle } from '../Utilities/Interface/IPPStyle';
23
24
  import { LicenseService } from '../Utilities/Services/LicenseService';
@@ -36,6 +37,7 @@ import { ColumnSetupInfo } from './ColumnSetupInfo';
36
37
  import { CustomSort } from '../PredefinedConfig/CustomSortState';
37
38
  import { ColumnValuesComparer } from '../AdaptableOptions/GeneralOptions';
38
39
  import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelService';
40
+ import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
39
41
  declare type RuntimeConfig = {
40
42
  waitForAgGrid?: boolean;
41
43
  modules?: Module[];
@@ -55,10 +57,12 @@ export declare class Adaptable implements IAdaptable {
55
57
  AlertService: IAlertService;
56
58
  TeamSharingService: ITeamSharingService;
57
59
  MetamodelService: IMetamodelService;
60
+ RowEditService: IRowEditService;
58
61
  private LicenseService;
59
62
  embedColumnMenu: boolean;
60
63
  gridOptions: GridOptions;
61
64
  isInitialised: boolean;
65
+ hasAdaptableToolPanel: boolean;
62
66
  private useRowNodeLookUp;
63
67
  private abContainerElement;
64
68
  private gridContainerElement;
@@ -117,6 +121,7 @@ export declare class Adaptable implements IAdaptable {
117
121
  private initializeAgGrid;
118
122
  private isAgGridReady;
119
123
  private initAgGridContainerFromInitializedAgGrid;
124
+ private createAdaptableSideBarDef;
120
125
  private createStatusBars;
121
126
  getAgGridStatusPanels(): import("@ag-grid-community/all-modules").StatusPanelDef[];
122
127
  debouncedSetColumnIntoStore: import("lodash").DebouncedFunc<() => void>;
@@ -236,13 +241,14 @@ export declare class Adaptable implements IAdaptable {
236
241
  suppressMovable: boolean;
237
242
  headerTooltip: string;
238
243
  cellEditor: string | typeof AdaptableNumberEditor | typeof AdaptableDateEditor;
239
- type: string[];
244
+ type: AdaptableColumnType[];
240
245
  valueSetter: (params: ValueSetterParams) => any;
241
246
  cellRenderer: import("@ag-grid-community/all-modules").ICellRendererFunc;
242
247
  valueGetter: (params: ValueGetterParams) => any;
243
248
  }[];
244
249
  setupColumnValueGetter({ col }: ColumnSetupInfo): void;
245
250
  setupColumnAggFunc({ col }: ColumnSetupInfo): void;
251
+ private getColDefsForRowEditColumns;
246
252
  getColDefsForActionColumns(): ColDef[];
247
253
  updateColDefsForSpecialColumns(): void;
248
254
  private cleanupFloatingFilters_WORKAROUND;
@@ -278,7 +284,6 @@ export declare class Adaptable implements IAdaptable {
278
284
  setupColumnCellRenderer({ col, colId, abColumn }: ColumnSetupInfo): void;
279
285
  setupColumnTooltipValueGetter({ col, colId }: ColumnSetupInfo): void;
280
286
  setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
281
- getUserDefinedHeaderName(columnId: string): string;
282
287
  setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
283
288
  setupColumnFloatingFilter({ col, colDef }: ColumnSetupInfo): void;
284
289
  setupColumnValueFormatter({ col, abColumn }: ColumnSetupInfo): void;
@@ -26,7 +26,7 @@ const AdaptableHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/
26
26
  const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/FormatHelper"));
27
27
  const Helper_1 = require("../Utilities/Helpers/Helper");
28
28
  const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
29
- const ObjectFactory_1 = tslib_1.__importStar(require("../Utilities/ObjectFactory"));
29
+ const ObjectFactory_1 = require("../Utilities/ObjectFactory");
30
30
  // services
31
31
  const CalculatedColumnExpressionService_1 = require("../Utilities/Services/CalculatedColumnExpressionService");
32
32
  const DataService_1 = require("../Utilities/Services/DataService");
@@ -61,6 +61,8 @@ const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
61
61
  const StatusBarState_1 = require("../PredefinedConfig/StatusBarState");
62
62
  const createAgStatusPanelComponent_1 = require("./createAgStatusPanelComponent");
63
63
  const AdaptableStatusBar_1 = require("../View/StatusBar/AdaptableStatusBar");
64
+ const RowEditService_1 = require("../Utilities/Services/RowEditService");
65
+ const rowEditIcons_1 = require("./rowEditIcons");
64
66
  const tinycolor = require('tinycolor2');
65
67
  all_modules_1.ModuleRegistry.registerModules(all_modules_1.AllCommunityModules);
66
68
  const GROUP_PATH_SEPARATOR = '/';
@@ -373,7 +375,7 @@ class Adaptable {
373
375
  // Build the default group sort comparator - will get custom sort values (but not functions) in real time
374
376
  // TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
375
377
  if (!this.getInitialGroupOrderComparator(this.gridOptions) &&
376
- this.adaptableOptions.generalOptions.autoOrderGroupedColumns) {
378
+ this.adaptableOptions.columnOptions.autoOrderGroupedColumns) {
377
379
  this.gridOptions.initialGroupOrderComparator =
378
380
  this.agGridHelper.runAdaptableGroupComparerFunction();
379
381
  }
@@ -391,6 +393,7 @@ class Adaptable {
391
393
  this.QueryLanguageService = new QueryLanguageService_1.QueryLanguageService(this.api);
392
394
  this.AlertService = new AlertService_1.AlertService(this.api);
393
395
  this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
396
+ this.RowEditService = new RowEditService_1.RowEditService(this.api);
394
397
  this.MetamodelService = new MetamodelService_1.MetamodelService(this.api);
395
398
  this.forPlugins((plugin) => plugin.afterInitServices(this));
396
399
  // Set up Modules - we set up all the Modules suitable for AG Grid
@@ -452,6 +455,13 @@ class Adaptable {
452
455
  }).then(async () => {
453
456
  this.api.internalApi.hideLoadingScreen();
454
457
  this.isInitialised = true;
458
+ this._adaptableReady = true;
459
+ // setTimeout(() => {
460
+ // this.api.eventApi.emit('AdaptableReady', {
461
+ // adaptableApi: this.api,
462
+ // gridOptions: this.adaptableOptions.gridOptions,
463
+ // });
464
+ // }, 0);
455
465
  });
456
466
  if (this.abContainerElement == null) {
457
467
  this.abContainerElement = this.getAdaptableContainerElement();
@@ -516,16 +526,18 @@ class Adaptable {
516
526
  this.performAudit(data.action, data.state, data.newState);
517
527
  this.forPlugins((plugin) => plugin.onStoreEvent(eventName, data, this.adaptableStore));
518
528
  if (eventName == AdaptableStore_1.INIT_STATE) {
519
- this._adaptableReady = true;
520
529
  LoggingHelper_1.LogAdaptableInfo(`Updating obsolete configuration/state`);
521
530
  this.adaptableModules.forEach((m) => m.updateOldConfig());
522
531
  // call stuff here
523
532
  // and reset state also?
524
533
  this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
534
+ this._adaptableReady = true;
535
+ // setTimeout(() => {
525
536
  this.api.eventApi.emit('AdaptableReady', {
526
537
  adaptableApi: this.api,
527
538
  gridOptions: this.adaptableOptions.gridOptions,
528
539
  });
540
+ // }, 0);
529
541
  }
530
542
  });
531
543
  }
@@ -566,39 +578,19 @@ class Adaptable {
566
578
  // this.gridOptions.components.__adaptableGroupCellRenderer = AdaptableGroupCellRenderer;
567
579
  // }
568
580
  }
569
- // Create Adaptable adaptable Tool Panel
570
- if (this.adaptableOptions.toolPanelOptions.showAdaptableToolPanel) {
571
- if (this.gridOptions.sideBar) {
572
- this.gridOptions.sideBar = this.gridOptions.sideBar || {};
573
- this.gridOptions.components = this.gridOptions.components || {};
574
- // https://www.ag-grid.com/javascript-grid/side-bar/
575
- const sidebar = this.gridOptions.sideBar;
576
- if (sidebar === true) {
577
- // Possibility 1: Sidebar is true - meaning that they want the default filter and columns, so create both:
578
- this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(true, true);
579
- }
580
- else if (sidebar === 'columns') {
581
- // Possibility 2: Sidebar is 'columns' (string) - meaning column only so create just that
582
- this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(false, true);
583
- }
584
- else if (sidebar === 'filters') {
585
- // Possibility 3: Sidebar is 'filters' (string) - meaning filters only so create just that
586
- this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(true, false);
587
- }
588
- else {
589
- // Possibilty 4: either no sidebar or they created their own; in either case, should add adaptable Tool panel
590
- const sidebarDef = this.gridOptions.sideBar;
591
- if (sidebarDef) {
592
- sidebarDef.toolPanels = sidebarDef.toolPanels || [];
593
- sidebarDef.toolPanels.push(this.agGridHelper.createAdaptableToolPanel());
594
- this.agGridHelper.orderToolPanels(sidebarDef.toolPanels);
595
- }
596
- }
597
- this.gridOptions.components.AdaptableToolPanel = AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent(this);
598
- if (this.gridOptions.api) {
599
- this.gridOptions.api.setSideBar(this.gridOptions.sideBar);
600
- }
581
+ const adaptableSideBarDef = this.createAdaptableSideBarDef();
582
+ if (!!adaptableSideBarDef) {
583
+ this.gridOptions.components = this.gridOptions.components || {};
584
+ this.gridOptions.components.AdaptableToolPanel = AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent(this);
585
+ }
586
+ if (this.agGridHelper.isSideBarDefObject(adaptableSideBarDef)) {
587
+ if (this.gridOptions.api) {
588
+ this.gridOptions.api.setSideBar(adaptableSideBarDef);
601
589
  }
590
+ else {
591
+ this.gridOptions.sideBar = adaptableSideBarDef;
592
+ }
593
+ this.hasAdaptableToolPanel = true;
602
594
  }
603
595
  this.createStatusBars();
604
596
  const checkAgGridContainer = () => {
@@ -680,6 +672,50 @@ class Adaptable {
680
672
  }
681
673
  return (this.adaptableOptions.containerOptions.agGridContainer = agGridContainer);
682
674
  }
675
+ createAdaptableSideBarDef() {
676
+ var _a;
677
+ if (
678
+ // no need to create the sidebar if it is not enabled
679
+ !this.gridOptions.sideBar) {
680
+ return;
681
+ }
682
+ if (this.gridOptions.sideBar === true) {
683
+ // create all tool panels with default settings
684
+ return {
685
+ toolPanels: [
686
+ GeneralConstants.AGGRID_TOOLPANEL_FILTERS,
687
+ GeneralConstants.AGGRID_TOOLPANEL_COLUMNS,
688
+ this.agGridHelper.buildAdaptableToolPanelDef(),
689
+ ],
690
+ };
691
+ }
692
+ else if (typeof this.gridOptions.sideBar === 'string') {
693
+ // there is only one tool panel, and it's the adaptable one => we have to handle it
694
+ if (this.gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
695
+ return {
696
+ toolPanels: [this.agGridHelper.buildAdaptableToolPanelDef()],
697
+ };
698
+ }
699
+ }
700
+ else if (Array.isArray(this.gridOptions.sideBar)) {
701
+ if (!this.gridOptions.sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
702
+ return;
703
+ }
704
+ // if it's an array, process the tool panel definitions
705
+ const sidebarDef = {};
706
+ sidebarDef.toolPanels = this.agGridHelper.mapToolPanelDefs(this.gridOptions.sideBar);
707
+ return sidebarDef;
708
+ }
709
+ else if (this.agGridHelper.isSideBarDefObject(this.gridOptions.sideBar)) {
710
+ if ((_a = this.gridOptions.sideBar.toolPanels) === null || _a === void 0 ? void 0 : _a.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
711
+ toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
712
+ // return the boolean flag so that we know that we need the custom AdaptableToolPanel component
713
+ return true;
714
+ }
715
+ // if it's fully-fledged SideBarDef, process its tool panel definitions
716
+ return Object.assign(Object.assign({}, this.gridOptions.sideBar), { toolPanels: this.agGridHelper.mapToolPanelDefs(this.gridOptions.sideBar.toolPanels) });
717
+ }
718
+ }
683
719
  createStatusBars() {
684
720
  var _a, _b;
685
721
  const statusBarOptions = Object.assign({}, this.gridOptions.statusBar);
@@ -1106,6 +1142,7 @@ class Adaptable {
1106
1142
  return isCellReadonly ? readonlyCellStyle.ClassName : null;
1107
1143
  }
1108
1144
  isQuickSearchActive(abColumn, params) {
1145
+ var _a;
1109
1146
  if (abColumn.isExcludedFromQuickSearch) {
1110
1147
  return false;
1111
1148
  }
@@ -1116,8 +1153,11 @@ class Adaptable {
1116
1153
  if (StringExtensions_1.StringExtensions.IsNullOrEmpty(quickSearchValue)) {
1117
1154
  return false;
1118
1155
  }
1119
- const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.columnId, 'Contains', [quickSearchValue]);
1120
- return this.api.filterApi.evaluateColumnFilter(columnFilter, params.node);
1156
+ const displayValue = (_a = this.api.gridApi.getDisplayValueFromRowNode(params.node, abColumn.columnId)) !== null && _a !== void 0 ? _a : '';
1157
+ const ignoreCase = !this.api.internalApi.isTextComparisonCaseSensitive();
1158
+ const v = ignoreCase ? String(displayValue).toLocaleLowerCase() : String(displayValue);
1159
+ const i = ignoreCase ? String(quickSearchValue).toLocaleLowerCase() : String(quickSearchValue);
1160
+ return v.indexOf(i) !== -1;
1121
1161
  }
1122
1162
  getPrimaryKeyValueFromRowNode(rowNode) {
1123
1163
  var _a;
@@ -1201,6 +1241,12 @@ class Adaptable {
1201
1241
  layout = this.api.layoutApi.getCurrentLayout();
1202
1242
  }
1203
1243
  layout.Columns = layout.Columns || [];
1244
+ const rowEditActionColumn = this.getColDefsForRowEditColumns()[0];
1245
+ if (rowEditActionColumn) {
1246
+ layout.Columns.push(rowEditActionColumn.colId);
1247
+ layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
1248
+ layout.PinnedColumnsMap[rowEditActionColumn.colId] = rowEditActionColumn.pinned;
1249
+ }
1204
1250
  const layoutColumnsMap = layout.Columns.reduce((acc, colId) => {
1205
1251
  acc[colId] = true;
1206
1252
  return acc;
@@ -1240,7 +1286,7 @@ class Adaptable {
1240
1286
  let newColState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
1241
1287
  newColState = newColState
1242
1288
  .map((colState) => {
1243
- var _a, _b, _c, _d;
1289
+ var _a, _b, _c, _d, _e;
1244
1290
  const { colId } = colState;
1245
1291
  const oldColState = columnsStateMap[colId];
1246
1292
  const hide = this.api.columnApi.isAutoPivotColumn(colId)
@@ -1279,10 +1325,16 @@ class Adaptable {
1279
1325
  newColState.aggFunc =
1280
1326
  aggregationFunctionsColumnsMap[colId] === true
1281
1327
  ? // if we have true, it means - take the default aggFunc from colDef
1282
- (_d = (_c =
1328
+ (_e = (_d = (_c =
1283
1329
  // NOTE: colState gives us the current aggFunc, which can be null,
1284
1330
  // while the colDef gives us the initially configured aggFunc for that column
1285
- colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d : 'sum' : aggregationFunctionsColumnsMap[colId];
1331
+ colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d :
1332
+ // @ts-ignore available only wth ag-Grid v27.3.x
1333
+ colDef === null ||
1334
+ // @ts-ignore available only wth ag-Grid v27.3.x
1335
+ colDef === void 0 ? void 0 :
1336
+ // @ts-ignore available only wth ag-Grid v27.3.x
1337
+ colDef.defaultAggFunc) !== null && _e !== void 0 ? _e : 'sum' : aggregationFunctionsColumnsMap[colId];
1286
1338
  }
1287
1339
  if (sortModelMap[colId]) {
1288
1340
  newColState.sort = sortModelMap[colId].sort;
@@ -1807,7 +1859,7 @@ class Adaptable {
1807
1859
  const pkValue = this.getPrimaryKeyValueFromRowNode(rowNode);
1808
1860
  const rawValue = this.getRawValueFromRowNode(rowNode, columnId);
1809
1861
  const displayValue = this.getDisplayValueFromRawValue(columnId, rawValue);
1810
- const normalisedvalue = this.getNormalisedValueFromRowValue(rawValue, displayValue, abColumn);
1862
+ const normalisedvalue = this.getNormalisedValueFromRowValue(rawValue, abColumn);
1811
1863
  return {
1812
1864
  rawValue: rawValue,
1813
1865
  displayValue: displayValue,
@@ -1872,35 +1924,28 @@ class Adaptable {
1872
1924
  };
1873
1925
  return formatterFn(params);
1874
1926
  }
1875
- getNormalisedValueFromRowValue(rawValue, displayValue, column) {
1876
- // not sure if the current implementation is correct:
1877
- // the returned "normalised value" is actually the displayed value in almost all cases?!
1878
- // ex. how to read the following: if 'rawValue' is NOT a number, return normalised version of rawValue, but if rawValue IS a number, return displayedValue of it (which will almost certainly will NOT be a number)
1879
- // if (dataType === 'Number') {
1880
- // return typeof rawValue !== 'number' ? Number(rawValue) : returnValue;
1881
- // }
1882
- // anyway, it seems to work so far (as of v11.1.3), so I'm leaving it for now :)
1927
+ getNormalisedValueFromRowValue(rawValue, column) {
1883
1928
  if (!column) {
1884
1929
  return rawValue;
1885
1930
  }
1886
- const returnValue = this.isCustomRenderedColumn(column) ? rawValue : displayValue;
1887
- if (returnValue === undefined || returnValue === null) {
1931
+ // prevents from null
1932
+ if (rawValue === undefined || rawValue === null) {
1888
1933
  return rawValue;
1889
1934
  }
1890
1935
  const dataType = column.dataType;
1891
1936
  if (dataType === 'String') {
1892
- return typeof rawValue !== 'string' ? String(rawValue) : returnValue;
1937
+ return typeof rawValue !== 'string' ? String(rawValue) : rawValue;
1893
1938
  }
1894
1939
  if (dataType === 'Number') {
1895
- return typeof rawValue !== 'number' ? Number(rawValue) : returnValue;
1940
+ return typeof rawValue !== 'number' ? Number(rawValue) : rawValue;
1896
1941
  }
1897
1942
  if (dataType === 'Boolean') {
1898
- return typeof rawValue !== 'boolean' ? Boolean(rawValue) : returnValue;
1943
+ return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
1899
1944
  }
1900
1945
  if (dataType === 'Date') {
1901
1946
  return rawValue instanceof Date ? rawValue : DateHelper_1.parseDateValue(rawValue);
1902
1947
  }
1903
- return returnValue;
1948
+ return rawValue;
1904
1949
  }
1905
1950
  getRawValueFromRowNode(rowNode, columnId) {
1906
1951
  if (rowNode == null) {
@@ -2070,6 +2115,7 @@ class Adaptable {
2070
2115
  ...this.getColDefsForCalculatedColumns(),
2071
2116
  ...this.getColDefsForActionColumns(),
2072
2117
  ...this.getColDefsForFreeTextColumns(),
2118
+ ...this.getColDefsForRowEditColumns(),
2073
2119
  ];
2074
2120
  }
2075
2121
  getColDefsForFreeTextColumns() {
@@ -2137,6 +2183,88 @@ class Adaptable {
2137
2183
  });
2138
2184
  }
2139
2185
  }
2186
+ getColDefsForRowEditColumns() {
2187
+ const actionRowButtons = this.adaptableOptions.userInterfaceOptions.actionOptions.actionRowButtons;
2188
+ if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
2189
+ return [];
2190
+ }
2191
+ const editButtons = actionRowButtons
2192
+ .map((buttonName) => {
2193
+ if (buttonName === 'edit') {
2194
+ // we need this dirty hack until ActionColumn support for custom icons is improved
2195
+ const label = rowEditIcons_1.rowEditIcon;
2196
+ return {
2197
+ label,
2198
+ tooltip: 'Edit',
2199
+ onClick: (button, context) => {
2200
+ this.api.gridApi.openEditRowForm(context.primaryKeyValue);
2201
+ },
2202
+ };
2203
+ }
2204
+ if (buttonName === 'clone') {
2205
+ // we need this dirty hack until ActionColumn support for custom icons is improved
2206
+ const label = rowEditIcons_1.rowCloneIcon;
2207
+ return {
2208
+ label,
2209
+ tooltip: 'Clone',
2210
+ onClick: (button, context) => {
2211
+ this.api.gridApi.openCloneRowForm(context.primaryKeyValue);
2212
+ },
2213
+ };
2214
+ }
2215
+ if (buttonName === 'delete') {
2216
+ // we need this dirty hack until ActionColumn support for custom icons is improved
2217
+ const label = rowEditIcons_1.rowDeleteIcon;
2218
+ return {
2219
+ label,
2220
+ tooltip: 'Delete',
2221
+ onClick: (button, context) => {
2222
+ var _a, _b;
2223
+ const eventInfo = {
2224
+ type: 'rowDeleted',
2225
+ rowNode: context.rowNode,
2226
+ adaptableApi: context.adaptableApi,
2227
+ };
2228
+ this.api.eventApi.emit('RowFormSubmitted', eventInfo);
2229
+ (_b = (_a = this.adaptableOptions.editOptions.rowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
2230
+ },
2231
+ };
2232
+ }
2233
+ })
2234
+ .filter(Boolean);
2235
+ if (!editButtons.length) {
2236
+ return [];
2237
+ }
2238
+ const rowEditActionColumn = {
2239
+ columnId: 'adaptableRowEditButtons',
2240
+ actionColumnButton: editButtons,
2241
+ };
2242
+ return [
2243
+ {
2244
+ headerName: '',
2245
+ colId: 'adaptableRowEditButtons',
2246
+ hide: false,
2247
+ editable: false,
2248
+ width: editButtons.length * 42,
2249
+ resizable: false,
2250
+ suppressMenu: true,
2251
+ suppressMovable: true,
2252
+ filter: false,
2253
+ sortable: false,
2254
+ enableRowGroup: false,
2255
+ pinned: this.adaptableOptions.userInterfaceOptions.actionOptions.actionRowButtonsPosition ===
2256
+ 'pinnedRight'
2257
+ ? 'right'
2258
+ : 'left',
2259
+ cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
2260
+ cellRendererParams: {
2261
+ actionColumn: rowEditActionColumn,
2262
+ },
2263
+ cellClass: 'adaptableRowEditButtons',
2264
+ type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
2265
+ },
2266
+ ];
2267
+ }
2140
2268
  getColDefsForActionColumns() {
2141
2269
  const defaultActionColumnSettings = {
2142
2270
  resizable: true,
@@ -2289,6 +2417,10 @@ class Adaptable {
2289
2417
  suppressMovable: calculatedColumnSettings.SuppressMovable,
2290
2418
  type: columnTypes,
2291
2419
  valueGetter: (params) => {
2420
+ var _a, _b;
2421
+ if ((_a = calculatedColumn.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.ExternallyEvaluatedExpression) {
2422
+ return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
2423
+ }
2292
2424
  return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
2293
2425
  },
2294
2426
  };
@@ -2350,7 +2482,7 @@ class Adaptable {
2350
2482
  return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
2351
2483
  }
2352
2484
  destroy(config) {
2353
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2485
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
2354
2486
  if (this.gridOptions && this.gridOptions.api) {
2355
2487
  this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
2356
2488
  this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
@@ -2410,27 +2542,29 @@ class Adaptable {
2410
2542
  this.adaptableStore = null;
2411
2543
  this.gridOptions = null;
2412
2544
  this.adaptableOptions = null;
2413
- (_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy();
2545
+ (_c = (_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy) === null || _c === void 0 ? void 0 : _c.call(_b);
2414
2546
  this.CalculatedColumnExpressionService = null;
2415
- (_c = this.DataService) === null || _c === void 0 ? void 0 : _c.destroy();
2547
+ (_e = (_d = this.DataService) === null || _d === void 0 ? void 0 : _d.destroy) === null || _e === void 0 ? void 0 : _e.call(_d);
2416
2548
  this.DataService = null;
2417
- (_d = this.EntitlementService) === null || _d === void 0 ? void 0 : _d.destroy();
2549
+ (_g = (_f = this.EntitlementService) === null || _f === void 0 ? void 0 : _f.destroy) === null || _g === void 0 ? void 0 : _g.call(_f);
2418
2550
  this.EntitlementService = null;
2419
- (_e = this.ReportService) === null || _e === void 0 ? void 0 : _e.destroy();
2551
+ (_j = (_h = this.ReportService) === null || _h === void 0 ? void 0 : _h.destroy) === null || _j === void 0 ? void 0 : _j.call(_h);
2420
2552
  this.ReportService = null;
2421
- (_f = this.ModuleService) === null || _f === void 0 ? void 0 : _f.destroy();
2553
+ (_l = (_k = this.ModuleService) === null || _k === void 0 ? void 0 : _k.destroy) === null || _l === void 0 ? void 0 : _l.call(_k);
2422
2554
  this.ModuleService = null;
2423
- (_g = this.ValidationService) === null || _g === void 0 ? void 0 : _g.destroy();
2555
+ (_o = (_m = this.ValidationService) === null || _m === void 0 ? void 0 : _m.destroy) === null || _o === void 0 ? void 0 : _o.call(_m);
2424
2556
  this.ValidationService = null;
2425
- (_h = this.QueryLanguageService) === null || _h === void 0 ? void 0 : _h.destroy();
2557
+ (_q = (_p = this.QueryLanguageService) === null || _p === void 0 ? void 0 : _p.destroy) === null || _q === void 0 ? void 0 : _q.call(_p);
2426
2558
  this.QueryLanguageService = null;
2427
- (_j = this.AlertService) === null || _j === void 0 ? void 0 : _j.destroy();
2559
+ (_s = (_r = this.AlertService) === null || _r === void 0 ? void 0 : _r.destroy) === null || _s === void 0 ? void 0 : _s.call(_r);
2428
2560
  this.AlertService = null;
2429
- (_k = this.TeamSharingService) === null || _k === void 0 ? void 0 : _k.destroy();
2561
+ (_u = (_t = this.TeamSharingService) === null || _t === void 0 ? void 0 : _t.destroy) === null || _u === void 0 ? void 0 : _u.call(_t);
2430
2562
  this.TeamSharingService = null;
2431
- (_l = this.MetamodelService) === null || _l === void 0 ? void 0 : _l.destroy();
2563
+ (_w = (_v = this.RowEditService) === null || _v === void 0 ? void 0 : _v.destroy) === null || _w === void 0 ? void 0 : _w.call(_v);
2564
+ this.RowEditService = null;
2565
+ (_y = (_x = this.MetamodelService) === null || _x === void 0 ? void 0 : _x.destroy) === null || _y === void 0 ? void 0 : _y.call(_x);
2432
2566
  this.MetamodelService = null;
2433
- (_m = this.LicenseService) === null || _m === void 0 ? void 0 : _m.destroy();
2567
+ (_0 = (_z = this.LicenseService) === null || _z === void 0 ? void 0 : _z.destroy) === null || _0 === void 0 ? void 0 : _0.call(_z);
2434
2568
  this.LicenseService = null;
2435
2569
  this.isDestroyed = true;
2436
2570
  }
@@ -2609,6 +2743,7 @@ class Adaptable {
2609
2743
  all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
2610
2744
  all_modules_1.Events.EVENT_COLUMN_VALUE_CHANGED,
2611
2745
  ];
2746
+ // ADD filter event
2612
2747
  this.gridOptions.api.addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
2613
2748
  if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
2614
2749
  this.debouncedSaveGridLayout();
@@ -2622,7 +2757,7 @@ class Adaptable {
2622
2757
  if (this.api.internalApi.isGridInPivotMode()) {
2623
2758
  return;
2624
2759
  }
2625
- if (this.adaptableOptions.generalOptions.hideColumnWhenGrouped === true &&
2760
+ if (this.adaptableOptions.columnOptions.hideColumnWhenGrouped === true &&
2626
2761
  params.source !== 'api') {
2627
2762
  params.columns.forEach((col) => {
2628
2763
  if (col.isVisible()) {
@@ -2722,7 +2857,7 @@ class Adaptable {
2722
2857
  if (this.isDestroyed) {
2723
2858
  return true;
2724
2859
  }
2725
- const columnFilters = this.api.filterApi.getAllColumnFilter();
2860
+ const columnFilters = this.api.layoutApi.getAllColumnFilter();
2726
2861
  const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
2727
2862
  const isQueryActive = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.api.queryApi.getCurrentQuery());
2728
2863
  return (isFilterActive ||
@@ -2753,10 +2888,10 @@ class Adaptable {
2753
2888
  try {
2754
2889
  // we then assess filters (if running locally)
2755
2890
  if (evaluateFilterOnClient) {
2756
- const columnFilters = this.api.filterApi.getAllColumnFilter();
2891
+ const columnFilters = this.api.layoutApi.getAllColumnFilter();
2757
2892
  if (columnFilters.length > 0) {
2758
2893
  for (const columnFilter of columnFilters) {
2759
- if (!this.api.filterApi.evaluateColumnFilter(columnFilter, node)) {
2894
+ if (!this.api.layoutApi.evaluateColumnFilter(columnFilter, node)) {
2760
2895
  return false;
2761
2896
  }
2762
2897
  }
@@ -2783,7 +2918,7 @@ class Adaptable {
2783
2918
  this.prepareGrid();
2784
2919
  }
2785
2920
  updateColumnFilterActiveState() {
2786
- const columnFilters = this.api.filterApi.getAllColumnFilter();
2921
+ const columnFilters = this.api.layoutApi.getAllColumnFilter();
2787
2922
  const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
2788
2923
  const columnsWithActiveFilters = {};
2789
2924
  if (isFilterActive) {
@@ -2946,7 +3081,7 @@ class Adaptable {
2946
3081
  fontSize: null,
2947
3082
  borderColor: null,
2948
3083
  };
2949
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(abColumn);
3084
+ const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
2950
3085
  const conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(abColumn);
2951
3086
  const quickSearchStyle = this.getQuickSearchCellStyle();
2952
3087
  const hasQuickSearchStyle = quickSearchStyle != undefined;
@@ -3013,7 +3148,7 @@ class Adaptable {
3013
3148
  const hasRichSelectCellEditor = this.isModulePresent('rich-select');
3014
3149
  this.setColDefProperty(col, 'cellEditor', () => {
3015
3150
  var _a;
3016
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(adaptableColumn);
3151
+ const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(adaptableColumn);
3017
3152
  if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle)) {
3018
3153
  return CheckboxRenderer_1.CheckboxEditor;
3019
3154
  }
@@ -3041,7 +3176,7 @@ class Adaptable {
3041
3176
  }
3042
3177
  setupColumnCellRenderer({ col, colId, abColumn }) {
3043
3178
  this.setColDefProperty(col, 'cellRenderer', () => {
3044
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(abColumn);
3179
+ const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
3045
3180
  if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn.ColumnStyle) {
3046
3181
  if (formatColumn.ColumnStyle.PercentBarStyle) {
3047
3182
  return this.agGridHelper.createPercentBarRendererComp(formatColumn);
@@ -3116,14 +3251,6 @@ class Adaptable {
3116
3251
  const newColumnHeader = (_b = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _b === void 0 ? void 0 : _b.headerName;
3117
3252
  return previousColumnHeader !== newColumnHeader;
3118
3253
  }
3119
- getUserDefinedHeaderName(columnId) {
3120
- const column = this.gridOptions.columnApi.getColumn(columnId);
3121
- if (!column) {
3122
- return columnId;
3123
- }
3124
- const userHeaderName = this.getUserColDefProperty(column.getColId(), 'headerName');
3125
- return userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(column.getColDef().field);
3126
- }
3127
3254
  setupColumnFilter({ col, colDef }) {
3128
3255
  this.setColDefProperty(col, 'filter', () => {
3129
3256
  if (!colDef.filter) {
@@ -3168,21 +3295,24 @@ class Adaptable {
3168
3295
  // change the Number format - if the scope allows it
3169
3296
  if (this.api.scopeApi.isColumnInNumericScope(abColumn, formatColumn.Scope)) {
3170
3297
  const options = formatColumn.DisplayFormat.Options;
3171
- valueFormatter = (params) => FormatHelper_1.default.NumberFormatter(params.value, options);
3298
+ valueFormatter = (params) => {
3299
+ let value = params.value;
3300
+ return this.api.formatColumnApi.getNumberFormattedValue(value, options);
3301
+ };
3172
3302
  }
3173
3303
  }
3174
3304
  if (formatColumn.DisplayFormat.Formatter === 'DateFormatter') {
3175
3305
  // change the Date format - if the scope allows it
3176
3306
  if (this.api.scopeApi.isColumnInDateScope(abColumn, formatColumn.Scope)) {
3177
3307
  const options = formatColumn.DisplayFormat.Options;
3178
- valueFormatter = (params) => FormatHelper_1.default.DateFormatter(params.value, options);
3308
+ valueFormatter = (params) => this.api.formatColumnApi.getDateFormattedValue(params.value, options);
3179
3309
  }
3180
3310
  }
3181
3311
  if (formatColumn.DisplayFormat.Formatter === 'StringFormatter') {
3182
3312
  // change the Date format - if the scope allows it
3183
3313
  if (this.api.scopeApi.isColumnInStringsScope(abColumn, formatColumn.Scope)) {
3184
3314
  const options = formatColumn.DisplayFormat.Options;
3185
- valueFormatter = (params) => FormatHelper_1.default.StringFormatter(params.value, options);
3315
+ valueFormatter = (params) => this.api.formatColumnApi.getStringFormattedValue(params.value, options);
3186
3316
  }
3187
3317
  }
3188
3318
  return valueFormatter;
@@ -3600,7 +3730,7 @@ class Adaptable {
3600
3730
  }
3601
3731
  getRowCount() {
3602
3732
  return this.gridOptions.rowData
3603
- ? this.gridOptions.rowData.length
3733
+ ? this.getGridData().length
3604
3734
  : this.gridOptions.api.getDisplayedRowCount();
3605
3735
  }
3606
3736
  getColumnCount() {
@@ -15,7 +15,7 @@ exports.FilterWrapperFactory = (adaptable) => {
15
15
  }
16
16
  isFilterActive() {
17
17
  //make the small filter icon to appear when there is a filter
18
- return (adaptable.api.filterApi
18
+ return (adaptable.api.layoutApi
19
19
  .getAllColumnFilter()
20
20
  .findIndex((x) => x.ColumnId == this.params.column.getColId()) > -1);
21
21
  }