@gridsuite/commons-ui 0.239.0 → 0.241.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/README.md +6 -2
- package/dist/components/composite/agGridTable/cellEditors/numericEditor.d.ts +9 -3
- package/dist/components/composite/agGridTable/cellEditors/numericEditor.js +24 -5
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-comparator-filter.js +2 -2
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js +4 -4
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-filter-icon.js +2 -2
- package/dist/components/composite/customAGGrid/custom-aggrid-header.js +26 -13
- package/dist/components/composite/customAGGrid/custom-aggrid-menu.js +2 -2
- package/dist/components/composite/dnd-table/dnd-table-bottom-left-buttons.js +4 -4
- package/dist/components/composite/dnd-table/dnd-table-bottom-right-buttons.js +6 -6
- package/dist/components/composite/dnd-table/dnd-table.js +4 -4
- package/dist/components/composite/filter/HeaderFilterForm.js +4 -4
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +1 -1
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +2 -4
- package/dist/components/composite/grid/grid-item.d.ts +4 -3
- package/dist/components/composite/grid/grid-item.js +8 -4
- package/dist/components/composite/grid/grid-section.d.ts +1 -1
- package/dist/components/composite/grid/grid-section.js +3 -3
- package/dist/components/composite/grid/index.js +6 -3
- package/dist/components/composite/index.js +4 -3
- package/dist/components/composite/reactQueryBuilder/PropertyValueEditor.js +5 -5
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +2 -2
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +5 -5
- package/dist/components/index.js +4 -3
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +9 -9
- package/dist/components/ui/dialogs/modifyElementSelection/ModifyElementSelection.js +3 -3
- package/dist/components/ui/reactHookForm/errorManagement/FieldErrorAlert.js +2 -2
- package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +4 -4
- package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.js +4 -4
- package/dist/components/ui/reactHookForm/numbers/RangeInput.js +5 -5
- package/dist/components/ui/reactHookForm/utils/functions.js +2 -2
- package/dist/features/authentication/AuthenticationRouter.js +2 -2
- package/dist/features/authentication/AuthenticationRouterErrorDisplay.js +3 -3
- package/dist/features/index.js +6 -1
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +7 -7
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +4 -4
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +8 -8
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +5 -5
- package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +1 -1
- package/dist/features/network-modifications/by-filter/assignment/modification-by-assignment-form.js +4 -4
- package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +4 -4
- package/dist/features/network-modifications/common/activePowerControl/ActivePowerControlForm.js +1 -1
- package/dist/features/network-modifications/common/connectivity/BranchConnectivityForm.js +1 -1
- package/dist/features/network-modifications/common/connectivity/ConnectivityForm.js +7 -7
- package/dist/features/network-modifications/common/connectivity/PositionForm.js +4 -4
- package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +4 -4
- package/dist/features/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +4 -3
- package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +2 -2
- package/dist/features/network-modifications/common/measurements/PowerMeasurementsForm.js +4 -4
- package/dist/features/network-modifications/common/measurements/PowerWithValidityForm.js +4 -4
- package/dist/features/network-modifications/common/properties/PropertiesForm.js +1 -1
- package/dist/features/network-modifications/common/properties/PropertyForm.js +5 -5
- package/dist/features/network-modifications/common/reactiveLimits/ReactiveLimitsForm.js +3 -3
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveRowForm.js +1 -1
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +7 -7
- package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +2 -2
- package/dist/features/network-modifications/common/setpoints/SetPointsForm.js +5 -5
- package/dist/features/network-modifications/common/shortCircuit/ShortCircuitForm.js +3 -3
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +5 -5
- package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +6 -6
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -5
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +5 -5
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -9
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +5 -5
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -9
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +5 -5
- package/dist/features/network-modifications/load/common/LoadDialogHeader.js +5 -5
- package/dist/features/network-modifications/load/common/LoadDialogTabsContent.js +1 -1
- package/dist/features/network-modifications/load/common/LoadForm.js +5 -5
- package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +12 -12
- package/dist/features/network-modifications/shunt-compensator/common/characteristicsForm.utils.d.ts +8 -8
- package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +11 -11
- package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.d.ts +12 -12
- package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -3
- package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.d.ts +12 -12
- package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +7 -7
- package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +9 -9
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +5 -5
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -1
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +5 -5
- package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +3 -3
- package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.d.ts +1 -1
- package/dist/features/parameters/common/contingency-table/contingency-table.js +4 -4
- package/dist/features/parameters/common/hook/use-tabs.d.ts +3 -2
- package/dist/features/parameters/common/hook/use-tabs.js +2 -3
- package/dist/features/parameters/common/index.d.ts +2 -1
- package/dist/features/parameters/common/index.js +6 -1
- package/dist/features/parameters/common/line-separator.js +2 -2
- package/dist/features/parameters/common/name-element-editor/name-element-editor-form.js +4 -4
- package/dist/features/parameters/common/parameter-field.js +5 -4
- package/dist/features/parameters/common/parameter-layout/index.d.ts +8 -0
- package/dist/features/parameters/common/parameter-layout/index.js +7 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.d.ts +10 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.js +15 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout.d.ts +23 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout.js +167 -0
- package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +3 -3
- package/dist/features/parameters/common/parameters.js +3 -3
- package/dist/features/parameters/common/provider-param.d.ts +10 -0
- package/dist/features/parameters/common/{ProviderParam.js → provider-param.js} +9 -11
- package/dist/features/parameters/common/widget/parameter-float.js +4 -4
- package/dist/features/parameters/common/widget/parameter-group.js +2 -2
- package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +4 -4
- package/dist/features/parameters/common/widget/parameter-line-slider.js +4 -4
- package/dist/features/parameters/common/widget/parameter-switch.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +39 -60
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +39 -101
- package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/time-delay-parameters.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +8 -7
- package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +12 -11
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +38 -71
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +39 -61
- package/dist/features/parameters/dynamic-security-analysis/scenario-parameters.js +2 -2
- package/dist/features/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +8 -7
- package/dist/features/parameters/dynamic-simulation/curve/common/grid-buttons.js +4 -4
- package/dist/features/parameters/dynamic-simulation/curve/curve-parameters.js +7 -8
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-preview.js +7 -7
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +10 -10
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector.js +26 -50
- package/dist/features/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +20 -20
- package/dist/features/parameters/dynamic-simulation/curve/dialog/model-filter.js +11 -10
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +42 -104
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +75 -97
- package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters.js +10 -9
- package/dist/features/parameters/dynamic-simulation/network/network-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/solver/solver-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/time-delay/time-delay-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.js +7 -6
- package/dist/features/parameters/index.js +6 -1
- package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -0
- package/dist/features/parameters/loadflow/load-flow-parameters-content.js +14 -13
- package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +12 -18
- package/dist/features/parameters/loadflow/load-flow-parameters-form.d.ts +1 -6
- package/dist/features/parameters/loadflow/load-flow-parameters-form.js +26 -91
- package/dist/features/parameters/loadflow/load-flow-parameters-header.js +29 -53
- package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +35 -128
- package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +11 -10
- package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +10 -9
- package/dist/features/parameters/network-visualizations/map-parameters.js +18 -17
- package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +4 -4
- package/dist/features/parameters/network-visualizations/network-visualizations-form.d.ts +1 -4
- package/dist/features/parameters/network-visualizations/network-visualizations-form.js +19 -48
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +13 -19
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +34 -65
- package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +18 -17
- package/dist/features/parameters/parameters-style.d.ts +0 -1
- package/dist/features/parameters/parameters-style.js +0 -2
- package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +13 -18
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.d.ts +7 -29
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.js +16 -109
- package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +27 -84
- package/dist/features/parameters/security-analysis/columns-definitions.js +11 -10
- package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +20 -20
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.d.ts +2 -4
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +44 -115
- package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +40 -109
- package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.js +12 -11
- package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +9 -11
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +7 -6
- package/dist/features/parameters/sensi/columns-definitions.js +9 -8
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +21 -21
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +3 -5
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +33 -90
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +40 -99
- package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +8 -17
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +10 -9
- package/dist/features/parameters/sensi/utils.js +8 -7
- package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +15 -14
- package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +11 -10
- package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +13 -18
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.d.ts +1 -4
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.js +5 -63
- package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +33 -101
- package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +12 -11
- package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +17 -16
- package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +15 -14
- package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +6 -5
- package/dist/features/parameters/voltage-init/general-parameters.js +11 -10
- package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +13 -18
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.d.ts +2 -24
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +51 -108
- package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +34 -90
- package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +2 -2
- package/dist/features/process-configs/security-analysis/update-sa-process-config.js +7 -6
- package/dist/features/topBar/AboutDialog.js +4 -7
- package/dist/index.js +13 -4
- package/dist/translations/en/commonButtonEn.d.ts +2 -0
- package/dist/translations/en/commonButtonEn.js +2 -0
- package/dist/translations/en/parameters.d.ts +1 -0
- package/dist/translations/en/parameters.js +3 -1
- package/dist/translations/fr/commonButtonFr.d.ts +2 -0
- package/dist/translations/fr/commonButtonFr.js +2 -0
- package/dist/translations/fr/parameters.d.ts +1 -0
- package/dist/translations/fr/parameters.js +3 -1
- package/dist/utils/types/elementType.d.ts +1 -0
- package/dist/utils/types/elementType.js +1 -0
- package/package.json +3 -2
- package/dist/features/parameters/common/ProviderParam.d.ts +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { LineSeparator } from "./line-separator.js";
|
|
5
5
|
import { parametersStyles } from "../parameters-style.js";
|
|
@@ -7,6 +7,7 @@ import "@mui/icons-material";
|
|
|
7
7
|
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
8
8
|
import "../../../utils/conversionUtils.js";
|
|
9
9
|
import "../../../utils/types/equipmentType.js";
|
|
10
|
+
import { mergeSx } from "../../../utils/styles.js";
|
|
10
11
|
import "react";
|
|
11
12
|
import "react-hook-form";
|
|
12
13
|
import "localized-countries";
|
|
@@ -35,17 +36,14 @@ import "react-papaparse";
|
|
|
35
36
|
import { PROVIDER } from "./constants.js";
|
|
36
37
|
const styles = {
|
|
37
38
|
providerParam: {
|
|
38
|
-
|
|
39
|
-
justifyContent: "space-between"
|
|
39
|
+
padding: 0
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
function ProviderParam({ options }) {
|
|
43
|
-
return /* @__PURE__ */ jsxs(
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
] }),
|
|
48
|
-
/* @__PURE__ */ jsx(Grid, { container: true, paddingTop: 1, paddingRight: 1, children: /* @__PURE__ */ jsx(LineSeparator, {}) })
|
|
42
|
+
function ProviderParam({ options, id, sx }) {
|
|
43
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 1, sx: mergeSx(styles.providerParam, sx), justifyContent: "space-between", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Grid2, { size: "auto", sx: mergeSx(parametersStyles.parameterName, { paddingRight: 2 }), children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Provider" }) }),
|
|
45
|
+
/* @__PURE__ */ jsx(Grid2, { size: "auto", sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(MuiSelectInput, { name: PROVIDER, size: "small", options, "data-testid": `${id}Provider` }) }),
|
|
46
|
+
/* @__PURE__ */ jsx(LineSeparator, {})
|
|
49
47
|
] });
|
|
50
48
|
}
|
|
51
49
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { CustomTooltip } from "../../../../components/ui/tooltip/CustomTooltip.js";
|
|
5
5
|
import "@mui/icons-material";
|
|
@@ -40,9 +40,9 @@ function ParameterFloat({
|
|
|
40
40
|
labelSize,
|
|
41
41
|
inputSize
|
|
42
42
|
}) {
|
|
43
|
-
const content = /* @__PURE__ */ jsxs(
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
45
|
-
/* @__PURE__ */ jsx(
|
|
43
|
+
const content = /* @__PURE__ */ jsxs(Grid2, { container: true, direction: "row", spacing: 1, paddingTop: 3, sx: { width: "100%" }, children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Grid2, { size: labelSize, sx: style, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
|
|
45
|
+
/* @__PURE__ */ jsx(Grid2, { size: inputSize, children: /* @__PURE__ */ jsx(FloatInput, { name, adornment }) })
|
|
46
46
|
] });
|
|
47
47
|
if (tooltip) {
|
|
48
48
|
return /* @__PURE__ */ jsx(CustomTooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: tooltip }), children: content });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Settings, ExpandCircleDown, ExpandMore } from "@mui/icons-material";
|
|
3
|
-
import {
|
|
3
|
+
import { Grid2, Accordion, AccordionSummary, Typography, AccordionDetails } from "@mui/material";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { FormattedMessage } from "react-intl";
|
|
6
6
|
import { parametersStyles } from "../../parameters-style.js";
|
|
@@ -14,7 +14,7 @@ function ParameterGroup({
|
|
|
14
14
|
children
|
|
15
15
|
}) {
|
|
16
16
|
const [mouseHover, setMouseHover] = useState(false);
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
17
|
+
return /* @__PURE__ */ jsx(Grid2, { size: 12, sx: parametersStyles.subgroupParameters, children: /* @__PURE__ */ jsxs(
|
|
18
18
|
Accordion,
|
|
19
19
|
{
|
|
20
20
|
sx: parametersStyles.subgroupParametersAccordion,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { parametersStyles } from "../../parameters-style.js";
|
|
5
5
|
import "@mui/icons-material";
|
|
@@ -39,9 +39,9 @@ function ParameterLineDirectoryItemsInput({
|
|
|
39
39
|
hideErrorMessage,
|
|
40
40
|
allowMultiSelect = true
|
|
41
41
|
}) {
|
|
42
|
-
return /* @__PURE__ */ jsxs(
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
42
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 1, paddingTop: 1, paddingBottom: 1, sx: { width: "100%" }, children: [
|
|
43
|
+
/* @__PURE__ */ jsx(Grid2, { size: 7, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
|
|
44
|
+
/* @__PURE__ */ jsx(Grid2, { size: 5, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(
|
|
45
45
|
DirectoryItemsInput,
|
|
46
46
|
{
|
|
47
47
|
name,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { parametersStyles } from "../../parameters-style.js";
|
|
5
5
|
import "@mui/icons-material";
|
|
@@ -49,9 +49,9 @@ function ParameterLineSlider({
|
|
|
49
49
|
minValue = 0,
|
|
50
50
|
maxValue = 100
|
|
51
51
|
}) {
|
|
52
|
-
return /* @__PURE__ */ jsxs(
|
|
53
|
-
/* @__PURE__ */ jsx(
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
52
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.container, children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Grid2, { size: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
|
|
54
|
+
/* @__PURE__ */ jsx(Grid2, { size: 4, children: /* @__PURE__ */ jsx(
|
|
55
55
|
SliderInput,
|
|
56
56
|
{
|
|
57
57
|
name,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { SwitchWithLabel } from "../parameters.js";
|
|
4
4
|
function ParameterSwitch({ label, value, onChange, key }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
5
|
+
return /* @__PURE__ */ jsx(Grid2, { container: true, spacing: 1, paddingTop: 1, justifyContent: "space-between", children: /* @__PURE__ */ jsx(SwitchWithLabel, { value, label, callback: onChange }) }, key);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
ParameterSwitch
|
package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UseTabsReturn } from '../common';
|
|
2
|
+
import { TabValues } from './dynamic-margin-calculation.type';
|
|
3
3
|
import { UseComputationParametersFormReturn } from '../common/utils';
|
|
4
4
|
type DynamicMarginCalculationFormProps = {
|
|
5
5
|
dynamicMarginCalculationMethods: UseComputationParametersFormReturn;
|
|
6
|
-
|
|
7
|
-
renderActions?: (onSubmitError: (errors: FieldErrors) => void) => ReactNode;
|
|
6
|
+
useTabsReturn: UseTabsReturn<TabValues>;
|
|
8
7
|
};
|
|
9
|
-
export declare function DynamicMarginCalculationForm({ dynamicMarginCalculationMethods,
|
|
8
|
+
export declare function DynamicMarginCalculationForm({ dynamicMarginCalculationMethods, useTabsReturn, }: Readonly<DynamicMarginCalculationFormProps>): import("react").JSX.Element;
|
|
10
9
|
export {};
|
package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Grid2, Tabs, Tab } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
|
-
import "../../../utils/conversionUtils.js";
|
|
5
|
-
import "../../../utils/types/equipmentType.js";
|
|
6
4
|
import "@mui/icons-material";
|
|
7
|
-
import { mergeSx } from "../../../utils/styles.js";
|
|
8
|
-
import { TabPanel } from "../common/parameters.js";
|
|
9
5
|
import "react";
|
|
6
|
+
import { TabPanel } from "../common/parameters.js";
|
|
7
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
8
|
+
import "../../../utils/conversionUtils.js";
|
|
9
|
+
import "../../../utils/types/equipmentType.js";
|
|
10
|
+
import "react-hook-form";
|
|
10
11
|
import "localized-countries";
|
|
11
12
|
import "localized-countries/data/fr";
|
|
12
13
|
import "localized-countries/data/en";
|
|
13
14
|
import "notistack";
|
|
14
|
-
import "react-hook-form";
|
|
15
15
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
16
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
17
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
18
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
19
|
-
import "@hello-pangea/dnd";
|
|
20
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
21
|
-
import { ProviderParam } from "../common/ProviderParam.js";
|
|
22
16
|
import "yup";
|
|
17
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
23
18
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
24
19
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
25
20
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
26
21
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
27
22
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
23
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
24
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
25
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
26
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
27
|
+
import "@hello-pangea/dnd";
|
|
28
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
31
29
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
32
30
|
import "mui-nested-menu";
|
|
33
31
|
import "react-resizable-panels";
|
|
34
32
|
import "react-papaparse";
|
|
35
|
-
import
|
|
33
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
34
|
+
import { ProviderParam } from "../common/provider-param.js";
|
|
35
|
+
import { parametersStyles, getTabStyle } from "../parameters-style.js";
|
|
36
36
|
import "../common/widget/parameter-line-slider.js";
|
|
37
37
|
import "../common/limitreductions/columns-definitions.js";
|
|
38
38
|
import "../common/contingency-table/contingency-table.js";
|
|
39
39
|
import "../common/contingency-table/columns-definitions.js";
|
|
40
|
-
import { useTabs } from "../common/hook/use-tabs.js";
|
|
41
40
|
import "@hookform/resolvers/yup";
|
|
42
41
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
43
42
|
import TimeDelayParameters from "./time-delay-parameters.js";
|
|
@@ -45,54 +44,34 @@ import LoadsVariationsParameters from "./loads-variations-parameters.js";
|
|
|
45
44
|
import { TabValues } from "./dynamic-margin-calculation.type.js";
|
|
46
45
|
function DynamicMarginCalculationForm({
|
|
47
46
|
dynamicMarginCalculationMethods,
|
|
48
|
-
|
|
49
|
-
renderActions
|
|
47
|
+
useTabsReturn
|
|
50
48
|
}) {
|
|
51
|
-
const {
|
|
52
|
-
const { selectedTab, tabsWithError, onTabChange
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
paramsLoaded ? /* @__PURE__ */ jsxs(Grid, { container: true, sx: { height: "100%" }, direction: "column", children: [
|
|
59
|
-
/* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(ProviderParam, { options: formattedProviders }) }),
|
|
60
|
-
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: onTabChange, "aria-label": "parameters", children: [
|
|
61
|
-
/* @__PURE__ */ jsx(
|
|
62
|
-
Tab,
|
|
63
|
-
{
|
|
64
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationTimeDelayTab" }),
|
|
65
|
-
value: TabValues.TAB_TIME_DELAY,
|
|
66
|
-
sx: getTabStyle(tabsWithError, TabValues.TAB_TIME_DELAY)
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
70
|
-
Tab,
|
|
71
|
-
{
|
|
72
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationLoadsVariationsTab" }),
|
|
73
|
-
value: TabValues.TAB_LOADS_VARIATIONS,
|
|
74
|
-
sx: getTabStyle(tabsWithError, TabValues.TAB_LOADS_VARIATIONS)
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
] }) }),
|
|
78
|
-
/* @__PURE__ */ jsxs(
|
|
79
|
-
Grid,
|
|
49
|
+
const { formattedProviders } = dynamicMarginCalculationMethods;
|
|
50
|
+
const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
|
|
51
|
+
return /* @__PURE__ */ jsxs(Stack, { sx: parametersStyles.scrollableGrid, children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsx(ProviderParam, { options: formattedProviders, id: "Dmc" }) }),
|
|
53
|
+
/* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: onTabChange, "aria-label": "parameters", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
Tab,
|
|
80
56
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
sx:
|
|
84
|
-
|
|
85
|
-
width: "100%"
|
|
86
|
-
}),
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_TIME_DELAY, children: /* @__PURE__ */ jsx(TimeDelayParameters, { path: TabValues.TAB_TIME_DELAY }) }),
|
|
89
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_LOADS_VARIATIONS, children: /* @__PURE__ */ jsx(LoadsVariationsParameters, { path: TabValues.TAB_LOADS_VARIATIONS }) })
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"dmcParameters"
|
|
57
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationTimeDelayTab" }),
|
|
58
|
+
value: TabValues.TAB_TIME_DELAY,
|
|
59
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_TIME_DELAY)
|
|
60
|
+
}
|
|
93
61
|
),
|
|
94
|
-
|
|
95
|
-
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
Tab,
|
|
64
|
+
{
|
|
65
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationLoadsVariationsTab" }),
|
|
66
|
+
value: TabValues.TAB_LOADS_VARIATIONS,
|
|
67
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_LOADS_VARIATIONS)
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] }) }),
|
|
71
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, size: 12, sx: { paddingTop: 0, width: "100%", maxHeight: "100%" }, children: [
|
|
72
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_TIME_DELAY, children: /* @__PURE__ */ jsx(TimeDelayParameters, { path: TabValues.TAB_TIME_DELAY }) }),
|
|
73
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_LOADS_VARIATIONS, children: /* @__PURE__ */ jsx(LoadsVariationsParameters, { path: TabValues.TAB_LOADS_VARIATIONS }) })
|
|
74
|
+
] }, "dmcParameters")
|
|
96
75
|
] });
|
|
97
76
|
}
|
|
98
77
|
export {
|
package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js
CHANGED
|
@@ -1,52 +1,49 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import {
|
|
3
|
-
import { useIntl, FormattedMessage } from "react-intl";
|
|
4
|
-
import { useState, useCallback, useEffect } from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect } from "react";
|
|
5
3
|
import "../../../utils/conversionUtils.js";
|
|
6
4
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
7
5
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
6
|
import "../../../utils/types/equipmentType.js";
|
|
9
7
|
import "@mui/icons-material";
|
|
10
|
-
import { mergeSx } from "../../../utils/styles.js";
|
|
11
8
|
import { DynamicMarginCalculationForm } from "./dynamic-margin-calculation-form.js";
|
|
12
9
|
import { useDynamicMarginCalculationParametersForm, toParamsInfos, toFormValues } from "./use-dynamic-margin-calculation-parameters-form.js";
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { CreateParameterDialog } from "../common/parameters-creation-dialog.js";
|
|
18
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
19
|
-
import "react-hook-form";
|
|
10
|
+
import { ParameterLayout } from "../common/parameter-layout/parameter-layout.js";
|
|
11
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
12
|
+
import "@mui/material";
|
|
13
|
+
import "react-intl";
|
|
20
14
|
import { fetchDynamicMarginCalculationParameters } from "../../../services/dynamic-margin-calculation.js";
|
|
21
15
|
import "localized-countries";
|
|
22
16
|
import "localized-countries/data/fr";
|
|
23
17
|
import "localized-countries/data/en";
|
|
24
18
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
19
|
+
import "react-hook-form";
|
|
25
20
|
import { CustomFormProvider } from "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
21
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
22
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
23
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
24
|
+
import "@hello-pangea/dnd";
|
|
25
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
26
26
|
import "yup";
|
|
27
|
-
import { DirectoryItemSelector } from "../../../components/ui/directoryItemSelector/DirectoryItemSelector.js";
|
|
28
27
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
29
28
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
30
29
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
31
30
|
import "@material-symbols/svg-400/outlined/arrows_input.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
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
35
33
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
36
34
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
37
|
-
import "@hello-pangea/dnd";
|
|
38
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
39
35
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
40
36
|
import "mui-nested-menu";
|
|
41
37
|
import "react-resizable-panels";
|
|
42
38
|
import "react-papaparse";
|
|
43
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
44
39
|
import "../common/widget/parameter-line-slider.js";
|
|
45
40
|
import "../common/limitreductions/columns-definitions.js";
|
|
46
41
|
import "../common/contingency-table/contingency-table.js";
|
|
47
42
|
import "../common/contingency-table/columns-definitions.js";
|
|
43
|
+
import { useTabs } from "../common/hook/use-tabs.js";
|
|
48
44
|
import "@hookform/resolvers/yup";
|
|
49
45
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
46
|
+
import { TabValues } from "./dynamic-margin-calculation.type.js";
|
|
50
47
|
function DynamicMarginCalculationInline({
|
|
51
48
|
studyUuid,
|
|
52
49
|
parametersBackend,
|
|
@@ -59,23 +56,14 @@ function DynamicMarginCalculationInline({
|
|
|
59
56
|
name: null,
|
|
60
57
|
description: null
|
|
61
58
|
});
|
|
62
|
-
const intl = useIntl();
|
|
63
59
|
const { snackError } = useSnackMessage();
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, []);
|
|
72
|
-
const handleCancelReset = useCallback(() => {
|
|
73
|
-
setOpenResetConfirmation(false);
|
|
74
|
-
}, []);
|
|
75
|
-
const handleReset = useCallback(() => {
|
|
76
|
-
resetParameters();
|
|
77
|
-
setOpenResetConfirmation(false);
|
|
78
|
-
}, [resetParameters]);
|
|
60
|
+
const { formMethods } = dynamicMarginCalculationMethods;
|
|
61
|
+
const { reset, getValues, formState, handleSubmit } = formMethods;
|
|
62
|
+
const useTabsReturn = useTabs({
|
|
63
|
+
defaultTab: Object.values(TabValues)[0],
|
|
64
|
+
tabEnum: TabValues,
|
|
65
|
+
errors: formState.errors
|
|
66
|
+
});
|
|
79
67
|
const onSubmit = useCallback(
|
|
80
68
|
(formData) => {
|
|
81
69
|
updateParameters(toParamsInfos(formData));
|
|
@@ -85,7 +73,6 @@ function DynamicMarginCalculationInline({
|
|
|
85
73
|
const handleLoadParameter = useCallback(
|
|
86
74
|
(newParams) => {
|
|
87
75
|
if (newParams?.length) {
|
|
88
|
-
setOpenSelectParameterDialog(false);
|
|
89
76
|
const parametersUuid = newParams[0].id;
|
|
90
77
|
fetchDynamicMarginCalculationParameters(parametersUuid).then((_params) => {
|
|
91
78
|
reset(toFormValues(_params), {
|
|
@@ -95,82 +82,33 @@ function DynamicMarginCalculationInline({
|
|
|
95
82
|
snackWithFallback(snackError, error, { headerId: "paramsRetrievingError" });
|
|
96
83
|
});
|
|
97
84
|
}
|
|
98
|
-
setOpenSelectParameterDialog(false);
|
|
99
85
|
},
|
|
100
86
|
[reset, snackError]
|
|
101
87
|
);
|
|
102
88
|
useEffect(() => {
|
|
103
89
|
setHaveDirtyFields(formState.isDirty);
|
|
104
90
|
}, [formState, setHaveDirtyFields]);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
label: "settings.button.chooseSettings"
|
|
122
|
-
}
|
|
123
|
-
),
|
|
124
|
-
/* @__PURE__ */ jsx(LabelledButton, { disabled: true, callback: () => setOpenCreateParameterDialog(true), label: "save" }),
|
|
125
|
-
/* @__PURE__ */ jsx(LabelledButton, { callback: handleResetClick, label: "resetToDefault" }),
|
|
126
|
-
/* @__PURE__ */ jsx(SubmitButton, { variant: "outlined", onClick: handleSubmit(onSubmit, onSubmitError), children: /* @__PURE__ */ jsx(FormattedMessage, { id: "validate" }) })
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
) }),
|
|
130
|
-
openCreateParameterDialog && /* @__PURE__ */ jsx(
|
|
131
|
-
CreateParameterDialog,
|
|
132
|
-
{
|
|
133
|
-
studyUuid,
|
|
134
|
-
open: openCreateParameterDialog,
|
|
135
|
-
onClose: () => setOpenCreateParameterDialog(false),
|
|
136
|
-
parameterValues: getValues,
|
|
137
|
-
parameterFormatter: toParamsInfos,
|
|
138
|
-
parameterType: ElementType.DYNAMIC_MARGIN_CALCULATION_PARAMETERS
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
openSelectParameterDialog && /* @__PURE__ */ jsx(
|
|
142
|
-
DirectoryItemSelector,
|
|
143
|
-
{
|
|
144
|
-
open: openSelectParameterDialog,
|
|
145
|
-
onClose: handleLoadParameter,
|
|
146
|
-
types: [ElementType.DYNAMIC_MARGIN_CALCULATION_PARAMETERS],
|
|
147
|
-
title: intl.formatMessage({
|
|
148
|
-
id: "showSelectParameterDialog"
|
|
149
|
-
}),
|
|
150
|
-
onlyLeaves: true,
|
|
151
|
-
multiSelect: false,
|
|
152
|
-
validationButtonText: intl.formatMessage({
|
|
153
|
-
id: "validate"
|
|
154
|
-
})
|
|
155
|
-
}
|
|
156
|
-
),
|
|
157
|
-
openResetConfirmation && /* @__PURE__ */ jsx(
|
|
158
|
-
PopupConfirmationDialog,
|
|
91
|
+
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: dynamicMarginCalculationMethods.formSchema, ...formMethods, children: /* @__PURE__ */ jsx(
|
|
92
|
+
ParameterLayout,
|
|
93
|
+
{
|
|
94
|
+
title: "DynamicMarginCalculation",
|
|
95
|
+
isLoading: !dynamicMarginCalculationMethods.paramsLoaded,
|
|
96
|
+
parameterType: ElementType.DYNAMIC_MARGIN_CALCULATION_PARAMETERS,
|
|
97
|
+
createParameter: {
|
|
98
|
+
studyUuid,
|
|
99
|
+
parameterFormatter: toParamsInfos,
|
|
100
|
+
getParameterValues: getValues
|
|
101
|
+
},
|
|
102
|
+
selectParameterHandler: handleLoadParameter,
|
|
103
|
+
resetHandler: resetParameters,
|
|
104
|
+
validateHandler: handleSubmit(onSubmit, useTabsReturn.onError),
|
|
105
|
+
children: /* @__PURE__ */ jsx(
|
|
106
|
+
DynamicMarginCalculationForm,
|
|
159
107
|
{
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
openConfirmationPopup: openResetConfirmation,
|
|
163
|
-
setOpenConfirmationPopup: handleCancelReset,
|
|
164
|
-
handlePopupConfirmation: handleReset
|
|
108
|
+
dynamicMarginCalculationMethods,
|
|
109
|
+
useTabsReturn
|
|
165
110
|
}
|
|
166
111
|
)
|
|
167
|
-
] });
|
|
168
|
-
};
|
|
169
|
-
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, children: /* @__PURE__ */ jsx(
|
|
170
|
-
DynamicMarginCalculationForm,
|
|
171
|
-
{
|
|
172
|
-
dynamicMarginCalculationMethods,
|
|
173
|
-
renderActions
|
|
174
112
|
}
|
|
175
113
|
) });
|
|
176
114
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
|
-
import {
|
|
4
|
+
import { Grid2 } from "@mui/material";
|
|
5
5
|
import * as yup from "yup";
|
|
6
6
|
import { LOADS_VARIATIONS, ACTIVE, VARIATION, LOAD_FILTERS, LOAD_MODELS_RULE, ACCURACY, CALCULATION_TYPE } from "./constants.js";
|
|
7
7
|
import { ID } from "../../../utils/constants/filterConstant.js";
|
|
@@ -129,7 +129,7 @@ function LoadsVariationsParameters({ path }) {
|
|
|
129
129
|
label: inlt.formatMessage({ id: colDef.label })
|
|
130
130
|
}));
|
|
131
131
|
}, [inlt]);
|
|
132
|
-
return /* @__PURE__ */ jsxs(
|
|
132
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, children: [
|
|
133
133
|
params.map((param) => {
|
|
134
134
|
const { name, type, ...otherParams } = param;
|
|
135
135
|
return /* @__PURE__ */ jsx(ParameterField, { id: path, name: param.name, type: param.type, ...otherParams }, param.name);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import * as yup from "yup";
|
|
4
4
|
import { LOAD_INCREASE_STOP_TIME, LOAD_INCREASE_START_TIME, MARGIN_CALCULATION_START_TIME, STOP_TIME, START_TIME } from "./constants.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
@@ -49,7 +49,7 @@ const params = [
|
|
|
49
49
|
}
|
|
50
50
|
];
|
|
51
51
|
function TimeDelayParameters({ path }) {
|
|
52
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
+
return /* @__PURE__ */ jsx(Grid2, { container: true, children: params.map((param) => {
|
|
53
53
|
const { name, type, ...otherParams } = param;
|
|
54
54
|
return /* @__PURE__ */ jsx(ParameterField, { id: path, name: param.name, type: param.type, ...otherParams }, param.name);
|
|
55
55
|
}) });
|
|
@@ -6,33 +6,34 @@ import "../../../utils/conversionUtils.js";
|
|
|
6
6
|
import "../../../utils/types/equipmentType.js";
|
|
7
7
|
import "react/jsx-runtime";
|
|
8
8
|
import "@mui/icons-material";
|
|
9
|
-
import { PROVIDER } from "../common/constants.js";
|
|
10
9
|
import "@mui/material";
|
|
11
|
-
import "react-intl";
|
|
12
10
|
import "react";
|
|
11
|
+
import "react-intl";
|
|
12
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
13
|
+
import "react-hook-form";
|
|
13
14
|
import "localized-countries";
|
|
14
15
|
import "localized-countries/data/fr";
|
|
15
16
|
import "localized-countries/data/en";
|
|
16
17
|
import "notistack";
|
|
17
|
-
import "react-hook-form";
|
|
18
18
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
19
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
20
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
21
19
|
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
22
|
-
import "@hello-pangea/dnd";
|
|
23
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
24
20
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
25
21
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
26
22
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
27
23
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
28
24
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
29
25
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
26
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
30
27
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
31
28
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
29
|
+
import "@hello-pangea/dnd";
|
|
30
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
32
31
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
33
32
|
import "mui-nested-menu";
|
|
34
33
|
import "react-resizable-panels";
|
|
35
34
|
import "react-papaparse";
|
|
35
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
36
|
+
import { PROVIDER } from "../common/constants.js";
|
|
36
37
|
import "../common/widget/parameter-line-slider.js";
|
|
37
38
|
import "../common/limitreductions/columns-definitions.js";
|
|
38
39
|
import "../common/contingency-table/contingency-table.js";
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
|
+
import "@mui/icons-material";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-intl";
|
|
6
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
3
7
|
import "../../../utils/conversionUtils.js";
|
|
4
8
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
5
9
|
import "../../../utils/types/equipmentType.js";
|
|
6
10
|
import { ParameterType } from "../../../utils/types/parameters.type.js";
|
|
7
|
-
import "
|
|
8
|
-
import "react-intl";
|
|
9
|
-
import "react";
|
|
11
|
+
import "react-hook-form";
|
|
10
12
|
import "localized-countries";
|
|
11
13
|
import "localized-countries/data/fr";
|
|
12
14
|
import "localized-countries/data/en";
|
|
13
15
|
import "notistack";
|
|
14
|
-
import "react-hook-form";
|
|
15
16
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
16
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
17
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
18
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
19
|
-
import "@hello-pangea/dnd";
|
|
20
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
21
17
|
import "yup";
|
|
18
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
22
19
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
23
20
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
24
21
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
25
22
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
26
23
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
27
24
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
25
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
26
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
27
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
28
|
+
import "@hello-pangea/dnd";
|
|
29
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
30
30
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
31
31
|
import "mui-nested-menu";
|
|
32
32
|
import "react-resizable-panels";
|
|
33
33
|
import "react-papaparse";
|
|
34
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
34
35
|
import { ParameterLineDirectoryItemsInput } from "../common/widget/parameter-line-directory-items-input.js";
|
|
35
36
|
import "../common/widget/parameter-line-slider.js";
|
|
36
37
|
import "../common/limitreductions/columns-definitions.js";
|
|
@@ -48,7 +49,7 @@ const params = [
|
|
|
48
49
|
}
|
|
49
50
|
];
|
|
50
51
|
function ContingencyParameters({ path }) {
|
|
51
|
-
return /* @__PURE__ */ jsxs(
|
|
52
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, children: [
|
|
52
53
|
params.map((param) => {
|
|
53
54
|
const { name, type, ...otherParams } = param;
|
|
54
55
|
return /* @__PURE__ */ jsx(ParameterField, { id: path, name: param.name, type: param.type, ...otherParams }, param.name);
|