@adaptabletools/adaptable 11.3.0 → 12.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/base.css +22 -4
  2. package/bundle.cjs.js +108 -108
  3. package/index.css +26 -4
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
  8. package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
  9. package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
  10. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
  13. package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
  14. package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
  15. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
  16. package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
  17. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
  18. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  19. package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
  20. package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
  21. package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
  22. package/src/AdaptableOptions/GeneralOptions.d.ts +22 -23
  23. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
  24. package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
  25. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
  26. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
  27. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +75 -62
  28. package/src/Api/AdaptableApi.d.ts +6 -3
  29. package/src/Api/ColumnApi.d.ts +2 -2
  30. package/src/Api/ConditionalStyleApi.d.ts +10 -0
  31. package/src/Api/ConfigApi.d.ts +0 -12
  32. package/src/Api/DashboardApi.d.ts +6 -19
  33. package/src/Api/DataSetApi.d.ts +40 -0
  34. package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
  35. package/src/Api/EventApi.d.ts +15 -1
  36. package/src/Api/Events/DataSetChanged.d.ts +5 -0
  37. package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
  38. package/src/Api/Events/SearchChanged.d.ts +3 -4
  39. package/src/Api/FilterApi.d.ts +1 -77
  40. package/src/Api/GridApi.d.ts +1 -1
  41. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  42. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  43. package/src/Api/Implementation/AlertApiImpl.js +5 -1
  44. package/src/Api/Implementation/ApiBase.d.ts +3 -0
  45. package/src/Api/Implementation/ApiBase.js +6 -0
  46. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
  47. package/src/Api/Implementation/ColumnApiImpl.js +2 -2
  48. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
  49. package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
  50. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  51. package/src/Api/Implementation/ConfigApiImpl.js +2 -24
  52. package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
  53. package/src/Api/Implementation/DashboardApiImpl.js +5 -29
  54. package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
  55. package/src/Api/Implementation/DataSetApiImpl.js +42 -0
  56. package/src/Api/Implementation/EventApiImpl.js +1 -0
  57. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -16
  58. package/src/Api/Implementation/FilterApiImpl.js +5 -159
  59. package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
  60. package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
  61. package/src/Api/Implementation/GridApiImpl.js +1 -1
  62. package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
  63. package/src/Api/Implementation/InternalApiImpl.js +14 -3
  64. package/src/Api/Implementation/LayoutApiImpl.d.ts +18 -1
  65. package/src/Api/Implementation/LayoutApiImpl.js +172 -0
  66. package/src/Api/Implementation/PredicateApiImpl.js +1 -1
  67. package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -1
  68. package/src/Api/Implementation/SmartEditApiImpl.js +6 -0
  69. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
  70. package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
  71. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  72. package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -4
  73. package/src/Api/InternalApi.d.ts +3 -2
  74. package/src/Api/LayoutApi.d.ts +88 -1
  75. package/src/Api/SmartEditApi.d.ts +8 -2
  76. package/src/Api/TeamSharingApi.d.ts +18 -5
  77. package/src/Api/UserInterfaceApi.d.ts +4 -4
  78. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  79. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
  80. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
  81. package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
  82. package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
  83. package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
  84. package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
  85. package/src/PredefinedConfig/Common/Enums.js +1 -1
  86. package/src/PredefinedConfig/Common/Types.d.ts +6 -5
  87. package/src/PredefinedConfig/Common/Types.js +2 -3
  88. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  89. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  90. package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
  91. package/src/PredefinedConfig/SystemState.d.ts +3 -0
  92. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
  93. package/src/Redux/ActionsReducers/LayoutRedux.js +135 -1
  94. package/src/Redux/ActionsReducers/SystemRedux.d.ts +22 -0
  95. package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
  96. package/src/Redux/Store/AdaptableStore.js +37 -39
  97. package/src/Strategy/AlertModule.d.ts +11 -0
  98. package/src/Strategy/AlertModule.js +14 -0
  99. package/src/Strategy/CellSummaryModule.d.ts +3 -0
  100. package/src/Strategy/CellSummaryModule.js +28 -14
  101. package/src/Strategy/DataSetModule.d.ts +25 -0
  102. package/src/Strategy/DataSetModule.js +65 -0
  103. package/src/Strategy/ExportModule.js +6 -1
  104. package/src/Strategy/FilterModule.d.ts +7 -11
  105. package/src/Strategy/FilterModule.js +24 -15
  106. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  107. package/src/Strategy/FlashingCellModule.js +2 -2
  108. package/src/Strategy/Interface/IModule.d.ts +3 -1
  109. package/src/Strategy/LayoutModule.js +24 -2
  110. package/src/Strategy/SmartEditModule.js +1 -1
  111. package/src/Strategy/StatusBarModule.js +1 -3
  112. package/src/Strategy/TeamSharingModule.js +1 -1
  113. package/src/Strategy/ToolPanelModule.js +1 -4
  114. package/src/Utilities/Constants/GeneralConstants.d.ts +6 -2
  115. package/src/Utilities/Constants/GeneralConstants.js +6 -2
  116. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
  117. package/src/Utilities/Constants/ModuleConstants.js +2 -2
  118. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +15 -15
  119. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  120. package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
  121. package/src/Utilities/ObjectFactory.d.ts +3 -6
  122. package/src/Utilities/ObjectFactory.js +3 -7
  123. package/src/Utilities/Services/EntitlementService.js +7 -1
  124. package/src/Utilities/Services/ModuleService.js +1 -1
  125. package/src/Utilities/Services/ReportService.js +2 -3
  126. package/src/Utilities/Services/TeamSharingService.js +4 -4
  127. package/src/View/AdaptablePopover/index.d.ts +1 -0
  128. package/src/View/AdaptablePopover/index.js +5 -6
  129. package/src/View/AdaptableView.js +1 -1
  130. package/src/View/AdaptableViewFactory.js +2 -2
  131. package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
  132. package/src/View/Alert/ActiveAlertsPanel.js +15 -0
  133. package/src/View/Alert/AlertStatusSubPanel.js +3 -8
  134. package/src/View/Alert/AlertViewPanel.js +2 -2
  135. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
  136. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  137. package/src/View/CellSummary/CellSummaryDetails.js +2 -2
  138. package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
  139. package/src/View/CellSummary/CellSummaryPopover.js +3 -6
  140. package/src/View/CellSummary/CellSummaryPopup.js +8 -0
  141. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
  142. package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
  143. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  144. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
  145. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
  146. package/src/View/Components/ExternalRenderer.d.ts +3 -6
  147. package/src/View/Components/ExternalRenderer.js +5 -5
  148. package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
  149. package/src/View/Components/FilterForm/FilterForm.js +9 -7
  150. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
  151. package/src/View/Components/FilterForm/QuickFilterForm.js +6 -5
  152. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  153. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
  154. package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
  155. package/src/View/Components/Popups/AdaptableToaster.js +29 -9
  156. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
  157. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
  158. package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
  159. package/src/View/Dashboard/CustomDashboardButton.js +47 -0
  160. package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
  161. package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
  162. package/src/View/Dashboard/Dashboard.d.ts +1 -0
  163. package/src/View/Dashboard/Dashboard.js +8 -34
  164. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
  165. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
  166. package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
  167. package/src/View/DataSet/DataSetSelector.d.ts +7 -0
  168. package/src/View/DataSet/DataSetSelector.js +18 -0
  169. package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
  170. package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
  171. package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
  172. package/src/View/DataSet/DataSetViewPanel.js +58 -0
  173. package/src/View/Filter/ActiveFiltersPanel.js +1 -1
  174. package/src/View/Filter/FilterSummary.d.ts +5 -5
  175. package/src/View/Filter/FilterSummary.js +6 -5
  176. package/src/View/Filter/FilterViewPanel.d.ts +4 -4
  177. package/src/View/Filter/FilterViewPanel.js +11 -14
  178. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  179. package/src/View/GridInfo/GridInfoPopup.js +1 -1
  180. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
  181. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  182. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  183. package/src/View/SmartEdit/SmartEditPopup.js +2 -2
  184. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
  185. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  186. package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
  187. package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
  188. package/src/View/StatusBar/StatusBarPanel.js +5 -4
  189. package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
  190. package/src/View/UIHelper.d.ts +4 -4
  191. package/src/View/UIHelper.js +4 -4
  192. package/src/agGrid/ActionColumnRenderer.js +3 -2
  193. package/src/agGrid/Adaptable.d.ts +4 -2
  194. package/src/agGrid/Adaptable.js +79 -52
  195. package/src/agGrid/FilterWrapper.js +1 -1
  196. package/src/agGrid/agGridHelper.d.ts +6 -6
  197. package/src/agGrid/agGridHelper.js +34 -56
  198. package/src/agGrid/agGridMenuHelper.js +4 -1
  199. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -2
  200. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  201. package/src/components/SelectList.d.ts +10 -0
  202. package/src/components/SelectList.js +9 -0
  203. package/src/components/icons/{data-source.d.ts → data-set.d.ts} +0 -0
  204. package/src/components/icons/{data-source.js → data-set.js} +0 -0
  205. package/src/components/icons/index.js +2 -2
  206. package/src/metamodel/adaptable.metamodel.d.ts +162 -77
  207. package/src/metamodel/adaptable.metamodel.js +422 -375
  208. package/src/types.d.ts +15 -12
  209. package/version.d.ts +1 -1
  210. package/version.js +1 -1
  211. package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -10
  212. package/src/Api/DataSourceApi.d.ts +0 -58
  213. package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
  214. package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
  215. package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
  216. package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
  217. package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
  218. package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
  219. package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
  220. package/src/Strategy/DataSourceModule.d.ts +0 -20
  221. package/src/Strategy/DataSourceModule.js +0 -56
  222. package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
  223. package/src/View/DataSource/DataSourceViewPanel.js +0 -69
  224. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
  225. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
  226. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
  227. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
  228. package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
  229. package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
