@gridsuite/commons-ui 0.165.2 → 0.167.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 (177) hide show
  1. package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts +9 -4
  2. package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +7 -4
  3. package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +5 -0
  4. package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +5 -0
  5. package/dist/components/dnd-table/dnd-table-bottom-right-buttons.js +2 -2
  6. package/dist/components/dnd-table/dnd-table.d.ts +1 -2
  7. package/dist/components/dnd-table/dnd-table.js +7 -0
  8. package/dist/components/dnd-table/dnd-table.type.d.ts +6 -1
  9. package/dist/components/dnd-table/dnd-table.type.js +1 -0
  10. package/dist/components/filter/HeaderFilterForm.js +5 -0
  11. package/dist/components/filter/expert/ExpertFilterForm.js +4 -0
  12. package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +4 -0
  13. package/dist/components/index.js +22 -7
  14. package/dist/components/inputs/index.js +2 -0
  15. package/dist/components/inputs/reactHookForm/index.js +2 -0
  16. package/dist/components/inputs/reactHookForm/text/DescriptionInput.d.ts +4 -0
  17. package/dist/components/inputs/reactHookForm/text/DescriptionInput.js +85 -0
  18. package/dist/components/inputs/reactHookForm/text/index.d.ts +1 -0
  19. package/dist/components/inputs/reactHookForm/text/index.js +2 -0
  20. package/dist/components/network-modifications/common/properties/PropertiesForm.js +5 -0
  21. package/dist/components/network-modifications/common/properties/PropertyForm.js +5 -0
  22. package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +5 -0
  23. package/dist/components/parameters/common/ProviderParam.js +8 -3
  24. package/dist/components/parameters/common/{constant.d.ts → constants.d.ts} +3 -0
  25. package/dist/components/parameters/common/{constant.js → constants.js} +6 -0
  26. package/dist/components/parameters/common/contingency-table/columns-definitions.d.ts +27 -0
  27. package/dist/components/parameters/common/contingency-table/columns-definitions.js +102 -0
  28. package/dist/components/parameters/common/contingency-table/contingency-table.d.ts +5 -0
  29. package/dist/components/parameters/common/contingency-table/contingency-table.js +81 -0
  30. package/dist/components/parameters/common/contingency-table/index.d.ts +8 -0
  31. package/dist/components/parameters/common/contingency-table/index.js +9 -0
  32. package/dist/components/parameters/common/contingency-table/types.d.ts +12 -0
  33. package/dist/components/parameters/common/contingency-table/types.js +1 -0
  34. package/dist/components/parameters/common/index.d.ts +1 -1
  35. package/dist/components/parameters/common/index.js +5 -5
  36. package/dist/components/parameters/common/limitreductions/columns-definitions.d.ts +8 -34
  37. package/dist/components/parameters/common/limitreductions/columns-definitions.js +11 -32
  38. package/dist/components/parameters/common/limitreductions/index.d.ts +0 -1
  39. package/dist/components/parameters/common/limitreductions/index.js +1 -4
  40. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +5 -0
  41. package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +5 -0
  42. package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +5 -0
  43. package/dist/components/parameters/common/parameter-dnd-table-field.d.ts +9 -0
  44. package/dist/components/parameters/common/parameter-dnd-table-field.js +85 -0
  45. package/dist/components/parameters/common/parameter-field.d.ts +15 -0
  46. package/dist/components/parameters/{loadflow/load-flow-parameter-field.js → common/parameter-field.js} +12 -14
  47. package/dist/components/parameters/common/parameter-table/constants.d.ts +11 -0
  48. package/dist/components/parameters/common/parameter-table/constants.js +12 -0
  49. package/dist/components/parameters/common/parameter-table/index.d.ts +9 -0
  50. package/dist/components/parameters/common/parameter-table/index.js +10 -0
  51. package/dist/components/parameters/common/parameter-table/parameter-table.d.ts +15 -0
  52. package/dist/components/parameters/{sensi/sensitivity-table.js → common/parameter-table/parameter-table.js} +11 -37
  53. package/dist/components/parameters/{sensi → common/parameter-table}/table-cell.js +19 -17
  54. package/dist/components/parameters/{sensi → common/parameter-table}/table-row.d.ts +2 -2
  55. package/dist/components/parameters/common/parameter-table/types.d.ts +26 -0
  56. package/dist/components/parameters/common/parameter-table/types.js +1 -0
  57. package/dist/components/parameters/common/utils.js +1 -1
  58. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +6 -1
  59. package/dist/components/parameters/common/widget/parameter-float.js +5 -0
  60. package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +5 -0
  61. package/dist/components/parameters/common/widget/parameter-line-slider.js +5 -0
  62. package/dist/components/parameters/dynamic-margin-calculation/constants.d.ts +18 -0
  63. package/dist/components/parameters/dynamic-margin-calculation/constants.js +26 -0
  64. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.d.ts +6 -0
  65. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.js +1 -0
  66. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +9 -0
  67. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +95 -0
  68. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.d.ts +10 -0
  69. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +176 -0
  70. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.d.ts +10 -0
  71. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.js +8 -0
  72. package/dist/components/parameters/dynamic-margin-calculation/index.d.ts +8 -0
  73. package/dist/components/parameters/dynamic-margin-calculation/index.js +17 -0
  74. package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.d.ts +29 -0
  75. package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.js +154 -0
  76. package/dist/components/parameters/dynamic-margin-calculation/time-delay-parameters.d.ts +24 -0
  77. package/dist/components/parameters/dynamic-margin-calculation/time-delay-parameters.js +62 -0
  78. package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.d.ts +30 -0
  79. package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +179 -0
  80. package/dist/components/parameters/index.d.ts +1 -0
  81. package/dist/components/parameters/index.js +20 -7
  82. package/dist/components/parameters/loadflow/load-flow-general-parameters.js +10 -6
  83. package/dist/components/parameters/loadflow/load-flow-parameters-content.js +4 -0
  84. package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +4 -0
  85. package/dist/components/parameters/loadflow/load-flow-parameters-form.js +5 -0
  86. package/dist/components/parameters/loadflow/load-flow-parameters-header.js +6 -2
  87. package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +5 -1
  88. package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +6 -3
  89. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +6 -3
  90. package/dist/components/parameters/network-visualizations/map-parameters.js +4 -0
  91. package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +5 -0
  92. package/dist/components/parameters/network-visualizations/network-visualizations-form.js +5 -1
  93. package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +4 -0
  94. package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +5 -0
  95. package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +4 -0
  96. package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +5 -0
  97. package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +5 -0
  98. package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +4 -0
  99. package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +5 -1
  100. package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +5 -1
  101. package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +5 -0
  102. package/dist/components/parameters/security-analysis/columns-definitions.d.ts +63 -0
  103. package/dist/components/parameters/security-analysis/columns-definitions.js +78 -0
  104. package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +5 -0
  105. package/dist/components/parameters/security-analysis/security-analysis-parameters-form.d.ts +4 -1
  106. package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +32 -13
  107. package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.d.ts +2 -1
  108. package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +9 -2
  109. package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.d.ts +3 -2
  110. package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +4 -0
  111. package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +6 -2
  112. package/dist/components/parameters/security-analysis/types.d.ts +15 -0
  113. package/dist/components/parameters/security-analysis/types.js +1 -0
  114. package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.d.ts +5 -4
  115. package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +26 -7
  116. package/dist/components/parameters/sensi/columns-definitions.d.ts +7 -25
  117. package/dist/components/parameters/sensi/columns-definitions.js +35 -1
  118. package/dist/components/parameters/sensi/constants.d.ts +0 -2
  119. package/dist/components/parameters/sensi/constants.js +0 -4
  120. package/dist/components/parameters/sensi/index.d.ts +0 -1
  121. package/dist/components/parameters/sensi/index.js +1 -3
  122. package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +5 -0
  123. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +4 -0
  124. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +6 -2
  125. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +5 -1
  126. package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +27 -19
  127. package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +7 -2
  128. package/dist/components/parameters/sensi/utils.d.ts +2 -1
  129. package/dist/components/parameters/sensi/utils.js +7 -2
  130. package/dist/components/parameters/short-circuit/short-circuit-fields.js +6 -2
  131. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +5 -0
  132. package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +4 -0
  133. package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +5 -0
  134. package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +5 -1
  135. package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +5 -1
  136. package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +6 -2
  137. package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +5 -1
  138. package/dist/components/parameters/voltage-init/general-parameters.js +4 -0
  139. package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +5 -0
  140. package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +5 -0
  141. package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +4 -0
  142. package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +5 -1
  143. package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +5 -1
  144. package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +5 -0
  145. package/dist/hooks/index.d.ts +1 -1
  146. package/dist/hooks/index.js +2 -2
  147. package/dist/hooks/use-create-row-data.d.ts +4 -0
  148. package/dist/hooks/{use-create-row-data-sensi.js → use-create-row-data.js} +5 -5
  149. package/dist/index.js +31 -9
  150. package/dist/services/dynamic-margin-calculation.d.ts +5 -0
  151. package/dist/services/dynamic-margin-calculation.js +35 -0
  152. package/dist/services/index.d.ts +1 -0
  153. package/dist/services/index.js +4 -0
  154. package/dist/translations/en/businessErrorsEn.d.ts +3 -0
  155. package/dist/translations/en/businessErrorsEn.js +4 -1
  156. package/dist/translations/en/parameters.d.ts +21 -0
  157. package/dist/translations/en/parameters.js +25 -3
  158. package/dist/translations/fr/businessErrorsFr.d.ts +3 -0
  159. package/dist/translations/fr/businessErrorsFr.js +4 -1
  160. package/dist/translations/fr/parameters.d.ts +21 -0
  161. package/dist/translations/fr/parameters.js +25 -3
  162. package/dist/utils/index.js +3 -0
  163. package/dist/utils/types/dynamic-margin-calculation.type.d.ts +32 -0
  164. package/dist/utils/types/dynamic-margin-calculation.type.js +14 -0
  165. package/dist/utils/types/elementType.d.ts +1 -0
  166. package/dist/utils/types/elementType.js +1 -0
  167. package/dist/utils/types/index.d.ts +1 -0
  168. package/dist/utils/types/index.js +3 -0
  169. package/dist/utils/types/parameters.type.d.ts +4 -2
  170. package/package.json +1 -1
  171. package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.d.ts +0 -29
  172. package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.js +0 -27
  173. package/dist/components/parameters/loadflow/load-flow-parameter-field.d.ts +0 -19
  174. package/dist/components/parameters/sensi/sensitivity-table.d.ts +0 -14
  175. package/dist/hooks/use-create-row-data-sensi.d.ts +0 -4
  176. /package/dist/components/parameters/{sensi → common/parameter-table}/table-cell.d.ts +0 -0
  177. /package/dist/components/parameters/{sensi → common/parameter-table}/table-row.js +0 -0
