@adaptabletools/adaptable 15.4.3 → 16.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 (278) hide show
  1. package/base.css +1 -1
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +234 -228
  4. package/index.css +1 -1
  5. package/index.css.map +1 -1
  6. package/package.json +2 -2
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -2
  10. package/src/AdaptableOptions/ActionColumnOptions.d.ts +82 -0
  11. package/src/AdaptableOptions/{ActionOptions.d.ts → ActionRowOptions.d.ts} +15 -90
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +32 -7
  13. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -12
  14. package/src/AdaptableOptions/AlertOptions.d.ts +9 -0
  15. package/src/AdaptableOptions/CalendarOptions.d.ts +11 -0
  16. package/src/AdaptableOptions/CellSummaryOptions.d.ts +10 -0
  17. package/src/AdaptableOptions/ColumnOptions.d.ts +0 -4
  18. package/src/AdaptableOptions/CustomSortOptions.d.ts +24 -0
  19. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +5 -1
  20. package/src/AdaptableOptions/DataSetOptions.d.ts +41 -0
  21. package/src/AdaptableOptions/DataSetOptions.js +2 -0
  22. package/src/AdaptableOptions/EditOptions.d.ts +4 -4
  23. package/src/AdaptableOptions/EntitlementOptions.d.ts +0 -16
  24. package/src/AdaptableOptions/ExportOptions.d.ts +2 -4
  25. package/src/AdaptableOptions/ExpressionOptions.d.ts +7 -0
  26. package/src/AdaptableOptions/FinancePluginOptions.d.ts +1 -1
  27. package/src/AdaptableOptions/GroupingOptions.d.ts +50 -0
  28. package/src/AdaptableOptions/GroupingOptions.js +2 -0
  29. package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +9 -0
  30. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -0
  31. package/src/AdaptableOptions/TeamSharingOptions.d.ts +0 -8
  32. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +30 -1
  33. package/src/Api/ActionColumnApi.d.ts +10 -0
  34. package/src/Api/ActionColumnApi.js +2 -0
  35. package/src/Api/{ActionApi.d.ts → ActionRowApi.d.ts} +4 -15
  36. package/src/Api/ActionRowApi.js +2 -0
  37. package/src/Api/AdaptableApi.d.ts +11 -6
  38. package/src/Api/AlertApi.d.ts +2 -111
  39. package/src/Api/BulkUpdateApi.d.ts +0 -7
  40. package/src/Api/CalculatedColumnApi.d.ts +0 -31
  41. package/src/Api/CalendarApi.d.ts +1 -1
  42. package/src/Api/CellSummaryApi.d.ts +0 -7
  43. package/src/Api/ChartingApi.d.ts +0 -7
  44. package/src/Api/ColumnApi.d.ts +1 -131
  45. package/src/Api/ConfigApi.d.ts +1 -7
  46. package/src/Api/CustomSortApi.d.ts +0 -25
  47. package/src/Api/DashboardApi.d.ts +0 -16
  48. package/src/Api/DataChangeHistoryApi.d.ts +0 -7
  49. package/src/Api/DataSetApi.d.ts +1 -16
  50. package/src/Api/EventApi.d.ts +1 -9
  51. package/src/Api/Events/AdaptableStateChanged.d.ts +0 -8
  52. package/src/Api/Events/AdaptableStateReloaded.d.ts +0 -4
  53. package/src/Api/Events/BaseEventInfo.d.ts +9 -1
  54. package/src/Api/Events/LiveDataChanged.d.ts +3 -7
  55. package/src/Api/ExportApi.d.ts +7 -31
  56. package/src/Api/{QueryLanguageApi.d.ts → ExpressionApi.d.ts} +2 -2
  57. package/src/Api/ExpressionApi.js +2 -0
  58. package/src/Api/FilterApi.d.ts +1 -59
  59. package/src/Api/FlashingCellApi.d.ts +0 -15
  60. package/src/Api/FormatColumnApi.d.ts +1 -91
  61. package/src/Api/FreeTextColumnApi.d.ts +0 -39
  62. package/src/Api/GridApi.d.ts +0 -31
  63. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +7 -0
  64. package/src/Api/Implementation/ActionColumnApiImpl.js +14 -0
  65. package/src/Api/Implementation/ActionRowApiImpl.d.ts +12 -0
  66. package/src/Api/Implementation/{ActionApiImpl.js → ActionRowApiImpl.js} +8 -15
  67. package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -4
  68. package/src/Api/Implementation/AdaptableApiImpl.js +7 -5
  69. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -43
  70. package/src/Api/Implementation/AlertApiImpl.js +4 -94
  71. package/src/Api/Implementation/ApiBase.d.ts +15 -5
  72. package/src/Api/Implementation/ApiBase.js +26 -8
  73. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +0 -7
  74. package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -32
  75. package/src/Api/Implementation/CalendarApiImpl.d.ts +1 -0
  76. package/src/Api/Implementation/CalendarApiImpl.js +20 -17
  77. package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -1
  78. package/src/Api/Implementation/CellSummaryApiImpl.js +1 -6
  79. package/src/Api/Implementation/ChartingApiImpl.d.ts +0 -1
  80. package/src/Api/Implementation/ChartingApiImpl.js +0 -5
  81. package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -35
  82. package/src/Api/Implementation/ColumnApiImpl.js +1 -138
  83. package/src/Api/Implementation/ConfigApiImpl.js +2 -1
  84. package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -5
  85. package/src/Api/Implementation/CustomSortApiImpl.js +0 -16
  86. package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -4
  87. package/src/Api/Implementation/DashboardApiImpl.js +2 -24
  88. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +0 -1
  89. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +0 -5
  90. package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -4
  91. package/src/Api/Implementation/DataSetApiImpl.js +1 -14
  92. package/src/Api/Implementation/ExportApiImpl.d.ts +4 -10
  93. package/src/Api/Implementation/ExportApiImpl.js +15 -34
  94. package/src/Api/Implementation/{QueryLanguageApiImpl.d.ts → ExpressionApiImpl.d.ts} +4 -4
  95. package/src/Api/Implementation/{QueryLanguageApiImpl.js → ExpressionApiImpl.js} +7 -5
  96. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -17
  97. package/src/Api/Implementation/FilterApiImpl.js +0 -53
  98. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +0 -3
  99. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -13
  100. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -34
  101. package/src/Api/Implementation/FormatColumnApiImpl.js +0 -73
  102. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -8
  103. package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -29
  104. package/src/Api/Implementation/GridApiImpl.d.ts +0 -7
  105. package/src/Api/Implementation/GridApiImpl.js +3 -32
  106. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -6
  107. package/src/Api/Implementation/LayoutApiImpl.js +2 -27
  108. package/src/Api/Implementation/OptionsApiImpl.d.ts +10 -5
  109. package/src/Api/Implementation/OptionsApiImpl.js +19 -7
  110. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +0 -1
  111. package/src/Api/Implementation/PlusMinusApiImpl.js +0 -5
  112. package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -8
  113. package/src/Api/Implementation/PredicateApiImpl.js +2 -30
  114. package/src/Api/Implementation/QueryApiImpl.d.ts +0 -5
  115. package/src/Api/Implementation/QueryApiImpl.js +0 -21
  116. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +0 -1
  117. package/src/Api/Implementation/QuickSearchApiImpl.js +0 -5
  118. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -18
  119. package/src/Api/Implementation/ScheduleApiImpl.js +0 -69
  120. package/src/Api/Implementation/ScopeApiImpl.js +1 -1
  121. package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +0 -2
  122. package/src/Api/Implementation/SettingsPanelApiImpl.js +0 -9
  123. package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -6
  124. package/src/Api/Implementation/ShortcutApiImpl.js +0 -21
  125. package/src/Api/Implementation/SmartEditApiImpl.d.ts +0 -1
  126. package/src/Api/Implementation/SmartEditApiImpl.js +0 -5
  127. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -5
  128. package/src/Api/Implementation/StyledColumnApiImpl.js +2 -17
  129. package/src/Api/Implementation/SystemStatusApiImpl.d.ts +0 -2
  130. package/src/Api/Implementation/SystemStatusApiImpl.js +0 -9
  131. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +0 -5
  132. package/src/Api/Implementation/TeamSharingApiImpl.js +0 -21
  133. package/src/Api/Implementation/ThemeApiImpl.d.ts +0 -4
  134. package/src/Api/Implementation/ThemeApiImpl.js +2 -17
  135. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  136. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +4 -2
  137. package/src/Api/Implementation/UserInterfaceApiImpl.js +17 -10
  138. package/src/Api/Internal/{ActionInternalApi.d.ts → ActionRowInternalApi.d.ts} +2 -2
  139. package/src/Api/Internal/{ActionInternalApi.js → ActionRowInternalApi.js} +12 -5
  140. package/src/Api/Internal/AdaptableInternalApi.d.ts +1 -10
  141. package/src/Api/Internal/AdaptableInternalApi.js +9 -20
  142. package/src/Api/Internal/AlertInternalApi.js +9 -6
  143. package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
  144. package/src/Api/Internal/CustomSortInternalApi.d.ts +1 -1
  145. package/src/Api/Internal/CustomSortInternalApi.js +1 -1
  146. package/src/Api/Internal/DashboardInternalApi.js +2 -0
  147. package/src/Api/Internal/DataSetInternalApi.d.ts +1 -1
  148. package/src/Api/Internal/DataSetInternalApi.js +2 -1
  149. package/src/Api/Internal/ExportInternalApi.js +1 -1
  150. package/src/Api/Internal/{QueryLanguageInternalApi.d.ts → ExpressionnternalApi.d.ts} +1 -1
  151. package/src/Api/Internal/{QueryLanguageInternalApi.js → ExpressionnternalApi.js} +9 -5
  152. package/src/Api/Internal/FilterInternalApi.js +4 -1
  153. package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
  154. package/src/Api/Internal/GridInternalApi.js +8 -0
  155. package/src/Api/Internal/LayoutInternalApi.js +6 -1
  156. package/src/Api/Internal/PredicateInternalApi.js +10 -0
  157. package/src/Api/Internal/QueryInternalApi.js +3 -1
  158. package/src/Api/Internal/SystemStatusInternalApi.js +4 -1
  159. package/src/Api/Internal/TeamSharingInternalApi.js +2 -0
  160. package/src/Api/LayoutApi.d.ts +3 -27
  161. package/src/Api/OptionsApi.d.ts +28 -10
  162. package/src/Api/PlusMinusApi.d.ts +0 -7
  163. package/src/Api/PredicateApi.d.ts +1 -32
  164. package/src/Api/QueryApi.d.ts +0 -23
  165. package/src/Api/QuickSearchApi.d.ts +0 -4
  166. package/src/Api/ScheduleApi.d.ts +0 -81
  167. package/src/Api/SettingsPanelApi.d.ts +0 -11
  168. package/src/Api/ShortcutApi.d.ts +0 -25
  169. package/src/Api/SmartEditApi.d.ts +0 -7
  170. package/src/Api/StyledColumnApi.d.ts +0 -21
  171. package/src/Api/SystemStatusApi.d.ts +0 -11
  172. package/src/Api/TeamSharingApi.d.ts +0 -23
  173. package/src/Api/ThemeApi.d.ts +0 -19
  174. package/src/Api/UserInterfaceApi.d.ts +4 -9
  175. package/src/PredefinedConfig/AlertState.d.ts +4 -1
  176. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -3
  177. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +4 -1
  178. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +3 -0
  179. package/src/PredefinedConfig/Common/BaseContext.d.ts +8 -0
  180. package/src/PredefinedConfig/Common/DataChangedScope.d.ts +9 -0
  181. package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
  182. package/src/PredefinedConfig/LayoutState.d.ts +0 -6
  183. package/src/PredefinedConfig/SystemState.d.ts +1 -1
  184. package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
  185. package/src/PredefinedConfig/ThemeState.d.ts +3 -0
  186. package/src/Strategy/AdaptableModuleBase.js +3 -3
  187. package/src/Strategy/AlertModule.js +3 -3
  188. package/src/Strategy/CalculatedColumnModule.js +2 -2
  189. package/src/Strategy/CellSummaryModule.js +2 -0
  190. package/src/Strategy/DataSetModule.d.ts +1 -1
  191. package/src/Strategy/DataSetModule.js +1 -1
  192. package/src/Strategy/ExportModule.js +4 -0
  193. package/src/Strategy/FlashingCellModule.js +4 -4
  194. package/src/Strategy/FormatColumnModule.js +3 -3
  195. package/src/Strategy/QueryModule.js +1 -1
  196. package/src/Strategy/SmartEditModule.js +2 -0
  197. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +24 -22
  198. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +4 -0
  199. package/src/Utilities/Helpers/AdaptableHelper.js +12 -6
  200. package/src/Utilities/Helpers/FormatHelper.js +7 -0
  201. package/src/Utilities/ObjectFactory.d.ts +2 -2
  202. package/src/Utilities/ObjectFactory.js +6 -4
  203. package/src/Utilities/Services/AlertService.js +1 -1
  204. package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -2
  205. package/src/Utilities/Services/ChartingService.js +2 -0
  206. package/src/Utilities/Services/EntitlementService.js +2 -2
  207. package/src/Utilities/Services/ModuleService.js +10 -10
  208. package/src/Utilities/Services/QueryLanguageService.js +16 -0
  209. package/src/Utilities/Services/ReportService.js +8 -6
  210. package/src/Utilities/Services/RowEditService.js +4 -2
  211. package/src/Utilities/Services/ValidationService.js +2 -0
  212. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +3 -3
  213. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  214. package/src/View/CellSummary/CellSummaryStatusPanel.js +1 -1
  215. package/src/View/Components/AdaptableIconSelector/index.d.ts +6 -0
  216. package/src/View/Components/AdaptableIconSelector/index.js +18 -0
  217. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -2
  218. package/src/View/Components/AdaptableViewIcon/index.d.ts +10 -0
  219. package/src/View/Components/AdaptableViewIcon/index.js +18 -0
  220. package/src/View/Components/EntityRulesEditor/Utilities.js +3 -3
  221. package/src/View/Components/ExternalRenderer.js +14 -2
  222. package/src/View/Components/FilterForm/QuickFilterForm.js +4 -0
  223. package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -0
  224. package/src/View/Components/RangesComponent.d.ts +4 -4
  225. package/src/View/Components/RangesComponent.js +13 -22
  226. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
  227. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -1
  228. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
  229. package/src/View/Dashboard/CustomDashboardButton.js +2 -0
  230. package/src/View/Dashboard/CustomToolbarWrapper.js +13 -1
  231. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +5 -5
  232. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
  233. package/src/View/DataChangeHistory/buildActionColumnButton.js +3 -2
  234. package/src/View/Export/ExportViewPanel.js +4 -4
  235. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -1
  236. package/src/View/GridInfo/GridInfoPopup.d.ts +0 -1
  237. package/src/View/GridInfo/GridInfoPopup.js +1 -2
  238. package/src/View/GridInfo/GridOptionsComponent.js +1 -1
  239. package/src/View/Layout/LayoutViewPanel.js +1 -1
  240. package/src/View/Layout/PivotDetailsPopoup.js +2 -0
  241. package/src/View/Layout/SaveLayoutButton.js +1 -1
  242. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  243. package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  244. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
  245. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
  246. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +8 -1
  247. package/src/agGrid/ActionColumnRenderer.d.ts +1 -1
  248. package/src/agGrid/ActionColumnRenderer.js +5 -1
  249. package/src/agGrid/Adaptable.d.ts +14 -3
  250. package/src/agGrid/Adaptable.js +129 -30
  251. package/src/agGrid/BadgeRenderer.js +10 -2
  252. package/src/agGrid/CheckboxRenderer.d.ts +1 -2
  253. package/src/agGrid/agGridHelper.js +4 -5
  254. package/src/agGrid/agGridMenuHelper.js +4 -0
  255. package/src/agGrid/attachAddaptableColumnTypes.d.ts +11 -11
  256. package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -0
  257. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  258. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +6 -3
  259. package/src/components/AdaptableIconComponent/index.js +6 -3
  260. package/src/components/ExpressionEditor/BaseEditorInput.js +2 -0
  261. package/src/components/ExpressionEditor/index.js +1 -1
  262. package/src/components/IconSelector/IconSelector.d.ts +2 -0
  263. package/src/components/IconSelector/IconSelector.js +21 -5
  264. package/src/components/Input/NumberInput.d.ts +10 -0
  265. package/src/components/Input/NumberInput.js +46 -0
  266. package/src/metamodel/adaptable.metamodel.d.ts +230 -145
  267. package/src/metamodel/adaptable.metamodel.js +1 -1
  268. package/src/types.d.ts +13 -8
  269. package/version.d.ts +1 -1
  270. package/version.js +1 -1
  271. package/src/AdaptableOptions/GeneralOptions.d.ts +0 -159
  272. package/src/Api/Events/SearchChanged.d.ts +0 -12
  273. package/src/Api/Implementation/ActionApiImpl.d.ts +0 -14
  274. /package/src/AdaptableOptions/{ActionOptions.js → ActionColumnOptions.js} +0 -0
  275. /package/src/AdaptableOptions/{GeneralOptions.js → ActionRowOptions.js} +0 -0
  276. /package/src/{Api/ActionApi.js → AdaptableOptions/CalendarOptions.js} +0 -0
  277. /package/src/{Api/Events/SearchChanged.js → AdaptableOptions/CellSummaryOptions.js} +0 -0
  278. /package/src/{Api/QueryLanguageApi.js → AdaptableOptions/CustomSortOptions.js} +0 -0
