@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.
- package/agGrid.d.ts +1 -1
- package/agGrid.js +3 -3
- package/base.css +138 -68
- package/bundle.cjs.js +131 -127
- package/index.css +140 -68
- package/package.json +33 -33
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -2
- package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +2 -2
- package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
- package/src/AdaptableOptions/QueryLanguageOptions.d.ts +3 -7
- package/src/AdaptableOptions/StateOptions.d.ts +2 -1
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -3
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
- package/src/Api/AdaptableApi.d.ts +6 -0
- package/src/Api/AlertApi.d.ts +2 -3
- package/src/Api/ColumnApi.d.ts +0 -4
- package/src/Api/EventApi.d.ts +8 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
- package/src/Api/FreeTextColumnApi.d.ts +0 -12
- package/src/Api/GridApi.d.ts +5 -4
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +19 -10
- package/src/Api/Implementation/ApiBase.d.ts +2 -0
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ColumnApiImpl.js +0 -5
- package/src/Api/Implementation/DashboardApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
- package/src/Api/Implementation/GridApiImpl.d.ts +5 -4
- package/src/Api/Implementation/GridApiImpl.js +4 -0
- package/src/Api/Implementation/InternalApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +12 -1
- package/src/Api/Implementation/QueryApiImpl.js +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.js +6 -7
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/OpenFinApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +29 -0
- package/src/Api/QueryLanguageApi.d.ts +10 -10
- package/src/Api/SettingsPanelApi.d.ts +17 -0
- package/src/Api/SettingsPanelApi.js +2 -0
- package/src/Api/UserInterfaceApi.d.ts +5 -2
- package/src/PredefinedConfig/AlertState.d.ts +4 -6
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -1
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.js +3 -3
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -2
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
- package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +5 -2
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
- package/src/PredefinedConfig/SystemState.d.ts +2 -1
- package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
- package/src/Redux/ActionsReducers/GridRedux.js +3 -1
- package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
- package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +18 -6
- package/src/Strategy/AlertModule.js +14 -4
- package/src/Strategy/ConditionalStyleModule.js +4 -0
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +34 -18
- package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
- package/src/Strategy/FreeTextColumnModule.js +10 -0
- package/src/Strategy/LayoutModule.js +1 -6
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +5 -3
- package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +3 -1
- package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +0 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -6
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +7 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +42 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
- package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +36 -0
- package/src/Utilities/ExpressionFunctions/groupingMap.js +104 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
- package/src/Utilities/Helpers/CalendarHelper.js +220 -55
- package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
- package/src/Utilities/ObjectFactory.js +5 -2
- package/src/Utilities/Services/AlertService.js +3 -3
- package/src/Utilities/Services/DataService.js +6 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -2
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
- package/src/Utilities/Services/QueryLanguageService.js +21 -16
- package/src/Utilities/Services/ReportService.js +7 -3
- package/src/Utilities/Services/TeamSharingService.js +5 -3
- package/src/View/AdaptablePopover/index.js +6 -1
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
- package/src/View/AdaptableWizardView/helper.js +5 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/EntityRulesEditor/index.js +9 -9
- package/src/View/Components/FilterForm/FilterForm.js +0 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +8 -7
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/ModuleValueSelector/index.js +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -87
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
- package/src/View/Components/ScopeComponent.js +4 -1
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +6 -2
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +7 -5
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
- package/src/View/Components/ValueSelector/index.d.ts +2 -1
- package/src/View/Components/ValueSelector/index.js +5 -5
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +17 -5
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +17 -5
- package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
- package/src/View/Dashboard/Dashboard.js +5 -5
- package/src/View/Dashboard/DashboardPopup.js +8 -6
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
- package/src/View/Export/Wizard/NewReportWizard.js +13 -3
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -4
- package/src/View/Filter/FilterViewPanel.js +1 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -5
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +11 -6
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +12 -5
- package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +5 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
- package/src/View/Query/ExpandedQueryPopup.js +9 -2
- package/src/View/Query/QueryViewPanel.js +15 -10
- package/src/View/Query/Wizard/NamedQueryWizard.js +6 -4
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
- package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/UIHelper.js +4 -1
- package/src/View/Wizard/AdaptableWizard.js +13 -4
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +6 -2
- package/src/agGrid/Adaptable.d.ts +2 -5
- package/src/agGrid/Adaptable.js +127 -75
- package/src/agGrid/agGridHelper.js +3 -8
- package/src/agGrid/agGridMenuHelper.js +5 -9
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/ApplicationIcon.d.ts +1 -0
- package/src/components/ApplicationIcon.js +2 -2
- package/src/components/Dashboard/Dashboard.js +4 -1
- package/src/components/Dashboard/DashboardManager.d.ts +5 -3
- package/src/components/Dashboard/DashboardManager.js +33 -27
- package/src/components/Dropdown/index.js +8 -1
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.js +4 -2
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +4 -1
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +12 -5
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/Overlay.js +1 -1
- package/src/components/SizedContainer/index.js +7 -1
- package/src/components/WindowModal/WindowModal.js +4 -1
- package/src/metamodel/adaptable.metamodel.d.ts +75 -24
- package/src/metamodel/adaptable.metamodel.js +223 -115
- package/src/types.d.ts +6 -3
- package/themes/dark.css +4 -4
- package/version.d.ts +1 -1
- 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
|
-
|
|
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(
|
|
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 = (
|
|
32
|
+
const items = (_b = props.module) === null || _b === void 0 ? void 0 : _b.toViewAll();
|
|
24
33
|
const moduleViewProperties = props.module.getViewProperties();
|
|
25
|
-
const EditWizard = (
|
|
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 ((
|
|
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
|
-
|
|
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
|
-
}, [
|
|
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
|
|
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 =
|
|
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 = (
|
|
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:
|
|
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,
|
|
28
|
+
React.createElement(rebass_1.Text, { className: `${baseClassName}__Title` }, props.children)));
|
|
28
29
|
};
|
|
29
30
|
exports.default = exports.TopBar;
|
|
@@ -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({
|
|
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
|
-
|
|
3
|
-
|
|
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
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
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({
|
|
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({
|
|
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
|
|
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
|
|
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
|
|
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({
|
|
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:`,
|
|
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({
|
|
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
|
|
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
|
-
|
|
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,
|
|
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:
|
|
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
|
|
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
|
|
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 {};
|