@@ -0,0 +1,102 @@
1
+ import { DESCRIPTION, ACTIVATED, ID, NAME } from "../parameter-table/constants.js";
2
+ import "react/jsx-runtime";
3
+ import "@mui/material";
4
+ import "@mui/icons-material";
5
+ import "react";
6
+ import "react-intl";
7
+ import "react-hook-form";
8
+ import "../../../overflowableText/OverflowableText.js";
9
+ import "../../../../utils/conversionUtils.js";
10
+ import { ElementType } from "../../../../utils/types/elementType.js";
11
+ import "../../../../utils/types/equipmentType.js";
12
+ import "../../../../utils/yupConfig.js";
13
+ import "localized-countries";
14
+ import "localized-countries/data/fr";
15
+ import "localized-countries/data/en";
16
+ import "notistack";
17
+ import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
18
+ import * as yup from "yup";
19
+ import "../../../treeViewFinder/TreeViewFinder.js";
20
+ import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
21
+ import "../../../customAGGrid/customAggrid.js";
22
+ import "ag-grid-community";
23
+ import "react-papaparse";
24
+ import "react-csv-downloader";
25
+ import "../../../inputs/reactHookForm/numbers/RangeInput.js";
26
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
27
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
28
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
29
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
30
+ import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
31
+ import "@react-querybuilder/material";
32
+ import "../../../filter/expert/expertFilterConstants.js";
33
+ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
34
+ import "uuid";
35
+ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
36
+ import "react-querybuilder";
37
+ import { CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS } from "../constants.js";
38
+ const COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS = [
39
+ {
40
+ label: "ContingencyLists",
41
+ dataKey: CONTINGENCY_LISTS,
42
+ initialValue: [],
43
+ editable: true,
44
+ directoryItems: true,
45
+ elementType: ElementType.CONTINGENCY_LIST,
46
+ titleId: "ContingencyListsSelection"
47
+ },
48
+ {
49
+ label: "description",
50
+ dataKey: DESCRIPTION,
51
+ initialValue: "",
52
+ editable: true,
53
+ descriptionItems: true,
54
+ width: "8rem"
55
+ },
56
+ {
57
+ label: "Active",
58
+ dataKey: ACTIVATED,
59
+ initialValue: true,
60
+ checkboxItems: true,
61
+ editable: true,
62
+ width: "4rem"
63
+ }
64
+ ];
65
+ const ParamContingencyLists = {
66
+ columnsDef: COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
67
+ name: CONTINGENCY_LISTS_INFOS
68
+ };
69
+ const getContingencyListsInfosFormSchema = () => {
70
+ return yup.object().shape({
71
+ [CONTINGENCY_LISTS_INFOS]: yup.array().of(
72
+ yup.object().shape({
73
+ [CONTINGENCY_LISTS]: yup.array().of(
74
+ yup.object().shape({
75
+ [ID]: yup.string().required(),
76
+ [NAME]: yup.string().required()
77
+ })
78
+ ).required().min(1, "FieldIsRequired"),
79
+ [DESCRIPTION]: yup.string(),
80
+ [ACTIVATED]: yup.boolean().required()
81
+ })
82
+ )
83
+ }).required();
84
+ };
85
+ const toFormValuesContingencyListsInfos = (contingencyListsInfos) => {
86
+ return {
87
+ [CONTINGENCY_LISTS_INFOS]: contingencyListsInfos?.map((contingencyListInfos) => ({
88
+ [CONTINGENCY_LISTS]: contingencyListInfos[CONTINGENCY_LISTS]?.map((c) => ({
89
+ [NAME]: c[NAME],
90
+ [ID]: c[ID]
91
+ })),
92
+ [DESCRIPTION]: contingencyListInfos[DESCRIPTION],
93
+ [ACTIVATED]: contingencyListInfos[ACTIVATED]
94
+ }))
95
+ };
96
+ };
97
+ export {
98
+ COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
99
+ ParamContingencyLists,
100
+ getContingencyListsInfosFormSchema,
101
+ toFormValuesContingencyListsInfos
102
+ };
@@ -0,0 +1,5 @@
1
+ import { UUID } from 'node:crypto';
2
+ export declare function ContingencyTable({ showContingencyCount, fetchContingencyCount, }: Readonly<{
3
+ showContingencyCount: boolean;
4
+ fetchContingencyCount?: (contingencyLists: UUID[] | null) => Promise<number>;
5
+ }>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,81 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Stack, Alert } from "@mui/material";
3
+ import { useState, useCallback, useEffect } from "react";
4
+ import { useIntl, FormattedMessage } from "react-intl";
5
+ import { useWatch } from "react-hook-form";
6
+ import "../../../../utils/conversionUtils.js";
7
+ import "../../../../utils/types/equipmentType.js";
8
+ import "@mui/icons-material";
9
+ import "../../../../utils/yupConfig.js";
10
+ import "localized-countries";
11
+ import "localized-countries/data/fr";
12
+ import "localized-countries/data/en";
13
+ import "notistack";
14
+ import { useCreateRowData } from "../../../../hooks/use-create-row-data.js";
15
+ import { ACTIVATED, ID } from "../parameter-table/constants.js";
16
+ import { ParameterTable } from "../parameter-table/parameter-table.js";
17
+ import { CONTINGENCY_LISTS_INFOS, CONTINGENCY_LISTS } from "../constants.js";
18
+ import { ParamContingencyLists, COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS } from "./columns-definitions.js";
19
+ function ContingencyTable({
20
+ showContingencyCount = false,
21
+ fetchContingencyCount
22
+ }) {
23
+ const intl = useIntl();
24
+ const [simulatedContingencyCount, setSimulatedContingencyCount] = useState(0);
25
+ const [rowData, useFieldArrayOutput] = useCreateRowData(ParamContingencyLists);
26
+ const contingencyListsInfos = useWatch({ name: CONTINGENCY_LISTS_INFOS });
27
+ const getColumnsDefinition = useCallback(
28
+ (columns) => {
29
+ if (columns) {
30
+ return columns.map((column) => ({
31
+ ...column,
32
+ label: intl.formatMessage({ id: column.label })
33
+ }));
34
+ }
35
+ return [];
36
+ },
37
+ [intl]
38
+ );
39
+ useEffect(() => {
40
+ if (showContingencyCount) {
41
+ if (!contingencyListsInfos || contingencyListsInfos.length === 0) {
42
+ setSimulatedContingencyCount(null);
43
+ return;
44
+ }
45
+ fetchContingencyCount?.(
46
+ contingencyListsInfos.filter((lists) => lists[ACTIVATED]).flatMap((lists) => lists[CONTINGENCY_LISTS]?.map((contingencyList) => contingencyList[ID]))
47
+ ).then((contingencyCount) => {
48
+ setSimulatedContingencyCount(contingencyCount);
49
+ }).catch(() => {
50
+ setSimulatedContingencyCount(null);
51
+ });
52
+ }
53
+ }, [contingencyListsInfos, fetchContingencyCount, showContingencyCount]);
54
+ return /* @__PURE__ */ jsxs(Stack, { spacing: 0, sx: { width: "100%" }, children: [
55
+ /* @__PURE__ */ jsx(
56
+ ParameterTable,
57
+ {
58
+ arrayFormName: CONTINGENCY_LISTS_INFOS,
59
+ useFieldArrayOutput,
60
+ columnsDefinition: getColumnsDefinition(COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS),
61
+ tableHeight: 270,
62
+ createRows: rowData,
63
+ onFormChanged: () => {
64
+ },
65
+ isValidParameterRow: (row) => row[CONTINGENCY_LISTS]?.length > 0
66
+ }
67
+ ),
68
+ showContingencyCount && /* @__PURE__ */ jsx(Alert, { variant: "standard", severity: "info", children: /* @__PURE__ */ jsx(
69
+ FormattedMessage,
70
+ {
71
+ id: "xContingenciesWillBeSimulated",
72
+ values: {
73
+ x: simulatedContingencyCount ?? "..."
74
+ }
75
+ }
76
+ ) })
77
+ ] });
78
+ }
79
+ export {
80
+ ContingencyTable
81
+ };
@@ -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 https://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './contingency-table';
8
+ export * from './columns-definitions';
@@ -0,0 +1,9 @@
1
+ import { ContingencyTable } from "./contingency-table.js";
2
+ import { COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS, ParamContingencyLists, getContingencyListsInfosFormSchema, toFormValuesContingencyListsInfos } from "./columns-definitions.js";
3
+ export {
4
+ COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
5
+ ContingencyTable,
6
+ ParamContingencyLists,
7
+ getContingencyListsInfosFormSchema,
8
+ toFormValuesContingencyListsInfos
9
+ };
@@ -0,0 +1,12 @@
1
+ import { UUID } from 'node:crypto';
2
+ import { ACTIVATED, DESCRIPTION, ID, NAME } from '../parameter-table/constants';
3
+ import { CONTINGENCY_LISTS } from '../constants';
4
+ export interface IdName {
5
+ [ID]: UUID;
6
+ [NAME]: string;
7
+ }
8
+ export interface ContingencyListsInfos {
9
+ [CONTINGENCY_LISTS]: IdName[];
10
+ [DESCRIPTION]: string;
11
+ [ACTIVATED]: boolean;
12
+ }
@@ -5,7 +5,7 @@
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
7
  export * from './computing-type';
