@adaptabletools/adaptable 11.0.0-canary.1 → 11.0.0-canary.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +138 -68
- package/bundle.cjs.js +97 -93
- 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 +10 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
- 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 +0 -4
- 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 +2 -2
- package/src/Api/AdaptableApi.d.ts +1 -0
- package/src/Api/AlertApi.d.ts +2 -3
- 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/AlertApiImpl.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +15 -9
- package/src/Api/Implementation/ApiBase.d.ts +2 -0
- package/src/Api/Implementation/ApiBase.js +3 -0
- 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.js +4 -5
- 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/UserInterfaceApi.d.ts +5 -2
- package/src/PredefinedConfig/AlertState.d.ts +2 -4
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -1
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- 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 +5 -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 +6 -4
- package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- 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/DataService.js +6 -1
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +16 -11
- 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 +3 -1
- 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/BaseAlertRulesWizardSection.d.ts +2 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +1 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +15 -4
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- 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/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 +16 -4
- 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 +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -5
- 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 +3 -1
- 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 +126 -73
- package/src/agGrid/agGridHelper.js +2 -3
- 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.js +3 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +4 -1
- package/src/components/ExpressionEditor/index.js +9 -2
- 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 +64 -24
- package/src/metamodel/adaptable.metamodel.js +187 -99
- package/src/types.d.ts +4 -2
- package/themes/dark.css +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -17,7 +17,12 @@ class AdaptablePopover extends React.Component {
|
|
|
17
17
|
const title = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.headerText)
|
|
18
18
|
? this.props.headerText
|
|
19
19
|
: '';
|
|
20
|
-
const popoverClickRootClose = (React.createElement(rebass_1.Box, { className: "ab-Popover", style: {
|
|
20
|
+
const popoverClickRootClose = (React.createElement(rebass_1.Box, { className: "ab-Popover", style: {
|
|
21
|
+
margin: '0px',
|
|
22
|
+
padding: '0px',
|
|
23
|
+
minWidth: popoverMinWidth,
|
|
24
|
+
maxWidth: 300,
|
|
25
|
+
} },
|
|
21
26
|
title ? (React.createElement(rebass_1.Text, { fontSize: 2, padding: 2 },
|
|
22
27
|
React.createElement("b", null, title))) : null,
|
|
23
28
|
React.createElement(rebass_1.Box, { padding: 2 }, this.props.bodyText.map((textOrHTML, index) => (React.createElement("span", { key: index }, textOrHTML))))));
|
|
@@ -22,7 +22,7 @@ class AdaptableView extends React.Component {
|
|
|
22
22
|
return (React.createElement("div", null,
|
|
23
23
|
this.props.AdaptableApi.internalApi.getModuleService().isModuleAvailable('Dashboard') && (React.createElement(Dashboard_1.Dashboard, { api: this.props.AdaptableApi })),
|
|
24
24
|
React.createElement(AdaptableLoadingScreen_1.AdaptableLoadingScreen, { onClose: this.props.onCloseLoadingPopup, showLoadingScreen: this.props.PopupState.LoadingPopup.ShowLoadingPopup }),
|
|
25
|
-
React.createElement(AdaptablePopupPrompt_1.AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup,
|
|
25
|
+
this.props.PopupState.PromptPopup.ShowPromptPopup && (React.createElement(AdaptablePopupPrompt_1.AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup, onConfirmActionCreator: this.props.PopupState.PromptPopup.ConfirmActionCreator, defaultValue: this.props.PopupState.PromptPopup.DefaultValue })),
|
|
26
26
|
React.createElement(AdaptablePopupConfirmation_1.AdaptablePopupConfirmation, { header: this.props.PopupState.ConfirmationPopup.Header, messsage: this.props.PopupState.ConfirmationPopup.Msg, showPopup: this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup, cancelButtonText: this.props.PopupState.ConfirmationPopup.CancelButtonText, confirmButtonText: this.props.PopupState.ConfirmationPopup.ConfirmButtonText, onCancel: this.props.onCancelConfirmationPopup, onConfirm: this.props.onConfirmConfirmationPopup, showInputBox: this.props.PopupState.ConfirmationPopup.ShowInputBox, messageType: this.props.PopupState.ConfirmationPopup.MessageType, api: this.props.AdaptableApi }),
|
|
27
27
|
Boolean(this.props.PopupState.ScreenPopup.ShowScreenPopup) && (React.createElement(AdaptablePopup_1.AdaptablePopup, { componentName: this.props.PopupState.ScreenPopup.ComponentName, componentModule: this.props.PopupState.ScreenPopup.ComponentModule, onHide: this.props.onCloseScreenPopup, api: this.props.AdaptableApi, onClearParams: () => this.props.onClearPopupParams(), moduleParams: this.props.PopupState.ScreenPopup.Params, moduleProps: this.props.PopupState.ScreenPopup.PopupProps })),
|
|
28
28
|
React.createElement(ExportCustomDestinationFormPopups_1.ExportCustomDestinationFormPopups, { api: this.props.AdaptableApi }),
|
|
@@ -26,7 +26,11 @@ const dataTypes = [
|
|
|
26
26
|
label: 'Boolean',
|
|
27
27
|
},
|
|
28
28
|
];
|
|
29
|
-
const inputStyle = {
|
|
29
|
+
const inputStyle = {
|
|
30
|
+
width: '100%',
|
|
31
|
+
minWidth: 50,
|
|
32
|
+
textAlign: 'start',
|
|
33
|
+
};
|
|
30
34
|
const useForceRender = () => {
|
|
31
35
|
const [, setNow] = react_1.useState(Date.now());
|
|
32
36
|
return () => {
|
|
@@ -9,6 +9,7 @@ const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
|
9
9
|
const rebass_1 = require("rebass");
|
|
10
10
|
const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
|
|
11
11
|
const ConfigurationForm = (props) => {
|
|
12
|
+
var _a;
|
|
12
13
|
let abOptions = props.adaptableOptions;
|
|
13
14
|
const layoutOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.layoutOptions), abOptions.layoutOptions);
|
|
14
15
|
const generalOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.generalOptions), abOptions.generalOptions);
|
|
@@ -37,10 +38,12 @@ const ConfigurationForm = (props) => {
|
|
|
37
38
|
props.onChangeadaptableOptions(abOptions);
|
|
38
39
|
} })),
|
|
39
40
|
React.createElement(FormLayout_1.FormRow, { label: "Show Quick Filter" },
|
|
40
|
-
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.floatingFilter, onChange: (floatingFilter) => {
|
|
41
|
+
React.createElement(CheckBox_1.CheckBox, { checked: (_a = gridOptions.defaultColDef) === null || _a === void 0 ? void 0 : _a.floatingFilter, onChange: (floatingFilter) => {
|
|
41
42
|
abOptions = Object.assign({}, abOptions);
|
|
42
43
|
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
43
|
-
abOptions.gridOptions.
|
|
44
|
+
abOptions.gridOptions.defaultColDef = {
|
|
45
|
+
floatingFilter,
|
|
46
|
+
};
|
|
44
47
|
props.onChangeadaptableOptions(abOptions);
|
|
45
48
|
} })),
|
|
46
49
|
React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
|
|
@@ -43,7 +43,10 @@ const ConfigurationDialog = (props) => {
|
|
|
43
43
|
setCurrentStep(1);
|
|
44
44
|
};
|
|
45
45
|
const stepOne = (React.createElement(React.Fragment, null,
|
|
46
|
-
React.createElement(Panel_1.default, { header: 'Configure AdapTable', border: "none", bodyScroll: false, bodyProps: {
|
|
46
|
+
React.createElement(Panel_1.default, { header: 'Configure AdapTable', border: "none", bodyScroll: false, bodyProps: {
|
|
47
|
+
padding: 0,
|
|
48
|
+
style: { overflow: 'auto', display: 'flex', flexFlow: 'column' },
|
|
49
|
+
}, borderRadius: "none", style: { fontSize: 16, flex: 1 } },
|
|
47
50
|
React.createElement(Panel_1.default, { border: "none" },
|
|
48
51
|
React.createElement(FormLayout_1.default, null,
|
|
49
52
|
React.createElement(FormLayout_1.FormRow, { label: "AdaptableId" },
|
|
@@ -80,9 +80,11 @@ exports.prepareGridOptions = (dataSourceInfo) => {
|
|
|
80
80
|
};
|
|
81
81
|
});
|
|
82
82
|
const gridOptions = {
|
|
83
|
+
defaultColDef: {
|
|
84
|
+
floatingFilter: true,
|
|
85
|
+
},
|
|
83
86
|
rowData: dataSourceInfo.data,
|
|
84
87
|
columnDefs,
|
|
85
|
-
floatingFilter: true,
|
|
86
88
|
enableRangeSelection: true,
|
|
87
89
|
rowSelection: 'multiple',
|
|
88
90
|
rowHeight: 30,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AlertButton } from '../../../PredefinedConfig/AlertState';
|
|
3
3
|
import { AdaptableAlert } from '../../../PredefinedConfig/Common/AdaptableAlert';
|
|
4
4
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
5
|
-
import { AlertButtonContext } from '../../../
|
|
5
|
+
import { AlertButtonContext } from '../../../types';
|
|
6
6
|
declare type AlertButtonsEditorProps = {
|
|
7
7
|
AlertButtons: AlertButton<AlertButtonContext>[];
|
|
8
8
|
onChange: (buttons: AlertButton<AlertButtonContext>[]) => void;
|
|
@@ -94,7 +94,11 @@ exports.AlertButtonsEditor = (props) => {
|
|
|
94
94
|
' ',
|
|
95
95
|
StringExtensions_1.default.CapitaliseFirstLetter((_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'raised'))),
|
|
96
96
|
React.createElement(DropdownButton_1.default, { columns: ['label'], marginLeft: 2, style: { minWidth: 120 }, items: [
|
|
97
|
-
{
|
|
97
|
+
{
|
|
98
|
+
label: 'Use Alert Tone',
|
|
99
|
+
value: 'text',
|
|
100
|
+
onClick: () => setTone(null),
|
|
101
|
+
},
|
|
98
102
|
...['success', 'info', 'error', 'warning', 'accent', 'neutral'].map((tone) => {
|
|
99
103
|
return {
|
|
100
104
|
label: StringExtensions_1.default.CapitaliseFirstLetter(tone),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
|
|
3
3
|
declare type AlertRulesWizardSectionProps = {
|
|
4
4
|
onChange: (data: AlertDefinition) => void;
|
|
5
|
-
module: 'alert'
|
|
5
|
+
module: 'alert';
|
|
6
6
|
};
|
|
7
7
|
export declare const AlertRulesWizardSection: (props: AlertRulesWizardSectionProps) => JSX.Element;
|
|
8
8
|
export declare const renderAlertRulesSummary: (alertDefinition: AlertDefinition) => JSX.Element;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlertDefinition } from '../../../types';
|
|
3
|
-
import { FlashingCellDefinition } from '../../../../types';
|
|
4
3
|
export interface BaseAlertRulesWizardSectionProps<T> {
|
|
5
4
|
onChange: (data: T) => void;
|
|
6
|
-
module: 'alert'
|
|
5
|
+
module: 'alert';
|
|
7
6
|
wholeRowScope?: boolean;
|
|
8
7
|
children?: React.ReactNode;
|
|
9
8
|
}
|
|
10
|
-
export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition
|
|
9
|
+
export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition>(props: BaseAlertRulesWizardSectionProps<T>) => JSX.Element;
|
|
@@ -8,9 +8,7 @@ const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
|
|
|
8
8
|
exports.BaseAlertRulesWizardSection = (props) => {
|
|
9
9
|
const { data, api, moduleInfo } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
10
10
|
const wholeRowScope = props.wholeRowScope != null ? props.wholeRowScope : api.scopeApi.scopeIsAll(data.Scope);
|
|
11
|
-
const predicateDefs =
|
|
12
|
-
? api.alertApi.getAlertPredicateDefsForScope(data.Scope)
|
|
13
|
-
: api.flashingCellApi.getFlashingCellPredicateDefsForScope(data.Scope);
|
|
11
|
+
const predicateDefs = api.alertApi.getAlertPredicateDefsForScope(data.Scope);
|
|
14
12
|
return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: !wholeRowScope ? false : true, showObservable: !wholeRowScope ? false : true, showBoolean: true, showPredicate: true, descriptions: {
|
|
15
13
|
selectPredicate: 'Select an Alert Rule - to be applied when data changes',
|
|
16
14
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
@@ -14,15 +14,26 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
14
14
|
const react_redux_1 = require("react-redux");
|
|
15
15
|
const CalculatedColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CalculatedColumnRedux"));
|
|
16
16
|
exports.CalculatedColumnWizard = (props) => {
|
|
17
|
+
var _a;
|
|
17
18
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
19
|
+
const allCalculatedColumns = react_redux_1.useSelector((state) => state.CalculatedColumn.CalculatedColumns);
|
|
18
20
|
const [calculatedColumn, setCalculatedColumn] = react_1.useState(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
var _a;
|
|
22
|
+
if (props.data) {
|
|
23
|
+
return Helper_1.cloneObject(props.data);
|
|
24
|
+
}
|
|
25
|
+
if ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.column) {
|
|
26
|
+
const calculatedColumn = allCalculatedColumns.find((calculatedColumn) => calculatedColumn.ColumnId === props.popupParams.column.columnId);
|
|
27
|
+
if (calculatedColumn) {
|
|
28
|
+
return calculatedColumn;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return ObjectFactory_1.default.CreateEmptyCalculatedColumn(adaptable.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns);
|
|
21
32
|
});
|
|
22
33
|
const dispatch = react_redux_1.useDispatch();
|
|
23
|
-
const isEdit = Boolean(props.data);
|
|
34
|
+
const isEdit = Boolean(props.data) || ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit';
|
|
24
35
|
const handleFinish = () => {
|
|
25
|
-
if (
|
|
36
|
+
if (isEdit) {
|
|
26
37
|
dispatch(CalculatedColumnRedux.CalculatedColumnEdit(calculatedColumn));
|
|
27
38
|
}
|
|
28
39
|
else {
|
|
@@ -38,8 +38,7 @@ class CellSummaryViewPanelComponent extends React.Component {
|
|
|
38
38
|
onClick: () => this.props.onCellSummaryOperationChange(summaryOperation),
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
|
-
const cellSummaryOperationDefinitions = this.props.api.internalApi.getAdaptableOptions()
|
|
42
|
-
.generalOptions.cellSummaryOperations;
|
|
41
|
+
const cellSummaryOperationDefinitions = this.props.api.internalApi.getAdaptableOptions().generalOptions.cellSummaryOperations;
|
|
43
42
|
const operationDefinitions = ArrayExtensions_1.default.IsNullOrEmpty(cellSummaryOperationDefinitions)
|
|
44
43
|
? []
|
|
45
44
|
: cellSummaryOperationDefinitions.map((operationDefinition) => {
|
|
@@ -45,13 +45,16 @@ exports.AdaptableObjectListItem = (props) => {
|
|
|
45
45
|
};
|
|
46
46
|
const hasSuspend = Boolean(viewOptions.getSuspendAction);
|
|
47
47
|
const actions = (_e = (_d = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.actions) === null || _d === void 0 ? void 0 : _d.map) === null || _e === void 0 ? void 0 : _e.call(_d, (component, index) => {
|
|
48
|
-
return React.createElement(component, {
|
|
48
|
+
return React.createElement(component, {
|
|
49
|
+
data: props.data.abObject,
|
|
50
|
+
key: index,
|
|
51
|
+
});
|
|
49
52
|
});
|
|
50
53
|
const iconSize = 26;
|
|
51
54
|
return (React.createElement(rebass_1.Flex, { as: "li", mb: 3, className: itemClassName },
|
|
52
55
|
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__rows` }, (_f = props.data.items) === null || _f === void 0 ? void 0 : _f.map((tag, index) => {
|
|
53
56
|
var _a;
|
|
54
|
-
return (React.createElement(rebass_1.Flex, { key: index, mb: 2, className: `${baseClassName}__row` },
|
|
57
|
+
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${baseClassName}__row` },
|
|
55
58
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
|
|
56
59
|
tag.label || tag.name,
|
|
57
60
|
EditWizard && (React.createElement(SimpleButton_1.default, { accessLevel: accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const FilterRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FilterRedux"));
|
|
8
|
-
const PopupRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PopupRedux"));
|
|
9
8
|
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
10
9
|
const ListBoxFilterForm_1 = require("./ListBoxFilterForm");
|
|
11
10
|
const ButtonClose_1 = require("../Buttons/ButtonClose");
|
|
@@ -276,7 +275,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
276
275
|
onAddColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterAdd(columnFilter)),
|
|
277
276
|
onEditColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterEdit(columnFilter)),
|
|
278
277
|
onSetColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterSet(columnFilter)),
|
|
279
|
-
onShowPrompt: (prompt) => dispatch(PopupRedux.PopupShowPrompt(prompt)),
|
|
280
278
|
onHideFilterForm: () => dispatch(FilterRedux.FilterFormHide()),
|
|
281
279
|
};
|
|
282
280
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.QuickFilterFormReact = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const debounce_1 = tslib_1.__importDefault(require("lodash
|
|
6
|
+
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
7
|
const FilterRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FilterRedux"));
|
|
8
8
|
const react_redux_1 = require("react-redux");
|
|
9
9
|
const ObjectFactory_1 = require("../../../Utilities/ObjectFactory");
|
|
@@ -16,7 +16,7 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Ex
|
|
|
16
16
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
|
|
17
17
|
const renderWithAdaptableContext_1 = require("../../renderWithAdaptableContext");
|
|
18
18
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
19
|
-
const isEqual_1 = tslib_1.__importDefault(require("lodash
|
|
19
|
+
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
20
20
|
const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
|
|
21
21
|
const getDefaultColumnFilterPredicate_1 = require("./getDefaultColumnFilterPredicate");
|
|
22
22
|
class QuickFilterFormComponent extends React.Component {
|
|
@@ -106,14 +106,12 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
106
106
|
hideEvent = 'blur';
|
|
107
107
|
}
|
|
108
108
|
let showQuickFilterDropdown = true;
|
|
109
|
-
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
110
|
-
.filterOptions.hideQuickFilterDropdown;
|
|
109
|
+
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterDropdown;
|
|
111
110
|
if (hideQuickFilterDropdownFunction) {
|
|
112
111
|
showQuickFilterDropdown = !hideQuickFilterDropdownFunction(this.props.currentColumn);
|
|
113
112
|
}
|
|
114
113
|
let showQuickFilterInput = true;
|
|
115
|
-
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
116
|
-
.filterOptions.hideQuickFilterInput;
|
|
114
|
+
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterInput;
|
|
117
115
|
if (hideQuickFilterInputFunction) {
|
|
118
116
|
showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
|
|
119
117
|
}
|
|
@@ -132,7 +130,10 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
132
130
|
predicateDefs.map((p) => (React.createElement(SimpleButton_1.default, { key: p.id, p: 2, variant: "text", tone: (filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) === p.id ? 'info' : 'none', onClick: () => this.selectColumnPredicate(p.id) },
|
|
133
131
|
React.createElement("span", { style: { width: 20, marginRight: 10 } }, this.renderPredicateIcon(p)),
|
|
134
132
|
p.label))))) },
|
|
135
|
-
React.createElement(SimpleButton_1.default, { style: {
|
|
133
|
+
React.createElement(SimpleButton_1.default, { style: {
|
|
134
|
+
borderRadius: 0,
|
|
135
|
+
borderColor: 'var(--ab-color-primarydark)',
|
|
136
|
+
} }, this.renderPredicateIcon(activePredicateDef)))),
|
|
136
137
|
showQuickFilterInput && this.renderLabel(filter, activePredicateDef),
|
|
137
138
|
showQuickFilterInput && this.renderPredicateInput(activePredicateDef, filter)));
|
|
138
139
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
|
|
2
2
|
import { SystemFilterPredicateId } from '../../../PredefinedConfig/FilterState';
|
|
3
|
-
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "
|
|
3
|
+
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "Before" | "After" | "Today" | "Yesterday" | "Tomorrow" | "Values" | "Blanks" | "NonBlanks" | "GreaterThan" | "LessThan" | "Positive" | "Negative" | "Zero" | "Equals" | "NotEquals" | "Between" | "NotBetween" | "Is" | "IsNot" | "Contains" | "NotContains" | "StartsWith" | "EndsWith" | "Regex" | "ThisWeek" | "ThisMonth" | "ThisQuarter" | "ThisYear" | "InPast" | "InFuture" | "On" | "NotOn" | "NextWorkDay" | "LastWorkDay" | "InRange" | "True" | "False" | "BooleanToggle" | ((column: AdaptableColumn) => SystemFilterPredicateId)) => SystemFilterPredicateId;
|
|
@@ -30,5 +30,5 @@ exports.ModuleValueSelector = (props) => {
|
|
|
30
30
|
const sortedOptions = react_1.useMemo(() => {
|
|
31
31
|
return sortWithOrder_1.sortWithOrderArray(options, value, { sortUnorderedItems: true });
|
|
32
32
|
}, [allowReorder, options, value]);
|
|
33
|
-
return (React.createElement(ValueSelector_1.ValueSelector, Object.assign({}, valueSelectorProps, { options: sortedOptions, value: value, onChange: onChange, allowReorder: allowReorder, toIdentifier: (module) => module, toLabel: (module) => moduleLabelMap.get(module), selectionBoxPosition: selectionBoxPosition,
|
|
33
|
+
return (React.createElement(ValueSelector_1.ValueSelector, Object.assign({}, valueSelectorProps, { options: sortedOptions, value: value, onChange: onChange, allowReorder: allowReorder, toIdentifier: (module) => module, toLabel: (module) => moduleLabelMap.get(module), selectionBoxPosition: selectionBoxPosition, isOptionDisabled: props.isOptionDisabled, disabled: props.disabled })));
|
|
34
34
|
};
|
|
@@ -148,7 +148,7 @@ export declare const PanelWithImage: React.ForwardRefExoticComponent<{
|
|
|
148
148
|
'aria-rowspan'?: number;
|
|
149
149
|
'aria-selected'?: boolean | "false" | "true";
|
|
150
150
|
'aria-setsize'?: number;
|
|
151
|
-
'aria-sort'?: "none" | "
|
|
151
|
+
'aria-sort'?: "none" | "other" | "ascending" | "descending";
|
|
152
152
|
'aria-valuemax'?: number;
|
|
153
153
|
'aria-valuemin'?: number;
|
|
154
154
|
'aria-valuenow'?: number;
|
|
@@ -3,9 +3,6 @@ import * as PopupRedux from '../../../../Redux/ActionsReducers/PopupRedux';
|
|
|
3
3
|
import { ModuleParams } from '../../SharedProps/ModuleViewPopupProps';
|
|
4
4
|
import { AdaptableModule } from '../../../../PredefinedConfig/Common/Types';
|
|
5
5
|
import { AdaptableApi } from '../../../../Api/AdaptableApi';
|
|
6
|
-
/**
|
|
7
|
-
* This is the main popup that we use - so all Module popups will appear here.
|
|
8
|
-
*/
|
|
9
6
|
export interface AdaptablePopupProps {
|
|
10
7
|
componentName?: string;
|
|
11
8
|
componentModule: AdaptableModule;
|
|
@@ -4,100 +4,65 @@ exports.AdaptablePopup = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
|
-
const react_redux_1 = require("react-redux");
|
|
8
|
-
const PopupRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/PopupRedux"));
|
|
9
7
|
const GeneralConstants = tslib_1.__importStar(require("../../../../Utilities/Constants/GeneralConstants"));
|
|
10
8
|
const TopBar_1 = tslib_1.__importDefault(require("./TopBar"));
|
|
11
9
|
const join_1 = tslib_1.__importDefault(require("../../../../components/utils/join"));
|
|
12
10
|
const Navigation_1 = require("./Navigation");
|
|
13
11
|
const PopupContext_1 = tslib_1.__importDefault(require("./PopupContext"));
|
|
14
12
|
const AdaptablePopupBody_1 = require("./AdaptablePopupBody");
|
|
15
|
-
const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
|
|
16
|
-
const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
|
|
17
|
-
const Utilities_1 = require("./Utilities");
|
|
18
13
|
const DefaultSettingsPanel_1 = require("../../../../Utilities/Defaults/DefaultSettingsPanel");
|
|
19
14
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
20
15
|
const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
|
|
16
|
+
const useMenuItems_1 = require("./useMenuItems");
|
|
17
|
+
const AdaptablePopupDialog_1 = require("./AdaptablePopupDialog");
|
|
21
18
|
exports.AdaptablePopup = (props) => {
|
|
22
|
-
var _a, _b
|
|
19
|
+
var _a, _b;
|
|
23
20
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
24
|
-
const dispatch = react_redux_1.useDispatch();
|
|
25
21
|
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
26
22
|
const settingsPanelTitle = adaptable.api.internalApi.getModuleFriendlyName('SettingsPanel');
|
|
27
|
-
|
|
28
|
-
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; });
|
|
29
|
-
const menuItems = React.useMemo(() => {
|
|
30
|
-
var _a;
|
|
31
|
-
let navigationItems = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.navigation) === null || _a === void 0 ? void 0 : _a.items;
|
|
32
|
-
if (!navigationItems) {
|
|
33
|
-
navigationItems = [...DefaultSettingsPanel_1.DEFAULT_NAVIGATION_ITEMS];
|
|
34
|
-
if (settingsPanelOptions.customSettingsPanels) {
|
|
35
|
-
navigationItems.push(...settingsPanelOptions.customSettingsPanels.map((panel) => panel.name));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const visibleItems = allMenuItems.filter((item) => item.module !== 'General' && !DefaultSettingsPanel_1.ACTION_POPUPS.includes(item.module) && item.isVisible);
|
|
39
|
-
return navigationItems
|
|
40
|
-
.map((moduleName) => {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
if (moduleName === '-') {
|
|
43
|
-
return moduleName;
|
|
44
|
-
}
|
|
45
|
-
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);
|
|
46
|
-
let customPanelMenuItem = null;
|
|
47
|
-
if (customSettingsPanel) {
|
|
48
|
-
customPanelMenuItem = {
|
|
49
|
-
label: customSettingsPanel.name,
|
|
50
|
-
isVisible: true,
|
|
51
|
-
reduxAction: PopupRedux.PopupShowScreen(null, customSettingsPanel.name, null, {
|
|
52
|
-
isCustomSettingsPanel: true,
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
|
|
57
|
-
})
|
|
58
|
-
.filter(Boolean);
|
|
59
|
-
}, [allMenuItems]);
|
|
60
|
-
const isCustomSettingsPanel = (_a = props.moduleProps) === null || _a === void 0 ? void 0 : _a.isCustomSettingsPanel;
|
|
61
|
-
const customSettingsPanel = isCustomSettingsPanel &&
|
|
62
|
-
settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === props.componentName);
|
|
63
|
-
let componentModule = props.componentModule;
|
|
64
|
-
// When it is opened without specifying a module
|
|
65
|
-
const firstMenuItem = (_b = menuItems.find((menuItem) => menuItem !== '-')) === null || _b === void 0 ? void 0 : _b.module;
|
|
66
|
-
if (!customSettingsPanel && !props.componentModule && firstMenuItem !== 'General') {
|
|
67
|
-
componentModule = firstMenuItem;
|
|
68
|
-
}
|
|
69
|
-
const accessLevel = props.api.internalApi
|
|
70
|
-
.getEntitlementService()
|
|
71
|
-
.getEntitlementAccessLevelForModule(componentModule);
|
|
72
|
-
const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
|
|
73
|
-
const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
|
|
74
|
-
// action popups + non-primary module popups
|
|
75
|
-
const isActionModule = DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
|
|
76
|
-
(props.componentName && props.componentName !== moduleInfo.Popup);
|
|
77
|
-
const baseClassName = 'ab-Adaptable-Popup';
|
|
78
|
-
const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.popupType) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
|
|
23
|
+
const menuItems = useMenuItems_1.useMenuItems();
|
|
79
24
|
const isWindowModal = settingsPanelOptions.popupType === 'window';
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
25
|
+
const modalContainer = (_b = (_a = adaptable.adaptableOptions) === null || _a === void 0 ? void 0 : _a.containerOptions) === null || _b === void 0 ? void 0 : _b.modalContainer;
|
|
26
|
+
let friendlyName = null;
|
|
27
|
+
let isActionModule = false;
|
|
28
|
+
let moduleViewContent = null;
|
|
29
|
+
let activeItem = null;
|
|
30
|
+
let accessLevel = 'Full';
|
|
31
|
+
const firstMenuItem = menuItems.find((menuItem) => menuItem !== '-');
|
|
32
|
+
const firstMenuModule = firstMenuItem === null || firstMenuItem === void 0 ? void 0 : firstMenuItem.module;
|
|
33
|
+
let componentModule = props.componentModule;
|
|
34
|
+
let componentName = props.componentName;
|
|
35
|
+
// ts forces to check for General, there is no menu item General
|
|
36
|
+
const useFirstItem = !props.componentModule;
|
|
37
|
+
if (useFirstItem && firstMenuModule !== 'General') {
|
|
38
|
+
componentModule = firstMenuModule;
|
|
83
39
|
}
|
|
84
|
-
|
|
85
|
-
|
|
40
|
+
const isCustomSettingsPanel = componentModule === 'CustomSettingsPanelModule';
|
|
41
|
+
if (isCustomSettingsPanel) {
|
|
42
|
+
if (useFirstItem) {
|
|
43
|
+
componentName = firstMenuItem.label;
|
|
44
|
+
}
|
|
45
|
+
const customSettingsPanel = settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === componentName);
|
|
46
|
+
friendlyName = customSettingsPanel.name;
|
|
47
|
+
activeItem = customSettingsPanel.name;
|
|
48
|
+
moduleViewContent = React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel });
|
|
86
49
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
50
|
+
else {
|
|
51
|
+
const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
|
|
52
|
+
const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
|
|
53
|
+
accessLevel = props.api.internalApi
|
|
54
|
+
.getEntitlementService()
|
|
55
|
+
.getEntitlementAccessLevelForModule(componentModule);
|
|
56
|
+
friendlyName = moduleInfo.FriendlyName;
|
|
57
|
+
isActionModule =
|
|
58
|
+
moduleInfo &&
|
|
59
|
+
(DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
|
|
60
|
+
(props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
|
|
61
|
+
activeItem = moduleInfo.ModuleName;
|
|
62
|
+
moduleViewContent = (React.createElement(AdaptablePopupBody_1.AdaptablePopupBody, { api: props.api, module: module, componentName: props.componentName, moduleParams: props.moduleParams, onClearParams: props.onClearParams, onHide: props.onHide }));
|
|
97
63
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
};
|
|
64
|
+
const baseClassName = 'ab-Adaptable-Popup';
|
|
65
|
+
const className = join_1.default(baseClassName, `${baseClassName}--${isWindowModal ? 'window' : 'modal'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
|
|
101
66
|
return (React.createElement(PopupContext_1.default.Provider, { value: {
|
|
102
67
|
hidePopup: () => {
|
|
103
68
|
if (props.onHide) {
|
|
@@ -105,16 +70,9 @@ exports.AdaptablePopup = (props) => {
|
|
|
105
70
|
}
|
|
106
71
|
},
|
|
107
72
|
} },
|
|
108
|
-
React.createElement(
|
|
109
|
-
handleSelector: isActionModule
|
|
110
|
-
? `.${baseClassName} .ab-Panel__header`
|
|
111
|
-
: '.ab-Adaptable-Popup__TopBar',
|
|
112
|
-
size: popupSettings.size,
|
|
113
|
-
position: popupSettings.position,
|
|
114
|
-
onChange: handleWindowSettings,
|
|
115
|
-
}, style: style, padding: 0, height: isWindowModal ? null : '90vh', width: isWindowModal ? null : '90vw', className: className, onDismiss: props.onHide, isOpen: true, showCloseButton: true }, props.moduleProps),
|
|
73
|
+
React.createElement(AdaptablePopupDialog_1.AdaptablePopupDialog, { baseClassName: baseClassName, className: className, friendlyName: friendlyName, isActionModule: isActionModule, isWindowModal: isWindowModal, onHide: props.onHide, modalContainer: modalContainer },
|
|
116
74
|
!isActionModule && React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelTitle),
|
|
117
75
|
React.createElement(rebass_1.Flex, { "data-name": props.componentName, flexDirection: "row", flex: "1 1 0", style: { minHeight: 0 }, className: accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '' },
|
|
118
|
-
!isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api,
|
|
119
|
-
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" },
|
|
76
|
+
!isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, activeItem: activeItem, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
|
|
77
|
+
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, moduleViewContent)))));
|
|
120
78
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const AdaptablePopupDialog: React.FunctionComponent<{
|
|
3
|
+
baseClassName: string;
|
|
4
|
+
className: string;
|
|
5
|
+
friendlyName: string;
|
|
6
|
+
isActionModule: boolean;
|
|
7
|
+
isWindowModal: boolean;
|
|
8
|
+
onHide: () => void;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
modalContainer?: string | HTMLElement;
|
|
11
|
+
}>;
|
|
@@ -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>;
|