@adaptabletools/adaptable 16.0.0-canary.2 → 16.0.0-canary.4

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 (189) hide show
  1. package/README.md +2 -0
  2. package/base.css +62 -54
  3. package/base.css.map +1 -1
  4. package/bundle.cjs.js +159 -159
  5. package/index.css +82 -70
  6. package/index.css.map +1 -1
  7. package/package.json +10 -2
  8. package/publishTimestamp.d.ts +1 -1
  9. package/publishTimestamp.js +1 -1
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +5 -1
  11. package/src/AdaptableOptions/ActionRowOptions.d.ts +8 -5
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +9 -4
  13. package/src/AdaptableOptions/ColumnOptions.d.ts +1 -10
  14. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -2
  15. package/src/AdaptableOptions/Fdc3Options.d.ts +150 -0
  16. package/src/AdaptableOptions/Fdc3Options.js +5 -0
  17. package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
  18. package/src/AdaptableOptions/FinancePluginOptions.d.ts +9 -9
  19. package/src/AdaptableOptions/FormatColumnOptions.d.ts +7 -7
  20. package/src/AdaptableOptions/GroupingOptions.d.ts +6 -11
  21. package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +1 -1
  22. package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
  23. package/src/AdaptableOptions/TeamSharingOptions.d.ts +5 -0
  24. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +21 -11
  25. package/src/Api/AdaptableApi.d.ts +7 -2
  26. package/src/Api/ColumnApi.d.ts +18 -7
  27. package/src/Api/DataChangeHistoryApi.d.ts +6 -0
  28. package/src/Api/EventApi.d.ts +22 -9
  29. package/src/Api/Events/ChexboxColumnClicked.d.ts +1 -0
  30. package/src/Api/Events/ScheduleTriggered.d.ts +11 -0
  31. package/src/Api/Events/ThemeChanged.d.ts +0 -6
  32. package/src/Api/Events/ThemeEdited.d.ts +11 -0
  33. package/src/Api/Events/ThemeEdited.js +2 -0
  34. package/src/Api/Fdc3Api.d.ts +83 -0
  35. package/src/Api/Fdc3Api.js +2 -0
  36. package/src/Api/FinanceApi.d.ts +12 -12
  37. package/src/Api/Implementation/ActionRowApiImpl.js +7 -5
  38. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  39. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  40. package/src/Api/Implementation/ApiBase.d.ts +4 -0
  41. package/src/Api/Implementation/ApiBase.js +6 -0
  42. package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -0
  43. package/src/Api/Implementation/ChartingApiImpl.js +4 -0
  44. package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -1
  45. package/src/Api/Implementation/ColumnApiImpl.js +22 -3
  46. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
  47. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +3 -0
  48. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +26 -0
  49. package/src/Api/Implementation/Fdc3ApiImpl.js +79 -0
  50. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
  51. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  52. package/src/Api/Implementation/PredicateApiImpl.d.ts +5 -5
  53. package/src/Api/Implementation/PredicateApiImpl.js +8 -8
  54. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -0
  55. package/src/Api/Implementation/QuickSearchApiImpl.js +7 -0
  56. package/src/Api/Implementation/ScheduleApiImpl.d.ts +4 -0
  57. package/src/Api/Implementation/ScheduleApiImpl.js +5 -0
  58. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +0 -3
  59. package/src/Api/Implementation/StyledColumnApiImpl.js +0 -26
  60. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
  61. package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -0
  62. package/src/Api/Internal/AdaptableInternalApi.d.ts +5 -3
  63. package/src/Api/Internal/AdaptableInternalApi.js +18 -12
  64. package/src/Api/Internal/AlertInternalApi.js +7 -2
  65. package/src/Api/Internal/Fdc3InternalApi.d.ts +11 -0
  66. package/src/Api/Internal/Fdc3InternalApi.js +72 -0
  67. package/src/Api/Internal/FilterInternalApi.js +8 -4
  68. package/src/Api/Internal/FormatColumnInternalApi.js +11 -13
  69. package/src/Api/Internal/ScheduleInternalApi.d.ts +8 -0
  70. package/src/Api/Internal/ScheduleInternalApi.js +20 -0
  71. package/src/Api/Internal/StyledColumnInternalApi.d.ts +5 -2
  72. package/src/Api/Internal/StyledColumnInternalApi.js +29 -2
  73. package/src/Api/Internal/UserInterfaceInternalApi.d.ts +5 -0
  74. package/src/Api/Internal/UserInterfaceInternalApi.js +18 -0
  75. package/src/Api/OptionsApi.d.ts +6 -1
  76. package/src/Api/PredicateApi.d.ts +5 -5
  77. package/src/Api/QuickSearchApi.d.ts +8 -0
  78. package/src/Api/StyledColumnApi.d.ts +0 -14
  79. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  80. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +7 -7
  81. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +8 -15
  82. package/src/PredefinedConfig/Common/AdaptablePredicate.js +65 -41
  83. package/src/PredefinedConfig/Common/{FDC3Context.d.ts → FDC3Context_DEPR.d.ts} +19 -19
  84. package/src/PredefinedConfig/Common/FDC3Context_DEPR.js +2 -0
  85. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +53 -0
  86. package/src/PredefinedConfig/Common/Fdc3Context.js +35 -0
  87. package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +68 -0
  88. package/src/PredefinedConfig/Common/Fdc3Intent.js +75 -0
  89. package/src/PredefinedConfig/Common/Types.d.ts +2 -2
  90. package/src/PredefinedConfig/StyledColumnState.d.ts +3 -2
  91. package/src/PredefinedConfig/SystemState.d.ts +3 -0
  92. package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
  93. package/src/Redux/ActionsReducers/SystemRedux.d.ts +17 -6
  94. package/src/Redux/ActionsReducers/SystemRedux.js +33 -3
  95. package/src/Redux/Store/AdaptableStore.js +3 -4
  96. package/src/Strategy/AdaptableModuleBase.d.ts +6 -6
  97. package/src/Strategy/Fdc3Module.d.ts +13 -0
  98. package/src/Strategy/Fdc3Module.js +85 -0
  99. package/src/Strategy/FlashingCellModule.js +6 -2
  100. package/src/Strategy/Interface/IModule.d.ts +2 -2
  101. package/src/Strategy/ScheduleModule.js +3 -2
  102. package/src/Strategy/StyledColumnModule.js +24 -15
  103. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  104. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
  105. package/src/Utilities/Constants/ModuleConstants.js +5 -2
  106. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -3
  107. package/src/Utilities/MenuItem.d.ts +4 -4
  108. package/src/Utilities/Services/Fdc3Service.d.ts +20 -0
  109. package/src/Utilities/Services/Fdc3Service.js +87 -0
  110. package/src/Utilities/Services/MetamodelService.js +5 -1
  111. package/src/Utilities/Services/ModuleService.js +1 -1
  112. package/src/Utilities/Services/QueryLanguageService.js +1 -1
  113. package/src/Utilities/Services/RowEditService.js +1 -1
  114. package/src/Utilities/Services/TeamSharingService.d.ts +2 -0
  115. package/src/Utilities/Services/TeamSharingService.js +60 -3
  116. package/src/Utilities/Services/ValidationService.js +6 -2
  117. package/src/View/AdaptableView.js +9 -7
  118. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +9 -0
  119. package/src/View/Charting/useChartingElements.js +1 -1
  120. package/src/View/Components/AdaptableButton/index.d.ts +3 -0
  121. package/src/View/Components/AdaptableButton/index.js +18 -0
  122. package/src/View/Components/AdaptableIconComponent/index.d.ts +7 -0
  123. package/src/View/Components/AdaptableIconComponent/index.js +16 -0
  124. package/src/View/Components/AdaptableIconComponent/useCustomIcon.d.ts +2 -0
  125. package/src/View/Components/AdaptableIconComponent/useCustomIcon.js +12 -0
  126. package/src/{components → View/Components}/Badge/index.d.ts +1 -1
  127. package/src/{components → View/Components}/Badge/index.js +1 -1
  128. package/src/View/Components/FilterForm/FilterForm.js +1 -1
  129. package/src/View/Components/FilterForm/ListBoxMenu.js +2 -2
  130. package/src/View/Components/FilterForm/QuickFilterForm.js +3 -2
  131. package/src/View/Components/Panels/PanelWithButton.d.ts +2 -2
  132. package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
  133. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
  134. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
  135. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  136. package/src/View/Components/PredicateEditor/PredicateEditor.js +4 -4
  137. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -2
  138. package/src/View/Dashboard/Dashboard.js +3 -3
  139. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -0
  140. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +13 -7
  141. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +7 -1
  142. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
  143. package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -2
  144. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  145. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.d.ts +2 -0
  146. package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +26 -0
  147. package/src/View/QuickSearch/QuickSearchInput.d.ts +6 -0
  148. package/src/View/QuickSearch/QuickSearchInput.js +22 -0
  149. package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +2 -5
  150. package/src/View/QuickSearch/QuickSearchViewPanel.js +5 -19
  151. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
  152. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
  153. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -5
  154. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +2 -9
  155. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -1
  156. package/src/View/UIHelper.d.ts +2 -2
  157. package/src/agGrid/ActionColumnRenderer.d.ts +0 -2
  158. package/src/agGrid/ActionColumnRenderer.js +21 -6
  159. package/src/agGrid/Adaptable.d.ts +7 -2
  160. package/src/agGrid/Adaptable.js +82 -37
  161. package/src/agGrid/BadgeRenderer.js +19 -20
  162. package/src/agGrid/CheckboxRenderer.js +1 -1
  163. package/src/agGrid/agGridHelper.js +4 -0
  164. package/src/agGrid/agGridMenuHelper.js +11 -4
  165. package/src/agGrid/attachAddaptableColumnTypes.d.ts +1 -0
  166. package/src/agGrid/attachAddaptableColumnTypes.js +5 -4
  167. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  168. package/src/components/Drawer/index.d.ts +6 -0
  169. package/src/components/Drawer/index.js +60 -0
  170. package/src/components/ExpressionEditor/index.js +4 -2
  171. package/src/components/Icon/index.d.ts +11 -0
  172. package/src/components/{AdaptableIconComponent → Icon}/index.js +10 -10
  173. package/src/components/IconSelector/IconSelector.js +3 -3
  174. package/src/components/SimpleButton/index.js +10 -10
  175. package/src/components/Toggle/Toggle.d.ts +2 -2
  176. package/src/components/Toggle/Toggle.js +2 -2
  177. package/src/components/icons/fdc3.d.ts +3 -0
  178. package/src/components/icons/fdc3.js +9 -0
  179. package/src/components/icons/index.d.ts +4 -4
  180. package/src/components/icons/index.js +9 -7
  181. package/src/metamodel/adaptable.metamodel.d.ts +117 -47
  182. package/src/metamodel/adaptable.metamodel.js +1 -1
  183. package/src/types.d.ts +9 -5
  184. package/version.d.ts +1 -1
  185. package/version.js +1 -1
  186. package/src/View/Components/AdaptableViewIcon/index.d.ts +0 -10
  187. package/src/View/Components/AdaptableViewIcon/index.js +0 -18
  188. package/src/components/AdaptableIconComponent/index.d.ts +0 -11
  189. /package/src/{PredefinedConfig/Common/FDC3Context.js → Api/Events/ScheduleTriggered.js} +0 -0
