@adaptabletools/adaptable 11.0.0-canary.2 → 11.0.0-canary.6

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 (244) hide show
  1. package/agGrid.d.ts +1 -1
  2. package/agGrid.js +3 -3
  3. package/base.css +138 -68
  4. package/bundle.cjs.js +131 -127
  5. package/index.css +140 -68
  6. package/package.json +33 -33
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
  10. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -2
  12. package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
  13. package/src/AdaptableOptions/AlertOptions.js +2 -0
  14. package/src/AdaptableOptions/ContainerOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
  16. package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
  17. package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
  18. package/src/AdaptableOptions/QueryLanguageOptions.d.ts +3 -7
  19. package/src/AdaptableOptions/StateOptions.d.ts +2 -1
  20. package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
  21. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -3
  22. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
  23. package/src/Api/AdaptableApi.d.ts +6 -0
  24. package/src/Api/AlertApi.d.ts +2 -3
  25. package/src/Api/ColumnApi.d.ts +0 -4
  26. package/src/Api/EventApi.d.ts +8 -3
  27. package/src/Api/Events/GridDataChanged.d.ts +4 -2
  28. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
  29. package/src/Api/FreeTextColumnApi.d.ts +0 -12
  30. package/src/Api/GridApi.d.ts +5 -4
  31. package/src/Api/IPushPullApi.d.ts +1 -1
  32. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
  33. package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
  34. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
  35. package/src/Api/Implementation/AlertApiImpl.js +19 -10
  36. package/src/Api/Implementation/ApiBase.d.ts +2 -0
  37. package/src/Api/Implementation/ApiBase.js +3 -0
  38. package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
  39. package/src/Api/Implementation/ColumnApiImpl.js +0 -5
  40. package/src/Api/Implementation/DashboardApiImpl.js +1 -1
  41. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -4
  42. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
  43. package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
  44. package/src/Api/Implementation/GridApiImpl.d.ts +5 -4
  45. package/src/Api/Implementation/GridApiImpl.js +4 -0
  46. package/src/Api/Implementation/InternalApiImpl.js +2 -2
  47. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  48. package/src/Api/Implementation/LayoutApiImpl.js +12 -1
  49. package/src/Api/Implementation/QueryApiImpl.js +4 -1
  50. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -1
  51. package/src/Api/Implementation/QueryLanguageApiImpl.js +6 -7
  52. package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
  53. package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
  54. package/src/Api/LayoutApi.d.ts +7 -0
  55. package/src/Api/OpenFinApi.d.ts +5 -0
  56. package/src/Api/PluginsApi.d.ts +29 -0
  57. package/src/Api/QueryLanguageApi.d.ts +10 -10
  58. package/src/Api/SettingsPanelApi.d.ts +17 -0
  59. package/src/Api/SettingsPanelApi.js +2 -0
  60. package/src/Api/UserInterfaceApi.d.ts +5 -2
  61. package/src/PredefinedConfig/AlertState.d.ts +4 -6
  62. package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -1
  63. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -4
  64. package/src/PredefinedConfig/Common/AdaptableQuery.js +3 -3
  65. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
  66. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
  67. package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
  68. package/src/PredefinedConfig/Common/Enums.js +0 -2
  69. package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
  70. package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
  71. package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
  72. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  73. package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
  74. package/src/PredefinedConfig/FlashingCellState.d.ts +5 -2
  75. package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
  76. package/src/PredefinedConfig/LayoutState.d.ts +0 -2
  77. package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
  78. package/src/PredefinedConfig/SystemState.d.ts +2 -1
  79. package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
  80. package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
  81. package/src/Redux/ActionsReducers/GridRedux.js +3 -1
  82. package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
  83. package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
  84. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
  85. package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
  86. package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
  87. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  88. package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
  89. package/src/Redux/Store/AdaptableStore.js +18 -6
  90. package/src/Strategy/AlertModule.js +14 -4
  91. package/src/Strategy/ConditionalStyleModule.js +4 -0
  92. package/src/Strategy/DataChangeHistoryModule.js +1 -1
  93. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  94. package/src/Strategy/FlashingCellModule.js +34 -18
  95. package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
  96. package/src/Strategy/FreeTextColumnModule.js +10 -0
  97. package/src/Strategy/LayoutModule.js +1 -6
  98. package/src/Strategy/TeamSharingModule.js +1 -1
  99. package/src/Strategy/ToolPanelModule.js +5 -3
  100. package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +1 -1
  101. package/src/Strategy/Utilities/getFlashingTargetViewItems.js +3 -1
  102. package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
  103. package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
  104. package/src/Strategy/Utilities/getRuleViewItems.js +0 -1
  105. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -6
  106. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
  107. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
  108. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +7 -0
  109. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +42 -0
  110. package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
  111. package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
  112. package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
  113. package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
  114. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  115. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +36 -0
  116. package/src/Utilities/ExpressionFunctions/groupingMap.js +104 -0
  117. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
  118. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
  119. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  120. package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
  121. package/src/Utilities/Helpers/CalendarHelper.js +220 -55
  122. package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
  123. package/src/Utilities/ObjectFactory.js +5 -2
  124. package/src/Utilities/Services/AlertService.js +3 -3
  125. package/src/Utilities/Services/DataService.js +6 -1
  126. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -2
  127. package/src/Utilities/Services/LicenseService.js +1 -1
  128. package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
  129. package/src/Utilities/Services/QueryLanguageService.js +21 -16
  130. package/src/Utilities/Services/ReportService.js +7 -3
  131. package/src/Utilities/Services/TeamSharingService.js +5 -3
  132. package/src/View/AdaptablePopover/index.js +6 -1
  133. package/src/View/AdaptableView.js +1 -1
  134. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
  135. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -2
  136. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
  137. package/src/View/AdaptableWizardView/helper.js +5 -3
  138. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
  139. package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
  140. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
  141. package/src/View/Alert/Wizard/AlertWizard.js +2 -2
  142. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -3
  143. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -5
  144. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
  145. package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
  146. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
  147. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
  148. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
  149. package/src/View/Components/EntityRulesEditor/index.js +9 -9
  150. package/src/View/Components/FilterForm/FilterForm.js +0 -2
  151. package/src/View/Components/FilterForm/QuickFilterForm.js +8 -7
  152. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  153. package/src/View/Components/ModuleValueSelector/index.js +1 -1
  154. package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
  155. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
  156. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -87
  157. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
  158. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
  159. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
  160. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
  161. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
  162. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
  163. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
  164. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
  165. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
  166. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
  167. package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
  168. package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
  169. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
  170. package/src/View/Components/ScopeComponent.js +4 -1
  171. package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
  172. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  173. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +6 -2
  174. package/src/View/Components/ToolPanel/ToolPanelPopup.js +7 -5
  175. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
  176. package/src/View/Components/ValueSelector/index.d.ts +2 -1
  177. package/src/View/Components/ValueSelector/index.js +5 -5
  178. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
  179. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
  180. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
  181. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +17 -5
  182. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
  183. package/src/View/CustomSort/Wizard/CustomSortWizard.js +17 -5
  184. package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
  185. package/src/View/Dashboard/Dashboard.js +5 -5
  186. package/src/View/Dashboard/DashboardPopup.js +8 -6
  187. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
  188. package/src/View/Export/Wizard/NewReportWizard.js +13 -3
  189. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
  190. package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
  191. package/src/View/Filter/FilterViewPanel.d.ts +1 -4
  192. package/src/View/Filter/FilterViewPanel.js +1 -3
  193. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
  194. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
  195. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -5
  196. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
  197. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  198. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +11 -6
  199. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
  200. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +12 -5
  201. package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
  202. package/src/View/Layout/Wizard/LayoutEditor/index.js +5 -1
  203. package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
  204. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
  205. package/src/View/Query/ExpandedQueryPopup.js +9 -2
  206. package/src/View/Query/QueryViewPanel.js +15 -10
  207. package/src/View/Query/Wizard/NamedQueryWizard.js +6 -4
  208. package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
  209. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  210. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
  211. package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
  212. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  213. package/src/View/UIHelper.js +4 -1
  214. package/src/View/Wizard/AdaptableWizard.js +13 -4
  215. package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
  216. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -2
  217. package/src/agGrid/Adaptable.d.ts +2 -5
  218. package/src/agGrid/Adaptable.js +127 -75
  219. package/src/agGrid/agGridHelper.js +3 -8
  220. package/src/agGrid/agGridMenuHelper.js +5 -9
  221. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  222. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  223. package/src/components/ApplicationIcon.d.ts +1 -0
  224. package/src/components/ApplicationIcon.js +2 -2
  225. package/src/components/Dashboard/Dashboard.js +4 -1
  226. package/src/components/Dashboard/DashboardManager.d.ts +5 -3
  227. package/src/components/Dashboard/DashboardManager.js +33 -27
  228. package/src/components/Dropdown/index.js +8 -1
  229. package/src/components/DropdownButton/renderItem.js +1 -1
  230. package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
  231. package/src/components/ExpressionEditor/EditorInputReactive.js +4 -2
  232. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +4 -1
  233. package/src/components/ExpressionEditor/index.d.ts +1 -1
  234. package/src/components/ExpressionEditor/index.js +12 -5
  235. package/src/components/FormLayout/index.js +1 -1
  236. package/src/components/OverlayTrigger/Overlay.js +1 -1
  237. package/src/components/SizedContainer/index.js +7 -1
  238. package/src/components/WindowModal/WindowModal.js +4 -1
  239. package/src/metamodel/adaptable.metamodel.d.ts +75 -24
  240. package/src/metamodel/adaptable.metamodel.js +223 -115
  241. package/src/types.d.ts +6 -3
  242. package/themes/dark.css +4 -4
  243. package/version.d.ts +1 -1
  244. package/version.js +1 -1
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdaptablePopupDialog = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_dom_1 = require("react-dom");
7
+ const react_redux_1 = require("react-redux");
8
+ const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
9
+ const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
10
+ const AdaptableContext_1 = require("../../../AdaptableContext");
11
+ const Utilities_1 = require("./Utilities");
12
+ const WindowDialog = (props) => {
13
+ var _a, _b;
14
+ const { onChange, style, baseClassName, className, isActionModule, settingsPanelOptionsKey, onHide } = props, dialogProps = tslib_1.__rest(props, ["onChange", "style", "baseClassName", "className", "isActionModule", "settingsPanelOptionsKey", "onHide"]);
15
+ const adaptable = AdaptableContext_1.useAdaptable();
16
+ const dispatch = react_redux_1.useDispatch();
17
+ const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
18
+ let popupSettings = react_redux_1.useSelector((state) => { var _a, _b; return (_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.SettingsPanel) === null || _b === void 0 ? void 0 : _b[settingsPanelOptionsKey]; });
19
+ const handleWindowSettings = (settings) => {
20
+ dispatch(SystemRedux_1.SystemSettingsPanelSet(settingsPanelOptionsKey, settings));
21
+ };
22
+ if (!popupSettings) {
23
+ const size = isActionModule
24
+ ? Utilities_1.getActionPanelSize()
25
+ : (_a = settingsPanelOptions.size) !== null && _a !== void 0 ? _a : Utilities_1.getSettingsPanelSize();
26
+ popupSettings = {
27
+ size: size,
28
+ position: (_b = settingsPanelOptions.position) !== null && _b !== void 0 ? _b : Utilities_1.getMiddlePosition(size),
29
+ };
30
+ }
31
+ const windowModalProps = {
32
+ handleSelector: isActionModule
33
+ ? `.${baseClassName} .ab-Panel__header`
34
+ : '.ab-Adaptable-Popup__TopBar',
35
+ size: popupSettings.size,
36
+ position: popupSettings.position,
37
+ onChange: handleWindowSettings,
38
+ };
39
+ return (React.createElement(Dialog_1.default, Object.assign({ windowModal: true, fixed: false, windowModalProps: windowModalProps, style: Object.assign(Object.assign({}, props.style), { height: '100%' }), padding: 0, className: className, onDismiss: onHide, isOpen: true, showCloseButton: true }, dialogProps)));
40
+ };
41
+ const PopupDialog = (props) => {
42
+ const { style, className, onHide, children } = props, dialogProps = tslib_1.__rest(props, ["style", "className", "onHide", "children"]);
43
+ return (React.createElement(Dialog_1.default, Object.assign({ fixed: false, style: props.style, padding: 0, height: '90vh', width: '90vw', className: className, onDismiss: onHide, isOpen: true, showCloseButton: true }, dialogProps), children));
44
+ };
45
+ exports.AdaptablePopupDialog = (props) => {
46
+ const { isActionModule, style, friendlyName, baseClassName, className, children, onHide, isWindowModal, modalContainer, } = props;
47
+ const elementRef = React.useMemo(() => {
48
+ if (!modalContainer) {
49
+ return null;
50
+ }
51
+ let ref = null;
52
+ if (typeof modalContainer === 'string') {
53
+ ref = globalThis.document.querySelector(modalContainer);
54
+ }
55
+ else {
56
+ ref = modalContainer;
57
+ }
58
+ return ref;
59
+ }, [modalContainer]);
60
+ if (modalContainer) {
61
+ let ref = null;
62
+ if (typeof modalContainer === 'string') {
63
+ ref = globalThis.document.querySelector(modalContainer);
64
+ }
65
+ else {
66
+ ref = modalContainer;
67
+ }
68
+ return react_dom_1.createPortal(React.createElement(Dialog_1.default, { modal: false, fixed: false, onDismiss: onHide, className: className }, children), ref);
69
+ }
70
+ if (isWindowModal) {
71
+ const settingsPanelOptionsKey = isActionModule ? `action-${friendlyName}` : 'settings';
72
+ return (React.createElement(WindowDialog, { settingsPanelOptionsKey: settingsPanelOptionsKey, isActionModule: isActionModule, onHide: onHide, style: style, baseClassName: baseClassName, className: className }, children));
73
+ }
74
+ else {
75
+ const modalStyle = Object.assign(Object.assign({}, style), (isActionModule ? { maxWidth: 800, maxHeight: 600 } : { maxWidth: 1200, maxHeight: 1000 }));
76
+ return (React.createElement(PopupDialog, { onHide: onHide, style: modalStyle, className: className }, children));
77
+ }
78
+ };
@@ -1,9 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { AccessLevel, AdaptableApi } from '../../../../../types';
3
3
  import { IModule } from '../../../../Strategy/Interface/IModule';
