@gridsuite/commons-ui 0.241.1 → 0.242.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/README.md +4 -0
- package/dist/components/composite/grid/grid-item.d.ts +2 -1
- package/dist/components/composite/grid/grid-item.js +9 -2
- package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.d.ts +1 -2
- package/dist/features/index.js +87 -3
- package/dist/features/network-modification-table/index.js +2 -1
- package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +2 -1
- package/dist/features/network-modification-table/utils.d.ts +1 -0
- package/dist/features/network-modification-table/utils.js +5 -1
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +3 -0
- package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +3 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +3 -0
- package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +3 -0
- package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +71 -2
- package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +26 -8
- package/dist/features/network-modifications/common/connectivity/index.js +3 -1
- package/dist/features/network-modifications/common/currentLimits/LimitsPane.d.ts +7 -0
- package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +243 -0
- package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.d.ts +9 -0
- package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.js +29 -0
- package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.d.ts +9 -0
- package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.js +100 -0
- package/dist/features/network-modifications/common/currentLimits/index.d.ts +12 -0
- package/dist/features/network-modifications/common/currentLimits/index.js +47 -0
- package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +52 -0
- package/dist/features/network-modifications/common/currentLimits/limits.types.js +17 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +285 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.d.ts +5 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +184 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.d.ts +14 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js +166 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.js +10 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.d.ts +11 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.js +177 -0
- package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +213 -0
- package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +337 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.d.ts +25 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.js +92 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.js +25 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.js +73 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.d.ts +16 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js +121 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.d.ts +11 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.js +12 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.d.ts +71 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js +15 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.d.ts +46 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.js +45 -0
- package/dist/features/network-modifications/common/index.d.ts +1 -0
- package/dist/features/network-modifications/common/index.js +50 -2
- package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +11 -0
- package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +6 -4
- package/dist/features/network-modifications/common/measurements/index.js +2 -1
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +1 -1
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +3 -7
- package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +3 -0
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -6
- package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +3 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +3 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -6
- package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +3 -0
- package/dist/features/network-modifications/index.d.ts +1 -0
- package/dist/features/network-modifications/index.js +85 -2
- package/dist/features/network-modifications/line/catalog/index.d.ts +8 -0
- package/dist/features/network-modifications/line/catalog/index.js +14 -0
- package/dist/features/network-modifications/line/catalog/lineCatalog.type.d.ts +66 -0
- package/dist/features/network-modifications/line/catalog/lineCatalog.type.js +7 -0
- package/dist/features/network-modifications/line/catalog/segment.utils.d.ts +90 -0
- package/dist/features/network-modifications/line/catalog/segment.utils.js +100 -0
- package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.d.ts +8 -0
- package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.js +152 -0
- package/dist/features/network-modifications/line/characteristics/index.d.ts +9 -0
- package/dist/features/network-modifications/line/characteristics/index.js +9 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.d.ts +14 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.js +1 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +52 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +53 -0
- package/dist/features/network-modifications/line/common/LineDialogHeader.d.ts +6 -0
- package/dist/features/network-modifications/line/common/LineDialogHeader.js +103 -0
- package/dist/features/network-modifications/line/common/LineDialogTabs.d.ts +9 -0
- package/dist/features/network-modifications/line/common/LineDialogTabs.js +61 -0
- package/dist/features/network-modifications/line/common/LineDialogTabsContent.d.ts +8 -0
- package/dist/features/network-modifications/line/common/LineDialogTabsContent.js +96 -0
- package/dist/features/network-modifications/line/common/LineForm.d.ts +6 -0
- package/dist/features/network-modifications/line/common/LineForm.js +50 -0
- package/dist/features/network-modifications/line/common/index.d.ts +12 -0
- package/dist/features/network-modifications/line/common/index.js +13 -0
- package/dist/features/network-modifications/line/common/line.types.d.ts +47 -0
- package/dist/features/network-modifications/line/common/line.types.js +1 -0
- package/dist/features/network-modifications/line/common/line.utils.d.ts +13 -0
- package/dist/features/network-modifications/line/common/line.utils.js +34 -0
- package/dist/features/network-modifications/line/creation/index.d.ts +8 -0
- package/dist/features/network-modifications/line/creation/index.js +7 -0
- package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +39 -0
- package/dist/features/network-modifications/line/creation/lineCreation.types.js +1 -0
- package/dist/features/network-modifications/line/creation/lineCreation.utils.d.ts +151 -0
- package/dist/features/network-modifications/line/creation/lineCreation.utils.js +172 -0
- package/dist/features/network-modifications/line/index.d.ts +10 -0
- package/dist/features/network-modifications/line/index.js +37 -0
- package/dist/features/network-modifications/load/common/LoadDialogHeader.js +3 -0
- package/dist/features/network-modifications/load/modification/loadModification.utils.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +7 -6
- package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js +3 -0
- package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +3 -0
- package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/index.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +3 -0
- package/dist/features/network-modifications/voltageLevel/index.js +3 -0
- package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +4 -1
- package/dist/features/parameters/common/contingency-table/contingency-table.js +22 -10
- package/dist/features/parameters/common/contingency-table/types.d.ts +7 -8
- package/dist/features/parameters/common/contingency-table/utils.d.ts +13 -0
- package/dist/features/parameters/common/contingency-table/utils.js +31 -0
- package/dist/features/parameters/loadflow/load-flow-general-parameters.js +5 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +19 -31
- package/dist/hooks/useModificationLabelComputer.js +1 -0
- package/dist/index.js +87 -3
- package/dist/translations/en/networkModificationsEn.d.ts +28 -0
- package/dist/translations/en/networkModificationsEn.js +28 -0
- package/dist/translations/en/parameters.d.ts +3 -1
- package/dist/translations/en/parameters.js +3 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +28 -0
- package/dist/translations/fr/networkModificationsFr.js +28 -0
- package/dist/translations/fr/parameters.d.ts +3 -1
- package/dist/translations/fr/parameters.js +3 -1
- package/dist/utils/constants/fieldConstants.d.ts +47 -1
- package/dist/utils/constants/fieldConstants.js +46 -0
- package/dist/utils/types/modificationType.d.ts +4 -0
- package/dist/utils/types/modificationType.js +5 -0
- package/package.json +11 -4
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
|
+
import { OhmAdornment, MicroSusceptanceAdornment } from "../../../../utils/constants/adornments.js";
|
|
4
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
5
|
+
import "@mui/icons-material";
|
|
6
|
+
import "react-intl";
|
|
7
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
8
|
+
import { convertInputValue } from "../../../../utils/conversionUtils.js";
|
|
9
|
+
import "../../../../utils/types/equipmentType.js";
|
|
10
|
+
import { FieldType } from "../../../../utils/types/fieldType.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 { FloatInput } from "../../../../components/ui/reactHookForm/numbers/FloatInput.js";
|
|
21
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
27
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
|
+
import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
30
|
+
import "@hello-pangea/dnd";
|
|
31
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
32
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
33
|
+
import "mui-nested-menu";
|
|
34
|
+
import "react-resizable-panels";
|
|
35
|
+
import "react-papaparse";
|
|
36
|
+
import "react-dom";
|
|
37
|
+
import "autosuggest-highlight/match";
|
|
38
|
+
import "autosuggest-highlight/parse";
|
|
39
|
+
import "clsx";
|
|
40
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
41
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
42
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
43
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
44
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
45
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
46
|
+
import "react-querybuilder";
|
|
47
|
+
import "uuid";
|
|
48
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
49
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
50
|
+
import { GridItem } from "../../../../components/composite/grid/grid-item.js";
|
|
51
|
+
import { GridSection } from "../../../../components/composite/grid/grid-section.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 { PropertiesForm } from "../../common/properties/PropertiesForm.js";
|
|
66
|
+
function LineCharacteristicsPane({
|
|
67
|
+
id = FieldConstants.CHARACTERISTICS,
|
|
68
|
+
lineToModify,
|
|
69
|
+
isModification = false
|
|
70
|
+
}) {
|
|
71
|
+
const seriesResistanceField = /* @__PURE__ */ jsx(
|
|
72
|
+
FloatInput,
|
|
73
|
+
{
|
|
74
|
+
name: `${id}.${FieldConstants.R}`,
|
|
75
|
+
label: "SeriesResistanceText",
|
|
76
|
+
adornment: OhmAdornment,
|
|
77
|
+
previousValue: lineToModify?.r,
|
|
78
|
+
clearable: isModification
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
const seriesReactanceField = /* @__PURE__ */ jsx(
|
|
82
|
+
FloatInput,
|
|
83
|
+
{
|
|
84
|
+
name: `${id}.${FieldConstants.X}`,
|
|
85
|
+
label: "SeriesReactanceText",
|
|
86
|
+
adornment: OhmAdornment,
|
|
87
|
+
previousValue: lineToModify?.x,
|
|
88
|
+
clearable: isModification
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
const shuntConductance1Field = /* @__PURE__ */ jsx(
|
|
92
|
+
FloatInput,
|
|
93
|
+
{
|
|
94
|
+
name: `${id}.${FieldConstants.G1}`,
|
|
95
|
+
label: "ShuntConductanceText",
|
|
96
|
+
adornment: MicroSusceptanceAdornment,
|
|
97
|
+
previousValue: convertInputValue(FieldType.G1, lineToModify?.g1),
|
|
98
|
+
clearable: isModification
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
const shuntSusceptance1Field = /* @__PURE__ */ jsx(
|
|
102
|
+
FloatInput,
|
|
103
|
+
{
|
|
104
|
+
name: `${id}.${FieldConstants.B1}`,
|
|
105
|
+
label: "ShuntSusceptanceText",
|
|
106
|
+
adornment: MicroSusceptanceAdornment,
|
|
107
|
+
previousValue: convertInputValue(FieldType.B1, lineToModify?.b1),
|
|
108
|
+
clearable: isModification
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
const shuntConductance2Field = /* @__PURE__ */ jsx(
|
|
112
|
+
FloatInput,
|
|
113
|
+
{
|
|
114
|
+
name: `${id}.${FieldConstants.G2}`,
|
|
115
|
+
label: "ShuntConductanceText",
|
|
116
|
+
adornment: MicroSusceptanceAdornment,
|
|
117
|
+
previousValue: convertInputValue(FieldType.G2, lineToModify?.g2),
|
|
118
|
+
clearable: isModification
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
const shuntSusceptance2Field = /* @__PURE__ */ jsx(
|
|
122
|
+
FloatInput,
|
|
123
|
+
{
|
|
124
|
+
name: `${id}.${FieldConstants.B2}`,
|
|
125
|
+
label: "ShuntSusceptanceText",
|
|
126
|
+
adornment: MicroSusceptanceAdornment,
|
|
127
|
+
previousValue: convertInputValue(FieldType.B2, lineToModify?.b2),
|
|
128
|
+
clearable: isModification
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
132
|
+
/* @__PURE__ */ jsx(GridSection, { title: "Characteristics" }),
|
|
133
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
|
|
134
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: seriesResistanceField }),
|
|
135
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: seriesReactanceField })
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ jsx(GridSection, { title: "Side1", heading: 4 }),
|
|
138
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
|
|
139
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: shuntConductance1Field }),
|
|
140
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: shuntSusceptance1Field })
|
|
141
|
+
] }),
|
|
142
|
+
/* @__PURE__ */ jsx(GridSection, { title: "Side2", heading: 4 }),
|
|
143
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
|
|
144
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: shuntConductance2Field }),
|
|
145
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: shuntSusceptance2Field })
|
|
146
|
+
] }),
|
|
147
|
+
/* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "line", isModification })
|
|
148
|
+
] });
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
LineCharacteristicsPane
|
|
152
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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 './lineCharacteristicsPane.types';
|
|
8
|
+
export * from './lineCharacteristicsPane.utils';
|
|
9
|
+
export * from './LineCharacteristicsPane';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getCharacteristicsValidationSchema, getLineCharacteristicsEmptyFormData, getLineCharacteristicsFormData, getLineCharacteristicsValidationSchemaProps } from "./lineCharacteristicsPane.utils.js";
|
|
2
|
+
import { LineCharacteristicsPane } from "./LineCharacteristicsPane.js";
|
|
3
|
+
export {
|
|
4
|
+
LineCharacteristicsPane,
|
|
5
|
+
getCharacteristicsValidationSchema,
|
|
6
|
+
getLineCharacteristicsEmptyFormData,
|
|
7
|
+
getLineCharacteristicsFormData,
|
|
8
|
+
getLineCharacteristicsValidationSchemaProps
|
|
9
|
+
};
|
package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
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 interface LineCharacteristics {
|
|
8
|
+
r: number | null;
|
|
9
|
+
x: number | null;
|
|
10
|
+
g1: number | null;
|
|
11
|
+
b1: number | null;
|
|
12
|
+
g2: number | null;
|
|
13
|
+
b2: number | null;
|
|
14
|
+
}
|
package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FieldConstants } from '../../../../utils';
|
|
2
|
+
import { LineCharacteristics } from './lineCharacteristicsPane.types';
|
|
3
|
+
export declare const getLineCharacteristicsValidationSchemaProps: (isEquipmentModification?: boolean) => import('yup').ObjectSchema<{
|
|
4
|
+
r: number | null | undefined;
|
|
5
|
+
x: number | null | undefined;
|
|
6
|
+
b1: number | null | undefined;
|
|
7
|
+
g1: number | null | undefined;
|
|
8
|
+
b2: number | null | undefined;
|
|
9
|
+
g2: number | null | undefined;
|
|
10
|
+
}, import('yup').AnyObject, {
|
|
11
|
+
r: undefined;
|
|
12
|
+
x: undefined;
|
|
13
|
+
b1: undefined;
|
|
14
|
+
g1: undefined;
|
|
15
|
+
b2: undefined;
|
|
16
|
+
g2: undefined;
|
|
17
|
+
}, "">;
|
|
18
|
+
export declare const getCharacteristicsValidationSchema: (id: string, modification?: boolean) => {
|
|
19
|
+
[x: string]: import('yup').ObjectSchema<{
|
|
20
|
+
r: number | null | undefined;
|
|
21
|
+
x: number | null | undefined;
|
|
22
|
+
b1: number | null | undefined;
|
|
23
|
+
g1: number | null | undefined;
|
|
24
|
+
b2: number | null | undefined;
|
|
25
|
+
g2: number | null | undefined;
|
|
26
|
+
}, import('yup').AnyObject, {
|
|
27
|
+
r: undefined;
|
|
28
|
+
x: undefined;
|
|
29
|
+
b1: undefined;
|
|
30
|
+
g1: undefined;
|
|
31
|
+
b2: undefined;
|
|
32
|
+
g2: undefined;
|
|
33
|
+
}, "">;
|
|
34
|
+
};
|
|
35
|
+
export declare const getLineCharacteristicsEmptyFormData: () => {
|
|
36
|
+
r: null;
|
|
37
|
+
x: null;
|
|
38
|
+
b1: null;
|
|
39
|
+
g1: null;
|
|
40
|
+
b2: null;
|
|
41
|
+
g2: null;
|
|
42
|
+
};
|
|
43
|
+
export declare const getLineCharacteristicsFormData: ({ r, x, g1, b1, g2, b2 }: LineCharacteristics, id?: FieldConstants) => {
|
|
44
|
+
[x: string]: {
|
|
45
|
+
r: number | null;
|
|
46
|
+
x: number | null;
|
|
47
|
+
g1: number | null;
|
|
48
|
+
b1: number | null;
|
|
49
|
+
g2: number | null;
|
|
50
|
+
b2: number | null;
|
|
51
|
+
};
|
|
52
|
+
};
|
package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { object, number } from "yup";
|
|
2
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
3
|
+
import "../../../../utils/conversionUtils.js";
|
|
4
|
+
import "../../../../utils/types/equipmentType.js";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
const getLineCharacteristicsValidationSchemaProps = (isEquipmentModification = false) => object().shape({
|
|
8
|
+
[FieldConstants.R]: isEquipmentModification ? number().nullable().min(0, "mustBeGreaterOrEqualToZero") : number().nullable().min(0, "mustBeGreaterOrEqualToZero").required(),
|
|
9
|
+
[FieldConstants.X]: isEquipmentModification ? number().nullable() : number().nullable().required(),
|
|
10
|
+
[FieldConstants.B1]: number().nullable(),
|
|
11
|
+
[FieldConstants.G1]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
12
|
+
[FieldConstants.B2]: number().nullable(),
|
|
13
|
+
[FieldConstants.G2]: number().nullable().min(0, "mustBeGreaterOrEqualToZero")
|
|
14
|
+
});
|
|
15
|
+
const characteristicsValidationSchema = (id, modification) => ({
|
|
16
|
+
[id]: object().shape({
|
|
17
|
+
[FieldConstants.R]: modification ? number().nullable().min(0, "mustBeGreaterOrEqualToZero") : number().nullable().min(0, "mustBeGreaterOrEqualToZero").required(),
|
|
18
|
+
[FieldConstants.X]: modification ? number().nullable() : number().nullable().required(),
|
|
19
|
+
[FieldConstants.B1]: number().nullable(),
|
|
20
|
+
[FieldConstants.G1]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
21
|
+
[FieldConstants.B2]: number().nullable(),
|
|
22
|
+
[FieldConstants.G2]: number().nullable().min(0, "mustBeGreaterOrEqualToZero")
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
const getCharacteristicsValidationSchema = (id, modification = false) => {
|
|
26
|
+
return characteristicsValidationSchema(id, modification);
|
|
27
|
+
};
|
|
28
|
+
const getLineCharacteristicsEmptyFormData = () => {
|
|
29
|
+
return {
|
|
30
|
+
[FieldConstants.R]: null,
|
|
31
|
+
[FieldConstants.X]: null,
|
|
32
|
+
[FieldConstants.B1]: null,
|
|
33
|
+
[FieldConstants.G1]: null,
|
|
34
|
+
[FieldConstants.B2]: null,
|
|
35
|
+
[FieldConstants.G2]: null
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
const getLineCharacteristicsFormData = ({ r = null, x = null, g1 = null, b1 = null, g2 = null, b2 = null }, id = FieldConstants.CHARACTERISTICS) => ({
|
|
39
|
+
[id]: {
|
|
40
|
+
[FieldConstants.R]: r,
|
|
41
|
+
[FieldConstants.X]: x,
|
|
42
|
+
[FieldConstants.G1]: g1,
|
|
43
|
+
[FieldConstants.B1]: b1,
|
|
44
|
+
[FieldConstants.G2]: g2,
|
|
45
|
+
[FieldConstants.B2]: b2
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
getCharacteristicsValidationSchema,
|
|
50
|
+
getLineCharacteristicsEmptyFormData,
|
|
51
|
+
getLineCharacteristicsFormData,
|
|
52
|
+
getLineCharacteristicsValidationSchemaProps
|
|
53
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BranchInfos } from './line.types';
|
|
2
|
+
import { LineDialogOptions } from './line.utils';
|
|
3
|
+
export interface LineDialogHeaderProps extends LineDialogOptions {
|
|
4
|
+
lineToModify?: BranchInfos | null;
|
|
5
|
+
}
|
|
6
|
+
export declare function LineDialogHeader({ lineToModify, isModification }: Readonly<LineDialogHeaderProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TextField, Grid2 } 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 { TextInput } from "../../../../components/ui/reactHookForm/text/TextInput.js";
|
|
21
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
27
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
|
+
import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
30
|
+
import "@hello-pangea/dnd";
|
|
31
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
32
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
33
|
+
import "mui-nested-menu";
|
|
34
|
+
import "react-resizable-panels";
|
|
35
|
+
import "react-papaparse";
|
|
36
|
+
import "react-dom";
|
|
37
|
+
import "autosuggest-highlight/match";
|
|
38
|
+
import "autosuggest-highlight/parse";
|
|
39
|
+
import "clsx";
|
|
40
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
41
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
42
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
43
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
44
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
45
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
46
|
+
import "react-querybuilder";
|
|
47
|
+
import "uuid";
|
|
48
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
49
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
50
|
+
import { GridItem } from "../../../../components/composite/grid/grid-item.js";
|
|
51
|
+
import "@react-querybuilder/material";
|
|
52
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
53
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
54
|
+
import "../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
55
|
+
import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
56
|
+
import "ag-grid-community";
|
|
57
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
58
|
+
import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
59
|
+
import "mathjs";
|
|
60
|
+
import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
61
|
+
import "react-window";
|
|
62
|
+
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
63
|
+
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
64
|
+
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
65
|
+
import "@mui/material/colors";
|
|
66
|
+
import "@mui/x-charts";
|
|
67
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
68
|
+
function LineDialogHeader({ lineToModify, isModification = false }) {
|
|
69
|
+
const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
|
|
70
|
+
const lineIdField = isModification ? /* @__PURE__ */ jsx(
|
|
71
|
+
TextField,
|
|
72
|
+
{
|
|
73
|
+
size: "small",
|
|
74
|
+
fullWidth: true,
|
|
75
|
+
label: "ID",
|
|
76
|
+
value: equipmentId ?? "",
|
|
77
|
+
slotProps: {
|
|
78
|
+
input: {
|
|
79
|
+
readOnly: true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
disabled: true,
|
|
83
|
+
...filledTextField
|
|
84
|
+
}
|
|
85
|
+
) : /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_ID, label: "ID", formProps: { autoFocus: true, ...filledTextField } });
|
|
86
|
+
const lineNameField = /* @__PURE__ */ jsx(
|
|
87
|
+
TextInput,
|
|
88
|
+
{
|
|
89
|
+
name: FieldConstants.EQUIPMENT_NAME,
|
|
90
|
+
label: "Name",
|
|
91
|
+
formProps: filledTextField,
|
|
92
|
+
previousValue: lineToModify?.name ?? void 0,
|
|
93
|
+
clearable: true
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, sx: { width: "100%" }, children: [
|
|
97
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: lineIdField }),
|
|
98
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: lineNameField })
|
|
99
|
+
] });
|
|
100
|
+
}
|
|
101
|
+
export {
|
|
102
|
+
LineDialogHeader
|
|
103
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LineDialogOptions } from './line.utils';
|
|
3
|
+
interface LineDialogTabsProps extends LineDialogOptions {
|
|
4
|
+
tabIndex: number;
|
|
5
|
+
tabIndexesWithError: number[];
|
|
6
|
+
setTabIndex: (newTabIndex: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function LineDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex, isModification, withConnectivity, }: Readonly<LineDialogTabsProps>): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs, Tab } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import { LineDialogTab } from "./line.utils.js";
|
|
5
|
+
import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameters-style.js";
|
|
6
|
+
function LineDialogTabs({
|
|
7
|
+
tabIndex,
|
|
8
|
+
tabIndexesWithError,
|
|
9
|
+
setTabIndex,
|
|
10
|
+
isModification = false,
|
|
11
|
+
withConnectivity = true
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
Tabs,
|
|
15
|
+
{
|
|
16
|
+
value: tabIndex,
|
|
17
|
+
variant: "scrollable",
|
|
18
|
+
onChange: (event, newValue) => setTabIndex(newValue),
|
|
19
|
+
slotProps: {
|
|
20
|
+
indicator: { sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex) }
|
|
21
|
+
},
|
|
22
|
+
children: [
|
|
23
|
+
withConnectivity && /* @__PURE__ */ jsx(
|
|
24
|
+
Tab,
|
|
25
|
+
{
|
|
26
|
+
value: LineDialogTab.CONNECTIVITY_TAB,
|
|
27
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "ConnectivityTab" }),
|
|
28
|
+
sx: getTabStyle(tabIndexesWithError, LineDialogTab.CONNECTIVITY_TAB)
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
Tab,
|
|
33
|
+
{
|
|
34
|
+
value: LineDialogTab.CHARACTERISTICS_TAB,
|
|
35
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "CharacteristicsTab" }),
|
|
36
|
+
sx: getTabStyle(tabIndexesWithError, LineDialogTab.CHARACTERISTICS_TAB)
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
Tab,
|
|
41
|
+
{
|
|
42
|
+
value: LineDialogTab.LIMITS_TAB,
|
|
43
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "LimitsTab" }),
|
|
44
|
+
sx: getTabStyle(tabIndexesWithError, LineDialogTab.LIMITS_TAB)
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
isModification && /* @__PURE__ */ jsx(
|
|
48
|
+
Tab,
|
|
49
|
+
{
|
|
50
|
+
value: LineDialogTab.STATE_ESTIMATION_TAB,
|
|
51
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "StateEstimationTab" }),
|
|
52
|
+
sx: getTabStyle(tabIndexesWithError, LineDialogTab.STATE_ESTIMATION_TAB)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
LineDialogTabs
|
|
61
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConnectivityNetworkProps } from '../../common/connectivity/connectivity.type';
|
|
2
|
+
import { LineDialogOptions } from './line.utils';
|
|
3
|
+
import { BranchInfos } from './line.types';
|
|
4
|
+
export interface LineDialogTabsContentProps extends ConnectivityNetworkProps, LineDialogOptions {
|
|
5
|
+
lineToModify?: BranchInfos | null;
|
|
6
|
+
tabIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function LineDialogTabsContent({ lineToModify, isModification, withConnectivity, clearableFields, tabIndex, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, }: Readonly<LineDialogTabsContentProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from "@mui/material";
|
|
3
|
+
import { LineDialogTab } from "./line.utils.js";
|
|
4
|
+
import { BranchConnectivityForm } from "../../common/connectivity/BranchConnectivityForm.js";
|
|
5
|
+
import { BranchActiveReactivePowerMeasurementsForm } from "../../common/measurements/BranchActiveReactivePowerMeasurementsForm.js";
|
|
6
|
+
import "yup";
|
|
7
|
+
import "../../../../utils/conversionUtils.js";
|
|
8
|
+
import "../../../../utils/types/equipmentType.js";
|
|
9
|
+
import "@mui/icons-material";
|
|
10
|
+
import { LineCharacteristicsPane } from "../characteristics/LineCharacteristicsPane.js";
|
|
11
|
+
import { LimitsPane } from "../../common/currentLimits/LimitsPane.js";
|
|
12
|
+
import "react-intl";
|
|
13
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
14
|
+
import "react";
|
|
15
|
+
import "react-hook-form";
|
|
16
|
+
import "localized-countries";
|
|
17
|
+
import "localized-countries/data/fr";
|
|
18
|
+
import "localized-countries/data/en";
|
|
19
|
+
import "notistack";
|
|
20
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
21
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.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.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 { GridSection } from "../../../../components/composite/grid/grid-section.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
|
+
function LineDialogTabsContent({
|
|
66
|
+
lineToModify,
|
|
67
|
+
isModification = false,
|
|
68
|
+
withConnectivity = true,
|
|
69
|
+
clearableFields = false,
|
|
70
|
+
tabIndex,
|
|
71
|
+
voltageLevelOptions = [],
|
|
72
|
+
PositionDiagramPane,
|
|
73
|
+
fetchBusesOrBusbarSections
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
+
withConnectivity && /* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== LineDialogTab.CONNECTIVITY_TAB, children: [
|
|
77
|
+
/* @__PURE__ */ jsx(GridSection, { title: "ConnectivityTab" }),
|
|
78
|
+
/* @__PURE__ */ jsx(
|
|
79
|
+
BranchConnectivityForm,
|
|
80
|
+
{
|
|
81
|
+
isModification,
|
|
82
|
+
previousValues: lineToModify,
|
|
83
|
+
voltageLevelOptions,
|
|
84
|
+
PositionDiagramPane,
|
|
85
|
+
fetchBusesOrBusbarSections
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LineDialogTab.CHARACTERISTICS_TAB, p: 1, children: /* @__PURE__ */ jsx(LineCharacteristicsPane, { lineToModify, isModification }) }),
|
|
90
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LineDialogTab.LIMITS_TAB, p: 1, children: /* @__PURE__ */ jsx(LimitsPane, { equipmentToModify: lineToModify, clearableFields }) }),
|
|
91
|
+
isModification && /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LineDialogTab.STATE_ESTIMATION_TAB, children: /* @__PURE__ */ jsx(BranchActiveReactivePowerMeasurementsForm, { equipmentToModify: lineToModify }) })
|
|
92
|
+
] });
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
LineDialogTabsContent
|
|
96
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LineDialogHeaderProps } from './LineDialogHeader';
|
|
2
|
+
import { LineDialogTabsContentProps } from './LineDialogTabsContent';
|
|
3
|
+
interface LineFormProps extends LineDialogHeaderProps, Omit<LineDialogTabsContentProps, 'tabIndex' | 'isModification' | 'lineToModify'> {
|
|
4
|
+
}
|
|
5
|
+
export declare function LineForm({ lineToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, isModification, withConnectivity, clearableFields, }: Readonly<LineFormProps>): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Box } from "@mui/material";
|
|
3
|
+
import { LineDialogTab, LINE_TAB_FIELDS } from "./line.utils.js";
|
|
4
|
+
import { LineDialogHeader } from "./LineDialogHeader.js";
|
|
5
|
+
import { LineDialogTabs } from "./LineDialogTabs.js";
|
|
6
|
+
import { LineDialogTabsContent } from "./LineDialogTabsContent.js";
|
|
7
|
+
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
8
|
+
function LineForm({
|
|
9
|
+
lineToModify,
|
|
10
|
+
voltageLevelOptions,
|
|
11
|
+
fetchBusesOrBusbarSections,
|
|
12
|
+
PositionDiagramPane,
|
|
13
|
+
isModification = false,
|
|
14
|
+
withConnectivity = true,
|
|
15
|
+
clearableFields = false
|
|
16
|
+
}) {
|
|
17
|
+
const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
|
|
18
|
+
LINE_TAB_FIELDS,
|
|
19
|
+
withConnectivity ? LineDialogTab.CONNECTIVITY_TAB : LineDialogTab.CHARACTERISTICS_TAB
|
|
20
|
+
);
|
|
21
|
+
return /* @__PURE__ */ jsxs(Stack, { spacing: 2, height: "100%", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(LineDialogHeader, { lineToModify, isModification }),
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
LineDialogTabs,
|
|
25
|
+
{
|
|
26
|
+
tabIndex,
|
|
27
|
+
tabIndexesWithError,
|
|
28
|
+
setTabIndex,
|
|
29
|
+
isModification,
|
|
30
|
+
withConnectivity
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ jsx(Box, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden", paddingRight: 3 }, children: /* @__PURE__ */ jsx(
|
|
34
|
+
LineDialogTabsContent,
|
|
35
|
+
{
|
|
36
|
+
tabIndex,
|
|
37
|
+
lineToModify,
|
|
38
|
+
voltageLevelOptions,
|
|
39
|
+
fetchBusesOrBusbarSections,
|
|
40
|
+
PositionDiagramPane,
|
|
41
|
+
isModification,
|
|
42
|
+
withConnectivity,
|
|
43
|
+
clearableFields
|
|
44
|
+
}
|
|
45
|
+
) })
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
LineForm
|
|
50
|
+
};
|