@@ -11,7 +11,7 @@ const CellSummaryModule_1 = require("../Strategy/CellSummaryModule");
11
11
  const ConditionalStyleModule_1 = require("../Strategy/ConditionalStyleModule");
12
12
  const CustomSortModule_1 = require("../Strategy/CustomSortModule");
13
13
  const DashboardModule_1 = require("../Strategy/DashboardModule");
14
- const DataSourceModule_1 = require("../Strategy/DataSourceModule");
14
+ const DataSetModule_1 = require("../Strategy/DataSetModule");
15
15
  const ExportModule_1 = require("../Strategy/ExportModule");
16
16
  const FilterModule_1 = require("../Strategy/FilterModule");
17
17
  const FormatColumnModule_1 = require("../Strategy/FormatColumnModule");
@@ -41,6 +41,8 @@ const ChartingModule_1 = require("../Strategy/ChartingModule");
41
41
  const PercentBarRenderer_1 = require("./PercentBarRenderer");
42
42
  const Helper_1 = require("../Utilities/Helpers/Helper");
43
43
  const StatusBarModule_1 = require("../Strategy/StatusBarModule");
44
+ const GeneralConstants = tslib_1.__importStar(require("../Utilities/Constants/GeneralConstants"));
45
+ const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
44
46
  const tinycolor = require('tinycolor2');