8
- export * from './constant';
8
+ export * from './constants';
9
9
  export * from './parameters-edition-dialog-props';
10
10
  export * from './line-separator';
11
11
  export * from './parameters';
@@ -1,5 +1,5 @@
1
1
  import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./computing-type.js";
2
- import { COMMON_PARAMETERS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./constant.js";
2
+ import { COMMON_PARAMETERS, CONTINGENCIES, CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./constants.js";
3
3
  import { LineSeparator } from "./line-separator.js";
4
4
  import { LabelledButton, SwitchWithLabel, TabPanel } from "./parameters.js";
5
5
  import { CreateParameterDialog } from "./parameters-creation-dialog.js";
@@ -12,14 +12,16 @@ import { ParameterSwitch } from "./widget/parameter-switch.js";
12
12
  import { CustomVoltageLevelTable } from "./voltage-level-table/custom-voltage-level-table.js";
13
13
  import { CustomVoltageLevelTableCell } from "./voltage-level-table/custom-voltage-level-table-cell.js";
14
14
  import { CustomVoltageLevelTableRow } from "./voltage-level-table/custom-voltage-level-table-row.js";
15
- import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema, getSAParametersFromSchema } from "./limitreductions/columns-definitions.js";
16
- import { toFormValueSaParameters, toFormValuesLimitReductions } from "./limitreductions/limit-reductions-form-util.js";
15
+ import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema, toFormValuesLimitReductions } from "./limitreductions/columns-definitions.js";
17
16
  import { LimitReductionsTableForm } from "./limitreductions/limit-reductions-table-form.js";