@@ -6,9 +6,11 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../components/SimpleButt
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const uuid_1 = require("../components/utils/uuid");
8
8
  const useRerender_1 = require("../components/utils/useRerender");
9
+ const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
10
+ const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
9
11
  function getActionButtonsAndActionColumn(adaptable, actionColumn, colId) {
10
12
  var _a;
11
- const actionCol = actionColumn
13
+ const actionCol = colId == GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS
12
14
  ? actionColumn
13
15
  : (_a = adaptable.api.actionColumnApi.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colId);
14
16
  if (actionCol && actionCol.actionColumnButton) {
@@ -27,7 +29,8 @@ function getActionButtonsAndActionColumn(adaptable, actionColumn, colId) {
27
29
  actionColumn: actionCol,
28
30
  };
29
31
  }
30
- const renderActionButtons = (buttons, adaptableApi, context, rerender) => {
32
+ const ActionButtons = (props) => {
33
+ const { buttons, adaptableApi, context, rerender } = props;
31
34
  return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
32
35
  var _a, _b;
33
36
  if (button.hidden && button.hidden(button, context)) {
@@ -57,7 +60,10 @@ const renderActionButtons = (buttons, adaptableApi, context, rerender) => {
57
60
  const ReactActionColumnRenderer = (props) => {
58
61
  const rerender = (0, useRerender_1.useRerender)();
59
62
  const adaptable = props.api.__adaptable;
60
- const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, props.actionColumn, props.colDef.colId);
63
+ const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, {
64
+ columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
65
+ actionColumnButton: adaptable.getActionRowButtonDefs(),
66
+ }, props.colDef.colId);
61
67
  if (!actionColumn || !actionButtons.length) {
62
68
  return null;
63
69
  }
@@ -75,14 +81,18 @@ const ReactActionColumnRenderer = (props) => {
75
81
  adaptableId: adaptable.adaptableOptions.adaptableId,
76
82
  data: props.data,
77
83
  };
78
- return (React.createElement("div", { className: "ab-ActionColumn" }, renderActionButtons(actionButtons, adaptable.api, buttonContext, rerender)));
84
+ return (React.createElement("div", { className: "ab-ActionColumn" },
85
+ React.createElement(ActionButtons, { buttons: actionButtons, adaptableApi: adaptable.api, context: buttonContext, rerender: rerender })));
79
86
  };
80
87
  exports.ReactActionColumnRenderer = ReactActionColumnRenderer;
81
88
  class ActionColumnRenderer {
82
89
  // gets called once before the renderer is used
83
90
  init(params) {
84
91
  const adaptable = params.api.__adaptable;
85
- const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, params.actionColumn, params.colDef.colId);
92
+ const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, {
93
+ columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
94
+ actionColumnButton: adaptable.getActionRowButtonDefs(),
95
+ }, params.colDef.colId);
86
96
  if (!actionColumn || !actionButtons.length) {
87
97
  return;
88
98
  }
@@ -106,7 +116,12 @@ class ActionColumnRenderer {
106
116
  };
107
117
  const eGui = this.eGui;
108
118
  const doRender = () => {
109
- this.unmountReactRoot = adaptable.renderReactRoot(renderActionButtons(actionButtons, adaptable.api, buttonContext, doRender), eGui);
119
+ this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(ActionButtons({
120
+ buttons: actionButtons,
121
+ context: buttonContext,
122
+ rerender: doRender,
123
+ adaptableApi: adaptable.api,
124
+ }), adaptable), eGui);
110
125
  };
111
126
  this.render = doRender;
112
127
  doRender();
@@ -18,7 +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 { ChartDefinition } from '../types';
21
+ import { ActionColumnContext, AdaptableButton, ChartDefinition } from '../types';
22
22
  import { EmitterCallback } from '../Utilities/Emitter';
23
23
  import { IPPStyle } from '../Utilities/Interface/IPPStyle';
24
24
  import { LicenseService } from '../Utilities/Services/LicenseService';
@@ -38,6 +38,7 @@ import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelSer
38
38
  import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
39
39
  import { RenderReactRootFn } from '../renderReactRoot';
40
40
  import { AdaptableLogger } from './AdaptableLogger';
41
+ import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
41
42
  declare type RuntimeConfig = {
42
43
  gridOptions: GridOptions;
43
44
  waitForAgGrid?: boolean;
@@ -63,6 +64,7 @@ export declare class Adaptable implements IAdaptable {
63
64
  TeamSharingService: ITeamSharingService;
64
65
  MetamodelService: IMetamodelService;
65
66
  RowEditService: IRowEditService;
67
+ Fdc3Service: Fdc3Service;
66
68
  private LicenseService;
67
69
  private ChartingService;
68
70
  private ThemeService;
@@ -277,7 +279,8 @@ export declare class Adaptable implements IAdaptable {
277
279
  private getColDefsForSpecialColumns;
278
280
  getColDefsForFreeTextColumns(): ColDef<any, any>[];
279
281
  setupColumnValueGetter({ col }: ColumnSetupInfo): void;
280
- private getColDefsForRowEditColumns;
282
+ getActionRowButtonDefs(): AdaptableButton<ActionColumnContext<any>>[];
283
+ private getColDefsForActionRowColumns;
281
284
  getColDefsForActionColumns(): ColDef<any, any>[];
282
285
  updateColDefsForSpecialColumns(): void;
283
286
  private getColDefsForCalculatedColumns;
@@ -327,6 +330,7 @@ export declare class Adaptable implements IAdaptable {
327
330
  private applyCurrentTheme;
328
331
  private applyFinalRendering;
329
332
  isAgGridModulePresent(moduleName: ModuleNames): boolean;
333
+ private getAllAgGridRegisteredModules;
330
334
  getAgGridRegisteredModules(): Module[];
331
335
  private getAgGridRegisteredModuleNames;
332
336
  private onRowDataChanged;
@@ -416,6 +420,7 @@ export declare class Adaptable implements IAdaptable {
416
420
  initLicenseService(): LicenseService;
417
421
  showCharts(chartsDefinitions: ChartDefinition[], chartContainer?: HTMLElement): ChartRef[];
418
422
  showChart(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
423
+ updateChart(chart: ChartDefinition): void;
419
424
  getChartRef(chartId: string): ChartRef;
420
425
  getChartModels(): import("@ag-grid-community/core").ChartModel[];
421
426
  getRowModelType(): import("@ag-grid-community/core").RowModelType;
@@ -68,6 +68,7 @@ const ThemeService_1 = require("../Utilities/Services/ThemeService");
68
68
  const AdaptableLogger_1 = require("./AdaptableLogger");
69
69
  const attachAddaptableColumnTypes_1 = require("./attachAddaptableColumnTypes");
70
70
  const FormatHelper_1 = require("../Utilities/Helpers/FormatHelper");
71
+ const Fdc3Service_1 = require("../Utilities/Services/Fdc3Service");
71
72
  const tinycolor = require('tinycolor2');
72
73
  const GROUP_PATH_SEPARATOR = '/';
73
74
  // IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
@@ -417,7 +418,7 @@ class Adaptable {
417
418
  this.agGridMenuHelper = new agGridMenuHelper_1.agGridMenuHelper(this, this.gridOptions);
418
419
  // Build the default group sort comparator - will get custom sort values (but not functions) in real time
419
420
  // TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
420
- if (this.adaptableOptions.columnOptions.autoOrderGroupedColumns) {
421
+ if (this.adaptableOptions.groupingOptions.autoOrderGroupedColumns) {
421
422
  this.setGridOptionsProperty('initialGroupOrderComparator', (userPropertyValue) => {
422
423
  if (userPropertyValue) {
423
424
  return userPropertyValue;
@@ -441,6 +442,7 @@ class Adaptable {
441
442
  this.QueryLanguageService = new QueryLanguageService_1.QueryLanguageService(this.api);
442
443
  this.AlertService = new AlertService_1.AlertService(this.api);
443
444
  this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
445
+ this.Fdc3Service = new Fdc3Service_1.Fdc3Service(this.api);
444
446
  // @ts-ignore
445
447
  this.RowEditService = new RowEditService_1.RowEditService(this.api);
446
448
  this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions());
@@ -1256,7 +1258,8 @@ class Adaptable {
1256
1258
  if (!params.node) {
1257
1259
  return false;
1258
1260
  }
1259
- if (!this.api.optionsApi.getQuickSearchOptions().runQuickSearchOnRowGroups && params.node.group) {
1261
+ if (!this.api.optionsApi.getQuickSearchOptions().runQuickSearchOnRowGroups &&
1262
+ params.node.group) {
1260
1263
  return false;
1261
1264
  }
1262
1265
  let quickSearchValue = this.api.quickSearchApi.getQuickSearchValue();
@@ -1352,11 +1355,11 @@ class Adaptable {
1352
1355
  }
1353
1356
  const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
1354
1357
  layout.Columns = layout.Columns || [];
1355
- const rowEditActionColumn = this.getColDefsForRowEditColumns()[0];
1356
- if (rowEditActionColumn) {
1357
- layout.Columns.push(rowEditActionColumn.colId);
1358
+ const actionRowColumn = this.getColDefsForActionRowColumns()[0];
1359
+ if (actionRowColumn) {
1360
+ layout.Columns.push(actionRowColumn.colId);
1358
1361
  layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
1359
- layout.PinnedColumnsMap[rowEditActionColumn.colId] = rowEditActionColumn.pinned;
1362
+ layout.PinnedColumnsMap[actionRowColumn.colId] = actionRowColumn.pinned;
1360
1363
  }
1361
1364
  const layoutColumnsMap = layout.Columns.reduce((acc, colId) => {
1362
1365
  acc[colId] = true;
@@ -1409,6 +1412,9 @@ class Adaptable {
1409
1412
  // autosize only the columns which are part of the selected layout
1410
1413
  colsToAutoSize[colId] = true;
1411
1414
  }
1415
+ if (actionRowColumn && actionRowColumn.colId === colId) {
1416
+ newColState.width = actionRowColumn.width;
1417
+ }
1412
1418
  newColState.rowGroupIndex =
1413
1419
  groupedColumnsIndexesMap[colId] != null ? groupedColumnsIndexesMap[colId] : null;
1414
1420
  const previousRowGroup = newColState.rowGroup;
@@ -1700,7 +1706,10 @@ class Adaptable {
1700
1706
  }
1701
1707
  layout.EnablePivot = this.gridOptions.columnApi.isPivotMode();
1702
1708
  layout.PivotColumns = pivotColumns;
1703
- if (this.api.layoutApi.internalApi.areExpandedRowGroupsSavedInLayouts()) {
1709
+ if (
1710
+ // check first row node for presence of data without iterating over whole grid
1711
+ this.api.layoutApi.internalApi.areExpandedRowGroupsSavedInLayouts() &&
1712
+ this.api.gridApi.getFirstRowNode()) {
1704
1713
  layout.ExpandedRowGroupValues = this.getExpandRowGroupsKeys();
1705
1714
  }
1706
1715
  this.persistLayout(layout);
@@ -1887,13 +1896,16 @@ class Adaptable {
1887
1896
  });
1888
1897
  }
1889
1898
  }
1890
- const uniqueVals = (0, uniqBy_1.default)(returnValues, (dataItem) => {
1899
+ let uniqueVals = (0, uniqBy_1.default)(returnValues, (dataItem) => {
1891
1900
  const value = dataItem.rawValue;
1892
1901
  if (value instanceof Date) {
1893
1902
  return value.toISOString();
1894
1903
  }
1895
1904
  return value;
1896
1905
  });
1906
+ if (column.dataType == 'String' && this.api.internalApi.isTextComparisonCaseSensitive()) {
1907
+ uniqueVals = (0, uniqBy_1.default)(uniqueVals, (d) => d.displayValue.toLowerCase());
1908
+ }
1897
1909
  return uniqueVals.slice(0, this.adaptableOptions.filterOptions.maxFilterValuesToDisplay);
1898
1910
  }
1899
1911
  async getDistinctFilterValuesForColumn(column, visibleRowsOnly, filter, skipRowNode) {
@@ -2326,7 +2338,7 @@ class Adaptable {
2326
2338
  ...this.getColDefsForCalculatedColumns(),
2327
2339
  ...this.getColDefsForActionColumns(),
2328
2340
  ...this.getColDefsForFreeTextColumns(),
2329
- ...this.getColDefsForRowEditColumns(),
2341
+ ...this.getColDefsForActionRowColumns(),
2330
2342
  ];
2331
2343
  }
2332
2344
  getColDefsForFreeTextColumns() {
@@ -2386,12 +2398,12 @@ class Adaptable {
2386
2398
  return userValue;
2387
2399
  });
2388
2400
  }
2389
- getColDefsForRowEditColumns() {
2401
+ getActionRowButtonDefs() {
2390
2402
  const actionRowButtons = this.api.actionRowApi.getActionRowButtons();
2391
2403
  if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
2392
2404
  return [];
2393
2405
  }
2394
- const defaultEditButtonConfiguration = {
2406
+ const defaultActionRowButtonConfiguration = {
2395
2407
  create: {
2396
2408
  icon: {
2397
2409
  name: 'add',
@@ -2438,10 +2450,10 @@ class Adaptable {
2438
2450
  },
2439
2451
  },
2440
2452
  };
2441
- const editButtons = actionRowButtons
2453
+ const actionButtons = actionRowButtons
2442
2454
  .map((actionRowButtonType) => {
2443
2455
  var _a, _b;
2444
- const defaultButtonConfig = defaultEditButtonConfiguration[actionRowButtonType];
2456
+ const defaultButtonConfig = defaultActionRowButtonConfiguration[actionRowButtonType];
2445
2457
  if (!defaultButtonConfig) {
2446
2458
  // should NOT happen unless the user sent some invalid button type in the predefined config
2447
2459
  return;
@@ -2458,12 +2470,20 @@ class Adaptable {
2458
2470
  return Object.assign(Object.assign({}, defaultButtonConfig), customButtonConfig);
2459
2471
  })
2460
2472
  .filter(Boolean);
2461
- if (!editButtons.length) {
2473
+ return actionButtons;
2474
+ }
2475
+ getColDefsForActionRowColumns() {
2476
+ const actionRowButtons = this.api.actionRowApi.getActionRowButtons();
2477
+ if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
2478
+ return [];
2479
+ }
2480
+ const actionButtons = this.getActionRowButtonDefs();
2481
+ if (!actionButtons.length) {
2462
2482
  return [];
2463
2483
  }
2464
- const rowEditActionColumn = {
2484
+ const actionRowColumn = {
2465
2485
  columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
2466
- actionColumnButton: editButtons,
2486
+ actionColumnButton: actionButtons,
2467
2487
  };
2468
2488
  return [
2469
2489
  {
@@ -2472,7 +2492,7 @@ class Adaptable {
2472
2492
  hide: false,
2473
2493
  editable: false,
2474
2494
  // 15px is the icon width + left&right padding + left&right border
2475
- width: editButtons.length * (UIHelper_1.default.getSimpleButtonPaddingWidth() * 2 + 15) + 2,
2495
+ width: actionButtons.length * (UIHelper_1.default.getSimpleButtonPaddingWidth() * 2 + 15) + 2,
2476
2496
  resizable: false,
2477
2497
  lockVisible: true,
2478
2498
  suppressColumnsToolPanel: true,
@@ -2486,9 +2506,6 @@ class Adaptable {
2486
2506
  ? 'right'
2487
2507
  : 'left',
2488
2508
  cellRenderer: this.variant === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
2489
- cellRendererParams: {
2490
- actionColumn: rowEditActionColumn,
2491
- },
2492
2509
  cellClass: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
2493
2510
  type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
2494
2511
  },
@@ -2672,7 +2689,7 @@ class Adaptable {
2672
2689
  return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
2673
2690
  }
2674
2691
  destroy(config) {
2675
- 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, _1;
2692
+ 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, _1, _2, _3;
2676
2693
  if (this.gridOptions && this.gridOptions.api) {
2677
2694
  this.gridOptions.api.removeEventListener(core_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
2678
2695
  this.gridOptions.api.removeEventListener(core_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
@@ -2762,23 +2779,25 @@ class Adaptable {
2762
2779
  this.DataService = null;
2763
2780
  (_h = (_g = this.EntitlementService) === null || _g === void 0 ? void 0 : _g.destroy) === null || _h === void 0 ? void 0 : _h.call(_g);
2764
2781
  this.EntitlementService = null;
2765
- (_k = (_j = this.ReportService) === null || _j === void 0 ? void 0 : _j.destroy) === null || _k === void 0 ? void 0 : _k.call(_j);
2782
+ (_k = (_j = this.Fdc3Service) === null || _j === void 0 ? void 0 : _j.destroy) === null || _k === void 0 ? void 0 : _k.call(_j);
2783
+ this.Fdc3Service = null;
2784
+ (_m = (_l = this.ReportService) === null || _l === void 0 ? void 0 : _l.destroy) === null || _m === void 0 ? void 0 : _m.call(_l);
2766
2785
  this.ReportService = null;
2767
- (_m = (_l = this.ModuleService) === null || _l === void 0 ? void 0 : _l.destroy) === null || _m === void 0 ? void 0 : _m.call(_l);
2786
+ (_p = (_o = this.ModuleService) === null || _o === void 0 ? void 0 : _o.destroy) === null || _p === void 0 ? void 0 : _p.call(_o);
2768
2787
  this.ModuleService = null;
2769
- (_p = (_o = this.ValidationService) === null || _o === void 0 ? void 0 : _o.destroy) === null || _p === void 0 ? void 0 : _p.call(_o);
2788
+ (_r = (_q = this.ValidationService) === null || _q === void 0 ? void 0 : _q.destroy) === null || _r === void 0 ? void 0 : _r.call(_q);
2770
2789
  this.ValidationService = null;
2771
- (_r = (_q = this.QueryLanguageService) === null || _q === void 0 ? void 0 : _q.destroy) === null || _r === void 0 ? void 0 : _r.call(_q);
2790
+ (_t = (_s = this.QueryLanguageService) === null || _s === void 0 ? void 0 : _s.destroy) === null || _t === void 0 ? void 0 : _t.call(_s);
2772
2791
  this.QueryLanguageService = null;
2773
- (_t = (_s = this.AlertService) === null || _s === void 0 ? void 0 : _s.destroy) === null || _t === void 0 ? void 0 : _t.call(_s);
2792
+ (_v = (_u = this.AlertService) === null || _u === void 0 ? void 0 : _u.destroy) === null || _v === void 0 ? void 0 : _v.call(_u);
2774
2793
  this.AlertService = null;
2775
- (_v = (_u = this.TeamSharingService) === null || _u === void 0 ? void 0 : _u.destroy) === null || _v === void 0 ? void 0 : _v.call(_u);
2794
+ (_x = (_w = this.TeamSharingService) === null || _w === void 0 ? void 0 : _w.destroy) === null || _x === void 0 ? void 0 : _x.call(_w);
2776
2795
  this.TeamSharingService = null;
2777
- (_x = (_w = this.RowEditService) === null || _w === void 0 ? void 0 : _w.destroy) === null || _x === void 0 ? void 0 : _x.call(_w);
2796
+ (_z = (_y = this.RowEditService) === null || _y === void 0 ? void 0 : _y.destroy) === null || _z === void 0 ? void 0 : _z.call(_y);
2778
2797
  this.RowEditService = null;
2779
- (_z = (_y = this.MetamodelService) === null || _y === void 0 ? void 0 : _y.destroy) === null || _z === void 0 ? void 0 : _z.call(_y);
2798
+ (_1 = (_0 = this.MetamodelService) === null || _0 === void 0 ? void 0 : _0.destroy) === null || _1 === void 0 ? void 0 : _1.call(_0);
2780
2799
  this.MetamodelService = null;
2781
- (_1 = (_0 = this.LicenseService) === null || _0 === void 0 ? void 0 : _0.destroy) === null || _1 === void 0 ? void 0 : _1.call(_0);
2800
+ (_3 = (_2 = this.LicenseService) === null || _2 === void 0 ? void 0 : _2.destroy) === null || _3 === void 0 ? void 0 : _3.call(_2);
2782
2801
  this.LicenseService = null;
2783
2802
  this.isDestroyed = true;
2784
2803
  }
@@ -2873,7 +2892,10 @@ class Adaptable {
2873
2892
  }
2874
2893
  const gridContainerElement = this.getAgGridContainerElement();
2875
2894
  if (gridContainerElement) {
2876
- gridContainerElement.addEventListener('keydown', (this.listenerKeydown = (event) => this._emit('KeyDown', event)));
2895
+ gridContainerElement.addEventListener('keydown', (this.listenerKeydown = (event) => this._emit('KeyDown', event)),
2896
+ // This is needed to be able to prevent the editor to be opened
2897
+ // in bubling phase the opening is not prevented with ag-grid v30
2898
+ true);
2877
2899
  }
2878
2900
  /*********************
2879
2901
  * AG Grid EVENTS
@@ -3769,22 +3791,28 @@ class Adaptable {
3769
3791
  if (standardAgGridRegistrationCheck) {
3770
3792
  return true;
3771
3793
  }
3794
+ const allAgGridRegisteredModules = this.getAllAgGridRegisteredModules();
3795
+ return !!allAgGridRegisteredModules[moduleName];
3796
+ }
3797
+ getAllAgGridRegisteredModules() {
3772
3798
  // as of AG Grid 30.0.3 the ModuleRegistry gets an dynamic grid ID for the framework versions
3773
3799
  // because of that we have to check ALL grid IDs to see if the module is registered
3774
3800
  // TODO AFL: we should recheck this later, it seems AG Grid is already refactoring this faulty registration process
3775
3801
  // @ts-ignore
3776
3802
  const gridModulesMap = core_1.ModuleRegistry.gridModulesMap;
3777
- let allGridModulesMap = {};
3803
+ let allModulesMap = {};
3778
3804
  Object.keys(gridModulesMap).forEach((gridId) => {
3779
- allGridModulesMap = Object.assign(Object.assign({}, allGridModulesMap), gridModulesMap[gridId]);
3805
+ allModulesMap = Object.assign(Object.assign({}, allModulesMap), gridModulesMap[gridId]);
3780
3806
  });
3781
- return !!allGridModulesMap[moduleName];
3807
+ return allModulesMap;
3782
3808
  }
3783
3809
  getAgGridRegisteredModules() {
3784
- return core_1.ModuleRegistry.__getRegisteredModules(this.gridOptions.gridId);
3810
+ // see comment from getAllAgGridRegisteredModules()
3811
+ // return ModuleRegistry.__getRegisteredModules(this.gridOptions.gridId);
3812
+ return Object.values(this.getAllAgGridRegisteredModules());
3785
3813
  }
3786
3814
  getAgGridRegisteredModuleNames() {
3787
- return core_1.ModuleRegistry.__getRegisteredModules(this.gridOptions.gridId).map((module) => module.moduleName);
3815
+ return this.getAgGridRegisteredModules().map((module) => module.moduleName);
3788
3816
  }
3789
3817
  onRowDataChanged({ rowNode, oldData, newData, }) {
3790
3818
  if (oldData == null || oldData == undefined) {
@@ -4617,6 +4645,7 @@ class Adaptable {
4617
4645
  return this.isAgGridModulePresent(core_1.ModuleNames.ExcelExportModule);
4618
4646
  }
4619
4647
  exportToExcel(reportData, fileName) {
4648
+ var _a;
4620
4649
  const columnDefs = reportData.columns.map((column) => ({
4621
4650
  field: column.columnId,
4622
4651
  headerName: column.friendlyName,
@@ -4653,7 +4682,11 @@ class Adaptable {
4653
4682
  columnDefs,
4654
4683
  rowData: reportData.rows,
4655
4684
  };
4656
- const grid = new core_1.Grid(document.createElement('div'), gridOptions);
4685
+ let gridParams;
4686
+ if ((_a = this.runtimeConfig.agGridModules) === null || _a === void 0 ? void 0 : _a.length) {
4687
+ gridParams = { modules: this.runtimeConfig.agGridModules };
4688
+ }
4689
+ const grid = new core_1.Grid(document.createElement('div'), gridOptions, gridParams);
4657
4690
  gridOptions.api.exportDataAsExcel({
4658
4691
  sheetName: 'Sheet 1',
4659
4692
  fileName: fileName,
@@ -4983,6 +5016,18 @@ class Adaptable {
4983
5016
  this.api.chartingApi.editChartDefinition(Object.assign(Object.assign({}, chartDefinition), { Model: chartModel }));
4984
5017
  return chartRef;
4985
5018
  }
5019
+ updateChart(chart) {
5020
+ const upgradableProperties = {
5021
+ // Only Range charts are supported to be created at run time
5022
+ // the other two are pivot & cross-filter
5023
+ type: 'rangeChartUpdate',
5024
+ chartId: chart.Model.chartId,
5025
+ unlinkChart: Boolean(chart.Model.unlinkChart),
5026
+ suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
5027
+ aggFunc: chart.Model.aggFunc,
5028
+ };
5029
+ this.gridOptions.api.updateChart(upgradableProperties);
5030
+ }
4986
5031
  getChartRef(chartId) {
4987
5032
  return this.gridOptions.api.getChartRef(chartId);
4988
5033
  }
@@ -1,24 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getBadgeRendererForColumn = void 0;
4
- const Badge_1 = require("../components/Badge");
4
+ const Badge_1 = require("../View/Components/Badge");
5
+ const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
5
6
  const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
6
7
  if (!styledColumn.BadgeStyle) {
7
8
  return;
8
9
  }
9
10
  return class BadgetRenderer {
11
+ getAdaptableInstance(params) {
12
+ const adaptable = params.api.__adaptable;
13
+ return adaptable;
14
+ }
10
15
  init(params) {
11
- var _a, _b, _c, _d, _e, _f;
16
+ var _a, _b, _c, _d;
17
+ const adaptable = this.getAdaptableInstance(params);
18
+ const adapatableApi = adaptable.api;
12
19
  this.eGui = document.createElement('div');
13
20
  this.eGui.className = 'ab-Badge__wrapper';
14
21
  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 : '';
15
- const badge = api.styledColumnApi.internalApi.getApplicableBadge(styledColumn, {
22
+ const predicateDefHandlerContext = {
16
23
  value: params.value,
17
24
  oldValue: null,
18
25
  displayValue: params.formatValue,
19
26
  node: params.node,
20
27
  column: abColumn,
21
- });
28
+ adaptableApi: adapatableApi,
29
+ userName: adapatableApi.optionsApi.getUserName(),
30
+ adaptableId: adapatableApi.optionsApi.getAdaptableId(),
31
+ };
32
+ const badge = api.styledColumnApi.internalApi.getApplicableBadge(styledColumn, predicateDefHandlerContext);
22
33
  const isGrouped = params.node.group;
23
34
  const includeGrouped = Boolean(styledColumn.IncludeGroupedRows);
24
35
  const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
@@ -32,24 +43,12 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
32
43
  this.eGui.innerHTML = formattedValue;
33
44
  return;
34
45
  }
35
- let icon = badge.Icon;
36
- if (icon && 'name' in icon && icon.size === undefined) {
37
- icon.size = 14;
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
- }
47
- this.unmountReactRoot = api.internalApi.getAdaptableInstance().renderReactRoot((0, Badge_1.Badge)({
46
+ this.unmountReactRoot = api.internalApi.getAdaptableInstance().renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)((0, Badge_1.Badge)({
48
47
  adaptableStyle: badge.Style,
49
48
  children: formattedValue,
50
- icon,
51
- iconPosition: (_f = badge.IconPosition) !== null && _f !== void 0 ? _f : 'start',
52
- }), this.eGui);
49
+ icon: badge.Icon,
50
+ iconPosition: (_d = badge.IconPosition) !== null && _d !== void 0 ? _d : 'start',
51
+ }), adaptable), this.eGui);
53
52
  }
54
53
  getGui() {
55
54
  return this.eGui;
@@ -30,7 +30,7 @@ const getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
30
30
  CheckboxRenderer.prototype.checkedHandler = function (e) {
31
31
  let checked = e.target.checked;
32
32
  this.params.node.setDataValue(columnId, checked);
33
- api.styledColumnApi.fireCheckboxColumnClickedEvent(columnId, this.params.node.data, api.gridApi.getPrimaryKeyValueForRowNode(this.params.node), checked);
33
+ api.styledColumnApi.internalApi.fireCheckboxColumnClickedEvent(columnId, this.params.node.data, api.gridApi.getPrimaryKeyValueForRowNode(this.params.node), checked);
34
34
  };
35
35
  CheckboxRenderer.prototype.suppressEditEvent = function (event) {
36
36
  if (event.target === this.eGui) {
@@ -43,6 +43,7 @@ const GeneralConstants = tslib_1.__importStar(require("../Utilities/Constants/Ge
43
43
  const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
44
44
  const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
45
45
  const StyledColumnModule_1 = require("../Strategy/StyledColumnModule");
46
+ const Fdc3Module_1 = require("../Strategy/Fdc3Module");
46
47
  const tinycolor = require('tinycolor2');
47
48
  /**
48
49
  * Adaptable AG Grid implementation is getting really big and unwieldy
@@ -104,6 +105,7 @@ class agGridHelper {
104
105
  modules.set(ModuleConstants.StatusBarModuleId, new StatusBarModule_1.StatusBarModule(api));
105
106
  modules.set(ModuleConstants.ChartingModuleId, new ChartingModule_1.ChartingModule(api));
106
107
  modules.set(ModuleConstants.StyledColumnModuleId, new StyledColumnModule_1.StyledColumnModule(api));
108
+ modules.set(ModuleConstants.Fdc3ModuleId, new Fdc3Module_1.Fdc3Module(api));
107
109
  return modules;
108
110
  }
109
111
  TrySetUpNodeIds(hasAutogeneratedPrimaryKey) {
@@ -494,6 +496,8 @@ class agGridHelper {
494
496
  return 'Date';
495
497
  case 'abColDefObject':
496
498
  return 'Object';
499
+ case 'abColDefStringArray':
500
+ return 'StringArray';
497
501
  case 'abColDefNumberArray':
498
502
  return 'NumberArray';
499
503
  case 'abColDefTupleNumberArray':
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
6
6
  const icons_1 = require("../components/icons");
7
7
  const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
8
- const AdaptableIconComponent_1 = require("../components/AdaptableIconComponent");
8
+ const Icon_1 = require("../components/Icon");
9
9
  // tslint:disable-next-line: class-name
10
10
  class agGridMenuHelper {
11
11
  constructor(adaptable, gridOptions) {
@@ -168,11 +168,18 @@ class agGridMenuHelper {
168
168
  };
169
169
  }
170
170
  mapAdaptableIconToAgGridIcon(adaptableIcon, style) {
171
- if ((0, AdaptableIconComponent_1.isAdaptableElementIcon)(adaptableIcon)) {
172
- return adaptableIcon.element;
171
+ const icon = this.adaptable.api.userInterfaceApi.internalApi.prepareAdaptableIconDef(adaptableIcon);
172
+ if ((0, Icon_1.isAdaptableElementIcon)(icon)) {
173
+ let element = icon.element;
174
+ if (typeof element === 'string') {
175
+ return element;
176
+ }
177
+ // THe element neets to be cloned.
178
+ // when it is used in more than one plce the element is removed from the DOM
179
+ return element.cloneNode(true);
173
180
  }
174
181
  else {
175
- return (0, icons_1.iconToString)(adaptableIcon, {
182
+ return (0, icons_1.iconToString)(icon, {
176
183
  fill: 'var(--ab-color-text-on-primary)',
177
184
  });
178
185
  }
@@ -9,6 +9,7 @@ export declare const attachColumnTypes: (gridOptions: GridOptions) => {
9
9
  abColDefDate: import("@ag-grid-community/core").ColDef<any, any>;
10
10
  abColDefObject: import("@ag-grid-community/core").ColDef<any, any>;
11
11
  abColDefCustom: import("@ag-grid-community/core").ColDef<any, any>;
12
+ abColDefStringArray: import("@ag-grid-community/core").ColDef<any, any>;
12
13
  abColDefNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
13
14
  abColDefTupleNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
14
15
  abColDefObjectNumberArray: import("@ag-grid-community/core").ColDef<any, any>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.attachColumnTypes = void 0;
4
4
  const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
5
5
  const attachColumnTypes = (gridOptions) => {
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
7
7
  gridOptions.columnTypes = (_a = gridOptions.columnTypes) !== null && _a !== void 0 ? _a : {};
8
8
  return Object.assign(gridOptions.columnTypes, {
9
9
  [GeneralConstants_1.AB_SPECIAL_COLUMN]: {},
@@ -13,9 +13,10 @@ const attachColumnTypes = (gridOptions) => {
13
13
  abColDefDate: (_e = gridOptions.columnTypes.abColDefDate) !== null && _e !== void 0 ? _e : {},
14
14
  abColDefObject: (_f = gridOptions.columnTypes.abColDefObject) !== null && _f !== void 0 ? _f : {},
15
15
  abColDefCustom: (_g = gridOptions.columnTypes.abColDefCustom) !== null && _g !== void 0 ? _g : {},
16
- abColDefNumberArray: (_h = gridOptions.columnTypes.abColDefNumberArray) !== null && _h !== void 0 ? _h : {},
17
- abColDefTupleNumberArray: (_j = gridOptions.columnTypes.abColDefTupleNumberArray) !== null && _j !== void 0 ? _j : {},
18
- abColDefObjectNumberArray: (_k = gridOptions.columnTypes.abColDefObjectNumberArray) !== null && _k !== void 0 ? _k : {},
16
+ abColDefStringArray: (_h = gridOptions.columnTypes.abColDefStringArray) !== null && _h !== void 0 ? _h : {},
17
+ abColDefNumberArray: (_j = gridOptions.columnTypes.abColDefNumberArray) !== null && _j !== void 0 ? _j : {},
18
+ abColDefTupleNumberArray: (_k = gridOptions.columnTypes.abColDefTupleNumberArray) !== null && _k !== void 0 ? _k : {},
19
+ abColDefObjectNumberArray: (_l = gridOptions.columnTypes.abColDefObjectNumberArray) !== null && _l !== void 0 ? _l : {},
19
20
  });
20
21
  };
21
22
  exports.attachColumnTypes = attachColumnTypes;
@@ -20,7 +20,7 @@ function getStartValue(params) {
20
20
  return '';
21
21
  }
22
22
  if (params.eventKey && isValidChar(params.eventKey)) {
23
- return params.eventKey;
23
+ return Number(params.eventKey);
24
24
  }
25
25
  return params.value;
26
26
  }
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export interface DrawerProps {
3
+ open: boolean;
4
+ onOpenChange?: (open: boolean) => void;
5
+ }
6
+ export declare const Drawer: React.FunctionComponent<React.PropsWithChildren<DrawerProps>>;