45
47
  /**
46
48
  * Adaptable AG Grid implementation is getting really big and unwieldy
@@ -79,7 +81,7 @@ class agGridHelper {
79
81
  modules.set(ModuleConstants.ConditionalStyleModuleId, new ConditionalStyleModule_1.ConditionalStyleModule(api));
80
82
  modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule_1.CustomSortModule(api));
81
83
  modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule_1.DataChangeHistoryModule(api));
82
- modules.set(ModuleConstants.DataSourceModuleId, new DataSourceModule_1.DataSourceModule(api));
84
+ modules.set(ModuleConstants.DataSetModuleId, new DataSetModule_1.DataSetModule(api));
83
85
  modules.set(ModuleConstants.ExportModuleId, new ExportModule_1.ExportModule(api));
84
86
  modules.set(ModuleConstants.FilterModuleId, new FilterModule_1.FilterModule(api));
85
87
  modules.set(ModuleConstants.FormatColumnModuleId, new FormatColumnModule_1.FormatColumnModule(api));
@@ -155,7 +157,11 @@ class agGridHelper {
155
157
  createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups) {
156
158
  const colId = agGridColumn.getColId();
157
159
  const colDef = agGridColumn.getColDef();
158
- const FriendlyName = this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header');
160
+ const columnFriendlyName = this.adaptable.adaptableOptions.columnOptions.columnFriendlyName;
161
+ const customFriendlyName = typeof columnFriendlyName === 'function'
162
+ ? columnFriendlyName({ colId: colId, agColumn: agGridColumn })
163
+ : null;
164
+ const FriendlyName = customFriendlyName !== null && customFriendlyName !== void 0 ? customFriendlyName : this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header');
159
165
  if (!this.initialAgGridColDefs[colId]) {
160
166
  this.initialAgGridColDefs[colId] = Object.assign({}, agGridColumn.getUserProvidedColDef());
161
167
  }
@@ -203,55 +209,26 @@ class agGridHelper {
203
209
  }
204
210
  return abColumn;
205
211
  }
206
- createAdaptableSideBarDefs(showFilterPanel, showColumnsPanel) {
207
- const toolPanelDef = [];
208
- if (showFilterPanel) {
209
- const filterToolPanel = {
210
- id: 'filters',
211
- labelDefault: 'Filters',
212
- labelKey: 'filters',
213
- iconKey: 'filter',
214
- toolPanel: 'agFiltersToolPanel',
215
- };
216
- toolPanelDef.push(filterToolPanel);
217
- }
218
- if (showColumnsPanel) {
219
- const columnsToolPanel = {
220
- id: 'columns',
221
- labelDefault: 'Columns',
222
- labelKey: 'columns',
223
- iconKey: 'columns',
224
- toolPanel: 'agColumnsToolPanel',
225
- };
226
- toolPanelDef.push(columnsToolPanel);
227
- }
228
- toolPanelDef.push(this.createAdaptableToolPanel());
229
- this.orderToolPanels(toolPanelDef);
230
- const abSideBarDef = {
231
- toolPanels: toolPanelDef,
232
- defaultToolPanel: '',
233
- };
234
- return abSideBarDef;
235
- }
236
- createAdaptableToolPanel() {
212
+ buildAdaptableToolPanelDef() {
237
213
  return {
238
- id: 'adaptable',
239
- toolPanel: 'AdaptableToolPanel',
240
- labelDefault: this.adaptable.adaptableOptions.toolPanelOptions.adaptableToolPanelTitle,
214
+ id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
215
+ toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
216
+ labelDefault: GeneralConstants.ADAPTABLE,
241
217
  labelKey: 'adaptable',
242
- iconKey: this.adaptable.adaptableOptions.toolPanelOptions.iconKey,
243
- width: this.adaptable.adaptableOptions.toolPanelOptions.width,
244
- minWidth: this.adaptable.adaptableOptions.toolPanelOptions.minWidth,
245
- maxWidth: this.adaptable.adaptableOptions.toolPanelOptions.maxWidth,
218
+ iconKey: 'menu',
219
+ width: UIHelper_1.default.getAdaptableToolPanelWidth(),
220
+ minWidth: UIHelper_1.default.getAdaptableToolPanelWidth(),
246
221
  };
247
222
  }
248
- orderToolPanels(toolPanelDefs) {
249
- const customOrder = this.adaptable.adaptableOptions.toolPanelOptions.toolPanelOrder;
250
- toolPanelDefs.sort(function (left, right) {
251
- const leftOperand = typeof left === 'string' ? left : left.id;
252
- const rightOperand = typeof right === 'string' ? right : right.id;
253
- return customOrder.indexOf(leftOperand) - customOrder.indexOf(rightOperand);
254
- });
223
+ isSideBarDefObject(sidebarDef) {
224
+ var _a;
225
+ return Array.isArray((_a = sidebarDef) === null || _a === void 0 ? void 0 : _a.toolPanels);
226
+ }
227
+ mapToolPanelDefs(toolPanelDefs = []) {
228
+ // if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
229
+ return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
230
+ ? this.buildAdaptableToolPanelDef()
231
+ : toolPanelDef);
255
232
  }
256
233
  // This method reselects cells - only IF they are in a single column
257
234
  // Might be able to change that later
@@ -404,12 +381,12 @@ class agGridHelper {
404
381
  if (Array.isArray(colType)) {
405
382
  colType.forEach((c) => {
406
383
  if (dataType == Enums_1.DataType.Unknown) {
407
- dataType = this.getabColDefValue(c);
384
+ dataType = this.getAbColDefValue(c);
408
385
  }
409
386
  });
410
387
  }
411
388
  else {
412
- dataType = this.getabColDefValue(colType);
389
+ dataType = this.getAbColDefValue(colType);
413
390
  }
414
391
  if (dataType != Enums_1.DataType.Unknown) {
415
392
  return dataType;
@@ -463,12 +440,13 @@ class agGridHelper {
463
440
  LoggingHelper_1.LogAdaptableWarning(`No defined type for column '${column.getColId()}'. Defaulting to type of first value: ${dataType}`);
464
441
  return dataType;
465
442
  }
466
- getabColDefValue(colType) {
443
+ getAbColDefValue(colType) {
467
444
  if (colType == 'numericColumn') {
468
445
  return Enums_1.DataType.Number;
469
446
  }
470
447
  if (colType.startsWith('abColDef')) {
471
- switch (colType) {
448
+ const abColType = colType;
449
+ switch (abColType) {
472
450
  case 'abColDefNumber':
473
451
  return Enums_1.DataType.Number;
474
452
  case 'abColDefString':
@@ -508,20 +486,20 @@ class agGridHelper {
508
486
  checkShouldClearExistingFiltersOrSearches() {
509
487
  // if they have selected to clear column filters on startup then do it
510
488
  if (this.adaptable.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
511
- if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.adaptable.api.filterApi.getAllColumnFilter())) {
489
+ if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.adaptable.api.layoutApi.getAllColumnFilter())) {
512
490
  LoggingHelper_1.LogAdaptableWarning('Clearing existing Column Filters as "clearFiltersOnStartUp" is true');
513
- this.adaptable.api.filterApi.clearAllColumnFilter();
491
+ this.adaptable.api.layoutApi.clearAllColumnFilter();
514
492
  }
515
493
  }
516
494
  // if they have selected to clear searches on startup then do it
517
495
  if (this.adaptable.adaptableOptions.searchOptions.clearSearchesOnStartUp) {
518
496
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.adaptable.api.quickSearchApi.getQuickSearchState().QuickSearchText) ||
519
497
  StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.adaptable.api.queryApi.getCurrentQuery()) ||
520
- ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.adaptable.api.dataSourceApi.getAllDataSource())) {
498
+ ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.adaptable.api.dataSetApi.getAllDataSets())) {
521
499
  LoggingHelper_1.LogAdaptableWarning('Clearing existing Searches as "clearSearchesOnStartUp" is true');
522
500
  this.adaptable.api.quickSearchApi.clearQuickSearch();
523
501
  this.adaptable.api.queryApi.clearCurrentQuery();
524
- this.adaptable.api.dataSourceApi.clearDataSource();
502
+ this.adaptable.api.dataSetApi.clearCurrentDataSet();
525
503
  }
526
504
  }
527
505
  }
@@ -52,6 +52,9 @@ class agGridMenuHelper {
52
52
  }));
53
53
  }
54
54
  buildContextMenu(params, originalgetContextMenuItems) {
55
+ // we do this in order to refresh the internal state of selected cells (technically query the AG Grid cellRanges)
56
+ // (right-click selected the current cell, but this was not reflected in the internal state of the selected cells)
57
+ this.adaptable.setSelectedCells();
55
58
  let agGridContextMenuItems = [];
56
59
  let adaptableContextMenuItems = [];
57
60
  let userContextMenuItems = [];
@@ -240,7 +243,7 @@ class agGridMenuHelper {
240
243
  isSingleSelectedColumn = ArrayExtensions_1.ArrayExtensions.CorrectLength(selectedCellInfo.columns, 1);
241
244
  }
242
245
  }
243
- let selectedRowInfo = this.adaptable.setSelectedRows();
246
+ let selectedRowInfo = this.adaptable.api.gridApi.getSelectedRowInfo();
244
247
  return {
245
248
  isSelectedCell: isSelectedCell,
246
249
  gridCell: clickedCell,
@@ -19,14 +19,15 @@ function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabled
19
19
  width: 15,
20
20
  },
21
21
  };
22
- const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
22
+ const buttonIcon = api.internalApi.getIconForButton(button, context);
23
+ const iconProps = buttonIcon && Object.assign({}, defaultIconProps, buttonIcon);
23
24
  let buttonStyle = api.internalApi.getStyleForButton(button, context ? context : { adaptableApi: api });
24
25
  let buttonLabel = api.internalApi.getLabelForButton(button, context ? context : { adaptableApi: api });
25
26
  let buttonTooltip = api.internalApi.getTooltipForButton(button, context ? context : { adaptableApi: api });
26
27
  return (React.createElement(SimpleButton_1.default, { autoFocus: focusFirstButton && index === 0, disabled: disabledButtons[index], key: index, tooltip: buttonTooltip, 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: () => {
27
28
  onClick(button);
28
29
  } },
29
- button.icon ? React.createElement("img", Object.assign({}, iconProps)) : null,
30
+ buttonIcon ? React.createElement("img", Object.assign({}, iconProps)) : null,
30
31
  buttonLabel));
31
32
  })));
32
33
  }
@@ -11,8 +11,8 @@ function DashboardToolbar(props) {
11
11
  React.createElement("div", { className: "ab-Dashboard__toolbar-content" }, props.children),
12
12
  React.createElement(rebass_1.Flex, { className: "ab-Dashboard__toolbar-title", flexDirection: "row", alignItems: "center" },
13
13
  React.createElement("span", null, props.title),
14
- props.showConfigure && (React.createElement(SimpleButton_1.default, { icon: "build", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
14
+ props.showConfigure && (React.createElement(SimpleButton_1.default, { icon: "build", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Configure ${props.title} Toolbar`, onClick: () => props.onConfigure() })),
15
15
  ' ',
16
- props.showClose && (React.createElement(SimpleButton_1.default, { style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "clear", variant: "text", tone: "none", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Close ${props.title}`, onClick: () => props.onClose() })))));
16
+ props.showClose && (React.createElement(SimpleButton_1.default, { style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "clear", variant: "text", tone: "none", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
17
17
  }
18
18
  exports.DashboardToolbar = DashboardToolbar;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface SelectListOption {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface SelectListProps {
7
+ options: SelectListOption[];
8
+ onChange: (option: SelectListOption) => void;
9
+ }
10
+ export declare const SelectList: React.FunctionComponent<SelectListProps>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelectList = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const SimpleButton_1 = tslib_1.__importDefault(require("./SimpleButton"));
7
+ exports.SelectList = (props) => {
8
+ return (React.createElement(React.Fragment, null, props.options.map((option) => (React.createElement(SimpleButton_1.default, { p: 2, width: '100%', variant: "text", onClick: () => props.onChange(option), key: option.label }, option.label)))));
9
+ };
@@ -56,7 +56,7 @@ const column_filter_1 = tslib_1.__importDefault(require("./column-filter"));
56
56
  const column_info_1 = tslib_1.__importDefault(require("./column-info"));
57
57
  const custom_sort_1 = tslib_1.__importDefault(require("./custom-sort"));
58
58
  const system_status_1 = tslib_1.__importDefault(require("./system-status"));
59
- const data_source_1 = tslib_1.__importDefault(require("./data-source"));
59
+ const data_set_1 = tslib_1.__importDefault(require("./data-set"));
60
60
  const flashing_cell_1 = tslib_1.__importDefault(require("./flashing-cell"));
61
61
  const edit_1 = tslib_1.__importDefault(require("./edit"));
62
62
  const equation_1 = tslib_1.__importDefault(require("./equation"));
@@ -153,7 +153,7 @@ const allIcons = {
153
153
  call: call_1.default,
154
154
  instrument: instrument_1.default,
155
155
  news: news_1.default,
156
- 'data-source': data_source_1.default,
156
+ 'data-set': data_set_1.default,
157
157
  export: export_1.default,
158
158
  campaign: campaign_1.default,
159
159
  broadcast: campaign_1.default,
@@ -74,6 +74,26 @@ export declare const ADAPTABLE_METAMODEL: {
74
74
  kind: string;
75
75
  description: string;
76
76
  };
77
+ ActionOptions: {
78
+ name: string;
79
+ kind: string;
80
+ description: string;
81
+ properties: ({
82
+ name: string;
83
+ kind: string;
84
+ description: string;
85
+ uiLabel: string;
86
+ isOptional: boolean;
87
+ defaultValue?: undefined;
88
+ } | {
89
+ name: string;
90
+ kind: string;
91
+ description: string;
92
+ uiLabel: string;
93
+ isOptional: boolean;
94
+ defaultValue: string;
95
+ })[];
96
+ };
77
97
  AdaptableAlert: {
78
98
  name: string;
79
99
  kind: string;
@@ -124,21 +144,13 @@ export declare const ADAPTABLE_METAMODEL: {
124
144
  name: string;
125
145
  kind: string;
126
146
  description: string;
127
- properties: ({
128
- name: string;
129
- kind: string;
130
- description: string;
131
- uiLabel: string;
132
- isOptional: boolean;
133
- reference?: undefined;
134
- } | {
147
+ properties: {
135
148
  name: string;
136
149
  kind: string;
137
150
  description: string;
138
151
  uiLabel: string;
139
152
  isOptional: boolean;
140
- reference: string;
141
- })[];
153
+ }[];
142
154
  };
143
155
  AdaptableCalculatedColumnQuery: {
144
156
  name: string;
@@ -188,12 +200,24 @@ export declare const ADAPTABLE_METAMODEL: {
188
200
  name: string;
189
201
  kind: string;
190
202
  description: string;
191
- properties: {
203
+ properties: ({
192
204
  name: string;
193
205
  kind: string;
194
206
  description: string;
195
207
  uiLabel: string;
196
- }[];
208
+ reference?: undefined;
209
+ } | {
210
+ name: string;
211
+ kind: string;
212
+ description: string;
213
+ uiLabel: string;
214
+ reference: string;
215
+ })[];
216
+ };
217
+ AdaptableColumnDataType: {
218
+ name: string;
219
+ kind: string;
220
+ description: string;
197
221
  };
198
222
  AdaptableComparerFunction: {
199
223
  name: string;
@@ -436,18 +460,18 @@ export declare const ADAPTABLE_METAMODEL: {
436
460
  description: string;
437
461
  uiLabel: string;
438
462
  isOptional: boolean;
463
+ defaultValue: string;
464
+ reference: string;
439
465
  gridInfo?: undefined;
440
- defaultValue?: undefined;
441
- reference?: undefined;
442
466
  } | {
443
467
  name: string;
444
468
  kind: string;
445
469
  description: string;
446
470
  uiLabel: string;
447
471
  isOptional: boolean;
448
- defaultValue: string;
449
- reference: string;
450
472
  gridInfo?: undefined;
473
+ defaultValue?: undefined;
474
+ reference?: undefined;
451
475
  } | {
452
476
  name: string;
453
477
  kind: string;
@@ -536,6 +560,15 @@ export declare const ADAPTABLE_METAMODEL: {
536
560
  gridInfo: string;
537
561
  defaultValue: string;
538
562
  reference?: undefined;
563
+ } | {
564
+ name: string;
565
+ kind: string;
566
+ description: string;
567
+ uiLabel: string;
568
+ isOptional: boolean;
569
+ gridInfo?: undefined;
570
+ defaultValue?: undefined;
571
+ reference?: undefined;
539
572
  } | {
540
573
  name: string;
541
574
  kind: string;
@@ -787,6 +820,26 @@ export declare const ADAPTABLE_METAMODEL: {
787
820
  kind: string;
788
821
  description: string;
789
822
  };
823
+ AlertMessageContext: {
824
+ name: string;
825
+ kind: string;
826
+ description: string;
827
+ properties: ({
828
+ name: string;
829
+ kind: string;
830
+ description: string;
831
+ uiLabel: string;
832
+ reference: string;
833
+ isOptional?: undefined;
834
+ } | {
835
+ name: string;
836
+ kind: string;
837
+ description: string;
838
+ uiLabel: string;
839
+ isOptional: boolean;
840
+ reference: string;
841
+ })[];
842
+ };
790
843
  AlertOptions: {
791
844
  name: string;
792
845
  kind: string;
@@ -1233,6 +1286,24 @@ export declare const ADAPTABLE_METAMODEL: {
1233
1286
  reference: string;
1234
1287
  })[];
1235
1288
  };
1289
+ ColumnFriendlyNameContext: {
1290
+ name: string;
1291
+ kind: string;
1292
+ description: string;
1293
+ properties: ({
1294
+ name: string;
1295
+ kind: string;
1296
+ description: string;
1297
+ uiLabel: string;
1298
+ reference: string;
1299
+ } | {
1300
+ name: string;
1301
+ kind: string;
1302
+ description: string;
1303
+ uiLabel: string;
1304
+ reference?: undefined;
1305
+ })[];
1306
+ };
1236
1307
  ColumnMenuContext: {
1237
1308
  name: string;
1238
1309
  kind: string;
@@ -1251,6 +1322,28 @@ export declare const ADAPTABLE_METAMODEL: {
1251
1322
  reference?: undefined;
1252
1323
  })[];
1253
1324
  };
1325
+ ColumnOptions: {
1326
+ name: string;
1327
+ kind: string;
1328
+ description: string;
1329
+ properties: ({
1330
+ name: string;
1331
+ kind: string;
1332
+ description: string;
1333
+ uiLabel: string;
1334
+ isOptional: boolean;
1335
+ gridInfo: string;
1336
+ defaultValue: string;
1337
+ } | {
1338
+ name: string;
1339
+ kind: string;
1340
+ description: string;
1341
+ uiLabel: string;
1342
+ isOptional: boolean;
1343
+ gridInfo?: undefined;
1344
+ defaultValue?: undefined;
1345
+ })[];
1346
+ };
1254
1347
  ColumnSort: {
1255
1348
  name: string;
1256
1349
  kind: string;
@@ -1844,7 +1937,15 @@ export declare const ADAPTABLE_METAMODEL: {
1844
1937
  name: string;
1845
1938
  kind: string;
1846
1939
  description: string;
1847
- properties: {
1940
+ properties: ({
1941
+ name: string;
1942
+ kind: string;
1943
+ description: string;
1944
+ uiLabel: string;
1945
+ isOptional: boolean;
1946
+ gridInfo?: undefined;
1947
+ defaultValue?: undefined;
1948
+ } | {
1848
1949
  name: string;
1849
1950
  kind: string;
1850
1951
  description: string;
@@ -1852,9 +1953,9 @@ export declare const ADAPTABLE_METAMODEL: {
1852
1953
  isOptional: boolean;
1853
1954
  gridInfo: string;
1854
1955
  defaultValue: string;
1855
- }[];
1956
+ })[];
1856
1957
  };
1857
- DataSource: {
1958
+ DataSet: {
1858
1959
  name: string;
1859
1960
  kind: string;
1860
1961
  description: string;
@@ -1872,7 +1973,7 @@ export declare const ADAPTABLE_METAMODEL: {
1872
1973
  isOptional: boolean;
1873
1974
  })[];
1874
1975
  };
1875
- DataSourceApi: {
1976
+ DataSetApi: {
1876
1977
  name: string;
1877
1978
  kind: string;
1878
1979
  description: string;
@@ -1883,18 +1984,6 @@ export declare const ADAPTABLE_METAMODEL: {
1883
1984
  uiLabel: string;
1884
1985
  }[];
1885
1986
  };
1886
- DataSourceState: {
1887
- name: string;
1888
- kind: string;
1889
- description: string;
1890
- properties: {
1891
- name: string;
1892
- kind: string;
1893
- description: string;
1894
- uiLabel: string;
1895
- isOptional: boolean;
1896
- }[];
1897
- };
1898
1987
  DataUpdateConfig: {
1899
1988
  name: string;
1900
1989
  kind: string;
@@ -2295,26 +2384,6 @@ export declare const ADAPTABLE_METAMODEL: {
2295
2384
  defaultValue: string;
2296
2385
  }[];
2297
2386
  };
2298
- FilterState: {
2299
- name: string;
2300
- kind: string;
2301
- description: string;
2302
- properties: ({
2303
- name: string;
2304
- kind: string;
2305
- description: string;
2306
- uiLabel: string;
2307
- isOptional: boolean;
2308
- defaultValue?: undefined;
2309
- } | {
2310
- name: string;
2311
- kind: string;
2312
- description: string;
2313
- uiLabel: string;
2314
- isOptional: boolean;
2315
- defaultValue: string;
2316
- })[];
2317
- };
2318
2387
  FinanceApi: {
2319
2388
  name: string;
2320
2389
  kind: string;
@@ -2589,16 +2658,16 @@ export declare const ADAPTABLE_METAMODEL: {
2589
2658
  description: string;
2590
2659
  uiLabel: string;
2591
2660
  isOptional: boolean;
2592
- gridInfo: string;
2593
- defaultValue: string;
2661
+ defaultValue?: undefined;
2662
+ gridInfo?: undefined;
2594
2663
  } | {
2595
2664
  name: string;
2596
2665
  kind: string;
2597
2666
  description: string;
2598
2667
  uiLabel: string;
2599
2668
  isOptional: boolean;
2600
- defaultValue?: undefined;
2601
- gridInfo?: undefined;
2669
+ gridInfo: string;
2670
+ defaultValue: string;
2602
2671
  })[];
2603
2672
  };
2604
2673
  Glue42Api: {
@@ -3046,6 +3115,26 @@ export declare const ADAPTABLE_METAMODEL: {
3046
3115
  reference: string;
3047
3116
  })[];
3048
3117
  };
3118
+ MasterDetailPluginOptions: {
3119
+ name: string;
3120
+ kind: string;
3121
+ description: string;
3122
+ properties: ({
3123
+ name: string;
3124
+ kind: string;
3125
+ description: string;
3126
+ uiLabel: string;
3127
+ reference: string;
3128
+ isOptional?: undefined;
3129
+ } | {
3130
+ name: string;
3131
+ kind: string;
3132
+ description: string;
3133
+ uiLabel: string;
3134
+ isOptional: boolean;
3135
+ reference?: undefined;
3136
+ })[];
3137
+ };
3049
3138
  MenuOptions: {
3050
3139
  name: string;
3051
3140
  kind: string;
@@ -3906,6 +3995,19 @@ export declare const ADAPTABLE_METAMODEL: {
3906
3995
  reference?: undefined;
3907
3996
  })[];
3908
3997
  };
3998
+ StatusBarState: {
3999
+ name: string;
4000
+ kind: string;
4001
+ description: string;
4002
+ properties: {
4003
+ name: string;
4004
+ kind: string;
4005
+ description: string;
4006
+ uiLabel: string;
4007
+ isOptional: boolean;
4008
+ defaultValue: string;
4009
+ }[];
4010
+ };
3909
4011
  StringFormatterOptions: {
3910
4012
  name: string;
3911
4013
  kind: string;
@@ -4111,14 +4213,6 @@ export declare const ADAPTABLE_METAMODEL: {
4111
4213
  kind: string;
4112
4214
  description: string;
4113
4215
  properties: ({
4114
- name: string;
4115
- kind: string;
4116
- description: string;
4117
- uiLabel: string;
4118
- isOptional: boolean;
4119
- gridInfo: string;
4120
- defaultValue: string;
4121
- } | {
4122
4216
  name: string;
4123
4217
  kind: string;
4124
4218
  description: string;
@@ -4132,8 +4226,8 @@ export declare const ADAPTABLE_METAMODEL: {
4132
4226
  description: string;
4133
4227
  uiLabel: string;
4134
4228
  isOptional: boolean;
4229
+ gridInfo: string;
4135
4230
  defaultValue: string;
4136
- gridInfo?: undefined;
4137
4231
  })[];
4138
4232
  };
4139
4233
  ToolPanelState: {
@@ -4184,8 +4278,8 @@ export declare const ADAPTABLE_METAMODEL: {
4184
4278
  description: string;
4185
4279
  uiLabel: string;
4186
4280
  isOptional: boolean;
4281
+ reference: string;
4187
4282
  defaultValue?: undefined;
4188
- reference?: undefined;
4189
4283
  gridInfo?: undefined;
4190
4284
  } | {
4191
4285
  name: string;
@@ -4202,17 +4296,8 @@ export declare const ADAPTABLE_METAMODEL: {
4202
4296
  description: string;
4203
4297
  uiLabel: string;
4204
4298
  isOptional: boolean;
4205
- reference: string;
4206
- defaultValue?: undefined;
4207
- gridInfo?: undefined;
4208
- } | {
4209
- name: string;
4210
- kind: string;
4211
- description: string;
4212
- uiLabel: string;
4213
- isOptional: boolean;
4214
- defaultValue: string;
4215
4299
  reference?: undefined;
4300
+ defaultValue?: undefined;
4216
4301
  gridInfo?: undefined;
4217
4302
  } | {
4218
4303
  name: string;
@@ -4230,8 +4315,8 @@ export declare const ADAPTABLE_METAMODEL: {
4230
4315
  uiLabel: string;
4231
4316
  isOptional: boolean;
4232
4317
  gridInfo: string;
4233
- defaultValue?: undefined;
4234
4318
  reference?: undefined;
4319
+ defaultValue?: undefined;
4235
4320
  })[];
4236
4321
  };
4237
4322
  UserMenuItem: {