18
17
  import { LimitReductionTableRow } from "./limitreductions/limit-reduction-table-row.js";
19
18
  import { LimitReductionTableCell } from "./limitreductions/limit-reduction-table-cell.js";
20
19
  export {
21
20
  COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
22
21
  COMMON_PARAMETERS,
22
+ CONTINGENCIES,
23
+ CONTINGENCY_LISTS,
24
+ CONTINGENCY_LISTS_INFOS,
23
25
  ComputingType,
24
26
  CreateParameterDialog,
25
27
  CustomVoltageLevelTable,
@@ -56,9 +58,7 @@ export {
56
58
  VOLTAGE_LEVELS_FORM,
57
59
  formatComputingTypeLabel,
58
60
  getLimitReductionsFormSchema,
59
- getSAParametersFromSchema,
60
61
  isValidComputingType,
61
62
  sanitizePercentageValue,
62
- toFormValueSaParameters,
63
63
  toFormValuesLimitReductions
64
64
  };
@@ -1,6 +1,4 @@
1
- import { UUID } from 'node:crypto';
2
1
  import { default as yup } from '../../../../utils/yupConfig';
3
- import { PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER } from '../constant';
4
2
  export declare const LIMIT_REDUCTIONS_FORM = "limitReductionsForm";
5
3
  export declare const VOLTAGE_LEVELS_FORM = "voltageLevelsForm";
6
4
  export declare const IST_FORM = "istForm";
@@ -25,16 +23,6 @@ export interface ILimitReductionsByVoltageLevel {
25
23
  permanentLimitReduction: number;
26
24
  temporaryLimitReductions: ITemporaryLimitReduction[];
27
25
  }
28
- export interface ISAParameters {
29
- uuid?: UUID;
30
- [PARAM_SA_PROVIDER]: string;
31
- limitReductions: ILimitReductionsByVoltageLevel[];
32
- [PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD]: number;
33
- [PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD]: number;
34
- [PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD]: number;
35
- [PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD]: number;
36
- [PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD]: number;
37
- }
38
26
  export declare enum TabValues {
39
27
  'General' = 0,
40
28
  'LimitReductions' = 1
@@ -58,25 +46,11 @@ export declare const getLimitReductionsFormSchema: (nbTemporaryLimits: number) =
58
46
  }, yup.AnyObject, {
59
47
  limitReductionsForm: "";
60
48
  }, "">;
61
- export declare const getSAParametersFromSchema: (name: string | null, limitReductions?: ILimitReductionsByVoltageLevel[]) => yup.ObjectSchema<{
62
- flowProportionalThreshold: unknown;
63
- lowVoltageProportionalThreshold: unknown;
64
- lowVoltageAbsoluteThreshold: unknown;
65
- highVoltageProportionalThreshold: unknown;
66
- highVoltageAbsoluteThreshold: unknown;
67
- limitReductionsForm: unknown;
68
- provider: unknown;
69
- } & {
70
- name: string | null | undefined;
71
- description: string | null | undefined;
72
- }, yup.AnyObject, {
73
- flowProportionalThreshold: undefined;
74
- lowVoltageProportionalThreshold: undefined;
75
- lowVoltageAbsoluteThreshold: undefined;
76
- highVoltageProportionalThreshold: undefined;
77
- highVoltageAbsoluteThreshold: undefined;
78
- limitReductionsForm: undefined;
79
- provider: undefined;
80
- name: undefined;
81
- description: undefined;
82
- }, "">;
49
+ export declare const toFormValuesLimitReductions: (limits: ILimitReductionsByVoltageLevel[]) => {
50
+ limitReductionsForm?: undefined;
51
+ } | {
52
+ limitReductionsForm: {
53
+ voltageLevelsForm: string;
54
+ istForm: number;
55
+ }[];
56
+ };
@@ -1,17 +1,5 @@
1
1
  import "../../../../utils/yupConfig.js";
2
- import { PARAM_SA_PROVIDER, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD } from "../constant.js";
3
- import "react/jsx-runtime";
4
- import "@mui/material";
5
- import "react";
6
- import "react-intl";
7
- import "@mui/icons-material";
8
- import "react-hook-form";
9
- import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
10
2
  import * as yup from "yup";
11
- import "../../../../utils/conversionUtils.js";
12
- import "../../../../utils/types/equipmentType.js";
13
- import "../../../filter/HeaderFilterForm.js";
14
- import { getNameElementEditorSchema } from "../name-element-editor/name-element-editor-utils.js";
15
3
  const LIMIT_REDUCTIONS_FORM = "limitReductionsForm";
16
4
  const VOLTAGE_LEVELS_FORM = "voltageLevelsForm";
17
5
  const IST_FORM = "istForm";
@@ -61,25 +49,16 @@ const getLimitReductionsFormSchema = (nbTemporaryLimits) => {
61
49
  )
62
50
  }).required();
