@gridsuite/commons-ui 0.240.0 → 0.241.0
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/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-comparator-filter.js +2 -2
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js +4 -4
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-filter-icon.js +2 -2
- package/dist/components/composite/customAGGrid/custom-aggrid-header.js +26 -13
- package/dist/components/composite/customAGGrid/custom-aggrid-menu.js +2 -2
- package/dist/components/composite/grid/grid-section.js +1 -1
- package/dist/features/index.js +6 -1
- package/dist/features/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +3 -2
- package/dist/features/parameters/common/hook/use-tabs.d.ts +3 -2
- package/dist/features/parameters/common/hook/use-tabs.js +2 -3
- package/dist/features/parameters/common/index.d.ts +2 -1
- package/dist/features/parameters/common/index.js +6 -1
- package/dist/features/parameters/common/parameter-field.js +2 -1
- package/dist/features/parameters/common/parameter-layout/index.d.ts +8 -0
- package/dist/features/parameters/common/parameter-layout/index.js +7 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.d.ts +10 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.js +15 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout.d.ts +23 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout.js +167 -0
- package/dist/features/parameters/common/provider-param.d.ts +10 -0
- package/dist/features/parameters/common/{ProviderParam.js → provider-param.js} +8 -10
- package/dist/features/parameters/common/widget/parameter-float.js +1 -1
- package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +1 -1
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +39 -60
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +39 -101
- package/dist/features/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +8 -7
- package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +10 -9
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +38 -71
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +39 -60
- package/dist/features/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +8 -7
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +42 -104
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +75 -96
- package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters.js +8 -7
- package/dist/features/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.js +7 -6
- package/dist/features/parameters/index.js +6 -1
- package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -0
- package/dist/features/parameters/loadflow/load-flow-parameters-content.js +11 -10
- package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +12 -18
- package/dist/features/parameters/loadflow/load-flow-parameters-form.d.ts +1 -6
- package/dist/features/parameters/loadflow/load-flow-parameters-form.js +26 -91
- package/dist/features/parameters/loadflow/load-flow-parameters-header.js +29 -53
- package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +35 -127
- package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +11 -10
- package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +10 -9
- package/dist/features/parameters/network-visualizations/map-parameters.js +10 -9
- package/dist/features/parameters/network-visualizations/network-visualizations-form.d.ts +1 -4
- package/dist/features/parameters/network-visualizations/network-visualizations-form.js +19 -45
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +13 -19
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +34 -65
- package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +10 -9
- package/dist/features/parameters/parameters-style.d.ts +0 -1
- package/dist/features/parameters/parameters-style.js +0 -2
- package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +13 -18
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.d.ts +7 -29
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.js +16 -106
- package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +27 -84
- package/dist/features/parameters/security-analysis/columns-definitions.js +11 -10
- package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +20 -20
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.d.ts +2 -4
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +44 -115
- package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +40 -108
- package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.js +9 -8
- package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +1 -0
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +7 -6
- package/dist/features/parameters/sensi/columns-definitions.js +9 -8
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +21 -21
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +3 -5
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +33 -90
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +40 -99
- package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +3 -11
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +8 -7
- package/dist/features/parameters/sensi/utils.js +8 -7
- package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +2 -1
- package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +8 -7
- package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +13 -18
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.d.ts +1 -4
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.js +5 -60
- package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +33 -101
- package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +12 -11
- package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +10 -9
- package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +11 -10
- package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +1 -0
- package/dist/features/parameters/voltage-init/general-parameters.js +9 -8
- package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +13 -18
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.d.ts +2 -24
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +51 -105
- package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +34 -90
- package/dist/features/process-configs/security-analysis/update-sa-process-config.js +7 -6
- package/dist/index.js +6 -1
- package/dist/translations/en/commonButtonEn.d.ts +2 -0
- package/dist/translations/en/commonButtonEn.js +2 -0
- package/dist/translations/en/parameters.d.ts +1 -0
- package/dist/translations/en/parameters.js +3 -1
- package/dist/translations/fr/commonButtonFr.d.ts +2 -0
- package/dist/translations/fr/commonButtonFr.js +2 -0
- package/dist/translations/fr/parameters.d.ts +1 -0
- package/dist/translations/fr/parameters.js +3 -1
- package/dist/utils/types/elementType.d.ts +1 -0
- package/dist/utils/types/elementType.js +1 -0
- package/package.json +1 -1
- package/dist/features/parameters/common/ProviderParam.d.ts +0 -7
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
2
3
|
import { CustomMuiDialog } from "../../../components/ui/dialogs/customMuiDialog/CustomMuiDialog.js";
|
|
3
4
|
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
4
5
|
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
@@ -7,7 +8,6 @@ import { ElementType } from "../../../utils/types/elementType.js";
|
|
|
7
8
|
import "../../../utils/types/equipmentType.js";
|
|
8
9
|
import "@mui/icons-material";
|
|
9
10
|
import "react";
|
|
10
|
-
import "@mui/material";
|
|
11
11
|
import "react-intl";
|
|
12
12
|
import "react-hook-form";
|
|
13
13
|
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
@@ -55,7 +55,7 @@ function VoltageInitParametersEditionDialog({
|
|
|
55
55
|
formState: { errors, dirtyFields }
|
|
56
56
|
} = voltageInitMethods.formMethods;
|
|
57
57
|
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsxs(
|
|
59
59
|
CustomMuiDialog,
|
|
60
60
|
{
|
|
61
61
|
open,
|
|
@@ -75,22 +75,17 @@ function VoltageInitParametersEditionDialog({
|
|
|
75
75
|
// we want the dialog height to be fixed even when switching tabs
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
children:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
initialElementName: name,
|
|
87
|
-
activeDirectory,
|
|
88
|
-
elementType: ElementType.VOLTAGE_INIT_PARAMETERS
|
|
89
|
-
}
|
|
90
|
-
);
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Grid2, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
80
|
+
NameElementEditorForm,
|
|
81
|
+
{
|
|
82
|
+
initialElementName: name,
|
|
83
|
+
activeDirectory,
|
|
84
|
+
elementType: ElementType.VOLTAGE_INIT_PARAMETERS
|
|
91
85
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
86
|
+
) }),
|
|
87
|
+
/* @__PURE__ */ jsx(VoltageInitParametersForm, { voltageInitMethods })
|
|
88
|
+
]
|
|
94
89
|
}
|
|
95
90
|
);
|
|
96
91
|
}
|
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { UseVoltageInitParametersFormReturn } from './use-voltage-init-parameters-form';
|
|
3
|
-
export declare const styles: {
|
|
4
|
-
readonly gridWithActions: (theme: import('@mui/material').Theme) => {
|
|
5
|
-
overflowY: "auto";
|
|
6
|
-
overflowX: "hidden";
|
|
7
|
-
paddingRight: string;
|
|
8
|
-
paddingTop: string;
|
|
9
|
-
paddingBottom: string;
|
|
10
|
-
flexGrow: number;
|
|
11
|
-
maxHeight: string;
|
|
12
|
-
};
|
|
13
|
-
readonly gridWithoutActions: (theme: import('@mui/material').Theme) => {
|
|
14
|
-
overflowY: "auto";
|
|
15
|
-
overflowX: "hidden";
|
|
16
|
-
paddingRight: string;
|
|
17
|
-
paddingTop: string;
|
|
18
|
-
paddingBottom: string;
|
|
19
|
-
flexGrow: number;
|
|
20
|
-
maxHeight: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
2
|
interface VoltageInitParametersFormProps {
|
|
24
3
|
voltageInitMethods: UseVoltageInitParametersFormReturn;
|
|
25
|
-
|
|
26
|
-
renderActions?: () => ReactNode;
|
|
4
|
+
showActionsButtons?: boolean;
|
|
27
5
|
}
|
|
28
|
-
export declare function VoltageInitParametersForm({ voltageInitMethods,
|
|
6
|
+
export declare function VoltageInitParametersForm({ voltageInitMethods, showActionsButtons, }: Readonly<VoltageInitParametersFormProps>): import("react").JSX.Element;
|
|
29
7
|
export {};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Tabs, Tab, Grid2 } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
|
-
import { getTabStyle, getTabIndicatorStyle } from "../parameters-style.js";
|
|
4
|
+
import { parametersStyles, getTabStyle, getTabIndicatorStyle } from "../parameters-style.js";
|
|
5
5
|
import "@mui/icons-material";
|
|
6
|
+
import "react";
|
|
7
|
+
import { TabPanel } from "../common/parameters.js";
|
|
6
8
|
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
7
9
|
import "../../../utils/conversionUtils.js";
|
|
8
10
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
-
import "react";
|
|
10
11
|
import "react-hook-form";
|
|
11
12
|
import "localized-countries";
|
|
12
13
|
import "localized-countries/data/fr";
|
|
13
14
|
import "localized-countries/data/en";
|
|
14
15
|
import "notistack";
|
|
15
|
-
import
|
|
16
|
+
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
16
17
|
import "yup";
|
|
17
18
|
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
18
19
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
@@ -30,7 +31,7 @@ import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
|
30
31
|
import "mui-nested-menu";
|
|
31
32
|
import "react-resizable-panels";
|
|
32
33
|
import "react-papaparse";
|
|
33
|
-
import
|
|
34
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
34
35
|
import "../common/widget/parameter-line-slider.js";
|
|
35
36
|
import "../common/limitreductions/columns-definitions.js";
|
|
36
37
|
import "../common/contingency-table/contingency-table.js";
|
|
@@ -41,111 +42,56 @@ import { VoltageInitTabValues } from "./constants.js";
|
|
|
41
42
|
import { GeneralParameters } from "./general-parameters.js";
|
|
42
43
|
import { EquipmentSelectionParameters } from "./equipment-selection-parameters.js";
|
|
43
44
|
import { VoltageLimitsParameters } from "./voltage-limits-parameters.js";
|
|
44
|
-
const styles = {
|
|
45
|
-
gridWithActions: (theme) => ({
|
|
46
|
-
overflowY: "auto",
|
|
47
|
-
overflowX: "hidden",
|
|
48
|
-
paddingRight: theme.spacing(2),
|
|
49
|
-
paddingTop: theme.spacing(2),
|
|
50
|
-
paddingBottom: theme.spacing(1),
|
|
51
|
-
flexGrow: 1,
|
|
52
|
-
maxHeight: "85%"
|
|
53
|
-
}),
|
|
54
|
-
gridWithoutActions: (theme) => ({
|
|
55
|
-
overflowY: "auto",
|
|
56
|
-
overflowX: "hidden",
|
|
57
|
-
paddingRight: theme.spacing(2),
|
|
58
|
-
paddingTop: theme.spacing(2),
|
|
59
|
-
paddingBottom: theme.spacing(1),
|
|
60
|
-
flexGrow: 1,
|
|
61
|
-
maxHeight: "100%"
|
|
62
|
-
})
|
|
63
|
-
};
|
|
64
45
|
function VoltageInitParametersForm({
|
|
65
46
|
voltageInitMethods,
|
|
66
|
-
|
|
67
|
-
renderActions
|
|
47
|
+
showActionsButtons
|
|
68
48
|
}) {
|
|
69
|
-
const {
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
49
|
+
const { selectedTab, handleTabChange, tabIndexesWithError } = voltageInitMethods;
|
|
50
|
+
return /* @__PURE__ */ jsxs(Stack, { sx: parametersStyles.scrollableGrid, children: [
|
|
51
|
+
/* @__PURE__ */ jsxs(
|
|
52
|
+
Tabs,
|
|
53
|
+
{
|
|
54
|
+
value: selectedTab,
|
|
55
|
+
variant: "scrollable",
|
|
56
|
+
onChange: handleTabChange,
|
|
57
|
+
TabIndicatorProps: {
|
|
58
|
+
sx: getTabIndicatorStyle(tabIndexesWithError, selectedTab)
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
Tab,
|
|
63
|
+
{
|
|
64
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "VoltageInitParametersGeneralTabLabel" }),
|
|
65
|
+
value: VoltageInitTabValues.GENERAL,
|
|
66
|
+
sx: getTabStyle(tabIndexesWithError, VoltageInitTabValues.GENERAL)
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Tab,
|
|
71
|
+
{
|
|
72
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "VoltageLimits" }),
|
|
73
|
+
value: VoltageInitTabValues.VOLTAGE_LIMITS,
|
|
74
|
+
sx: getTabStyle(tabIndexesWithError, VoltageInitTabValues.VOLTAGE_LIMITS)
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
Tab,
|
|
82
79
|
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ jsxs(
|
|
89
|
-
Tabs,
|
|
90
|
-
{
|
|
91
|
-
value: selectedTab,
|
|
92
|
-
variant: "scrollable",
|
|
93
|
-
onChange: handleTabChange,
|
|
94
|
-
TabIndicatorProps: {
|
|
95
|
-
sx: getTabIndicatorStyle(tabIndexesWithError, selectedTab)
|
|
96
|
-
},
|
|
97
|
-
children: [
|
|
98
|
-
/* @__PURE__ */ jsx(
|
|
99
|
-
Tab,
|
|
100
|
-
{
|
|
101
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "VoltageInitParametersGeneralTabLabel" }),
|
|
102
|
-
value: VoltageInitTabValues.GENERAL,
|
|
103
|
-
sx: getTabStyle(tabIndexesWithError, VoltageInitTabValues.GENERAL)
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
/* @__PURE__ */ jsx(
|
|
107
|
-
Tab,
|
|
108
|
-
{
|
|
109
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "VoltageLimits" }),
|
|
110
|
-
value: VoltageInitTabValues.VOLTAGE_LIMITS,
|
|
111
|
-
sx: getTabStyle(tabIndexesWithError, VoltageInitTabValues.VOLTAGE_LIMITS)
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
/* @__PURE__ */ jsx(
|
|
115
|
-
Tab,
|
|
116
|
-
{
|
|
117
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "EquipmentSelection" }),
|
|
118
|
-
value: VoltageInitTabValues.EQUIPMENTS_SELECTION,
|
|
119
|
-
sx: getTabStyle(tabIndexesWithError, VoltageInitTabValues.EQUIPMENTS_SELECTION)
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
),
|
|
125
|
-
/* @__PURE__ */ jsxs(Grid2, { container: true, children: [
|
|
126
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: VoltageInitTabValues.GENERAL, children: /* @__PURE__ */ jsx(GeneralParameters, { withApplyModifications: renderActions != null }) }),
|
|
127
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: VoltageInitTabValues.VOLTAGE_LIMITS, children: /* @__PURE__ */ jsx(VoltageLimitsParameters, {}) }),
|
|
128
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: VoltageInitTabValues.EQUIPMENTS_SELECTION, children: /* @__PURE__ */ jsx(EquipmentSelectionParameters, {}) })
|
|
129
|
-
] })
|
|
130
|
-
]
|
|
80
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "EquipmentSelection" }),
|
|
81
|
+
value: VoltageInitTabValues.EQUIPMENTS_SELECTION,
|
|
82
|
+
sx: getTabStyle(tabIndexesWithError, VoltageInitTabValues.EQUIPMENTS_SELECTION)
|
|
131
83
|
}
|
|
132
84
|
)
|
|
133
|
-
]
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
) });
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, children: [
|
|
89
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: VoltageInitTabValues.GENERAL, children: /* @__PURE__ */ jsx(GeneralParameters, { withApplyModifications: !!showActionsButtons }) }),
|
|
90
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: VoltageInitTabValues.VOLTAGE_LIMITS, children: /* @__PURE__ */ jsx(VoltageLimitsParameters, {}) }),
|
|
91
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: VoltageInitTabValues.EQUIPMENTS_SELECTION, children: /* @__PURE__ */ jsx(EquipmentSelectionParameters, {}) })
|
|
92
|
+
] })
|
|
93
|
+
] });
|
|
147
94
|
}
|
|
148
95
|
export {
|
|
149
|
-
VoltageInitParametersForm
|
|
150
|
-
styles
|
|
96
|
+
VoltageInitParametersForm
|
|
151
97
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { useIntl, FormattedMessage } from "react-intl";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect } from "react";
|
|
3
|
+
import "react-intl";
|
|
5
4
|
import "../../../utils/conversionUtils.js";
|
|
6
5
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
7
6
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
@@ -9,35 +8,33 @@ import "../../../utils/types/equipmentType.js";
|
|
|
9
8
|
import "@mui/icons-material";
|
|
10
9
|
import { updateVoltageInitParameters } from "../../../services/study.js";
|
|
11
10
|
import { getVoltageInitParameters } from "../../../services/voltage-init.js";
|
|
11
|
+
import "@mui/material";
|
|
12
12
|
import "localized-countries";
|
|
13
13
|
import "localized-countries/data/fr";
|
|
14
14
|
import "localized-countries/data/en";
|
|
15
15
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
16
|
-
import "
|
|
16
|
+
import { ParameterLayout } from "../common/parameter-layout/parameter-layout.js";
|
|
17
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
17
18
|
import "react-hook-form";
|
|
18
|
-
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
19
|
-
import
|
|
19
|
+
import { CustomFormProvider } from "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
20
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
21
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
22
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
23
|
+
import "@hello-pangea/dnd";
|
|
24
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
20
25
|
import "yup";
|
|
21
|
-
import { DirectoryItemSelector } from "../../../components/ui/directoryItemSelector/DirectoryItemSelector.js";
|
|
22
26
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
23
|
-
import { PopupConfirmationDialog } from "../../../components/ui/dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
|
|
24
27
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
25
28
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
26
29
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
27
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
29
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
30
32
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
31
33
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
32
|
-
import "@hello-pangea/dnd";
|
|
33
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
34
34
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
35
35
|
import "mui-nested-menu";
|
|
36
36
|
import "react-resizable-panels";
|
|
37
37
|
import "react-papaparse";
|
|
38
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
39
|
-
import { LabelledButton } from "../common/parameters.js";
|
|
40
|
-
import { CreateParameterDialog } from "../common/parameters-creation-dialog.js";
|
|
41
38
|
import "../common/widget/parameter-line-slider.js";
|
|
42
39
|
import "../common/limitreductions/columns-definitions.js";
|
|
43
40
|
import "../common/contingency-table/contingency-table.js";
|
|
@@ -60,16 +57,11 @@ function VoltageInitParametersInLine({
|
|
|
60
57
|
studyUuid,
|
|
61
58
|
parameters: voltageInitParameters
|
|
62
59
|
});
|
|
63
|
-
const intl = useIntl();
|
|
64
|
-
const [openCreateParameterDialog, setOpenCreateParameterDialog] = useState(false);
|
|
65
|
-
const [openSelectParameterDialog, setOpenSelectParameterDialog] = useState(false);
|
|
66
|
-
const [openResetConfirmation, setOpenResetConfirmation] = useState(false);
|
|
67
60
|
const { snackError } = useSnackMessage();
|
|
68
|
-
const { formState, getValues, handleSubmit, reset
|
|
61
|
+
const { formState, getValues, handleSubmit, reset } = voltageInitMethods.formMethods;
|
|
69
62
|
const handleLoadParameters = useCallback(
|
|
70
63
|
(newParams) => {
|
|
71
64
|
if (newParams?.length) {
|
|
72
|
-
setOpenSelectParameterDialog(false);
|
|
73
65
|
const parametersUuid = newParams[0].id;
|
|
74
66
|
getVoltageInitParameters(parametersUuid).then((params) => {
|
|
75
67
|
reset(fromVoltageInitParamsDataToFormValues(params), {
|
|
@@ -79,7 +71,6 @@ function VoltageInitParametersInLine({
|
|
|
79
71
|
snackWithFallback(snackError, error, { headerId: "paramsRetrievingError" });
|
|
80
72
|
});
|
|
81
73
|
}
|
|
82
|
-
setOpenSelectParameterDialog(false);
|
|
83
74
|
},
|
|
84
75
|
[reset, snackError]
|
|
85
76
|
);
|
|
@@ -91,80 +82,33 @@ function VoltageInitParametersInLine({
|
|
|
91
82
|
}).catch((error) => {
|
|
92
83
|
snackWithFallback(snackError, error, { headerId: "updateVoltageInitParametersError" });
|
|
93
84
|
});
|
|
94
|
-
setOpenResetConfirmation(false);
|
|
95
85
|
}, [studyUuid, snackError]);
|
|
96
|
-
const handleResetClick = useCallback(() => {
|
|
97
|
-
setOpenResetConfirmation(true);
|
|
98
|
-
}, []);
|
|
99
|
-
const handleCancelReset = useCallback(() => {
|
|
100
|
-
setOpenResetConfirmation(false);
|
|
101
|
-
}, []);
|
|
102
86
|
useEffect(() => {
|
|
103
87
|
setHaveDirtyFields(formState.isDirty);
|
|
104
88
|
}, [formState, setHaveDirtyFields]);
|
|
105
|
-
const handleOpenSaveDialog = useCallback(() => {
|
|
106
|
-
trigger().then((isValid) => {
|
|
107
|
-
if (isValid) {
|
|
108
|
-
setOpenCreateParameterDialog(true);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}, [trigger]);
|
|
112
89
|
return /* @__PURE__ */ jsx(
|
|
113
|
-
|
|
90
|
+
CustomFormProvider,
|
|
114
91
|
{
|
|
115
|
-
voltageInitMethods,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
onClose: () => setOpenCreateParameterDialog(false),
|
|
136
|
-
parameterValues: getValues,
|
|
137
|
-
parameterFormatter: (params) => fromVoltageInitParametersFormToParamValues(params).computationParameters,
|
|
138
|
-
parameterType: ElementType.VOLTAGE_INIT_PARAMETERS
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
openSelectParameterDialog && /* @__PURE__ */ jsx(
|
|
142
|
-
DirectoryItemSelector,
|
|
143
|
-
{
|
|
144
|
-
open: openSelectParameterDialog,
|
|
145
|
-
onClose: handleLoadParameters,
|
|
146
|
-
types: [ElementType.VOLTAGE_INIT_PARAMETERS],
|
|
147
|
-
title: intl.formatMessage({
|
|
148
|
-
id: "showSelectParameterDialog"
|
|
149
|
-
}),
|
|
150
|
-
multiSelect: false,
|
|
151
|
-
validationButtonText: intl.formatMessage({
|
|
152
|
-
id: "validate"
|
|
153
|
-
})
|
|
154
|
-
}
|
|
155
|
-
),
|
|
156
|
-
openResetConfirmation && /* @__PURE__ */ jsx(
|
|
157
|
-
PopupConfirmationDialog,
|
|
158
|
-
{
|
|
159
|
-
message: "resetParamsConfirmation",
|
|
160
|
-
validateButtonLabel: "validate",
|
|
161
|
-
openConfirmationPopup: openResetConfirmation,
|
|
162
|
-
setOpenConfirmationPopup: handleCancelReset,
|
|
163
|
-
handlePopupConfirmation: resetVoltageInitParameters
|
|
164
|
-
}
|
|
165
|
-
)
|
|
166
|
-
] });
|
|
167
|
-
}
|
|
92
|
+
validationSchema: voltageInitMethods.formSchema,
|
|
93
|
+
...voltageInitMethods.formMethods,
|
|
94
|
+
removeOptional: true,
|
|
95
|
+
children: /* @__PURE__ */ jsx(
|
|
96
|
+
ParameterLayout,
|
|
97
|
+
{
|
|
98
|
+
title: "VoltageInit",
|
|
99
|
+
isLoading: voltageInitMethods.paramsLoading,
|
|
100
|
+
parameterType: ElementType.VOLTAGE_INIT_PARAMETERS,
|
|
101
|
+
createParameter: {
|
|
102
|
+
studyUuid,
|
|
103
|
+
getParameterValues: getValues,
|
|
104
|
+
parameterFormatter: (params) => fromVoltageInitParametersFormToParamValues(params).computationParameters
|
|
105
|
+
},
|
|
106
|
+
selectParameterHandler: handleLoadParameters,
|
|
107
|
+
resetHandler: resetVoltageInitParameters,
|
|
108
|
+
validateHandler: handleSubmit(voltageInitMethods.onSaveInline),
|
|
109
|
+
children: /* @__PURE__ */ jsx(VoltageInitParametersForm, { voltageInitMethods, showActionsButtons: true })
|
|
110
|
+
}
|
|
111
|
+
)
|
|
168
112
|
}
|
|
169
113
|
);
|
|
170
114
|
}
|
|
@@ -8,30 +8,31 @@ import { ElementType } from "../../../utils/types/elementType.js";
|
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import "@mui/icons-material";
|
|
10
10
|
import "react";
|
|
11
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
12
|
+
import "react-hook-form";
|
|
11
13
|
import "localized-countries";
|
|
12
14
|
import "localized-countries/data/fr";
|
|
13
15
|
import "localized-countries/data/en";
|
|
14
16
|
import "notistack";
|
|
15
|
-
import "react-hook-form";
|
|
16
17
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
17
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
18
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
19
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
20
|
-
import "@hello-pangea/dnd";
|
|
21
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
22
18
|
import "yup";
|
|
19
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
23
20
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
24
21
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
25
22
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
26
23
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
27
24
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
25
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
26
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
27
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
28
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
29
|
+
import "@hello-pangea/dnd";
|
|
30
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
31
31
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
32
32
|
import "mui-nested-menu";
|
|
33
33
|
import "react-resizable-panels";
|
|
34
34
|
import "react-papaparse";
|
|
35
|
+
import "../../parameters/common/parameter-layout/parameter-layout-provider.js";
|
|
35
36
|
import { ParameterLineDirectoryItemsInput } from "../../parameters/common/widget/parameter-line-directory-items-input.js";
|
|
36
37
|
import "../../parameters/common/widget/parameter-line-slider.js";
|
|
37
38
|
import "../../parameters/common/limitreductions/columns-definitions.js";
|
package/dist/index.js
CHANGED
|
@@ -172,12 +172,14 @@ import { AboutDialog } from "./features/topBar/AboutDialog.js";
|
|
|
172
172
|
import { GridLogo, LogoText } from "./features/topBar/GridLogo.js";
|
|
173
173
|
import { DevModeBanner } from "./features/topBar/DevModeBanner.js";
|
|
174
174
|
import { TopBar } from "./features/topBar/TopBar.js";
|
|
175
|
+
import { ParameterLayout } from "./features/parameters/common/parameter-layout/parameter-layout.js";
|
|
176
|
+
import { ParameterLayoutProvider, useParameterLayoutContext } from "./features/parameters/common/parameter-layout/parameter-layout-provider.js";
|
|
175
177
|
import { formatComputingTypeLabel, isValidComputingType } from "./features/parameters/common/computing-type.js";
|
|
176
178
|
import { COMMON_PARAMETERS, CONTINGENCIES, CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./features/parameters/common/constants.js";
|
|
177
179
|
import { LineSeparator } from "./features/parameters/common/line-separator.js";
|
|
178
180
|
import { LabelledButton, SwitchWithLabel, TabPanel } from "./features/parameters/common/parameters.js";
|
|
179
181
|
import { CreateParameterDialog } from "./features/parameters/common/parameters-creation-dialog.js";
|
|
180
|
-
import { ProviderParam } from "./features/parameters/common/
|
|
182
|
+
import { ProviderParam } from "./features/parameters/common/provider-param.js";
|
|
181
183
|
import { ParameterFloat } from "./features/parameters/common/widget/parameter-float.js";
|
|
182
184
|
import { ParameterGroup } from "./features/parameters/common/widget/parameter-group.js";
|
|
183
185
|
import { ParameterLineDirectoryItemsInput } from "./features/parameters/common/widget/parameter-line-directory-items-input.js";
|
|
@@ -886,6 +888,8 @@ export {
|
|
|
886
888
|
PSTS_EQUIPMENT_TYPES,
|
|
887
889
|
ParameterFloat,
|
|
888
890
|
ParameterGroup,
|
|
891
|
+
ParameterLayout,
|
|
892
|
+
ParameterLayoutProvider,
|
|
889
893
|
ParameterLineDirectoryItemsInput,
|
|
890
894
|
ParameterLineSlider,
|
|
891
895
|
ParameterSwitch,
|
|
@@ -1549,6 +1553,7 @@ export {
|
|
|
1549
1553
|
useModificationLabelComputer,
|
|
1550
1554
|
useModificationsDragAndDrop,
|
|
1551
1555
|
useNotificationsListener,
|
|
1556
|
+
useParameterLayoutContext,
|
|
1552
1557
|
useParametersBackend,
|
|
1553
1558
|
useParametersForm,
|
|
1554
1559
|
usePredefinedProperties,
|
|
@@ -399,7 +399,9 @@ const parametersEn = {
|
|
|
399
399
|
BUILDING: "Building",
|
|
400
400
|
NODE_BUILT: "Node built",
|
|
401
401
|
NODE_NOT_BUILT: "Node not built",
|
|
402
|
-
ROOT_NODE: "Root node"
|
|
402
|
+
ROOT_NODE: "Root node",
|
|
403
|
+
// Tooltips
|
|
404
|
+
"tooltip.reset": "User default parameters"
|
|
403
405
|
};
|
|
404
406
|
export {
|
|
405
407
|
parametersEn
|
|
@@ -398,7 +398,9 @@ const parametersFr = {
|
|
|
398
398
|
BUILDING: "En cours de réalisation",
|
|
399
399
|
NODE_BUILT: "Nœud réalisé",
|
|
400
400
|
NODE_NOT_BUILT: "Nœud non réalisé",
|
|
401
|
-
ROOT_NODE: "Nœud racine"
|
|
401
|
+
ROOT_NODE: "Nœud racine",
|
|
402
|
+
// Tooltips
|
|
403
|
+
"tooltip.reset": "Paramètres par défaut du profil utilisateur"
|
|
402
404
|
};
|
|
403
405
|
export {
|
|
404
406
|
parametersFr
|
|
@@ -24,6 +24,7 @@ export declare enum ElementType {
|
|
|
24
24
|
DYNAMIC_SECURITY_ANALYSIS_PARAMETERS = "DYNAMIC_SECURITY_ANALYSIS_PARAMETERS",
|
|
25
25
|
DYNAMIC_MARGIN_CALCULATION_PARAMETERS = "DYNAMIC_MARGIN_CALCULATION_PARAMETERS",
|
|
26
26
|
NETWORK_VISUALIZATIONS_PARAMETERS = "NETWORK_VISUALIZATIONS_PARAMETERS",
|
|
27
|
+
STATE_ESTIMATION_PARAMETERS = "STATE_ESTIMATION_PARAMETERS",
|
|
27
28
|
SPREADSHEET_CONFIG = "SPREADSHEET_CONFIG",
|
|
28
29
|
SPREADSHEET_CONFIG_COLLECTION = "SPREADSHEET_CONFIG_COLLECTION",
|
|
29
30
|
DIAGRAM_CONFIG = "DIAGRAM_CONFIG",
|
|
@@ -15,6 +15,7 @@ var ElementType = /* @__PURE__ */ ((ElementType2) => {
|
|
|
15
15
|
ElementType2["DYNAMIC_SECURITY_ANALYSIS_PARAMETERS"] = "DYNAMIC_SECURITY_ANALYSIS_PARAMETERS";
|
|
16
16
|
ElementType2["DYNAMIC_MARGIN_CALCULATION_PARAMETERS"] = "DYNAMIC_MARGIN_CALCULATION_PARAMETERS";
|
|
17
17
|
ElementType2["NETWORK_VISUALIZATIONS_PARAMETERS"] = "NETWORK_VISUALIZATIONS_PARAMETERS";
|
|
18
|
+
ElementType2["STATE_ESTIMATION_PARAMETERS"] = "STATE_ESTIMATION_PARAMETERS";
|
|
18
19
|
ElementType2["SPREADSHEET_CONFIG"] = "SPREADSHEET_CONFIG";
|
|
19
20
|
ElementType2["SPREADSHEET_CONFIG_COLLECTION"] = "SPREADSHEET_CONFIG_COLLECTION";
|
|
20
21
|
ElementType2["DIAGRAM_CONFIG"] = "DIAGRAM_CONFIG";
|