@gridsuite/commons-ui 0.147.0 → 0.148.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 (25) hide show
  1. package/README.md +1 -1
  2. package/dist/components/index.js +3 -1
  3. package/dist/components/parameters/index.js +3 -1
  4. package/dist/components/parameters/short-circuit/constants.d.ts +2 -0
  5. package/dist/components/parameters/short-circuit/constants.js +4 -0
  6. package/dist/components/parameters/short-circuit/index.js +3 -1
  7. package/dist/components/parameters/short-circuit/short-circuit-fields.js +27 -3
  8. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.d.ts +7 -0
  9. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +48 -0
  10. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-columns-definition.d.ts +18 -0
  11. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-columns-definition.js +47 -0
  12. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-row.d.ts +8 -0
  13. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-row.js +27 -0
  14. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table.d.ts +8 -0
  15. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table.js +46 -0
  16. package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.d.ts +14 -7
  17. package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +97 -9
  18. package/dist/components/parameters/short-circuit/short-circuit-parameters.type.d.ts +7 -0
  19. package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +15 -12
  20. package/dist/index.js +3 -1
  21. package/dist/translations/en/parameters.d.ts +17 -0
  22. package/dist/translations/en/parameters.js +17 -0
  23. package/dist/translations/fr/parameters.d.ts +17 -0
  24. package/dist/translations/fr/parameters.js +17 -0
  25. package/package.json +1 -1
