@gridsuite/commons-ui 0.281.0 → 0.283.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/hooks/use-custom-aggrid-comparator-filter.js +1 -0
- package/dist/components/composite/customAGGrid/hooks/use-custom-aggrid-sort.js +1 -0
- package/dist/components/composite/reactQueryBuilder/OperatorSelector.js +1 -0
- package/dist/components/composite/report/QuickSearch.js +1 -0
- package/dist/components/composite/report/report-viewer/log-table/log-table.js +1 -1
- package/dist/components/ui/directoryItemSelector/DirectoryItemSelector.js +1 -0
- package/dist/features/index.js +12 -9
- package/dist/features/network-modification-table/network-modifications-table.js +1 -0
- package/dist/features/network-modification-table/renderers/reference-link-cell.js +1 -1
- package/dist/features/network-modification-table/renderers/root-network-chip-cell.js +1 -0
- package/dist/features/network-modification-table/renderers/switch-cell.js +1 -0
- package/dist/features/network-modification-table/row/drag-row-clone.js +1 -0
- package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +1 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabs.d.ts +3 -3
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabs.js +2 -2
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.d.ts +4 -1
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +7 -11
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.d.ts +3 -3
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.js +2 -2
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.d.ts +4 -1
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +4 -8
- package/dist/features/network-modifications/index.d.ts +0 -1
- package/dist/features/network-modifications/index.js +3 -3
- package/dist/features/network-modifications/line/common/LineDialogTabs.d.ts +3 -3
- package/dist/features/network-modifications/line/common/LineDialogTabs.js +2 -2
- package/dist/features/network-modifications/line/common/LineForm.d.ts +4 -1
- package/dist/features/network-modifications/line/common/LineForm.js +7 -11
- package/dist/features/network-modifications/line/common/line.utils.d.ts +1 -1
- package/dist/features/network-modifications/load/common/LoadDialogTabs.d.ts +3 -3
- package/dist/features/network-modifications/load/common/LoadDialogTabs.js +2 -2
- package/dist/features/network-modifications/load/common/LoadForm.d.ts +4 -1
- package/dist/features/network-modifications/load/common/LoadForm.js +7 -11
- package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.d.ts +3 -2
- package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js +2 -2
- package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.d.ts +4 -1
- package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.js +8 -11
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.d.ts +3 -3
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.js +2 -2
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +4 -1
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +7 -11
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.d.ts +4 -7
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +16 -19
- package/dist/features/network-modifications/voltageLevel/creation/index.d.ts +1 -1
- package/dist/features/network-modifications/voltageLevel/creation/index.js +3 -1
- package/dist/features/network-modifications/voltageLevel/index.js +3 -1
- package/dist/features/parameters/common/hook/index.d.ts +0 -1
- package/dist/features/parameters/common/hook/index.js +1 -3
- package/dist/features/parameters/common/index.js +1 -3
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +1 -1
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +4 -4
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.d.ts +1 -0
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.js +2 -0
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +3 -3
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +1 -1
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis.type.d.ts +1 -0
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis.type.js +2 -0
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-preview.js +1 -0
- package/dist/features/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +1 -0
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +3 -3
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.d.ts +1 -1
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation.type.d.ts +1 -0
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation.type.js +2 -0
- package/dist/features/parameters/index.js +10 -7
- package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +1 -1
- package/dist/features/parameters/loadflow/load-flow-parameters-utils.d.ts +1 -0
- package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +2 -0
- package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +3 -3
- package/dist/features/parameters/network-visualizations/constants.d.ts +1 -0
- package/dist/features/parameters/network-visualizations/constants.js +2 -0
- package/dist/features/parameters/network-visualizations/index.js +2 -1
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -1
- package/dist/features/parameters/network-visualizations/use-network-visualizations-parameters-form.js +3 -7
- package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +1 -1
- package/dist/features/parameters/security-analysis/constants.d.ts +1 -0
- package/dist/features/parameters/security-analysis/constants.js +2 -0
- package/dist/features/parameters/security-analysis/index.js +2 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-content.js +1 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -1
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +3 -3
- package/dist/features/parameters/sensi/columns-definitions.d.ts +2 -0
- package/dist/features/parameters/sensi/columns-definitions.js +36 -1
- package/dist/features/parameters/sensi/index.js +3 -1
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -1
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +2 -1
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +4 -1
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.d.ts +3 -1
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +19 -35
- package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.d.ts +9 -1
- package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.js +29 -1
- package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +1 -1
- package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.d.ts +1 -0
- package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +2 -0
- package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +3 -3
- package/dist/features/parameters/voltage-init/constants.d.ts +1 -0
- package/dist/features/parameters/voltage-init/constants.js +2 -0
- package/dist/features/parameters/voltage-init/index.js +2 -1
- package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +4 -8
- package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +1 -1
- package/dist/features/process-configs/loadflow/lf-process-config-edition.js +7 -1
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.js +7 -1
- package/dist/features/process-configs/shortcircuit/sc-process-config-edition.js +7 -1
- package/dist/features/results/loadflow/limit-violation-result.js +1 -1
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result.js +1 -1
- package/dist/features/side-bar/AppSideBar.js +2 -1
- package/dist/features/side-bar/AppSideBarHeader.js +3 -3
- package/dist/features/side-bar/footer/AppSideBarFooter.js +2 -0
- package/dist/features/side-bar/footer/common/SideBarMenuItem.d.ts +2 -1
- package/dist/features/side-bar/footer/common/SideBarMenuItem.js +5 -4
- package/dist/features/side-bar/footer/profile/ProfileMenu.js +1 -1
- package/dist/features/side-bar/footer/profile/UserIcon.d.ts +3 -7
- package/dist/features/side-bar/footer/profile/UserIcon.js +11 -7
- package/dist/features/side-bar/footer/settings/SettingsMenu.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/use-tabs.d.ts +33 -0
- package/dist/hooks/use-tabs.js +55 -0
- package/dist/index.js +13 -8
- package/dist/translations/en/topBarEn.d.ts +1 -0
- package/dist/translations/en/topBarEn.js +2 -1
- package/dist/translations/fr/topBarFr.d.ts +1 -0
- package/dist/translations/fr/topBarFr.js +1 -0
- package/package.json +1 -1
- package/dist/features/network-modifications/hooks/index.d.ts +0 -7
- package/dist/features/network-modifications/hooks/index.js +0 -4
- package/dist/features/network-modifications/hooks/useTabsWithError.d.ts +0 -15
- package/dist/features/network-modifications/hooks/useTabsWithError.js +0 -28
- package/dist/features/parameters/common/hook/use-tabs.d.ts +0 -16
- package/dist/features/parameters/common/hook/use-tabs.js +0 -65
|
@@ -9,6 +9,7 @@ import "localized-countries";
|
|
|
9
9
|
import "localized-countries/data/fr";
|
|
10
10
|
import "localized-countries/data/en";
|
|
11
11
|
import { useSnackMessage } from "../../../../../hooks/useSnackMessage.js";
|
|
12
|
+
import "react-hook-form";
|
|
12
13
|
import { FilterDataTypes, FilterTextComparators } from "../../custom-aggrid-types.js";
|
|
13
14
|
import { countDecimalPlacesFromString } from "../../../../../utils/rounding.js";
|
|
14
15
|
import { computeTolerance } from "../utils/filter-tolerance-utils.js";
|
|
@@ -10,6 +10,7 @@ import "localized-countries";
|
|
|
10
10
|
import "localized-countries/data/fr";
|
|
11
11
|
import "localized-countries/data/en";
|
|
12
12
|
import { useSnackMessage } from "../../../../hooks/useSnackMessage.js";
|
|
13
|
+
import "react-hook-form";
|
|
13
14
|
import { SortWay } from "../custom-aggrid-types.js";
|
|
14
15
|
import { useCustomAggridSortContext } from "../context/custom-aggrid-context.js";
|
|
15
16
|
const useCustomAggridSort = (colId, sortParams, api) => {
|
|
@@ -11,6 +11,7 @@ import "localized-countries/data/fr";
|
|
|
11
11
|
import "localized-countries/data/en";
|
|
12
12
|
import "notistack";
|
|
13
13
|
import { useSelectAppearance } from "../../../hooks/useSelectAppearance.js";
|
|
14
|
+
import "react-hook-form";
|
|
14
15
|
function OperatorSelector(props) {
|
|
15
16
|
const { options } = props;
|
|
16
17
|
const selectAppearance = useSelectAppearance(options?.length || 0);
|
|
@@ -16,6 +16,7 @@ import "localized-countries";
|
|
|
16
16
|
import "localized-countries/data/fr";
|
|
17
17
|
import "localized-countries/data/en";
|
|
18
18
|
import "notistack";
|
|
19
|
+
import "react-hook-form";
|
|
19
20
|
import { FilterTextComparators, FilterDataTypes, TableType } from "../../../customAGGrid/custom-aggrid-types.js";
|
|
20
21
|
import "mathjs";
|
|
21
22
|
import { CustomAggridComparatorFilter } from "../../../customAGGrid/custom-aggrid-filters/custom-aggrid-comparator-filter.js";
|
|
@@ -23,7 +24,6 @@ import { makeAgGridCustomHeaderColumn } from "../../../customAGGrid/utils/custom
|
|
|
23
24
|
import { AGGRID_LOCALES } from "../../../../../translations/not-intl/aggrid-locales.js";
|
|
24
25
|
import { useStableComputedArray } from "../../../../../hooks/use-stable-computed-array.js";
|
|
25
26
|
import "../../../../ui/overflowableText/OverflowableText.js";
|
|
26
|
-
import "react-hook-form";
|
|
27
27
|
import "../../../../ui/reactHookForm/provider/CustomFormProvider.js";
|
|
28
28
|
import "yup";
|
|
29
29
|
import "../../../../ui/treeViewFinder/TreeViewFinder.js";
|
|
@@ -15,6 +15,7 @@ import "localized-countries";
|
|
|
15
15
|
import "localized-countries/data/fr";
|
|
16
16
|
import "localized-countries/data/en";
|
|
17
17
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
18
|
+
import "react-hook-form";
|
|
18
19
|
import { getExpansionPathsForSelected, fetchChildrenForExpandedNodes, initializeFromLastSelected, saveLastSelectedDirectoryFromNode } from "./utils.js";
|
|
19
20
|
const styles = {
|
|
20
21
|
icon: (theme) => ({
|
package/dist/features/index.js
CHANGED
|
@@ -44,9 +44,8 @@ import { LimitReductionTableRow } from "./parameters/common/limitreductions/limi
|
|
|
44
44
|
import { LimitReductionTableCell } from "./parameters/common/limitreductions/limit-reduction-table-cell.js";
|
|
45
45
|
import { ContingencyTable } from "./parameters/common/contingency-table/contingency-table.js";
|
|
46
46
|
import { COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS, getContingencyListsInfosFormSchema, isValidContingencyRow, toFormValuesContingencyListsInfos } from "./parameters/common/contingency-table/columns-definitions.js";
|
|
47
|
-
import { useTabs } from "./parameters/common/hook/use-tabs.js";
|
|
48
47
|
import { useParametersForm } from "./parameters/common/hook/use-parameters-form.js";
|
|
49
|
-
import { CENTER_LABEL, COMPONENT_LIBRARY, CUSTOM_REAL_TIME_STATE_ESTIMATION, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OPTIONS, INTL_SUBSTATION_LAYOUT_OPTIONS, LINE_FLOW_MODE, LineFlowMode, MAP_BASE_MAP, MAP_MANUAL_REFRESH, NAD_POSITIONS_GENERATION_MODE, NAD_POSITIONS_GENERATION_MODE_LABEL, NetworkVisualizationTabValues, PARAM_CENTER_LABEL, PARAM_COMPONENT_LIBRARY, PARAM_DIAGONAL_LABEL, PARAM_LINE_FLOW_MODE, PARAM_LINE_FULL_PATH, PARAM_LINE_PARALLEL_PATH, PARAM_MAP_BASEMAP, PARAM_MAP_MANUAL_REFRESH, PARAM_NAD_POSITIONS_GENERATION_MODE, PARAM_STATE_ESTIMATION, PARAM_SUBSTATION_LAYOUT, SUBSTATION_LAYOUT } from "./parameters/network-visualizations/constants.js";
|
|
48
|
+
import { CENTER_LABEL, COMPONENT_LIBRARY, CUSTOM_REAL_TIME_STATE_ESTIMATION, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OPTIONS, INTL_SUBSTATION_LAYOUT_OPTIONS, LINE_FLOW_MODE, LineFlowMode, MAP_BASE_MAP, MAP_MANUAL_REFRESH, NAD_POSITIONS_GENERATION_MODE, NAD_POSITIONS_GENERATION_MODE_LABEL, NV_TAB_VALUES, NetworkVisualizationTabValues, PARAM_CENTER_LABEL, PARAM_COMPONENT_LIBRARY, PARAM_DIAGONAL_LABEL, PARAM_LINE_FLOW_MODE, PARAM_LINE_FULL_PATH, PARAM_LINE_PARALLEL_PATH, PARAM_MAP_BASEMAP, PARAM_MAP_MANUAL_REFRESH, PARAM_NAD_POSITIONS_GENERATION_MODE, PARAM_STATE_ESTIMATION, PARAM_SUBSTATION_LAYOUT, SUBSTATION_LAYOUT } from "./parameters/network-visualizations/constants.js";
|
|
50
49
|
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_ETALAB, MAP_BASEMAP_MAPBOX, NadPositionsGenerationMode, SubstationLayout } from "./parameters/network-visualizations/network-visualizations.types.js";
|
|
51
50
|
import { NetworkVisualizationParametersInline } from "./parameters/network-visualizations/network-visualizations-parameters-inline.js";
|
|
52
51
|
import { NetworkVisualizationsParametersEditionDialog } from "./parameters/network-visualizations/network-visualizations-parameters-dialog.js";
|
|
@@ -56,7 +55,7 @@ import { LoadFlowParametersEditionDialog } from "./parameters/loadflow/load-flow
|
|
|
56
55
|
import { InitialVoltage, NODE_CLUSTER, NODE_CLUSTER_FILTER_IDS, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER, SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, STARTED_GENERATORS_IN_CALCULATION_CLUSTER_THRESHOLD, STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER_THRESHOLD, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./parameters/short-circuit/constants.js";
|
|
57
56
|
import { ShortCircuitParametersInLine } from "./parameters/short-circuit/short-circuit-parameters-inline.js";
|
|
58
57
|
import { ShortCircuitParametersEditionDialog } from "./parameters/short-circuit/short-circuit-parameters-dialog.js";
|
|
59
|
-
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./parameters/voltage-init/constants.js";
|
|
58
|
+
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_INIT_TAB_VALUES, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./parameters/voltage-init/constants.js";
|
|
60
59
|
import { EquipmentsSelectionType } from "./parameters/voltage-init/voltage-init.type.js";
|
|
61
60
|
import { VoltageInitParametersEditionDialog } from "./parameters/voltage-init/voltage-init-parameters-dialog.js";
|
|
62
61
|
import { VoltageInitParametersInLine } from "./parameters/voltage-init/voltage-init-parameters-inline.js";
|
|
@@ -64,10 +63,10 @@ import { PccMinParametersInLine } from "./parameters/pcc-min/pcc-min-parameters-
|
|
|
64
63
|
import { PccMinParametersEditionDialog } from "./parameters/pcc-min/pcc-min-parameters-dialog.js";
|
|
65
64
|
import { SecurityAnalysisParametersInline } from "./parameters/security-analysis/security-analysis-parameters-inline.js";
|
|
66
65
|
import { SecurityAnalysisParametersDialog } from "./parameters/security-analysis/security-analysis-parameters-dialog.js";
|
|
67
|
-
import { FLOW_PROPORTIONAL_THRESHOLD, HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, LOW_VOLTAGE_ABSOLUTE_THRESHOLD, LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, TabValues } from "./parameters/security-analysis/constants.js";
|
|
66
|
+
import { FLOW_PROPORTIONAL_THRESHOLD, HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, LOW_VOLTAGE_ABSOLUTE_THRESHOLD, LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, TAB_VALUES, TabValues } from "./parameters/security-analysis/constants.js";
|
|
68
67
|
import { SensitivityAnalysisParametersInline } from "./parameters/sensi/sensitivity-analysis-parameters-inline.js";
|
|
69
68
|
import { SensitivityAnalysisParametersDialog } from "./parameters/sensi/sensitivity-analysis-parameters-dialog.js";
|
|
70
|
-
import { COLUMNS_DEFINITIONS_HVDCS, COLUMNS_DEFINITIONS_INJECTIONS, COLUMNS_DEFINITIONS_INJECTIONS_SET, COLUMNS_DEFINITIONS_NODES, COLUMNS_DEFINITIONS_PSTS, EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES, HVDC_EQUIPMENT_TYPES, INJECTIONS_EQUIPMENT_TYPES, INJECTION_DISTRIBUTION_TYPES, MONITORED_BRANCHES_EQUIPMENT_TYPES, MONITORED_VOLTAGE_LEVELS_EQUIPMENT_TYPES, PSTS_EQUIPMENT_TYPES, SENSITIVITY_TYPES, SensiBranchesTabValues, SensiTabValues } from "./parameters/sensi/columns-definitions.js";
|
|
69
|
+
import { COLUMNS_DEFINITIONS_HVDCS, COLUMNS_DEFINITIONS_INJECTIONS, COLUMNS_DEFINITIONS_INJECTIONS_SET, COLUMNS_DEFINITIONS_NODES, COLUMNS_DEFINITIONS_PSTS, EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES, HVDC_EQUIPMENT_TYPES, INJECTIONS_EQUIPMENT_TYPES, INJECTION_DISTRIBUTION_TYPES, MONITORED_BRANCHES_EQUIPMENT_TYPES, MONITORED_VOLTAGE_LEVELS_EQUIPMENT_TYPES, PSTS_EQUIPMENT_TYPES, SENSITIVITY_TYPES, SENSI_BRANCHES_TAB_FIELDS, SENSI_TAB_FIELDS, SensiBranchesTabValues, SensiTabValues } from "./parameters/sensi/columns-definitions.js";
|
|
71
70
|
import { DynamicSimulationInline } from "./parameters/dynamic-simulation/dynamic-simulation-inline.js";
|
|
72
71
|
import { CONTINGENCIES_LIST_INFOS, CONTINGENCIES_START_TIME, SCENARIO_DURATION } from "./parameters/dynamic-security-analysis/constants.js";
|
|
73
72
|
import { DynamicSecurityAnalysisInline } from "./parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js";
|
|
@@ -123,7 +122,6 @@ import { useHvdcLccDeletion } from "./network-modifications/equipmentDeletion/hv
|
|
|
123
122
|
import { HvdcLccDeletionSpecificForm } from "./network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js";
|
|
124
123
|
import { equipmentDeletionDtoToForm, equipmentDeletionEmptyFormData, equipmentDeletionFormSchema, equipmentDeletionFormToDto, newEquipmentDeletionDto } from "./network-modifications/equipmentDeletion/equipmentDeletion.utils.js";
|
|
125
124
|
import { EquipmentDeletionForm } from "./network-modifications/equipmentDeletion/EquipmentDeletionForm.js";
|
|
126
|
-
import { useTabsWithError } from "./network-modifications/hooks/useTabsWithError.js";
|
|
127
125
|
import { SubstationCreationForm } from "./network-modifications/substation/creation/SubstationCreationForm.js";
|
|
128
126
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./network-modifications/substation/creation/substationCreation.utils.js";
|
|
129
127
|
import { SubstationModificationForm } from "./network-modifications/substation/modification/SubstationModificationForm.js";
|
|
@@ -162,7 +160,7 @@ import "../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
|
162
160
|
import "mui-nested-menu";
|
|
163
161
|
import "react-resizable-panels";
|
|
164
162
|
import "react-papaparse";
|
|
165
|
-
import { MAX_SECTIONS_COUNT } from "./network-modifications/voltageLevel/creation/voltageLevel.constants.js";
|
|
163
|
+
import { MAX_SECTIONS_COUNT, VOLTAGE_LEVEL_TAB_FIELDS, VoltageLevelTab } from "./network-modifications/voltageLevel/creation/voltageLevel.constants.js";
|
|
166
164
|
import { VoltageLevelCreationForm } from "./network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js";
|
|
167
165
|
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js";
|
|
168
166
|
import { SwitchKind } from "./network-modifications/voltageLevel/creation/voltageLevelCreation.types.js";
|
|
@@ -532,6 +530,7 @@ export {
|
|
|
532
530
|
NAD_POSITIONS_GENERATION_MODE_LABEL,
|
|
533
531
|
NODE_CLUSTER,
|
|
534
532
|
NODE_CLUSTER_FILTER_IDS,
|
|
533
|
+
NV_TAB_VALUES,
|
|
535
534
|
NadPositionsGenerationMode,
|
|
536
535
|
NameCell,
|
|
537
536
|
NameCellRenderer,
|
|
@@ -620,6 +619,8 @@ export {
|
|
|
620
619
|
SCProcessConfigEditionDialog,
|
|
621
620
|
SELECTION_TYPE,
|
|
622
621
|
SENSITIVITY_TYPES,
|
|
622
|
+
SENSI_BRANCHES_TAB_FIELDS,
|
|
623
|
+
SENSI_TAB_FIELDS,
|
|
623
624
|
SHORTCIRCUIT_ANALYSIS_RESULT_SORT_STORE,
|
|
624
625
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
625
626
|
SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
|
|
@@ -695,6 +696,7 @@ export {
|
|
|
695
696
|
TABULAR_MODIFICATION_FIELDS,
|
|
696
697
|
TABULAR_MODIFICATION_TYPES,
|
|
697
698
|
TABULAR_NUMBER,
|
|
699
|
+
TAB_VALUES,
|
|
698
700
|
TEMPORARY_LIMIT_MODIFICATION_TYPE,
|
|
699
701
|
TOPOLOGY_MODIFICATION_TABLE,
|
|
700
702
|
TRANSFORMERS_SELECTION_TYPE,
|
|
@@ -730,8 +732,10 @@ export {
|
|
|
730
732
|
VARIATION,
|
|
731
733
|
VERSION_PARAMETER,
|
|
732
734
|
VOLTAGE_INIT_MODE,
|
|
735
|
+
VOLTAGE_INIT_TAB_VALUES,
|
|
733
736
|
VOLTAGE_LEVEL,
|
|
734
737
|
VOLTAGE_LEVELS_FORM,
|
|
738
|
+
VOLTAGE_LEVEL_TAB_FIELDS,
|
|
735
739
|
VOLTAGE_LIMITS_DEFAULT,
|
|
736
740
|
VOLTAGE_LIMITS_MODIFICATION,
|
|
737
741
|
VOLTAGE_REGULATION_MODES,
|
|
@@ -742,6 +746,7 @@ export {
|
|
|
742
746
|
VoltageLevelCreationForm,
|
|
743
747
|
VoltageLevelModificationForm,
|
|
744
748
|
VoltageLevelSectionCreationForm,
|
|
749
|
+
VoltageLevelTab,
|
|
745
750
|
VoltageLevelTopologyModificationForm,
|
|
746
751
|
VoltageRegulationForm,
|
|
747
752
|
WRITE_SLACK_BUS,
|
|
@@ -1118,8 +1123,6 @@ export {
|
|
|
1118
1123
|
useNotificationsListener,
|
|
1119
1124
|
useParameterLayoutContext,
|
|
1120
1125
|
useParametersForm,
|
|
1121
|
-
useTabs,
|
|
1122
|
-
useTabsWithError,
|
|
1123
1126
|
voltageLevelCreationDtoToForm,
|
|
1124
1127
|
voltageLevelCreationEmptyFormData,
|
|
1125
1128
|
voltageLevelCreationFormSchema,
|
|
@@ -17,6 +17,7 @@ import "localized-countries";
|
|
|
17
17
|
import "localized-countries/data/fr";
|
|
18
18
|
import "localized-countries/data/en";
|
|
19
19
|
import "notistack";
|
|
20
|
+
import "react-hook-form";
|
|
20
21
|
import { ModificationRow } from "./row/modification-row.js";
|
|
21
22
|
function NetworkModificationsTable({
|
|
22
23
|
modifications,
|
|
@@ -12,8 +12,8 @@ import "localized-countries";
|
|
|
12
12
|
import "localized-countries/data/fr";
|
|
13
13
|
import "localized-countries/data/en";
|
|
14
14
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
15
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
16
15
|
import "react-hook-form";
|
|
16
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
17
17
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
18
18
|
import "yup";
|
|
19
19
|
import { CustomTooltip } from "../../../components/ui/tooltip/CustomTooltip.js";
|
|
@@ -13,6 +13,7 @@ import "localized-countries";
|
|
|
13
13
|
import "localized-countries/data/fr";
|
|
14
14
|
import "localized-countries/data/en";
|
|
15
15
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
16
|
+
import "react-hook-form";
|
|
16
17
|
function getUpdatedExcludedModifications(prev, rootNetworkUuid, modificationUuid) {
|
|
17
18
|
const exists = prev.some((item) => item.rootNetworkUuid === rootNetworkUuid);
|
|
18
19
|
if (exists) {
|
|
@@ -11,6 +11,7 @@ import "localized-countries";
|
|
|
11
11
|
import "localized-countries/data/fr";
|
|
12
12
|
import "localized-countries/data/en";
|
|
13
13
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
14
|
+
import "react-hook-form";
|
|
14
15
|
function SwitchCell(props) {
|
|
15
16
|
const { data, studyUuid, currentNodeId, isDisabled = false } = props;
|
|
16
17
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -12,6 +12,7 @@ import "localized-countries";
|
|
|
12
12
|
import "localized-countries/data/fr";
|
|
13
13
|
import "localized-countries/data/en";
|
|
14
14
|
import "notistack";
|
|
15
|
+
import "react-hook-form";
|
|
15
16
|
function DragCloneRow({ row }) {
|
|
16
17
|
const intl = useIntl();
|
|
17
18
|
const { computeLabel } = useModificationLabelComputer();
|
|
@@ -18,6 +18,7 @@ import "localized-countries";
|
|
|
18
18
|
import "localized-countries/data/fr";
|
|
19
19
|
import "localized-countries/data/en";
|
|
20
20
|
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
21
|
+
import "react-hook-form";
|
|
21
22
|
const clearRowDragIndicators = (container) => {
|
|
22
23
|
const rowElements = container?.querySelectorAll("[data-row-id]");
|
|
23
24
|
rowElements?.forEach((rowElement) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
2
|
interface BatteryDialogTabsProps {
|
|
3
3
|
tabIndex: number;
|
|
4
4
|
tabIndexesWithError: number[];
|
|
5
|
-
|
|
5
|
+
onTabChange: (event: SyntheticEvent<Element, Event>, newValue: number) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function BatteryDialogTabs({ tabIndex, tabIndexesWithError,
|
|
7
|
+
export declare function BatteryDialogTabs({ tabIndex, tabIndexesWithError, onTabChange }: Readonly<BatteryDialogTabsProps>): import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -3,13 +3,13 @@ import { Tabs, Tab } from "@mui/material";
|
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { BatteryDialogTab } from "./batteryTabs.utils.js";
|
|
5
5
|
import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameters-style.js";
|
|
6
|
-
function BatteryDialogTabs({ tabIndex, tabIndexesWithError,
|
|
6
|
+
function BatteryDialogTabs({ tabIndex, tabIndexesWithError, onTabChange }) {
|
|
7
7
|
return /* @__PURE__ */ jsxs(
|
|
8
8
|
Tabs,
|
|
9
9
|
{
|
|
10
10
|
value: tabIndex,
|
|
11
11
|
variant: "scrollable",
|
|
12
|
-
onChange:
|
|
12
|
+
onChange: onTabChange,
|
|
13
13
|
slotProps: {
|
|
14
14
|
indicator: {
|
|
15
15
|
sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
|
package/dist/features/network-modifications/battery/modification/BatteryModificationForm.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { BatteryDialogHeaderProps } from './BatteryDialogHeader';
|
|
2
2
|
import { BatteryDialogTabsContentProps } from './BatteryDialogTabsContent';
|
|
3
|
+
import { BatteryDialogTab } from './batteryTabs.utils';
|
|
3
4
|
import { EquipmentType, Identifiable } from '../../../../utils';
|
|
5
|
+
import { UseTabsReturn } from '../../../../hooks';
|
|
4
6
|
interface BatteryModificationFormProps extends BatteryDialogHeaderProps, Omit<BatteryDialogTabsContentProps, 'tabIndex'> {
|
|
5
7
|
fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
|
|
6
8
|
type: EquipmentType;
|
|
7
9
|
})[]>;
|
|
10
|
+
useTabsReturn: UseTabsReturn<BatteryDialogTab>;
|
|
8
11
|
}
|
|
9
|
-
export declare function BatteryModificationForm({ batteryToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, }: Readonly<BatteryModificationFormProps>): import("react").JSX.Element;
|
|
12
|
+
export declare function BatteryModificationForm({ batteryToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, useTabsReturn, }: Readonly<BatteryModificationFormProps>): import("react").JSX.Element;
|
|
10
13
|
export {};
|
|
@@ -4,39 +4,35 @@ import { useWatch } from "react-hook-form";
|
|
|
4
4
|
import { BatteryDialogHeader } from "./BatteryDialogHeader.js";
|
|
5
5
|
import { BatteryDialogTabs } from "./BatteryDialogTabs.js";
|
|
6
6
|
import { BatteryDialogTabsContent } from "./BatteryDialogTabsContent.js";
|
|
7
|
-
import { BatteryDialogTab, BATTERY_TAB_FIELDS } from "./batteryTabs.utils.js";
|
|
8
7
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
9
8
|
import "../../../../utils/conversionUtils.js";
|
|
10
9
|
import "../../../../utils/types/equipmentType.js";
|
|
11
10
|
import "@mui/icons-material";
|
|
12
|
-
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
13
11
|
function BatteryModificationForm({
|
|
14
12
|
batteryToModify,
|
|
15
13
|
updatePreviousReactiveCapabilityCurveTable,
|
|
16
14
|
voltageLevelOptions,
|
|
17
15
|
fetchBusesOrBusbarSections,
|
|
18
16
|
PositionDiagramPane,
|
|
19
|
-
fetchVoltageLevelEquipments
|
|
17
|
+
fetchVoltageLevelEquipments,
|
|
18
|
+
useTabsReturn
|
|
20
19
|
}) {
|
|
21
|
-
const {
|
|
22
|
-
BATTERY_TAB_FIELDS,
|
|
23
|
-
BatteryDialogTab.CONNECTIVITY_TAB
|
|
24
|
-
);
|
|
20
|
+
const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
|
|
25
21
|
const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
|
|
26
22
|
return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
|
|
27
23
|
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(BatteryDialogHeader, { batteryToModify, equipmentId }) }),
|
|
28
24
|
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
29
25
|
BatteryDialogTabs,
|
|
30
26
|
{
|
|
31
|
-
tabIndex,
|
|
32
|
-
tabIndexesWithError,
|
|
33
|
-
|
|
27
|
+
tabIndex: selectedTab,
|
|
28
|
+
tabIndexesWithError: tabsWithError,
|
|
29
|
+
onTabChange
|
|
34
30
|
}
|
|
35
31
|
) }),
|
|
36
32
|
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
37
33
|
BatteryDialogTabsContent,
|
|
38
34
|
{
|
|
39
|
-
tabIndex,
|
|
35
|
+
tabIndex: selectedTab,
|
|
40
36
|
batteryToModify,
|
|
41
37
|
voltageLevelOptions,
|
|
42
38
|
fetchBusesOrBusbarSections,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
2
|
interface GeneratorDialogTabsProps {
|
|
3
3
|
tabIndex: number;
|
|
4
4
|
tabIndexesWithError: number[];
|
|
5
|
-
|
|
5
|
+
onTabChange: (event: SyntheticEvent<Element, Event>, newValue: number) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function GeneratorDialogTabs({ tabIndex, tabIndexesWithError,
|
|
7
|
+
export declare function GeneratorDialogTabs({ tabIndex, tabIndexesWithError, onTabChange, }: Readonly<GeneratorDialogTabsProps>): import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -6,14 +6,14 @@ import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameter
|
|
|
6
6
|
function GeneratorDialogTabs({
|
|
7
7
|
tabIndex,
|
|
8
8
|
tabIndexesWithError,
|
|
9
|
-
|
|
9
|
+
onTabChange
|
|
10
10
|
}) {
|
|
11
11
|
return /* @__PURE__ */ jsxs(
|
|
12
12
|
Tabs,
|
|
13
13
|
{
|
|
14
14
|
value: tabIndex,
|
|
15
15
|
variant: "scrollable",
|
|
16
|
-
onChange:
|
|
16
|
+
onChange: onTabChange,
|
|
17
17
|
slotProps: {
|
|
18
18
|
indicator: {
|
|
19
19
|
sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
|
package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { GeneratorDialogTab } from './generatorTabs.utils';
|
|
1
2
|
import { GeneratorDialogHeaderProps } from './GeneratorDialogHeader';
|
|
2
3
|
import { GeneratorDialogTabsContentProps } from './GeneratorDialogTabsContent';
|
|
3
4
|
import { EquipmentType, Identifiable } from '../../../../utils';
|
|
5
|
+
import { UseTabsReturn } from '../../../../hooks';
|
|
4
6
|
interface GeneratorModificationFormProps extends GeneratorDialogHeaderProps, Omit<GeneratorDialogTabsContentProps, 'tabIndex'> {
|
|
5
7
|
fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
|
|
6
8
|
type: EquipmentType;
|
|
7
9
|
})[]>;
|
|
10
|
+
useTabsReturn: UseTabsReturn<GeneratorDialogTab>;
|
|
8
11
|
}
|
|
9
|
-
export declare function GeneratorModificationForm({ generatorToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, }: Readonly<GeneratorModificationFormProps>): import("react").JSX.Element;
|
|
12
|
+
export declare function GeneratorModificationForm({ generatorToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, useTabsReturn, }: Readonly<GeneratorModificationFormProps>): import("react").JSX.Element;
|
|
10
13
|
export {};
|
package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Stack, Grid } from "@mui/material";
|
|
3
3
|
import { useWatch } from "react-hook-form";
|
|
4
|
-
import { GeneratorDialogTab, GENERATOR_TAB_FIELDS } from "./generatorTabs.utils.js";
|
|
5
4
|
import { GeneratorDialogHeader } from "./GeneratorDialogHeader.js";
|
|
6
5
|
import { GeneratorDialogTabs } from "./GeneratorDialogTabs.js";
|
|
7
6
|
import { GeneratorDialogTabsContent } from "./GeneratorDialogTabsContent.js";
|
|
@@ -9,19 +8,16 @@ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
|
9
8
|
import "../../../../utils/conversionUtils.js";
|
|
10
9
|
import "../../../../utils/types/equipmentType.js";
|
|
11
10
|
import "@mui/icons-material";
|
|
12
|
-
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
13
11
|
function GeneratorModificationForm({
|
|
14
12
|
generatorToModify,
|
|
15
13
|
updatePreviousReactiveCapabilityCurveTable,
|
|
16
14
|
voltageLevelOptions,
|
|
17
15
|
fetchBusesOrBusbarSections,
|
|
18
16
|
PositionDiagramPane,
|
|
19
|
-
fetchVoltageLevelEquipments
|
|
17
|
+
fetchVoltageLevelEquipments,
|
|
18
|
+
useTabsReturn
|
|
20
19
|
}) {
|
|
21
|
-
const { tabIndex,
|
|
22
|
-
GENERATOR_TAB_FIELDS,
|
|
23
|
-
GeneratorDialogTab.CONNECTIVITY_TAB
|
|
24
|
-
);
|
|
20
|
+
const { selectedTab: tabIndex, tabsWithError: tabIndexesWithError, onTabChange } = useTabsReturn;
|
|
25
21
|
const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
|
|
26
22
|
return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
|
|
27
23
|
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(GeneratorDialogHeader, { generatorToModify, equipmentId }) }),
|
|
@@ -30,7 +26,7 @@ function GeneratorModificationForm({
|
|
|
30
26
|
{
|
|
31
27
|
tabIndex,
|
|
32
28
|
tabIndexesWithError,
|
|
33
|
-
|
|
29
|
+
onTabChange
|
|
34
30
|
}
|
|
35
31
|
) }),
|
|
36
32
|
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
@@ -47,7 +47,6 @@ import { useHvdcLccDeletion } from "./equipmentDeletion/hvdcLccDeletion/useHvdcL
|
|
|
47
47
|
import { HvdcLccDeletionSpecificForm } from "./equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js";
|
|
48
48
|
import { equipmentDeletionDtoToForm, equipmentDeletionEmptyFormData, equipmentDeletionFormSchema, equipmentDeletionFormToDto, newEquipmentDeletionDto } from "./equipmentDeletion/equipmentDeletion.utils.js";
|
|
49
49
|
import { EquipmentDeletionForm } from "./equipmentDeletion/EquipmentDeletionForm.js";
|
|
50
|
-
import { useTabsWithError } from "./hooks/useTabsWithError.js";
|
|
51
50
|
import { SubstationCreationForm } from "./substation/creation/SubstationCreationForm.js";
|
|
52
51
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./substation/creation/substationCreation.utils.js";
|
|
53
52
|
import { SubstationModificationForm } from "./substation/modification/SubstationModificationForm.js";
|
|
@@ -86,7 +85,7 @@ import "../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
|
86
85
|
import "mui-nested-menu";
|
|
87
86
|
import "react-resizable-panels";
|
|
88
87
|
import "react-papaparse";
|
|
89
|
-
import { MAX_SECTIONS_COUNT } from "./voltageLevel/creation/voltageLevel.constants.js";
|
|
88
|
+
import { MAX_SECTIONS_COUNT, VOLTAGE_LEVEL_TAB_FIELDS, VoltageLevelTab } from "./voltageLevel/creation/voltageLevel.constants.js";
|
|
90
89
|
import { VoltageLevelCreationForm } from "./voltageLevel/creation/VoltageLevelCreationForm.js";
|
|
91
90
|
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevel/creation/voltageLevelCreation.utils.js";
|
|
92
91
|
import { SwitchKind } from "./voltageLevel/creation/voltageLevelCreation.types.js";
|
|
@@ -341,11 +340,13 @@ export {
|
|
|
341
340
|
TwoWindingsTransformerDialogTabs,
|
|
342
341
|
TwoWindingsTransformerDialogTabsContent,
|
|
343
342
|
TwoWindingsTransformerForm,
|
|
343
|
+
VOLTAGE_LEVEL_TAB_FIELDS,
|
|
344
344
|
VOLTAGE_REGULATION_MODES,
|
|
345
345
|
VoltageLevelConnectivityForm,
|
|
346
346
|
VoltageLevelCreationForm,
|
|
347
347
|
VoltageLevelModificationForm,
|
|
348
348
|
VoltageLevelSectionCreationForm,
|
|
349
|
+
VoltageLevelTab,
|
|
349
350
|
VoltageLevelTopologyModificationForm,
|
|
350
351
|
VoltageRegulationForm,
|
|
351
352
|
addModificationTypeToOpLimitsGroups,
|
|
@@ -636,7 +637,6 @@ export {
|
|
|
636
637
|
twoWindingsTransformerModificationFormSchema,
|
|
637
638
|
twoWindingsTransformerModificationFormToDto,
|
|
638
639
|
useHvdcLccDeletion,
|
|
639
|
-
useTabsWithError,
|
|
640
640
|
voltageLevelCreationDtoToForm,
|
|
641
641
|
voltageLevelCreationEmptyFormData,
|
|
642
642
|
voltageLevelCreationFormSchema,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
2
|
import { LineDialogOptions } from './line.utils';
|
|
3
3
|
interface LineDialogTabsProps extends LineDialogOptions {
|
|
4
4
|
tabIndex: number;
|
|
5
5
|
tabIndexesWithError: number[];
|
|
6
|
-
|
|
6
|
+
onTabChange: (event: SyntheticEvent<Element, Event>, newValue: number) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function LineDialogTabs({ tabIndex, tabIndexesWithError,
|
|
8
|
+
export declare function LineDialogTabs({ tabIndex, tabIndexesWithError, onTabChange, isModification, withConnectivity, }: Readonly<LineDialogTabsProps>): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -6,7 +6,7 @@ import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameter
|
|
|
6
6
|
function LineDialogTabs({
|
|
7
7
|
tabIndex,
|
|
8
8
|
tabIndexesWithError,
|
|
9
|
-
|
|
9
|
+
onTabChange,
|
|
10
10
|
isModification = false,
|
|
11
11
|
withConnectivity = true
|
|
12
12
|
}) {
|
|
@@ -15,7 +15,7 @@ function LineDialogTabs({
|
|
|
15
15
|
{
|
|
16
16
|
value: tabIndex,
|
|
17
17
|
variant: "scrollable",
|
|
18
|
-
onChange:
|
|
18
|
+
onChange: onTabChange,
|
|
19
19
|
slotProps: {
|
|
20
20
|
indicator: { sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex) }
|
|
21
21
|
},
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { LineDialogTab } from './line.utils';
|
|
1
2
|
import { LineDialogHeaderProps } from './LineDialogHeader';
|
|
2
3
|
import { LineDialogTabsContentProps } from './LineDialogTabsContent';
|
|
4
|
+
import { UseTabsReturn } from '../../../../hooks';
|
|
3
5
|
interface LineFormProps extends LineDialogHeaderProps, Omit<LineDialogTabsContentProps, 'tabIndex' | 'isModification' | 'lineToModify'> {
|
|
6
|
+
useTabsReturn: UseTabsReturn<LineDialogTab>;
|
|
4
7
|
}
|
|
5
|
-
export declare function LineForm({ lineToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, isModification, withConnectivity, }: Readonly<LineFormProps>): import("react").JSX.Element;
|
|
8
|
+
export declare function LineForm({ lineToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, isModification, withConnectivity, useTabsReturn, }: Readonly<LineFormProps>): import("react").JSX.Element;
|
|
6
9
|
export {};
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Stack, Box } from "@mui/material";
|
|
3
|
-
import { LineDialogTab, LINE_TAB_FIELDS } from "./line.utils.js";
|
|
4
3
|
import { LineDialogHeader } from "./LineDialogHeader.js";
|
|
5
4
|
import { LineDialogTabs } from "./LineDialogTabs.js";
|
|
6
5
|
import { LineDialogTabsContent } from "./LineDialogTabsContent.js";
|
|
7
|
-
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
8
6
|
function LineForm({
|
|
9
7
|
lineToModify,
|
|
10
8
|
voltageLevelOptions,
|
|
11
9
|
fetchBusesOrBusbarSections,
|
|
12
10
|
PositionDiagramPane,
|
|
13
11
|
isModification = false,
|
|
14
|
-
withConnectivity = true
|
|
12
|
+
withConnectivity = true,
|
|
13
|
+
useTabsReturn
|
|
15
14
|
}) {
|
|
16
|
-
const {
|
|
17
|
-
LINE_TAB_FIELDS,
|
|
18
|
-
withConnectivity ? LineDialogTab.CONNECTIVITY_TAB : LineDialogTab.CHARACTERISTICS_TAB
|
|
19
|
-
);
|
|
15
|
+
const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
|
|
20
16
|
return /* @__PURE__ */ jsxs(Stack, { spacing: 2, height: "100%", children: [
|
|
21
17
|
/* @__PURE__ */ jsx(LineDialogHeader, { lineToModify, isModification }),
|
|
22
18
|
/* @__PURE__ */ jsx(
|
|
23
19
|
LineDialogTabs,
|
|
24
20
|
{
|
|
25
|
-
tabIndex,
|
|
26
|
-
tabIndexesWithError,
|
|
27
|
-
|
|
21
|
+
tabIndex: selectedTab,
|
|
22
|
+
tabIndexesWithError: tabsWithError,
|
|
23
|
+
onTabChange,
|
|
28
24
|
isModification,
|
|
29
25
|
withConnectivity
|
|
30
26
|
}
|
|
@@ -32,7 +28,7 @@ function LineForm({
|
|
|
32
28
|
/* @__PURE__ */ jsx(Box, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden", paddingRight: 3 }, children: /* @__PURE__ */ jsx(
|
|
33
29
|
LineDialogTabsContent,
|
|
34
30
|
{
|
|
35
|
-
tabIndex,
|
|
31
|
+
tabIndex: selectedTab,
|
|
36
32
|
lineToModify,
|
|
37
33
|
voltageLevelOptions,
|
|
38
34
|
fetchBusesOrBusbarSections,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
2
|
interface LoadDialogTabsProps {
|
|
3
3
|
tabIndex: number;
|
|
4
4
|
tabIndexesWithError: number[];
|
|
5
|
-
|
|
5
|
+
onTabChange: (event: SyntheticEvent<Element, Event>, newValue: number) => void;
|
|
6
6
|
isModification?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare function LoadDialogTabs({ tabIndex, tabIndexesWithError,
|
|
8
|
+
export declare function LoadDialogTabs({ tabIndex, tabIndexesWithError, onTabChange, isModification, }: Readonly<LoadDialogTabsProps>): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -6,7 +6,7 @@ import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameter
|
|
|
6
6
|
function LoadDialogTabs({
|
|
7
7
|
tabIndex,
|
|
8
8
|
tabIndexesWithError,
|
|
9
|
-
|
|
9
|
+
onTabChange,
|
|
10
10
|
isModification = false
|
|
11
11
|
}) {
|
|
12
12
|
return /* @__PURE__ */ jsxs(
|
|
@@ -14,7 +14,7 @@ function LoadDialogTabs({
|
|
|
14
14
|
{
|
|
15
15
|
value: tabIndex,
|
|
16
16
|
variant: "scrollable",
|
|
17
|
-
onChange:
|
|
17
|
+
onChange: onTabChange,
|
|
18
18
|
slotProps: {
|
|
19
19
|
indicator: {
|
|
20
20
|
sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { LoadDialogTab } from './load.utils';
|
|
1
2
|
import { LoadDialogHeaderProps } from './LoadDialogHeader';
|
|
2
3
|
import { LoadDialogTabsContentProps } from './LoadDialogTabsContent';
|
|
4
|
+
import { UseTabsReturn } from '../../../../hooks';
|
|
3
5
|
interface LoadFormProps extends LoadDialogHeaderProps, Omit<LoadDialogTabsContentProps, 'tabIndex' | 'isModification' | 'loadToModify'> {
|
|
6
|
+
useTabsReturn: UseTabsReturn<LoadDialogTab>;
|
|
4
7
|
}
|
|
5
|
-
export declare function LoadForm({ loadToModify, isModification, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, }: Readonly<LoadFormProps>): import("react").JSX.Element;
|
|
8
|
+
export declare function LoadForm({ loadToModify, isModification, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, useTabsReturn, }: Readonly<LoadFormProps>): import("react").JSX.Element;
|
|
6
9
|
export {};
|