63
51
  };
64
- const getSAParametersFromSchema = (name, limitReductions) => {
65
- const providerSchema = yup.object().shape({
66
- [PARAM_SA_PROVIDER]: yup.string().required()
67
- });
68
- const limitReductionsSchema = getLimitReductionsFormSchema(
69
- limitReductions?.length ? limitReductions[0].temporaryLimitReductions.length : 0
70
- );
71
- const thresholdsSchema = yup.object().shape({
72
- [PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD]: yup.number().min(0, "NormalizedPercentage").max(100, "NormalizedPercentage").required(),
73
- [PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD]: yup.number().min(0, "NormalizedPercentage").max(100, "NormalizedPercentage").required(),
74
- [PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD]: yup.number().required(),
75
- [PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD]: yup.number().min(0, "NormalizedPercentage").max(100, "NormalizedPercentage").required(),
76
- [PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD]: yup.number().required()
77
- });
78
- return yup.object().shape({
79
- ...providerSchema.fields,
80
- ...limitReductionsSchema.fields,
81
- ...thresholdsSchema.fields
82
- }).concat(getNameElementEditorSchema(name));
52
+ const toFormValuesFromTemporaryLimits = (limits) => limits.reduce((acc, limit, index) => {
53
+ acc[LIMIT_DURATION_FORM + index] = limit.reduction;
54
+ return acc;
55
+ }, {});
56
+ const toFormValuesLimitReductions = (limits) => !limits ? {} : {
57
+ [LIMIT_REDUCTIONS_FORM]: limits.map((vlLimits) => ({
58
+ [VOLTAGE_LEVELS_FORM]: `${vlLimits.voltageLevel.nominalV} kV`,
59
+ [IST_FORM]: vlLimits.permanentLimitReduction,
60
+ ...toFormValuesFromTemporaryLimits(vlLimits.temporaryLimitReductions)
61
+ }))
83
62
  };
84
63
  export {
85
64
  COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
@@ -90,5 +69,5 @@ export {
90
69
  TabValues,
91
70
  VOLTAGE_LEVELS_FORM,
92
71
  getLimitReductionsFormSchema,
93
- getSAParametersFromSchema
72
+ toFormValuesLimitReductions
94
73
  };
@@ -5,7 +5,6 @@
5
5
  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
6
  */
7
7
  export * from './columns-definitions';
8
- export * from './limit-reductions-form-util';
9
8
  export * from './limit-reductions-table-form';
10
9
  export * from './limit-reduction-table-row';
11
10
  export * from './limit-reduction-table-cell';
@@ -1,5 +1,4 @@
1
- import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema, getSAParametersFromSchema } from "./columns-definitions.js";
2
- import { toFormValueSaParameters, toFormValuesLimitReductions } from "./limit-reductions-form-util.js";
1
+ import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema, toFormValuesLimitReductions } from "./columns-definitions.js";
3
2
  import { LimitReductionsTableForm } from "./limit-reductions-table-form.js";
