@gridsuite/commons-ui 0.189.0 → 0.190.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.
Files changed (57) hide show
  1. package/dist/components/customAGGrid/cell-renderers.js +28 -26
  2. package/dist/components/dnd-table/dnd-table.js +71 -34
  3. package/dist/components/index.js +16 -6
  4. package/dist/components/inputs/index.js +2 -0
  5. package/dist/components/inputs/reactHookForm/index.js +2 -0
  6. package/dist/components/inputs/reactHookForm/selectInputs/SelectWithConfirmationInput.d.ts +9 -0
  7. package/dist/components/inputs/reactHookForm/selectInputs/SelectWithConfirmationInput.js +64 -0
  8. package/dist/components/inputs/reactHookForm/selectInputs/index.d.ts +1 -0
  9. package/dist/components/inputs/reactHookForm/selectInputs/index.js +3 -1
  10. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-constants.d.ts +16 -0
  11. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-constants.js +402 -0
  12. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.d.ts +12 -0
  13. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.js +217 -0
  14. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-utils.d.ts +21 -0
  15. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-utils.js +89 -0
  16. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment.type.d.ts +28 -0
  17. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment.type.js +12 -0
  18. package/dist/components/network-modifications/by-filter/assignment/index.d.ts +10 -0
  19. package/dist/components/network-modifications/by-filter/assignment/index.js +11 -0
  20. package/dist/components/network-modifications/by-filter/assignment/modification-by-assignment-form.d.ts +7 -0
  21. package/dist/components/network-modifications/by-filter/assignment/modification-by-assignment-form.js +89 -0
  22. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.types.d.ts +7 -0
  23. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.types.js +1 -0
  24. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.utils.d.ts +22 -0
  25. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.utils.js +55 -0
  26. package/dist/components/network-modifications/by-filter/index.d.ts +1 -0
  27. package/dist/components/network-modifications/by-filter/index.js +10 -1
  28. package/dist/components/network-modifications/hooks/index.d.ts +7 -0
  29. package/dist/components/network-modifications/hooks/index.js +4 -0
  30. package/dist/components/network-modifications/hooks/useTabsWithError.d.ts +15 -0
  31. package/dist/components/network-modifications/hooks/useTabsWithError.js +28 -0
  32. package/dist/components/network-modifications/index.d.ts +1 -0
  33. package/dist/components/network-modifications/index.js +14 -6
  34. package/dist/components/network-modifications/load/common/LoadForm.d.ts +1 -1
  35. package/dist/components/network-modifications/load/common/LoadForm.js +7 -27
  36. package/dist/components/network-modifications/load/common/index.js +2 -1
  37. package/dist/components/network-modifications/load/common/load.utils.d.ts +7 -11
  38. package/dist/components/network-modifications/load/common/load.utils.js +30 -4
  39. package/dist/components/network-modifications/load/index.js +2 -1
  40. package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +9 -29
  41. package/dist/components/network-modifications/voltageLevel/creation/index.js +1 -5
  42. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.d.ts +8 -12
  43. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.js +53 -5
  44. package/dist/components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.d.ts +0 -4
  45. package/dist/components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +0 -16
  46. package/dist/components/network-modifications/voltageLevel/index.js +1 -5
  47. package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -0
  48. package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -0
  49. package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +1 -0
  50. package/dist/index.js +16 -6
  51. package/dist/translations/en/networkModificationsEn.d.ts +51 -0
  52. package/dist/translations/en/networkModificationsEn.js +51 -0
  53. package/dist/translations/fr/networkModificationsFr.d.ts +51 -0
  54. package/dist/translations/fr/networkModificationsFr.js +51 -0
  55. package/dist/utils/constants/fieldConstants.d.ts +2 -0
  56. package/dist/utils/constants/fieldConstants.js +2 -0
  57. package/package.json +1 -1
@@ -1,8 +1,34 @@
1
- const LoadDialogTab = {
2
- CONNECTIVITY_TAB: 0,
3
- CHARACTERISTICS_TAB: 1,
4
- STATE_ESTIMATION_TAB: 2
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
  };
@@ -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,
@@ -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 GridItem from "../../../grid/grid-item.js";
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";
@@ -35,8 +34,8 @@ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
35
34
  import "uuid";
