@gridsuite/commons-ui 0.190.0 → 0.192.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/elementSaveDialog/ElementSaveDialog.js +1 -0
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +1 -0
- package/dist/components/dnd-table/dnd-table.js +1 -0
- package/dist/components/filter/HeaderFilterForm.js +1 -0
- package/dist/components/filter/expert/ExpertFilterForm.js +1 -0
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -0
- package/dist/components/inputs/reactHookForm/expandableInput/ExpandableInput.d.ts +5 -5
- package/dist/components/inputs/reactHookForm/expandableInput/ExpandableInput.js +66 -54
- package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.js +1 -0
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.d.ts +0 -6
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +7 -10
- package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.js +35 -39
- package/dist/components/network-modifications/common/connectivity/ConnectivityForm.js +1 -0
- package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +1 -7
- package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.js +3 -4
- package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +20 -22
- package/dist/components/network-modifications/common/properties/PropertiesForm.js +14 -15
- package/dist/components/network-modifications/common/properties/PropertyForm.d.ts +1 -1
- package/dist/components/network-modifications/common/properties/PropertyForm.js +43 -50
- package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +22 -24
- package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +36 -38
- package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +2 -1
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -6
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.d.ts +0 -6
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +7 -5
- package/dist/components/network-modifications/index.js +1 -0
- package/dist/components/network-modifications/load/common/LoadDialogHeader.js +7 -17
- package/dist/components/network-modifications/load/common/LoadDialogTabs.js +4 -4
- package/dist/components/network-modifications/load/common/LoadDialogTabsContent.js +21 -18
- package/dist/components/network-modifications/load/creation/loadCreation.utils.js +1 -0
- package/dist/components/network-modifications/load/modification/loadModification.utils.js +2 -1
- package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +17 -12
- package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js +41 -44
- package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +23 -14
- package/dist/components/network-modifications/voltageLevel/creation/index.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +6 -6
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +4 -4
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +3 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js +1 -0
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesForm.js +11 -21
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +4 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +3 -2
- package/dist/components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +1 -0
- package/dist/components/network-modifications/voltageLevel/index.js +1 -0
- package/dist/components/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +104 -110
- package/dist/components/node/build-status-chip.d.ts +2 -1
- package/dist/components/node/build-status-chip.js +13 -3
- package/dist/components/parameters/common/ProviderParam.js +1 -0
- package/dist/components/parameters/common/contingency-table/columns-definitions.js +1 -0
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +1 -0
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +1 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +1 -0
- package/dist/components/parameters/common/parameter-dnd-table-field.js +1 -0
- package/dist/components/parameters/common/parameter-field.js +1 -0
- package/dist/components/parameters/common/parameter-table/table-cell.js +1 -0
- package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +1 -0
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +1 -0
- package/dist/components/parameters/common/widget/parameter-float.js +1 -0
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +1 -0
- package/dist/components/parameters/common/widget/parameter-line-slider.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/contingency-parameters.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +1 -0
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +1 -0
- package/dist/components/parameters/network-visualizations/map-parameters.js +1 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +1 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +1 -0
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -0
- package/dist/components/parameters/security-analysis/columns-definitions.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +1 -0
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/sensi/columns-definitions.js +1 -0
- package/dist/components/parameters/sensi/constants.d.ts +2 -2
- package/dist/components/parameters/sensi/constants.js +1 -1
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +6 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.js +4 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +3 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +6 -2
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +11 -2
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.d.ts +6 -1
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +37 -9
- package/dist/components/parameters/sensi/utils.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-general-tab-panel.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-content.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-study-area-tab-panel.js +1 -0
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
- package/dist/components/parameters/util/make-component-utils.js +1 -0
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +1 -0
- package/dist/components/parameters/voltage-init/general-parameters.js +1 -0
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +1 -0
- package/dist/translations/en/parameters.d.ts +1 -0
- package/dist/translations/en/parameters.js +4 -3
- package/dist/translations/fr/parameters.d.ts +1 -0
- package/dist/translations/fr/parameters.js +4 -3
- package/dist/utils/types/sensitivity-analysis.type.d.ts +2 -2
- package/package.json +1 -1
|
@@ -33,6 +33,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
33
33
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
34
34
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
35
35
|
import "../descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
36
|
+
import "../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
36
37
|
import "@react-querybuilder/material";
|
|
37
38
|
import "../../filter/expert/expertFilterConstants.js";
|
|
38
39
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -27,6 +27,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
27
27
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
28
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
29
29
|
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
30
|
+
import "../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
31
|
import "@react-querybuilder/material";
|
|
31
32
|
import "../filter/expert/expertFilterConstants.js";
|
|
32
33
|
import "../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -41,6 +41,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
41
41
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
42
42
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
43
43
|
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
44
|
+
import "../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
44
45
|
import "notistack";
|
|
45
46
|
import "@react-querybuilder/material";
|
|
46
47
|
import "../filter/expert/expertFilterConstants.js";
|
|
@@ -31,6 +31,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
31
31
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
32
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
33
|
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
34
35
|
import "@react-querybuilder/material";
|
|
35
36
|
import "./expert/expertFilterConstants.js";
|
|
36
37
|
import "../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -40,6 +40,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
|
40
40
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
41
41
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
42
42
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
43
|
+
import "../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
43
44
|
import "@react-querybuilder/material";
|
|
44
45
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
45
46
|
yup.setLocale({
|
|
@@ -42,6 +42,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
|
42
42
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
43
43
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
44
44
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
45
|
+
import "../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
45
46
|
import "@react-querybuilder/material";
|
|
46
47
|
import "../expert/expertFilterConstants.js";
|
|
47
48
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
+
export type ExpandableInputHandle = {
|
|
8
|
+
replaceItems: (newItems: any[]) => void;
|
|
9
|
+
appendItem: (newItem: any) => void;
|
|
10
|
+
};
|
|
7
11
|
export interface ExpandableInputProps {
|
|
8
12
|
name: string;
|
|
9
13
|
Field: React.ComponentType<any>;
|
|
@@ -17,8 +21,4 @@ export interface ExpandableInputProps {
|
|
|
17
21
|
disabled?: boolean;
|
|
18
22
|
disabledDeletion?: (idx: number) => boolean;
|
|
19
23
|
}
|
|
20
|
-
export declare
|
|
21
|
-
fieldProps, // Props to pass to Field
|
|
22
|
-
addButtonLabel, initialValue, // Initial value to display when we add a new entry to array
|
|
23
|
-
getDeletionMark, deleteCallback, alignItems, // default value for a flex container
|
|
24
|
-
watchProps, disabled, disabledDeletion, }: Readonly<ExpandableInputProps>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const ExpandableInput: import('react').ForwardRefExoticComponent<Readonly<ExpandableInputProps> & import('react').RefAttributes<unknown>>;
|
|
@@ -3,6 +3,7 @@ import { useFieldArray } from "react-hook-form";
|
|
|
3
3
|
import { Grid, Button } from "@mui/material";
|
|
4
4
|
import { ControlPoint } from "@mui/icons-material";
|
|
5
5
|
import { FormattedMessage } from "react-intl";
|
|
6
|
+
import { forwardRef, useImperativeHandle } from "react";
|
|
6
7
|
import { DeletableRow } from "./DeletableRow.js";
|
|
7
8
|
import { ErrorInput } from "../errorManagement/ErrorInput.js";
|
|
8
9
|
import { MidFormError } from "../errorManagement/MidFormError.js";
|
|
@@ -20,61 +21,72 @@ const styles = {
|
|
|
20
21
|
paddingLeft: theme.spacing(2)
|
|
21
22
|
})
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
24
|
+
const ExpandableInput = forwardRef(
|
|
25
|
+
({
|
|
26
|
+
name,
|
|
27
|
+
Field,
|
|
28
|
+
// Used to display each object of an array
|
|
29
|
+
fieldProps,
|
|
30
|
+
// Props to pass to Field
|
|
31
|
+
addButtonLabel,
|
|
32
|
+
initialValue,
|
|
33
|
+
// Initial value to display when we add a new entry to array
|
|
34
|
+
getDeletionMark,
|
|
35
|
+
deleteCallback,
|
|
36
|
+
alignItems = "stretch",
|
|
37
|
+
// default value for a flex container
|
|
38
|
+
watchProps = true,
|
|
39
|
+
disabled = false,
|
|
40
|
+
disabledDeletion
|
|
41
|
+
}, ref) => {
|
|
42
|
+
const {
|
|
43
|
+
fields: values,
|
|
44
|
+
append,
|
|
45
|
+
remove,
|
|
46
|
+
replace
|
|
47
|
+
} = useFieldArray({
|
|
48
|
+
name
|
|
49
|
+
});
|
|
50
|
+
useImperativeHandle(
|
|
51
|
+
ref,
|
|
52
|
+
() => ({
|
|
53
|
+
replaceItems: (newItems) => replace(newItems),
|
|
54
|
+
appendItem: (newItem) => append(newItem)
|
|
55
|
+
}),
|
|
56
|
+
[append, replace]
|
|
57
|
+
);
|
|
58
|
+
return /* @__PURE__ */ jsxs(Grid, { item: true, container: true, spacing: 2, children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(ErrorInput, { name, InputField: MidFormError }) }),
|
|
60
|
+
watchProps && values.map((value, idx) => /* @__PURE__ */ jsx(
|
|
61
|
+
DeletableRow,
|
|
62
|
+
{
|
|
63
|
+
alignItems,
|
|
64
|
+
onClick: () => {
|
|
65
|
+
const shouldRemove = deleteCallback ? deleteCallback(idx) : true;
|
|
66
|
+
if (shouldRemove) {
|
|
67
|
+
remove(idx);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
deletionMark: getDeletionMark?.(idx),
|
|
71
|
+
disabledDeletion: disabledDeletion?.(idx),
|
|
72
|
+
children: /* @__PURE__ */ jsx(Field, { name, index: idx, ...fieldProps })
|
|
58
73
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
) })
|
|
76
|
-
] });
|
|
77
|
-
}
|
|
74
|
+
value.id
|
|
75
|
+
)),
|
|
76
|
+
/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
77
|
+
Button,
|
|
78
|
+
{
|
|
79
|
+
disabled,
|
|
80
|
+
fullWidth: true,
|
|
81
|
+
sx: mergeSx(styles.button, styles.paddingButton),
|
|
82
|
+
startIcon: /* @__PURE__ */ jsx(ControlPoint, {}),
|
|
83
|
+
onClick: () => append(initialValue),
|
|
84
|
+
children: addButtonLabel && /* @__PURE__ */ jsx(FormattedMessage, { id: addButtonLabel })
|
|
85
|
+
}
|
|
86
|
+
) })
|
|
87
|
+
] });
|
|
88
|
+
}
|
|
89
|
+
);
|
|
78
90
|
export {
|
|
79
91
|
ExpandableInput
|
|
80
92
|
};
|
package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.js
CHANGED
|
@@ -39,6 +39,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
39
39
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
40
40
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
41
41
|
import "../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
42
|
+
import "../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
42
43
|
import "@react-querybuilder/material";
|
|
43
44
|
import "../../../../filter/expert/expertFilterConstants.js";
|
|
44
45
|
import "../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -1,7 +1 @@
|
|
|
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
1
|
export declare function ByFilterDeletionForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
|
-
import { useCallback
|
|
3
|
+
import { useCallback } from "react";
|
|
4
4
|
import { useWatch, useFormContext } from "react-hook-form";
|
|
5
5
|
import "react-intl";
|
|
6
6
|
import "../../../overflowableText/OverflowableText.js";
|
|
@@ -31,6 +31,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
31
31
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
32
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
33
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
34
35
|
import "@react-querybuilder/material";
|
|
35
36
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
36
37
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -47,24 +48,20 @@ function ByFilterDeletionForm() {
|
|
|
47
48
|
const handleEquipmentTypeChange = useCallback(() => {
|
|
48
49
|
setValue(FieldConstants.FILTERS, []);
|
|
49
50
|
}, [setValue]);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, []);
|
|
53
|
-
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, padding: 0.5, alignItems: "center", children: [
|
|
54
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(
|
|
51
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, pt: 1, children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
55
53
|
AutocompleteInput,
|
|
56
54
|
{
|
|
57
55
|
isOptionEqualToValue: richTypeEquals,
|
|
58
56
|
name: FieldConstants.TYPE,
|
|
59
57
|
label: "Type",
|
|
60
|
-
options:
|
|
58
|
+
options: EQUIPMENT_TYPE_ORDER,
|
|
61
59
|
onChangeCallback: handleEquipmentTypeChange,
|
|
62
60
|
getOptionLabel,
|
|
63
|
-
size: "small"
|
|
64
|
-
formProps: { variant: "filled" }
|
|
61
|
+
size: "small"
|
|
65
62
|
}
|
|
66
63
|
) }),
|
|
67
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs:
|
|
64
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
68
65
|
DirectoryItemsInput,
|
|
69
66
|
{
|
|
70
67
|
name: FieldConstants.FILTERS,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Grid } from "@mui/material";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import GridSection from "../../../grid/grid-section.js";
|
|
4
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
5
3
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
6
4
|
import "../../../../utils/conversionUtils.js";
|
|
7
5
|
import "../../../../utils/types/equipmentType.js";
|
|
@@ -17,45 +15,43 @@ function BranchConnectivityForm({
|
|
|
17
15
|
}) {
|
|
18
16
|
const id1 = `${FieldConstants.CONNECTIVITY}.${FieldConstants.CONNECTIVITY_1}`;
|
|
19
17
|
const id2 = `${FieldConstants.CONNECTIVITY}.${FieldConstants.CONNECTIVITY_2}`;
|
|
20
|
-
const connectivity1Field = /* @__PURE__ */ jsx(
|
|
21
|
-
ConnectivityForm,
|
|
22
|
-
{
|
|
23
|
-
id: id1,
|
|
24
|
-
withPosition: true,
|
|
25
|
-
isEquipmentModification: isModification,
|
|
26
|
-
previousValues: {
|
|
27
|
-
connectablePosition: previousValues?.connectablePosition1,
|
|
28
|
-
voltageLevelId: previousValues?.voltageLevelId1,
|
|
29
|
-
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId1,
|
|
30
|
-
terminalConnected: previousValues?.terminal1Connected
|
|
31
|
-
},
|
|
32
|
-
voltageLevelOptions,
|
|
33
|
-
fetchBusesOrBusbarSections,
|
|
34
|
-
PositionDiagramPane
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
const connectivity2Field = /* @__PURE__ */ jsx(
|
|
38
|
-
ConnectivityForm,
|
|
39
|
-
{
|
|
40
|
-
id: id2,
|
|
41
|
-
withPosition: true,
|
|
42
|
-
isEquipmentModification: isModification,
|
|
43
|
-
previousValues: {
|
|
44
|
-
connectablePosition: previousValues?.connectablePosition2,
|
|
45
|
-
voltageLevelId: previousValues?.voltageLevelId2,
|
|
46
|
-
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId2,
|
|
47
|
-
terminalConnected: previousValues?.terminal2Connected
|
|
48
|
-
},
|
|
49
|
-
voltageLevelOptions,
|
|
50
|
-
fetchBusesOrBusbarSections,
|
|
51
|
-
PositionDiagramPane
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
18
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
19
|
/* @__PURE__ */ jsx(GridSection, { title: "Side1", heading: 4 }),
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
ConnectivityForm,
|
|
22
|
+
{
|
|
23
|
+
id: id1,
|
|
24
|
+
withPosition: true,
|
|
25
|
+
isEquipmentModification: isModification,
|
|
26
|
+
previousValues: {
|
|
27
|
+
connectablePosition: previousValues?.connectablePosition1,
|
|
28
|
+
voltageLevelId: previousValues?.voltageLevelId1,
|
|
29
|
+
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId1,
|
|
30
|
+
terminalConnected: previousValues?.terminal1Connected
|
|
31
|
+
},
|
|
32
|
+
voltageLevelOptions,
|
|
33
|
+
fetchBusesOrBusbarSections,
|
|
34
|
+
PositionDiagramPane
|
|
35
|
+
}
|
|
36
|
+
),
|
|
57
37
|
/* @__PURE__ */ jsx(GridSection, { title: "Side2", heading: 4 }),
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
ConnectivityForm,
|
|
40
|
+
{
|
|
41
|
+
id: id2,
|
|
42
|
+
withPosition: true,
|
|
43
|
+
isEquipmentModification: isModification,
|
|
44
|
+
previousValues: {
|
|
45
|
+
connectablePosition: previousValues?.connectablePosition2,
|
|
46
|
+
voltageLevelId: previousValues?.voltageLevelId2,
|
|
47
|
+
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId2,
|
|
48
|
+
terminalConnected: previousValues?.terminal2Connected
|
|
49
|
+
},
|
|
50
|
+
voltageLevelOptions,
|
|
51
|
+
fetchBusesOrBusbarSections,
|
|
52
|
+
PositionDiagramPane
|
|
53
|
+
}
|
|
54
|
+
)
|
|
59
55
|
] });
|
|
60
56
|
}
|
|
61
57
|
export {
|
|
@@ -36,6 +36,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
36
36
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
37
37
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
38
38
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
39
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
39
40
|
import { CheckboxNullableInput } from "../../../inputs/reactHookForm/CheckboxNullableInput.js";
|
|
40
41
|
import "@react-querybuilder/material";
|
|
41
42
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PowerMeasurementsForm } from "./PowerMeasurementsForm.js";
|
|
3
3
|
import GridSection from "../../../grid/grid-section.js";
|
|
4
|
-
const styles = {
|
|
5
|
-
h3: {
|
|
6
|
-
marginTop: 0,
|
|
7
|
-
marginBottom: 0
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
4
|
function BranchActiveReactivePowerMeasurementsForm({
|
|
11
5
|
equipmentToModify
|
|
12
6
|
}) {
|
|
13
7
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14
|
-
/* @__PURE__ */ jsx(GridSection, { title: "MeasurementsSection"
|
|
8
|
+
/* @__PURE__ */ jsx(GridSection, { title: "MeasurementsSection" }),
|
|
15
9
|
/* @__PURE__ */ jsx(GridSection, { title: "Side1", heading: 4 }),
|
|
16
10
|
/* @__PURE__ */ jsx(
|
|
17
11
|
PowerMeasurementsForm,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
3
|
import { PowerWithValidityForm } from "./PowerWithValidityForm.js";
|
|
4
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
5
4
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
6
5
|
import "../../../../utils/conversionUtils.js";
|
|
7
6
|
import "../../../../utils/types/equipmentType.js";
|
|
@@ -28,8 +27,8 @@ function PowerMeasurementsForm({
|
|
|
28
27
|
};
|
|
29
28
|
const activePowerId = `${FieldConstants.STATE_ESTIMATION}.${getActiveMeasurementType(side)}`;
|
|
30
29
|
const reactivePowerId = `${FieldConstants.STATE_ESTIMATION}.${getReactiveMeasurementType(side)}`;
|
|
31
|
-
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
32
|
-
!reactivePowerOnly && /* @__PURE__ */ jsx(
|
|
30
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
|
|
31
|
+
!reactivePowerOnly && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
33
32
|
PowerWithValidityForm,
|
|
34
33
|
{
|
|
35
34
|
id: activePowerId,
|
|
@@ -37,7 +36,7 @@ function PowerMeasurementsForm({
|
|
|
37
36
|
measurement: activePowerMeasurement
|
|
38
37
|
}
|
|
39
38
|
) }),
|
|
40
|
-
/* @__PURE__ */ jsx(
|
|
39
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
41
40
|
PowerWithValidityForm,
|
|
42
41
|
{
|
|
43
42
|
id: reactivePowerId,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { Grid } from "@mui/material";
|
|
5
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
6
5
|
import { CheckboxNullableInput } from "../../../inputs/reactHookForm/CheckboxNullableInput.js";
|
|
7
6
|
import "../../../overflowableText/OverflowableText.js";
|
|
8
7
|
import { ActivePowerAdornment, ReactivePowerAdornment } from "../../../../utils/constants/adornments.js";
|
|
@@ -32,6 +31,7 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
32
31
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
33
32
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
34
33
|
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
35
35
|
import "@react-querybuilder/material";
|
|
36
36
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
37
37
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -46,27 +46,25 @@ function PowerWithValidityForm({ id, field, measurement }) {
|
|
|
46
46
|
}
|
|
47
47
|
return measurement.validity ? intl.formatMessage({ id: "ValidMeasurement" }) : intl.formatMessage({ id: "InvalidMeasurement" });
|
|
48
48
|
}, [intl, measurement?.validity]);
|
|
49
|
-
const valueField = /* @__PURE__ */ jsx(
|
|
50
|
-
FloatInput,
|
|
51
|
-
{
|
|
52
|
-
name: `${id}.${FieldConstants.VALUE}`,
|
|
53
|
-
label: field === FieldType.ACTIVE_POWER ? "ActivePowerText" : "ReactivePowerText",
|
|
54
|
-
adornment: field === FieldType.ACTIVE_POWER ? ActivePowerAdornment : ReactivePowerAdornment,
|
|
55
|
-
previousValue: convertInputValue(field, measurement?.value),
|
|
56
|
-
clearable: true
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
const validityField = /* @__PURE__ */ jsx(
|
|
60
|
-
CheckboxNullableInput,
|
|
61
|
-
{
|
|
62
|
-
name: `${id}.${FieldConstants.VALIDITY}`,
|
|
63
|
-
label: "ValidMeasurement",
|
|
64
|
-
previousValue: previousValidityField
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
49
|
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
68
|
-
/* @__PURE__ */ jsx(
|
|
69
|
-
|
|
50
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
51
|
+
FloatInput,
|
|
52
|
+
{
|
|
53
|
+
name: `${id}.${FieldConstants.VALUE}`,
|
|
54
|
+
label: field === FieldType.ACTIVE_POWER ? "ActivePowerText" : "ReactivePowerText",
|
|
55
|
+
adornment: field === FieldType.ACTIVE_POWER ? ActivePowerAdornment : ReactivePowerAdornment,
|
|
56
|
+
previousValue: convertInputValue(field, measurement?.value),
|
|
57
|
+
clearable: true
|
|
58
|
+
}
|
|
59
|
+
) }),
|
|
60
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
61
|
+
CheckboxNullableInput,
|
|
62
|
+
{
|
|
63
|
+
name: `${id}.${FieldConstants.VALIDITY}`,
|
|
64
|
+
label: "ValidMeasurement",
|
|
65
|
+
previousValue: previousValidityField
|
|
66
|
+
}
|
|
67
|
+
) })
|
|
70
68
|
] });
|
|
71
69
|
}
|
|
72
70
|
export {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Grid } from "@mui/material";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useState, useEffect, useCallback } from "react";
|
|
4
3
|
import { useWatch, useFormContext } from "react-hook-form";
|
|
5
4
|
import { fetchPredefinedProperties, initializedProperty } from "./propertyUtils.js";
|
|
@@ -11,6 +10,7 @@ import "../../../../utils/types/equipmentType.js";
|
|
|
11
10
|
import "@mui/icons-material";
|
|
12
11
|
import "../../../../utils/yupConfig.js";
|
|
13
12
|
import "react-intl";
|
|
13
|
+
import "@mui/material";
|
|
14
14
|
import "../../../overflowableText/OverflowableText.js";
|
|
15
15
|
import "localized-countries";
|
|
16
16
|
import "localized-countries/data/fr";
|
|
@@ -93,20 +93,19 @@ function PropertiesForm({ id, networkElementType, isModification = false }) {
|
|
|
93
93
|
deleteCallback,
|
|
94
94
|
watchProps
|
|
95
95
|
} : {};
|
|
96
|
-
|
|
97
|
-
ExpandableInput,
|
|
98
|
-
{
|
|
99
|
-
name: additionalProperties,
|
|
100
|
-
Field: PropertyForm,
|
|
101
|
-
fieldProps: { predefinedProperties },
|
|
102
|
-
addButtonLabel: "AddProperty",
|
|
103
|
-
initialValue: initializedProperty(),
|
|
104
|
-
...modificationProperties
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
96
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
97
|
/* @__PURE__ */ jsx(GridSection, { title: "AdditionalInformation" }),
|
|
109
|
-
|
|
98
|
+
/* @__PURE__ */ jsx(
|
|
99
|
+
ExpandableInput,
|
|
100
|
+
{
|
|
101
|
+
name: additionalProperties,
|
|
102
|
+
Field: PropertyForm,
|
|
103
|
+
fieldProps: { predefinedProperties },
|
|
104
|
+
addButtonLabel: "AddProperty",
|
|
105
|
+
initialValue: initializedProperty(),
|
|
106
|
+
...modificationProperties
|
|
107
|
+
}
|
|
108
|
+
)
|
|
110
109
|
] });
|
|
111
110
|
}
|
|
112
111
|
export {
|
|
@@ -4,5 +4,5 @@ type PropertyFormProps = {
|
|
|
4
4
|
index: string;
|
|
5
5
|
predefinedProperties: PredefinedProperties;
|
|
6
6
|
};
|
|
7
|
-
export declare
|
|
7
|
+
export declare function PropertyForm({ name, index, predefinedProperties }: PropertyFormProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|