4
3
  import { LimitReductionTableRow } from "./limit-reduction-table-row.js";
5
4
  import { LimitReductionTableCell } from "./limit-reduction-table-cell.js";
@@ -15,7 +14,5 @@ export {
15
14
  TabValues,
16
15
  VOLTAGE_LEVELS_FORM,
17
16
  getLimitReductionsFormSchema,
18
- getSAParametersFromSchema,
19
- toFormValueSaParameters,
20
17
  toFormValuesLimitReductions
21
18
  };
@@ -24,6 +24,11 @@ import "react-papaparse";
24
24
  import "react-csv-downloader";
25
25
  import { FloatInput } from "../../../inputs/reactHookForm/numbers/FloatInput.js";
26
26
  import "../../../inputs/reactHookForm/numbers/RangeInput.js";
27
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
28
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
29
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
31
+ import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
27
32
  import "@react-querybuilder/material";
28
33
  import "../../../filter/expert/expertFilterConstants.js";
29
34
  import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
@@ -23,6 +23,11 @@ import "ag-grid-community";
23
23
  import "react-papaparse";
24
24
  import "react-csv-downloader";
25
25
  import "../../../inputs/reactHookForm/numbers/RangeInput.js";
26
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
27
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
28
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
29
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
30
+ import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
26
31
  import "@react-querybuilder/material";
