@gridsuite/commons-ui 0.267.0 → 0.269.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 (109) hide show
  1. package/dist/components/composite/agGridTable/BottomTableButtons.js +1 -1
  2. package/dist/components/composite/grid/grid-section.d.ts +5 -2
  3. package/dist/components/composite/grid/grid-section.js +56 -4
  4. package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +1 -1
  5. package/dist/components/ui/reactHookForm/booleans/BooleanInput.js +1 -1
  6. package/dist/features/common/index.d.ts +7 -0
  7. package/dist/features/common/index.js +4 -0
  8. package/dist/features/common/renderTable-ExportCsv.d.ts +18 -0
  9. package/dist/features/common/renderTable-ExportCsv.js +136 -0
  10. package/dist/features/index.d.ts +5 -0
  11. package/dist/features/index.js +43 -2
  12. package/dist/features/network-modifications/index.d.ts +1 -0
  13. package/dist/features/network-modifications/index.js +33 -1
  14. package/dist/features/network-modifications/static-var-compensator/common/constants.d.ts +20 -0
  15. package/dist/features/network-modifications/static-var-compensator/common/constants.js +9 -0
  16. package/dist/features/network-modifications/static-var-compensator/common/index.d.ts +13 -0
  17. package/dist/features/network-modifications/static-var-compensator/common/index.js +20 -0
  18. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form-utils.d.ts +91 -0
  19. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form-utils.js +166 -0
  20. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.d.ts +8 -0
  21. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.js +200 -0
  22. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form-utils.d.ts +66 -0
  23. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form-utils.js +149 -0
  24. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.d.ts +7 -0
  25. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.js +153 -0
  26. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-header.d.ts +7 -0
  27. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-header.js +72 -0
  28. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.d.ts +7 -0
  29. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js +44 -0
  30. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tab-utils.d.ts +8 -0
  31. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tab-utils.js +34 -0
  32. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.d.ts +9 -0
  33. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.js +100 -0
  34. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator.types.d.ts +68 -0
  35. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator.types.js +1 -0
  36. package/dist/features/network-modifications/static-var-compensator/common/susceptance-area.d.ts +7 -0
  37. package/dist/features/network-modifications/static-var-compensator/common/susceptance-area.js +161 -0
  38. package/dist/features/network-modifications/static-var-compensator/creation/index.d.ts +9 -0
  39. package/dist/features/network-modifications/static-var-compensator/creation/index.js +9 -0
  40. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.d.ts +8 -0
  41. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.js +105 -0
  42. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-utils.d.ts +114 -0
  43. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-utils.js +189 -0
  44. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation.types.d.ts +34 -0
  45. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation.types.js +1 -0
  46. package/dist/features/network-modifications/static-var-compensator/index.d.ts +8 -0
  47. package/dist/features/network-modifications/static-var-compensator/index.js +27 -0
  48. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-form.d.ts +8 -0
  49. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-form.js +153 -0
  50. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-utils.d.ts +20 -0
  51. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-utils.js +40 -0
  52. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation.types.d.ts +11 -0
  53. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation.types.js +1 -0
  54. package/dist/features/network-modifications/voltageLevel/coupling-device/index.d.ts +3 -0
  55. package/dist/features/network-modifications/voltageLevel/coupling-device/index.js +9 -0
  56. package/dist/features/network-modifications/voltageLevel/creation/index.js +1 -1
  57. package/dist/features/network-modifications/voltageLevel/index.d.ts +1 -0
  58. package/dist/features/network-modifications/voltageLevel/index.js +8 -1
  59. package/dist/features/network-modifications/voltageLevel/topology/CreateVoltageLevelTopologyForm.js +12 -2
  60. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.types.d.ts +1 -1
  61. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.utils.d.ts +3 -3
  62. package/dist/features/parameters/loadflow/load-flow-provider-specific-parameters.js +10 -1
  63. package/dist/features/results/constants.d.ts +7 -0
  64. package/dist/features/results/constants.js +4 -0
  65. package/dist/features/results/hooks/index.d.ts +7 -0
  66. package/dist/features/results/hooks/index.js +4 -0
  67. package/dist/features/results/hooks/useIntlResultStatusMessages.d.ts +19 -0
  68. package/dist/features/results/hooks/useIntlResultStatusMessages.js +23 -0
  69. package/dist/features/results/loadflow/index.d.ts +8 -0
  70. package/dist/features/results/loadflow/index.js +4 -0
  71. package/dist/features/results/loadflow/limit-violation-result.d.ts +2 -0
  72. package/dist/features/results/loadflow/limit-violation-result.js +134 -0
  73. package/dist/features/results/loadflow/load-flow-result.type.d.ts +29 -0
  74. package/dist/features/results/loadflow/load-flow-result.type.js +1 -0
  75. package/dist/features/results/securityanalysis/index.js +1 -2
  76. package/dist/features/results/securityanalysis/security-analysis-result-nmk.js +2 -1
  77. package/dist/features/results/securityanalysis/utils.d.ts +0 -2
  78. package/dist/features/results/securityanalysis/utils.js +0 -22
  79. package/dist/features/results/utils/index.d.ts +7 -0
  80. package/dist/features/results/utils/index.js +4 -0
  81. package/dist/features/results/utils/no-rows-message.d.ts +2 -0
  82. package/dist/features/results/utils/no-rows-message.js +24 -0
  83. package/dist/features/topBar/TopBar.js +2 -2
  84. package/dist/hooks/index.d.ts +1 -0
  85. package/dist/hooks/index.js +2 -0
  86. package/dist/hooks/useOpenLoaderShortWait.d.ts +18 -0
  87. package/dist/hooks/useOpenLoaderShortWait.js +19 -0
  88. package/dist/index.js +50 -1
  89. package/dist/translations/en/businessErrorsEn.d.ts +14 -0
  90. package/dist/translations/en/businessErrorsEn.js +15 -1
  91. package/dist/translations/en/index.d.ts +1 -0
  92. package/dist/translations/en/index.js +2 -0
  93. package/dist/translations/en/networkModificationsEn.d.ts +28 -0
  94. package/dist/translations/en/networkModificationsEn.js +30 -1
  95. package/dist/translations/en/specificParameters.d.ts +96 -0
  96. package/dist/translations/en/specificParameters.js +95 -0
  97. package/dist/translations/fr/businessErrorsFr.d.ts +14 -0
  98. package/dist/translations/fr/businessErrorsFr.js +15 -1
  99. package/dist/translations/fr/index.d.ts +1 -0
  100. package/dist/translations/fr/index.js +2 -0
  101. package/dist/translations/fr/networkModificationsFr.d.ts +28 -0
  102. package/dist/translations/fr/networkModificationsFr.js +30 -1
  103. package/dist/translations/fr/specificParameters.d.ts +96 -0
  104. package/dist/translations/fr/specificParameters.js +95 -0
  105. package/dist/utils/constants/fieldConstants.d.ts +19 -1
  106. package/dist/utils/constants/fieldConstants.js +18 -0
  107. package/dist/utils/index.d.ts +1 -0
  108. package/dist/utils/index.js +2 -0
  109. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ import { StaticVarCompensatorDialogHeader } from "./static-var-compensator-dialog-header.js";
