@gridsuite/commons-ui 0.156.0 → 0.157.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/directoryItemSelector/DirectoryItemSelector.d.ts +1 -1
- package/dist/components/directoryItemSelector/DirectoryItemSelector.js +15 -6
- package/dist/components/filter/FilterForm.js +3 -0
- package/dist/components/filter/expert/ExpertFilterForm.js +3 -3
- package/dist/components/index.js +2 -2
- package/dist/components/parameters/index.js +2 -2
- package/dist/components/parameters/loadflow/constants.d.ts +1 -1
- package/dist/components/parameters/loadflow/constants.js +2 -2
- package/dist/components/parameters/loadflow/index.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +4 -4
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.d.ts +4 -4
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +2 -2
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +3 -3
- package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +3 -3
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +3 -3
- package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +3 -3
- package/dist/index.js +4 -3
- package/dist/utils/functions.d.ts +4 -0
- package/dist/utils/functions.js +4 -0
- package/dist/utils/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
|
-
import { TreeViewFinderProps } from '../treeViewFinder/TreeViewFinder';
|
|
3
2
|
import { ElementAttributes } from '../../utils';
|
|
3
|
+
import { TreeViewFinderProps } from '../treeViewFinder';
|
|
4
4
|
export interface DirectoryItemSelectorProps extends TreeViewFinderProps {
|
|
5
5
|
types: string[];
|
|
6
6
|
equipmentTypes?: string[];
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
3
|
-
import { getFileIcon } from "../../utils/mapper/getFileIcon.js";
|
|
4
|
-
import { ElementType } from "../../utils/types/elementType.js";
|
|
5
|
-
import { TreeViewFinder } from "../treeViewFinder/TreeViewFinder.js";
|
|
6
|
-
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
7
3
|
import "../../utils/conversionUtils.js";
|
|
8
4
|
import { snackWithFallback } from "../../utils/error.js";
|
|
5
|
+
import { arraysContainIdenticalStrings } from "../../utils/functions.js";
|
|
6
|
+
import { getFileIcon } from "../../utils/mapper/getFileIcon.js";
|
|
7
|
+
import { ElementType } from "../../utils/types/elementType.js";
|
|
9
8
|
import "../../utils/types/equipmentType.js";
|
|
10
9
|
import "../../utils/yupConfig.js";
|
|
10
|
+
import { TreeViewFinder } from "../treeViewFinder/TreeViewFinder.js";
|
|
11
|
+
import "react-intl";
|
|
11
12
|
import { fetchRootFolders, fetchDirectoryContent } from "../../services/directory.js";
|
|
12
13
|
import { fetchElementsInfos } from "../../services/explore.js";
|
|
14
|
+
import "@mui/material";
|
|
15
|
+
import "localized-countries";
|
|
16
|
+
import "localized-countries/data/fr";
|
|
17
|
+
import "localized-countries/data/en";
|
|
18
|
+
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
19
|
+
import "react-hook-form";
|
|
13
20
|
import { getExpansionPathsForSelected, fetchChildrenForExpandedNodes, initializeFromLastSelected, saveLastSelectedDirectoryFromNode } from "./utils.js";
|
|
14
21
|
const styles = {
|
|
15
22
|
icon: (theme) => ({
|
|
@@ -116,6 +123,7 @@ function DirectoryItemSelector({
|
|
|
116
123
|
...otherTreeViewFinderProps
|
|
117
124
|
}) {
|
|
118
125
|
const [data, setData] = useState([]);
|
|
126
|
+
const [lastFetchedEquipmentTypes, setLastFetchedEquipmentTypes] = useState();
|
|
119
127
|
const [rootDirectories, setRootDirectories] = useState([]);
|
|
120
128
|
const [isRootsLoaded, setIsRootsLoaded] = useState(false);
|
|
121
129
|
const [autoExpandedNodes, setAutoExpandedNodes] = useState([]);
|
|
@@ -210,11 +218,12 @@ function DirectoryItemSelector({
|
|
|
210
218
|
const fetchNodeChildrenIfNeeded = useCallback(
|
|
211
219
|
async (nodeId) => {
|
|
212
220
|
const node = nodeMap.current[nodeId];
|
|
213
|
-
if (node && (!node.children || node.children.length === 0) && node.type === ElementType.DIRECTORY) {
|
|
221
|
+
if (node && (!node.children || node.children.length === 0 || !arraysContainIdenticalStrings(equipmentTypes, lastFetchedEquipmentTypes)) && node.type === ElementType.DIRECTORY) {
|
|
222
|
+
setLastFetchedEquipmentTypes(equipmentTypes);
|
|
214
223
|
await fetchDirectoryChildren(nodeId);
|
|
215
224
|
}
|
|
216
225
|
},
|
|
217
|
-
[fetchDirectoryChildren]
|
|
226
|
+
[equipmentTypes, lastFetchedEquipmentTypes, setLastFetchedEquipmentTypes, fetchDirectoryChildren]
|
|
218
227
|
);
|
|
219
228
|
const handleSelectedExpansion = useCallback(async () => {
|
|
220
229
|
if (!selected || selected.length === 0) {
|
|
@@ -15,6 +15,9 @@ import "react";
|
|
|
15
15
|
import "react-intl";
|
|
16
16
|
import "react-hook-form";
|
|
17
17
|
import "../treeViewFinder/TreeViewFinder.js";
|
|
18
|
+
import "localized-countries";
|
|
19
|
+
import "localized-countries/data/fr";
|
|
20
|
+
import "localized-countries/data/en";
|
|
18
21
|
import "notistack";
|
|
19
22
|
function FilterForm({
|
|
20
23
|
sourceFilterForExplicitNamingConversion,
|
|
@@ -21,13 +21,13 @@ import "@mui/icons-material";
|
|
|
21
21
|
import "../../../utils/yupConfig.js";
|
|
22
22
|
import "react-intl";
|
|
23
23
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
24
|
+
import "localized-countries";
|
|
25
|
+
import "localized-countries/data/fr";
|
|
26
|
+
import "localized-countries/data/en";
|
|
24
27
|
import "notistack";
|
|
25
28
|
import { useFormatLabelWithUnit } from "../../../hooks/useFormatLabelWithUnit.js";
|
|
26
29
|
import { filterStyles } from "../HeaderFilterForm.js";
|
|
27
30
|
import "../../overflowableText/OverflowableText.js";
|
|
28
|
-
import "localized-countries";
|
|
29
|
-
import "localized-countries/data/fr";
|
|
30
|
-
import "localized-countries/data/en";
|
|
31
31
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
32
32
|
import { useCustomFormContext } from "../../inputs/reactHookForm/provider/useCustomFormContext.js";
|
|
33
33
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
package/dist/components/index.js
CHANGED
|
@@ -155,7 +155,7 @@ import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OP
|
|
|
155
155
|
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_ETALAB, MAP_BASEMAP_MAPBOX, NadPositionsGenerationMode, SubstationLayout } from "./parameters/network-visualizations/network-visualizations.types.js";
|
|
156
156
|
import { NetworkVisualizationParametersInline } from "./parameters/network-visualizations/network-visualizations-parameters-inline.js";
|
|
157
157
|
import { NetworkVisualizationsParametersEditionDialog } from "./parameters/network-visualizations/network-visualizations-parameters-dialog.js";
|
|
158
|
-
import { BALANCE_TYPE,
|
|
158
|
+
import { BALANCE_TYPE, CONNECTED_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./parameters/loadflow/constants.js";
|
|
159
159
|
import { LoadFlowParametersInline } from "./parameters/loadflow/load-flow-parameters-inline.js";
|
|
160
160
|
import { LoadFlowParametersEditionDialog } from "./parameters/loadflow/load-flow-parameters-dialog.js";
|
|
161
161
|
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./parameters/short-circuit/constants.js";
|
|
@@ -203,7 +203,7 @@ export {
|
|
|
203
203
|
COMBINATOR_OPTIONS,
|
|
204
204
|
COMMON_PARAMETERS,
|
|
205
205
|
COMPONENT_LIBRARY,
|
|
206
|
-
|
|
206
|
+
CONNECTED_MODE,
|
|
207
207
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
208
208
|
CONVERTERS_MODE_OPTIONS,
|
|
209
209
|
COUNTRIES_TO_BALANCE,
|
|
@@ -21,7 +21,7 @@ import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OP
|
|
|
21
21
|
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_ETALAB, MAP_BASEMAP_MAPBOX, NadPositionsGenerationMode, SubstationLayout } from "./network-visualizations/network-visualizations.types.js";
|
|
22
22
|
import { NetworkVisualizationParametersInline } from "./network-visualizations/network-visualizations-parameters-inline.js";
|
|
23
23
|
import { NetworkVisualizationsParametersEditionDialog } from "./network-visualizations/network-visualizations-parameters-dialog.js";
|
|
24
|
-
import { BALANCE_TYPE,
|
|
24
|
+
import { BALANCE_TYPE, CONNECTED_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./loadflow/constants.js";
|
|
25
25
|
import { LoadFlowParametersInline } from "./loadflow/load-flow-parameters-inline.js";
|
|
26
26
|
import { LoadFlowParametersEditionDialog } from "./loadflow/load-flow-parameters-dialog.js";
|
|
27
27
|
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./short-circuit/constants.js";
|
|
@@ -50,7 +50,7 @@ export {
|
|
|
50
50
|
COLUMNS_DEFINITIONS_PSTS,
|
|
51
51
|
COMMON_PARAMETERS,
|
|
52
52
|
COMPONENT_LIBRARY,
|
|
53
|
-
|
|
53
|
+
CONNECTED_MODE,
|
|
54
54
|
COUNTRIES_TO_BALANCE,
|
|
55
55
|
ComputingType,
|
|
56
56
|
CreateParameterDialog,
|
|
@@ -10,7 +10,7 @@ export declare const PHASE_SHIFTER_REGULATION_ON = "phaseShifterRegulationOn";
|
|
|
10
10
|
export declare const DC = "dc";
|
|
11
11
|
export declare const BALANCE_TYPE = "balanceType";
|
|
12
12
|
export declare const COUNTRIES_TO_BALANCE = "countriesToBalance";
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const CONNECTED_MODE = "componentMode";
|
|
14
14
|
export declare const HVDC_AC_EMULATION = "hvdcAcEmulation";
|
|
15
15
|
export declare const VOLTAGE_INIT_MODE = "voltageInitMode";
|
|
16
16
|
export declare const USE_REACTIVE_LIMITS = "useReactiveLimits";
|
|
@@ -4,7 +4,7 @@ const PHASE_SHIFTER_REGULATION_ON = "phaseShifterRegulationOn";
|
|
|
4
4
|
const DC = "dc";
|
|
5
5
|
const BALANCE_TYPE = "balanceType";
|
|
6
6
|
const COUNTRIES_TO_BALANCE = "countriesToBalance";
|
|
7
|
-
const
|
|
7
|
+
const CONNECTED_MODE = "componentMode";
|
|
8
8
|
const HVDC_AC_EMULATION = "hvdcAcEmulation";
|
|
9
9
|
const VOLTAGE_INIT_MODE = "voltageInitMode";
|
|
10
10
|
const USE_REACTIVE_LIMITS = "useReactiveLimits";
|
|
@@ -30,7 +30,7 @@ const alertThresholdMarks = [
|
|
|
30
30
|
];
|
|
31
31
|
export {
|
|
32
32
|
BALANCE_TYPE,
|
|
33
|
-
|
|
33
|
+
CONNECTED_MODE,
|
|
34
34
|
COUNTRIES_TO_BALANCE,
|
|
35
35
|
DC,
|
|
36
36
|
DC_POWER_FACTOR,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BALANCE_TYPE,
|
|
1
|
+
import { BALANCE_TYPE, CONNECTED_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./constants.js";
|
|
2
2
|
import { LoadFlowParametersInline } from "./load-flow-parameters-inline.js";
|
|
3
3
|
import { LoadFlowParametersEditionDialog } from "./load-flow-parameters-dialog.js";
|
|
4
4
|
export {
|
|
5
5
|
BALANCE_TYPE,
|
|
6
|
-
|
|
6
|
+
CONNECTED_MODE,
|
|
7
7
|
COUNTRIES_TO_BALANCE,
|
|
8
8
|
DC,
|
|
9
9
|
DC_POWER_FACTOR,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo, createElement } from "react";
|
|
3
3
|
import LoadFlowParameterField from "./load-flow-parameter-field.js";
|
|
4
|
-
import { PHASE_SHIFTER_REGULATION_ON, DC, BALANCE_TYPE, COUNTRIES_TO_BALANCE,
|
|
4
|
+
import { PHASE_SHIFTER_REGULATION_ON, DC, BALANCE_TYPE, COUNTRIES_TO_BALANCE, CONNECTED_MODE, HVDC_AC_EMULATION, VOLTAGE_INIT_MODE, USE_REACTIVE_LIMITS, TWT_SPLIT_SHUNT_ADMITTANCE, READ_SLACK_BUS, WRITE_SLACK_BUS, DISTRIBUTED_SLACK, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, DC_USE_TRANSFORMER_RATIO, DC_POWER_FACTOR } from "./constants.js";
|
|
5
5
|
import { useLoadFlowContext } from "./use-load-flow-context.js";
|
|
6
6
|
import { ParameterType } from "../../../utils/types/parameters.type.js";
|
|
7
7
|
import "@mui/material";
|
|
@@ -65,16 +65,16 @@ const basicParams = [
|
|
|
65
65
|
label: "descLfCountriesToBalance"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
name:
|
|
68
|
+
name: CONNECTED_MODE,
|
|
69
69
|
type: ParameterType.STRING,
|
|
70
70
|
label: "descLfConnectedComponentMode",
|
|
71
71
|
possibleValues: [
|
|
72
72
|
{
|
|
73
|
-
id: "
|
|
73
|
+
id: "MAIN_CONNECTED",
|
|
74
74
|
label: "descLfConnectedComponentModeMain"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
id: "
|
|
77
|
+
id: "ALL_CONNECTED",
|
|
78
78
|
label: "descLfConnectedComponentModeAll"
|
|
79
79
|
}
|
|
80
80
|
]
|
|
@@ -14,12 +14,12 @@ import "@mui/material";
|
|
|
14
14
|
import "react-intl";
|
|
15
15
|
import "react-hook-form";
|
|
16
16
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
17
|
-
import "notistack";
|
|
18
|
-
import { ComputingType } from "../common/computing-type.js";
|
|
19
17
|
import "localized-countries";
|
|
20
18
|
import "localized-countries/data/fr";
|
|
21
19
|
import "localized-countries/data/en";
|
|
20
|
+
import "notistack";
|
|
22
21
|
import { useParametersBackend, OptionalServicesStatus } from "../../../hooks/use-parameters-backend.js";
|
|
22
|
+
import { ComputingType } from "../common/computing-type.js";
|
|
23
23
|
import "../../overflowableText/OverflowableText.js";
|
|
24
24
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
25
25
|
import "yup";
|
|
@@ -10,14 +10,14 @@ export declare const getBasicLoadFlowParametersFormSchema: () => yup.ObjectSchem
|
|
|
10
10
|
dc: NonNullable<boolean | undefined>;
|
|
11
11
|
balanceType: string;
|
|
12
12
|
countriesToBalance: (string | undefined)[];
|
|
13
|
-
|
|
13
|
+
componentMode: string;
|
|
14
14
|
hvdcAcEmulation: NonNullable<boolean | undefined>;
|
|
15
15
|
}, yup.AnyObject, {
|
|
16
16
|
phaseShifterRegulationOn: undefined;
|
|
17
17
|
dc: undefined;
|
|
18
18
|
balanceType: undefined;
|
|
19
19
|
countriesToBalance: "";
|
|
20
|
-
|
|
20
|
+
componentMode: undefined;
|
|
21
21
|
hvdcAcEmulation: undefined;
|
|
22
22
|
}, "">;
|
|
23
23
|
export declare const getAdvancedLoadFlowParametersFormSchema: () => yup.ObjectSchema<{
|
|
@@ -47,7 +47,7 @@ export declare const getCommonLoadFlowParametersFormSchema: () => yup.ObjectSche
|
|
|
47
47
|
dc?: unknown;
|
|
48
48
|
balanceType?: unknown;
|
|
49
49
|
countriesToBalance?: unknown;
|
|
50
|
-
|
|
50
|
+
componentMode?: unknown;
|
|
51
51
|
hvdcAcEmulation?: unknown;
|
|
52
52
|
voltageInitMode?: unknown;
|
|
53
53
|
useReactiveLimits?: unknown;
|
|
@@ -74,7 +74,7 @@ export declare const getCommonLoadFlowParametersFormSchema: () => yup.ObjectSche
|
|
|
74
74
|
dc: undefined;
|
|
75
75
|
balanceType: undefined;
|
|
76
76
|
countriesToBalance: undefined;
|
|
77
|
-
|
|
77
|
+
componentMode: undefined;
|
|
78
78
|
hvdcAcEmulation: undefined;
|
|
79
79
|
};
|
|
80
80
|
}, "">;
|
|
@@ -33,7 +33,7 @@ import "react-querybuilder";
|
|
|
33
33
|
import "../common/widget/parameter-line-slider.js";
|
|
34
34
|
import { LIMIT_REDUCTIONS_FORM, IST_FORM, LIMIT_DURATION_FORM } from "../common/limitreductions/columns-definitions.js";
|
|
35
35
|
import { toFormValuesLimitReductions } from "../common/limitreductions/limit-reductions-form-util.js";
|
|
36
|
-
import { HVDC_AC_EMULATION,
|
|
36
|
+
import { HVDC_AC_EMULATION, CONNECTED_MODE, COUNTRIES_TO_BALANCE, BALANCE_TYPE, DC, PHASE_SHIFTER_REGULATION_ON, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, DISTRIBUTED_SLACK, WRITE_SLACK_BUS, READ_SLACK_BUS, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, PARAM_PROVIDER_OPENLOADFLOW, PARAM_LIMIT_REDUCTION, DEFAULT_LIMIT_REDUCTION_VALUE } from "./constants.js";
|
|
37
37
|
var TabValues = /* @__PURE__ */ ((TabValues2) => {
|
|
38
38
|
TabValues2["GENERAL"] = "General";
|
|
39
39
|
TabValues2["LIMIT_REDUCTIONS"] = "LimitReductions";
|
|
@@ -45,7 +45,7 @@ const getBasicLoadFlowParametersFormSchema = () => {
|
|
|
45
45
|
[DC]: yup.boolean().required(),
|
|
46
46
|
[BALANCE_TYPE]: yup.string().required(),
|
|
47
47
|
[COUNTRIES_TO_BALANCE]: yup.array().of(yup.string()).required(),
|
|
48
|
-
[
|
|
48
|
+
[CONNECTED_MODE]: yup.string().required(),
|
|
49
49
|
[HVDC_AC_EMULATION]: yup.boolean().required()
|
|
50
50
|
});
|
|
51
51
|
};
|
|
@@ -12,14 +12,14 @@ import "@mui/material";
|
|
|
12
12
|
import "react-intl";
|
|
13
13
|
import "react-hook-form";
|
|
14
14
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
15
|
+
import "localized-countries";
|
|
16
|
+
import "localized-countries/data/fr";
|
|
17
|
+
import "localized-countries/data/en";
|
|
15
18
|
import "notistack";
|
|
16
19
|
import { NetworkVisualizationParametersForm } from "./network-visualizations-form.js";
|
|
17
20
|
import { useNetworkVisualizationParametersForm } from "./use-network-visualizations-parameters-form.js";
|
|
18
21
|
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
19
22
|
import "../../overflowableText/OverflowableText.js";
|
|
20
|
-
import "localized-countries";
|
|
21
|
-
import "localized-countries/data/fr";
|
|
22
|
-
import "localized-countries/data/en";
|
|
23
23
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
24
24
|
import "yup";
|
|
25
25
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
@@ -12,12 +12,12 @@ import "@mui/material";
|
|
|
12
12
|
import "react-intl";
|
|
13
13
|
import "react-hook-form";
|
|
14
14
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
15
|
-
import "notistack";
|
|
16
|
-
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
17
|
-
import "../../overflowableText/OverflowableText.js";
|
|
18
15
|
import "localized-countries";
|
|
19
16
|
import "localized-countries/data/fr";
|
|
20
17
|
import "localized-countries/data/en";
|
|
18
|
+
import "notistack";
|
|
19
|
+
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
20
|
+
import "../../overflowableText/OverflowableText.js";
|
|
21
21
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
22
22
|
import "yup";
|
|
23
23
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
@@ -13,13 +13,13 @@ import "@mui/material";
|
|
|
13
13
|
import "react-intl";
|
|
14
14
|
import "react-hook-form";
|
|
15
15
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
16
|
-
import "notistack";
|
|
17
|
-
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
18
|
-
import "../../overflowableText/OverflowableText.js";
|
|
19
16
|
import "localized-countries";
|
|
20
17
|
import "localized-countries/data/fr";
|
|
21
18
|
import "localized-countries/data/en";
|
|
19
|
+
import "notistack";
|
|
22
20
|
import { useParametersBackend, OptionalServicesStatus } from "../../../hooks/use-parameters-backend.js";
|
|
21
|
+
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
22
|
+
import "../../overflowableText/OverflowableText.js";
|
|
23
23
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
24
24
|
import "yup";
|
|
25
25
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
@@ -12,12 +12,12 @@ import "@mui/material";
|
|
|
12
12
|
import "react-intl";
|
|
13
13
|
import "react-hook-form";
|
|
14
14
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
15
|
-
import "notistack";
|
|
16
|
-
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
17
|
-
import "../../overflowableText/OverflowableText.js";
|
|
18
15
|
import "localized-countries";
|
|
19
16
|
import "localized-countries/data/fr";
|
|
20
17
|
import "localized-countries/data/en";
|
|
18
|
+
import "notistack";
|
|
19
|
+
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
20
|
+
import "../../overflowableText/OverflowableText.js";
|
|
21
21
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
22
22
|
import "yup";
|
|
23
23
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
package/dist/index.js
CHANGED
|
@@ -156,7 +156,7 @@ import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OP
|
|
|
156
156
|
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_ETALAB, MAP_BASEMAP_MAPBOX, NadPositionsGenerationMode, SubstationLayout } from "./components/parameters/network-visualizations/network-visualizations.types.js";
|
|
157
157
|
import { NetworkVisualizationParametersInline } from "./components/parameters/network-visualizations/network-visualizations-parameters-inline.js";
|
|
158
158
|
import { NetworkVisualizationsParametersEditionDialog } from "./components/parameters/network-visualizations/network-visualizations-parameters-dialog.js";
|
|
159
|
-
import { BALANCE_TYPE,
|
|
159
|
+
import { BALANCE_TYPE, CONNECTED_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./components/parameters/loadflow/constants.js";
|
|
160
160
|
import { LoadFlowParametersInline } from "./components/parameters/loadflow/load-flow-parameters-inline.js";
|
|
161
161
|
import { LoadFlowParametersEditionDialog } from "./components/parameters/loadflow/load-flow-parameters-dialog.js";
|
|
162
162
|
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./components/parameters/short-circuit/constants.js";
|
|
@@ -216,7 +216,7 @@ import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, P
|
|
|
216
216
|
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./utils/constants/filterConstant.js";
|
|
217
217
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, unitToKiloUnit, unitToMicroUnit } from "./utils/conversionUtils.js";
|
|
218
218
|
import { catchErrorHandler, snackWithFallback } from "./utils/error.js";
|
|
219
|
-
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
219
|
+
import { areArrayElementsUnique, arraysContainIdenticalStrings, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
220
220
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM } from "./utils/langs.js";
|
|
221
221
|
import { getFileIcon } from "./utils/mapper/getFileIcon.js";
|
|
222
222
|
import { equipmentTypesForPredefinedPropertiesMapper } from "./utils/mapper/equipmentTypesForPredefinedPropertiesMapper.js";
|
|
@@ -332,7 +332,7 @@ export {
|
|
|
332
332
|
COMMON_CONFIG_PARAMS_NAMES,
|
|
333
333
|
COMMON_PARAMETERS,
|
|
334
334
|
COMPONENT_LIBRARY,
|
|
335
|
-
|
|
335
|
+
CONNECTED_MODE,
|
|
336
336
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
337
337
|
CONVERTERS_MODE_OPTIONS,
|
|
338
338
|
COUNTRIES_TO_BALANCE,
|
|
@@ -697,6 +697,7 @@ export {
|
|
|
697
697
|
WRITE_SLACK_BUS,
|
|
698
698
|
alertThresholdMarks,
|
|
699
699
|
areArrayElementsUnique,
|
|
700
|
+
arraysContainIdenticalStrings,
|
|
700
701
|
backendFetch,
|
|
701
702
|
backendFetchFile,
|
|
702
703
|
backendFetchJson,
|
|
@@ -9,5 +9,9 @@
|
|
|
9
9
|
* @returns {number} key
|
|
10
10
|
*/
|
|
11
11
|
export declare function keyGenerator(): () => number;
|
|
12
|
+
/**
|
|
13
|
+
* returns true if the two arrays contain exactly the same strings, regardless of the order
|
|
14
|
+
*/
|
|
15
|
+
export declare function arraysContainIdenticalStrings(array1: string[] | undefined, array2: string[] | undefined): boolean;
|
|
12
16
|
export declare const areArrayElementsUnique: (array: unknown[]) => boolean;
|
|
13
17
|
export declare const isObjectEmpty: (object: object) => boolean;
|
package/dist/utils/functions.js
CHANGED
|
@@ -5,6 +5,9 @@ function keyGenerator() {
|
|
|
5
5
|
return key;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
function arraysContainIdenticalStrings(array1, array2) {
|
|
9
|
+
return array1 !== void 0 && array2 !== void 0 && JSON.stringify([...array1].sort((a, b) => a.localeCompare(b))) === JSON.stringify([...array2].sort((a, b) => a.localeCompare(b)));
|
|
10
|
+
}
|
|
8
11
|
const areArrayElementsUnique = (array) => {
|
|
9
12
|
const uniqueValues = [...new Set(array)];
|
|
10
13
|
return uniqueValues.length === array.length;
|
|
@@ -12,6 +15,7 @@ const areArrayElementsUnique = (array) => {
|
|
|
12
15
|
const isObjectEmpty = (object) => object && Object.keys(object).length === 0;
|
|
13
16
|
export {
|
|
14
17
|
areArrayElementsUnique,
|
|
18
|
+
arraysContainIdenticalStrings,
|
|
15
19
|
isObjectEmpty,
|
|
16
20
|
keyGenerator
|
|
17
21
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, P
|
|
|
7
7
|
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./constants/filterConstant.js";
|
|
8
8
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
|
|
9
9
|
import { catchErrorHandler, snackWithFallback } from "./error.js";
|
|
10
|
-
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./functions.js";
|
|
10
|
+
import { areArrayElementsUnique, arraysContainIdenticalStrings, isObjectEmpty, keyGenerator } from "./functions.js";
|
|
11
11
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM } from "./langs.js";
|
|
12
12
|
import { getFileIcon } from "./mapper/getFileIcon.js";
|
|
13
13
|
import { equipmentTypesForPredefinedPropertiesMapper } from "./mapper/equipmentTypesForPredefinedPropertiesMapper.js";
|
|
@@ -104,6 +104,7 @@ export {
|
|
|
104
104
|
VSC,
|
|
105
105
|
VoltageLevel,
|
|
106
106
|
areArrayElementsUnique,
|
|
107
|
+
arraysContainIdenticalStrings,
|
|
107
108
|
catchErrorHandler,
|
|
108
109
|
convertInputValue,
|
|
109
110
|
convertOutputValue,
|