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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/base.css +22 -4
  2. package/bundle.cjs.js +111 -111
  3. package/index.css +26 -4
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
  8. package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
  9. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ActionOptions.js} +0 -0
  10. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
  13. package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
  14. package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
  15. package/src/AdaptableOptions/{SmartEdit.js → ColumnOptions.js} +0 -0
  16. package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
  17. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
  18. package/src/AdaptableOptions/EditOptions.d.ts +92 -4
  19. package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
  20. package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
  21. package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
  22. package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
  23. package/src/AdaptableOptions/GeneralOptions.d.ts +22 -23
  24. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
  25. package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
  26. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
  27. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
  28. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +81 -54
  29. package/src/Api/AdaptableApi.d.ts +6 -3
  30. package/src/Api/ColumnApi.d.ts +6 -3
  31. package/src/Api/ConditionalStyleApi.d.ts +10 -0
  32. package/src/Api/ConfigApi.d.ts +0 -12
  33. package/src/Api/DashboardApi.d.ts +6 -19
  34. package/src/Api/DataSetApi.d.ts +40 -0
  35. package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
  36. package/src/Api/EventApi.d.ts +18 -1
  37. package/src/Api/Events/DataSetChanged.d.ts +5 -0
  38. package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
  39. package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
  40. package/src/Api/Events/RowFormSubmitted.js +2 -0
  41. package/src/Api/Events/SearchChanged.d.ts +3 -4
  42. package/src/Api/FilterApi.d.ts +1 -77
  43. package/src/Api/FinanceApi.d.ts +3 -2
  44. package/src/Api/FormatColumnApi.d.ts +28 -1
  45. package/src/Api/GridApi.d.ts +15 -1
  46. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  47. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  48. package/src/Api/Implementation/AlertApiImpl.js +5 -1
  49. package/src/Api/Implementation/ApiBase.d.ts +3 -0
  50. package/src/Api/Implementation/ApiBase.js +6 -0
  51. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
  52. package/src/Api/Implementation/ColumnApiImpl.js +6 -3
  53. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
  54. package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
  55. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  56. package/src/Api/Implementation/ConfigApiImpl.js +2 -24
  57. package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
  58. package/src/Api/Implementation/DashboardApiImpl.js +5 -29
  59. package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
  60. package/src/Api/Implementation/DataSetApiImpl.js +42 -0
  61. package/src/Api/Implementation/EventApiImpl.js +1 -0
  62. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -16
  63. package/src/Api/Implementation/FilterApiImpl.js +5 -164
  64. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -0
  65. package/src/Api/Implementation/FormatColumnApiImpl.js +34 -0
  66. package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
  67. package/src/Api/Implementation/GridApiImpl.js +41 -1
  68. package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
  69. package/src/Api/Implementation/InternalApiImpl.js +51 -10
  70. package/src/Api/Implementation/LayoutApiImpl.d.ts +18 -1
  71. package/src/Api/Implementation/LayoutApiImpl.js +172 -0
  72. package/src/Api/Implementation/PredicateApiImpl.js +1 -1
  73. package/src/Api/Implementation/SmartEditApiImpl.d.ts +5 -2
  74. package/src/Api/Implementation/SmartEditApiImpl.js +9 -0
  75. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
  76. package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
  77. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  78. package/src/Api/Implementation/UserInterfaceApiImpl.js +7 -25
  79. package/src/Api/InternalApi.d.ts +6 -2
  80. package/src/Api/LayoutApi.d.ts +88 -1
  81. package/src/Api/SmartEditApi.d.ts +14 -3
  82. package/src/Api/TeamSharingApi.d.ts +18 -5
  83. package/src/Api/UserInterfaceApi.d.ts +4 -4
  84. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  85. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
  86. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
  87. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
  88. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
  89. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +6 -3
  90. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
  91. package/src/PredefinedConfig/Common/AdaptablePredicate.js +35 -2
  92. package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
  93. package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
  94. package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
  95. package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
  96. package/src/PredefinedConfig/Common/Enums.js +1 -1
  97. package/src/PredefinedConfig/Common/FDC3Context.d.ts +5 -1
  98. package/src/PredefinedConfig/Common/Types.d.ts +6 -5
  99. package/src/PredefinedConfig/Common/Types.js +2 -3
  100. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  101. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  102. package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
  103. package/src/PredefinedConfig/SystemState.d.ts +4 -2
  104. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
  105. package/src/Redux/ActionsReducers/LayoutRedux.js +135 -1
  106. package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -1
  107. package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
  108. package/src/Redux/Store/AdaptableStore.js +37 -39
  109. package/src/Strategy/AlertModule.d.ts +11 -0
  110. package/src/Strategy/AlertModule.js +14 -0
  111. package/src/Strategy/CellSummaryModule.d.ts +3 -0
  112. package/src/Strategy/CellSummaryModule.js +28 -14
  113. package/src/Strategy/DataSetModule.d.ts +25 -0
  114. package/src/Strategy/DataSetModule.js +65 -0
  115. package/src/Strategy/ExportModule.js +6 -1
  116. package/src/Strategy/FilterModule.d.ts +7 -11
  117. package/src/Strategy/FilterModule.js +24 -15
  118. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  119. package/src/Strategy/FlashingCellModule.js +2 -2
  120. package/src/Strategy/FormatColumnModule.js +1 -1
  121. package/src/Strategy/Interface/IModule.d.ts +3 -1
  122. package/src/Strategy/LayoutModule.js +24 -2
  123. package/src/Strategy/SmartEditModule.d.ts +1 -1
  124. package/src/Strategy/SmartEditModule.js +5 -6
  125. package/src/Strategy/StatusBarModule.js +1 -3
  126. package/src/Strategy/TeamSharingModule.js +1 -1
  127. package/src/Strategy/ToolPanelModule.js +1 -4
  128. package/src/Utilities/Constants/GeneralConstants.d.ts +6 -2
  129. package/src/Utilities/Constants/GeneralConstants.js +6 -2
  130. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
  131. package/src/Utilities/Constants/ModuleConstants.js +2 -2
  132. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +22 -13
  133. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  134. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
  135. package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
  136. package/src/Utilities/ObjectFactory.d.ts +3 -6
  137. package/src/Utilities/ObjectFactory.js +3 -7
  138. package/src/Utilities/Services/EntitlementService.js +7 -1
  139. package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
  140. package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
  141. package/src/Utilities/Services/ModuleService.js +1 -1
  142. package/src/Utilities/Services/ReportService.js +2 -3
  143. package/src/Utilities/Services/RowEditService.d.ts +25 -0
  144. package/src/Utilities/Services/RowEditService.js +165 -0
  145. package/src/Utilities/Services/TeamSharingService.js +4 -4
  146. package/src/View/AdaptablePopover/index.d.ts +1 -0
  147. package/src/View/AdaptablePopover/index.js +5 -6
  148. package/src/View/AdaptableView.js +1 -1
  149. package/src/View/AdaptableViewFactory.js +2 -2
  150. package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
  151. package/src/View/Alert/ActiveAlertsPanel.js +15 -0
  152. package/src/View/Alert/AlertStatusSubPanel.js +3 -8
  153. package/src/View/Alert/AlertViewPanel.js +2 -2
  154. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
  155. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  156. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  157. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
  158. package/src/View/CellSummary/CellSummaryDetails.js +2 -2
  159. package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
  160. package/src/View/CellSummary/CellSummaryPopover.js +3 -6
  161. package/src/View/CellSummary/CellSummaryPopup.js +8 -0
  162. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
  163. package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
  164. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  165. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
  166. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
  167. package/src/View/Components/ExternalRenderer.d.ts +3 -6
  168. package/src/View/Components/ExternalRenderer.js +5 -5
  169. package/src/View/Components/FilterForm/FilterForm.d.ts +5 -2
  170. package/src/View/Components/FilterForm/FilterForm.js +9 -7
  171. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
  172. package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
  173. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
  174. package/src/View/Components/FilterForm/QuickFilterForm.js +21 -7
  175. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  176. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
  177. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
  178. package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
  179. package/src/View/Components/Popups/AdaptableToaster.js +29 -9
  180. package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
  181. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
  182. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
  183. package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
  184. package/src/View/Dashboard/CustomDashboardButton.js +47 -0
  185. package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
  186. package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
  187. package/src/View/Dashboard/Dashboard.d.ts +1 -0
  188. package/src/View/Dashboard/Dashboard.js +8 -34
  189. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
  190. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
  191. package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
  192. package/src/View/DataSet/DataSetSelector.d.ts +7 -0
  193. package/src/View/DataSet/DataSetSelector.js +18 -0
  194. package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
  195. package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
  196. package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
  197. package/src/View/DataSet/DataSetViewPanel.js +58 -0
  198. package/src/View/Filter/ActiveFiltersPanel.js +1 -1
  199. package/src/View/Filter/FilterSummary.d.ts +5 -5
  200. package/src/View/Filter/FilterSummary.js +6 -5
  201. package/src/View/Filter/FilterViewPanel.d.ts +4 -4
  202. package/src/View/Filter/FilterViewPanel.js +11 -14
  203. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
  204. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +51 -22
  205. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  206. package/src/View/GridInfo/GridInfoPopup.js +1 -1
  207. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
  208. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  209. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -1
  210. package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
  211. package/src/View/SmartEdit/SmartEditPopup.js +3 -4
  212. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
  213. package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
  214. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  215. package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
  216. package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
  217. package/src/View/StatusBar/StatusBarPanel.js +5 -4
  218. package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
  219. package/src/View/UIHelper.d.ts +4 -4
  220. package/src/View/UIHelper.js +4 -4
  221. package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
  222. package/src/agGrid/ActionColumnRenderer.js +9 -6
  223. package/src/agGrid/Adaptable.d.ts +7 -2
  224. package/src/agGrid/Adaptable.js +217 -87
  225. package/src/agGrid/FilterWrapper.js +1 -1
  226. package/src/agGrid/agGridHelper.d.ts +6 -6
  227. package/src/agGrid/agGridHelper.js +34 -56
  228. package/src/agGrid/agGridMenuHelper.js +4 -1
  229. package/src/agGrid/rowEditIcons.d.ts +4 -0
  230. package/src/agGrid/rowEditIcons.js +9 -0
  231. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
  232. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  233. package/src/components/Datepicker/index.js +19 -18
  234. package/src/components/SelectList.d.ts +10 -0
  235. package/src/components/SelectList.js +9 -0
  236. package/src/components/WindowModal/WindowModal.d.ts +2 -0
  237. package/src/components/WindowModal/WindowModal.js +1 -1
  238. package/src/components/icons/{data-source.d.ts → data-set.d.ts} +0 -0
  239. package/src/components/icons/{data-source.js → data-set.js} +0 -0
  240. package/src/components/icons/index.js +2 -2
  241. package/src/metamodel/adaptable.metamodel.d.ts +242 -70
  242. package/src/metamodel/adaptable.metamodel.js +620 -376
  243. package/src/types.d.ts +19 -15
  244. package/version.d.ts +1 -1
  245. package/version.js +1 -1
  246. package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
  247. package/src/Api/DataSourceApi.d.ts +0 -58
  248. package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
  249. package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
  250. package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
  251. package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
  252. package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
  253. package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
  254. package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
  255. package/src/Strategy/DataSourceModule.d.ts +0 -20
  256. package/src/Strategy/DataSourceModule.js +0 -56
  257. package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
  258. package/src/View/Components/Forms/AdaptableForm.js +0 -21
  259. package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
  260. package/src/View/DataSource/DataSourceViewPanel.js +0 -69
  261. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
  262. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
  263. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
  264. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
  265. package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
  266. package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
