@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
|
@@ -38,7 +38,7 @@ import "@hookform/resolvers/yup";
|
|
|
38
38
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
39
39
|
import { ACTIVATED } from "../common/parameter-table-field/constants.js";
|
|
40
40
|
import "react-dom";
|
|
41
|
-
import { DndColumnType } from "../../../components/composite/dnd-table
|
|
41
|
+
import { DndColumnType } from "../../../components/composite/dnd-table/dnd-table.type.js";
|
|
42
42
|
const MONITORED_BRANCHES_EQUIPMENT_TYPES = [EquipmentType.LINE, EquipmentType.TWO_WINDINGS_TRANSFORMER];
|
|
43
43
|
const INJECTION_DISTRIBUTION_TYPES = [
|
|
44
44
|
{ id: "PROPORTIONAL", label: "Proportional" },
|
|
@@ -22,8 +22,6 @@ export declare const PARAMETER_SENSI_INJECTION = "sensitivityInjection";
|
|
|
22
22
|
export declare const PARAMETER_SENSI_HVDC = "sensitivityHVDC";
|
|
23
23
|
export declare const PARAMETER_SENSI_PST = "sensitivityPST";
|
|
24
24
|
export declare const PARAMETER_SENSI_NODES = "sensitivityNodes";
|
|
25
|
-
export declare const CONTAINER_ID = "containerId";
|
|
26
|
-
export declare const CONTAINER_NAME = "containerName";
|
|
27
25
|
export declare const MAX_RESULTS_COUNT = 500000;
|
|
28
26
|
export declare const MAX_VARIABLES_COUNT = 5000;
|
|
29
27
|
export declare const DEFAULT_FACTOR_COUNT: {
|
|
@@ -16,15 +16,11 @@ const PARAMETER_SENSI_INJECTION = "sensitivityInjection";
|
|
|
16
16
|
const PARAMETER_SENSI_HVDC = "sensitivityHVDC";
|
|
17
17
|
const PARAMETER_SENSI_PST = "sensitivityPST";
|
|
18
18
|
const PARAMETER_SENSI_NODES = "sensitivityNodes";
|
|
19
|
-
const CONTAINER_ID = "containerId";
|
|
20
|
-
const CONTAINER_NAME = "containerName";
|
|
21
19
|
const MAX_RESULTS_COUNT = 5e5;
|
|
22
20
|
const MAX_VARIABLES_COUNT = 5e3;
|
|
23
21
|
const DEFAULT_FACTOR_COUNT = { resultCount: null, variableCount: null };
|
|
24
22
|
export {
|
|
25
23
|
ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD,
|
|
26
|
-
CONTAINER_ID,
|
|
27
|
-
CONTAINER_NAME,
|
|
28
24
|
DEFAULT_FACTOR_COUNT,
|
|
29
25
|
DISTRIBUTION_TYPE,
|
|
30
26
|
EQUIPMENTS_IN_VOLTAGE_REGULATION,
|
|
@@ -108,7 +108,7 @@ function SensitivityAnalysisParametersInline({
|
|
|
108
108
|
setOpenResetConfirmation(false);
|
|
109
109
|
}, []);
|
|
110
110
|
useEffect(() => {
|
|
111
|
-
setHaveDirtyFields(
|
|
111
|
+
setHaveDirtyFields(formState.isDirty);
|
|
112
112
|
}, [formState, setHaveDirtyFields]);
|
|
113
113
|
return /* @__PURE__ */ jsx(
|
|
114
114
|
SensitivityAnalysisParametersForm,
|
|
@@ -7,12 +7,12 @@ import { snackWithFallback } from "../../../utils/error.js";
|
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import { mapSensitivityAnalysisParameters } from "../../../utils/types/sensitivity-analysis.type.js";
|
|
10
|
-
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL } from "../../../services/utils.js";
|
|
11
10
|
import "react/jsx-runtime";
|
|
12
11
|
import "@mui/icons-material";
|
|
13
12
|
import { getFormSchema, getSensiNodesformatNewParams, getSensiPstformatNewParams, getSensiHvdcformatNewParams, getSensiInjectionsformatNewParams, getSensiInjectionsSetformatNewParams, filterSensiParameterRows } from "./utils.js";
|
|
14
|
-
import { DEFAULT_FACTOR_COUNT, PARAMETER_SENSI_NODES, PARAMETER_SENSI_PST, PARAMETER_SENSI_HVDC, PARAMETER_SENSI_INJECTION, PARAMETER_SENSI_INJECTIONS_SET, FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD,
|
|
13
|
+
import { DEFAULT_FACTOR_COUNT, PARAMETER_SENSI_NODES, PARAMETER_SENSI_PST, PARAMETER_SENSI_HVDC, PARAMETER_SENSI_INJECTION, PARAMETER_SENSI_INJECTIONS_SET, FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, SENSITIVITY_TYPE, PSTS, MONITORED_BRANCHES, HVDC_LINES, INJECTIONS, DISTRIBUTION_TYPE, MAX_RESULTS_COUNT, MAX_VARIABLES_COUNT } from "./constants.js";
|
|
15
14
|
import { getSensitivityAnalysisFactorsCount, setSensitivityAnalysisParameters } from "../../../services/sensitivity-analysis.js";
|
|
15
|
+
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL } from "../../../services/utils.js";
|
|
16
16
|
import { updateParameter } from "../../../services/explore.js";
|
|
17
17
|
import "react-intl";
|
|
18
18
|
import "@mui/material";
|
|
@@ -195,21 +195,22 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
195
195
|
return {
|
|
196
196
|
[MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
197
197
|
return {
|
|
198
|
-
[FieldConstants.ID]: sensiInjection
|
|
199
|
-
[FieldConstants.NAME]: sensiInjection
|
|
198
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
199
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
200
|
+
// schema name is required but dto fetched may not exist
|
|
200
201
|
};
|
|
201
202
|
}) ?? [],
|
|
202
203
|
[INJECTIONS]: sensiInjectionsSet[INJECTIONS]?.map((sensiInjection) => {
|
|
203
204
|
return {
|
|
204
|
-
[FieldConstants.ID]: sensiInjection
|
|
205
|
-
[FieldConstants.NAME]: sensiInjection
|
|
205
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
206
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
206
207
|
};
|
|
207
208
|
}) ?? [],
|
|
208
209
|
[DISTRIBUTION_TYPE]: sensiInjectionsSet[DISTRIBUTION_TYPE],
|
|
209
210
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
210
211
|
return {
|
|
211
|
-
[FieldConstants.ID]: sensiInjection
|
|
212
|
-
[FieldConstants.NAME]: sensiInjection
|
|
212
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
213
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
213
214
|
};
|
|
214
215
|
}) ?? [],
|
|
215
216
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -219,20 +220,20 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
219
220
|
return {
|
|
220
221
|
[MONITORED_BRANCHES]: sensiInjections[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
221
222
|
return {
|
|
222
|
-
[FieldConstants.ID]: sensiInjection
|
|
223
|
-
[FieldConstants.NAME]: sensiInjection
|
|
223
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
224
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
224
225
|
};
|
|
225
226
|
}) ?? [],
|
|
226
227
|
[INJECTIONS]: sensiInjections[INJECTIONS]?.map((sensiInjection) => {
|
|
227
228
|
return {
|
|
228
|
-
[FieldConstants.ID]: sensiInjection
|
|
229
|
-
[FieldConstants.NAME]: sensiInjection
|
|
229
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
230
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
230
231
|
};
|
|
231
232
|
}) ?? [],
|
|
232
233
|
[CONTINGENCIES]: sensiInjections[CONTINGENCIES]?.map((sensiInjection) => {
|
|
233
234
|
return {
|
|
234
|
-
[FieldConstants.ID]: sensiInjection
|
|
235
|
-
[FieldConstants.NAME]: sensiInjection
|
|
235
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
236
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
236
237
|
};
|
|
237
238
|
}) ?? [],
|
|
238
239
|
[ACTIVATED]: sensiInjections[ACTIVATED] ?? false
|
|
@@ -242,21 +243,21 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
242
243
|
return {
|
|
243
244
|
[MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
244
245
|
return {
|
|
245
|
-
[FieldConstants.ID]: sensiInjection
|
|
246
|
-
[FieldConstants.NAME]: sensiInjection
|
|
246
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
247
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
247
248
|
};
|
|
248
249
|
}) ?? [],
|
|
249
250
|
[HVDC_LINES]: sensiInjectionsSet[HVDC_LINES]?.map((sensiInjection) => {
|
|
250
251
|
return {
|
|
251
|
-
[FieldConstants.ID]: sensiInjection
|
|
252
|
-
[FieldConstants.NAME]: sensiInjection
|
|
252
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
253
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
253
254
|
};
|
|
254
255
|
}) ?? [],
|
|
255
256
|
[SENSITIVITY_TYPE]: sensiInjectionsSet[SENSITIVITY_TYPE],
|
|
256
257
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
257
258
|
return {
|
|
258
|
-
[FieldConstants.ID]: sensiInjection
|
|
259
|
-
[FieldConstants.NAME]: sensiInjection
|
|
259
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
260
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
260
261
|
};
|
|
261
262
|
}) ?? [],
|
|
262
263
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -266,21 +267,21 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
266
267
|
return {
|
|
267
268
|
[MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
|
|
268
269
|
return {
|
|
269
|
-
[FieldConstants.ID]: sensiInjection
|
|
270
|
-
[FieldConstants.NAME]: sensiInjection
|
|
270
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
271
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
271
272
|
};
|
|
272
273
|
}) ?? [],
|
|
273
274
|
[PSTS]: sensiInjectionsSet[PSTS]?.map((sensiInjection) => {
|
|
274
275
|
return {
|
|
275
|
-
[FieldConstants.ID]: sensiInjection
|
|
276
|
-
[FieldConstants.NAME]: sensiInjection
|
|
276
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
277
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
277
278
|
};
|
|
278
279
|
}) ?? [],
|
|
279
280
|
[SENSITIVITY_TYPE]: sensiInjectionsSet[SENSITIVITY_TYPE],
|
|
280
281
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
281
282
|
return {
|
|
282
|
-
[FieldConstants.ID]: sensiInjection
|
|
283
|
-
[FieldConstants.NAME]: sensiInjection
|
|
283
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
284
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
284
285
|
};
|
|
285
286
|
}) ?? [],
|
|
286
287
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -290,20 +291,20 @@ const useSensitivityAnalysisParametersForm = ({
|
|
|
290
291
|
return {
|
|
291
292
|
[SUPERVISED_VOLTAGE_LEVELS]: sensiInjectionsSet[SUPERVISED_VOLTAGE_LEVELS]?.map((sensiInjection) => {
|
|
292
293
|
return {
|
|
293
|
-
[FieldConstants.ID]: sensiInjection
|
|
294
|
-
[FieldConstants.NAME]: sensiInjection
|
|
294
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
295
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
295
296
|
};
|
|
296
297
|
}) ?? [],
|
|
297
298
|
[EQUIPMENTS_IN_VOLTAGE_REGULATION]: sensiInjectionsSet[EQUIPMENTS_IN_VOLTAGE_REGULATION]?.map((sensiInjection) => {
|
|
298
299
|
return {
|
|
299
|
-
[FieldConstants.ID]: sensiInjection
|
|
300
|
-
[FieldConstants.NAME]: sensiInjection
|
|
300
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
301
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
301
302
|
};
|
|
302
303
|
}) ?? [],
|
|
303
304
|
[CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
|
|
304
305
|
return {
|
|
305
|
-
[FieldConstants.ID]: sensiInjection
|
|
306
|
-
[FieldConstants.NAME]: sensiInjection
|
|
306
|
+
[FieldConstants.ID]: sensiInjection.id,
|
|
307
|
+
[FieldConstants.NAME]: sensiInjection.name
|
|
307
308
|
};
|
|
308
309
|
}) ?? [],
|
|
309
310
|
[ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
1
2
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { HVDC_LINES, INJECTIONS, MONITORED_BRANCHES, PSTS } from './constants';
|
|
3
3
|
import { DistributionType, SensitivityType } from '../../../utils';
|
|
4
|
-
import { CONTINGENCIES } from '../common';
|
|
5
|
-
import { NAME } from '../../../components/ui';
|
|
6
|
-
import { ID } from '../../../utils/constants/filterConstant';
|
|
7
4
|
import * as yup from 'yup';
|
|
8
5
|
export declare const getSensiHVDCsFormSchema: () => {
|
|
9
6
|
sensitivityHVDC: yup.ArraySchema<{
|
|
@@ -26,17 +23,17 @@ export declare const getSensiHVDCsFormSchema: () => {
|
|
|
26
23
|
export declare const getSensiHvdcformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
27
24
|
sensitivityHVDC: {
|
|
28
25
|
monitoredBranches: {
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
id: UUID;
|
|
27
|
+
name: string;
|
|
31
28
|
}[];
|
|
32
29
|
hvdcs: {
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
id: UUID;
|
|
31
|
+
name: string;
|
|
35
32
|
}[];
|
|
36
33
|
sensitivityType: SensitivityType | undefined;
|
|
37
34
|
contingencies: {
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
id: UUID;
|
|
36
|
+
name: string;
|
|
40
37
|
}[] | undefined;
|
|
41
38
|
activated: NonNullable<boolean | undefined>;
|
|
42
39
|
}[] | undefined;
|
|
@@ -61,16 +58,16 @@ export declare const getSensiInjectionsFormSchema: () => {
|
|
|
61
58
|
export declare const getSensiInjectionsformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
62
59
|
sensitivityInjection: {
|
|
63
60
|
monitoredBranches: {
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
id: UUID;
|
|
62
|
+
name: string;
|
|
66
63
|
}[];
|
|
67
64
|
injections: {
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
id: UUID;
|
|
66
|
+
name: string;
|
|
70
67
|
}[];
|
|
71
68
|
contingencies: {
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
id: UUID;
|
|
70
|
+
name: string;
|
|
74
71
|
}[] | undefined;
|
|
75
72
|
activated: NonNullable<boolean | undefined>;
|
|
76
73
|
}[] | undefined;
|
|
@@ -93,49 +90,20 @@ export declare const getSensiInjectionsSetFormSchema: () => {
|
|
|
93
90
|
}[];
|
|
94
91
|
}[] | undefined, yup.AnyObject, "", "">;
|
|
95
92
|
};
|
|
96
|
-
export interface IRowNewParams {
|
|
97
|
-
[MONITORED_BRANCHES]: Array<{
|
|
98
|
-
[ID]: string;
|
|
99
|
-
[NAME]: string;
|
|
100
|
-
}>;
|
|
101
|
-
[INJECTIONS]: Array<{
|
|
102
|
-
[ID]: string;
|
|
103
|
-
[NAME]: string;
|
|
104
|
-
}>;
|
|
105
|
-
[HVDC_LINES]: Array<{
|
|
106
|
-
[ID]: string;
|
|
107
|
-
[NAME]: string;
|
|
108
|
-
}>;
|
|
109
|
-
[PSTS]: Array<{
|
|
110
|
-
[ID]: string;
|
|
111
|
-
[NAME]: string;
|
|
112
|
-
}>;
|
|
113
|
-
[CONTINGENCIES]: Array<{
|
|
114
|
-
[ID]: string;
|
|
115
|
-
[NAME]: string;
|
|
116
|
-
}>;
|
|
117
|
-
}
|
|
118
|
-
export declare const getGenericRowNewParams: (newRowParams: IRowNewParams) => {
|
|
119
|
-
monitoredBranches: string[];
|
|
120
|
-
injections: string[];
|
|
121
|
-
hvdcs: string[];
|
|
122
|
-
psts: string[];
|
|
123
|
-
contingencies: string[];
|
|
124
|
-
};
|
|
125
93
|
export declare const getSensiInjectionsSetformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
126
94
|
sensitivityInjectionsSet: {
|
|
127
95
|
monitoredBranches: {
|
|
128
|
-
|
|
129
|
-
|
|
96
|
+
id: UUID;
|
|
97
|
+
name: string;
|
|
130
98
|
}[];
|
|
131
99
|
injections: {
|
|
132
|
-
|
|
133
|
-
|
|
100
|
+
id: UUID;
|
|
101
|
+
name: string;
|
|
134
102
|
}[];
|
|
135
103
|
distributionType: DistributionType | undefined;
|
|
136
104
|
contingencies: {
|
|
137
|
-
|
|
138
|
-
|
|
105
|
+
id: UUID;
|
|
106
|
+
name: string;
|
|
139
107
|
}[] | undefined;
|
|
140
108
|
activated: NonNullable<boolean | undefined>;
|
|
141
109
|
}[] | undefined;
|
|
@@ -160,16 +128,16 @@ export declare const getSensiNodesFormSchema: () => {
|
|
|
160
128
|
export declare const getSensiNodesformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
161
129
|
sensitivityNodes: {
|
|
162
130
|
monitoredVoltageLevels: {
|
|
163
|
-
|
|
164
|
-
|
|
131
|
+
id: UUID;
|
|
132
|
+
name: string;
|
|
165
133
|
}[] | undefined;
|
|
166
134
|
equipmentsInVoltageRegulation: {
|
|
167
|
-
|
|
168
|
-
|
|
135
|
+
id: UUID;
|
|
136
|
+
name: string;
|
|
169
137
|
}[] | undefined;
|
|
170
138
|
contingencies: {
|
|
171
|
-
|
|
172
|
-
|
|
139
|
+
id: UUID;
|
|
140
|
+
name: string;
|
|
173
141
|
}[] | undefined;
|
|
174
142
|
activated: NonNullable<boolean | undefined>;
|
|
175
143
|
}[] | undefined;
|
|
@@ -195,17 +163,17 @@ export declare const getSensiPSTsFormSchema: () => {
|
|
|
195
163
|
export declare const getSensiPstformatNewParams: (newParams: SensitivityAnalysisParametersFormSchema) => {
|
|
196
164
|
sensitivityPST: {
|
|
197
165
|
monitoredBranches: {
|
|
198
|
-
|
|
199
|
-
|
|
166
|
+
id: UUID;
|
|
167
|
+
name: string;
|
|
200
168
|
}[];
|
|
201
169
|
psts: {
|
|
202
|
-
|
|
203
|
-
|
|
170
|
+
id: UUID;
|
|
171
|
+
name: string;
|
|
204
172
|
}[];
|
|
205
173
|
sensitivityType: SensitivityType | undefined;
|
|
206
174
|
contingencies: {
|
|
207
|
-
|
|
208
|
-
|
|
175
|
+
id: UUID;
|
|
176
|
+
name: string;
|
|
209
177
|
}[] | undefined;
|
|
210
178
|
activated: NonNullable<boolean | undefined>;
|
|
211
179
|
}[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as yup from "yup";
|
|
2
|
-
import { FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, PARAMETER_SENSI_NODES, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, PARAMETER_SENSI_PST, PSTS, PARAMETER_SENSI_HVDC, HVDC_LINES, PARAMETER_SENSI_INJECTION, INJECTIONS, PARAMETER_SENSI_INJECTIONS_SET, DISTRIBUTION_TYPE, SENSITIVITY_TYPE, MONITORED_BRANCHES
|
|
2
|
+
import { FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, PARAMETER_SENSI_NODES, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, PARAMETER_SENSI_PST, PSTS, PARAMETER_SENSI_HVDC, HVDC_LINES, PARAMETER_SENSI_INJECTION, INJECTIONS, PARAMETER_SENSI_INJECTIONS_SET, DISTRIBUTION_TYPE, SENSITIVITY_TYPE, MONITORED_BRANCHES } from "./constants.js";
|
|
3
3
|
import { ID } from "../../../utils/constants/filterConstant.js";
|
|
4
4
|
import { YUP_REQUIRED } from "../../../utils/constants/translationKeys.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
@@ -96,23 +96,23 @@ const getSensiHvdcformatNewParams = (newParams) => {
|
|
|
96
96
|
return {
|
|
97
97
|
[PARAMETER_SENSI_HVDC]: newParams.sensitivityHVDC?.map((sensitivityHVDCs) => {
|
|
98
98
|
return {
|
|
99
|
-
[MONITORED_BRANCHES]: sensitivityHVDCs[MONITORED_BRANCHES].map((
|
|
99
|
+
[MONITORED_BRANCHES]: sensitivityHVDCs[MONITORED_BRANCHES].map((elem) => {
|
|
100
100
|
return {
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
id: elem[ID],
|
|
102
|
+
name: elem[NAME]
|
|
103
103
|
};
|
|
104
104
|
}),
|
|
105
|
-
[HVDC_LINES]: sensitivityHVDCs[HVDC_LINES].map((
|
|
105
|
+
[HVDC_LINES]: sensitivityHVDCs[HVDC_LINES].map((elem) => {
|
|
106
106
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
id: elem[ID],
|
|
108
|
+
name: elem[NAME]
|
|
109
109
|
};
|
|
110
110
|
}),
|
|
111
111
|
[SENSITIVITY_TYPE]: sensitivityHVDCs[SENSITIVITY_TYPE],
|
|
112
|
-
[CONTINGENCIES]: sensitivityHVDCs[CONTINGENCIES]?.map((
|
|
112
|
+
[CONTINGENCIES]: sensitivityHVDCs[CONTINGENCIES]?.map((elem) => {
|
|
113
113
|
return {
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
id: elem[ID],
|
|
115
|
+
name: elem[NAME]
|
|
116
116
|
};
|
|
117
117
|
}),
|
|
118
118
|
[ACTIVATED]: sensitivityHVDCs[ACTIVATED]
|
|
@@ -141,22 +141,22 @@ const getSensiInjectionsformatNewParams = (newParams) => {
|
|
|
141
141
|
return {
|
|
142
142
|
[PARAMETER_SENSI_INJECTION]: newParams.sensitivityInjection?.map((sensitivityInjections) => {
|
|
143
143
|
return {
|
|
144
|
-
[MONITORED_BRANCHES]: sensitivityInjections[MONITORED_BRANCHES].map((
|
|
144
|
+
[MONITORED_BRANCHES]: sensitivityInjections[MONITORED_BRANCHES].map((elem) => {
|
|
145
145
|
return {
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
id: elem[ID],
|
|
147
|
+
name: elem[NAME]
|
|
148
148
|
};
|
|
149
149
|
}),
|
|
150
|
-
[INJECTIONS]: sensitivityInjections[INJECTIONS].map((
|
|
150
|
+
[INJECTIONS]: sensitivityInjections[INJECTIONS].map((elem) => {
|
|
151
151
|
return {
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
id: elem[ID],
|
|
153
|
+
name: elem[NAME]
|
|
154
154
|
};
|
|
155
155
|
}),
|
|
156
|
-
[CONTINGENCIES]: sensitivityInjections[CONTINGENCIES]?.map((
|
|
156
|
+
[CONTINGENCIES]: sensitivityInjections[CONTINGENCIES]?.map((elem) => {
|
|
157
157
|
return {
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
id: elem[ID],
|
|
159
|
+
name: elem[NAME]
|
|
160
160
|
};
|
|
161
161
|
}),
|
|
162
162
|
[ACTIVATED]: sensitivityInjections[ACTIVATED]
|
|
@@ -185,36 +185,27 @@ const getSensiInjectionsSetFormSchema = () => ({
|
|
|
185
185
|
})
|
|
186
186
|
)
|
|
187
187
|
});
|
|
188
|
-
const getGenericRowNewParams = (newRowParams) => {
|
|
189
|
-
return {
|
|
190
|
-
[MONITORED_BRANCHES]: newRowParams[MONITORED_BRANCHES].map((container) => container[ID]),
|
|
191
|
-
[INJECTIONS]: newRowParams[INJECTIONS]?.map((container) => container[ID]),
|
|
192
|
-
[HVDC_LINES]: newRowParams[HVDC_LINES]?.map((container) => container[ID]),
|
|
193
|
-
[PSTS]: newRowParams[PSTS]?.map((container) => container[ID]),
|
|
194
|
-
[CONTINGENCIES]: newRowParams[CONTINGENCIES]?.map((container) => container[ID])
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
188
|
const getSensiInjectionsSetformatNewParams = (newParams) => {
|
|
198
189
|
return {
|
|
199
190
|
[PARAMETER_SENSI_INJECTIONS_SET]: newParams.sensitivityInjectionsSet?.map((sensitivityInjectionSet) => {
|
|
200
191
|
return {
|
|
201
|
-
[MONITORED_BRANCHES]: sensitivityInjectionSet[MONITORED_BRANCHES].map((
|
|
192
|
+
[MONITORED_BRANCHES]: sensitivityInjectionSet[MONITORED_BRANCHES].map((elem) => {
|
|
202
193
|
return {
|
|
203
|
-
|
|
204
|
-
|
|
194
|
+
id: elem[ID],
|
|
195
|
+
name: elem[NAME]
|
|
205
196
|
};
|
|
206
197
|
}),
|
|
207
|
-
[INJECTIONS]: sensitivityInjectionSet[INJECTIONS].map((
|
|
198
|
+
[INJECTIONS]: sensitivityInjectionSet[INJECTIONS].map((elem) => {
|
|
208
199
|
return {
|
|
209
|
-
|
|
210
|
-
|
|
200
|
+
id: elem[ID],
|
|
201
|
+
name: elem[NAME]
|
|
211
202
|
};
|
|
212
203
|
}),
|
|
213
204
|
[DISTRIBUTION_TYPE]: sensitivityInjectionSet[DISTRIBUTION_TYPE],
|
|
214
|
-
[CONTINGENCIES]: sensitivityInjectionSet[CONTINGENCIES]?.map((
|
|
205
|
+
[CONTINGENCIES]: sensitivityInjectionSet[CONTINGENCIES]?.map((elem) => {
|
|
215
206
|
return {
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
id: elem[ID],
|
|
208
|
+
name: elem[NAME]
|
|
218
209
|
};
|
|
219
210
|
}),
|
|
220
211
|
[ACTIVATED]: sensitivityInjectionSet[ACTIVATED]
|
|
@@ -251,24 +242,22 @@ const getSensiNodesformatNewParams = (newParams) => {
|
|
|
251
242
|
return {
|
|
252
243
|
[PARAMETER_SENSI_NODES]: newParams.sensitivityNodes?.map((sensitivityNode) => {
|
|
253
244
|
return {
|
|
254
|
-
[SUPERVISED_VOLTAGE_LEVELS]: sensitivityNode[SUPERVISED_VOLTAGE_LEVELS]?.map((
|
|
245
|
+
[SUPERVISED_VOLTAGE_LEVELS]: sensitivityNode[SUPERVISED_VOLTAGE_LEVELS]?.map((elem) => {
|
|
246
|
+
return {
|
|
247
|
+
id: elem[ID],
|
|
248
|
+
name: elem[NAME]
|
|
249
|
+
};
|
|
250
|
+
}),
|
|
251
|
+
[EQUIPMENTS_IN_VOLTAGE_REGULATION]: sensitivityNode[EQUIPMENTS_IN_VOLTAGE_REGULATION]?.map((elem) => {
|
|
255
252
|
return {
|
|
256
|
-
|
|
257
|
-
|
|
253
|
+
id: elem[ID],
|
|
254
|
+
name: elem[NAME]
|
|
258
255
|
};
|
|
259
256
|
}),
|
|
260
|
-
[
|
|
261
|
-
(container) => {
|
|
262
|
-
return {
|
|
263
|
-
[CONTAINER_ID]: container[ID],
|
|
264
|
-
[CONTAINER_NAME]: container[NAME]
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
),
|
|
268
|
-
[CONTINGENCIES]: sensitivityNode[CONTINGENCIES]?.map((container) => {
|
|
257
|
+
[CONTINGENCIES]: sensitivityNode[CONTINGENCIES]?.map((elem) => {
|
|
269
258
|
return {
|
|
270
|
-
|
|
271
|
-
|
|
259
|
+
id: elem[ID],
|
|
260
|
+
name: elem[NAME]
|
|
272
261
|
};
|
|
273
262
|
}),
|
|
274
263
|
[ACTIVATED]: sensitivityNode[ACTIVATED]
|
|
@@ -298,23 +287,23 @@ const getSensiPstformatNewParams = (newParams) => {
|
|
|
298
287
|
return {
|
|
299
288
|
[PARAMETER_SENSI_PST]: newParams.sensitivityPST?.map((sensitivityPSTs) => {
|
|
300
289
|
return {
|
|
301
|
-
[MONITORED_BRANCHES]: sensitivityPSTs[MONITORED_BRANCHES].map((
|
|
290
|
+
[MONITORED_BRANCHES]: sensitivityPSTs[MONITORED_BRANCHES].map((elem) => {
|
|
302
291
|
return {
|
|
303
|
-
|
|
304
|
-
|
|
292
|
+
id: elem[ID],
|
|
293
|
+
name: elem[NAME]
|
|
305
294
|
};
|
|
306
295
|
}),
|
|
307
|
-
[PSTS]: sensitivityPSTs[PSTS].map((
|
|
296
|
+
[PSTS]: sensitivityPSTs[PSTS].map((elem) => {
|
|
308
297
|
return {
|
|
309
|
-
|
|
310
|
-
|
|
298
|
+
id: elem[ID],
|
|
299
|
+
name: elem[NAME]
|
|
311
300
|
};
|
|
312
301
|
}),
|
|
313
302
|
[SENSITIVITY_TYPE]: sensitivityPSTs[SENSITIVITY_TYPE],
|
|
314
|
-
[CONTINGENCIES]: sensitivityPSTs[CONTINGENCIES]?.map((
|
|
303
|
+
[CONTINGENCIES]: sensitivityPSTs[CONTINGENCIES]?.map((elem) => {
|
|
315
304
|
return {
|
|
316
|
-
|
|
317
|
-
|
|
305
|
+
id: elem[ID],
|
|
306
|
+
name: elem[NAME]
|
|
318
307
|
};
|
|
319
308
|
}),
|
|
320
309
|
[ACTIVATED]: sensitivityPSTs[ACTIVATED]
|
|
@@ -353,7 +342,6 @@ export {
|
|
|
353
342
|
filterSensiParameterRows,
|
|
354
343
|
formSchema,
|
|
355
344
|
getFormSchema,
|
|
356
|
-
getGenericRowNewParams,
|
|
357
345
|
getSensiHVDCsFormSchema,
|
|
358
346
|
getSensiHvdcformatNewParams,
|
|
359
347
|
getSensiInjectionsFormSchema,
|
|
@@ -96,7 +96,7 @@ function ShortCircuitParametersInLine({
|
|
|
96
96
|
setPendingResetAction(null);
|
|
97
97
|
}, []);
|
|
98
98
|
useEffect(() => {
|
|
99
|
-
setHaveDirtyFields(
|
|
99
|
+
setHaveDirtyFields(formState.isDirty);
|
|
100
100
|
}, [formState, setHaveDirtyFields]);
|
|
101
101
|
return /* @__PURE__ */ jsx(
|
|
102
102
|
ShortCircuitParametersForm,
|
|
@@ -41,7 +41,7 @@ import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
|
41
41
|
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
42
42
|
import { fromVoltageInitParametersFormToParamValues, fromVoltageInitParamsDataToFormValues, fromStudyVoltageInitParamsDataToFormValues } from "./voltage-init-form-utils.js";
|
|
43
43
|
import "react-dom";
|
|
44
|
-
import { SELECTED } from "../../../components/composite/dnd-table
|
|
44
|
+
import { SELECTED } from "../../../components/composite/dnd-table/dnd-table.type.js";
|
|
45
45
|
const useVoltageInitParametersForm = ({
|
|
46
46
|
parametersUuid,
|
|
47
47
|
name,
|
|
@@ -32,7 +32,7 @@ import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
|
32
32
|
import "mui-nested-menu";
|
|
33
33
|
import "react-resizable-panels";
|
|
34
34
|
import "react-dom";
|
|
35
|
-
import { SELECTED } from "../../../components/composite/dnd-table
|
|
35
|
+
import { SELECTED } from "../../../components/composite/dnd-table/dnd-table.type.js";
|
|
36
36
|
const fromVoltageInitParametersFormToParamValues = (newParams) => {
|
|
37
37
|
return {
|
|
38
38
|
applyModifications: newParams?.[VoltageInitTabValues.GENERAL]?.[GENERAL_APPLY_MODIFICATIONS] ?? DEFAULT_GENERAL_APPLY_MODIFICATIONS,
|
|
@@ -98,7 +98,7 @@ function VoltageInitParametersInLine({
|
|
|
98
98
|
setOpenResetConfirmation(false);
|
|
99
99
|
}, []);
|
|
100
100
|
useEffect(() => {
|
|
101
|
-
setHaveDirtyFields(
|
|
101
|
+
setHaveDirtyFields(formState.isDirty);
|
|
102
102
|
}, [formState, setHaveDirtyFields]);
|
|
103
103
|
const handleOpenSaveDialog = useCallback(() => {
|
|
104
104
|
trigger().then((isValid) => {
|
|
@@ -13,7 +13,7 @@ import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
|
13
13
|
import "react-dom";
|
|
14
14
|
import "react-hook-form";
|
|
15
15
|
import "@hello-pangea/dnd";
|
|
16
|
-
import { DndColumnType, SELECTED } from "../../../components/composite/dnd-table
|
|
16
|
+
import { DndColumnType, SELECTED } from "../../../components/composite/dnd-table/dnd-table.type.js";
|
|
17
17
|
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
18
18
|
import "localized-countries";
|
|
19
19
|
import "localized-countries/data/fr";
|
|
@@ -3,10 +3,10 @@ import { useFormContext, useController } from "react-hook-form";
|
|
|
3
3
|
import { FieldConstants } from "../utils/constants/fieldConstants.js";
|
|
4
4
|
import "../utils/conversionUtils.js";
|
|
5
5
|
import "../utils/types/equipmentType.js";
|
|
6
|
-
import { elementAlreadyExists } from "../services/directory.js";
|
|
7
6
|
import "react/jsx-runtime";
|
|
8
7
|
import "@mui/icons-material";
|
|
9
8
|
import { useDebounce } from "./useDebounce.js";
|
|
9
|
+
import { elementAlreadyExists } from "../services/directory.js";
|
|
10
10
|
function useUniqueNameValidation({
|
|
11
11
|
name,
|
|
12
12
|
currentName = "",
|