@gridsuite/commons-ui 0.212.0 → 0.213.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/filter/expert/ExpertFilterForm.d.ts +1 -1
- package/dist/components/filter/expert/ExpertFilterForm.js +2 -13
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +7 -10
- package/dist/components/filter/utils/filterApi.js +3 -3
- package/dist/components/index.js +16 -0
- package/dist/components/network-modification-table/columns-definition.d.ts +0 -2
- package/dist/components/network-modification-table/index.js +16 -0
- package/dist/components/network-modification-table/network-modifications-table.d.ts +8 -2
- package/dist/components/network-modification-table/network-modifications-table.js +33 -8
- package/dist/components/network-modification-table/renderers/cell-renderers.d.ts +23 -0
- package/dist/components/network-modification-table/renderers/cell-renderers.js +103 -0
- package/dist/components/network-modification-table/renderers/description-cell.d.ts +9 -0
- package/dist/components/network-modification-table/renderers/description-cell.js +73 -0
- package/dist/components/network-modification-table/renderers/index.d.ts +4 -0
- package/dist/components/network-modification-table/renderers/index.js +17 -1
- package/dist/components/network-modification-table/renderers/name-cell.d.ts +2 -2
- package/dist/components/network-modification-table/renderers/name-cell.js +28 -9
- package/dist/components/network-modification-table/renderers/root-network-chip-cell.d.ts +13 -0
- package/dist/components/network-modification-table/renderers/root-network-chip-cell.js +138 -0
- package/dist/components/network-modification-table/renderers/select-cell.js +2 -2
- package/dist/components/network-modification-table/renderers/select-header-cell.js +2 -2
- package/dist/components/network-modification-table/renderers/switch-cell.d.ts +9 -0
- package/dist/components/network-modification-table/renderers/switch-cell.js +63 -0
- package/dist/index.js +24 -3
- package/dist/services/index.js +4 -1
- package/dist/services/networkModification.d.ts +8 -1
- package/dist/services/networkModification.js +45 -1
- package/dist/translations/en/filterEn.d.ts +0 -1
- package/dist/translations/en/filterEn.js +0 -1
- package/dist/translations/en/filterExpertEn.d.ts +0 -2
- package/dist/translations/en/filterExpertEn.js +0 -2
- package/dist/translations/en/networkModificationsEn.d.ts +1 -0
- package/dist/translations/en/networkModificationsEn.js +4 -3
- package/dist/translations/fr/filterExpertFr.d.ts +0 -2
- package/dist/translations/fr/filterExpertFr.js +0 -2
- package/dist/translations/fr/filterFr.d.ts +0 -1
- package/dist/translations/fr/filterFr.js +0 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -0
- package/dist/translations/fr/networkModificationsFr.js +4 -3
- package/dist/utils/constants/index.js +2 -1
- package/dist/utils/constants/translationKeys.d.ts +1 -0
- package/dist/utils/constants/translationKeys.js +2 -0
- package/dist/utils/index.js +4 -2
- package/dist/utils/types/equipmentTypes.d.ts +1 -0
- package/dist/utils/types/equipmentTypes.js +5 -1
- package/dist/utils/types/index.js +2 -1
- package/dist/utils/types/network-modification-types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { YUP_REQUIRED, DUPLICATED_PROPS_ERROR } from "../../utils/constants/translationKeys.js";
|
|
1
|
+
import { YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED, DUPLICATED_PROPS_ERROR } from "../../utils/constants/translationKeys.js";
|
|
2
2
|
import "../../utils/conversionUtils.js";
|
|
3
3
|
import "../../utils/types/equipmentType.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
@@ -126,8 +126,9 @@ const networkModificationsEn = {
|
|
|
126
126
|
ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero: "Short-circuit current limit must be greater than or equal to 0",
|
|
127
127
|
ShortCircuitCurrentLimitMinMaxError: "Low short-circuit current limit must be less than or equal to high limit",
|
|
128
128
|
[DUPLICATED_PROPS_ERROR]: "Duplicated properties: each property must be unique",
|
|
129
|
-
[YUP_REQUIRED]: "
|
|
130
|
-
|
|
129
|
+
[YUP_REQUIRED]: "Required",
|
|
130
|
+
[YUP_NOT_TYPE_NUMBER]: "This field only accepts numeric values",
|
|
131
|
+
[YUP_NOT_TYPE_DEFAULT]: "Field value format is incorrect",
|
|
131
132
|
CreateLoad: "Create load",
|
|
132
133
|
loadType: "Type",
|
|
133
134
|
CreateShuntCompensator: "Create shunt compensator (Linear)",
|
|
@@ -185,8 +185,6 @@ export declare const filterExpertFr: {
|
|
|
185
185
|
greaterOrEqual: string;
|
|
186
186
|
lessThan: string;
|
|
187
187
|
lessOrEqual: string;
|
|
188
|
-
YupNotTypeNumber: string;
|
|
189
|
-
YupNotTypeDefault: string;
|
|
190
188
|
changeOperatorMessage: string;
|
|
191
189
|
lowShortCircuitCurrentLimit: string;
|
|
192
190
|
highShortCircuitCurrentLimit: string;
|
|
@@ -179,8 +179,6 @@ const filterExpertFr = {
|
|
|
179
179
|
greaterOrEqual: ">=",
|
|
180
180
|
lessThan: "<",
|
|
181
181
|
lessOrEqual: "<=",
|
|
182
|
-
YupNotTypeNumber: "Ce champ n'accepte que des valeurs numériques",
|
|
183
|
-
YupNotTypeDefault: "La valeur du champ n'est pas au bon format",
|
|
184
182
|
changeOperatorMessage: "L'opérateur sera modifié et s'appliquera sur tous les critères déjà créés dans le groupe.",
|
|
185
183
|
lowShortCircuitCurrentLimit: "Limite ICC min",
|
|
186
184
|
highShortCircuitCurrentLimit: "Limite ICC max",
|
|
@@ -32,7 +32,6 @@ const filterFr = {
|
|
|
32
32
|
AddFreePropCrit: "Ajouter un filtrage par propriété",
|
|
33
33
|
FreeProps: "Propriétés de l'ouvrage",
|
|
34
34
|
SubstationFreeProps: "Propriétés du site de l'ouvrage",
|
|
35
|
-
YupRequired: "Ce champ doit être renseigné",
|
|
36
35
|
filterPropertiesNameUniquenessError: "Il n'est pas possible d'ajouter plusieurs filtres pour la même propriété",
|
|
37
36
|
emptyFilterError: "Le filtre doit contenir au moins un ouvrage",
|
|
38
37
|
distributionKeyWithMissingIdError: "ID manquant avec une clé de répartition définie",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { YUP_REQUIRED, DUPLICATED_PROPS_ERROR } from "../../utils/constants/translationKeys.js";
|
|
1
|
+
import { YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED, DUPLICATED_PROPS_ERROR } from "../../utils/constants/translationKeys.js";
|
|
2
2
|
import "../../utils/conversionUtils.js";
|
|
3
3
|
import "../../utils/types/equipmentType.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
@@ -126,8 +126,9 @@ const networkModificationsFr = {
|
|
|
126
126
|
ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero: "Une limite d'ICC doit être supérieure ou égale à 0",
|
|
127
127
|
ShortCircuitCurrentLimitMinMaxError: "La limite ICC min doit être inférieure ou égale à la limite ICC max",
|
|
128
128
|
[DUPLICATED_PROPS_ERROR]: "Propriétés dupliquées : chaque propriété doit être unique",
|
|
129
|
-
[YUP_REQUIRED]: "
|
|
130
|
-
|
|
129
|
+
[YUP_REQUIRED]: "Obligatoire",
|
|
130
|
+
[YUP_NOT_TYPE_NUMBER]: "Ce champ n'accepte que des valeurs numériques",
|
|
131
|
+
[YUP_NOT_TYPE_DEFAULT]: "La valeur du champ n'est pas au bon format",
|
|
131
132
|
CreateLoad: "Créer une consommation",
|
|
132
133
|
loadType: "Type",
|
|
133
134
|
CreateShuntCompensator: "Créer un moyen de compensation statique (Linéaire)",
|
|
@@ -5,7 +5,7 @@ import { MAX_CHAR_DESCRIPTION } from "./uiConstants.js";
|
|
|
5
5
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./unitsConstants.js";
|
|
6
6
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./configConstants.js";
|
|
7
7
|
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./filterConstant.js";
|
|
8
|
-
import { DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "./translationKeys.js";
|
|
8
|
+
import { DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "./translationKeys.js";
|
|
9
9
|
export {
|
|
10
10
|
AMPERE,
|
|
11
11
|
ActivePowerAdornment,
|
|
@@ -44,6 +44,7 @@ export {
|
|
|
44
44
|
SIEMENS,
|
|
45
45
|
SusceptanceAdornment,
|
|
46
46
|
VoltageAdornment,
|
|
47
|
+
YUP_NOT_TYPE_DEFAULT,
|
|
47
48
|
YUP_NOT_TYPE_NUMBER,
|
|
48
49
|
YUP_REQUIRED
|
|
49
50
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const YUP_REQUIRED = "YupRequired";
|
|
2
2
|
const YUP_NOT_TYPE_NUMBER = "YupNotTypeNumber";
|
|
3
|
+
const YUP_NOT_TYPE_DEFAULT = "YupNotTypeDefault";
|
|
3
4
|
const DUPLICATED_PROPS_ERROR = "DuplicatedPropsError";
|
|
4
5
|
export {
|
|
5
6
|
DUPLICATED_PROPS_ERROR,
|
|
7
|
+
YUP_NOT_TYPE_DEFAULT,
|
|
6
8
|
YUP_NOT_TYPE_NUMBER,
|
|
7
9
|
YUP_REQUIRED
|
|
8
10
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { MAX_CHAR_DESCRIPTION } from "./constants/uiConstants.js";
|
|
|
6
6
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./constants/unitsConstants.js";
|
|
7
7
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./constants/configConstants.js";
|
|
8
8
|
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./constants/filterConstant.js";
|
|
9
|
-
import { DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "./constants/translationKeys.js";
|
|
9
|
+
import { DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "./constants/translationKeys.js";
|
|
10
10
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
|
|
11
11
|
import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./error.js";
|
|
12
12
|
import { areArrayElementsUnique, arraysContainIdenticalStrings, isEmpty, isObjectEmpty, keyGenerator } from "./functions.js";
|
|
@@ -22,7 +22,7 @@ import { ProblemDetailError } from "./types/ProblemDetailError.js";
|
|
|
22
22
|
import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
|
|
23
23
|
import { ElementType } from "./types/elementType.js";
|
|
24
24
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, 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
|
-
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./types/equipmentTypes.js";
|
|
25
|
+
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./types/equipmentTypes.js";
|
|
26
26
|
import { AnnouncementSeverity, ArrayAction } from "./types/types.js";
|
|
27
27
|
import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
|
|
28
28
|
import { FieldType } from "./types/fieldType.js";
|
|
@@ -136,6 +136,7 @@ export {
|
|
|
136
136
|
VSC,
|
|
137
137
|
VoltageAdornment,
|
|
138
138
|
VoltageLevel,
|
|
139
|
+
YUP_NOT_TYPE_DEFAULT,
|
|
139
140
|
YUP_NOT_TYPE_NUMBER,
|
|
140
141
|
YUP_REQUIRED,
|
|
141
142
|
areArrayElementsUnique,
|
|
@@ -162,6 +163,7 @@ export {
|
|
|
162
163
|
getObjectId,
|
|
163
164
|
isBlankOrEmpty,
|
|
164
165
|
isEmpty,
|
|
166
|
+
isInjection,
|
|
165
167
|
isObjectEmpty,
|
|
166
168
|
keyGenerator,
|
|
167
169
|
kiloUnitToUnit,
|
|
@@ -37,6 +37,9 @@ const Substation = {
|
|
|
37
37
|
label: "Substations",
|
|
38
38
|
type: "SUBSTATION"
|
|
39
39
|
};
|
|
40
|
+
function isInjection(equipmentType) {
|
|
41
|
+
return equipmentType === Generator.type || equipmentType === Load.type || equipmentType === Battery.type;
|
|
42
|
+
}
|
|
40
43
|
export {
|
|
41
44
|
Battery,
|
|
42
45
|
BoundaryLine,
|
|
@@ -52,5 +55,6 @@ export {
|
|
|
52
55
|
ThreeWindingTransfo,
|
|
53
56
|
TwoWindingTransfo,
|
|
54
57
|
VSC,
|
|
55
|
-
VoltageLevel
|
|
58
|
+
VoltageLevel,
|
|
59
|
+
isInjection
|
|
56
60
|
};
|
|
@@ -3,7 +3,7 @@ import { ProblemDetailError } from "./ProblemDetailError.js";
|
|
|
3
3
|
import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
|
|
4
4
|
import { ElementType } from "./elementType.js";
|
|
5
5
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, 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
|
-
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./equipmentTypes.js";
|
|
6
|
+
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./equipmentTypes.js";
|
|
7
7
|
import { AnnouncementSeverity, ArrayAction } from "./types.js";
|
|
8
8
|
import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
|
|
9
9
|
import { FieldType } from "./fieldType.js";
|
|
@@ -69,6 +69,7 @@ export {
|
|
|
69
69
|
getConnectionDirectionLabel,
|
|
70
70
|
getEquipmentsInfosForSearchBar,
|
|
71
71
|
getLoadTypeLabel,
|
|
72
|
+
isInjection,
|
|
72
73
|
mapPccMinParameters,
|
|
73
74
|
mapSensitivityAnalysisParameters
|
|
74
75
|
};
|