27
32
  import "../../../filter/expert/expertFilterConstants.js";
28
33
  import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
@@ -22,6 +22,11 @@ import "ag-grid-community";
22
22
  import "react-papaparse";
23
23
  import "react-csv-downloader";
24
24
  import "../../../inputs/reactHookForm/numbers/RangeInput.js";
25
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
26
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
27
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
28
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
29
+ import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
25
30
  import "@react-querybuilder/material";
26
31
  import "../../../filter/expert/expertFilterConstants.js";
27
32
  import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
@@ -0,0 +1,9 @@
1
+ import { SxProps, TooltipProps } from '@mui/material';
2
+ import { DndTableProps } from '../../dnd-table';
3
+ export type ParameterDndTableFieldProps = {
4
+ name: string;
5
+ label: string;
6
+ tooltipProps?: Omit<TooltipProps, 'children'>;
7
+ sxContainerProps?: SxProps;
8
+ } & Omit<DndTableProps, 'arrayFormName' | 'useFieldArrayOutput'>;
9
+ export default function ParameterDndTableField({ name, label, columnsDefinition, tooltipProps, sxContainerProps, ...otherProps }: Readonly<ParameterDndTableFieldProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,85 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Grid, Typography, Tooltip } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ import { useFieldArray } from "react-hook-form";
5
+ import { Info } from "@mui/icons-material";
6
+ import { useMemo, useCallback } from "react";
7
+ import { DndTable } from "../../dnd-table/dnd-table.js";
8
+ import "../../overflowableText/OverflowableText.js";
9
+ import "../../../utils/conversionUtils.js";
10
+ import "../../../utils/types/equipmentType.js";
11
+ import "../../../utils/yupConfig.js";
12
+ import "localized-countries";
13
+ import "localized-countries/data/fr";
14
+ import "localized-countries/data/en";
15
+ import "notistack";
16
+ import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
17
+ import "yup";
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 "../../inputs/reactHookForm/numbers/RangeInput.js";
25
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
26
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
27
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
28
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
29
+ import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
30
+ import "@react-querybuilder/material";
31
+ import "../../filter/expert/expertFilterConstants.js";
32
+ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
33
+ import "uuid";
34
+ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
35
+ import "react-querybuilder";
36
+ function ParameterDndTableField({
37
+ name,
38
+ label,
39
+ columnsDefinition,
40
+ tooltipProps,
41
+ sxContainerProps,
42
+ ...otherProps
43
+ }) {
44
+ const useFieldArrayOutput = useFieldArray({
45
+ name
46
+ });
47
+ const newDefaultRowData = useMemo(() => {
48
+ const newRowData = {};
49
+ columnsDefinition.forEach((columnDefinition) => {
50
+ newRowData[columnDefinition.dataKey] = columnDefinition.initialValue || null;
51
+ });
52
+ return newRowData;
53
+ }, [columnsDefinition]);
54
+ const createRows = useCallback(() => [newDefaultRowData], [newDefaultRowData]);
55
+ const { title, ...otherTooltipProps } = tooltipProps || {};
56
+ return /* @__PURE__ */ jsxs(Grid, { container: true, sx: sxContainerProps, children: [
57
+ /* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", paddingBottom: 2, paddingTop: 2, children: [
58
+ /* @__PURE__ */ jsx(Typography, { component: "span", variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
59
+ tooltipProps && /* @__PURE__ */ jsx(
60
+ Tooltip,
61
+ {
62
+ title: typeof title === "string" ? /* @__PURE__ */ jsx(FormattedMessage, { id: title }) : title,
63
+ placement: "right-start",
64
+ sx: { marginLeft: 1 },
65
+ ...otherTooltipProps,
66
+ children: /* @__PURE__ */ jsx(Info, {})
67
+ }
68
+ )
69
+ ] }),
70
+ /* @__PURE__ */ jsx(
71
+ DndTable,
72
+ {
73
+ arrayFormName: name,
74
+ useFieldArrayOutput,
75
+ columnsDefinition,
76
+ createRows,
77
+ withAddRowsDialog: false,
78
+ ...otherProps
79
+ }
80
+ )
81
+ ] });
82
+ }
83
+ export {
84
+ ParameterDndTableField as default
85
+ };
@@ -0,0 +1,15 @@
1
+ import { SxProps } from '@mui/material';
2
+ interface ParameterFieldProps {
3
+ id: string;
4
+ name: string;
5
+ type: string;
6
+ label?: string;
7
+ description?: string;
8
+ possibleValues?: {
9
+ id: string;
10
+ label: string;
11
+ }[] | string[];
12
+ sx?: SxProps;
13
+ }
14
+ declare function ParameterField({ id, name, type, label, description, possibleValues, sx }: Readonly<ParameterFieldProps>): import("react/jsx-runtime").JSX.Element;
15
+ export default ParameterField;
@@ -31,25 +31,22 @@ import "../../inputs/reactHookForm/numbers/RangeInput.js";
31
31
  import { CountriesInput } from "../../inputs/reactHookForm/selectInputs/CountriesInput.js";