@@ -33,7 +33,13 @@ class EntitlementService {
33
33
  const moduleEntitlements = entitlementOptions.moduleEntitlements;
34
34
  if (moduleEntitlements) {
35
35
  if (typeof moduleEntitlements === 'function') {
36
- const dynamicModuleEntitlement = moduleEntitlements(adaptableModule, adaptableOptions.userName, adaptableOptions.adaptableId, defaultAccessLevel);
36
+ const entitlementContext = {
37
+ adaptableModule,
38
+ userName: adaptableOptions.userName,
39
+ adaptableId: adaptableOptions.adaptableId,
40
+ defaultAccessLevel,
41
+ };
42
+ const dynamicModuleEntitlement = moduleEntitlements(entitlementContext);
37
43
  return dynamicModuleEntitlement !== null && dynamicModuleEntitlement !== void 0 ? dynamicModuleEntitlement : defaultAccessLevel;
38
44
  }
39
45
  else {
@@ -0,0 +1,8 @@
1
+ import { RowNode } from '@ag-grid-community/all-modules';
2
+ import { IAdaptableService } from './IAdaptableService';
3
+ import { AdaptableForm } from '../../../PredefinedConfig/Common/AdaptableForm';
4
+ import { CreateRowFormContext, EditRowFormContext } from '../../../AdaptableOptions/EditOptions';
5
+ export interface IRowEditService extends IAdaptableService {
6
+ buildRowEditForm(rowNode: RowNode): AdaptableForm<EditRowFormContext>;
7
+ buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateRowFormContext>;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -93,7 +93,7 @@ class ModuleService {
93
93
  return learnUrl + 'handbook-sorting';
94
94
  case 'Dashboard':
95
95
  return learnUrl + 'ui-dashboard';
96
- case 'DataSource':
96
+ case 'DataSet':
97
97
  return learnUrl + 'handbook-data-sources';
98
98
  case 'DataChangeHistory':
99
99
  return learnUrl + 'handbook-monitoring#data-change-history';
@@ -341,18 +341,17 @@ class ReportService {
341
341
  : // type === formattedValue
342
342
  this.adaptableApi.gridApi.getFormattedValueFromRawValue(columnId, cellRawValue);
343
343
  }
344
- computeCellExportValueFormat(columnType) {
344
+ computeCellExportValueFormat(columnDataType) {
345
345
  const exportOptions = this.adaptableApi.internalApi.getAdaptableOptions().exportOptions;
346
346
  if (exportOptions.exportFormatType === 'rawValue' ||
347
347
  exportOptions.exportFormatType === 'formattedValue') {
348
348
  return exportOptions.exportFormatType;
349
349
  }
350
350
  // format is customized based on column data type
351
- switch (columnType) {
351
+ switch (columnDataType) {
352
352
  case 'String':
353
353
  return exportOptions.exportFormatType.string;
354
354
  case 'Number':
355
- case 'NumberArray':
356
355
  return exportOptions.exportFormatType.number;
357
356
  case 'Date':
358
357
  return exportOptions.exportFormatType.date;
@@ -0,0 +1,25 @@
1
+ import { IRowEditService } from './Interface/IRowEditService';
2
+ import { RowNode } from '@ag-grid-community/all-modules';
3
+ import { AdaptableApi } from '../../Api/AdaptableApi';
4
+ import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
5
+ import { CreateRowFormContext, EditRowFormContext } from '../../AdaptableOptions/EditOptions';
6
+ export declare class RowEditService implements IRowEditService {
7
+ private adaptableApi;
8
+ private adaptableInstance;
9
+ private rowEditFormOptions;
10
+ constructor(adaptableApi: AdaptableApi);
11
+ buildRowEditForm(rowNode: RowNode): AdaptableForm<EditRowFormContext>;
12
+ buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateRowFormContext>;
13
+ private buildRowForm;
14
+ private getFormTitle;
15
+ private getFormDescription;
16
+ private buildFormParamContext;
17
+ private buildRowFormFields;
18
+ private buildRowFormButtons;
19
+ private isColumnEditable;
20
+ private buildFormField;
21
+ private getFormFieldLabel;
22
+ private buildFormFieldLabelContext;
23
+ private getFieldTypeFromColumnType;
24
+ private getFieldValueOptions;
25
+ }
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RowEditService = void 0;
4
+ class RowEditService {
5
+ constructor(adaptableApi) {
6
+ this.adaptableApi = adaptableApi;
7
+ this.adaptableInstance = this.adaptableApi.internalApi.getAdaptableInstance();
8
+ this.rowEditFormOptions =
9
+ this.adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.editOptions.rowFormOptions;
10
+ }
11
+ buildRowEditForm(rowNode) {
12
+ return this.buildRowForm('rowEdited', rowNode);
13
+ }
14
+ buildRowCreateForm(clonedRowNode) {
15
+ return this.buildRowForm('rowCreated', clonedRowNode);
16
+ }
17
+ buildRowForm(type, rowNode) {
18
+ const formFields = this.buildRowFormFields(type, rowNode);
19
+ const formButtons = this.buildRowFormButtons(type, rowNode);
20
+ const formTitle = this.getFormTitle(type, rowNode);
21
+ const formDescription = this.getFormDescription(type, rowNode);
22
+ const rowForm = {
23
+ title: formTitle,
24
+ description: formDescription,
25
+ fields: formFields,
26
+ buttons: formButtons,
27
+ };
28
+ return rowForm;
29
+ }
30
+ getFormTitle(type, rowNode) {
31
+ if (this.rowEditFormOptions.formTitle == undefined) {
32
+ return type === 'rowCreated' ? 'Create New Row' : 'Edit Row';
33
+ }
34
+ return typeof this.rowEditFormOptions.formTitle === 'function'
35
+ ? this.rowEditFormOptions.formTitle(this.buildFormParamContext(type, rowNode))
36
+ : this.rowEditFormOptions.formTitle;
37
+ }
38
+ getFormDescription(type, rowNode) {
39
+ return typeof this.rowEditFormOptions.formDescription === 'function'
40
+ ? this.rowEditFormOptions.formDescription(this.buildFormParamContext(type, rowNode))
41
+ : this.rowEditFormOptions.formDescription;
42
+ }
43
+ buildFormParamContext(type, rowNode) {
44
+ return {
45
+ rowNode,
46
+ adaptableApi: this.adaptableApi,
47
+ type: type,
48
+ };
49
+ }
50
+ buildRowFormFields(type, rowNode) {
51
+ const relevantColumns = this.adaptableApi.columnApi.getColumns().filter((column) => {
52
+ // if there is NO rowNode, do NOT display the non-editable fields as they will be empty
53
+ return !!rowNode || this.isColumnEditable(column, rowNode);
54
+ });
55
+ return relevantColumns.map((column) => this.buildFormField(type, column, rowNode));
56
+ }
57
+ buildRowFormButtons(type, rowNode) {
58
+ // 1. check if there are custom user provided buttons
59
+ if (Array.isArray(this.rowEditFormOptions.formButtons)) {
60
+ return this.rowEditFormOptions.formButtons;
61
+ }
62
+ // 2. else return the standard ones
63
+ const cancelButton = {
64
+ label: 'Cancel',
65
+ buttonStyle: {
66
+ variant: 'raised',
67
+ tone: 'neutral',
68
+ },
69
+ };
70
+ const saveButton = {
71
+ label: 'Save',
72
+ buttonStyle: {
73
+ variant: 'raised',
74
+ tone: 'success',
75
+ },
76
+ onClick: (button, context) => {
77
+ var _a, _b;
78
+ const eventInfo = type === 'rowCreated'
79
+ ? {
80
+ type: 'rowCreated',
81
+ formData: context.formData,
82
+ adaptableApi: context.adaptableApi,
83
+ clonedRowNode: rowNode,
84
+ }
85
+ : {
86
+ type: 'rowEdited',
87
+ formData: context.formData,
88
+ rowNode: rowNode,
89
+ adaptableApi: context.adaptableApi,
90
+ };
91
+ this.adaptableApi.eventApi.emit('RowFormSubmitted', eventInfo);
92
+ (_b = (_a = this.adaptableInstance.adaptableOptions.editOptions.rowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
93
+ },
94
+ };
95
+ return [cancelButton, saveButton];
96
+ }
97
+ isColumnEditable(column, rowNode) {
98
+ return rowNode
99
+ ? this.adaptableInstance.isCellEditable(rowNode, this.adaptableInstance.getAgGridColumnForColumnId(column.columnId))
100
+ : !column.readOnly;
101
+ }
102
+ buildFormField(type, column, rowNode) {
103
+ const isColumnEditable = this.isColumnEditable(column, rowNode);
104
+ const fieldValueOptions = this.getFieldValueOptions(column, rowNode);
105
+ const fieldType = isColumnEditable
106
+ ? !!(fieldValueOptions === null || fieldValueOptions === void 0 ? void 0 : fieldValueOptions.length)
107
+ ? 'select'
108
+ : this.getFieldTypeFromColumnType(column)
109
+ : 'textOutput';
110
+ const defaultValue = rowNode
111
+ ? isColumnEditable
112
+ ? this.adaptableInstance.getRawValueFromRowNode(rowNode, column.columnId)
113
+ : this.adaptableInstance.getDisplayValueFromRowNode(rowNode, column.columnId)
114
+ : null;
115
+ return {
116
+ label: this.getFormFieldLabel(type, column, rowNode),
117
+ name: column.columnId,
118
+ defaultValue,
119
+ fieldType,
120
+ options: fieldValueOptions,
121
+ };
122
+ }
123
+ getFormFieldLabel(type, column, rowNode) {
124
+ const customFieldLabel = typeof this.rowEditFormOptions.formFieldLabel === 'function'
125
+ ? this.rowEditFormOptions.formFieldLabel(this.buildFormFieldLabelContext(type, column, rowNode))
126
+ : undefined;
127
+ return customFieldLabel !== null && customFieldLabel !== void 0 ? customFieldLabel : column.friendlyName;
128
+ }
129
+ buildFormFieldLabelContext(type, column, rowNode) {
130
+ return {
131
+ rowNode,
132
+ column,
133
+ adaptableApi: this.adaptableApi,
134
+ type: type,
135
+ };
136
+ }
137
+ getFieldTypeFromColumnType(column) {
138
+ switch (column.dataType) {
139
+ case 'Boolean':
140
+ return 'checkbox';
141
+ case 'Date':
142
+ return 'date';
143
+ case 'Number':
144
+ return 'number';
145
+ default:
146
+ // everything else is a plain text input
147
+ return 'text';
148
+ }
149
+ }
150
+ getFieldValueOptions(column, rowNode) {
151
+ const editLookUpItem = this.adaptableApi.userInterfaceApi.getEditLookUpItemForColumn(column);
152
+ if (!editLookUpItem) {
153
+ return;
154
+ }
155
+ const gridCell = rowNode
156
+ ? this.adaptableInstance.getGridCellFromRowNode(rowNode, column.columnId)
157
+ : undefined;
158
+ const editLookUpValues = this.adaptableApi.internalApi.getEditLookUpValuesForColumn(editLookUpItem, column, gridCell);
159
+ return editLookUpValues === null || editLookUpValues === void 0 ? void 0 : editLookUpValues.map((value) => ({
160
+ value,
161
+ label: value,
162
+ }));
163
+ }
164
+ }
165
+ exports.RowEditService = RowEditService;
@@ -74,7 +74,7 @@ class TeamSharingService {
74
74
  return importInfo === null || importInfo === void 0 ? void 0 : importInfo.AddAction(Entity);
75
75
  }
76
76
  };
77
- const existingSharedEntities = this.adaptableApi.teamSharingApi.getSharedEntities();
77
+ const existingSharedEntities = this.adaptableApi.internalApi.getLocalTeamSharingEntities();
78
78
  const sharedEntityDependencyTree = this.getSharedEntityDependencyTree(importedSharedEntity, existingSharedEntities);
79
79
  const importSteps = sharedEntityDependencyTree.map((sharedEntity) => ({
80
80
  sharedEntity,
@@ -84,13 +84,13 @@ class TeamSharingService {
84
84
  }
85
85
  getSharedEntityLocalAndRemoteRevisions(changedAdaptableObjectId, remoteSharedEntities) {
86
86
  var _a, _b, _c, _d;
87
- const localRevision = (_b = (_a = this.adaptableApi.teamSharingApi.getTeamSharingState().ActiveSharedEntityMap[changedAdaptableObjectId]) === null || _a === void 0 ? void 0 : _a.Revision) !== null && _b !== void 0 ? _b : -1;
87
+ const localRevision = (_b = (_a = this.adaptableApi.internalApi.getState().TeamSharing.ActiveSharedEntityMap[changedAdaptableObjectId]) === null || _a === void 0 ? void 0 : _a.Revision) !== null && _b !== void 0 ? _b : -1;
88
88
  const remoteRevision = (_d = (_c = remoteSharedEntities.find((sharedEntity) => sharedEntity.Entity.Uuid === changedAdaptableObjectId)) === null || _c === void 0 ? void 0 : _c.Revision) !== null && _d !== void 0 ? _d : -1;
89
89
  return [localRevision, remoteRevision];
90
90
  }
91
91
  getStaleActiveSharedEntities() {
92
- const sharedEntities = this.adaptableApi.teamSharingApi.getSharedEntities();
93
- const activeEntities = this.adaptableApi.teamSharingApi.getTeamSharingState().ActiveSharedEntityMap;
92
+ const sharedEntities = this.adaptableApi.internalApi.getLocalTeamSharingEntities();
93
+ const activeEntities = this.adaptableApi.internalApi.getState().TeamSharing.ActiveSharedEntityMap;
94
94
  const result = {};
95
95
  sharedEntities
96
96
  .filter((sharedEntity) => sharedEntity.Type === 'Active')
@@ -12,6 +12,7 @@ export interface AdaptablePopoverProps extends React.ClassAttributes<AdaptablePo
12
12
  useButton?: boolean;
13
13
  tooltipText?: string;
14
14
  popoverMinWidth?: number;
15
+ popoverMaxWidth?: number;
15
16
  popupPadding?: number;
16
17
  }
17
18
  export declare class AdaptablePopover extends React.Component<AdaptablePopoverProps, {}> {
@@ -11,7 +11,7 @@ const OverlayTrigger_1 = tslib_1.__importDefault(require("../../components/Overl
11
11
  const rebass_1 = require("rebass");
12
12
  class AdaptablePopover extends React.Component {
13
13
  render() {
14
- var _a, _b;
14
+ var _a, _b, _c;
15
15
  let messageType = this.props.MessageType != null ? this.props.MessageType : 'Info';
16
16
  const showIcon = (_a = this.props.showIcon) !== null && _a !== void 0 ? _a : true;
17
17
  let useButton = this.props.useButton != null ? this.props.useButton : false;
@@ -23,11 +23,10 @@ class AdaptablePopover extends React.Component {
23
23
  margin: '0px',
24
24
  padding: '0px',
25
25
  minWidth: popoverMinWidth,
26
- maxWidth: 300,
26
+ maxWidth: (_b = this.props.popoverMaxWidth) !== null && _b !== void 0 ? _b : 300,
27
27
  } },
28
- title ? (React.createElement(rebass_1.Text, { fontSize: 2, padding: 2 },
29
- React.createElement("b", null, title))) : null,
30
- React.createElement(rebass_1.Box, { className: "ab-Popover__body", padding: (_b = this.props.popupPadding) !== null && _b !== void 0 ? _b : 2 }, this.props.bodyText.map((textOrHTML, index) => (React.createElement("span", { key: index }, textOrHTML))))));
28
+ title ? (React.createElement(rebass_1.Text, { fontSize: 4, padding: 2 }, title)) : null,
29
+ React.createElement(rebass_1.Box, { className: "ab-Popover__body", padding: (_c = this.props.popupPadding) !== null && _c !== void 0 ? _c : 2 }, this.props.bodyText.map((textOrHTML, index) => (React.createElement("span", { key: index }, textOrHTML))))));
31
30
  const icon = 'info'; // - think this is wrong - UIHelper.getGlyphByMessageType(messageType);
32
31
  const color = UIHelper_1.UIHelper.getColorByMessageType(messageType);
33
32
  const iconStyle = {
@@ -37,7 +36,7 @@ class AdaptablePopover extends React.Component {
37
36
  return (React.createElement(rebass_1.Flex, { alignItems: "center", className: this.props.className },
38
37
  React.createElement(OverlayTrigger_1.default, { showTriangle: true, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
39
38
  overflow: 'visible',
40
- }, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
39
+ }, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
41
40
  this.props.children,
42
41
  showIcon && React.createElement(icons_1.Icon, { name: icon }))))));
43
42
  }
@@ -33,7 +33,7 @@ class AdaptableView extends React.Component {
33
33
  , {
34
34
  // we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
35
35
  // instance is destroyed and re-created many times
36
- containerId: adaptableOptions.adaptableId, limit: adaptableOptions.notificationsOptions.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
36
+ containerId: adaptableOptions.adaptableId, enableMultiContainer: true, limit: adaptableOptions.notificationsOptions.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
37
37
  (watermark === null || watermark === void 0 ? void 0 : watermark.show) && React.createElement(License_1.LicenseWatermark, null, watermark === null || watermark === void 0 ? void 0 : watermark.text),
38
38
  React.createElement(WindowPopups_1.WindowPopups, null),
39
39
  React.createElement(FormPopups_1.FormPopups, null),
@@ -26,7 +26,7 @@ const QuickSearchViewPanel_1 = require("./QuickSearch/QuickSearchViewPanel");
26
26
  const SmartEditViewPanel_1 = require("./SmartEdit/SmartEditViewPanel");
27
27
  const SystemStatusViewPanel_1 = require("./SystemStatus/SystemStatusViewPanel");
28
28
  const ThemeViewPanel_1 = require("./Theme/ThemeViewPanel");
29
- const DataSourceViewPanel_1 = require("./DataSource/DataSourceViewPanel");
29
+ const DataSetViewPanel_1 = require("./DataSet/DataSetViewPanel");
30
30
  const DataChangeHistoryPopup_1 = require("./DataChangeHistory/DataChangeHistoryPopup");
31
31
  const DataChangeHistoryViewPanel_1 = require("./DataChangeHistory/DataChangeHistoryViewPanel");
32
32
  const StateManagementViewPanel_1 = require("./StateManagement/StateManagementViewPanel");
@@ -59,7 +59,7 @@ exports.AdaptableViewPanelFactory = new Map([
59
59
  [ModuleConstants.SmartEditModuleId, SmartEditViewPanel_1.SmartEditViewPanelControl],
60
60
  [ModuleConstants.SystemStatusModuleId, SystemStatusViewPanel_1.SystemStatusViewPanel],
61
61
  [ModuleConstants.ThemeModuleId, ThemeViewPanel_1.ThemeViewPanelControl],
62
- [ModuleConstants.DataSourceModuleId, DataSourceViewPanel_1.DataSourceViewPanelControl],
62
+ [ModuleConstants.DataSetModuleId, DataSetViewPanel_1.DataSetViewPanelControl],
63
63
  [ModuleConstants.DataChangeHistoryModuleId, DataChangeHistoryViewPanel_1.DataChangeHistoryViewPanelControl],
64
64
  [ModuleConstants.StateManagementModuleId, StateManagementViewPanel_1.StateManagementViewPanel],
65
65
  ]);
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const ActiveAlertsPanel: React.FunctionComponent;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActiveAlertsPanel = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const AdaptableContext_1 = require("../AdaptableContext");
7
+ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
+ const AdaptableObjectCompactList_1 = require("../Components/AdaptableObjectList/AdaptableObjectCompactList");
9
+ const react_redux_1 = require("react-redux");
10
+ exports.ActiveAlertsPanel = () => {
11
+ const adaptable = AdaptableContext_1.useAdaptable();
12
+ const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
13
+ const alerts = react_redux_1.useSelector((state) => state.System.AdaptableAlerts);
14
+ return React.createElement(AdaptableObjectCompactList_1.AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
15
+ };
@@ -5,16 +5,14 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const AdaptableContext_1 = require("../AdaptableContext");
8
- const AlertsPanel_1 = require("./AlertsPanel");
9
8
  const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
10
9
  const StatusBarPanel_1 = require("../StatusBar/StatusBarPanel");
11
- const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
12
10
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
11
+ const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
13
12
  const initialStyle = { color: '', background: '' };
14
13
  exports.AlertStatusPanel = () => {
15
14
  const adaptable = AdaptableContext_1.useAdaptable();
16
15
  const [style, setStyle] = React.useState(initialStyle);
17
- const dispatch = react_redux_1.useDispatch();
18
16
  const module = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
19
17
  const statusbarHighlightDuration = adaptable.adaptableOptions.alertOptions.statusbarHighlightDuration;
20
18
  /**
@@ -49,9 +47,6 @@ exports.AlertStatusPanel = () => {
49
47
  setStyle(initialStyle);
50
48
  }, statusbarHighlightDuration);
51
49
  }, [alerts]);
52
- // Dropdown content
53
- const handleDeleteAlert = React.useCallback((alert) => dispatch(SystemRedux.SystemAlertDelete(alert)), []);
54
- const handleDeleteAllAlerts = React.useCallback((alerts) => dispatch(SystemRedux.SystemAlertDeleteAll(alerts)), []);
55
- let alertsPanel = (React.createElement(AlertsPanel_1.AlertsPanel, { Alerts: alerts, ShowPanel: true, ShowHeader: false, onClearAlert: handleDeleteAlert, onClearAllAlerts: handleDeleteAllAlerts }));
56
- return (React.createElement(StatusBarPanel_1.StatusBarPanel, { "data-name": module.moduleInfo.ModuleName, color: style.color, backgroundColor: style.background, onAction: handleAction, icon: module.moduleInfo.Glyph, popover: alerts.length ? alertsPanel : null, content: text }));
50
+ let alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
51
+ return (React.createElement(StatusBarPanel_1.StatusBarPanel, { tooltip: module.moduleInfo.ModuleName, "data-name": module.moduleInfo.ModuleName, color: style.color, backgroundColor: style.background, onAction: handleAction, icon: module.moduleInfo.Glyph, popover: alerts.length ? alertsPanel : null, content: text }));
57
52
  };
@@ -6,10 +6,10 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
8
8
  const AdaptablePopover_1 = require("../AdaptablePopover");
9
- const AlertsPanel_1 = require("./AlertsPanel");
10
9
  const rebass_1 = require("rebass");
11
10
  const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
12
11
  const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
12
+ const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
13
13
  class AlertViewPanelComponent extends React.Component {
14
14
  constructor(props) {
15
15
  super(props);
@@ -31,7 +31,7 @@ class AlertViewPanelComponent extends React.Component {
31
31
  : this.props.AdaptableAlerts.length == 1
32
32
  ? '1 Alert'
33
33
  : this.props.AdaptableAlerts.length + ' Alerts';
34
- const alertsPanel = (React.createElement(AlertsPanel_1.AlertsPanel, { Alerts: this.props.AdaptableAlerts, ShowPanel: true, ShowHeader: false, onClearAlert: this.props.onDeleteAlert, onRender: () => this.setState({ ShowMessage: false }), onClearAllAlerts: this.props.onDeleteAllAlert }));
34
+ const alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
35
35
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
36
36
  return (React.createElement(rebass_1.Flex, { alignItems: "stretch", className: `ab-${elementType}__Alert__wrap` },
37
37
  React.createElement(rebass_1.Flex, { style: { borderRadius: 'var(--ab__border-radius)' }, className: `ab-${elementType}__Alert__text`, marginRight: 2, padding: 2, color: buttonTextColor, backgroundColor: buttonBackground, fontSize: 'var( --ab-font-size-2)', alignItems: "center" }, collapsedText),
@@ -53,7 +53,7 @@ exports.AlertPreview = (_a) => {
53
53
  return result;
54
54
  }, [alertDefinition]);
55
55
  return (React.createElement(rebass_1.Box, Object.assign({}, boxProps, { style: Object.assign({ border: '1px solid var(--ab-color-inputborder)' }, boxProps.style) }),
56
- React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview, api: api, onClose: () => { } })));
56
+ React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview, onClose: () => { } })));
57
57
  };
58
58
  exports.AlertDisplayWizardSection = (props) => {
59
59
  var _a, _b, _c, _d;
@@ -59,7 +59,7 @@ class BulkUpdateViewPanelComponent extends React.Component {
59
59
  !shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(ButtonApply_1.ButtonApply, { marginLeft: 2, className: `ab-${elementType}__BulkUpdate__apply`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
60
60
  (this.props.PreviewInfo != null &&
61
61
  this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Update')),
62
- !shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
62
+ !shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
63
63
  }
64
64
  onColumnValueSelectedChanged(selectedColumnValue) {
65
65
  this.props.onBulkUpdateValueChange(selectedColumnValue);
@@ -70,7 +70,7 @@ exports.CalculatedColumnExpressionWizardSection = (props) => {
70
70
  props.onChange(Object.assign(Object.assign({}, data), { Query: calculatedColumnQuery, CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType, Pivotable,
71
71
  Aggregatable }) }));
72
72
  };
73
- return (React.createElement(Tabs_1.Tabs, { onValueChange: setType, value: selectedTab, p: 2, style: { flex: 1, overflow: 'auto' } },
73
+ return (React.createElement(Tabs_1.Tabs, { onValueChange: setType, value: selectedTab, p: 2, style: { height: '100%', flex: 1, overflow: 'auto' } },
74
74
  React.createElement(QueryTab, { value: "ScalarExpression", type: type, label: "Scalar" }),
75
75
  React.createElement(Tabs_1.Tabs.Content, { value: 'ScalarExpression' },
76
76
  React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'scalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.ScalarExpression, onChange: (ScalarExpression) => setCalculatedColumnExpression({ ScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), isFullExpression: true, api: api })),
@@ -73,7 +73,7 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
73
73
  const ColumnName = data.FriendlyName;
74
74
  const ColumnId = data.ColumnId;
75
75
  let { DataType: dataType } = (_a = data.CalculatedColumnSettings) !== null && _a !== void 0 ? _a : {};
76
- const { Width, ShowToolTip, HeaderToolTip } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
76
+ const { Width, ShowToolTip, HeaderToolTip, ExternallyEvaluatedExpression } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
77
77
  const handleSpecialColumnSettingsChange = (settings) => {
78
78
  props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), settings) }));
79
79
  };
@@ -118,7 +118,14 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
118
118
  }) })),
119
119
  ' ',
120
120
  React.createElement(FormLayout_1.FormRow, { label: "" },
121
- React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")))))),
121
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")),
122
+ React.createElement(FormLayout_1.FormRow, { label: "" },
123
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "column-external-expression-evaluation", onChange: (checked) => handleSpecialColumnSettingsChange({ ExternallyEvaluatedExpression: checked }), checked: ExternallyEvaluatedExpression }, "Suppress Expression Evaluation"),
124
+ ExternallyEvaluatedExpression && (React.createElement(rebass_1.Box, { "data-name": "note-external-expression-evaluation", p: 2, style: {
125
+ background: 'var(--ab-color-primary)',
126
+ borderRadius: 'var(--ab__border-radius)',
127
+ whiteSpace: 'pre-wrap',
128
+ } }, "The column value is loaded from the row data property with the same name as the ColumnId"))))))),
122
129
  ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
123
130
  React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
124
131
  };
@@ -12,8 +12,8 @@ const columnsMap = new Map([
12
12
  const tableDOMProps = {
13
13
  style: {
14
14
  height: '100%',
15
- minWidth: '15rem',
16
- minHeight: '20rem',
15
+ minWidth: '20rem',
16
+ minHeight: 380,
17
17
  },
18
18
  };
19
19
  class CellSummaryDetails extends React.Component {
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { CellSummmary } from '../../PredefinedConfig/Common/CellSummary';
3
- export interface CellSummaryPopoverProps extends React.ClassAttributes<CellSummaryPopover> {
3
+ export interface CellSummaryPopoverProps {
4
4
  CellSummary: CellSummmary;
5
5
  }
6
- export declare class CellSummaryPopover extends React.Component<CellSummaryPopoverProps, {}> {
7
- render(): any;
8
- }
6
+ export declare const CellSummaryPopover: React.FunctionComponent<CellSummaryPopoverProps>;
@@ -4,9 +4,6 @@ exports.CellSummaryPopover = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const CellSummaryDetails_1 = require("./CellSummaryDetails");
7
- class CellSummaryPopover extends React.Component {
8
- render() {
9
- return React.createElement(CellSummaryDetails_1.CellSummaryDetails, { CellSummary: this.props.CellSummary });
10
- }
11
- }
12
- exports.CellSummaryPopover = CellSummaryPopover;
7
+ exports.CellSummaryPopover = (props) => {
8
+ return React.createElement(CellSummaryDetails_1.CellSummaryDetails, { CellSummary: props.CellSummary });
9
+ };
@@ -9,6 +9,14 @@ const CellSummaryDetails_1 = require("./CellSummaryDetails");
9
9
  const PanelWithButton_1 = require("../Components/Panels/PanelWithButton");
10
10
  class CellSummaryPopupComponent extends React.Component {
11
11
  componentDidMount() {
12
+ var _a, _b, _c;
13
+ if (((_a = this.props.popupParams) === null || _a === void 0 ? void 0 : _a.source) === 'ColumnMenu' && ((_b = this.props.popupParams) === null || _b === void 0 ? void 0 : _b.column)) {
14
+ // if the summary was requested from the column menu, we need to select the entire column
15
+ // afterwards, we will go on with the cell summary logic, as that will evaluate the current(column) cell selection
16
+ this.props.api.columnApi.selectColumn((_c = this.props.popupParams) === null || _c === void 0 ? void 0 : _c.column.columnId);
17
+ // we also need to update the internal state of the selected cells
18
+ this.props.api.internalApi.getAdaptableInstance().setSelectedCells();
19
+ }
12
20
  this.props.onCreateCellSummary();
13
21
  }
14
22
  render() {
@@ -11,5 +11,5 @@ exports.CellSummaryStatusBarSubPanelPopover = () => {
11
11
  return cellSummary && cellSummary.Count ? (summary) : (
12
12
  // the extra wrapper is added because the empty text is rendered
13
13
  // inside a EmptyContent, hat has position absolute
14
- React.createElement("div", { style: { position: 'relative', width: 200, height: 80 } }, summary));
14
+ React.createElement("div", { style: { position: 'relative', width: '100%', height: 80 } }, summary));
15
15
  };
@@ -14,7 +14,7 @@ exports.CellSummaryStatusPanel = () => {
14
14
  const adaptable = AdaptableContext_1.useAdaptable();
15
15
  const dispatch = react_redux_1.useDispatch();
16
16
  const cellSummaryApi = adaptable.api.cellSummaryApi;
17
- const cellSummaryModule = adaptable.ModuleService.getModuleById(ModuleConstants.CellSummaryModuleId);
17
+ const module = adaptable.ModuleService.getModuleById(ModuleConstants.CellSummaryModuleId);
18
18
  const text = `${cellSummaryApi.getCurrentCellSummaryOperation()}: ${(_a = cellSummaryApi.getCurrentCellSummaryOperationValue()) !== null && _a !== void 0 ? _a : 'N/A'}`;
19
19
  const onAction = () => {
20
20
  adaptable.api.cellSummaryApi.showCellSummaryPopup();
@@ -32,5 +32,5 @@ exports.CellSummaryStatusPanel = () => {
32
32
  checkSelectedCells();
33
33
  return () => cleanupEvent === null || cleanupEvent === void 0 ? void 0 : cleanupEvent();
34
34
  }, []);
35
- return (React.createElement(StatusBarPanel_1.StatusBarPanel, { icon: cellSummaryModule.moduleInfo.Glyph, onAction: onAction, content: text, popover: CellSummaryStatusBarSubPanelPopover_1.CellSummaryStatusBarSubPanelPopover }));
35
+ return (React.createElement(StatusBarPanel_1.StatusBarPanel, { tooltip: module.moduleInfo.ModuleName, "data-name": module.moduleInfo.ModuleName, icon: module.moduleInfo.Glyph, onAction: onAction, content: text, popover: CellSummaryStatusBarSubPanelPopover_1.CellSummaryStatusBarSubPanelPopover, popoverMinWidth: 360 }));
36
36
  };
@@ -67,7 +67,7 @@ class CellSummaryViewPanelComponent extends React.Component {
67
67
  React.createElement(DropdownButton_1.default, { style: { fontSize: 'small', width: '100%' }, marginRight: 2, columns: ['label'], className: `ab-${elementType}__CellSummary__select`, items: [...operationMenuItems, ...operationDefinitions], disabled: shouldDisable, variant: "outlined", tone: 'neutral' }, this.props.CellSummaryOperation)),
68
68
  React.createElement(rebass_1.Flex, { alignItems: "center" }, React.createElement(React.Fragment, null,
69
69
  renderOperationValue(),
70
- this.props.CellSummary != null && this.props.CellSummary.Count > 0 && (React.createElement(AdaptablePopover_1.AdaptablePopover, { className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur" }))))));
70
+ this.props.CellSummary != null && this.props.CellSummary.Count > 0 && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur" }))))));
71
71
  }
72
72
  checkSelectedCells() {
73
73
  this.props.onCreateCellSummary();