@gridsuite/commons-ui 0.116.0 → 0.116.2
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/authentication/Login.js +12 -1
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +2 -1
- package/dist/components/inputs/reactHookForm/text/DescriptionField.js +2 -1
- package/dist/components/inputs/reactHookForm/utils/CancelButton.js +1 -1
- package/dist/components/topBar/TopBar.js +2 -0
- package/dist/components/treeViewFinder/TreeViewFinder.js +4 -4
- package/dist/hooks/useModificationLabelComputer.js +1 -0
- package/dist/translations/en/networkModificationsEn.d.ts +1 -0
- package/dist/translations/en/networkModificationsEn.js +1 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -0
- package/dist/translations/fr/networkModificationsFr.js +1 -0
- package/dist/utils/types/modificationType.d.ts +4 -0
- package/dist/utils/types/modificationType.js +5 -0
- package/package.json +1 -1
|
@@ -26,7 +26,18 @@ function Login({ onLoginClick, disabled }) {
|
|
|
26
26
|
/* @__PURE__ */ jsx(FormattedMessage, { id: "login/login", defaultMessage: "login" }),
|
|
27
27
|
" ?"
|
|
28
28
|
] }),
|
|
29
|
-
/* @__PURE__ */ jsx(
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
Button,
|
|
31
|
+
{
|
|
32
|
+
"data-testid": "LoginButton",
|
|
33
|
+
disabled,
|
|
34
|
+
fullWidth: true,
|
|
35
|
+
variant: "contained",
|
|
36
|
+
sx: styles.submit,
|
|
37
|
+
onClick: onLoginClick,
|
|
38
|
+
children: /* @__PURE__ */ jsx(FormattedMessage, { id: "login/connection", defaultMessage: "connection" })
|
|
39
|
+
}
|
|
40
|
+
)
|
|
30
41
|
] }),
|
|
31
42
|
/* @__PURE__ */ jsx(Box, { mt: 2, children: /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", align: "center", children: [
|
|
32
43
|
"Copyright © ",
|
|
@@ -3,7 +3,7 @@ import { useThemeProps, Button } from "@mui/material";
|
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
function CancelButton(inProps) {
|
|
5
5
|
const props = useThemeProps({ props: inProps, name: "CancelButton" });
|
|
6
|
-
return /* @__PURE__ */ jsx(Button, { ...props, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "cancel" }) });
|
|
6
|
+
return /* @__PURE__ */ jsx(Button, { "data-testid": "CancelButton", ...props, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "cancel" }) });
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
9
|
CancelButton
|
|
@@ -213,6 +213,7 @@ function TopBar({
|
|
|
213
213
|
"aria-haspopup": "true",
|
|
214
214
|
onClick: handleClickAppsMenu,
|
|
215
215
|
color: "inherit",
|
|
216
|
+
"data-testid": "AppsMenu",
|
|
216
217
|
children: /* @__PURE__ */ jsx(Apps, {})
|
|
217
218
|
}
|
|
218
219
|
),
|
|
@@ -272,6 +273,7 @@ function TopBar({
|
|
|
272
273
|
onClick: handleToggleSettingsMenu,
|
|
273
274
|
color: "inherit",
|
|
274
275
|
style: anchorElSettingsMenu ? { cursor: "initial" } : { cursor: "pointer" },
|
|
276
|
+
"data-testid": "SettingsMenu",
|
|
275
277
|
children: [
|
|
276
278
|
/* @__PURE__ */ jsx(Box, { component: "span", sx: styles.name, children: user.profile.name !== void 0 ? abbreviationFromUserName(user.profile.name) : "" }),
|
|
277
279
|
anchorElSettingsMenu ? /* @__PURE__ */ jsx(ArrowDropUp, { sx: styles.arrowIcon }) : /* @__PURE__ */ jsx(ArrowDropDown, { sx: styles.arrowIcon })
|
|
@@ -283,11 +283,10 @@ function TreeViewFinderComponant(props) {
|
|
|
283
283
|
},
|
|
284
284
|
"aria-labelledby": "TreeViewFindertitle",
|
|
285
285
|
className,
|
|
286
|
-
classes: {
|
|
287
|
-
|
|
288
|
-
},
|
|
286
|
+
classes: { paper: composeClasses(classes, cssDialogPaper) },
|
|
287
|
+
"data-testid": "Dialog",
|
|
289
288
|
children: [
|
|
290
|
-
/* @__PURE__ */ jsx(DialogTitle, { id: "TreeViewFindertitle", children: title ?? intl.formatMessage({ id: "treeview_finder/finderTitle" }, { multiSelect }) }),
|
|
289
|
+
/* @__PURE__ */ jsx(DialogTitle, { id: "TreeViewFindertitle", "data-testid": "DialogTitle", children: title ?? intl.formatMessage({ id: "treeview_finder/finderTitle" }, { multiSelect }) }),
|
|
291
290
|
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
292
291
|
/* @__PURE__ */ jsx(DialogContentText, { children: contentText ?? intl.formatMessage({ id: "treeview_finder/contentText" }, { multiSelect }) }),
|
|
293
292
|
/* @__PURE__ */ jsx(
|
|
@@ -325,6 +324,7 @@ function TreeViewFinderComponant(props) {
|
|
|
325
324
|
setAutoScrollAllowed(true);
|
|
326
325
|
},
|
|
327
326
|
disabled: isValidationDisabled(),
|
|
327
|
+
"data-testid": "SubmitButton",
|
|
328
328
|
children: getValidationButtonText()
|
|
329
329
|
}
|
|
330
330
|
)
|
|
@@ -40,6 +40,7 @@ const useModificationLabelComputer = () => {
|
|
|
40
40
|
case MODIFICATION_TYPES.DELETE_ATTACHING_LINE.type:
|
|
41
41
|
return `${modificationMetadata.attachedLineId}/${modificationMetadata.lineToAttachTo1Id}/${modificationMetadata.lineToAttachTo2Id}`;
|
|
42
42
|
case MODIFICATION_TYPES.TABULAR_MODIFICATION.type:
|
|
43
|
+
case MODIFICATION_TYPES.LIMIT_SETS_TABULAR_MODIFICATION.type:
|
|
43
44
|
return intl.formatMessage({
|
|
44
45
|
id: `network_modifications.tabular.${modificationMetadata.tabularModificationType}`
|
|
45
46
|
});
|
|
@@ -60,6 +60,7 @@ export declare const networkModificationsEn: {
|
|
|
60
60
|
'network_modifications.tabular.BATTERY_CREATION': string;
|
|
61
61
|
'network_modifications.tabular.LOAD_CREATION': string;
|
|
62
62
|
'network_modifications.tabular.SHUNT_COMPENSATOR_CREATION': string;
|
|
63
|
+
'network_modifications.LIMIT_SETS_TABULAR_MODIFICATION': string;
|
|
63
64
|
'network_modifications.LCC_CREATION': string;
|
|
64
65
|
'network_modifications.LCC_MODIFICATION': string;
|
|
65
66
|
'network_modifications.STATIC_VAR_COMPENSATOR_CREATION': string;
|
|
@@ -54,6 +54,7 @@ const networkModificationsEn = {
|
|
|
54
54
|
"network_modifications.tabular.BATTERY_CREATION": "batteries",
|
|
55
55
|
"network_modifications.tabular.LOAD_CREATION": "loads",
|
|
56
56
|
"network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "linear shunt compensators",
|
|
57
|
+
"network_modifications.LIMIT_SETS_TABULAR_MODIFICATION": "Limit sets tabular modification ({computedLabel})",
|
|
57
58
|
"network_modifications.LCC_CREATION": "Creating HVDC (LCC) {computedLabel}",
|
|
58
59
|
"network_modifications.LCC_MODIFICATION": "Modifying HVDC (LCC) {computedLabel}",
|
|
59
60
|
"network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Creating static var compensator {computedLabel}",
|
|
@@ -60,6 +60,7 @@ export declare const networkModificationsFr: {
|
|
|
60
60
|
'network_modifications.tabular.BATTERY_CREATION': string;
|
|
61
61
|
'network_modifications.tabular.LOAD_CREATION': string;
|
|
62
62
|
'network_modifications.tabular.SHUNT_COMPENSATOR_CREATION': string;
|
|
63
|
+
'network_modifications.LIMIT_SETS_TABULAR_MODIFICATION': string;
|
|
63
64
|
'network_modifications.LCC_CREATION': string;
|
|
64
65
|
'network_modifications.LCC_MODIFICATION': string;
|
|
65
66
|
'network_modifications.STATIC_VAR_COMPENSATOR_CREATION': string;
|
|
@@ -54,6 +54,7 @@ const networkModificationsFr = {
|
|
|
54
54
|
"network_modifications.tabular.BATTERY_CREATION": "batteries",
|
|
55
55
|
"network_modifications.tabular.LOAD_CREATION": "consommations",
|
|
56
56
|
"network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "MCS linéaires",
|
|
57
|
+
"network_modifications.LIMIT_SETS_TABULAR_MODIFICATION": "Modification tabulaire de sets de limites ({computedLabel})",
|
|
57
58
|
"network_modifications.LCC_CREATION": "Création de la HVDC (LCC) {computedLabel}",
|
|
58
59
|
"network_modifications.LCC_MODIFICATION": "Modification de la HVDC (LCC) {computedLabel}",
|
|
59
60
|
"network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Création de CSPR {computedLabel}",
|
|
@@ -39,6 +39,7 @@ export declare enum ModificationType {
|
|
|
39
39
|
VOLTAGE_INIT_MODIFICATION = "VOLTAGE_INIT_MODIFICATION",
|
|
40
40
|
CONVERTER_STATION_CREATION = "CONVERTER_STATION_CREATION",
|
|
41
41
|
TABULAR_MODIFICATION = "TABULAR_MODIFICATION",
|
|
42
|
+
LIMIT_SETS_TABULAR_MODIFICATION = "LIMIT_SETS_TABULAR_MODIFICATION",
|
|
42
43
|
BY_FORMULA_MODIFICATION = "BY_FORMULA_MODIFICATION",
|
|
43
44
|
MODIFICATION_BY_ASSIGNMENT = "MODIFICATION_BY_ASSIGNMENT",
|
|
44
45
|
TABULAR_CREATION = "TABULAR_CREATION",
|
|
@@ -156,6 +157,9 @@ export declare const MODIFICATION_TYPES: {
|
|
|
156
157
|
TABULAR_MODIFICATION: {
|
|
157
158
|
type: ModificationType;
|
|
158
159
|
};
|
|
160
|
+
LIMIT_SETS_TABULAR_MODIFICATION: {
|
|
161
|
+
type: ModificationType;
|
|
162
|
+
};
|
|
159
163
|
BY_FORMULA_MODIFICATION: {
|
|
160
164
|
type: ModificationType;
|
|
161
165
|
};
|
|
@@ -33,6 +33,7 @@ var ModificationType = /* @__PURE__ */ ((ModificationType2) => {
|
|
|
33
33
|
ModificationType2["VOLTAGE_INIT_MODIFICATION"] = "VOLTAGE_INIT_MODIFICATION";
|
|
34
34
|
ModificationType2["CONVERTER_STATION_CREATION"] = "CONVERTER_STATION_CREATION";
|
|
35
35
|
ModificationType2["TABULAR_MODIFICATION"] = "TABULAR_MODIFICATION";
|
|
36
|
+
ModificationType2["LIMIT_SETS_TABULAR_MODIFICATION"] = "LIMIT_SETS_TABULAR_MODIFICATION";
|
|
36
37
|
ModificationType2["BY_FORMULA_MODIFICATION"] = "BY_FORMULA_MODIFICATION";
|
|
37
38
|
ModificationType2["MODIFICATION_BY_ASSIGNMENT"] = "MODIFICATION_BY_ASSIGNMENT";
|
|
38
39
|
ModificationType2["TABULAR_CREATION"] = "TABULAR_CREATION";
|
|
@@ -185,6 +186,10 @@ const MODIFICATION_TYPES = {
|
|
|
185
186
|
type: "TABULAR_MODIFICATION"
|
|
186
187
|
/* TABULAR_MODIFICATION */
|
|
187
188
|
},
|
|
189
|
+
LIMIT_SETS_TABULAR_MODIFICATION: {
|
|
190
|
+
type: "LIMIT_SETS_TABULAR_MODIFICATION"
|
|
191
|
+
/* LIMIT_SETS_TABULAR_MODIFICATION */
|
|
192
|
+
},
|
|
188
193
|
BY_FORMULA_MODIFICATION: {
|
|
189
194
|
type: "BY_FORMULA_MODIFICATION"
|
|
190
195
|
/* BY_FORMULA_MODIFICATION */
|