@gridsuite/commons-ui 0.224.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/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 +1 -1
- package/dist/features/parameters/common/contingency-table/columns-definitions.js +1 -1
- 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/security-analysis-parameters-inline.js +1 -1
- package/dist/features/parameters/sensi/columns-definitions.js +1 -1
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -1
- 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/index.js +22 -6
- package/dist/services/security-analysis.js +2 -3
- 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/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/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/network-modifications/generator/modification/GeneratorModificationForm.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { useWatch } from "react-hook-form";
|
|
4
|
+
import { GeneratorDialogTab, GENERATOR_TAB_FIELDS } from "./generatorTabs.utils.js";
|
|
5
|
+
import { GeneratorDialogHeader } from "./GeneratorDialogHeader.js";
|
|
6
|
+
import { GeneratorDialogTabs } from "./GeneratorDialogTabs.js";
|
|
7
|
+
import { GeneratorDialogTabsContent } from "./GeneratorDialogTabsContent.js";
|
|
8
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
9
|
+
import "../../../../utils/conversionUtils.js";
|
|
10
|
+
import "../../../../utils/types/equipmentType.js";
|
|
11
|
+
import "@mui/icons-material";
|
|
12
|
+
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
13
|
+
function GeneratorModificationForm({
|
|
14
|
+
generatorToModify,
|
|
15
|
+
updatePreviousReactiveCapabilityCurveTable,
|
|
16
|
+
voltageLevelOptions,
|
|
17
|
+
fetchBusesOrBusbarSections,
|
|
18
|
+
PositionDiagramPane,
|
|
19
|
+
fetchVoltageLevelEquipments
|
|
20
|
+
}) {
|
|
21
|
+
const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
|
|
22
|
+
GENERATOR_TAB_FIELDS,
|
|
23
|
+
GeneratorDialogTab.CONNECTIVITY_TAB
|
|
24
|
+
);
|
|
25
|
+
const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
|
|
26
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(GeneratorDialogHeader, { generatorToModify, equipmentId }) }),
|
|
28
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
29
|
+
GeneratorDialogTabs,
|
|
30
|
+
{
|
|
31
|
+
tabIndex,
|
|
32
|
+
tabIndexesWithError,
|
|
33
|
+
setTabIndex
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
36
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
37
|
+
GeneratorDialogTabsContent,
|
|
38
|
+
{
|
|
39
|
+
tabIndex,
|
|
40
|
+
generatorToModify,
|
|
41
|
+
voltageLevelOptions,
|
|
42
|
+
fetchBusesOrBusbarSections,
|
|
43
|
+
PositionDiagramPane,
|
|
44
|
+
updatePreviousReactiveCapabilityCurveTable,
|
|
45
|
+
fetchVoltageLevelEquipments
|
|
46
|
+
}
|
|
47
|
+
) })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
GeneratorModificationForm
|
|
52
|
+
};
|
package/dist/features/network-modifications/generator/modification/generatorModification.types.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { AttributeModification } from '../../../../utils';
|
|
2
|
-
import { Property } from '../../common
|
|
3
|
-
import { ReactiveCapabilityCurvePoints } from '../../common/reactiveLimits/reactiveLimits.type';
|
|
1
|
+
import { AttributeModification, ModificationType } from '../../../../utils';
|
|
2
|
+
import { Property, ReactiveCapabilityCurvePoints } from '../../common';
|
|
4
3
|
export interface GeneratorModificationDto {
|
|
5
|
-
type:
|
|
6
|
-
uuid: string | null;
|
|
4
|
+
type: ModificationType;
|
|
7
5
|
equipmentId: string;
|
|
8
6
|
equipmentName: AttributeModification<string> | null;
|
|
9
7
|
energySource?: AttributeModification<string> | null;
|
package/dist/features/network-modifications/generator/modification/generatorModification.utils.d.ts
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
2
|
+
import { DeepNullable } from '../../../../utils';
|
|
3
|
+
import { GeneratorModificationDto } from './generatorModification.types';
|
|
4
|
+
import { GeneratorFormInfos } from '../generatorDialog.type';
|
|
5
|
+
export declare const generatorModificationFormSchema: import('yup').ObjectSchema<NonNullable<{
|
|
6
|
+
stateEstimation: {
|
|
7
|
+
[x: string]: {
|
|
8
|
+
validity?: boolean | null | undefined;
|
|
9
|
+
value?: number | null | undefined;
|
|
10
|
+
};
|
|
11
|
+
[x: number]: {
|
|
12
|
+
validity?: boolean | null | undefined;
|
|
13
|
+
value?: number | null | undefined;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
frequencyRegulation: boolean | null | undefined;
|
|
17
|
+
droop: number | null | undefined;
|
|
18
|
+
voltageRegulation: boolean | null | undefined;
|
|
19
|
+
voltageRegulationType: string | null | undefined;
|
|
20
|
+
voltageSetpoint: number | null | undefined;
|
|
21
|
+
qPercent: number | null | undefined;
|
|
22
|
+
voltageLevel: {
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
nominalVoltage?: string | undefined;
|
|
26
|
+
substationId?: string | undefined;
|
|
27
|
+
topologyKind?: string | null | undefined;
|
|
28
|
+
} | null;
|
|
29
|
+
equipment: {
|
|
30
|
+
id?: string | undefined;
|
|
31
|
+
name?: string | null | undefined;
|
|
32
|
+
type?: string | undefined;
|
|
33
|
+
} | null;
|
|
34
|
+
reactivePowerSetpoint: number | null | undefined;
|
|
35
|
+
activePowerSetpoint: number | undefined;
|
|
36
|
+
plannedActivePowerSetPoint: number | null | undefined;
|
|
37
|
+
marginalCost: number | null | undefined;
|
|
38
|
+
plannedOutageRate: number | null | undefined;
|
|
39
|
+
forcedOutageRate: number | null | undefined;
|
|
40
|
+
connectivity: {
|
|
41
|
+
terminalConnected?: boolean | null | undefined;
|
|
42
|
+
connectionDirection?: string | null | undefined;
|
|
43
|
+
connectionName?: string | undefined;
|
|
44
|
+
connectionPosition?: number | null | undefined;
|
|
45
|
+
busOrBusbarSection: {
|
|
46
|
+
id?: string | undefined;
|
|
47
|
+
} | null;
|
|
48
|
+
voltageLevel: {
|
|
49
|
+
id?: string | undefined;
|
|
50
|
+
} | null;
|
|
51
|
+
};
|
|
52
|
+
reactiveLimits: {
|
|
53
|
+
minimumReactivePower?: number | null | undefined;
|
|
54
|
+
maximumReactivePower?: number | null | undefined;
|
|
55
|
+
reactiveCapabilityCurveTable?: {
|
|
56
|
+
minQ: number | null;
|
|
57
|
+
maxQ: number | null;
|
|
58
|
+
p: number | null;
|
|
59
|
+
}[] | null | undefined;
|
|
60
|
+
reactiveCapabilityCurveChoice: string;
|
|
61
|
+
};
|
|
62
|
+
transformerReactance: number | null | undefined;
|
|
63
|
+
directTransX: number | null | undefined;
|
|
64
|
+
equipmentID: string;
|
|
65
|
+
equipmentName: string | null | undefined;
|
|
66
|
+
energySource: string | null | undefined;
|
|
67
|
+
maximumActivePower: number | null | undefined;
|
|
68
|
+
minimumActivePower: number | null | undefined;
|
|
69
|
+
ratedNominalPower: number | null | undefined;
|
|
70
|
+
} & {
|
|
71
|
+
AdditionalProperties: {
|
|
72
|
+
previousValue?: string | null | undefined;
|
|
73
|
+
value?: string | null | undefined;
|
|
74
|
+
added: NonNullable<boolean | undefined>;
|
|
75
|
+
deletionMark: NonNullable<boolean | undefined>;
|
|
76
|
+
name: string;
|
|
77
|
+
}[] | undefined;
|
|
78
|
+
}>, import('yup').AnyObject, {
|
|
79
|
+
stateEstimation: {
|
|
80
|
+
[x: string]: {
|
|
81
|
+
value: undefined;
|
|
82
|
+
validity: undefined;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
frequencyRegulation: undefined;
|
|
86
|
+
droop: undefined;
|
|
87
|
+
voltageRegulation: undefined;
|
|
88
|
+
voltageRegulationType: undefined;
|
|
89
|
+
voltageSetpoint: undefined;
|
|
90
|
+
qPercent: undefined;
|
|
91
|
+
voltageLevel: {
|
|
92
|
+
id: undefined;
|
|
93
|
+
name: undefined;
|
|
94
|
+
substationId: undefined;
|
|
95
|
+
nominalVoltage: undefined;
|
|
96
|
+
topologyKind: undefined;
|
|
97
|
+
};
|
|
98
|
+
equipment: {
|
|
99
|
+
id: undefined;
|
|
100
|
+
name: undefined;
|
|
101
|
+
type: undefined;
|
|
102
|
+
};
|
|
103
|
+
reactivePowerSetpoint: undefined;
|
|
104
|
+
activePowerSetpoint: undefined;
|
|
105
|
+
plannedActivePowerSetPoint: undefined;
|
|
106
|
+
marginalCost: undefined;
|
|
107
|
+
plannedOutageRate: undefined;
|
|
108
|
+
forcedOutageRate: undefined;
|
|
109
|
+
connectivity: {
|
|
110
|
+
voltageLevel: {
|
|
111
|
+
id: undefined;
|
|
112
|
+
};
|
|
113
|
+
busOrBusbarSection: {
|
|
114
|
+
id: undefined;
|
|
115
|
+
};
|
|
116
|
+
connectionDirection: undefined;
|
|
117
|
+
connectionName: undefined;
|
|
118
|
+
connectionPosition: undefined;
|
|
119
|
+
terminalConnected: undefined;
|
|
120
|
+
};
|
|
121
|
+
reactiveLimits: {
|
|
122
|
+
reactiveCapabilityCurveChoice: undefined;
|
|
123
|
+
minimumReactivePower: undefined;
|
|
124
|
+
maximumReactivePower: undefined;
|
|
125
|
+
reactiveCapabilityCurveTable: "";
|
|
126
|
+
};
|
|
127
|
+
transformerReactance: undefined;
|
|
128
|
+
directTransX: undefined;
|
|
129
|
+
equipmentID: undefined;
|
|
130
|
+
equipmentName: undefined;
|
|
131
|
+
energySource: undefined;
|
|
132
|
+
maximumActivePower: undefined;
|
|
133
|
+
minimumActivePower: undefined;
|
|
134
|
+
ratedNominalPower: undefined;
|
|
135
|
+
AdditionalProperties: "";
|
|
136
|
+
}, "">;
|
|
137
|
+
export type GeneratorModificationFormData = InferType<typeof generatorModificationFormSchema>;
|
|
138
|
+
export declare const generatorModificationEmptyFormData: DeepNullable<GeneratorModificationFormData>;
|
|
139
|
+
export declare const generatorModificationDtoToForm: (dto: GeneratorModificationDto, includePreviousValues?: boolean) => GeneratorModificationFormData;
|
|
140
|
+
export declare const generatorModificationFormToDto: (form: GeneratorModificationFormData, dto: GeneratorModificationDto | undefined, equipment?: GeneratorFormInfos) => GeneratorModificationDto;
|
package/dist/features/network-modifications/generator/modification/generatorModification.utils.js
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { object, number, string, ref } from "yup";
|
|
2
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
3
|
+
import { toModificationOperation } from "../../../../utils/conversionUtils.js";
|
|
4
|
+
import "../../../../utils/types/equipmentType.js";
|
|
5
|
+
import { ModificationType } from "../../../../utils/types/modificationType.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
import { sanitizeString } from "../../../../utils/ts-utils.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import "react-hook-form";
|
|
11
|
+
import { modificationPropertiesSchema, getPropertiesFromModification, toModificationProperties } from "../../common/properties/propertyUtils.js";
|
|
12
|
+
import "@mui/material";
|
|
13
|
+
import "react-intl";
|
|
14
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
15
|
+
import "localized-countries";
|
|
16
|
+
import "localized-countries/data/fr";
|
|
17
|
+
import "localized-countries/data/en";
|
|
18
|
+
import "notistack";
|
|
19
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
20
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
21
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
27
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
|
+
import "@hello-pangea/dnd";
|
|
30
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
31
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
32
|
+
import "mui-nested-menu";
|
|
33
|
+
import "react-resizable-panels";
|
|
34
|
+
import { getInjectionActiveReactivePowerValidationSchemaProperties, getInjectionActiveReactivePowerEmptyFormDataProperties, getInjectionActiveReactivePowerEditDataProperties } from "../../common/measurements/injectionActiveReactivePowerForm.utils.js";
|
|
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 { getSetPointsSchema, getSetPointsEmptyFormData } from "../../common/setpoints/setPoints.utils.js";
|
|
59
|
+
import { getConnectivityWithPositionSchema, getConnectivityWithPositionEmptyFormDataProps, getConnectivityFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
|
|
60
|
+
import { getActivePowerControlSchema, getActivePowerControlEmptyFormData } from "../../common/activePowerControl/activePowerControlForm.utils.js";
|
|
61
|
+
import { getShortCircuitFormSchema, getShortCircuitEmptyFormData, getShortCircuitFormData } from "../../common/shortCircuit/shortCircuitForm.utils.js";
|
|
62
|
+
import { toReactiveCapabilityCurveChoiceForGeneratorModification } from "../../common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js";
|
|
63
|
+
import { getReactiveLimitsValidationSchema, getReactiveLimitsEmptyFormDataProps, getReactiveLimitsFormDataProps } from "../../common/reactiveLimits/reactiveLimits.utils.js";
|
|
64
|
+
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
65
|
+
import { getRegulatingTerminalEquipmentData, getRegulatingTerminalVoltageLevelData } from "../../common/regulatingTerminal/regulatingTerminal.utils.js";
|
|
66
|
+
import { getVoltageRegulationSchema, getVoltageRegulationEmptyFormData } from "../../common/voltageRegulation/voltageRegulation.utils.js";
|
|
67
|
+
const generatorModificationFormSchema = object().shape({
|
|
68
|
+
[FieldConstants.EQUIPMENT_ID]: string().required(),
|
|
69
|
+
[FieldConstants.EQUIPMENT_NAME]: string().nullable(),
|
|
70
|
+
[FieldConstants.ENERGY_SOURCE]: string().nullable(),
|
|
71
|
+
[FieldConstants.MAXIMUM_ACTIVE_POWER]: number().nullable(),
|
|
72
|
+
[FieldConstants.MINIMUM_ACTIVE_POWER]: number().nullable().when([FieldConstants.MAXIMUM_ACTIVE_POWER], {
|
|
73
|
+
is: (maximumActivePower) => maximumActivePower != null,
|
|
74
|
+
then: (schema) => schema.max(
|
|
75
|
+
ref(FieldConstants.MAXIMUM_ACTIVE_POWER),
|
|
76
|
+
"MinActivePowerMustBeLessOrEqualToMaxActivePower"
|
|
77
|
+
)
|
|
78
|
+
}),
|
|
79
|
+
[FieldConstants.RATED_NOMINAL_POWER]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
80
|
+
...getShortCircuitFormSchema(),
|
|
81
|
+
[FieldConstants.PLANNED_ACTIVE_POWER_SET_POINT]: number().nullable(),
|
|
82
|
+
[FieldConstants.MARGINAL_COST]: number().nullable(),
|
|
83
|
+
[FieldConstants.PLANNED_OUTAGE_RATE]: number().nullable().min(0, "RealPercentage").max(1, "RealPercentage"),
|
|
84
|
+
[FieldConstants.FORCED_OUTAGE_RATE]: number().nullable().min(0, "RealPercentage").max(1, "RealPercentage"),
|
|
85
|
+
[FieldConstants.CONNECTIVITY]: getConnectivityWithPositionSchema(true),
|
|
86
|
+
[FieldConstants.REACTIVE_LIMITS]: getReactiveLimitsValidationSchema(true),
|
|
87
|
+
...getSetPointsSchema(true),
|
|
88
|
+
...getVoltageRegulationSchema(true),
|
|
89
|
+
...getActivePowerControlSchema(true),
|
|
90
|
+
[FieldConstants.STATE_ESTIMATION]: getInjectionActiveReactivePowerValidationSchemaProperties()
|
|
91
|
+
}).concat(modificationPropertiesSchema).required();
|
|
92
|
+
const generatorModificationEmptyFormData = {
|
|
93
|
+
equipmentID: "",
|
|
94
|
+
equipmentName: "",
|
|
95
|
+
energySource: null,
|
|
96
|
+
maximumActivePower: null,
|
|
97
|
+
minimumActivePower: null,
|
|
98
|
+
ratedNominalPower: null,
|
|
99
|
+
plannedActivePowerSetPoint: null,
|
|
100
|
+
marginalCost: null,
|
|
101
|
+
plannedOutageRate: null,
|
|
102
|
+
forcedOutageRate: null,
|
|
103
|
+
connectivity: getConnectivityWithPositionEmptyFormDataProps(true),
|
|
104
|
+
...getShortCircuitEmptyFormData(),
|
|
105
|
+
...getSetPointsEmptyFormData(true),
|
|
106
|
+
...getActivePowerControlEmptyFormData(true),
|
|
107
|
+
...getVoltageRegulationEmptyFormData(true),
|
|
108
|
+
reactiveLimits: getReactiveLimitsEmptyFormDataProps(),
|
|
109
|
+
stateEstimation: getInjectionActiveReactivePowerEmptyFormDataProperties(),
|
|
110
|
+
AdditionalProperties: []
|
|
111
|
+
};
|
|
112
|
+
const generatorModificationDtoToForm = (dto, includePreviousValues = true) => {
|
|
113
|
+
return {
|
|
114
|
+
equipmentID: dto?.equipmentId,
|
|
115
|
+
equipmentName: dto?.equipmentName?.value ?? "",
|
|
116
|
+
energySource: dto?.energySource?.value ?? null,
|
|
117
|
+
maximumActivePower: dto?.maxP?.value ?? null,
|
|
118
|
+
minimumActivePower: dto?.minP?.value ?? null,
|
|
119
|
+
ratedNominalPower: dto?.ratedS?.value ?? null,
|
|
120
|
+
activePowerSetpoint: dto?.targetP?.value ?? void 0,
|
|
121
|
+
voltageRegulation: dto?.voltageRegulationOn?.value ?? null,
|
|
122
|
+
voltageSetpoint: dto?.targetV?.value ?? null,
|
|
123
|
+
reactivePowerSetpoint: dto?.targetQ?.value ?? null,
|
|
124
|
+
plannedActivePowerSetPoint: dto?.plannedActivePowerSetPoint?.value ?? null,
|
|
125
|
+
marginalCost: dto?.marginalCost?.value ?? null,
|
|
126
|
+
plannedOutageRate: dto?.plannedOutageRate?.value ?? null,
|
|
127
|
+
forcedOutageRate: dto?.forcedOutageRate?.value ?? null,
|
|
128
|
+
frequencyRegulation: dto?.participate?.value ?? null,
|
|
129
|
+
droop: dto?.droop?.value ?? null,
|
|
130
|
+
...getShortCircuitFormData({
|
|
131
|
+
directTransX: dto?.directTransX?.value ?? null,
|
|
132
|
+
stepUpTransformerX: dto?.stepUpTransformerX?.value ?? null
|
|
133
|
+
}),
|
|
134
|
+
voltageRegulationType: dto?.voltageRegulationType?.value ?? null,
|
|
135
|
+
qPercent: dto?.qPercent?.value ?? null,
|
|
136
|
+
connectivity: getConnectivityFormDataProps({
|
|
137
|
+
voltageLevelId: dto?.voltageLevelId?.value ?? null,
|
|
138
|
+
busbarSectionId: dto?.busOrBusbarSectionId?.value ?? null,
|
|
139
|
+
connectionName: dto?.connectionName?.value ?? "",
|
|
140
|
+
connectionDirection: dto?.connectionDirection?.value ?? null,
|
|
141
|
+
connectionPosition: dto?.connectionPosition?.value ?? null,
|
|
142
|
+
terminalConnected: dto?.terminalConnected?.value ?? null,
|
|
143
|
+
isEquipmentModification: true
|
|
144
|
+
}),
|
|
145
|
+
reactiveLimits: getReactiveLimitsFormDataProps({
|
|
146
|
+
reactiveCapabilityCurveChoice: dto?.reactiveCapabilityCurve?.value ? "CURVE" : "MINMAX",
|
|
147
|
+
minimumReactivePower: dto?.minQ?.value ?? null,
|
|
148
|
+
maximumReactivePower: dto?.maxQ?.value ?? null,
|
|
149
|
+
reactiveCapabilityCurvePoints: dto?.reactiveCapabilityCurvePoints ?? null
|
|
150
|
+
}),
|
|
151
|
+
voltageLevel: getRegulatingTerminalVoltageLevelData({
|
|
152
|
+
voltageLevelId: dto.regulatingTerminalVlId?.value
|
|
153
|
+
}),
|
|
154
|
+
equipment: getRegulatingTerminalEquipmentData({
|
|
155
|
+
equipmentId: dto.regulatingTerminalId?.value,
|
|
156
|
+
equipmentType: dto.regulatingTerminalType?.value
|
|
157
|
+
}),
|
|
158
|
+
stateEstimation: getInjectionActiveReactivePowerEditDataProperties(dto),
|
|
159
|
+
...getPropertiesFromModification(dto?.properties, includePreviousValues)
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
const generatorModificationFormToDto = (form, dto, equipment) => {
|
|
163
|
+
const isReactiveCapabilityCurveOn = toReactiveCapabilityCurveChoiceForGeneratorModification(form, equipment, dto) === "CURVE";
|
|
164
|
+
return {
|
|
165
|
+
type: ModificationType.GENERATOR_MODIFICATION,
|
|
166
|
+
equipmentId: form.equipmentID,
|
|
167
|
+
equipmentName: toModificationOperation(sanitizeString(form.equipmentName)),
|
|
168
|
+
energySource: toModificationOperation(form.energySource),
|
|
169
|
+
minP: toModificationOperation(form.minimumActivePower),
|
|
170
|
+
maxP: toModificationOperation(form.maximumActivePower),
|
|
171
|
+
ratedS: toModificationOperation(form.ratedNominalPower),
|
|
172
|
+
targetP: toModificationOperation(form.activePowerSetpoint),
|
|
173
|
+
targetQ: toModificationOperation(form.reactivePowerSetpoint),
|
|
174
|
+
voltageRegulationOn: toModificationOperation(form.voltageRegulation),
|
|
175
|
+
targetV: toModificationOperation(form.voltageSetpoint),
|
|
176
|
+
voltageLevelId: toModificationOperation(form.connectivity?.voltageLevel?.id),
|
|
177
|
+
busOrBusbarSectionId: toModificationOperation(form.connectivity?.busOrBusbarSection?.id),
|
|
178
|
+
connectionDirection: toModificationOperation(form.connectivity?.connectionDirection),
|
|
179
|
+
connectionName: toModificationOperation(sanitizeString(form.connectivity?.connectionName)),
|
|
180
|
+
connectionPosition: toModificationOperation(form.connectivity?.connectionPosition),
|
|
181
|
+
terminalConnected: toModificationOperation(form.connectivity?.terminalConnected),
|
|
182
|
+
qPercent: toModificationOperation(form.qPercent),
|
|
183
|
+
plannedActivePowerSetPoint: toModificationOperation(form.plannedActivePowerSetPoint),
|
|
184
|
+
marginalCost: toModificationOperation(form.marginalCost),
|
|
185
|
+
plannedOutageRate: toModificationOperation(form.plannedOutageRate),
|
|
186
|
+
forcedOutageRate: toModificationOperation(form.forcedOutageRate),
|
|
187
|
+
directTransX: toModificationOperation(form.directTransX),
|
|
188
|
+
stepUpTransformerX: toModificationOperation(form.transformerReactance),
|
|
189
|
+
voltageRegulationType: toModificationOperation(form.voltageRegulationType),
|
|
190
|
+
regulatingTerminalId: toModificationOperation(form.equipment?.id),
|
|
191
|
+
regulatingTerminalType: toModificationOperation(form.equipment?.type),
|
|
192
|
+
regulatingTerminalVlId: toModificationOperation(form.voltageLevel?.id),
|
|
193
|
+
reactiveCapabilityCurve: toModificationOperation(isReactiveCapabilityCurveOn),
|
|
194
|
+
participate: toModificationOperation(form.frequencyRegulation),
|
|
195
|
+
droop: toModificationOperation(form.droop) ?? null,
|
|
196
|
+
minQ: toModificationOperation(isReactiveCapabilityCurveOn ? null : form.reactiveLimits?.minimumReactivePower),
|
|
197
|
+
maxQ: toModificationOperation(isReactiveCapabilityCurveOn ? null : form.reactiveLimits?.maximumReactivePower),
|
|
198
|
+
reactiveCapabilityCurvePoints: isReactiveCapabilityCurveOn ? form.reactiveLimits.reactiveCapabilityCurveTable ?? null : null,
|
|
199
|
+
pMeasurementValue: toModificationOperation(form.stateEstimation?.measurementP?.value),
|
|
200
|
+
pMeasurementValidity: toModificationOperation(form.stateEstimation?.measurementP?.validity),
|
|
201
|
+
qMeasurementValue: toModificationOperation(form.stateEstimation?.measurementQ?.value),
|
|
202
|
+
qMeasurementValidity: toModificationOperation(form.stateEstimation?.measurementQ?.validity),
|
|
203
|
+
properties: toModificationProperties(form) ?? null
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
export {
|
|
207
|
+
generatorModificationDtoToForm,
|
|
208
|
+
generatorModificationEmptyFormData,
|
|
209
|
+
generatorModificationFormSchema,
|
|
210
|
+
generatorModificationFormToDto
|
|
211
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldConstants } from '../../../../utils';
|
|
2
|
+
export declare enum GeneratorDialogTab {
|
|
3
|
+
CONNECTIVITY_TAB = 0,
|
|
4
|
+
SETPOINTS_AND_LIMITS_TAB = 1,
|
|
5
|
+
SPECIFIC_TAB = 2,
|
|
6
|
+
ADDITIONAL_INFORMATION_TAB = 3
|
|
7
|
+
}
|
|
8
|
+
export declare const GENERATOR_TAB_FIELDS: Readonly<Partial<Record<GeneratorDialogTab, FieldConstants[]>>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
2
|
+
import "../../../../utils/conversionUtils.js";
|
|
3
|
+
import "../../../../utils/types/equipmentType.js";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
import "@mui/icons-material";
|
|
6
|
+
var GeneratorDialogTab = /* @__PURE__ */ ((GeneratorDialogTab2) => {
|
|
7
|
+
GeneratorDialogTab2[GeneratorDialogTab2["CONNECTIVITY_TAB"] = 0] = "CONNECTIVITY_TAB";
|
|
8
|
+
GeneratorDialogTab2[GeneratorDialogTab2["SETPOINTS_AND_LIMITS_TAB"] = 1] = "SETPOINTS_AND_LIMITS_TAB";
|
|
9
|
+
GeneratorDialogTab2[GeneratorDialogTab2["SPECIFIC_TAB"] = 2] = "SPECIFIC_TAB";
|
|
10
|
+
GeneratorDialogTab2[GeneratorDialogTab2["ADDITIONAL_INFORMATION_TAB"] = 3] = "ADDITIONAL_INFORMATION_TAB";
|
|
11
|
+
return GeneratorDialogTab2;
|
|
12
|
+
})(GeneratorDialogTab || {});
|
|
13
|
+
const GENERATOR_TAB_FIELDS = {
|
|
14
|
+
[
|
|
15
|
+
0
|
|
16
|
+
/* CONNECTIVITY_TAB */
|
|
17
|
+
]: [FieldConstants.CONNECTIVITY],
|
|
18
|
+
[
|
|
19
|
+
1
|
|
20
|
+
/* SETPOINTS_AND_LIMITS_TAB */
|
|
21
|
+
]: [
|
|
22
|
+
// setpoints
|
|
23
|
+
FieldConstants.ACTIVE_POWER_SET_POINT,
|
|
24
|
+
FieldConstants.REACTIVE_POWER_SET_POINT,
|
|
25
|
+
FieldConstants.VOLTAGE_REGULATION,
|
|
26
|
+
FieldConstants.VOLTAGE_SET_POINT,
|
|
27
|
+
FieldConstants.VOLTAGE_REGULATION_TYPE,
|
|
28
|
+
FieldConstants.Q_PERCENT,
|
|
29
|
+
FieldConstants.FREQUENCY_REGULATION,
|
|
30
|
+
FieldConstants.DROOP,
|
|
31
|
+
// limits
|
|
32
|
+
FieldConstants.MINIMUM_ACTIVE_POWER,
|
|
33
|
+
FieldConstants.MAXIMUM_ACTIVE_POWER,
|
|
34
|
+
FieldConstants.RATED_NOMINAL_POWER,
|
|
35
|
+
FieldConstants.REACTIVE_LIMITS
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
2
|
|
39
|
+
/* SPECIFIC_TAB */
|
|
40
|
+
]: [
|
|
41
|
+
FieldConstants.TRANSIENT_REACTANCE,
|
|
42
|
+
FieldConstants.TRANSFORMER_REACTANCE,
|
|
43
|
+
FieldConstants.PLANNED_ACTIVE_POWER_SET_POINT,
|
|
44
|
+
FieldConstants.MARGINAL_COST,
|
|
45
|
+
FieldConstants.PLANNED_OUTAGE_RATE,
|
|
46
|
+
FieldConstants.FORCED_OUTAGE_RATE
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
3
|
|
50
|
+
/* ADDITIONAL_INFORMATION_TAB */
|
|
51
|
+
]: [FieldConstants.ADDITIONAL_PROPERTIES]
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
GENERATOR_TAB_FIELDS,
|
|
55
|
+
GeneratorDialogTab
|
|
56
|
+
};
|
|
@@ -5,3 +5,9 @@
|
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
7
|
export * from './generatorModification.types';
|
|
8
|
+
export * from './generatorModification.utils';
|
|
9
|
+
export * from './generatorTabs.utils';
|
|
10
|
+
export * from './GeneratorDialogHeader';
|
|
11
|
+
export * from './GeneratorDialogTabs';
|
|
12
|
+
export * from './GeneratorDialogTabsContent';
|
|
13
|
+
export * from './GeneratorModificationForm';
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { generatorModificationDtoToForm, generatorModificationEmptyFormData, generatorModificationFormSchema, generatorModificationFormToDto } from "./generatorModification.utils.js";
|
|
2
|
+
import { GENERATOR_TAB_FIELDS, GeneratorDialogTab } from "./generatorTabs.utils.js";
|
|
3
|
+
import { GeneratorDialogHeader } from "./GeneratorDialogHeader.js";
|
|
4
|
+
import { GeneratorDialogTabs } from "./GeneratorDialogTabs.js";
|
|
5
|
+
import { GeneratorDialogTabsContent } from "./GeneratorDialogTabsContent.js";
|
|
6
|
+
import { GeneratorModificationForm } from "./GeneratorModificationForm.js";
|
|
7
|
+
export {
|
|
8
|
+
GENERATOR_TAB_FIELDS,
|
|
9
|
+
GeneratorDialogHeader,
|
|
10
|
+
GeneratorDialogTab,
|
|
11
|
+
GeneratorDialogTabs,
|
|
12
|
+
GeneratorDialogTabsContent,
|
|
13
|
+
GeneratorModificationForm,
|
|
14
|
+
generatorModificationDtoToForm,
|
|
15
|
+
generatorModificationEmptyFormData,
|
|
16
|
+
generatorModificationFormSchema,
|
|
17
|
+
generatorModificationFormToDto
|
|
18
|
+
};
|
|
@@ -89,6 +89,12 @@ import { emptyModificationByAssignmentFormData, modificationByAssignmentDtoToFor
|
|
|
89
89
|
import { DataType } from "./by-filter/assignment/assignment/assignment.type.js";
|
|
90
90
|
import { generatorCreationDtoToForm, generatorCreationEmptyFormData, generatorCreationFormSchema, generatorCreationFormToDto } from "./generator/creation/generatorCreation.utils.js";
|
|
91
91
|
import { GeneratorCreationForm } from "./generator/creation/GeneratorCreationForm.js";
|
|
92
|
+
import { generatorModificationDtoToForm, generatorModificationEmptyFormData, generatorModificationFormSchema, generatorModificationFormToDto } from "./generator/modification/generatorModification.utils.js";
|
|
93
|
+
import { GENERATOR_TAB_FIELDS, GeneratorDialogTab } from "./generator/modification/generatorTabs.utils.js";
|
|
94
|
+
import { GeneratorDialogHeader } from "./generator/modification/GeneratorDialogHeader.js";
|
|
95
|
+
import { GeneratorDialogTabs } from "./generator/modification/GeneratorDialogTabs.js";
|
|
96
|
+
import { GeneratorDialogTabsContent } from "./generator/modification/GeneratorDialogTabsContent.js";
|
|
97
|
+
import { GeneratorModificationForm } from "./generator/modification/GeneratorModificationForm.js";
|
|
92
98
|
import { batteryCreationDtoToForm, batteryCreationEmptyFormData, batteryCreationFormSchema, batteryCreationFormToDto } from "./battery/creation/batteryCreation.utils.js";
|
|
93
99
|
import { BatteryCreationForm } from "./battery/creation/BatteryCreationForm.js";
|
|
94
100
|
import { batteryModificationDtoToForm, batteryModificationEmptyFormData, batteryModificationFormSchema, batteryModificationFormToDto } from "./battery/modification/batteryModification.utils.js";
|
|
@@ -123,7 +129,13 @@ export {
|
|
|
123
129
|
ConnectivityForm,
|
|
124
130
|
EQUIPMENT_TYPE_ORDER,
|
|
125
131
|
EquipmentDeletionForm,
|
|
132
|
+
GENERATOR_TAB_FIELDS,
|
|
126
133
|
GeneratorCreationForm,
|
|
134
|
+
GeneratorDialogHeader,
|
|
135
|
+
GeneratorDialogTab,
|
|
136
|
+
GeneratorDialogTabs,
|
|
137
|
+
GeneratorDialogTabsContent,
|
|
138
|
+
GeneratorModificationForm,
|
|
127
139
|
HvdcLccDeletionSpecificForm,
|
|
128
140
|
INSERT,
|
|
129
141
|
LOAD_TAB_FIELDS,
|
|
@@ -190,6 +202,10 @@ export {
|
|
|
190
202
|
generatorCreationEmptyFormData,
|
|
191
203
|
generatorCreationFormSchema,
|
|
192
204
|
generatorCreationFormToDto,
|
|
205
|
+
generatorModificationDtoToForm,
|
|
206
|
+
generatorModificationEmptyFormData,
|
|
207
|
+
generatorModificationFormSchema,
|
|
208
|
+
generatorModificationFormToDto,
|
|
193
209
|
getActivePowerControlEmptyFormData,
|
|
194
210
|
getActivePowerControlSchema,
|
|
195
211
|
getActivePowerSetPointSchema,
|
|
@@ -6,11 +6,11 @@ export declare const COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS: DndColumn[];
|
|
|
6
6
|
export declare const getContingencyListsInfosFormSchema: () => yup.ObjectSchema<{
|
|
7
7
|
contingencyListsInfos: {
|
|
8
8
|
description?: string | undefined;
|
|
9
|
-
activated: NonNullable<boolean | undefined>;
|
|
10
9
|
contingencyLists: {
|
|
11
10
|
id: string;
|
|
12
11
|
name: string;
|
|
13
12
|
}[];
|
|
13
|
+
activated: NonNullable<boolean | undefined>;
|
|
14
14
|
}[] | undefined;
|
|
15
15
|
}, yup.AnyObject, {
|
|
16
16
|
contingencyListsInfos: "";
|
|
@@ -9,7 +9,7 @@ import "@mui/icons-material";
|
|
|
9
9
|
import "react";
|
|
10
10
|
import "react-dom";
|
|
11
11
|
import "@hello-pangea/dnd";
|
|
12
|
-
import { DndColumnType } from "../../../../components/composite/dnd-table
|
|
12
|
+
import { DndColumnType } from "../../../../components/composite/dnd-table/dnd-table.type.js";
|
|
13
13
|
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
14
14
|
import { YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
15
15
|
import "../../../../utils/conversionUtils.js";
|
|
@@ -5,8 +5,8 @@ import { useFieldArray, useFormContext } from "react-hook-form";
|
|
|
5
5
|
import { Info } from "@mui/icons-material";
|
|
6
6
|
import { useRef, useMemo, useCallback } from "react";
|
|
7
7
|
import { CustomTooltip } from "../../../../components/ui/tooltip/CustomTooltip.js";
|
|
8
|
-
import { DndTable } from "../../../../components/composite/dnd-table
|
|
9
|
-
import { getDefaultRowData } from "../../../../components/composite/dnd-table
|
|
8
|
+
import { DndTable } from "../../../../components/composite/dnd-table/dnd-table.js";
|
|
9
|
+
import { getDefaultRowData } from "../../../../components/composite/dnd-table/dnd-table-utils.js";
|
|
10
10
|
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
11
11
|
import "../../../../utils/conversionUtils.js";
|
|
12
12
|
import "../../../../utils/types/equipmentType.js";
|
package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js
CHANGED
|
@@ -98,7 +98,7 @@ function DynamicMarginCalculationInline({
|
|
|
98
98
|
[reset, snackError]
|
|
99
99
|
);
|
|
100
100
|
useEffect(() => {
|
|
101
|
-
setHaveDirtyFields(
|
|
101
|
+
setHaveDirtyFields(formState.isDirty);
|
|
102
102
|
}, [formState, setHaveDirtyFields]);
|
|
103
103
|
const renderActions = (onSubmitError) => {
|
|
104
104
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -37,7 +37,7 @@ import "mui-nested-menu";
|
|
|
37
37
|
import "react-resizable-panels";
|
|
38
38
|
import { ParameterTableField } from "../common/parameter-table-field/parameter-table-field.js";
|
|
39
39
|
import "react-dom";
|
|
40
|
-
import { DndColumnType } from "../../../components/composite/dnd-table
|
|
40
|
+
import { DndColumnType } from "../../../components/composite/dnd-table/dnd-table.type.js";
|
|
41
41
|
const formSchema = yup.object().shape({
|
|
42
42
|
[CALCULATION_TYPE]: yup.string().required(),
|
|
43
43
|
[ACCURACY]: yup.number().required(),
|
package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js
CHANGED
|
@@ -75,7 +75,7 @@ function DynamicSecurityAnalysisInline({
|
|
|
75
75
|
[updateParameters]
|
|
76
76
|
);
|
|
77
77
|
useEffect(() => {
|
|
78
|
-
setHaveDirtyFields(
|
|
78
|
+
setHaveDirtyFields(formState.isDirty);
|
|
79
79
|
}, [formState, setHaveDirtyFields]);
|
|
80
80
|
const renderActions = (onSubmitError) => {
|
|
81
81
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -104,7 +104,7 @@ function DynamicSimulationInline({
|
|
|
104
104
|
[reset, setDefaultParams, snackError]
|
|
105
105
|
);
|
|
106
106
|
useEffect(() => {
|
|
107
|
-
setHaveDirtyFields(
|
|
107
|
+
setHaveDirtyFields(formState.isDirty);
|
|
108
108
|
}, [formState, setHaveDirtyFields]);
|
|
109
109
|
const renderActions = (onSubmitError) => {
|
|
110
110
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -90,7 +90,7 @@ function LoadFlowParametersInline({
|
|
|
90
90
|
[loadflowMethods, reset, snackError]
|
|
91
91
|
);
|
|
92
92
|
useEffect(() => {
|
|
93
|
-
setHaveDirtyFields(
|
|
93
|
+
setHaveDirtyFields(formState.isDirty);
|
|
94
94
|
}, [formState, setHaveDirtyFields]);
|
|
95
95
|
return /* @__PURE__ */ jsx(LoadFlowProvider, { children: /* @__PURE__ */ jsx(
|
|
96
96
|
LoadFlowParametersForm,
|
package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js
CHANGED
|
@@ -77,7 +77,7 @@ function NetworkVisualizationParametersInline({
|
|
|
77
77
|
[reset, snackError]
|
|
78
78
|
);
|
|
79
79
|
useEffect(() => {
|
|
80
|
-
setHaveDirtyFields(
|
|
80
|
+
setHaveDirtyFields(formState.isDirty);
|
|
81
81
|
}, [formState, setHaveDirtyFields]);
|
|
82
82
|
return /* @__PURE__ */ jsx(
|
|
83
83
|
NetworkVisualizationParametersForm,
|