@gridsuite/commons-ui 0.185.0 → 0.186.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/index.d.ts +1 -0
- package/dist/components/index.js +12 -0
- package/dist/components/network-modifications/by-filter/commons/by-filter.type.d.ts +5 -0
- package/dist/components/network-modifications/by-filter/commons/by-filter.type.js +1 -0
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.d.ts +7 -0
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +83 -0
- package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.types.d.ts +7 -0
- package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.types.js +1 -0
- package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.utils.d.ts +18 -0
- package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.utils.js +52 -0
- package/dist/components/network-modifications/by-filter/deletion/index.d.ts +9 -0
- package/dist/components/network-modifications/by-filter/deletion/index.js +10 -0
- package/dist/components/network-modifications/by-filter/index.d.ts +7 -0
- package/dist/components/network-modifications/by-filter/index.js +10 -0
- package/dist/components/network-modifications/index.d.ts +1 -0
- package/dist/components/network-modifications/index.js +8 -0
- package/dist/components/node/build-status-chip.d.ts +12 -0
- package/dist/components/node/build-status-chip.js +75 -0
- package/dist/components/node/constant.d.ts +13 -0
- package/dist/components/node/constant.js +11 -0
- package/dist/components/node/index.d.ts +2 -0
- package/dist/components/node/index.js +6 -0
- package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +2 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +2 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +3 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +4 -2
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +3 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +3 -0
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.d.ts +3 -1
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +11 -7
- package/dist/components/parameters/short-circuit/columns-definition.js +2 -2
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +0 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +20 -11
- package/dist/index.js +12 -0
- package/dist/translations/en/businessErrorsEn.d.ts +2 -0
- package/dist/translations/en/businessErrorsEn.js +2 -0
- package/dist/translations/en/networkModificationsEn.d.ts +1 -0
- package/dist/translations/en/networkModificationsEn.js +1 -0
- package/dist/translations/en/parameters.d.ts +7 -0
- package/dist/translations/en/parameters.js +8 -1
- package/dist/translations/fr/businessErrorsFr.d.ts +2 -0
- package/dist/translations/fr/businessErrorsFr.js +2 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -0
- package/dist/translations/fr/networkModificationsFr.js +1 -0
- package/dist/translations/fr/parameters.d.ts +7 -0
- package/dist/translations/fr/parameters.js +8 -1
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -229,6 +229,10 @@ import { LoadDialogHeader } from "./network-modifications/load/common/LoadDialog
|
|
|
229
229
|
import { LoadForm } from "./network-modifications/load/common/LoadForm.js";
|
|
230
230
|
import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchema, loadCreationFormToDto } from "./network-modifications/load/creation/loadCreation.utils.js";
|
|
231
231
|
import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./network-modifications/load/modification/loadModification.utils.js";
|
|
232
|
+
import { ByFilterDeletionForm } from "./network-modifications/by-filter/deletion/ByFilterDeletionForm.js";
|
|
233
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./network-modifications/by-filter/deletion/byFilterDeletion.utils.js";
|
|
234
|
+
import { BuildStatusChip } from "./node/build-status-chip.js";
|
|
235
|
+
import { BuildStatus } from "./node/constant.js";
|
|
232
236
|
export {
|
|
233
237
|
ACCURACY,
|
|
234
238
|
ACTIVE,
|
|
@@ -249,7 +253,10 @@ export {
|
|
|
249
253
|
BottomRightButtons,
|
|
250
254
|
BranchActiveReactivePowerMeasurementsForm,
|
|
251
255
|
BranchConnectivityForm,
|
|
256
|
+
BuildStatus,
|
|
257
|
+
BuildStatusChip,
|
|
252
258
|
ButtonReadOnlyInput,
|
|
259
|
+
ByFilterDeletionForm,
|
|
253
260
|
CALCULATION_TYPE,
|
|
254
261
|
CENTER_LABEL,
|
|
255
262
|
COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
|
|
@@ -334,6 +341,7 @@ export {
|
|
|
334
341
|
DynamicSecurityAnalysisInline,
|
|
335
342
|
ENERGY_SOURCE_OPTIONS,
|
|
336
343
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
344
|
+
EQUIPMENT_TYPE_ORDER,
|
|
337
345
|
EXPERT_FILTER_EQUIPMENTS,
|
|
338
346
|
EXPERT_FILTER_FIELDS,
|
|
339
347
|
EXPERT_FILTER_QUERY,
|
|
@@ -606,6 +614,9 @@ export {
|
|
|
606
614
|
WRITE_SLACK_BUS,
|
|
607
615
|
alertThresholdMarks,
|
|
608
616
|
buildNewBusbarSections,
|
|
617
|
+
byFilterDeletionDtoToForm,
|
|
618
|
+
byFilterDeletionFormSchema,
|
|
619
|
+
byFilterDeletionFormToDto,
|
|
609
620
|
copyEquipmentPropertiesForCreation,
|
|
610
621
|
countRules,
|
|
611
622
|
createConnectivityData,
|
|
@@ -613,6 +624,7 @@ export {
|
|
|
613
624
|
creationPropertiesSchema,
|
|
614
625
|
dispatchUser,
|
|
615
626
|
doesNodeHasChildren,
|
|
627
|
+
emptyFormData,
|
|
616
628
|
emptyProperties,
|
|
617
629
|
equipmentDeletionDtoToForm,
|
|
618
630
|
equipmentDeletionEmptyFormData,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ByFilterDeletionForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
|
+
import { useWatch, useFormContext } from "react-hook-form";
|
|
5
|
+
import "react-intl";
|
|
6
|
+
import "../../../overflowableText/OverflowableText.js";
|
|
7
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
8
|
+
import "../../../../utils/conversionUtils.js";
|
|
9
|
+
import { ElementType } from "../../../../utils/types/elementType.js";
|
|
10
|
+
import "../../../../utils/types/equipmentType.js";
|
|
11
|
+
import "@mui/icons-material";
|
|
12
|
+
import { richTypeEquals } from "../../../../utils/ts-utils.js";
|
|
13
|
+
import "../../../../utils/yupConfig.js";
|
|
14
|
+
import "localized-countries";
|
|
15
|
+
import "localized-countries/data/fr";
|
|
16
|
+
import "localized-countries/data/en";
|
|
17
|
+
import "notistack";
|
|
18
|
+
import { useGetLabelEquipmentTypes } from "../../../../hooks/useGetLabelEquipmentTypes.js";
|
|
19
|
+
import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
20
|
+
import "yup";
|
|
21
|
+
import { DirectoryItemsInput } from "../../../inputs/reactHookForm/DirectoryItemsInput.js";
|
|
22
|
+
import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
23
|
+
import "../../../customAGGrid/customAggrid.js";
|
|
24
|
+
import "ag-grid-community";
|
|
25
|
+
import "react-papaparse";
|
|
26
|
+
import "react-csv-downloader";
|
|
27
|
+
import { AutocompleteInput } from "../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
|
|
28
|
+
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
31
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
|
+
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
|
+
import "@react-querybuilder/material";
|
|
35
|
+
import "../../../filter/expert/expertFilterConstants.js";
|
|
36
|
+
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
37
|
+
import "uuid";
|
|
38
|
+
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
39
|
+
import "react-querybuilder";
|
|
40
|
+
import { EQUIPMENT_TYPE_ORDER } from "./byFilterDeletion.utils.js";
|
|
41
|
+
function ByFilterDeletionForm() {
|
|
42
|
+
const equipmentType = useWatch({
|
|
43
|
+
name: FieldConstants.TYPE
|
|
44
|
+
});
|
|
45
|
+
const { setValue } = useFormContext();
|
|
46
|
+
const getOptionLabel = useGetLabelEquipmentTypes();
|
|
47
|
+
const handleEquipmentTypeChange = useCallback(() => {
|
|
48
|
+
setValue(FieldConstants.FILTERS, []);
|
|
49
|
+
}, [setValue]);
|
|
50
|
+
const typesOptions = useMemo(() => {
|
|
51
|
+
return Object.values(EQUIPMENT_TYPE_ORDER);
|
|
52
|
+
}, []);
|
|
53
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, padding: 0.5, alignItems: "center", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(
|
|
55
|
+
AutocompleteInput,
|
|
56
|
+
{
|
|
57
|
+
isOptionEqualToValue: richTypeEquals,
|
|
58
|
+
name: FieldConstants.TYPE,
|
|
59
|
+
label: "Type",
|
|
60
|
+
options: typesOptions,
|
|
61
|
+
onChangeCallback: handleEquipmentTypeChange,
|
|
62
|
+
getOptionLabel,
|
|
63
|
+
size: "small",
|
|
64
|
+
formProps: { variant: "filled" }
|
|
65
|
+
}
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(
|
|
68
|
+
DirectoryItemsInput,
|
|
69
|
+
{
|
|
70
|
+
name: FieldConstants.FILTERS,
|
|
71
|
+
elementType: ElementType.FILTER,
|
|
72
|
+
titleId: "FiltersListsSelection",
|
|
73
|
+
label: "filter",
|
|
74
|
+
equipmentTypes: equipmentType ? [equipmentType] : [],
|
|
75
|
+
disable: !equipmentType
|
|
76
|
+
},
|
|
77
|
+
equipmentType
|
|
78
|
+
) })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
ByFilterDeletionForm
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
2
|
+
import { EquipmentType, yupConfig as yup, DeepNullable } from '../../../../utils';
|
|
3
|
+
import { ByFilterDeletionDto } from './byFilterDeletion.types';
|
|
4
|
+
export declare const EQUIPMENT_TYPE_ORDER: EquipmentType[];
|
|
5
|
+
export declare const byFilterDeletionFormSchema: yup.ObjectSchema<{
|
|
6
|
+
type: NonNullable<EquipmentType | undefined>;
|
|
7
|
+
filters: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
}, yup.AnyObject, {
|
|
12
|
+
type: undefined;
|
|
13
|
+
filters: "";
|
|
14
|
+
}, "">;
|
|
15
|
+
export type ByFilterDeletionFormData = InferType<typeof byFilterDeletionFormSchema>;
|
|
16
|
+
export declare const byFilterDeletionDtoToForm: (dto: ByFilterDeletionDto) => ByFilterDeletionFormData;
|
|
17
|
+
export declare const byFilterDeletionFormToDto: (formData: ByFilterDeletionFormData) => ByFilterDeletionDto;
|
|
18
|
+
export declare const emptyFormData: DeepNullable<ByFilterDeletionFormData>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
2
|
+
import { YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
3
|
+
import "../../../../utils/conversionUtils.js";
|
|
4
|
+
import { EquipmentType } from "../../../../utils/types/equipmentType.js";
|
|
5
|
+
import { ModificationType } from "../../../../utils/types/modificationType.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
import "../../../../utils/yupConfig.js";
|
|
9
|
+
import * as yup from "yup";
|
|
10
|
+
const EQUIPMENT_TYPE_ORDER = [
|
|
11
|
+
EquipmentType.SUBSTATION,
|
|
12
|
+
EquipmentType.VOLTAGE_LEVEL,
|
|
13
|
+
EquipmentType.LINE,
|
|
14
|
+
EquipmentType.TWO_WINDINGS_TRANSFORMER,
|
|
15
|
+
EquipmentType.THREE_WINDINGS_TRANSFORMER,
|
|
16
|
+
EquipmentType.HVDC_LINE,
|
|
17
|
+
EquipmentType.GENERATOR,
|
|
18
|
+
EquipmentType.BATTERY,
|
|
19
|
+
EquipmentType.LOAD,
|
|
20
|
+
EquipmentType.SHUNT_COMPENSATOR,
|
|
21
|
+
EquipmentType.DANGLING_LINE,
|
|
22
|
+
EquipmentType.STATIC_VAR_COMPENSATOR
|
|
23
|
+
];
|
|
24
|
+
const byFilterDeletionFormSchema = yup.object().shape({
|
|
25
|
+
[FieldConstants.TYPE]: yup.mixed().oneOf(EQUIPMENT_TYPE_ORDER).required(YUP_REQUIRED),
|
|
26
|
+
[FieldConstants.FILTERS]: yup.array().of(
|
|
27
|
+
yup.object().shape({
|
|
28
|
+
[FieldConstants.ID]: yup.string().required(),
|
|
29
|
+
[FieldConstants.NAME]: yup.string().required()
|
|
30
|
+
})
|
|
31
|
+
).required().min(1, YUP_REQUIRED)
|
|
32
|
+
}).required();
|
|
33
|
+
const byFilterDeletionDtoToForm = (dto) => ({
|
|
34
|
+
[FieldConstants.TYPE]: dto.equipmentType,
|
|
35
|
+
[FieldConstants.FILTERS]: dto.filters
|
|
36
|
+
});
|
|
37
|
+
const byFilterDeletionFormToDto = (formData) => ({
|
|
38
|
+
type: ModificationType.BY_FILTER_DELETION,
|
|
39
|
+
equipmentType: formData[FieldConstants.TYPE],
|
|
40
|
+
filters: formData[FieldConstants.FILTERS]
|
|
41
|
+
});
|
|
42
|
+
const emptyFormData = {
|
|
43
|
+
[FieldConstants.TYPE]: null,
|
|
44
|
+
[FieldConstants.FILTERS]: []
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
EQUIPMENT_TYPE_ORDER,
|
|
48
|
+
byFilterDeletionDtoToForm,
|
|
49
|
+
byFilterDeletionFormSchema,
|
|
50
|
+
byFilterDeletionFormToDto,
|
|
51
|
+
emptyFormData
|
|
52
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export * from './ByFilterDeletionForm';
|
|
8
|
+
export * from './byFilterDeletion.types';
|
|
9
|
+
export * from './byFilterDeletion.utils';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ByFilterDeletionForm } from "./ByFilterDeletionForm.js";
|
|
2
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./byFilterDeletion.utils.js";
|
|
3
|
+
export {
|
|
4
|
+
ByFilterDeletionForm,
|
|
5
|
+
EQUIPMENT_TYPE_ORDER,
|
|
6
|
+
byFilterDeletionDtoToForm,
|
|
7
|
+
byFilterDeletionFormSchema,
|
|
8
|
+
byFilterDeletionFormToDto,
|
|
9
|
+
emptyFormData
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
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 './deletion';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ByFilterDeletionForm } from "./deletion/ByFilterDeletionForm.js";
|
|
2
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./deletion/byFilterDeletion.utils.js";
|
|
3
|
+
export {
|
|
4
|
+
ByFilterDeletionForm,
|
|
5
|
+
EQUIPMENT_TYPE_ORDER,
|
|
6
|
+
byFilterDeletionDtoToForm,
|
|
7
|
+
byFilterDeletionFormSchema,
|
|
8
|
+
byFilterDeletionFormToDto,
|
|
9
|
+
emptyFormData
|
|
10
|
+
};
|
|
@@ -39,13 +39,17 @@ import { LoadDialogHeader } from "./load/common/LoadDialogHeader.js";
|
|
|
39
39
|
import { LoadForm } from "./load/common/LoadForm.js";
|
|
40
40
|
import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchema, loadCreationFormToDto } from "./load/creation/loadCreation.utils.js";
|
|
41
41
|
import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./load/modification/loadModification.utils.js";
|
|
42
|
+
import { ByFilterDeletionForm } from "./by-filter/deletion/ByFilterDeletionForm.js";
|
|
43
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./by-filter/deletion/byFilterDeletion.utils.js";
|
|
42
44
|
export {
|
|
43
45
|
BranchActiveReactivePowerMeasurementsForm,
|
|
44
46
|
BranchConnectivityForm,
|
|
47
|
+
ByFilterDeletionForm,
|
|
45
48
|
ConnectivityForm,
|
|
46
49
|
CouplingOmnibusCreation,
|
|
47
50
|
CouplingOmnibusForm,
|
|
48
51
|
CreateSwitchesDialog,
|
|
52
|
+
EQUIPMENT_TYPE_ORDER,
|
|
49
53
|
EquipmentDeletionForm,
|
|
50
54
|
HvdcLccDeletionSpecificForm,
|
|
51
55
|
LoadDialogHeader,
|
|
@@ -67,10 +71,14 @@ export {
|
|
|
67
71
|
VoltageLevelCreationForm,
|
|
68
72
|
VoltageLevelModificationForm,
|
|
69
73
|
buildNewBusbarSections,
|
|
74
|
+
byFilterDeletionDtoToForm,
|
|
75
|
+
byFilterDeletionFormSchema,
|
|
76
|
+
byFilterDeletionFormToDto,
|
|
70
77
|
copyEquipmentPropertiesForCreation,
|
|
71
78
|
createConnectivityData,
|
|
72
79
|
createPropertyModification,
|
|
73
80
|
creationPropertiesSchema,
|
|
81
|
+
emptyFormData,
|
|
74
82
|
emptyProperties,
|
|
75
83
|
equipmentDeletionDtoToForm,
|
|
76
84
|
equipmentDeletionEmptyFormData,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React, ReactElement } from 'react';
|
|
2
|
+
import { SxStyle } from '../../utils';
|
|
3
|
+
import { BuildStatus } from './constant';
|
|
4
|
+
type BuildStatusChipProps = {
|
|
5
|
+
buildStatus?: BuildStatus;
|
|
6
|
+
sx?: SxStyle;
|
|
7
|
+
icon?: ReactElement;
|
|
8
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
9
|
+
overrideLabel?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function BuildStatusChip({ buildStatus, sx, icon, onClick, overrideLabel, }: Readonly<BuildStatusChipProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default BuildStatusChip;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Chip } from "@mui/material";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import "../../utils/conversionUtils.js";
|
|
5
|
+
import "../../utils/types/equipmentType.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
import { mergeSx } from "../../utils/styles.js";
|
|
8
|
+
import "../../utils/yupConfig.js";
|
|
9
|
+
import { BuildStatus } from "./constant.js";
|
|
10
|
+
function getBuildStatusSx(buildStatus) {
|
|
11
|
+
return (theme) => {
|
|
12
|
+
const bs = theme.node.buildStatus;
|
|
13
|
+
let bg;
|
|
14
|
+
switch (buildStatus) {
|
|
15
|
+
case BuildStatus.BUILT:
|
|
16
|
+
bg = bs.success;
|
|
17
|
+
break;
|
|
18
|
+
case BuildStatus.BUILT_WITH_WARNING:
|
|
19
|
+
bg = bs.warning;
|
|
20
|
+
break;
|
|
21
|
+
case BuildStatus.BUILT_WITH_ERROR:
|
|
22
|
+
bg = bs.error;
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
bg = bs.notBuilt;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
background: bg,
|
|
30
|
+
// only set explicit contrast color when it's the "notBuilt" background
|
|
31
|
+
...bg === bs.notBuilt ? { color: theme.palette.getContrastText(bg) } : {},
|
|
32
|
+
"&:hover": {
|
|
33
|
+
backgroundColor: bg
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const baseStyle = (theme) => ({
|
|
39
|
+
padding: theme.spacing(1, 0.5),
|
|
40
|
+
fontSize: "12px",
|
|
41
|
+
fontWeight: 400,
|
|
42
|
+
lineHeight: "100%"
|
|
43
|
+
});
|
|
44
|
+
function BuildStatusChip({
|
|
45
|
+
buildStatus = BuildStatus.NOT_BUILT,
|
|
46
|
+
sx,
|
|
47
|
+
icon,
|
|
48
|
+
onClick,
|
|
49
|
+
overrideLabel = false
|
|
50
|
+
}) {
|
|
51
|
+
const intl = useIntl();
|
|
52
|
+
let labelId = buildStatus?.toString();
|
|
53
|
+
if (overrideLabel) {
|
|
54
|
+
if (labelId === BuildStatus.BUILT) {
|
|
55
|
+
labelId = "NODE_BUILT";
|
|
56
|
+
} else if (labelId === BuildStatus.NOT_BUILT) {
|
|
57
|
+
labelId = "NODE_NOT_BUILT";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const label = intl.formatMessage({ id: labelId });
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
Chip,
|
|
63
|
+
{
|
|
64
|
+
label,
|
|
65
|
+
size: "small",
|
|
66
|
+
icon,
|
|
67
|
+
onClick,
|
|
68
|
+
sx: mergeSx(getBuildStatusSx(buildStatus), sx, baseStyle)
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
BuildStatusChip,
|
|
74
|
+
BuildStatusChip as default
|
|
75
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum BuildStatus {
|
|
8
|
+
NOT_BUILT = "NOT_BUILT",
|
|
9
|
+
BUILDING = "BUILDING",
|
|
10
|
+
BUILT = "BUILT",
|
|
11
|
+
BUILT_WITH_WARNING = "BUILT_WITH_WARNING",
|
|
12
|
+
BUILT_WITH_ERROR = "BUILT_WITH_ERROR"
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var BuildStatus = /* @__PURE__ */ ((BuildStatus2) => {
|
|
2
|
+
BuildStatus2["NOT_BUILT"] = "NOT_BUILT";
|
|
3
|
+
BuildStatus2["BUILDING"] = "BUILDING";
|
|
4
|
+
BuildStatus2["BUILT"] = "BUILT";
|
|
5
|
+
BuildStatus2["BUILT_WITH_WARNING"] = "BUILT_WITH_WARNING";
|
|
6
|
+
BuildStatus2["BUILT_WITH_ERROR"] = "BUILT_WITH_ERROR";
|
|
7
|
+
return BuildStatus2;
|
|
8
|
+
})(BuildStatus || {});
|
|
9
|
+
export {
|
|
10
|
+
BuildStatus
|
|
11
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
2
|
import { User } from 'oidc-client';
|
|
3
3
|
import { GsLang } from '../../../utils';
|
|
4
|
+
import { BuildStatus } from '../../node/constant';
|
|
4
5
|
export interface ParametersEditionDialogProps {
|
|
5
6
|
id: UUID;
|
|
6
7
|
open: boolean;
|
|
@@ -11,5 +12,6 @@ export interface ParametersEditionDialogProps {
|
|
|
11
12
|
activeDirectory: UUID;
|
|
12
13
|
language?: GsLang;
|
|
13
14
|
user: User | null;
|
|
15
|
+
globalBuildStatus?: BuildStatus;
|
|
14
16
|
isDeveloperMode?: boolean;
|
|
15
17
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ParametersEditionDialogProps } from '../common';
|
|
2
|
-
export declare function SensitivityAnalysisParametersDialog({ id, open, onClose, titleId, name, description, activeDirectory, language, user, isDeveloperMode, }: Readonly<ParametersEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function SensitivityAnalysisParametersDialog({ id, open, onClose, titleId, name, description, activeDirectory, language, user, globalBuildStatus, isDeveloperMode, }: Readonly<ParametersEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -54,6 +54,7 @@ function SensitivityAnalysisParametersDialog({
|
|
|
54
54
|
activeDirectory,
|
|
55
55
|
language,
|
|
56
56
|
user,
|
|
57
|
+
globalBuildStatus,
|
|
57
58
|
isDeveloperMode = false
|
|
58
59
|
}) {
|
|
59
60
|
const parametersBackend = useParametersBackend(
|
|
@@ -99,6 +100,7 @@ function SensitivityAnalysisParametersDialog({
|
|
|
99
100
|
{
|
|
100
101
|
sensitivityAnalysisMethods,
|
|
101
102
|
isDeveloperMode,
|
|
103
|
+
globalBuildStatus,
|
|
102
104
|
renderTitleFields: () => {
|
|
103
105
|
return /* @__PURE__ */ jsx(
|
|
104
106
|
NameElementEditorForm,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { UseSensitivityAnalysisParametersReturn } from './use-sensitivity-analysis-parameters';
|
|
3
|
-
|
|
3
|
+
import { BuildStatus } from '../../node/constant';
|
|
4
|
+
export declare function SensitivityAnalysisParametersForm({ sensitivityAnalysisMethods, renderTitleFields, renderActions, isDeveloperMode, globalBuildStatus, }: Readonly<{
|
|
4
5
|
sensitivityAnalysisMethods: UseSensitivityAnalysisParametersReturn;
|
|
5
6
|
renderTitleFields?: () => ReactNode;
|
|
6
7
|
renderActions?: () => ReactNode;
|
|
7
8
|
isDeveloperMode: boolean;
|
|
9
|
+
globalBuildStatus?: BuildStatus;
|
|
8
10
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -61,7 +61,8 @@ function SensitivityAnalysisParametersForm({
|
|
|
61
61
|
sensitivityAnalysisMethods,
|
|
62
62
|
renderTitleFields,
|
|
63
63
|
renderActions,
|
|
64
|
-
isDeveloperMode
|
|
64
|
+
isDeveloperMode,
|
|
65
|
+
globalBuildStatus
|
|
65
66
|
}) {
|
|
66
67
|
return /* @__PURE__ */ jsx(
|
|
67
68
|
CustomFormProvider,
|
|
@@ -116,7 +117,8 @@ function SensitivityAnalysisParametersForm({
|
|
|
116
117
|
isLoading: sensitivityAnalysisMethods.isLoading,
|
|
117
118
|
factorsCount: sensitivityAnalysisMethods.factorsCount,
|
|
118
119
|
isDeveloperMode,
|
|
119
|
-
isStudyLinked: sensitivityAnalysisMethods.isStudyLinked
|
|
120
|
+
isStudyLinked: sensitivityAnalysisMethods.isStudyLinked,
|
|
121
|
+
globalBuildStatus
|
|
120
122
|
}
|
|
121
123
|
)
|
|
122
124
|
] }, "sensitivityAnalysisParameters")
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
2
|
import { UseParametersBackendReturnProps } from '../../../utils';
|
|
3
3
|
import { ComputingType } from '../common';
|
|
4
|
+
import { BuildStatus } from '../../node/constant';
|
|
4
5
|
interface SensitivityAnalysisParametersProps {
|
|
5
6
|
studyUuid: UUID | null;
|
|
6
7
|
currentNodeUuid: UUID | null;
|
|
7
8
|
currentRootNetworkUuid: UUID | null;
|
|
8
9
|
parametersBackend: UseParametersBackendReturnProps<ComputingType.SENSITIVITY_ANALYSIS>;
|
|
9
10
|
setHaveDirtyFields: (isDirty: boolean) => void;
|
|
11
|
+
globalBuildStatus?: BuildStatus;
|
|
10
12
|
isDeveloperMode: boolean;
|
|
11
13
|
}
|
|
12
|
-
export declare function SensitivityAnalysisParametersInline({ studyUuid, currentNodeUuid, currentRootNetworkUuid, parametersBackend, setHaveDirtyFields, isDeveloperMode, }: Readonly<SensitivityAnalysisParametersProps>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function SensitivityAnalysisParametersInline({ studyUuid, currentNodeUuid, currentRootNetworkUuid, parametersBackend, setHaveDirtyFields, globalBuildStatus, isDeveloperMode, }: Readonly<SensitivityAnalysisParametersProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -52,10 +52,12 @@ function SensitivityAnalysisParametersInline({
|
|
|
52
52
|
currentRootNetworkUuid,
|
|
53
53
|
parametersBackend,
|
|
54
54
|
setHaveDirtyFields,
|
|
55
|
+
globalBuildStatus,
|
|
55
56
|
isDeveloperMode
|
|
56
57
|
}) {
|
|
57
58
|
const intl = useIntl();
|
|
58
59
|
const { snackError } = useSnackMessage();
|
|
60
|
+
console.info(`globalBuildStatus : ${globalBuildStatus}`);
|
|
59
61
|
const sensitivityAnalysisMethods = useSensitivityAnalysisParametersForm({
|
|
60
62
|
studyUuid,
|
|
61
63
|
currentNodeUuid,
|
|
@@ -112,6 +114,7 @@ function SensitivityAnalysisParametersInline({
|
|
|
112
114
|
{
|
|
113
115
|
sensitivityAnalysisMethods,
|
|
114
116
|
isDeveloperMode,
|
|
117
|
+
globalBuildStatus,
|
|
115
118
|
renderActions: () => {
|
|
116
119
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
117
120
|
/* @__PURE__ */ jsx(Grid, { item: true, container: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { FactorsCount } from '../../../utils';
|
|
2
|
+
import { BuildStatus } from '../../node';
|
|
2
3
|
interface SensitivityParametersSelectorProps {
|
|
3
4
|
onFormChanged: () => void;
|
|
4
5
|
isLoading: boolean;
|
|
5
6
|
factorsCount: FactorsCount;
|
|
6
7
|
isDeveloperMode: boolean;
|
|
7
8
|
isStudyLinked: boolean;
|
|
9
|
+
globalBuildStatus?: BuildStatus;
|
|
8
10
|
}
|
|
9
|
-
declare function SensitivityParametersSelector({ onFormChanged, isLoading, factorsCount, isDeveloperMode, isStudyLinked, }: Readonly<SensitivityParametersSelectorProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SensitivityParametersSelector({ onFormChanged, isLoading, factorsCount, isDeveloperMode, isStudyLinked, globalBuildStatus, }: Readonly<SensitivityParametersSelectorProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default SensitivityParametersSelector;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useEffect } from "react";
|
|
3
3
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
4
|
-
import { Grid, Box, Tabs, Tab } from "@mui/material";
|
|
4
|
+
import { Grid, Box, Tabs, Tab, Card, CardContent } from "@mui/material";
|
|
5
5
|
import { SensiTabValues, SensiBranchesTabValues, SensiInjectionsSet, SensiInjection, SensiHvdcs, SensiPsts, SensiNodes, COLUMNS_DEFINITIONS_INJECTIONS_SET, COLUMNS_DEFINITIONS_INJECTIONS, COLUMNS_DEFINITIONS_HVDCS, COLUMNS_DEFINITIONS_PSTS, COLUMNS_DEFINITIONS_NODES } from "./columns-definitions.js";
|
|
6
6
|
import { TabPanel } from "../common/parameters.js";
|
|
7
7
|
import "../../../utils/conversionUtils.js";
|
|
@@ -43,14 +43,16 @@ import "../common/contingency-table/columns-definitions.js";
|
|
|
43
43
|
import { SensitivityAnalysisParametersFactorCount } from "./sensitivity-analysis-parameters-factor-count.js";
|
|
44
44
|
import { MAX_VARIABLES_COUNT, MAX_RESULTS_COUNT } from "./constants.js";
|
|
45
45
|
import { isValidSensiParameterRow } from "./utils.js";
|
|
46
|
+
import { BuildStatusChip } from "../../node/build-status-chip.js";
|
|
46
47
|
const styles = {
|
|
47
48
|
boxContent: {
|
|
48
49
|
display: "flex",
|
|
49
50
|
alignItems: "end",
|
|
50
51
|
justifyContent: "right",
|
|
52
|
+
gap: 0.5,
|
|
51
53
|
flex: "auto",
|
|
52
54
|
flexGrow: "1",
|
|
53
|
-
|
|
55
|
+
paddingTop: 1
|
|
54
56
|
}
|
|
55
57
|
};
|
|
56
58
|
function SensitivityParametersSelector({
|
|
@@ -58,7 +60,8 @@ function SensitivityParametersSelector({
|
|
|
58
60
|
isLoading,
|
|
59
61
|
factorsCount,
|
|
60
62
|
isDeveloperMode,
|
|
61
|
-
isStudyLinked
|
|
63
|
+
isStudyLinked,
|
|
64
|
+
globalBuildStatus
|
|
62
65
|
}) {
|
|
63
66
|
const intl = useIntl();
|
|
64
67
|
const [tabValue, setTabValue] = useState(SensiTabValues.SensitivityBranches);
|
|
@@ -118,8 +121,9 @@ function SensitivityParametersSelector({
|
|
|
118
121
|
},
|
|
119
122
|
tab.label
|
|
120
123
|
)) }),
|
|
121
|
-
isStudyLinked && /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap:
|
|
122
|
-
/* @__PURE__ */
|
|
124
|
+
isStudyLinked && /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 3 }, children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Box, { sx: { ...styles.boxContent }, children: /* @__PURE__ */ jsx(BuildStatusChip, { buildStatus: globalBuildStatus, overrideLabel: true }) }),
|
|
126
|
+
/* @__PURE__ */ jsxs(Box, { sx: { ...styles.boxContent }, children: [
|
|
123
127
|
/* @__PURE__ */ jsx(
|
|
124
128
|
SensitivityAnalysisParametersFactorCount,
|
|
125
129
|
{
|
|
@@ -140,7 +144,7 @@ function SensitivityParametersSelector({
|
|
|
140
144
|
}
|
|
141
145
|
)
|
|
142
146
|
] }),
|
|
143
|
-
/* @__PURE__ */ jsxs(Box, { sx: { ...styles.boxContent
|
|
147
|
+
/* @__PURE__ */ jsxs(Box, { sx: { ...styles.boxContent }, children: [
|
|
144
148
|
/* @__PURE__ */ jsx(
|
|
145
149
|
SensitivityAnalysisParametersFactorCount,
|
|
146
150
|
{
|
|
@@ -161,7 +165,7 @@ function SensitivityParametersSelector({
|
|
|
161
165
|
}
|
|
162
166
|
)
|
|
163
167
|
] })
|
|
164
|
-
] })
|
|
168
|
+
] }) }) })
|
|
165
169
|
] }),
|
|
166
170
|
tabInfo.map((tab, index) => /* @__PURE__ */ jsxs(TabPanel, { value: tabValue, index, sx: { paddingTop: 1 }, children: [
|
|
167
171
|
tabValue === SensiTabValues.SensitivityBranches && tab.subTabs && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -62,14 +62,14 @@ const COLUMNS_DEFINITIONS_ICC_CLUSTERS = [
|
|
|
62
62
|
equipmentTypes: [EquipmentType.GENERATOR, EquipmentType.BATTERY],
|
|
63
63
|
elementType: ElementType.FILTER,
|
|
64
64
|
titleId: "FiltersListsSelection",
|
|
65
|
-
initialValue:
|
|
65
|
+
initialValue: null
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
label: "ShortCircuitIccClusterType",
|
|
69
69
|
dataKey: SHORT_CIRCUIT_ICC_CLUSTER_TYPE,
|
|
70
70
|
tooltip: "ShortCircuitIccClusterTypeTooltip",
|
|
71
71
|
titleId: "ShortCircuitIccClusterTypeListsSelection",
|
|
72
|
-
initialValue:
|
|
72
|
+
initialValue: null,
|
|
73
73
|
width: "20%"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
@@ -60,6 +60,11 @@ const getCommonShortCircuitParametersFormSchema = () => {
|
|
|
60
60
|
})
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
+
const requiredWhenActive = (schema) => schema.when("active", {
|
|
64
|
+
is: true,
|
|
65
|
+
then: (s) => s.required(),
|
|
66
|
+
otherwise: (s) => s.notRequired().nullable()
|
|
67
|
+
});
|
|
63
68
|
const getSpecificShortCircuitParametersFormSchema = (specificParametersDescriptionForProvider) => {
|
|
64
69
|
const defaultSchema = getSpecificParametersFormSchema(specificParametersDescriptionForProvider);
|
|
65
70
|
const powerElectronicsMaterialsParam = specificParametersDescriptionForProvider?.find(
|
|
@@ -68,11 +73,11 @@ const getSpecificShortCircuitParametersFormSchema = (specificParametersDescripti
|
|
|
68
73
|
const powerElectronicsMaterialsSchema = powerElectronicsMaterialsParam ? yup.array().of(
|
|
69
74
|
yup.object().shape({
|
|
70
75
|
active: yup.boolean().required(),
|
|
71
|
-
alpha: yup.number()
|
|
72
|
-
u0: yup.number()
|
|
73
|
-
usMin: yup.number()
|
|
74
|
-
usMax: yup.number()
|
|
75
|
-
type: yup.string().oneOf(["WIND", "SOLAR", "HVDC"])
|
|
76
|
+
alpha: requiredWhenActive(yup.number()),
|
|
77
|
+
u0: requiredWhenActive(yup.number()),
|
|
78
|
+
usMin: requiredWhenActive(yup.number()),
|
|
79
|
+
usMax: requiredWhenActive(yup.number()),
|
|
80
|
+
type: requiredWhenActive(yup.string().oneOf(["WIND", "SOLAR", "HVDC"]))
|
|
76
81
|
})
|
|
77
82
|
).required() : void 0;
|
|
78
83
|
const nodeClusterParam = specificParametersDescriptionForProvider?.find(
|
|
@@ -90,17 +95,21 @@ const getSpecificShortCircuitParametersFormSchema = (specificParametersDescripti
|
|
|
90
95
|
const powerElectronicsClustersSchema = powerElectronicsClustersParam ? yup.array().of(
|
|
91
96
|
yup.object().shape({
|
|
92
97
|
active: yup.boolean().required(),
|
|
93
|
-
alpha: yup.number()
|
|
94
|
-
u0: yup.number()
|
|
95
|
-
usMin: yup.number()
|
|
96
|
-
usMax: yup.number()
|
|
98
|
+
alpha: requiredWhenActive(yup.number()),
|
|
99
|
+
u0: requiredWhenActive(yup.number()),
|
|
100
|
+
usMin: requiredWhenActive(yup.number()),
|
|
101
|
+
usMax: requiredWhenActive(yup.number()),
|
|
97
102
|
filters: yup.array().of(
|
|
98
103
|
yup.object().shape({
|
|
99
104
|
[ID]: yup.string().required(),
|
|
100
105
|
[NAME]: yup.string().required()
|
|
101
106
|
})
|
|
102
|
-
),
|
|
103
|
-
|
|
107
|
+
).nullable().when("active", {
|
|
108
|
+
is: true,
|
|
109
|
+
then: (s) => s.required().min(1, "FilterInputMinError"),
|
|
110
|
+
otherwise: (s) => s.notRequired().nullable()
|
|
111
|
+
}),
|
|
112
|
+
type: requiredWhenActive(yup.string().oneOf(["GENERATOR", "HVDC"]).nullable())
|
|
104
113
|
})
|
|
105
114
|
).required() : void 0;
|
|
106
115
|
const existingSpecificSchema = defaultSchema.fields?.[SPECIFIC_PARAMETERS];
|
package/dist/index.js
CHANGED
|
@@ -230,6 +230,10 @@ import { LoadDialogHeader } from "./components/network-modifications/load/common
|
|
|
230
230
|
import { LoadForm } from "./components/network-modifications/load/common/LoadForm.js";
|
|
231
231
|
import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchema, loadCreationFormToDto } from "./components/network-modifications/load/creation/loadCreation.utils.js";
|
|
232
232
|
import { loadModificationDtoToForm, loadModificationEmptyFormData, loadModificationFormSchema, loadModificationFormToDto } from "./components/network-modifications/load/modification/loadModification.utils.js";
|
|
233
|
+
import { ByFilterDeletionForm } from "./components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js";
|
|
234
|
+
import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSchema, byFilterDeletionFormToDto, emptyFormData } from "./components/network-modifications/by-filter/deletion/byFilterDeletion.utils.js";
|
|
235
|
+
import { BuildStatusChip } from "./components/node/build-status-chip.js";
|
|
236
|
+
import { BuildStatus } from "./components/node/constant.js";
|
|
233
237
|
import { useStateBoolean } from "./hooks/customStates/useStateBoolean.js";
|
|
234
238
|
import { useStateNumber } from "./hooks/customStates/useStateNumber.js";
|
|
235
239
|
import { useModificationLabelComputer } from "./hooks/useModificationLabelComputer.js";
|
|
@@ -388,8 +392,11 @@ export {
|
|
|
388
392
|
BottomRightButtons,
|
|
389
393
|
BranchActiveReactivePowerMeasurementsForm,
|
|
390
394
|
BranchConnectivityForm,
|
|
395
|
+
BuildStatus,
|
|
396
|
+
BuildStatusChip,
|
|
391
397
|
BusBar,
|
|
392
398
|
ButtonReadOnlyInput,
|
|
399
|
+
ByFilterDeletionForm,
|
|
393
400
|
CALCULATION_TYPE,
|
|
394
401
|
CENTER_LABEL,
|
|
395
402
|
COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
|
|
@@ -485,6 +492,7 @@ export {
|
|
|
485
492
|
DynamicSecurityAnalysisInline,
|
|
486
493
|
ENERGY_SOURCE_OPTIONS,
|
|
487
494
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
495
|
+
EQUIPMENT_TYPE_ORDER,
|
|
488
496
|
EXPERT_FILTER_EQUIPMENTS,
|
|
489
497
|
EXPERT_FILTER_FIELDS,
|
|
490
498
|
EXPERT_FILTER_QUERY,
|
|
@@ -851,6 +859,9 @@ export {
|
|
|
851
859
|
buildNewBusbarSections,
|
|
852
860
|
businessErrorsEn,
|
|
853
861
|
businessErrorsFr,
|
|
862
|
+
byFilterDeletionDtoToForm,
|
|
863
|
+
byFilterDeletionFormSchema,
|
|
864
|
+
byFilterDeletionFormToDto,
|
|
854
865
|
cardErrorBoundaryEn,
|
|
855
866
|
cardErrorBoundaryFr,
|
|
856
867
|
catchErrorHandler,
|
|
@@ -881,6 +892,7 @@ export {
|
|
|
881
892
|
elementAlreadyExists,
|
|
882
893
|
elementSearchEn,
|
|
883
894
|
elementSearchFr,
|
|
895
|
+
emptyFormData,
|
|
884
896
|
emptyProperties,
|
|
885
897
|
equalsArray,
|
|
886
898
|
equipmentDeletionDtoToForm,
|
|
@@ -60,6 +60,7 @@ export declare const businessErrorsEn: {
|
|
|
60
60
|
'shortcircuit.inconsistentVoltageLevels': string;
|
|
61
61
|
'shortcircuit.busOutOfNodeCluster': string;
|
|
62
62
|
'securityAnalysis.contingencyListConfigEmpty': string;
|
|
63
|
+
'securityAnalysis.missingContingencyList': string;
|
|
63
64
|
'dynamicMapping.mappingNameNotProvided': string;
|
|
64
65
|
'dynamicSecurityAnalysis.providerNotFound': string;
|
|
65
66
|
'dynamicSecurityAnalysis.contingenciesNotFound': string;
|
|
@@ -68,6 +69,7 @@ export declare const businessErrorsEn: {
|
|
|
68
69
|
'dynamicSimulation.mappingNotProvided': string;
|
|
69
70
|
'dynamicSimulation.mappingNotLastRuleWithEmptyFilterError': string;
|
|
70
71
|
'sensitivityAnalysis.tooManyFactors': string;
|
|
72
|
+
'sensitivityAnalysis.filtersOrContingenciesListsNotFound': string;
|
|
71
73
|
'pccMin.missingFilter': string;
|
|
72
74
|
'pccMin.voltageLevelsLimitExceeded': string;
|
|
73
75
|
'diagram.invalidEquipmentType': string;
|
|
@@ -54,6 +54,7 @@ const businessErrorsEn = {
|
|
|
54
54
|
"shortcircuit.inconsistentVoltageLevels": "Some voltage levels have wrong isc values. Check out the logs to find which ones.",
|
|
55
55
|
"shortcircuit.busOutOfNodeCluster": "Selected bus is out of node cluster",
|
|
56
56
|
"securityAnalysis.contingencyListConfigEmpty": "The configuration does not contain any contingency.",
|
|
57
|
+
"securityAnalysis.missingContingencyList": "The configuration contains one or more contingency lists that have been deleted.",
|
|
57
58
|
"dynamicMapping.mappingNameNotProvided": "Mapping name not provided",
|
|
58
59
|
"dynamicSecurityAnalysis.providerNotFound": "Dynamic security analysis provider not found.",
|
|
59
60
|
"dynamicSecurityAnalysis.contingenciesNotFound": "No contingencies provided.",
|
|
@@ -62,6 +63,7 @@ const businessErrorsEn = {
|
|
|
62
63
|
"dynamicSimulation.mappingNotProvided": "Dynamic simulation mapping not provided.",
|
|
63
64
|
"dynamicSimulation.mappingNotLastRuleWithEmptyFilterError": "Only last rule can have empty filter: type {equipmentType}, rule index {index}.",
|
|
64
65
|
"sensitivityAnalysis.tooManyFactors": "Too many factors to run sensitivity analysis: {resultCount} results (limit: {resultCountLimit}) and {variableCount} variables (limit: {variableCountLimit}).",
|
|
66
|
+
"sensitivityAnalysis.filtersOrContingenciesListsNotFound": "The configuration contains one or more contingencies lists or filters that have been deleted.",
|
|
65
67
|
"pccMin.missingFilter": "The configuration contains one filter that has been deleted.",
|
|
66
68
|
"pccMin.voltageLevelsLimitExceeded": "The result of filter evaluation gives {voltageLevelSize} voltage levels, which exceeds the limit {voltageLevelsLimit}.",
|
|
67
69
|
"diagram.invalidEquipmentType": "The equipment {id} of type {equipmentType} is not a substation or voltage level in given network",
|
|
@@ -68,6 +68,7 @@ export declare const networkModificationsEn: {
|
|
|
68
68
|
'network_modifications.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS': string;
|
|
69
69
|
ModificationReadError: string;
|
|
70
70
|
CreateSubstation: string;
|
|
71
|
+
DeleteEquipmentByFilter: string;
|
|
71
72
|
SubstationCreationError: string;
|
|
72
73
|
ModifySubstation: string;
|
|
73
74
|
SubstationModificationError: string;
|
|
@@ -74,6 +74,7 @@ const networkModificationsEn = {
|
|
|
74
74
|
"network_modifications.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS": "Moving feeder bays in voltage level {computedLabel}",
|
|
75
75
|
ModificationReadError: "An error occurred while fetching the modification",
|
|
76
76
|
CreateSubstation: "Create substation",
|
|
77
|
+
DeleteEquipmentByFilter: "Delete equipment by filter",
|
|
77
78
|
SubstationCreationError: "Error while creating substation",
|
|
78
79
|
ModifySubstation: "Modify substation",
|
|
79
80
|
SubstationModificationError: "Error while modifying substation",
|
|
@@ -276,4 +276,11 @@ export declare const parametersEn: {
|
|
|
276
276
|
DynamicMarginCalculationLoadsFilter: string;
|
|
277
277
|
DynamicMarginCalculationLoadsVariation: string;
|
|
278
278
|
DynamicMarginCalculationLoadsActive: string;
|
|
279
|
+
BUILT: string;
|
|
280
|
+
BUILT_WITH_WARNING: string;
|
|
281
|
+
BUILT_WITH_ERROR: string;
|
|
282
|
+
NOT_BUILT: string;
|
|
283
|
+
BUILDING: string;
|
|
284
|
+
NODE_BUILT: string;
|
|
285
|
+
NODE_NOT_BUILT: string;
|
|
279
286
|
};
|
|
@@ -276,7 +276,14 @@ const parametersEn = {
|
|
|
276
276
|
DynamicMarginCalculationLoadModelsRuleTargetedLoads: "Targeted loads",
|
|
277
277
|
DynamicMarginCalculationLoadsFilter: "Loads filter",
|
|
278
278
|
DynamicMarginCalculationLoadsVariation: "Load variation",
|
|
279
|
-
DynamicMarginCalculationLoadsActive: "Active"
|
|
279
|
+
DynamicMarginCalculationLoadsActive: "Active",
|
|
280
|
+
BUILT: "Built",
|
|
281
|
+
BUILT_WITH_WARNING: "Warnings",
|
|
282
|
+
BUILT_WITH_ERROR: "Errors",
|
|
283
|
+
NOT_BUILT: "Not built",
|
|
284
|
+
BUILDING: "Building",
|
|
285
|
+
NODE_BUILT: "Node built",
|
|
286
|
+
NODE_NOT_BUILT: "Node not built"
|
|
280
287
|
};
|
|
281
288
|
export {
|
|
282
289
|
parametersEn
|
|
@@ -60,6 +60,7 @@ export declare const businessErrorsFr: {
|
|
|
60
60
|
'shortcircuit.inconsistentVoltageLevels': string;
|
|
61
61
|
'shortcircuit.busOutOfNodeCluster': string;
|
|
62
62
|
'securityAnalysis.contingencyListConfigEmpty': string;
|
|
63
|
+
'securityAnalysis.missingContingencyList': string;
|
|
63
64
|
'dynamicMapping.mappingNameNotProvided': string;
|
|
64
65
|
'dynamicSecurityAnalysis.providerNotFound': string;
|
|
65
66
|
'dynamicSecurityAnalysis.contingenciesNotFound': string;
|
|
@@ -68,6 +69,7 @@ export declare const businessErrorsFr: {
|
|
|
68
69
|
'dynamicSimulation.mappingNotProvided': string;
|
|
69
70
|
'dynamicSimulation.mappingNotLastRuleWithEmptyFilterError': string;
|
|
70
71
|
'sensitivityAnalysis.tooManyFactors': string;
|
|
72
|
+
'sensitivityAnalysis.filtersOrContingenciesListsNotFound': string;
|
|
71
73
|
'pccMin.missingFilter': string;
|
|
72
74
|
'pccMin.voltageLevelsLimitExceeded': string;
|
|
73
75
|
'diagram.invalidEquipmentType': string;
|
|
@@ -54,6 +54,7 @@ const businessErrorsFr = {
|
|
|
54
54
|
"shortcircuit.inconsistentVoltageLevels": "Des postes ont des données Icc incohérentes. Vérifiez les logs pour déterminer lesquels.",
|
|
55
55
|
"shortcircuit.busOutOfNodeCluster": "Le nœud électrique sélectionné est en dehors de la zone intérieure",
|
|
56
56
|
"securityAnalysis.contingencyListConfigEmpty": "La configuration ne contient aucun aléas.",
|
|
57
|
+
"securityAnalysis.missingContingencyList": "La configuration contient une ou des listes d'aléas qui ont été supprimées.",
|
|
57
58
|
"dynamicMapping.mappingNameNotProvided": "Nom du mapping non fourni",
|
|
58
59
|
"dynamicSecurityAnalysis.providerNotFound": "Simulateur d'analyse de sécurité dynamique non trouvé.",
|
|
59
60
|
"dynamicSecurityAnalysis.contingenciesNotFound": "Aucun aléa fourni.",
|
|
@@ -62,6 +63,7 @@ const businessErrorsFr = {
|
|
|
62
63
|
"dynamicSimulation.mappingNotProvided": "Mapping pour la simulation dynamique non fourni.",
|
|
63
64
|
"dynamicSimulation.mappingNotLastRuleWithEmptyFilterError": "Seule la dernière règle peut avoir un filtre vide : type {equipmentType}, indice de la règle : {index}.",
|
|
64
65
|
"sensitivityAnalysis.tooManyFactors": "Trop de facteurs pour exécuter l’analyse de sensibilité : {resultCount} résultats (limite : {resultCountLimit}) et {variableCount} variables (limite : {variableCountLimit}).",
|
|
66
|
+
"sensitivityAnalysis.filtersOrContingenciesListsNotFound": "La configuration contient une ou des listes d'aléas ou filtres qui ont été supprimés.",
|
|
65
67
|
"pccMin.missingFilter": "La configuration contient un filtre qui a été supprimé.",
|
|
66
68
|
"pccMin.voltageLevelsLimitExceeded": "Le résultat de l’évaluation du filtre donne {voltageLevelSize} postes, ce qui dépasse la limite de {voltageLevelsLimit}.",
|
|
67
69
|
"diagram.invalidEquipmentType": "L'équipement {id} de type {equipmentType} n'est pas un site ou poste dans le réseau courant",
|
|
@@ -68,6 +68,7 @@ export declare const networkModificationsFr: {
|
|
|
68
68
|
'network_modifications.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS': string;
|
|
69
69
|
ModificationReadError: string;
|
|
70
70
|
CreateSubstation: string;
|
|
71
|
+
DeleteEquipmentByFilter: string;
|
|
71
72
|
SubstationCreationError: string;
|
|
72
73
|
ModifySubstation: string;
|
|
73
74
|
SubstationModificationError: string;
|
|
@@ -74,6 +74,7 @@ const networkModificationsFr = {
|
|
|
74
74
|
"network_modifications.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS": "Déplacements de départs dans le poste {computedLabel}",
|
|
75
75
|
ModificationReadError: "Une erreur est survenue lors de la récupération de la modification",
|
|
76
76
|
CreateSubstation: "Créer un site",
|
|
77
|
+
DeleteEquipmentByFilter: "Supprimer des ouvrages par filtre",
|
|
77
78
|
SubstationCreationError: "Erreur lors de la création d'un site'",
|
|
78
79
|
ModifySubstation: "Modifier un site",
|
|
79
80
|
SubstationModificationError: "Erreur lors de la modification d'un site",
|
|
@@ -276,4 +276,11 @@ export declare const parametersFr: {
|
|
|
276
276
|
DynamicMarginCalculationLoadsFilter: string;
|
|
277
277
|
DynamicMarginCalculationLoadsVariation: string;
|
|
278
278
|
DynamicMarginCalculationLoadsActive: string;
|
|
279
|
+
BUILT: string;
|
|
280
|
+
BUILT_WITH_WARNING: string;
|
|
281
|
+
BUILT_WITH_ERROR: string;
|
|
282
|
+
NOT_BUILT: string;
|
|
283
|
+
BUILDING: string;
|
|
284
|
+
NODE_BUILT: string;
|
|
285
|
+
NODE_NOT_BUILT: string;
|
|
279
286
|
};
|
|
@@ -275,7 +275,14 @@ const parametersFr = {
|
|
|
275
275
|
DynamicMarginCalculationLoadModelsRuleTargetedLoads: "Charges ciblées",
|
|
276
276
|
DynamicMarginCalculationLoadsFilter: "Regroupement de charges",
|
|
277
277
|
DynamicMarginCalculationLoadsVariation: "Variation de charge",
|
|
278
|
-
DynamicMarginCalculationLoadsActive: "Actif"
|
|
278
|
+
DynamicMarginCalculationLoadsActive: "Actif",
|
|
279
|
+
BUILT: "Réalisé",
|
|
280
|
+
BUILT_WITH_WARNING: "Alertes",
|
|
281
|
+
BUILT_WITH_ERROR: "Erreurs",
|
|
282
|
+
NOT_BUILT: "Non réalisé",
|
|
283
|
+
BUILDING: "En cours de réalisation",
|
|
284
|
+
NODE_BUILT: "Nœud réalisé",
|
|
285
|
+
NODE_NOT_BUILT: "Nœud non réalisé"
|
|
279
286
|
};
|
|
280
287
|
export {
|
|
281
288
|
parametersFr
|