@gridsuite/commons-ui 0.223.0 → 0.225.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/composite/dnd-table/dnd-table.d.ts +8 -4
- package/dist/components/composite/dnd-table/dnd-table.js +100 -160
- package/dist/components/composite/dnd-table/dnd-table.type.d.ts +17 -3
- package/dist/components/composite/dnd-table/dnd-table.type.js +2 -0
- package/dist/components/composite/dnd-table/index.d.ts +6 -1
- package/dist/components/composite/dnd-table/index.js +6 -6
- package/dist/components/composite/index.js +6 -6
- package/dist/components/index.js +6 -6
- package/dist/components/ui/directoryItemSelector/DirectoryItemSelector.js +1 -1
- package/dist/components/ui/directoryItemSelector/utils.js +1 -1
- package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +1 -1
- package/dist/features/index.js +16 -0
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.d.ts +4 -3
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +7 -30
- package/dist/features/network-modifications/common/reactiveLimits/reactiveLimits.utils.d.ts +2 -0
- package/dist/features/network-modifications/generator/generatorDialog.type.d.ts +0 -60
- package/dist/features/network-modifications/generator/index.js +17 -1
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.d.ts +6 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +109 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.d.ts +13 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.js +55 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.d.ts +12 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +277 -0
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.d.ts +10 -0
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +52 -0
- package/dist/features/network-modifications/generator/modification/generatorModification.types.d.ts +3 -5
- package/dist/features/network-modifications/generator/modification/generatorModification.utils.d.ts +140 -0
- package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +211 -0
- package/dist/features/network-modifications/generator/modification/generatorTabs.utils.d.ts +8 -0
- package/dist/features/network-modifications/generator/modification/generatorTabs.utils.js +56 -0
- package/dist/features/network-modifications/generator/modification/index.d.ts +6 -0
- package/dist/features/network-modifications/generator/modification/index.js +18 -1
- package/dist/features/network-modifications/index.js +16 -0
- package/dist/features/parameters/common/contingency-table/columns-definitions.d.ts +2 -2
- package/dist/features/parameters/common/contingency-table/columns-definitions.js +6 -6
- package/dist/features/parameters/common/contingency-table/contingency-table.js +1 -1
- package/dist/features/parameters/common/contingency-table/types.d.ts +6 -17
- package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -1
- package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -1
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +1 -1
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +1 -1
- package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +1 -1
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -1
- package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +1 -1
- package/dist/features/parameters/security-analysis/columns-definitions.d.ts +3 -3
- package/dist/features/parameters/security-analysis/columns-definitions.js +8 -8
- package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +2 -2
- package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.d.ts +1 -1
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.d.ts +1 -1
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -1
- package/dist/features/parameters/sensi/columns-definitions.js +1 -1
- package/dist/features/parameters/sensi/constants.d.ts +0 -2
- package/dist/features/parameters/sensi/constants.js +0 -4
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -1
- package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.js +33 -32
- package/dist/features/parameters/sensi/utils.d.ts +31 -63
- package/dist/features/parameters/sensi/utils.js +49 -61
- package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +1 -1
- package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
- package/dist/features/parameters/voltage-init/voltage-init-form-utils.js +1 -1
- package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +1 -1
- package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +1 -1
- package/dist/hooks/use-unique-name-validation.js +1 -1
- package/dist/index.js +30 -11
- package/dist/services/directory.d.ts +1 -1
- package/dist/services/index.js +6 -3
- package/dist/services/pcc-min.d.ts +2 -1
- package/dist/services/pcc-min.js +27 -1
- package/dist/services/security-analysis.d.ts +2 -1
- package/dist/services/security-analysis.js +32 -1
- package/dist/services/sensitivity-analysis.d.ts +2 -1
- package/dist/services/sensitivity-analysis.js +87 -1
- package/dist/translations/en/networkModificationsEn.d.ts +2 -0
- package/dist/translations/en/networkModificationsEn.js +2 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +2 -0
- package/dist/translations/fr/networkModificationsFr.js +2 -0
- package/dist/utils/constants/filterConstant.d.ts +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/types/dynamic-security-analysis.type.d.ts +3 -5
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +4 -4
- package/dist/utils/types/parameters.type.d.ts +1 -1
- package/dist/utils/types/pcc-min.type.d.ts +0 -1
- package/dist/utils/types/pcc-min.type.js +0 -21
- package/dist/utils/types/security-analysis.type.d.ts +26 -0
- package/dist/utils/types/security-analysis.type.js +14 -0
- package/dist/utils/types/sensitivity-analysis.type.d.ts +3 -7
- package/dist/utils/types/sensitivity-analysis.type.js +17 -103
- package/dist/utils/types/types.d.ts +7 -0
- package/package.json +1 -1
- package/dist/components/composite/dnd-table-v2/dnd-table-add-rows-dialog.d.ts +0 -13
- package/dist/components/composite/dnd-table-v2/dnd-table-add-rows-dialog.js +0 -69
- package/dist/components/composite/dnd-table-v2/dnd-table-bottom-left-buttons.d.ts +0 -17
- package/dist/components/composite/dnd-table-v2/dnd-table-bottom-left-buttons.js +0 -47
- package/dist/components/composite/dnd-table-v2/dnd-table-bottom-right-buttons.d.ts +0 -17
- package/dist/components/composite/dnd-table-v2/dnd-table-bottom-right-buttons.js +0 -100
- package/dist/components/composite/dnd-table-v2/dnd-table.d.ts +0 -32
- package/dist/components/composite/dnd-table-v2/dnd-table.js +0 -375
- package/dist/components/composite/dnd-table-v2/dnd-table.type.d.ts +0 -70
- package/dist/components/composite/dnd-table-v2/dnd-table.type.js +0 -19
- package/dist/components/composite/dnd-table-v2/index.d.ts +0 -12
- package/dist/components/composite/dnd-table-v2/index.js +0 -16
- package/dist/features/parameters/common/parameter-table/constants.d.ts +0 -11
- package/dist/features/parameters/common/parameter-table/constants.js +0 -12
- package/dist/features/parameters/common/parameter-table/parameter-table.d.ts +0 -15
- package/dist/features/parameters/common/parameter-table/parameter-table.js +0 -98
- package/dist/features/parameters/common/parameter-table/table-cell.d.ts +0 -8
- package/dist/features/parameters/common/parameter-table/table-cell.js +0 -83
- package/dist/features/parameters/common/parameter-table/table-row.d.ts +0 -11
- package/dist/features/parameters/common/parameter-table/table-row.js +0 -41
- package/dist/features/parameters/common/parameter-table/types.d.ts +0 -26
- package/dist/features/parameters/common/parameter-table/types.js +0 -1
- package/dist/features/parameters/security-analysis/types.d.ts +0 -20
- package/dist/features/parameters/security-analysis/types.js +0 -42
- /package/dist/components/composite/{dnd-table-v2 → dnd-table}/deletable-table-row.d.ts +0 -0
- /package/dist/components/composite/{dnd-table-v2 → dnd-table}/deletable-table-row.js +0 -0
- /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-row.d.ts +0 -0
- /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-row.js +0 -0
- /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-utils.d.ts +0 -0
- /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-utils.js +0 -0
package/dist/features/index.js
CHANGED
|
@@ -157,6 +157,12 @@ import { emptyModificationByAssignmentFormData, modificationByAssignmentDtoToFor
|
|
|
157
157
|
import { DataType } from "./network-modifications/by-filter/assignment/assignment/assignment.type.js";
|
|
158
158
|
import { generatorCreationDtoToForm, generatorCreationEmptyFormData, generatorCreationFormSchema, generatorCreationFormToDto } from "./network-modifications/generator/creation/generatorCreation.utils.js";
|
|
159
159
|
import { GeneratorCreationForm } from "./network-modifications/generator/creation/GeneratorCreationForm.js";
|
|
160
|
+
import { generatorModificationDtoToForm, generatorModificationEmptyFormData, generatorModificationFormSchema, generatorModificationFormToDto } from "./network-modifications/generator/modification/generatorModification.utils.js";
|
|
161
|
+
import { GENERATOR_TAB_FIELDS, GeneratorDialogTab } from "./network-modifications/generator/modification/generatorTabs.utils.js";
|
|
162
|
+
import { GeneratorDialogHeader } from "./network-modifications/generator/modification/GeneratorDialogHeader.js";
|
|
163
|
+
import { GeneratorDialogTabs } from "./network-modifications/generator/modification/GeneratorDialogTabs.js";
|
|
164
|
+
import { GeneratorDialogTabsContent } from "./network-modifications/generator/modification/GeneratorDialogTabsContent.js";
|
|
165
|
+
import { GeneratorModificationForm } from "./network-modifications/generator/modification/GeneratorModificationForm.js";
|
|
160
166
|
import { batteryCreationDtoToForm, batteryCreationEmptyFormData, batteryCreationFormSchema, batteryCreationFormToDto } from "./network-modifications/battery/creation/batteryCreation.utils.js";
|
|
161
167
|
import { BatteryCreationForm } from "./network-modifications/battery/creation/BatteryCreationForm.js";
|
|
162
168
|
import { batteryModificationDtoToForm, batteryModificationEmptyFormData, batteryModificationFormSchema, batteryModificationFormToDto } from "./network-modifications/battery/modification/batteryModification.utils.js";
|
|
@@ -283,7 +289,13 @@ export {
|
|
|
283
289
|
GENERAL,
|
|
284
290
|
GENERAL_APPLY_MODIFICATIONS,
|
|
285
291
|
GENERATORS_SELECTION_TYPE,
|
|
292
|
+
GENERATOR_TAB_FIELDS,
|
|
286
293
|
GeneratorCreationForm,
|
|
294
|
+
GeneratorDialogHeader,
|
|
295
|
+
GeneratorDialogTab,
|
|
296
|
+
GeneratorDialogTabs,
|
|
297
|
+
GeneratorDialogTabsContent,
|
|
298
|
+
GeneratorModificationForm,
|
|
287
299
|
GridLogo,
|
|
288
300
|
HIGH_VOLTAGE_LIMIT,
|
|
289
301
|
HVDC_AC_EMULATION,
|
|
@@ -534,6 +546,10 @@ export {
|
|
|
534
546
|
generatorCreationEmptyFormData,
|
|
535
547
|
generatorCreationFormSchema,
|
|
536
548
|
generatorCreationFormToDto,
|
|
549
|
+
generatorModificationDtoToForm,
|
|
550
|
+
generatorModificationEmptyFormData,
|
|
551
|
+
generatorModificationFormSchema,
|
|
552
|
+
generatorModificationFormToDto,
|
|
537
553
|
getActivePowerControlEmptyFormData,
|
|
538
554
|
getActivePowerControlSchema,
|
|
539
555
|
getActivePowerSetPointSchema,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FieldValues, UseFormSetValue } from 'react-hook-form';
|
|
2
|
-
import { ReactiveCapabilityCurve
|
|
2
|
+
import { ReactiveCapabilityCurve } from '../reactiveLimits.type';
|
|
3
3
|
import { FieldConstants } from '../../../../../utils';
|
|
4
|
-
import { GeneratorModificationDialogSchemaForm } from '../../../generator/generatorDialog.type';
|
|
5
4
|
import { GeneratorCreationFormData } from '../../../generator/creation/generatorCreation.utils';
|
|
6
5
|
import { GeneratorCreationDto } from '../../../generator/creation/generatorCreation.types';
|
|
7
6
|
import { GeneratorModificationDto } from '../../../generator/modification/generatorModification.types';
|
|
7
|
+
import { GeneratorModificationFormData } from '../../../generator/modification/generatorModification.utils';
|
|
8
|
+
import { GeneratorFormInfos } from '../../../generator';
|
|
8
9
|
export declare const INSERT = "INSERT";
|
|
9
10
|
export declare const REMOVE = "REMOVE";
|
|
10
11
|
export declare const getRowEmptyFormData: () => {
|
|
@@ -27,4 +28,4 @@ export declare const getReactiveCapabilityCurveValidationSchema: (id?: FieldCons
|
|
|
27
28
|
export declare function setSelectedReactiveLimits(id: string, minMaxReactiveLimits: number, setValue: UseFormSetValue<FieldValues>): void;
|
|
28
29
|
export declare function setCurrentReactiveCapabilityCurveTable(previousReactiveCapabilityCurveTable: ReactiveCapabilityCurve, fieldKey: string, setValue: UseFormSetValue<FieldValues>): void;
|
|
29
30
|
export declare function toReactiveCapabilityCurveChoiceForGeneratorCreation(form: GeneratorCreationFormData, dto?: GeneratorCreationDto): "CURVE" | "MINMAX";
|
|
30
|
-
export declare function toReactiveCapabilityCurveChoiceForGeneratorModification(
|
|
31
|
+
export declare function toReactiveCapabilityCurveChoiceForGeneratorModification(form: GeneratorModificationFormData, generatorToModify: GeneratorFormInfos | undefined, dto?: GeneratorModificationDto): "CURVE" | "MINMAX";
|
|
@@ -101,8 +101,7 @@ function setSelectedReactiveLimits(id, minMaxReactiveLimits, setValue) {
|
|
|
101
101
|
function setCurrentReactiveCapabilityCurveTable(previousReactiveCapabilityCurveTable, fieldKey, setValue) {
|
|
102
102
|
setValue(fieldKey, previousReactiveCapabilityCurveTable);
|
|
103
103
|
}
|
|
104
|
-
function handleReactiveCapabilityCurveChoice(previousChoice,
|
|
105
|
-
const currentReactiveLimits = form[FieldConstants.REACTIVE_LIMITS];
|
|
104
|
+
function handleReactiveCapabilityCurveChoice(previousChoice, currentReactiveLimits) {
|
|
106
105
|
const currentChoice = currentReactiveLimits?.[FieldConstants.REACTIVE_CAPABILITY_CURVE_CHOICE];
|
|
107
106
|
if (currentChoice === "MINMAX") {
|
|
108
107
|
const hasAnyValue = currentReactiveLimits?.[FieldConstants.MAXIMUM_REACTIVE_POWER] || currentReactiveLimits?.[FieldConstants.MINIMUM_REACTIVE_POWER];
|
|
@@ -129,38 +128,16 @@ function toReactiveCapabilityCurveChoiceForGeneratorCreation(form, dto) {
|
|
|
129
128
|
if (dto) {
|
|
130
129
|
previousChoice = dto.reactiveCapabilityCurve ? "CURVE" : "MINMAX";
|
|
131
130
|
}
|
|
132
|
-
return handleReactiveCapabilityCurveChoice(previousChoice, form);
|
|
131
|
+
return handleReactiveCapabilityCurveChoice(previousChoice, form.reactiveLimits);
|
|
133
132
|
}
|
|
134
|
-
function
|
|
135
|
-
if (currentChoice === "MINMAX") {
|
|
136
|
-
const hasAnyValue = currentReactiveLimits?.[FieldConstants.MAXIMUM_REACTIVE_POWER] || currentReactiveLimits?.[FieldConstants.MINIMUM_REACTIVE_POWER];
|
|
137
|
-
if (previousChoice === "CURVE" && !hasAnyValue) {
|
|
138
|
-
return "CURVE";
|
|
139
|
-
}
|
|
140
|
-
return "MINMAX";
|
|
141
|
-
}
|
|
142
|
-
if (currentChoice === "CURVE") {
|
|
143
|
-
const currentPoints = currentReactiveLimits?.[FieldConstants.REACTIVE_CAPABILITY_CURVE_TABLE];
|
|
144
|
-
const hasAnyValue = currentPoints?.some((v) => v.p != null || v.maxQ != null || v.minQ != null);
|
|
145
|
-
if (previousChoice === "MINMAX" && !hasAnyValue) {
|
|
146
|
-
return "MINMAX";
|
|
147
|
-
}
|
|
148
|
-
return "CURVE";
|
|
149
|
-
}
|
|
150
|
-
console.error(
|
|
151
|
-
"Reactive capability curve choice is not valid, it should be either MINMAX or CURVE. We return MINMAX by default."
|
|
152
|
-
);
|
|
153
|
-
return "MINMAX";
|
|
154
|
-
}
|
|
155
|
-
function toReactiveCapabilityCurveChoiceForGeneratorModification(currentReactiveLimits, editData, networkPoints) {
|
|
156
|
-
const currentChoice = currentReactiveLimits?.[FieldConstants.REACTIVE_CAPABILITY_CURVE_CHOICE];
|
|
133
|
+
function toReactiveCapabilityCurveChoiceForGeneratorModification(form, generatorToModify, dto) {
|
|
157
134
|
let editDataChoice;
|
|
158
|
-
if (
|
|
159
|
-
editDataChoice =
|
|
135
|
+
if (dto) {
|
|
136
|
+
editDataChoice = dto.reactiveCapabilityCurve?.value === true ? "CURVE" : "MINMAX";
|
|
160
137
|
}
|
|
161
|
-
const networkChoice =
|
|
138
|
+
const networkChoice = generatorToModify?.reactiveCapabilityCurvePoints ? "CURVE" : "MINMAX";
|
|
162
139
|
const previousChoice = editDataChoice ?? networkChoice;
|
|
163
|
-
return
|
|
140
|
+
return handleReactiveCapabilityCurveChoice(previousChoice, form.reactiveLimits);
|
|
164
141
|
}
|
|
165
142
|
export {
|
|
166
143
|
INSERT,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
1
2
|
import { ReactiveCapabilityCurvePoints } from './reactiveLimits.type';
|
|
2
3
|
import { FieldConstants } from '../../../../utils';
|
|
3
4
|
export declare const REACTIVE_LIMIT_TYPES: readonly [{
|
|
@@ -69,6 +70,7 @@ export declare const getReactiveLimitsValidationSchema: (isEquipmentModification
|
|
|
69
70
|
maximumReactivePower: undefined;
|
|
70
71
|
reactiveCapabilityCurveTable: "";
|
|
71
72
|
}, "">;
|
|
73
|
+
export type ReactiveLimitsFormData = InferType<ReturnType<typeof getReactiveLimitsValidationSchema>>;
|
|
72
74
|
export declare const getReactiveLimitsSchema: (isEquipmentModification?: boolean, positiveAndNegativePExist?: boolean, id?: FieldConstants) => {
|
|
73
75
|
[x: string]: import('yup').ObjectSchema<{
|
|
74
76
|
reactiveCapabilityCurveChoice: string;
|
|
@@ -1,68 +1,8 @@
|
|
|
1
|
-
import { FieldConstants } from '../../../utils';
|
|
2
1
|
import { ActivePowerControlInfos } from '../common/activePowerControl';
|
|
3
2
|
import { MinMaxReactiveLimitsFormInfos, ReactiveCapabilityCurvePoints } from '../common/reactiveLimits/reactiveLimits.type';
|
|
4
3
|
import { ShortCircuitInfos } from '../common/shortCircuit/shortCircuitForm.type';
|
|
5
|
-
import { Property } from '../common/properties/properties.type';
|
|
6
4
|
import { ConnectablePositionFormInfos } from '../common/connectivity/connectivity.type';
|
|
7
5
|
import { MeasurementInfo } from '../common/measurements/measurement.type';
|
|
8
|
-
export type GeneratorDialogSchemaBaseForm = {
|
|
9
|
-
[FieldConstants.EQUIPMENT_NAME]?: string;
|
|
10
|
-
[FieldConstants.ENERGY_SOURCE]: string | null;
|
|
11
|
-
[FieldConstants.MAXIMUM_ACTIVE_POWER]: number | null;
|
|
12
|
-
[FieldConstants.MINIMUM_ACTIVE_POWER]: number | null;
|
|
13
|
-
[FieldConstants.RATED_NOMINAL_POWER]?: number | null;
|
|
14
|
-
[FieldConstants.TRANSFORMER_REACTANCE]?: number | null;
|
|
15
|
-
[FieldConstants.TRANSIENT_REACTANCE]?: number | null;
|
|
16
|
-
[FieldConstants.PLANNED_ACTIVE_POWER_SET_POINT]?: number | null;
|
|
17
|
-
[FieldConstants.MARGINAL_COST]?: number | null;
|
|
18
|
-
[FieldConstants.PLANNED_OUTAGE_RATE]?: number | null;
|
|
19
|
-
[FieldConstants.FORCED_OUTAGE_RATE]?: number | null;
|
|
20
|
-
[FieldConstants.CONNECTIVITY]: {
|
|
21
|
-
[FieldConstants.VOLTAGE_LEVEL]: {
|
|
22
|
-
[FieldConstants.ID]?: string;
|
|
23
|
-
};
|
|
24
|
-
[FieldConstants.BUS_OR_BUSBAR_SECTION]: {
|
|
25
|
-
[FieldConstants.ID]?: string;
|
|
26
|
-
};
|
|
27
|
-
[FieldConstants.CONNECTION_DIRECTION]?: string;
|
|
28
|
-
[FieldConstants.CONNECTION_NAME]?: string;
|
|
29
|
-
[FieldConstants.CONNECTION_POSITION]?: number;
|
|
30
|
-
[FieldConstants.CONNECTED]?: boolean;
|
|
31
|
-
};
|
|
32
|
-
[FieldConstants.VOLTAGE_REGULATION]?: boolean | null;
|
|
33
|
-
[FieldConstants.ACTIVE_POWER_SET_POINT]?: number;
|
|
34
|
-
[FieldConstants.REACTIVE_POWER_SET_POINT]?: number | null;
|
|
35
|
-
[FieldConstants.VOLTAGE_REGULATION_TYPE]?: string | null;
|
|
36
|
-
[FieldConstants.VOLTAGE_SET_POINT]?: number | null;
|
|
37
|
-
[FieldConstants.Q_PERCENT]?: number | null;
|
|
38
|
-
[FieldConstants.VOLTAGE_LEVEL]?: {
|
|
39
|
-
[FieldConstants.ID]?: string;
|
|
40
|
-
[FieldConstants.NAME]?: string;
|
|
41
|
-
[FieldConstants.SUBSTATION_ID]?: string;
|
|
42
|
-
[FieldConstants.NOMINAL_VOLTAGE]?: string;
|
|
43
|
-
[FieldConstants.TOPOLOGY_KIND]?: string | null;
|
|
44
|
-
};
|
|
45
|
-
[FieldConstants.EQUIPMENT]?: {
|
|
46
|
-
[FieldConstants.ID]?: string;
|
|
47
|
-
[FieldConstants.NAME]?: string | null;
|
|
48
|
-
[FieldConstants.TYPE]?: string;
|
|
49
|
-
};
|
|
50
|
-
[FieldConstants.FREQUENCY_REGULATION]?: boolean | null;
|
|
51
|
-
[FieldConstants.DROOP]?: number | null;
|
|
52
|
-
[FieldConstants.REACTIVE_LIMITS]: {
|
|
53
|
-
[FieldConstants.MINIMUM_REACTIVE_POWER]?: number | null;
|
|
54
|
-
[FieldConstants.MAXIMUM_REACTIVE_POWER]?: number | null;
|
|
55
|
-
[FieldConstants.REACTIVE_CAPABILITY_CURVE_CHOICE]: string | null;
|
|
56
|
-
[FieldConstants.REACTIVE_CAPABILITY_CURVE_TABLE]?: ReactiveCapabilityCurvePoints[];
|
|
57
|
-
};
|
|
58
|
-
[FieldConstants.ADDITIONAL_PROPERTIES]?: Property[];
|
|
59
|
-
};
|
|
60
|
-
export type GeneratorModificationDialogSchemaForm = {
|
|
61
|
-
[FieldConstants.STATE_ESTIMATION]?: {
|
|
62
|
-
[FieldConstants.MEASUREMENT_P]?: MeasurementInfo;
|
|
63
|
-
[FieldConstants.MEASUREMENT_Q]?: MeasurementInfo;
|
|
64
|
-
};
|
|
65
|
-
} & Partial<GeneratorDialogSchemaBaseForm>;
|
|
66
6
|
export interface GeneratorFormInfos {
|
|
67
7
|
id: string;
|
|
68
8
|
name: string;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import { generatorCreationDtoToForm, generatorCreationEmptyFormData, generatorCreationFormSchema, generatorCreationFormToDto } from "./creation/generatorCreation.utils.js";
|
|
2
2
|
import { GeneratorCreationForm } from "./creation/GeneratorCreationForm.js";
|
|
3
|
+
import { generatorModificationDtoToForm, generatorModificationEmptyFormData, generatorModificationFormSchema, generatorModificationFormToDto } from "./modification/generatorModification.utils.js";
|
|
4
|
+
import { GENERATOR_TAB_FIELDS, GeneratorDialogTab } from "./modification/generatorTabs.utils.js";
|
|
5
|
+
import { GeneratorDialogHeader } from "./modification/GeneratorDialogHeader.js";
|
|
6
|
+
import { GeneratorDialogTabs } from "./modification/GeneratorDialogTabs.js";
|
|
7
|
+
import { GeneratorDialogTabsContent } from "./modification/GeneratorDialogTabsContent.js";
|
|
8
|
+
import { GeneratorModificationForm } from "./modification/GeneratorModificationForm.js";
|
|
3
9
|
export {
|
|
10
|
+
GENERATOR_TAB_FIELDS,
|
|
4
11
|
GeneratorCreationForm,
|
|
12
|
+
GeneratorDialogHeader,
|
|
13
|
+
GeneratorDialogTab,
|
|
14
|
+
GeneratorDialogTabs,
|
|
15
|
+
GeneratorDialogTabsContent,
|
|
16
|
+
GeneratorModificationForm,
|
|
5
17
|
generatorCreationDtoToForm,
|
|
6
18
|
generatorCreationEmptyFormData,
|
|
7
19
|
generatorCreationFormSchema,
|
|
8
|
-
generatorCreationFormToDto
|
|
20
|
+
generatorCreationFormToDto,
|
|
21
|
+
generatorModificationDtoToForm,
|
|
22
|
+
generatorModificationEmptyFormData,
|
|
23
|
+
generatorModificationFormSchema,
|
|
24
|
+
generatorModificationFormToDto
|
|
9
25
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GeneratorFormInfos } from '../generatorDialog.type';
|
|
2
|
+
export interface GeneratorDialogHeaderProps {
|
|
3
|
+
generatorToModify?: GeneratorFormInfos | null;
|
|
4
|
+
equipmentId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function GeneratorDialogHeader({ generatorToModify, equipmentId }: Readonly<GeneratorDialogHeaderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TextField, Grid } from "@mui/material";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
5
|
+
import "../../../../utils/conversionUtils.js";
|
|
6
|
+
import { getEnergySourceLabel, ENERGY_SOURCES } from "../../../../utils/types/equipmentType.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
import { filledTextField } from "../../common/form.utils.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import "react-hook-form";
|
|
11
|
+
import "../../common/properties/propertyUtils.js";
|
|
12
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
13
|
+
import "localized-countries";
|
|
14
|
+
import "localized-countries/data/fr";
|
|
15
|
+
import "localized-countries/data/en";
|
|
16
|
+
import "notistack";
|
|
17
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import { TextInput } from "../../../../components/ui/reactHookForm/text/TextInput.js";
|
|
21
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
22
|
+
import { SelectInput } from "../../../../components/ui/reactHookForm/selectInputs/SelectInput.js";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
28
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
|
+
import "@hello-pangea/dnd";
|
|
31
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
32
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
33
|
+
import "mui-nested-menu";
|
|
34
|
+
import "react-resizable-panels";
|
|
35
|
+
import "react-dom";
|
|
36
|
+
import "autosuggest-highlight/match";
|
|
37
|
+
import "autosuggest-highlight/parse";
|
|
38
|
+
import "clsx";
|
|
39
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
40
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
41
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
42
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
43
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
44
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
45
|
+
import "react-querybuilder";
|
|
46
|
+
import "uuid";
|
|
47
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
48
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
49
|
+
import "@react-querybuilder/material";
|
|
50
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
51
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
52
|
+
import "../../../../components/composite/agGridTable/BottomRightButtons.js";
|
|
53
|
+
import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
54
|
+
import "ag-grid-community";
|
|
55
|
+
import "react-papaparse";
|
|
56
|
+
import "react-csv-downloader";
|
|
57
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
58
|
+
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
59
|
+
function GeneratorDialogHeader({ generatorToModify, equipmentId }) {
|
|
60
|
+
const intl = useIntl();
|
|
61
|
+
const energySourceLabelId = getEnergySourceLabel(generatorToModify?.energySource);
|
|
62
|
+
const previousEnergySourceLabel = energySourceLabelId ? intl.formatMessage({
|
|
63
|
+
id: energySourceLabelId
|
|
64
|
+
}) : void 0;
|
|
65
|
+
const generatorIdField = /* @__PURE__ */ jsx(
|
|
66
|
+
TextField,
|
|
67
|
+
{
|
|
68
|
+
size: "small",
|
|
69
|
+
fullWidth: true,
|
|
70
|
+
label: "ID",
|
|
71
|
+
value: equipmentId ?? "",
|
|
72
|
+
InputProps: {
|
|
73
|
+
readOnly: true
|
|
74
|
+
},
|
|
75
|
+
disabled: true,
|
|
76
|
+
...filledTextField
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
const generatorNameField = /* @__PURE__ */ jsx(
|
|
80
|
+
TextInput,
|
|
81
|
+
{
|
|
82
|
+
name: FieldConstants.EQUIPMENT_NAME,
|
|
83
|
+
label: "Name",
|
|
84
|
+
formProps: filledTextField,
|
|
85
|
+
previousValue: generatorToModify?.name,
|
|
86
|
+
clearable: true
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
const energySourceField = /* @__PURE__ */ jsx(
|
|
90
|
+
SelectInput,
|
|
91
|
+
{
|
|
92
|
+
name: FieldConstants.ENERGY_SOURCE,
|
|
93
|
+
label: "energySource",
|
|
94
|
+
options: [...ENERGY_SOURCES],
|
|
95
|
+
fullWidth: true,
|
|
96
|
+
size: "small",
|
|
97
|
+
formProps: { ...filledTextField },
|
|
98
|
+
previousValue: previousEnergySourceLabel
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
102
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: generatorIdField }),
|
|
103
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: generatorNameField }),
|
|
104
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: energySourceField })
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
GeneratorDialogHeader
|
|
109
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
interface GeneratorDialogTabsProps {
|
|
8
|
+
tabIndex: number;
|
|
9
|
+
tabIndexesWithError: number[];
|
|
10
|
+
setTabIndex: (newTabIndex: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function GeneratorDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex, }: Readonly<GeneratorDialogTabsProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs, Tab } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import { GeneratorDialogTab } from "./generatorTabs.utils.js";
|
|
5
|
+
import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
|
|
6
|
+
function GeneratorDialogTabs({
|
|
7
|
+
tabIndex,
|
|
8
|
+
tabIndexesWithError,
|
|
9
|
+
setTabIndex
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
Tabs,
|
|
13
|
+
{
|
|
14
|
+
value: tabIndex,
|
|
15
|
+
variant: "scrollable",
|
|
16
|
+
onChange: (event, newValue) => setTabIndex(newValue),
|
|
17
|
+
TabIndicatorProps: {
|
|
18
|
+
sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
|
|
19
|
+
},
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
Tab,
|
|
23
|
+
{
|
|
24
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "ConnectivityTab" }),
|
|
25
|
+
sx: getTabStyle(tabIndexesWithError, GeneratorDialogTab.CONNECTIVITY_TAB)
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
Tab,
|
|
30
|
+
{
|
|
31
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "SetpointsAndLimitsTab" }),
|
|
32
|
+
sx: getTabStyle(tabIndexesWithError, GeneratorDialogTab.SETPOINTS_AND_LIMITS_TAB)
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
Tab,
|
|
37
|
+
{
|
|
38
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "SpecificTab" }),
|
|
39
|
+
sx: getTabStyle(tabIndexesWithError, GeneratorDialogTab.SPECIFIC_TAB)
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
Tab,
|
|
44
|
+
{
|
|
45
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "AdditionalInformation" }),
|
|
46
|
+
sx: getTabStyle(tabIndexesWithError, GeneratorDialogTab.ADDITIONAL_INFORMATION_TAB)
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
GeneratorDialogTabs
|
|
55
|
+
};
|
package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConnectivityNetworkProps } from '../../common';
|
|
2
|
+
import { GeneratorFormInfos } from '../generatorDialog.type';
|
|
3
|
+
import { EquipmentType, Identifiable } from '../../../../utils';
|
|
4
|
+
export interface GeneratorDialogTabsContentProps extends ConnectivityNetworkProps {
|
|
5
|
+
generatorToModify?: GeneratorFormInfos | null;
|
|
6
|
+
updatePreviousReactiveCapabilityCurveTable: (action: string, index: number) => void;
|
|
7
|
+
fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
|
|
8
|
+
type: EquipmentType;
|
|
9
|
+
})[]>;
|
|
10
|
+
tabIndex: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function GeneratorDialogTabsContent({ generatorToModify, updatePreviousReactiveCapabilityCurveTable, tabIndex, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, fetchVoltageLevelEquipments, }: Readonly<GeneratorDialogTabsContentProps>): import("react/jsx-runtime").JSX.Element;
|