@gridsuite/commons-ui 0.266.0 → 0.268.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 (110) hide show
  1. package/dist/components/composite/grid/grid-section.d.ts +5 -2
  2. package/dist/components/composite/grid/grid-section.js +56 -4
  3. package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.js +2 -1
  4. package/dist/components/ui/reactHookForm/CheckboxNullableInput.js +4 -2
  5. package/dist/components/ui/reactHookForm/autocompleteInputs/MultipleAutocompleteInput.js +3 -2
  6. package/dist/components/ui/reactHookForm/booleans/BooleanInput.d.ts +1 -1
  7. package/dist/components/ui/reactHookForm/booleans/BooleanInput.js +5 -7
  8. package/dist/components/ui/reactHookForm/tableInputs/table-numerical-input.js +4 -2
  9. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.d.ts +1 -1
  10. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.js +2 -3
  11. package/dist/components/ui/reactHookForm/text/ExpandingTextField.js +15 -13
  12. package/dist/components/ui/reactHookForm/text/TextInput.js +4 -2
  13. package/dist/components/ui/reactHookForm/text/UniqueNameInput.js +4 -2
  14. package/dist/components/ui/reactHookForm/utils/TextFieldWithAdornment.js +2 -1
  15. package/dist/features/common/index.d.ts +7 -0
  16. package/dist/features/common/index.js +4 -0
  17. package/dist/features/common/renderTable-ExportCsv.d.ts +18 -0
  18. package/dist/features/common/renderTable-ExportCsv.js +136 -0
  19. package/dist/features/index.d.ts +5 -0
  20. package/dist/features/index.js +50 -2
  21. package/dist/features/network-modifications/common/connectivity/connectivity.type.d.ts +1 -1
  22. package/dist/features/network-modifications/index.d.ts +1 -0
  23. package/dist/features/network-modifications/index.js +40 -1
  24. package/dist/features/network-modifications/static-var-compensator/common/constants.d.ts +20 -0
  25. package/dist/features/network-modifications/static-var-compensator/common/constants.js +9 -0
  26. package/dist/features/network-modifications/static-var-compensator/common/index.d.ts +13 -0
  27. package/dist/features/network-modifications/static-var-compensator/common/index.js +20 -0
  28. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form-utils.d.ts +91 -0
  29. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form-utils.js +166 -0
  30. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.d.ts +8 -0
  31. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.js +200 -0
  32. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form-utils.d.ts +66 -0
  33. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form-utils.js +149 -0
  34. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.d.ts +7 -0
  35. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.js +153 -0
  36. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-header.d.ts +7 -0
  37. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-header.js +72 -0
  38. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.d.ts +7 -0
  39. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js +44 -0
  40. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tab-utils.d.ts +8 -0
  41. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tab-utils.js +34 -0
  42. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.d.ts +9 -0
  43. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.js +100 -0
  44. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator.types.d.ts +68 -0
  45. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator.types.js +1 -0
  46. package/dist/features/network-modifications/static-var-compensator/common/susceptance-area.d.ts +7 -0
  47. package/dist/features/network-modifications/static-var-compensator/common/susceptance-area.js +161 -0
  48. package/dist/features/network-modifications/static-var-compensator/creation/index.d.ts +9 -0
  49. package/dist/features/network-modifications/static-var-compensator/creation/index.js +9 -0
  50. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.d.ts +8 -0
  51. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.js +105 -0
  52. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-utils.d.ts +114 -0
  53. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-utils.js +189 -0
  54. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation.types.d.ts +34 -0
  55. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation.types.js +1 -0
  56. package/dist/features/network-modifications/static-var-compensator/index.d.ts +8 -0
  57. package/dist/features/network-modifications/static-var-compensator/index.js +27 -0
  58. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-form.d.ts +8 -0
  59. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-form.js +153 -0
  60. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-utils.d.ts +20 -0
  61. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-utils.js +40 -0
  62. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation.types.d.ts +11 -0
  63. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation.types.js +1 -0
  64. package/dist/features/network-modifications/voltageLevel/coupling-device/index.d.ts +3 -0
  65. package/dist/features/network-modifications/voltageLevel/coupling-device/index.js +9 -0
  66. package/dist/features/network-modifications/voltageLevel/creation/index.js +1 -1
  67. package/dist/features/network-modifications/voltageLevel/index.d.ts +2 -0
  68. package/dist/features/network-modifications/voltageLevel/index.js +15 -1
  69. package/dist/features/network-modifications/voltageLevel/topology/CreateVoltageLevelTopologyForm.d.ts +6 -0
  70. package/dist/features/network-modifications/voltageLevel/topology/CreateVoltageLevelTopologyForm.js +145 -0
  71. package/dist/features/network-modifications/voltageLevel/topology/index.d.ts +9 -0
  72. package/dist/features/network-modifications/voltageLevel/topology/index.js +9 -0
  73. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.types.d.ts +8 -0
  74. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.types.js +1 -0
  75. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.utils.d.ts +25 -0
  76. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.utils.js +48 -0
  77. package/dist/features/results/constants.d.ts +7 -0
  78. package/dist/features/results/constants.js +4 -0
  79. package/dist/features/results/hooks/index.d.ts +7 -0
  80. package/dist/features/results/hooks/index.js +4 -0
  81. package/dist/features/results/hooks/useIntlResultStatusMessages.d.ts +19 -0
  82. package/dist/features/results/hooks/useIntlResultStatusMessages.js +23 -0
  83. package/dist/features/results/loadflow/index.d.ts +8 -0
  84. package/dist/features/results/loadflow/index.js +4 -0
  85. package/dist/features/results/loadflow/limit-violation-result.d.ts +2 -0
  86. package/dist/features/results/loadflow/limit-violation-result.js +134 -0
  87. package/dist/features/results/loadflow/load-flow-result.type.d.ts +29 -0
  88. package/dist/features/results/loadflow/load-flow-result.type.js +1 -0
  89. package/dist/features/results/securityanalysis/index.js +1 -2
  90. package/dist/features/results/securityanalysis/security-analysis-result-nmk.js +2 -1
  91. package/dist/features/results/securityanalysis/utils.d.ts +0 -2
  92. package/dist/features/results/securityanalysis/utils.js +0 -22
  93. package/dist/features/results/utils/index.d.ts +7 -0
  94. package/dist/features/results/utils/index.js +4 -0
  95. package/dist/features/results/utils/no-rows-message.d.ts +2 -0
  96. package/dist/features/results/utils/no-rows-message.js +24 -0
  97. package/dist/hooks/index.d.ts +1 -0
  98. package/dist/hooks/index.js +2 -0
  99. package/dist/hooks/useOpenLoaderShortWait.d.ts +18 -0
  100. package/dist/hooks/useOpenLoaderShortWait.js +19 -0
  101. package/dist/index.js +53 -1
  102. package/dist/translations/en/networkModificationsEn.d.ts +35 -0
  103. package/dist/translations/en/networkModificationsEn.js +38 -1
  104. package/dist/translations/fr/networkModificationsFr.d.ts +35 -0
  105. package/dist/translations/fr/networkModificationsFr.js +38 -1
  106. package/dist/utils/constants/fieldConstants.d.ts +28 -1
  107. package/dist/utils/constants/fieldConstants.js +27 -0
  108. package/dist/utils/index.d.ts +1 -0
  109. package/dist/utils/index.js +2 -0
  110. package/package.json +1 -1