2
+ import { StaticVarCompensatorDialogTabs } from "./static-var-compensator-dialog-tabs.js";
3
+ import { STATIC_VAR_COMPENSATOR_TAB_FIELDS, StaticVarCompensatorDialogTab } from "./static-var-compensator-tab-utils.js";
4
+ import { VOLTAGE_REGULATION_MODES } from "./constants.js";
5
+ import { getReactiveFormData, getReactiveFormEmptyFormData, getReactiveFormValidationSchema } from "./set-points-limits-form-utils.js";
6
+ import { computeQ0, getStandbyAutomatonEmptyFormData, getStandbyAutomatonFormData, getStandbyAutomatonFormValidationSchema } from "./standby-automaton-form-utils.js";
7
+ export {
8
+ STATIC_VAR_COMPENSATOR_TAB_FIELDS,
9
+ StaticVarCompensatorDialogHeader,
10
+ StaticVarCompensatorDialogTab,
11
+ StaticVarCompensatorDialogTabs,
12
+ VOLTAGE_REGULATION_MODES,
13
+ computeQ0,
14
+ getReactiveFormData,
15
+ getReactiveFormEmptyFormData,
16
+ getReactiveFormValidationSchema,
17
+ getStandbyAutomatonEmptyFormData,
18
+ getStandbyAutomatonFormData,
19
+ getStandbyAutomatonFormValidationSchema
20
+ };
@@ -0,0 +1,91 @@
1
+ import { FieldConstants } from '../../../../utils';
2
+ /**
3
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ import * as yup from 'yup';
9
+ export declare const getReactiveFormEmptyFormData: (id?: FieldConstants) => {
10
+ [x: string]: {
11
+ maxSusceptance: null;
12
+ minSusceptance: null;
13
+ maxQAtNominalV: null;
14
+ minQAtNominalV: null;
15
+ voltageSetpoint: null;
16
+ reactivePowerSetpoint: null;
17
+ characteristicsChoice: "Q_AT_NOMINAL_V";
18
+ voltageRegulationMode: "OFF";
19
+ voltageRegulationType: "LOCAL";
20
+ voltageLevel: null;
21
+ equipment: null;
22
+ };
23
+ };
24
+ export declare const getReactiveFormValidationSchema: () => yup.ObjectSchema<{
25
+ maxSusceptance: number | null | undefined;
26
+ minSusceptance: number | null | undefined;
27
+ maxQAtNominalV: number | null | undefined;
28
+ minQAtNominalV: number | null | undefined;
29
+ voltageSetpoint: number | null | undefined;
30
+ reactivePowerSetpoint: number | null | undefined;
31
+ characteristicsChoice: string;
32
+ voltageRegulationMode: string;
33
+ voltageRegulationType: string;
34
+ voltageLevel: {
35
+ id: string;
36
+ } | null;
37
+ equipment: {
38
+ id: string;
39
+ type: string;
40
+ } | null;
41
+ }, yup.AnyObject, {
42
+ maxSusceptance: undefined;
43
+ minSusceptance: undefined;
44
+ maxQAtNominalV: undefined;
45
+ minQAtNominalV: undefined;
46
+ voltageSetpoint: undefined;
47
+ reactivePowerSetpoint: undefined;
48
+ characteristicsChoice: undefined;
49
+ voltageRegulationMode: undefined;
50
+ voltageRegulationType: undefined;
51
+ voltageLevel: {
52
+ id: undefined;
53
+ };
54
+ equipment: {
55
+ id: undefined;
56
+ type: undefined;
57
+ };
58
+ }, "">;
59
+ export declare const getReactiveFormData: ({ maxSusceptance, minSusceptance, nominalV, maxQAtNominalV, minQAtNominalV, regulationMode, voltageSetpoint, reactivePowerSetpoint, voltageRegulationType, voltageLevelId, equipmentType, equipmentId, }: {
60
+ maxSusceptance: number | null;
61
+ minSusceptance: number | null;
62
+ nominalV?: number | null;
63
+ maxQAtNominalV?: number | null;
64
+ minQAtNominalV?: number | null;
65
+ regulationMode: string;
66
+ voltageSetpoint: number | null;
67
+ reactivePowerSetpoint: number | null;
68
+ voltageRegulationType: string;
69
+ voltageLevelId: string | null;
70
+ equipmentType: string | null;
71
+ equipmentId: string | null;
72
+ }) => {
73
+ setpointsLimits: {
74
+ characteristicsChoice: "Q_AT_NOMINAL_V" | "SUSCEPTANCE";
75
+ voltageRegulationMode: string;
76
+ maxSusceptance: number | null;
77
+ minSusceptance: number | null;
78
+ maxQAtNominalV: number | null | undefined;
79
+ minQAtNominalV: number | null | undefined;
80
+ voltageSetpoint: number | null;
81
+ reactivePowerSetpoint: number | null;
82
+ voltageRegulationType: string;
83
+ voltageLevel: {
84
+ id: string;
85
+ } | null;
86
+ equipment: {
87
+ id: string;
88
+ type: string;
89
+ } | null;
90
+ };
91
+ };
@@ -0,0 +1,166 @@
1
+ import * as yup from "yup";
2
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
3
+ import { MUST_BE_GREATER_OR_EQUAL_TO_ZERO } from "../../../../utils/constants/translationKeys.js";
4
+ import "../../../../utils/conversionUtils.js";
5
+ import "../../../../utils/types/equipmentType.js";
6
+ import "react/jsx-runtime";
7
+ import "@mui/icons-material";
8
+ import { CHARACTERISTICS_CHOICES } from "../../shunt-compensator/common/shuntCompensator.utils.js";
9
+ import "@mui/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 { REGULATION_TYPES } from "../../common/voltageRegulation/voltageRegulation.utils.js";
65
+ import "@mui/material/colors";
66
+ import "@mui/x-charts";
67
+ import "../../common/currentLimits/limitsPane.utils.js";
68
+ import "../../shunt-compensator/creation/shuntCompensatorCreation.utils.js";
69
+ import "../../shunt-compensator/modification/shuntCompensatorModification.utils.js";
70
+ import { VOLTAGE_REGULATION_MODES } from "./constants.js";
71
+ const getReactiveFormEmptyFormData = (id = FieldConstants.SETPOINTS_LIMITS) => ({
72
+ [id]: {
73
+ [FieldConstants.MAX_SUSCEPTANCE]: null,
74
+ [FieldConstants.MIN_SUSCEPTANCE]: null,
75
+ [FieldConstants.MAX_Q_AT_NOMINAL_V]: null,
76
+ [FieldConstants.MIN_Q_AT_NOMINAL_V]: null,
77
+ [FieldConstants.VOLTAGE_SET_POINT]: null,
78
+ [FieldConstants.REACTIVE_POWER_SET_POINT]: null,
79
+ [FieldConstants.CHARACTERISTICS_CHOICE]: CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id,
80
+ [FieldConstants.VOLTAGE_REGULATION_MODE]: VOLTAGE_REGULATION_MODES.OFF.id,
81
+ [FieldConstants.VOLTAGE_REGULATION_TYPE]: REGULATION_TYPES.LOCAL.id,
82
+ [FieldConstants.VOLTAGE_LEVEL]: null,
83
+ [FieldConstants.EQUIPMENT]: null
84
+ }
85
+ });
86
+ const requiredWhenSusceptanceChoice = (baseSchema) => baseSchema.when([FieldConstants.CHARACTERISTICS_CHOICE], {
87
+ is: (characteristicsChoice) => characteristicsChoice === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id,
88
+ then: (schema) => schema.required(),
89
+ otherwise: (schema) => schema.notRequired()
90
+ });
91
+ const requiredWhenQatNominalVChoice = (baseSchema) => baseSchema.when([FieldConstants.CHARACTERISTICS_CHOICE], {
92
+ is: (characteristicsChoice) => characteristicsChoice === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id,
93
+ then: (schema) => schema.required(),
94
+ otherwise: (schema) => schema.notRequired()
95
+ });
96
+ const requiredWhenDistantVoltageMode = (baseSchema) => baseSchema.when([FieldConstants.VOLTAGE_REGULATION_MODE, FieldConstants.VOLTAGE_REGULATION_TYPE], {
97
+ is: (voltageRegulationMode, voltageRegulationType) => voltageRegulationMode === VOLTAGE_REGULATION_MODES.VOLTAGE.id && voltageRegulationType === REGULATION_TYPES.DISTANT.id,
98
+ then: (schema) => schema.required()
99
+ });
100
+ const getReactiveFormValidationSchema = () => yup.object().shape({
101
+ [FieldConstants.MAX_SUSCEPTANCE]: requiredWhenSusceptanceChoice(yup.number().nullable()),
102
+ [FieldConstants.MIN_SUSCEPTANCE]: requiredWhenSusceptanceChoice(yup.number().nullable()),
103
+ [FieldConstants.MAX_Q_AT_NOMINAL_V]: requiredWhenQatNominalVChoice(yup.number().nullable()),
104
+ [FieldConstants.MIN_Q_AT_NOMINAL_V]: requiredWhenQatNominalVChoice(yup.number().nullable()),
105
+ [FieldConstants.VOLTAGE_SET_POINT]: yup.number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).when([FieldConstants.VOLTAGE_REGULATION_MODE], {
106
+ is: (voltageRegulationMode) => voltageRegulationMode === VOLTAGE_REGULATION_MODES.VOLTAGE.id,
107
+ then: (schema) => schema.required(),
108
+ otherwise: (schema) => schema.notRequired()
109
+ }),
110
+ [FieldConstants.REACTIVE_POWER_SET_POINT]: yup.number().nullable().when([FieldConstants.VOLTAGE_REGULATION_MODE], {
111
+ is: (voltageRegulationMode) => voltageRegulationMode === VOLTAGE_REGULATION_MODES.REACTIVE_POWER.id,
112
+ then: (schema) => schema.required(),
113
+ otherwise: (schema) => schema.notRequired()
114
+ }),
115
+ [FieldConstants.CHARACTERISTICS_CHOICE]: yup.string().required(),
116
+ [FieldConstants.VOLTAGE_REGULATION_MODE]: yup.string().required(),
117
+ [FieldConstants.VOLTAGE_REGULATION_TYPE]: yup.string().required(),
118
+ [FieldConstants.VOLTAGE_LEVEL]: requiredWhenDistantVoltageMode(
119
+ yup.object().nullable().shape({
120
+ [FieldConstants.ID]: yup.string().required()
121
+ })
122
+ ),
123
+ [FieldConstants.EQUIPMENT]: requiredWhenDistantVoltageMode(
124
+ yup.object().nullable().shape({
125
+ [FieldConstants.ID]: yup.string().required(),
126
+ [FieldConstants.TYPE]: yup.string().required()
127
+ })
128
+ )
129
+ });
130
+ const getReactiveFormData = ({
131
+ maxSusceptance,
132
+ minSusceptance,
133
+ nominalV,
134
+ maxQAtNominalV,
135
+ minQAtNominalV,
136
+ regulationMode,
137
+ voltageSetpoint,
138
+ reactivePowerSetpoint,
139
+ voltageRegulationType,
140
+ voltageLevelId,
141
+ equipmentType,
142
+ equipmentId
143
+ }) => ({
144
+ [FieldConstants.SETPOINTS_LIMITS]: {
145
+ [FieldConstants.CHARACTERISTICS_CHOICE]: nominalV != null || minSusceptance == null ? CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id : CHARACTERISTICS_CHOICES.SUSCEPTANCE.id,
146
+ [FieldConstants.VOLTAGE_REGULATION_MODE]: regulationMode,
147
+ [FieldConstants.MAX_SUSCEPTANCE]: maxSusceptance,
148
+ [FieldConstants.MIN_SUSCEPTANCE]: minSusceptance,
149
+ [FieldConstants.MAX_Q_AT_NOMINAL_V]: nominalV != null && maxSusceptance != null ? maxSusceptance * nominalV ** 2 : maxQAtNominalV,
150
+ [FieldConstants.MIN_Q_AT_NOMINAL_V]: nominalV != null && minSusceptance != null ? minSusceptance * nominalV ** 2 : minQAtNominalV,
151
+ [FieldConstants.VOLTAGE_SET_POINT]: voltageSetpoint,
152
+ [FieldConstants.REACTIVE_POWER_SET_POINT]: reactivePowerSetpoint,
153
+ [FieldConstants.VOLTAGE_REGULATION_TYPE]: voltageRegulationType,
154
+ [FieldConstants.VOLTAGE_LEVEL]: voltageLevelId ? { [FieldConstants.ID]: voltageLevelId } : null,
155
+ [FieldConstants.EQUIPMENT]: equipmentId && equipmentType ? {
156
+ [FieldConstants.ID]: equipmentId,
157
+ [FieldConstants.TYPE]: equipmentType
158
+ } : null
159
+ // set null because this object field is conditionally required, see in schema
160
+ }
161
+ });
162
+ export {
163
+ getReactiveFormData,
164
+ getReactiveFormEmptyFormData,
165
+ getReactiveFormValidationSchema
166
+ };
@@ -0,0 +1,8 @@
1
+ import { EquipmentType, Identifiable } from '../../../../utils';
2
+ export interface SetPointsLimitsFormProps {
3
+ voltageLevelOptions: Identifiable[];
4
+ fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
5
+ type: EquipmentType;
6
+ })[]>;
7
+ }
8
+ export declare function SetPointsLimitsForm({ voltageLevelOptions, fetchVoltageLevelEquipments, }: Readonly<SetPointsLimitsFormProps>): import("react").JSX.Element;
@@ -0,0 +1,200 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { Grid } from "@mui/material";
3
+ import { useWatch } from "react-hook-form";
4
+ import { FormattedMessage } from "react-intl";
5
+ import { SusceptanceAdornment, ReactivePowerAdornment, VoltageAdornment } from "../../../../utils/constants/adornments.js";
6
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
7
+ import "../../../../utils/conversionUtils.js";
8
+ import { EquipmentType } from "../../../../utils/types/equipmentType.js";
9
+ import "@mui/icons-material";
10
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
11
+ import "react";
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 { SelectInput } from "../../../../components/ui/reactHookForm/selectInputs/SelectInput.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 { GridItem } from "../../../../components/composite/grid/grid-item.js";
51
+ import { GridSection } from "../../../../components/composite/grid/grid-section.js";
52
+ import "@react-querybuilder/material";
53
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
54
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
55
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
56
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
57
+ import "ag-grid-community";
58
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
59
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
60
+ import "mathjs";
61
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
62
+ import "react-window";
63
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
64
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
65
+ import "../../common/properties/propertyUtils.js";
66
+ import { RegulatingTerminalForm } from "../../common/regulatingTerminal/RegulatingTerminalForm.js";
67
+ import { REGULATION_TYPES } from "../../common/voltageRegulation/voltageRegulation.utils.js";
68
+ import "@mui/material/colors";
69
+ import "@mui/x-charts";
70
+ import "../../common/currentLimits/limitsPane.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 { VOLTAGE_REGULATION_MODES } from "./constants.js";
75
+ function SetPointsLimitsForm({
76
+ voltageLevelOptions,
77
+ fetchVoltageLevelEquipments
78
+ }) {
79
+ const id = FieldConstants.SETPOINTS_LIMITS;
80
+ const watchCharacteristicsChoice = useWatch({ name: `${id}.${FieldConstants.CHARACTERISTICS_CHOICE}` });
81
+ useWatch({ name: `${id}.${FieldConstants.VOLTAGE_REGULATION_MODE}` });
82
+ const watchRegulationType = useWatch({ name: `${id}.${FieldConstants.VOLTAGE_REGULATION_TYPE}` });
83
+ const minSusceptanceField = /* @__PURE__ */ jsx(
84
+ FloatInput,
85
+ {
86
+ name: `${id}.${FieldConstants.MIN_SUSCEPTANCE}`,
87
+ label: "minSusceptance",
88
+ adornment: SusceptanceAdornment
89
+ }
90
+ );
91
+ const maxSusceptanceField = /* @__PURE__ */ jsx(
92
+ FloatInput,
93
+ {
94
+ name: `${id}.${FieldConstants.MAX_SUSCEPTANCE}`,
95
+ label: "maximumSusceptance",
96
+ adornment: SusceptanceAdornment
97
+ }
98
+ );
99
+ const minQAtNominalVField = /* @__PURE__ */ jsx(
100
+ FloatInput,
101
+ {
102
+ name: `${id}.${FieldConstants.MIN_Q_AT_NOMINAL_V}`,
103
+ label: "minQAtNominalV",
104
+ adornment: ReactivePowerAdornment
105
+ }
106
+ );
107
+ const maxQAtNominalVField = /* @__PURE__ */ jsx(
108
+ FloatInput,
109
+ {
110
+ name: `${id}.${FieldConstants.MAX_Q_AT_NOMINAL_V}`,
111
+ label: "maxQAtVnominal",
112
+ adornment: ReactivePowerAdornment
113
+ }
114
+ );
115
+ const voltageSetPointField = /* @__PURE__ */ jsx(
116
+ FloatInput,
117
+ {
118
+ name: `${id}.${FieldConstants.VOLTAGE_SET_POINT}`,
119
+ label: "VoltageText",
120
+ adornment: VoltageAdornment
121
+ }
122
+ );
123
+ const reactivePowerSetPointField = /* @__PURE__ */ jsx(
124
+ FloatInput,
125
+ {
126
+ name: `${id}.${FieldConstants.REACTIVE_POWER_SET_POINT}`,
127
+ label: "ReactivePowerText",
128
+ adornment: ReactivePowerAdornment
129
+ }
130
+ );
131
+ const voltageRegulationTypeField = /* @__PURE__ */ jsx(
132
+ SelectInput,
133
+ {
134
+ options: Object.values(REGULATION_TYPES),
135
+ name: `${id}.${FieldConstants.VOLTAGE_REGULATION_TYPE}`,
136
+ label: "RegulationTypeText",
137
+ size: "small"
138
+ }
139
+ );
140
+ const regulatingTerminalField = /* @__PURE__ */ jsx(
141
+ RegulatingTerminalForm,
142
+ {
143
+ id,
144
+ direction: void 0,
145
+ disabled: false,
146
+ fetchVoltageLevelEquipments,
147
+ voltageLevelOptions,
148
+ equipmentSectionTypeDefaultValue: EquipmentType.STATIC_VAR_COMPENSATOR,
149
+ regulatingTerminalVlId: void 0,
150
+ equipmentSectionType: void 0
151
+ }
152
+ );
153
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
154
+ /* @__PURE__ */ jsx(GridSection, { title: "ReactiveLimits" }),
155
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, padding: 1, children: [
156
+ /* @__PURE__ */ jsx(Grid, { size: 4, children: /* @__PURE__ */ jsx(
157
+ SelectInput,
158
+ {
159
+ name: `${id}.${FieldConstants.CHARACTERISTICS_CHOICE}`,
160
+ options: Object.values(CHARACTERISTICS_CHOICES),
161
+ fullWidth: true,
162
+ disableClearable: true,
163
+ size: "small"
164
+ }
165
+ ) }),
166
+ watchCharacteristicsChoice === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id && /* @__PURE__ */ jsxs(Fragment, { children: [
167
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: minQAtNominalVField }),
168
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: maxQAtNominalVField })
169
+ ] }),
170
+ watchCharacteristicsChoice === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id && /* @__PURE__ */ jsxs(Fragment, { children: [
171
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: minSusceptanceField }),
172
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: maxSusceptanceField })
173
+ ] })
174
+ ] }),
175
+ /* @__PURE__ */ jsx(GridSection, { title: "Setpoints" }),
176
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, padding: 1, children: [
177
+ /* @__PURE__ */ jsx(Grid, { size: 4, children: /* @__PURE__ */ jsx(
178
+ SelectInput,
179
+ {
180
+ name: `${id}.${FieldConstants.VOLTAGE_REGULATION_MODE}`,
181
+ label: "ModeAutomaton",
182
+ options: Object.values(VOLTAGE_REGULATION_MODES),
183
+ fullWidth: true,
184
+ disableClearable: true,
185
+ size: "small"
186
+ }
187
+ ) }),
188
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: voltageSetPointField }),
189
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: reactivePowerSetPointField }),
190
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: voltageRegulationTypeField })
191
+ ] }),
192
+ watchRegulationType === REGULATION_TYPES.DISTANT.id && /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, padding: 1, children: [
193
+ /* @__PURE__ */ jsx(Grid, { size: 4, sx: { alignItems: "center" }, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "RegulatingTerminalGenerator" }) }),
194
+ /* @__PURE__ */ jsx(GridItem, { size: 8, children: regulatingTerminalField })
195
+ ] })
196
+ ] });
197
+ }
198
+ export {
199
+ SetPointsLimitsForm
200
+ };
@@ -0,0 +1,66 @@
1
+ import { FieldConstants } from '../../../../utils';
2
+ /**
3
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ import * as yup from 'yup';
9
+ export declare const getStandbyAutomatonEmptyFormData: (id?: FieldConstants) => {
10
+ [x: string]: {
11
+ addStandbyAutomaton: boolean;
12
+ StandbyAutomaton: boolean;
13
+ lowVoltageSetpoint: null;
14
+ highVoltageSetpoint: null;
15
+ lowVoltageThreshold: null;
16
+ highVoltageThreshold: null;
17
+ characteristicsChoiceAutomaton: "Q_AT_NOMINAL_V";
18
+ minQAutomaton: null;
19
+ maxQAutomaton: null;
20
+ minSAutomaton: null;
21
+ maxSAutomaton: null;
22
+ b0: null;
23
+ q0: null;
24
+ };
25
+ };
26
+ export declare const getStandbyAutomatonFormValidationSchema: () => yup.ObjectSchema<{
27
+ addStandbyAutomaton: boolean | null | undefined;
28
+ StandbyAutomaton: boolean | null | undefined;
29
+ lowVoltageSetpoint: number | null | undefined;
30
+ highVoltageSetpoint: number | null | undefined;
31
+ lowVoltageThreshold: number | null | undefined;
32
+ highVoltageThreshold: number | null | undefined;
33
+ b0: number | null | undefined;
34
+ q0: number | null | undefined;
35
+ }, yup.AnyObject, {
36
+ addStandbyAutomaton: undefined;
37
+ StandbyAutomaton: undefined;
38
+ lowVoltageSetpoint: undefined;
39
+ highVoltageSetpoint: undefined;
40
+ lowVoltageThreshold: undefined;
41
+ highVoltageThreshold: undefined;
42
+ b0: undefined;
43
+ q0: undefined;
44
+ }, "">;
45
+ export declare const getStandbyAutomatonFormData: ({ addStandbyAutomaton, standby, b0, q0, lowVoltageSetpoint, highVoltageSetpoint, lowVoltageThreshold, highVoltageThreshold, }: {
46
+ addStandbyAutomaton: boolean;
47
+ standby: boolean | undefined;
48
+ b0: number | null | undefined;
49
+ q0: number | null | undefined;
50
+ lowVoltageSetpoint: number | null | undefined;
51
+ highVoltageSetpoint: number | null | undefined;
52
+ lowVoltageThreshold: number | null | undefined;
53
+ highVoltageThreshold: number | null | undefined;
54
+ }) => {
55
+ automaton: {
56
+ addStandbyAutomaton: boolean;
57
+ StandbyAutomaton: boolean | undefined;
58
+ lowVoltageSetpoint: number | null | undefined;
59
+ highVoltageSetpoint: number | null | undefined;
60
+ lowVoltageThreshold: number | null | undefined;
61
+ highVoltageThreshold: number | null | undefined;
62
+ b0: number | null | undefined;
63
+ q0: number | null | undefined;
64
+ };
65
+ };
66
+ export declare const computeQ0: (b0?: number | null, nominalV?: number | null) => number | undefined;