@gridsuite/commons-ui 0.97.0 → 0.99.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 (122) hide show
  1. package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.js +1 -1
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.js +94 -1
  4. package/dist/components/inputs/index.js +2 -1
  5. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.d.ts +3 -1
  6. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +15 -3
  7. package/dist/components/inputs/reactHookForm/index.js +2 -1
  8. package/dist/components/inputs/reactHookForm/utils/HelperPreviousValue.js +1 -1
  9. package/dist/components/parameters/common/ProviderParam.d.ts +7 -0
  10. package/dist/components/parameters/common/ProviderParam.js +51 -0
  11. package/dist/components/parameters/common/computing-type.d.ts +20 -0
  12. package/dist/components/parameters/common/computing-type.js +46 -0
  13. package/dist/components/parameters/common/constant.d.ts +8 -0
  14. package/dist/components/parameters/common/constant.js +18 -0
  15. package/dist/components/parameters/common/index.d.ts +15 -0
  16. package/dist/components/parameters/common/index.js +61 -0
  17. package/dist/components/parameters/common/limitreductions/columns-definitions.d.ts +77 -0
  18. package/dist/components/parameters/common/limitreductions/columns-definitions.js +83 -0
  19. package/dist/components/parameters/common/limitreductions/index.d.ts +11 -0
  20. package/dist/components/parameters/common/limitreductions/index.js +21 -0
  21. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.d.ts +5 -0
  22. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +38 -0
  23. package/dist/components/parameters/common/limitreductions/limit-reduction-table-row.d.ts +7 -0
  24. package/dist/components/parameters/common/limitreductions/limit-reduction-table-row.js +9 -0
  25. package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.d.ts +29 -0
  26. package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.js +27 -0
  27. package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.d.ts +4 -0
  28. package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +87 -0
  29. package/dist/components/parameters/common/line-separator.d.ts +1 -0
  30. package/dist/components/parameters/common/line-separator.js +8 -0
  31. package/dist/components/parameters/common/parameters-creation-dialog.d.ts +13 -0
  32. package/dist/components/parameters/common/parameters-creation-dialog.js +88 -0
  33. package/dist/components/parameters/common/parameters.d.ts +20 -0
  34. package/dist/components/parameters/common/parameters.js +42 -0
  35. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.d.ts +6 -0
  36. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +42 -0
  37. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-row.d.ts +8 -0
  38. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-row.js +17 -0
  39. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table.d.ts +8 -0
  40. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table.js +55 -0
  41. package/dist/components/parameters/common/voltage-level-table/index.d.ts +9 -0
  42. package/dist/components/parameters/common/voltage-level-table/index.js +8 -0
  43. package/dist/components/parameters/common/widget/index.d.ts +11 -0
  44. package/dist/components/parameters/common/widget/index.js +13 -0
  45. package/dist/components/parameters/common/widget/parameter-float.d.ts +10 -0
  46. package/dist/components/parameters/common/widget/parameter-float.js +51 -0
  47. package/dist/components/parameters/common/widget/parameter-group.d.ts +11 -0
  48. package/dist/components/parameters/common/widget/parameter-group.js +54 -0
  49. package/dist/components/parameters/common/widget/parameter-line-directory-items-input.d.ts +15 -0
  50. package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +55 -0
  51. package/dist/components/parameters/common/widget/parameter-line-slider.d.ts +12 -0
  52. package/dist/components/parameters/common/widget/parameter-line-slider.js +70 -0
  53. package/dist/components/parameters/common/widget/parameter-switch.d.ts +7 -0
  54. package/dist/components/parameters/common/widget/parameter-switch.js +9 -0
  55. package/dist/components/parameters/index.d.ts +9 -0
  56. package/dist/components/parameters/index.js +94 -0
  57. package/dist/components/parameters/loadflow/constants.d.ts +33 -0
  58. package/dist/components/parameters/loadflow/constants.js +59 -0
  59. package/dist/components/parameters/loadflow/index.d.ts +9 -0
  60. package/dist/components/parameters/loadflow/index.js +31 -0
  61. package/dist/components/parameters/loadflow/load-flow-general-parameters.d.ts +8 -0
  62. package/dist/components/parameters/loadflow/load-flow-general-parameters.js +179 -0
  63. package/dist/components/parameters/loadflow/load-flow-parameter-field.d.ts +19 -0
  64. package/dist/components/parameters/loadflow/load-flow-parameter-field.js +90 -0
  65. package/dist/components/parameters/loadflow/load-flow-parameters-content.d.ts +13 -0
  66. package/dist/components/parameters/loadflow/load-flow-parameters-content.js +82 -0
  67. package/dist/components/parameters/loadflow/load-flow-parameters-context.d.ts +13 -0
  68. package/dist/components/parameters/loadflow/load-flow-parameters-context.js +5 -0
  69. package/dist/components/parameters/loadflow/load-flow-parameters-dialog.d.ts +15 -0
  70. package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +112 -0
  71. package/dist/components/parameters/loadflow/load-flow-parameters-form.d.ts +9 -0
  72. package/dist/components/parameters/loadflow/load-flow-parameters-form.js +102 -0
  73. package/dist/components/parameters/loadflow/load-flow-parameters-header.d.ts +12 -0
  74. package/dist/components/parameters/loadflow/load-flow-parameters-header.js +84 -0
  75. package/dist/components/parameters/loadflow/load-flow-parameters-inline.d.ts +10 -0
  76. package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +162 -0
  77. package/dist/components/parameters/loadflow/load-flow-parameters-provider.d.ts +4 -0
  78. package/dist/components/parameters/loadflow/load-flow-parameters-provider.js +20 -0
  79. package/dist/components/parameters/loadflow/load-flow-parameters-utils.d.ts +100 -0
  80. package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +158 -0
  81. package/dist/components/parameters/loadflow/use-load-flow-context.d.ts +7 -0
  82. package/dist/components/parameters/loadflow/use-load-flow-context.js +12 -0
  83. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.d.ts +32 -0
  84. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +263 -0
  85. package/dist/components/parameters/parameters-style.d.ts +150 -0
  86. package/dist/components/parameters/parameters-style.js +146 -0
  87. package/dist/hooks/index.d.ts +1 -0
  88. package/dist/hooks/index.js +3 -0
  89. package/dist/hooks/use-parameters-backend.d.ts +11 -0
  90. package/dist/hooks/use-parameters-backend.js +217 -0
  91. package/dist/index.js +115 -3
  92. package/dist/services/explore.d.ts +3 -0
  93. package/dist/services/explore.js +26 -1
  94. package/dist/services/index.js +6 -3
  95. package/dist/services/loadflow.d.ts +9 -0
  96. package/dist/services/loadflow.js +59 -0
  97. package/dist/services/utils.d.ts +3 -8
  98. package/dist/services/utils.js +5 -0
  99. package/dist/translations/en/index.d.ts +1 -0
  100. package/dist/translations/en/index.js +2 -0
  101. package/dist/translations/en/parameters.d.ts +67 -0
  102. package/dist/translations/en/parameters.js +64 -0
  103. package/dist/translations/fr/index.d.ts +1 -0
  104. package/dist/translations/fr/index.js +2 -0
  105. package/dist/translations/fr/parameters.d.ts +67 -0
  106. package/dist/translations/fr/parameters.js +64 -0
  107. package/dist/utils/index.js +9 -0
  108. package/dist/utils/types/dynamic-security-analysis.type.d.ts +13 -0
  109. package/dist/utils/types/dynamic-security-analysis.type.js +1 -0
  110. package/dist/utils/types/dynamic-simulation.type.d.ts +111 -0
  111. package/dist/utils/types/dynamic-simulation.type.js +8 -0
  112. package/dist/utils/types/index.d.ts +6 -0
  113. package/dist/utils/types/index.js +9 -0
  114. package/dist/utils/types/loadflow.type.d.ts +11 -0
  115. package/dist/utils/types/loadflow.type.js +1 -0
  116. package/dist/utils/types/non-evacuated-energy.type.d.ts +60 -0
  117. package/dist/utils/types/non-evacuated-energy.type.js +12 -0
  118. package/dist/utils/types/parameters.type.d.ts +41 -0
  119. package/dist/utils/types/parameters.type.js +12 -0
  120. package/dist/utils/types/sensitivity-analysis.type.d.ts +101 -0
  121. package/dist/utils/types/sensitivity-analysis.type.js +16 -0
  122. package/package.json +2 -1
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { TableRow } from "@mui/material";
3
+ import { CustomVoltageLevelTableCell } from "./custom-voltage-level-table-cell.js";
4
+ function CustomVoltageLevelTableRow({ formName, columnsDefinition, index }) {
5
+ return /* @__PURE__ */ jsx(TableRow, { children: columnsDefinition.map((column) => /* @__PURE__ */ jsx(
6
+ CustomVoltageLevelTableCell,
7
+ {
8
+ formName,
9
+ rowIndex: index,
10
+ column
11
+ },
12
+ `${column.dataKey}`
13
+ )) });
14
+ }
15
+ export {
16
+ CustomVoltageLevelTableRow
17
+ };
@@ -0,0 +1,8 @@
1
+ import { IColumnsDef } from '../limitreductions/columns-definitions';
2
+ interface LimitReductionsTableProps {
3
+ columnsDefinition: IColumnsDef[];
4
+ tableHeight: number;
5
+ formName: string;
6
+ }
7
+ export declare function CustomVoltageLevelTable({ formName, columnsDefinition, tableHeight, }: Readonly<LimitReductionsTableProps>): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,55 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from "@mui/material";
3
+ import { useMemo } from "react";
4
+ import { useFieldArray } from "react-hook-form";
5
+ import { LIMIT_REDUCTIONS_FORM } from "../limitreductions/columns-definitions.js";
6
+ import { LimitReductionTableRow } from "../limitreductions/limit-reduction-table-row.js";
7
+ import { CustomVoltageLevelTableRow } from "./custom-voltage-level-table-row.js";
8
+ function CustomVoltageLevelTable({
9
+ formName,
10
+ columnsDefinition,
11
+ tableHeight
12
+ }) {
13
+ const { fields: rows } = useFieldArray({
14
+ name: formName
15
+ });
16
+ const TableRowComponent = useMemo(
17
+ () => formName === LIMIT_REDUCTIONS_FORM ? LimitReductionTableRow : CustomVoltageLevelTableRow,
18
+ [formName]
19
+ );
20
+ return /* @__PURE__ */ jsx(
21
+ TableContainer,
22
+ {
23
+ sx: {
24
+ height: tableHeight,
25
+ width: "inherit",
26
+ border: "solid 0px rgba(0,0,0,0.1)"
27
+ },
28
+ children: /* @__PURE__ */ jsxs(Table, { stickyHeader: true, size: "small", sx: { tableLayout: "fixed" }, children: [
29
+ /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { children: columnsDefinition.map((column) => /* @__PURE__ */ jsx(
30
+ TableCell,
31
+ {
32
+ sx: {
33
+ textAlign: "center"
34
+ },
35
+ title: column.tooltip,
36
+ children: column.label
37
+ },
38
+ column.dataKey
39
+ )) }) }),
40
+ /* @__PURE__ */ jsx(TableBody, { children: rows.map((row, index) => /* @__PURE__ */ jsx(
41
+ TableRowComponent,
42
+ {
43
+ columnsDefinition,
44
+ index,
45
+ formName
46
+ },
47
+ `${row.id}`
48
+ )) })
49
+ ] })
50
+ }
51
+ );
52
+ }
53
+ export {
54
+ CustomVoltageLevelTable
55
+ };
@@ -0,0 +1,9 @@
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 https://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './custom-voltage-level-table';
8
+ export * from './custom-voltage-level-table-cell';
9
+ export * from './custom-voltage-level-table-row';
@@ -0,0 +1,8 @@
1
+ import { CustomVoltageLevelTable } from "./custom-voltage-level-table.js";
2
+ import { CustomVoltageLevelTableCell } from "./custom-voltage-level-table-cell.js";
3
+ import { CustomVoltageLevelTableRow } from "./custom-voltage-level-table-row.js";
4
+ export {
5
+ CustomVoltageLevelTable,
6
+ CustomVoltageLevelTableCell,
7
+ CustomVoltageLevelTableRow
8
+ };
@@ -0,0 +1,11 @@
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 https://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './parameter-float';
8
+ export * from './parameter-group';
9
+ export * from './parameter-line-directory-items-input';
10
+ export * from './parameter-line-slider';
11
+ export * from './parameter-switch';
@@ -0,0 +1,13 @@
1
+ import { ParameterFloat } from "./parameter-float.js";
2
+ import { ParameterGroup } from "./parameter-group.js";
3
+ import { ParameterLineDirectoryItemsInput } from "./parameter-line-directory-items-input.js";
4
+ import { ParameterLineSlider, sanitizePercentageValue } from "./parameter-line-slider.js";
5
+ import { ParameterSwitch } from "./parameter-switch.js";
6
+ export {
7
+ ParameterFloat,
8
+ ParameterGroup,
9
+ ParameterLineDirectoryItemsInput,
10
+ ParameterLineSlider,
11
+ ParameterSwitch,
12
+ sanitizePercentageValue
13
+ };
@@ -0,0 +1,10 @@
1
+ export interface ParameterFloatProps {
2
+ name: string;
3
+ label: string;
4
+ style: any;
5
+ adornment?: any;
6
+ tooltip?: string;
7
+ labelSize: number;
8
+ inputSize: number;
9
+ }
10
+ export declare function ParameterFloat({ name, label, style, adornment, tooltip, labelSize, inputSize, }: Readonly<ParameterFloatProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,51 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Tooltip, Grid } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ import "@mui/icons-material";
5
+ import "react";
6
+ import "react-hook-form";
7
+ import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
8
+ import "yup";
9
+ import "notistack";
10
+ import "../../../overflowableText/OverflowableText.js";
11
+ import "../../../treeViewFinder/TreeViewFinder.js";
12
+ import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
13
+ import "../../../customAGGrid/customAggrid.js";
14
+ import "ag-grid-community";
15
+ import "react-papaparse";
16
+ import "react-csv-downloader";
17
+ import { FloatInput } from "../../../inputs/reactHookForm/numbers/FloatInput.js";
18
+ import "../../../inputs/reactHookForm/numbers/RangeInput.js";
19
+ import "localized-countries";
20
+ import "localized-countries/data/fr";
21
+ import "localized-countries/data/en";
22
+ import "../../../../utils/conversionUtils.js";
23
+ import "../../../../utils/types/equipmentType.js";
24
+ import "../../../../utils/yupConfig.js";
25
+ import "@react-querybuilder/material";
26
+ import "../../../filter/expert/expertFilterConstants.js";
27
+ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
28
+ import "uuid";
29
+ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
30
+ import "react-querybuilder";
31
+ function ParameterFloat({
32
+ name,
33
+ label,
34
+ style,
35
+ adornment,
36
+ tooltip,
37
+ labelSize,
38
+ inputSize
39
+ }) {
40
+ const content = /* @__PURE__ */ jsxs(Grid, { item: true, container: true, direction: "row", spacing: 1, paddingTop: 3, children: [
41
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: labelSize, sx: style, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
42
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: inputSize, children: /* @__PURE__ */ jsx(FloatInput, { name, adornment }) })
43
+ ] });
44
+ if (tooltip) {
45
+ return /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: tooltip }), children: content });
46
+ }
47
+ return content;
48
+ }
49
+ export {
50
+ ParameterFloat
51
+ };
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type ParameterGroupProps = PropsWithChildren & {
3
+ label: string;
4
+ state: boolean;
5
+ onClick: (show: boolean) => void;
6
+ disabled?: boolean;
7
+ infoText?: string;
8
+ unmountOnExit?: boolean;
9
+ };
10
+ export declare function ParameterGroup({ label, state, onClick, disabled, infoText, unmountOnExit, children, }: Readonly<ParameterGroupProps>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,54 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Settings, ExpandCircleDown, ExpandMore } from "@mui/icons-material";
3
+ import { Grid, Accordion, AccordionSummary, Typography, AccordionDetails } from "@mui/material";
4
+ import { useState } from "react";
5
+ import { FormattedMessage } from "react-intl";
6
+ import { parametersStyles } from "../../parameters-style.js";
7
+ function ParameterGroup({
8
+ label,
9
+ state,
10
+ onClick,
11
+ disabled,
12
+ infoText,
13
+ unmountOnExit,
14
+ children
15
+ }) {
16
+ const [mouseHover, setMouseHover] = useState(false);
17
+ return /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sx: parametersStyles.subgroupParameters, children: /* @__PURE__ */ jsxs(
18
+ Accordion,
19
+ {
20
+ sx: parametersStyles.subgroupParametersAccordion,
21
+ expanded: state,
22
+ onChange: (event, showed) => onClick(showed),
23
+ disableGutters: true,
24
+ elevation: 0,
25
+ square: true,
26
+ slotProps: {
27
+ transition: {
28
+ unmountOnExit: unmountOnExit || false
29
+ }
30
+ },
31
+ disabled: disabled || void 0,
32
+ children: [
33
+ /* @__PURE__ */ jsxs(
34
+ AccordionSummary,
35
+ {
36
+ sx: parametersStyles.subgroupParametersAccordionSummary,
37
+ expandIcon: mouseHover ? /* @__PURE__ */ jsx(ExpandCircleDown, {}) : /* @__PURE__ */ jsx(ExpandMore, {}),
38
+ onMouseEnter: () => setMouseHover(true),
39
+ onMouseLeave: () => setMouseHover(false),
40
+ children: [
41
+ /* @__PURE__ */ jsx(Settings, {}),
42
+ /* @__PURE__ */ jsx(Typography, { sx: { width: "66%", flexShrink: 0 }, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
43
+ infoText && /* @__PURE__ */ jsx(Typography, { sx: { color: "text.secondary", width: "34%" }, noWrap: true, align: "right", variant: "body2", children: infoText })
44
+ ]
45
+ }
46
+ ),
47
+ /* @__PURE__ */ jsx(AccordionDetails, { sx: parametersStyles.subgroupParametersAccordionDetails, children })
48
+ ]
49
+ }
50
+ ) });
51
+ }
52
+ export {
53
+ ParameterGroup
54
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) 2024, 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
+ type DirectoryItemsInputLineProps = {
8
+ label: string;
9
+ name: string;
10
+ equipmentTypes?: string[];
11
+ elementType: string;
12
+ hideErrorMessage: boolean;
13
+ };
14
+ export declare function ParameterLineDirectoryItemsInput({ label, name, equipmentTypes, elementType, hideErrorMessage, }: Readonly<DirectoryItemsInputLineProps>): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,55 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Grid } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ import { parametersStyles } from "../../parameters-style.js";
5
+ import { DirectoryItemsInput } from "../../../inputs/reactHookForm/DirectoryItemsInput.js";
6
+ import "react-hook-form";
7
+ import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
8
+ import "react";
9
+ import "../../../customAGGrid/customAggrid.js";
10
+ import "ag-grid-community";
11
+ import "react-papaparse";
12
+ import "react-csv-downloader";
13
+ import "yup";
14
+ import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
15
+ import "@mui/icons-material";
16
+ import "../../../inputs/reactHookForm/numbers/RangeInput.js";
17
+ import "localized-countries";
18
+ import "localized-countries/data/fr";
19
+ import "localized-countries/data/en";
20
+ import "../../../../utils/conversionUtils.js";
21
+ import "../../../../utils/types/equipmentType.js";
22
+ import "../../../../utils/yupConfig.js";
23
+ import "notistack";
24
+ import "@react-querybuilder/material";
25
+ import "../../../filter/expert/expertFilterConstants.js";
26
+ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
27
+ import "uuid";
28
+ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
29
+ import "react-querybuilder";
30
+ function ParameterLineDirectoryItemsInput({
31
+ label,
32
+ name,
33
+ equipmentTypes,
34
+ elementType,
35
+ hideErrorMessage
36
+ }) {
37
+ return /* @__PURE__ */ jsxs(Grid, { item: true, container: true, spacing: 1, paddingTop: 1, paddingBottom: 1, children: [
38
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 7, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
39
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 5, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(
40
+ DirectoryItemsInput,
41
+ {
42
+ name,
43
+ equipmentTypes,
44
+ elementType,
45
+ titleId: label,
46
+ hideErrorMessage,
47
+ label: void 0,
48
+ itemFilter: void 0
49
+ }
50
+ ) })
51
+ ] });
52
+ }
53
+ export {
54
+ ParameterLineDirectoryItemsInput
55
+ };
@@ -0,0 +1,12 @@
1
+ import { Mark } from '@mui/base';
2
+ export declare function sanitizePercentageValue(value: number): number;
3
+ type SliderParameterLineProps = {
4
+ name: string;
5
+ disabled?: boolean;
6
+ label: string;
7
+ marks: boolean | Mark[];
8
+ minValue?: number;
9
+ maxValue?: number;
10
+ };
11
+ export declare function ParameterLineSlider({ name, label, marks, disabled, minValue, maxValue, }: Readonly<SliderParameterLineProps>): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,70 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { Grid } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ import { parametersStyles } from "../../parameters-style.js";
5
+ import "@mui/icons-material";
6
+ import "react";
7
+ import "react-hook-form";
8
+ import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
9
+ import "yup";
10
+ import "notistack";
11
+ import "../../../overflowableText/OverflowableText.js";
12
+ import "../../../treeViewFinder/TreeViewFinder.js";
13
+ import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
14
+ import "../../../customAGGrid/customAggrid.js";
15
+ import "ag-grid-community";
16
+ import "react-papaparse";
17
+ import "react-csv-downloader";
18
+ import "../../../inputs/reactHookForm/numbers/RangeInput.js";
19
+ import { SliderInput } from "../../../inputs/reactHookForm/numbers/SliderInput.js";
20
+ import "localized-countries";
21
+ import "localized-countries/data/fr";
22
+ import "localized-countries/data/en";
23
+ import "../../../../utils/conversionUtils.js";
24
+ import "../../../../utils/types/equipmentType.js";
25
+ import "../../../../utils/yupConfig.js";
26
+ import "@react-querybuilder/material";
27
+ import "../../../filter/expert/expertFilterConstants.js";
28
+ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
29
+ import "uuid";
30
+ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
31
+ import "react-querybuilder";
32
+ function sanitizePercentageValue(value) {
33
+ return Math.round(value * 10) / 10;
34
+ }
35
+ const styles = {
36
+ container: {
37
+ ...parametersStyles.controlItem,
38
+ paddingRight: 2
39
+ }
40
+ };
41
+ function ParameterLineSlider({
42
+ name,
43
+ label,
44
+ marks,
45
+ disabled = false,
46
+ minValue = 0,
47
+ maxValue = 100
48
+ }) {
49
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
51
+ /* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: 4, sx: styles.container, children: /* @__PURE__ */ jsx(
52
+ SliderInput,
53
+ {
54
+ name,
55
+ min: minValue,
56
+ max: maxValue,
57
+ valueLabelDisplay: "auto",
58
+ step: 0.01,
59
+ size: "medium",
60
+ disabled: disabled ?? false,
61
+ marks,
62
+ valueLabelFormat: (value) => sanitizePercentageValue(value * 100)
63
+ }
64
+ ) })
65
+ ] });
66
+ }
67
+ export {
68
+ ParameterLineSlider,
69
+ sanitizePercentageValue
70
+ };
@@ -0,0 +1,7 @@
1
+ import { SwitchProps } from '@mui/material';
2
+ export interface ParameterSwitchProps extends Pick<SwitchProps, 'onChange'> {
3
+ label: string;
4
+ value: boolean;
5
+ key?: string;
6
+ }
7
+ export declare function ParameterSwitch({ label, value, onChange, key }: Readonly<ParameterSwitchProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Grid } from "@mui/material";
3
+ import { SwitchWithLabel } from "../parameters.js";
4
+ function ParameterSwitch({ label, value, onChange, key }) {
5
+ return /* @__PURE__ */ jsx(Grid, { container: true, spacing: 1, paddingTop: 1, justifyContent: "space-between", children: /* @__PURE__ */ jsx(SwitchWithLabel, { value, label, callback: onChange }) }, key);
6
+ }
7
+ export {
8
+ ParameterSwitch
9
+ };
@@ -0,0 +1,9 @@
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 https://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './common';
8
+ export * from './parameters-style';
9
+ export * from './loadflow';
@@ -0,0 +1,94 @@
1
+ import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./common/computing-type.js";
2
+ 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, PROVIDER, VOLTAGE_LEVEL } from "./common/constant.js";
3
+ import { LineSeparator } from "./common/line-separator.js";
4
+ import { LabelledButton, SwitchWithLabel, TabPanel } from "./common/parameters.js";
5
+ import { CreateParameterDialog } from "./common/parameters-creation-dialog.js";
6
+ import { ProviderParam } from "./common/ProviderParam.js";
7
+ import { ParameterFloat } from "./common/widget/parameter-float.js";
8
+ import { ParameterGroup } from "./common/widget/parameter-group.js";
9
+ import { ParameterLineDirectoryItemsInput } from "./common/widget/parameter-line-directory-items-input.js";
10
+ import { ParameterLineSlider, sanitizePercentageValue } from "./common/widget/parameter-line-slider.js";
11
+ import { ParameterSwitch } from "./common/widget/parameter-switch.js";
12
+ import { CustomVoltageLevelTable } from "./common/voltage-level-table/custom-voltage-level-table.js";
13
+ import { CustomVoltageLevelTableCell } from "./common/voltage-level-table/custom-voltage-level-table-cell.js";
14
+ import { CustomVoltageLevelTableRow } from "./common/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 "./common/limitreductions/columns-definitions.js";
16
+ import { toFormValueSaParameters, toFormValuesLimitReductions } from "./common/limitreductions/limit-reductions-form-util.js";
17
+ import { LimitReductionsTableForm } from "./common/limitreductions/limit-reductions-table-form.js";
18
+ import { LimitReductionTableRow } from "./common/limitreductions/limit-reduction-table-row.js";
19
+ import { LimitReductionTableCell } from "./common/limitreductions/limit-reduction-table-cell.js";
20
+ import { getTabIndicatorStyle, getTabStyle, parametersStyles } from "./parameters-style.js";
21
+ import { BALANCE_TYPE, COMMON_PARAMETERS, 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, SPECIFIC_PARAMETERS, TRANSFORMER_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./loadflow/constants.js";
22
+ import { LoadFlowParametersInline } from "./loadflow/load-flow-parameters-inline.js";
23
+ import { LoadFlowParametersEditionDialog } from "./loadflow/load-flow-parameters-dialog.js";
24
+ export {
25
+ BALANCE_TYPE,
26
+ COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
27
+ COMMON_PARAMETERS,
28
+ CONNECTED_COMPONENT_MODE,
29
+ COUNTRIES_TO_BALANCE,
30
+ ComputingType,
31
+ CreateParameterDialog,
32
+ CustomVoltageLevelTable,
33
+ CustomVoltageLevelTableCell,
34
+ CustomVoltageLevelTableRow,
35
+ DC,
36
+ DC_POWER_FACTOR,
37
+ DC_USE_TRANSFORMER_RATIO,
38
+ DEFAULT_LIMIT_REDUCTION_VALUE,
39
+ DISTRIBUTED_SLACK,
40
+ HVDC_AC_EMULATION,
41
+ IST_FORM,
42
+ LIMIT_DURATION_FORM,
43
+ LIMIT_REDUCTIONS_FORM,
44
+ LabelledButton,
45
+ LimitReductionTableCell,
46
+ LimitReductionTableRow,
47
+ LimitReductionsTableForm,
48
+ LineSeparator,
49
+ LoadFlowParametersEditionDialog,
50
+ LoadFlowParametersInline,
51
+ MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
52
+ MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
53
+ PARAM_LIMIT_REDUCTION,
54
+ PARAM_PROVIDER_OPENLOADFLOW,
55
+ PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
56
+ PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
57
+ PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD,
58
+ PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD,
59
+ PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
60
+ PARAM_SA_PROVIDER,
61
+ PHASE_SHIFTER_REGULATION_ON,
62
+ PROVIDER,
63
+ ParameterFloat,
64
+ ParameterGroup,
65
+ ParameterLineDirectoryItemsInput,
66
+ ParameterLineSlider,
67
+ ParameterSwitch,
68
+ ProviderParam,
69
+ READ_SLACK_BUS,
70
+ SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
71
+ SPECIFIC_PARAMETERS,
72
+ SwitchWithLabel,
73
+ TAB_INFO,
74
+ TRANSFORMER_VOLTAGE_CONTROL_ON,
75
+ TWT_SPLIT_SHUNT_ADMITTANCE,
76
+ TabPanel,
77
+ TabValues,
78
+ USE_REACTIVE_LIMITS,
79
+ VOLTAGE_INIT_MODE,
80
+ VOLTAGE_LEVEL,
81
+ VOLTAGE_LEVELS_FORM,
82
+ WRITE_SLACK_BUS,
83
+ alertThresholdMarks,
84
+ formatComputingTypeLabel,
85
+ getLimitReductionsFormSchema,
86
+ getSAParametersFromSchema,
87
+ getTabIndicatorStyle,
88
+ getTabStyle,
89
+ isValidComputingType,
90
+ parametersStyles,
91
+ sanitizePercentageValue,
92
+ toFormValueSaParameters,
93
+ toFormValuesLimitReductions
94
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2024, 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 PARAM_LIMIT_REDUCTION = "limitReduction";
8
+ export declare const PARAM_PROVIDER_OPENLOADFLOW = "OpenLoadFlow";
9
+ export declare const COMMON_PARAMETERS = "commonParameters";
10
+ export declare const SPECIFIC_PARAMETERS = "specificParametersPerProvider";
11
+ export declare const TRANSFORMER_VOLTAGE_CONTROL_ON = "transformerVoltageControlOn";
12
+ export declare const PHASE_SHIFTER_REGULATION_ON = "phaseShifterRegulationOn";
13
+ export declare const DC = "dc";
14
+ export declare const BALANCE_TYPE = "balanceType";
15
+ export declare const COUNTRIES_TO_BALANCE = "countriesToBalance";
16
+ export declare const CONNECTED_COMPONENT_MODE = "connectedComponentMode";
17
+ export declare const HVDC_AC_EMULATION = "hvdcAcEmulation";
18
+ export declare const VOLTAGE_INIT_MODE = "voltageInitMode";
19
+ export declare const USE_REACTIVE_LIMITS = "useReactiveLimits";
20
+ export declare const TWT_SPLIT_SHUNT_ADMITTANCE = "twtSplitShuntAdmittance";
21
+ export declare const READ_SLACK_BUS = "readSlackBus";
22
+ export declare const WRITE_SLACK_BUS = "writeSlackBus";
23
+ export declare const DISTRIBUTED_SLACK = "distributedSlack";
24
+ export declare const SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON = "shuntCompensatorVoltageControlOn";
25
+ export declare const DC_USE_TRANSFORMER_RATIO = "dcUseTransformerRatio";
26
+ export declare const DC_POWER_FACTOR = "dcPowerFactor";
27
+ export declare const MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION = 0.5;
28
+ export declare const MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION = 1;
29
+ export declare const DEFAULT_LIMIT_REDUCTION_VALUE = 0.8;
30
+ export declare const alertThresholdMarks: {
31
+ value: number;
32
+ label: string;
33
+ }[];
@@ -0,0 +1,59 @@
1
+ const PARAM_LIMIT_REDUCTION = "limitReduction";
2
+ const PARAM_PROVIDER_OPENLOADFLOW = "OpenLoadFlow";
3
+ const COMMON_PARAMETERS = "commonParameters";
4
+ const SPECIFIC_PARAMETERS = "specificParametersPerProvider";
5
+ const TRANSFORMER_VOLTAGE_CONTROL_ON = "transformerVoltageControlOn";
6
+ const PHASE_SHIFTER_REGULATION_ON = "phaseShifterRegulationOn";
7
+ const DC = "dc";
8
+ const BALANCE_TYPE = "balanceType";
9
+ const COUNTRIES_TO_BALANCE = "countriesToBalance";
10
+ const CONNECTED_COMPONENT_MODE = "connectedComponentMode";
11
+ const HVDC_AC_EMULATION = "hvdcAcEmulation";
12
+ const VOLTAGE_INIT_MODE = "voltageInitMode";
13
+ const USE_REACTIVE_LIMITS = "useReactiveLimits";
14
+ const TWT_SPLIT_SHUNT_ADMITTANCE = "twtSplitShuntAdmittance";
15
+ const READ_SLACK_BUS = "readSlackBus";
16
+ const WRITE_SLACK_BUS = "writeSlackBus";
17
+ const DISTRIBUTED_SLACK = "distributedSlack";
18
+ const SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON = "shuntCompensatorVoltageControlOn";
19
+ const DC_USE_TRANSFORMER_RATIO = "dcUseTransformerRatio";
20
+ const DC_POWER_FACTOR = "dcPowerFactor";
21
+ const MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION = 0.5;
22
+ const MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION = 1;
23
+ const DEFAULT_LIMIT_REDUCTION_VALUE = 0.8;
24
+ const alertThresholdMarks = [
25
+ {
26
+ value: MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
27
+ label: "50"
28
+ },
29
+ {
30
+ value: MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
31
+ label: "100"
32
+ }
33
+ ];
34
+ export {
35
+ BALANCE_TYPE,
36
+ COMMON_PARAMETERS,
37
+ CONNECTED_COMPONENT_MODE,
38
+ COUNTRIES_TO_BALANCE,
39
+ DC,
40
+ DC_POWER_FACTOR,
41
+ DC_USE_TRANSFORMER_RATIO,
42
+ DEFAULT_LIMIT_REDUCTION_VALUE,
43
+ DISTRIBUTED_SLACK,
44
+ HVDC_AC_EMULATION,
45
+ MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
46
+ MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
47
+ PARAM_LIMIT_REDUCTION,
48
+ PARAM_PROVIDER_OPENLOADFLOW,
49
+ PHASE_SHIFTER_REGULATION_ON,
50
+ READ_SLACK_BUS,
51
+ SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
52
+ SPECIFIC_PARAMETERS,
53
+ TRANSFORMER_VOLTAGE_CONTROL_ON,
54
+ TWT_SPLIT_SHUNT_ADMITTANCE,
55
+ USE_REACTIVE_LIMITS,
56
+ VOLTAGE_INIT_MODE,
57
+ WRITE_SLACK_BUS,
58
+ alertThresholdMarks
59
+ };
@@ -0,0 +1,9 @@
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 https://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './constants';
8
+ export * from './load-flow-parameters-inline';
9
+ export * from './load-flow-parameters-dialog';