@gridsuite/commons-ui 0.291.0 → 0.293.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/ui/reactHookForm/directory-item-input/directory-item-input.js +67 -26
- package/dist/features/index.js +32 -11
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +6 -2
- package/dist/features/process-configs/common/FormSection.d.ts +8 -0
- package/dist/features/process-configs/common/FormSection.js +11 -0
- package/dist/features/process-configs/common/FormSubSection.d.ts +8 -0
- package/dist/features/process-configs/common/FormSubSection.js +11 -0
- package/dist/features/process-configs/common/GeneralInformationSection.d.ts +8 -0
- package/dist/features/process-configs/{shortcircuit/sc-process-config-edition.utils.js → common/GeneralInformationSection.js} +57 -54
- package/dist/features/process-configs/{security-analysis/index.d.ts → common/ModificationsSubSection.d.ts} +1 -3
- package/dist/features/process-configs/common/ModificationsSubSection.js +14 -0
- package/dist/features/process-configs/common/ProvidersParametersSubSection.d.ts +5 -0
- package/dist/features/process-configs/{loadflow/lf-process-config-edition.js → common/ProvidersParametersSubSection.js} +35 -26
- package/dist/features/process-configs/common/SpecificInformationSection.d.ts +8 -0
- package/dist/features/process-configs/common/SpecificInformationSection.js +25 -0
- package/dist/features/process-configs/common/index.d.ts +13 -1
- package/dist/features/process-configs/common/index.js +26 -2
- package/dist/features/process-configs/common/process-config-backend.type.d.ts +15 -0
- package/dist/features/process-configs/common/process-config-form.constants.d.ts +7 -0
- package/dist/features/process-configs/common/process-config-form.constants.js +39 -0
- package/dist/features/process-configs/common/process-config-form.schema.d.ts +29 -0
- package/dist/features/process-configs/{loadflow/lf-process-config-edition.utils.js → common/process-config-form.schema.js} +33 -51
- package/dist/features/process-configs/common/process-config-form.types.d.ts +45 -0
- package/dist/features/process-configs/common/process-config-mapping.d.ts +4 -0
- package/dist/features/process-configs/common/process-config-mapping.js +57 -0
- package/dist/features/process-configs/common/process-config-modifications-edition.utils.d.ts +0 -3
- package/dist/features/process-configs/common/process-config-modifications-edition.utils.js +0 -2
- package/dist/features/process-configs/common/process-config-type.definitions.d.ts +56 -0
- package/dist/features/process-configs/common/process-config-type.definitions.js +70 -0
- package/dist/features/process-configs/form/components/ProcessTypeChangeDialog.d.ts +13 -0
- package/dist/features/process-configs/form/components/ProcessTypeChangeDialog.js +27 -0
- package/dist/features/process-configs/form/components/ProcessTypeSelect.d.ts +6 -0
- package/dist/features/process-configs/form/components/ProcessTypeSelect.js +69 -0
- package/dist/features/process-configs/form/hooks/usePrefillSelection.d.ts +19 -0
- package/dist/features/process-configs/form/hooks/usePrefillSelection.js +51 -0
- package/dist/features/process-configs/form/hooks/useProcessConfigForm.d.ts +19 -0
- package/dist/features/process-configs/form/hooks/useProcessConfigForm.js +74 -0
- package/dist/features/process-configs/form/hooks/useProcessTypeGuard.d.ts +10 -0
- package/dist/features/process-configs/form/hooks/useProcessTypeGuard.js +67 -0
- package/dist/features/process-configs/form/process-config-form.d.ts +2 -0
- package/dist/features/process-configs/form/process-config-form.js +170 -0
- package/dist/features/process-configs/form/utils/form.utils.d.ts +3 -0
- package/dist/features/process-configs/form/utils/form.utils.js +36 -0
- package/dist/features/process-configs/index.d.ts +3 -5
- package/dist/features/process-configs/index.js +33 -12
- package/dist/features/process-configs/process-config-edition-dialog.d.ts +2 -0
- package/dist/features/process-configs/{process-config.utils.js → process-config-edition-dialog.js} +86 -26
- package/dist/index.js +32 -11
- package/dist/translations/en/businessErrorsEn.d.ts +1 -0
- package/dist/translations/en/businessErrorsEn.js +2 -1
- package/dist/translations/en/parameters.d.ts +1 -0
- package/dist/translations/en/parameters.js +2 -1
- package/dist/translations/en/processConfigEn.d.ts +18 -0
- package/dist/translations/en/processConfigEn.js +19 -1
- package/dist/translations/fr/businessErrorsFr.d.ts +1 -0
- package/dist/translations/fr/businessErrorsFr.js +2 -1
- package/dist/translations/fr/parameters.d.ts +1 -0
- package/dist/translations/fr/parameters.js +3 -2
- package/dist/translations/fr/processConfigFr.d.ts +18 -0
- package/dist/translations/fr/processConfigFr.js +19 -1
- package/package.json +1 -1
- package/dist/features/process-configs/lf-process-config-edition-dialog.d.ts +0 -3
- package/dist/features/process-configs/lf-process-config-edition-dialog.js +0 -128
- package/dist/features/process-configs/loadflow/index.d.ts +0 -9
- package/dist/features/process-configs/loadflow/index.js +0 -9
- package/dist/features/process-configs/loadflow/lf-process-config-edition.d.ts +0 -1
- package/dist/features/process-configs/loadflow/lf-process-config-edition.utils.d.ts +0 -39
- package/dist/features/process-configs/loadflow/lf-process-config.type.d.ts +0 -6
- package/dist/features/process-configs/process-config-edition.utils.d.ts +0 -13
- package/dist/features/process-configs/process-config.type.d.ts +0 -16
- package/dist/features/process-configs/process-config.type.js +0 -1
- package/dist/features/process-configs/process-config.utils.d.ts +0 -33
- package/dist/features/process-configs/sa-process-config-edition-dialog.d.ts +0 -3
- package/dist/features/process-configs/sa-process-config-edition-dialog.js +0 -128
- package/dist/features/process-configs/sc-process-config-edition-dialog.d.ts +0 -3
- package/dist/features/process-configs/sc-process-config-edition-dialog.js +0 -141
- package/dist/features/process-configs/security-analysis/index.js +0 -9
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.d.ts +0 -1
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.js +0 -100
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.utils.d.ts +0 -45
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.utils.js +0 -111
- package/dist/features/process-configs/security-analysis/sa-process-config.type.d.ts +0 -7
- package/dist/features/process-configs/security-analysis/sa-process-config.type.js +0 -1
- package/dist/features/process-configs/shortcircuit/index.d.ts +0 -9
- package/dist/features/process-configs/shortcircuit/index.js +0 -9
- package/dist/features/process-configs/shortcircuit/sc-process-config-edition.d.ts +0 -1
- package/dist/features/process-configs/shortcircuit/sc-process-config-edition.js +0 -90
- package/dist/features/process-configs/shortcircuit/sc-process-config-edition.utils.d.ts +0 -39
- package/dist/features/process-configs/shortcircuit/sc-process-config.type.d.ts +0 -6
- package/dist/features/process-configs/shortcircuit/sc-process-config.type.js +0 -1
- /package/dist/features/process-configs/{loadflow/lf-process-config.type.js → common/process-config-backend.type.js} +0 -0
- /package/dist/features/process-configs/{process-config-edition.utils.js → common/process-config-form.types.js} +0 -0
package/dist/features/process-configs/{process-config.utils.js → process-config-edition-dialog.js}
RENAMED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "react
|
|
4
|
-
import "react-hook-form";
|
|
5
|
-
import "react";
|
|
6
|
-
import "react-intl";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useWatch } from "react-hook-form";
|
|
7
4
|
import "@mui/material";
|
|
8
5
|
import "@mui/icons-material";
|
|
6
|
+
import "react-intl";
|
|
9
7
|
import "../../components/ui/overflowableText/OverflowableText.js";
|
|
8
|
+
import { FieldConstants } from "../../utils/constants/fieldConstants.js";
|
|
10
9
|
import "../../utils/conversionUtils.js";
|
|
10
|
+
import { snackWithFallback } from "../../utils/error.js";
|
|
11
|
+
import { isDisabledValidationButton } from "../../utils/form-utils.js";
|
|
11
12
|
import "../../utils/types/equipmentType.js";
|
|
12
13
|
import "localized-countries";
|
|
13
|
-
import "
|
|
14
|
+
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
14
15
|
import "../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
15
16
|
import "yup";
|
|
16
17
|
import "../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
@@ -19,6 +20,7 @@ import "../../components/ui/dialogs/descriptionModificationDialog/DescriptionMod
|
|
|
19
20
|
import "../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
20
21
|
import "../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
21
22
|
import "@hello-pangea/dnd";
|
|
23
|
+
import { CustomMuiDialog } from "../../components/ui/dialogs/customMuiDialog/CustomMuiDialog.js";
|
|
22
24
|
import "../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
23
25
|
import "../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
24
26
|
import "../../chunks/module.pXeJjFiM.js";
|
|
@@ -87,25 +89,83 @@ import "../parameters/dynamic-margin-calculation/time-delay-parameters.js";
|
|
|
87
89
|
import "../parameters/dynamic-margin-calculation/loads-variations-parameters.js";
|
|
88
90
|
import "../parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.js";
|
|
89
91
|
import "../parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js";
|
|
90
|
-
import
|
|
91
|
-
import {
|
|
92
|
-
import
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
import "./common/process-config-type.definitions.js";
|
|
93
|
+
import { ProcessType } from "./common/process-config.type.js";
|
|
94
|
+
import "./common/process-config-modifications-edition.utils.js";
|
|
95
|
+
import "./common/process-config-form.constants.js";
|
|
96
|
+
import "./common/process-config-form.schema.js";
|
|
97
|
+
import { getProcessConfigBackendFromFormData } from "./common/process-config-mapping.js";
|
|
98
|
+
import { ProcessConfigForm } from "./form/process-config-form.js";
|
|
99
|
+
import { useProcessConfigForm } from "./form/hooks/useProcessConfigForm.js";
|
|
100
|
+
const PROCESS_CONFIG_EDIT_TITLE_IDS = {
|
|
101
|
+
[ProcessType.LOADFLOW]: "process_config/editLFProcessConfigTitle",
|
|
102
|
+
[ProcessType.SECURITY_ANALYSIS]: "process_config/editSAProcessConfigTitle",
|
|
103
|
+
[ProcessType.SHORT_CIRCUIT]: "process_config/editSCProcessConfigTitle"
|
|
104
|
+
};
|
|
105
|
+
function ProcessConfigEditionDialog({
|
|
106
|
+
open,
|
|
107
|
+
onClose,
|
|
108
|
+
processConfigUuid,
|
|
109
|
+
processConfigName,
|
|
110
|
+
description,
|
|
111
|
+
directory,
|
|
112
|
+
fetchProcessConfig,
|
|
113
|
+
updateProcessConfig
|
|
114
|
+
}) {
|
|
115
|
+
const { formMethods, formSchema, isLoading } = useProcessConfigForm({
|
|
116
|
+
mode: "edit",
|
|
117
|
+
processConfigUuid,
|
|
118
|
+
processConfigName,
|
|
119
|
+
description,
|
|
120
|
+
fetchProcessConfig
|
|
121
|
+
});
|
|
122
|
+
const {
|
|
123
|
+
control,
|
|
124
|
+
formState: { errors }
|
|
125
|
+
} = formMethods;
|
|
126
|
+
const { snackError } = useSnackMessage();
|
|
127
|
+
const selectedProcessType = useWatch({ control, name: "processType" });
|
|
128
|
+
const handleSave = useCallback(
|
|
129
|
+
async (values) => {
|
|
130
|
+
try {
|
|
131
|
+
await updateProcessConfig(
|
|
132
|
+
processConfigUuid,
|
|
133
|
+
values[FieldConstants.NAME] ?? "",
|
|
134
|
+
values[FieldConstants.DESCRIPTION] ?? "",
|
|
135
|
+
getProcessConfigBackendFromFormData(values)
|
|
136
|
+
);
|
|
137
|
+
} catch (error) {
|
|
138
|
+
snackWithFallback(snackError, error, { headerId: "processConfig/updateProcessConfigError" });
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
[processConfigUuid, updateProcessConfig, snackError]
|
|
142
|
+
);
|
|
143
|
+
return /* @__PURE__ */ jsx(
|
|
144
|
+
CustomMuiDialog,
|
|
145
|
+
{
|
|
146
|
+
titleId: PROCESS_CONFIG_EDIT_TITLE_IDS[selectedProcessType] ?? "processConfigEditTitle",
|
|
147
|
+
open,
|
|
148
|
+
onClose,
|
|
149
|
+
onSave: handleSave,
|
|
150
|
+
formContext: {
|
|
151
|
+
...formMethods,
|
|
152
|
+
validationSchema: formSchema,
|
|
153
|
+
removeOptional: true
|
|
154
|
+
},
|
|
155
|
+
disabledSave: isLoading || isDisabledValidationButton(errors),
|
|
156
|
+
isDataFetching: isLoading,
|
|
157
|
+
children: /* @__PURE__ */ jsx(
|
|
158
|
+
ProcessConfigForm,
|
|
159
|
+
{
|
|
160
|
+
form: formMethods,
|
|
161
|
+
mode: "edit",
|
|
162
|
+
initialElementName: processConfigName,
|
|
163
|
+
activeDirectory: directory
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
);
|
|
107
168
|
}
|
|
108
169
|
export {
|
|
109
|
-
|
|
110
|
-
isProcessType
|
|
170
|
+
ProcessConfigEditionDialog
|
|
111
171
|
};
|
package/dist/index.js
CHANGED
|
@@ -517,13 +517,22 @@ import { SHORTCIRCUIT_ANALYSIS_RESULT_SORT_STORE, ShortCircuitAnalysisResultTabl
|
|
|
517
517
|
import { ShortCircuitAnalysisResult } from "./features/results/shortcircuit/shortcircuit-analysis-result.js";
|
|
518
518
|
import { ShortCircuitAnalysisAllBusesResult } from "./features/results/shortcircuit/shortcircuit-analysis-all-buses-result.js";
|
|
519
519
|
import { RESULTS_LOADING_DELAY } from "./features/results/constants.js";
|
|
520
|
+
import { FormSection } from "./features/process-configs/common/FormSection.js";
|
|
521
|
+
import { FormSubSection } from "./features/process-configs/common/FormSubSection.js";
|
|
522
|
+
import { GeneralInformationSection } from "./features/process-configs/common/GeneralInformationSection.js";
|
|
523
|
+
import { ModificationsSubSection } from "./features/process-configs/common/ModificationsSubSection.js";
|
|
524
|
+
import { ProvidersParametersSubSection } from "./features/process-configs/common/ProvidersParametersSubSection.js";
|
|
525
|
+
import { SpecificInformationSection } from "./features/process-configs/common/SpecificInformationSection.js";
|
|
520
526
|
import { ProcessType } from "./features/process-configs/common/process-config.type.js";
|
|
521
|
-
import {
|
|
527
|
+
import { PROCESS_CONFIG_PARAMETER_FIELDS, PROCESS_CONFIG_TYPE_DEFINITIONS, getProcessConfigTypeDefinition, getProcessTypesRequiringParameter } from "./features/process-configs/common/process-config-type.definitions.js";
|
|
522
528
|
import { ProcessConfigModificationsEdition } from "./features/process-configs/common/process-config-modifications-edition.js";
|
|
523
|
-
import {
|
|
524
|
-
import {
|
|
525
|
-
import {
|
|
526
|
-
import {
|
|
529
|
+
import { getProcessConfigModificationsBackendFromFormData, getProcessConfigModificationsFormData, processConfigModificationsShape } from "./features/process-configs/common/process-config-modifications-edition.utils.js";
|
|
530
|
+
import { PROCESS_CONFIG_TYPES, getProcessConfigFormDefaultValues } from "./features/process-configs/common/process-config-form.constants.js";
|
|
531
|
+
import { getProcessConfigFormSchema } from "./features/process-configs/common/process-config-form.schema.js";
|
|
532
|
+
import { getProcessConfigBackendFromFormData, getProcessConfigFormData } from "./features/process-configs/common/process-config-mapping.js";
|
|
533
|
+
import { useProcessConfigForm } from "./features/process-configs/form/hooks/useProcessConfigForm.js";
|
|
534
|
+
import { ProcessConfigForm } from "./features/process-configs/form/process-config-form.js";
|
|
535
|
+
import { ProcessConfigEditionDialog } from "./features/process-configs/process-config-edition-dialog.js";
|
|
527
536
|
import { GlobalFilterPanel } from "./features/global-filter/ui/global-filter-panel.js";
|
|
528
537
|
import { GlobalFilterType, isCriteriaFilter, isCriteriaFilterType } from "./features/global-filter/types/global-filter.type.js";
|
|
529
538
|
import { LimitTypes } from "./features/global-filter/types/limit-violation.type.js";
|
|
@@ -869,12 +878,15 @@ export {
|
|
|
869
878
|
FilterType,
|
|
870
879
|
FlatParameters,
|
|
871
880
|
FloatInput,
|
|
881
|
+
FormSection,
|
|
882
|
+
FormSubSection,
|
|
872
883
|
GENERAL,
|
|
873
884
|
GENERAL_APPLY_MODIFICATIONS,
|
|
874
885
|
GENERATORS_SELECTION_TYPE,
|
|
875
886
|
GENERATOR_TAB_FIELDS,
|
|
876
887
|
GLOBAL_REPORT_NODE_LABEL,
|
|
877
888
|
GRIDSUITE_DEFAULT_PRECISION,
|
|
889
|
+
GeneralInformationSection,
|
|
878
890
|
Generator,
|
|
879
891
|
GeneratorCreationForm,
|
|
880
892
|
GeneratorDialogHeader,
|
|
@@ -923,7 +935,6 @@ export {
|
|
|
923
935
|
LAST_SELECTED_DIRECTORY,
|
|
924
936
|
LCC,
|
|
925
937
|
LEG_SIDE,
|
|
926
|
-
LFProcessConfigEditionDialog,
|
|
927
938
|
LIGHT_THEME,
|
|
928
939
|
LIMIT_DURATION_FORM,
|
|
929
940
|
LIMIT_REDUCTIONS_FORM,
|
|
@@ -1018,6 +1029,7 @@ export {
|
|
|
1018
1029
|
ModificationContainerType,
|
|
1019
1030
|
ModificationRow,
|
|
1020
1031
|
ModificationType,
|
|
1032
|
+
ModificationsSubSection,
|
|
1021
1033
|
ModifyElementSelection,
|
|
1022
1034
|
MoveVoltageLevelFeederBaysForm,
|
|
1023
1035
|
MuiSelectInput,
|
|
@@ -1101,6 +1113,9 @@ export {
|
|
|
1101
1113
|
PREFIX_STUDY_SERVER_QUERIES,
|
|
1102
1114
|
PREV_CONNECTION_STATUS,
|
|
1103
1115
|
PRIORITY,
|
|
1116
|
+
PROCESS_CONFIG_PARAMETER_FIELDS,
|
|
1117
|
+
PROCESS_CONFIG_TYPES,
|
|
1118
|
+
PROCESS_CONFIG_TYPE_DEFINITIONS,
|
|
1104
1119
|
PROPERTY_CSV_COLUMN_PREFIX,
|
|
1105
1120
|
PROVIDER,
|
|
1106
1121
|
PSTS_EQUIPMENT_TYPES,
|
|
@@ -1125,12 +1140,15 @@ export {
|
|
|
1125
1140
|
PowerWithValidityForm,
|
|
1126
1141
|
PredefinedParameters,
|
|
1127
1142
|
ProblemDetailError,
|
|
1143
|
+
ProcessConfigEditionDialog,
|
|
1144
|
+
ProcessConfigForm,
|
|
1128
1145
|
ProcessConfigModificationsEdition,
|
|
1129
1146
|
ProcessType,
|
|
1130
1147
|
PropertiesForm,
|
|
1131
1148
|
PropertyForm,
|
|
1132
1149
|
PropertyValueEditor,
|
|
1133
1150
|
ProviderParam,
|
|
1151
|
+
ProvidersParametersSubSection,
|
|
1134
1152
|
QuickSearch,
|
|
1135
1153
|
RATIO_REGULATION_MODES,
|
|
1136
1154
|
RATIO_REGULATION_MODE_OPTIONS,
|
|
@@ -1181,9 +1199,7 @@ export {
|
|
|
1181
1199
|
RootNetworkHeaderRenderer,
|
|
1182
1200
|
RuleValueEditor,
|
|
1183
1201
|
RunningStatus,
|
|
1184
|
-
SAProcessConfigEditionDialog,
|
|
1185
1202
|
SCENARIO_DURATION,
|
|
1186
|
-
SCProcessConfigEditionDialog,
|
|
1187
1203
|
SEARCH_EQUIPMENTS,
|
|
1188
1204
|
SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT,
|
|
1189
1205
|
SELECTED,
|
|
@@ -1265,6 +1281,7 @@ export {
|
|
|
1265
1281
|
SnackbarProvider,
|
|
1266
1282
|
SolverType,
|
|
1267
1283
|
SortWay,
|
|
1284
|
+
SpecificInformationSection,
|
|
1268
1285
|
StaticVarCompensatorCreationForm,
|
|
1269
1286
|
StaticVarCompensatorDialogHeader,
|
|
1270
1287
|
StaticVarCompensatorDialogTab,
|
|
@@ -1509,7 +1526,6 @@ export {
|
|
|
1509
1526
|
emptyModificationByAssignmentFormData,
|
|
1510
1527
|
emptyModificationFormData,
|
|
1511
1528
|
emptyMoveVoltageLevelFeederBaysFormData,
|
|
1512
|
-
emptyProcessConfigModificationsFormData,
|
|
1513
1529
|
emptyProperties,
|
|
1514
1530
|
emptyTabularProperties,
|
|
1515
1531
|
enrichPccMinParameters,
|
|
@@ -1708,7 +1724,6 @@ export {
|
|
|
1708
1724
|
getLoadTypeLabel,
|
|
1709
1725
|
getNameElementEditorEmptyFormData,
|
|
1710
1726
|
getNameElementEditorSchema,
|
|
1711
|
-
getNamedProcessConfigFormData,
|
|
1712
1727
|
getNetworkModificationsFromComposite,
|
|
1713
1728
|
getNetworkVisualizationsParameters,
|
|
1714
1729
|
getNewVoltageLevelData,
|
|
@@ -1727,8 +1742,14 @@ export {
|
|
|
1727
1742
|
getPowerWithValidityEmptyFormData,
|
|
1728
1743
|
getPowerWithValidityValidationSchema,
|
|
1729
1744
|
getPreLoginPath,
|
|
1745
|
+
getProcessConfigBackendFromFormData,
|
|
1746
|
+
getProcessConfigFormData,
|
|
1747
|
+
getProcessConfigFormDefaultValues,
|
|
1748
|
+
getProcessConfigFormSchema,
|
|
1730
1749
|
getProcessConfigModificationsBackendFromFormData,
|
|
1731
1750
|
getProcessConfigModificationsFormData,
|
|
1751
|
+
getProcessConfigTypeDefinition,
|
|
1752
|
+
getProcessTypesRequiringParameter,
|
|
1732
1753
|
getPropertiesFromModification,
|
|
1733
1754
|
getPropertyAvatar,
|
|
1734
1755
|
getPropertyValue,
|
|
@@ -1837,7 +1858,6 @@ export {
|
|
|
1837
1858
|
isIntegerNumber,
|
|
1838
1859
|
isNonEmptyStringOrArray,
|
|
1839
1860
|
isObjectEmpty,
|
|
1840
|
-
isProcessType,
|
|
1841
1861
|
isReferenceModification,
|
|
1842
1862
|
isStudyMetadata,
|
|
1843
1863
|
isValidComputingType,
|
|
@@ -2066,6 +2086,7 @@ export {
|
|
|
2066
2086
|
useParametersForm,
|
|
2067
2087
|
usePredefinedProperties,
|
|
2068
2088
|
usePrevious,
|
|
2089
|
+
useProcessConfigForm,
|
|
2069
2090
|
useReportFetcherContext,
|
|
2070
2091
|
useReportFilterContext,
|
|
2071
2092
|
useSelectAppearance,
|
|
@@ -90,6 +90,7 @@ export declare const businessErrorsEn: {
|
|
|
90
90
|
'modification.container.badType': string;
|
|
91
91
|
'modification.container.type.notFound': string;
|
|
92
92
|
'modification.badType': string;
|
|
93
|
+
'modification.containsShared': string;
|
|
93
94
|
'modification.notFound': string;
|
|
94
95
|
'modifications.notFound': string;
|
|
95
96
|
'modification.infos.error': string;
|
|
@@ -32,7 +32,7 @@ const businessErrorsEn = {
|
|
|
32
32
|
"study.tooManyNadConfigs": "Maximum number of NAD configuration exceeded.",
|
|
33
33
|
"study.tooManyMapCards": "Maximum number of cards exceeded.",
|
|
34
34
|
"study.elementAlreadyExists": "An element with the name {fileName} already exists",
|
|
35
|
-
"study.maxOperationTypeExceeded": "Max number of operation reached
|
|
35
|
+
"study.maxOperationTypeExceeded": "Max number of operation reached",
|
|
36
36
|
"useradmin.permissionDenied": "You don't have permission to perform this action.",
|
|
37
37
|
"useradmin.userNotFound": "User not found.",
|
|
38
38
|
"useradmin.userAlreadyExists": "User already exists.",
|
|
@@ -84,6 +84,7 @@ const businessErrorsEn = {
|
|
|
84
84
|
"modification.container.badType": "Modification container type of {containerId} is invalid : actual type {containerType} -> expected type {expectedContainerType}",
|
|
85
85
|
"modification.container.type.notFound": "Modification container type of {modificationId} not found",
|
|
86
86
|
"modification.badType": "Modification type of {modificationId} is invalid : actual type {modificationType} -> expected type {expectedModificationType}",
|
|
87
|
+
"modification.containsShared": "Modification {modificationId} contains a shared modification and cannot be shared",
|
|
87
88
|
"modification.notFound": "Modification {modificationId} not found",
|
|
88
89
|
"modifications.notFound": "Some of these modifications {ids} were not found",
|
|
89
90
|
"modification.infos.error": "Modification infos error : {errorMessage}",
|
|
@@ -165,6 +165,7 @@ export declare const parametersEn: {
|
|
|
165
165
|
VoltageInitParametersGeneralSaveInfo: string;
|
|
166
166
|
VoltageInitParametersGeneralUpdateBusVoltageLabel: string;
|
|
167
167
|
VoltageInitParametersEquipmentsSelectionAlert: string;
|
|
168
|
+
VoltageInitParametersBatteriesAlert: string;
|
|
168
169
|
VoltageLimits: string;
|
|
169
170
|
VoltageLevelFilter: string;
|
|
170
171
|
LowVoltageLimitDefault: string;
|
|
@@ -112,7 +112,7 @@ const parametersEn = {
|
|
|
112
112
|
ShortCircuitCharacteristics: "Features considered",
|
|
113
113
|
ShortCircuitVoltageProfileMode: "Initial voltage profile",
|
|
114
114
|
ShortCircuitStartedGeneratorsMode: "Generators started",
|
|
115
|
-
ShortCircuitInClusterFilter: "
|
|
115
|
+
ShortCircuitInClusterFilter: "Definition of calculation cluster filters",
|
|
116
116
|
ShortCircuitInCluster: "In cluster",
|
|
117
117
|
ShortCircuitOutCluster: "Out cluster",
|
|
118
118
|
startedGeneratorsInCalculationClusterThreshold: "Threshold",
|
|
@@ -159,6 +159,7 @@ const parametersEn = {
|
|
|
159
159
|
VoltageInitParametersGeneralSaveInfo: "This option won't be saved and will be set back to its default value when choosing settings from GridExplore",
|
|
160
160
|
VoltageInitParametersGeneralUpdateBusVoltageLabel: "Update bus voltage",
|
|
161
161
|
VoltageInitParametersEquipmentsSelectionAlert: "Static var compensators and VSC converter stations are always considered variable",
|
|
162
|
+
VoltageInitParametersBatteriesAlert: "Batteries are considered variable when their voltage control is activated",
|
|
162
163
|
VoltageLimits: "Voltage limits",
|
|
163
164
|
VoltageLevelFilter: "Voltage level filter",
|
|
164
165
|
LowVoltageLimitDefault: "Low voltage limit default value",
|
|
@@ -15,4 +15,22 @@ export declare const processConfigEn: {
|
|
|
15
15
|
'process_config/shortcircuit': string;
|
|
16
16
|
'processConfig/fetchProcessConfigError': string;
|
|
17
17
|
'processConfig/updateProcessConfigError': string;
|
|
18
|
+
processConfigEditTitle: string;
|
|
19
|
+
processType: string;
|
|
20
|
+
processConfigCreateTitle: string;
|
|
21
|
+
processConfigGeneralInformation: string;
|
|
22
|
+
processConfigName: string;
|
|
23
|
+
processConfigSaveDirectory: string;
|
|
24
|
+
processConfigSpecificInformation: string;
|
|
25
|
+
processConfigPrefill: string;
|
|
26
|
+
processConfigProcessTypeChangeTitle: string;
|
|
27
|
+
processConfigProcessTypeChangeWarning: string;
|
|
28
|
+
processConfigCreated: string;
|
|
29
|
+
processConfigCreateError: string;
|
|
30
|
+
NoFolder: string;
|
|
31
|
+
AddOptionalDescription: string;
|
|
32
|
+
edit: string;
|
|
33
|
+
Select: string;
|
|
34
|
+
importElements: string;
|
|
35
|
+
selectProcessConfig: string;
|
|
18
36
|
};
|
|
@@ -8,7 +8,25 @@ const processConfigEn = {
|
|
|
8
8
|
"process_config/securityAnalysis": "Security analysis",
|
|
9
9
|
"process_config/shortcircuit": "Short circuit",
|
|
10
10
|
"processConfig/fetchProcessConfigError": "An error occured when fetching the process configuration",
|
|
11
|
-
"processConfig/updateProcessConfigError": "An error occurred while updating the process configuration"
|
|
11
|
+
"processConfig/updateProcessConfigError": "An error occurred while updating the process configuration",
|
|
12
|
+
processConfigEditTitle: "Edit a process configuration",
|
|
13
|
+
processType: "Analysis type",
|
|
14
|
+
processConfigCreateTitle: "Create a configuration",
|
|
15
|
+
processConfigGeneralInformation: "General informations",
|
|
16
|
+
processConfigName: "Configuration name",
|
|
17
|
+
processConfigSaveDirectory: "Save directory",
|
|
18
|
+
processConfigSpecificInformation: "Specific informations",
|
|
19
|
+
processConfigPrefill: "Prefill",
|
|
20
|
+
processConfigProcessTypeChangeTitle: "Change process type",
|
|
21
|
+
processConfigProcessTypeChangeWarning: "Changing the process type will reset the form.",
|
|
22
|
+
processConfigCreated: 'Process configuration created in "{folder}".',
|
|
23
|
+
processConfigCreateError: "Configuration save failed.",
|
|
24
|
+
NoFolder: "No folder",
|
|
25
|
+
AddOptionalDescription: "Add a description (optional)",
|
|
26
|
+
edit: "Update the folder",
|
|
27
|
+
Select: "Select a folder",
|
|
28
|
+
importElements: "Import",
|
|
29
|
+
selectProcessConfig: "Select a process configuration"
|
|
12
30
|
};
|
|
13
31
|
export {
|
|
14
32
|
processConfigEn
|
|
@@ -90,6 +90,7 @@ export declare const businessErrorsFr: {
|
|
|
90
90
|
'modification.container.badType': string;
|
|
91
91
|
'modification.container.type.notFound': string;
|
|
92
92
|
'modification.badType': string;
|
|
93
|
+
'modification.containsShared': string;
|
|
93
94
|
'modification.notFound': string;
|
|
94
95
|
'modifications.notFound': string;
|
|
95
96
|
'modification.infos.error': string;
|
|
@@ -32,7 +32,7 @@ const businessErrorsFr = {
|
|
|
32
32
|
"study.tooManyNadConfigs": "Nombre maximal de configurations d'image nodale de zone atteint.",
|
|
33
33
|
"study.tooManyMapCards": "Nombre maximal de carte atteint.",
|
|
34
34
|
"study.elementAlreadyExists": "Un élément avec le nom {fileName} est déjà présent",
|
|
35
|
-
"study.maxOperationTypeExceeded": "Nombre maximal d'opération de ce type atteint
|
|
35
|
+
"study.maxOperationTypeExceeded": "Nombre maximal d'opération de ce type atteint",
|
|
36
36
|
"useradmin.permissionDenied": "Vous n'avez pas la permission d'effectuer cette action.",
|
|
37
37
|
"useradmin.userNotFound": "Utilisateur introuvable.",
|
|
38
38
|
"useradmin.userAlreadyExists": "L'utilisateur existe déjà.",
|
|
@@ -84,6 +84,7 @@ const businessErrorsFr = {
|
|
|
84
84
|
"modification.container.badType": "Le type du container {containerId} est invalide : type actuel {} -> type attendu {expectedContainerType}",
|
|
85
85
|
"modification.container.type.notFound": "Le type de container pour la modification {modificationId} est introuvable",
|
|
86
86
|
"modification.badType": "Le type de la modification {modificationId} est invalide : type actuel {modificationType} -> type attendu {expectedModificationType}",
|
|
87
|
+
"modification.containsShared": "La modification {modificationId} contient une modification partagée et ne peut pas être partagée",
|
|
87
88
|
"modification.notFound": "La modification {modificationId} est introuvable",
|
|
88
89
|
"modifications.notFound": "Certaines modifications parmi celles ci {ids} n'ont pas été trouvée",
|
|
89
90
|
"modification.infos.error": "Infos de modification erronées : {errorMessage}",
|
|
@@ -165,6 +165,7 @@ export declare const parametersFr: {
|
|
|
165
165
|
VoltageInitParametersGeneralSaveInfo: string;
|
|
166
166
|
VoltageInitParametersGeneralUpdateBusVoltageLabel: string;
|
|
167
167
|
VoltageInitParametersEquipmentsSelectionAlert: string;
|
|
168
|
+
VoltageInitParametersBatteriesAlert: string;
|
|
168
169
|
VoltageLimits: string;
|
|
169
170
|
VoltageLevelFilter: string;
|
|
170
171
|
LowVoltageLimitDefault: string;
|
|
@@ -107,12 +107,12 @@ const parametersFr = {
|
|
|
107
107
|
optionalServicesRetrievingError: "Une erreur est survenue lors de la récupération de l'état des services optionnels",
|
|
108
108
|
defaultSensiResultsThresholdRetrievingError: "Une erreur est survenue lors de la récupération du seuil par défaut des résultats de l'analyse de sensibilité",
|
|
109
109
|
fetchDefaultLimitReductionsError: "Une erreur est survenue lors de la récupération des abattements par défaut",
|
|
110
|
-
descWithFeederResult: "
|
|
110
|
+
descWithFeederResult: "Résultats avec détails par départ",
|
|
111
111
|
ShortCircuitPredefinedParameters: "Paramètres prédéfinis",
|
|
112
112
|
ShortCircuitCharacteristics: "Caractéristiques prises en compte",
|
|
113
113
|
ShortCircuitVoltageProfileMode: "Plan de tension initial",
|
|
114
114
|
ShortCircuitStartedGeneratorsMode: "Démarrage des groupes",
|
|
115
|
-
ShortCircuitInClusterFilter: "
|
|
115
|
+
ShortCircuitInClusterFilter: "Définition de la zone intérieure",
|
|
116
116
|
ShortCircuitInCluster: "Zone intérieure",
|
|
117
117
|
ShortCircuitOutCluster: "Zone extérieure",
|
|
118
118
|
startedGeneratorsInCalculationClusterThreshold: "Seuil",
|
|
@@ -159,6 +159,7 @@ const parametersFr = {
|
|
|
159
159
|
VoltageInitParametersGeneralSaveInfo: "Cette option ne sera pas enregistrée et sera mise à la valeur par défaut en cas d'insertion de paramètres depuis GridExplore",
|
|
160
160
|
VoltageInitParametersGeneralUpdateBusVoltageLabel: "Mettre à jour tension des nœuds électriques",
|
|
161
161
|
VoltageInitParametersEquipmentsSelectionAlert: "Les consignes des CSPR et des stations VSC sont toujours considérées comme variables",
|
|
162
|
+
VoltageInitParametersBatteriesAlert: "Les consignes des batteries sont variables si leur réglage de tension est activé",
|
|
162
163
|
VoltageLimits: "Limites de tension",
|
|
163
164
|
VoltageLevelFilter: "Filtre poste",
|
|
164
165
|
LowVoltageLimitDefault: "Valeur par défaut limite basse",
|
|
@@ -15,4 +15,22 @@ export declare const processConfigFr: {
|
|
|
15
15
|
'process_config/shortcircuit': string;
|
|
16
16
|
'processConfig/fetchProcessConfigError': string;
|
|
17
17
|
'processConfig/updateProcessConfigError': string;
|
|
18
|
+
processConfigEditTitle: string;
|
|
19
|
+
processType: string;
|
|
20
|
+
processConfigCreateTitle: string;
|
|
21
|
+
processConfigGeneralInformation: string;
|
|
22
|
+
processConfigName: string;
|
|
23
|
+
processConfigSaveDirectory: string;
|
|
24
|
+
processConfigSpecificInformation: string;
|
|
25
|
+
processConfigPrefill: string;
|
|
26
|
+
processConfigProcessTypeChangeTitle: string;
|
|
27
|
+
processConfigProcessTypeChangeWarning: string;
|
|
28
|
+
processConfigCreated: string;
|
|
29
|
+
processConfigCreateError: string;
|
|
30
|
+
NoFolder: string;
|
|
31
|
+
AddOptionalDescription: string;
|
|
32
|
+
edit: string;
|
|
33
|
+
Select: string;
|
|
34
|
+
importElements: string;
|
|
35
|
+
selectProcessConfig: string;
|
|
18
36
|
};
|
|
@@ -8,7 +8,25 @@ const processConfigFr = {
|
|
|
8
8
|
"process_config/securityAnalysis": "Analyse de sécurité",
|
|
9
9
|
"process_config/shortcircuit": "Calcul de court-circuit",
|
|
10
10
|
"processConfig/fetchProcessConfigError": "Une erreur est survenue lors de la récupération de la configuration de chaîne",
|
|
11
|
-
"processConfig/updateProcessConfigError": "Une erreur est survenue lors de la mise à jour de la configuration de chaîne"
|
|
11
|
+
"processConfig/updateProcessConfigError": "Une erreur est survenue lors de la mise à jour de la configuration de chaîne",
|
|
12
|
+
processConfigEditTitle: "Éditer une configuration de chaîne",
|
|
13
|
+
processType: "Type d'analyse",
|
|
14
|
+
processConfigCreateTitle: "Créer une configuration",
|
|
15
|
+
processConfigGeneralInformation: "Informations générales",
|
|
16
|
+
processConfigName: "Nom de la configuration",
|
|
17
|
+
processConfigSaveDirectory: "Dossier d'enregistrement",
|
|
18
|
+
processConfigSpecificInformation: "Informations spécifiques",
|
|
19
|
+
processConfigPrefill: "Préremplir",
|
|
20
|
+
processConfigProcessTypeChangeTitle: "Changer de type d'analyse",
|
|
21
|
+
processConfigProcessTypeChangeWarning: "Le type d'analyse sera modifié et la configuration actuelle sera perdue.",
|
|
22
|
+
processConfigCreated: `Création d'une configuration d'analyse dans "{folder}".`,
|
|
23
|
+
processConfigCreateError: "L'enregistrement de la configuration a échoué.",
|
|
24
|
+
NoFolder: "Aucun dossier",
|
|
25
|
+
AddOptionalDescription: "Ajouter une description (optionnel)",
|
|
26
|
+
edit: "Modifier le dossier",
|
|
27
|
+
Select: "Choisir un dossier",
|
|
28
|
+
importElements: "Importer",
|
|
29
|
+
selectProcessConfig: "Choisir une configuration d'analyse"
|
|
12
30
|
};
|
|
13
31
|
export {
|
|
14
32
|
processConfigFr
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ProcessType } from './common';
|
|
2
|
-
import { ProcessConfigEditionDialogProps } from './process-config-edition.utils';
|
|
3
|
-
export declare function LFProcessConfigEditionDialog({ processConfigUuid, processConfigName, description, directory, open, onClose, fetchProcessConfig, updateProcessConfig, }: Readonly<ProcessConfigEditionDialogProps<ProcessType.LOADFLOW>>): import("react").JSX.Element;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { yupResolver } from "@hookform/resolvers/yup";
|
|
3
|
-
import { useForm } from "react-hook-form";
|
|
4
|
-
import { useState, useCallback, useEffect } from "react";
|
|
5
|
-
import { FieldConstants } from "../../utils/constants/fieldConstants.js";
|
|
6
|
-
import "../../utils/conversionUtils.js";
|
|
7
|
-
import { snackWithFallback } from "../../utils/error.js";
|
|
8
|
-
import { ElementType } from "../../utils/types/elementType.js";
|
|
9
|
-
import "../../utils/types/equipmentType.js";
|
|
10
|
-
import "@mui/icons-material";
|
|
11
|
-
import "@mui/material";
|
|
12
|
-
import "react-intl";
|
|
13
|
-
import "../../components/ui/overflowableText/OverflowableText.js";
|
|
14
|
-
import "localized-countries";
|
|
15
|
-
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
16
|
-
import "../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
17
|
-
import "yup";
|
|
18
|
-
import "../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
19
|
-
import "../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
20
|
-
import "../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
21
|
-
import "../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
22
|
-
import "../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
23
|
-
import "@hello-pangea/dnd";
|
|
24
|
-
import "../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
25
|
-
import { NamedElementEditionDialog } from "../../components/ui/dialogs/name-element-editor/named-element-edition-dialog.js";
|
|
26
|
-
import "../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
27
|
-
import "../../chunks/module.pXeJjFiM.js";
|
|
28
|
-
import "react-resizable-panels";
|
|
29
|
-
import "react-papaparse";
|
|
30
|
-
import "react-dom";
|
|
31
|
-
import "../../chunks/index.BJsVzTMz.js";
|
|
32
|
-
import "clsx";
|
|
33
|
-
import "../../components/composite/filter/FilterCreationDialog.js";
|
|
34
|
-
import "../../components/composite/filter/HeaderFilterForm.js";
|
|
35
|
-
import "../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
36
|
-
import "../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
37
|
-
import "../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
38
|
-
import "../../components/composite/filter/expert/expertFilterConstants.js";
|
|
39
|
-
import "react-querybuilder";
|
|
40
|
-
import "uuid";
|
|
41
|
-
import "../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
42
|
-
import "../../components/composite/filter/utils/filterFormUtils.js";
|
|
43
|
-
import "@react-querybuilder/material";
|
|
44
|
-
import "../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
45
|
-
import "../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
46
|
-
import "../../components/composite/agGridTable/BottomTableButtons.js";
|
|
47
|
-
import "../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
48
|
-
import "ag-grid-community";
|
|
49
|
-
import "../../components/composite/customAGGrid/customAggrid.js";
|
|
50
|
-
import "../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
51
|
-
import "mathjs";
|
|
52
|
-
import "../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
53
|
-
import "react-window";
|
|
54
|
-
import "../../components/composite/report/report-treeview/treeview-item.js";
|
|
55
|
-
import "../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
56
|
-
import { LFProcessConfigEdition } from "./loadflow/lf-process-config-edition.js";
|
|
57
|
-
import { getNamedLFProcessConfigFormSchema, getEmptyLFProcessConfigFormData, getNamedLFProcessConfigFormData, getLFProcessConfigBackendFromFormData } from "./loadflow/lf-process-config-edition.utils.js";
|
|
58
|
-
function LFProcessConfigEditionDialog({
|
|
59
|
-
processConfigUuid,
|
|
60
|
-
processConfigName,
|
|
61
|
-
description,
|
|
62
|
-
directory,
|
|
63
|
-
open,
|
|
64
|
-
onClose,
|
|
65
|
-
fetchProcessConfig,
|
|
66
|
-
updateProcessConfig
|
|
67
|
-
}) {
|
|
68
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
69
|
-
const { snackError } = useSnackMessage();
|
|
70
|
-
const formSchema = getNamedLFProcessConfigFormSchema(processConfigName);
|
|
71
|
-
const formMethods = useForm({
|
|
72
|
-
defaultValues: getEmptyLFProcessConfigFormData(processConfigName, description),
|
|
73
|
-
resolver: yupResolver(formSchema)
|
|
74
|
-
});
|
|
75
|
-
const { reset } = formMethods;
|
|
76
|
-
const fetchFormData = useCallback(async () => {
|
|
77
|
-
const persitedProcessConfig = await fetchProcessConfig(processConfigUuid);
|
|
78
|
-
if (persitedProcessConfig) {
|
|
79
|
-
const formData = await getNamedLFProcessConfigFormData(
|
|
80
|
-
persitedProcessConfig.processConfig,
|
|
81
|
-
processConfigName,
|
|
82
|
-
description
|
|
83
|
-
);
|
|
84
|
-
reset({ ...formData });
|
|
85
|
-
}
|
|
86
|
-
}, [fetchProcessConfig, processConfigUuid, processConfigName, description, reset]);
|
|
87
|
-
useEffect(() => {
|
|
88
|
-
setIsLoading(true);
|
|
89
|
-
fetchFormData().finally(() => setIsLoading(false)).catch((error) => {
|
|
90
|
-
snackWithFallback(snackError, error, {
|
|
91
|
-
headerId: `processConfig/fetchProcessConfigError`
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
}, [fetchFormData, snackError]);
|
|
95
|
-
const handleUpdateProcessConfig = useCallback(
|
|
96
|
-
(formData) => {
|
|
97
|
-
updateProcessConfig(
|
|
98
|
-
processConfigUuid,
|
|
99
|
-
formData[FieldConstants.NAME] ?? "",
|
|
100
|
-
formData[FieldConstants.DESCRIPTION] ?? "",
|
|
101
|
-
getLFProcessConfigBackendFromFormData(formData)
|
|
102
|
-
).catch((error) => {
|
|
103
|
-
console.error(error);
|
|
104
|
-
snackWithFallback(snackError, error, { headerId: "processConfig/updateProcessConfigError" });
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
[updateProcessConfig, processConfigUuid, snackError]
|
|
108
|
-
);
|
|
109
|
-
return /* @__PURE__ */ jsx(
|
|
110
|
-
NamedElementEditionDialog,
|
|
111
|
-
{
|
|
112
|
-
titleId: "process_config/editLFProcessConfigTitle",
|
|
113
|
-
formMethods,
|
|
114
|
-
formSchema,
|
|
115
|
-
open,
|
|
116
|
-
onClose,
|
|
117
|
-
onSave: handleUpdateProcessConfig,
|
|
118
|
-
directory,
|
|
119
|
-
elementName: processConfigName,
|
|
120
|
-
elementType: ElementType.PROCESS_CONFIG,
|
|
121
|
-
isLoading,
|
|
122
|
-
children: /* @__PURE__ */ jsx(LFProcessConfigEdition, {})
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
export {
|
|
127
|
-
LFProcessConfigEditionDialog
|
|
128
|
-
};
|