@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.
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts +9 -4
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +7 -4
- package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +5 -0
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +5 -0
- package/dist/components/dnd-table/dnd-table-bottom-right-buttons.js +2 -2
- package/dist/components/dnd-table/dnd-table.d.ts +1 -2
- package/dist/components/dnd-table/dnd-table.js +7 -0
- package/dist/components/dnd-table/dnd-table.type.d.ts +6 -1
- package/dist/components/dnd-table/dnd-table.type.js +1 -0
- package/dist/components/filter/HeaderFilterForm.js +5 -0
- package/dist/components/filter/expert/ExpertFilterForm.js +4 -0
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +4 -0
- package/dist/components/index.js +22 -7
- package/dist/components/inputs/index.js +2 -0
- package/dist/components/inputs/reactHookForm/index.js +2 -0
- package/dist/components/inputs/reactHookForm/text/DescriptionInput.d.ts +4 -0
- package/dist/components/inputs/reactHookForm/text/DescriptionInput.js +85 -0
- package/dist/components/inputs/reactHookForm/text/index.d.ts +1 -0
- package/dist/components/inputs/reactHookForm/text/index.js +2 -0
- package/dist/components/network-modifications/common/properties/PropertiesForm.js +5 -0
- package/dist/components/network-modifications/common/properties/PropertyForm.js +5 -0
- package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +5 -0
- package/dist/components/parameters/common/ProviderParam.js +8 -3
- package/dist/components/parameters/common/{constant.d.ts → constants.d.ts} +3 -0
- package/dist/components/parameters/common/{constant.js → constants.js} +6 -0
- package/dist/components/parameters/common/contingency-table/columns-definitions.d.ts +27 -0
- package/dist/components/parameters/common/contingency-table/columns-definitions.js +102 -0
- package/dist/components/parameters/common/contingency-table/contingency-table.d.ts +5 -0
- package/dist/components/parameters/common/contingency-table/contingency-table.js +81 -0
- package/dist/components/parameters/common/contingency-table/index.d.ts +8 -0
- package/dist/components/parameters/common/contingency-table/index.js +9 -0
- package/dist/components/parameters/common/contingency-table/types.d.ts +12 -0
- package/dist/components/parameters/common/contingency-table/types.js +1 -0
- package/dist/components/parameters/common/index.d.ts +1 -1
- package/dist/components/parameters/common/index.js +5 -5
- package/dist/components/parameters/common/limitreductions/columns-definitions.d.ts +8 -34
- package/dist/components/parameters/common/limitreductions/columns-definitions.js +11 -32
- package/dist/components/parameters/common/limitreductions/index.d.ts +0 -1
- package/dist/components/parameters/common/limitreductions/index.js +1 -4
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +5 -0
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +5 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +5 -0
- package/dist/components/parameters/common/parameter-dnd-table-field.d.ts +9 -0
- package/dist/components/parameters/common/parameter-dnd-table-field.js +85 -0
- package/dist/components/parameters/common/parameter-field.d.ts +15 -0
- package/dist/components/parameters/{loadflow/load-flow-parameter-field.js → common/parameter-field.js} +12 -14
- package/dist/components/parameters/common/parameter-table/constants.d.ts +11 -0
- package/dist/components/parameters/common/parameter-table/constants.js +12 -0
- package/dist/components/parameters/common/parameter-table/index.d.ts +9 -0
- package/dist/components/parameters/common/parameter-table/index.js +10 -0
- package/dist/components/parameters/common/parameter-table/parameter-table.d.ts +15 -0
- package/dist/components/parameters/{sensi/sensitivity-table.js → common/parameter-table/parameter-table.js} +11 -37
- package/dist/components/parameters/{sensi → common/parameter-table}/table-cell.js +19 -17
- package/dist/components/parameters/{sensi → common/parameter-table}/table-row.d.ts +2 -2
- package/dist/components/parameters/common/parameter-table/types.d.ts +26 -0
- package/dist/components/parameters/common/parameter-table/types.js +1 -0
- package/dist/components/parameters/common/utils.js +1 -1
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +6 -1
- package/dist/components/parameters/common/widget/parameter-float.js +5 -0
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +5 -0
- package/dist/components/parameters/common/widget/parameter-line-slider.js +5 -0
- package/dist/components/parameters/dynamic-margin-calculation/constants.d.ts +18 -0
- package/dist/components/parameters/dynamic-margin-calculation/constants.js +26 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.d.ts +6 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +9 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +95 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.d.ts +10 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +176 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.d.ts +10 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.js +8 -0
- package/dist/components/parameters/dynamic-margin-calculation/index.d.ts +8 -0
- package/dist/components/parameters/dynamic-margin-calculation/index.js +17 -0
- package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.d.ts +29 -0
- package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.js +154 -0
- package/dist/components/parameters/dynamic-margin-calculation/time-delay-parameters.d.ts +24 -0
- package/dist/components/parameters/dynamic-margin-calculation/time-delay-parameters.js +62 -0
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.d.ts +30 -0
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +179 -0
- package/dist/components/parameters/index.d.ts +1 -0
- package/dist/components/parameters/index.js +20 -7
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +10 -6
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +4 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +4 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +5 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +6 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +5 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +6 -3
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +6 -3
- package/dist/components/parameters/network-visualizations/map-parameters.js +4 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +5 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +5 -1
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +4 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +5 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +4 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +5 -0
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +5 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +4 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +5 -1
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +5 -1
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +5 -0
- package/dist/components/parameters/security-analysis/columns-definitions.d.ts +63 -0
- package/dist/components/parameters/security-analysis/columns-definitions.js +78 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +5 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.d.ts +4 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +32 -13
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.d.ts +2 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +9 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.d.ts +3 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +4 -0
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +6 -2
- package/dist/components/parameters/security-analysis/types.d.ts +15 -0
- package/dist/components/parameters/security-analysis/types.js +1 -0
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.d.ts +5 -4
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +26 -7
- package/dist/components/parameters/sensi/columns-definitions.d.ts +7 -25
- package/dist/components/parameters/sensi/columns-definitions.js +35 -1
- package/dist/components/parameters/sensi/constants.d.ts +0 -2
- package/dist/components/parameters/sensi/constants.js +0 -4
- package/dist/components/parameters/sensi/index.d.ts +0 -1
- package/dist/components/parameters/sensi/index.js +1 -3
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +5 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +4 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +6 -2
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +5 -1
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +27 -19
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +7 -2
- package/dist/components/parameters/sensi/utils.d.ts +2 -1
- package/dist/components/parameters/sensi/utils.js +7 -2
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +6 -2
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +5 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +4 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +5 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +5 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +5 -1
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +6 -2
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +5 -1
- package/dist/components/parameters/voltage-init/general-parameters.js +4 -0
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +5 -0
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +5 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +4 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +5 -1
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +5 -1
- package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +5 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/use-create-row-data.d.ts +4 -0
- package/dist/hooks/{use-create-row-data-sensi.js → use-create-row-data.js} +5 -5
- package/dist/index.js +31 -9
- package/dist/services/dynamic-margin-calculation.d.ts +5 -0
- package/dist/services/dynamic-margin-calculation.js +35 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +4 -0
- package/dist/translations/en/businessErrorsEn.d.ts +3 -0
- package/dist/translations/en/businessErrorsEn.js +4 -1
- package/dist/translations/en/parameters.d.ts +21 -0
- package/dist/translations/en/parameters.js +25 -3
- package/dist/translations/fr/businessErrorsFr.d.ts +3 -0
- package/dist/translations/fr/businessErrorsFr.js +4 -1
- package/dist/translations/fr/parameters.d.ts +21 -0
- package/dist/translations/fr/parameters.js +25 -3
- package/dist/utils/index.js +3 -0
- package/dist/utils/types/dynamic-margin-calculation.type.d.ts +32 -0
- package/dist/utils/types/dynamic-margin-calculation.type.js +14 -0
- package/dist/utils/types/elementType.d.ts +1 -0
- package/dist/utils/types/elementType.js +1 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +3 -0
- package/dist/utils/types/parameters.type.d.ts +4 -2
- package/package.json +1 -1
- package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.d.ts +0 -29
- package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.js +0 -27
- package/dist/components/parameters/loadflow/load-flow-parameter-field.d.ts +0 -19
- package/dist/components/parameters/sensi/sensitivity-table.d.ts +0 -14
- package/dist/hooks/use-create-row-data-sensi.d.ts +0 -4
- /package/dist/components/parameters/{sensi → common/parameter-table}/table-cell.d.ts +0 -0
- /package/dist/components/parameters/{sensi → common/parameter-table}/table-row.js +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export * from './constants';
|
|
8
|
+
export * from './parameter-table';
|
|
9
|
+
export * from './types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FieldValues, UseFieldArrayReturn } from 'react-hook-form';
|
|
2
|
+
import { ColumnsDef } from './types';
|
|
3
|
+
interface ParameterTableProps {
|
|
4
|
+
arrayFormName: string;
|
|
5
|
+
useFieldArrayOutput: UseFieldArrayReturn;
|
|
6
|
+
columnsDefinition: ColumnsDef[];
|
|
7
|
+
tableHeight: number;
|
|
8
|
+
createRows: (a: number) => void;
|
|
9
|
+
disableAdd?: boolean;
|
|
10
|
+
disableDelete?: boolean;
|
|
11
|
+
onFormChanged: () => void;
|
|
12
|
+
isValidParameterRow: (fieldValue: FieldValues) => any;
|
|
13
|
+
}
|
|
14
|
+
export declare function ParameterTable({ arrayFormName, useFieldArrayOutput, columnsDefinition, tableHeight, createRows, disableAdd, disableDelete, onFormChanged, isValidParameterRow, }: Readonly<ParameterTableProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -5,33 +5,8 @@ import { useRef, useCallback } from "react";
|
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import { useFormContext } from "react-hook-form";
|
|
7
7
|
import { TableRowComponent } from "./table-row.js";
|
|
8
|
-
import "
|
|
9
|
-
|
|
10
|
-
import "../../overflowableText/OverflowableText.js";
|
|
11
|
-
import "../../../utils/conversionUtils.js";
|
|
12
|
-
import "../../../utils/types/equipmentType.js";
|
|
13
|
-
import "../../../utils/yupConfig.js";
|
|
14
|
-
import "localized-countries";
|
|
15
|
-
import "localized-countries/data/fr";
|
|
16
|
-
import "localized-countries/data/en";
|
|
17
|
-
import "notistack";
|
|
18
|
-
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
19
|
-
import "yup";
|
|
20
|
-
import "../../treeViewFinder/TreeViewFinder.js";
|
|
21
|
-
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
22
|
-
import "../../customAGGrid/customAggrid.js";
|
|
23
|
-
import "ag-grid-community";
|
|
24
|
-
import "react-papaparse";
|
|
25
|
-
import "react-csv-downloader";
|
|
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 { isValidSensiParameterRow } from "./utils.js";
|
|
34
|
-
function SensitivityTable({
|
|
8
|
+
import { MAX_ROWS_NUMBER } from "./constants.js";
|
|
9
|
+
function ParameterTable({
|
|
35
10
|
arrayFormName,
|
|
36
11
|
useFieldArrayOutput,
|
|
37
12
|
columnsDefinition,
|
|
@@ -39,28 +14,27 @@ function SensitivityTable({
|
|
|
39
14
|
createRows,
|
|
40
15
|
disableAdd,
|
|
41
16
|
disableDelete = false,
|
|
42
|
-
onFormChanged
|
|
17
|
+
onFormChanged,
|
|
18
|
+
isValidParameterRow
|
|
43
19
|
}) {
|
|
44
20
|
const intl = useIntl();
|
|
45
21
|
const { getValues } = useFormContext();
|
|
46
22
|
const { fields: currentRows, append, remove } = useFieldArrayOutput;
|
|
47
23
|
const validRowCountRef = useRef(
|
|
48
|
-
(getValues(arrayFormName) || []).filter((row) =>
|
|
24
|
+
(getValues(arrayFormName) || []).filter((row) => isValidParameterRow(row)).length
|
|
49
25
|
);
|
|
50
26
|
const handleRowChanged = useCallback(
|
|
51
27
|
(index) => {
|
|
52
28
|
const currentRowValues = getValues(arrayFormName);
|
|
53
29
|
const row = currentRowValues[index];
|
|
54
|
-
const currentValidRowCount = currentRowValues.filter(
|
|
55
|
-
(r) => isValidSensiParameterRow(r)
|
|
56
|
-
).length;
|
|
30
|
+
const currentValidRowCount = currentRowValues.filter((r) => isValidParameterRow(r)).length;
|
|
57
31
|
const previousValidRowCount = validRowCountRef.current;
|
|
58
32
|
validRowCountRef.current = currentValidRowCount;
|
|
59
|
-
if (currentValidRowCount !== previousValidRowCount ||
|
|
33
|
+
if (currentValidRowCount !== previousValidRowCount || isValidParameterRow(row)) {
|
|
60
34
|
onFormChanged();
|
|
61
35
|
}
|
|
62
36
|
},
|
|
63
|
-
[getValues, arrayFormName, onFormChanged]
|
|
37
|
+
[getValues, arrayFormName, isValidParameterRow, onFormChanged]
|
|
64
38
|
);
|
|
65
39
|
const handleAddRowsButton = useCallback(() => {
|
|
66
40
|
if (currentRows.length >= MAX_ROWS_NUMBER) {
|
|
@@ -72,7 +46,7 @@ function SensitivityTable({
|
|
|
72
46
|
(index) => {
|
|
73
47
|
const currentRowsValues = getValues(arrayFormName);
|
|
74
48
|
if (index >= 0 && index < currentRowsValues.length) {
|
|
75
|
-
const wasValid =
|
|
49
|
+
const wasValid = isValidParameterRow(currentRowsValues[index]);
|
|
76
50
|
remove(index);
|
|
77
51
|
if (wasValid) {
|
|
78
52
|
validRowCountRef.current -= 1;
|
|
@@ -80,7 +54,7 @@ function SensitivityTable({
|
|
|
80
54
|
}
|
|
81
55
|
}
|
|
82
56
|
},
|
|
83
|
-
[arrayFormName, getValues, onFormChanged, remove]
|
|
57
|
+
[arrayFormName, getValues, isValidParameterRow, onFormChanged, remove]
|
|
84
58
|
);
|
|
85
59
|
return /* @__PURE__ */ jsx(
|
|
86
60
|
TableContainer,
|
|
@@ -119,5 +93,5 @@ function SensitivityTable({
|
|
|
119
93
|
);
|
|
120
94
|
}
|
|
121
95
|
export {
|
|
122
|
-
|
|
96
|
+
ParameterTable
|
|
123
97
|
};
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TableCell } from "@mui/material";
|
|
3
3
|
import "react-intl";
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
4
|
+
import "../../../overflowableText/OverflowableText.js";
|
|
5
|
+
import "../../../../utils/conversionUtils.js";
|
|
6
|
+
import "../../../../utils/types/equipmentType.js";
|
|
7
7
|
import "@mui/icons-material";
|
|
8
|
-
import "
|
|
8
|
+
import "../../../../utils/yupConfig.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import "react-hook-form";
|
|
11
11
|
import "localized-countries";
|
|
12
12
|
import "localized-countries/data/fr";
|
|
13
13
|
import "localized-countries/data/en";
|
|
14
14
|
import "notistack";
|
|
15
|
-
import "
|
|
15
|
+
import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
16
16
|
import "yup";
|
|
17
|
-
import { DirectoryItemsInput } from "
|
|
18
|
-
import "
|
|
19
|
-
import "
|
|
17
|
+
import { DirectoryItemsInput } from "../../../inputs/reactHookForm/DirectoryItemsInput.js";
|
|
18
|
+
import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
19
|
+
import "../../../customAGGrid/customAggrid.js";
|
|
20
20
|
import "ag-grid-community";
|
|
21
21
|
import "react-papaparse";
|
|
22
22
|
import "react-csv-downloader";
|
|
23
|
-
import { SwitchInput } from "
|
|
24
|
-
import { FloatInput } from "
|
|
25
|
-
import { TextInput } from "
|
|
26
|
-
import "
|
|
27
|
-
import { MuiSelectInput } from "
|
|
23
|
+
import { SwitchInput } from "../../../inputs/reactHookForm/booleans/SwitchInput.js";
|
|
24
|
+
import { FloatInput } from "../../../inputs/reactHookForm/numbers/FloatInput.js";
|
|
25
|
+
import { TextInput } from "../../../inputs/reactHookForm/text/TextInput.js";
|
|
26
|
+
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
27
|
+
import { MuiSelectInput } from "../../../inputs/reactHookForm/selectInputs/MuiSelectInput.js";
|
|
28
|
+
import { DescriptionInput } from "../../../inputs/reactHookForm/text/DescriptionInput.js";
|
|
28
29
|
import "@react-querybuilder/material";
|
|
29
|
-
import "
|
|
30
|
-
import "
|
|
30
|
+
import "../../../filter/expert/expertFilterConstants.js";
|
|
31
|
+
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
31
32
|
import "uuid";
|
|
32
|
-
import "
|
|
33
|
+
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
33
34
|
import "react-querybuilder";
|
|
34
35
|
function EditableTableCell(arrayFormName, rowIndex, column, onRowChanged) {
|
|
35
36
|
return /* @__PURE__ */ jsxs(
|
|
@@ -69,7 +70,8 @@ function EditableTableCell(arrayFormName, rowIndex, column, onRowChanged) {
|
|
|
69
70
|
name: `${arrayFormName}[${rowIndex}].${column.dataKey}`,
|
|
70
71
|
formProps: { disabled: !column.editable }
|
|
71
72
|
}
|
|
72
|
-
)
|
|
73
|
+
),
|
|
74
|
+
column.descriptionItems && /* @__PURE__ */ jsx(DescriptionInput, { name: `${arrayFormName}[${rowIndex}].${column.dataKey}` })
|
|
73
75
|
]
|
|
74
76
|
},
|
|
75
77
|
column.dataKey
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnsDef } from './types';
|
|
2
2
|
interface TableRowComponentProps {
|
|
3
3
|
arrayFormName: string;
|
|
4
|
-
columnsDefinition:
|
|
4
|
+
columnsDefinition: ColumnsDef[];
|
|
5
5
|
index: number;
|
|
6
6
|
handleDeleteButton: (index: number) => void;
|
|
7
7
|
disableDelete: boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 interface Parameters {
|
|
8
|
+
columnsDef: ColumnsDef[];
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ColumnsDef {
|
|
12
|
+
label: string;
|
|
13
|
+
dataKey: string;
|
|
14
|
+
initialValue: boolean | string | string[] | number | null;
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
directoryItems?: boolean;
|
|
17
|
+
menuItems?: boolean;
|
|
18
|
+
equipmentTypes?: any[];
|
|
19
|
+
elementType?: string;
|
|
20
|
+
titleId?: string;
|
|
21
|
+
checkboxItems?: boolean;
|
|
22
|
+
floatItems?: boolean;
|
|
23
|
+
textItems?: boolean;
|
|
24
|
+
descriptionItems?: boolean;
|
|
25
|
+
width?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -4,7 +4,7 @@ import { ParameterType } from "../../../utils/types/parameters.type.js";
|
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "@mui/icons-material";
|
|
6
6
|
import "../../../utils/yupConfig.js";
|
|
7
|
-
import { SPECIFIC_PARAMETERS } from "./
|
|
7
|
+
import { SPECIFIC_PARAMETERS } from "./constants.js";
|
|
8
8
|
import * as yup from "yup";
|
|
9
9
|
const getSpecificParametersFormSchema = (specificParameters) => {
|
|
10
10
|
const shape = {};
|
package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TableCell } from "@mui/material";
|
|
3
|
-
import { VOLTAGE_LEVEL } from "../
|
|
3
|
+
import { VOLTAGE_LEVEL } from "../constants.js";
|
|
4
4
|
import "react-intl";
|
|
5
5
|
import "../../../overflowableText/OverflowableText.js";
|
|
6
6
|
import "../../../../utils/conversionUtils.js";
|
|
@@ -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";
|
|
@@ -22,6 +22,11 @@ import "react-papaparse";
|
|
|
22
22
|
import "react-csv-downloader";
|
|
23
23
|
import { FloatInput } from "../../../inputs/reactHookForm/numbers/FloatInput.js";
|
|
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";
|
|
@@ -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";
|
|
@@ -23,6 +23,11 @@ import "react-papaparse";
|
|
|
23
23
|
import "react-csv-downloader";
|
|
24
24
|
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
25
25
|
import { SliderInput } from "../../../inputs/reactHookForm/numbers/SliderInput.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";
|
|
@@ -0,0 +1,18 @@
|
|
|
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 START_TIME = "startTime";
|
|
8
|
+
export declare const STOP_TIME = "stopTime";
|
|
9
|
+
export declare const MARGIN_CALCULATION_START_TIME = "marginCalculationStartTime";
|
|
10
|
+
export declare const LOAD_INCREASE_START_TIME = "loadIncreaseStartTime";
|
|
11
|
+
export declare const LOAD_INCREASE_STOP_TIME = "loadIncreaseStopTime";
|
|
12
|
+
export declare const CALCULATION_TYPE = "calculationType";
|
|
13
|
+
export declare const ACCURACY = "accuracy";
|
|
14
|
+
export declare const LOAD_MODELS_RULE = "loadModelsRule";
|
|
15
|
+
export declare const LOADS_VARIATIONS = "loadsVariations";
|
|
16
|
+
export declare const LOAD_FILTERS = "loadFilters";
|
|
17
|
+
export declare const VARIATION = "variation";
|
|
18
|
+
export declare const ACTIVE = "active";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const START_TIME = "startTime";
|
|
2
|
+
const STOP_TIME = "stopTime";
|
|
3
|
+
const MARGIN_CALCULATION_START_TIME = "marginCalculationStartTime";
|
|
4
|
+
const LOAD_INCREASE_START_TIME = "loadIncreaseStartTime";
|
|
5
|
+
const LOAD_INCREASE_STOP_TIME = "loadIncreaseStopTime";
|
|
6
|
+
const CALCULATION_TYPE = "calculationType";
|
|
7
|
+
const ACCURACY = "accuracy";
|
|
8
|
+
const LOAD_MODELS_RULE = "loadModelsRule";
|
|
9
|
+
const LOADS_VARIATIONS = "loadsVariations";
|
|
10
|
+
const LOAD_FILTERS = "loadFilters";
|
|
11
|
+
const VARIATION = "variation";
|
|
12
|
+
const ACTIVE = "active";
|
|
13
|
+
export {
|
|
14
|
+
ACCURACY,
|
|
15
|
+
ACTIVE,
|
|
16
|
+
CALCULATION_TYPE,
|
|
17
|
+
LOADS_VARIATIONS,
|
|
18
|
+
LOAD_FILTERS,
|
|
19
|
+
LOAD_INCREASE_START_TIME,
|
|
20
|
+
LOAD_INCREASE_STOP_TIME,
|
|
21
|
+
LOAD_MODELS_RULE,
|
|
22
|
+
MARGIN_CALCULATION_START_TIME,
|
|
23
|
+
START_TIME,
|
|
24
|
+
STOP_TIME,
|
|
25
|
+
VARIATION
|
|
26
|
+
};
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UseDynamicMarginCalculationParametersFormReturn } from './use-dynamic-margin-calculation-parameters-form';
|
|
3
|
+
type DynamicMarginCalculationFormProps = {
|
|
4
|
+
dynamicMarginCalculationMethods: UseDynamicMarginCalculationParametersFormReturn;
|
|
5
|
+
renderTitleFields?: () => ReactNode;
|
|
6
|
+
renderActions?: () => ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function DynamicMarginCalculationForm({ dynamicMarginCalculationMethods, renderTitleFields, renderActions, }: Readonly<DynamicMarginCalculationFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid, Tabs, Tab, LinearProgress } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import "../../../utils/conversionUtils.js";
|
|
5
|
+
import "../../../utils/types/equipmentType.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
import { mergeSx } from "../../../utils/styles.js";
|
|
8
|
+
import "../../../utils/yupConfig.js";
|
|
9
|
+
import "../../overflowableText/OverflowableText.js";
|
|
10
|
+
import "react";
|
|
11
|
+
import "react-hook-form";
|
|
12
|
+
import "localized-countries";
|
|
13
|
+
import "localized-countries/data/fr";
|
|
14
|
+
import "localized-countries/data/en";
|
|
15
|
+
import "notistack";
|
|
16
|
+
import { CustomFormProvider } from "../../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
|
+
import { TabPanel } from "../common/parameters.js";
|
|
37
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
38
|
+
import { ProviderParam } from "../common/ProviderParam.js";
|
|
39
|
+
import { getTabStyle, parametersStyles } from "../parameters-style.js";
|
|
40
|
+
import "../common/widget/parameter-line-slider.js";
|
|
41
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
42
|
+
import TimeDelayParameters from "./time-delay-parameters.js";
|
|
43
|
+
import LoadsVariationsParameters from "./loads-variations-parameters.js";
|
|
44
|
+
import { TabValues } from "./dynamic-margin-calculation.type.js";
|
|
45
|
+
function DynamicMarginCalculationForm({
|
|
46
|
+
dynamicMarginCalculationMethods,
|
|
47
|
+
renderTitleFields,
|
|
48
|
+
renderActions
|
|
49
|
+
}) {
|
|
50
|
+
const { formMethods, formSchema, paramsLoaded, formattedProviders, selectedTab, onTabChange, tabsWithError } = dynamicMarginCalculationMethods;
|
|
51
|
+
return /* @__PURE__ */ jsxs(CustomFormProvider, { validationSchema: formSchema, ...formMethods, children: [
|
|
52
|
+
renderTitleFields?.(),
|
|
53
|
+
paramsLoaded ? /* @__PURE__ */ jsxs(Grid, { container: true, sx: { height: "100%" }, direction: "column", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(ProviderParam, { options: formattedProviders }) }),
|
|
55
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: onTabChange, "aria-label": "parameters", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
Tab,
|
|
58
|
+
{
|
|
59
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationTimeDelayTab" }),
|
|
60
|
+
value: TabValues.TAB_TIME_DELAY,
|
|
61
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_TIME_DELAY)
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
Tab,
|
|
66
|
+
{
|
|
67
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationLoadsVariationsTab" }),
|
|
68
|
+
value: TabValues.TAB_LOADS_VARIATIONS,
|
|
69
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_LOADS_VARIATIONS)
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }) }),
|
|
73
|
+
/* @__PURE__ */ jsxs(
|
|
74
|
+
Grid,
|
|
75
|
+
{
|
|
76
|
+
container: true,
|
|
77
|
+
xs: true,
|
|
78
|
+
sx: mergeSx(parametersStyles.scrollableGrid, {
|
|
79
|
+
paddingTop: 0,
|
|
80
|
+
width: "100%"
|
|
81
|
+
}),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_TIME_DELAY, children: /* @__PURE__ */ jsx(TimeDelayParameters, { path: TabValues.TAB_TIME_DELAY }) }),
|
|
84
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_LOADS_VARIATIONS, children: /* @__PURE__ */ jsx(LoadsVariationsParameters, { path: TabValues.TAB_LOADS_VARIATIONS }) })
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"dmcParameters"
|
|
88
|
+
),
|
|
89
|
+
renderActions?.()
|
|
90
|
+
] }) : /* @__PURE__ */ jsx(LinearProgress, {})
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
DynamicMarginCalculationForm
|
|
95
|
+
};
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
|
+
import { UseParametersBackendReturnProps } from '../../../utils/types/parameters.type';
|
|
3
|
+
import { ComputingType } from '../common/computing-type';
|
|
4
|
+
type DynamicMarginCalculationInlineProps = {
|
|
5
|
+
studyUuid: UUID | null;
|
|
6
|
+
parametersBackend: UseParametersBackendReturnProps<ComputingType.DYNAMIC_MARGIN_CALCULATION>;
|
|
7
|
+
setHaveDirtyFields: (isDirty: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function DynamicMarginCalculationInline({ studyUuid, parametersBackend, setHaveDirtyFields, }: Readonly<DynamicMarginCalculationInlineProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|