Skip to content

Commit f1b62e1

Browse files
authored
Add short-circuit parameters element type (#460)
Signed-off-by: David BRAQUART <[email protected]>
1 parent fbe5b67 commit f1b62e1

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"@emotion/react": "^11.11.4",
99
"@emotion/styled": "^11.11.5",
10-
"@gridsuite/commons-ui": "0.60.2",
10+
"@gridsuite/commons-ui": "0.60.3",
1111
"@hookform/resolvers": "^3.3.4",
1212
"@mui/icons-material": "^5.15.14",
1313
"@mui/lab": "5.0.0-alpha.169",

src/components/directory-content-table.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const getClickableRowStyle = (cellData: RowClassParams<ElementAttributes>) => {
5151
ElementType.SENSITIVITY_PARAMETERS,
5252
ElementType.SECURITY_ANALYSIS_PARAMETERS,
5353
ElementType.VOLTAGE_INIT_PARAMETERS,
54+
ElementType.SHORT_CIRCUIT_PARAMETERS,
5455
].includes(cellData.data.type)
5556
) {
5657
style.cursor = 'pointer';

src/components/menus/content-contextual-menu.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,23 @@ const ContentContextualMenu = (props) => {
128128
descriptionItem,
129129
sourceItemUuid,
130130
parentDirectoryUuid,
131-
sprecificTypeItem
131+
specificTypeItem
132132
) {
133133
dispatchSelectionForCopy(
134134
typeItem,
135135
nameItem,
136136
descriptionItem,
137137
sourceItemUuid,
138138
parentDirectoryUuid,
139-
sprecificTypeItem
139+
specificTypeItem
140140
);
141141
broadcastChannel.postMessage({
142142
typeItem: typeItem,
143143
nameItem: nameItem,
144144
descriptionItem: descriptionItem,
145145
sourceItemUuid: sourceItemUuid,
146146
parentDirectoryUuid: parentDirectoryUuid,
147-
specificTypeItem: sprecificTypeItem,
147+
specificTypeItem: specificTypeItem,
148148
});
149149

150150
handleCloseDialog();
@@ -173,6 +173,7 @@ const ContentContextualMenu = (props) => {
173173
case ElementType.SECURITY_ANALYSIS_PARAMETERS:
174174
case ElementType.SENSITIVITY_PARAMETERS:
175175
case ElementType.LOADFLOW_PARAMETERS:
176+
case ElementType.SHORT_CIRCUIT_PARAMETERS:
176177
console.info(
177178
activeElement.type +
178179
' with uuid ' +
@@ -247,6 +248,7 @@ const ContentContextualMenu = (props) => {
247248
case ElementType.SENSITIVITY_PARAMETERS:
248249
case ElementType.SECURITY_ANALYSIS_PARAMETERS:
249250
case ElementType.LOADFLOW_PARAMETERS:
251+
case ElementType.SHORT_CIRCUIT_PARAMETERS:
250252
duplicateElement(
251253
activeElement.elementUuid,
252254
undefined,
@@ -445,6 +447,8 @@ const ContentContextualMenu = (props) => {
445447
ElementType.SECURITY_ANALYSIS_PARAMETERS ||
446448
selectedElements[0].type ===
447449
ElementType.SENSITIVITY_PARAMETERS ||
450+
selectedElements[0].type ===
451+
ElementType.SHORT_CIRCUIT_PARAMETERS ||
448452
selectedElements[0].type === ElementType.LOADFLOW_PARAMETERS)
449453
);
450454
}, [selectedElements]);

src/components/menus/directory-tree-contextual-menu.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ const DirectoryTreeContextualMenu = (props) => {
152152
case ElementType.SECURITY_ANALYSIS_PARAMETERS:
153153
case ElementType.SENSITIVITY_PARAMETERS:
154154
case ElementType.LOADFLOW_PARAMETERS:
155+
case ElementType.SHORT_CIRCUIT_PARAMETERS:
155156
duplicateElement(
156157
selectionForCopy.sourceItemUuid,
157158
directoryUuid,

src/translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"SECURITY_ANALYSIS_PARAMETERS": "Settings (Security analysis)",
8585
"SENSITIVITY_PARAMETERS": "Settings (Sensitivity analysis)",
8686
"LOADFLOW_PARAMETERS": "Settings (LoadFlow)",
87+
"SHORT_CIRCUIT_PARAMETERS": "Settings (Short circuit analysis)",
8788
"contingencyList.criteriaBased": "Criteria based",
8889
"contingencyList.script": "Script",
8990
"contingencyList.explicitNaming": "Explicit naming",

src/translations/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"SECURITY_ANALYSIS_PARAMETERS": "Paramètres (Analyse de sécurité)",
8484
"SENSITIVITY_PARAMETERS": "Paramètres (Analyse de sensibilité)",
8585
"LOADFLOW_PARAMETERS": "Paramètres (Calcul de répartition)",
86+
"SHORT_CIRCUIT_PARAMETERS": "Paramètres (Analyse de court-circuit)",
8687
"contingencyList.criteriaBased": "Par critères",
8788
"contingencyList.script": "Script",
8889
"contingencyList.explicitNaming": "Par nommage",

0 commit comments

Comments
 (0)