@@ -287,11 +287,9 @@ class Adaptable {
287
287
  if (!((_a = runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.agGridModules) === null || _a === void 0 ? void 0 : _a.length)) {
288
288
  AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No AG Grid modules were provided, thus limiting AdapTables features significantly!\n\nRead further info here:${DocumentationLinkConstants_1.AgGridModulesDocsLink}`);
289
289
  }
290
- else {
291
- core_1.ModuleRegistry.registerModules(runtimeConfig.agGridModules);
292
- }
293
290
  return Adaptable.initInternal(adaptableOptions, {
294
291
  supressReact18RenderWarning: true,
292
+ agGridModules: runtimeConfig.agGridModules,
295
293
  });
296
294
  }
297
295
  /**
@@ -610,7 +608,28 @@ class Adaptable {
610
608
  }
611
609
  }
612
610
  initializeAgGrid() {
611
+ var _a;
613
612
  const perfInitializeAgGrid = this.logger.beginPerf('initializeAgGrid()');
613
+ this.setGridOptionsProperty('dataTypeDefinitions', () => {
614
+ // temporary workaround until https://github.com/AdaptableTools/adaptable/issues/2230
615
+ const revertedDateTypeDefinitions = {
616
+ date: {
617
+ baseDataType: 'date',
618
+ extendsDataType: 'date',
619
+ valueParser: null,
620
+ valueFormatter: null,
621
+ suppressDefaultProperties: true,
622
+ },
623
+ dateString: {
624
+ baseDataType: 'dateString',
625
+ extendsDataType: 'dateString',
626
+ valueParser: null,
627
+ valueFormatter: null,
628
+ suppressDefaultProperties: true,
629
+ },
630
+ };
631
+ return revertedDateTypeDefinitions;
632
+ });
614
633
  // set up whether we use the getRowNode method or loop when finding a rowNode (former is preferable)
615
634
  // can only do that here as the gridOptions not yet set up
616
635
  this.useRowNodeLookUp = this.agGridHelper.TrySetUpNodeIds(this.hasAutogeneratedPrimaryKey());
@@ -672,8 +691,11 @@ class Adaptable {
672
691
  let grid;
673
692
  const agGridContainer = this.getAgGridContainerElement();
674
693
  const perfAgGridInstance = this.logger.beginPerf('new AgGrid()');
675
- // the AG Grid modules are already registered, see the init() method
676
- grid = new core_1.Grid(agGridContainer, this.gridOptions);
694
+ let gridParams;
695
+ if ((_a = this.runtimeConfig.agGridModules) === null || _a === void 0 ? void 0 : _a.length) {
696
+ gridParams = { modules: this.runtimeConfig.agGridModules };
697
+ }
698
+ grid = new core_1.Grid(agGridContainer, this.gridOptions, gridParams);
677
699
  perfAgGridInstance.end();
678
700
  // add our adaptable object to the grid options api object
679
701
  // this is VERY useful for when we need to access Adaptable inside of agGrid only functions
@@ -1316,7 +1338,7 @@ class Adaptable {
1316
1338
  this.updateColumnsIntoStore();
1317
1339
  }
1318
1340
  persistLayout(layout) {
1319
- if (this.api.layoutApi.shouldAutoSaveLayout(layout)) {
1341
+ if (this.api.layoutApi.shouldAutoSaveLayouts()) {
1320
1342
  this.api.layoutApi.createOrUpdateLayout(layout);
1321
1343
  }
1322
1344
  else {
@@ -1508,6 +1530,7 @@ class Adaptable {
1508
1530
  state: newColumnsState,
1509
1531
  applyOrder: true,
1510
1532
  });
1533
+ this.applyGroupColumnWidth(layout);
1511
1534
  perfApplyColumnState.end();
1512
1535
  this.api.gridApi.setColumnSorts(layout.ColumnSorts);
1513
1536
  this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
@@ -1551,6 +1574,37 @@ class Adaptable {
1551
1574
  });
1552
1575
  perfSetLayout.end();
1553
1576
  }
1577
+ /**
1578
+ * Setting layout works by modifing the column state.
1579
+ * The column state is based on the current existing columns.
1580
+ * At this point the column groups do not exist, and the widths from layout are not applied.
1581
+ *
1582
+ * After the col sate is applied and the column groups are created we need
1583
+ * to apply the state again to update the widths of the group columns.
1584
+ */
1585
+ applyGroupColumnWidth(layout) {
1586
+ if (!layout.RowGroupedColumns || !layout.RowGroupedColumns.length) {
1587
+ return;
1588
+ }
1589
+ const groupColumnWithDifferentWidths = this.gridOptions
1590
+ .columnApi.getColumnState()
1591
+ .reduce((acc, col) => {
1592
+ var _a;
1593
+ if (col.colId === (GeneralConstants === null || GeneralConstants === void 0 ? void 0 : GeneralConstants.AG_GRID_GROUPED_COLUMN)) {
1594
+ const widthInLayout = (_a = layout.ColumnWidthMap) === null || _a === void 0 ? void 0 : _a[col.colId];
1595
+ if (widthInLayout && widthInLayout !== col.width) {
1596
+ acc.push(Object.assign(Object.assign({}, col), { width: widthInLayout }));
1597
+ }
1598
+ }
1599
+ return acc;
1600
+ }, []);
1601
+ if (groupColumnWithDifferentWidths.length === 0) {
1602
+ return;
1603
+ }
1604
+ this.gridOptions.columnApi.applyColumnState({
1605
+ state: groupColumnWithDifferentWidths,
1606
+ });
1607
+ }
1554
1608
  updateRowGroupsExpandedState(layout) {
1555
1609
  if (!layout) {
1556
1610
  layout = this.api.layoutApi.getCurrentLayout();
@@ -1625,7 +1679,7 @@ class Adaptable {
1625
1679
  });
1626
1680
  groupedColumns = groupedColumns.filter((x) => !!x);
1627
1681
  pivotedColumns = pivotedColumns.filter((x) => !!x);
1628
- if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.generalOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
1682
+ if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
1629
1683
  columnOrder = this.restoreUnGroupColumnOrder({
1630
1684
  columnOrder,
1631
1685
  newGroupColumns: groupedColumns,
@@ -1833,7 +1887,13 @@ class Adaptable {
1833
1887
  });
1834
1888
  }
1835
1889
  }
1836
- const uniqueVals = (0, uniqBy_1.default)(returnValues, 'rawValue');
1890
+ const uniqueVals = (0, uniqBy_1.default)(returnValues, (dataItem) => {
1891
+ const value = dataItem.rawValue;
1892
+ if (value instanceof Date) {
1893
+ return value.toISOString();
1894
+ }
1895
+ return value;
1896
+ });
1837
1897
  return uniqueVals.slice(0, this.adaptableOptions.filterOptions.maxFilterValuesToDisplay);
1838
1898
  }
1839
1899
  async getDistinctFilterValuesForColumn(column, visibleRowsOnly, filter, skipRowNode) {
@@ -1846,6 +1906,8 @@ class Adaptable {
1846
1906
  try {
1847
1907
  const filterPermittedValuesParams = {
1848
1908
  adaptableApi: this.api,
1909
+ userName: this.adaptableOptions.userName,
1910
+ adaptableId: this.adaptableOptions.adaptableId,
1849
1911
  column: column,
1850
1912
  searchFilter: filter,
1851
1913
  };
@@ -1865,6 +1927,8 @@ class Adaptable {
1865
1927
  try {
1866
1928
  const permittedValuesParams = {
1867
1929
  adaptableApi: this.api,
1930
+ userName: this.adaptableOptions.userName,
1931
+ adaptableId: this.adaptableOptions.adaptableId,
1868
1932
  column: column,
1869
1933
  };
1870
1934
  preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(permittedValuesParams));
@@ -1882,6 +1946,8 @@ class Adaptable {
1882
1946
  adaptableApi: this.api,
1883
1947
  column: column,
1884
1948
  gridCells: selectedGridCells,
1949
+ userName: this.adaptableOptions.userName,
1950
+ adaptableId: this.adaptableOptions.adaptableId,
1885
1951
  };
1886
1952
  preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(bulkUpdatePermittedValuesParams));
1887
1953
  }
@@ -2321,7 +2387,7 @@ class Adaptable {
2321
2387
  });
2322
2388
  }
2323
2389
  getColDefsForRowEditColumns() {
2324
- const actionRowButtons = this.api.actionApi.getActionRowButtons();
2390
+ const actionRowButtons = this.api.actionRowApi.getActionRowButtons();
2325
2391
  if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
2326
2392
  return [];
2327
2393
  }
@@ -2332,7 +2398,7 @@ class Adaptable {
2332
2398
  },
2333
2399
  tooltip: 'Create',
2334
2400
  onClick: () => {
2335
- this.api.actionApi.displayCreateActionRow();
2401
+ this.api.actionRowApi.displayCreateActionRow();
2336
2402
  },
2337
2403
  },
2338
2404
  edit: {
@@ -2341,7 +2407,7 @@ class Adaptable {
2341
2407
  },
2342
2408
  tooltip: 'Edit',
2343
2409
  onClick: (button, context) => {
2344
- this.api.actionApi.displayEditActionRow(context.primaryKeyValue);
2410
+ this.api.actionRowApi.displayEditActionRow(context.primaryKeyValue);
2345
2411
  },
2346
2412
  },
2347
2413
  clone: {
@@ -2350,7 +2416,7 @@ class Adaptable {
2350
2416
  },
2351
2417
  tooltip: 'Clone',
2352
2418
  onClick: (button, context) => {
2353
- this.api.actionApi.displayCloneActionRow(context.primaryKeyValue);
2419
+ this.api.actionRowApi.displayCloneActionRow(context.primaryKeyValue);
2354
2420
  },
2355
2421
  },
2356
2422
  delete: {
@@ -2364,9 +2430,11 @@ class Adaptable {
2364
2430
  type: 'rowDeleted',
2365
2431
  rowNode: context.rowNode,
2366
2432
  adaptableApi: context.adaptableApi,
2433
+ userName: context.userName,
2434
+ adaptableId: context.adaptableId,
2367
2435
  };
2368
2436
  this.api.eventApi.emit('ActionRowSubmitted', eventInfo);
2369
- (_b = (_a = this.adaptableOptions.actionOptions.actionRowButtonOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
2437
+ (_b = (_a = this.adaptableOptions.actionRowOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
2370
2438
  },
2371
2439
  },
2372
2440
  };
@@ -2378,9 +2446,11 @@ class Adaptable {
2378
2446
  // should NOT happen unless the user sent some invalid button type in the predefined config
2379
2447
  return;
2380
2448
  }
2381
- const customButtonConfig = (_b = (_a = this.adaptableOptions.actionOptions.actionRowButtonOptions).customConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, {
2449
+ const customButtonConfig = (_b = (_a = this.adaptableOptions.actionRowOptions.actionRowButtonOptions).customConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, {
2382
2450
  adaptableApi: this.api,
2383
2451
  actionRowButtonType,
2452
+ userName: this.adaptableOptions.userName,
2453
+ adaptableId: this.adaptableOptions.adaptableId,
2384
2454
  });
2385
2455
  if (!customButtonConfig) {
2386
2456
  return defaultButtonConfig;
@@ -2412,7 +2482,7 @@ class Adaptable {
2412
2482
  filter: false,
2413
2483
  sortable: false,
2414
2484
  enableRowGroup: false,
2415
- pinned: this.adaptableOptions.actionOptions.actionRowButtonOptions.position === 'pinnedRight'
2485
+ pinned: this.adaptableOptions.actionRowOptions.actionRowButtonOptions.position === 'pinnedRight'
2416
2486
  ? 'right'
2417
2487
  : 'left',
2418
2488
  cellRenderer: this.variant === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
@@ -2430,7 +2500,7 @@ class Adaptable {
2430
2500
  suppressMenu: false,
2431
2501
  suppressMovable: false,
2432
2502
  };
2433
- return this.api.actionApi.getActionColumns().map((actionColumn) => {
2503
+ return this.api.actionColumnApi.getActionColumns().map((actionColumn) => {
2434
2504
  const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
2435
2505
  const newColDef = {
2436
2506
  headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
@@ -2528,7 +2598,7 @@ class Adaptable {
2528
2598
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
2529
2599
  columnTypes.push(...calculatedColumnSettings.ColumnTypes);
2530
2600
  }
2531
- const isExternalEvaluation = !this.api.queryLanguageApi.internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query));
2601
+ const isExternalEvaluation = !this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query));
2532
2602
  const newColDef = {
2533
2603
  headerName: calculatedColumn.FriendlyName
2534
2604
  ? calculatedColumn.FriendlyName
@@ -2833,8 +2903,8 @@ class Adaptable {
2833
2903
  * Action: Stop editing
2834
2904
  */
2835
2905
  this.gridOptions.api.addEventListener(core_1.Events.EVENT_CELL_EDITING_STARTED, (this.listenerCellEditingStarted = () => {
2836
- var _a, _b;
2837
- if ((_b = (_a = this.adaptableOptions.actionOptions) === null || _a === void 0 ? void 0 : _a.actionRowButtonOptions) === null || _b === void 0 ? void 0 : _b.disableInlineEditing)
2906
+ var _a;
2907
+ if ((_a = this.adaptableOptions.actionRowOptions) === null || _a === void 0 ? void 0 : _a.disableInlineEditing)
2838
2908
  this.gridOptions.api.stopEditing();
2839
2909
  }));
2840
2910
  /**
@@ -2921,7 +2991,7 @@ class Adaptable {
2921
2991
  if (this.api.internalApi.isGridInPivotMode()) {
2922
2992
  return;
2923
2993
  }
2924
- if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.generalOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
2994
+ if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
2925
2995
  this.persistColumnIndexBeforeGrouping(params);
2926
2996
  }
2927
2997
  }));
@@ -2967,7 +3037,7 @@ class Adaptable {
2967
3037
  this.onSortChanged();
2968
3038
  this.debouncedSetSelectedCells();
2969
3039
  }));
2970
- const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions.showGroupingTotalsAsHeader;
3040
+ const showGroupingTotalsAsHeader = this.adaptableOptions.groupingOptions.showGroupingTotalsAsHeader;
2971
3041
  /**
2972
3042
  * Use Case: Model has updated
2973
3043
  * Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
@@ -3051,9 +3121,9 @@ class Adaptable {
3051
3121
  if (!this.isGroupRowNode(node)) {
3052
3122
  const currentQuery = this.api.queryApi.getCurrentQuery();
3053
3123
  if (currentQuery) {
3054
- const evaluateQueryOnClient = this.api.queryLanguageApi.internalApi.evaluateExpressionInAdaptableQL('Query', undefined, currentQuery);
3124
+ const evaluateQueryOnClient = this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('Query', undefined, currentQuery);
3055
3125
  if (evaluateQueryOnClient) {
3056
- const isCurrentQueryValid = this.api.queryLanguageApi.isValidBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, `Invalid CurrentQuery '${currentQuery}'`);
3126
+ const isCurrentQueryValid = this.api.expressionApi.isValidBooleanExpression(currentQuery, ModuleConstants_1.QueryModuleId, `Invalid CurrentQuery '${currentQuery}'`);
3057
3127
  if (!isCurrentQueryValid ||
3058
3128
  !this.api.internalApi
3059
3129
  .getQueryLanguageService()
@@ -3067,7 +3137,7 @@ class Adaptable {
3067
3137
  try {
3068
3138
  if (columnFilters.length > 0) {
3069
3139
  for (const columnFilter of columnFilters) {
3070
- const evaluateFilterOnClient = this.api.queryLanguageApi.internalApi.evaluatePredicatesInAdaptableQL('Filter', columnFilter, [columnFilter.Predicate]);
3140
+ const evaluateFilterOnClient = this.api.expressionApi.internalApi.evaluatePredicatesInAdaptableQL('Filter', columnFilter, [columnFilter.Predicate]);
3071
3141
  if (evaluateFilterOnClient) {
3072
3142
  // we then assess filters (if running locally)
3073
3143
  if (!this.api.filterApi.internalApi.evaluateColumnFilter(columnFilter, node)) {
@@ -3181,6 +3251,9 @@ class Adaptable {
3181
3251
  this.setupColumnQuickFilerText(colSetupInfo);
3182
3252
  this.setupAllowedAggFuncs(colSetupInfo);
3183
3253
  this.setupColumnKeyCreator(colSetupInfo);
3254
+ // this is just to make sure that AG Grid does NOT infer the cellDataType
3255
+ // https://github.com/AdaptableTools/adaptable/issues/2230 should render it obsolete
3256
+ this.setupColumnCellDataType(colSetupInfo);
3184
3257
  });
3185
3258
  this.setupRowStyling();
3186
3259
  // setupAggregationColumnHeaders() is executed on every setLayout()
@@ -3462,13 +3535,15 @@ class Adaptable {
3462
3535
  return userPropertyValue(params);
3463
3536
  }
3464
3537
  const value = params.value;
3465
- const unbalancedGroupsKey = (_a = adaptableOptions.generalOptions) === null || _a === void 0 ? void 0 : _a.unbalancedGroupsKey;
3538
+ const unbalancedGroupsKey = (_a = adaptableOptions.groupingOptions) === null || _a === void 0 ? void 0 : _a.unbalancedGroupsKey;
3466
3539
  if (!unbalancedGroupsKey) {
3467
3540
  return value;
3468
3541
  }
3469
3542
  let groupUnbalancedGroupsUnderKeyValue = typeof unbalancedGroupsKey === 'function'
3470
3543
  ? unbalancedGroupsKey({
3471
3544
  adaptableApi: adaptableApi,
3545
+ userName: this.adaptableOptions.userName,
3546
+ adaptableId: this.adaptableOptions.adaptableId,
3472
3547
  adaptableColumn: abColumn,
3473
3548
  params,
3474
3549
  })
@@ -3477,6 +3552,14 @@ class Adaptable {
3477
3552
  };
3478
3553
  });
3479
3554
  }
3555
+ setupColumnCellDataType(columnSetupInfo) {
3556
+ const { col } = columnSetupInfo;
3557
+ // AG Grid introduced since v30.x an inferred cellDataType
3558
+ // the problem is that it breaks the default value formatter and/or editor (especially for Date columns)
3559
+ this.setColDefProperty(col, 'cellDataType', () => {
3560
+ return false;
3561
+ });
3562
+ }
3480
3563
  setupColumnHeader({ col, abColumn }) {
3481
3564
  var _a, _b;
3482
3565
  const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
@@ -3527,7 +3610,7 @@ class Adaptable {
3527
3610
  });
3528
3611
  }
3529
3612
  setupColumnValueFormatter({ col, abColumn }) {
3530
- this.setColDefProperty(col, 'valueFormatter', (params) => {
3613
+ this.setColDefProperty(col, 'valueFormatter', (userPropertyValue) => {
3531
3614
  const activeFormatColumnsWithDisplayFormat = this.api.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
3532
3615
  if (!activeFormatColumnsWithDisplayFormat.length) {
3533
3616
  return;
@@ -3578,6 +3661,8 @@ class Adaptable {
3578
3661
  const cellEditableContext = {
3579
3662
  gridCell,
3580
3663
  adaptableApi: this.api,
3664
+ userName: this.adaptableOptions.userName,
3665
+ adaptableId: this.adaptableOptions.adaptableId,
3581
3666
  };
3582
3667
  return cellEditableFn(cellEditableContext);
3583
3668
  };
@@ -3680,10 +3765,23 @@ class Adaptable {
3680
3765
  this.agGridHelper.checkShouldClearExistingFiltersOrSearches();
3681
3766
  }
3682
3767
  isAgGridModulePresent(moduleName) {
3683
- return core_1.ModuleRegistry.isRegistered(moduleName);
3768
+ const standardAgGridRegistrationCheck = core_1.ModuleRegistry.__isRegistered(moduleName, this.gridOptions.gridId);
3769
+ if (standardAgGridRegistrationCheck) {
3770
+ return true;
3771
+ }
3772
+ // as of AG Grid 30.0.3 the ModuleRegistry gets an dynamic grid ID for the framework versions
3773
+ // because of that we have to check ALL grid IDs to see if the module is registered
3774
+ // TODO AFL: we should recheck this later, it seems AG Grid is already refactoring this faulty registration process
3775
+ // @ts-ignore
3776
+ const gridModulesMap = core_1.ModuleRegistry.gridModulesMap;
3777
+ let allGridModulesMap = {};
3778
+ Object.keys(gridModulesMap).forEach((gridId) => {
3779
+ allGridModulesMap = Object.assign(Object.assign({}, allGridModulesMap), gridModulesMap[gridId]);
3780
+ });
3781
+ return !!allGridModulesMap[moduleName];
3684
3782
  }
3685
3783
  getAgGridRegisteredModules() {
3686
- return core_1.ModuleRegistry.getRegisteredModules().map((module) => module.moduleName);
3784
+ return core_1.ModuleRegistry.__getRegisteredModules(this.gridOptions.gridId).map((module) => module.moduleName);
3687
3785
  }
3688
3786
  onRowDataChanged({ rowNode, oldData, newData, }) {
3689
3787
  if (oldData == null || oldData == undefined) {
@@ -3824,7 +3922,7 @@ class Adaptable {
3824
3922
  if (!dataChangedScope.wholeRow) {
3825
3923
  formatColumnsWithExpression.forEach((styleModule) => {
3826
3924
  if (!dataChangedScope.wholeRow) {
3827
- const columnIds = this.api.queryLanguageApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
3925
+ const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
3828
3926
  if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
3829
3927
  if (this.api.scopeApi.scopeIsAll(styleModule.Scope)) {
3830
3928
  dataChangedScope.wholeRow = true;
@@ -5033,6 +5131,7 @@ class AdaptableNoCodeWizard {
5033
5131
  * @param adaptableOptions
5034
5132
  */
5035
5133
  constructor(adaptableOptions, extraOptions = {}) {
5134
+ var _a;
5036
5135
  const defaultInit = async ({ gridOptions, adaptableOptions, agGridModules, }) => {
5037
5136
  adaptableOptions.gridOptions = gridOptions;
5038
5137
  return await Adaptable.init(adaptableOptions, { agGridModules: agGridModules });
@@ -5040,7 +5139,7 @@ class AdaptableNoCodeWizard {
5040
5139
  this.adaptableOptions = adaptableOptions;
5041
5140
  this.init = extraOptions.onInit || defaultInit;
5042
5141
  this.extraOptions = extraOptions;
5043
- this.agGridModules = core_1.ModuleRegistry.getRegisteredModules();
5142
+ this.agGridModules = core_1.ModuleRegistry.__getRegisteredModules((_a = this.adaptableOptions.gridOptions) === null || _a === void 0 ? void 0 : _a.gridId);
5044
5143
  this.render();
5045
5144
  }
5046
5145
  render(container) {
@@ -8,7 +8,7 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
8
8
  }
9
9
  return class BadgetRenderer {
10
10
  init(params) {
11
- var _a, _b, _c, _d;
11
+ var _a, _b, _c, _d, _e, _f;
12
12
  this.eGui = document.createElement('div');
13
13
  this.eGui.className = 'ab-Badge__wrapper';
14
14
  const formattedValue = (_c = (_b = (_a = params.formatValue) === null || _a === void 0 ? void 0 : _a.call(params, params.value)) !== null && _b !== void 0 ? _b : params.value) !== null && _c !== void 0 ? _c : '';
@@ -36,11 +36,19 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
36
36
  if (icon && 'name' in icon && icon.size === undefined) {
37
37
  icon.size = 14;
38
38
  }
39
+ const userInterfaceOptions = (_d = api.optionsApi.getAdaptableOptions()) === null || _d === void 0 ? void 0 : _d.userInterfaceOptions;
40
+ const customDefinedIcons = (_e = userInterfaceOptions.customIcons) !== null && _e !== void 0 ? _e : [];
41
+ let customIcon = badge.Icon && 'name' in badge.Icon
42
+ ? api.userInterfaceApi.getCustomIconDefinition(badge.Icon.name)
43
+ : null;
44
+ if (customIcon) {
45
+ icon = customIcon;
46
+ }
39
47
  this.unmountReactRoot = api.internalApi.getAdaptableInstance().renderReactRoot((0, Badge_1.Badge)({
40
48
  adaptableStyle: badge.Style,
41
49
  children: formattedValue,
42
50
  icon,
43
- iconPosition: (_d = badge.IconPosition) !== null && _d !== void 0 ? _d : 'start',
51
+ iconPosition: (_f = badge.IconPosition) !== null && _f !== void 0 ? _f : 'start',
44
52
  }), this.eGui);
45
53
  }
46
54
  getGui() {
@@ -1,6 +1,5 @@
1
- import { ICellRendererFunc } from '@ag-grid-community/core';
1
+ import { ICellEditorComp, ICellEditorParams, ICellRendererFunc } from '@ag-grid-community/core';
2
2
  import { AdaptableApi } from '../Api/AdaptableApi';
3
- import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core/dist/cjs/es5/interfaces/iCellEditor';
4
3
  export declare const getCheckboxRendererForColumn: (columnId: string, isColumnReadOnly: boolean, api: AdaptableApi) => ICellRendererFunc;
5
4
  export declare class CheckboxEditor implements ICellEditorComp {
6
5
  private eGui;
@@ -111,10 +111,7 @@ class agGridHelper {
111
111
  // if no valid pk then always false
112
112
  return false;
113
113
  }
114
- if (Helper_1.Helper.objectExists(this.gridOptions.getRowNodeId) ||
115
- Helper_1.Helper.objectExists(this.gridOptions.getRowId)) {
116
- // if the user provided a getRowNodeId/getRowId then we don't need to do anything
117
- // Note: starting with 27.1.0 'getRowNodeId' method is deprecated and will be removed in future versions
114
+ if (Helper_1.Helper.objectExists(this.gridOptions.getRowId)) {
118
115
  return true;
119
116
  }
120
117
  const primaryKey = this.adaptable.adaptableOptions.primaryKey;
@@ -274,6 +271,8 @@ class agGridHelper {
274
271
  adaptableApi: this.adaptable.api,
275
272
  selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
276
273
  selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
274
+ userName: this.adaptable.api.optionsApi.getUserName(),
275
+ adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
277
276
  };
278
277
  this.adaptable.api.eventApi.emit('SelectionChanged', selectionChangedInfo);
279
278
  }
@@ -336,7 +335,7 @@ class agGridHelper {
336
335
  friendlyName: friendlyName,
337
336
  dataType: datatype,
338
337
  };
339
- return this.adaptable.api.queryLanguageApi.isColumnQueryable(abColumnBase);
338
+ return this.adaptable.api.expressionApi.isColumnQueryable(abColumnBase);
340
339
  }
341
340
  isColumnExportable(colDef, columnId, friendlyName, datatype) {
342
341
  if (!colDef) {
@@ -237,6 +237,8 @@ class agGridMenuHelper {
237
237
  adaptableColumn: adaptableColumn,
238
238
  agGridColumn: agGridColumn,
239
239
  adaptableApi: this.adaptable.api,
240
+ userName: this.adaptable.adaptableOptions.userName,
241
+ adaptableId: this.adaptable.adaptableOptions.adaptableId,
240
242
  isRowGroupColumn: this.adaptable.api.columnApi.isAutoRowGroupColumn(agGridColumn.getColId()),
241
243
  };
242
244
  }
@@ -276,6 +278,8 @@ class agGridMenuHelper {
276
278
  isSingleSelectedCell: isSelectedCell && (selectedCellInfo === null || selectedCellInfo === void 0 ? void 0 : selectedCellInfo.gridCells.length) == 1,
277
279
  primaryKeyValue: clickedCell ? clickedCell.primaryKeyValue : undefined,
278
280
  adaptableApi: this.adaptable.api,
281
+ userName: this.adaptable.adaptableOptions.userName,
282
+ adaptableId: this.adaptable.adaptableOptions.adaptableId,
279
283
  selectedCellInfo: selectedCellInfo,
280
284
  selectedRowInfo: selectedRowInfo,
281
285
  isRowGroupColumn: this.adaptable.api.columnApi.isAutoRowGroupColumn(params.column.getColId()),
@@ -1,15 +1,15 @@
1
1
  import { GridOptions } from '@ag-grid-community/core';
2
2
  export declare const attachColumnTypes: (gridOptions: GridOptions) => {
3
- [key: string]: import("@ag-grid-community/core").ColDef<any>;
3
+ [key: string]: import("@ag-grid-community/core").ColDef<any, any>;
4
4
  } & {
5
- [x: string]: import("@ag-grid-community/core").ColDef<any>;
6
- abColDefNumber: import("@ag-grid-community/core").ColDef<any>;
7
- abColDefString: import("@ag-grid-community/core").ColDef<any>;
8
- abColDefBoolean: import("@ag-grid-community/core").ColDef<any>;
9
- abColDefDate: import("@ag-grid-community/core").ColDef<any>;
10
- abColDefObject: import("@ag-grid-community/core").ColDef<any>;
11
- abColDefCustom: import("@ag-grid-community/core").ColDef<any>;
12
- abColDefNumberArray: import("@ag-grid-community/core").ColDef<any>;
13
- abColDefTupleNumberArray: import("@ag-grid-community/core").ColDef<any>;
14
- abColDefObjectNumberArray: import("@ag-grid-community/core").ColDef<any>;
5
+ [x: string]: import("@ag-grid-community/core").ColDef<any, any>;
6
+ abColDefNumber: import("@ag-grid-community/core").ColDef<any, any>;
7
+ abColDefString: import("@ag-grid-community/core").ColDef<any, any>;
8
+ abColDefBoolean: import("@ag-grid-community/core").ColDef<any, any>;
9
+ abColDefDate: import("@ag-grid-community/core").ColDef<any, any>;
10
+ abColDefObject: import("@ag-grid-community/core").ColDef<any, any>;
11
+ abColDefCustom: import("@ag-grid-community/core").ColDef<any, any>;
12
+ abColDefNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
13
+ abColDefTupleNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
14
+ abColDefObjectNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
15
15
  };
@@ -60,6 +60,7 @@ exports.ReactAdaptableDateEditor = (0, react_1.forwardRef)((props, ref) => {
60
60
  Pattern,
61
61
  });
62
62
  } });
63
+ // @ts-ignore it will be fixed with https://github.com/AdaptableTools/adaptable/issues/2230
63
64
  valueRef.current = valueParser(params);
64
65
  }
65
66
  else {
@@ -159,6 +160,7 @@ class AdaptableDateEditor {
159
160
  Pattern,
160
161
  });
161
162
  } });
163
+ // @ts-ignore it will be fixed with https://github.com/AdaptableTools/adaptable/issues/2230
162
164
  this.value = this.valueParser(params);
163
165
  }
164
166
  else {
@@ -19,8 +19,8 @@ function getStartValue(params) {
19
19
  if (shouldClearExistingValue(params)) {
20
20
  return '';
21
21
  }
22
- if (params.charPress && isValidChar(params.charPress)) {
23
- return params.charPress;
22
+ if (params.eventKey && isValidChar(params.eventKey)) {
23
+ return params.eventKey;
24
24
  }
25
25
  return params.value;
26
26
  }
@@ -18,9 +18,12 @@ function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabled
18
18
  height: 15,
19
19
  width: 15,
20
20
  });
21
- let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { adaptableApi: api });
22
- let buttonLabel = api.internalApi.getLabelForButton(button, context ? context : { adaptableApi: api });
23
- let buttonTooltip = api.internalApi.getTooltipForButton(button, context ? context : { adaptableApi: api });
21
+ let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { adaptableApi: api, userName: this.getOptions().userName,
22
+ adaptableId: this.getOptions().adaptableId, });
23
+ let buttonLabel = api.internalApi.getLabelForButton(button, context ? context : { adaptableApi: api, userName: this.getOptions().userName,
24
+ adaptableId: this.getOptions().adaptableId, });
25
+ let buttonTooltip = api.internalApi.getTooltipForButton(button, context ? context : { adaptableApi: api, userName: this.getOptions().userName,
26
+ adaptableId: this.getOptions().adaptableId, });
24
27
  return (React.createElement(SimpleButton_1.default, { autoFocus: focusFirstButton && index === 0, disabled: disabledButtons[index], key: index, tooltip: buttonTooltip, icon: buttonIcon, tone: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _a !== void 0 ? _a : defaultTone, variant: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant, "data-text": buttonLabel, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, marginLeft: index ? 2 : 0, onClick: () => {
25
28
  onClick(button);
26
29
  } }, buttonLabel));
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isAdaptableIcon = exports.isAdaptableElementIcon = exports.isAdaptableExternalIcon = exports.isAdaptableInternalIcon = exports.AdaptableIconComponent = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const icons_1 = require("../icons");
6
+ const icons_1 = tslib_1.__importStar(require("../icons"));
7
7
  const join_1 = tslib_1.__importDefault(require("../utils/join"));
8
8
  const react_1 = require("react");
9
9
  const AdaptableIconComponent = (props) => {
@@ -26,6 +26,9 @@ const AdaptableIconComponent = (props) => {
26
26
  }
27
27
  else {
28
28
  htmlElement = icon.element;
29
+ // THe element neets to be cloned.
30
+ // when it is used in more than one plce the element is removed from the DOM
31
+ htmlElement = htmlElement.cloneNode(true);
29
32
  }
30
33
  divRef.current.insertAdjacentElement('afterend', htmlElement);
31
34
  }
@@ -35,8 +38,8 @@ const AdaptableIconComponent = (props) => {
35
38
  }
36
39
  };
37
40
  }, [icon]);
38
- if ((0, exports.isAdaptableInternalIcon)(icon)) {
39
- return React.createElement(icons_1.Icon, { name: icon.name, size: icon.size, style: icon.style, className: className });
41
+ if ((0, exports.isAdaptableInternalIcon)(icon) && icon.name in icons_1.default) {
42
+ return (React.createElement(icons_1.Icon, { name: icon.name, size: icon.size, style: icon.style, className: className }));
40
43
  }
41
44
  if ((0, exports.isAdaptableExternalIcon)(icon)) {
42
45
  let width = (_b = (_a = icon.style) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 'var(--ab-cmp-icon__width)';
@@ -195,6 +195,8 @@ function BaseEditorInput(props) {
195
195
  // we need a fully-fledged rowNode as Adaptable accesses internal methods of it
196
196
  node: testRowNode,
197
197
  adaptableApi: props.api,
198
+ userName: props.api.optionsApi.getUserName(),
199
+ adaptableId: props.api.optionsApi.getAdaptableId(),
198
200
  functions: expressionFunctions,
199
201
  evaluateCustomQueryVariable: props.api.internalApi.getQueryLanguageService().evaluateCustomQueryVariable,
200
202
  });
@@ -112,7 +112,7 @@ function ExpressionEditor(props) {
112
112
  padding: 5,
113
113
  } }, showColumnIds
114
114
  ? namedQuery.BooleanExpression
115
- : props.api.queryLanguageApi.getAdaptableQueryExpressionWithColumnFriendlyNames(namedQuery)))))));
115
+ : props.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(namedQuery)))))));
116
116
  const showDocumentationLinks = props.api.internalApi.isDocumentationLinksDisplayed();
117
117
  const queryDocumentationLink = queryDocumentationLinks[type];
118
118
  return (React.createElement(EditorContext_1.ExpressionEditorContext.Provider, { value: {
@@ -1,5 +1,7 @@
1
1
  import { FunctionComponent } from 'react';
2
+ import { UserInterfaceOptions } from '../../types';
2
3
  export interface IconSelectorProps {
4
+ customIcons?: UserInterfaceOptions['customIcons'];
3
5
  value?: string;
4
6
  onChange: (iconName: string) => void;
5
7
  clearable?: boolean;