32
32
  import { MuiSelectInput } from "../../inputs/reactHookForm/selectInputs/MuiSelectInput.js";
33
33
  import { TextInput } from "../../inputs/reactHookForm/text/TextInput.js";
34
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
35
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
36
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
37
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
38
+ import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
34
39
  import "@react-querybuilder/material";
35
40
  import "../../filter/expert/expertFilterConstants.js";
36
41
  import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
37
42
  import "uuid";
38
43
  import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
39
44
  import "react-querybuilder";
40
- import { LineSeparator } from "../common/line-separator.js";
41
- import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
45
+ import { LineSeparator } from "./line-separator.js";
42
46
  import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
43
- import "../common/widget/parameter-line-slider.js";
44
- import "../common/limitreductions/columns-definitions.js";
45
- function LoadFlowParameterField({
46
- id,
47
- name,
48
- type,
49
- label,
50
- description,
51
- possibleValues
52
- }) {
47
+ import "./widget/parameter-line-slider.js";
48
+ import "./limitreductions/columns-definitions.js";
49
+ function ParameterField({ id, name, type, label, description, possibleValues, sx }) {
53
50
  const renderField = () => {
54
51
  switch (type) {
55
52
  case ParameterType.STRING:
@@ -59,7 +56,8 @@ function LoadFlowParameterField({
59
56
  name: `${id}.${name}`,
60
57
  options: possibleValues,
61
58
  size: "small",
62
- "data-testid": `${id}.${name}`
59
+ "data-testid": `${id}.${name}`,
60
+ sx
63
61
  }
64
62
  ) : /* @__PURE__ */ jsx(TextInput, { name: `${id}.${name}`, dataTestId: `${id}.${name}` });
65
63
  case ParameterType.BOOLEAN:
@@ -104,5 +102,5 @@ function LoadFlowParameterField({
104
102
  ] }, name);
105
103
  }
106
104
  export {
107
- LoadFlowParameterField as default
105
+ ParameterField as default
108
106
  };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export declare const MAX_ROWS_NUMBER = 100;
8
+ export declare const NAME = "name";
9
+ export declare const ID = "id";
10
+ export declare const ACTIVATED = "activated";
11
+ export declare const DESCRIPTION = "description";
@@ -0,0 +1,12 @@
1
+ const MAX_ROWS_NUMBER = 100;
2
+ const NAME = "name";
3
+ const ID = "id";
4
+ const ACTIVATED = "activated";
5
+ const DESCRIPTION = "description";
6
+ export {
7
+ ACTIVATED,
8
+ DESCRIPTION,
9
+ ID,
10
+ MAX_ROWS_NUMBER,
11
+ NAME
12
+ };