@gridsuite/commons-ui 0.107.1 → 0.109.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/dialogs/elementSaveDialog/ElementSaveDialog.js +10 -10
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.d.ts +13 -0
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +69 -0
- package/dist/components/dnd-table/dnd-table-bottom-left-buttons.d.ts +17 -0
- package/dist/components/dnd-table/dnd-table-bottom-left-buttons.js +48 -0
- package/dist/components/dnd-table/dnd-table-bottom-right-buttons.d.ts +17 -0
- package/dist/components/dnd-table/dnd-table-bottom-right-buttons.js +104 -0
- package/dist/components/dnd-table/dnd-table.d.ts +28 -0
- package/dist/components/dnd-table/dnd-table.js +394 -0
- package/dist/components/dnd-table/dnd-table.type.d.ts +51 -0
- package/dist/components/dnd-table/dnd-table.type.js +16 -0
- package/dist/components/dnd-table/index.d.ts +11 -0
- package/dist/components/dnd-table/index.js +14 -0
- package/dist/components/filter/HeaderFilterForm.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +60 -4
- package/dist/components/inputs/index.js +6 -0
- package/dist/components/inputs/reactHookForm/chip-items-input.d.ts +13 -0
- package/dist/components/inputs/reactHookForm/chip-items-input.js +129 -0
- package/dist/components/inputs/reactHookForm/index.d.ts +2 -0
- package/dist/components/inputs/reactHookForm/index.js +6 -0
- package/dist/components/inputs/reactHookForm/tableInputs/index.d.ts +8 -0
- package/dist/components/inputs/reactHookForm/tableInputs/index.js +6 -0
- package/dist/components/inputs/reactHookForm/tableInputs/table-numerical-input.d.ts +12 -0
- package/dist/components/inputs/reactHookForm/tableInputs/table-numerical-input.js +110 -0
- package/dist/components/inputs/reactHookForm/tableInputs/table-text-input.d.ts +8 -0
- package/dist/components/inputs/reactHookForm/tableInputs/table-text-input.js +43 -0
- package/dist/components/parameters/common/ProviderParam.js +6 -6
- package/dist/components/parameters/common/constant.d.ts +8 -0
- package/dist/components/parameters/common/constant.js +12 -1
- package/dist/components/parameters/common/index.js +3 -1
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +7 -7
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +6 -6
- package/dist/components/parameters/common/name-element-editor/name-element-editor-form.js +8 -8
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +11 -10
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +7 -7
- package/dist/components/parameters/common/widget/parameter-float.js +6 -6
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +11 -10
- package/dist/components/parameters/common/widget/parameter-line-slider.js +6 -6
- package/dist/components/parameters/index.d.ts +1 -0
- package/dist/components/parameters/index.js +42 -4
- package/dist/components/parameters/loadflow/constants.d.ts +0 -1
- package/dist/components/parameters/loadflow/constants.js +0 -2
- package/dist/components/parameters/loadflow/index.js +1 -2
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +7 -12
- package/dist/components/parameters/loadflow/load-flow-parameter-field.js +6 -6
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +6 -6
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +6 -6
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +48 -12
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.d.ts +0 -4
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +1 -2
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +2 -1
- package/dist/components/parameters/network-visualizations/constants.js +5 -1
- package/dist/components/parameters/network-visualizations/index.js +2 -1
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +6 -6
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +7 -7
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +3 -3
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +2 -2
- package/dist/components/parameters/network-visualizations/network-visualizations.types.d.ts +2 -1
- package/dist/components/parameters/network-visualizations/network-visualizations.types.js +2 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +12 -11
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +5 -5
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +3 -3
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +6 -6
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +2 -2
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +11 -10
- package/dist/components/parameters/voltage-init/constants.d.ts +39 -0
- package/dist/components/parameters/voltage-init/constants.js +65 -0
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.d.ts +7 -0
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +119 -0
- package/dist/components/parameters/voltage-init/general-parameters.d.ts +4 -0
- package/dist/components/parameters/voltage-init/general-parameters.js +112 -0
- package/dist/components/parameters/voltage-init/index.d.ts +10 -0
- package/dist/components/parameters/voltage-init/index.js +38 -0
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.d.ts +32 -0
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +218 -0
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.d.ts +4 -0
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +220 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.d.ts +2 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +97 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.d.ts +30 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +150 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.d.ts +8 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +173 -0
- package/dist/components/parameters/voltage-init/voltage-init.type.d.ts +33 -0
- package/dist/components/parameters/voltage-init/voltage-init.type.js +8 -0
- package/dist/components/parameters/voltage-init/voltage-limits-parameters.d.ts +7 -0
- package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +188 -0
- package/dist/index.js +72 -5
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +6 -2
- package/dist/services/study.d.ts +2 -0
- package/dist/services/study.js +15 -1
- package/dist/services/voltage-init.d.ts +4 -0
- package/dist/services/voltage-init.js +14 -0
- package/dist/translations/en/dndTableEn.d.ts +16 -0
- package/dist/translations/en/dndTableEn.js +13 -0
- package/dist/translations/en/index.d.ts +1 -0
- package/dist/translations/en/index.js +2 -0
- package/dist/translations/en/networkModificationsEn.js +12 -12
- package/dist/translations/en/parameters.d.ts +32 -1
- package/dist/translations/en/parameters.js +33 -2
- package/dist/translations/fr/dndTableFr.d.ts +16 -0
- package/dist/translations/fr/dndTableFr.js +13 -0
- package/dist/translations/fr/index.d.ts +1 -0
- package/dist/translations/fr/index.js +2 -0
- package/dist/translations/fr/networkModificationsFr.js +12 -12
- package/dist/translations/fr/parameters.d.ts +33 -1
- package/dist/translations/fr/parameters.js +34 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/validation-functions.d.ts +8 -0
- package/dist/utils/validation-functions.js +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const dndTableFr = {
|
|
2
|
+
DndAddRows: "Ajouter",
|
|
3
|
+
DndDeleteRows: "Supprimer",
|
|
4
|
+
MoveUpRows: "Monter",
|
|
5
|
+
MoveDownRows: "Descendre",
|
|
6
|
+
DragAndDrop: "Glisser-déposer",
|
|
7
|
+
AddRowsDialogTitle: "Combien de lignes voulez-vous ajouter ?",
|
|
8
|
+
AddRowsButton: "Ajouter",
|
|
9
|
+
MaximumRowNumberError: "Le nombre de lignes ne doit pas dépasser la valeur {value}"
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
dndTableFr
|
|
13
|
+
};
|
|
@@ -9,6 +9,7 @@ export * from './commonButtonFr';
|
|
|
9
9
|
export * from './csvFr';
|
|
10
10
|
export * from './descriptionFr';
|
|
11
11
|
export * from './directoryItemsInputFr';
|
|
12
|
+
export * from './dndTableFr';
|
|
12
13
|
export * from './elementSearchFr';
|
|
13
14
|
export * from './equipmentSearchFr';
|
|
14
15
|
export * from './equipmentsFr';
|
|
@@ -3,6 +3,7 @@ import { commonButtonFr } from "./commonButtonFr.js";
|
|
|
3
3
|
import { csvFr } from "./csvFr.js";
|
|
4
4
|
import { descriptionFr } from "./descriptionFr.js";
|
|
5
5
|
import { directoryItemsInputFr } from "./directoryItemsInputFr.js";
|
|
6
|
+
import { dndTableFr } from "./dndTableFr.js";
|
|
6
7
|
import { elementSearchFr } from "./elementSearchFr.js";
|
|
7
8
|
import { equipmentSearchFr } from "./equipmentSearchFr.js";
|
|
8
9
|
import { equipmentsFr } from "./equipmentsFr.js";
|
|
@@ -28,6 +29,7 @@ export {
|
|
|
28
29
|
csvFr,
|
|
29
30
|
descriptionFr,
|
|
30
31
|
directoryItemsInputFr,
|
|
32
|
+
dndTableFr,
|
|
31
33
|
elementSearchFr,
|
|
32
34
|
equipmentSearchFr,
|
|
33
35
|
equipmentsFr,
|
|
@@ -39,21 +39,21 @@ const networkModificationsFr = {
|
|
|
39
39
|
"network_modifications.GENERATION_DISPATCH": "Démarrage de groupes {computedLabel}",
|
|
40
40
|
"network_modifications.VOLTAGE_INIT_MODIFICATION": "Initialisation du plan de tension {computedLabel}",
|
|
41
41
|
"network_modifications.TABULAR_MODIFICATION": "Modification tabulaire - {computedLabel}",
|
|
42
|
-
"network_modifications.tabular.GENERATOR_MODIFICATION": "
|
|
43
|
-
"network_modifications.tabular.LOAD_MODIFICATION": "
|
|
42
|
+
"network_modifications.tabular.GENERATOR_MODIFICATION": "Modification tabulaire (générateurs)",
|
|
43
|
+
"network_modifications.tabular.LOAD_MODIFICATION": "Modification tabulaire (consommations)",
|
|
44
44
|
"network_modifications.BY_FORMULA_MODIFICATION": "Modification par formule {computedLabel}",
|
|
45
45
|
"network_modifications.MODIFICATION_BY_ASSIGNMENT": "Modification par filtre {computedLabel}",
|
|
46
|
-
"network_modifications.tabular.LINE_MODIFICATION": "
|
|
47
|
-
"network_modifications.tabular.BATTERY_MODIFICATION": "
|
|
48
|
-
"network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "
|
|
49
|
-
"network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "
|
|
50
|
-
"network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "
|
|
51
|
-
"network_modifications.tabular.SUBSTATION_MODIFICATION": "
|
|
46
|
+
"network_modifications.tabular.LINE_MODIFICATION": "Modification tabulaire (lignes)",
|
|
47
|
+
"network_modifications.tabular.BATTERY_MODIFICATION": "Modification tabulaire (batteries)",
|
|
48
|
+
"network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "Modification tabulaire (postes)",
|
|
49
|
+
"network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Modification tabulaire (transformateurs à 2 enroulements)",
|
|
50
|
+
"network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "Modification tabulaire (MCS linéaires)",
|
|
51
|
+
"network_modifications.tabular.SUBSTATION_MODIFICATION": "Modification tabulaire (sites)",
|
|
52
52
|
"network_modifications.TABULAR_CREATION": "Création tabulaire - {computedLabel}",
|
|
53
|
-
"network_modifications.tabular.GENERATOR_CREATION": "
|
|
54
|
-
"network_modifications.tabular.BATTERY_CREATION": "
|
|
55
|
-
"network_modifications.tabular.LOAD_CREATION": "
|
|
56
|
-
"network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "
|
|
53
|
+
"network_modifications.tabular.GENERATOR_CREATION": "Création tabulaire (générateurs)",
|
|
54
|
+
"network_modifications.tabular.BATTERY_CREATION": "Création tabulaire (batteries)",
|
|
55
|
+
"network_modifications.tabular.LOAD_CREATION": "Création tabulaire (consommations)",
|
|
56
|
+
"network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "Création tabulaire (MCS linéaires)",
|
|
57
57
|
"network_modifications.LCC_CREATION": "Création de la HVDC (LCC) {computedLabel}",
|
|
58
58
|
"network_modifications.LCC_MODIFICATION": "Modification de la HVDC (LCC) {computedLabel}",
|
|
59
59
|
"network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Création de CSPR {computedLabel}",
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const parametersFr: {
|
|
8
8
|
descLfVoltageInitMode: string;
|
|
9
|
-
descLfTransformerVoltageControlOn: string;
|
|
10
9
|
descLfUseReactiveLimits: string;
|
|
11
10
|
descLfPhaseShifterRegulationOn: string;
|
|
12
11
|
descLfTwtSplitShuntAdmittance: string;
|
|
@@ -16,6 +15,7 @@ export declare const parametersFr: {
|
|
|
16
15
|
descLfDcValues: string;
|
|
17
16
|
resetToDefault: string;
|
|
18
17
|
resetProviderValuesToDefault: string;
|
|
18
|
+
resetParamsConfirmation: string;
|
|
19
19
|
showAdvancedParameters: string;
|
|
20
20
|
showSpecificParameters: string;
|
|
21
21
|
save: string;
|
|
@@ -88,6 +88,7 @@ export declare const parametersFr: {
|
|
|
88
88
|
FlatDesign: string;
|
|
89
89
|
Carto: string;
|
|
90
90
|
CartoNoLabel: string;
|
|
91
|
+
Etalab: string;
|
|
91
92
|
getNetworkVisualizationsParametersError: string;
|
|
92
93
|
updateNetworkVisualizationsParametersError: string;
|
|
93
94
|
paramsChangingError: string;
|
|
@@ -116,4 +117,35 @@ export declare const parametersFr: {
|
|
|
116
117
|
nominalInitialVoltageProfileMode: string;
|
|
117
118
|
cei909InitialVoltageProfileMode: string;
|
|
118
119
|
Or: string;
|
|
120
|
+
updateVoltageInitParametersError: string;
|
|
121
|
+
VoltageInitParametersGeneralTabLabel: string;
|
|
122
|
+
VoltageInitParametersGeneralApplyModificationsLabel: string;
|
|
123
|
+
VoltageInitParametersGeneralSaveInfo: string;
|
|
124
|
+
VoltageInitParametersGeneralUpdateBusVoltageLabel: string;
|
|
125
|
+
VoltageInitParametersEquipmentsSelectionAlert: string;
|
|
126
|
+
VoltageLimits: string;
|
|
127
|
+
VoltageLevelFilter: string;
|
|
128
|
+
LowVoltageLimitDefault: string;
|
|
129
|
+
HighVoltageLimitDefault: string;
|
|
130
|
+
LowVoltageLimitAdjustment: string;
|
|
131
|
+
HighVoltageLimitAdjustment: string;
|
|
132
|
+
VoltageLevelFilterTooltip: string;
|
|
133
|
+
FilterInputMinError: string;
|
|
134
|
+
EquipmentSelection: string;
|
|
135
|
+
ReactiveSlacksThreshold: string;
|
|
136
|
+
ReactiveSlacksThresholdMustBeGreaterOrEqualToZero: string;
|
|
137
|
+
ShuntCompensatorActivationThreshold: string;
|
|
138
|
+
ShuntCompensatorActivationThresholdMustBeGreaterOrEqualToZero: string;
|
|
139
|
+
ShuntCompensatorActivationThresholdDescription: string;
|
|
140
|
+
VoltageInitParametersError: string;
|
|
141
|
+
voltageInitCancelError: string;
|
|
142
|
+
AdjustExistingLimits: string;
|
|
143
|
+
AdjustExistingLimitsInfo: string;
|
|
144
|
+
SetDefaultLimits: string;
|
|
145
|
+
allExcept: string;
|
|
146
|
+
noneExcept: string;
|
|
147
|
+
FiltersListsSelection: string;
|
|
148
|
+
VariableGenerators: string;
|
|
149
|
+
VariableTransformers: string;
|
|
150
|
+
VariableShuntCompensators: string;
|
|
119
151
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const parametersFr = {
|
|
2
2
|
descLfVoltageInitMode: "Mode d'initialisation du plan de tension",
|
|
3
|
-
descLfTransformerVoltageControlOn: "Simuler les régleurs en charge",
|
|
4
3
|
descLfUseReactiveLimits: "Prise en compte des limites de réactif des groupes",
|
|
5
4
|
descLfPhaseShifterRegulationOn: "Activer les régulations des transformateurs déphaseurs",
|
|
6
5
|
descLfTwtSplitShuntAdmittance: "Répartir la susceptance des transformateurs à deux enroulements entre primaire et secondaire",
|
|
@@ -10,6 +9,7 @@ const parametersFr = {
|
|
|
10
9
|
descLfDcValues: "DC",
|
|
11
10
|
resetToDefault: "Tout réinitialiser ",
|
|
12
11
|
resetProviderValuesToDefault: "Réinitialiser les paramètres du simulateur",
|
|
12
|
+
resetParamsConfirmation: "Souhaitez vous réellement réinitialiser ces paramètres ?",
|
|
13
13
|
showAdvancedParameters: "Paramètres avancés",
|
|
14
14
|
showSpecificParameters: "Paramètres spécifiques",
|
|
15
15
|
save: "Enregistrer",
|
|
@@ -82,6 +82,7 @@ const parametersFr = {
|
|
|
82
82
|
FlatDesign: "Flat_Design",
|
|
83
83
|
Carto: "Carto",
|
|
84
84
|
CartoNoLabel: "Carto sans labels",
|
|
85
|
+
Etalab: "Etalab",
|
|
85
86
|
getNetworkVisualizationsParametersError: "Une erreur est survenue lors de la récupération des paramètres des images réseau",
|
|
86
87
|
updateNetworkVisualizationsParametersError: "Une erreur est survenue lors de la mise a jour des paramètres des images réseau",
|
|
87
88
|
paramsChangingError: "Une erreur est survenue lors de la modification des paramètres",
|
|
@@ -109,7 +110,38 @@ const parametersFr = {
|
|
|
109
110
|
iscMinWithNominalVoltageMapPredefinedParams: "Pcc min à tension normalisée",
|
|
110
111
|
nominalInitialVoltageProfileMode: "Normalisé",
|
|
111
112
|
cei909InitialVoltageProfileMode: "CEI 909",
|
|
112
|
-
Or: "ou"
|
|
113
|
+
Or: "ou",
|
|
114
|
+
updateVoltageInitParametersError: "Une erreur est survenue lors de la mise a jour des paramètres de l'initialisation du plan de tension",
|
|
115
|
+
VoltageInitParametersGeneralTabLabel: "Général",
|
|
116
|
+
VoltageInitParametersGeneralApplyModificationsLabel: "Appliquer automatiquement la modification du plan de tension",
|
|
117
|
+
VoltageInitParametersGeneralSaveInfo: "Cette option ne sera pas enregistrée et sera mise à la valeur par défaut en cas d'insertion de paramètres depuis GridExplore",
|
|
118
|
+
VoltageInitParametersGeneralUpdateBusVoltageLabel: "Mettre à jour tension des nœuds électriques",
|
|
119
|
+
VoltageInitParametersEquipmentsSelectionAlert: "Les consignes des CSPR et des stations VSC sont toujours considérées comme variables",
|
|
120
|
+
VoltageLimits: "Limites de tension",
|
|
121
|
+
VoltageLevelFilter: "Filtre poste",
|
|
122
|
+
LowVoltageLimitDefault: "Valeur par défaut limite basse",
|
|
123
|
+
HighVoltageLimitDefault: "Valeur par défaut limite haute",
|
|
124
|
+
LowVoltageLimitAdjustment: "Modification limite basse",
|
|
125
|
+
HighVoltageLimitAdjustment: "Modification limite haute",
|
|
126
|
+
VoltageLevelFilterTooltip: "Les saisies sont appliquées dans l'ordre de la liste (en remplaçant éventuellement des saisies au fur et à mesure si un poste est inclus dans plusieurs filtres)",
|
|
127
|
+
FilterInputMinError: "Vous devez sélectionner au moins un filtre",
|
|
128
|
+
EquipmentSelection: "Sélection des ouvrages",
|
|
129
|
+
ReactiveSlacksThreshold: "Seuil d'alerte sur les investissements réactifs",
|
|
130
|
+
ReactiveSlacksThresholdMustBeGreaterOrEqualToZero: "Le seuil doit être supérieur ou égal à 0",
|
|
131
|
+
ShuntCompensatorActivationThreshold: "Seuil d'alerte sur l'enclenchement des MCS",
|
|
132
|
+
ShuntCompensatorActivationThresholdMustBeGreaterOrEqualToZero: "Le seuil doit être supérieur ou égal à 0",
|
|
133
|
+
ShuntCompensatorActivationThresholdDescription: "Seuil (en MVar) au-dessus duquel on considère qu'il y a un écart significatif (et donc tracé dans les logs fonctionnels) entre valeur arrondie et valeur théorique pour l'enclenchement d'un MCS",
|
|
134
|
+
VoltageInitParametersError: "Erreur lors de la mise à jour des paramètres d'initialisation du plan de tension",
|
|
135
|
+
voltageInitCancelError: "L'initialisation du plan de tension n'a pas pu être annulée",
|
|
136
|
+
AdjustExistingLimits: "Modifier les limites existantes",
|
|
137
|
+
AdjustExistingLimitsInfo: "Merci de saisir une valeur positive pour augmenter une limite existante et une valeur négative pour abaisser une limite existante (nouvelle limite = limite existante + valeur saisie).",
|
|
138
|
+
SetDefaultLimits: "Valeurs par défaut pour compléter les limites manquantes",
|
|
139
|
+
allExcept: "Tous sauf",
|
|
140
|
+
noneExcept: "Aucun sauf",
|
|
141
|
+
FiltersListsSelection: "Sélection des listes de filtres",
|
|
142
|
+
VariableGenerators: "Groupes à puissance réactive variable",
|
|
143
|
+
VariableTransformers: "Transformateurs variables",
|
|
144
|
+
VariableShuntCompensators: "MCS variables"
|
|
113
145
|
};
|
|
114
146
|
export {
|
|
115
147
|
parametersFr
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { ParameterType } from "./types/parameters.type.js";
|
|
|
20
20
|
import { SolverTypeInfos } from "./types/dynamic-simulation.type.js";
|
|
21
21
|
import { EnergySource } from "./types/non-evacuated-energy.type.js";
|
|
22
22
|
import { DistributionType, SensitivityType } from "./types/sensitivity-analysis.type.js";
|
|
23
|
+
import { toNumber, validateValueIsANumber } from "./validation-functions.js";
|
|
23
24
|
import "./yupConfig.js";
|
|
24
25
|
import * as yup from "yup";
|
|
25
26
|
export {
|
|
@@ -100,7 +101,9 @@ export {
|
|
|
100
101
|
roundToDefaultPrecision,
|
|
101
102
|
roundToPrecision,
|
|
102
103
|
toNestedGlobalSelectors,
|
|
104
|
+
toNumber,
|
|
103
105
|
unitToKiloUnit,
|
|
104
106
|
unitToMicroUnit,
|
|
107
|
+
validateValueIsANumber,
|
|
105
108
|
yup as yupConfig
|
|
106
109
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toNumber(value: unknown): number;
|
|
8
|
+
export declare function validateValueIsANumber(value?: string | number | null | boolean): value is number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function toNumber(value) {
|
|
2
|
+
if (typeof value === "number") {
|
|
3
|
+
return value;
|
|
4
|
+
}
|
|
5
|
+
if (typeof value === "string") {
|
|
6
|
+
const sanitizedString = value.replace(",", ".").trim();
|
|
7
|
+
if (value.length > 0) {
|
|
8
|
+
return Number(sanitizedString);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
console.error("Error while trying to convert a value to Number. Value :", value);
|
|
12
|
+
return NaN;
|
|
13
|
+
}
|
|
14
|
+
function validateValueIsANumber(value) {
|
|
15
|
+
if (value == null || value === "") {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return !Number.isNaN(toNumber(value));
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
toNumber,
|
|
22
|
+
validateValueIsANumber
|
|
23
|
+
};
|