36
35
  import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
36
  import "react-querybuilder";
38
- import { VoltageLevelTab } from "./voltageLevel.constants.js";
39
- import { isSubstationTabError, isCharacteristicsTabError, isStructureTabError, isAdditionalInformationTabError } from "./voltageLevelCreation.utils.js";
37
+ import { VoltageLevelTab, VOLTAGE_LEVEL_TAB_FIELDS } from "./voltageLevel.constants.js";
38
+ import GridItem from "../../../grid/grid-item.js";
40
39
  import "./tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js";
41
40
  import { StructureTab } from "./tabs/structureTab/StructureTab.js";
42
41
  import { SubstationTab } from "./tabs/substationTab/SubstationTab.js";
@@ -44,35 +43,16 @@ import { CharacteristicsTab } from "./tabs/characteristicsTab/CharacteristicsTab
44
43
  import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
45
44
  import "../../common/properties/propertyUtils.js";
46
45
  import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
46
+ import { useTabsWithError } from "../../hooks/useTabsWithError.js";
47
47
  function VoltageLevelCreationForm({
48
48
  substationOptions,
49
49
  showDeleteSubstationButton = true
50
50
  } = {}) {
51
- const [tabIndex, setTabIndex] = useState(0);
52
- const [tabIndexesWithError, setTabIndexesWithError] = useState([]);
53
- const { errors } = useFormState();
51
+ const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
52
+ VOLTAGE_LEVEL_TAB_FIELDS,
53
+ VoltageLevelTab.SUBSTATION_TAB
54
+ );
54
55
  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
