@adaptabletools/adaptable 10.0.4-canary.5 → 11.0.0-canary.3
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 +19 -15
- package/bundle.cjs.js +121 -115
- package/index.css +20 -17
- package/package.json +32 -32
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -4
- package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -2
- package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
- package/src/AdaptableOptions/DashboardOptions.d.ts +7 -9
- package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +31 -0
- package/src/AdaptableOptions/{ChartPluginOptions.js → FlashingCellOptions.js} +0 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +2 -2
- package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -7
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +14 -2
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +1 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -15
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -0
- package/src/Api/AdaptableApi.d.ts +6 -6
- package/src/Api/ChartingApi.d.ts +9 -0
- package/src/Api/{ChartApi.js → ChartingApi.js} +0 -0
- package/src/Api/ColumnApi.d.ts +11 -1
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/EventApi.d.ts +3 -3
- package/src/Api/Events/AdaptableReady.d.ts +1 -1
- package/src/Api/Events/FlashingCellDisplayed.d.ts +2 -2
- package/src/Api/Events/SearchChanged.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +35 -24
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ChartingApiImpl.js +10 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ColumnApiImpl.js +9 -3
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +0 -16
- package/src/Api/Implementation/DashboardApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +42 -29
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +5 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +0 -5
- package/src/Api/Implementation/InternalApiImpl.js +1 -15
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/Implementation/PluginsApiImpl.d.ts +0 -2
- package/src/Api/Implementation/PluginsApiImpl.js +0 -6
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/QueryApiImpl.js +1 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/InternalApi.d.ts +0 -5
- package/src/Api/PluginsApi.d.ts +0 -2
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +38 -38
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -19
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +0 -2
- package/src/PredefinedConfig/DashboardState.d.ts +4 -4
- package/src/PredefinedConfig/FlashingCellState.d.ts +16 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/SystemState.d.ts +0 -4
- package/src/PredefinedConfig/ThemeState.d.ts +2 -1
- package/src/Redux/ActionsReducers/DashboardRedux.d.ts +0 -7
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -12
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +0 -12
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -21
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +1 -2
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +21 -21
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +0 -3
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/CalculatedColumnModule.js +17 -12
- package/src/Strategy/ChartingModule.d.ts +7 -0
- package/src/Strategy/ChartingModule.js +15 -0
- package/src/Strategy/ConditionalStyleModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/FilterModule.js +3 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +35 -19
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.js +15 -3
- package/src/Strategy/QueryModule.d.ts +1 -1
- package/src/Strategy/QueryModule.js +1 -3
- package/src/Strategy/SetingsPanelModule.d.ts +1 -0
- package/src/Strategy/SetingsPanelModule.js +7 -1
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +11 -0
- package/src/Strategy/Utilities/getFormatColumnStyleViewItems.d.ts +3 -0
- package/src/Strategy/Utilities/getFormatColumnStyleViewItems.js +10 -0
- package/src/Utilities/Constants/ConfigConstants.d.ts +0 -1
- package/src/Utilities/Constants/ConfigConstants.js +1 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +0 -9
- package/src/Utilities/Constants/GeneralConstants.js +1 -12
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -2
- package/src/Utilities/Constants/ModuleConstants.js +2 -3
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +19 -18
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -4
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/ObjectFactory.d.ts +0 -10
- package/src/Utilities/ObjectFactory.js +6 -67
- package/src/Utilities/Services/EntitlementService.js +1 -1
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +7 -11
- package/src/Utilities/Services/ReportService.js +1 -1
- package/src/View/AdaptableView.js +2 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +4 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +3 -3
- package/src/View/AdaptableWizardView/index.js +1 -1
- package/src/View/Alert/AlertEmptyView.js +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +0 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +11 -24
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +16 -4
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
- package/src/View/Components/ModuleValueSelector/index.d.ts +3 -1
- package/src/View/Components/ModuleValueSelector/index.js +1 -1
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +9 -7
- 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.js +1 -1
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +46 -81
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +11 -4
- package/src/View/Components/ValueSelector/index.d.ts +2 -0
- package/src/View/Components/ValueSelector/index.js +5 -5
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +10 -5
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +16 -4
- package/src/View/Dashboard/Dashboard.js +14 -36
- package/src/View/Dashboard/DashboardPopup.js +24 -16
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -2
- package/src/View/Export/Wizard/NewReportWizard.js +13 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
- package/src/View/FlashingCell/Wizard/{FlashingCellDurationWizardSection.d.ts → FlashingCellSettingsWizardSection.d.ts} +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +81 -0
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +6 -8
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.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/Wizard/FreeTextColumnSettingsWizardSection.js +8 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +13 -5
- package/src/View/GridInfo/GridInfoPopup.js +3 -2
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
- package/src/View/Query/QueryViewPanel.js +12 -9
- package/src/View/Query/Wizard/NamedQueryWizard.js +13 -8
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
- package/src/View/Shortcut/shortcutKeys.js +0 -1
- package/src/View/SpecialColumnSettingsWizardStep.d.ts +9 -0
- package/src/View/SpecialColumnSettingsWizardStep.js +63 -0
- package/src/View/UIHelper.d.ts +0 -4
- package/src/View/UIHelper.js +1 -34
- package/src/View/Wizard/AdaptableWizard.js +1 -1
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/agGrid/Adaptable.d.ts +10 -7
- package/src/agGrid/Adaptable.js +80 -57
- package/src/agGrid/agGridHelper.d.ts +1 -2
- package/src/agGrid/agGridHelper.js +8 -5
- package/src/agGrid/agGridMenuHelper.js +12 -8
- package/src/components/ApplicationIcon.d.ts +1 -1
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/Dashboard/DashboardManager.d.ts +5 -3
- package/src/components/Dashboard/DashboardManager.js +33 -27
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/Overlay.js +1 -1
- package/src/components/WindowModal/WindowModal.js +17 -2
- package/src/components/icons/column-add.d.ts +3 -0
- package/src/components/icons/column-add.js +10 -0
- package/src/components/icons/index.js +2 -0
- package/src/components/utils/useDraggable.js +2 -1
- package/src/metamodel/adaptable.metamodel.d.ts +58 -91
- package/src/metamodel/adaptable.metamodel.js +248 -297
- package/src/types.d.ts +4 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/ChartPluginOptions.d.ts +0 -20
- package/src/Api/ChartApi.d.ts +0 -20
- package/src/Api/Implementation/SparklineColumnApiImpl.d.ts +0 -9
- package/src/Api/Implementation/SparklineColumnApiImpl.js +0 -24
- package/src/Api/SparklineColumnApi.d.ts +0 -23
- package/src/Api/SparklineColumnApi.js +0 -2
- package/src/PredefinedConfig/ChartState.d.ts +0 -144
- package/src/PredefinedConfig/ChartState.js +0 -2
- package/src/PredefinedConfig/Common/ChartEnums.d.ts +0 -123
- package/src/PredefinedConfig/Common/ChartEnums.js +0 -152
- package/src/PredefinedConfig/SparklineColumnState.d.ts +0 -40
- package/src/PredefinedConfig/SparklineColumnState.js +0 -2
- package/src/Redux/ActionsReducers/SparklineColumnRedux.d.ts +0 -35
- package/src/Redux/ActionsReducers/SparklineColumnRedux.js +0 -70
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.js +0 -56
- package/src/Utilities/Defaults/DefaultPieChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultPieChartProperties.js +0 -13
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.js +0 -25
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.d.ts +0 -11
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.js +0 -28
- package/src/View/Components/Popups/AdaptableChart.d.ts +0 -18
- package/src/View/Components/Popups/AdaptableChart.js +0 -40
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.d.ts +0 -7
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.js +0 -2
- package/src/View/FlashingCell/Wizard/FlashingCellDurationWizardSection.js +0 -60
- package/src/components/ChartContainer/index.d.ts +0 -15
- package/src/components/ChartContainer/index.js +0 -22
|
@@ -5,13 +5,10 @@ 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 PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
|
|
8
|
-
const SystemRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/SystemRedux"));
|
|
9
8
|
const AdaptablePopup_1 = require("./Components/Popups/AdaptablePopup");
|
|
10
9
|
const AdaptablePopupPrompt_1 = require("./Components/Popups/AdaptablePopupPrompt");
|
|
11
10
|
const Dashboard_1 = require("./Dashboard/Dashboard");
|
|
12
11
|
const AdaptablePopupConfirmation_1 = require("./Components/Popups/AdaptablePopupConfirmation");
|
|
13
|
-
const AdaptableChart_1 = require("./Components/Popups/AdaptableChart");
|
|
14
|
-
const ChartEnums_1 = require("../PredefinedConfig/Common/ChartEnums");
|
|
15
12
|
const AdaptableLoadingScreen_1 = require("./Components/Popups/AdaptableLoadingScreen");
|
|
16
13
|
const renderWithAdaptableContext_1 = require("./renderWithAdaptableContext");
|
|
17
14
|
const License_1 = require("./License");
|
|
@@ -20,18 +17,17 @@ const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressInd
|
|
|
20
17
|
const react_toastify_1 = require("react-toastify");
|
|
21
18
|
class AdaptableView extends React.Component {
|
|
22
19
|
render() {
|
|
23
|
-
var _a, _b, _c, _d
|
|
20
|
+
var _a, _b, _c, _d;
|
|
24
21
|
const watermark = (_d = (_c = (_b = (_a = this.props.AdaptableApi) === null || _a === void 0 ? void 0 : _a.internalApi) === null || _b === void 0 ? void 0 : _b.getSystemState()) === null || _c === void 0 ? void 0 : _c.License) === null || _d === void 0 ? void 0 : _d.watermark;
|
|
25
22
|
return (React.createElement("div", null,
|
|
26
23
|
this.props.AdaptableApi.internalApi.getModuleService().isModuleAvailable('Dashboard') && (React.createElement(Dashboard_1.Dashboard, { api: this.props.AdaptableApi })),
|
|
27
|
-
this.props.SystemState.ChartVisibility != ChartEnums_1.ChartVisibility.Hidden && (React.createElement(AdaptableChart_1.AdaptableChart, { api: this.props.AdaptableApi, onClose: this.props.onCloseChartPopup, showChart: this.props.SystemState.ChartVisibility == ChartEnums_1.ChartVisibility.Maximised, showModal: (_e = this.props.AdaptableApi.pluginsApi.getChartsPluginApi()) === null || _e === void 0 ? void 0 : _e.getPluginOptions().showModal })),
|
|
28
24
|
React.createElement(AdaptableLoadingScreen_1.AdaptableLoadingScreen, { onClose: this.props.onCloseLoadingPopup, showLoadingScreen: this.props.PopupState.LoadingPopup.ShowLoadingPopup }),
|
|
29
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, showPopup: this.props.PopupState.PromptPopup.ShowPromptPopup }),
|
|
30
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 }),
|
|
31
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 })),
|
|
32
28
|
React.createElement(ExportCustomDestinationFormPopups_1.ExportCustomDestinationFormPopups, { api: this.props.AdaptableApi }),
|
|
33
29
|
React.createElement(react_toastify_1.ToastContainer, { limit: this.props.AdaptableApi.internalApi.getAdaptableOptions().notificationsOptions
|
|
34
|
-
.maxNotifications, closeButton: false }),
|
|
30
|
+
.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
|
|
35
31
|
(watermark === null || watermark === void 0 ? void 0 : watermark.show) && React.createElement(License_1.LicenseWatermark, null, watermark === null || watermark === void 0 ? void 0 : watermark.text),
|
|
36
32
|
React.createElement(ProgressIndicator_1.ProgressIndicator, null)));
|
|
37
33
|
}
|
|
@@ -40,7 +36,6 @@ function mapStateToProps(state, ownProps) {
|
|
|
40
36
|
return {
|
|
41
37
|
PopupState: state.Popup,
|
|
42
38
|
SystemState: state.System,
|
|
43
|
-
ChartState: state.Chart,
|
|
44
39
|
AdaptableApi: ownProps.Adaptable.api,
|
|
45
40
|
};
|
|
46
41
|
}
|
|
@@ -48,7 +43,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
48
43
|
return {
|
|
49
44
|
onCloseScreenPopup: () => dispatch(PopupRedux.PopupHideScreen()),
|
|
50
45
|
onCloseAlertPopup: () => dispatch(PopupRedux.PopupHideAlert()),
|
|
51
|
-
onCloseChartPopup: () => dispatch(SystemRedux.ChartSetChartVisibility(ChartEnums_1.ChartVisibility.Hidden)),
|
|
52
46
|
onClosePromptPopup: () => dispatch(PopupRedux.PopupHidePrompt()),
|
|
53
47
|
onConfirmPromptPopup: (inputText) => dispatch(PopupRedux.PopupConfirmPrompt(inputText)),
|
|
54
48
|
onConfirmConfirmationPopup: (comment) => dispatch(PopupRedux.PopupConfirmConfirmation(comment)),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { ColDef } from '@ag-grid-community/all-modules';
|
|
3
|
+
interface Column extends Partial<ColDef> {
|
|
4
|
+
field?: string;
|
|
5
|
+
type?: string | string[];
|
|
5
6
|
caption?: string;
|
|
6
7
|
}
|
|
7
8
|
declare const _default: React.MemoExoticComponent<({ columns: cols, handle, onValidityChange, }: {
|
|
@@ -216,6 +216,7 @@ const ColumnsList = ({ columns: cols, handle, onValidityChange, }) => {
|
|
|
216
216
|
},
|
|
217
217
|
];
|
|
218
218
|
const items = columns.map((col) => {
|
|
219
|
+
var _a;
|
|
219
220
|
const isPrimaryKey = col.field === primaryKeyField;
|
|
220
221
|
const cItems = colItems.map((c) => (Object.assign({}, c)));
|
|
221
222
|
cItems[0].Content = (React.createElement(Radio_1.default, { checked: isPrimaryKey, onChange: (checked) => {
|
|
@@ -235,7 +236,7 @@ const ColumnsList = ({ columns: cols, handle, onValidityChange, }) => {
|
|
|
235
236
|
cItems[2].Content = (React.createElement(Input_1.default, { style: inputStyle, defaultValue: col.caption != undefined ? col.caption : humanized, placeholder: humanized, onChange: (event) => {
|
|
236
237
|
setColumnCaption(event.target.value, col.field);
|
|
237
238
|
} }));
|
|
238
|
-
cItems[3].Content = (React.createElement(Dropdown_1.default, { style: inputStyle, showClearButton: false, options: dataTypes, value: col.type, onChange: onColumnTypeChange.bind(null, col) }));
|
|
239
|
+
cItems[3].Content = (React.createElement(Dropdown_1.default, { style: inputStyle, showClearButton: false, options: dataTypes, value: (_a = col === null || col === void 0 ? void 0 : col.type) !== null && _a !== void 0 ? _a : '', onChange: onColumnTypeChange.bind(null, col) }));
|
|
239
240
|
cItems[4].Content = (React.createElement(CheckBox_1.CheckBox, { checked: isSortableColumn(col.field), onChange: (sortable) => {
|
|
240
241
|
sortable ? setSortableColumn(col.field) : setUnsortableColumn(col.field);
|
|
241
242
|
} }));
|
|
@@ -16,7 +16,7 @@ const ConfigurationForm = (props) => {
|
|
|
16
16
|
const searchOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.searchOptions), abOptions.searchOptions);
|
|
17
17
|
const filterOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.filterOptions), abOptions.filterOptions);
|
|
18
18
|
// we are 'hard-coding' this to use AG Grid but so does helper so ok for now and we can refactor when Adaptable Grid is ready
|
|
19
|
-
const gridOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.
|
|
19
|
+
const gridOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.gridOptions), abOptions.gridOptions);
|
|
20
20
|
return (React.createElement(React.Fragment, null,
|
|
21
21
|
React.createElement(HelpBlock_1.default, null, "General Options"),
|
|
22
22
|
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
@@ -32,29 +32,29 @@ const ConfigurationForm = (props) => {
|
|
|
32
32
|
React.createElement(FormLayout_1.FormRow, { label: "Enable Range Selection" },
|
|
33
33
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.enableRangeSelection, onChange: (enableRangeSelection) => {
|
|
34
34
|
abOptions = Object.assign({}, abOptions);
|
|
35
|
-
abOptions.
|
|
36
|
-
abOptions.
|
|
35
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
36
|
+
abOptions.gridOptions.enableRangeSelection = enableRangeSelection;
|
|
37
37
|
props.onChangeadaptableOptions(abOptions);
|
|
38
38
|
} })),
|
|
39
39
|
React.createElement(FormLayout_1.FormRow, { label: "Show Quick Filter" },
|
|
40
40
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.floatingFilter, onChange: (floatingFilter) => {
|
|
41
41
|
abOptions = Object.assign({}, abOptions);
|
|
42
|
-
abOptions.
|
|
43
|
-
abOptions.
|
|
42
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
43
|
+
abOptions.gridOptions.floatingFilter = floatingFilter;
|
|
44
44
|
props.onChangeadaptableOptions(abOptions);
|
|
45
45
|
} })),
|
|
46
46
|
React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
|
|
47
47
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressColumnVirtualisation, onChange: (suppressColumnVirtualisation) => {
|
|
48
48
|
abOptions = Object.assign({}, abOptions);
|
|
49
|
-
abOptions.
|
|
50
|
-
abOptions.
|
|
49
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
50
|
+
abOptions.gridOptions.suppressColumnVirtualisation = suppressColumnVirtualisation;
|
|
51
51
|
props.onChangeadaptableOptions(abOptions);
|
|
52
52
|
} })),
|
|
53
53
|
React.createElement(FormLayout_1.FormRow, { label: "Show Column Menu Button" },
|
|
54
54
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressMenuHide, onChange: (suppressMenuHide) => {
|
|
55
55
|
abOptions = Object.assign({}, abOptions);
|
|
56
|
-
abOptions.
|
|
57
|
-
abOptions.
|
|
56
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
57
|
+
abOptions.gridOptions.suppressMenuHide = suppressMenuHide;
|
|
58
58
|
props.onChangeadaptableOptions(abOptions);
|
|
59
59
|
} }))),
|
|
60
60
|
React.createElement(HelpBlock_1.default, null, "Layout Options"),
|
|
@@ -29,8 +29,8 @@ const ConfigurationDialog = (props) => {
|
|
|
29
29
|
};
|
|
30
30
|
const onFinish = () => {
|
|
31
31
|
const newABOptions = Object.assign({}, abOptions);
|
|
32
|
-
newABOptions.
|
|
33
|
-
newABOptions.
|
|
32
|
+
newABOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
33
|
+
newABOptions.gridOptions.columnDefs = columnsHandle.current.getColumns().map((c) => {
|
|
34
34
|
const col = Object.assign(Object.assign({}, c), { headerName: c.caption || StringExtensions_1.default.Humanize(c.field) });
|
|
35
35
|
delete col.caption;
|
|
36
36
|
return col;
|
|
@@ -50,7 +50,7 @@ const ConfigurationDialog = (props) => {
|
|
|
50
50
|
React.createElement(Input_1.default, { value: abOptions.adaptableId, onChange: onadaptableIdChange, style: { minWidth: '20rem' } })))),
|
|
51
51
|
React.createElement(ColumnsList_1.default, { handle: columnsHandle, onValidityChange: (valid) => {
|
|
52
52
|
setFinishEnabled(valid);
|
|
53
|
-
}, columns: abOptions.
|
|
53
|
+
}, columns: abOptions.gridOptions.columnDefs }))));
|
|
54
54
|
const stepTwo = (React.createElement(React.Fragment, null,
|
|
55
55
|
React.createElement(Panel_1.default, { header: 'Configure AdapTable', border: "none", style: { flex: 1, overflow: 'auto' } },
|
|
56
56
|
React.createElement(ConfigurationForm_1.default, { adaptableOptions: abOptions, onChangeadaptableOptions: (abOptions) => {
|
|
@@ -65,7 +65,7 @@ const Wizard = (props) => {
|
|
|
65
65
|
const gridOptions = helper_1.prepareGridOptions(dataSourceInfo);
|
|
66
66
|
const adaptableOptions = Object.assign({}, props.adaptableOptions);
|
|
67
67
|
adaptableOptions.adaptableId = adaptableOptions.adaptableId || (file ? file.name : '');
|
|
68
|
-
adaptableOptions.
|
|
68
|
+
adaptableOptions.gridOptions = gridOptions;
|
|
69
69
|
if (dataSourceInfo.primaryKey) {
|
|
70
70
|
adaptableOptions.primaryKey = dataSourceInfo.primaryKey;
|
|
71
71
|
}
|
|
@@ -11,6 +11,6 @@ exports.AlertEmptyView = (props) => {
|
|
|
11
11
|
.getEntitlementAccessLevelForModule(props.module.moduleInfo.ModuleName);
|
|
12
12
|
const text = accessLevel == 'ReadOnly'
|
|
13
13
|
? 'You have no Alert Definitions.'
|
|
14
|
-
: "Click 'New' to start creating Alert Definitions. An
|
|
14
|
+
: "Click 'New' to start creating Alert Definitions. An Alert is triggered whenever an edit - or external data change - matches the Rule in the Alert Definition.";
|
|
15
15
|
return React.createElement(React.Fragment, null, text);
|
|
16
16
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
|
|
3
3
|
declare type AlertRulesWizardSectionProps = {
|
|
4
4
|
onChange: (data: AlertDefinition) => void;
|
|
5
|
+
module: 'alert';
|
|
5
6
|
};
|
|
6
7
|
export declare const AlertRulesWizardSection: (props: AlertRulesWizardSectionProps) => JSX.Element;
|
|
7
8
|
export declare const renderAlertRulesSummary: (alertDefinition: AlertDefinition) => JSX.Element;
|
|
@@ -60,16 +60,16 @@ exports.AlertWizard = (props) => {
|
|
|
60
60
|
React.createElement("b", null, "when"),
|
|
61
61
|
" the Alert should trigger")),
|
|
62
62
|
isValid: isValidAlertRules_1.isValidAlertRules,
|
|
63
|
-
render: () => React.createElement(AlertRulesWizardSection_1.AlertRulesWizardSection, { onChange: setAlertDefinition }),
|
|
63
|
+
render: () => React.createElement(AlertRulesWizardSection_1.AlertRulesWizardSection, { onChange: setAlertDefinition, module: "alert" }),
|
|
64
64
|
renderSummary: AlertRulesWizardSection_1.renderAlertRulesSummary,
|
|
65
|
-
title: '
|
|
65
|
+
title: 'Rule',
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
details: "Select the Alert's Message Type and Notification option",
|
|
69
69
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
70
70
|
React.createElement(AlertDisplayWizardSection_1.AlertDisplayWizardSection, { onChange: setAlertDefinition }))),
|
|
71
71
|
renderSummary: AlertDisplayWizardSection_1.renderAlertDisplaySummary,
|
|
72
|
-
title: 'Type
|
|
72
|
+
title: 'Type & Display',
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
details: 'Configure behaviour for the Alert',
|
|
@@ -1,9 +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;
|
|
5
|
+
module: 'alert';
|
|
6
6
|
wholeRowScope?: boolean;
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition
|
|
9
|
+
export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition>(props: BaseAlertRulesWizardSectionProps<T>) => JSX.Element;
|
|
@@ -8,7 +8,8 @@ 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
|
-
|
|
11
|
+
const predicateDefs = api.alertApi.getAlertPredicateDefsForScope(data.Scope);
|
|
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: {
|
|
12
13
|
selectPredicate: 'Select an Alert Rule - to be applied when data changes',
|
|
13
14
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
14
15
|
"Use an BooleanQuery if ",
|
|
@@ -11,7 +11,6 @@ exports.getCalculatedColumnSettingTags = (settings) => {
|
|
|
11
11
|
Resizable ? 'Resizable' : null,
|
|
12
12
|
Groupable ? 'Groupable' : null,
|
|
13
13
|
Sortable ? 'Sortable' : null,
|
|
14
|
-
Pivotable ? 'Pivotable' : null,
|
|
15
14
|
Aggregatable ? 'Aggregatable' : null,
|
|
16
15
|
].filter(Boolean);
|
|
17
16
|
};
|
|
@@ -3,6 +3,7 @@ import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
|
3
3
|
import { CalculatedColumn } from '../../../PredefinedConfig/CalculatedColumnState';
|
|
4
4
|
export declare type CalculatedColumnSettingsWizardSectionProps = {
|
|
5
5
|
onChange: (data: CalculatedColumn) => void;
|
|
6
|
+
isEdit: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const renderCalculatedColumnSettingsSummary: (data: CalculatedColumn) => JSX.Element;
|
|
8
9
|
export declare const isValidCalculatedColumnSettings: (data: CalculatedColumn, api: AdaptableApi) => true | string;
|
|
@@ -16,6 +16,7 @@ const Tabs_1 = require("../../../components/Tabs");
|
|
|
16
16
|
const ValueSelector_1 = require("../../Components/ValueSelector");
|
|
17
17
|
const Tag_1 = require("../../../components/Tag");
|
|
18
18
|
const getCalculatedColumnSettingTags_1 = require("../Utilities/getCalculatedColumnSettingTags");
|
|
19
|
+
const SpecialColumnSettingsWizardStep_1 = require("../../SpecialColumnSettingsWizardStep");
|
|
19
20
|
exports.renderCalculatedColumnSettingsSummary = (data) => {
|
|
20
21
|
var _a;
|
|
21
22
|
const options = getCalculatedColumnSettingTags_1.getCalculatedColumnSettingTags(data.CalculatedColumnSettings);
|
|
@@ -59,7 +60,7 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
59
60
|
const aggregatable = dataType == 'Number' ? (_a = data.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.Aggregatable : false;
|
|
60
61
|
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType, Aggregatable: aggregatable }) }));
|
|
61
62
|
};
|
|
62
|
-
const inEdit =
|
|
63
|
+
const inEdit = props.isEdit;
|
|
63
64
|
const validCheck = exports.isValidCalculatedColumnSettings(data, api);
|
|
64
65
|
const ErrorMessage = validCheck === true ? null : validCheck;
|
|
65
66
|
let options = [
|
|
@@ -72,17 +73,15 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
72
73
|
const ColumnName = data.FriendlyName;
|
|
73
74
|
const ColumnId = data.ColumnId;
|
|
74
75
|
let { DataType: dataType } = (_a = data.CalculatedColumnSettings) !== null && _a !== void 0 ? _a : {};
|
|
75
|
-
const { Width,
|
|
76
|
-
const
|
|
77
|
-
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings),
|
|
76
|
+
const { Width, ShowToolTip } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
|
|
77
|
+
const handleSpecialColumnSettingsChange = (settings) => {
|
|
78
|
+
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), settings) }));
|
|
78
79
|
};
|
|
79
80
|
React.useEffect(() => {
|
|
80
81
|
var _a;
|
|
81
82
|
if (!dataType) {
|
|
82
83
|
const computedDataType = calculatedColumnExpressionService.GetCalculatedColumnDataType((_a = data.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
|
|
83
|
-
|
|
84
|
-
DataType: computedDataType,
|
|
85
|
-
});
|
|
84
|
+
handleSpecialColumnSettingsChange(Object.assign(Object.assign({}, data === null || data === void 0 ? void 0 : data.CalculatedColumnSettings), { DataType: computedDataType }));
|
|
86
85
|
}
|
|
87
86
|
}, []);
|
|
88
87
|
return (React.createElement(rebass_1.Box, { "data-name": 'calculated-column-settings' },
|
|
@@ -111,23 +110,11 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
111
110
|
onClick: () => handleDataTypeChange(item.value),
|
|
112
111
|
})) }, dataType ? dataType : 'Select Data Type')),
|
|
113
112
|
React.createElement(FormLayout_1.FormRow, { label: "Width" },
|
|
114
|
-
React.createElement(Input_1.default, { type: "number", width: 300, value: Width || '', onChange: (e) =>
|
|
113
|
+
React.createElement(Input_1.default, { type: "number", width: 300, value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
|
|
114
|
+
Width: Number(e.target.value),
|
|
115
|
+
}) })),
|
|
115
116
|
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
116
|
-
React.createElement(CheckBox_1.CheckBox, { onChange: (checked) =>
|
|
117
|
+
React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Tooltip")))))),
|
|
117
118
|
ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
|
|
118
|
-
React.createElement(
|
|
119
|
-
React.createElement(Tabs_1.Tabs.Tab, null, " Column Properties"),
|
|
120
|
-
React.createElement(Tabs_1.Tabs.Content, null,
|
|
121
|
-
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
122
|
-
React.createElement(FormLayout_1.default, { style: { width: '100%' }, columns: [{ name: 'first', size: '30%' }, { name: 'second' }] },
|
|
123
|
-
React.createElement(FormLayout_1.FormRow, null,
|
|
124
|
-
React.createElement(CheckBox_1.CheckBox, { checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !api.internalApi.getAdaptableOptions().filterOptions
|
|
125
|
-
.enableFilterOnSpecialColumns }, "Filterable"),
|
|
126
|
-
React.createElement(CheckBox_1.CheckBox, { checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }) }, "Resizable")),
|
|
127
|
-
React.createElement(FormLayout_1.FormRow, null,
|
|
128
|
-
React.createElement(CheckBox_1.CheckBox, { checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }) }, "Groupable"),
|
|
129
|
-
React.createElement(CheckBox_1.CheckBox, { checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }) }, "Sortable")),
|
|
130
|
-
React.createElement(FormLayout_1.FormRow, null,
|
|
131
|
-
React.createElement(CheckBox_1.CheckBox, { checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }) }, "Pivotable"),
|
|
132
|
-
React.createElement(CheckBox_1.CheckBox, { checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }) }, "Aggregatable"))))))));
|
|
119
|
+
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
|
|
133
120
|
};
|
|
@@ -14,14 +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();
|
|
34
|
+
const isEdit = Boolean(props.data) || ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit';
|
|
23
35
|
const handleFinish = () => {
|
|
24
|
-
if (
|
|
36
|
+
if (isEdit) {
|
|
25
37
|
dispatch(CalculatedColumnRedux.CalculatedColumnEdit(calculatedColumn));
|
|
26
38
|
}
|
|
27
39
|
else {
|
|
@@ -46,7 +58,7 @@ exports.CalculatedColumnWizard = (props) => {
|
|
|
46
58
|
renderSummary: CalculatedColumnSettingsWizardSection_1.renderCalculatedColumnSettingsSummary,
|
|
47
59
|
render: () => {
|
|
48
60
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
49
|
-
React.createElement(CalculatedColumnSettingsWizardSection_1.CalculatedColumnSettingsWizardSection, { onChange: setCalculatedColumn })));
|
|
61
|
+
React.createElement(CalculatedColumnSettingsWizardSection_1.CalculatedColumnSettingsWizardSection, { isEdit: isEdit, onChange: setCalculatedColumn })));
|
|
50
62
|
},
|
|
51
63
|
},
|
|
52
64
|
'-',
|
|
@@ -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 {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ValueSelectorProps } from '../ValueSelector';
|
|
3
3
|
import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
|
|
4
|
-
export
|
|
4
|
+
export interface ModuleValueSelectorProps extends Omit<ValueSelectorProps<AdaptableModule, AdaptableModule>, 'allowReorder' | 'toIdentifier' | 'toLabel'> {
|
|
5
|
+
isDisabled?: (module: AdaptableModule) => boolean;
|
|
6
|
+
}
|
|
5
7
|
export declare const ModuleValueSelector: (props: ModuleValueSelectorProps) => JSX.Element;
|
|
@@ -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
|
};
|
|
@@ -132,7 +132,7 @@ exports.NewScopeComponent = (props) => {
|
|
|
132
132
|
React.createElement(Tabs_1.Tabs.Tab, { value: "Column" },
|
|
133
133
|
React.createElement(Radio_1.default, { margin: 0, value: "Column", checked: scopeChoice == 'Column', tabIndex: -1 }, "Columns")),
|
|
134
134
|
React.createElement(Tabs_1.Tabs.Tab, { value: "DataType" },
|
|
135
|
-
React.createElement(Radio_1.default, { margin: 0, value: "DataType", checked: scopeChoice == 'DataType', tabIndex: -1 }, "
|
|
135
|
+
React.createElement(Radio_1.default, { margin: 0, value: "DataType", checked: scopeChoice == 'DataType', tabIndex: -1 }, "Data Types")),
|
|
136
136
|
props.hideWholeRow ? null : (React.createElement(Tabs_1.Tabs.Content, { value: "Row", style: { flex: 'none' }, "data-name": "row-scope" },
|
|
137
137
|
React.createElement(rebass_1.Text, { padding: 2, fontSize: 2 }, props.descriptions.rowScope))),
|
|
138
138
|
React.createElement(Tabs_1.Tabs.Content, { value: "Column", style: { flex: 1, overflow: 'auto' }, "data-name": "column-scope", padding: 0 },
|
|
@@ -21,8 +21,9 @@ const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
|
|
|
21
21
|
exports.AdaptablePopup = (props) => {
|
|
22
22
|
var _a, _b, _c, _d, _e;
|
|
23
23
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
24
|
-
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
25
24
|
const dispatch = react_redux_1.useDispatch();
|
|
25
|
+
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
26
|
+
const settingsPanelTitle = adaptable.api.internalApi.getModuleFriendlyName('SettingsPanel');
|
|
26
27
|
// Navigation
|
|
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; });
|
|
28
29
|
const menuItems = React.useMemo(() => {
|
|
@@ -71,11 +72,12 @@ exports.AdaptablePopup = (props) => {
|
|
|
71
72
|
const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
|
|
72
73
|
const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
|
|
73
74
|
// action popups + non-primary module popups
|
|
74
|
-
const isActionModule =
|
|
75
|
-
(
|
|
75
|
+
const isActionModule = moduleInfo &&
|
|
76
|
+
(DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
|
|
77
|
+
(props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
|
|
76
78
|
const baseClassName = 'ab-Adaptable-Popup';
|
|
77
|
-
const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.
|
|
78
|
-
const isWindowModal = settingsPanelOptions.
|
|
79
|
+
const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.popupType) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
|
|
80
|
+
const isWindowModal = settingsPanelOptions.popupType === 'window';
|
|
79
81
|
let style = { maxWidth: 1400, maxHeight: 1200 };
|
|
80
82
|
if (isWindowModal) {
|
|
81
83
|
style = { height: '100%' };
|
|
@@ -83,7 +85,7 @@ exports.AdaptablePopup = (props) => {
|
|
|
83
85
|
else if (isActionModule) {
|
|
84
86
|
style = { maxWidth: 800, maxHeight: 450 };
|
|
85
87
|
}
|
|
86
|
-
const settingsKey = isActionModule ? `action-${moduleInfo.FriendlyName}` : 'settings';
|
|
88
|
+
const settingsKey = isActionModule ? `action-${moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.FriendlyName}` : 'settings';
|
|
87
89
|
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[settingsKey]; });
|
|
88
90
|
if (!popupSettings) {
|
|
89
91
|
const size = isActionModule
|
|
@@ -112,7 +114,7 @@ exports.AdaptablePopup = (props) => {
|
|
|
112
114
|
position: popupSettings.position,
|
|
113
115
|
onChange: handleWindowSettings,
|
|
114
116
|
}, style: style, padding: 0, height: isWindowModal ? null : '90vh', width: isWindowModal ? null : '90vw', className: className, onDismiss: props.onHide, isOpen: true, showCloseButton: true }, props.moduleProps),
|
|
115
|
-
!isActionModule &&
|
|
117
|
+
!isActionModule && React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelTitle),
|
|
116
118
|
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 : '' },
|
|
117
119
|
!isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, moduleInfo: moduleInfo, activeCustomSettingPanel: customSettingsPanel, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
|
|
118
120
|
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, isCustomSettingsPanel ? (React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel })) : (React.createElement(AdaptablePopupBody_1.AdaptablePopupBody, { api: props.api, module: module, componentName: props.componentName, moduleParams: props.moduleParams, onClearParams: props.onClearParams, onHide: props.onHide })))))));
|
|
@@ -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
|
};
|
|
@@ -53,7 +53,7 @@ exports.Navigation = (props) => {
|
|
|
53
53
|
const className = join_1.default(baseClassName, isActive && `${baseClassName}--active`);
|
|
54
54
|
let customIcon = (_f = (_e = (_d = (_c = props.customSettingsPanels) === null || _c === void 0 ? void 0 : _c.find) === null || _d === void 0 ? void 0 : _d.call(_c, (customSettingPanel) => customSettingPanel.name === menuItem.label)) === null || _e === void 0 ? void 0 : _e.icon) !== null && _f !== void 0 ? _f : null;
|
|
55
55
|
return (React.createElement("li", { className: className, key: menuItem.label },
|
|
56
|
-
React.createElement("button", { className: `${baseClassName}__Button`, onClick: () => {
|
|
56
|
+
React.createElement("button", { type: "button", className: `${baseClassName}__Button`, onClick: () => {
|
|
57
57
|
dispatch(menuItem.reduxAction);
|
|
58
58
|
} },
|
|
59
59
|
menuItem.icon && (React.createElement(icons_1.Icon, { className: `${baseClassName}__Icon`, name: menuItem.icon })),
|
|
@@ -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;
|