@gridsuite/commons-ui 0.133.0 → 0.135.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/README.md +10 -0
- package/dist/components/authentication/utils/authService.js +6 -9
- package/dist/components/checkBoxList/CheckBoxList.js +1 -1
- package/dist/components/checkBoxList/CheckBoxListItem.js +3 -3
- package/dist/components/checkBoxList/CheckBoxListItemContent.js +3 -3
- package/dist/components/checkBoxList/CheckBoxListItems.js +4 -4
- package/dist/components/checkBoxList/DraggableCheckBoxListItem.js +5 -5
- package/dist/components/checkBoxList/DraggableCheckBoxListItemContent.js +1 -1
- package/dist/components/contingencyList/criteriaBased/criteriaBasedUtils.js +7 -7
- package/dist/components/csvDownloader/use-csv-export.js +1 -4
- package/dist/components/customAGGrid/customAggrid.js +2 -2
- package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.js +2 -2
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +1 -2
- package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +6 -6
- package/dist/components/dialogs/elementSaveDialog/utils.js +1 -1
- package/dist/components/dialogs/modifyElementSelection/ModifyElementSelection.js +1 -1
- package/dist/components/directoryItemSelector/DirectoryItemSelector.js +3 -4
- package/dist/components/dnd-table/dnd-table-bottom-right-buttons.js +2 -3
- package/dist/components/dnd-table/dnd-table.js +7 -7
- package/dist/components/elementSearch/elementItem/EquipmentItem.js +6 -7
- package/dist/components/elementSearch/elementSearchDialog/ElementSearchDialog.js +1 -1
- package/dist/components/elementSearch/tagRenderer/TagRenderer.js +3 -4
- package/dist/components/filter/FilterCreationDialog.js +10 -10
- package/dist/components/filter/FilterForm.js +2 -2
- package/dist/components/filter/expert/ExpertFilterEditionDialog.js +1 -2
- package/dist/components/filter/expert/ExpertFilterForm.d.ts +0 -1
- package/dist/components/filter/expert/ExpertFilterForm.js +11 -21
- package/dist/components/filter/expert/expertFilterUtils.js +16 -24
- package/dist/components/filter/expert/index.js +1 -2
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js +2 -4
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +11 -18
- package/dist/components/filter/index.js +1 -2
- package/dist/components/flatParameters/FlatParameters.js +2 -2
- package/dist/components/index.js +1 -2
- package/dist/components/inputs/SelectClearable.js +1 -1
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +44 -48
- package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +3 -4
- package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -1
- package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js +4 -4
- package/dist/components/inputs/reactHookForm/chip-items-input.js +3 -3
- package/dist/components/inputs/reactHookForm/errorManagement/ErrorInput.js +1 -2
- package/dist/components/inputs/reactHookForm/numbers/FloatInput.js +1 -1
- package/dist/components/inputs/reactHookForm/numbers/SliderInput.js +1 -1
- package/dist/components/inputs/reactHookForm/selectInputs/InputWithPopupConfirmation.js +2 -2
- package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.js +3 -3
- package/dist/components/inputs/reactHookForm/tableInputs/table-numerical-input.js +4 -4
- package/dist/components/inputs/reactHookForm/tableInputs/table-text-input.js +3 -3
- package/dist/components/inputs/reactHookForm/text/ExpandingTextField.js +2 -2
- package/dist/components/inputs/reactHookForm/text/TextInput.js +5 -5
- package/dist/components/inputs/reactHookForm/text/UniqueNameInput.js +2 -2
- package/dist/components/inputs/reactHookForm/utils/SubmitButton.js +1 -1
- package/dist/components/inputs/reactHookForm/utils/functions.js +2 -3
- package/dist/components/inputs/reactQueryBuilder/OperatorSelector.js +2 -2
- package/dist/components/inputs/reactQueryBuilder/PropertyValueEditor.js +8 -9
- package/dist/components/inputs/reactQueryBuilder/TextValueEditor.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/TranslatedValueEditor.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/ValueEditor.js +2 -3
- package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +12 -15
- package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +3 -4
- package/dist/components/notifications/hooks/useListenerManager.js +2 -4
- package/dist/components/overflowableText/OverflowableText.js +4 -5
- package/dist/components/parameters/common/computing-type.d.ts +2 -1
- package/dist/components/parameters/common/computing-type.js +3 -0
- package/dist/components/parameters/common/limitreductions/columns-definitions.js +1 -1
- package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.js +1 -1
- package/dist/components/parameters/common/widget/parameter-line-slider.js +5 -4
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +4 -3
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +34 -20
- package/dist/components/parameters/network-visualizations/map-parameters.js +13 -17
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +1 -2
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +2 -2
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +2 -3
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +2 -3
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +3 -3
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +1 -1
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +5 -5
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -1
- package/dist/components/parameters/sensi/sensitivity-table.js +2 -3
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +42 -54
- package/dist/components/parameters/sensi/utils.js +16 -27
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +2 -2
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +1 -1
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +47 -56
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +1 -1
- package/dist/components/snackbarProvider/SnackbarProvider.js +1 -4
- package/dist/components/topBar/TopBar.js +33 -36
- package/dist/components/topBar/UserInformationDialog.js +7 -8
- package/dist/components/topBar/UserSettingsDialog.js +1 -1
- package/dist/components/treeViewFinder/TreeViewFinder.js +13 -13
- package/dist/hooks/use-parameters-backend.js +5 -5
- package/dist/hooks/use-unique-name-validation.js +2 -3
- package/dist/hooks/useConfidentialityWarning.js +1 -1
- package/dist/hooks/usePredefinedProperties.js +1 -2
- package/dist/index.js +1 -2
- package/dist/redux/commonStore.js +1 -2
- package/dist/services/utils.js +3 -3
- package/dist/utils/types/equipmentType.js +9 -13
- package/package.json +19 -17
|
@@ -92,10 +92,8 @@ const getSensiHVDCsFormSchema = () => ({
|
|
|
92
92
|
)
|
|
93
93
|
});
|
|
94
94
|
const getSensiHvdcformatNewParams = (newParams) => {
|
|
95
|
-
var _a;
|
|
96
95
|
return {
|
|
97
|
-
[PARAMETER_SENSI_HVDC]:
|
|
98
|
-
var _a2;
|
|
96
|
+
[PARAMETER_SENSI_HVDC]: newParams.sensitivityHVDC?.map((sensitivityHVDCs) => {
|
|
99
97
|
return {
|
|
100
98
|
[MONITORED_BRANCHES]: sensitivityHVDCs[MONITORED_BRANCHES].map((container) => {
|
|
101
99
|
return {
|
|
@@ -110,7 +108,7 @@ const getSensiHvdcformatNewParams = (newParams) => {
|
|
|
110
108
|
};
|
|
111
109
|
}),
|
|
112
110
|
[SENSITIVITY_TYPE]: sensitivityHVDCs[SENSITIVITY_TYPE],
|
|
113
|
-
[CONTINGENCIES]:
|
|
111
|
+
[CONTINGENCIES]: sensitivityHVDCs[CONTINGENCIES]?.map((container) => {
|
|
114
112
|
return {
|
|
115
113
|
[CONTAINER_ID]: container[ID],
|
|
116
114
|
[CONTAINER_NAME]: container[NAME]
|
|
@@ -139,10 +137,8 @@ const getSensiInjectionsFormSchema = () => ({
|
|
|
139
137
|
)
|
|
140
138
|
});
|
|
141
139
|
const getSensiInjectionsformatNewParams = (newParams) => {
|
|
142
|
-
var _a;
|
|
143
140
|
return {
|
|
144
|
-
[PARAMETER_SENSI_INJECTION]:
|
|
145
|
-
var _a2;
|
|
141
|
+
[PARAMETER_SENSI_INJECTION]: newParams.sensitivityInjection?.map((sensitivityInjections) => {
|
|
146
142
|
return {
|
|
147
143
|
[MONITORED_BRANCHES]: sensitivityInjections[MONITORED_BRANCHES].map((container) => {
|
|
148
144
|
return {
|
|
@@ -156,7 +152,7 @@ const getSensiInjectionsformatNewParams = (newParams) => {
|
|
|
156
152
|
[CONTAINER_NAME]: container[NAME]
|
|
157
153
|
};
|
|
158
154
|
}),
|
|
159
|
-
[CONTINGENCIES]:
|
|
155
|
+
[CONTINGENCIES]: sensitivityInjections[CONTINGENCIES]?.map((container) => {
|
|
160
156
|
return {
|
|
161
157
|
[CONTAINER_ID]: container[ID],
|
|
162
158
|
[CONTAINER_NAME]: container[NAME]
|
|
@@ -189,20 +185,17 @@ const getSensiInjectionsSetFormSchema = () => ({
|
|
|
189
185
|
)
|
|
190
186
|
});
|
|
191
187
|
const getGenericRowNewParams = (newRowParams) => {
|
|
192
|
-
var _a, _b, _c, _d;
|
|
193
188
|
return {
|
|
194
189
|
[MONITORED_BRANCHES]: newRowParams[MONITORED_BRANCHES].map((container) => container[ID]),
|
|
195
|
-
[INJECTIONS]:
|
|
196
|
-
[HVDC_LINES]:
|
|
197
|
-
[PSTS]:
|
|
198
|
-
[CONTINGENCIES]:
|
|
190
|
+
[INJECTIONS]: newRowParams[INJECTIONS]?.map((container) => container[ID]),
|
|
191
|
+
[HVDC_LINES]: newRowParams[HVDC_LINES]?.map((container) => container[ID]),
|
|
192
|
+
[PSTS]: newRowParams[PSTS]?.map((container) => container[ID]),
|
|
193
|
+
[CONTINGENCIES]: newRowParams[CONTINGENCIES]?.map((container) => container[ID])
|
|
199
194
|
};
|
|
200
195
|
};
|
|
201
196
|
const getSensiInjectionsSetformatNewParams = (newParams) => {
|
|
202
|
-
var _a;
|
|
203
197
|
return {
|
|
204
|
-
[PARAMETER_SENSI_INJECTIONS_SET]:
|
|
205
|
-
var _a2;
|
|
198
|
+
[PARAMETER_SENSI_INJECTIONS_SET]: newParams.sensitivityInjectionsSet?.map((sensitivityInjectionSet) => {
|
|
206
199
|
return {
|
|
207
200
|
[MONITORED_BRANCHES]: sensitivityInjectionSet[MONITORED_BRANCHES].map((container) => {
|
|
208
201
|
return {
|
|
@@ -217,7 +210,7 @@ const getSensiInjectionsSetformatNewParams = (newParams) => {
|
|
|
217
210
|
};
|
|
218
211
|
}),
|
|
219
212
|
[DISTRIBUTION_TYPE]: sensitivityInjectionSet[DISTRIBUTION_TYPE],
|
|
220
|
-
[CONTINGENCIES]:
|
|
213
|
+
[CONTINGENCIES]: sensitivityInjectionSet[CONTINGENCIES]?.map((container) => {
|
|
221
214
|
return {
|
|
222
215
|
[CONTAINER_ID]: container[ID],
|
|
223
216
|
[CONTAINER_NAME]: container[NAME]
|
|
@@ -248,18 +241,16 @@ const getSensiNodesFormSchema = () => ({
|
|
|
248
241
|
)
|
|
249
242
|
});
|
|
250
243
|
const getSensiNodesformatNewParams = (newParams) => {
|
|
251
|
-
var _a;
|
|
252
244
|
return {
|
|
253
|
-
[PARAMETER_SENSI_NODES]:
|
|
254
|
-
var _a2, _b, _c;
|
|
245
|
+
[PARAMETER_SENSI_NODES]: newParams.sensitivityNodes?.map((sensitivityNode) => {
|
|
255
246
|
return {
|
|
256
|
-
[SUPERVISED_VOLTAGE_LEVELS]:
|
|
247
|
+
[SUPERVISED_VOLTAGE_LEVELS]: sensitivityNode[SUPERVISED_VOLTAGE_LEVELS]?.map((container) => {
|
|
257
248
|
return {
|
|
258
249
|
[CONTAINER_ID]: container[ID],
|
|
259
250
|
[CONTAINER_NAME]: container[NAME]
|
|
260
251
|
};
|
|
261
252
|
}),
|
|
262
|
-
[EQUIPMENTS_IN_VOLTAGE_REGULATION]:
|
|
253
|
+
[EQUIPMENTS_IN_VOLTAGE_REGULATION]: sensitivityNode[EQUIPMENTS_IN_VOLTAGE_REGULATION]?.map(
|
|
263
254
|
(container) => {
|
|
264
255
|
return {
|
|
265
256
|
[CONTAINER_ID]: container[ID],
|
|
@@ -267,7 +258,7 @@ const getSensiNodesformatNewParams = (newParams) => {
|
|
|
267
258
|
};
|
|
268
259
|
}
|
|
269
260
|
),
|
|
270
|
-
[CONTINGENCIES]:
|
|
261
|
+
[CONTINGENCIES]: sensitivityNode[CONTINGENCIES]?.map((container) => {
|
|
271
262
|
return {
|
|
272
263
|
[CONTAINER_ID]: container[ID],
|
|
273
264
|
[CONTAINER_NAME]: container[NAME]
|
|
@@ -297,10 +288,8 @@ const getSensiPSTsFormSchema = () => ({
|
|
|
297
288
|
)
|
|
298
289
|
});
|
|
299
290
|
const getSensiPstformatNewParams = (newParams) => {
|
|
300
|
-
var _a;
|
|
301
291
|
return {
|
|
302
|
-
[PARAMETER_SENSI_PST]:
|
|
303
|
-
var _a2;
|
|
292
|
+
[PARAMETER_SENSI_PST]: newParams.sensitivityPST?.map((sensitivityPSTs) => {
|
|
304
293
|
return {
|
|
305
294
|
[MONITORED_BRANCHES]: sensitivityPSTs[MONITORED_BRANCHES].map((container) => {
|
|
306
295
|
return {
|
|
@@ -315,7 +304,7 @@ const getSensiPstformatNewParams = (newParams) => {
|
|
|
315
304
|
};
|
|
316
305
|
}),
|
|
317
306
|
[SENSITIVITY_TYPE]: sensitivityPSTs[SENSITIVITY_TYPE],
|
|
318
|
-
[CONTINGENCIES]:
|
|
307
|
+
[CONTINGENCIES]: sensitivityPSTs[CONTINGENCIES]?.map((container) => {
|
|
319
308
|
return {
|
|
320
309
|
[CONTAINER_ID]: container[ID],
|
|
321
310
|
[CONTAINER_NAME]: container[NAME]
|
|
@@ -46,7 +46,7 @@ function ShortCircuitParametersForm({
|
|
|
46
46
|
flexDirection: "column"
|
|
47
47
|
},
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields
|
|
49
|
+
/* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields?.() }),
|
|
50
50
|
paramsLoading ? /* @__PURE__ */ jsx(LinearProgress, {}) : /* @__PURE__ */ jsx(Grid, { sx: parametersStyles.scrollableGrid, children: /* @__PURE__ */ jsx(ShortCircuitFields, { enableDeveloperMode, resetAll }) }),
|
|
51
51
|
/* @__PURE__ */ jsx(
|
|
52
52
|
Grid,
|
|
@@ -58,7 +58,7 @@ function ShortCircuitParametersForm({
|
|
|
58
58
|
position: "absolute",
|
|
59
59
|
bottom: "15px"
|
|
60
60
|
},
|
|
61
|
-
children: renderActions
|
|
61
|
+
children: renderActions?.()
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
]
|
|
@@ -75,7 +75,7 @@ function ShortCircuitParametersInLine({
|
|
|
75
75
|
);
|
|
76
76
|
const handleLoadParameters = useCallback(
|
|
77
77
|
(newParams) => {
|
|
78
|
-
if (newParams
|
|
78
|
+
if (newParams?.length) {
|
|
79
79
|
setOpenSelectParameterDialog(false);
|
|
80
80
|
const paramUuid = newParams[0].id;
|
|
81
81
|
fetchShortCircuitParameters(paramUuid).then((parameters) => {
|
|
@@ -138,7 +138,7 @@ const useVoltageInitParametersForm = ({
|
|
|
138
138
|
const onValidationError = useCallback(
|
|
139
139
|
(errors) => {
|
|
140
140
|
const tabsInError = [];
|
|
141
|
-
if (
|
|
141
|
+
if (errors?.[GENERAL] && VoltageInitTabValues.GENERAL !== selectedTab) {
|
|
142
142
|
tabsInError.push(VoltageInitTabValues.GENERAL);
|
|
143
143
|
}
|
|
144
144
|
setTabIndexesWithError(tabsInError);
|
|
@@ -33,67 +33,63 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
33
33
|
import "@hello-pangea/dnd";
|
|
34
34
|
import { SELECTED } from "../../dnd-table/dnd-table.type.js";
|
|
35
35
|
const fromVoltageInitParametersFormToParamValues = (newParams) => {
|
|
36
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
37
36
|
return {
|
|
38
|
-
applyModifications:
|
|
37
|
+
applyModifications: newParams?.[VoltageInitTabValues.GENERAL]?.[GENERAL_APPLY_MODIFICATIONS] ?? DEFAULT_GENERAL_APPLY_MODIFICATIONS,
|
|
39
38
|
computationParameters: {
|
|
40
|
-
[UPDATE_BUS_VOLTAGE]:
|
|
41
|
-
[REACTIVE_SLACKS_THRESHOLD]:
|
|
42
|
-
[SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD]:
|
|
43
|
-
[VOLTAGE_LIMITS_MODIFICATION]:
|
|
44
|
-
var _a2, _b2;
|
|
39
|
+
[UPDATE_BUS_VOLTAGE]: newParams?.[VoltageInitTabValues.GENERAL]?.[UPDATE_BUS_VOLTAGE] ?? DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
40
|
+
[REACTIVE_SLACKS_THRESHOLD]: newParams?.[VoltageInitTabValues.GENERAL]?.[REACTIVE_SLACKS_THRESHOLD] ?? DEFAULT_REACTIVE_SLACKS_THRESHOLD,
|
|
41
|
+
[SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD]: newParams?.[VoltageInitTabValues.GENERAL]?.[SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD] ?? DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD,
|
|
42
|
+
[VOLTAGE_LIMITS_MODIFICATION]: newParams.voltageLimitsModification?.map((voltageLimit) => {
|
|
45
43
|
return {
|
|
46
|
-
[PRIORITY]:
|
|
44
|
+
[PRIORITY]: newParams.voltageLimitsModification?.indexOf(voltageLimit),
|
|
47
45
|
[LOW_VOLTAGE_LIMIT]: voltageLimit[LOW_VOLTAGE_LIMIT] ?? 0,
|
|
48
46
|
[HIGH_VOLTAGE_LIMIT]: voltageLimit[HIGH_VOLTAGE_LIMIT] ?? 0,
|
|
49
|
-
[FILTERS]:
|
|
47
|
+
[FILTERS]: voltageLimit[FILTERS]?.map((filter) => {
|
|
50
48
|
return {
|
|
51
49
|
[FILTER_ID]: filter[ID],
|
|
52
50
|
[FILTER_NAME]: filter[NAME]
|
|
53
51
|
};
|
|
54
|
-
})
|
|
52
|
+
}) ?? []
|
|
55
53
|
};
|
|
56
|
-
})
|
|
57
|
-
[VOLTAGE_LIMITS_DEFAULT]:
|
|
58
|
-
var _a2, _b2;
|
|
54
|
+
}) ?? [],
|
|
55
|
+
[VOLTAGE_LIMITS_DEFAULT]: newParams.voltageLimitsDefault?.map((voltageLimit) => {
|
|
59
56
|
return {
|
|
60
|
-
[PRIORITY]:
|
|
57
|
+
[PRIORITY]: newParams.voltageLimitsDefault?.indexOf(voltageLimit),
|
|
61
58
|
[LOW_VOLTAGE_LIMIT]: voltageLimit[LOW_VOLTAGE_LIMIT] ?? 0,
|
|
62
59
|
[HIGH_VOLTAGE_LIMIT]: voltageLimit[HIGH_VOLTAGE_LIMIT] ?? 0,
|
|
63
|
-
[FILTERS]:
|
|
60
|
+
[FILTERS]: voltageLimit[FILTERS]?.map((filter) => {
|
|
64
61
|
return {
|
|
65
62
|
[FILTER_ID]: filter[ID],
|
|
66
63
|
[FILTER_NAME]: filter[NAME]
|
|
67
64
|
};
|
|
68
|
-
})
|
|
65
|
+
}) ?? []
|
|
69
66
|
};
|
|
70
|
-
})
|
|
67
|
+
}) ?? [],
|
|
71
68
|
[GENERATORS_SELECTION_TYPE]: newParams[GENERATORS_SELECTION_TYPE] ?? EquipmentsSelectionType.ALL_EXCEPT,
|
|
72
|
-
[VARIABLE_Q_GENERATORS]:
|
|
69
|
+
[VARIABLE_Q_GENERATORS]: newParams[VARIABLE_Q_GENERATORS]?.map((filter) => {
|
|
73
70
|
return {
|
|
74
71
|
[FILTER_ID]: filter[ID],
|
|
75
72
|
[FILTER_NAME]: filter[NAME]
|
|
76
73
|
};
|
|
77
|
-
})
|
|
74
|
+
}) ?? [],
|
|
78
75
|
[TRANSFORMERS_SELECTION_TYPE]: newParams[TRANSFORMERS_SELECTION_TYPE] ?? EquipmentsSelectionType.NONE_EXCEPT,
|
|
79
|
-
[VARIABLE_TRANSFORMERS]:
|
|
76
|
+
[VARIABLE_TRANSFORMERS]: newParams[VARIABLE_TRANSFORMERS]?.map((filter) => {
|
|
80
77
|
return {
|
|
81
78
|
[FILTER_ID]: filter[ID],
|
|
82
79
|
[FILTER_NAME]: filter[NAME]
|
|
83
80
|
};
|
|
84
|
-
})
|
|
81
|
+
}) ?? [],
|
|
85
82
|
[SHUNT_COMPENSATORS_SELECTION_TYPE]: newParams[SHUNT_COMPENSATORS_SELECTION_TYPE] ?? EquipmentsSelectionType.NONE_EXCEPT,
|
|
86
|
-
[VARIABLE_SHUNT_COMPENSATORS]:
|
|
83
|
+
[VARIABLE_SHUNT_COMPENSATORS]: newParams[VARIABLE_SHUNT_COMPENSATORS]?.map((filter) => {
|
|
87
84
|
return {
|
|
88
85
|
[FILTER_ID]: filter[ID],
|
|
89
86
|
[FILTER_NAME]: filter[NAME]
|
|
90
87
|
};
|
|
91
|
-
})
|
|
88
|
+
}) ?? []
|
|
92
89
|
}
|
|
93
90
|
};
|
|
94
91
|
};
|
|
95
92
|
const fromVoltageInitParamsDataToFormValues = (parameters) => {
|
|
96
|
-
var _a, _b, _c, _d, _e;
|
|
97
93
|
return {
|
|
98
94
|
[VoltageInitTabValues.GENERAL]: {
|
|
99
95
|
[GENERAL_APPLY_MODIFICATIONS]: DEFAULT_GENERAL_APPLY_MODIFICATIONS,
|
|
@@ -101,11 +97,10 @@ const fromVoltageInitParamsDataToFormValues = (parameters) => {
|
|
|
101
97
|
[REACTIVE_SLACKS_THRESHOLD]: parameters.reactiveSlacksThreshold,
|
|
102
98
|
[SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD]: parameters.shuntCompensatorActivationThreshold
|
|
103
99
|
},
|
|
104
|
-
[VOLTAGE_LIMITS_MODIFICATION]:
|
|
105
|
-
var _a2;
|
|
100
|
+
[VOLTAGE_LIMITS_MODIFICATION]: parameters?.voltageLimitsModification?.map((voltageLimit) => {
|
|
106
101
|
return {
|
|
107
102
|
[SELECTED]: false,
|
|
108
|
-
[FILTERS]:
|
|
103
|
+
[FILTERS]: voltageLimit[FILTERS]?.map((filter) => {
|
|
109
104
|
return {
|
|
110
105
|
[ID]: filter[FILTER_ID],
|
|
111
106
|
[NAME]: filter[FILTER_NAME]
|
|
@@ -114,12 +109,11 @@ const fromVoltageInitParamsDataToFormValues = (parameters) => {
|
|
|
114
109
|
[LOW_VOLTAGE_LIMIT]: voltageLimit[LOW_VOLTAGE_LIMIT],
|
|
115
110
|
[HIGH_VOLTAGE_LIMIT]: voltageLimit[HIGH_VOLTAGE_LIMIT]
|
|
116
111
|
};
|
|
117
|
-
})
|
|
118
|
-
[VOLTAGE_LIMITS_DEFAULT]:
|
|
119
|
-
var _a2;
|
|
112
|
+
}) ?? [],
|
|
113
|
+
[VOLTAGE_LIMITS_DEFAULT]: parameters?.voltageLimitsDefault?.map((voltageLimit) => {
|
|
120
114
|
return {
|
|
121
115
|
[SELECTED]: false,
|
|
122
|
-
[FILTERS]:
|
|
116
|
+
[FILTERS]: voltageLimit[FILTERS]?.map((filter) => {
|
|
123
117
|
return {
|
|
124
118
|
[ID]: filter[FILTER_ID],
|
|
125
119
|
[NAME]: filter[FILTER_NAME]
|
|
@@ -128,23 +122,23 @@ const fromVoltageInitParamsDataToFormValues = (parameters) => {
|
|
|
128
122
|
[LOW_VOLTAGE_LIMIT]: voltageLimit[LOW_VOLTAGE_LIMIT],
|
|
129
123
|
[HIGH_VOLTAGE_LIMIT]: voltageLimit[HIGH_VOLTAGE_LIMIT]
|
|
130
124
|
};
|
|
131
|
-
})
|
|
132
|
-
[GENERATORS_SELECTION_TYPE]:
|
|
133
|
-
[VARIABLE_Q_GENERATORS]:
|
|
125
|
+
}) ?? [],
|
|
126
|
+
[GENERATORS_SELECTION_TYPE]: parameters?.[GENERATORS_SELECTION_TYPE] ?? EquipmentsSelectionType.ALL_EXCEPT,
|
|
127
|
+
[VARIABLE_Q_GENERATORS]: parameters?.[VARIABLE_Q_GENERATORS]?.map((filter) => {
|
|
134
128
|
return {
|
|
135
129
|
[ID]: filter[FILTER_ID],
|
|
136
130
|
[NAME]: filter[FILTER_NAME]
|
|
137
131
|
};
|
|
138
132
|
}),
|
|
139
|
-
[TRANSFORMERS_SELECTION_TYPE]:
|
|
140
|
-
[VARIABLE_TRANSFORMERS]:
|
|
133
|
+
[TRANSFORMERS_SELECTION_TYPE]: parameters?.[TRANSFORMERS_SELECTION_TYPE] ?? EquipmentsSelectionType.NONE_EXCEPT,
|
|
134
|
+
[VARIABLE_TRANSFORMERS]: parameters?.[VARIABLE_TRANSFORMERS]?.map((filter) => {
|
|
141
135
|
return {
|
|
142
136
|
[ID]: filter[FILTER_ID],
|
|
143
137
|
[NAME]: filter[FILTER_NAME]
|
|
144
138
|
};
|
|
145
139
|
}),
|
|
146
|
-
[SHUNT_COMPENSATORS_SELECTION_TYPE]:
|
|
147
|
-
[VARIABLE_SHUNT_COMPENSATORS]:
|
|
140
|
+
[SHUNT_COMPENSATORS_SELECTION_TYPE]: parameters?.[SHUNT_COMPENSATORS_SELECTION_TYPE] ?? EquipmentsSelectionType.NONE_EXCEPT,
|
|
141
|
+
[VARIABLE_SHUNT_COMPENSATORS]: parameters?.[VARIABLE_SHUNT_COMPENSATORS]?.map((filter) => {
|
|
148
142
|
return {
|
|
149
143
|
[ID]: filter[FILTER_ID],
|
|
150
144
|
[NAME]: filter[FILTER_NAME]
|
|
@@ -153,19 +147,17 @@ const fromVoltageInitParamsDataToFormValues = (parameters) => {
|
|
|
153
147
|
};
|
|
154
148
|
};
|
|
155
149
|
const fromStudyVoltageInitParamsDataToFormValues = (parameters) => {
|
|
156
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
157
150
|
return {
|
|
158
151
|
[VoltageInitTabValues.GENERAL]: {
|
|
159
152
|
[GENERAL_APPLY_MODIFICATIONS]: parameters.applyModifications,
|
|
160
|
-
[UPDATE_BUS_VOLTAGE]:
|
|
161
|
-
[REACTIVE_SLACKS_THRESHOLD]:
|
|
162
|
-
[SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD]:
|
|
153
|
+
[UPDATE_BUS_VOLTAGE]: parameters?.computationParameters?.[UPDATE_BUS_VOLTAGE] ?? DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
154
|
+
[REACTIVE_SLACKS_THRESHOLD]: parameters?.computationParameters?.reactiveSlacksThreshold,
|
|
155
|
+
[SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD]: parameters?.computationParameters?.shuntCompensatorActivationThreshold
|
|
163
156
|
},
|
|
164
|
-
[VOLTAGE_LIMITS_MODIFICATION]:
|
|
165
|
-
var _a2;
|
|
157
|
+
[VOLTAGE_LIMITS_MODIFICATION]: parameters?.computationParameters?.voltageLimitsModification?.map((voltageLimit) => {
|
|
166
158
|
return {
|
|
167
159
|
[SELECTED]: false,
|
|
168
|
-
[FILTERS]:
|
|
160
|
+
[FILTERS]: voltageLimit[FILTERS]?.map((filter) => {
|
|
169
161
|
return {
|
|
170
162
|
[ID]: filter[FILTER_ID],
|
|
171
163
|
[NAME]: filter[FILTER_NAME]
|
|
@@ -174,12 +166,11 @@ const fromStudyVoltageInitParamsDataToFormValues = (parameters) => {
|
|
|
174
166
|
[LOW_VOLTAGE_LIMIT]: voltageLimit[LOW_VOLTAGE_LIMIT],
|
|
175
167
|
[HIGH_VOLTAGE_LIMIT]: voltageLimit[HIGH_VOLTAGE_LIMIT]
|
|
176
168
|
};
|
|
177
|
-
})
|
|
178
|
-
[VOLTAGE_LIMITS_DEFAULT]:
|
|
179
|
-
var _a2;
|
|
169
|
+
}) ?? [],
|
|
170
|
+
[VOLTAGE_LIMITS_DEFAULT]: parameters?.computationParameters?.voltageLimitsDefault?.map((voltageLimit) => {
|
|
180
171
|
return {
|
|
181
172
|
[SELECTED]: false,
|
|
182
|
-
[FILTERS]:
|
|
173
|
+
[FILTERS]: voltageLimit[FILTERS]?.map((filter) => {
|
|
183
174
|
return {
|
|
184
175
|
[ID]: filter[FILTER_ID],
|
|
185
176
|
[NAME]: filter[FILTER_NAME]
|
|
@@ -188,23 +179,23 @@ const fromStudyVoltageInitParamsDataToFormValues = (parameters) => {
|
|
|
188
179
|
[LOW_VOLTAGE_LIMIT]: voltageLimit[LOW_VOLTAGE_LIMIT],
|
|
189
180
|
[HIGH_VOLTAGE_LIMIT]: voltageLimit[HIGH_VOLTAGE_LIMIT]
|
|
190
181
|
};
|
|
191
|
-
})
|
|
192
|
-
[GENERATORS_SELECTION_TYPE]:
|
|
193
|
-
[VARIABLE_Q_GENERATORS]:
|
|
182
|
+
}) ?? [],
|
|
183
|
+
[GENERATORS_SELECTION_TYPE]: parameters?.computationParameters?.[GENERATORS_SELECTION_TYPE] ?? EquipmentsSelectionType.ALL_EXCEPT,
|
|
184
|
+
[VARIABLE_Q_GENERATORS]: parameters?.computationParameters?.[VARIABLE_Q_GENERATORS]?.map((filter) => {
|
|
194
185
|
return {
|
|
195
186
|
[ID]: filter[FILTER_ID],
|
|
196
187
|
[NAME]: filter[FILTER_NAME]
|
|
197
188
|
};
|
|
198
189
|
}),
|
|
199
|
-
[TRANSFORMERS_SELECTION_TYPE]:
|
|
200
|
-
[VARIABLE_TRANSFORMERS]:
|
|
190
|
+
[TRANSFORMERS_SELECTION_TYPE]: parameters?.computationParameters?.[TRANSFORMERS_SELECTION_TYPE] ?? EquipmentsSelectionType.NONE_EXCEPT,
|
|
191
|
+
[VARIABLE_TRANSFORMERS]: parameters?.computationParameters?.[VARIABLE_TRANSFORMERS]?.map((filter) => {
|
|
201
192
|
return {
|
|
202
193
|
[ID]: filter[FILTER_ID],
|
|
203
194
|
[NAME]: filter[FILTER_NAME]
|
|
204
195
|
};
|
|
205
196
|
}),
|
|
206
|
-
[SHUNT_COMPENSATORS_SELECTION_TYPE]:
|
|
207
|
-
[VARIABLE_SHUNT_COMPENSATORS]:
|
|
197
|
+
[SHUNT_COMPENSATORS_SELECTION_TYPE]: parameters?.computationParameters?.[SHUNT_COMPENSATORS_SELECTION_TYPE] ?? EquipmentsSelectionType.NONE_EXCEPT,
|
|
198
|
+
[VARIABLE_SHUNT_COMPENSATORS]: parameters?.computationParameters?.[VARIABLE_SHUNT_COMPENSATORS]?.map(
|
|
208
199
|
(filter) => {
|
|
209
200
|
return {
|
|
210
201
|
[ID]: filter[FILTER_ID],
|
|
@@ -72,7 +72,7 @@ function VoltageInitParametersForm({
|
|
|
72
72
|
},
|
|
73
73
|
children: [
|
|
74
74
|
/* @__PURE__ */ jsxs(Grid, { item: true, container: true, sx: renderActions ? styles.gridWithActions : styles.gridWithoutActions, children: [
|
|
75
|
-
/* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields
|
|
75
|
+
/* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields?.() }),
|
|
76
76
|
paramsLoading ? /* @__PURE__ */ jsx(LinearProgress, {}) : /* @__PURE__ */ jsxs(
|
|
77
77
|
Box,
|
|
78
78
|
{
|
|
@@ -62,7 +62,7 @@ function VoltageInitParametersInLine({
|
|
|
62
62
|
const { formState, getValues, handleSubmit, reset, trigger } = voltageInitMethods.formMethods;
|
|
63
63
|
const handleLoadParameters = useCallback(
|
|
64
64
|
(newParams) => {
|
|
65
|
-
if (newParams
|
|
65
|
+
if (newParams?.length) {
|
|
66
66
|
setOpenSelectParameterDialog(false);
|
|
67
67
|
const parametersUuid = newParams[0].id;
|
|
68
68
|
getVoltageInitParameters(parametersUuid).then((params) => {
|
|
@@ -22,10 +22,7 @@ function SnackbarProvider(props) {
|
|
|
22
22
|
const action = (key) => /* @__PURE__ */ jsx(
|
|
23
23
|
IconButton,
|
|
24
24
|
{
|
|
25
|
-
onClick: () =>
|
|
26
|
-
var _a;
|
|
27
|
-
return (_a = ref.current) == null ? void 0 : _a.closeSnackbar(key);
|
|
28
|
-
},
|
|
25
|
+
onClick: () => ref.current?.closeSnackbar(key),
|
|
29
26
|
"aria-label": "clear-snack",
|
|
30
27
|
size: "small",
|
|
31
28
|
sx: styles.buttonColor,
|
|
@@ -183,7 +183,7 @@ function TopBar({
|
|
|
183
183
|
const isHiddenUserInformation = () => {
|
|
184
184
|
if (appsAndUrls) {
|
|
185
185
|
const app = appsAndUrls.find((item) => item.name === appName);
|
|
186
|
-
return
|
|
186
|
+
return app?.hiddenUserInformation ?? false;
|
|
187
187
|
}
|
|
188
188
|
return false;
|
|
189
189
|
};
|
|
@@ -225,41 +225,38 @@ function TopBar({
|
|
|
225
225
|
keepMounted: true,
|
|
226
226
|
open: Boolean(anchorElAppsMenu),
|
|
227
227
|
onClose: handleCloseAppsMenu,
|
|
228
|
-
children: appsAndUrls
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
item.name
|
|
261
|
-
);
|
|
262
|
-
})
|
|
228
|
+
children: appsAndUrls?.filter((item) => !item.hiddenInAppsMenu).map((item) => /* @__PURE__ */ jsx(
|
|
229
|
+
Box,
|
|
230
|
+
{
|
|
231
|
+
component: "a",
|
|
232
|
+
href: item.url?.toString(),
|
|
233
|
+
sx: styles.link,
|
|
234
|
+
target: "_blank",
|
|
235
|
+
rel: "noopener noreferrer",
|
|
236
|
+
children: /* @__PURE__ */ jsx(StyledMenuItem, { onClick: handleCloseAppsMenu, children: /* @__PURE__ */ jsxs(ListItemText, { children: [
|
|
237
|
+
/* @__PURE__ */ jsx(
|
|
238
|
+
"span",
|
|
239
|
+
{
|
|
240
|
+
style: {
|
|
241
|
+
fontWeight: "bold"
|
|
242
|
+
},
|
|
243
|
+
children: "Grid"
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
/* @__PURE__ */ jsx(
|
|
247
|
+
"span",
|
|
248
|
+
{
|
|
249
|
+
style: {
|
|
250
|
+
color: item.appColor ?? "grey",
|
|
251
|
+
fontWeight: "bold"
|
|
252
|
+
},
|
|
253
|
+
children: item.name
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
] }) })
|
|
257
|
+
},
|
|
258
|
+
item.name
|
|
259
|
+
))
|
|
263
260
|
}
|
|
264
261
|
)
|
|
265
262
|
] }),
|
|
@@ -12,7 +12,6 @@ const styles = {
|
|
|
12
12
|
usedTopography: { marginLeft: "15%" }
|
|
13
13
|
};
|
|
14
14
|
function UserInformationDialog({ openDialog, user, onClose }) {
|
|
15
|
-
var _a;
|
|
16
15
|
const [userDetails, setUserDetails] = useState(void 0);
|
|
17
16
|
const getUserDetails = (userName) => {
|
|
18
17
|
fetchUserDetails(userName).then((response) => {
|
|
@@ -22,11 +21,11 @@ function UserInformationDialog({ openDialog, user, onClose }) {
|
|
|
22
21
|
});
|
|
23
22
|
};
|
|
24
23
|
useEffect(() => {
|
|
25
|
-
if (openDialog &&
|
|
26
|
-
getUserDetails(user
|
|
24
|
+
if (openDialog && user?.profile.sub) {
|
|
25
|
+
getUserDetails(user?.profile.sub);
|
|
27
26
|
}
|
|
28
27
|
}, [openDialog, user]);
|
|
29
|
-
const rolesString =
|
|
28
|
+
const rolesString = user?.profile?.profile ?? "";
|
|
30
29
|
const rolesList = rolesString ? rolesString.split("|").map((role) => role.trim()) : [];
|
|
31
30
|
return /* @__PURE__ */ jsxs(Dialog, { open: openDialog && !!user && !!userDetails, onClose, children: [
|
|
32
31
|
/* @__PURE__ */ jsx(DialogTitle, { fontWeight: "bold", sx: styles.DialogTitle, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/title" }) }),
|
|
@@ -44,24 +43,24 @@ function UserInformationDialog({ openDialog, user, onClose }) {
|
|
|
44
43
|
)
|
|
45
44
|
] }, role)) }) : /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/no-roles" }) }) }),
|
|
46
45
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/profile" }) }) }),
|
|
47
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children:
|
|
46
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: userDetails?.profileName === null ? /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/no-profile" }) : /* @__PURE__ */ jsx(Typography, { children: userDetails?.profileName }) })
|
|
48
47
|
] }),
|
|
49
48
|
/* @__PURE__ */ jsxs(Box, { mt: 3, sx: styles.quotasBox, children: [
|
|
50
49
|
/* @__PURE__ */ jsx(Typography, { fontWeight: "bold", sx: styles.quotasTopography, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/quotas" }) }),
|
|
51
50
|
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
52
51
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-cases-or-studies" }) }) }),
|
|
53
52
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsxs(Typography, { children: [
|
|
54
|
-
userDetails
|
|
53
|
+
userDetails?.maxAllowedCases,
|
|
55
54
|
/* @__PURE__ */ jsxs(Box, { component: "span", sx: styles.usedTopography, children: [
|
|
56
55
|
"( ",
|
|
57
56
|
/* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/used" }),
|
|
58
57
|
":",
|
|
59
|
-
` ${userDetails
|
|
58
|
+
` ${userDetails?.numberCasesUsed}`,
|
|
60
59
|
" )"
|
|
61
60
|
] })
|
|
62
61
|
] }) }),
|
|
63
62
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-builds-per-study" }) }) }),
|
|
64
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails
|
|
63
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedBuilds }) })
|
|
65
64
|
] })
|
|
66
65
|
] })
|
|
67
66
|
] }),
|
|
@@ -14,7 +14,7 @@ const styles = {
|
|
|
14
14
|
};
|
|
15
15
|
function UserSettingsDialog({ openDialog, onClose, developerMode, onDeveloperModeClick }) {
|
|
16
16
|
const handleDeveloperModeClick = useCallback(
|
|
17
|
-
(event) => onDeveloperModeClick
|
|
17
|
+
(event) => onDeveloperModeClick?.(event.target.checked),
|
|
18
18
|
[onDeveloperModeClick]
|
|
19
19
|
);
|
|
20
20
|
const handleClose = useCallback(
|