@gridsuite/commons-ui 0.283.0 → 0.284.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/features/index.js +3 -1
- package/dist/features/network-modification-table/index.js +3 -1
- package/dist/features/network-modification-table/network-modifications-table.d.ts +3 -5
- package/dist/features/network-modification-table/network-modifications-table.js +13 -7
- package/dist/features/network-modification-table/renderers/cell-renderers.js +3 -3
- package/dist/features/network-modification-table/renderers/name-cell.js +5 -2
- package/dist/features/network-modification-table/renderers/root-network-chip-cell.d.ts +3 -3
- package/dist/features/network-modification-table/renderers/root-network-chip-cell.js +24 -49
- package/dist/features/network-modification-table/row/drag-row-clone.js +5 -1
- package/dist/features/network-modification-table/utils.d.ts +12 -1
- package/dist/features/network-modification-table/utils.js +29 -0
- package/dist/features/topBar/UserInformationDialog.js +15 -15
- package/dist/index.js +3 -1
- package/dist/services/networkModification.d.ts +1 -1
- package/dist/services/networkModification.js +2 -2
- package/dist/translations/en/topBarEn.d.ts +13 -13
- package/dist/translations/en/topBarEn.js +13 -13
- package/dist/translations/fr/topBarFr.d.ts +13 -13
- package/dist/translations/fr/topBarFr.js +13 -13
- package/dist/utils/types/network-modification-metadata.d.ts +1 -0
- package/dist/utils/types/network-modification-types.d.ts +5 -4
- package/package.json +1 -1
package/dist/features/index.js
CHANGED
|
@@ -290,7 +290,7 @@ import { SelectHeaderCell } from "./network-modification-table/renderers/select-
|
|
|
290
290
|
import { SwitchCell } from "./network-modification-table/renderers/switch-cell.js";
|
|
291
291
|
import { DragCloneRow } from "./network-modification-table/row/drag-row-clone.js";
|
|
292
292
|
import { ModificationRow } from "./network-modification-table/row/modification-row.js";
|
|
293
|
-
import { MAX_COMPOSITE_NESTING_DEPTH, containsReferenceModification, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./network-modification-table/utils.js";
|
|
293
|
+
import { MAX_COMPOSITE_NESTING_DEPTH, collectApplicabilities, containsReferenceModification, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, toMessageValues, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./network-modification-table/utils.js";
|
|
294
294
|
import { AnnouncementBanner } from "./announcement/AnnouncementBanner.js";
|
|
295
295
|
import { AnnouncementNotification } from "./announcement/AnnouncementNotification.js";
|
|
296
296
|
import { useGlobalAnnouncement } from "./announcement/useGlobalAnnouncement.js";
|
|
@@ -772,6 +772,7 @@ export {
|
|
|
772
772
|
byFilterDeletionFormSchema,
|
|
773
773
|
byFilterDeletionFormToDto,
|
|
774
774
|
clearSelectedGlobalFiltersFromTableState,
|
|
775
|
+
collectApplicabilities,
|
|
775
776
|
compareStepsWithPreviousValues,
|
|
776
777
|
computeHighTapPosition,
|
|
777
778
|
computeQ0,
|
|
@@ -1094,6 +1095,7 @@ export {
|
|
|
1094
1095
|
toBeEstimatedEmptyFormData,
|
|
1095
1096
|
toFormValuesContingencyListsInfos,
|
|
1096
1097
|
toFormValuesLimitReductions,
|
|
1098
|
+
toMessageValues,
|
|
1097
1099
|
toModificationProperties,
|
|
1098
1100
|
toReactiveCapabilityCurveChoiceForGeneratorCreation,
|
|
1099
1101
|
toReactiveCapabilityCurveChoiceForGeneratorModification,
|
|
@@ -14,7 +14,7 @@ import { SelectHeaderCell } from "./renderers/select-header-cell.js";
|
|
|
14
14
|
import { SwitchCell } from "./renderers/switch-cell.js";
|
|
15
15
|
import { DragCloneRow } from "./row/drag-row-clone.js";
|
|
16
16
|
import { ModificationRow } from "./row/modification-row.js";
|
|
17
|
-
import { MAX_COMPOSITE_NESTING_DEPTH, containsReferenceModification, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./utils.js";
|
|
17
|
+
import { MAX_COMPOSITE_NESTING_DEPTH, collectApplicabilities, containsReferenceModification, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, toMessageValues, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./utils.js";
|
|
18
18
|
export {
|
|
19
19
|
AUTO_EXTENSIBLE_COLUMNS,
|
|
20
20
|
BASE_MODIFICATION_TABLE_COLUMNS,
|
|
@@ -48,6 +48,7 @@ export {
|
|
|
48
48
|
SelectHeaderRenderer,
|
|
49
49
|
SwitchCell,
|
|
50
50
|
SwitchCellRenderer,
|
|
51
|
+
collectApplicabilities,
|
|
51
52
|
computeTagMinSize,
|
|
52
53
|
containsReferenceModification,
|
|
53
54
|
createCellBorderColor,
|
|
@@ -71,6 +72,7 @@ export {
|
|
|
71
72
|
moveSubModificationInTree,
|
|
72
73
|
networkModificationTableStyles,
|
|
73
74
|
removeUuidsFromTree,
|
|
75
|
+
toMessageValues,
|
|
74
76
|
updateModificationFieldInTree,
|
|
75
77
|
updateSubModificationsOfACompositeInTree,
|
|
76
78
|
useModificationsDragAndDrop
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { default as React
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
import { ColumnDef } from '@tanstack/react-table';
|
|
3
3
|
import { UUID } from 'node:crypto';
|
|
4
4
|
import { NetworkModificationEditorNameHeaderProps } from './renderers';
|
|
5
|
-
import {
|
|
5
|
+
import { RootNetworkRowInfo, ComposedModificationMetadata, NetworkModificationMetadata } from '../../utils';
|
|
6
6
|
interface NetworkModificationsTableProps extends Omit<NetworkModificationEditorNameHeaderProps, 'modificationCount'> {
|
|
7
7
|
modifications: NetworkModificationMetadata[];
|
|
8
8
|
handleCellClick: (modification: ComposedModificationMetadata) => void;
|
|
@@ -18,9 +18,7 @@ interface NetworkModificationsTableProps extends Omit<NetworkModificationEditorN
|
|
|
18
18
|
currentNodeId?: UUID;
|
|
19
19
|
currentRootNetworkUuid?: UUID;
|
|
20
20
|
rootNetworks?: RootNetworkRowInfo[];
|
|
21
|
-
modificationsToExclude?: ExcludedNetworkModifications[];
|
|
22
|
-
setModificationsToExclude?: Dispatch<SetStateAction<ExcludedNetworkModifications[]>>;
|
|
23
21
|
isDisabled?: boolean;
|
|
24
22
|
}
|
|
25
|
-
export declare function NetworkModificationsTable({ modifications, handleCellClick, isRowDragDisabled, onRowDragStart, onRowDragEnd, onSelectedRowsChange, columns, highlightedModificationUuid, modificationToEditLabel, modificationUuidsToReset, studyUuid, currentNodeId, currentRootNetworkUuid, rootNetworks,
|
|
23
|
+
export declare function NetworkModificationsTable({ modifications, handleCellClick, isRowDragDisabled, onRowDragStart, onRowDragEnd, onSelectedRowsChange, columns, highlightedModificationUuid, modificationToEditLabel, modificationUuidsToReset, studyUuid, currentNodeId, currentRootNetworkUuid, rootNetworks, isDisabled, isImpactedByNotification, notificationMessageId, isFetchingModifications, pendingState, }: Readonly<NetworkModificationsTableProps>): React.JSX.Element;
|
|
26
24
|
export {};
|
|
@@ -8,7 +8,7 @@ import { MODIFICATION_ROW_HEIGHT, networkModificationTableStyles, createHeaderCe
|
|
|
8
8
|
import { AUTO_EXTENSIBLE_COLUMNS } from "./columns-definition.js";
|
|
9
9
|
import { useModificationsDragAndDrop } from "./use-modifications-drag-and-drop.js";
|
|
10
10
|
import { useModificationsSelection } from "./use-modifications-selection.js";
|
|
11
|
-
import { formatToComposedModification, findDepth, MAX_COMPOSITE_NESTING_DEPTH, mergeSubModificationsIntoTree, removeUuidsFromTree, findAllLoadedCompositeModifications, fetchSubModificationsForExpandedRows, isCompositeModification, isReferenceModification } from "./utils.js";
|
|
11
|
+
import { formatToComposedModification, collectApplicabilities, findDepth, MAX_COMPOSITE_NESTING_DEPTH, mergeSubModificationsIntoTree, removeUuidsFromTree, findAllLoadedCompositeModifications, fetchSubModificationsForExpandedRows, isCompositeModification, isReferenceModification } from "./utils.js";
|
|
12
12
|
import "@mui/icons-material";
|
|
13
13
|
import "react-intl";
|
|
14
14
|
import "../../utils/conversionUtils.js";
|
|
@@ -34,8 +34,6 @@ function NetworkModificationsTable({
|
|
|
34
34
|
currentNodeId = void 0,
|
|
35
35
|
currentRootNetworkUuid,
|
|
36
36
|
rootNetworks,
|
|
37
|
-
modificationsToExclude,
|
|
38
|
-
setModificationsToExclude,
|
|
39
37
|
isDisabled = false,
|
|
40
38
|
isImpactedByNotification,
|
|
41
39
|
notificationMessageId,
|
|
@@ -48,6 +46,14 @@ function NetworkModificationsTable({
|
|
|
48
46
|
const [composedModifications, setComposedModifications] = useState(
|
|
49
47
|
formatToComposedModification(modifications)
|
|
50
48
|
);
|
|
49
|
+
const rootNetworksRef = useRef(rootNetworks);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
rootNetworksRef.current = rootNetworks;
|
|
52
|
+
}, [rootNetworks]);
|
|
53
|
+
const [applicabilities, setApplicabilities] = useState({});
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
setApplicabilities(collectApplicabilities(composedModifications, rootNetworksRef.current));
|
|
56
|
+
}, [composedModifications]);
|
|
51
57
|
const composedModificationsRef = useRef(composedModifications);
|
|
52
58
|
useEffect(() => {
|
|
53
59
|
composedModificationsRef.current = composedModifications;
|
|
@@ -118,8 +124,8 @@ function NetworkModificationsTable({
|
|
|
118
124
|
},
|
|
119
125
|
modifications: {
|
|
120
126
|
count: modifications.length,
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
applicabilities,
|
|
128
|
+
setApplicabilities
|
|
123
129
|
},
|
|
124
130
|
interaction: {
|
|
125
131
|
lastClickedRowId,
|
|
@@ -141,8 +147,8 @@ function NetworkModificationsTable({
|
|
|
141
147
|
currentRootNetworkUuid,
|
|
142
148
|
rootNetworks,
|
|
143
149
|
modifications.length,
|
|
144
|
-
|
|
145
|
-
|
|
150
|
+
applicabilities,
|
|
151
|
+
setApplicabilities,
|
|
146
152
|
lastClickedRowId,
|
|
147
153
|
handleRowSelected,
|
|
148
154
|
modificationToEditLabelRef,
|
|
@@ -83,7 +83,7 @@ function RootNetworkHeaderRenderer({ column, table }) {
|
|
|
83
83
|
function RootNetworkCellRenderer({ row, column, table }) {
|
|
84
84
|
const { meta } = table.options;
|
|
85
85
|
const rootNetwork = meta?.context.rootNetworks?.find((r) => r.rootNetworkUuid === column.id);
|
|
86
|
-
if (!rootNetwork || !meta?.modifications.
|
|
86
|
+
if (!rootNetwork || !meta?.modifications.applicabilities || !meta.modifications.setApplicabilities) {
|
|
87
87
|
return null;
|
|
88
88
|
}
|
|
89
89
|
return /* @__PURE__ */ jsx(Box, { sx: createRootNetworkChipCellSx(row.original.activated), children: /* @__PURE__ */ jsx(
|
|
@@ -93,8 +93,8 @@ function RootNetworkCellRenderer({ row, column, table }) {
|
|
|
93
93
|
studyUuid: meta?.context.studyUuid ?? null,
|
|
94
94
|
currentNodeId: meta?.context.currentNodeId,
|
|
95
95
|
rootNetwork,
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
applicabilities: meta.modifications.applicabilities,
|
|
97
|
+
setApplicabilities: meta.modifications.setApplicabilities,
|
|
98
98
|
isDisabled: meta?.status.isDisabled
|
|
99
99
|
}
|
|
100
100
|
) });
|
|
@@ -62,7 +62,7 @@ import "../../../components/composite/report/report-treeview/treeview-item.js";
|
|
|
62
62
|
import "../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
63
63
|
import { networkModificationTableStyles, createModificationNameCellStyle, createNameCellLabelBoxSx, createNameCellRootStyle } from "../network-modification-table-styles.js";
|
|
64
64
|
import { DepthBox } from "./depth-box.js";
|
|
65
|
-
import { isCompositeModification } from "../utils.js";
|
|
65
|
+
import { isCompositeModification, toMessageValues } from "../utils.js";
|
|
66
66
|
const MIN_CHAR_WIDTH = 30;
|
|
67
67
|
function measureTextPx(text, font) {
|
|
68
68
|
const ctx = document.createElement("canvas").getContext("2d");
|
|
@@ -84,7 +84,10 @@ function NameCell({ row, table, onChange }) {
|
|
|
84
84
|
(modification, formatBold = true) => {
|
|
85
85
|
return intl.formatMessage(
|
|
86
86
|
{ id: `network_modifications.${modification.messageType}` },
|
|
87
|
-
{
|
|
87
|
+
{
|
|
88
|
+
...toMessageValues(modification),
|
|
89
|
+
...computeLabel(modification, formatBold)
|
|
90
|
+
}
|
|
88
91
|
);
|
|
89
92
|
},
|
|
90
93
|
[computeLabel, intl]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { default as React, SetStateAction } from 'react';
|
|
2
2
|
import { UUID } from 'node:crypto';
|
|
3
|
-
import { ComposedModificationMetadata,
|
|
3
|
+
import { ComposedModificationMetadata, NetworkModificationApplicabilities, RootNetworkRowInfo } from '../../../utils';
|
|
4
4
|
export interface RootNetworkChipCellProps {
|
|
5
5
|
data: ComposedModificationMetadata;
|
|
6
6
|
studyUuid: UUID | null;
|
|
7
7
|
currentNodeId?: UUID;
|
|
8
8
|
rootNetwork: RootNetworkRowInfo;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
applicabilities: NetworkModificationApplicabilities;
|
|
10
|
+
setApplicabilities: React.Dispatch<SetStateAction<NetworkModificationApplicabilities>>;
|
|
11
11
|
isDisabled?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export declare function RootNetworkChipCell(props: RootNetworkChipCellProps): React.JSX.Element;
|
|
@@ -14,33 +14,16 @@ import "localized-countries/data/fr";
|
|
|
14
14
|
import "localized-countries/data/en";
|
|
15
15
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
16
16
|
import "react-hook-form";
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const nextExcluded = prev.map((modif) => {
|
|
22
|
-
if (modif.rootNetworkUuid !== rootNetworkUuid) {
|
|
23
|
-
return modif;
|
|
24
|
-
}
|
|
25
|
-
const isExcluded = modif.modificationUuidsToExclude.includes(modificationUuid);
|
|
26
|
-
const newModificationUuidsToExclude = isExcluded ? modif.modificationUuidsToExclude.filter((id) => id !== modificationUuid) : [...modif.modificationUuidsToExclude, modificationUuid];
|
|
27
|
-
newStatus = isExcluded;
|
|
28
|
-
return {
|
|
29
|
-
...modif,
|
|
30
|
-
modificationUuidsToExclude: newModificationUuidsToExclude
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
return { nextExcluded, newStatus };
|
|
34
|
-
}
|
|
17
|
+
function isApplicableOn(applicabilities, modificationUuid, rootNetworkUuid) {
|
|
18
|
+
return applicabilities[modificationUuid]?.[rootNetworkUuid] ?? true;
|
|
19
|
+
}
|
|
20
|
+
function setApplicability(prevApplicabilities, modificationUuid, rootNetworkUuid, applicable) {
|
|
35
21
|
return {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
newStatus: false
|
|
22
|
+
...prevApplicabilities,
|
|
23
|
+
[modificationUuid]: {
|
|
24
|
+
...prevApplicabilities[modificationUuid],
|
|
25
|
+
[rootNetworkUuid]: applicable
|
|
26
|
+
}
|
|
44
27
|
};
|
|
45
28
|
}
|
|
46
29
|
function RootNetworkChipCell(props) {
|
|
@@ -49,43 +32,35 @@ function RootNetworkChipCell(props) {
|
|
|
49
32
|
studyUuid,
|
|
50
33
|
currentNodeId,
|
|
51
34
|
rootNetwork,
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
applicabilities,
|
|
36
|
+
setApplicabilities,
|
|
54
37
|
isDisabled = false
|
|
55
38
|
} = props;
|
|
56
39
|
const [isLoading, setIsLoading] = useState(false);
|
|
57
40
|
const { snackError } = useSnackMessage();
|
|
58
41
|
const modificationUuid = data.uuid;
|
|
59
42
|
const isReferenceModificationOrInsideOne = data.type === ModificationType.MODIFICATION_REFERENCE || data.childFromShared;
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
const excludedSet = new Set(
|
|
65
|
-
modificationsToExclude.find((item) => item.rootNetworkUuid === rootNetwork.rootNetworkUuid)?.modificationUuidsToExclude || []
|
|
66
|
-
);
|
|
67
|
-
return !excludedSet.has(modificationUuid);
|
|
68
|
-
}, [modificationUuid, modificationsToExclude, rootNetwork.rootNetworkUuid, rootNetwork.isCreating]);
|
|
43
|
+
const isModificationApplicable = useMemo(() => {
|
|
44
|
+
return isApplicableOn(applicabilities, modificationUuid, rootNetwork.rootNetworkUuid);
|
|
45
|
+
}, [modificationUuid, applicabilities, rootNetwork.rootNetworkUuid]);
|
|
69
46
|
const handleModificationActivationByRootNetwork = useCallback(() => {
|
|
70
47
|
if (!studyUuid || !currentNodeId) {
|
|
71
48
|
return;
|
|
72
49
|
}
|
|
73
50
|
setIsLoading(true);
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
rootNetwork.rootNetworkUuid,
|
|
77
|
-
modificationUuid
|
|
51
|
+
const newApplicability = !isModificationApplicable;
|
|
52
|
+
setApplicabilities(
|
|
53
|
+
(prev) => setApplicability(prev, modificationUuid, rootNetwork.rootNetworkUuid, newApplicability)
|
|
78
54
|
);
|
|
79
|
-
setModificationsToExclude(nextExcluded);
|
|
80
55
|
updateModificationStatusByRootNetwork(
|
|
81
56
|
studyUuid,
|
|
82
57
|
currentNodeId,
|
|
83
58
|
rootNetwork.rootNetworkUuid,
|
|
84
59
|
modificationUuid,
|
|
85
|
-
|
|
60
|
+
newApplicability
|
|
86
61
|
).catch((error) => {
|
|
87
|
-
|
|
88
|
-
(prev) =>
|
|
62
|
+
setApplicabilities(
|
|
63
|
+
(prev) => setApplicability(prev, modificationUuid, rootNetwork.rootNetworkUuid, isModificationApplicable)
|
|
89
64
|
);
|
|
90
65
|
snackWithFallback(snackError, error, { headerId: "modificationActivationByRootNetworkError" });
|
|
91
66
|
}).finally(() => {
|
|
@@ -95,9 +70,9 @@ function RootNetworkChipCell(props) {
|
|
|
95
70
|
modificationUuid,
|
|
96
71
|
studyUuid,
|
|
97
72
|
currentNodeId,
|
|
98
|
-
|
|
73
|
+
isModificationApplicable,
|
|
99
74
|
rootNetwork.rootNetworkUuid,
|
|
100
|
-
|
|
75
|
+
setApplicabilities,
|
|
101
76
|
snackError
|
|
102
77
|
]);
|
|
103
78
|
return /* @__PURE__ */ jsx(
|
|
@@ -105,8 +80,8 @@ function RootNetworkChipCell(props) {
|
|
|
105
80
|
{
|
|
106
81
|
label: rootNetwork.tag,
|
|
107
82
|
tooltipMessage: rootNetwork.name,
|
|
108
|
-
isActivated:
|
|
109
|
-
isDisabled: isLoading || isDisabled || isReferenceModificationOrInsideOne,
|
|
83
|
+
isActivated: isModificationApplicable,
|
|
84
|
+
isDisabled: isLoading || isDisabled || isReferenceModificationOrInsideOne || rootNetwork.isCreating,
|
|
110
85
|
onClick: handleModificationActivationByRootNetwork
|
|
111
86
|
}
|
|
112
87
|
);
|
|
@@ -13,6 +13,7 @@ import "localized-countries/data/fr";
|
|
|
13
13
|
import "localized-countries/data/en";
|
|
14
14
|
import "notistack";
|
|
15
15
|
import "react-hook-form";
|
|
16
|
+
import { toMessageValues } from "../utils.js";
|
|
16
17
|
function DragCloneRow({ row }) {
|
|
17
18
|
const intl = useIntl();
|
|
18
19
|
const { computeLabel } = useModificationLabelComputer();
|
|
@@ -20,7 +21,10 @@ function DragCloneRow({ row }) {
|
|
|
20
21
|
(modification, formatBold = true) => {
|
|
21
22
|
return intl.formatMessage(
|
|
22
23
|
{ id: `network_modifications.${modification.messageType}` },
|
|
23
|
-
{
|
|
24
|
+
{
|
|
25
|
+
...toMessageValues(modification),
|
|
26
|
+
...computeLabel(modification, formatBold)
|
|
27
|
+
}
|
|
24
28
|
);
|
|
25
29
|
},
|
|
26
30
|
[computeLabel, intl]
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { UUID } from 'node:crypto';
|
|
3
|
-
import { ComposedModificationMetadata, NetworkModificationMetadata } from '../../utils';
|
|
3
|
+
import { ComposedModificationMetadata, NetworkModificationApplicabilities, NetworkModificationMetadata, RootNetworkRowInfo } from '../../utils';
|
|
4
4
|
export declare const MAX_COMPOSITE_NESTING_DEPTH = 5;
|
|
5
|
+
export declare function collectApplicabilities(modifications: ComposedModificationMetadata[], rootNetworks?: RootNetworkRowInfo[]): NetworkModificationApplicabilities;
|
|
5
6
|
export declare const formatToComposedModification: (modifications: NetworkModificationMetadata[]) => ComposedModificationMetadata[];
|
|
7
|
+
export declare function toMessageValues(modification: NetworkModificationMetadata): {
|
|
8
|
+
uuid: UUID;
|
|
9
|
+
type: import('../..').ModificationType;
|
|
10
|
+
date: Date;
|
|
11
|
+
stashed: boolean;
|
|
12
|
+
activated: boolean;
|
|
13
|
+
description: string;
|
|
14
|
+
messageType: string;
|
|
15
|
+
messageValues: string;
|
|
16
|
+
};
|
|
6
17
|
export declare function isCompositeModification(modification: ComposedModificationMetadata | undefined): boolean;
|
|
7
18
|
export declare function isReferenceModification(modification: ComposedModificationMetadata | undefined): boolean;
|
|
8
19
|
export declare function containsReferenceModification(modification: ComposedModificationMetadata | undefined): boolean;
|
|
@@ -5,6 +5,29 @@ import "react/jsx-runtime";
|
|
|
5
5
|
import "@mui/icons-material";
|
|
6
6
|
import { getNetworkModificationsFromComposite, fetchNetworkModification } from "../../services/networkModification.js";
|
|
7
7
|
const MAX_COMPOSITE_NESTING_DEPTH = 5;
|
|
8
|
+
function toApplicabilityByRootNetworkUuid(applicabilityByRootNetworkTag, uuidByTag) {
|
|
9
|
+
return Object.entries(applicabilityByRootNetworkTag ?? {}).reduce((applicability, [tag, applicable]) => {
|
|
10
|
+
const rootNetworkUuid = uuidByTag.get(tag);
|
|
11
|
+
return rootNetworkUuid ? { ...applicability, [rootNetworkUuid]: applicable } : applicability;
|
|
12
|
+
}, {});
|
|
13
|
+
}
|
|
14
|
+
function collectApplicabilitiesByUuid(modifications, uuidByTag) {
|
|
15
|
+
return modifications.reduce(
|
|
16
|
+
(applicabilities, modification) => ({
|
|
17
|
+
...applicabilities,
|
|
18
|
+
[modification.uuid]: toApplicabilityByRootNetworkUuid(
|
|
19
|
+
modification.applicabilityByRootNetworkTag,
|
|
20
|
+
uuidByTag
|
|
21
|
+
),
|
|
22
|
+
...collectApplicabilitiesByUuid(modification.subModifications, uuidByTag)
|
|
23
|
+
}),
|
|
24
|
+
{}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function collectApplicabilities(modifications, rootNetworks = []) {
|
|
28
|
+
const uuidByTag = new Map(rootNetworks.map((rootNetwork) => [rootNetwork.tag, rootNetwork.rootNetworkUuid]));
|
|
29
|
+
return collectApplicabilitiesByUuid(modifications, uuidByTag);
|
|
30
|
+
}
|
|
8
31
|
const formatToComposedModification = (modifications) => {
|
|
9
32
|
return modifications.map((modification) => ({
|
|
10
33
|
...modification,
|
|
@@ -12,6 +35,10 @@ const formatToComposedModification = (modifications) => {
|
|
|
12
35
|
rowKey: crypto.randomUUID()
|
|
13
36
|
}));
|
|
14
37
|
};
|
|
38
|
+
function toMessageValues(modification) {
|
|
39
|
+
const { applicabilityByRootNetworkTag, ...messageValues } = modification;
|
|
40
|
+
return messageValues;
|
|
41
|
+
}
|
|
15
42
|
function isCompositeModification(modification) {
|
|
16
43
|
return modification?.type === MODIFICATION_TYPES.COMPOSITE_MODIFICATION.type;
|
|
17
44
|
}
|
|
@@ -226,6 +253,7 @@ async function fetchSubModificationsForExpandedRows(expandedRowKeys, mods, setMo
|
|
|
226
253
|
}
|
|
227
254
|
export {
|
|
228
255
|
MAX_COMPOSITE_NESTING_DEPTH,
|
|
256
|
+
collectApplicabilities,
|
|
229
257
|
containsReferenceModification,
|
|
230
258
|
fetchSubModificationsForExpandedRows,
|
|
231
259
|
findAllLoadedCompositeModifications,
|
|
@@ -237,6 +265,7 @@ export {
|
|
|
237
265
|
mergeSubModificationsIntoTree,
|
|
238
266
|
moveSubModificationInTree,
|
|
239
267
|
removeUuidsFromTree,
|
|
268
|
+
toMessageValues,
|
|
240
269
|
updateModificationFieldInTree,
|
|
241
270
|
updateSubModificationsOfACompositeInTree
|
|
242
271
|
};
|
|
@@ -61,33 +61,33 @@ function UserInformationDialog({ openDialog, userProfile, onClose }) {
|
|
|
61
61
|
` ${userDetails?.numberCasesUsed}`,
|
|
62
62
|
" )"
|
|
63
63
|
] })
|
|
64
|
-
] }) })
|
|
64
|
+
] }) }),
|
|
65
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-builds-per-user" }) }) }),
|
|
66
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedBuilds }) })
|
|
65
67
|
] }),
|
|
66
|
-
/* @__PURE__ */ jsx(Typography, { fontWeight: "bold", sx: styles.quotasTypography, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/quotas-per-
|
|
68
|
+
/* @__PURE__ */ jsx(Typography, { fontWeight: "bold", sx: styles.quotasTypography, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/quotas-per-execution" }) }),
|
|
67
69
|
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
68
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-
|
|
69
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedBuilds }) }),
|
|
70
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-loadflow-per-study" }) }) }),
|
|
70
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-loadflow-per-user" }) }) }),
|
|
71
71
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedLoadflow }) }),
|
|
72
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-security-per-
|
|
72
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-security-per-user" }) }) }),
|
|
73
73
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedSecurity }) }),
|
|
74
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-sensitivity-per-
|
|
74
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-sensitivity-per-user" }) }) }),
|
|
75
75
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedSensitivity }) }),
|
|
76
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-shortCircuit-per-
|
|
76
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-shortCircuit-per-user" }) }) }),
|
|
77
77
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedShortCircuit }) }),
|
|
78
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-voltageInit-per-
|
|
78
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-voltageInit-per-user" }) }) }),
|
|
79
79
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedVoltageInit }) }),
|
|
80
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-pccMin-per-
|
|
80
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-pccMin-per-user" }) }) }),
|
|
81
81
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedPccMin }) }),
|
|
82
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-stateEstimation-per-
|
|
82
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-stateEstimation-per-user" }) }) }),
|
|
83
83
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedStateEstimation }) }),
|
|
84
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-balanceAdjustement-per-
|
|
84
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-balanceAdjustement-per-user" }) }) }),
|
|
85
85
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedBalanceAdjustement }) }),
|
|
86
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-dynamicSimulation-per-
|
|
86
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-dynamicSimulation-per-user" }) }) }),
|
|
87
87
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedDynamicSimulation }) }),
|
|
88
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-dynamicSecurity-per-
|
|
88
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-dynamicSecurity-per-user" }) }) }),
|
|
89
89
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedDynamicSecurity }) }),
|
|
90
|
-
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-dynamicMargin-per-
|
|
90
|
+
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-information-dialog/number-of-dynamicMargin-per-user" }) }) }),
|
|
91
91
|
/* @__PURE__ */ jsx(Grid, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: userDetails?.maxAllowedDynamicMargin }) })
|
|
92
92
|
] })
|
|
93
93
|
] })
|
package/dist/index.js
CHANGED
|
@@ -486,7 +486,7 @@ import { SelectHeaderCell } from "./features/network-modification-table/renderer
|
|
|
486
486
|
import { SwitchCell } from "./features/network-modification-table/renderers/switch-cell.js";
|
|
487
487
|
import { DragCloneRow } from "./features/network-modification-table/row/drag-row-clone.js";
|
|
488
488
|
import { ModificationRow } from "./features/network-modification-table/row/modification-row.js";
|
|
489
|
-
import { MAX_COMPOSITE_NESTING_DEPTH, containsReferenceModification, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./features/network-modification-table/utils.js";
|
|
489
|
+
import { MAX_COMPOSITE_NESTING_DEPTH, collectApplicabilities, containsReferenceModification, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, toMessageValues, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./features/network-modification-table/utils.js";
|
|
490
490
|
import { AnnouncementBanner } from "./features/announcement/AnnouncementBanner.js";
|
|
491
491
|
import { AnnouncementNotification } from "./features/announcement/AnnouncementNotification.js";
|
|
492
492
|
import { useGlobalAnnouncement } from "./features/announcement/useGlobalAnnouncement.js";
|
|
@@ -1398,6 +1398,7 @@ export {
|
|
|
1398
1398
|
cardErrorBoundaryFr,
|
|
1399
1399
|
catchErrorHandler,
|
|
1400
1400
|
clearSelectedGlobalFiltersFromTableState,
|
|
1401
|
+
collectApplicabilities,
|
|
1401
1402
|
commonButtonEn,
|
|
1402
1403
|
commonButtonFr,
|
|
1403
1404
|
compareStepsWithPreviousValues,
|
|
@@ -1951,6 +1952,7 @@ export {
|
|
|
1951
1952
|
toFloatOrNullValue,
|
|
1952
1953
|
toFormValuesContingencyListsInfos,
|
|
1953
1954
|
toFormValuesLimitReductions,
|
|
1955
|
+
toMessageValues,
|
|
1954
1956
|
toModificationOperation,
|
|
1955
1957
|
toModificationProperties,
|
|
1956
1958
|
toNestedGlobalSelectors,
|
|
@@ -23,4 +23,4 @@ export declare function updateNetworkModificationsMetadata(modificationUuids: UU
|
|
|
23
23
|
export declare function getNetworkModificationsFromComposite(compositeModificationUuids: string[], onlyMetadata?: boolean): Promise<Record<UUID, NetworkModificationMetadata[]>>;
|
|
24
24
|
export declare function moveModification(studyUuid: UUID | null, nodeUuid: UUID | undefined, modificationUuid: UUID, sourceContainer: ModificationContainer, targetContainer: ModificationContainer, beforeUuid: UUID | null): Promise<Response>;
|
|
25
25
|
export declare function setModificationMetadata(studyUuid: UUID | null, nodeUuid: UUID | undefined, modificationUuid: UUID | undefined, metadata: Partial<NetworkModificationMetadata | ComposedModificationMetadata>): Promise<Response>;
|
|
26
|
-
export declare function updateModificationStatusByRootNetwork(studyUuid: UUID, nodeUuid: UUID, rootNetworkUuid: UUID, modificationUuid: UUID,
|
|
26
|
+
export declare function updateModificationStatusByRootNetwork(studyUuid: UUID, nodeUuid: UUID, rootNetworkUuid: UUID, modificationUuid: UUID, applicable: boolean): Promise<Response>;
|
|
@@ -87,9 +87,9 @@ function setModificationMetadata(studyUuid, nodeUuid, modificationUuid, metadata
|
|
|
87
87
|
body: JSON.stringify(metadata)
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function updateModificationStatusByRootNetwork(studyUuid, nodeUuid, rootNetworkUuid, modificationUuid,
|
|
90
|
+
function updateModificationStatusByRootNetwork(studyUuid, nodeUuid, rootNetworkUuid, modificationUuid, applicable) {
|
|
91
91
|
const urlSearchParams = new URLSearchParams();
|
|
92
|
-
urlSearchParams.append("
|
|
92
|
+
urlSearchParams.append("applicable", String(applicable));
|
|
93
93
|
urlSearchParams.append("uuids", String([modificationUuid]));
|
|
94
94
|
const url = `${getStudyUrlWithNodeUuidAndRootNetworkUuid(studyUuid, nodeUuid, rootNetworkUuid)}/network-modifications?${urlSearchParams.toString()}`;
|
|
95
95
|
console.debug(url);
|
|
@@ -45,21 +45,21 @@ export declare const topBarEn: {
|
|
|
45
45
|
'user-information-dialog/profile': string;
|
|
46
46
|
'user-information-dialog/no-profile': string;
|
|
47
47
|
'user-information-dialog/quotas': string;
|
|
48
|
-
'user-information-dialog/quotas-per-
|
|
48
|
+
'user-information-dialog/quotas-per-execution': string;
|
|
49
49
|
'user-information-dialog/number-of-cases-or-studies': string;
|
|
50
50
|
'user-information-dialog/used': string;
|
|
51
|
-
'user-information-dialog/number-of-builds-per-
|
|
52
|
-
'user-information-dialog/number-of-loadflow-per-
|
|
53
|
-
'user-information-dialog/number-of-security-per-
|
|
54
|
-
'user-information-dialog/number-of-sensitivity-per-
|
|
55
|
-
'user-information-dialog/number-of-shortCircuit-per-
|
|
56
|
-
'user-information-dialog/number-of-voltageInit-per-
|
|
57
|
-
'user-information-dialog/number-of-pccMin-per-
|
|
58
|
-
'user-information-dialog/number-of-stateEstimation-per-
|
|
59
|
-
'user-information-dialog/number-of-balanceAdjustement-per-
|
|
60
|
-
'user-information-dialog/number-of-dynamicSimulation-per-
|
|
61
|
-
'user-information-dialog/number-of-dynamicSecurity-per-
|
|
62
|
-
'user-information-dialog/number-of-dynamicMargin-per-
|
|
51
|
+
'user-information-dialog/number-of-builds-per-user': string;
|
|
52
|
+
'user-information-dialog/number-of-loadflow-per-user': string;
|
|
53
|
+
'user-information-dialog/number-of-security-per-user': string;
|
|
54
|
+
'user-information-dialog/number-of-sensitivity-per-user': string;
|
|
55
|
+
'user-information-dialog/number-of-shortCircuit-per-user': string;
|
|
56
|
+
'user-information-dialog/number-of-voltageInit-per-user': string;
|
|
57
|
+
'user-information-dialog/number-of-pccMin-per-user': string;
|
|
58
|
+
'user-information-dialog/number-of-stateEstimation-per-user': string;
|
|
59
|
+
'user-information-dialog/number-of-balanceAdjustement-per-user': string;
|
|
60
|
+
'user-information-dialog/number-of-dynamicSimulation-per-user': string;
|
|
61
|
+
'user-information-dialog/number-of-dynamicSecurity-per-user': string;
|
|
62
|
+
'user-information-dialog/number-of-dynamicMargin-per-user': string;
|
|
63
63
|
'user-settings-dialog/title': string;
|
|
64
64
|
'user-settings-dialog/label-developer-mode': string;
|
|
65
65
|
'user-settings-dialog/warning-developer-mode': string;
|
|
@@ -39,21 +39,21 @@ const topBarEn = {
|
|
|
39
39
|
"user-information-dialog/profile": "Profile",
|
|
40
40
|
"user-information-dialog/no-profile": "No profile",
|
|
41
41
|
"user-information-dialog/quotas": "User quotas",
|
|
42
|
-
"user-information-dialog/quotas-per-
|
|
42
|
+
"user-information-dialog/quotas-per-execution": "User quotas per execution",
|
|
43
43
|
"user-information-dialog/number-of-cases-or-studies": "Number of cases or studies",
|
|
44
44
|
"user-information-dialog/used": "Used",
|
|
45
|
-
"user-information-dialog/number-of-builds-per-
|
|
46
|
-
"user-information-dialog/number-of-loadflow-per-
|
|
47
|
-
"user-information-dialog/number-of-security-per-
|
|
48
|
-
"user-information-dialog/number-of-sensitivity-per-
|
|
49
|
-
"user-information-dialog/number-of-shortCircuit-per-
|
|
50
|
-
"user-information-dialog/number-of-voltageInit-per-
|
|
51
|
-
"user-information-dialog/number-of-pccMin-per-
|
|
52
|
-
"user-information-dialog/number-of-stateEstimation-per-
|
|
53
|
-
"user-information-dialog/number-of-balanceAdjustement-per-
|
|
54
|
-
"user-information-dialog/number-of-dynamicSimulation-per-
|
|
55
|
-
"user-information-dialog/number-of-dynamicSecurity-per-
|
|
56
|
-
"user-information-dialog/number-of-dynamicMargin-per-
|
|
45
|
+
"user-information-dialog/number-of-builds-per-user": "Number of builds",
|
|
46
|
+
"user-information-dialog/number-of-loadflow-per-user": "Number of loadflow",
|
|
47
|
+
"user-information-dialog/number-of-security-per-user": "Number of security analysis",
|
|
48
|
+
"user-information-dialog/number-of-sensitivity-per-user": "Number of sensitivity analysis",
|
|
49
|
+
"user-information-dialog/number-of-shortCircuit-per-user": "Number of short circuit",
|
|
50
|
+
"user-information-dialog/number-of-voltageInit-per-user": "Number of voltage initialization",
|
|
51
|
+
"user-information-dialog/number-of-pccMin-per-user": "Number of PCC N-1",
|
|
52
|
+
"user-information-dialog/number-of-stateEstimation-per-user": "Number of state estimation",
|
|
53
|
+
"user-information-dialog/number-of-balanceAdjustement-per-user": "Number of balance adjustment",
|
|
54
|
+
"user-information-dialog/number-of-dynamicSimulation-per-user": "Number of dynamic simulations",
|
|
55
|
+
"user-information-dialog/number-of-dynamicSecurity-per-user": "Number of dynamic security analysis",
|
|
56
|
+
"user-information-dialog/number-of-dynamicMargin-per-user": "Number of dynamic margin",
|
|
57
57
|
"user-settings-dialog/title": "User settings",
|
|
58
58
|
"user-settings-dialog/label-developer-mode": "Developer mode",
|
|
59
59
|
"user-settings-dialog/warning-developer-mode": "Some of the features are not complete, so they may not work as expected. To hide these features, disable developer mode."
|
|
@@ -45,21 +45,21 @@ export declare const topBarFr: {
|
|
|
45
45
|
'user-information-dialog/profile': string;
|
|
46
46
|
'user-information-dialog/no-profile': string;
|
|
47
47
|
'user-information-dialog/quotas': string;
|
|
48
|
-
'user-information-dialog/quotas-per-
|
|
48
|
+
'user-information-dialog/quotas-per-execution': string;
|
|
49
49
|
'user-information-dialog/number-of-cases-or-studies': string;
|
|
50
50
|
'user-information-dialog/used': string;
|
|
51
|
-
'user-information-dialog/number-of-builds-per-
|
|
52
|
-
'user-information-dialog/number-of-loadflow-per-
|
|
53
|
-
'user-information-dialog/number-of-security-per-
|
|
54
|
-
'user-information-dialog/number-of-sensitivity-per-
|
|
55
|
-
'user-information-dialog/number-of-shortCircuit-per-
|
|
56
|
-
'user-information-dialog/number-of-voltageInit-per-
|
|
57
|
-
'user-information-dialog/number-of-pccMin-per-
|
|
58
|
-
'user-information-dialog/number-of-stateEstimation-per-
|
|
59
|
-
'user-information-dialog/number-of-balanceAdjustement-per-
|
|
60
|
-
'user-information-dialog/number-of-dynamicSimulation-per-
|
|
61
|
-
'user-information-dialog/number-of-dynamicSecurity-per-
|
|
62
|
-
'user-information-dialog/number-of-dynamicMargin-per-
|
|
51
|
+
'user-information-dialog/number-of-builds-per-user': string;
|
|
52
|
+
'user-information-dialog/number-of-loadflow-per-user': string;
|
|
53
|
+
'user-information-dialog/number-of-security-per-user': string;
|
|
54
|
+
'user-information-dialog/number-of-sensitivity-per-user': string;
|
|
55
|
+
'user-information-dialog/number-of-shortCircuit-per-user': string;
|
|
56
|
+
'user-information-dialog/number-of-voltageInit-per-user': string;
|
|
57
|
+
'user-information-dialog/number-of-pccMin-per-user': string;
|
|
58
|
+
'user-information-dialog/number-of-stateEstimation-per-user': string;
|
|
59
|
+
'user-information-dialog/number-of-balanceAdjustement-per-user': string;
|
|
60
|
+
'user-information-dialog/number-of-dynamicSimulation-per-user': string;
|
|
61
|
+
'user-information-dialog/number-of-dynamicSecurity-per-user': string;
|
|
62
|
+
'user-information-dialog/number-of-dynamicMargin-per-user': string;
|
|
63
63
|
'user-settings-dialog/title': string;
|
|
64
64
|
'user-settings-dialog/label-developer-mode': string;
|
|
65
65
|
'user-settings-dialog/warning-developer-mode': string;
|
|
@@ -39,21 +39,21 @@ const topBarFr = {
|
|
|
39
39
|
"user-information-dialog/profile": "Profil",
|
|
40
40
|
"user-information-dialog/no-profile": "Pas de profil",
|
|
41
41
|
"user-information-dialog/quotas": "Quotas",
|
|
42
|
-
"user-information-dialog/quotas-per-
|
|
42
|
+
"user-information-dialog/quotas-per-execution": "Quotas par exécution",
|
|
43
43
|
"user-information-dialog/number-of-cases-or-studies": "Nombre situations ou études",
|
|
44
44
|
"user-information-dialog/used": "Utilisé",
|
|
45
|
-
"user-information-dialog/number-of-builds-per-
|
|
46
|
-
"user-information-dialog/number-of-loadflow-per-
|
|
47
|
-
"user-information-dialog/number-of-security-per-
|
|
48
|
-
"user-information-dialog/number-of-sensitivity-per-
|
|
49
|
-
"user-information-dialog/number-of-shortCircuit-per-
|
|
50
|
-
"user-information-dialog/number-of-voltageInit-per-
|
|
51
|
-
"user-information-dialog/number-of-pccMin-per-
|
|
52
|
-
"user-information-dialog/number-of-stateEstimation-per-
|
|
53
|
-
"user-information-dialog/number-of-balanceAdjustement-per-
|
|
54
|
-
"user-information-dialog/number-of-dynamicSimulation-per-
|
|
55
|
-
"user-information-dialog/number-of-dynamicSecurity-per-
|
|
56
|
-
"user-information-dialog/number-of-dynamicMargin-per-
|
|
45
|
+
"user-information-dialog/number-of-builds-per-user": "Nombre de réalisations",
|
|
46
|
+
"user-information-dialog/number-of-loadflow-per-user": "Nombre de calculs de répartition",
|
|
47
|
+
"user-information-dialog/number-of-security-per-user": "Nombre d'analyses de sécurité",
|
|
48
|
+
"user-information-dialog/number-of-sensitivity-per-user": "Nombre d'analyses de sensibilité",
|
|
49
|
+
"user-information-dialog/number-of-shortCircuit-per-user": "Nombre de calculs de court-circuit",
|
|
50
|
+
"user-information-dialog/number-of-voltageInit-per-user": "Nombre d'initialisations du plan de tension",
|
|
51
|
+
"user-information-dialog/number-of-pccMin-per-user": "Nombre de PCC N-1",
|
|
52
|
+
"user-information-dialog/number-of-stateEstimation-per-user": "Nombre d'estimations d'état",
|
|
53
|
+
"user-information-dialog/number-of-balanceAdjustement-per-user": "Nombre d'équilibrages bilan",
|
|
54
|
+
"user-information-dialog/number-of-dynamicSimulation-per-user": "Nombre de simulations dynamiques",
|
|
55
|
+
"user-information-dialog/number-of-dynamicSecurity-per-user": "Nombre d'analyses de sécurité dynamiques",
|
|
56
|
+
"user-information-dialog/number-of-dynamicMargin-per-user": "Nombre de calculs de marge dynamiques",
|
|
57
57
|
"user-settings-dialog/title": "Paramètres utilisateur",
|
|
58
58
|
"user-settings-dialog/label-developer-mode": "Mode développeur",
|
|
59
59
|
"user-settings-dialog/warning-developer-mode": "Certaines fonctionnalités ne sont pas complètes et peuvent donc ne pas fonctionner comme prévu. Pour masquer ces fonctionnalités, désactivez le mode développeur."
|
|
@@ -9,6 +9,7 @@ export interface NetworkModificationMetadata {
|
|
|
9
9
|
description: string;
|
|
10
10
|
messageType: string;
|
|
11
11
|
messageValues: string;
|
|
12
|
+
applicabilityByRootNetworkTag?: Record<string, boolean>;
|
|
12
13
|
}
|
|
13
14
|
export interface BasicComposedModificationMetadata extends NetworkModificationMetadata {
|
|
14
15
|
subModifications: ComposedModificationMetadata[];
|
|
@@ -7,10 +7,11 @@ export type AttributeModification<T> = {
|
|
|
7
7
|
value?: T;
|
|
8
8
|
op: OperationType;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Applicability of each network modification per root network, keyed by root network uuid: a root network
|
|
12
|
+
* without an entry is applicable. The modifications carry it keyed by tag, which is resolved to the root network uuid.
|
|
13
|
+
*/
|
|
14
|
+
export type NetworkModificationApplicabilities = Record<UUID, Record<UUID, boolean>>;
|
|
14
15
|
export interface RootNetworkRowInfo {
|
|
15
16
|
rootNetworkUuid: UUID;
|
|
16
17
|
name: string;
|