@adaptabletools/adaptable 11.0.0-canary.1 → 11.0.0-canary.5

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 (210) hide show
  1. package/base.css +138 -68
  2. package/bundle.cjs.js +97 -93
  3. package/index.css +140 -68
  4. package/package.json +33 -33
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
  8. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +10 -1
  10. package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
  11. package/src/AdaptableOptions/AlertOptions.js +2 -0
  12. package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
  13. package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
  15. package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
  16. package/src/AdaptableOptions/QueryLanguageOptions.d.ts +0 -4
  17. package/src/AdaptableOptions/StateOptions.d.ts +2 -1
  18. package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
  19. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -3
  20. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  21. package/src/Api/AdaptableApi.d.ts +1 -0
  22. package/src/Api/AlertApi.d.ts +2 -3
  23. package/src/Api/EventApi.d.ts +8 -3
  24. package/src/Api/Events/GridDataChanged.d.ts +4 -2
  25. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
  26. package/src/Api/FreeTextColumnApi.d.ts +0 -12
  27. package/src/Api/GridApi.d.ts +5 -4
  28. package/src/Api/IPushPullApi.d.ts +1 -1
  29. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
  30. package/src/Api/Implementation/AlertApiImpl.js +15 -9
  31. package/src/Api/Implementation/ApiBase.d.ts +2 -0
  32. package/src/Api/Implementation/ApiBase.js +3 -0
  33. package/src/Api/Implementation/DashboardApiImpl.js +1 -1
  34. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -4
  35. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
  36. package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
  37. package/src/Api/Implementation/GridApiImpl.d.ts +5 -4
  38. package/src/Api/Implementation/GridApiImpl.js +4 -0
  39. package/src/Api/Implementation/InternalApiImpl.js +2 -2
  40. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  41. package/src/Api/Implementation/LayoutApiImpl.js +12 -1
  42. package/src/Api/Implementation/QueryApiImpl.js +4 -1
  43. package/src/Api/Implementation/QueryLanguageApiImpl.js +4 -5
  44. package/src/Api/LayoutApi.d.ts +7 -0
  45. package/src/Api/OpenFinApi.d.ts +5 -0
  46. package/src/Api/PluginsApi.d.ts +29 -0
  47. package/src/Api/UserInterfaceApi.d.ts +5 -2
  48. package/src/PredefinedConfig/AlertState.d.ts +2 -4
  49. package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -1
  50. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
  51. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
  52. package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
  53. package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
  54. package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
  55. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  56. package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
  57. package/src/PredefinedConfig/FlashingCellState.d.ts +5 -2
  58. package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
  59. package/src/PredefinedConfig/LayoutState.d.ts +0 -2
  60. package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
  61. package/src/PredefinedConfig/SystemState.d.ts +2 -1
  62. package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
  63. package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
  64. package/src/Redux/ActionsReducers/GridRedux.js +3 -1
  65. package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
  66. package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
  67. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
  68. package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
  69. package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
  70. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  71. package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
  72. package/src/Redux/Store/AdaptableStore.js +18 -6
  73. package/src/Strategy/AlertModule.js +5 -4
  74. package/src/Strategy/ConditionalStyleModule.js +4 -0
  75. package/src/Strategy/DataChangeHistoryModule.js +1 -1
  76. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  77. package/src/Strategy/FlashingCellModule.js +34 -18
  78. package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
  79. package/src/Strategy/FreeTextColumnModule.js +10 -0
  80. package/src/Strategy/LayoutModule.js +1 -6
  81. package/src/Strategy/TeamSharingModule.js +1 -1
  82. package/src/Strategy/ToolPanelModule.js +5 -3
  83. package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +1 -1
  84. package/src/Strategy/Utilities/getFlashingTargetViewItems.js +3 -1
  85. package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
  86. package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
  87. package/src/Strategy/Utilities/getRuleViewItems.js +0 -1
  88. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -4
  89. package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
  90. package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
  91. package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
  92. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  93. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
  94. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
  95. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  96. package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
  97. package/src/Utilities/Helpers/CalendarHelper.js +220 -55
  98. package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
  99. package/src/Utilities/ObjectFactory.js +5 -2
  100. package/src/Utilities/Services/DataService.js +6 -1
  101. package/src/Utilities/Services/LicenseService.js +1 -1
  102. package/src/Utilities/Services/QueryLanguageService.js +16 -11
  103. package/src/Utilities/Services/ReportService.js +7 -3
  104. package/src/Utilities/Services/TeamSharingService.js +5 -3
  105. package/src/View/AdaptablePopover/index.js +6 -1
  106. package/src/View/AdaptableView.js +1 -1
  107. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
  108. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -2
  109. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
  110. package/src/View/AdaptableWizardView/helper.js +3 -1
  111. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
  112. package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
  113. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
  114. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -3
  115. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +1 -3
  116. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +15 -4
  117. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
  118. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
  119. package/src/View/Components/FilterForm/FilterForm.js +0 -2
  120. package/src/View/Components/FilterForm/QuickFilterForm.js +8 -7
  121. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  122. package/src/View/Components/ModuleValueSelector/index.js +1 -1
  123. package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
  124. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
  125. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -87
  126. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
  127. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
  128. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
  129. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
  130. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
  131. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
  132. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
  133. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
  134. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
  135. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
  136. package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
  137. package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
  138. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
  139. package/src/View/Components/ScopeComponent.js +4 -1
  140. package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
  141. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  142. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +6 -2
  143. package/src/View/Components/ToolPanel/ToolPanelPopup.js +7 -5
  144. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
  145. package/src/View/Components/ValueSelector/index.d.ts +2 -1
  146. package/src/View/Components/ValueSelector/index.js +5 -5
  147. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
  148. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
  149. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +17 -5
  150. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
  151. package/src/View/CustomSort/Wizard/CustomSortWizard.js +16 -4
  152. package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
  153. package/src/View/Dashboard/Dashboard.js +5 -5
  154. package/src/View/Dashboard/DashboardPopup.js +8 -6
  155. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
  156. package/src/View/Export/Wizard/NewReportWizard.js +13 -3
  157. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
  158. package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
  159. package/src/View/Filter/FilterViewPanel.d.ts +1 -4
  160. package/src/View/Filter/FilterViewPanel.js +1 -3
  161. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
  162. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
  163. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -5
  164. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  165. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  166. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -5
  167. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
  168. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +12 -5
  169. package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
  170. package/src/View/Layout/Wizard/LayoutEditor/index.js +5 -1
  171. package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
  172. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
  173. package/src/View/Query/ExpandedQueryPopup.js +9 -2
  174. package/src/View/Query/QueryViewPanel.js +15 -10
  175. package/src/View/Query/Wizard/NamedQueryWizard.js +3 -1
  176. package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
  177. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  178. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
  179. package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
  180. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  181. package/src/View/UIHelper.js +4 -1
  182. package/src/View/Wizard/AdaptableWizard.js +13 -4
  183. package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
  184. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -2
  185. package/src/agGrid/Adaptable.d.ts +2 -5
  186. package/src/agGrid/Adaptable.js +126 -73
  187. package/src/agGrid/agGridHelper.js +2 -3
  188. package/src/agGrid/agGridMenuHelper.js +5 -9
  189. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  190. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  191. package/src/components/ApplicationIcon.d.ts +1 -0
  192. package/src/components/ApplicationIcon.js +2 -2
  193. package/src/components/Dashboard/Dashboard.js +4 -1
  194. package/src/components/Dashboard/DashboardManager.d.ts +5 -3
  195. package/src/components/Dashboard/DashboardManager.js +33 -27
  196. package/src/components/Dropdown/index.js +8 -1
  197. package/src/components/DropdownButton/renderItem.js +1 -1
  198. package/src/components/ExpressionEditor/EditorInputReactive.js +3 -1
  199. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +4 -1
  200. package/src/components/ExpressionEditor/index.js +9 -2
  201. package/src/components/FormLayout/index.js +1 -1
  202. package/src/components/OverlayTrigger/Overlay.js +1 -1
  203. package/src/components/SizedContainer/index.js +7 -1
  204. package/src/components/WindowModal/WindowModal.js +4 -1
  205. package/src/metamodel/adaptable.metamodel.d.ts +64 -24
  206. package/src/metamodel/adaptable.metamodel.js +187 -99
  207. package/src/types.d.ts +4 -2
  208. package/themes/dark.css +4 -4
  209. package/version.d.ts +1 -1
  210. package/version.js +1 -1
