@gridsuite/commons-ui 0.269.0 → 0.271.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/ui/dialogs/customMuiDialog/CustomMuiDialog.d.ts +10 -3
- package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.js +33 -28
- package/dist/features/index.js +96 -3
- package/dist/features/network-modifications/common/branch/branchCreation.types.d.ts +26 -0
- package/dist/features/network-modifications/common/branch/branchModification.types.d.ts +36 -0
- package/dist/features/network-modifications/common/branch/branchModification.types.js +1 -0
- package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.d.ts → common/branch/index.d.ts} +2 -8
- package/dist/features/network-modifications/common/branch/index.js +1 -0
- package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +2 -0
- package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +1 -0
- package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +2 -2
- package/dist/features/network-modifications/common/index.d.ts +1 -0
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +1 -1
- package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.d.ts +2 -2
- package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.js +2 -2
- package/dist/features/network-modifications/index.d.ts +1 -0
- package/dist/features/network-modifications/index.js +96 -3
- package/dist/features/network-modifications/line/characteristics/index.d.ts +0 -1
- package/dist/features/network-modifications/line/characteristics/index.js +1 -2
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +4 -19
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +0 -14
- package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +6 -26
- package/dist/features/network-modifications/line/index.js +1 -2
- package/dist/features/network-modifications/line/modification/lineModification.types.d.ts +3 -35
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.d.ts +7 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.js +168 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.d.ts +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.js +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.d.ts +41 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.js +51 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.js +123 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.js +89 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.d.ts +14 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.js +118 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +47 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/index.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/index.js +13 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.d.ts +87 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.d.ts +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.js +50 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/index.d.ts +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/index.js +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.d.ts +47 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.js +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.d.ts +248 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.js +325 -0
- package/dist/features/network-modifications/twoWindingsTransformer/index.d.ts +11 -0
- package/dist/features/network-modifications/twoWindingsTransformer/index.js +88 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/index.js +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.js +104 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.js +7 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.d.ts +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.js +18 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.d.ts +39 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.d.ts +265 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.js +100 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.d.ts +13 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.js +130 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.d.ts +20 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.js +311 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.js +53 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.d.ts +2 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.js +198 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.js +201 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.js +15 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.d.ts +114 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.js +242 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.d.ts +2 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.js +283 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.js +181 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.js +18 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.d.ts +132 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.js +211 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.d.ts +2 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.js +102 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.d.ts +7 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.js +22 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.js +86 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.d.ts +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.js +140 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.js +13 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.js +19 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.d.ts +14 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.js +79 -0
- package/dist/features/network-modifications/voltageLevel/index.d.ts +1 -0
- package/dist/features/network-modifications/voltageLevel/index.js +9 -1
- package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.d.ts +10 -0
- package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.js +375 -0
- package/dist/features/network-modifications/voltageLevel/section/index.d.ts +9 -0
- package/dist/features/network-modifications/voltageLevel/section/index.js +10 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.types.d.ts +15 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.types.js +1 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.utils.d.ts +48 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.utils.js +100 -0
- package/dist/index.js +107 -7
- package/dist/translations/en/filterExpertEn.d.ts +0 -3
- package/dist/translations/en/filterExpertEn.js +0 -3
- package/dist/translations/en/network-modification-validationEn.d.ts +1 -0
- package/dist/translations/en/network-modification-validationEn.js +2 -1
- package/dist/translations/en/networkModificationsEn.d.ts +87 -9
- package/dist/translations/en/networkModificationsEn.js +91 -12
- package/dist/translations/fr/filterExpertFr.d.ts +0 -3
- package/dist/translations/fr/filterExpertFr.js +0 -3
- package/dist/translations/fr/network-modification-validationFr.d.ts +1 -0
- package/dist/translations/fr/network-modification-validationFr.js +2 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +87 -9
- package/dist/translations/fr/networkModificationsFr.js +91 -12
- package/dist/utils/constants/fieldConstants.d.ts +37 -0
- package/dist/utils/constants/fieldConstants.js +37 -0
- package/dist/utils/constants/index.js +2 -1
- package/dist/utils/constants/translationKeys.d.ts +1 -0
- package/dist/utils/constants/translationKeys.js +2 -0
- package/dist/utils/functions.d.ts +9 -0
- package/dist/utils/functions.js +40 -0
- package/dist/utils/index.js +11 -4
- package/dist/utils/langs.d.ts +1 -0
- package/dist/utils/langs.js +9 -1
- package/dist/utils/types/equipmentType.d.ts +34 -0
- package/dist/utils/types/equipmentType.js +28 -0
- package/dist/utils/types/index.js +4 -1
- package/package.json +1 -1
- /package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.js → common/branch/branchCreation.types.js} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
2
|
+
import { FieldConstants } from '../../../../utils';
|
|
3
|
+
export declare const getTwtCharacteristicsValidationSchemaProps: (isModification?: boolean) => import('yup').ObjectSchema<{
|
|
4
|
+
r: number | null | undefined;
|
|
5
|
+
x: number | null | undefined;
|
|
6
|
+
g: number | null | undefined;
|
|
7
|
+
b: number | null | undefined;
|
|
8
|
+
ratedS: number | null | undefined;
|
|
9
|
+
ratedU1: number | null | undefined;
|
|
10
|
+
ratedU2: number | null | undefined;
|
|
11
|
+
}, import('yup').AnyObject, {
|
|
12
|
+
r: undefined;
|
|
13
|
+
x: undefined;
|
|
14
|
+
g: undefined;
|
|
15
|
+
b: undefined;
|
|
16
|
+
ratedS: undefined;
|
|
17
|
+
ratedU1: undefined;
|
|
18
|
+
ratedU2: undefined;
|
|
19
|
+
}, "">;
|
|
20
|
+
type TwtCharacteristicsFormData = InferType<ReturnType<typeof getTwtCharacteristicsValidationSchemaProps>>;
|
|
21
|
+
export declare const getTwtCharacteristicsEmptyFormData: () => {
|
|
22
|
+
r: null;
|
|
23
|
+
x: null;
|
|
24
|
+
g: null;
|
|
25
|
+
b: null;
|
|
26
|
+
ratedS: null;
|
|
27
|
+
ratedU1: null;
|
|
28
|
+
ratedU2: null;
|
|
29
|
+
};
|
|
30
|
+
export declare const getTwtCharacteristicsFormData: ({ r, x, g, b, ratedS, ratedU1, ratedU2, }: TwtCharacteristicsFormData, id?: FieldConstants) => {
|
|
31
|
+
[x: string]: {
|
|
32
|
+
r: number | null;
|
|
33
|
+
x: number | null;
|
|
34
|
+
g: number | null;
|
|
35
|
+
b: number | null;
|
|
36
|
+
ratedS: number | null;
|
|
37
|
+
ratedU1: number | null;
|
|
38
|
+
ratedU2: number | null;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { object, number } from "yup";
|
|
2
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
3
|
+
import { MUST_BE_GREATER_OR_EQUAL_TO_ZERO } from "../../../../utils/constants/translationKeys.js";
|
|
4
|
+
import "../../../../utils/conversionUtils.js";
|
|
5
|
+
import "../../../../utils/types/equipmentType.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
const getTwtCharacteristicsValidationSchemaProps = (isModification = false) => object().shape({
|
|
9
|
+
[FieldConstants.R]: isModification ? number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO) : number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required(),
|
|
10
|
+
[FieldConstants.X]: isModification ? number().nullable() : number().nullable().required(),
|
|
11
|
+
[FieldConstants.G]: isModification ? number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO) : number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required(),
|
|
12
|
+
[FieldConstants.B]: isModification ? number().nullable() : number().nullable().required(),
|
|
13
|
+
[FieldConstants.RATED_S]: number().nullable().positive("RatedNominalPowerMustBeGreaterThanZero"),
|
|
14
|
+
[FieldConstants.RATED_U1]: isModification ? number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO) : number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required(),
|
|
15
|
+
[FieldConstants.RATED_U2]: isModification ? number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO) : number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required()
|
|
16
|
+
});
|
|
17
|
+
const getTwtCharacteristicsEmptyFormData = () => {
|
|
18
|
+
return {
|
|
19
|
+
[FieldConstants.R]: null,
|
|
20
|
+
[FieldConstants.X]: null,
|
|
21
|
+
[FieldConstants.G]: null,
|
|
22
|
+
[FieldConstants.B]: null,
|
|
23
|
+
[FieldConstants.RATED_S]: null,
|
|
24
|
+
[FieldConstants.RATED_U1]: null,
|
|
25
|
+
[FieldConstants.RATED_U2]: null
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const getTwtCharacteristicsFormData = ({
|
|
29
|
+
r = null,
|
|
30
|
+
x = null,
|
|
31
|
+
g = null,
|
|
32
|
+
b = null,
|
|
33
|
+
ratedS = null,
|
|
34
|
+
ratedU1 = null,
|
|
35
|
+
ratedU2 = null
|
|
36
|
+
}, id = FieldConstants.CHARACTERISTICS) => ({
|
|
37
|
+
[id]: {
|
|
38
|
+
[FieldConstants.R]: r,
|
|
39
|
+
[FieldConstants.X]: x,
|
|
40
|
+
[FieldConstants.G]: g,
|
|
41
|
+
[FieldConstants.B]: b,
|
|
42
|
+
[FieldConstants.RATED_S]: ratedS,
|
|
43
|
+
[FieldConstants.RATED_U1]: ratedU1,
|
|
44
|
+
[FieldConstants.RATED_U2]: ratedU2
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
getTwtCharacteristicsEmptyFormData,
|
|
49
|
+
getTwtCharacteristicsFormData,
|
|
50
|
+
getTwtCharacteristicsValidationSchemaProps
|
|
51
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TwoWindingsTransformerMapInfos } from './twoWindingsTransformer.types';
|
|
2
|
+
export interface TwoWindingsTransformerDialogHeaderProps {
|
|
3
|
+
twtToModify?: TwoWindingsTransformerMapInfos | null;
|
|
4
|
+
isModification?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function TwoWindingsTransformerDialogHeader({ twtToModify, isModification, }: Readonly<TwoWindingsTransformerDialogHeaderProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TextField, Grid } from "@mui/material";
|
|
3
|
+
import { useWatch } from "react-hook-form";
|
|
4
|
+
import { filledTextField } from "../../common/form.utils.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../../common/properties/propertyUtils.js";
|
|
7
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
8
|
+
import "../../../../utils/conversionUtils.js";
|
|
9
|
+
import "../../../../utils/types/equipmentType.js";
|
|
10
|
+
import "@mui/icons-material";
|
|
11
|
+
import "react-intl";
|
|
12
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
13
|
+
import "localized-countries";
|
|
14
|
+
import "localized-countries/data/fr";
|
|
15
|
+
import "localized-countries/data/en";
|
|
16
|
+
import "notistack";
|
|
17
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import { SwitchInput } from "../../../../components/ui/reactHookForm/booleans/SwitchInput.js";
|
|
21
|
+
import { TextInput } from "../../../../components/ui/reactHookForm/text/TextInput.js";
|
|
22
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
|
|
28
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
|
+
import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
31
|
+
import "@hello-pangea/dnd";
|
|
32
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
33
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
34
|
+
import "mui-nested-menu";
|
|
35
|
+
import "react-resizable-panels";
|
|
36
|
+
import "react-papaparse";
|
|
37
|
+
import "react-dom";
|
|
38
|
+
import "autosuggest-highlight/match";
|
|
39
|
+
import "autosuggest-highlight/parse";
|
|
40
|
+
import "clsx";
|
|
41
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
42
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
43
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
44
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
45
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
46
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
47
|
+
import "react-querybuilder";
|
|
48
|
+
import "uuid";
|
|
49
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
50
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
51
|
+
import { GridItem } from "../../../../components/composite/grid/grid-item.js";
|
|
52
|
+
import "@react-querybuilder/material";
|
|
53
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
54
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
55
|
+
import "../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
56
|
+
import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
57
|
+
import "ag-grid-community";
|
|
58
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
59
|
+
import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
60
|
+
import "mathjs";
|
|
61
|
+
import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
62
|
+
import "react-window";
|
|
63
|
+
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
64
|
+
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
65
|
+
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
66
|
+
import "@mui/material/colors";
|
|
67
|
+
import "@mui/x-charts";
|
|
68
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
69
|
+
function TwoWindingsTransformerDialogHeader({
|
|
70
|
+
twtToModify,
|
|
71
|
+
isModification = false
|
|
72
|
+
}) {
|
|
73
|
+
const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
|
|
74
|
+
const twtIdField = isModification ? /* @__PURE__ */ jsx(
|
|
75
|
+
TextField,
|
|
76
|
+
{
|
|
77
|
+
size: "small",
|
|
78
|
+
fullWidth: true,
|
|
79
|
+
label: "ID",
|
|
80
|
+
value: equipmentId,
|
|
81
|
+
slotProps: {
|
|
82
|
+
input: {
|
|
83
|
+
readOnly: true
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
disabled: true,
|
|
87
|
+
...filledTextField
|
|
88
|
+
}
|
|
89
|
+
) : /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_ID, label: "ID", formProps: filledTextField });
|
|
90
|
+
const twtNameField = /* @__PURE__ */ jsx(
|
|
91
|
+
TextInput,
|
|
92
|
+
{
|
|
93
|
+
name: FieldConstants.EQUIPMENT_NAME,
|
|
94
|
+
label: "Name",
|
|
95
|
+
formProps: filledTextField,
|
|
96
|
+
previousValue: twtToModify?.name ?? void 0,
|
|
97
|
+
clearable: isModification
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
const ratioTapChangerEnabledField = /* @__PURE__ */ jsx(
|
|
101
|
+
SwitchInput,
|
|
102
|
+
{
|
|
103
|
+
name: `${FieldConstants.RATIO_TAP_CHANGER}.${FieldConstants.ENABLED}`,
|
|
104
|
+
label: isModification ? "WithRatioTapChanger" : "ConfigureRatioTapChanger"
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
const phaseTapChangerEnabledField = /* @__PURE__ */ jsx(
|
|
108
|
+
SwitchInput,
|
|
109
|
+
{
|
|
110
|
+
name: `${FieldConstants.PHASE_TAP_CHANGER}.${FieldConstants.ENABLED}`,
|
|
111
|
+
label: isModification ? "WithPhaseTapChanger" : "ConfigurePhaseTapChanger"
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, sx: { width: "100%" }, children: [
|
|
115
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: twtIdField }),
|
|
116
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: twtNameField }),
|
|
117
|
+
/* @__PURE__ */ jsx(GridItem, { size: 2, children: ratioTapChangerEnabledField }),
|
|
118
|
+
/* @__PURE__ */ jsx(GridItem, { size: 2, children: phaseTapChangerEnabledField })
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
TwoWindingsTransformerDialogHeader
|
|
123
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface TwoWindingsTransformerDialogProps {
|
|
3
|
+
tabIndex: number;
|
|
4
|
+
tabIndexesWithError: number[];
|
|
5
|
+
setTabIndex: (newTabIndex: number) => void;
|
|
6
|
+
isModification?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function TwoWindingsTransformerDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex, isModification, }: Readonly<TwoWindingsTransformerDialogProps>): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs, Tab } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import { useWatch } from "react-hook-form";
|
|
5
|
+
import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameters-style.js";
|
|
6
|
+
import { TwoWindingsTransformerDialogTab } from "./twoWindingsTransformer.utils.js";
|
|
7
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
8
|
+
import "../../../../utils/conversionUtils.js";
|
|
9
|
+
import "../../../../utils/types/equipmentType.js";
|
|
10
|
+
import "@mui/icons-material";
|
|
11
|
+
function TwoWindingsTransformerDialogTabs({
|
|
12
|
+
tabIndex,
|
|
13
|
+
tabIndexesWithError,
|
|
14
|
+
setTabIndex,
|
|
15
|
+
isModification = false
|
|
16
|
+
}) {
|
|
17
|
+
const phaseTapChangerEnabledWatch = useWatch({
|
|
18
|
+
name: `${FieldConstants.PHASE_TAP_CHANGER}.${FieldConstants.ENABLED}`
|
|
19
|
+
});
|
|
20
|
+
const ratioTapChangerEnabledWatch = useWatch({
|
|
21
|
+
name: `${FieldConstants.RATIO_TAP_CHANGER}.${FieldConstants.ENABLED}`
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
Tabs,
|
|
25
|
+
{
|
|
26
|
+
value: tabIndex,
|
|
27
|
+
variant: "scrollable",
|
|
28
|
+
onChange: (event, newValue) => setTabIndex(newValue),
|
|
29
|
+
slotProps: {
|
|
30
|
+
indicator: { sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex) }
|
|
31
|
+
},
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Tab,
|
|
35
|
+
{
|
|
36
|
+
value: TwoWindingsTransformerDialogTab.CONNECTIVITY_TAB,
|
|
37
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "ConnectivityTab" }),
|
|
38
|
+
sx: getTabStyle(tabIndexesWithError, TwoWindingsTransformerDialogTab.CONNECTIVITY_TAB)
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
Tab,
|
|
43
|
+
{
|
|
44
|
+
value: TwoWindingsTransformerDialogTab.CHARACTERISTICS_TAB,
|
|
45
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "CharacteristicsTab" }),
|
|
46
|
+
sx: getTabStyle(tabIndexesWithError, TwoWindingsTransformerDialogTab.CHARACTERISTICS_TAB)
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
Tab,
|
|
51
|
+
{
|
|
52
|
+
value: TwoWindingsTransformerDialogTab.LIMITS_TAB,
|
|
53
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "LimitsTab" }),
|
|
54
|
+
sx: getTabStyle(tabIndexesWithError, TwoWindingsTransformerDialogTab.LIMITS_TAB)
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
isModification && /* @__PURE__ */ jsx(
|
|
58
|
+
Tab,
|
|
59
|
+
{
|
|
60
|
+
value: TwoWindingsTransformerDialogTab.STATE_ESTIMATION_TAB,
|
|
61
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "StateEstimationTab" }),
|
|
62
|
+
sx: getTabStyle(tabIndexesWithError, TwoWindingsTransformerDialogTab.STATE_ESTIMATION_TAB)
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
Tab,
|
|
67
|
+
{
|
|
68
|
+
value: TwoWindingsTransformerDialogTab.RATIO_TAP_TAB,
|
|
69
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "TwoWindingsTransformerRatioTapChangerTab" }),
|
|
70
|
+
sx: getTabStyle(tabIndexesWithError, TwoWindingsTransformerDialogTab.RATIO_TAP_TAB),
|
|
71
|
+
disabled: !ratioTapChangerEnabledWatch
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
Tab,
|
|
76
|
+
{
|
|
77
|
+
value: TwoWindingsTransformerDialogTab.PHASE_TAP_TAB,
|
|
78
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "TwoWindingsTransformerPhaseTapChangerTab" }),
|
|
79
|
+
sx: getTabStyle(tabIndexesWithError, TwoWindingsTransformerDialogTab.PHASE_TAP_TAB),
|
|
80
|
+
disabled: !phaseTapChangerEnabledWatch
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
TwoWindingsTransformerDialogTabs
|
|
89
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConnectivityNetworkProps } from '../../common/connectivity/connectivity.type';
|
|
2
|
+
import { TwoWindingsTransformerMapInfos } from './twoWindingsTransformer.types';
|
|
3
|
+
import { TwoWindingsTransformerModificationDto } from '../modification';
|
|
4
|
+
import { EquipmentType, Identifiable } from '../../../../utils';
|
|
5
|
+
export interface TwoWindingsTransformerDialogTabsContentProps extends ConnectivityNetworkProps {
|
|
6
|
+
twtToModify?: TwoWindingsTransformerMapInfos | null;
|
|
7
|
+
isModification?: boolean;
|
|
8
|
+
tabIndex: number;
|
|
9
|
+
fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
|
|
10
|
+
type: EquipmentType;
|
|
11
|
+
})[]>;
|
|
12
|
+
editData?: TwoWindingsTransformerModificationDto;
|
|
13
|
+
}
|
|
14
|
+
export declare function TwoWindingsTransformerDialogTabsContent({ twtToModify, isModification, tabIndex, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, fetchVoltageLevelEquipments, editData, }: Readonly<TwoWindingsTransformerDialogTabsContentProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from "@mui/material";
|
|
3
|
+
import { BranchConnectivityForm } from "../../common/connectivity/BranchConnectivityForm.js";
|
|
4
|
+
import { BranchActiveReactivePowerMeasurementsForm } from "../../common/measurements/BranchActiveReactivePowerMeasurementsForm.js";
|
|
5
|
+
import { LimitsPane } from "../../common/currentLimits/LimitsPane.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
import "react-intl";
|
|
8
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
9
|
+
import "../../../../utils/conversionUtils.js";
|
|
10
|
+
import "../../../../utils/types/equipmentType.js";
|
|
11
|
+
import "react";
|
|
12
|
+
import "react-hook-form";
|
|
13
|
+
import "localized-countries";
|
|
14
|
+
import "localized-countries/data/fr";
|
|
15
|
+
import "localized-countries/data/en";
|
|
16
|
+
import "notistack";
|
|
17
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
21
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
|
|
26
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
27
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
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
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
32
|
+
import "mui-nested-menu";
|
|
33
|
+
import "react-resizable-panels";
|
|
34
|
+
import "react-papaparse";
|
|
35
|
+
import "react-dom";
|
|
36
|
+
import "autosuggest-highlight/match";
|
|
37
|
+
import "autosuggest-highlight/parse";
|
|
38
|
+
import "clsx";
|
|
39
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
40
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
41
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
42
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
43
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
44
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
45
|
+
import "react-querybuilder";
|
|
46
|
+
import "uuid";
|
|
47
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
48
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
49
|
+
import { GridSection } from "../../../../components/composite/grid/grid-section.js";
|
|
50
|
+
import "@react-querybuilder/material";
|
|
51
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
52
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
53
|
+
import "../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
54
|
+
import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
55
|
+
import "ag-grid-community";
|
|
56
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
57
|
+
import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
58
|
+
import "mathjs";
|
|
59
|
+
import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
60
|
+
import "react-window";
|
|
61
|
+
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
62
|
+
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
63
|
+
import { TwoWindingsTransformerDialogTab } from "./twoWindingsTransformer.utils.js";
|
|
64
|
+
import { RatioTapChangerPane } from "../tapChanger/ratioTapChanger/RatioTapChangerPane.js";
|
|
65
|
+
import { PhaseTapChangerPane } from "../tapChanger/phaseTapChanger/PhaseTapChangerPane.js";
|
|
66
|
+
import { TwoWindingsTransformerCharacteristicsPane } from "../characteristics/TwoWindingsTransformerCharacteristicsPane.js";
|
|
67
|
+
function TwoWindingsTransformerDialogTabsContent({
|
|
68
|
+
twtToModify,
|
|
69
|
+
isModification = false,
|
|
70
|
+
tabIndex,
|
|
71
|
+
voltageLevelOptions = [],
|
|
72
|
+
PositionDiagramPane,
|
|
73
|
+
fetchBusesOrBusbarSections,
|
|
74
|
+
fetchVoltageLevelEquipments,
|
|
75
|
+
editData
|
|
76
|
+
}) {
|
|
77
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
|
+
/* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== TwoWindingsTransformerDialogTab.CONNECTIVITY_TAB, children: [
|
|
79
|
+
/* @__PURE__ */ jsx(GridSection, { title: "ConnectivityTab" }),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
BranchConnectivityForm,
|
|
82
|
+
{
|
|
83
|
+
isModification,
|
|
84
|
+
previousValues: twtToModify,
|
|
85
|
+
voltageLevelOptions,
|
|
86
|
+
PositionDiagramPane,
|
|
87
|
+
fetchBusesOrBusbarSections
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== TwoWindingsTransformerDialogTab.CHARACTERISTICS_TAB, children: /* @__PURE__ */ jsx(TwoWindingsTransformerCharacteristicsPane, { twtToModify, isModification }) }),
|
|
92
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== TwoWindingsTransformerDialogTab.LIMITS_TAB, children: /* @__PURE__ */ jsx(LimitsPane, { equipmentToModify: twtToModify, isModification }) }),
|
|
93
|
+
isModification && /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== TwoWindingsTransformerDialogTab.STATE_ESTIMATION_TAB, children: /* @__PURE__ */ jsx(BranchActiveReactivePowerMeasurementsForm, { equipmentToModify: twtToModify }) }),
|
|
94
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== TwoWindingsTransformerDialogTab.RATIO_TAP_TAB, children: /* @__PURE__ */ jsx(
|
|
95
|
+
RatioTapChangerPane,
|
|
96
|
+
{
|
|
97
|
+
voltageLevelOptions,
|
|
98
|
+
previousValues: twtToModify ?? void 0,
|
|
99
|
+
editData,
|
|
100
|
+
isModification,
|
|
101
|
+
fetchVoltageLevelEquipments
|
|
102
|
+
}
|
|
103
|
+
) }),
|
|
104
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== TwoWindingsTransformerDialogTab.PHASE_TAP_TAB, children: /* @__PURE__ */ jsx(
|
|
105
|
+
PhaseTapChangerPane,
|
|
106
|
+
{
|
|
107
|
+
voltageLevelOptions,
|
|
108
|
+
previousValues: twtToModify ?? void 0,
|
|
109
|
+
editData,
|
|
110
|
+
isModification,
|
|
111
|
+
fetchVoltageLevelEquipments
|
|
112
|
+
}
|
|
113
|
+
) })
|
|
114
|
+
] });
|
|
115
|
+
}
|
|
116
|
+
export {
|
|
117
|
+
TwoWindingsTransformerDialogTabsContent
|
|
118
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TwoWindingsTransformerDialogHeaderProps } from './TwoWindingsTransformerDialogHeader';
|
|
2
|
+
import { TwoWindingsTransformerDialogTabsContentProps } from './TwoWindingsTransformerDialogTabsContent';
|
|
3
|
+
interface TwoWindingsTransformerFormProps extends TwoWindingsTransformerDialogHeaderProps, Omit<TwoWindingsTransformerDialogTabsContentProps, 'tabIndex' | 'isModification' | 'twtToModify'> {
|
|
4
|
+
}
|
|
5
|
+
export declare function TwoWindingsTransformerForm({ twtToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, isModification, }: Readonly<TwoWindingsTransformerFormProps>): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Box } from "@mui/material";
|
|
3
|
+
import { TwoWindingsTransformerDialogHeader } from "./TwoWindingsTransformerDialogHeader.js";
|
|
4
|
+
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
5
|
+
import { TwoWindingsTransformerDialogTab, TWT_TAB_FIELDS } from "./twoWindingsTransformer.utils.js";
|
|
6
|
+
import { TwoWindingsTransformerDialogTabs } from "./TwoWindingsTransformerDialogTabs.js";
|
|
7
|
+
import { TwoWindingsTransformerDialogTabsContent } from "./TwoWindingsTransformerDialogTabsContent.js";
|
|
8
|
+
function TwoWindingsTransformerForm({
|
|
9
|
+
twtToModify,
|
|
10
|
+
voltageLevelOptions,
|
|
11
|
+
fetchBusesOrBusbarSections,
|
|
12
|
+
PositionDiagramPane,
|
|
13
|
+
fetchVoltageLevelEquipments,
|
|
14
|
+
isModification = false
|
|
15
|
+
}) {
|
|
16
|
+
const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
|
|
17
|
+
TWT_TAB_FIELDS,
|
|
18
|
+
TwoWindingsTransformerDialogTab.CONNECTIVITY_TAB
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ jsxs(Stack, { spacing: 2, height: "100%", children: [
|
|
21
|
+
/* @__PURE__ */ jsx(TwoWindingsTransformerDialogHeader, { twtToModify, isModification }),
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
TwoWindingsTransformerDialogTabs,
|
|
24
|
+
{
|
|
25
|
+
tabIndex,
|
|
26
|
+
tabIndexesWithError,
|
|
27
|
+
setTabIndex,
|
|
28
|
+
isModification
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx(Box, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden", paddingRight: 3 }, children: /* @__PURE__ */ jsx(
|
|
32
|
+
TwoWindingsTransformerDialogTabsContent,
|
|
33
|
+
{
|
|
34
|
+
tabIndex,
|
|
35
|
+
twtToModify,
|
|
36
|
+
voltageLevelOptions,
|
|
37
|
+
fetchBusesOrBusbarSections,
|
|
38
|
+
PositionDiagramPane,
|
|
39
|
+
isModification,
|
|
40
|
+
fetchVoltageLevelEquipments
|
|
41
|
+
}
|
|
42
|
+
) })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
TwoWindingsTransformerForm
|
|
47
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export * from './twoWindingsTransformer.types';
|
|
8
|
+
export * from './twoWindingsTransformer.utils';
|
|
9
|
+
export * from './TwoWindingsTransformerDialogHeader';
|
|
10
|
+
export * from './TwoWindingsTransformerDialogTabs';
|
|
11
|
+
export * from './TwoWindingsTransformerDialogTabsContent';
|
|
12
|
+
export * from './TwoWindingsTransformerForm';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TWT_TAB_FIELDS, TwoWindingsTransformerDialogTab } from "./twoWindingsTransformer.utils.js";
|
|
2
|
+
import { TwoWindingsTransformerDialogHeader } from "./TwoWindingsTransformerDialogHeader.js";
|
|
3
|
+
import { TwoWindingsTransformerDialogTabs } from "./TwoWindingsTransformerDialogTabs.js";
|
|
4
|
+
import { TwoWindingsTransformerDialogTabsContent } from "./TwoWindingsTransformerDialogTabsContent.js";
|
|
5
|
+
import { TwoWindingsTransformerForm } from "./TwoWindingsTransformerForm.js";
|
|
6
|
+
export {
|
|
7
|
+
TWT_TAB_FIELDS,
|
|
8
|
+
TwoWindingsTransformerDialogHeader,
|
|
9
|
+
TwoWindingsTransformerDialogTab,
|
|
10
|
+
TwoWindingsTransformerDialogTabs,
|
|
11
|
+
TwoWindingsTransformerDialogTabsContent,
|
|
12
|
+
TwoWindingsTransformerForm
|
|
13
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EquipmentType, FieldConstants, Identifiable } from '../../../../utils';
|
|
2
|
+
import { TwoWindingsTransformerModificationDto } from '../modification/twoWindingsTransformerModification.types';
|
|
3
|
+
import { ConnectablePositionFormInfos } from '../../common/connectivity/connectivity.type';
|
|
4
|
+
import { CurrentLimitsData } from '../../common/currentLimits/limits.types';
|
|
5
|
+
export interface TapChangerStep extends TapChangerStepMapInfos {
|
|
6
|
+
[FieldConstants.STEPS_TAP]: number;
|
|
7
|
+
[FieldConstants.SELECTED]?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface TapChangerPaneProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
voltageLevelOptions?: Identifiable[];
|
|
12
|
+
previousValues?: TwoWindingsTransformerMapInfos;
|
|
13
|
+
editData?: TwoWindingsTransformerModificationDto;
|
|
14
|
+
fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
|
|
15
|
+
type: EquipmentType;
|
|
16
|
+
})[]>;
|
|
17
|
+
isModification?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface TwoWindingsTransformerToBeEstimatedInfos {
|
|
20
|
+
ratioTapChangerStatus?: boolean;
|
|
21
|
+
phaseTapChangerStatus?: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface MeasurementsInfos {
|
|
24
|
+
value?: number;
|
|
25
|
+
validity: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface TapChangerStepMapInfos {
|
|
28
|
+
[FieldConstants.STEPS_RESISTANCE]: number;
|
|
29
|
+
[FieldConstants.STEPS_REACTANCE]: number;
|
|
30
|
+
[FieldConstants.STEPS_CONDUCTANCE]: number;
|
|
31
|
+
[FieldConstants.STEPS_SUSCEPTANCE]: number;
|
|
32
|
+
[FieldConstants.STEPS_RATIO]: number;
|
|
33
|
+
[FieldConstants.STEPS_ALPHA]?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface TapChangerMapInfos {
|
|
36
|
+
[FieldConstants.LOW_TAP_POSITION]: number;
|
|
37
|
+
[FieldConstants.TAP_POSITION]: number;
|
|
38
|
+
[FieldConstants.HIGH_TAP_POSITION]: number;
|
|
39
|
+
[FieldConstants.REGULATING]?: boolean;
|
|
40
|
+
[FieldConstants.LOAD_TAP_CHANGING_CAPABILITIES]?: boolean;
|
|
41
|
+
[FieldConstants.TARGET_V]?: number;
|
|
42
|
+
[FieldConstants.TARGET_DEADBAND]?: number;
|
|
43
|
+
[FieldConstants.REGULATION_MODE]?: string;
|
|
44
|
+
[FieldConstants.REGULATION_VALUE]?: number;
|
|
45
|
+
[FieldConstants.REGULATING_TERMINAL_CONNECTABLE_ID]?: string;
|
|
46
|
+
[FieldConstants.REGULATING_TERMINAL_CONNECTABLE_TYPE]?: string;
|
|
47
|
+
[FieldConstants.REGULATING_TERMINAL_VOLTAGE_LEVEL_ID]?: string;
|
|
48
|
+
[FieldConstants.STEPS]?: Record<number, TapChangerStepMapInfos>;
|
|
49
|
+
}
|
|
50
|
+
export interface TwoWindingsTransformerMapInfos extends Identifiable {
|
|
51
|
+
properties?: Record<string, string>;
|
|
52
|
+
voltageLevelId1: string;
|
|
53
|
+
voltageLevelName1: string;
|
|
54
|
+
voltageLevelId2: string;
|
|
55
|
+
voltageLevelName2: string;
|
|
56
|
+
terminal1Connected: boolean;
|
|
57
|
+
terminal2Connected: boolean;
|
|
58
|
+
p1?: number;
|
|
59
|
+
q1?: number;
|
|
60
|
+
p2?: number;
|
|
61
|
+
q2?: number;
|
|
62
|
+
i1?: number;
|
|
63
|
+
i2?: number;
|
|
64
|
+
currentLimits?: CurrentLimitsData[];
|
|
65
|
+
selectedOperationalLimitsGroupId1?: string;
|
|
66
|
+
selectedOperationalLimitsGroupId2?: string;
|
|
67
|
+
phaseTapChanger?: TapChangerMapInfos;
|
|
68
|
+
ratioTapChanger?: TapChangerMapInfos;
|
|
69
|
+
g: number;
|
|
70
|
+
b: number;
|
|
71
|
+
r: number;
|
|
72
|
+
x: number;
|
|
73
|
+
ratedU1: number;
|
|
74
|
+
ratedU2: number;
|
|
75
|
+
ratedS?: number;
|
|
76
|
+
connectablePosition1: ConnectablePositionFormInfos;
|
|
77
|
+
connectablePosition2: ConnectablePositionFormInfos;
|
|
78
|
+
busOrBusbarSectionId1?: string;
|
|
79
|
+
busOrBusbarSectionId2?: string;
|
|
80
|
+
operatingStatus?: string;
|
|
81
|
+
measurementP1?: MeasurementsInfos;
|
|
82
|
+
measurementQ1?: MeasurementsInfos;
|
|
83
|
+
measurementP2?: MeasurementsInfos;
|
|
84
|
+
measurementQ2?: MeasurementsInfos;
|
|
85
|
+
toBeEstimated?: TwoWindingsTransformerToBeEstimatedInfos;
|
|
86
|
+
}
|
|
87
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FieldConstants } from '../../../../utils';
|
|
2
|
+
export declare enum TwoWindingsTransformerDialogTab {
|
|
3
|
+
CONNECTIVITY_TAB = 0,
|
|
4
|
+
CHARACTERISTICS_TAB = 1,
|
|
5
|
+
LIMITS_TAB = 2,
|
|
6
|
+
STATE_ESTIMATION_TAB = 3,
|
|
7
|
+
RATIO_TAP_TAB = 4,
|
|
8
|
+
PHASE_TAP_TAB = 5
|
|
9
|
+
}
|
|
10
|
+
export declare const TWT_TAB_FIELDS: Readonly<Partial<Record<TwoWindingsTransformerDialogTab, FieldConstants[]>>>;
|