@gridsuite/commons-ui 0.185.0 → 0.187.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/index.d.ts +1 -0
- package/dist/components/index.js +28 -12
- package/dist/components/network-modifications/by-filter/commons/by-filter.type.d.ts +5 -0
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.d.ts +7 -0
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +83 -0
- package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.types.d.ts +7 -0
- package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.utils.d.ts +18 -0
- package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.utils.js +52 -0
- package/dist/components/network-modifications/by-filter/deletion/index.d.ts +9 -0
- package/dist/components/network-modifications/by-filter/deletion/index.js +10 -0
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → by-filter}/index.d.ts +1 -2
- package/dist/components/network-modifications/by-filter/index.js +10 -0
- package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.d.ts +1 -1
- package/dist/components/network-modifications/index.d.ts +2 -1
- package/dist/components/network-modifications/index.js +52 -12
- package/dist/components/network-modifications/load/common/LoadDialogTabs.js +1 -1
- package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +138 -0
- package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/index.d.ts +1 -2
- package/dist/components/network-modifications/voltageLevel/creation/index.js +57 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.d.ts +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +93 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/index.d.ts +7 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/index.js +4 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/index.d.ts +9 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/index.js +10 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.d.ts +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +60 -0
- package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusCreation.d.ts +1 -1
- package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusCreation.js +6 -6
- package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusForm.js +16 -16
- package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/index.d.ts +0 -1
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/index.js +4 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/index.d.ts +8 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/index.js +6 -0
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/SwitchesBetweenSections.js +19 -17
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialog.d.ts +1 -1
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialog.js +16 -16
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialogSubmitButton.d.ts +1 -1
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesForm.js +16 -16
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/createSwitchesDialog.utils.d.ts +1 -1
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/createSwitchesDialog.utils.js +5 -5
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/index.d.ts +7 -0
- package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/index.js +0 -2
- package/dist/components/network-modifications/{voltage-level/creation/substation-creation → voltageLevel/creation/tabs/substationTab}/SubstationCreationSection.d.ts +1 -2
- package/dist/components/network-modifications/{voltage-level/creation/substation-creation → voltageLevel/creation/tabs/substationTab}/SubstationCreationSection.js +24 -26
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.d.ts +5 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +81 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/index.d.ts +7 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/index.js +4 -0
- package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.d.ts +12 -0
- package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.js +9 -0
- package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.utils.d.ts +4 -0
- package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.utils.js +16 -0
- package/dist/components/network-modifications/voltageLevel/index.js +64 -0
- package/dist/components/network-modifications/voltageLevel/modification/voltageLevelModification.types.js +1 -0
- package/dist/components/network-modifications/voltageLevel/voltage-level.type.js +1 -0
- package/dist/components/node/build-status-chip.d.ts +12 -0
- package/dist/components/node/build-status-chip.js +75 -0
- package/dist/components/node/constant.d.ts +13 -0
- package/dist/components/node/constant.js +11 -0
- package/dist/components/node/index.d.ts +2 -0
- package/dist/components/node/index.js +6 -0
- package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +2 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +2 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +3 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +4 -2
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +3 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +3 -0
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.d.ts +3 -1
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +11 -7
- package/dist/components/parameters/short-circuit/columns-definition.js +2 -2
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +0 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +20 -11
- package/dist/index.js +65 -52
- package/dist/translations/en/businessErrorsEn.d.ts +2 -0
- package/dist/translations/en/businessErrorsEn.js +2 -0
- package/dist/translations/en/networkModificationsEn.d.ts +7 -3
- package/dist/translations/en/networkModificationsEn.js +9 -4
- package/dist/translations/en/parameters.d.ts +7 -0
- package/dist/translations/en/parameters.js +8 -1
- package/dist/translations/fr/businessErrorsFr.d.ts +2 -0
- package/dist/translations/fr/businessErrorsFr.js +2 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +7 -3
- package/dist/translations/fr/networkModificationsFr.js +10 -5
- package/dist/translations/fr/parameters.d.ts +7 -0
- package/dist/translations/fr/parameters.js +8 -1
- package/dist/utils/types/metadata.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/network-modifications/voltage-level/creation/VoltageLevelCreationForm.js +0 -174
- package/dist/components/network-modifications/voltage-level/creation/coupling-omnibus/index.js +0 -6
- package/dist/components/network-modifications/voltage-level/creation/index.js +0 -24
- package/dist/components/network-modifications/voltage-level/creation/substation-creation/SubstationAutocompleteAddButton.d.ts +0 -5
- package/dist/components/network-modifications/voltage-level/creation/substation-creation/SubstationAutocompleteAddButton.js +0 -79
- package/dist/components/network-modifications/voltage-level/index.js +0 -31
- /package/dist/components/network-modifications/{voltage-level/modification/voltageLevelModification.types.js → by-filter/commons/by-filter.type.js} +0 -0
- /package/dist/components/network-modifications/{voltage-level/voltage-level.type.js → by-filter/deletion/byFilterDeletion.types.js} +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/VoltageLevelCreationForm.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusForm.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/SwitchesBetweenSections.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialogSubmitButton.js +0 -0
- /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesForm.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/index.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/index.js +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.types.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.types.js +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/index.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/VoltageLevelModificationForm.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/VoltageLevelModificationForm.js +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/index.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/index.js +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.types.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.utils.d.ts +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.utils.js +0 -0
- /package/dist/components/network-modifications/{voltage-level → voltageLevel}/voltage-level.type.d.ts +0 -0
package/dist/components/index.js
CHANGED
|
@@ -213,15 +213,18 @@ import { SubstationCreationForm } from "./network-modifications/substation/creat
|
|
|
213
213
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./network-modifications/substation/creation/substationCreation.utils.js";
|
|
214
214
|
import { SubstationModificationForm } from "./network-modifications/substation/modification/SubstationModificationForm.js";
|
|
215
215
|
import { substationModificationDtoToForm, substationModificationEmptyFormData, substationModificationFormSchema, substationModificationFormToDto } from "./network-modifications/substation/modification/substationModification.utils.js";
|
|
216
|
-
import {
|
|
217
|
-
import
|
|
218
|
-
import
|
|
219
|
-
import
|
|
220
|
-
import
|
|
221
|
-
import
|
|
222
|
-
import
|
|
223
|
-
import {
|
|
224
|
-
import {
|
|
216
|
+
import { SwitchesBetweenSections } from "./network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
|
|
217
|
+
import "react-hook-form";
|
|
218
|
+
import "../utils/conversionUtils.js";
|
|
219
|
+
import "../utils/types/equipmentType.js";
|
|
220
|
+
import "@mui/icons-material";
|
|
221
|
+
import "../utils/yupConfig.js";
|
|
222
|
+
import "react";
|
|
223
|
+
import { VoltageLevelCreationForm } from "./network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js";
|
|
224
|
+
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js";
|
|
225
|
+
import { SwitchKind } from "./network-modifications/voltageLevel/creation/voltageLevelCreation.types.js";
|
|
226
|
+
import { VoltageLevelModificationForm } from "./network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js";
|
|
227
|
+
import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./network-modifications/voltageLevel/modification/voltageLevelModification.utils.js";
|
|
225
228
|
import { LoadDialogTab } from "./network-modifications/load/common/load.utils.js";
|
|
226
229
|
import { LoadDialogTabs } from "./network-modifications/load/common/LoadDialogTabs.js";
|
|
227
230
|
import { LoadDialogTabsContent } from "./network-modifications/load/common/LoadDialogTabsContent.js";
|
|
@@ -229,6 +232,10 @@ import { LoadDialogHeader } from "./network-modifications/load/common/LoadDialog
|
|
|
229
232
|
import { LoadForm } from "./network-modifications/load/common/LoadForm.js";
|
|
230
233
|
import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchema, loadCreationFormToDto } from "./network-modifications/load/creation/loadCreation.utils.js";
|
|
231
234
|
import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./network-modifications/load/modification/loadModification.utils.js";
|
|
235
|
+
import { ByFilterDeletionForm } from "./network-modifications/by-filter/deletion/ByFilterDeletionForm.js";
|
|
236
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./network-modifications/by-filter/deletion/byFilterDeletion.utils.js";
|
|
237
|
+
import { BuildStatusChip } from "./node/build-status-chip.js";
|
|
238
|
+
import { BuildStatus } from "./node/constant.js";
|
|
232
239
|
export {
|
|
233
240
|
ACCURACY,
|
|
234
241
|
ACTIVE,
|
|
@@ -249,7 +256,10 @@ export {
|
|
|
249
256
|
BottomRightButtons,
|
|
250
257
|
BranchActiveReactivePowerMeasurementsForm,
|
|
251
258
|
BranchConnectivityForm,
|
|
259
|
+
BuildStatus,
|
|
260
|
+
BuildStatusChip,
|
|
252
261
|
ButtonReadOnlyInput,
|
|
262
|
+
ByFilterDeletionForm,
|
|
253
263
|
CALCULATION_TYPE,
|
|
254
264
|
CENTER_LABEL,
|
|
255
265
|
COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
|
|
@@ -287,10 +297,7 @@ export {
|
|
|
287
297
|
CountriesInput,
|
|
288
298
|
CountrySelectionInput,
|
|
289
299
|
CountryValueEditor,
|
|
290
|
-
CouplingOmnibusCreation,
|
|
291
|
-
CouplingOmnibusForm,
|
|
292
300
|
CreateParameterDialog,
|
|
293
|
-
CreateSwitchesDialog,
|
|
294
301
|
CsvExport,
|
|
295
302
|
CsvUploader,
|
|
296
303
|
CustomAGGrid,
|
|
@@ -334,6 +341,7 @@ export {
|
|
|
334
341
|
DynamicSecurityAnalysisInline,
|
|
335
342
|
ENERGY_SOURCE_OPTIONS,
|
|
336
343
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
344
|
+
EQUIPMENT_TYPE_ORDER,
|
|
337
345
|
EXPERT_FILTER_EQUIPMENTS,
|
|
338
346
|
EXPERT_FILTER_FIELDS,
|
|
339
347
|
EXPERT_FILTER_QUERY,
|
|
@@ -606,6 +614,9 @@ export {
|
|
|
606
614
|
WRITE_SLACK_BUS,
|
|
607
615
|
alertThresholdMarks,
|
|
608
616
|
buildNewBusbarSections,
|
|
617
|
+
byFilterDeletionDtoToForm,
|
|
618
|
+
byFilterDeletionFormSchema,
|
|
619
|
+
byFilterDeletionFormToDto,
|
|
609
620
|
copyEquipmentPropertiesForCreation,
|
|
610
621
|
countRules,
|
|
611
622
|
createConnectivityData,
|
|
@@ -613,6 +624,7 @@ export {
|
|
|
613
624
|
creationPropertiesSchema,
|
|
614
625
|
dispatchUser,
|
|
615
626
|
doesNodeHasChildren,
|
|
627
|
+
emptyFormData,
|
|
616
628
|
emptyProperties,
|
|
617
629
|
equipmentDeletionDtoToForm,
|
|
618
630
|
equipmentDeletionEmptyFormData,
|
|
@@ -690,9 +702,13 @@ export {
|
|
|
690
702
|
initializedProperty,
|
|
691
703
|
intlInitialVoltageProfileMode,
|
|
692
704
|
intlPredefinedParametersOptions,
|
|
705
|
+
isAdditionalInformationTabError,
|
|
706
|
+
isCharacteristicsTabError,
|
|
693
707
|
isFieldRequired,
|
|
694
708
|
isFloatNumber,
|
|
695
709
|
isIntegerNumber,
|
|
710
|
+
isStructureTabError,
|
|
711
|
+
isSubstationTabError,
|
|
696
712
|
isValidComputingType,
|
|
697
713
|
italicFontTextField,
|
|
698
714
|
loadCreationDtoToForm,
|
|
@@ -0,0 +1,7 @@
|
|
|
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 declare function ByFilterDeletionForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
|
+
import { useWatch, useFormContext } from "react-hook-form";
|
|
5
|
+
import "react-intl";
|
|
6
|
+
import "../../../overflowableText/OverflowableText.js";
|
|
7
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
8
|
+
import "../../../../utils/conversionUtils.js";
|
|
9
|
+
import { ElementType } from "../../../../utils/types/elementType.js";
|
|
10
|
+
import "../../../../utils/types/equipmentType.js";
|
|
11
|
+
import "@mui/icons-material";
|
|
12
|
+
import { richTypeEquals } from "../../../../utils/ts-utils.js";
|
|
13
|
+
import "../../../../utils/yupConfig.js";
|
|
14
|
+
import "localized-countries";
|
|
15
|
+
import "localized-countries/data/fr";
|
|
16
|
+
import "localized-countries/data/en";
|
|
17
|
+
import "notistack";
|
|
18
|
+
import { useGetLabelEquipmentTypes } from "../../../../hooks/useGetLabelEquipmentTypes.js";
|
|
19
|
+
import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
20
|
+
import "yup";
|
|
21
|
+
import { DirectoryItemsInput } from "../../../inputs/reactHookForm/DirectoryItemsInput.js";
|
|
22
|
+
import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
23
|
+
import "../../../customAGGrid/customAggrid.js";
|
|
24
|
+
import "ag-grid-community";
|
|
25
|
+
import "react-papaparse";
|
|
26
|
+
import "react-csv-downloader";
|
|
27
|
+
import { AutocompleteInput } from "../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
|
|
28
|
+
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
31
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
|
+
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "@react-querybuilder/material";
|
|
35
|
+
import "../../../filter/expert/expertFilterConstants.js";
|
|
36
|
+
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
37
|
+
import "uuid";
|
|
38
|
+
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
39
|
+
import "react-querybuilder";
|
|
40
|
+
import { EQUIPMENT_TYPE_ORDER } from "./byFilterDeletion.utils.js";
|
|
41
|
+
function ByFilterDeletionForm() {
|
|
42
|
+
const equipmentType = useWatch({
|
|
43
|
+
name: FieldConstants.TYPE
|
|
44
|
+
});
|
|
45
|
+
const { setValue } = useFormContext();
|
|
46
|
+
const getOptionLabel = useGetLabelEquipmentTypes();
|
|
47
|
+
const handleEquipmentTypeChange = useCallback(() => {
|
|
48
|
+
setValue(FieldConstants.FILTERS, []);
|
|
49
|
+
}, [setValue]);
|
|
50
|
+
const typesOptions = useMemo(() => {
|
|
51
|
+
return Object.values(EQUIPMENT_TYPE_ORDER);
|
|
52
|
+
}, []);
|
|
53
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, padding: 0.5, alignItems: "center", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(
|
|
55
|
+
AutocompleteInput,
|
|
56
|
+
{
|
|
57
|
+
isOptionEqualToValue: richTypeEquals,
|
|
58
|
+
name: FieldConstants.TYPE,
|
|
59
|
+
label: "Type",
|
|
60
|
+
options: typesOptions,
|
|
61
|
+
onChangeCallback: handleEquipmentTypeChange,
|
|
62
|
+
getOptionLabel,
|
|
63
|
+
size: "small",
|
|
64
|
+
formProps: { variant: "filled" }
|
|
65
|
+
}
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(
|
|
68
|
+
DirectoryItemsInput,
|
|
69
|
+
{
|
|
70
|
+
name: FieldConstants.FILTERS,
|
|
71
|
+
elementType: ElementType.FILTER,
|
|
72
|
+
titleId: "FiltersListsSelection",
|
|
73
|
+
label: "filter",
|
|
74
|
+
equipmentTypes: equipmentType ? [equipmentType] : [],
|
|
75
|
+
disable: !equipmentType
|
|
76
|
+
},
|
|
77
|
+
equipmentType
|
|
78
|
+
) })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
ByFilterDeletionForm
|
|
83
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
2
|
+
import { EquipmentType, yupConfig as yup, DeepNullable } from '../../../../utils';
|
|
3
|
+
import { ByFilterDeletionDto } from './byFilterDeletion.types';
|
|
4
|
+
export declare const EQUIPMENT_TYPE_ORDER: EquipmentType[];
|
|
5
|
+
export declare const byFilterDeletionFormSchema: yup.ObjectSchema<{
|
|
6
|
+
type: NonNullable<EquipmentType | undefined>;
|
|
7
|
+
filters: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
}, yup.AnyObject, {
|
|
12
|
+
type: undefined;
|
|
13
|
+
filters: "";
|
|
14
|
+
}, "">;
|
|
15
|
+
export type ByFilterDeletionFormData = InferType<typeof byFilterDeletionFormSchema>;
|
|
16
|
+
export declare const byFilterDeletionDtoToForm: (dto: ByFilterDeletionDto) => ByFilterDeletionFormData;
|
|
17
|
+
export declare const byFilterDeletionFormToDto: (formData: ByFilterDeletionFormData) => ByFilterDeletionDto;
|
|
18
|
+
export declare const emptyFormData: DeepNullable<ByFilterDeletionFormData>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
2
|
+
import { YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
3
|
+
import "../../../../utils/conversionUtils.js";
|
|
4
|
+
import { EquipmentType } from "../../../../utils/types/equipmentType.js";
|
|
5
|
+
import { ModificationType } from "../../../../utils/types/modificationType.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
import "../../../../utils/yupConfig.js";
|
|
9
|
+
import * as yup from "yup";
|
|
10
|
+
const EQUIPMENT_TYPE_ORDER = [
|
|
11
|
+
EquipmentType.SUBSTATION,
|
|
12
|
+
EquipmentType.VOLTAGE_LEVEL,
|
|
13
|
+
EquipmentType.LINE,
|
|
14
|
+
EquipmentType.TWO_WINDINGS_TRANSFORMER,
|
|
15
|
+
EquipmentType.THREE_WINDINGS_TRANSFORMER,
|
|
16
|
+
EquipmentType.HVDC_LINE,
|
|
17
|
+
EquipmentType.GENERATOR,
|
|
18
|
+
EquipmentType.BATTERY,
|
|
19
|
+
EquipmentType.LOAD,
|
|
20
|
+
EquipmentType.SHUNT_COMPENSATOR,
|
|
21
|
+
EquipmentType.DANGLING_LINE,
|
|
22
|
+
EquipmentType.STATIC_VAR_COMPENSATOR
|
|
23
|
+
];
|
|
24
|
+
const byFilterDeletionFormSchema = yup.object().shape({
|
|
25
|
+
[FieldConstants.TYPE]: yup.mixed().oneOf(EQUIPMENT_TYPE_ORDER).required(YUP_REQUIRED),
|
|
26
|
+
[FieldConstants.FILTERS]: yup.array().of(
|
|
27
|
+
yup.object().shape({
|
|
28
|
+
[FieldConstants.ID]: yup.string().required(),
|
|
29
|
+
[FieldConstants.NAME]: yup.string().required()
|
|
30
|
+
})
|
|
31
|
+
).required().min(1, YUP_REQUIRED)
|
|
32
|
+
}).required();
|
|
33
|
+
const byFilterDeletionDtoToForm = (dto) => ({
|
|
34
|
+
[FieldConstants.TYPE]: dto.equipmentType,
|
|
35
|
+
[FieldConstants.FILTERS]: dto.filters
|
|
36
|
+
});
|
|
37
|
+
const byFilterDeletionFormToDto = (formData) => ({
|
|
38
|
+
type: ModificationType.BY_FILTER_DELETION,
|
|
39
|
+
equipmentType: formData[FieldConstants.TYPE],
|
|
40
|
+
filters: formData[FieldConstants.FILTERS]
|
|
41
|
+
});
|
|
42
|
+
const emptyFormData = {
|
|
43
|
+
[FieldConstants.TYPE]: null,
|
|
44
|
+
[FieldConstants.FILTERS]: []
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
EQUIPMENT_TYPE_ORDER,
|
|
48
|
+
byFilterDeletionDtoToForm,
|
|
49
|
+
byFilterDeletionFormSchema,
|
|
50
|
+
byFilterDeletionFormToDto,
|
|
51
|
+
emptyFormData
|
|
52
|
+
};
|
|
@@ -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 './ByFilterDeletionForm';
|
|
8
|
+
export * from './byFilterDeletion.types';
|
|
9
|
+
export * from './byFilterDeletion.utils';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ByFilterDeletionForm } from "./ByFilterDeletionForm.js";
|
|
2
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./byFilterDeletion.utils.js";
|
|
3
|
+
export {
|
|
4
|
+
ByFilterDeletionForm,
|
|
5
|
+
EQUIPMENT_TYPE_ORDER,
|
|
6
|
+
byFilterDeletionDtoToForm,
|
|
7
|
+
byFilterDeletionFormSchema,
|
|
8
|
+
byFilterDeletionFormToDto,
|
|
9
|
+
emptyFormData
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ByFilterDeletionForm } from "./deletion/ByFilterDeletionForm.js";
|
|
2
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./deletion/byFilterDeletion.utils.js";
|
|
3
|
+
export {
|
|
4
|
+
ByFilterDeletionForm,
|
|
5
|
+
EQUIPMENT_TYPE_ORDER,
|
|
6
|
+
byFilterDeletionDtoToForm,
|
|
7
|
+
byFilterDeletionFormSchema,
|
|
8
|
+
byFilterDeletionFormToDto,
|
|
9
|
+
emptyFormData
|
|
10
|
+
};
|
package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VoltageLevelFormInfos } from '../../
|
|
1
|
+
import { VoltageLevelFormInfos } from '../../voltageLevel/voltage-level.type';
|
|
2
2
|
import { FieldConstants } from '../../../../utils';
|
|
3
3
|
export declare const getConnectivityPropertiesValidationSchema: (isEquipmentModification?: boolean) => {
|
|
4
4
|
voltageLevel: import('yup').ObjectSchema<{
|
|
@@ -23,15 +23,46 @@ import { SubstationCreationForm } from "./substation/creation/SubstationCreation
|
|
|
23
23
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./substation/creation/substationCreation.utils.js";
|
|
24
24
|
import { SubstationModificationForm } from "./substation/modification/SubstationModificationForm.js";
|
|
25
25
|
import { substationModificationDtoToForm, substationModificationEmptyFormData, substationModificationFormSchema, substationModificationFormToDto } from "./substation/modification/substationModification.utils.js";
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
26
|
+
import { SwitchesBetweenSections } from "./voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
|
|
27
|
+
import "react/jsx-runtime";
|
|
28
|
+
import "@mui/material";
|
|
29
|
+
import "react-hook-form";
|
|
30
|
+
import "react-intl";
|
|
31
|
+
import "../overflowableText/OverflowableText.js";
|
|
32
|
+
import "../../utils/conversionUtils.js";
|
|
33
|
+
import "../../utils/types/equipmentType.js";
|
|
34
|
+
import "@mui/icons-material";
|
|
35
|
+
import "../../utils/yupConfig.js";
|
|
36
|
+
import "react";
|
|
37
|
+
import "localized-countries";
|
|
38
|
+
import "localized-countries/data/fr";
|
|
39
|
+
import "localized-countries/data/en";
|
|
40
|
+
import "notistack";
|
|
41
|
+
import "../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
42
|
+
import "yup";
|
|
43
|
+
import "../treeViewFinder/TreeViewFinder.js";
|
|
44
|
+
import "../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
45
|
+
import "../customAGGrid/customAggrid.js";
|
|
46
|
+
import "ag-grid-community";
|
|
47
|
+
import "react-papaparse";
|
|
48
|
+
import "react-csv-downloader";
|
|
49
|
+
import "../inputs/reactHookForm/numbers/RangeInput.js";
|
|
50
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
51
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
52
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
53
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
54
|
+
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
55
|
+
import "@react-querybuilder/material";
|
|
56
|
+
import "../filter/expert/expertFilterConstants.js";
|
|
57
|
+
import "../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
58
|
+
import "uuid";
|
|
59
|
+
import "../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
60
|
+
import "react-querybuilder";
|
|
61
|
+
import { VoltageLevelCreationForm } from "./voltageLevel/creation/VoltageLevelCreationForm.js";
|
|
62
|
+
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevel/creation/voltageLevelCreation.utils.js";
|
|
63
|
+
import { SwitchKind } from "./voltageLevel/creation/voltageLevelCreation.types.js";
|
|
64
|
+
import { VoltageLevelModificationForm } from "./voltageLevel/modification/VoltageLevelModificationForm.js";
|
|
65
|
+
import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./voltageLevel/modification/voltageLevelModification.utils.js";
|
|
35
66
|
import { LoadDialogTab } from "./load/common/load.utils.js";
|
|
36
67
|
import { LoadDialogTabs } from "./load/common/LoadDialogTabs.js";
|
|
37
68
|
import { LoadDialogTabsContent } from "./load/common/LoadDialogTabsContent.js";
|
|
@@ -39,13 +70,14 @@ import { LoadDialogHeader } from "./load/common/LoadDialogHeader.js";
|
|
|
39
70
|
import { LoadForm } from "./load/common/LoadForm.js";
|
|
40
71
|
import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchema, loadCreationFormToDto } from "./load/creation/loadCreation.utils.js";
|
|
41
72
|
import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./load/modification/loadModification.utils.js";
|
|
73
|
+
import { ByFilterDeletionForm } from "./by-filter/deletion/ByFilterDeletionForm.js";
|
|
74
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./by-filter/deletion/byFilterDeletion.utils.js";
|
|
42
75
|
export {
|
|
43
76
|
BranchActiveReactivePowerMeasurementsForm,
|
|
44
77
|
BranchConnectivityForm,
|
|
78
|
+
ByFilterDeletionForm,
|
|
45
79
|
ConnectivityForm,
|
|
46
|
-
|
|
47
|
-
CouplingOmnibusForm,
|
|
48
|
-
CreateSwitchesDialog,
|
|
80
|
+
EQUIPMENT_TYPE_ORDER,
|
|
49
81
|
EquipmentDeletionForm,
|
|
50
82
|
HvdcLccDeletionSpecificForm,
|
|
51
83
|
LoadDialogHeader,
|
|
@@ -67,10 +99,14 @@ export {
|
|
|
67
99
|
VoltageLevelCreationForm,
|
|
68
100
|
VoltageLevelModificationForm,
|
|
69
101
|
buildNewBusbarSections,
|
|
102
|
+
byFilterDeletionDtoToForm,
|
|
103
|
+
byFilterDeletionFormSchema,
|
|
104
|
+
byFilterDeletionFormToDto,
|
|
70
105
|
copyEquipmentPropertiesForCreation,
|
|
71
106
|
createConnectivityData,
|
|
72
107
|
createPropertyModification,
|
|
73
108
|
creationPropertiesSchema,
|
|
109
|
+
emptyFormData,
|
|
74
110
|
emptyProperties,
|
|
75
111
|
equipmentDeletionDtoToForm,
|
|
76
112
|
equipmentDeletionEmptyFormData,
|
|
@@ -122,6 +158,10 @@ export {
|
|
|
122
158
|
getSetPointsEmptyFormData,
|
|
123
159
|
getSetPointsSchema,
|
|
124
160
|
initializedProperty,
|
|
161
|
+
isAdditionalInformationTabError,
|
|
162
|
+
isCharacteristicsTabError,
|
|
163
|
+
isStructureTabError,
|
|
164
|
+
isSubstationTabError,
|
|
125
165
|
italicFontTextField,
|
|
126
166
|
loadCreationDtoToForm,
|
|
127
167
|
loadCreationEmptyFormData,
|
|
@@ -29,7 +29,7 @@ function LoadDialogTabs({
|
|
|
29
29
|
/* @__PURE__ */ jsx(
|
|
30
30
|
Tab,
|
|
31
31
|
{
|
|
32
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "
|
|
32
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "CharacteristicsTab" }),
|
|
33
33
|
sx: getTabStyle(tabIndexesWithError, LoadDialogTab.CHARACTERISTICS_TAB)
|
|
34
34
|
}
|
|
35
35
|
),
|
package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { useFormState, useWatch } from "react-hook-form";
|
|
4
|
+
import { Grid, Tabs, Tab, Box } from "@mui/material";
|
|
5
|
+
import { FormattedMessage } from "react-intl";
|
|
6
|
+
import GridItem from "../../../grid/grid-item.js";
|
|
7
|
+
import "../../../overflowableText/OverflowableText.js";
|
|
8
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
9
|
+
import "../../../../utils/conversionUtils.js";
|
|
10
|
+
import "../../../../utils/types/equipmentType.js";
|
|
11
|
+
import "@mui/icons-material";
|
|
12
|
+
import "../../../../utils/yupConfig.js";
|
|
13
|
+
import "localized-countries";
|
|
14
|
+
import "localized-countries/data/fr";
|
|
15
|
+
import "localized-countries/data/en";
|
|
16
|
+
import "notistack";
|
|
17
|
+
import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../../treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
21
|
+
import "../../../customAGGrid/customAggrid.js";
|
|
22
|
+
import "ag-grid-community";
|
|
23
|
+
import "react-papaparse";
|
|
24
|
+
import "react-csv-downloader";
|
|
25
|
+
import { TextInput } from "../../../inputs/reactHookForm/text/TextInput.js";
|
|
26
|
+
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
|
+
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
32
|
+
import "@react-querybuilder/material";
|
|
33
|
+
import "../../../filter/expert/expertFilterConstants.js";
|
|
34
|
+
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
35
|
+
import "uuid";
|
|
36
|
+
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
37
|
+
import "react-querybuilder";
|
|
38
|
+
import { VoltageLevelTab } from "./voltageLevel.constants.js";
|
|
39
|
+
import { isSubstationTabError, isCharacteristicsTabError, isStructureTabError, isAdditionalInformationTabError } from "./voltageLevelCreation.utils.js";
|
|
40
|
+
import "./tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js";
|
|
41
|
+
import { StructureTab } from "./tabs/structureTab/StructureTab.js";
|
|
42
|
+
import { SubstationTab } from "./tabs/substationTab/SubstationTab.js";
|
|
43
|
+
import { CharacteristicsTab } from "./tabs/characteristicsTab/CharacteristicsTab.js";
|
|
44
|
+
import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
|
|
45
|
+
import "../../common/properties/propertyUtils.js";
|
|
46
|
+
import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
|
|
47
|
+
function VoltageLevelCreationForm({
|
|
48
|
+
substationOptions,
|
|
49
|
+
showDeleteSubstationButton = true
|
|
50
|
+
} = {}) {
|
|
51
|
+
const [tabIndex, setTabIndex] = useState(0);
|
|
52
|
+
const [tabIndexesWithError, setTabIndexesWithError] = useState([]);
|
|
53
|
+
const { errors } = useFormState();
|
|
54
|
+
const watchHideBusBarSection = useWatch({ name: FieldConstants.HIDE_BUS_BAR_SECTION });
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const tabsInError = [];
|
|
57
|
+
if (isSubstationTabError(errors)) {
|
|
58
|
+
tabsInError.push(VoltageLevelTab.SUBSTATION_TAB);
|
|
59
|
+
}
|
|
60
|
+
if (isCharacteristicsTabError(errors)) {
|
|
61
|
+
tabsInError.push(VoltageLevelTab.CHARACTERISTICS_TAB);
|
|
62
|
+
}
|
|
63
|
+
if (isStructureTabError(errors)) {
|
|
64
|
+
tabsInError.push(VoltageLevelTab.STRUCTURE_TAB);
|
|
65
|
+
}
|
|
66
|
+
if (isAdditionalInformationTabError(errors)) {
|
|
67
|
+
tabsInError.push(VoltageLevelTab.ADDITIONAL_INFORMATION_TAB);
|
|
68
|
+
}
|
|
69
|
+
if (tabsInError.length > 0) {
|
|
70
|
+
setTabIndex((currentTabIndex) => {
|
|
71
|
+
return tabsInError.includes(currentTabIndex) ? currentTabIndex : tabsInError[0];
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
setTabIndexesWithError(tabsInError);
|
|
75
|
+
}, [errors]);
|
|
76
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
77
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(
|
|
79
|
+
TextInput,
|
|
80
|
+
{
|
|
81
|
+
name: FieldConstants.EQUIPMENT_ID,
|
|
82
|
+
label: "ID",
|
|
83
|
+
formProps: { autoFocus: true, margin: "normal" }
|
|
84
|
+
}
|
|
85
|
+
) }),
|
|
86
|
+
/* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_NAME, label: "Name", formProps: { margin: "normal" } }) })
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ jsxs(
|
|
89
|
+
Tabs,
|
|
90
|
+
{
|
|
91
|
+
value: tabIndex,
|
|
92
|
+
variant: "scrollable",
|
|
93
|
+
onChange: (_, newValue) => setTabIndex(newValue),
|
|
94
|
+
TabIndicatorProps: {
|
|
95
|
+
sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
|
|
96
|
+
},
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsx(
|
|
99
|
+
Tab,
|
|
100
|
+
{
|
|
101
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "ConnectivityTab" }),
|
|
102
|
+
sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.SUBSTATION_TAB)
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
Tab,
|
|
107
|
+
{
|
|
108
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "CharacteristicsTab" }),
|
|
109
|
+
sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.CHARACTERISTICS_TAB)
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ jsx(
|
|
113
|
+
Tab,
|
|
114
|
+
{
|
|
115
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "StructureTab" }),
|
|
116
|
+
sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.STRUCTURE_TAB),
|
|
117
|
+
disabled: watchHideBusBarSection
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ jsx(
|
|
121
|
+
Tab,
|
|
122
|
+
{
|
|
123
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "AdditionalInformationTab" }),
|
|
124
|
+
sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.ADDITIONAL_INFORMATION_TAB)
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.SUBSTATION_TAB, children: /* @__PURE__ */ jsx(SubstationTab, { substationOptions, showDeleteButton: showDeleteSubstationButton }) }),
|
|
131
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.CHARACTERISTICS_TAB, children: /* @__PURE__ */ jsx(CharacteristicsTab, {}) }),
|
|
132
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.STRUCTURE_TAB, children: /* @__PURE__ */ jsx(StructureTab, {}) }),
|
|
133
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.ADDITIONAL_INFORMATION_TAB, children: /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "voltageLevel" }) })
|
|
134
|
+
] });
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
VoltageLevelCreationForm
|
|
138
|
+
};
|
package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/index.d.ts
RENAMED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
export * from './coupling-omnibus';
|
|
7
|
+
export { SwitchesBetweenSections } from './tabs';
|
|
9
8
|
export * from './VoltageLevelCreationForm';
|
|
10
9
|
export * from './voltageLevelCreation.utils';
|
|
11
10
|
export * from './voltageLevelCreation.types';
|