package/README.md CHANGED
@@ -46,7 +46,7 @@ Only in this case, you need to follow the steps below:
46
46
  - [Make a release action](https://github.com/gridsuite/commons-ui/actions/workflows/release.yml)
47
47
  - In the 'run workflow' combobox select, let the branch on main
48
48
  - Enter the type of evolution (major | minor | patch)
49
- - Enter your NPM access token (check the **Bypass two-factor authentication** checkbox to bypass 2FA, see the [access token documentation](https://docs.npmjs.com/creating-and-viewing-access-tokens) for details)
49
+ - Enter your NPM access token (when you create it, check the **Bypass two-factor authentication** checkbox to bypass 2FA, set **Packages and scopes** → **Permissions** to **Read and write** and let **Organizations** → **Permissions** to **No access**, see the [access token documentation](https://docs.npmjs.com/creating-and-viewing-access-tokens) for details)
50
50
  - Click 'run workflow'
51
51
 
52
52
  Otherwise ask someone who has the permission.
@@ -159,7 +159,7 @@ import { NetworkVisualizationsParametersEditionDialog } from "./parameters/netwo
159
159
  import { BALANCE_TYPE, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./parameters/loadflow/constants.js";
160
160
  import { LoadFlowParametersInline } from "./parameters/loadflow/load-flow-parameters-inline.js";
161
161
  import { LoadFlowParametersEditionDialog } from "./parameters/loadflow/load-flow-parameters-dialog.js";
162
- import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./parameters/short-circuit/constants.js";
162
+ import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./parameters/short-circuit/constants.js";
163
163
  import { ShortCircuitParametersInLine } from "./parameters/short-circuit/short-circuit-parameters-inline.js";
164
164
  import { ShortCircuitParametersEditionDialog } from "./parameters/short-circuit/short-circuit-parameters-dialog.js";
165
165
  import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./parameters/voltage-init/constants.js";
@@ -417,7 +417,9 @@ export {
417
417
  SELECTION_TYPE,
418
418
  SENSITIVITY_TYPES,
419
419
  SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
420
+ SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
420
421
  SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
422
+ SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
421
423
  SHORT_CIRCUIT_PREDEFINED_PARAMS,
422
424
  SHORT_CIRCUIT_VOLTAGE_RANGES,
423
425
  SHORT_CIRCUIT_WITH_FEEDER_RESULT,
@@ -24,7 +24,7 @@ import { NetworkVisualizationsParametersEditionDialog } from "./network-visualiz
24
24
  import { BALANCE_TYPE, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./loadflow/constants.js";
25
25
  import { LoadFlowParametersInline } from "./loadflow/load-flow-parameters-inline.js";
26
26
  import { LoadFlowParametersEditionDialog } from "./loadflow/load-flow-parameters-dialog.js";
27
- import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./short-circuit/constants.js";
27
+ import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./short-circuit/constants.js";
28
28
  import { ShortCircuitParametersInLine } from "./short-circuit/short-circuit-parameters-inline.js";
29
29
  import { ShortCircuitParametersEditionDialog } from "./short-circuit/short-circuit-parameters-dialog.js";
30
30
  import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./voltage-init/constants.js";
@@ -147,7 +147,9 @@ export {
147
147
  SELECTION_TYPE,
148
148
  SENSITIVITY_TYPES,
149
149
  SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
150
+ SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
150
151
  SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
152
+ SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
151
153
  SHORT_CIRCUIT_PREDEFINED_PARAMS,
152
154
  SHORT_CIRCUIT_VOLTAGE_RANGES,
153
155
  SHORT_CIRCUIT_WITH_FEEDER_RESULT,
@@ -23,6 +23,8 @@ export declare const SHORT_CIRCUIT_WITH_NEUTRAL_POSITION = "withNeutralPosition"
23
23
  export declare const SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE = "initialVoltageProfileMode";
24
24
  export declare const SHORT_CIRCUIT_VOLTAGE_RANGES = "voltageRanges";
25
25
  export declare const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS = "onlyStartedGenerators";
26
+ export declare const SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS = "modelPowerElectronics";
27
+ export declare const SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS = "powerElectronicsMaterials";
26
28
  export declare const intlPredefinedParametersOptions: () => {
27
29
  id: string;
28
30
  label: string;
@@ -19,6 +19,8 @@ const SHORT_CIRCUIT_WITH_NEUTRAL_POSITION = "withNeutralPosition";
19
19
  const SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE = "initialVoltageProfileMode";
20
20
  const SHORT_CIRCUIT_VOLTAGE_RANGES = "voltageRanges";
21
21
  const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS = "onlyStartedGenerators";
22
+ const SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS = "modelPowerElectronics";
23
+ const SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS = "powerElectronicsMaterials";
22
24
  const intlPredefinedParametersOptions = () => [
23
25
  {
24
26
  id: "ICC_MAX_WITH_NOMINAL_VOLTAGE_MAP",
@@ -59,7 +61,9 @@ export {
59
61
  InitialVoltage,
60
62
  PredefinedParameters,
61
63
  SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
64
+ SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
62
65
  SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
66
+ SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
63
67
  SHORT_CIRCUIT_PREDEFINED_PARAMS,
64
68
  SHORT_CIRCUIT_VOLTAGE_RANGES,
65
69
  SHORT_CIRCUIT_WITH_FEEDER_RESULT,
@@ -1,11 +1,13 @@
1
- import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./constants.js";
1
+ import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./constants.js";
2
2
  import { ShortCircuitParametersInLine } from "./short-circuit-parameters-inline.js";
3
3
  import { ShortCircuitParametersEditionDialog } from "./short-circuit-parameters-dialog.js";
4
4
  export {
5
5
  InitialVoltage,
6
6
  PredefinedParameters,
7
7
  SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
8
+ SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
8
9
  SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
10
+ SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
9
11
  SHORT_CIRCUIT_PREDEFINED_PARAMS,
10
12
  SHORT_CIRCUIT_VOLTAGE_RANGES,
11
13
  SHORT_CIRCUIT_WITH_FEEDER_RESULT,
@@ -4,11 +4,11 @@ import { Grid } from "@mui/material";
4
4
  import { green, red } from "@mui/material/colors";
5
5
  import { Lens } from "@mui/icons-material";
6
6
  import { useWatch, useFormContext } from "react-hook-form";
7
- import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, intlPredefinedParametersOptions, PredefinedParameters, intlInitialVoltageProfileMode, onlyStartedGeneratorsOptions, InitialVoltage, SHORT_CIRCUIT_WITH_FEEDER_RESULT } from "./constants.js";
7
+ import { FormattedMessage } from "react-intl";
8
+ import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, intlPredefinedParametersOptions, PredefinedParameters, intlInitialVoltageProfileMode, onlyStartedGeneratorsOptions, InitialVoltage, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS } from "./constants.js";
8
9
  import { VoltageTable } from "./short-circuit-voltage-table.js";
9
10
  import GridItem from "../../grid/grid-item.js";
10
11
  import GridSection from "../../grid/grid-section.js";
11
- import "react-intl";
12
12
  import { FieldLabel } from "../../inputs/reactHookForm/utils/FieldLabel.js";
13
13
  import "../../overflowableText/OverflowableText.js";
14
14
  import "../../../utils/conversionUtils.js";
@@ -42,11 +42,18 @@ import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialo
42
42
  import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
43
43
  import "../common/widget/parameter-line-slider.js";
44
44
  import "../common/limitreductions/columns-definitions.js";
45
+ import { ShortCircuitIccMaterialTable } from "./short-circuit-icc-material-table.js";
46
+ import { COLUMNS_DEFINITIONS_ICC_MATERIALS } from "./short-circuit-icc-material-table-columns-definition.js";
45
47
  var Status = /* @__PURE__ */ ((Status2) => {
46
48
  Status2["SUCCESS"] = "SUCCESS";
47
49
  Status2["ERROR"] = "ERROR";
48
50
  return Status2;
49
51
  })(Status || {});
52
+ const columnsDef = COLUMNS_DEFINITIONS_ICC_MATERIALS.map((col) => ({
53
+ ...col,
54
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: col.label }),
55
+ tooltip: /* @__PURE__ */ jsx(FormattedMessage, { id: col.tooltip })
56
+ }));
50
57
  function ShortCircuitFields({ resetAll, isDeveloperMode = true }) {
51
58
  const [status, setStatus] = useState(
52
59
  "SUCCESS"
@@ -173,6 +180,13 @@ function ShortCircuitFields({ resetAll, isDeveloperMode = true }) {
173
180
  }
174
181
  }
175
182
  );
183
+ const modelPowerElectronics = /* @__PURE__ */ jsx(
184
+ CheckboxInput,
185
+ {
186
+ name: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS}`,
187
+ label: "ShortCircuitModelPowerElectronics"
188
+ }
189
+ );
176
190
  useEffect(() => {
177
191
  const isIccMaxWithNominalVoltageMap = watchPredefinedParams === PredefinedParameters.ICC_MAX_WITH_NOMINAL_VOLTAGE_MAP;
178
192
  const isIccMinWithNominal = watchPredefinedParams === PredefinedParameters.ICC_MIN_WITH_NOMINAL_VOLTAGE_MAP;
@@ -215,7 +229,17 @@ function ShortCircuitFields({ resetAll, isDeveloperMode = true }) {
215
229
  /* @__PURE__ */ jsx(VoltageTable, { voltageProfileMode: watchInitialVoltageProfileMode }),
216
230
  isThereSpecificParameters && /* @__PURE__ */ jsxs(Fragment, { children: [
217
231
  /* @__PURE__ */ jsx(GridSection, { title: "ShortCircuitStartedGeneratorsMode", heading: 4 }),
218
- /* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: onlyStartedGenerators }) })
232
+ /* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: onlyStartedGenerators }) }),
233
+ /* @__PURE__ */ jsx(GridSection, { title: "ShortCircuitPowerElectronicsSection", heading: 4 }),
234
+ /* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: modelPowerElectronics }) }),
235
+ /* @__PURE__ */ jsx(
236
+ ShortCircuitIccMaterialTable,
237
+ {
238
+ formName: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS}`,
239
+ tableHeight: 300,
240
+ columnsDefinition: columnsDef
241
+ }
242
+ )
219
243
  ] })
220
244
  ] });
221
245
  }
@@ -0,0 +1,7 @@
1
+ import { IccMaterialIColumnsDef } from './short-circuit-icc-material-table-columns-definition';
2
+ export declare function ShortCircuitIccMaterialTableCell({ formName, rowIndex, column, inputsDisabled, }: Readonly<{
3
+ formName: string;
4
+ rowIndex: number;
5
+ column: IccMaterialIColumnsDef;
6
+ inputsDisabled?: boolean;
7
+ }>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,48 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { TableCell } from "@mui/material";
3
+ import "react-intl";
4
+ import "../../overflowableText/OverflowableText.js";
5
+ import "../../../utils/conversionUtils.js";
6
+ import "../../../utils/types/equipmentType.js";
7
+ import "@mui/icons-material";
8
+ import "../../../utils/yupConfig.js";
9
+ import "react";
10
+ import "react-hook-form";
11
+ import "localized-countries";
12
+ import "localized-countries/data/fr";
13
+ import "localized-countries/data/en";
14
+ import "notistack";
15
+ import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
16
+ import "yup";
17
+ import { RawReadOnlyInput } from "../../inputs/reactHookForm/RawReadOnlyInput.js";
18
+ import "../../treeViewFinder/TreeViewFinder.js";
19
+ import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
20
+ import "../../customAGGrid/customAggrid.js";
21
+ import "ag-grid-community";
22
+ import "react-papaparse";
23
+ import "react-csv-downloader";
24
+ import { SwitchInput } from "../../inputs/reactHookForm/booleans/SwitchInput.js";
25
+ import { FloatInput } from "../../inputs/reactHookForm/numbers/FloatInput.js";
26
+ import "../../inputs/reactHookForm/numbers/RangeInput.js";
27
+ import "@react-querybuilder/material";
28
+ import "../../filter/expert/expertFilterConstants.js";
29
+ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
30
+ import "uuid";
31
+ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
32
+ import "react-querybuilder";
33
+ import { SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE, SHORT_CIRCUIT_ICC_MATERIAL_TYPE } from "./short-circuit-icc-material-table-columns-definition.js";
34
+ function ShortCircuitIccMaterialTableCell({
35
+ formName,
36
+ rowIndex,
37
+ column,
38
+ inputsDisabled
39
+ }) {
40
+ return /* @__PURE__ */ jsxs(TableCell, { sx: { fontWeight: "bold" }, children: [
41
+ column.dataKey === SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE && /* @__PURE__ */ jsx(SwitchInput, { name: `${formName}[${rowIndex}].${column.dataKey}` }),
42
+ column.dataKey === SHORT_CIRCUIT_ICC_MATERIAL_TYPE && /* @__PURE__ */ jsx(RawReadOnlyInput, { name: `${formName}[${rowIndex}].${column.dataKey}` }),
43
+ column.dataKey !== SHORT_CIRCUIT_ICC_MATERIAL_TYPE && column.dataKey !== SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE && /* @__PURE__ */ jsx(FloatInput, { disabled: inputsDisabled, name: `${formName}[${rowIndex}].${column.dataKey}` })
44
+ ] });
45
+ }
46
+ export {
47
+ ShortCircuitIccMaterialTableCell
48
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright (c) 2025, 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 SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE = "active";
8
+ export declare const SHORT_CIRCUIT_ICC_MATERIAL_TYPE = "type";
9
+ export declare const SHORT_CIRCUIT_ICC_MATERIAL_ALPHA = "alpha";
10
+ export declare const SHORT_CIRCUIT_ICC_MATERIAL_USMIN = "usMin";
11
+ export declare const SHORT_CIRCUIT_ICC_MATERIAL_USMAX = "usMax";
12
+ export declare const SHORT_CIRCUIT_ICC_MATERIAL_U0 = "u0";
13
+ export interface IccMaterialIColumnsDef {
14
+ label: React.ReactNode;
15
+ dataKey: string;
16
+ tooltip: React.ReactNode;
17
+ }
18
+ export declare const COLUMNS_DEFINITIONS_ICC_MATERIALS: IccMaterialIColumnsDef[];
@@ -0,0 +1,47 @@
1
+ const SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE = "active";
2
+ const SHORT_CIRCUIT_ICC_MATERIAL_TYPE = "type";
3
+ const SHORT_CIRCUIT_ICC_MATERIAL_ALPHA = "alpha";
4
+ const SHORT_CIRCUIT_ICC_MATERIAL_USMIN = "usMin";
5
+ const SHORT_CIRCUIT_ICC_MATERIAL_USMAX = "usMax";
6
+ const SHORT_CIRCUIT_ICC_MATERIAL_U0 = "u0";
7
+ const COLUMNS_DEFINITIONS_ICC_MATERIALS = [
8
+ {
9
+ label: "ShortCircuitIccMaterialActivate",
10
+ dataKey: SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE,
11
+ tooltip: "ShortCircuitIccMaterialActivateTooltip"
12
+ },
13
+ {
14
+ label: "ShortCircuitIccMaterialType",
15
+ dataKey: SHORT_CIRCUIT_ICC_MATERIAL_TYPE,
16
+ tooltip: "ShortCircuitIccMaterialTypeTooltip"
17
+ },
18
+ {
19
+ label: "ShortCircuitIccMaterialAlpha",
20
+ dataKey: SHORT_CIRCUIT_ICC_MATERIAL_ALPHA,
21
+ tooltip: "ShortCircuitIccMaterialAlphaTooltip"
22
+ },
23
+ {
24
+ label: "ShortCircuitIccMaterialUsmin",
25
+ dataKey: SHORT_CIRCUIT_ICC_MATERIAL_USMIN,
26
+ tooltip: "ShortCircuitIccMaterialUsminTooltip"
27
+ },
28
+ {
29
+ label: "ShortCircuitIccMaterialUsmax",
30
+ dataKey: SHORT_CIRCUIT_ICC_MATERIAL_USMAX,
31
+ tooltip: "ShortCircuitIccMaterialUsmaxTooltip"
32
+ },
33
+ {
34
+ label: "ShortCircuitIccMaterialU0",
35
+ dataKey: SHORT_CIRCUIT_ICC_MATERIAL_U0,
36
+ tooltip: "ShortCircuitIccMaterialU0Tooltip"
37
+ }
38
+ ];
39
+ export {
40
+ COLUMNS_DEFINITIONS_ICC_MATERIALS,
41
+ SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE,
42
+ SHORT_CIRCUIT_ICC_MATERIAL_ALPHA,
43
+ SHORT_CIRCUIT_ICC_MATERIAL_TYPE,
44
+ SHORT_CIRCUIT_ICC_MATERIAL_U0,
45
+ SHORT_CIRCUIT_ICC_MATERIAL_USMAX,
46
+ SHORT_CIRCUIT_ICC_MATERIAL_USMIN
47
+ };
@@ -0,0 +1,8 @@
1
+ import { IccMaterialIColumnsDef } from './short-circuit-icc-material-table-columns-definition';
2
+ interface ShortCircuitIccMaterialTableRowProps {
3
+ formName: string;
4
+ columnsDefinition: IccMaterialIColumnsDef[];
5
+ index: number;
6
+ }
7
+ export declare function ShortCircuitIccMaterialTableRow({ formName, columnsDefinition, index, }: Readonly<ShortCircuitIccMaterialTableRowProps>): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { TableRow } from "@mui/material";
3
+ import { useWatch } from "react-hook-form";
4
+ import { SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE } from "./short-circuit-icc-material-table-columns-definition.js";
5
+ import { ShortCircuitIccMaterialTableCell } from "./short-circuit-icc-material-table-cell.js";
6
+ function ShortCircuitIccMaterialTableRow({
7
+ formName,
8
+ columnsDefinition,
9
+ index
10
+ }) {
11
+ const watchRowActive = useWatch({
12
+ name: `${formName}[${index}].${SHORT_CIRCUIT_ICC_MATERIAL_ACTIVE}`
13
+ });
14
+ return /* @__PURE__ */ jsx(TableRow, { children: columnsDefinition.map((column) => /* @__PURE__ */ jsx(
15
+ ShortCircuitIccMaterialTableCell,
16
+ {
17
+ formName,
18
+ rowIndex: index,
19
+ column,
20
+ inputsDisabled: !watchRowActive
21
+ },
22
+ `${column.dataKey}`
23
+ )) });
24
+ }
25
+ export {
26
+ ShortCircuitIccMaterialTableRow
27
+ };
@@ -0,0 +1,8 @@
1
+ import { IccMaterialIColumnsDef } from './short-circuit-icc-material-table-columns-definition';
2
+ interface ShortCircuitIccMaterialTableProps {
3
+ columnsDefinition: IccMaterialIColumnsDef[];
4
+ tableHeight: number;
5
+ formName: string;
6
+ }
7
+ export declare function ShortCircuitIccMaterialTable({ formName, columnsDefinition, tableHeight, }: Readonly<ShortCircuitIccMaterialTableProps>): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,46 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { TableContainer, Table, TableHead, TableRow, Tooltip, TableCell, TableBody } from "@mui/material";
3
+ import { useFieldArray } from "react-hook-form";
4
+ import { ShortCircuitIccMaterialTableRow } from "./short-circuit-icc-material-table-row.js";
5
+ function ShortCircuitIccMaterialTable({
6
+ formName,
7
+ columnsDefinition,
8
+ tableHeight
9
+ }) {
10
+ const { fields: rows } = useFieldArray({
11
+ name: formName
12
+ });
13
+ return /* @__PURE__ */ jsx(
14
+ TableContainer,
15
+ {
16
+ sx: {
17
+ height: tableHeight,
18
+ width: "inherit",
19
+ border: "solid 0px rgba(0,0,0,0.1)"
20
+ },
21
+ children: /* @__PURE__ */ jsxs(Table, { stickyHeader: true, size: "small", sx: { tableLayout: "fixed" }, children: [
22
+ /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { children: columnsDefinition.map((column) => /* @__PURE__ */ jsx(Tooltip, { title: column.tooltip, children: /* @__PURE__ */ jsx(
23
+ TableCell,
24
+ {
25
+ sx: {
26
+ textAlign: "center"
27
+ },
28
+ children: column.label
29
+ }
30
+ ) }, column.dataKey)) }) }),
31
+ /* @__PURE__ */ jsx(TableBody, { children: rows.map((row, index) => /* @__PURE__ */ jsx(
32
+ ShortCircuitIccMaterialTableRow,
33
+ {
34
+ columnsDefinition,
35
+ index,
36
+ formName
37
+ },
38
+ `${row.id}`
39
+ )) })
40
+ ] })
41
+ }
42
+ );
43
+ }
44
+ export {
45
+ ShortCircuitIccMaterialTable
46
+ };
@@ -1,6 +1,6 @@
1
- import { InitialVoltage, PredefinedParameters } from './constants';
1
+ import { InitialVoltage } from './constants';
2
2
  import { default as yup } from '../../../utils/yupConfig';
3
- import { SpecificParametersValues } from '../../../utils';
3
+ import { SpecificParameterInfos, SpecificParametersValues } from '../../../utils';
4
4
  export declare const getCommonShortCircuitParametersFormSchema: () => yup.ObjectSchema<{
5
5
  commonParameters: {
6
6
  withFeederResult: NonNullable<boolean | undefined>;
@@ -20,8 +20,15 @@ export declare const getCommonShortCircuitParametersFormSchema: () => yup.Object
20
20
  initialVoltageProfileMode: undefined;
21
21
  };
22
22
  }, "">;
23
- export declare const resetSpecificParameters: (specificDefaultValues: SpecificParametersValues, predefinedParameter: PredefinedParameters) => {
24
- onlyStartedGenerators: boolean;
25
- } | {
26
- [x: string]: any;
27
- };
23
+ export declare const getSpecificShortCircuitParametersFormSchema: (specificParametersDescriptionForProvider: SpecificParameterInfos[] | undefined) => yup.ObjectSchema<{
24
+ specificParametersPerProvider: {};
25
+ } & {
26
+ specificParametersPerProvider: {};
27
+ }, yup.AnyObject, {
28
+ specificParametersPerProvider: {
29
+ [x: string]: any;
30
+ };
31
+ }, "">;
32
+ export declare const getDefaultShortCircuitSpecificParamsValues: (specificParametersDescriptionForProvider: SpecificParameterInfos[]) => SpecificParametersValues;
33
+ export declare const getShortCircuitSpecificParametersValues: (formData: Record<string, any>, _specificParametersValues: SpecificParametersValues) => SpecificParametersValues;
34
+ export declare const formatShortCircuitSpecificParameters: (specificParametersDescriptionForProvider: SpecificParameterInfos[], specificParamsList: SpecificParametersValues) => SpecificParametersValues;
@@ -1,6 +1,6 @@
1
- import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, InitialVoltage, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, PredefinedParameters } from "./constants.js";
1
+ import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, InitialVoltage, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS } from "./constants.js";
2
2
  import "../../../utils/yupConfig.js";