4
- export interface AdaptablePopupModuleViewProps {
4
+ import { ModuleParams, ModuleViewPopupProps } from '../../SharedProps/ModuleViewPopupProps';
5
+ export interface AdaptablePopupModuleViewProps extends ModuleViewPopupProps<typeof AdaptablePopupModuleView> {
5
6
  module: IModule;
6
7
  api: AdaptableApi;
7
8
  accessLevel: AccessLevel;
9
+ popupParams?: ModuleParams;
8
10
  }
9
11
  export declare const AdaptablePopupModuleView: React.FunctionComponent<AdaptablePopupModuleViewProps>;
@@ -11,18 +11,27 @@ const AdaptableObjectList_1 = require("../../AdaptableObjectList");
11
11
  const ButtonNew_1 = require("../../Buttons/ButtonNew");
12
12
  const PopupPanel_1 = require("./PopupPanel");
13
13
  exports.AdaptablePopupModuleView = (props) => {
14
- var _a, _b, _c;
14
+ var _a, _b, _c, _d;
15
15
  /**
16
16
  * This triggers an render for each redux change.
17
17
  * Not sure yet how to trigger this component to render when an item is edited.
18
18
  */
19
19
  react_redux_1.useSelector((state) => state);
20
- const [isWizardOpen, setIsWizardOpen] = React.useState(false);
20
+ const [isWizardOpen, setIsWizardOpen] = React.useState(() => {
21
+ var _a, _b;
22
+ return ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' || ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'Edit';
23
+ });
24
+ React.useEffect(() => {
25
+ var _a, _b;
26
+ if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' || ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'Edit') {
27
+ setIsWizardOpen(true);
28
+ }
29
+ }, [(_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action]);
21
30
  const [abObjectType, setAbObjectType] = React.useState(null);
22
31
  const moduleInfo = props.module.moduleInfo;
23
- const items = (_a = props.module) === null || _a === void 0 ? void 0 : _a.toViewAll();
32
+ const items = (_b = props.module) === null || _b === void 0 ? void 0 : _b.toViewAll();
24
33
  const moduleViewProperties = props.module.getViewProperties();
25
- const EditWizard = (_b = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.getEditWizard) === null || _b === void 0 ? void 0 : _b.call(moduleViewProperties);
34
+ const EditWizard = (_c = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.getEditWizard) === null || _c === void 0 ? void 0 : _c.call(moduleViewProperties);
26
35
  const emptyView = moduleViewProperties.emptyView;
27
36
  let emptyContent = null;
28
37
  if (typeof emptyView === 'function') {
@@ -34,7 +43,7 @@ exports.AdaptablePopupModuleView = (props) => {
34
43
  // Some modules do not have new button
35
44
  // e.g. filter
36
45
  let newButton = null;
37
- if ((_c = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.abObjectTypes) === null || _c === void 0 ? void 0 : _c.length) {
46
+ if ((_d = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.abObjectTypes) === null || _d === void 0 ? void 0 : _d.length) {
38
47
  const items = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.abObjectTypes.map((abObjctType) => {
39
48
  var _a;
40
49
  return {
@@ -58,10 +67,14 @@ exports.AdaptablePopupModuleView = (props) => {
58
67
  } }));
59
68
  }
60
69
  const handleWizardClose = () => {
70
+ var _a;
61
71
  setAbObjectType(null);
62
72
  setIsWizardOpen(false);
73
+ if (['Toolbar', 'ContextMenu', 'ColumnMenu'].includes((_a = props === null || props === void 0 ? void 0 : props.popupParams) === null || _a === void 0 ? void 0 : _a.source)) {
74
+ props.onClosePopup();
75
+ }
63
76
  };
64
77
  return (React.createElement(PopupPanel_1.PopupPanel, { glyphicon: moduleInfo.Glyph, infoLink: moduleInfo.HelpPage, headerText: moduleInfo.FriendlyName, button: newButton },
65
78
  (items === null || items === void 0 ? void 0 : items.length) ? (React.createElement(AdaptableObjectList_1.AdaptableObjectList, { module: props.module, items: items })) : (React.createElement(EmptyContent_1.default, null, emptyContent !== null && emptyContent !== void 0 ? emptyContent : `Click 'New' to create a new ${moduleInfo.FriendlyName}`)),
66
- isWizardOpen && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
79
+ isWizardOpen && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, popupParams: props.popupParams, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
67
80
  };
@@ -1,12 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { AdaptableApi, AdaptableMenuItem } from '../../../../../types';
3
3
  import { CustomSettingsPanel } from '../../../../AdaptableOptions/SettingsPanelOptions';
4
- import { ModuleInfo } from '../../../../Strategy/Interface/IModule';
5
4
  interface NavigationProps {
6
5
  api: AdaptableApi;
7
6
  menuItems: (AdaptableMenuItem | '-')[];
8
- moduleInfo?: ModuleInfo;
9
- activeCustomSettingPanel?: CustomSettingsPanel;
7
+ activeItem: string;
10
8
  customSettingsPanels?: CustomSettingsPanel[];
11
9
  }
12
10
  export declare const Navigation: React.FunctionComponent<NavigationProps>;
@@ -9,19 +9,12 @@ const icons_1 = require("../../../../components/icons");
9
9
  const join_1 = tslib_1.__importDefault(require("../../../../components/utils/join"));
10
10
  const useGlobalEvent_1 = require("../../../../components/utils/useGlobalEvent");
11
11
  exports.Navigation = (props) => {
12
- var _a;
13
12
  const dispatch = react_redux_1.useDispatch();
14
13
  const handleKeyPress = React.useCallback((event) => {
15
14
  if ((event.ctrlKey || event.metaKey) &&
16
15
  (event.code === 'ArrowUp' || event.code === 'ArrowDown')) {
17
16
  const isKeyUp = event.code === 'ArrowUp';
18
- const currentIndex = props.menuItems.findIndex((item) => {
19
- var _a, _b;
20
- return item !== '-' &&
21
- (item.module === ((_a = props === null || props === void 0 ? void 0 : props.moduleInfo) === null || _a === void 0 ? void 0 : _a.ModuleName) ||
22
- // in case of custom panel
23
- item.label === ((_b = props === null || props === void 0 ? void 0 : props.activeCustomSettingPanel) === null || _b === void 0 ? void 0 : _b.name));
24
- });
17
+ const currentIndex = props.menuItems.findIndex((item) => item !== '-' && (item.module === props.activeItem || item.label === props.activeItem));
25
18
  let nextMenuItem = null;
26
19
  if (isKeyUp) {
27
20
  let candidate = props.menuItems[currentIndex - 1] !== '-'
@@ -39,19 +32,18 @@ exports.Navigation = (props) => {
39
32
  dispatch(nextMenuItem.reduxAction);
40
33
  }
41
34
  }
42
- }, [(_a = props.moduleInfo) === null || _a === void 0 ? void 0 : _a.ModuleName, props.menuItems]);
35
+ }, [props.activeItem, props.menuItems]);
43
36
  useGlobalEvent_1.useGlobalEvent('keydown', handleKeyPress);
44
37
  return (React.createElement("nav", { className: "ab-Adaptable-Popup__Navigation" },
45
38
  React.createElement("ul", { className: "ab-Adaptable-Popup__Navigation__List" }, props.menuItems.map((menuItem, index) => {
46
- var _a, _b, _c, _d, _e, _f;
39
+ var _a, _b, _c, _d;
47
40
  const baseClassName = 'ab-Adaptable-Popup__Navigation__List__Item';
48
41
  if (menuItem === '-') {
49
42
  return React.createElement("li", { key: `separator-${index}`, className: `${baseClassName}__Separator` });
50
43
  }
51
- const isActive = ((_a = props === null || props === void 0 ? void 0 : props.moduleInfo) === null || _a === void 0 ? void 0 : _a.ModuleName) === menuItem.module ||
52
- menuItem.label === ((_b = props === null || props === void 0 ? void 0 : props.activeCustomSettingPanel) === null || _b === void 0 ? void 0 : _b.name);
44
+ const isActive = props.activeItem === menuItem.module || menuItem.label === props.activeItem;
53
45
  const className = join_1.default(baseClassName, isActive && `${baseClassName}--active`);
54
- let customIcon = (_f = (_e = (_d = (_c = props.customSettingsPanels) === null || _c === void 0 ? void 0 : _c.find) === null || _d === void 0 ? void 0 : _d.call(_c, (customSettingPanel) => customSettingPanel.name === menuItem.label)) === null || _e === void 0 ? void 0 : _e.icon) !== null && _f !== void 0 ? _f : null;
46
+ let customIcon = (_d = (_c = (_b = (_a = props.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (customSettingPanel) => customSettingPanel.name === menuItem.label)) === null || _c === void 0 ? void 0 : _c.icon) !== null && _d !== void 0 ? _d : null;
55
47
  return (React.createElement("li", { className: className, key: menuItem.label },
56
48
  React.createElement("button", { type: "button", className: `${baseClassName}__Button`, onClick: () => {
57
49
  dispatch(menuItem.reduxAction);
@@ -13,17 +13,18 @@ exports.TopBar = (props) => {
13
13
  const adaptable = AdaptableContext_1.useAdaptable();
14
14
  const applicationIcon = (_a = adaptable.api.internalApi.getAdaptableOptions().userInterfaceOptions) === null || _a === void 0 ? void 0 : _a.applicationIcon;
15
15
  let icon = React.createElement(React.Fragment, null);
16
+ const iconClassName = `${baseClassName}__Icon`;
16
17
  if (props.icon === 'ConfigurationIcon') {
17
- icon = React.createElement(icons_1.Icon, { className: `${baseClassName}__Icon`, name: "settings" });
18
+ icon = React.createElement(icons_1.Icon, { className: iconClassName, name: "settings" });
18
19
  }
19
20
  else if (props.icon === 'ApplicationIcon' && applicationIcon) {
20
- icon = React.createElement(ApplicationIcon_1.ApplicationIcon, { icon: applicationIcon });
21
+ icon = React.createElement(ApplicationIcon_1.ApplicationIcon, { className: iconClassName, icon: applicationIcon });
21
22
  }
22
23
  else if (typeof props.icon === 'object' && props.icon.src) {
23
- icon = React.createElement(ApplicationIcon_1.ApplicationIcon, { icon: props.icon });
24
+ icon = React.createElement(ApplicationIcon_1.ApplicationIcon, { className: iconClassName, icon: props.icon });
24
25
  }
25
26
  return (React.createElement(rebass_1.Flex, { flex: 0, className: baseClassName },
26
27
  icon,
27
- React.createElement(rebass_1.Text, null, props.children)));
28
+ React.createElement(rebass_1.Text, { className: `${baseClassName}__Title` }, props.children)));
28
29
  };
29
30
  exports.default = exports.TopBar;
@@ -0,0 +1,2 @@
1
+ import { AdaptableMenuItem } from '../../../../../types';
2
+ export declare const useMenuItems: () => (AdaptableMenuItem | '-')[];
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useMenuItems = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_redux_1 = require("react-redux");
7
+ const DefaultSettingsPanel_1 = require("../../../../Utilities/Defaults/DefaultSettingsPanel");
8
+ const AdaptableContext_1 = require("../../../AdaptableContext");
9
+ const PopupRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/PopupRedux"));
10
+ exports.useMenuItems = () => {
11
+ const adaptable = AdaptableContext_1.useAdaptable();
12
+ const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
13
+ const allMenuItems = react_redux_1.useSelector((state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.Grid) === null || _a === void 0 ? void 0 : _a.ModuleDropdownMenuItems; });
14
+ return React.useMemo(() => {
15
+ var _a;
16
+ let navigationItems = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.navigation) === null || _a === void 0 ? void 0 : _a.items;
17
+ if (!navigationItems) {
18
+ navigationItems = [...DefaultSettingsPanel_1.DEFAULT_NAVIGATION_ITEMS];
19
+ if (settingsPanelOptions.customSettingsPanels) {
20
+ navigationItems.push(...settingsPanelOptions.customSettingsPanels.map((panel) => panel.name));
21
+ }
22
+ }
23
+ const visibleItems = allMenuItems.filter((item) => item.module !== 'General' && !DefaultSettingsPanel_1.ACTION_POPUPS.includes(item.module) && item.isVisible);
24
+ return navigationItems
25
+ .map((moduleName) => {
26
+ var _a, _b;
27
+ if (moduleName === '-') {
28
+ return moduleName;
29
+ }
30
+ const customSettingsPanel = (_b = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (panel) => panel.name === moduleName);
31
+ let customPanelMenuItem = null;
32
+ if (customSettingsPanel) {
33
+ customPanelMenuItem = {
34
+ label: customSettingsPanel.name,
35
+ module: 'CustomSettingsPanelModule',
36
+ isVisible: true,
37
+ reduxAction: PopupRedux.PopupShowScreen('CustomSettingsPanelModule', customSettingsPanel.name),
38
+ };
39
+ }
40
+ return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
41
+ })
42
+ .filter(Boolean);
43
+ }, [allMenuItems]);
44
+ };
@@ -14,7 +14,9 @@ class AdaptablePopupConfirmation extends React.Component {
14
14
  constructor(props) {
15
15
  super(props);
16
16
  this.changeContent = (e) => {
17
- this.setState({ PromptText: e.target.value });
17
+ this.setState({
18
+ PromptText: e.target.value,
19
+ });
18
20
  };
19
21
  this.state = { PromptText: '' };
20
22
  }
@@ -1,18 +1,11 @@
1
1
  import * as React from 'react';
2
- export interface AdaptablePopupPromptProps extends React.ClassAttributes<AdaptablePopupPrompt> {
3
- showPopup: boolean;
2
+ import { Action } from 'redux';
3
+ export interface AdaptablePopupPromptProps {
4
4
  header: string;
5
5
  message: string;
6
6
  onClose: () => void;
7
7
  onConfirm: Function;
8
+ onConfirmActionCreator?: (inputText: string) => Action;
9
+ defaultValue?: string;
8
10
  }
9
- export interface AdaptablePopupPromptState {
10
- promptText: string;
11
- }
12
- export declare class AdaptablePopupPrompt extends React.Component<AdaptablePopupPromptProps, AdaptablePopupPromptState> {
13
- constructor(props: AdaptablePopupPromptProps);
14
- render(): JSX.Element;
15
- onCloseForm(): void;
16
- onConfirmmForm(): void;
17
- changeContent: (e: any) => void;
18
- }
11
+ export declare const AdaptablePopupPrompt: React.FunctionComponent<AdaptablePopupPromptProps>;
@@ -8,40 +8,41 @@ const Dialog_1 = tslib_1.__importDefault(require("../../../components/Dialog"));
8
8
  const rebass_1 = require("rebass");
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
10
10
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
11
- class AdaptablePopupPrompt extends React.Component {
12
- constructor(props) {
13
- super(props);
14
- this.changeContent = (e) => {
15
- this.setState({ promptText: e.target.value });
16
- };
17
- this.state = { promptText: '' };
18
- }
19
- render() {
20
- return (this.props.showPopup && (React.createElement(Dialog_1.default, { modal: true, "data-name": `prompt-popup`, isOpen: this.props.showPopup, onDismiss: this.props.onClose, showCloseButton: false, style: { minHeight: 'auto', maxWidth: '50%' } },
21
- React.createElement(rebass_1.Flex, { flexDirection: "column" },
22
- React.createElement(rebass_1.Box, { marginTop: 3, mx: 2 }, this.props.header),
23
- StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.message) && (React.createElement(rebass_1.Box, { marginTop: 3, mx: 2 },
24
- ' ',
25
- React.createElement("div", { style: { display: 'flex', alignItems: 'center' } }, this.props.message.split('\n').map(function (item, index) {
26
- return (React.createElement("span", { key: index },
27
- item,
28
- React.createElement("br", null)));
29
- })))),
30
- React.createElement(Input_1.default, { autoFocus: true, marginTop: 3, mx: 3, value: this.state.promptText, type: "string", placeholder: "Enter text", onChange: (e) => this.changeContent(e) }),
31
- React.createElement(rebass_1.Box, { marginTop: 3 },
32
- React.createElement(rebass_1.Flex, { padding: 2 },
33
- React.createElement(SimpleButton_1.default, { tone: "accent", "data-name": "ok", variant: "raised", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.state.promptText), onClick: () => this.onConfirmmForm() }, "OK"),
34
- React.createElement("div", { style: { flex: 1 } }),
35
- React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "raised", onClick: () => this.onCloseForm(), "data-name": "cancel" }, "Cancel")))))));
36
- }
37
- onCloseForm() {
38
- this.setState({ promptText: '' });
39
- this.props.onClose();
40
- }
41
- onConfirmmForm() {
42
- let promptText = this.state.promptText;
43
- this.setState({ promptText: '' });
44
- this.props.onConfirm(promptText);
45
- }
46
- }
47
- exports.AdaptablePopupPrompt = AdaptablePopupPrompt;
11
+ const react_redux_1 = require("react-redux");
12
+ exports.AdaptablePopupPrompt = (props) => {
13
+ var _a;
14
+ const dispatch = react_redux_1.useDispatch();
15
+ const [promptText, setPromptText] = React.useState((_a = props.defaultValue) !== null && _a !== void 0 ? _a : '');
16
+ const onCloseForm = () => {
17
+ setPromptText('');
18
+ props.onClose();
19
+ };
20
+ const onConfirmForm = () => {
21
+ props.onConfirm(promptText);
22
+ const confirmationAction = typeof props.onConfirmActionCreator === 'function' &&
23
+ props.onConfirmActionCreator(promptText);
24
+ if (confirmationAction) {
25
+ dispatch(confirmationAction);
26
+ }
27
+ setPromptText('');
28
+ };
29
+ const changeContent = (e) => {
30
+ setPromptText(e.target.value);
31
+ };
32
+ return (React.createElement(Dialog_1.default, { modal: true, "data-name": `prompt-popup`, isOpen: true, onDismiss: props.onClose, showCloseButton: false, style: { minHeight: 'auto', maxWidth: '50%' } },
33
+ React.createElement(rebass_1.Flex, { flexDirection: "column" },
34
+ React.createElement(rebass_1.Box, { marginTop: 3, mx: 2 }, props.header),
35
+ StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.message) && (React.createElement(rebass_1.Box, { marginTop: 3, mx: 2 },
36
+ ' ',
37
+ React.createElement("div", { style: { display: 'flex', alignItems: 'center' } }, props.message.split('\n').map(function (item, index) {
38
+ return (React.createElement("span", { key: index },
39
+ item,
40
+ React.createElement("br", null)));
41
+ })))),
42
+ React.createElement(Input_1.default, { autoFocus: true, marginTop: 3, mx: 3, value: promptText, type: "string", placeholder: "Enter text", onChange: (e) => changeContent(e) }),
43
+ React.createElement(rebass_1.Box, { marginTop: 3 },
44
+ React.createElement(rebass_1.Flex, { padding: 2 },
45
+ React.createElement(SimpleButton_1.default, { tone: "accent", "data-name": "ok", variant: "raised", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(promptText), onClick: () => onConfirmForm() }, "OK"),
46
+ React.createElement("div", { style: { flex: 1 } }),
47
+ React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "raised", onClick: () => onCloseForm(), "data-name": "cancel" }, "Cancel"))))));
48
+ };
@@ -14,7 +14,10 @@ const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlo
14
14
  const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
15
15
  exports.AdaptablePopupTeamSharing = (props) => {
16
16
  const { showPopup, onClose, onConfirm, header } = props;
17
- const [config, setConfig] = react_1.useState({ description: '', type: 'Snapshot' });
17
+ const [config, setConfig] = react_1.useState({
18
+ description: '',
19
+ type: 'Snapshot',
20
+ });
18
21
  return (React.createElement(React.Fragment, null,
19
22
  React.createElement(Dialog_1.default, { modal: true, "data-name": "teamsharing-popup", isOpen: showPopup, onDismiss: onClose, autoFocus: false, showCloseButton: false, style: { minHeight: 'auto', maxWidth: '50%' } },
20
23
  React.createElement(rebass_1.Flex, { flexDirection: "column" },
@@ -99,7 +99,10 @@ class ScopeComponent extends React.Component {
99
99
  };
100
100
  newScopeChoice = 'All';
101
101
  }
102
- this.setState({ ScopeChoice: newScopeChoice, componentScope: newScope }, () => this.forceUpdate());
102
+ this.setState({
103
+ ScopeChoice: newScopeChoice,
104
+ componentScope: newScope,
105
+ }, () => this.forceUpdate());
103
106
  this.props.updateScope(newScope);
104
107
  }
105
108
  onColumnsSelectedChanged(columnFriendlyNames) {
@@ -4,7 +4,7 @@ import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColum
4
4
  import { ModuleInfo } from '../../../Strategy/Interface/IModule';
5
5
  import { AdaptableObject } from '../../../types';
6
6
  export interface ModuleViewPopupProps<View> extends BaseProps<View> {
7
- popupParams: ModuleParams;
7
+ popupParams?: ModuleParams;
8
8
  onClearPopupParams: () => PopupRedux.PopupClearParamAction;
9
9
  teamSharingActivated: boolean;
10
10
  onClosePopup: () => void;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdaptableToolPanelAgGridComponent = exports.getAdaptableToolPanelAgGridComponent = exports.ConnectedAdaptableToolPanel = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const kebabCase_1 = tslib_1.__importDefault(require("lodash-es/kebabCase"));
6
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
7
7
  const ToolPanelRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ToolPanelRedux"));
8
8
  const SystemRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/SystemRedux"));
9
9
  const react_redux_1 = require("react-redux");
@@ -7,7 +7,7 @@ const react_1 = require("react");
7
7
  const AdaptableContext_1 = require("../../AdaptableContext");
8
8
  const uuid_1 = require("../../../components/utils/uuid");
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
10
- const kebabCase_1 = tslib_1.__importDefault(require("lodash-es/kebabCase"));
10
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
11
11
  exports.CustomToolPanelContent = (props) => {
12
12
  var _a;
13
13
  const { customToolPanel } = props;
@@ -19,7 +19,11 @@ exports.CustomToolPanelContent = (props) => {
19
19
  react_1.useLayoutEffect(() => {
20
20
  const node = contentsDivDomRef.current;
21
21
  if (hasCustomRenderFn(customToolPanel)) {
22
- const html = customToolPanel.render({ visible: true, node, adaptableApi: api });
22
+ const html = customToolPanel.render({
23
+ visible: true,
24
+ node,
25
+ adaptableApi: api,
26
+ });
23
27
  setContentsHTML(html);
24
28
  }
25
29
  else if (hasCustomFrameworkComponent(customToolPanel)) {
@@ -64,6 +64,7 @@ class ToolPanelPopupComponent extends React.Component {
64
64
  const selectedToolPanels = this.props.ToolPanelState.ToolPanels.map((toolPanelDefinition) => toolPanelDefinition.Name)
65
65
  // ensure that the visible state has only valid tool panels
66
66
  .filter((visibleToolPanel) => availableToolPanels.includes(visibleToolPanel));
67
+ const isToolPanelReadOnly = entitlementService.isModuleReadOnlyEntitlement('ToolPanel');
67
68
  const isModuleCheckboxDisabled = (module) => {
68
69
  if (module === 'SettingsPanel') {
69
70
  return this.props.api.internalApi.getAdaptableOptions().settingsPanelOptions
@@ -78,18 +79,19 @@ class ToolPanelPopupComponent extends React.Component {
78
79
  React.createElement(Tabs_1.Tabs.Tab, { value: ToolPanelConfigView.Buttons },
79
80
  React.createElement(Radio_1.default, { margin: 0, value: ToolPanelConfigView.Buttons, checked: this.state.ToolPanelConfigView == ToolPanelConfigView.Buttons, tabIndex: -1 }, "Module Buttons")),
80
81
  React.createElement(Tabs_1.Tabs.Content, { value: ToolPanelConfigView.ToolPanels, style: { flex: 1, overflow: 'auto' } },
81
- React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: availableToolPanels, value: selectedToolPanels, noSelectionLabel: 'No selected Tool Panel', xSelectedLabel: () => `Visible ToolPanels:`, onChange: (selectedValues) => this.onToolPanelToolPanelsChanged(selectedValues) })),
82
+ React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: availableToolPanels, value: selectedToolPanels, noSelectionLabel: 'No selected Tool Panel', xSelectedLabel: () => `Visible ToolPanels:`, onChange: (selectedValues) => this.onToolPanelToolPanelsChanged(selectedValues), disabled: isToolPanelReadOnly })),
82
83
  React.createElement(Tabs_1.Tabs.Content, { value: ToolPanelConfigView.Buttons, style: { flex: 1, overflow: 'auto' } },
83
- React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', xSelectedLabel: () => `Visible Module Buttons:`, isDisabled: isModuleCheckboxDisabled, onChange: (selectedValues) => this.props.onToolPanelSetModuleButtons(selectedValues) })))));
84
+ React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', xSelectedLabel: () => `Visible Module Buttons:`, isOptionDisabled: isModuleCheckboxDisabled, disabled: isToolPanelReadOnly, onChange: (selectedValues) => this.props.onToolPanelSetModuleButtons(selectedValues) })))));
84
85
  }
85
86
  onShowGridPropertiesChanged(event) {
86
87
  let e = event.target;
87
88
  let ToolPanelConfigView = e.value;
88
- this.setState({ ToolPanelConfigView: ToolPanelConfigView });
89
+ this.setState({
90
+ ToolPanelConfigView: ToolPanelConfigView,
91
+ });
89
92
  }
90
93
  onToolPanelToolPanelsChanged(selectedValues) {
91
- const currentSelectedToolPanelDefinitions = this.props
92
- .ToolPanelState.ToolPanels;
94
+ const currentSelectedToolPanelDefinitions = this.props.ToolPanelState.ToolPanels;
93
95
  // try to return the pre-existing definition (to maintain the previous collapsed state)
94
96
  // otherwise select the new toolPanel with the default 'collapsed' state
95
97
  let newSelectedToolPanelDefinitions = selectedValues.map((selectedToolPanel) => {
@@ -40,7 +40,7 @@ exports.ToolPanelWrapper = (props) => {
40
40
  ];
41
41
  }
42
42
  };
43
- const [toolPanelName, toolPanelHeader, toolPanelContent, moduleInfo,] = getToolPanelConfiguration();
43
+ const [toolPanelName, toolPanelHeader, toolPanelContent, moduleInfo] = getToolPanelConfiguration();
44
44
  const isMinimised = visibilityMode === 'collapsed';
45
45
  const isConfigurable =
46
46
  // only module toolPanels are configurable
@@ -15,7 +15,8 @@ export declare type ValueSelectorProps<OPTION_TYPE, ID_TYPE extends number | str
15
15
  xSelectedLabel?: (count: number) => ReactNode;
16
16
  selectionBoxPosition?: 'top' | 'bottom';
17
17
  onShowSelectedOnlyChange?: (selectedOnly: boolean) => void;
18
- isDisabled?: (option: OPTION_TYPE) => boolean;
18
+ isOptionDisabled?: (option: OPTION_TYPE) => boolean;
19
+ disabled?: boolean;
19
20
  };
20
21
  export declare function ValueSelector<OPTION_TYPE, ID_TYPE extends number | string>(props: ValueSelectorProps<OPTION_TYPE, ID_TYPE>): JSX.Element;
21
22
  export declare namespace ValueSelector {
@@ -38,7 +38,7 @@ function useValuesMap({ options, value, toIdentifier, selectedMap, }) {
38
38
  return { selectedMap: result, optionsMap };
39
39
  }
40
40
  function ValueSelector(props) {
41
- const { options, value, filter, onChange, allowReorder, singleSelect, toLabel, toIdentifier, noSelectionLabel, clearSelectionLabel, showSelectedOnlyLabel, xSelectedLabel, selectionBoxPosition = 'bottom', onShowSelectedOnlyChange, isDisabled, } = props;
41
+ const { options, value, filter, onChange, allowReorder, singleSelect, toLabel, toIdentifier, noSelectionLabel, clearSelectionLabel, showSelectedOnlyLabel, xSelectedLabel, selectionBoxPosition = 'bottom', onShowSelectedOnlyChange, isOptionDisabled, disabled, } = props;
42
42
  const [selectedOnly, doSetSelectedOnly] = react_1.useState(false);
43
43
  const setSelectedOnly = react_1.useCallback((selectedOnly) => {
44
44
  doSetSelectedOnly(selectedOnly);
@@ -74,7 +74,7 @@ function ValueSelector(props) {
74
74
  selectedMap.delete(identifier);
75
75
  }
76
76
  notifyChange();
77
- } }, label)) : (React.createElement(CheckBox_1.CheckBox, { "data-name": identifier, disabled: isDisabled ? isDisabled(option) : false, onChange: (checked) => {
77
+ } }, label)) : (React.createElement(CheckBox_1.CheckBox, { "data-name": identifier, disabled: disabled || (isOptionDisabled ? isOptionDisabled(option) : false), onChange: (checked) => {
78
78
  if (checked) {
79
79
  selectedMap.set(identifier, option);
80
80
  }
@@ -91,13 +91,13 @@ function ValueSelector(props) {
91
91
  };
92
92
  const renderSelectionSection = () => {
93
93
  const selectionBox = (React.createElement(rebass_1.Box, { fontSize: 2, style: { whiteSpace: 'nowrap', flex: 'none' } }, !value.length ? (React.createElement(React.Fragment, null, noSelectionLabel !== null && noSelectionLabel !== void 0 ? noSelectionLabel : 'No selected options',
94
- !singleSelect ? (React.createElement(SimpleButton_1.default, { px: 1, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
94
+ !singleSelect ? (React.createElement(SimpleButton_1.default, { px: 1, disabled: disabled, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
95
95
  options.forEach((option) => {
96
96
  selectedMap.set(toIdentifier(option), option);
97
97
  });
98
98
  notifyChange();
99
99
  } }, "Select all")) : null)) : (React.createElement(React.Fragment, null,
100
- React.createElement(SimpleButton_1.default, { tabIndex: 0, px: 1, mr: 1, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
100
+ React.createElement(SimpleButton_1.default, { disabled: disabled, tabIndex: 0, px: 1, mr: 1, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
101
101
  selectedMap.clear();
102
102
  notifyChange();
103
103
  } }, clearSelectionLabel !== null && clearSelectionLabel !== void 0 ? clearSelectionLabel : 'Clear selection.'),
@@ -106,7 +106,7 @@ function ValueSelector(props) {
106
106
  : `Your selected ${value.length} ${value.length > 1 ? 'options' : 'option'}.`))));
107
107
  return (React.createElement(rebass_1.Box, { mt: selectionBoxPosition === 'bottom' ? 3 : 0, mb: selectionBoxPosition === 'top' ? 3 : 0 },
108
108
  selectionBox,
109
- React.createElement(ValueOptionsTags, { options: options, value: value, selectedMap: selectedMap, toLabel: toLabel, toIdentifier: toIdentifier, onClearOption: notifyChange })));
109
+ React.createElement(ValueOptionsTags, { options: options, value: value, selectedMap: selectedMap, toLabel: toLabel, toIdentifier: toIdentifier, onClearOption: notifyChange, readOnly: disabled })));
110
110
  };
111
111
  return (React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1, className: "ab-ValueSelector", style: {
112
112
  overflow: 'hidden',
@@ -34,9 +34,9 @@ function ConditionalStyleRuleWizardSection(props) {
34
34
  React.createElement("i", null, "Scope"),
35
35
  " is 'Whole Row' - so any data change may be evaluated in a complex ObservableExpression")),
36
36
  useAggregationQuery: (React.createElement(React.Fragment, null,
37
- "Use an AggregationQuery if ",
37
+ "Use an AggregatedBooleanQuery if ",
38
38
  React.createElement("i", null, "Scope"),
39
- " is 'Whole Row' - so any data change may be evaluated in a complex AggregationExpression")),
39
+ " is 'Whole Row' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
40
40
  } })));
41
41
  }
42
42
  exports.ConditionalStyleRuleWizardSection = ConditionalStyleRuleWizardSection;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { ConditionalStyle } from '../../../../types';
3
+ export declare const renderConditionalStyleSettingsSummary: (data: ConditionalStyle) => JSX.Element;
4
+ interface ConditionalStyleSettingsWizardSettingsProps {
5
+ onChange: (data: ConditionalStyle) => void;
6
+ }
7
+ export declare const ConditionalStyleSettingsWizardSettings: React.FunctionComponent<ConditionalStyleSettingsWizardSettingsProps>;
8
+ export {};