56
  return /* @__PURE__ */ jsxs(Fragment, { children: [
77
57
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
78
58
  /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(
@@ -35,7 +35,7 @@ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
35
35
  import "react-querybuilder";
36
36
  import "../../common/properties/propertyUtils.js";
37
37
  import { VoltageLevelCreationForm } from "./VoltageLevelCreationForm.js";
38
- import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevelCreation.utils.js";
38
+ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevelCreation.utils.js";
39
39
  import { SwitchKind } from "./voltageLevelCreation.types.js";
40
40
  export {
41
41
  SWITCH_TYPE,
@@ -45,10 +45,6 @@ export {
45
45
  buildNewBusbarSections,
46
46
  getCreateSwitchesEmptyFormData,
47
47
  getCreateSwitchesValidationSchema,
48
- isAdditionalInformationTabError,
49
- isCharacteristicsTabError,
50
- isStructureTabError,
51
- isSubstationTabError,
52
48
  translateSwitchKinds,
53
49
  voltageLevelCreationDtoToForm,
54
50
  voltageLevelCreationEmptyFormData,
@@ -1,12 +1,8 @@
1
- /**
2
- * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
- * This Source Code Form is subject to the terms of the Mozilla Public
4
- * License, v. 2.0. If a copy of the MPL was not distributed with this
5
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
- */
7
- export declare const VoltageLevelTab: {
8
- SUBSTATION_TAB: number;
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[]>>;
@@ -1,9 +1,57 @@
1
- const VoltageLevelTab = {
2
- SUBSTATION_TAB: 0,
3
- CHARACTERISTICS_TAB: 1,
4
- STRUCTURE_TAB: 2,
5
- ADDITIONAL_INFORMATION_TAB: 3
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 VoltageLevelTab = /* @__PURE__ */ ((VoltageLevelTab2) => {
8
+ VoltageLevelTab2[VoltageLevelTab2["SUBSTATION_TAB"] = 0] = "SUBSTATION_TAB";
9
+ VoltageLevelTab2[VoltageLevelTab2["CHARACTERISTICS_TAB"] = 1] = "CHARACTERISTICS_TAB";
10
+ VoltageLevelTab2[VoltageLevelTab2["STRUCTURE_TAB"] = 2] = "STRUCTURE_TAB";
11
+ VoltageLevelTab2[VoltageLevelTab2["ADDITIONAL_INFORMATION_TAB"] = 3] = "ADDITIONAL_INFORMATION_TAB";
12
+ return VoltageLevelTab2;
13
+ })(VoltageLevelTab || {});
14
+ const VOLTAGE_LEVEL_TAB_FIELDS = {
15
+ [
16
+ 0
17
+ /* SUBSTATION_TAB */
18
+ ]: [
19
+ FieldConstants.ADD_SUBSTATION_CREATION,
20
+ FieldConstants.SUBSTATION_ID,
21
+ FieldConstants.SUBSTATION_NAME,
22
+ FieldConstants.SUBSTATION_CREATION_ID,
23
+ FieldConstants.SUBSTATION_CREATION,
24
+ FieldConstants.COUNTRY
25
+ ],
26
+ [
27
+ 1
28
+ /* CHARACTERISTICS_TAB */
29
+ ]: [
30
+ FieldConstants.HIDE_NOMINAL_VOLTAGE,
31
+ FieldConstants.NOMINAL_V,
32
+ FieldConstants.LOW_VOLTAGE_LIMIT,
33
+ FieldConstants.HIGH_VOLTAGE_LIMIT,
34
+ FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT,
35
+ FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT
36
+ ],
37
+ [
38
+ 2
39
+ /* STRUCTURE_TAB */
40
+ ]: [
41
+ FieldConstants.HIDE_BUS_BAR_SECTION,
42
+ FieldConstants.BUS_BAR_COUNT,
43
+ FieldConstants.SECTION_COUNT,
44
+ FieldConstants.SWITCHES_BETWEEN_SECTIONS,
45
+ FieldConstants.SWITCH_KINDS,
46
+ FieldConstants.TOPOLOGY_KIND,
47
+ FieldConstants.COUPLING_OMNIBUS
48
+ ],
49
+ [
50
+ 3
51
+ /* ADDITIONAL_INFORMATION_TAB */
52
+ ]: [FieldConstants.ADDITIONAL_PROPERTIES]
6
53
  };
7
54
  export {
55
+ VOLTAGE_LEVEL_TAB_FIELDS,
8
56
  VoltageLevelTab
9
57
  };
@@ -153,7 +153,3 @@ export declare const voltageLevelCreationDtoToForm: (voltageLevelDto: VoltageLev
153
153
  hideNominalVoltage: boolean;
154
154
  hideBusBarSection: boolean;
155
155
  };
156
- export declare function isSubstationTabError(errors: Record<string, unknown> | undefined): {};
157
- export declare function isCharacteristicsTabError(errors: Record<string, unknown> | undefined): {};
158
- export declare function isStructureTabError(errors: Record<string, unknown> | undefined): {};
159
- export declare function isAdditionalInformationTabError(errors: Record<string, unknown> | undefined): boolean;
@@ -235,27 +235,11 @@ const voltageLevelCreationDtoToForm = (voltageLevelDto, intl, includePreviousVal
235
235
  ...getPropertiesFromModification(voltageLevelDto.properties, includePreviousValue)
236
236
  };
237
237
  };
238
- function isSubstationTabError(errors) {
239
- return errors?.[FieldConstants.ADD_SUBSTATION_CREATION] !== void 0 || errors?.[FieldConstants.SUBSTATION_ID] !== void 0 || errors?.[FieldConstants.SUBSTATION_NAME] !== void 0 || errors?.[FieldConstants.SUBSTATION_CREATION_ID] !== void 0 || errors?.[FieldConstants.SUBSTATION_CREATION] || errors?.[FieldConstants.COUNTRY] !== void 0;
240
- }
241
- function isCharacteristicsTabError(errors) {
242
- return errors?.[FieldConstants.HIDE_NOMINAL_VOLTAGE] !== void 0 || errors?.[FieldConstants.NOMINAL_V] !== void 0 || errors?.[FieldConstants.LOW_VOLTAGE_LIMIT] !== void 0 || errors?.[FieldConstants.HIGH_VOLTAGE_LIMIT] !== void 0 || errors?.[FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT] || errors?.[FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT] !== void 0;
243
- }
244
- function isStructureTabError(errors) {
245
- return errors?.[FieldConstants.HIDE_BUS_BAR_SECTION] !== void 0 || errors?.[FieldConstants.BUS_BAR_COUNT] !== void 0 || errors?.[FieldConstants.SECTION_COUNT] !== void 0 || errors?.[FieldConstants.SWITCHES_BETWEEN_SECTIONS] !== void 0 || errors?.[FieldConstants.SWITCH_KINDS] || errors?.[FieldConstants.TOPOLOGY_KIND] !== void 0 || errors?.[FieldConstants.COUPLING_OMNIBUS] !== void 0;
246
- }
247
- function isAdditionalInformationTabError(errors) {
248
- return errors?.[FieldConstants.ADDITIONAL_PROPERTIES] !== void 0;
249
- }
250
238
  export {
251
239
  SWITCH_TYPE,
252
240
  buildNewBusbarSections,
253
241
  getCreateSwitchesEmptyFormData,
254
242
  getCreateSwitchesValidationSchema,
255
- isAdditionalInformationTabError,
256
- isCharacteristicsTabError,
257
- isStructureTabError,
258
- isSubstationTabError,
259
243
  translateSwitchKinds,
260
244
  voltageLevelCreationDtoToForm,
261
245
  voltageLevelCreationEmptyFormData,
@@ -35,7 +35,7 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
35
35
  import "react-querybuilder";
36
36
  import "../common/properties/propertyUtils.js";
37
37
  import { VoltageLevelCreationForm } from "./creation/VoltageLevelCreationForm.js";
38
- import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./creation/voltageLevelCreation.utils.js";
38
+ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./creation/voltageLevelCreation.utils.js";
39
39
  import { SwitchKind } from "./creation/voltageLevelCreation.types.js";
40
40
  import { VoltageLevelModificationForm } from "./modification/VoltageLevelModificationForm.js";
41
41
  import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./modification/voltageLevelModification.utils.js";
@@ -48,10 +48,6 @@ export {
48
48
  buildNewBusbarSections,
49
49
  getCreateSwitchesEmptyFormData,
50
50
  getCreateSwitchesValidationSchema,
51
- isAdditionalInformationTabError,
52
- isCharacteristicsTabError,
53
- isStructureTabError,
54
- isSubstationTabError,
55
51
  translateSwitchKinds,
56
52
  voltageLevelCreationDtoToForm,
57
53
  voltageLevelCreationEmptyFormData,
@@ -40,6 +40,7 @@ import "uuid";
40
40
  import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
41
41
  import "react-querybuilder";
42
42
  import ParameterDndTableField from "../common/parameter-dnd-table-field.js";
43
+ import "react-dom";
43
44
  import "@hello-pangea/dnd";
44
45
  import { DndColumnType } from "../../dnd-table/dnd-table.type.js";
45
46
  const formSchema = yup.object().shape({
@@ -44,6 +44,7 @@ import { VoltageInitTabValues, VARIABLE_SHUNT_COMPENSATORS, SHUNT_COMPENSATORS_S
44
44
  import "../../filter/HeaderFilterForm.js";
45
45
  import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
46
46
  import { fromVoltageInitParametersFormToParamValues, fromVoltageInitParamsDataToFormValues, fromStudyVoltageInitParamsDataToFormValues } from "./voltage-init-form-utils.js";
47
+ import "react-dom";
47
48
  import "@hello-pangea/dnd";
48
49
  import { SELECTED } from "../../dnd-table/dnd-table.type.js";
49
50
  const useVoltageInitParametersForm = ({
@@ -36,6 +36,7 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
36
36
  import "uuid";
37
37
  import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
38
38
  import "react-querybuilder";
39
+ import "react-dom";
39
40
  import "@hello-pangea/dnd";
40
41
  import { SELECTED } from "../../dnd-table/dnd-table.type.js";
41
42
  const fromVoltageInitParametersFormToParamValues = (newParams) => {
package/dist/index.js CHANGED
@@ -88,6 +88,7 @@ import { CountriesInput } from "./components/inputs/reactHookForm/selectInputs/C
88
88
  import { InputWithPopupConfirmation } from "./components/inputs/reactHookForm/selectInputs/InputWithPopupConfirmation.js";
89
89
  import { MuiSelectInput } from "./components/inputs/reactHookForm/selectInputs/MuiSelectInput.js";
90
90
  import { SelectInput } from "./components/inputs/reactHookForm/selectInputs/SelectInput.js";
91
+ import { SelectWithConfirmationInput } from "./components/inputs/reactHookForm/selectInputs/SelectWithConfirmationInput.js";
91
92
  import { EnumInput } from "./components/inputs/reactHookForm/selectInputs/EnumInput.js";
92
93
  import { TableNumericalInput } from "./components/inputs/reactHookForm/tableInputs/table-numerical-input.js";
93
94
  import { TableTextInput } from "./components/inputs/reactHookForm/tableInputs/table-text-input.js";
@@ -210,6 +211,7 @@ import { useHvdcLccDeletion } from "./components/network-modifications/equipment
210
211
  import { HvdcLccDeletionSpecificForm } from "./components/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js";
211
212
  import { equipmentDeletionDtoToForm, equipmentDeletionEmptyFormData, equipmentDeletionFormSchema, equipmentDeletionFormToDto, newEquipmentDeletionDto } from "./components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js";
212
213
  import { EquipmentDeletionForm } from "./components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js";
214
+ import { useTabsWithError } from "./components/network-modifications/hooks/useTabsWithError.js";
213
215
  import { SubstationCreationForm } from "./components/network-modifications/substation/creation/SubstationCreationForm.js";
214
216
  import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./components/network-modifications/substation/creation/substationCreation.utils.js";
215
217
  import { SubstationModificationForm } from "./components/network-modifications/substation/modification/SubstationModificationForm.js";
@@ -271,11 +273,11 @@ import { fetchDynamicMarginCalculationParameters, fetchDynamicMarginCalculationP
271
273
  import { fetchContingencyAndFiltersLists, fetchDynamicSecurityAnalysisProviders } from "./services/dynamic-security-analysis.js";
272
274
  import "@mui/icons-material";
273
275
  import { VoltageLevelCreationForm } from "./components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js";
274
- import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js";
276
+ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js";
275
277
  import { SwitchKind } from "./components/network-modifications/voltageLevel/creation/voltageLevelCreation.types.js";
276
278
  import { VoltageLevelModificationForm } from "./components/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js";
277
279
  import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./components/network-modifications/voltageLevel/modification/voltageLevelModification.utils.js";
278
- import { LoadDialogTab } from "./components/network-modifications/load/common/load.utils.js";
280
+ import { LOAD_TAB_FIELDS, LoadDialogTab } from "./components/network-modifications/load/common/load.utils.js";
279
281
  import { LoadDialogTabs } from "./components/network-modifications/load/common/LoadDialogTabs.js";
280
282
  import { LoadDialogTabsContent } from "./components/network-modifications/load/common/LoadDialogTabsContent.js";
281
283
  import { LoadDialogHeader } from "./components/network-modifications/load/common/LoadDialogHeader.js";
@@ -284,6 +286,9 @@ import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchem
284
286
  import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./components/network-modifications/load/modification/loadModification.utils.js";
285
287
  import { ByFilterDeletionForm } from "./components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js";
286
288
  import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./components/network-modifications/by-filter/deletion/byFilterDeletion.utils.js";
289
+ import { ModificationByAssignmentForm } from "./components/network-modifications/by-filter/assignment/modification-by-assignment-form.js";
290
+ import { emptyModificationByAssignmentFormData, modificationByAssignmentDtoToForm, modificationByAssignmentFormSchema, modificationByAssignmentFormToDto } from "./components/network-modifications/by-filter/assignment/modificationByAssignment.utils.js";
291
+ import { DataType as DataType2 } from "./components/network-modifications/by-filter/assignment/assignment/assignment.type.js";
287
292
  import { BuildStatusChip } from "./components/node/build-status-chip.js";
288
293
  import { BuildStatus } from "./components/node/constant.js";
289
294
  import { useStateBoolean } from "./hooks/customStates/useStateBoolean.js";
@@ -379,6 +384,7 @@ export {
379
384
  AnnouncementSeverity,
380
385
  ArrayAction,
381
386
  ArrowsOutputIcon,
387
+ DataType2 as AssignmentDataType,
382
388
  AuthenticationRouter,
383
389
  default3 as AuthenticationRouterErrorDisplay,
384
390
  AutocompleteInput,
@@ -576,6 +582,7 @@ export {
576
582
  LOAD_INCREASE_START_TIME,
577
583
  LOAD_INCREASE_STOP_TIME,
578
584
  LOAD_MODELS_RULE,
585
+ LOAD_TAB_FIELDS,
579
586
  LOAD_TYPES,
580
587
  LOAD_TYPE_OPTIONS,
581
588
  LOGOUT_ERROR,
@@ -623,6 +630,7 @@ export {
623
630
  MessageLogCellRenderer,
624
631
  MicroSusceptanceAdornment,
625
632
  MidFormError,
633
+ ModificationByAssignmentForm,
626
634
  ModificationType,
627
635
  ModifyElementSelection,
628
636
  MuiSelectInput,
@@ -763,6 +771,7 @@ export {
763
771
  SecurityAnalysisParametersInline,
764
772
  SelectClearable,
765
773
  SelectInput,
774
+ SelectWithConfirmationInput,
766
775
  SensiBranchesTabValues,
767
776
  SensiHvdcs,
768
777
  SensiInjection,
@@ -890,6 +899,7 @@ export {
890
899
  elementSearchEn,
891
900
  elementSearchFr,
892
901
  emptyFormData,
902
+ emptyModificationByAssignmentFormData,
893
903
  emptyProperties,
894
904
  equalsArray,
895
905
  equipmentDeletionDtoToForm,
@@ -1052,18 +1062,14 @@ export {
1052
1062
  inputsFr,
1053
1063
  intlInitialVoltageProfileMode,
1054
1064
  intlPredefinedParametersOptions,
1055
- isAdditionalInformationTabError,
1056
1065
  isBlankOrEmpty,
1057
- isCharacteristicsTabError,
1058
1066
  isEmpty,
1059
1067
  isExploreMetadata,
1060
1068
  isFieldRequired,
1061
1069
  isFloatNumber,
1062
1070
  isIntegerNumber,
1063
1071
  isObjectEmpty,
1064
- isStructureTabError,
1065
1072
  isStudyMetadata,
1066
- isSubstationTabError,
1067
1073
  isValidComputingType,
1068
1074
  italicFontTextField,
1069
1075
  keyGenerator,
@@ -1084,6 +1090,9 @@ export {
1084
1090
  mergeModificationAndEquipmentProperties,
1085
1091
  mergeSx,
1086
1092
  microUnitToUnit,
1093
+ modificationByAssignmentDtoToForm,
1094
+ modificationByAssignmentFormSchema,
1095
+ modificationByAssignmentFormToDto,
1087
1096
  modificationPropertiesSchema,
1088
1097
  multipleSelectionDialogEn,
1089
1098
  multipleSelectionDialogFr,
@@ -1184,6 +1193,7 @@ export {
1184
1193
  useSnackMessage,
1185
1194
  useStateBoolean,
1186
1195
  useStateNumber,
1196
+ useTabsWithError,
1187
1197
  useUniqueNameValidationEn,
1188
1198
  useUniqueNameValidationFr,
1189
1199
  useValid,
@@ -69,6 +69,7 @@ export declare const networkModificationsEn: {
69
69
  ModificationReadError: string;
70
70
  CreateSubstation: string;
71
71
  DeleteEquipmentByFilter: string;
72
+ ModifyByAssignment: string;
72
73
  SubstationCreationError: string;
73
74
  ModifySubstation: string;
74
75
  SubstationModificationError: string;
@@ -142,6 +143,56 @@ export declare const networkModificationsEn: {
142
143
  LCCConverterStationShuntCompensators: string;
143
144
  Side1: string;
144
145
  Side2: string;
146
+ EquipmentType: string;
147
+ EditedField: string;
148
+ Property: string;
149
+ RatedNominalPowerText: string;
150
+ MinimumActivePowerText: string;
151
+ MaximumActivePowerText: string;
152
+ ActivePowerSetPointText: string;
153
+ ReactivePowerSetPointText: string;
154
+ GeneratorTargetV: string;
155
+ PlannedActivePowerSetPointForm: string;
156
+ MarginalCost: string;
157
+ plannedOutageRate: string;
158
+ forcedOutageRate: string;
159
+ ActivePowerRegulationDroop: string;
160
+ TransientReactanceForm: string;
161
+ TransformerReactanceForm: string;
162
+ ReactivePercentageVoltageRegulation: string;
163
+ voltageRegulationOn: string;
164
+ maximumSectionCount: string;
165
+ sectionCount: string;
166
+ maxSusceptance: string;
167
+ maxQAtNominalV: string;
168
+ SeriesResistanceText: string;
169
+ SeriesReactanceText: string;
170
+ ShuntConductanceText: string;
171
+ ShuntConductanceText1: string;
172
+ ShuntConductanceText2: string;
173
+ ShuntSusceptanceText: string;
174
+ ShuntSusceptanceText1: string;
175
+ ShuntSusceptanceText2: string;
176
+ RatedU1: string;
177
+ RatedU2: string;
178
+ RatioTargetV: string;
179
+ RatioLowTapPosition: string;
180
+ RatioTapPosition: string;
181
+ RatioDeadBand: string;
182
+ PhaseRegulatingValue: string;
183
+ PhaseLowTapPosition: string;
184
+ PhaseTapPosition: string;
185
+ PhaseDeadBand: string;
186
+ selectedOperationalLimitsGroup1: string;
187
+ selectedOperationalLimitsGroup2: string;
188
+ operationalLimitsGroup1WithProperties: string;
189
+ operationalLimitsGroup2WithProperties: string;
190
+ Value: string;
191
+ EmptyField: string;
192
+ NumericValueOrEmptyField: string;
193
+ ValueOrEmptyField: string;
194
+ addNewAssignment: string;
195
+ changeTypeConfirmation: string;
145
196
  Or: string;
146
197
  SubstationTab: string;
147
198
  ConnectivityTab: string;
@@ -75,6 +75,7 @@ const networkModificationsEn = {
75
75
  ModificationReadError: "An error occurred while fetching the modification",
76
76
  CreateSubstation: "Create substation",
77
77
  DeleteEquipmentByFilter: "Delete equipment by filter",
78
+ ModifyByAssignment: "Modify by filter",
78
79
  SubstationCreationError: "Error while creating substation",
79
80
  ModifySubstation: "Modify substation",
80
81
  SubstationModificationError: "Error while modifying substation",
@@ -148,6 +149,56 @@ const networkModificationsEn = {
148
149
  LCCConverterStationShuntCompensators: "Shunt compensators related to the LCC",
149
150
  Side1: "Side 1",
150
151
  Side2: "Side 2",
152
+ EquipmentType: "Equipment type",
153
+ EditedField: "Edited field",
154
+ Property: "Property",
155
+ RatedNominalPowerText: "Rated nominal power",
156
+ MinimumActivePowerText: "Minimum active power",
157
+ MaximumActivePowerText: "Maximum active power",
158
+ ActivePowerSetPointText: "Active power setpoint",
159
+ ReactivePowerSetPointText: "Reactive power setpoint",
160
+ GeneratorTargetV: "Target V",
161
+ PlannedActivePowerSetPointForm: "Planning active power set point",
162
+ MarginalCost: "Generation dispatch cost",
163
+ plannedOutageRate: "Planning outage rate",
164
+ forcedOutageRate: "Forced outage rate",
165
+ ActivePowerRegulationDroop: "Active power regulation droop",
166
+ TransientReactanceForm: "Transient reactance",
167
+ TransformerReactanceForm: "Transformer reactance",
168
+ ReactivePercentageVoltageRegulation: "Reactive percentage",
169
+ voltageRegulationOn: "Voltage regulation",
170
+ maximumSectionCount: "Maximum number of sections",
171
+ sectionCount: "Current number of sections",
172
+ maxSusceptance: "Maximal susceptance available",
173
+ maxQAtNominalV: "Qmax available at nominal voltage",
174
+ SeriesResistanceText: "Series resistance",
175
+ SeriesReactanceText: "Series reactance",
176
+ ShuntConductanceText: "Shunt conductance",
177
+ ShuntConductanceText1: "Shunt conductance side 1",
178
+ ShuntConductanceText2: "Shunt conductance side 2",
179
+ ShuntSusceptanceText: "Shunt susceptance",
180
+ ShuntSusceptanceText1: "Shunt susceptance side 1",
181
+ ShuntSusceptanceText2: "Shunt susceptance side 2",
182
+ RatedU1: "Rated voltage 1",
183
+ RatedU2: "Rated voltage 2",
184
+ RatioTargetV: "Ratio voltage set point",
185
+ RatioLowTapPosition: "Ratio low tap position",
186
+ RatioTapPosition: "Ratio tap position",
187
+ RatioDeadBand: "Ratio deadband",
188
+ PhaseRegulatingValue: "Phase regulating value",
189
+ PhaseLowTapPosition: "Phase low tap position",
190
+ PhaseTapPosition: "Phase tap position",
191
+ PhaseDeadBand: "Phase deadband",
192
+ selectedOperationalLimitsGroup1: "Active limit set on side 1",
193
+ selectedOperationalLimitsGroup2: "Active limit set on side 2",
194
+ operationalLimitsGroup1WithProperties: "Active limit set on side 1 with property",
195
+ operationalLimitsGroup2WithProperties: "Active limit set on side 2 with property",
196
+ Value: "Value",
197
+ EmptyField: "Empty the field",
198
+ NumericValueOrEmptyField: "Numeric value or Empty the field",
199
+ ValueOrEmptyField: "Value or Empty the field",
200
+ addNewAssignment: "Modify another field",
201
+ changeTypeConfirmation: "The type will be changed. All fields values will be erased.",
151
202
  Or: "or",
152
203
  // Tabs
153
204
  SubstationTab: "Substation",
@@ -69,6 +69,7 @@ export declare const networkModificationsFr: {
69
69
  ModificationReadError: string;
70
70
  CreateSubstation: string;
71
71
  DeleteEquipmentByFilter: string;
72
+ ModifyByAssignment: string;
72
73
  SubstationCreationError: string;
73
74
  ModifySubstation: string;
74
75
  SubstationModificationError: string;
@@ -142,6 +143,56 @@ export declare const networkModificationsFr: {
142
143
  LCCConverterStationShuntCompensators: string;
143
144
  Side1: string;
144
145
  Side2: string;
146
+ EquipmentType: string;
147
+ EditedField: string;
148
+ Property: string;
149
+ RatedNominalPowerText: string;
150
+ MinimumActivePowerText: string;
151
+ MaximumActivePowerText: string;
152
+ ActivePowerSetPointText: string;
153
+ ReactivePowerSetPointText: string;
154
+ GeneratorTargetV: string;
155
+ PlannedActivePowerSetPointForm: string;
156
+ MarginalCost: string;
157
+ plannedOutageRate: string;
158
+ forcedOutageRate: string;
159
+ ActivePowerRegulationDroop: string;
160
+ TransientReactanceForm: string;
161
+ TransformerReactanceForm: string;
162
+ ReactivePercentageVoltageRegulation: string;
163
+ voltageRegulationOn: string;
164
+ maximumSectionCount: string;
165
+ sectionCount: string;
166
+ maxSusceptance: string;
167
+ maxQAtNominalV: string;
168
+ SeriesResistanceText: string;
169
+ SeriesReactanceText: string;
170
+ ShuntConductanceText: string;
171
+ ShuntConductanceText1: string;
172
+ ShuntConductanceText2: string;
173
+ ShuntSusceptanceText: string;
174
+ ShuntSusceptanceText1: string;
175
+ ShuntSusceptanceText2: string;
176
+ RatedU1: string;
177
+ RatedU2: string;
178
+ RatioTargetV: string;
179
+ RatioLowTapPosition: string;
180
+ RatioTapPosition: string;
181
+ RatioDeadBand: string;
182
+ PhaseRegulatingValue: string;
183
+ PhaseLowTapPosition: string;
184
+ PhaseTapPosition: string;
185
+ PhaseDeadBand: string;
186
+ selectedOperationalLimitsGroup1: string;
187
+ selectedOperationalLimitsGroup2: string;
188
+ operationalLimitsGroup1WithProperties: string;
189
+ operationalLimitsGroup2WithProperties: string;
190
+ Value: string;
191
+ EmptyField: string;
192
+ NumericValueOrEmptyField: string;
193
+ ValueOrEmptyField: string;
194
+ addNewAssignment: string;
195
+ changeTypeConfirmation: string;
145
196
  Or: string;
146
197
  SubstationTab: string;
147
198
  ConnectivityTab: string;