@gridsuite/commons-ui 0.292.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/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.js +1 -1
- package/dist/translations/en/processConfigEn.d.ts +18 -0
- package/dist/translations/en/processConfigEn.js +19 -1
- package/dist/translations/fr/businessErrorsFr.js +1 -1
- 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/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,
|
|
@@ -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.",
|
|
@@ -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
|
|
@@ -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à.",
|
|
@@ -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
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
|
-
export * from './lf-process-config.type';
|
|
8
|
-
export * from './lf-process-config-edition';
|
|
9
|
-
export * from './lf-process-config-edition.utils';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LFProcessConfigEdition } from "./lf-process-config-edition.js";
|
|
2
|
-
import { getEmptyLFProcessConfigFormData, getLFProcessConfigBackendFromFormData, getNamedLFProcessConfigFormData, getNamedLFProcessConfigFormSchema } from "./lf-process-config-edition.utils.js";
|
|
3
|
-
export {
|
|
4
|
-
LFProcessConfigEdition,
|
|
5
|
-
getEmptyLFProcessConfigFormData,
|
|
6
|
-
getLFProcessConfigBackendFromFormData,
|
|
7
|
-
getNamedLFProcessConfigFormData,
|
|
8
|
-
getNamedLFProcessConfigFormSchema
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function LFProcessConfigEdition(): import("react").JSX.Element;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { LoadflowProcessConfigBackend } from './lf-process-config.type';
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
4
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
5
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
6
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
7
|
-
*/
|
|
8
|
-
import * as yup from 'yup';
|
|
9
|
-
export declare function getNamedLFProcessConfigFormSchema(initialName: string | null): yup.ObjectSchema<{
|
|
10
|
-
loadflowParameters: {
|
|
11
|
-
name?: string | undefined;
|
|
12
|
-
id: string;
|
|
13
|
-
}[];
|
|
14
|
-
modifications: {
|
|
15
|
-
description?: string | null | undefined;
|
|
16
|
-
active: NonNullable<boolean | undefined>;
|
|
17
|
-
modification: {
|
|
18
|
-
name?: string | undefined;
|
|
19
|
-
id: string;
|
|
20
|
-
}[];
|
|
21
|
-
}[];
|
|
22
|
-
} & {
|
|
23
|
-
name: string | null | undefined;
|
|
24
|
-
description: string | null | undefined;
|
|
25
|
-
}, yup.AnyObject, {
|
|
26
|
-
loadflowParameters: "";
|
|
27
|
-
modifications: "";
|
|
28
|
-
name: undefined;
|
|
29
|
-
description: undefined;
|
|
30
|
-
}, "">;
|
|
31
|
-
export type NamedLFProcessConfigFormSchema = yup.InferType<ReturnType<typeof getNamedLFProcessConfigFormSchema>>;
|
|
32
|
-
export declare function getEmptyLFProcessConfigFormData(initialName: string | null, initialDescription: string | null): {
|
|
33
|
-
loadflowParameters: never[];
|
|
34
|
-
modifications: never[];
|
|
35
|
-
name: string | null;
|
|
36
|
-
description: string | null;
|
|
37
|
-
};
|
|
38
|
-
export declare function getNamedLFProcessConfigFormData(processConfig: LoadflowProcessConfigBackend, name: string, description: string | null): Promise<NamedLFProcessConfigFormSchema>;
|
|
39
|
-
export declare function getLFProcessConfigBackendFromFormData(formData: NamedLFProcessConfigFormSchema): LoadflowProcessConfigBackend;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UUID } from 'node:crypto';
|
|
2
|
-
import { PersistedProcessConfigBackend, ProcessConfigBackend } from './process-config.type';
|
|
3
|
-
import { ProcessType } from './common';
|
|
4
|
-
export interface ProcessConfigEditionDialogProps<TProcessType extends ProcessType> {
|
|
5
|
-
processConfigUuid: UUID;
|
|
6
|
-
processConfigName: string;
|
|
7
|
-
description: string | null;
|
|
8
|
-
directory: UUID;
|
|
9
|
-
open: boolean;
|
|
10
|
-
onClose: () => void;
|
|
11
|
-
fetchProcessConfig: (processConfigUuid: UUID) => Promise<PersistedProcessConfigBackend<TProcessType>>;
|
|
12
|
-
updateProcessConfig: (processConfigUuid: UUID, name: string, description: string, processConfig: ProcessConfigBackend<TProcessType>) => Promise<Response>;
|
|
13
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UUID } from 'node:crypto';
|
|
2
|
-
import { SecurityAnalysisProcessConfigBackend } from './security-analysis';
|
|
3
|
-
import { LoadflowProcessConfigBackend } from './loadflow';
|
|
4
|
-
import { ProcessType } from './common';
|
|
5
|
-
import { ShortcircuitProcessConfigBackend } from './shortcircuit';
|
|
6
|
-
type ProcessConfigBackendByProcessType = {
|
|
7
|
-
[ProcessType.SECURITY_ANALYSIS]: SecurityAnalysisProcessConfigBackend;
|
|
8
|
-
[ProcessType.LOADFLOW]: LoadflowProcessConfigBackend;
|
|
9
|
-
[ProcessType.SHORT_CIRCUIT]: ShortcircuitProcessConfigBackend;
|
|
10
|
-
};
|
|
11
|
-
export type ProcessConfigBackend<TProcessType extends ProcessType> = ProcessConfigBackendByProcessType[TProcessType];
|
|
12
|
-
export type PersistedProcessConfigBackend<TProcessType extends ProcessType> = {
|
|
13
|
-
id: UUID;
|
|
14
|
-
processConfig: ProcessConfigBackend<TProcessType>;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ProcessType } from './common';
|
|
2
|
-
export declare function isProcessType(type: string): type is ProcessType;
|
|
3
|
-
export declare function getNamedProcessConfigFormData(processConfig: any, name: string, description: string | null): Promise<{
|
|
4
|
-
description?: string | null | undefined;
|
|
5
|
-
name?: string | null | undefined;
|
|
6
|
-
loadflowParameters: {
|
|
7
|
-
name?: string | undefined;
|
|
8
|
-
id: string;
|
|
9
|
-
}[];
|
|
10
|
-
modifications: {
|
|
11
|
-
description?: string | null | undefined;
|
|
12
|
-
active: NonNullable<boolean | undefined>;
|
|
13
|
-
modification: {
|
|
14
|
-
name?: string | undefined;
|
|
15
|
-
id: string;
|
|
16
|
-
}[];
|
|
17
|
-
}[];
|
|
18
|
-
} | {
|
|
19
|
-
description?: string | null | undefined;
|
|
20
|
-
name?: string | null | undefined;
|
|
21
|
-
shortcircuitParameters: {
|
|
22
|
-
name?: string | undefined;
|
|
23
|
-
id: string;
|
|
24
|
-
}[];
|
|
25
|
-
modifications: {
|
|
26
|
-
description?: string | null | undefined;
|
|
27
|
-
active: NonNullable<boolean | undefined>;
|
|
28
|
-
modification: {
|
|
29
|
-
name?: string | undefined;
|
|
30
|
-
id: string;
|
|
31
|
-
}[];
|
|
32
|
-
}[];
|
|
33
|
-
}>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ProcessType } from './common';
|
|
2
|
-
import { ProcessConfigEditionDialogProps } from './process-config-edition.utils';
|
|
3
|
-
export declare function SAProcessConfigEditionDialog({ processConfigUuid, processConfigName, description, directory, open, onClose, fetchProcessConfig, updateProcessConfig, }: Readonly<ProcessConfigEditionDialogProps<ProcessType.SECURITY_ANALYSIS>>): import("react").JSX.Element;
|