3
- import { COMMON_PARAMETERS } from "../common/constant.js";
3
+ import { COMMON_PARAMETERS, SPECIFIC_PARAMETERS } from "../common/constant.js";
4
4
  import "react/jsx-runtime";
5
5
  import "@mui/material";
6
6
  import "react-intl";
@@ -33,6 +33,7 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
33
33
  import "react-querybuilder";
34
34
  import "../common/widget/parameter-line-slider.js";
35
35
  import "../common/limitreductions/columns-definitions.js";
36
+ import { getSpecificParametersFormSchema, getDefaultSpecificParamsValues, getAllSpecificParametersValues, formatSpecificParameters } from "../common/utils.js";
36
37
  const getCommonShortCircuitParametersFormSchema = () => {
37
38
  return yup.object().shape({
38
39
  [COMMON_PARAMETERS]: yup.object().shape({
@@ -45,17 +46,104 @@ const getCommonShortCircuitParametersFormSchema = () => {
45
46
  })
46
47
  });
47
48
  };
48
- const resetSpecificParameters = (specificDefaultValues, predefinedParameter) => {
49
- if (Object.hasOwn(specificDefaultValues, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS)) {
49
+ const getSpecificShortCircuitParametersFormSchema = (specificParametersDescriptionForProvider) => {
50
+ const defaultSchema = getSpecificParametersFormSchema(specificParametersDescriptionForProvider);
51
+ const powerElectronicsMaterialsParam = specificParametersDescriptionForProvider?.find(
52
+ (specificParam) => specificParam.name === SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS
53
+ );
54
+ const powerElectronicsMaterialsSchema = powerElectronicsMaterialsParam ? yup.array().of(
55
+ yup.object().shape({
56
+ active: yup.boolean().required(),
57
+ alpha: yup.number().required(),
58
+ u0: yup.number().required(),
59
+ usMin: yup.number().required(),
60
+ usMax: yup.number().required(),
61
+ type: yup.string().oneOf(["WIND", "SOLAR", "HVDC"]).required()
62
+ })
63
+ ).required() : void 0;
64
+ const existingSpecificSchema = defaultSchema.fields?.[SPECIFIC_PARAMETERS];
65
+ const existingSpecificFields = existingSpecificSchema ? existingSpecificSchema.fields || {} : {};
66
+ const mergedSpecificShape = {
67
+ ...existingSpecificFields,
68
+ ...powerElectronicsMaterialsSchema ? { [SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS]: powerElectronicsMaterialsSchema } : {}
69
+ };
70
+ const overrideSchema = yup.object().shape({
71
+ [SPECIFIC_PARAMETERS]: yup.object().shape(mergedSpecificShape)
72
+ });
73
+ return defaultSchema.concat(overrideSchema);
74
+ };
75
+ const parsepowerElectronicsMaterialsParamString = (paramString) => {
76
+ try {
77
+ return JSON.parse(paramString);
78
+ } catch (error) {
79
+ console.error("Error parsing power electronics materials parameter string:", error);
80
+ return [];
81
+ }
82
+ };
83
+ const getDefaultShortCircuitSpecificParamsValues = (specificParametersDescriptionForProvider) => {
84
+ const defaultValues = getDefaultSpecificParamsValues(
85
+ specificParametersDescriptionForProvider
86
+ );
87
+ const powerElectronicsMaterialsParam = specificParametersDescriptionForProvider.find(
88
+ (specificParam) => specificParam.name === SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS
89
+ );
90
+ if (powerElectronicsMaterialsParam) {
91
+ const electronicsMaterialsArray = parsepowerElectronicsMaterialsParamString(
92
+ powerElectronicsMaterialsParam.defaultValue
93
+ );
94
+ defaultValues[SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS] = electronicsMaterialsArray.map((material) => ({
95
+ ...material,
96
+ active: false
97
+ }));
98
+ }
99
+ return defaultValues;
100
+ };
101
+ const getShortCircuitSpecificParametersValues = (formData, _specificParametersValues) => {
102
+ const powerElectronicsMaterialsParam = formData[SPECIFIC_PARAMETERS][SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS];
103
+ if (powerElectronicsMaterialsParam) {
50
104
  return {
51
- ...specificDefaultValues,
52
- // Forced to override specificly this param here because its default value depends of the PredefinedParameters value
53
- [SHORT_CIRCUIT_ONLY_STARTED_GENERATORS]: predefinedParameter === PredefinedParameters.ICC_MIN_WITH_NOMINAL_VOLTAGE_MAP
105
+ ...getAllSpecificParametersValues(formData, _specificParametersValues),
106
+ [SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS]: JSON.stringify(
107
+ powerElectronicsMaterialsParam.filter((sParam) => sParam.active).map((sParam) => {
108
+ const { active, ...rest } = sParam;
109
+ return rest;
110
+ })
111
+ )
54
112
  };
55
113
  }
56
- return { ...specificDefaultValues };
114
+ return getAllSpecificParametersValues(formData, _specificParametersValues);
115
+ };
116
+ const formatElectronicsMaterialsParamString = (defaultValues, specificParamValue) => {
117
+ const electronicsMaterialsArrayInParams = parsepowerElectronicsMaterialsParamString(specificParamValue);
118
+ return defaultValues.map((material) => {
119
+ const foundInParams = electronicsMaterialsArrayInParams.find((m) => m.type === material.type);
120
+ return foundInParams ? { ...foundInParams, active: true } : { ...material, active: false };
121
+ });
122
+ };
123
+ const formatShortCircuitSpecificParameters = (specificParametersDescriptionForProvider, specificParamsList) => {
124
+ if (!specificParamsList) {
125
+ return getDefaultShortCircuitSpecificParamsValues(specificParametersDescriptionForProvider);
126
+ }
127
+ const formatted = formatSpecificParameters(specificParametersDescriptionForProvider, specificParamsList);
128
+ const powerParam = specificParametersDescriptionForProvider.find(
129
+ (p) => p.name === SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS
130
+ );
131
+ if (powerParam) {
132
+ if (Object.hasOwn(specificParamsList, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS)) {
133
+ formatted[SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS] = formatElectronicsMaterialsParamString(
134
+ getDefaultShortCircuitSpecificParamsValues([powerParam])?.[SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS],
135
+ specificParamsList[SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS]
136
+ );
137
+ } else {
138
+ formatted[SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS] = getDefaultSpecificParamsValues([powerParam])?.[SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS];
139
+ }
140
+ }
141
+ return formatted;
57
142
  };
58
143
  export {
144
+ formatShortCircuitSpecificParameters,
59
145
  getCommonShortCircuitParametersFormSchema,
60
- resetSpecificParameters
146
+ getDefaultShortCircuitSpecificParamsValues,
147
+ getShortCircuitSpecificParametersValues,
148
+ getSpecificShortCircuitParametersFormSchema
61
149
  };
@@ -6,6 +6,13 @@ export interface VoltageRange {
6
6
  voltage: number;
7
7
  voltageRangeCoefficient: number;
8
8
  }
9
+ export interface PowerElectronicsMaterial {
10
+ alpha: number;
11
+ u0: number;
12
+ usMin: number;
13
+ usMax: number;
14
+ type: 'WIND' | 'SOLAR' | 'HVDC';
15
+ }
9
16
  export interface ShortCircuitParametersDto {
10
17
  withFeederResult: boolean;
11
18
  withLoads: boolean;
@@ -32,7 +32,7 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
32
32
  import "uuid";
33
33
  import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
34
34
  import "react-querybuilder";
35
- import { SHORT_CIRCUIT_PREDEFINED_PARAMS, PredefinedParameters, InitialVoltage, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_VOLTAGE_RANGES } from "./constants.js";
35
+ import { SHORT_CIRCUIT_PREDEFINED_PARAMS, PredefinedParameters, InitialVoltage, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_VOLTAGE_RANGES } from "./constants.js";
36
36
  import "../../filter/HeaderFilterForm.js";
37
37
  import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
38
38
  import { SPECIFIC_PARAMETERS, COMMON_PARAMETERS, VERSION_PARAMETER, PROVIDER } from "../common/constant.js";
@@ -40,8 +40,7 @@ import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialo
40
40
  import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
41
41
  import "../common/widget/parameter-line-slider.js";
42
42
  import "../common/limitreductions/columns-definitions.js";
43
- import { getCommonShortCircuitParametersFormSchema, resetSpecificParameters } from "./short-circuit-parameters-utils.js";
44
- import { getDefaultSpecificParamsValues, getSpecificParametersFormSchema, getAllSpecificParametersValues, formatSpecificParameters } from "../common/utils.js";
43
+ import { getDefaultShortCircuitSpecificParamsValues, getSpecificShortCircuitParametersFormSchema, getCommonShortCircuitParametersFormSchema, getShortCircuitSpecificParametersValues, formatShortCircuitSpecificParameters } from "./short-circuit-parameters-utils.js";
45
44
  const useShortCircuitParametersForm = ({
46
45
  parametersBackend,
47
46
  parametersUuid,
@@ -55,13 +54,15 @@ const useShortCircuitParametersForm = ({
55
54
  return provider && specificParamsDescriptions?.[provider] ? specificParamsDescriptions[provider] : [];
56
55
  }, [provider, specificParamsDescriptions]);
57
56
  const specificParametersDefaultValues = useMemo(() => {
58
- return getDefaultSpecificParamsValues(specificParametersDescriptionForProvider);
57
+ return {
58
+ ...getDefaultShortCircuitSpecificParamsValues(specificParametersDescriptionForProvider)
59
+ };
59
60
  }, [specificParametersDescriptionForProvider]);
60
61
  const formSchema = useMemo(() => {
61
62
  return yup.object({
62
63
  [SHORT_CIRCUIT_PREDEFINED_PARAMS]: yup.mixed().oneOf(Object.values(PredefinedParameters)).required(),
63
64
  ...getCommonShortCircuitParametersFormSchema().fields,
64
- ...getSpecificParametersFormSchema(specificParametersDescriptionForProvider).fields
65
+ ...getSpecificShortCircuitParametersFormSchema(specificParametersDescriptionForProvider).fields
65
66
  }).concat(getNameElementEditorSchema(name));
66
67
  }, [name, specificParametersDescriptionForProvider]);
67
68
  const formMethods = useForm({
@@ -97,12 +98,12 @@ const useShortCircuitParametersForm = ({
97
98
  );
98
99
  setValue(SHORT_CIRCUIT_PREDEFINED_PARAMS, predefinedParameter, dirty);
99
100
  setValue(
100
- SPECIFIC_PARAMETERS,
101
- resetSpecificParameters(specificParametersDefaultValues, predefinedParameter),
101
+ `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS}`,
102
+ predefinedParameter === PredefinedParameters.ICC_MIN_WITH_NOMINAL_VOLTAGE_MAP,
102
103
  dirty
103
104
  );
104
105
  },
105
- [specificParametersDefaultValues, params?.commonParameters, setValue]
106
+ [params?.commonParameters, setValue]
106
107
  );
107
108
  const formatNewParams = useCallback(
108
109
  (formData) => {
@@ -123,7 +124,7 @@ const useShortCircuitParametersForm = ({
123
124
  [SHORT_CIRCUIT_VOLTAGE_RANGES]: formData[COMMON_PARAMETERS][SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE] === InitialVoltage.CEI909 ? params?.cei909VoltageRanges : void 0
124
125
  },
125
126
  specificParametersPerProvider: {
126
- [provider]: getAllSpecificParametersValues(formData, specificParametersDefaultValues)
127
+ [provider]: getShortCircuitSpecificParametersValues(formData, specificParametersDefaultValues)
127
128
  }
128
129
  };
129
130
  },
@@ -131,11 +132,11 @@ const useShortCircuitParametersForm = ({
131
132
  );
132
133
  const toShortCircuitFormValues = useCallback(
133
134
  (_params) => {
134
- if (!provider) {
135
+ if (!provider || !_params) {
135
136
  return {};
136
137
  }
137
138
  const specificParamsListForCurrentProvider = _params.specificParametersPerProvider[provider];
138
- return {
139
+ const values = {
139
140
  [PROVIDER]: _params.provider,
140
141
  [SHORT_CIRCUIT_PREDEFINED_PARAMS]: _params.predefinedParameters,
141
142
  [COMMON_PARAMETERS]: {
@@ -145,16 +146,18 @@ const useShortCircuitParametersForm = ({
145
146
  [SHORT_CIRCUIT_WITH_NEUTRAL_POSITION]: !_params.commonParameters.withNeutralPosition
146
147
  },
147
148
  [SPECIFIC_PARAMETERS]: {
148
- ...formatSpecificParameters(
149
+ ...formatShortCircuitSpecificParameters(
149
150
  specificParametersDescriptionForProvider,
150
151
  specificParamsListForCurrentProvider
151
152
  )
152
153
  }
153
154
  };
155
+ return values;
154
156
  },
155
157
  [provider, specificParametersDescriptionForProvider]
156
158
  );
157
159
  const onValidationError = useCallback((_errors) => {
160
+ console.error("onValidationError: ", _errors);
158
161
  }, []);
159
162
  const onSaveInline = useCallback(
160
163
  (formData) => {
package/dist/index.js CHANGED
@@ -160,7 +160,7 @@ import { NetworkVisualizationsParametersEditionDialog } from "./components/param
160
160
  import { BALANCE_TYPE, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./components/parameters/loadflow/constants.js";
161
161
  import { LoadFlowParametersInline } from "./components/parameters/loadflow/load-flow-parameters-inline.js";
162
162
  import { LoadFlowParametersEditionDialog } from "./components/parameters/loadflow/load-flow-parameters-dialog.js";
163
- import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./components/parameters/short-circuit/constants.js";
163
+ import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./components/parameters/short-circuit/constants.js";
164
164
  import { ShortCircuitParametersInLine } from "./components/parameters/short-circuit/short-circuit-parameters-inline.js";
165
165
  import { ShortCircuitParametersEditionDialog } from "./components/parameters/short-circuit/short-circuit-parameters-dialog.js";
166
166
  import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./components/parameters/voltage-init/constants.js";
@@ -602,7 +602,9 @@ export {
602
602
  SELECTION_TYPE,
603
603
  SENSITIVITY_TYPES,
604
604
  SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
605
+ SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
605
606
  SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
607
+ SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
606
608
  SHORT_CIRCUIT_PREDEFINED_PARAMS,
607
609
  SHORT_CIRCUIT_VOLTAGE_RANGES,
608
610
  SHORT_CIRCUIT_WITH_FEEDER_RESULT,
@@ -113,6 +113,23 @@ export declare const parametersEn: {
113
113
  ShortCircuitCharacteristics: string;
114
114
  ShortCircuitVoltageProfileMode: string;
115
115
  ShortCircuitStartedGeneratorsMode: string;
116
+ ShortCircuitPowerElectronicsSection: string;
117
+ ShortCircuitModelPowerElectronics: string;
118
+ ShortCircuitIccMaterialActivate: string;
119
+ ShortCircuitIccMaterialActivateTooltip: string;
120
+ ShortCircuitIccMaterialType: string;
121
+ ShortCircuitIccMaterialTypeTooltip: string;
122
+ ShortCircuitIccMaterialAlpha: string;
123
+ ShortCircuitIccMaterialAlphaTooltip: string;
124
+ ShortCircuitIccMaterialUsmin: string;
125
+ ShortCircuitIccMaterialUsminTooltip: string;
126
+ ShortCircuitIccMaterialUsmax: string;
127
+ ShortCircuitIccMaterialUsmaxTooltip: string;
128
+ ShortCircuitIccMaterialU0: string;
129
+ ShortCircuitIccMaterialU0Tooltip: string;
130
+ ShortCircuitWindLabel: string;
131
+ ShortCircuitSolarLabel: string;
132
+ ShortCircuitHvdcLabel: string;
116
133
  ShortCircuitStartedLabel: string;
117
134
  ShortCircuitAllLabel: string;
118
135
  shortCircuitLoads: string;
@@ -107,6 +107,23 @@ const parametersEn = {
107
107
  ShortCircuitCharacteristics: "Features considered",
108
108
  ShortCircuitVoltageProfileMode: "Initial voltage profile",
109
109
  ShortCircuitStartedGeneratorsMode: "Generators started",
110
+ ShortCircuitPowerElectronicsSection: "Modeling of power electronics connected equipment",
111
+ ShortCircuitModelPowerElectronics: "Consider following Icc characteristics",
112
+ ShortCircuitIccMaterialActivate: "Activate",
113
+ ShortCircuitIccMaterialActivateTooltip: "Activate or deactivate this material characteristic",
114
+ ShortCircuitIccMaterialType: "Material",
115
+ ShortCircuitIccMaterialTypeTooltip: "Type of power electronics equipment",
116
+ ShortCircuitIccMaterialAlpha: "Alpha",
117
+ ShortCircuitIccMaterialAlphaTooltip: "Exponent of the voltage dependency of the Icc",
118
+ ShortCircuitIccMaterialUsmin: "Usmin (%)",
119
+ ShortCircuitIccMaterialUsminTooltip: "Minimum voltage for the Icc calculation",
120
+ ShortCircuitIccMaterialUsmax: "Usmax (%)",
121
+ ShortCircuitIccMaterialUsmaxTooltip: "Maximum voltage for the Icc calculation",
122
+ ShortCircuitIccMaterialU0: "U0 (%)",
123
+ ShortCircuitIccMaterialU0Tooltip: "Voltage level at which the Icc is nominal",
124
+ ShortCircuitWindLabel: "Wind",
125
+ ShortCircuitSolarLabel: "Solar",
126
+ ShortCircuitHvdcLabel: "HVDC",
110
127
  ShortCircuitStartedLabel: "Started",
111
128
  ShortCircuitAllLabel: "All",
112
129
  shortCircuitLoads: "Loads",
@@ -113,6 +113,23 @@ export declare const parametersFr: {
113
113
  ShortCircuitCharacteristics: string;
114
114
  ShortCircuitVoltageProfileMode: string;
115
115
  ShortCircuitStartedGeneratorsMode: string;
116
+ ShortCircuitPowerElectronicsSection: string;
117
+ ShortCircuitModelPowerElectronics: string;
118
+ ShortCircuitIccMaterialActivate: string;
119
+ ShortCircuitIccMaterialActivateTooltip: string;
120
+ ShortCircuitIccMaterialType: string;
121
+ ShortCircuitIccMaterialTypeTooltip: string;
122
+ ShortCircuitIccMaterialAlpha: string;
123
+ ShortCircuitIccMaterialAlphaTooltip: string;
124
+ ShortCircuitIccMaterialUsmin: string;
125
+ ShortCircuitIccMaterialUsminTooltip: string;
126
+ ShortCircuitIccMaterialUsmax: string;
127
+ ShortCircuitIccMaterialUsmaxTooltip: string;
128
+ ShortCircuitIccMaterialU0: string;
129
+ ShortCircuitIccMaterialU0Tooltip: string;
130
+ ShortCircuitWindLabel: string;
131
+ ShortCircuitSolarLabel: string;
132
+ ShortCircuitHvdcLabel: string;
116
133
  ShortCircuitStartedLabel: string;
117
134
  ShortCircuitAllLabel: string;
118
135
  shortCircuitLoads: string;
@@ -107,6 +107,23 @@ const parametersFr = {
107
107
  ShortCircuitCharacteristics: "Caractéristiques prises en compte",
108
108
  ShortCircuitVoltageProfileMode: "Plan de tension initial",
109
109
  ShortCircuitStartedGeneratorsMode: "Démarrage des groupes",
110
+ ShortCircuitPowerElectronicsSection: "Modélisation des équipements raccordés par de l'électronique de puissance",
111
+ ShortCircuitModelPowerElectronics: "Prise en compte des caractéristiques d'Icc suivantes",
112
+ ShortCircuitIccMaterialActivate: "Actif",
113
+ ShortCircuitIccMaterialActivateTooltip: "Activer la modélisation des équipements raccordés par de l'électronique de puissance",
114
+ ShortCircuitIccMaterialType: "Matériel",
115
+ ShortCircuitIccMaterialTypeTooltip: "Type d'équipement raccordé par de l'électronique de puissance",
116
+ ShortCircuitIccMaterialAlpha: "Alpha",
117
+ ShortCircuitIccMaterialAlphaTooltip: "Coefficient de pente de la caractéristique Icc",
118
+ ShortCircuitIccMaterialUsmin: "Usmin (%)",
119
+ ShortCircuitIccMaterialUsminTooltip: "Tension minimale pour le calcul de Icc",
120
+ ShortCircuitIccMaterialUsmax: "Usmax (%)",
121
+ ShortCircuitIccMaterialUsmaxTooltip: "Tension maximale pour le calcul de Icc",
122
+ ShortCircuitIccMaterialU0: "U0 (%)",
123
+ ShortCircuitIccMaterialU0Tooltip: "Tension de référence pour le calcul de Icc",
124
+ ShortCircuitWindLabel: "Éolien",
125
+ ShortCircuitSolarLabel: "Solaire",
126
+ ShortCircuitHvdcLabel: "HVDC",
110
127
  ShortCircuitStartedLabel: "Démarrés",
111
128
  ShortCircuitAllLabel: "Tous",
112
129
  shortCircuitLoads: "Charges",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.147.0",
3
+ "version": "0.148.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",