@gridsuite/commons-ui 0.189.0 → 0.191.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/customAGGrid/cell-renderers.js +28 -26
- package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +1 -0
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +1 -0
- package/dist/components/dnd-table/dnd-table.js +72 -34
- package/dist/components/filter/HeaderFilterForm.js +1 -0
- package/dist/components/filter/expert/ExpertFilterForm.js +1 -0
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -0
- package/dist/components/index.js +16 -6
- package/dist/components/inputs/index.js +2 -0
- package/dist/components/inputs/reactHookForm/expandableInput/ExpandableInput.d.ts +5 -5
- package/dist/components/inputs/reactHookForm/expandableInput/ExpandableInput.js +66 -54
- package/dist/components/inputs/reactHookForm/index.js +2 -0
- package/dist/components/inputs/reactHookForm/selectInputs/SelectWithConfirmationInput.d.ts +9 -0
- package/dist/components/inputs/reactHookForm/selectInputs/SelectWithConfirmationInput.js +64 -0
- package/dist/components/inputs/reactHookForm/selectInputs/index.d.ts +1 -0
- package/dist/components/inputs/reactHookForm/selectInputs/index.js +3 -1
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-constants.d.ts +16 -0
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-constants.js +402 -0
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.d.ts +12 -0
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.js +218 -0
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-utils.d.ts +21 -0
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-utils.js +89 -0
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment.type.d.ts +28 -0
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment.type.js +12 -0
- package/dist/components/network-modifications/by-filter/assignment/index.d.ts +10 -0
- package/dist/components/network-modifications/by-filter/assignment/index.js +11 -0
- package/dist/components/network-modifications/by-filter/assignment/modification-by-assignment-form.d.ts +7 -0
- package/dist/components/network-modifications/by-filter/assignment/modification-by-assignment-form.js +89 -0
- package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.types.d.ts +7 -0
- package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.types.js +1 -0
- package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.utils.d.ts +22 -0
- package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.utils.js +55 -0
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +1 -0
- package/dist/components/network-modifications/by-filter/index.d.ts +1 -0
- package/dist/components/network-modifications/by-filter/index.js +10 -1
- package/dist/components/network-modifications/common/connectivity/ConnectivityForm.js +1 -0
- package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +1 -0
- package/dist/components/network-modifications/common/properties/PropertyForm.js +1 -0
- package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +1 -0
- package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +1 -0
- package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +1 -0
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +1 -0
- package/dist/components/network-modifications/hooks/index.d.ts +7 -0
- package/dist/components/network-modifications/hooks/index.js +4 -0
- package/dist/components/network-modifications/hooks/useTabsWithError.d.ts +15 -0
- package/dist/components/network-modifications/hooks/useTabsWithError.js +28 -0
- package/dist/components/network-modifications/index.d.ts +1 -0
- package/dist/components/network-modifications/index.js +15 -6
- package/dist/components/network-modifications/load/common/LoadDialogHeader.js +1 -0
- package/dist/components/network-modifications/load/common/LoadForm.d.ts +1 -1
- package/dist/components/network-modifications/load/common/LoadForm.js +7 -27
- package/dist/components/network-modifications/load/common/index.js +2 -1
- package/dist/components/network-modifications/load/common/load.utils.d.ts +7 -11
- package/dist/components/network-modifications/load/common/load.utils.js +30 -4
- package/dist/components/network-modifications/load/creation/loadCreation.utils.js +1 -0
- package/dist/components/network-modifications/load/index.js +2 -1
- package/dist/components/network-modifications/load/modification/loadModification.utils.js +1 -0
- package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +1 -0
- package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +10 -29
- package/dist/components/network-modifications/voltageLevel/creation/index.js +2 -5
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesForm.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.d.ts +8 -12
- package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.js +53 -5
- package/dist/components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.d.ts +0 -4
- package/dist/components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +1 -16
- package/dist/components/network-modifications/voltageLevel/index.js +2 -5
- package/dist/components/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +1 -0
- package/dist/components/parameters/common/ProviderParam.js +1 -0
- package/dist/components/parameters/common/contingency-table/columns-definitions.js +1 -0
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +1 -0
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +1 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +1 -0
- package/dist/components/parameters/common/parameter-dnd-table-field.js +1 -0
- package/dist/components/parameters/common/parameter-field.js +1 -0
- package/dist/components/parameters/common/parameter-table/table-cell.js +1 -0
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +1 -0
- package/dist/components/parameters/common/widget/parameter-float.js +1 -0
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +1 -0
- package/dist/components/parameters/common/widget/parameter-line-slider.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -0
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/contingency-parameters.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +1 -0
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +1 -0
- package/dist/components/parameters/network-visualizations/map-parameters.js +1 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +1 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +1 -0
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -0
- package/dist/components/parameters/security-analysis/columns-definitions.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +1 -0
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/sensi/columns-definitions.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +1 -0
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +1 -0
- package/dist/components/parameters/sensi/utils.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-general-tab-panel.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-content.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-study-area-tab-panel.js +1 -0
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
- package/dist/components/parameters/util/make-component-utils.js +1 -0
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +1 -0
- package/dist/components/parameters/voltage-init/general-parameters.js +1 -0
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +2 -0
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +2 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +1 -0
- package/dist/index.js +16 -6
- package/dist/translations/en/networkModificationsEn.d.ts +51 -0
- package/dist/translations/en/networkModificationsEn.js +51 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +51 -0
- package/dist/translations/fr/networkModificationsFr.js +51 -0
- package/dist/utils/constants/fieldConstants.d.ts +2 -0
- package/dist/utils/constants/fieldConstants.js +2 -0
- package/package.json +1 -1
|
@@ -31,6 +31,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
31
31
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
32
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
33
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
34
35
|
import "@react-querybuilder/material";
|
|
35
36
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
36
37
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -35,6 +35,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
35
35
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
36
36
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
37
37
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
38
|
+
import "../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
38
39
|
import "@react-querybuilder/material";
|
|
39
40
|
import "../../filter/expert/expertFilterConstants.js";
|
|
40
41
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -30,6 +30,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
30
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
32
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
33
|
+
import "../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
34
|
import "@react-querybuilder/material";
|
|
34
35
|
import "../../filter/expert/expertFilterConstants.js";
|
|
35
36
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -29,6 +29,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
29
29
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
30
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
31
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
32
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
32
33
|
import "@react-querybuilder/material";
|
|
33
34
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
34
35
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -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 * from './useTabsWithError';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FieldConstants } from '../../../utils';
|
|
2
|
+
type TabFieldsMap<T extends number> = Readonly<Partial<Record<T, FieldConstants[]>>>;
|
|
3
|
+
/**
|
|
4
|
+
* Manages tab navigation with automatic error highlighting for react-hook-form-based tabbed forms.
|
|
5
|
+
*
|
|
6
|
+
* @param tabFields - Maps each tab index to the field names it owns. Must be a module-level
|
|
7
|
+
* constant to remain stable across renders.
|
|
8
|
+
* @param initialTab - The tab to show on first render.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useTabsWithError<T extends number>(tabFields: TabFieldsMap<T>, initialTab: T): {
|
|
11
|
+
tabIndex: T;
|
|
12
|
+
setTabIndex: (tab: T) => void;
|
|
13
|
+
tabIndexesWithError: T[];
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState, useRef, useEffect, useCallback } from "react";
|
|
2
|
+
import { useFormState } from "react-hook-form";
|
|
3
|
+
function useTabsWithError(tabFields, initialTab) {
|
|
4
|
+
const { errors, submitCount } = useFormState();
|
|
5
|
+
const [tabIndex, setTabIndex] = useState(initialTab);
|
|
6
|
+
const tabIndexRef = useRef(tabIndex);
|
|
7
|
+
const tabIndexesWithError = Object.keys(tabFields).map(Number).filter(
|
|
8
|
+
(tab) => tabFields[tab].some((field) => errors[field] !== void 0)
|
|
9
|
+
);
|
|
10
|
+
const tabIndexesWithErrorRef = useRef(tabIndexesWithError);
|
|
11
|
+
tabIndexesWithErrorRef.current = tabIndexesWithError;
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const tabs = tabIndexesWithErrorRef.current;
|
|
14
|
+
if (tabs.length > 0 && !tabs.includes(tabIndexRef.current)) {
|
|
15
|
+
const tab = tabs[0];
|
|
16
|
+
tabIndexRef.current = tab;
|
|
17
|
+
setTabIndex(tab);
|
|
18
|
+
}
|
|
19
|
+
}, [submitCount]);
|
|
20
|
+
const handleSetTabIndex = useCallback((tab) => {
|
|
21
|
+
tabIndexRef.current = tab;
|
|
22
|
+
setTabIndex(tab);
|
|
23
|
+
}, []);
|
|
24
|
+
return { tabIndex, setTabIndex: handleSetTabIndex, tabIndexesWithError };
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
useTabsWithError
|
|
28
|
+
};
|
|
@@ -19,6 +19,7 @@ import { useHvdcLccDeletion } from "./equipmentDeletion/hvdcLccDeletion/useHvdcL
|
|
|
19
19
|
import { HvdcLccDeletionSpecificForm } from "./equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js";
|
|
20
20
|
import { equipmentDeletionDtoToForm, equipmentDeletionEmptyFormData, equipmentDeletionFormSchema, equipmentDeletionFormToDto, newEquipmentDeletionDto } from "./equipmentDeletion/equipmentDeletion.utils.js";
|
|
21
21
|
import { EquipmentDeletionForm } from "./equipmentDeletion/EquipmentDeletionForm.js";
|
|
22
|
+
import { useTabsWithError } from "./hooks/useTabsWithError.js";
|
|
22
23
|
import { SubstationCreationForm } from "./substation/creation/SubstationCreationForm.js";
|
|
23
24
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./substation/creation/substationCreation.utils.js";
|
|
24
25
|
import { SubstationModificationForm } from "./substation/modification/SubstationModificationForm.js";
|
|
@@ -52,6 +53,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
52
53
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
53
54
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
54
55
|
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
56
|
+
import "../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
55
57
|
import "@react-querybuilder/material";
|
|
56
58
|
import "../filter/expert/expertFilterConstants.js";
|
|
57
59
|
import "../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -59,11 +61,11 @@ import "uuid";
|
|
|
59
61
|
import "../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
60
62
|
import "react-querybuilder";
|
|
61
63
|
import { VoltageLevelCreationForm } from "./voltageLevel/creation/VoltageLevelCreationForm.js";
|
|
62
|
-
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema,
|
|
64
|
+
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevel/creation/voltageLevelCreation.utils.js";
|
|
63
65
|
import { SwitchKind } from "./voltageLevel/creation/voltageLevelCreation.types.js";
|
|
64
66
|
import { VoltageLevelModificationForm } from "./voltageLevel/modification/VoltageLevelModificationForm.js";
|
|
65
67
|
import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./voltageLevel/modification/voltageLevelModification.utils.js";
|
|
66
|
-
import { LoadDialogTab } from "./load/common/load.utils.js";
|
|
68
|
+
import { LOAD_TAB_FIELDS, LoadDialogTab } from "./load/common/load.utils.js";
|
|
67
69
|
import { LoadDialogTabs } from "./load/common/LoadDialogTabs.js";
|
|
68
70
|
import { LoadDialogTabsContent } from "./load/common/LoadDialogTabsContent.js";
|
|
69
71
|
import { LoadDialogHeader } from "./load/common/LoadDialogHeader.js";
|
|
@@ -72,7 +74,11 @@ import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchem
|
|
|
72
74
|
import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./load/modification/loadModification.utils.js";
|
|
73
75
|
import { ByFilterDeletionForm } from "./by-filter/deletion/ByFilterDeletionForm.js";
|
|
74
76
|
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./by-filter/deletion/byFilterDeletion.utils.js";
|
|
77
|
+
import { ModificationByAssignmentForm } from "./by-filter/assignment/modification-by-assignment-form.js";
|
|
78
|
+
import { emptyModificationByAssignmentFormData, modificationByAssignmentDtoToForm, modificationByAssignmentFormSchema, modificationByAssignmentFormToDto } from "./by-filter/assignment/modificationByAssignment.utils.js";
|
|
79
|
+
import { DataType } from "./by-filter/assignment/assignment/assignment.type.js";
|
|
75
80
|
export {
|
|
81
|
+
DataType as AssignmentDataType,
|
|
76
82
|
BranchActiveReactivePowerMeasurementsForm,
|
|
77
83
|
BranchConnectivityForm,
|
|
78
84
|
ByFilterDeletionForm,
|
|
@@ -80,11 +86,13 @@ export {
|
|
|
80
86
|
EQUIPMENT_TYPE_ORDER,
|
|
81
87
|
EquipmentDeletionForm,
|
|
82
88
|
HvdcLccDeletionSpecificForm,
|
|
89
|
+
LOAD_TAB_FIELDS,
|
|
83
90
|
LoadDialogHeader,
|
|
84
91
|
LoadDialogTab,
|
|
85
92
|
LoadDialogTabs,
|
|
86
93
|
LoadDialogTabsContent,
|
|
87
94
|
LoadForm,
|
|
95
|
+
ModificationByAssignmentForm,
|
|
88
96
|
PowerMeasurementsForm,
|
|
89
97
|
PowerWithValidityForm,
|
|
90
98
|
PropertiesForm,
|
|
@@ -107,6 +115,7 @@ export {
|
|
|
107
115
|
createPropertyModification,
|
|
108
116
|
creationPropertiesSchema,
|
|
109
117
|
emptyFormData,
|
|
118
|
+
emptyModificationByAssignmentFormData,
|
|
110
119
|
emptyProperties,
|
|
111
120
|
equipmentDeletionDtoToForm,
|
|
112
121
|
equipmentDeletionEmptyFormData,
|
|
@@ -158,10 +167,6 @@ export {
|
|
|
158
167
|
getSetPointsEmptyFormData,
|
|
159
168
|
getSetPointsSchema,
|
|
160
169
|
initializedProperty,
|
|
161
|
-
isAdditionalInformationTabError,
|
|
162
|
-
isCharacteristicsTabError,
|
|
163
|
-
isStructureTabError,
|
|
164
|
-
isSubstationTabError,
|
|
165
170
|
italicFontTextField,
|
|
166
171
|
loadCreationDtoToForm,
|
|
167
172
|
loadCreationEmptyFormData,
|
|
@@ -172,6 +177,9 @@ export {
|
|
|
172
177
|
loadModificationFormSchema,
|
|
173
178
|
loadModificationFormToDto,
|
|
174
179
|
mergeModificationAndEquipmentProperties,
|
|
180
|
+
modificationByAssignmentDtoToForm,
|
|
181
|
+
modificationByAssignmentFormSchema,
|
|
182
|
+
modificationByAssignmentFormToDto,
|
|
175
183
|
modificationPropertiesSchema,
|
|
176
184
|
newEquipmentDeletionDto,
|
|
177
185
|
standardTextField,
|
|
@@ -187,6 +195,7 @@ export {
|
|
|
187
195
|
toModificationProperties,
|
|
188
196
|
translateSwitchKinds,
|
|
189
197
|
useHvdcLccDeletion,
|
|
198
|
+
useTabsWithError,
|
|
190
199
|
voltageLevelCreationDtoToForm,
|
|
191
200
|
voltageLevelCreationEmptyFormData,
|
|
192
201
|
voltageLevelCreationFormSchema,
|
|
@@ -32,6 +32,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
32
32
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
33
33
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
34
34
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
35
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
35
36
|
import "@react-querybuilder/material";
|
|
36
37
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
37
38
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LoadDialogTabsContentProps } from './LoadDialogTabsContent';
|
|
2
1
|
import { LoadDialogHeaderProps } from './LoadDialogHeader';
|
|
2
|
+
import { LoadDialogTabsContentProps } from './LoadDialogTabsContent';
|
|
3
3
|
interface LoadFormProps extends LoadDialogHeaderProps, Omit<LoadDialogTabsContentProps, 'tabIndex' | 'isModification' | 'loadToModify'> {
|
|
4
4
|
}
|
|
5
5
|
export declare function LoadForm({ loadToModify, isModification, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, }: Readonly<LoadFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
2
|
import { Grid } from "@mui/material";
|
|
4
|
-
import {
|
|
5
|
-
import { LoadDialogTabsContent } from "./LoadDialogTabsContent.js";
|
|
3
|
+
import { LoadDialogTab, LOAD_TAB_FIELDS } from "./load.utils.js";
|
|
6
4
|
import { LoadDialogHeader } from "./LoadDialogHeader.js";
|
|
7
|
-
import { LoadDialogTab } from "./load.utils.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
5
|
import { LoadDialogTabs } from "./LoadDialogTabs.js";
|
|
6
|
+
import { LoadDialogTabsContent } from "./LoadDialogTabsContent.js";
|
|
7
|
+
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
14
8
|
function LoadForm({
|
|
15
9
|
loadToModify,
|
|
16
10
|
isModification,
|
|
@@ -18,24 +12,10 @@ function LoadForm({
|
|
|
18
12
|
fetchBusesOrBusbarSections,
|
|
19
13
|
PositionDiagramPane
|
|
20
14
|
}) {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const tabsInError = [];
|
|
26
|
-
if (errors?.[FieldConstants.CONNECTIVITY] !== void 0) {
|
|
27
|
-
tabsInError.push(LoadDialogTab.CONNECTIVITY_TAB);
|
|
28
|
-
}
|
|
29
|
-
if (errors?.[FieldConstants.ACTIVE_POWER_SET_POINT] !== void 0 || errors?.[FieldConstants.REACTIVE_POWER_SET_POINT] !== void 0 || errors?.[FieldConstants.ADDITIONAL_PROPERTIES] !== void 0) {
|
|
30
|
-
tabsInError.push(LoadDialogTab.CHARACTERISTICS_TAB);
|
|
31
|
-
}
|
|
32
|
-
if (tabsInError.length > 0) {
|
|
33
|
-
setTabIndex((currentTabIndex) => {
|
|
34
|
-
return tabsInError.includes(currentTabIndex) ? currentTabIndex : tabsInError[0];
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
setTabIndexesWithError(tabsInError);
|
|
38
|
-
}, [errors]);
|
|
15
|
+
const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
|
|
16
|
+
LOAD_TAB_FIELDS,
|
|
17
|
+
LoadDialogTab.CONNECTIVITY_TAB
|
|
18
|
+
);
|
|
39
19
|
return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
|
|
40
20
|
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(LoadDialogHeader, { loadToModify, isModification }) }),
|
|
41
21
|
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { LoadDialogTab } from "./load.utils.js";
|
|
1
|
+
import { LOAD_TAB_FIELDS, LoadDialogTab } from "./load.utils.js";
|
|
2
2
|
import { LoadDialogTabs } from "./LoadDialogTabs.js";
|
|
3
3
|
import { LoadDialogTabsContent } from "./LoadDialogTabsContent.js";
|
|
4
4
|
import { LoadDialogHeader } from "./LoadDialogHeader.js";
|
|
5
5
|
import { LoadForm } from "./LoadForm.js";
|
|
6
6
|
export {
|
|
7
|
+
LOAD_TAB_FIELDS,
|
|
7
8
|
LoadDialogHeader,
|
|
8
9
|
LoadDialogTab,
|
|
9
10
|
LoadDialogTabs,
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
CONNECTIVITY_TAB: number;
|
|
9
|
-
CHARACTERISTICS_TAB: number;
|
|
10
|
-
STATE_ESTIMATION_TAB: number;
|
|
11
|
-
};
|
|
1
|
+
import { FieldConstants } from '../../../../utils';
|
|
2
|
+
export declare enum LoadDialogTab {
|
|
3
|
+
CONNECTIVITY_TAB = 0,
|
|
4
|
+
CHARACTERISTICS_TAB = 1,
|
|
5
|
+
STATE_ESTIMATION_TAB = 2
|
|
6
|
+
}
|
|
7
|
+
export declare const LOAD_TAB_FIELDS: Readonly<Partial<Record<LoadDialogTab, FieldConstants[]>>>;
|
|
@@ -1,8 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
2
|
+
import "../../../../utils/conversionUtils.js";
|
|
3
|
+
import "../../../../utils/types/equipmentType.js";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
import "@mui/icons-material";
|
|
6
|
+
import "../../../../utils/yupConfig.js";
|
|
7
|
+
var LoadDialogTab = /* @__PURE__ */ ((LoadDialogTab2) => {
|
|
8
|
+
LoadDialogTab2[LoadDialogTab2["CONNECTIVITY_TAB"] = 0] = "CONNECTIVITY_TAB";
|
|
9
|
+
LoadDialogTab2[LoadDialogTab2["CHARACTERISTICS_TAB"] = 1] = "CHARACTERISTICS_TAB";
|
|
10
|
+
LoadDialogTab2[LoadDialogTab2["STATE_ESTIMATION_TAB"] = 2] = "STATE_ESTIMATION_TAB";
|
|
11
|
+
return LoadDialogTab2;
|
|
12
|
+
})(LoadDialogTab || {});
|
|
13
|
+
const LOAD_TAB_FIELDS = {
|
|
14
|
+
[
|
|
15
|
+
0
|
|
16
|
+
/* CONNECTIVITY_TAB */
|
|
17
|
+
]: [FieldConstants.CONNECTIVITY],
|
|
18
|
+
[
|
|
19
|
+
1
|
|
20
|
+
/* CHARACTERISTICS_TAB */
|
|
21
|
+
]: [
|
|
22
|
+
FieldConstants.ACTIVE_POWER_SET_POINT,
|
|
23
|
+
FieldConstants.REACTIVE_POWER_SET_POINT,
|
|
24
|
+
FieldConstants.ADDITIONAL_PROPERTIES
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
2
|
|
28
|
+
/* STATE_ESTIMATION_TAB */
|
|
29
|
+
]: [FieldConstants.STATE_ESTIMATION]
|
|
5
30
|
};
|
|
6
31
|
export {
|
|
32
|
+
LOAD_TAB_FIELDS,
|
|
7
33
|
LoadDialogTab
|
|
8
34
|
};
|
|
@@ -31,6 +31,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
31
31
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
32
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
33
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
34
35
|
import "@react-querybuilder/material";
|
|
35
36
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
36
37
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoadDialogTab } from "./common/load.utils.js";
|
|
1
|
+
import { LOAD_TAB_FIELDS, LoadDialogTab } from "./common/load.utils.js";
|
|
2
2
|
import { LoadDialogTabs } from "./common/LoadDialogTabs.js";
|
|
3
3
|
import { LoadDialogTabsContent } from "./common/LoadDialogTabsContent.js";
|
|
4
4
|
import { LoadDialogHeader } from "./common/LoadDialogHeader.js";
|
|
@@ -6,6 +6,7 @@ import { LoadForm } from "./common/LoadForm.js";
|
|
|
6
6
|
import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchema, loadCreationFormToDto } from "./creation/loadCreation.utils.js";
|
|
7
7
|
import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./modification/loadModification.utils.js";
|
|
8
8
|
export {
|
|
9
|
+
LOAD_TAB_FIELDS,
|
|
9
10
|
LoadDialogHeader,
|
|
10
11
|
LoadDialogTab,
|
|
11
12
|
LoadDialogTabs,
|
|
@@ -30,6 +30,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
30
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
32
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
33
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
34
|
import "@react-querybuilder/material";
|
|
34
35
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
35
36
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -29,6 +29,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
29
29
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
30
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
31
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
32
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
32
33
|
import { CountrySelectionInput } from "../../../inputs/reactHookForm/CountrySelectionInput.js";
|
|
33
34
|
import "@react-querybuilder/material";
|
|
34
35
|
import "../../../filter/expert/expertFilterConstants.js";
|
package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js
CHANGED
|
@@ -27,6 +27,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
27
27
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
28
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
29
29
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
30
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
31
|
import { CountrySelectionInput } from "../../../inputs/reactHookForm/CountrySelectionInput.js";
|
|
31
32
|
import "@react-querybuilder/material";
|
|
32
33
|
import "../../../filter/expert/expertFilterConstants.js";
|
package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
|
-
import { useFormState, useWatch } from "react-hook-form";
|
|
4
2
|
import { Grid, Tabs, Tab, Box } from "@mui/material";
|
|
5
3
|
import { FormattedMessage } from "react-intl";
|
|
6
|
-
import
|
|
4
|
+
import { useWatch } from "react-hook-form";
|
|
7
5
|
import "../../../overflowableText/OverflowableText.js";
|
|
8
6
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
9
7
|
import "../../../../utils/conversionUtils.js";
|
|
10
8
|
import "../../../../utils/types/equipmentType.js";
|
|
11
9
|
import "@mui/icons-material";
|
|
12
10
|
import "../../../../utils/yupConfig.js";
|
|
11
|
+
import "react";
|
|
13
12
|
import "localized-countries";
|
|
14
13
|
import "localized-countries/data/fr";
|
|
15
14
|
import "localized-countries/data/en";
|
|
@@ -29,14 +28,15 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
29
28
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
29
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
30
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
31
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
32
32
|
import "@react-querybuilder/material";
|
|
33
33
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
34
34
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
35
35
|
import "uuid";
|
|
36
36
|
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
37
37
|
import "react-querybuilder";
|
|
38
|
-
import { VoltageLevelTab } from "./voltageLevel.constants.js";
|
|
39
|
-
import
|
|
38
|
+
import { VoltageLevelTab, VOLTAGE_LEVEL_TAB_FIELDS } from "./voltageLevel.constants.js";
|
|
39
|
+
import GridItem from "../../../grid/grid-item.js";
|
|
40
40
|
import "./tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js";
|
|
41
41
|
import { StructureTab } from "./tabs/structureTab/StructureTab.js";
|
|
42
42
|
import { SubstationTab } from "./tabs/substationTab/SubstationTab.js";
|
|
@@ -44,35 +44,16 @@ import { CharacteristicsTab } from "./tabs/characteristicsTab/CharacteristicsTab
|
|
|
44
44
|
import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
|
|
45
45
|
import "../../common/properties/propertyUtils.js";
|
|
46
46
|
import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
|
|
47
|
+
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
47
48
|
function VoltageLevelCreationForm({
|
|
48
49
|
substationOptions,
|
|
49
50
|
showDeleteSubstationButton = true
|
|
50
51
|
} = {}) {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
|
|
53
|
+
VOLTAGE_LEVEL_TAB_FIELDS,
|
|
54
|
+
VoltageLevelTab.SUBSTATION_TAB
|
|
55
|
+
);
|
|
54
56
|
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
57
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
77
58
|
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
78
59
|
/* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(
|
|
@@ -27,6 +27,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
27
27
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
28
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
29
29
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
30
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
31
|
import "@react-querybuilder/material";
|
|
31
32
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
32
33
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -35,7 +36,7 @@ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
35
36
|
import "react-querybuilder";
|
|
36
37
|
import "../../common/properties/propertyUtils.js";
|
|
37
38
|
import { VoltageLevelCreationForm } from "./VoltageLevelCreationForm.js";
|
|
38
|
-
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema,
|
|
39
|
+
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevelCreation.utils.js";
|
|
39
40
|
import { SwitchKind } from "./voltageLevelCreation.types.js";
|
|
40
41
|
export {
|
|
41
42
|
SWITCH_TYPE,
|
|
@@ -45,10 +46,6 @@ export {
|
|
|
45
46
|
buildNewBusbarSections,
|
|
46
47
|
getCreateSwitchesEmptyFormData,
|
|
47
48
|
getCreateSwitchesValidationSchema,
|
|
48
|
-
isAdditionalInformationTabError,
|
|
49
|
-
isCharacteristicsTabError,
|
|
50
|
-
isStructureTabError,
|
|
51
|
-
isSubstationTabError,
|
|
52
49
|
translateSwitchKinds,
|
|
53
50
|
voltageLevelCreationDtoToForm,
|
|
54
51
|
voltageLevelCreationEmptyFormData,
|
|
@@ -31,6 +31,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
31
31
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
32
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
33
|
import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
34
35
|
import "@react-querybuilder/material";
|
|
35
36
|
import "../../../../../filter/expert/expertFilterConstants.js";
|
|
36
37
|
import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -30,6 +30,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
30
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
32
|
import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
33
|
+
import "../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
34
|
import "@react-querybuilder/material";
|
|
34
35
|
import "../../../../../filter/expert/expertFilterConstants.js";
|
|
35
36
|
import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -30,6 +30,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
30
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
32
|
import "../../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
33
|
+
import "../../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
34
|
import "@react-querybuilder/material";
|
|
34
35
|
import "../../../../../../filter/expert/expertFilterConstants.js";
|
|
35
36
|
import "../../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -30,6 +30,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
30
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
32
|
import "../../../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
33
|
+
import "../../../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
34
|
import "@react-querybuilder/material";
|
|
34
35
|
import "../../../../../../../filter/expert/expertFilterConstants.js";
|
|
35
36
|
import "../../../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -29,6 +29,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
29
29
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
30
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
31
|
import "../../../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
32
|
+
import "../../../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
32
33
|
import "@react-querybuilder/material";
|
|
33
34
|
import "../../../../../../../filter/expert/expertFilterConstants.js";
|
|
34
35
|
import "../../../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -28,6 +28,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
28
28
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
29
29
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
30
30
|
import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
31
|
+
import "../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
31
32
|
import { CountrySelectionInput } from "../../../../../inputs/reactHookForm/CountrySelectionInput.js";
|
|
32
33
|
import "@react-querybuilder/material";
|
|
33
34
|
import "../../../../../filter/expert/expertFilterConstants.js";
|
|
@@ -30,6 +30,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
30
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
32
|
import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
33
|
+
import "../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
34
|
import "@react-querybuilder/material";
|
|
34
35
|
import "../../../../../filter/expert/expertFilterConstants.js";
|
|
35
36
|
import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
CHARACTERISTICS_TAB: number;
|
|
10
|
-
STRUCTURE_TAB: number;
|
|
11
|
-
ADDITIONAL_INFORMATION_TAB: number;
|
|
12
|
-
};
|
|
1
|
+
import { FieldConstants } from '../../../../utils';
|
|
2
|
+
export declare enum VoltageLevelTab {
|
|
3
|
+
SUBSTATION_TAB = 0,
|
|
4
|
+
CHARACTERISTICS_TAB = 1,
|
|
5
|
+
STRUCTURE_TAB = 2,
|
|
6
|
+
ADDITIONAL_INFORMATION_TAB = 3
|
|
7
|
+
}
|
|
8
|
+
export declare const VOLTAGE_LEVEL_TAB_FIELDS: Readonly<Record<VoltageLevelTab, FieldConstants[]>>;
|