@gridsuite/commons-ui 0.178.0 → 0.180.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.js +79 -1
- package/dist/components/inputs/index.js +2 -0
- package/dist/components/inputs/reactHookForm/CheckboxNullableInput.d.ts +15 -0
- package/dist/components/inputs/reactHookForm/CheckboxNullableInput.js +75 -0
- package/dist/components/inputs/reactHookForm/index.d.ts +1 -0
- package/dist/components/inputs/reactHookForm/index.js +2 -0
- package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.d.ts +7 -0
- package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.js +63 -0
- package/dist/components/network-modifications/common/connectivity/ConnectivityForm.d.ts +37 -0
- package/dist/components/network-modifications/common/connectivity/ConnectivityForm.js +267 -0
- package/dist/components/network-modifications/common/connectivity/connectivity.type.d.ts +34 -0
- package/dist/components/network-modifications/common/connectivity/connectivity.type.js +1 -0
- package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.d.ts +241 -0
- package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.js +196 -0
- package/dist/components/network-modifications/common/connectivity/index.d.ts +10 -0
- package/dist/components/network-modifications/common/connectivity/index.js +25 -0
- package/dist/components/network-modifications/common/index.d.ts +4 -1
- package/dist/components/network-modifications/common/index.js +56 -1
- package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.d.ts +2 -0
- package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +37 -0
- package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.d.ts +9 -0
- package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.js +52 -0
- package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.d.ts +2 -0
- package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +74 -0
- package/dist/components/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +56 -0
- package/dist/components/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +69 -0
- package/dist/components/network-modifications/common/measurements/index.d.ts +13 -0
- package/dist/components/network-modifications/common/measurements/index.js +26 -0
- package/dist/components/network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.d.ts +58 -0
- package/dist/components/network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.js +55 -0
- package/dist/components/network-modifications/common/measurements/measurement.type.d.ts +13 -0
- package/dist/components/network-modifications/common/measurements/measurement.type.js +1 -0
- package/dist/components/network-modifications/common/measurements/powerWithValidity.utils.d.ts +22 -0
- package/dist/components/network-modifications/common/measurements/powerWithValidity.utils.js +36 -0
- package/dist/components/network-modifications/common/setpoints/SetPointsForm.d.ts +15 -0
- package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +71 -0
- package/dist/components/network-modifications/common/setpoints/index.d.ts +8 -0
- package/dist/components/network-modifications/common/setpoints/index.js +10 -0
- package/dist/components/network-modifications/common/setpoints/setPoints.utils.d.ts +16 -0
- package/dist/components/network-modifications/common/setpoints/setPoints.utils.js +62 -0
- package/dist/components/network-modifications/index.d.ts +1 -0
- package/dist/components/network-modifications/index.js +71 -1
- package/dist/components/network-modifications/load/common/LoadDialogHeader.d.ts +7 -0
- package/dist/components/network-modifications/load/common/LoadDialogHeader.js +103 -0
- package/dist/components/network-modifications/load/common/LoadDialogTabs.d.ts +14 -0
- package/dist/components/network-modifications/load/common/LoadDialogTabs.js +49 -0
- package/dist/components/network-modifications/load/common/LoadDialogTabsContent.d.ts +8 -0
- package/dist/components/network-modifications/load/common/LoadDialogTabsContent.js +61 -0
- package/dist/components/network-modifications/load/common/LoadForm.d.ts +5 -0
- package/dist/components/network-modifications/load/common/LoadForm.js +73 -0
- package/dist/components/network-modifications/load/common/index.d.ts +12 -0
- package/dist/components/network-modifications/load/common/index.js +12 -0
- package/dist/components/network-modifications/load/common/load.types.d.ts +16 -0
- package/dist/components/network-modifications/load/common/load.types.js +1 -0
- package/dist/components/network-modifications/load/common/load.utils.d.ts +11 -0
- package/dist/components/network-modifications/load/common/load.utils.js +8 -0
- package/dist/components/network-modifications/load/creation/index.d.ts +8 -0
- package/dist/components/network-modifications/load/creation/index.js +7 -0
- package/dist/components/network-modifications/load/creation/loadCreation.types.d.ts +16 -0
- package/dist/components/network-modifications/load/creation/loadCreation.types.js +1 -0
- package/dist/components/network-modifications/load/creation/loadCreation.utils.d.ts +53 -0
- package/dist/components/network-modifications/load/creation/loadCreation.utils.js +98 -0
- package/dist/components/network-modifications/load/index.d.ts +8 -0
- package/dist/components/network-modifications/load/index.js +17 -0
- package/dist/components/network-modifications/substation/creation/substationCreation.utils.js +2 -1
- package/dist/components/network-modifications/voltage-level/creation/substation-creation/SubstationAutocompleteAddButton.js +3 -0
- package/dist/components/network-modifications/voltage-level/index.d.ts +1 -0
- package/dist/components/network-modifications/voltage-level/voltage-level.type.d.ts +12 -0
- package/dist/components/network-modifications/voltage-level/voltage-level.type.js +1 -0
- package/dist/components/parameters/common/utils.d.ts +25 -2
- package/dist/components/parameters/common/utils.js +40 -1
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.d.ts +2 -18
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +2 -38
- package/dist/components/parameters/dynamic-security-analysis/constants.d.ts +9 -0
- package/dist/components/parameters/dynamic-security-analysis/constants.js +8 -0
- package/dist/components/parameters/dynamic-security-analysis/contingency-parameters.d.ts +10 -0
- package/dist/components/parameters/dynamic-security-analysis/contingency-parameters.js +65 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.d.ts +10 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +130 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +9 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +103 -0
- package/dist/components/parameters/dynamic-security-analysis/index.d.ts +8 -0
- package/dist/components/parameters/dynamic-security-analysis/index.js +8 -0
- package/dist/components/parameters/dynamic-security-analysis/scenario-parameters.d.ts +10 -0
- package/dist/components/parameters/dynamic-security-analysis/scenario-parameters.js +16 -0
- package/dist/components/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.d.ts +51 -0
- package/dist/components/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +181 -0
- package/dist/components/parameters/index.d.ts +1 -0
- package/dist/components/parameters/index.js +6 -0
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +24 -4
- package/dist/components/parameters/util/make-component-utils.d.ts +17 -0
- package/dist/components/parameters/util/make-component-utils.js +96 -0
- package/dist/components/parameters/util/styles.d.ts +38 -0
- package/dist/components/parameters/util/styles.js +41 -0
- package/dist/index.js +95 -4
- package/dist/services/dynamic-security-analysis.d.ts +4 -0
- package/dist/services/dynamic-security-analysis.js +29 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +6 -1
- package/dist/services/sensitivity-analysis.d.ts +1 -1
- package/dist/services/sensitivity-analysis.js +3 -2
- package/dist/services/utils.d.ts +2 -0
- package/dist/services/utils.js +3 -0
- package/dist/translations/en/networkModificationsEn.d.ts +17 -0
- package/dist/translations/en/networkModificationsEn.js +18 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +17 -0
- package/dist/translations/fr/networkModificationsFr.js +18 -1
- package/dist/utils/constants/fieldConstants.d.ts +24 -1
- package/dist/utils/constants/fieldConstants.js +24 -1
- package/dist/utils/index.js +10 -2
- package/dist/utils/ts-utils.d.ts +5 -6
- package/dist/utils/ts-utils.js +11 -0
- package/dist/utils/types/elementType.d.ts +1 -0
- package/dist/utils/types/elementType.js +1 -0
- package/dist/utils/types/equipmentType.d.ts +18 -0
- package/dist/utils/types/equipmentType.js +27 -1
- package/dist/utils/types/index.js +8 -2
- package/package.json +1 -1
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
var FieldConstants = /* @__PURE__ */ ((FieldConstants2) => {
|
|
2
|
+
FieldConstants2["ACTIVE_POWER_SET_POINT"] = "activePowerSetpoint";
|
|
2
3
|
FieldConstants2["ADDED"] = "added";
|
|
3
4
|
FieldConstants2["ADDITIONAL_PROPERTIES"] = "AdditionalProperties";
|
|
4
5
|
FieldConstants2["AG_GRID_ROW_UUID"] = "agGridRowUuid";
|
|
5
6
|
FieldConstants2["API_CALL"] = "apiCall";
|
|
7
|
+
FieldConstants2["BUS_OR_BUSBAR_SECTION"] = "busOrBusbarSection";
|
|
6
8
|
FieldConstants2["CASE_FILE"] = "caseFile";
|
|
7
9
|
FieldConstants2["CASE_FORMAT"] = "caseFormat";
|
|
8
10
|
FieldConstants2["CASE_NAME"] = "caseName";
|
|
9
11
|
FieldConstants2["CASE_UUID"] = "caseUuid";
|
|
12
|
+
FieldConstants2["CONNECTED"] = "terminalConnected";
|
|
13
|
+
FieldConstants2["CONNECTION_DIRECTION"] = "connectionDirection";
|
|
14
|
+
FieldConstants2["CONNECTION_NAME"] = "connectionName";
|
|
15
|
+
FieldConstants2["CONNECTION_POSITION"] = "connectionPosition";
|
|
16
|
+
FieldConstants2["CONNECTIVITY"] = "connectivity";
|
|
17
|
+
FieldConstants2["CONNECTIVITY_1"] = "connectivity1";
|
|
18
|
+
FieldConstants2["CONNECTIVITY_2"] = "connectivity2";
|
|
10
19
|
FieldConstants2["CONTINGENCY_LIST_TYPE"] = "contingencyListType";
|
|
11
20
|
FieldConstants2["CONTINGENCY_NAME"] = "contingencyName";
|
|
12
21
|
FieldConstants2["COUNTRIES_1"] = "countries1";
|
|
@@ -29,23 +38,37 @@ var FieldConstants = /* @__PURE__ */ ((FieldConstants2) => {
|
|
|
29
38
|
FieldConstants2["FOLDER_NAME"] = "folderName";
|
|
30
39
|
FieldConstants2["FORMATTED_CASE_PARAMETERS"] = "formattedCaseParameters";
|
|
31
40
|
FieldConstants2["ID"] = "id";
|
|
41
|
+
FieldConstants2["LOAD_TYPE"] = "loadType";
|
|
42
|
+
FieldConstants2["MAXIMUM_ACTIVE_POWER"] = "maximumActivePower";
|
|
43
|
+
FieldConstants2["MEASUREMENT_P"] = "measurementP";
|
|
44
|
+
FieldConstants2["MEASUREMENT_P1"] = "measurementP1";
|
|
45
|
+
FieldConstants2["MEASUREMENT_P2"] = "measurementP2";
|
|
46
|
+
FieldConstants2["MEASUREMENT_Q"] = "measurementQ";
|
|
47
|
+
FieldConstants2["MEASUREMENT_Q1"] = "measurementQ1";
|
|
48
|
+
FieldConstants2["MEASUREMENT_Q2"] = "measurementQ2";
|
|
49
|
+
FieldConstants2["MINIMUM_ACTIVE_POWER"] = "minimumActivePower";
|
|
32
50
|
FieldConstants2["NAME"] = "name";
|
|
33
51
|
FieldConstants2["NOMINAL_VOLTAGE_1"] = "nominalVoltage1";
|
|
34
52
|
FieldConstants2["NOMINAL_VOLTAGE_2"] = "nominalVoltage2";
|
|
35
53
|
FieldConstants2["NOMINAL_VOLTAGE_3"] = "nominalVoltage3";
|
|
36
54
|
FieldConstants2["NOMINAL_VOLTAGE"] = "nominalVoltage";
|
|
37
55
|
FieldConstants2["OPERATION_TYPE"] = "type";
|
|
38
|
-
FieldConstants2["TYPE"] = "type";
|
|
39
56
|
FieldConstants2["PREVIOUS_VALUE"] = "previousValue";
|
|
40
57
|
FieldConstants2["PROPERTY_NAME"] = "propertyName";
|
|
41
58
|
FieldConstants2["PROPERTY_OPERATOR"] = "propertyOperator";
|
|
42
59
|
FieldConstants2["PROPERTY"] = "PROPERTY";
|
|
43
60
|
FieldConstants2["PROPERTY_VALUES"] = "propertyValues";
|
|
61
|
+
FieldConstants2["REACTIVE_POWER_SET_POINT"] = "reactivePowerSetpoint";
|
|
44
62
|
FieldConstants2["SCRIPT"] = "script";
|
|
63
|
+
FieldConstants2["STATE_ESTIMATION"] = "stateEstimation";
|
|
45
64
|
FieldConstants2["STUDY_NAME"] = "studyName";
|
|
65
|
+
FieldConstants2["TYPE"] = "type";
|
|
66
|
+
FieldConstants2["VALIDITY"] = "validity";
|
|
46
67
|
FieldConstants2["VALUE"] = "value";
|
|
47
68
|
FieldConstants2["VALUE_1"] = "value1";
|
|
48
69
|
FieldConstants2["VALUE_2"] = "value2";
|
|
70
|
+
FieldConstants2["VOLTAGE_LEVEL"] = "voltageLevel";
|
|
71
|
+
FieldConstants2["VOLTAGE_REGULATION"] = "voltageRegulation";
|
|
49
72
|
FieldConstants2["SWITCH_KINDS"] = "switchKinds";
|
|
50
73
|
FieldConstants2["SWITCH_KIND"] = "switchKind";
|
|
51
74
|
FieldConstants2["ADD_SUBSTATION_CREATION"] = "addSubstationCreationId";
|
package/dist/utils/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { CustomError } from "./types/CustomError.js";
|
|
|
21
21
|
import { ProblemDetailError } from "./types/ProblemDetailError.js";
|
|
22
22
|
import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
|
|
23
23
|
import { ElementType } from "./types/elementType.js";
|
|
24
|
-
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
|
|
24
|
+
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./types/equipmentType.js";
|
|
25
25
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./types/equipmentTypes.js";
|
|
26
26
|
import { AnnouncementSeverity, ArrayAction } from "./types/types.js";
|
|
27
27
|
import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
|
|
@@ -31,7 +31,7 @@ import { SolverTypeInfos } from "./types/dynamic-simulation.type.js";
|
|
|
31
31
|
import { DistributionType, SensitivityType } from "./types/sensitivity-analysis.type.js";
|
|
32
32
|
import { CalculationType, LoadModelsRule } from "./types/dynamic-margin-calculation.type.js";
|
|
33
33
|
import { OperationType } from "./types/network-modification-types.js";
|
|
34
|
-
import { getIdOrSelf, notNull, notUndefined, parseIntData, removeNullFields, sanitizeString } from "./ts-utils.js";
|
|
34
|
+
import { areIdsEqual, getIdOrSelf, getObjectId, notNull, notUndefined, parseIntData, removeNullFields, sanitizeString } from "./ts-utils.js";
|
|
35
35
|
import { toNumber, validateValueIsANumber } from "./validation-functions.js";
|
|
36
36
|
import "./yupConfig.js";
|
|
37
37
|
import * as yup from "yup";
|
|
@@ -47,6 +47,7 @@ export {
|
|
|
47
47
|
BusBar,
|
|
48
48
|
COMMON_APP_NAME,
|
|
49
49
|
COMMON_CONFIG_PARAMS_NAMES,
|
|
50
|
+
CONNECTION_DIRECTIONS,
|
|
50
51
|
CalculationType,
|
|
51
52
|
CustomError,
|
|
52
53
|
DARK_THEME,
|
|
@@ -79,6 +80,7 @@ export {
|
|
|
79
80
|
LAST_SELECTED_DIRECTORY,
|
|
80
81
|
LCC,
|
|
81
82
|
LIGHT_THEME,
|
|
83
|
+
LOAD_TYPES,
|
|
82
84
|
Line,
|
|
83
85
|
Load,
|
|
84
86
|
LoadModelsRule,
|
|
@@ -119,12 +121,15 @@ export {
|
|
|
119
121
|
TYPE_TAG_MAX_SIZE,
|
|
120
122
|
ThreeWindingTransfo,
|
|
121
123
|
TwoWindingTransfo,
|
|
124
|
+
UNDEFINED_CONNECTION_DIRECTION,
|
|
125
|
+
UNDEFINED_LOAD_TYPE,
|
|
122
126
|
VL_TAG_MAX_SIZE,
|
|
123
127
|
VSC,
|
|
124
128
|
VoltageAdornment,
|
|
125
129
|
VoltageLevel,
|
|
126
130
|
YUP_REQUIRED,
|
|
127
131
|
areArrayElementsUnique,
|
|
132
|
+
areIdsEqual,
|
|
128
133
|
arraysContainIdenticalStrings,
|
|
129
134
|
catchErrorHandler,
|
|
130
135
|
convertInputValue,
|
|
@@ -134,10 +139,13 @@ export {
|
|
|
134
139
|
equipmentStyles,
|
|
135
140
|
equipmentTypesForPredefinedPropertiesMapper,
|
|
136
141
|
extractErrorMessageDescriptor,
|
|
142
|
+
getConnectionDirectionLabel,
|
|
137
143
|
getEquipmentTypeShortLabel,
|
|
138
144
|
getEquipmentsInfosForSearchBar,
|
|
139
145
|
getFileIcon,
|
|
140
146
|
getIdOrSelf,
|
|
147
|
+
getLoadTypeLabel,
|
|
148
|
+
getObjectId,
|
|
141
149
|
isBlankOrEmpty,
|
|
142
150
|
isEmpty,
|
|
143
151
|
isObjectEmpty,
|
package/dist/utils/ts-utils.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
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
|
-
*/
|
|
1
|
+
import { Option } from './types';
|
|
7
2
|
export type Nullable<T> = {
|
|
8
3
|
[K in keyof T]: T[K] | null;
|
|
9
4
|
};
|
|
@@ -16,3 +11,7 @@ export declare function removeNullFields<T extends Record<string, any>>(data: T)
|
|
|
16
11
|
export declare function parseIntData(val: string | number, defaultValue: string | number): string | number;
|
|
17
12
|
export declare function sanitizeString(val: string | null | undefined): string | null;
|
|
18
13
|
export declare const getIdOrSelf: (e: any) => any;
|
|
14
|
+
export declare const areIdsEqual: (val1: Option, val2: Option) => boolean;
|
|
15
|
+
export declare const getObjectId: (object: string | {
|
|
16
|
+
id: string;
|
|
17
|
+
}) => string;
|
package/dist/utils/ts-utils.js
CHANGED
|
@@ -27,8 +27,19 @@ function sanitizeString(val) {
|
|
|
27
27
|
return trimmedValue === void 0 || trimmedValue === "" ? null : trimmedValue;
|
|
28
28
|
}
|
|
29
29
|
const getIdOrSelf = (e) => e?.id ?? e;
|
|
30
|
+
const areIdsEqual = (val1, val2) => {
|
|
31
|
+
if (typeof val1 !== "string" && typeof val2 !== "string") {
|
|
32
|
+
return val1.id === val2.id;
|
|
33
|
+
}
|
|
34
|
+
return val1 === val2;
|
|
35
|
+
};
|
|
36
|
+
const getObjectId = (object) => {
|
|
37
|
+
return typeof object === "string" ? object : object?.id ?? null;
|
|
38
|
+
};
|
|
30
39
|
export {
|
|
40
|
+
areIdsEqual,
|
|
31
41
|
getIdOrSelf,
|
|
42
|
+
getObjectId,
|
|
32
43
|
notNull,
|
|
33
44
|
notUndefined,
|
|
34
45
|
parseIntData,
|
|
@@ -21,6 +21,7 @@ export declare enum ElementType {
|
|
|
21
21
|
SENSITIVITY_PARAMETERS = "SENSITIVITY_PARAMETERS",
|
|
22
22
|
SHORT_CIRCUIT_PARAMETERS = "SHORT_CIRCUIT_PARAMETERS",
|
|
23
23
|
DYNAMIC_MARGIN_CALCULATION_PARAMETERS = "DYNAMIC_MARGIN_CALCULATION_PARAMETERS",
|
|
24
|
+
DYNAMIC_SECURITY_ANALYSIS_PARAMETERS = "DYNAMIC_SECURITY_ANALYSIS_PARAMETERS",
|
|
24
25
|
NETWORK_VISUALIZATIONS_PARAMETERS = "NETWORK_VISUALIZATIONS_PARAMETERS",
|
|
25
26
|
SPREADSHEET_CONFIG = "SPREADSHEET_CONFIG",
|
|
26
27
|
SPREADSHEET_CONFIG_COLLECTION = "SPREADSHEET_CONFIG_COLLECTION",
|
|
@@ -12,6 +12,7 @@ var ElementType = /* @__PURE__ */ ((ElementType2) => {
|
|
|
12
12
|
ElementType2["SENSITIVITY_PARAMETERS"] = "SENSITIVITY_PARAMETERS";
|
|
13
13
|
ElementType2["SHORT_CIRCUIT_PARAMETERS"] = "SHORT_CIRCUIT_PARAMETERS";
|
|
14
14
|
ElementType2["DYNAMIC_MARGIN_CALCULATION_PARAMETERS"] = "DYNAMIC_MARGIN_CALCULATION_PARAMETERS";
|
|
15
|
+
ElementType2["DYNAMIC_SECURITY_ANALYSIS_PARAMETERS"] = "DYNAMIC_SECURITY_ANALYSIS_PARAMETERS";
|
|
15
16
|
ElementType2["NETWORK_VISUALIZATIONS_PARAMETERS"] = "NETWORK_VISUALIZATIONS_PARAMETERS";
|
|
16
17
|
ElementType2["SPREADSHEET_CONFIG"] = "SPREADSHEET_CONFIG";
|
|
17
18
|
ElementType2["SPREADSHEET_CONFIG_COLLECTION"] = "SPREADSHEET_CONFIG_COLLECTION";
|
|
@@ -67,6 +67,24 @@ export declare enum HvdcType {
|
|
|
67
67
|
LCC = "LCC",
|
|
68
68
|
VSC = "VSC"
|
|
69
69
|
}
|
|
70
|
+
export declare const LOAD_TYPES: {
|
|
71
|
+
id: string;
|
|
72
|
+
label: string;
|
|
73
|
+
}[];
|
|
74
|
+
export declare const UNDEFINED_LOAD_TYPE = "UNDEFINED";
|
|
75
|
+
export declare function getLoadTypeLabel(loadTypeId: string): string | undefined;
|
|
76
|
+
export declare const UNDEFINED_CONNECTION_DIRECTION = "UNDEFINED";
|
|
77
|
+
export declare const CONNECTION_DIRECTIONS: readonly [{
|
|
78
|
+
readonly id: "TOP";
|
|
79
|
+
readonly label: "Top";
|
|
80
|
+
}, {
|
|
81
|
+
readonly id: "BOTTOM";
|
|
82
|
+
readonly label: "Bottom";
|
|
83
|
+
}, {
|
|
84
|
+
readonly id: "UNDEFINED";
|
|
85
|
+
readonly label: "Undefined";
|
|
86
|
+
}];
|
|
87
|
+
export declare function getConnectionDirectionLabel(connectionDirectionId: string | null | undefined): "Top" | "Bottom" | "Undefined" | undefined;
|
|
70
88
|
export declare enum ExtendedEquipmentType {
|
|
71
89
|
HVDC_LINE_LCC = "HVDC_LINE_LCC",
|
|
72
90
|
HVDC_LINE_VSC = "HVDC_LINE_VSC"
|
|
@@ -63,6 +63,26 @@ var HvdcType = /* @__PURE__ */ ((HvdcType2) => {
|
|
|
63
63
|
HvdcType2["VSC"] = "VSC";
|
|
64
64
|
return HvdcType2;
|
|
65
65
|
})(HvdcType || {});
|
|
66
|
+
const LOAD_TYPES = [
|
|
67
|
+
{ id: "AUXILIARY", label: "Auxiliary" },
|
|
68
|
+
{ id: "FICTITIOUS", label: "Fictitious" }
|
|
69
|
+
];
|
|
70
|
+
const UNDEFINED_LOAD_TYPE = "UNDEFINED";
|
|
71
|
+
function getLoadTypeLabel(loadTypeId) {
|
|
72
|
+
return LOAD_TYPES.find(({ id }) => id === loadTypeId)?.label;
|
|
73
|
+
}
|
|
74
|
+
const UNDEFINED_CONNECTION_DIRECTION = "UNDEFINED";
|
|
75
|
+
const CONNECTION_DIRECTIONS = [
|
|
76
|
+
{ id: "TOP", label: "Top" },
|
|
77
|
+
{ id: "BOTTOM", label: "Bottom" },
|
|
78
|
+
{ id: UNDEFINED_CONNECTION_DIRECTION, label: "Undefined" }
|
|
79
|
+
];
|
|
80
|
+
function getConnectionDirectionLabel(connectionDirectionId) {
|
|
81
|
+
if (connectionDirectionId === UNDEFINED_CONNECTION_DIRECTION) {
|
|
82
|
+
return "Undefined";
|
|
83
|
+
}
|
|
84
|
+
return CONNECTION_DIRECTIONS.find(({ id }) => id === connectionDirectionId)?.label;
|
|
85
|
+
}
|
|
66
86
|
var ExtendedEquipmentType = /* @__PURE__ */ ((ExtendedEquipmentType2) => {
|
|
67
87
|
ExtendedEquipmentType2["HVDC_LINE_LCC"] = "HVDC_LINE_LCC";
|
|
68
88
|
ExtendedEquipmentType2["HVDC_LINE_VSC"] = "HVDC_LINE_VSC";
|
|
@@ -375,13 +395,19 @@ function getEquipmentsInfosForSearchBar(equipmentsInfos, getNameOrId) {
|
|
|
375
395
|
export {
|
|
376
396
|
ALL_EQUIPMENTS,
|
|
377
397
|
BASE_EQUIPMENTS,
|
|
398
|
+
CONNECTION_DIRECTIONS,
|
|
378
399
|
EquipmentType,
|
|
379
400
|
ExtendedEquipmentType,
|
|
380
401
|
HvdcType,
|
|
402
|
+
LOAD_TYPES,
|
|
381
403
|
OperatingStatus,
|
|
382
404
|
SEARCH_EQUIPMENTS,
|
|
383
405
|
TYPE_TAG_MAX_SIZE,
|
|
406
|
+
UNDEFINED_CONNECTION_DIRECTION,
|
|
407
|
+
UNDEFINED_LOAD_TYPE,
|
|
384
408
|
VL_TAG_MAX_SIZE,
|
|
385
409
|
equipmentStyles,
|
|
386
|
-
|
|
410
|
+
getConnectionDirectionLabel,
|
|
411
|
+
getEquipmentsInfosForSearchBar,
|
|
412
|
+
getLoadTypeLabel
|
|
387
413
|
};
|
|
@@ -2,7 +2,7 @@ import { CustomError } from "./CustomError.js";
|
|
|
2
2
|
import { ProblemDetailError } from "./ProblemDetailError.js";
|
|
3
3
|
import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
|
|
4
4
|
import { ElementType } from "./elementType.js";
|
|
5
|
-
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
|
|
5
|
+
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./equipmentType.js";
|
|
6
6
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./equipmentTypes.js";
|
|
7
7
|
import { AnnouncementSeverity, ArrayAction } from "./types.js";
|
|
8
8
|
import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
|
|
@@ -19,6 +19,7 @@ export {
|
|
|
19
19
|
BASE_EQUIPMENTS,
|
|
20
20
|
Battery,
|
|
21
21
|
BusBar,
|
|
22
|
+
CONNECTION_DIRECTIONS,
|
|
22
23
|
CalculationType,
|
|
23
24
|
CustomError,
|
|
24
25
|
DanglingLine,
|
|
@@ -31,6 +32,7 @@ export {
|
|
|
31
32
|
Hvdc,
|
|
32
33
|
HvdcType,
|
|
33
34
|
LCC,
|
|
35
|
+
LOAD_TYPES,
|
|
34
36
|
Line,
|
|
35
37
|
Load,
|
|
36
38
|
LoadModelsRule,
|
|
@@ -50,9 +52,13 @@ export {
|
|
|
50
52
|
TYPE_TAG_MAX_SIZE,
|
|
51
53
|
ThreeWindingTransfo,
|
|
52
54
|
TwoWindingTransfo,
|
|
55
|
+
UNDEFINED_CONNECTION_DIRECTION,
|
|
56
|
+
UNDEFINED_LOAD_TYPE,
|
|
53
57
|
VL_TAG_MAX_SIZE,
|
|
54
58
|
VSC,
|
|
55
59
|
VoltageLevel,
|
|
56
60
|
equipmentStyles,
|
|
57
|
-
|
|
61
|
+
getConnectionDirectionLabel,
|
|
62
|
+
getEquipmentsInfosForSearchBar,
|
|
63
|
+
getLoadTypeLabel
|
|
58
64
|
};
|