@@ -13,14 +13,26 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
13
13
  const react_redux_1 = require("react-redux");
14
14
  const CustomSortRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CustomSortRedux"));
15
15
  exports.CustomSortWizard = (props) => {
16
+ var _a, _b;
17
+ let data = props.data;
18
+ const allCustomSorts = react_redux_1.useSelector((state) => { var _a; return (_a = state.CustomSort) === null || _a === void 0 ? void 0 : _a.CustomSorts; });
19
+ if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit' && ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.column)) {
20
+ data = allCustomSorts.find((x) => { var _a; return x.ColumnId == ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.column.columnId); });
21
+ }
16
22
  const [customSort, setCustomSort] = react_1.useState(() => {
17
- return props.data
18
- ? Helper_1.cloneObject(props.data)
19
- : ObjectFactory_1.default.CreateEmptyCustomSort();
23
+ var _a, _b;
24
+ if (data) {
25
+ return Helper_1.cloneObject(data);
26
+ }
27
+ const newData = ObjectFactory_1.default.CreateEmptyCustomSort();
28
+ if ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.column) {
29
+ newData.ColumnId = (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.column.columnId;
30
+ }
31
+ return newData;
20
32
  });
21
33
  const dispatch = react_redux_1.useDispatch();
22
34
  const handleFinish = () => {
23
- if (props.data) {
35
+ if (data) {
24
36
  dispatch(CustomSortRedux.CustomSortEdit(customSort));
25
37
  }
26
38
  else {
@@ -17,7 +17,11 @@ exports.CustomToolbarWrapper = (props) => {
17
17
  const node = contentsDivRef.current;
18
18
  const adaptableApi = api;
19
19
  if (props.customToolbar.render) {
20
- const html = props.customToolbar.render({ visible: true, node, adaptableApi });
20
+ const html = props.customToolbar.render({
21
+ visible: true,
22
+ node,
23
+ adaptableApi,
24
+ });
21
25
  setContentsHTML(html);
22
26
  }
23
27
  else if (props.customToolbar.frameworkComponent) {
@@ -13,7 +13,7 @@ const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
13
13
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
14
14
  const rebass_1 = require("rebass");
15
15
  const Dashboard_1 = require("../../components/Dashboard");
16
- const kebabCase_1 = tslib_1.__importDefault(require("lodash-es/kebabCase"));
16
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
17
17
  const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
18
18
  const useQuickSearchDebounced_1 = require("../QuickSearch/useQuickSearchDebounced");
19
19
  const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
@@ -69,8 +69,7 @@ const DashboardComponent = (props) => {
69
69
  const renderModuleButtons = () => {
70
70
  let shortcutsArray = props.DashboardState.ModuleButtons;
71
71
  let shortcuts = null;
72
- const alwaysShowInDashboard = props.api.internalApi.getAdaptableOptions().settingsPanelOptions
73
- .alwaysShowInDashboard;
72
+ const alwaysShowInDashboard = props.api.internalApi.getAdaptableOptions().settingsPanelOptions.alwaysShowInDashboard;
74
73
  const shouldAddSettingsPanel = alwaysShowInDashboard &&
75
74
  !props.api.internalApi.getEntitlementService().isModuleHiddenEntitlement('SettingsPanel');
76
75
  if (shouldAddSettingsPanel && !shortcutsArray.includes('SettingsPanel')) {
@@ -90,7 +89,8 @@ const DashboardComponent = (props) => {
90
89
  };
91
90
  const renderDashboardButtons = () => {
92
91
  var _a;
93
- let dashboardButtonsArray = (_a = props.api.dashboardApi.getCustomDashboardButtons()) === null || _a === void 0 ? void 0 : _a.filter((c) => c);
92
+ let dashboardButtonsArray = (_a = props.api.dashboardApi
93
+ .getCustomDashboardButtons()) === null || _a === void 0 ? void 0 : _a.filter((c) => c);
94
94
  let customDashboardButtons = null;
95
95
  if (dashboardButtonsArray) {
96
96
  customDashboardButtons = dashboardButtonsArray.map((button) => {
@@ -150,7 +150,7 @@ const DashboardComponent = (props) => {
150
150
  props.onSetFloatingPosition(FloatingPositionCallback);
151
151
  }
152
152
  }, left: React.createElement(React.Fragment, null,
153
- React.createElement(ApplicationIcon_1.ApplicationIcon, { icon: props.api.internalApi.getAdaptableOptions().userInterfaceOptions.applicationIcon }),
153
+ React.createElement(ApplicationIcon_1.ApplicationIcon, { className: "ab-Dashboard__application-icon", icon: props.api.internalApi.getAdaptableOptions().userInterfaceOptions.applicationIcon }),
154
154
  dashboardOptions.buttonsLocation === 'left' && renderModuleButtons()), right: React.createElement(React.Fragment, null,
155
155
  renderDashboardButtons(),
156
156
  dashboardOptions.buttonsLocation === 'right' && renderModuleButtons(),
@@ -58,11 +58,11 @@ class DashboardPopupComponent extends React.Component {
58
58
  });
59
59
  const allModuleButtons = this.props.GridState.ModuleDropdownMenuItems.map((x) => x.module);
60
60
  const baseClassName = 'ab-Dashboard-Popup';
61
- // const isDisabled = this.props.Entitlements
62
61
  const dashboardAccessLevel = this.props.api.internalApi
63
62
  .getEntitlementService()
64
63
  .getEntitlementAccessLevelForModule('Dashboard');
65
- const areDashboardSettingsEnabled = dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly';
64
+ const areDashboardSettingsVisible = dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly';
65
+ const isDashboardDisabled = dashboardAccessLevel === 'ReadOnly';
66
66
  const isModuleCheckboxDisabled = (module) => {
67
67
  if (module === 'SettingsPanel') {
68
68
  return this.props.api.internalApi.getAdaptableOptions().settingsPanelOptions
@@ -72,7 +72,7 @@ class DashboardPopupComponent extends React.Component {
72
72
  };
73
73
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph },
74
74
  React.createElement(rebass_1.Flex, { flex: 1, height: "100%", flexDirection: "column" },
75
- areDashboardSettingsEnabled && (React.createElement(Panel_1.default, { header: 'Dashboard Settings', style: { height: 'auto', overflow: 'visible' }, variant: "default", borderRadius: "none", marginLeft: 2, marginRight: 2 },
75
+ areDashboardSettingsVisible && (React.createElement(Panel_1.default, { header: 'Dashboard Settings', style: { height: 'auto', overflow: 'visible' }, variant: "default", borderRadius: "none", marginLeft: 2, marginRight: 2 },
76
76
  React.createElement(rebass_1.Flex, null,
77
77
  React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
78
78
  ' ',
@@ -84,13 +84,15 @@ class DashboardPopupComponent extends React.Component {
84
84
  React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Toolbars"),
85
85
  React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons")),
86
86
  React.createElement(rebass_1.Box, { className: `${baseClassName}__Module-Selector`, style: { minHeight: 0, flex: '1 1 0' }, padding: 2 },
87
- this.state.DashboardConfigView == DashboardConfigView.Toolbars && (React.createElement(DashboardManager_1.default, { availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: this.props.onDashboardSetTabs, api: this.props.api })),
88
- this.state.DashboardConfigView == DashboardConfigView.Buttons && (React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', isDisabled: isModuleCheckboxDisabled, xSelectedLabel: () => `Visible Module Buttons:`, onChange: (selectedValues) => this.props.onDashboardSetModuleButtons(selectedValues) })))))));
87
+ this.state.DashboardConfigView == DashboardConfigView.Toolbars && (React.createElement(DashboardManager_1.default, { disabled: isDashboardDisabled, availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: this.props.onDashboardSetTabs, api: this.props.api })),
88
+ this.state.DashboardConfigView == DashboardConfigView.Buttons && (React.createElement(ModuleValueSelector_1.ModuleValueSelector, { disabled: isDashboardDisabled, options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', isOptionDisabled: isModuleCheckboxDisabled, xSelectedLabel: () => `Visible Module Buttons:`, onChange: (selectedValues) => this.props.onDashboardSetModuleButtons(selectedValues) })))))));
89
89
  }
90
90
  onDashboardConfigViewChanged(event) {
91
91
  let e = event.target;
92
92
  let dashboardConfigView = e.value;
93
- this.setState({ DashboardConfigView: dashboardConfigView });
93
+ this.setState({
94
+ DashboardConfigView: dashboardConfigView,
95
+ });
94
96
  }
95
97
  }
96
98
  function mapStateToProps(state, ownProps) {
@@ -189,7 +189,8 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
189
189
  const layoutColumns = options.predefinedConfig.Layout.Layouts[0].Columns;
190
190
  if (layoutColumns.includes('undoActionColumn')) {
191
191
  // remove action column from layout
192
- options.predefinedConfig.Layout.Layouts[0].Columns = layoutColumns.filter((columnId) => columnId !== 'undoActionColumn');
192
+ options.predefinedConfig.Layout.Layouts[0].Columns =
193
+ layoutColumns.filter((columnId) => columnId !== 'undoActionColumn');
193
194
  }
194
195
  }
195
196
  return options;
@@ -14,13 +14,23 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
14
14
  const react_redux_1 = require("react-redux");
15
15
  const ExportRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ExportRedux"));
16
16
  exports.NewReportWizard = (props) => {
17
+ var _a, _b;
18
+ const isEdit = ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) ? props.popupParams.action === 'Edit'
19
+ : Boolean(props.data);
20
+ const currentReport = react_redux_1.useSelector((state) => {
21
+ if (!isEdit) {
22
+ return;
23
+ }
24
+ return state.Export.Reports.find((report) => report.Name === state.Export.CurrentReport);
25
+ });
26
+ const data = (_b = props.data) !== null && _b !== void 0 ? _b : currentReport;
17
27
  const [report, setReport] = react_1.useState(() => {
18
- return props.data ? Helper_1.cloneObject(props.data) : ObjectFactory_1.default.CreateEmptyReport();
28
+ return data ? Helper_1.cloneObject(data) : ObjectFactory_1.default.CreateEmptyReport();
19
29
  });
20
30
  const dispatch = react_redux_1.useDispatch();
21
31
  const handleFinish = () => {
22
- if (props.data) {
23
- dispatch(ExportRedux.ReportDelete(report));
32
+ if (isEdit) {
33
+ dispatch(ExportRedux.ReportEdit(report));
24
34
  }
25
35
  else {
26
36
  dispatch(ExportRedux.ReportAdd(report));
@@ -44,7 +44,9 @@ class ReportColumnTypeWizard extends React.Component {
44
44
  }, () => this.props.updateGoBackState());
45
45
  }
46
46
  else {
47
- this.setState({ ReportColumnScope: Enums_1.ReportColumnScope.ScopeColumns }, () => this.props.updateGoBackState());
47
+ this.setState({
48
+ ReportColumnScope: Enums_1.ReportColumnScope.ScopeColumns,
49
+ }, () => this.props.updateGoBackState());
48
50
  }
49
51
  }
50
52
  canNext() {
@@ -44,7 +44,9 @@ class ReportRowTypeWizard extends React.Component {
44
44
  }, () => this.props.updateGoBackState());
45
45
  }
46
46
  else {
47
- this.setState({ ReportRowScope: Enums_1.ReportRowScope.ExpressionRows }, () => this.props.updateGoBackState());
47
+ this.setState({
48
+ ReportRowScope: Enums_1.ReportRowScope.ExpressionRows,
49
+ }, () => this.props.updateGoBackState());
48
50
  }
49
51
  }
50
52
  canNext() {
@@ -1,13 +1,10 @@
1
1
  import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
2
- import { UIPrompt } from '../../Utilities/Interface/MessagePopups';
3
- import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
4
2
  import * as FilterRedux from '../../Redux/ActionsReducers/FilterRedux';
5
3
  import { ColumnFilter } from '../../PredefinedConfig/FilterState';
6
4
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
7
5
  import { Entitlement } from '../../PredefinedConfig/Common/Entitlement';
8
6
  import * as React from 'react';
9
7
  export interface FilterViewPanelComponentProps extends ViewPanelProps {
10
- onShowPrompt: (prompt: UIPrompt) => PopupRedux.PopupShowPromptAction;
11
8
  onHideQuickFilterBar: () => FilterRedux.QuickFilterBarHideAction;
12
9
  onShowQuickFilterBar: () => FilterRedux.QuickFilterBarShowAction;
13
10
  ColumnFilters: ColumnFilter[];
@@ -21,5 +18,5 @@ declare class FilterViewPanelComponent extends React.Component<FilterViewPanelCo
21
18
  private onClearFilters;
22
19
  private onClearColumnFilter;
23
20
  }
24
- export declare const FilterViewPanelControl: import("react-redux").ConnectedComponent<typeof FilterViewPanelComponent, any>;
21
+ export declare const FilterViewPanelControl: import("react-redux").ConnectedComponent<typeof FilterViewPanelComponent, Pick<React.ClassAttributes<FilterViewPanelComponent> & FilterViewPanelComponentProps, "ref" | "key">>;
25
22
  export {};
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FilterViewPanelControl = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
6
5
  const FilterRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FilterRedux"));
7
6
  const React = tslib_1.__importStar(require("react"));
8
7
  const ActiveFiltersPanel_1 = require("./ActiveFiltersPanel");
@@ -37,7 +36,7 @@ class FilterViewPanelComponent extends React.Component {
37
36
  this.props.api.filterApi.clearColumnFilterByColumn(columnFilter.ColumnId);
38
37
  }
39
38
  }
40
- function mapStateToProps(state, ownProps) {
39
+ function mapStateToProps(state) {
41
40
  return {
42
41
  ColumnFilters: state.Filter.ColumnFilters,
43
42
  IsQuickFilterVisible: state.Filter.IsQuickFilterVisible,
@@ -45,7 +44,6 @@ function mapStateToProps(state, ownProps) {
45
44
  }
46
45
  function mapDispatchToProps(dispatch) {
47
46
  return {
48
- onShowPrompt: (prompt) => dispatch(PopupRedux.PopupShowPrompt(prompt)),
49
47
  onHideQuickFilterBar: () => dispatch(FilterRedux.QuickFilterBarHide()),
50
48
  onShowQuickFilterBar: () => dispatch(FilterRedux.QuickFilterBarShow()),
51
49
  };
@@ -4,10 +4,6 @@ exports.FlashingAlertRulesWizardSection = exports.renderFlashingAlertRulesSummar
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
7
- const Tabs_1 = require("../../../components/Tabs");
8
- const rebass_1 = require("rebass");
9
- const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
10
- const BaseAlertRulesWizardSection_1 = require("../../Alert/Wizard/BaseAlertRulesWizardSection");
11
7
  const CodeBlock_1 = require("../../../components/CodeBlock");
12
8
  const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
13
9
  exports.renderFlashingAlertRulesSummary = (flashingAlert) => {
@@ -32,26 +28,21 @@ exports.renderFlashingAlertRulesSummary = (flashingAlert) => {
32
28
  } }));
33
29
  };
34
30
  exports.FlashingAlertRulesWizardSection = (props) => {
35
- var _a;
36
- const { data: flashingAlert, api } = OnePageAdaptableWizard_1.useOnePageWizardContext();
37
- const flashTarget = (_a = flashingAlert.FlashTarget) !== null && _a !== void 0 ? _a : api.flashingCellApi.getFlashingCellFlashTarget(flashingAlert);
38
- return (React.createElement(BaseAlertRulesWizardSection_1.BaseAlertRulesWizardSection, { onChange: props.onChange, wholeRowScope: false, module: "flashingCell" },
39
- React.createElement(rebass_1.Text, { fontSize: 2, mb: 2, pl: 2, pt: 2 }, "Flash target"),
40
- React.createElement(Tabs_1.Tabs, { value: flashTarget !== null && flashTarget !== void 0 ? flashTarget : 'row', pl: 2, onValueChange: (flashTarget) => {
41
- props.onChange(Object.assign(Object.assign({}, flashingAlert), { FlashTarget: flashTarget }));
42
- } },
43
- React.createElement(Tabs_1.Tabs.Tab, { value: "row" },
44
- React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: flashTarget === 'row' }, "Row")),
45
- React.createElement(Tabs_1.Tabs.Content, { value: "row" },
46
- React.createElement(rebass_1.Text, { fontSize: 2 },
47
- "Flash the whole ",
48
- React.createElement("b", null, "row"))),
49
- React.createElement(Tabs_1.Tabs.Tab, { value: "cell" },
50
- React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: flashTarget === 'cell' }, "Cell")),
51
- React.createElement(Tabs_1.Tabs.Content, { value: "cell" },
52
- React.createElement(rebass_1.Text, { fontSize: 2 },
53
- "Flash the updated ",
54
- React.createElement("b", null, "cell"),
55
- " only"))),
56
- React.createElement(rebass_1.Text, { mt: 3, fontSize: 2, pl: 2 }, "Flash rules")));
31
+ const { data, api, moduleInfo } = OnePageAdaptableWizard_1.useOnePageWizardContext();
32
+ const predicateDefs = api.flashingCellApi.getFlashingCellPredicateDefsForScope(data.Scope);
33
+ return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: false, showObservable: false, showBoolean: true, showPredicate: true, descriptions: {
34
+ selectPredicate: 'Select an Flashing Cell Rule - to be applied when data changes',
35
+ useBooleanQuery: (React.createElement(React.Fragment, null,
36
+ "Use an BooleanQuery if ",
37
+ React.createElement("i", null, "Scope"),
38
+ " is 'Whole Row' - so any data change may be evaluated in a complex BooleanExpression")),
39
+ useObservableQuery: (React.createElement(React.Fragment, null,
40
+ "Use an ObservableQuery if ",
41
+ React.createElement("i", null, "Scope"),
42
+ " is 'Whole Row' - so any data change may be evaluated in a complex ObservableExpression")),
43
+ useAggregationQuery: (React.createElement(React.Fragment, null,
44
+ "Use an AggregationQuery if ",
45
+ React.createElement("i", null, "Scope"),
46
+ " is 'Whole Row' - so any data change may be evaluated in a complex AggregationExpression")),
47
+ } }));
57
48
  };
@@ -3,7 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FlashingAlertScopeWizardSection = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const BaseAlertScopeWizardSection_1 = require("../../Alert/Wizard/BaseAlertScopeWizardSection");
6
+ const rebass_1 = require("rebass");
7
+ const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
8
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
7
9
  exports.FlashingAlertScopeWizardSection = (props) => {
8
- return React.createElement(BaseAlertScopeWizardSection_1.BaseAlertScopeWizardSection, Object.assign({}, props));
10
+ const { data, api } = OnePageAdaptableWizard_1.useOnePageWizardContext();
11
+ return (React.createElement(rebass_1.Flex, { flexDirection: "column", style: { height: '100%' }, padding: 2 },
12
+ React.createElement(NewScopeComponent_1.NewScopeComponent, { descriptions: {
13
+ rowScope: 'Changes anywhere in the row will trigger an Flashing Cell',
14
+ columnScope: 'Changes in selected columns will trigger an Flashing Cell',
15
+ }, scope: data.Scope, updateScope: (Scope) => {
16
+ const newData = Object.assign(Object.assign({}, data), { Scope });
17
+ if (newData.Rule.Predicate) {
18
+ // when scope is changed, reset the rule to predicate of any
19
+ // if it was set to a predicate before
20
+ newData.Rule = {
21
+ Predicate: { PredicateId: 'Any' },
22
+ };
23
+ }
24
+ props.onChange(newData);
25
+ } })));
9
26
  };
@@ -12,6 +12,7 @@ const Tabs_1 = require("../../../components/Tabs");
12
12
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
13
13
  const CodeBlock_1 = require("../../../components/CodeBlock");
14
14
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
15
+ const CheckBox_1 = require("../../../components/CheckBox");
15
16
  exports.renderFlashingAlertSettingsSummary = (flashingAlert) => {
16
17
  return (React.createElement(React.Fragment, null,
17
18
  React.createElement(rebass_1.Text, { fontSize: 2 }, flashingAlert.FlashDuration === 'always' ? (React.createElement(React.Fragment, null, "Flashing is never removed")) : (React.createElement(React.Fragment, null,
@@ -21,7 +22,7 @@ exports.renderFlashingAlertSettingsSummary = (flashingAlert) => {
21
22
  "milliseconds")))));
22
23
  };
23
24
  exports.FlashingAlertSettingsWizardSection = (props) => {
24
- var _a;
25
+ var _a, _b, _c, _d, _e, _f, _g;
25
26
  let { data: flashingCell } = OnePageAdaptableWizard_1.useOnePageWizardContext();
26
27
  flashingCell = flashingCell !== null && flashingCell !== void 0 ? flashingCell : props.flashingCell;
27
28
  const setDuration = (FlashDuration) => {
@@ -40,8 +41,21 @@ exports.FlashingAlertSettingsWizardSection = (props) => {
40
41
  const handleTypeChange = (type) => {
41
42
  setDuration(type === 'number' ? numberDuration.current : 'always');
42
43
  };
43
- const handleTargetChange = (type) => {
44
- props.onChange(Object.assign(Object.assign({}, flashingCell), { FlashTarget: type }));
44
+ const handleTargetChange = (type, checked) => {
45
+ var _a;
46
+ let FlashTarget = (_a = flashingCell.FlashTarget) !== null && _a !== void 0 ? _a : [];
47
+ if (typeof FlashTarget === 'string') {
48
+ FlashTarget = [FlashTarget];
49
+ }
50
+ if (Array.isArray(FlashTarget)) {
51
+ if (checked) {
52
+ FlashTarget = [...FlashTarget, type];
53
+ }
54
+ else {
55
+ FlashTarget = FlashTarget.filter((target) => type != target);
56
+ }
57
+ }
58
+ props.onChange(Object.assign(Object.assign({}, flashingCell), { FlashTarget }));
45
59
  };
46
60
  return (React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column", "data-name": "plus-minus-column-settings" },
47
61
  React.createElement(Tabs_1.Tabs, { autoFocus: false, padding: 2 },
@@ -61,6 +75,7 @@ exports.FlashingAlertSettingsWizardSection = (props) => {
61
75
  React.createElement(rebass_1.Text, { fontSize: 2 }, "milliseconds"))),
62
76
  duration === 'always' && (React.createElement(rebass_1.Text, { height: 43, fontSize: 3 }, "Persists the flashing style indeterminately - can be removed manually"))),
63
77
  React.createElement(FormLayout_1.FormRow, { label: "Flash Target" },
64
- React.createElement(Radio_1.default, { onChange: () => handleTargetChange('cell'), mr: 3, checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) == 'cell', tabIndex: -1 }, "Cell"),
65
- React.createElement(Radio_1.default, { onChange: () => handleTargetChange('row'), checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) == 'row', tabIndex: -1 }, "Row")))))));
78
+ React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleTargetChange('cell', checked), mr: 3, checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === 'cell' || ((_c = (_b = flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, 'cell')), tabIndex: -1 }, "Cell"),
79
+ React.createElement(CheckBox_1.CheckBox, { mr: 3, onChange: (checked) => handleTargetChange('row', checked), checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === 'row' || ((_e = (_d = flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === null || _d === void 0 ? void 0 : _d.includes) === null || _e === void 0 ? void 0 : _e.call(_d, 'row')), tabIndex: -1 }, "Row"),
80
+ React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleTargetChange('aggFuncCell', checked), checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === 'aggFuncCell' || ((_g = (_f = flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === null || _f === void 0 ? void 0 : _f.includes) === null || _g === void 0 ? void 0 : _g.call(_f, 'aggFuncCell')), tabIndex: -1 }, "Aggregated Function Cell")))))));
66
81
  };
@@ -69,7 +69,7 @@ exports.FlashingCellWizard = (props) => {
69
69
  isValid: isValidFlashingCellRules_1.isValidFlashingCellRules,
70
70
  render: () => React.createElement(FlashingCellRulesWizardSection_1.FlashingAlertRulesWizardSection, { onChange: setFlashingCell }),
71
71
  renderSummary: FlashingCellRulesWizardSection_1.renderFlashingAlertRulesSummary,
72
- title: 'Condition',
72
+ title: 'Rule',
73
73
  },
74
74
  {
75
75
  details: 'Select the Duration of the Flash',
@@ -4,8 +4,8 @@ exports.FormatColumnFormatWizardSection = exports.getFormatDisplayTypeForScope =
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
- const uniq_1 = tslib_1.__importDefault(require("lodash-es/uniq"));
8
- const clamp_1 = tslib_1.__importDefault(require("lodash-es/clamp"));
7
+ const uniq_1 = tslib_1.__importDefault(require("lodash/uniq"));
8
+ const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
9
9
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
10
10
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
11
11
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
@@ -70,15 +70,20 @@ const adjustFormatColumn = (formatColumn, api) => {
70
70
  return formatColumn;
71
71
  };
72
72
  function FormatColumnWizard(props) {
73
+ var _a;
73
74
  const { api } = AdaptableContext_1.useAdaptable();
75
+ const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
74
76
  const [formatColumn, doSetFormatColumn] = react_1.useState(() => {
75
- var _a;
76
- let formatColumn = props.data
77
- ? Helper_1.cloneObject(props.data)
78
- : ObjectFactory_1.default.CreateEmptyFormatColumn();
77
+ var _a, _b, _c, _d;
78
+ let formatColumn = data ? Helper_1.cloneObject(data) : ObjectFactory_1.default.CreateEmptyFormatColumn();
79
79
  formatColumn.Scope = (_a = formatColumn.Scope) !== null && _a !== void 0 ? _a : {
80
80
  ColumnIds: [],
81
81
  };
82
+ if (((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'New' && ((_c = props.popupParams) === null || _c === void 0 ? void 0 : _c.column)) {
83
+ formatColumn.Scope = {
84
+ ColumnIds: [(_d = props.popupParams) === null || _d === void 0 ? void 0 : _d.column.columnId],
85
+ };
86
+ }
82
87
  formatColumn = adjustFormatColumn(formatColumn, api);
83
88
  return formatColumn;
84
89
  });
@@ -87,7 +92,7 @@ function FormatColumnWizard(props) {
87
92
  }, []);
88
93
  const dispatch = react_redux_1.useDispatch();
89
94
  const handleFinish = () => {
90
- if (props.data) {
95
+ if (data) {
91
96
  dispatch(FormatColumnRedux.FormatColumnEdit(formatColumn));
92
97
  }
93
98
  else {
@@ -49,8 +49,7 @@ class FreeTextColumnSummaryComponent extends React.Component {
49
49
  this.state.editedAdaptableObject && (React.createElement(FreeTextColumnWizard_1.FreeTextColumnWizard, { moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.FreeTextColumns, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
50
50
  }
51
51
  onNew() {
52
- const specialColumnsAreFilterable = this.props.api.internalApi.getAdaptableOptions()
53
- .filterOptions.enableFilterOnSpecialColumns;
52
+ const specialColumnsAreFilterable = this.props.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns;
54
53
  let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn(specialColumnsAreFilterable);
55
54
  configEntity.ColumnId = this.props.summarisedColumn.columnId;
56
55
  this.setState({
@@ -12,15 +12,22 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
12
12
  const FreeTextColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FreeTextColumnRedux"));
13
13
  const react_redux_1 = require("react-redux");
14
14
  exports.FreeTextColumnWizard = (props) => {
15
+ var _a;
16
+ const allFreeTextColumns = react_redux_1.useSelector((state) => state.FreeTextColumn.FreeTextColumns);
15
17
  const [freeTextColumn, setFreeTextColumn] = react_1.useState(() => {
16
- const freeTextColumn = props.data
17
- ? Helper_1.cloneObject(props.data)
18
- : ObjectFactory_1.default.CreateEmptyFreeTextColumn(false);
19
- return freeTextColumn;
18
+ var _a, _b;
19
+ if (props.data) {
20
+ return Helper_1.cloneObject(props.data);
21
+ }
22
+ if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit' && ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.column)) {
23
+ return allFreeTextColumns.find((column) => column.ColumnId === props.popupParams.column.columnId);
24
+ }
25
+ return ObjectFactory_1.default.CreateEmptyFreeTextColumn(false);
20
26
  });
21
27
  const dispatch = react_redux_1.useDispatch();
28
+ const isEdit = props.data || ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit';
22
29
  const handleFinish = () => {
23
- if (props.data) {
30
+ if (isEdit) {
24
31
  dispatch(FreeTextColumnRedux.FreeTextColumnEdit(freeTextColumn));
25
32
  }
26
33
  else {
@@ -92,7 +92,10 @@ const OptionContainerComponent = (props) => {
92
92
  const panelButton = viewMode === 'expanded' ? (React.createElement(ButtonMinimise_1.ButtonMinimise, { onClick: () => requestViewModeChange(), tooltip: `Hide ${label}` })) : (React.createElement(ButtonMaximise_1.ButtonMaximise, { onClick: () => requestViewModeChange(), tooltip: `Show ${label}` }));
93
93
  return (React.createElement(PanelWithButton_1.PanelWithButton, { className: `options-container-${name}`, variant: "default", headerText: label, headerProps: {
94
94
  fontSize: 3,
95
- style: { fontWeight: viewMode === 'expanded' ? 800 : 400, cursor: 'pointer' },
95
+ style: {
96
+ fontWeight: viewMode === 'expanded' ? 800 : 400,
97
+ cursor: 'pointer',
98
+ },
96
99
  'data-name': `options-container-header-${name}`,
97
100
  onClick: () => requestViewModeChange(),
98
101
  }, button: panelButton, style: { marginBottom: 3 } }, viewMode === 'expanded' && children));
@@ -21,7 +21,11 @@ const PivotList_1 = require("./PivotList");
21
21
  const ButtonInfo_1 = require("../../../Components/Buttons/ButtonInfo");
22
22
  const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
23
23
  const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
24
- const verticalPanelStyle = { minHeight: 150, flex: '1 0 auto', overflow: 'auto' };
24
+ const verticalPanelStyle = {
25
+ minHeight: 150,
26
+ flex: '1 0 auto',
27
+ overflow: 'auto',
28
+ };
25
29
  const ListPanel = (props) => (React.createElement(Panel_1.default, Object.assign({ variant: "modern", bodyProps: { padding: 0 }, style: Object.assign(Object.assign({}, verticalPanelStyle), props.style) }, props)));
26
30
  const ColumnLabels = (props) => {
27
31
  const { children, showBoth, showTitle, flexDirection = 'row', labels: labelsProp } = props, columnProperties = tslib_1.__rest(props, ["children", "showBoth", "showTitle", "flexDirection", "labels"]);
@@ -44,7 +44,13 @@ class LayoutEditorWizard extends React.Component {
44
44
  this.onLayoutChange = (layout) => {
45
45
  layout = Object.assign(Object.assign({}, layout), { Name: this.state.layoutName });
46
46
  this.updateLayout(layout);
47
- this.setState({ layout, errorMessage: this.getErrorMessage({ layout, layoutName: this.state.layoutName }) }, () => {
47
+ this.setState({
48
+ layout,
49
+ errorMessage: this.getErrorMessage({
50
+ layout,
51
+ layoutName: this.state.layoutName,
52
+ }),
53
+ }, () => {
48
54
  this.props.updateGoBackState();
49
55
  });
50
56
  };
@@ -13,8 +13,14 @@ const react_redux_1 = require("react-redux");
13
13
  const PlusMinusRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PlusMinusRedux"));
14
14
  exports.PlusMinusWizard = (props) => {
15
15
  const [plusMinus, setPlusMinus] = React.useState(() => {
16
- var _a, _b, _c, _d;
17
- return Object.assign(Object.assign({}, (props.data ? props.data : ObjectFactory_1.default.CreateEmptyPlusMinusNudge())), { Scope: (_b = (_a = props === null || props === void 0 ? void 0 : props.data) === null || _a === void 0 ? void 0 : _a.Scope) !== null && _b !== void 0 ? _b : { All: true }, NudgeValue: (_d = (_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.NudgeValue) !== null && _d !== void 0 ? _d : 20 });
16
+ var _a, _b, _c, _d, _e;
17
+ const newPlusMinus = Object.assign(Object.assign({}, (props.data ? props.data : ObjectFactory_1.default.CreateEmptyPlusMinusNudge())), { Scope: (_b = (_a = props === null || props === void 0 ? void 0 : props.data) === null || _a === void 0 ? void 0 : _a.Scope) !== null && _b !== void 0 ? _b : { All: true }, NudgeValue: (_d = (_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.NudgeValue) !== null && _d !== void 0 ? _d : 20 });
18
+ if ((_e = props === null || props === void 0 ? void 0 : props.popupParams) === null || _e === void 0 ? void 0 : _e.column) {
19
+ newPlusMinus.Scope = {
20
+ ColumnIds: [props.popupParams.column.columnId],
21
+ };
22
+ }
23
+ return newPlusMinus;
18
24
  });
19
25
  const [hasCondition, setHasCondition] = React.useState(() => {
20
26
  var _a;
@@ -33,13 +33,20 @@ class ExpandedQueryPopupComponent extends React.Component {
33
33
  namedQuery: this.state.namedQuery,
34
34
  setNamedQuery: (namedQuery) => this.setState({ namedQuery }),
35
35
  } },
36
- React.createElement(PanelWithButton_1.PanelWithButton, { headerText: "Current Query", bodyProps: { padding: 0, style: { display: 'flex', flexDirection: 'column' } }, glyphicon: this.props.moduleInfo.Glyph },
36
+ React.createElement(PanelWithButton_1.PanelWithButton, { headerText: "Current Query", bodyProps: {
37
+ padding: 0,
38
+ style: { display: 'flex', flexDirection: 'column' },
39
+ }, glyphicon: this.props.moduleInfo.Glyph },
37
40
  React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: (expression) => this.setState({ expression }), initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.getAllNamedQuery(), api: this.props.api }),
38
41
  React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, backgroundColor: "primary", alignItems: "center" },
39
42
  React.createElement(SimpleButton_1.default, { margin: 1, variant: "text", "data-name": "action-close", onClick: () => {
40
43
  this.props.onClosePopup();
41
44
  } }, "CLOSE"),
42
- React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, style: { flex: 1, color: 'var(--ab-color-error)', textAlign: 'end' } }, namedQueryValidationError),
45
+ React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, style: {
46
+ flex: 1,
47
+ color: 'var(--ab-color-error)',
48
+ textAlign: 'end',
49
+ } }, namedQueryValidationError),
43
50
  React.createElement(SimpleButton_1.default, { variant: "raised", tone: "accent", "data-name": "action-run", margin: 1, onClick: () => {
44
51
  if (this.state.namedQuery) {
45
52
  this.props.onAddNamedQuery(this.state.namedQuery);