@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
package/dist/components/index.js
CHANGED
|
@@ -102,6 +102,7 @@ import { HelperPreviousValue } from "./inputs/reactHookForm/utils/HelperPrevious
|
|
|
102
102
|
import { DESCRIPTION, NAME } from "./inputs/reactHookForm/constants.js";
|
|
103
103
|
import { ExpandableInput } from "./inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
104
104
|
import { CountrySelectionInput } from "./inputs/reactHookForm/CountrySelectionInput.js";
|
|
105
|
+
import { CheckboxNullableInput } from "./inputs/reactHookForm/CheckboxNullableInput.js";
|
|
105
106
|
import { AddButton } from "./inputs/reactQueryBuilder/AddButton.js";
|
|
106
107
|
import { AutocompleteWithFavorites } from "./inputs/reactQueryBuilder/AutocompleteWithFavorites.js";
|
|
107
108
|
import { CombinatorSelector } from "./inputs/reactQueryBuilder/CombinatorSelector.js";
|
|
@@ -179,14 +180,27 @@ import { SensitivityAnalysisParametersDialog } from "./parameters/sensi/sensitiv
|
|
|
179
180
|
import { COLUMNS_DEFINITIONS_HVDCS, COLUMNS_DEFINITIONS_INJECTIONS, COLUMNS_DEFINITIONS_INJECTIONS_SET, COLUMNS_DEFINITIONS_NODES, COLUMNS_DEFINITIONS_PSTS, EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES, HVDC_EQUIPMENT_TYPES, INJECTIONS_EQUIPMENT_TYPES, INJECTION_DISTRIBUTION_TYPES, MONITORED_BRANCHES_EQUIPMENT_TYPES, MONITORED_VOLTAGE_LEVELS_EQUIPMENT_TYPES, PSTS_EQUIPMENT_TYPES, SENSITIVITY_TYPES, SensiBranchesTabValues, SensiHvdcs, SensiInjection, SensiInjectionsSet, SensiNodes, SensiPsts, SensiTabValues } from "./parameters/sensi/columns-definitions.js";
|
|
180
181
|
import { ACCURACY, ACTIVE, CALCULATION_TYPE, LOADS_VARIATIONS, LOAD_FILTERS, LOAD_INCREASE_START_TIME, LOAD_INCREASE_STOP_TIME, LOAD_MODELS_RULE, MARGIN_CALCULATION_START_TIME, START_TIME, STOP_TIME, VARIATION } from "./parameters/dynamic-margin-calculation/constants.js";
|
|
181
182
|
import { DynamicMarginCalculationInline } from "./parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js";
|
|
183
|
+
import { CONTINGENCIES_LIST_INFOS, CONTINGENCIES_START_TIME, SCENARIO_DURATION } from "./parameters/dynamic-security-analysis/constants.js";
|
|
184
|
+
import { DynamicSecurityAnalysisInline } from "./parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js";
|
|
182
185
|
import { CustomMenuItem, CustomNestedMenuItem } from "./menus/custom-nested-menu.js";
|
|
183
186
|
import { OverflowableTableCell } from "./muiTable/OverflowableTableCell.js";
|
|
184
187
|
import { OverflowableTableCellWithCheckbox } from "./muiTable/OverflowableTableCellWithCheckbox.js";
|
|
185
188
|
import { ResizeHandle } from "./resizablePanels/ResizeHandle.js";
|
|
189
|
+
import { filledTextField, italicFontTextField, standardTextField } from "./network-modifications/common/form.utils.js";
|
|
186
190
|
import { PropertiesForm } from "./network-modifications/common/properties/PropertiesForm.js";
|
|
187
191
|
import { PropertyForm } from "./network-modifications/common/properties/PropertyForm.js";
|
|
188
192
|
import { copyEquipmentPropertiesForCreation, createPropertyModification, creationPropertiesSchema, emptyProperties, fetchPredefinedProperties, getConcatenatedProperties, getFilledPropertiesFromModification, getPropertiesFromModification, getPropertyValue, initializedProperty, mergeModificationAndEquipmentProperties, modificationPropertiesSchema, toModificationProperties } from "./network-modifications/common/properties/propertyUtils.js";
|
|
189
|
-
import {
|
|
193
|
+
import { getPowerWithValidityEditData, getPowerWithValidityEmptyFormData, getPowerWithValidityValidationSchema } from "./network-modifications/common/measurements/powerWithValidity.utils.js";
|
|
194
|
+
import { getInjectionActiveReactivePowerEditData, getInjectionActiveReactivePowerEditDataProperties, getInjectionActiveReactivePowerEmptyFormData, getInjectionActiveReactivePowerEmptyFormDataProperties, getInjectionActiveReactivePowerValidationSchema, getInjectionActiveReactivePowerValidationSchemaProperties } from "./network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.js";
|
|
195
|
+
import { getBranchActiveReactivePowerEditData, getBranchActiveReactivePowerEditDataProperties, getBranchActiveReactivePowerEmptyFormData, getBranchActiveReactivePowerEmptyFormDataProperties, getBranchActiveReactivePowerValidationSchema, getBranchActiveReactivePowerValidationSchemaProperties } from "./network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js";
|
|
196
|
+
import { PowerWithValidityForm } from "./network-modifications/common/measurements/PowerWithValidityForm.js";
|
|
197
|
+
import { PowerMeasurementsForm } from "./network-modifications/common/measurements/PowerMeasurementsForm.js";
|
|
198
|
+
import { BranchActiveReactivePowerMeasurementsForm } from "./network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js";
|
|
199
|
+
import { getActivePowerSetPointSchema, getReactivePowerSetPointSchema, getSetPointsEmptyFormData, getSetPointsSchema, testValueWithinPowerInterval } from "./network-modifications/common/setpoints/setPoints.utils.js";
|
|
200
|
+
import { SetPointsForm } from "./network-modifications/common/setpoints/SetPointsForm.js";
|
|
201
|
+
import { createConnectivityData, getCon1andCon2WithPositionValidationSchema, getConnectivityBusBarSectionData, getConnectivityData, getConnectivityFormData, getConnectivityFormDataProps, getConnectivityPropertiesData, getConnectivityPropertiesEmptyFormData, getConnectivityPropertiesValidationSchema, getConnectivityVoltageLevelData, getConnectivityWithPositionEmptyFormData, getConnectivityWithPositionEmptyFormDataProps, getConnectivityWithPositionSchema, getConnectivityWithPositionValidationSchema, getConnectivityWithoutPositionEmptyFormData, getConnectivityWithoutPositionValidationSchema, getCont1Cont2WithPositionEmptyFormData, getNewVoltageLevelData } from "./network-modifications/common/connectivity/connectivityForm.utils.js";
|
|
202
|
+
import { ConnectivityForm } from "./network-modifications/common/connectivity/ConnectivityForm.js";
|
|
203
|
+
import { BranchConnectivityForm } from "./network-modifications/common/connectivity/BranchConnectivityForm.js";
|
|
190
204
|
import { SubstationCreationForm } from "./network-modifications/substation/creation/SubstationCreationForm.js";
|
|
191
205
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./network-modifications/substation/creation/substationCreation.utils.js";
|
|
192
206
|
import { SubstationModificationForm } from "./network-modifications/substation/modification/SubstationModificationForm.js";
|
|
@@ -198,6 +212,12 @@ import { CouplingOmnibusCreation } from "./network-modifications/voltage-level/c
|
|
|
198
212
|
import { VoltageLevelCreationForm } from "./network-modifications/voltage-level/creation/VoltageLevelCreationForm.js";
|
|
199
213
|
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./network-modifications/voltage-level/creation/voltageLevelCreation.utils.js";
|
|
200
214
|
import { SwitchKind } from "./network-modifications/voltage-level/creation/voltageLevelCreation.types.js";
|
|
215
|
+
import { LoadDialogTab } from "./network-modifications/load/common/load.utils.js";
|
|
216
|
+
import { LoadDialogTabs } from "./network-modifications/load/common/LoadDialogTabs.js";
|
|
217
|
+
import { LoadDialogTabsContent } from "./network-modifications/load/common/LoadDialogTabsContent.js";
|
|
218
|
+
import { LoadDialogHeader } from "./network-modifications/load/common/LoadDialogHeader.js";
|
|
219
|
+
import { LoadForm } from "./network-modifications/load/common/LoadForm.js";
|
|
220
|
+
import { loadCreationDtoToForm, loadCreationEmptyFormData, loadCreationFormSchema, loadCreationFormToDto } from "./network-modifications/load/creation/loadCreation.utils.js";
|
|
201
221
|
export {
|
|
202
222
|
ACCURACY,
|
|
203
223
|
ACTIVE,
|
|
@@ -216,6 +236,8 @@ export {
|
|
|
216
236
|
BooleanInput,
|
|
217
237
|
BooleanNullableCellRenderer,
|
|
218
238
|
BottomRightButtons,
|
|
239
|
+
BranchActiveReactivePowerMeasurementsForm,
|
|
240
|
+
BranchConnectivityForm,
|
|
219
241
|
CALCULATION_TYPE,
|
|
220
242
|
CENTER_LABEL,
|
|
221
243
|
COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
|
|
@@ -230,6 +252,8 @@ export {
|
|
|
230
252
|
COMPONENT_LIBRARY,
|
|
231
253
|
CONNECTED_MODE,
|
|
232
254
|
CONTINGENCIES,
|
|
255
|
+
CONTINGENCIES_LIST_INFOS,
|
|
256
|
+
CONTINGENCIES_START_TIME,
|
|
233
257
|
CONTINGENCY_LISTS,
|
|
234
258
|
CONTINGENCY_LISTS_INFOS,
|
|
235
259
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
@@ -240,10 +264,12 @@ export {
|
|
|
240
264
|
CardErrorBoundary,
|
|
241
265
|
CheckBoxList,
|
|
242
266
|
CheckboxInput,
|
|
267
|
+
CheckboxNullableInput,
|
|
243
268
|
ChipItemsInput,
|
|
244
269
|
CombinatorSelector,
|
|
245
270
|
CombinatorType,
|
|
246
271
|
ComputingType,
|
|
272
|
+
ConnectivityForm,
|
|
247
273
|
ContingencyCellRenderer,
|
|
248
274
|
ContingencyTable,
|
|
249
275
|
CountriesInput,
|
|
@@ -293,6 +319,7 @@ export {
|
|
|
293
319
|
DndTableBottomLeftButtons,
|
|
294
320
|
DndTableBottomRightButtons,
|
|
295
321
|
DynamicMarginCalculationInline,
|
|
322
|
+
DynamicSecurityAnalysisInline,
|
|
296
323
|
ENERGY_SOURCE_OPTIONS,
|
|
297
324
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
298
325
|
EXPERT_FILTER_EQUIPMENTS,
|
|
@@ -363,8 +390,13 @@ export {
|
|
|
363
390
|
LimitReductionsTableForm,
|
|
364
391
|
LineFlowMode,
|
|
365
392
|
LineSeparator,
|
|
393
|
+
LoadDialogHeader,
|
|
394
|
+
LoadDialogTab,
|
|
395
|
+
LoadDialogTabs,
|
|
396
|
+
LoadDialogTabsContent,
|
|
366
397
|
LoadFlowParametersEditionDialog,
|
|
367
398
|
LoadFlowParametersInline,
|
|
399
|
+
LoadForm,
|
|
368
400
|
Login,
|
|
369
401
|
LogoText,
|
|
370
402
|
Logout,
|
|
@@ -440,6 +472,8 @@ export {
|
|
|
440
472
|
PccMinParametersEditionDialog,
|
|
441
473
|
PccMinParametersInLine,
|
|
442
474
|
PopupConfirmationDialog,
|
|
475
|
+
PowerMeasurementsForm,
|
|
476
|
+
PowerWithValidityForm,
|
|
443
477
|
PredefinedParameters,
|
|
444
478
|
PropertiesForm,
|
|
445
479
|
PropertyForm,
|
|
@@ -459,6 +493,7 @@ export {
|
|
|
459
493
|
RemoveButton,
|
|
460
494
|
ResizeHandle,
|
|
461
495
|
RuleValueEditor,
|
|
496
|
+
SCENARIO_DURATION,
|
|
462
497
|
SELECTED,
|
|
463
498
|
SELECTION_TYPE,
|
|
464
499
|
SENSITIVITY_TYPES,
|
|
@@ -501,6 +536,7 @@ export {
|
|
|
501
536
|
SensitivityAnalysisParametersDialog,
|
|
502
537
|
SensitivityAnalysisParametersInline,
|
|
503
538
|
SeparatorCellRenderer,
|
|
539
|
+
SetPointsForm,
|
|
504
540
|
ShortCircuitParametersEditionDialog,
|
|
505
541
|
ShortCircuitParametersInLine,
|
|
506
542
|
SignInCallbackHandler,
|
|
@@ -555,6 +591,7 @@ export {
|
|
|
555
591
|
buildNewBusbarSections,
|
|
556
592
|
copyEquipmentPropertiesForCreation,
|
|
557
593
|
countRules,
|
|
594
|
+
createConnectivityData,
|
|
558
595
|
createPropertyModification,
|
|
559
596
|
creationPropertiesSchema,
|
|
560
597
|
dispatchUser,
|
|
@@ -570,20 +607,56 @@ export {
|
|
|
570
607
|
formatComputingTypeLabel,
|
|
571
608
|
genHelperError,
|
|
572
609
|
generateTreeViewFinderClass,
|
|
610
|
+
getActivePowerSetPointSchema,
|
|
611
|
+
getBranchActiveReactivePowerEditData,
|
|
612
|
+
getBranchActiveReactivePowerEditDataProperties,
|
|
613
|
+
getBranchActiveReactivePowerEmptyFormData,
|
|
614
|
+
getBranchActiveReactivePowerEmptyFormDataProperties,
|
|
615
|
+
getBranchActiveReactivePowerValidationSchema,
|
|
616
|
+
getBranchActiveReactivePowerValidationSchemaProperties,
|
|
617
|
+
getCon1andCon2WithPositionValidationSchema,
|
|
573
618
|
getConcatenatedProperties,
|
|
619
|
+
getConnectivityBusBarSectionData,
|
|
620
|
+
getConnectivityData,
|
|
621
|
+
getConnectivityFormData,
|
|
622
|
+
getConnectivityFormDataProps,
|
|
623
|
+
getConnectivityPropertiesData,
|
|
624
|
+
getConnectivityPropertiesEmptyFormData,
|
|
625
|
+
getConnectivityPropertiesValidationSchema,
|
|
626
|
+
getConnectivityVoltageLevelData,
|
|
627
|
+
getConnectivityWithPositionEmptyFormData,
|
|
628
|
+
getConnectivityWithPositionEmptyFormDataProps,
|
|
629
|
+
getConnectivityWithPositionSchema,
|
|
630
|
+
getConnectivityWithPositionValidationSchema,
|
|
631
|
+
getConnectivityWithoutPositionEmptyFormData,
|
|
632
|
+
getConnectivityWithoutPositionValidationSchema,
|
|
633
|
+
getCont1Cont2WithPositionEmptyFormData,
|
|
574
634
|
getContingencyListsInfosFormSchema,
|
|
575
635
|
getCreateSwitchesEmptyFormData,
|
|
576
636
|
getCreateSwitchesValidationSchema,
|
|
577
637
|
getExpertFilterEmptyFormData,
|
|
578
638
|
getExplicitNamingFilterEmptyFormData,
|
|
579
639
|
getFilledPropertiesFromModification,
|
|
640
|
+
getInjectionActiveReactivePowerEditData,
|
|
641
|
+
getInjectionActiveReactivePowerEditDataProperties,
|
|
642
|
+
getInjectionActiveReactivePowerEmptyFormData,
|
|
643
|
+
getInjectionActiveReactivePowerEmptyFormDataProperties,
|
|
644
|
+
getInjectionActiveReactivePowerValidationSchema,
|
|
645
|
+
getInjectionActiveReactivePowerValidationSchemaProperties,
|
|
580
646
|
getLimitReductionsFormSchema,
|
|
647
|
+
getNewVoltageLevelData,
|
|
581
648
|
getNumberOfSiblings,
|
|
582
649
|
getOperators,
|
|
650
|
+
getPowerWithValidityEditData,
|
|
651
|
+
getPowerWithValidityEmptyFormData,
|
|
652
|
+
getPowerWithValidityValidationSchema,
|
|
583
653
|
getPreLoginPath,
|
|
584
654
|
getPropertiesFromModification,
|
|
585
655
|
getPropertyValue,
|
|
586
656
|
getRangeInputSchema,
|
|
657
|
+
getReactivePowerSetPointSchema,
|
|
658
|
+
getSetPointsEmptyFormData,
|
|
659
|
+
getSetPointsSchema,
|
|
587
660
|
gridItem,
|
|
588
661
|
handleSigninCallback,
|
|
589
662
|
handleSilentRenewCallback,
|
|
@@ -600,6 +673,10 @@ export {
|
|
|
600
673
|
isIntegerNumber,
|
|
601
674
|
isValidComputingType,
|
|
602
675
|
italicFontTextField,
|
|
676
|
+
loadCreationDtoToForm,
|
|
677
|
+
loadCreationEmptyFormData,
|
|
678
|
+
loadCreationFormSchema,
|
|
679
|
+
loadCreationFormToDto,
|
|
603
680
|
login,
|
|
604
681
|
logout,
|
|
605
682
|
mergeModificationAndEquipmentProperties,
|
|
@@ -621,6 +698,7 @@ export {
|
|
|
621
698
|
substationModificationFormSchema,
|
|
622
699
|
substationModificationFormToDto,
|
|
623
700
|
testQuery,
|
|
701
|
+
testValueWithinPowerInterval,
|
|
624
702
|
toFloatOrNullValue,
|
|
625
703
|
toFormValuesContingencyListsInfos,
|
|
626
704
|
toFormValuesLimitReductions,
|
|
@@ -45,6 +45,7 @@ import { HelperPreviousValue } from "./reactHookForm/utils/HelperPreviousValue.j
|
|
|
45
45
|
import { DESCRIPTION, NAME } from "./reactHookForm/constants.js";
|
|
46
46
|
import { ExpandableInput } from "./reactHookForm/expandableInput/ExpandableInput.js";
|
|
47
47
|
import { CountrySelectionInput } from "./reactHookForm/CountrySelectionInput.js";
|
|
48
|
+
import { CheckboxNullableInput } from "./reactHookForm/CheckboxNullableInput.js";
|
|
48
49
|
import { AddButton } from "./reactQueryBuilder/AddButton.js";
|
|
49
50
|
import { AutocompleteWithFavorites } from "./reactQueryBuilder/AutocompleteWithFavorites.js";
|
|
50
51
|
import { CombinatorSelector } from "./reactQueryBuilder/CombinatorSelector.js";
|
|
@@ -71,6 +72,7 @@ export {
|
|
|
71
72
|
BottomRightButtons,
|
|
72
73
|
CancelButton,
|
|
73
74
|
CheckboxInput,
|
|
75
|
+
CheckboxNullableInput,
|
|
74
76
|
ChipItemsInput,
|
|
75
77
|
CombinatorSelector,
|
|
76
78
|
CountriesInput,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CheckboxProps } from '@mui/material';
|
|
2
|
+
interface CheckboxNullableInputProps {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string | ((value: boolean | null) => string);
|
|
5
|
+
id?: string;
|
|
6
|
+
formProps?: CheckboxProps;
|
|
7
|
+
previousValue?: string;
|
|
8
|
+
nullDisabled?: boolean;
|
|
9
|
+
onChange?: (value: boolean | null) => void;
|
|
10
|
+
style?: {
|
|
11
|
+
color: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function CheckboxNullableInput({ name, label, id, formProps, previousValue, nullDisabled, onChange, style, }: Readonly<CheckboxNullableInputProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FormControl, FormControlLabel, Checkbox } from "@mui/material";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { useController } from "react-hook-form";
|
|
5
|
+
import { useCallback } from "react";
|
|
6
|
+
import "./provider/CustomFormProvider.js";
|
|
7
|
+
import { useCustomFormContext } from "./provider/useCustomFormContext.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
|
+
import "yup";
|
|
10
|
+
import { HelperPreviousValue } from "./utils/HelperPreviousValue.js";
|
|
11
|
+
function CheckboxNullableInput({
|
|
12
|
+
name,
|
|
13
|
+
label,
|
|
14
|
+
id,
|
|
15
|
+
formProps,
|
|
16
|
+
previousValue,
|
|
17
|
+
nullDisabled,
|
|
18
|
+
onChange,
|
|
19
|
+
style
|
|
20
|
+
}) {
|
|
21
|
+
const {
|
|
22
|
+
field: { onChange: rhfOnChange, value }
|
|
23
|
+
} = useController({ name });
|
|
24
|
+
const intl = useIntl();
|
|
25
|
+
const { isNodeBuilt, isUpdate } = useCustomFormContext();
|
|
26
|
+
const handleChangeValue = useCallback(() => {
|
|
27
|
+
let newValue;
|
|
28
|
+
if (value) {
|
|
29
|
+
newValue = null;
|
|
30
|
+
} else if (value === null) {
|
|
31
|
+
newValue = false;
|
|
32
|
+
} else {
|
|
33
|
+
newValue = true;
|
|
34
|
+
}
|
|
35
|
+
rhfOnChange(newValue);
|
|
36
|
+
onChange?.(newValue);
|
|
37
|
+
}, [rhfOnChange, onChange, value]);
|
|
38
|
+
const currentLabel = typeof label === "function" ? label(value) : label;
|
|
39
|
+
return /* @__PURE__ */ jsxs(FormControl, { fullWidth: true, size: "small", children: [
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
FormControlLabel,
|
|
42
|
+
{
|
|
43
|
+
id: id ?? currentLabel,
|
|
44
|
+
control: /* @__PURE__ */ jsx(
|
|
45
|
+
Checkbox,
|
|
46
|
+
{
|
|
47
|
+
checked: value === true,
|
|
48
|
+
indeterminate: nullDisabled ? void 0 : value === null,
|
|
49
|
+
onChange: handleChangeValue,
|
|
50
|
+
value: "checked",
|
|
51
|
+
inputProps: {
|
|
52
|
+
"aria-label": "primary checkbox"
|
|
53
|
+
},
|
|
54
|
+
...formProps
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
label: !label ? "" : intl.formatMessage({
|
|
58
|
+
id: currentLabel
|
|
59
|
+
}),
|
|
60
|
+
sx: style ? { color: style.color } : void 0
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
previousValue && /* @__PURE__ */ jsx(
|
|
64
|
+
HelperPreviousValue,
|
|
65
|
+
{
|
|
66
|
+
previousValue,
|
|
67
|
+
isNodeBuilt,
|
|
68
|
+
disabledTooltip: !isUpdate && isNodeBuilt
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
CheckboxNullableInput
|
|
75
|
+
};
|
|
@@ -44,12 +44,14 @@ import { HelperPreviousValue } from "./utils/HelperPreviousValue.js";
|
|
|
44
44
|
import { DESCRIPTION, NAME } from "./constants.js";
|
|
45
45
|
import { ExpandableInput } from "./expandableInput/ExpandableInput.js";
|
|
46
46
|
import { CountrySelectionInput } from "./CountrySelectionInput.js";
|
|
47
|
+
import { CheckboxNullableInput } from "./CheckboxNullableInput.js";
|
|
47
48
|
export {
|
|
48
49
|
AutocompleteInput,
|
|
49
50
|
BooleanInput,
|
|
50
51
|
BottomRightButtons,
|
|
51
52
|
CancelButton,
|
|
52
53
|
CheckboxInput,
|
|
54
|
+
CheckboxNullableInput,
|
|
53
55
|
ChipItemsInput,
|
|
54
56
|
CountriesInput,
|
|
55
57
|
CountrySelectionInput,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConnectivityNetworkProps } from './connectivity.type';
|
|
2
|
+
interface BranchConnectivityFormProps extends ConnectivityNetworkProps {
|
|
3
|
+
isModification?: boolean;
|
|
4
|
+
previousValues?: any;
|
|
5
|
+
}
|
|
6
|
+
export declare function BranchConnectivityForm({ isModification, previousValues, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, }: Readonly<BranchConnectivityFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import GridSection from "../../../grid/grid-section.js";
|
|
4
|
+
import GridItem from "../../../grid/grid-item.js";
|
|
5
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
6
|
+
import "../../../../utils/conversionUtils.js";
|
|
7
|
+
import "../../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
|
+
import "../../../../utils/yupConfig.js";
|
|
10
|
+
import { ConnectivityForm } from "./ConnectivityForm.js";
|
|
11
|
+
function BranchConnectivityForm({
|
|
12
|
+
isModification = false,
|
|
13
|
+
previousValues,
|
|
14
|
+
voltageLevelOptions = [],
|
|
15
|
+
PositionDiagramPane,
|
|
16
|
+
fetchBusesOrBusbarSections
|
|
17
|
+
}) {
|
|
18
|
+
const id1 = `${FieldConstants.CONNECTIVITY}.${FieldConstants.CONNECTIVITY_1}`;
|
|
19
|
+
const id2 = `${FieldConstants.CONNECTIVITY}.${FieldConstants.CONNECTIVITY_2}`;
|
|
20
|
+
const connectivity1Field = /* @__PURE__ */ jsx(
|
|
21
|
+
ConnectivityForm,
|
|
22
|
+
{
|
|
23
|
+
id: id1,
|
|
24
|
+
withPosition: true,
|
|
25
|
+
isEquipmentModification: isModification,
|
|
26
|
+
previousValues: {
|
|
27
|
+
connectablePosition: previousValues?.connectablePosition1,
|
|
28
|
+
voltageLevelId: previousValues?.voltageLevelId1,
|
|
29
|
+
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId1,
|
|
30
|
+
terminalConnected: previousValues?.terminal1Connected
|
|
31
|
+
},
|
|
32
|
+
voltageLevelOptions,
|
|
33
|
+
fetchBusesOrBusbarSections,
|
|
34
|
+
PositionDiagramPane
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
const connectivity2Field = /* @__PURE__ */ jsx(
|
|
38
|
+
ConnectivityForm,
|
|
39
|
+
{
|
|
40
|
+
id: id2,
|
|
41
|
+
withPosition: true,
|
|
42
|
+
isEquipmentModification: isModification,
|
|
43
|
+
previousValues: {
|
|
44
|
+
connectablePosition: previousValues?.connectablePosition2,
|
|
45
|
+
voltageLevelId: previousValues?.voltageLevelId2,
|
|
46
|
+
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId2,
|
|
47
|
+
terminalConnected: previousValues?.terminal2Connected
|
|
48
|
+
},
|
|
49
|
+
voltageLevelOptions,
|
|
50
|
+
fetchBusesOrBusbarSections,
|
|
51
|
+
PositionDiagramPane
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
|
+
/* @__PURE__ */ jsx(GridSection, { title: "Side1", heading: 4 }),
|
|
56
|
+
/* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: connectivity1Field }) }),
|
|
57
|
+
/* @__PURE__ */ jsx(GridSection, { title: "Side2", heading: 4 }),
|
|
58
|
+
/* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: connectivity2Field }) })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
BranchConnectivityForm
|
|
63
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { GridDirection } from '@mui/material';
|
|
2
|
+
import { ConnectablePositionFormInfos, ConnectivityNetworkProps } from './connectivity.type';
|
|
3
|
+
import { Option } from '../../../../utils';
|
|
4
|
+
/**
|
|
5
|
+
* Hook to handle a 'connectivity value' (voltage level, bus or bus bar section)
|
|
6
|
+
* @param id optional id that has to be defined if the component is used more than once in a form
|
|
7
|
+
* @param voltageLevelSelectLabel label to display for the voltage level auto complete component
|
|
8
|
+
* @param direction direction of placement. Either 'row' or 'column', 'row' by default.
|
|
9
|
+
* @param withDirectionsInfos
|
|
10
|
+
* @param withPosition
|
|
11
|
+
* @param newBusOrBusbarSectionOptions list of bus or bus bar sections for the newly created voltage level
|
|
12
|
+
* @param onVoltageLevelChangeCallback callback to be called when the voltage level changes
|
|
13
|
+
* @param isEquipmentModification connectivity form is used in a modification form or not
|
|
14
|
+
* @param previousValues previous values of connectivity form's fields
|
|
15
|
+
* @param voltageLevelOptions list of network voltage levels
|
|
16
|
+
* @param PositionDiagramPane a component type to display current taken positions in the voltage level
|
|
17
|
+
* @param fetchBusesOrBusbarSections a promise to retrieve bus bars for a given voltage level
|
|
18
|
+
* @returns JSX.Element
|
|
19
|
+
*/
|
|
20
|
+
interface ConnectivityFormProps extends ConnectivityNetworkProps {
|
|
21
|
+
id?: string;
|
|
22
|
+
voltageLevelSelectLabel?: string;
|
|
23
|
+
direction?: GridDirection;
|
|
24
|
+
withDirectionsInfos?: boolean;
|
|
25
|
+
withPosition: boolean;
|
|
26
|
+
newBusOrBusbarSectionOptions?: Option[];
|
|
27
|
+
onVoltageLevelChangeCallback?: () => void;
|
|
28
|
+
isEquipmentModification?: boolean;
|
|
29
|
+
previousValues?: {
|
|
30
|
+
connectablePosition?: ConnectablePositionFormInfos;
|
|
31
|
+
voltageLevelId?: string;
|
|
32
|
+
busOrBusbarSectionId?: string;
|
|
33
|
+
terminalConnected?: boolean | null;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export declare function ConnectivityForm({ id, voltageLevelSelectLabel, direction, withDirectionsInfos, withPosition, newBusOrBusbarSectionOptions, onVoltageLevelChangeCallback, isEquipmentModification, previousValues, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, }: Readonly<ConnectivityFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export {};
|