@@ -0,0 +1,161 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
3
+ import { useFormContext, useWatch } from "react-hook-form";
4
+ import { Grid, TextField, InputAdornment } from "@mui/material";
5
+ import { FormattedMessage } from "react-intl";
6
+ import "@mui/icons-material";
7
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
8
+ import { SusceptanceAdornment, ReactivePowerAdornment } from "../../../../utils/constants/adornments.js";
9
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
10
+ import "../../../../utils/conversionUtils.js";
11
+ import "../../../../utils/types/equipmentType.js";
12
+ import "localized-countries";
13
+ import "localized-countries/data/fr";
14
+ import "localized-countries/data/en";
15
+ import "notistack";
16
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
17
+ import "yup";
18
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
19
+ import { FloatInput } from "../../../../components/ui/reactHookForm/numbers/FloatInput.js";
20
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
21
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
22
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
23
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
24
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
25
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
26
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
27
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
28
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
29
+ import "@hello-pangea/dnd";
30
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
31
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
32
+ import "mui-nested-menu";
33
+ import "react-resizable-panels";
34
+ import "react-papaparse";
35
+ import "react-dom";
36
+ import "autosuggest-highlight/match";
37
+ import "autosuggest-highlight/parse";
38
+ import "clsx";
39
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
40
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
41
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
42
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
43
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
44
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
45
+ import "react-querybuilder";
46
+ import "uuid";
47
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
48
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
49
+ import { GridItem } from "../../../../components/composite/grid/grid-item.js";
50
+ import "@react-querybuilder/material";
51
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
52
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
53
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
54
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
55
+ import "ag-grid-community";
56
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
57
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
58
+ import "mathjs";
59
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
60
+ import "react-window";
61
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
62
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
63
+ import { CHARACTERISTICS_CHOICES } from "../../shunt-compensator/common/shuntCompensator.utils.js";
64
+ import "../../common/properties/propertyUtils.js";
65
+ import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
66
+ import "@mui/material/colors";
67
+ import "@mui/x-charts";
68
+ import "../../common/currentLimits/limitsPane.utils.js";
69
+ import "../../shunt-compensator/creation/shuntCompensatorCreation.utils.js";
70
+ import "../../shunt-compensator/modification/shuntCompensatorModification.utils.js";
71
+ function SusceptanceArea() {
72
+ const id = FieldConstants.AUTOMATON;
73
+ const { setValue } = useFormContext();
74
+ const watchChoiceAutomaton = useWatch({
75
+ name: `${FieldConstants.SETPOINTS_LIMITS}.${FieldConstants.CHARACTERISTICS_CHOICE}`
76
+ });
77
+ const minS = useWatch({ name: `${FieldConstants.SETPOINTS_LIMITS}.${FieldConstants.MIN_SUSCEPTANCE}` });
78
+ const maxS = useWatch({ name: `${FieldConstants.SETPOINTS_LIMITS}.${FieldConstants.MAX_SUSCEPTANCE}` });
79
+ const minQ = useWatch({ name: `${FieldConstants.SETPOINTS_LIMITS}.${FieldConstants.MIN_Q_AT_NOMINAL_V}` });
80
+ const maxQ = useWatch({ name: `${FieldConstants.SETPOINTS_LIMITS}.${FieldConstants.MAX_Q_AT_NOMINAL_V}` });
81
+ useEffect(() => {
82
+ setValue(`${id}.${FieldConstants.CHARACTERISTICS_CHOICE_AUTOMATON}`, watchChoiceAutomaton);
83
+ setValue(`${id}.${FieldConstants.MIN_Q_AUTOMATON}`, minQ);
84
+ setValue(`${id}.${FieldConstants.MAX_Q_AUTOMATON}`, maxQ);
85
+ setValue(`${id}.${FieldConstants.MIN_S_AUTOMATON}`, minS);
86
+ setValue(`${id}.${FieldConstants.MAX_S_AUTOMATON}`, maxS);
87
+ }, [setValue, id, watchChoiceAutomaton, minQ, maxQ, maxS, minS]);
88
+ const minSusceptanceField = /* @__PURE__ */ jsx(
89
+ TextField,
90
+ {
91
+ value: minS ?? "",
92
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "minSusceptance" }),
93
+ disabled: true,
94
+ size: "small",
95
+ slotProps: {
96
+ input: {
97
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: "S" })
98
+ }
99
+ }
100
+ }
101
+ );
102
+ const maxSusceptanceField = /* @__PURE__ */ jsx(
103
+ TextField,
104
+ {
105
+ value: maxS ?? "",
106
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "maximumSusceptance" }),
107
+ disabled: true,
108
+ size: "small",
109
+ slotProps: {
110
+ input: {
111
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: "S" })
112
+ }
113
+ }
114
+ }
115
+ );
116
+ const minQAtNominalVField = /* @__PURE__ */ jsx(
117
+ TextField,
118
+ {
119
+ value: minQ ?? "",
120
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "minQAtNominalV" }),
121
+ disabled: true,
122
+ size: "small",
123
+ slotProps: {
124
+ input: {
125
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: "Mvar" })
126
+ }
127
+ }
128
+ }
129
+ );
130
+ const maxQAtNominalVField = /* @__PURE__ */ jsx(
131
+ TextField,
132
+ {
133
+ value: maxQ ?? "",
134
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "maxQAtVnominal" }),
135
+ disabled: true,
136
+ size: "small",
137
+ slotProps: {
138
+ input: {
139
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: "Mvar" })
140
+ }
141
+ }
142
+ }
143
+ );
144
+ const susceptanceField = /* @__PURE__ */ jsx(FloatInput, { name: `${id}.${FieldConstants.B0}`, label: "b0", adornment: SusceptanceAdornment });
145
+ const qAtNominalVField = /* @__PURE__ */ jsx(FloatInput, { name: `${id}.${FieldConstants.Q0}`, label: "fixQAtNominalV", adornment: ReactivePowerAdornment });
146
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
147
+ watchChoiceAutomaton === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id && /* @__PURE__ */ jsxs(Fragment, { children: [
148
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: minSusceptanceField }),
149
+ /* @__PURE__ */ jsx(GridItem, { size: 3, children: susceptanceField }),
150
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: maxSusceptanceField })
151
+ ] }),
152
+ watchChoiceAutomaton === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id && /* @__PURE__ */ jsxs(Fragment, { children: [
153
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: minQAtNominalVField }),
154
+ /* @__PURE__ */ jsx(GridItem, { size: 3, children: qAtNominalVField }),
155
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: maxQAtNominalVField })
156
+ ] })
157
+ ] });
158
+ }
159
+ export {
160
+ SusceptanceArea
161
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './static-var-compensator-creation-form';
8
+ export * from './static-var-compensator-creation-utils';
9
+ export * from './static-var-compensator-creation.types';
@@ -0,0 +1,9 @@
1
+ import { StaticVarCompensatorCreationForm } from "./static-var-compensator-creation-form.js";
2
+ import { staticVarCompensatorCreationEmptyFormData, staticVarCompensatorCreationFormSchema, staticVarCompensatorCreationFormToDto, staticVarCompensatorDtoToForm } from "./static-var-compensator-creation-utils.js";
3
+ export {
4
+ StaticVarCompensatorCreationForm,
5
+ staticVarCompensatorCreationEmptyFormData,
6
+ staticVarCompensatorCreationFormSchema,
7
+ staticVarCompensatorCreationFormToDto,
8
+ staticVarCompensatorDtoToForm
9
+ };
@@ -0,0 +1,8 @@
1
+ import { ConnectivityNetworkProps } from '../../common';
2
+ import { EquipmentType, Identifiable } from '../../../../utils';
3
+ export interface StaticVarCompensatorCreationFormProps extends ConnectivityNetworkProps {
4
+ fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
5
+ type: EquipmentType;
6
+ })[]>;
7
+ }
8
+ export declare function StaticVarCompensatorCreationForm({ voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, fetchVoltageLevelEquipments, }: StaticVarCompensatorCreationFormProps): import("react").JSX.Element;
@@ -0,0 +1,105 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Stack, Box } from "@mui/material";
3
+ import { StaticVarCompensatorDialogTab, STATIC_VAR_COMPENSATOR_TAB_FIELDS } from "../common/static-var-compensator-tab-utils.js";
4
+ import { StaticVarCompensatorDialogHeader } from "../common/static-var-compensator-dialog-header.js";
5
+ import { StaticVarCompensatorDialogTabs } from "../common/static-var-compensator-dialog-tabs.js";
6
+ import "yup";
7
+ import "../../../../utils/conversionUtils.js";
8
+ import "../../../../utils/types/equipmentType.js";
9
+ import "@mui/icons-material";
10
+ import "react-hook-form";
11
+ import "react";
12
+ import "react-intl";
13
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
14
+ import "localized-countries";
15
+ import "localized-countries/data/fr";
16
+ import "localized-countries/data/en";
17
+ import "notistack";
18
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
19
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
20
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
21
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
22
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
23
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
24
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
25
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
26
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
27
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
28
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
29
+ import "@hello-pangea/dnd";
30
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
31
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
32
+ import "mui-nested-menu";
33
+ import "react-resizable-panels";
34
+ import "react-papaparse";
35
+ import "../../common/properties/propertyUtils.js";
36
+ import "react-dom";
37
+ import "autosuggest-highlight/match";
38
+ import "autosuggest-highlight/parse";
39
+ import "clsx";
40
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
41
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
42
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
43
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
44
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
45
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
46
+ import "react-querybuilder";
47
+ import "uuid";
48
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
49
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
50
+ import "@react-querybuilder/material";
51
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
52
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
53
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
54
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
55
+ import "ag-grid-community";
56
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
57
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
58
+ import "mathjs";
59
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
60
+ import "react-window";
61
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
62
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
63
+ import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
64
+ import "@mui/material/colors";
65
+ import "@mui/x-charts";
66
+ import "../../common/currentLimits/limitsPane.utils.js";
67
+ import "../../shunt-compensator/creation/shuntCompensatorCreation.utils.js";
68
+ import "../../shunt-compensator/modification/shuntCompensatorModification.utils.js";
69
+ import { StaticVarCompensatorTabsContent } from "../common/static-var-compensator-tabs-content.js";
70
+ import { useTabsWithError } from "../../hooks/useTabsWithError.js";
71
+ function StaticVarCompensatorCreationForm({
72
+ voltageLevelOptions,
73
+ PositionDiagramPane,
74
+ fetchBusesOrBusbarSections,
75
+ fetchVoltageLevelEquipments
76
+ }) {
77
+ const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
78
+ STATIC_VAR_COMPENSATOR_TAB_FIELDS,
79
+ StaticVarCompensatorDialogTab.CONNECTIVITY_TAB
80
+ );
81
+ return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
82
+ /* @__PURE__ */ jsx(StaticVarCompensatorDialogHeader, {}),
83
+ /* @__PURE__ */ jsx(
84
+ StaticVarCompensatorDialogTabs,
85
+ {
86
+ tabIndex,
87
+ tabIndexesWithError,
88
+ setTabIndex
89
+ }
90
+ ),
91
+ /* @__PURE__ */ jsx(Box, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden", paddingRight: 3 }, children: /* @__PURE__ */ jsx(
92
+ StaticVarCompensatorTabsContent,
93
+ {
94
+ voltageLevelOptions,
95
+ PositionDiagramPane,
96
+ fetchBusesOrBusbarSections,
97
+ fetchVoltageLevelEquipments,
98
+ tabIndex
99
+ }
100
+ ) })
101
+ ] });
102
+ }
103
+ export {
104
+ StaticVarCompensatorCreationForm
105
+ };
@@ -0,0 +1,114 @@
1
+ import { InferType } from 'yup';
2
+ import { StaticVarCompensatorCreationDto } from './static-var-compensator-creation.types';
3
+ import { StaticVarCompensatorDto } from '../common';
4
+ /**
5
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
6
+ * This Source Code Form is subject to the terms of the Mozilla Public
7
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ */
10
+ import * as yup from 'yup';
11
+ export declare const staticVarCompensatorCreationEmptyFormData: {
12
+ AdditionalProperties?: import('../..').Property[];
13
+ equipmentID: string;
14
+ equipmentName: string;
15
+ };
16
+ export declare const staticVarCompensatorCreationFormSchema: yup.ObjectSchema<NonNullable<{
17
+ equipmentID: string;
18
+ equipmentName: string | null | undefined;
19
+ connectivity: {
20
+ terminalConnected?: boolean | null | undefined;
21
+ connectionDirection?: string | null | undefined;
22
+ connectionName?: string | undefined;
23
+ connectionPosition?: number | null | undefined;
24
+ busOrBusbarSection: {
25
+ id?: string | undefined;
26
+ } | null;
27
+ voltageLevel: {
28
+ id?: string | undefined;
29
+ } | null;
30
+ };
31
+ setpointsLimits: {
32
+ minQAtNominalV?: number | null | undefined;
33
+ maxQAtNominalV?: number | null | undefined;
34
+ minSusceptance?: number | null | undefined;
35
+ maxSusceptance?: number | null | undefined;
36
+ reactivePowerSetpoint?: number | null | undefined;
37
+ voltageSetpoint?: number | null | undefined;
38
+ characteristicsChoice: string;
39
+ equipment: {
40
+ id: string;
41
+ type: string;
42
+ } | null;
43
+ voltageLevel: {
44
+ id: string;
45
+ } | null;
46
+ voltageRegulationType: string;
47
+ voltageRegulationMode: string;
48
+ };
49
+ automaton: {
50
+ addStandbyAutomaton?: boolean | null | undefined;
51
+ lowVoltageSetpoint?: number | null | undefined;
52
+ highVoltageSetpoint?: number | null | undefined;
53
+ lowVoltageThreshold?: number | null | undefined;
54
+ highVoltageThreshold?: number | null | undefined;
55
+ StandbyAutomaton?: boolean | null | undefined;
56
+ b0?: number | null | undefined;
57
+ q0?: number | null | undefined;
58
+ };
59
+ } & {
60
+ AdditionalProperties: {
61
+ previousValue?: string | null | undefined;
62
+ added: NonNullable<boolean | undefined>;
63
+ deletionMark: NonNullable<boolean | undefined>;
64
+ name: string;
65
+ value: string;
66
+ }[] | undefined;
67
+ }>, yup.AnyObject, {
68
+ equipmentID: undefined;
69
+ equipmentName: undefined;
70
+ connectivity: {
71
+ voltageLevel: {
72
+ id: undefined;
73
+ };
74
+ busOrBusbarSection: {
75
+ id: undefined;
76
+ };
77
+ connectionDirection: undefined;
78
+ connectionName: undefined;
79
+ connectionPosition: undefined;
80
+ terminalConnected: undefined;
81
+ };
82
+ setpointsLimits: {
83
+ maxSusceptance: undefined;
84
+ minSusceptance: undefined;
85
+ maxQAtNominalV: undefined;
86
+ minQAtNominalV: undefined;
87
+ voltageSetpoint: undefined;
88
+ reactivePowerSetpoint: undefined;
89
+ characteristicsChoice: undefined;
90
+ voltageRegulationMode: undefined;
91
+ voltageRegulationType: undefined;
92
+ voltageLevel: {
93
+ id: undefined;
94
+ };
95
+ equipment: {
96
+ id: undefined;
97
+ type: undefined;
98
+ };
99
+ };
100
+ automaton: {
101
+ addStandbyAutomaton: undefined;
102
+ StandbyAutomaton: undefined;
103
+ lowVoltageSetpoint: undefined;
104
+ highVoltageSetpoint: undefined;
105
+ lowVoltageThreshold: undefined;
106
+ highVoltageThreshold: undefined;
107
+ b0: undefined;
108
+ q0: undefined;
109
+ };
110
+ AdditionalProperties: "";
111
+ }, "">;
112
+ export type StaticVarCompensatorCreationFormData = InferType<typeof staticVarCompensatorCreationFormSchema>;
113
+ export declare const staticVarCompensatorDtoToForm: (staticCompensator: StaticVarCompensatorDto) => StaticVarCompensatorCreationFormData;
114
+ export declare const staticVarCompensatorCreationFormToDto: (formData: StaticVarCompensatorCreationFormData) => StaticVarCompensatorCreationDto;
@@ -0,0 +1,189 @@
1
+ import * as yup from "yup";
2
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
3
+ import "../../../../utils/conversionUtils.js";
4
+ import { UNDEFINED_CONNECTION_DIRECTION } from "../../../../utils/types/equipmentType.js";
5
+ import { ModificationType } from "../../../../utils/types/modificationType.js";
6
+ import "react/jsx-runtime";
7
+ import "@mui/icons-material";
8
+ import { sanitizeString } from "../../../../utils/ts-utils.js";
9
+ import "react";
10
+ import "react-hook-form";
11
+ import { creationPropertiesSchema, emptyProperties, toModificationProperties, getFilledPropertiesFromModification } from "../../common/properties/propertyUtils.js";
12
+ import "@mui/material";
13
+ import "react-intl";
14
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
15
+ import "localized-countries";
16
+ import "localized-countries/data/fr";
17
+ import "localized-countries/data/en";
18
+ import "notistack";
19
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
20
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
21
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
22
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
23
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
24
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
25
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
26
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
27
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
28
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
29
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
30
+ import "@hello-pangea/dnd";
31
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
32
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
33
+ import "mui-nested-menu";
34
+ import "react-resizable-panels";
35
+ import "react-papaparse";
36
+ import "react-dom";
37
+ import "autosuggest-highlight/match";
38
+ import "autosuggest-highlight/parse";
39
+ import "clsx";
40
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
41
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
42
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
43
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
44
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
45
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
46
+ import "react-querybuilder";
47
+ import "uuid";
48
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
49
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
50
+ import "@react-querybuilder/material";
51
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
52
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
53
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
54
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
55
+ import "ag-grid-community";
56
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
57
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
58
+ import "mathjs";
59
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
60
+ import "react-window";
61
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
62
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
63
+ import { getConnectivityWithPositionEmptyFormData, getConnectivityWithPositionSchema, getConnectivityFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
64
+ import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
65
+ import { REGULATION_TYPES } from "../../common/voltageRegulation/voltageRegulation.utils.js";
66
+ import "@mui/material/colors";
67
+ import "@mui/x-charts";
68
+ import "../../common/currentLimits/limitsPane.utils.js";
69
+ import { getReactiveFormEmptyFormData, getReactiveFormValidationSchema, getReactiveFormData } from "../common/set-points-limits-form-utils.js";
70
+ import { getStandbyAutomatonEmptyFormData, getStandbyAutomatonFormValidationSchema, getStandbyAutomatonFormData } from "../common/standby-automaton-form-utils.js";
71
+ import { CHARACTERISTICS_CHOICES } from "../../shunt-compensator/common/shuntCompensator.utils.js";
72
+ import "../../shunt-compensator/creation/shuntCompensatorCreation.utils.js";
73
+ import "../../shunt-compensator/modification/shuntCompensatorModification.utils.js";
74
+ import "../common/static-var-compensator-tab-utils.js";
75
+ import { VOLTAGE_REGULATION_MODES } from "../common/constants.js";
76
+ const staticVarCompensatorCreationEmptyFormData = {
77
+ [FieldConstants.EQUIPMENT_ID]: "",
78
+ [FieldConstants.EQUIPMENT_NAME]: "",
79
+ ...getConnectivityWithPositionEmptyFormData(),
80
+ ...getReactiveFormEmptyFormData(),
81
+ ...getStandbyAutomatonEmptyFormData(),
82
+ ...emptyProperties
83
+ };
84
+ const staticVarCompensatorCreationFormSchema = yup.object().shape({
85
+ [FieldConstants.EQUIPMENT_ID]: yup.string().required(),
86
+ [FieldConstants.EQUIPMENT_NAME]: yup.string().nullable(),
87
+ [FieldConstants.CONNECTIVITY]: getConnectivityWithPositionSchema(false),
88
+ [FieldConstants.SETPOINTS_LIMITS]: getReactiveFormValidationSchema(),
89
+ [FieldConstants.AUTOMATON]: getStandbyAutomatonFormValidationSchema()
90
+ }).concat(creationPropertiesSchema).required();
91
+ const staticVarCompensatorDtoToForm = (staticCompensator) => {
92
+ return {
93
+ [FieldConstants.EQUIPMENT_ID]: staticCompensator.equipmentId,
94
+ [FieldConstants.EQUIPMENT_NAME]: staticCompensator.equipmentName ?? "",
95
+ [FieldConstants.CONNECTIVITY]: getConnectivityFormDataProps({
96
+ voltageLevelId: staticCompensator.voltageLevelId,
97
+ busbarSectionId: staticCompensator.busOrBusbarSectionId,
98
+ connectionDirection: staticCompensator.connectionDirection,
99
+ connectionName: staticCompensator.connectionName,
100
+ connectionPosition: staticCompensator.connectionPosition,
101
+ terminalConnected: staticCompensator.terminalConnected,
102
+ isEquipmentModification: false
103
+ }),
104
+ ...getReactiveFormData({
105
+ maxSusceptance: staticCompensator.maxSusceptance,
106
+ minSusceptance: staticCompensator.minSusceptance,
107
+ nominalV: null,
108
+ maxQAtNominalV: staticCompensator.maxQAtNominalV,
109
+ minQAtNominalV: staticCompensator.minQAtNominalV,
110
+ regulationMode: staticCompensator.isRegulating ? staticCompensator.regulationMode : VOLTAGE_REGULATION_MODES.OFF.id,
111
+ voltageSetpoint: staticCompensator.voltageSetpoint,
112
+ reactivePowerSetpoint: staticCompensator.reactivePowerSetpoint,
113
+ voltageRegulationType: staticCompensator?.regulatingTerminalId || staticCompensator?.regulatingTerminalConnectableId ? REGULATION_TYPES.DISTANT.id : REGULATION_TYPES.LOCAL.id,
114
+ voltageLevelId: staticCompensator.regulatingTerminalVlId,
115
+ equipmentType: staticCompensator.regulatingTerminalType,
116
+ equipmentId: staticCompensator.regulatingTerminalConnectableId || staticCompensator.regulatingTerminalId
117
+ }),
118
+ ...getStandbyAutomatonFormData({
119
+ addStandbyAutomaton: staticCompensator.standbyAutomatonOn,
120
+ standby: staticCompensator.standby,
121
+ b0: staticCompensator.b0,
122
+ q0: staticCompensator.q0,
123
+ lowVoltageSetpoint: staticCompensator.lowVoltageSetpoint,
124
+ highVoltageSetpoint: staticCompensator.highVoltageSetpoint,
125
+ lowVoltageThreshold: staticCompensator.lowVoltageThreshold,
126
+ highVoltageThreshold: staticCompensator.highVoltageThreshold
127
+ }),
128
+ [FieldConstants.ADDITIONAL_PROPERTIES]: getFilledPropertiesFromModification(staticCompensator.properties)
129
+ };
130
+ };
131
+ const getValueIf = (condition, value) => {
132
+ return condition ? value ?? null : null;
133
+ };
134
+ const staticVarCompensatorCreationFormToDto = (formData) => {
135
+ const { connectivity, setpointsLimits, automaton } = formData;
136
+ const { characteristicsChoice, voltageRegulationMode, equipment: regulationEquipment } = setpointsLimits;
137
+ const { addStandbyAutomaton } = automaton;
138
+ const isDistantRegulation = setpointsLimits.voltageRegulationType === REGULATION_TYPES.DISTANT.id;
139
+ return {
140
+ type: ModificationType.STATIC_VAR_COMPENSATOR_CREATION,
141
+ equipmentId: formData.equipmentID,
142
+ equipmentName: sanitizeString(formData.equipmentName),
143
+ voltageLevelId: connectivity.voltageLevel?.id ?? null,
144
+ busOrBusbarSectionId: connectivity.busOrBusbarSection?.id ?? null,
145
+ connectionName: sanitizeString(formData.connectivity.connectionName),
146
+ connectionDirection: connectivity.connectionDirection ?? UNDEFINED_CONNECTION_DIRECTION,
147
+ connectionPosition: connectivity.connectionPosition ?? null,
148
+ terminalConnected: connectivity.terminalConnected,
149
+ maxSusceptance: getValueIf(
150
+ characteristicsChoice === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id,
151
+ setpointsLimits.maxSusceptance
152
+ ),
153
+ minSusceptance: getValueIf(
154
+ characteristicsChoice === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id,
155
+ setpointsLimits.minSusceptance
156
+ ),
157
+ maxQAtNominalV: getValueIf(
158
+ characteristicsChoice === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id,
159
+ setpointsLimits.maxQAtNominalV
160
+ ),
161
+ minQAtNominalV: getValueIf(
162
+ characteristicsChoice === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id,
163
+ setpointsLimits.minQAtNominalV
164
+ ),
165
+ regulationMode: voltageRegulationMode === VOLTAGE_REGULATION_MODES.OFF.id ? null : voltageRegulationMode,
166
+ isRegulating: voltageRegulationMode !== VOLTAGE_REGULATION_MODES.OFF.id,
167
+ voltageSetpoint: setpointsLimits.voltageSetpoint ?? null,
168
+ reactivePowerSetpoint: setpointsLimits.reactivePowerSetpoint ?? null,
169
+ voltageRegulationType: setpointsLimits.voltageRegulationType,
170
+ regulatingTerminalId: getValueIf(isDistantRegulation, regulationEquipment?.id),
171
+ regulatingTerminalType: getValueIf(isDistantRegulation, regulationEquipment?.type),
172
+ regulatingTerminalVlId: getValueIf(isDistantRegulation, setpointsLimits.voltageLevel?.id),
173
+ standbyAutomatonOn: addStandbyAutomaton ?? null,
174
+ standby: automaton.StandbyAutomaton ?? null,
175
+ lowVoltageSetpoint: getValueIf(addStandbyAutomaton, automaton.lowVoltageSetpoint),
176
+ highVoltageSetpoint: getValueIf(addStandbyAutomaton, automaton.highVoltageSetpoint),
177
+ lowVoltageThreshold: getValueIf(addStandbyAutomaton, automaton.lowVoltageThreshold),
178
+ highVoltageThreshold: getValueIf(addStandbyAutomaton, automaton.highVoltageThreshold),
179
+ b0: addStandbyAutomaton && characteristicsChoice === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id ? automaton.b0 ?? null : null,
180
+ q0: addStandbyAutomaton && characteristicsChoice === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id ? automaton.q0 ?? null : null,
181
+ properties: toModificationProperties(formData)
182
+ };
183
+ };
184
+ export {
185
+ staticVarCompensatorCreationEmptyFormData,
186
+ staticVarCompensatorCreationFormSchema,
187
+ staticVarCompensatorCreationFormToDto,
188
+ staticVarCompensatorDtoToForm
189
+ };
@@ -0,0 +1,34 @@
1
+ import { Property } from '../../common';
2
+ import { ModificationType } from '../../../../utils';
3
+ export interface StaticVarCompensatorCreationDto {
4
+ type: ModificationType.STATIC_VAR_COMPENSATOR_CREATION;
5
+ equipmentId: string;
6
+ equipmentName?: string | null;
7
+ voltageLevelId: string | null;
8
+ busOrBusbarSectionId?: string | null;
9
+ connectionDirection?: string | null;
10
+ connectionName?: string | null;
11
+ connectionPosition?: number | null;
12
+ terminalConnected?: boolean | null;
13
+ maxSusceptance: number | null;
14
+ minSusceptance: number | null;
15
+ maxQAtNominalV: number | null;
16
+ minQAtNominalV: number | null;
17
+ regulationMode: string | null;
18
+ isRegulating: boolean;
19
+ voltageSetpoint: number | null;
20
+ reactivePowerSetpoint: number | null;
21
+ voltageRegulationType: string;
22
+ regulatingTerminalId: string | null;
23
+ regulatingTerminalType: string | null;
24
+ regulatingTerminalVlId: string | null;
25
+ standbyAutomatonOn: boolean | null;
26
+ standby: boolean | null;
27
+ lowVoltageSetpoint: number | null;
28
+ highVoltageSetpoint: number | null;
29
+ lowVoltageThreshold: number | null;
30
+ highVoltageThreshold: number | null;
31
+ b0: number | null;
32
+ q0: number | null;
33
+ properties?: Property[] | null;
34
+ }
@@ -0,0 +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 * from './common';
8
+ export * from './creation';