@gridsuite/commons-ui 0.129.0 → 0.131.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/announcement/AnnouncementBanner.d.ts +1 -1
- package/dist/components/announcement/useGlobalAnnouncement.d.ts +1 -1
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts +1 -1
- package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.d.ts +1 -1
- package/dist/components/dialogs/elementSaveDialog/utils.d.ts +1 -1
- package/dist/components/dialogs/modifyElementSelection/ModifyElementSelection.d.ts +1 -1
- package/dist/components/directoryItemSelector/DirectoryItemSelector.d.ts +1 -1
- package/dist/components/directoryItemSelector/utils.d.ts +1 -1
- package/dist/components/filter/FilterCreationDialog.d.ts +1 -1
- package/dist/components/filter/HeaderFilterForm.d.ts +1 -1
- package/dist/components/filter/expert/expertFilter.type.d.ts +1 -1
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +1 -1
- package/dist/components/filter/filter.type.d.ts +1 -1
- package/dist/components/filter/utils/filterApi.d.ts +1 -1
- package/dist/components/icons/TuneIcon.d.ts +7 -1
- package/dist/components/icons/TuneIcon.js +5 -4
- package/dist/components/inputs/reactHookForm/text/UniqueNameInput.d.ts +1 -1
- package/dist/components/inputs/reactQueryBuilder/PropertyValueEditor.js +2 -5
- package/dist/components/parameters/common/computing-type.d.ts +0 -1
- package/dist/components/parameters/common/computing-type.js +0 -3
- package/dist/components/parameters/common/limitreductions/columns-definitions.d.ts +1 -1
- package/dist/components/parameters/common/name-element-editor/name-element-editor-form.d.ts +1 -1
- package/dist/components/parameters/common/parameters-creation-dialog.d.ts +1 -1
- package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.d.ts +1 -1
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.d.ts +1 -1
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +9 -3
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.d.ts +1 -1
- package/dist/components/parameters/network-visualizations/network-visualizations.types.d.ts +1 -1
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.d.ts +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.d.ts +1 -1
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.d.ts +1 -1
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +9 -3
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +1 -1
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.d.ts +1 -1
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +8 -3
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.d.ts +1 -1
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.d.ts +1 -1
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.d.ts +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.d.ts +1 -1
- package/dist/components/parameters/voltage-init/voltage-init.type.d.ts +1 -1
- package/dist/components/treeViewFinder/TreeViewFinder.d.ts +1 -1
- package/dist/hooks/use-unique-name-validation.d.ts +1 -1
- package/dist/hooks/useModificationLabelComputer.d.ts +1 -1
- package/dist/hooks/usePredefinedProperties.d.ts +1 -3
- package/dist/hooks/usePredefinedProperties.js +2 -3
- package/dist/index.js +0 -2
- package/dist/services/directory.d.ts +1 -1
- package/dist/services/explore.d.ts +1 -1
- package/dist/services/loadflow.d.ts +1 -1
- package/dist/services/security-analysis.d.ts +1 -1
- package/dist/services/sensitivity-analysis.d.ts +1 -1
- package/dist/services/study-config.d.ts +1 -1
- package/dist/services/study.d.ts +1 -1
- package/dist/services/voltage-init.d.ts +1 -1
- package/dist/utils/index.js +0 -2
- package/dist/utils/mapper/equipmentTypesForPredefinedPropertiesMapper.d.ts +7 -2
- package/dist/utils/mapper/equipmentTypesForPredefinedPropertiesMapper.js +1 -1
- package/dist/utils/types/dynamic-security-analysis.type.d.ts +1 -1
- package/dist/utils/types/dynamic-simulation.type.d.ts +1 -1
- package/dist/utils/types/fieldType.d.ts +3 -1
- package/dist/utils/types/fieldType.js +2 -0
- package/dist/utils/types/index.d.ts +0 -1
- package/dist/utils/types/index.js +0 -2
- package/dist/utils/types/loadflow.type.d.ts +1 -1
- package/dist/utils/types/parameters.type.d.ts +2 -3
- package/dist/utils/types/sensitivity-analysis.type.d.ts +1 -1
- package/dist/utils/types/types.d.ts +1 -1
- package/package.json +6 -7
- package/dist/utils/types/non-evacuated-energy.type.d.ts +0 -60
- package/dist/utils/types/non-evacuated-energy.type.js +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { FieldConstants } from '../../../utils/constants/fieldConstants';
|
|
3
3
|
import { default as yup } from '../../../utils/yupConfig';
|
|
4
4
|
import { DISTRIBUTION_KEY } from '../constants/FilterConstants';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
export declare const saveExplicitNamingFilter: (tableValues: any[], isFilterCreation: boolean, equipmentType: string, name: string, description: string, id: string | null, setCreateFilterErr: (error: Error) => void, handleClose: () => void, activeDirectory?: UUID, token?: string) => void;
|
|
3
3
|
export declare const saveExpertFilter: (id: string | null, query: any, equipmentType: string, name: string, description: string, isFilterCreation: boolean, activeDirectory: UUID | undefined | null, onClose: () => void, onError: (error: Error) => void, token?: string) => void;
|
|
@@ -4,4 +4,10 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
type TuneIconProps = {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
size?: number;
|
|
10
|
+
color?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function TuneIcon({ disabled, size, color }: TuneIconProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import Tune from "@material-symbols/svg-400/outlined/tune.svg?react";
|
|
3
3
|
import { useTheme } from "@mui/material";
|
|
4
|
-
function TuneIcon() {
|
|
4
|
+
function TuneIcon({ disabled = false, size = 14.4, color }) {
|
|
5
5
|
const theme = useTheme();
|
|
6
|
+
const fillColor = color ?? (disabled ? theme.palette.action.disabled : theme.palette.text.primary);
|
|
6
7
|
return /* @__PURE__ */ jsx(
|
|
7
8
|
Tune,
|
|
8
9
|
{
|
|
9
10
|
style: {
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
12
|
-
fill:
|
|
11
|
+
width: size,
|
|
12
|
+
height: size,
|
|
13
|
+
fill: fillColor
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useMemo, useCallback } from "react";
|
|
3
3
|
import { Grid, Autocomplete, TextField, FormControl, Select, MenuItem } from "@mui/material";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { useValid } from "./hooks/useValid.js";
|
|
@@ -13,10 +13,7 @@ function PropertyValueEditor(props) {
|
|
|
13
13
|
const valid = useValid(valueEditorProps);
|
|
14
14
|
const intl = useIntl();
|
|
15
15
|
const { propertyName, propertyOperator, propertyValues } = (valueEditorProps == null ? void 0 : valueEditorProps.value) ?? {};
|
|
16
|
-
const [equipmentPredefinedProps
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
setEquipmentType(equipmentType);
|
|
19
|
-
}, [equipmentType, setEquipmentType]);
|
|
16
|
+
const [equipmentPredefinedProps] = usePredefinedProperties(equipmentType);
|
|
20
17
|
const predefinedNames = useMemo(() => {
|
|
21
18
|
return Object.keys(equipmentPredefinedProps ?? {}).sort();
|
|
22
19
|
}, [equipmentPredefinedProps]);
|
|
@@ -8,7 +8,6 @@ export declare enum ComputingType {
|
|
|
8
8
|
LOAD_FLOW = "LOAD_FLOW",
|
|
9
9
|
SECURITY_ANALYSIS = "SECURITY_ANALYSIS",
|
|
10
10
|
SENSITIVITY_ANALYSIS = "SENSITIVITY_ANALYSIS",
|
|
11
|
-
NON_EVACUATED_ENERGY_ANALYSIS = "NON_EVACUATED_ENERGY_ANALYSIS",
|
|
12
11
|
SHORT_CIRCUIT = "SHORT_CIRCUIT",
|
|
13
12
|
SHORT_CIRCUIT_ONE_BUS = "SHORT_CIRCUIT_ONE_BUS",
|
|
14
13
|
DYNAMIC_SIMULATION = "DYNAMIC_SIMULATION",
|
|
@@ -2,7 +2,6 @@ var ComputingType = /* @__PURE__ */ ((ComputingType2) => {
|
|
|
2
2
|
ComputingType2["LOAD_FLOW"] = "LOAD_FLOW";
|
|
3
3
|
ComputingType2["SECURITY_ANALYSIS"] = "SECURITY_ANALYSIS";
|
|
4
4
|
ComputingType2["SENSITIVITY_ANALYSIS"] = "SENSITIVITY_ANALYSIS";
|
|
5
|
-
ComputingType2["NON_EVACUATED_ENERGY_ANALYSIS"] = "NON_EVACUATED_ENERGY_ANALYSIS";
|
|
6
5
|
ComputingType2["SHORT_CIRCUIT"] = "SHORT_CIRCUIT";
|
|
7
6
|
ComputingType2["SHORT_CIRCUIT_ONE_BUS"] = "SHORT_CIRCUIT_ONE_BUS";
|
|
8
7
|
ComputingType2["DYNAMIC_SIMULATION"] = "DYNAMIC_SIMULATION";
|
|
@@ -22,8 +21,6 @@ const formatComputingTypeLabel = (type) => {
|
|
|
22
21
|
return "SecurityAnalysis";
|
|
23
22
|
case "SENSITIVITY_ANALYSIS":
|
|
24
23
|
return "SensitivityAnalysis";
|
|
25
|
-
case "NON_EVACUATED_ENERGY_ANALYSIS":
|
|
26
|
-
return "NonEvacuatedEnergy";
|
|
27
24
|
case "SHORT_CIRCUIT":
|
|
28
25
|
return "ShortCircuit";
|
|
29
26
|
case "SHORT_CIRCUIT_ONE_BUS":
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { default as yup } from '../../../../utils/yupConfig';
|
|
3
3
|
import { PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER } from '../constant';
|
|
4
4
|
export declare const LIMIT_REDUCTIONS_FORM = "limitReductionsForm";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldErrors, UseFormReturn } from 'react-hook-form';
|
|
2
2
|
import { Dispatch, SetStateAction, SyntheticEvent } from 'react';
|
|
3
3
|
import { ObjectSchema } from 'yup';
|
|
4
|
-
import { UUID } from 'crypto';
|
|
4
|
+
import { UUID } from 'node:crypto';
|
|
5
5
|
import { TabValues } from './load-flow-parameters-utils';
|
|
6
6
|
import { LoadFlowParametersInfos } from '../../../utils/types/loadflow.type';
|
|
7
7
|
import { SpecificParameterInfos, UseParametersBackendReturnProps } from '../../../utils/types/parameters.type';
|
|
@@ -16,7 +16,7 @@ import "../../../utils/yupConfig.js";
|
|
|
16
16
|
import "localized-countries";
|
|
17
17
|
import "localized-countries/data/fr";
|
|
18
18
|
import "localized-countries/data/en";
|
|
19
|
-
import "
|
|
19
|
+
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
20
20
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
21
21
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
22
22
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
@@ -59,6 +59,7 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
59
59
|
const [currentProvider, setCurrentProvider] = useState(params == null ? void 0 : params.provider);
|
|
60
60
|
const [selectedTab, setSelectedTab] = useState(TabValues.GENERAL);
|
|
61
61
|
const [tabIndexesWithError, setTabIndexesWithError] = useState([]);
|
|
62
|
+
const { snackError } = useSnackMessage();
|
|
62
63
|
const handleTabChange = useCallback((event, newValue) => {
|
|
63
64
|
setSelectedTab(newValue);
|
|
64
65
|
}, []);
|
|
@@ -223,10 +224,15 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
223
224
|
formData[NAME],
|
|
224
225
|
ElementType.LOADFLOW_PARAMETERS,
|
|
225
226
|
formData[DESCRIPTION] ?? ""
|
|
226
|
-
)
|
|
227
|
+
).catch((errmsg) => {
|
|
228
|
+
snackError({
|
|
229
|
+
messageTxt: errmsg,
|
|
230
|
+
headerId: "updateLoadFlowParametersError"
|
|
231
|
+
});
|
|
232
|
+
});
|
|
227
233
|
}
|
|
228
234
|
},
|
|
229
|
-
[parametersUuid, formatNewParams]
|
|
235
|
+
[parametersUuid, formatNewParams, snackError]
|
|
230
236
|
);
|
|
231
237
|
useEffect(() => {
|
|
232
238
|
if (!params) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { User } from 'oidc-client';
|
|
3
3
|
import { NetworkVisualizationParameters } from './network-visualizations.types';
|
|
4
4
|
export declare function NetworkVisualizationParametersInline({ studyUuid, setHaveDirtyFields, user, parameters, }: Readonly<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UseFormReturn } from 'react-hook-form';
|
|
2
2
|
import { SyntheticEvent } from 'react';
|
|
3
3
|
import { ObjectSchema } from 'yup';
|
|
4
|
-
import { UUID } from 'crypto';
|
|
4
|
+
import { UUID } from 'node:crypto';
|
|
5
5
|
import { NetworkVisualizationTabValues as TabValues } from './constants';
|
|
6
6
|
import { NetworkVisualizationParameters } from './network-visualizations.types';
|
|
7
7
|
export interface UseNetworkVisualizationParametersFormReturn {
|
package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { UseParametersBackendReturnProps } from '../../../utils';
|
|
3
3
|
import { ComputingType } from '../common';
|
|
4
4
|
export declare function SecurityAnalysisParametersInline({ studyUuid, parametersBackend, setHaveDirtyFields, enableDeveloperMode, }: Readonly<{
|
package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UseFormReturn } from 'react-hook-form';
|
|
2
2
|
import { ObjectSchema } from 'yup';
|
|
3
3
|
import { Dispatch, SetStateAction } from 'react';
|
|
4
|
-
import { UUID } from 'crypto';
|
|
4
|
+
import { UUID } from 'node:crypto';
|
|
5
5
|
import { UseParametersBackendReturnProps } from '../../../utils';
|
|
6
6
|
import { ComputingType, ILimitReductionsByVoltageLevel, ISAParameters } from '../common';
|
|
7
7
|
export interface UseSecurityAnalysisParametersFormReturn {
|
package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js
CHANGED
|
@@ -14,7 +14,7 @@ import { updateParameter } from "../../../services/explore.js";
|
|
|
14
14
|
import "localized-countries";
|
|
15
15
|
import "localized-countries/data/fr";
|
|
16
16
|
import "localized-countries/data/en";
|
|
17
|
-
import "
|
|
17
|
+
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
18
18
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
19
19
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
20
20
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
@@ -42,6 +42,7 @@ import { getNameElementEditorEmptyFormData } from "../common/name-element-editor
|
|
|
42
42
|
const useSecurityAnalysisParametersForm = (parametersBackend, parametersUuid, name, description) => {
|
|
43
43
|
const [providers, provider, , , , params, , updateParameters, , , defaultLimitReductions] = parametersBackend;
|
|
44
44
|
const [currentProvider, setCurrentProvider] = useState(params == null ? void 0 : params.provider);
|
|
45
|
+
const { snackError } = useSnackMessage();
|
|
45
46
|
const formattedProviders = useMemo(() => {
|
|
46
47
|
return Object.entries(providers).filter(([key]) => !key.includes("DynaFlow")).map(([key, value]) => ({
|
|
47
48
|
id: key,
|
|
@@ -117,10 +118,15 @@ const useSecurityAnalysisParametersForm = (parametersBackend, parametersUuid, na
|
|
|
117
118
|
formData[NAME],
|
|
118
119
|
ElementType.SECURITY_ANALYSIS_PARAMETERS,
|
|
119
120
|
formData[DESCRIPTION] ?? ""
|
|
120
|
-
)
|
|
121
|
+
).catch((errmsg) => {
|
|
122
|
+
snackError({
|
|
123
|
+
messageTxt: errmsg,
|
|
124
|
+
headerId: "updateSecurityAnalysisParametersError"
|
|
125
|
+
});
|
|
126
|
+
});
|
|
121
127
|
}
|
|
122
128
|
},
|
|
123
|
-
[parametersUuid, formatNewParams]
|
|
129
|
+
[parametersUuid, formatNewParams, snackError]
|
|
124
130
|
);
|
|
125
131
|
useEffect(() => {
|
|
126
132
|
if (watchProvider !== currentProvider) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UseFormReturn } from 'react-hook-form';
|
|
2
2
|
import { ObjectSchema } from 'yup';
|
|
3
3
|
import { Dispatch, SetStateAction } from 'react';
|
|
4
|
-
import { UUID } from 'crypto';
|
|
4
|
+
import { UUID } from 'node:crypto';
|
|
5
5
|
import { ComputingType } from '../common';
|
|
6
6
|
import { SensitivityAnalysisParametersInfos, UseParametersBackendReturnProps } from '../../../utils';
|
|
7
7
|
type SubTabsValues = 'sensitivityInjectionsSet' | 'sensitivityInjection' | 'sensitivityHVDC' | 'sensitivityPST';
|
|
@@ -53,10 +53,10 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
53
53
|
}) => {
|
|
54
54
|
const [providers, , , , , params, , updateParameters] = parametersBackend;
|
|
55
55
|
const [sensitivityAnalysisParams, setSensitivityAnalysisParams] = useState(params);
|
|
56
|
+
const { snackError } = useSnackMessage();
|
|
56
57
|
const [analysisComputeComplexity, setAnalysisComputeComplexity] = useState(0);
|
|
57
58
|
const [launchLoader, setLaunchLoader] = useState(false);
|
|
58
59
|
const [isSubmitAction, setIsSubmitAction] = useState(false);
|
|
59
|
-
const { snackError } = useSnackMessage();
|
|
60
60
|
const emptyFormData = useMemo(() => {
|
|
61
61
|
return {
|
|
62
62
|
...getNameElementEditorEmptyFormData(name, description),
|
|
@@ -361,10 +361,15 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
361
361
|
formData[FieldConstants.NAME],
|
|
362
362
|
ElementType.SENSITIVITY_PARAMETERS,
|
|
363
363
|
formData[FieldConstants.DESCRIPTION] ?? ""
|
|
364
|
-
)
|
|
364
|
+
).catch((error) => {
|
|
365
|
+
snackError({
|
|
366
|
+
messageTxt: error.message,
|
|
367
|
+
headerId: "updateSensitivityAnalysisParametersError"
|
|
368
|
+
});
|
|
369
|
+
});
|
|
365
370
|
}
|
|
366
371
|
},
|
|
367
|
-
[parametersUuid, formatNewParams]
|
|
372
|
+
[parametersUuid, formatNewParams, snackError]
|
|
368
373
|
);
|
|
369
374
|
useEffect(() => {
|
|
370
375
|
if (sensitivityAnalysisParams) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { ShortCircuitParametersInfos } from './short-circuit-parameters.type';
|
|
3
3
|
export declare function ShortCircuitParametersInLine({ studyUuid, setHaveDirtyFields, shortCircuitParameters, }: Readonly<{
|
|
4
4
|
studyUuid: UUID | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
2
2
|
import { ObjectSchema } from 'yup';
|
|
3
|
-
import { UUID } from 'crypto';
|
|
3
|
+
import { UUID } from 'node:crypto';
|
|
4
4
|
import { PredefinedParameters } from './constants';
|
|
5
5
|
import { ShortCircuitParametersInfos } from './short-circuit-parameters.type';
|
|
6
6
|
export interface UseShortCircuitParametersFormReturn {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldErrors, UseFormReturn } from 'react-hook-form';
|
|
2
2
|
import { SyntheticEvent } from 'react';
|
|
3
3
|
import { ObjectSchema } from 'yup';
|
|
4
|
-
import { UUID } from 'crypto';
|
|
4
|
+
import { UUID } from 'node:crypto';
|
|
5
5
|
import { VoltageInitTabValues as TabValues } from './constants';
|
|
6
6
|
import { VoltageInitStudyParameters } from './voltage-init.type';
|
|
7
7
|
export interface UseVoltageInitParametersFormReturn {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { VoltageInitStudyParameters } from './voltage-init.type';
|
|
3
3
|
export declare function VoltageInitParametersInLine({ studyUuid, setHaveDirtyFields, voltageInitParameters, }: Readonly<{
|
|
4
4
|
studyUuid: UUID | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { FILTER_ID, FILTER_NAME, FILTERS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LOW_VOLTAGE_LIMIT, REACTIVE_SLACKS_THRESHOLD, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, SHUNT_COMPENSATORS_SELECTION_TYPE, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION } from './constants';
|
|
3
3
|
export declare enum EquipmentsSelectionType {
|
|
4
4
|
ALL_EXCEPT = "ALL_EXCEPT",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { ButtonProps, ModalProps } from '@mui/material';
|
|
3
3
|
import { SimpleTreeViewClasses } from '@mui/x-tree-view';
|
|
4
|
-
import { UUID } from 'crypto';
|
|
4
|
+
import { UUID } from 'node:crypto';
|
|
5
5
|
import { ElementType } from '../../utils';
|
|
6
6
|
export declare const generateTreeViewFinderClass: (className: string) => string;
|
|
7
7
|
export interface TreeViewFinderNodeProps {
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { PredefinedProperties } from '../utils/types/types';
|
|
3
|
-
|
|
4
|
-
export declare const usePredefinedProperties: (initialType: EquipmentType | null) => [PredefinedProperties, Dispatch<SetStateAction<EquipmentType | null>>];
|
|
2
|
+
export declare const usePredefinedProperties: (type: string | null) => [PredefinedProperties];
|
|
@@ -16,8 +16,7 @@ const fetchPredefinedProperties = async (equipmentType) => {
|
|
|
16
16
|
const studyMetadata = await fetchStudyMetadata();
|
|
17
17
|
return (_a = studyMetadata.predefinedEquipmentProperties) == null ? void 0 : _a[networkEquipmentType];
|
|
18
18
|
};
|
|
19
|
-
const usePredefinedProperties = (
|
|
20
|
-
const [type, setType] = useState(initialType);
|
|
19
|
+
const usePredefinedProperties = (type) => {
|
|
21
20
|
const [equipmentPredefinedProps, setEquipmentPredefinedProps] = useState({});
|
|
22
21
|
const { snackError } = useSnackMessage();
|
|
23
22
|
useEffect(() => {
|
|
@@ -33,7 +32,7 @@ const usePredefinedProperties = (initialType) => {
|
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
34
|
}, [type, setEquipmentPredefinedProps, snackError]);
|
|
36
|
-
return [equipmentPredefinedProps
|
|
35
|
+
return [equipmentPredefinedProps];
|
|
37
36
|
};
|
|
38
37
|
export {
|
|
39
38
|
usePredefinedProperties
|
package/dist/index.js
CHANGED
|
@@ -219,7 +219,6 @@ import { MODIFICATION_TYPES, ModificationType } from "./utils/types/modification
|
|
|
219
219
|
import { FieldType } from "./utils/types/fieldType.js";
|
|
220
220
|
import { ParameterType } from "./utils/types/parameters.type.js";
|
|
221
221
|
import { SolverTypeInfos } from "./utils/types/dynamic-simulation.type.js";
|
|
222
|
-
import { EnergySource } from "./utils/types/non-evacuated-energy.type.js";
|
|
223
222
|
import { DistributionType, SensitivityType } from "./utils/types/sensitivity-analysis.type.js";
|
|
224
223
|
import { toNumber, validateValueIsANumber } from "./utils/validation-functions.js";
|
|
225
224
|
import "./utils/yupConfig.js";
|
|
@@ -375,7 +374,6 @@ export {
|
|
|
375
374
|
ElementSearchInput,
|
|
376
375
|
ElementType,
|
|
377
376
|
ElementValueEditor,
|
|
378
|
-
EnergySource,
|
|
379
377
|
EquipmentItem,
|
|
380
378
|
EquipmentType,
|
|
381
379
|
EquipmentsSelectionType,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { ElementAttributes } from '../utils';
|
|
3
3
|
export declare function getAppName(appName: string, name: string): string;
|
|
4
4
|
export declare function updateConfigParameter(appName: string, name: string, value: string): Promise<Response>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
export declare function safeEncodeURIComponent(value: string | null | undefined): string;
|
|
3
3
|
export declare const getStudyUrl: (studyUuid: UUID | null) => string;
|
|
4
4
|
export declare function fetchSecurityAnalysisProviders(): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { SensitivityAnalysisFactorsCountParameters, SensitivityAnalysisParametersInfos } from '../utils';
|
|
3
3
|
export declare const getStudyUrl: (studyUuid: UUID | null) => string;
|
|
4
4
|
export declare const getStudyUrlWithNodeUuidAndRootNetworkUuid: (studyUuid: string | null | undefined, nodeUuid: string | undefined, rootNetworkUuid: string | undefined | null) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { NetworkVisualizationParameters } from '../components/parameters/network-visualizations/network-visualizations.types';
|
|
3
3
|
export declare function getNetworkVisualizationsParameters(paramsUuid: UUID): Promise<NetworkVisualizationParameters>;
|
package/dist/services/study.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { NetworkVisualizationParameters } from '../components/parameters/network-visualizations/network-visualizations.types';
|
|
3
3
|
import { ShortCircuitParameters, ShortCircuitParametersInfos } from '../components/parameters/short-circuit/short-circuit-parameters.type';
|
|
4
4
|
import { VoltageInitStudyParameters } from '../components/parameters/voltage-init/voltage-init.type';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { VoltageInitParameters } from '../components/parameters/voltage-init/voltage-init.type';
|
|
3
3
|
export declare function getVoltageInitUrl(): string;
|
|
4
4
|
export declare function getVoltageInitParameters(parameterUuid: UUID): Promise<VoltageInitParameters>;
|
package/dist/utils/index.js
CHANGED
|
@@ -19,7 +19,6 @@ import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.j
|
|
|
19
19
|
import { FieldType } from "./types/fieldType.js";
|
|
20
20
|
import { ParameterType } from "./types/parameters.type.js";
|
|
21
21
|
import { SolverTypeInfos } from "./types/dynamic-simulation.type.js";
|
|
22
|
-
import { EnergySource } from "./types/non-evacuated-energy.type.js";
|
|
23
22
|
import { DistributionType, SensitivityType } from "./types/sensitivity-analysis.type.js";
|
|
24
23
|
import { toNumber, validateValueIsANumber } from "./validation-functions.js";
|
|
25
24
|
import "./yupConfig.js";
|
|
@@ -38,7 +37,6 @@ export {
|
|
|
38
37
|
DistributionType,
|
|
39
38
|
EQUIPMENT_TYPE,
|
|
40
39
|
ElementType,
|
|
41
|
-
EnergySource,
|
|
42
40
|
EquipmentType,
|
|
43
41
|
ExtendedEquipmentType,
|
|
44
42
|
FetchStatus,
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, 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 const equipmentTypesForPredefinedPropertiesMapper: (type: string) => string | undefined;
|
|
@@ -173,5 +173,7 @@ export declare enum FieldType {
|
|
|
173
173
|
PHASE_TAP_POSITION = "PHASE_TAP_POSITION",
|
|
174
174
|
PHASE_TARGET_DEADBAND = "PHASE_TARGET_DEADBAND",
|
|
175
175
|
SELECTED_OPERATIONAL_LIMITS_GROUP_1 = "SELECTED_OPERATIONAL_LIMITS_GROUP_1",
|
|
176
|
-
SELECTED_OPERATIONAL_LIMITS_GROUP_2 = "SELECTED_OPERATIONAL_LIMITS_GROUP_2"
|
|
176
|
+
SELECTED_OPERATIONAL_LIMITS_GROUP_2 = "SELECTED_OPERATIONAL_LIMITS_GROUP_2",
|
|
177
|
+
OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES = "OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES",
|
|
178
|
+
OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES = "OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES"
|
|
177
179
|
}
|
|
@@ -168,6 +168,8 @@ var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
|
168
168
|
FieldType2["PHASE_TARGET_DEADBAND"] = "PHASE_TARGET_DEADBAND";
|
|
169
169
|
FieldType2["SELECTED_OPERATIONAL_LIMITS_GROUP_1"] = "SELECTED_OPERATIONAL_LIMITS_GROUP_1";
|
|
170
170
|
FieldType2["SELECTED_OPERATIONAL_LIMITS_GROUP_2"] = "SELECTED_OPERATIONAL_LIMITS_GROUP_2";
|
|
171
|
+
FieldType2["OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES"] = "OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES";
|
|
172
|
+
FieldType2["OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES"] = "OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES";
|
|
171
173
|
return FieldType2;
|
|
172
174
|
})(FieldType || {});
|
|
173
175
|
export {
|
|
@@ -6,7 +6,6 @@ import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
|
|
|
6
6
|
import { FieldType } from "./fieldType.js";
|
|
7
7
|
import { ParameterType } from "./parameters.type.js";
|
|
8
8
|
import { SolverTypeInfos } from "./dynamic-simulation.type.js";
|
|
9
|
-
import { EnergySource } from "./non-evacuated-energy.type.js";
|
|
10
9
|
import { DistributionType, SensitivityType } from "./sensitivity-analysis.type.js";
|
|
11
10
|
export {
|
|
12
11
|
AnnouncementSeverity,
|
|
@@ -17,7 +16,6 @@ export {
|
|
|
17
16
|
DistributionType,
|
|
18
17
|
EQUIPMENT_TYPE,
|
|
19
18
|
ElementType,
|
|
20
|
-
EnergySource,
|
|
21
19
|
EquipmentType,
|
|
22
20
|
ExtendedEquipmentType,
|
|
23
21
|
FieldType,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
2
|
import { ComputingType } from '../../components/parameters/common/computing-type';
|
|
3
3
|
import { LoadFlowParametersInfos } from './loadflow.type';
|
|
4
4
|
import { DynamicSecurityAnalysisParametersFetchReturn } from './dynamic-security-analysis.type';
|
|
5
5
|
import { ILimitReductionsByVoltageLevel, ISAParameters } from '../../components/parameters/common/limitreductions/columns-definitions';
|
|
6
6
|
import { DynamicSimulationParametersFetchReturn } from './dynamic-simulation.type';
|
|
7
|
-
import { NonEvacuatedEnergyParametersInfos } from './non-evacuated-energy.type';
|
|
8
7
|
import { SensitivityAnalysisParametersInfos } from './sensitivity-analysis.type';
|
|
9
8
|
export declare enum ParameterType {
|
|
10
9
|
BOOLEAN = "BOOLEAN",
|
|
@@ -25,7 +24,7 @@ export type SpecificParameterInfos = {
|
|
|
25
24
|
label?: string;
|
|
26
25
|
};
|
|
27
26
|
export type SpecificParametersInfos = Record<string, SpecificParameterInfos>;
|
|
28
|
-
export type ParametersInfos<T extends ComputingType> = T extends ComputingType.SENSITIVITY_ANALYSIS ? SensitivityAnalysisParametersInfos : T extends ComputingType.SECURITY_ANALYSIS ? ISAParameters : T extends ComputingType.
|
|
27
|
+
export type ParametersInfos<T extends ComputingType> = T extends ComputingType.SENSITIVITY_ANALYSIS ? SensitivityAnalysisParametersInfos : T extends ComputingType.SECURITY_ANALYSIS ? ISAParameters : T extends ComputingType.LOAD_FLOW ? LoadFlowParametersInfos : T extends ComputingType.DYNAMIC_SIMULATION ? DynamicSimulationParametersFetchReturn : T extends ComputingType.DYNAMIC_SECURITY_ANALYSIS ? DynamicSecurityAnalysisParametersFetchReturn : Record<string, any>;
|
|
29
28
|
export type UseParametersBackendReturnProps<T extends ComputingType> = [
|
|
30
29
|
Record<string, string>,
|
|
31
30
|
string | undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.131.0",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"author": "gridsuite team",
|
|
6
6
|
"homepage": "https://github.com/gridsuite",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react-querybuilder": "^8.2.0",
|
|
53
53
|
"reconnecting-websocket": "^4.4.0",
|
|
54
54
|
"type-fest": "^4.41.0",
|
|
55
|
-
"uuid": "^
|
|
55
|
+
"uuid": "^13.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@emotion/react": "^11.14.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@emotion/react": "^11.14.0",
|
|
82
82
|
"@emotion/styled": "^11.14.1",
|
|
83
83
|
"@hookform/resolvers": "^4.1.3",
|
|
84
|
-
"@jest/globals": "^
|
|
84
|
+
"@jest/globals": "^30.1.2",
|
|
85
85
|
"@mui/icons-material": "^5.18.0",
|
|
86
86
|
"@mui/lab": "5.0.0-alpha.175",
|
|
87
87
|
"@mui/material": "^5.18.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@types/autosuggest-highlight": "^3.2.3",
|
|
93
93
|
"@types/eslint": "^8.56.12",
|
|
94
94
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
95
|
-
"@types/jest": "^
|
|
95
|
+
"@types/jest": "^30.0.0",
|
|
96
96
|
"@types/json-logic-js": "^2.0.8",
|
|
97
97
|
"@types/license-checker": "^25.0.6",
|
|
98
98
|
"@types/localized-countries": "^2.0.3",
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
123
123
|
"glob": "^11.0.3",
|
|
124
124
|
"identity-obj-proxy": "^3.0.0",
|
|
125
|
-
"jest": "^
|
|
126
|
-
"jest-environment-jsdom": "^
|
|
125
|
+
"jest": "^30.1.3",
|
|
126
|
+
"jest-environment-jsdom": "^30.1.2",
|
|
127
127
|
"license-checker": "^25.0.1",
|
|
128
128
|
"notistack": "^3.0.2",
|
|
129
129
|
"prettier": "^3.6.2",
|
|
@@ -135,7 +135,6 @@
|
|
|
135
135
|
"react-papaparse": "^4.4.0",
|
|
136
136
|
"react-resizable": "^3.0.5",
|
|
137
137
|
"react-router": "^7.8.2",
|
|
138
|
-
"svgo": "^3.3.2",
|
|
139
138
|
"ts-node": "^10.9.2",
|
|
140
139
|
"typescript": "~5.6.3",
|
|
141
140
|
"vite": "^6.3.6",
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024, 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 EnergySource {
|
|
8
|
-
HYDRO = "HYDRO",
|
|
9
|
-
NUCLEAR = "NUCLEAR",
|
|
10
|
-
WIND = "WIND",
|
|
11
|
-
THERMAL = "THERMAL",
|
|
12
|
-
SOLAR = "SOLAR",
|
|
13
|
-
OTHER = "OTHER"
|
|
14
|
-
}
|
|
15
|
-
interface EquipmentsContainer {
|
|
16
|
-
containerId: string;
|
|
17
|
-
containerName: string;
|
|
18
|
-
}
|
|
19
|
-
interface NonEvacuatedEnergyGeneratorCappingsByType {
|
|
20
|
-
generators?: EquipmentsContainer[];
|
|
21
|
-
energySource: EnergySource;
|
|
22
|
-
activated: boolean;
|
|
23
|
-
}
|
|
24
|
-
interface NonEvacuatedEnergyStageDefinition {
|
|
25
|
-
generators?: EquipmentsContainer[];
|
|
26
|
-
energySource: EnergySource;
|
|
27
|
-
pMaxPercents?: (number | undefined)[];
|
|
28
|
-
}
|
|
29
|
-
interface NonEvacuatedEnergyStagesSelection {
|
|
30
|
-
name: string;
|
|
31
|
-
stagesDefinitionIndex?: (number | undefined)[];
|
|
32
|
-
pMaxPercentsIndex?: (number | undefined)[];
|
|
33
|
-
activated: boolean;
|
|
34
|
-
}
|
|
35
|
-
interface NonEvacuatedEnergyGeneratorsCappings {
|
|
36
|
-
sensitivityThreshold: number;
|
|
37
|
-
generators?: NonEvacuatedEnergyGeneratorCappingsByType[];
|
|
38
|
-
}
|
|
39
|
-
interface NonEvacuatedEnergyMonitoredBranches {
|
|
40
|
-
branches: EquipmentsContainer[];
|
|
41
|
-
activated: boolean;
|
|
42
|
-
istN: boolean;
|
|
43
|
-
limitNameN?: string | null;
|
|
44
|
-
nCoefficient: number;
|
|
45
|
-
istNm1: boolean;
|
|
46
|
-
limitNameNm1?: string | null;
|
|
47
|
-
nm1Coefficient: number;
|
|
48
|
-
}
|
|
49
|
-
interface NonEvacuatedEnergyContingencies {
|
|
50
|
-
contingencies: EquipmentsContainer[];
|
|
51
|
-
activated: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface NonEvacuatedEnergyParametersInfos {
|
|
54
|
-
stagesDefinition?: NonEvacuatedEnergyStageDefinition[];
|
|
55
|
-
stagesSelection?: NonEvacuatedEnergyStagesSelection[];
|
|
56
|
-
generatorsCappings?: NonEvacuatedEnergyGeneratorsCappings;
|
|
57
|
-
monitoredBranches?: NonEvacuatedEnergyMonitoredBranches[];
|
|
58
|
-
contingencies?: NonEvacuatedEnergyContingencies[];
|
|
59
|
-
}
|
|
60
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var EnergySource = /* @__PURE__ */ ((EnergySource2) => {
|
|
2
|
-
EnergySource2["HYDRO"] = "HYDRO";
|
|
3
|
-
EnergySource2["NUCLEAR"] = "NUCLEAR";
|
|
4
|
-
EnergySource2["WIND"] = "WIND";
|
|
5
|
-
EnergySource2["THERMAL"] = "THERMAL";
|
|
6
|
-
EnergySource2["SOLAR"] = "SOLAR";
|
|
7
|
-
EnergySource2["OTHER"] = "OTHER";
|
|
8
|
-
return EnergySource2;
|
|
9
|
-
})(EnergySource || {});
|
|
10
|
-
export {
|
|
11
|
-
EnergySource
|
|
12
|
-
};
|