@gridsuite/commons-ui 0.70.0 → 0.71.1
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/directoryItemSelector/DirectoryItemSelector.d.ts +2 -1
- package/dist/components/directoryItemSelector/DirectoryItemSelector.js +17 -7
- package/dist/components/filter/index.d.ts +1 -0
- package/dist/components/snackbarProvider/SnackbarProvider.js +30 -6
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/useModificationLabelComputer.d.ts +24 -0
- package/dist/hooks/useModificationLabelComputer.js +74 -0
- package/dist/hooks/useSnackMessage.js +5 -2
- package/dist/index.js +13 -2
- package/dist/services/appsMetadata.d.ts +1 -0
- package/dist/services/appsMetadata.js +2 -1
- package/dist/services/index.js +4 -2
- package/dist/services/utils.d.ts +1 -0
- package/dist/services/utils.js +8 -0
- package/dist/translations/en/index.d.ts +1 -0
- package/dist/translations/en/index.js +2 -0
- package/dist/translations/en/networkModificationsEn.d.ts +60 -0
- package/dist/translations/en/networkModificationsEn.js +57 -0
- package/dist/translations/fr/index.d.ts +1 -0
- package/dist/translations/fr/index.js +2 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +60 -0
- package/dist/translations/fr/networkModificationsFr.js +57 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +3 -0
- package/dist/utils/types/modificationType.d.ts +170 -0
- package/dist/utils/types/modificationType.js +208 -0
- package/dist/utils/types/types.d.ts +2 -0
- package/package.json +8 -4
- package/dist/components/topBar/tests/TopBar.test.d.ts +0 -7
|
@@ -16,5 +16,6 @@ export interface DirectoryItemSelectorProps extends TreeViewFinderProps {
|
|
|
16
16
|
onlyLeaves?: boolean;
|
|
17
17
|
multiselect?: boolean;
|
|
18
18
|
expanded?: UUID[];
|
|
19
|
+
selected?: UUID[];
|
|
19
20
|
}
|
|
20
|
-
export declare function DirectoryItemSelector({ open, types, equipmentTypes, itemFilter, expanded, ...otherTreeViewFinderProps }: Readonly<DirectoryItemSelectorProps>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function DirectoryItemSelector({ open, types, equipmentTypes, itemFilter, expanded, selected, ...otherTreeViewFinderProps }: Readonly<DirectoryItemSelectorProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -107,6 +107,7 @@ function DirectoryItemSelector({
|
|
|
107
107
|
equipmentTypes,
|
|
108
108
|
itemFilter,
|
|
109
109
|
expanded,
|
|
110
|
+
selected,
|
|
110
111
|
...otherTreeViewFinderProps
|
|
111
112
|
}) {
|
|
112
113
|
const [data, setData] = useState([]);
|
|
@@ -166,7 +167,7 @@ function DirectoryItemSelector({
|
|
|
166
167
|
});
|
|
167
168
|
});
|
|
168
169
|
}, [convertRoots, types, snackError]);
|
|
169
|
-
const
|
|
170
|
+
const fetchDirectoryChildren = useCallback(
|
|
170
171
|
(nodeId) => {
|
|
171
172
|
const typeList = types.includes(ElementType.DIRECTORY) ? [] : types;
|
|
172
173
|
fetchDirectoryContent(nodeId, typeList).then((children) => {
|
|
@@ -195,24 +196,33 @@ function DirectoryItemSelector({
|
|
|
195
196
|
[types, equipmentTypes, itemFilter, contentFilter, addToDirectory]
|
|
196
197
|
);
|
|
197
198
|
useEffect(() => {
|
|
198
|
-
if (open) {
|
|
199
|
-
|
|
200
|
-
if (
|
|
199
|
+
if (open && expanded && selected) {
|
|
200
|
+
const isSelectedItemFetched = selected.every((id) => nodeMap.current[id]);
|
|
201
|
+
if (!isSelectedItemFetched) {
|
|
201
202
|
expanded.forEach((nodeId) => {
|
|
202
|
-
|
|
203
|
+
const node = nodeMap.current[nodeId];
|
|
204
|
+
if ((node == null ? void 0 : node.children) && node.children.length === 0) {
|
|
205
|
+
fetchDirectoryChildren(nodeId);
|
|
206
|
+
}
|
|
203
207
|
});
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
|
-
}, [open,
|
|
210
|
+
}, [open, expanded, fetchDirectoryChildren, selected, data]);
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
if (open) {
|
|
213
|
+
updateRootDirectories();
|
|
214
|
+
}
|
|
215
|
+
}, [open, updateRootDirectories]);
|
|
207
216
|
return /* @__PURE__ */ jsx(
|
|
208
217
|
TreeViewFinder,
|
|
209
218
|
{
|
|
210
|
-
onTreeBrowse:
|
|
219
|
+
onTreeBrowse: fetchDirectoryChildren,
|
|
211
220
|
sortMethod: sortHandlingDirectories,
|
|
212
221
|
multiSelect: true,
|
|
213
222
|
open,
|
|
214
223
|
expanded,
|
|
215
224
|
onlyLeaves: true,
|
|
225
|
+
selected,
|
|
216
226
|
...otherTreeViewFinderProps,
|
|
217
227
|
data
|
|
218
228
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
+
export * from './filter.type';
|
|
7
8
|
export * from './FilterCreationDialog';
|
|
8
9
|
export * from './FilterForm';
|
|
9
10
|
export * from './constants/FilterConstants';
|
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { styled, IconButton } from "@mui/material";
|
|
4
|
+
import ClearIcon from "@mui/icons-material/Clear";
|
|
4
5
|
import { SnackbarProvider as SnackbarProvider$1 } from "notistack";
|
|
6
|
+
const StyledOrigSnackbarProvider = styled(SnackbarProvider$1)(() => ({
|
|
7
|
+
"&.notistack-MuiContent": {
|
|
8
|
+
alignItems: "flex-start",
|
|
9
|
+
flexWrap: "nowrap"
|
|
10
|
+
},
|
|
11
|
+
"#notistack-snackbar": {
|
|
12
|
+
alignItems: "flex-start"
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
15
|
+
const styles = {
|
|
16
|
+
buttonColor: (theme) => ({
|
|
17
|
+
color: theme.palette.common.white
|
|
18
|
+
})
|
|
19
|
+
};
|
|
5
20
|
function SnackbarProvider(props) {
|
|
6
21
|
const ref = useRef(null);
|
|
7
|
-
const action = (key) => /* @__PURE__ */ jsx(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
22
|
+
const action = (key) => /* @__PURE__ */ jsx(
|
|
23
|
+
IconButton,
|
|
24
|
+
{
|
|
25
|
+
onClick: () => {
|
|
26
|
+
var _a;
|
|
27
|
+
return (_a = ref.current) == null ? void 0 : _a.closeSnackbar(key);
|
|
28
|
+
},
|
|
29
|
+
"aria-label": "clear-snack",
|
|
30
|
+
size: "small",
|
|
31
|
+
sx: styles.buttonColor,
|
|
32
|
+
children: /* @__PURE__ */ jsx(ClearIcon, { fontSize: "small" })
|
|
33
|
+
}
|
|
34
|
+
);
|
|
11
35
|
return /* @__PURE__ */ jsx(
|
|
12
|
-
|
|
36
|
+
StyledOrigSnackbarProvider,
|
|
13
37
|
{
|
|
14
38
|
ref,
|
|
15
39
|
anchorOrigin: { horizontal: "center", vertical: "bottom" },
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useStateBoolean } from "./customStates/useStateBoolean.js";
|
|
2
2
|
import { useStateNumber } from "./customStates/useStateNumber.js";
|
|
3
|
+
import { useModificationLabelComputer } from "./useModificationLabelComputer.js";
|
|
3
4
|
import { useConfidentialityWarning } from "./useConfidentialityWarning.js";
|
|
4
5
|
import { useDebounce } from "./useDebounce.js";
|
|
5
6
|
import { useIntlRef } from "./useIntlRef.js";
|
|
@@ -14,6 +15,7 @@ export {
|
|
|
14
15
|
useDebounce,
|
|
15
16
|
useIntlRef,
|
|
16
17
|
useLocalizedCountries,
|
|
18
|
+
useModificationLabelComputer,
|
|
17
19
|
usePredefinedProperties,
|
|
18
20
|
usePrevious,
|
|
19
21
|
useSnackMessage,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UUID } from 'crypto';
|
|
2
|
+
|
|
3
|
+
export interface NetworkModificationMetadata {
|
|
4
|
+
uuid: UUID;
|
|
5
|
+
type: string;
|
|
6
|
+
date: Date;
|
|
7
|
+
stashed: boolean;
|
|
8
|
+
activated: boolean;
|
|
9
|
+
messageType: string;
|
|
10
|
+
messageValues: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const useModificationLabelComputer: () => {
|
|
13
|
+
computeLabel: (modif: NetworkModificationMetadata, withFormat?: boolean) => {
|
|
14
|
+
action: string;
|
|
15
|
+
energizedEnd: string;
|
|
16
|
+
computedLabel: string | import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
} | {
|
|
18
|
+
equipmentAttributeName: string;
|
|
19
|
+
equipmentAttributeValue: string;
|
|
20
|
+
computedLabel: string | import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
} | {
|
|
22
|
+
computedLabel: any;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useIntl } from "react-intl";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { MODIFICATION_TYPES } from "../utils/types/modificationType.js";
|
|
5
|
+
import { EQUIPMENT_TYPE } from "../utils/types/equipmentType.js";
|
|
6
|
+
const getOperatingStatusModificationValues = (modification, withFormat) => {
|
|
7
|
+
return {
|
|
8
|
+
action: modification.action,
|
|
9
|
+
energizedEnd: modification.energizedVoltageLevelId,
|
|
10
|
+
computedLabel: withFormat ? /* @__PURE__ */ jsx("strong", { children: modification.equipmentId }) : modification.equipmentId
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
const getEquipmentAttributeModificationValues = (modification, withFormat) => {
|
|
14
|
+
return {
|
|
15
|
+
equipmentAttributeName: modification.equipmentAttributeName,
|
|
16
|
+
equipmentAttributeValue: modification.equipmentAttributeValue,
|
|
17
|
+
computedLabel: withFormat ? /* @__PURE__ */ jsx("strong", { children: modification.equipmentId }) : modification.equipmentId
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
const useModificationLabelComputer = () => {
|
|
21
|
+
const intl = useIntl();
|
|
22
|
+
const getLabel = useCallback(
|
|
23
|
+
(modif) => {
|
|
24
|
+
const modificationMetadata = JSON.parse(modif.messageValues);
|
|
25
|
+
switch (modif.messageType) {
|
|
26
|
+
case MODIFICATION_TYPES.LINE_SPLIT_WITH_VOLTAGE_LEVEL.type:
|
|
27
|
+
return modificationMetadata.lineToSplitId;
|
|
28
|
+
case MODIFICATION_TYPES.LINE_ATTACH_TO_VOLTAGE_LEVEL.type:
|
|
29
|
+
return modificationMetadata.lineToAttachToId;
|
|
30
|
+
case MODIFICATION_TYPES.LINES_ATTACH_TO_SPLIT_LINES.type:
|
|
31
|
+
return modificationMetadata.attachedLineId;
|
|
32
|
+
case MODIFICATION_TYPES.DELETE_VOLTAGE_LEVEL_ON_LINE.type:
|
|
33
|
+
return `${modificationMetadata.lineToAttachTo1Id}/${modificationMetadata.lineToAttachTo2Id}`;
|
|
34
|
+
case MODIFICATION_TYPES.DELETE_ATTACHING_LINE.type:
|
|
35
|
+
return `${modificationMetadata.attachedLineId}/${modificationMetadata.lineToAttachTo1Id}/${modificationMetadata.lineToAttachTo2Id}`;
|
|
36
|
+
case MODIFICATION_TYPES.TABULAR_MODIFICATION.type:
|
|
37
|
+
return intl.formatMessage({
|
|
38
|
+
id: `network_modifications.tabular.${modificationMetadata.tabularModificationType}`
|
|
39
|
+
});
|
|
40
|
+
case MODIFICATION_TYPES.BY_FILTER_DELETION.type:
|
|
41
|
+
return intl.formatMessage({
|
|
42
|
+
id: modificationMetadata.equipmentType === EQUIPMENT_TYPE.HVDC_LINE ? "Hvdc" : modificationMetadata.equipmentType
|
|
43
|
+
});
|
|
44
|
+
case MODIFICATION_TYPES.TABULAR_CREATION.type:
|
|
45
|
+
return intl.formatMessage({
|
|
46
|
+
id: `network_modifications.tabular.${modificationMetadata.tabularCreationType}`
|
|
47
|
+
});
|
|
48
|
+
default:
|
|
49
|
+
return modificationMetadata.equipmentId || "";
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
[intl]
|
|
53
|
+
);
|
|
54
|
+
const computeLabel = useCallback(
|
|
55
|
+
(modif, withFormat = true) => {
|
|
56
|
+
const modificationValues = JSON.parse(modif.messageValues);
|
|
57
|
+
switch (modif.messageType) {
|
|
58
|
+
case MODIFICATION_TYPES.OPERATING_STATUS_MODIFICATION.type:
|
|
59
|
+
return getOperatingStatusModificationValues(modificationValues, withFormat);
|
|
60
|
+
case MODIFICATION_TYPES.EQUIPMENT_ATTRIBUTE_MODIFICATION.type:
|
|
61
|
+
return getEquipmentAttributeModificationValues(modificationValues, withFormat);
|
|
62
|
+
default:
|
|
63
|
+
return {
|
|
64
|
+
computedLabel: withFormat ? /* @__PURE__ */ jsx("strong", { children: getLabel(modif) }) : getLabel(modif)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
[getLabel]
|
|
69
|
+
);
|
|
70
|
+
return { computeLabel };
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
useModificationLabelComputer
|
|
74
|
+
};
|
|
@@ -34,7 +34,7 @@ function makeMessage(intlRef, snackInputs) {
|
|
|
34
34
|
}
|
|
35
35
|
if (message) {
|
|
36
36
|
if (header) {
|
|
37
|
-
fullMessage += "\n
|
|
37
|
+
fullMessage += "\n";
|
|
38
38
|
}
|
|
39
39
|
fullMessage += message;
|
|
40
40
|
}
|
|
@@ -57,7 +57,10 @@ function useSnackMessage() {
|
|
|
57
57
|
},
|
|
58
58
|
[enqueueSnackbar, intlRef]
|
|
59
59
|
);
|
|
60
|
-
const snackError = useCallback(
|
|
60
|
+
const snackError = useCallback(
|
|
61
|
+
(snackInputs) => enqueue({ ...snackInputs, persist: true }, "error"),
|
|
62
|
+
[enqueue]
|
|
63
|
+
);
|
|
61
64
|
const snackWarning = useCallback((snackInputs) => enqueue(snackInputs, "warning"), [enqueue]);
|
|
62
65
|
const snackInfo = useCallback((snackInputs) => enqueue(snackInputs, "info"), [enqueue]);
|
|
63
66
|
return { snackError, snackInfo, snackWarning, closeSnackbar };
|
package/dist/index.js
CHANGED
|
@@ -107,6 +107,7 @@ import { AboutDialog } from "./components/topBar/AboutDialog.js";
|
|
|
107
107
|
import { TreeViewFinder, generateTreeViewFinderClass } from "./components/treeViewFinder/TreeViewFinder.js";
|
|
108
108
|
import { useStateBoolean } from "./hooks/customStates/useStateBoolean.js";
|
|
109
109
|
import { useStateNumber } from "./hooks/customStates/useStateNumber.js";
|
|
110
|
+
import { useModificationLabelComputer } from "./hooks/useModificationLabelComputer.js";
|
|
110
111
|
import { useConfidentialityWarning } from "./hooks/useConfidentialityWarning.js";
|
|
111
112
|
import { useDebounce } from "./hooks/useDebounce.js";
|
|
112
113
|
import { useIntlRef } from "./hooks/useIntlRef.js";
|
|
@@ -116,9 +117,9 @@ import { usePrevious } from "./hooks/usePrevious.js";
|
|
|
116
117
|
import { useSnackMessage } from "./hooks/useSnackMessage.js";
|
|
117
118
|
import { LOGOUT_ERROR, RESET_AUTHENTICATION_ROUTER_ERROR, SHOW_AUTH_INFO_LOGIN, SIGNIN_CALLBACK_ERROR, UNAUTHORIZED_USER_INFO, USER, USER_VALIDATION_ERROR, resetAuthenticationRouterError, setLoggedUser, setLogoutError, setShowAuthenticationRouterLogin, setSignInCallbackError, setUnauthorizedUserInfo, setUserValidationError } from "./redux/actions/authActions.js";
|
|
118
119
|
import { getUserToken, setCommonStore } from "./redux/commonStore.js";
|
|
119
|
-
import { backendFetch, backendFetchJson, getRequestParamFromList } from "./services/utils.js";
|
|
120
|
+
import { backendFetch, backendFetchJson, catchErrorHandler, getRequestParamFromList } from "./services/utils.js";
|
|
120
121
|
import { createFilter, fetchElementsInfos, saveFilter } from "./services/explore.js";
|
|
121
|
-
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata } from "./services/appsMetadata.js";
|
|
122
|
+
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata, isStudyMetadata } from "./services/appsMetadata.js";
|
|
122
123
|
import { fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./services/directory.js";
|
|
123
124
|
import { exportFilter } from "./services/study.js";
|
|
124
125
|
import { equalsArray } from "./utils/algos.js";
|
|
@@ -133,6 +134,7 @@ import { makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./utils/st
|
|
|
133
134
|
import { ElementType } from "./utils/types/elementType.js";
|
|
134
135
|
import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./utils/types/equipmentType.js";
|
|
135
136
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./utils/types/equipmentTypes.js";
|
|
137
|
+
import { MODIFICATION_TYPES, ModificationType } from "./utils/types/modificationType.js";
|
|
136
138
|
import "./utils/yupConfig.js";
|
|
137
139
|
import { cardErrorBoundaryEn } from "./translations/en/cardErrorBoundaryEn.js";
|
|
138
140
|
import { commonButtonEn } from "./translations/en/commonButtonEn.js";
|
|
@@ -152,6 +154,7 @@ import { reportViewerEn } from "./translations/en/reportViewerEn.js";
|
|
|
152
154
|
import { tableEn } from "./translations/en/tableEn.js";
|
|
153
155
|
import { topBarEn } from "./translations/en/topBarEn.js";
|
|
154
156
|
import { treeviewFinderEn } from "./translations/en/treeviewFinderEn.js";
|
|
157
|
+
import { networkModificationsEn } from "./translations/en/networkModificationsEn.js";
|
|
155
158
|
import { exportParamsEn } from "./translations/en/external/exportParamsEn.js";
|
|
156
159
|
import { importParamsEn } from "./translations/en/external/importParamsEn.js";
|
|
157
160
|
import { cardErrorBoundaryFr } from "./translations/fr/cardErrorBoundaryFr.js";
|
|
@@ -172,6 +175,7 @@ import { reportViewerFr } from "./translations/fr/reportViewerFr.js";
|
|
|
172
175
|
import { tableFr } from "./translations/fr/tableFr.js";
|
|
173
176
|
import { topBarFr } from "./translations/fr/topBarFr.js";
|
|
174
177
|
import { treeviewFinderFr } from "./translations/fr/treeviewFinderFr.js";
|
|
178
|
+
import { networkModificationsFr } from "./translations/fr/networkModificationsFr.js";
|
|
175
179
|
import { exportParamsFr } from "./translations/fr/external/exportParamsFr.js";
|
|
176
180
|
import { importParamsFr } from "./translations/fr/external/importParamsFr.js";
|
|
177
181
|
import * as yup from "yup";
|
|
@@ -277,7 +281,9 @@ export {
|
|
|
277
281
|
Login,
|
|
278
282
|
LogoText,
|
|
279
283
|
Logout,
|
|
284
|
+
MODIFICATION_TYPES,
|
|
280
285
|
MidFormError,
|
|
286
|
+
ModificationType,
|
|
281
287
|
ModifyElementSelection,
|
|
282
288
|
MuiSelectInput,
|
|
283
289
|
MuiVirtualizedTable,
|
|
@@ -350,6 +356,7 @@ export {
|
|
|
350
356
|
backendFetchJson,
|
|
351
357
|
cardErrorBoundaryEn,
|
|
352
358
|
cardErrorBoundaryFr,
|
|
359
|
+
catchErrorHandler,
|
|
353
360
|
collectibleHelper,
|
|
354
361
|
commonButtonEn,
|
|
355
362
|
commonButtonFr,
|
|
@@ -434,6 +441,7 @@ export {
|
|
|
434
441
|
isFloatNumber,
|
|
435
442
|
isIntegerNumber,
|
|
436
443
|
isObjectEmpty,
|
|
444
|
+
isStudyMetadata,
|
|
437
445
|
keyGenerator,
|
|
438
446
|
kiloUnitToUnit,
|
|
439
447
|
login,
|
|
@@ -445,6 +453,8 @@ export {
|
|
|
445
453
|
microUnitToUnit,
|
|
446
454
|
multipleSelectionDialogEn,
|
|
447
455
|
multipleSelectionDialogFr,
|
|
456
|
+
networkModificationsEn,
|
|
457
|
+
networkModificationsFr,
|
|
448
458
|
noOpHelper,
|
|
449
459
|
queryValidator,
|
|
450
460
|
recursiveRemove,
|
|
@@ -486,6 +496,7 @@ export {
|
|
|
486
496
|
useElementSearch,
|
|
487
497
|
useIntlRef,
|
|
488
498
|
useLocalizedCountries,
|
|
499
|
+
useModificationLabelComputer,
|
|
489
500
|
usePredefinedProperties,
|
|
490
501
|
usePrevious,
|
|
491
502
|
useSnackMessage,
|
|
@@ -8,6 +8,7 @@ export type Env = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare function fetchEnv(): Promise<Env>;
|
|
10
10
|
export declare function fetchAppsMetadata(): Promise<Metadata[]>;
|
|
11
|
+
export declare const isStudyMetadata: (metadata: Metadata) => metadata is StudyMetadata;
|
|
11
12
|
export declare function fetchStudyMetadata(): Promise<StudyMetadata>;
|
|
12
13
|
export declare function fetchFavoriteAndDefaultCountries(): Promise<{
|
|
13
14
|
favoriteCountries: string[];
|
package/dist/services/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { backendFetch, backendFetchJson, getRequestParamFromList } from "./utils.js";
|
|
1
|
+
import { backendFetch, backendFetchJson, catchErrorHandler, getRequestParamFromList } from "./utils.js";
|
|
2
2
|
import { createFilter, fetchElementsInfos, saveFilter } from "./explore.js";
|
|
3
|
-
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata } from "./appsMetadata.js";
|
|
3
|
+
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata, isStudyMetadata } from "./appsMetadata.js";
|
|
4
4
|
import { fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./directory.js";
|
|
5
5
|
import { exportFilter } from "./study.js";
|
|
6
6
|
export {
|
|
7
7
|
backendFetch,
|
|
8
8
|
backendFetchJson,
|
|
9
|
+
catchErrorHandler,
|
|
9
10
|
createFilter,
|
|
10
11
|
exportFilter,
|
|
11
12
|
fetchAppsMetadata,
|
|
@@ -18,5 +19,6 @@ export {
|
|
|
18
19
|
fetchRootFolders,
|
|
19
20
|
fetchStudyMetadata,
|
|
20
21
|
getRequestParamFromList,
|
|
22
|
+
isStudyMetadata,
|
|
21
23
|
saveFilter
|
|
22
24
|
};
|
package/dist/services/utils.d.ts
CHANGED
|
@@ -7,3 +7,4 @@
|
|
|
7
7
|
export declare const backendFetch: (url: string, init: any, token?: string) => Promise<any>;
|
|
8
8
|
export declare const backendFetchJson: (url: string, init: any, token?: string) => Promise<any>;
|
|
9
9
|
export declare const getRequestParamFromList: (paramName: string, params?: string[]) => URLSearchParams;
|
|
10
|
+
export declare const catchErrorHandler: (error: unknown, callback: (message: string) => void) => void;
|
package/dist/services/utils.js
CHANGED
|
@@ -47,8 +47,16 @@ const backendFetchJson = (url, init, token) => {
|
|
|
47
47
|
const getRequestParamFromList = (paramName, params = []) => {
|
|
48
48
|
return new URLSearchParams(params.map((param) => [paramName, param]));
|
|
49
49
|
};
|
|
50
|
+
const catchErrorHandler = (error, callback) => {
|
|
51
|
+
if (error instanceof Object && "message" in error && typeof error.message === "string") {
|
|
52
|
+
callback(error.message);
|
|
53
|
+
} else {
|
|
54
|
+
callback("unknown error");
|
|
55
|
+
}
|
|
56
|
+
};
|
|
50
57
|
export {
|
|
51
58
|
backendFetch,
|
|
52
59
|
backendFetchJson,
|
|
60
|
+
catchErrorHandler,
|
|
53
61
|
getRequestParamFromList
|
|
54
62
|
};
|
|
@@ -22,5 +22,6 @@ export * from './reportViewerEn';
|
|
|
22
22
|
export * from './tableEn';
|
|
23
23
|
export * from './topBarEn';
|
|
24
24
|
export * from './treeviewFinderEn';
|
|
25
|
+
export * from './networkModificationsEn';
|
|
25
26
|
export * from './external/exportParamsEn';
|
|
26
27
|
export * from './external/importParamsEn';
|
|
@@ -16,6 +16,7 @@ import { reportViewerEn } from "./reportViewerEn.js";
|
|
|
16
16
|
import { tableEn } from "./tableEn.js";
|
|
17
17
|
import { topBarEn } from "./topBarEn.js";
|
|
18
18
|
import { treeviewFinderEn } from "./treeviewFinderEn.js";
|
|
19
|
+
import { networkModificationsEn } from "./networkModificationsEn.js";
|
|
19
20
|
import { exportParamsEn } from "./external/exportParamsEn.js";
|
|
20
21
|
import { importParamsEn } from "./external/importParamsEn.js";
|
|
21
22
|
export {
|
|
@@ -35,6 +36,7 @@ export {
|
|
|
35
36
|
inputsEn,
|
|
36
37
|
loginEn,
|
|
37
38
|
multipleSelectionDialogEn,
|
|
39
|
+
networkModificationsEn,
|
|
38
40
|
reportViewerEn,
|
|
39
41
|
tableEn,
|
|
40
42
|
topBarEn,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const networkModificationsEn: {
|
|
8
|
+
'network_modifications.modificationsCount': string;
|
|
9
|
+
'network_modifications.EQUIPMENT_DELETION': string;
|
|
10
|
+
'network_modifications.BY_FILTER_DELETION': string;
|
|
11
|
+
'network_modifications.SUBSTATION_CREATION': string;
|
|
12
|
+
'network_modifications.SUBSTATION_MODIFICATION': string;
|
|
13
|
+
'network_modifications.VOLTAGE_LEVEL_CREATION': string;
|
|
14
|
+
'network_modifications.VOLTAGE_LEVEL_MODIFICATION': string;
|
|
15
|
+
'network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL': string;
|
|
16
|
+
'network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL': string;
|
|
17
|
+
'network_modifications.LINES_ATTACH_TO_SPLIT_LINES': string;
|
|
18
|
+
'network_modifications.LOAD_SCALING': string;
|
|
19
|
+
'network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE': string;
|
|
20
|
+
'network_modifications.DELETE_ATTACHING_LINE': string;
|
|
21
|
+
'network_modifications.LOAD_CREATION': string;
|
|
22
|
+
'network_modifications.LOAD_MODIFICATION': string;
|
|
23
|
+
'network_modifications.BATTERY_CREATION': string;
|
|
24
|
+
'network_modifications.BATTERY_MODIFICATION': string;
|
|
25
|
+
'network_modifications.GENERATOR_CREATION': string;
|
|
26
|
+
'network_modifications.GENERATOR_MODIFICATION': string;
|
|
27
|
+
'network_modifications.LINE_CREATION': string;
|
|
28
|
+
'network_modifications.LINE_MODIFICATION': string;
|
|
29
|
+
'network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION': string;
|
|
30
|
+
'network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
|
|
31
|
+
'network_modifications.OPERATING_STATUS_MODIFICATION': string;
|
|
32
|
+
'network_modifications.SHUNT_COMPENSATOR_CREATION': string;
|
|
33
|
+
'network_modifications.SHUNT_COMPENSATOR_MODIFICATION': string;
|
|
34
|
+
'network_modifications.GENERATOR_SCALING': string;
|
|
35
|
+
'network_modifications.VSC_CREATION': string;
|
|
36
|
+
'network_modifications.VSC_MODIFICATION': string;
|
|
37
|
+
'network_modifications.GROOVY_SCRIPT': string;
|
|
38
|
+
'network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION': string;
|
|
39
|
+
'network_modifications.creatingModification': string;
|
|
40
|
+
'network_modifications.deletingModification': string;
|
|
41
|
+
'network_modifications.updatingModification': string;
|
|
42
|
+
'network_modifications.stashingModification': string;
|
|
43
|
+
'network_modifications.restoringModification': string;
|
|
44
|
+
'network_modifications.modifications': string;
|
|
45
|
+
'network_modifications.GENERATION_DISPATCH': string;
|
|
46
|
+
'network_modifications.VOLTAGE_INIT_MODIFICATION': string;
|
|
47
|
+
'network_modifications.TABULAR_MODIFICATION': string;
|
|
48
|
+
'network_modifications.tabular.GENERATOR_MODIFICATION': string;
|
|
49
|
+
'network_modifications.tabular.LOAD_MODIFICATION': string;
|
|
50
|
+
'network_modifications.BY_FORMULA_MODIFICATION': string;
|
|
51
|
+
'network_modifications.MODIFICATION_BY_ASSIGNMENT': string;
|
|
52
|
+
'network_modifications.tabular.LINE_MODIFICATION': string;
|
|
53
|
+
'network_modifications.tabular.BATTERY_MODIFICATION': string;
|
|
54
|
+
'network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION': string;
|
|
55
|
+
'network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
|
|
56
|
+
'network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION': string;
|
|
57
|
+
'network_modifications.tabular.SUBSTATION_MODIFICATION': string;
|
|
58
|
+
'network_modifications.TABULAR_CREATION': string;
|
|
59
|
+
'network_modifications.tabular.GENERATOR_CREATION': string;
|
|
60
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const networkModificationsEn = {
|
|
2
|
+
"network_modifications.modificationsCount": "{hide, select, false {{count, plural, =0 {no modification} =1 {{count} modification} other {{count} modifications}}} other {...}}",
|
|
3
|
+
"network_modifications.EQUIPMENT_DELETION": "Deletion of {computedLabel}",
|
|
4
|
+
"network_modifications.BY_FILTER_DELETION": "By filter deletion ({computedLabel})",
|
|
5
|
+
"network_modifications.SUBSTATION_CREATION": "Creating substation {computedLabel}",
|
|
6
|
+
"network_modifications.SUBSTATION_MODIFICATION": "Modifying substation {computedLabel}",
|
|
7
|
+
"network_modifications.VOLTAGE_LEVEL_CREATION": "Creating voltage level {computedLabel}",
|
|
8
|
+
"network_modifications.VOLTAGE_LEVEL_MODIFICATION": "Modifying voltage level {computedLabel}",
|
|
9
|
+
"network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL": "Splitting a line {computedLabel}",
|
|
10
|
+
"network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL": "Attaching line {computedLabel}",
|
|
11
|
+
"network_modifications.LINES_ATTACH_TO_SPLIT_LINES": "Attaching lines to splitting lines {computedLabel}",
|
|
12
|
+
"network_modifications.LOAD_SCALING": "Load scaling {computedLabel}",
|
|
13
|
+
"network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE": "Deleting a voltage level on a line {computedLabel}",
|
|
14
|
+
"network_modifications.DELETE_ATTACHING_LINE": "Deleting attaching line {computedLabel}",
|
|
15
|
+
"network_modifications.LOAD_CREATION": "Creating load {computedLabel}",
|
|
16
|
+
"network_modifications.LOAD_MODIFICATION": "Modifying load {computedLabel}",
|
|
17
|
+
"network_modifications.BATTERY_CREATION": "Creating battery {computedLabel}",
|
|
18
|
+
"network_modifications.BATTERY_MODIFICATION": "Modifying battery {computedLabel}",
|
|
19
|
+
"network_modifications.GENERATOR_CREATION": "Creating generator {computedLabel}",
|
|
20
|
+
"network_modifications.GENERATOR_MODIFICATION": "Modifying generator {computedLabel}",
|
|
21
|
+
"network_modifications.LINE_CREATION": "Creating line {computedLabel}",
|
|
22
|
+
"network_modifications.LINE_MODIFICATION": "Modifying line {computedLabel}",
|
|
23
|
+
"network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION": "Creating 2 windings transformer {computedLabel}",
|
|
24
|
+
"network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Modifying 2 windings transformer {computedLabel}",
|
|
25
|
+
"network_modifications.OPERATING_STATUS_MODIFICATION": "{action, select, TRIP {Trip {computedLabel}} LOCKOUT {Lock out {computedLabel}} ENERGISE_END_ONE {Energise {computedLabel} on {energizedEnd}} ENERGISE_END_TWO {Energise {computedLabel} on {energizedEnd}} SWITCH_ON {Switch on {computedLabel}} other {Equipment operating status modification {computedLabel}}}",
|
|
26
|
+
"network_modifications.SHUNT_COMPENSATOR_CREATION": "Creating shunt compensator {computedLabel}",
|
|
27
|
+
"network_modifications.SHUNT_COMPENSATOR_MODIFICATION": "Modifying shunt compensator {computedLabel}",
|
|
28
|
+
"network_modifications.GENERATOR_SCALING": "Generator scaling {computedLabel}",
|
|
29
|
+
"network_modifications.VSC_CREATION": "Creating HVDC (VSC) {computedLabel}",
|
|
30
|
+
"network_modifications.VSC_MODIFICATION": "Modifing HVDC (VSC) {computedLabel}",
|
|
31
|
+
"network_modifications.GROOVY_SCRIPT": "Modification by script",
|
|
32
|
+
"network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION": "{equipmentAttributeName, select, open {{equipmentAttributeValue, select, true {Open {computedLabel}} other {Close {computedLabel}}}} other {Equipment modification {computedLabel}}}",
|
|
33
|
+
"network_modifications.creatingModification": "Creating modification ...",
|
|
34
|
+
"network_modifications.deletingModification": "Deleting modification ...",
|
|
35
|
+
"network_modifications.updatingModification": "Updating modification ...",
|
|
36
|
+
"network_modifications.stashingModification": "Stashing modification ...",
|
|
37
|
+
"network_modifications.restoringModification": "Restoring modification ...",
|
|
38
|
+
"network_modifications.modifications": "Updating modification list ...",
|
|
39
|
+
"network_modifications.GENERATION_DISPATCH": "Generation dispatch {computedLabel}",
|
|
40
|
+
"network_modifications.VOLTAGE_INIT_MODIFICATION": "Voltage profile initialization {computedLabel}",
|
|
41
|
+
"network_modifications.TABULAR_MODIFICATION": "Tabular modification - {computedLabel}",
|
|
42
|
+
"network_modifications.tabular.GENERATOR_MODIFICATION": "generator modifications",
|
|
43
|
+
"network_modifications.tabular.LOAD_MODIFICATION": "load modifications",
|
|
44
|
+
"network_modifications.BY_FORMULA_MODIFICATION": "Modification by formula {computedLabel}",
|
|
45
|
+
"network_modifications.MODIFICATION_BY_ASSIGNMENT": "Modification by filter {computedLabel}",
|
|
46
|
+
"network_modifications.tabular.LINE_MODIFICATION": "line modifications",
|
|
47
|
+
"network_modifications.tabular.BATTERY_MODIFICATION": "battery modifications",
|
|
48
|
+
"network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "voltage level modifications",
|
|
49
|
+
"network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "two windings transformer modifications",
|
|
50
|
+
"network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "linear shunt compensator modifications",
|
|
51
|
+
"network_modifications.tabular.SUBSTATION_MODIFICATION": "substation modifications",
|
|
52
|
+
"network_modifications.TABULAR_CREATION": "Tabular creation - {computedLabel}",
|
|
53
|
+
"network_modifications.tabular.GENERATOR_CREATION": "generator creations"
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
networkModificationsEn
|
|
57
|
+
};
|
|
@@ -22,5 +22,6 @@ export * from './reportViewerFr';
|
|
|
22
22
|
export * from './tableFr';
|
|
23
23
|
export * from './topBarFr';
|
|
24
24
|
export * from './treeviewFinderFr';
|
|
25
|
+
export * from './networkModificationsFr';
|
|
25
26
|
export * from './external/exportParamsFr';
|
|
26
27
|
export * from './external/importParamsFr';
|
|
@@ -16,6 +16,7 @@ import { reportViewerFr } from "./reportViewerFr.js";
|
|
|
16
16
|
import { tableFr } from "./tableFr.js";
|
|
17
17
|
import { topBarFr } from "./topBarFr.js";
|
|
18
18
|
import { treeviewFinderFr } from "./treeviewFinderFr.js";
|
|
19
|
+
import { networkModificationsFr } from "./networkModificationsFr.js";
|
|
19
20
|
import { exportParamsFr } from "./external/exportParamsFr.js";
|
|
20
21
|
import { importParamsFr } from "./external/importParamsFr.js";
|
|
21
22
|
export {
|
|
@@ -35,6 +36,7 @@ export {
|
|
|
35
36
|
inputsFr,
|
|
36
37
|
loginFr,
|
|
37
38
|
multipleSelectionDialogFr,
|
|
39
|
+
networkModificationsFr,
|
|
38
40
|
reportViewerFr,
|
|
39
41
|
tableFr,
|
|
40
42
|
topBarFr,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const networkModificationsFr: {
|
|
8
|
+
'network_modifications.modificationsCount': string;
|
|
9
|
+
'network_modifications.EQUIPMENT_DELETION': string;
|
|
10
|
+
'network_modifications.BY_FILTER_DELETION': string;
|
|
11
|
+
'network_modifications.SUBSTATION_CREATION': string;
|
|
12
|
+
'network_modifications.SUBSTATION_MODIFICATION': string;
|
|
13
|
+
'network_modifications.VOLTAGE_LEVEL_CREATION': string;
|
|
14
|
+
'network_modifications.VOLTAGE_LEVEL_MODIFICATION': string;
|
|
15
|
+
'network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL': string;
|
|
16
|
+
'network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL': string;
|
|
17
|
+
'network_modifications.LINES_ATTACH_TO_SPLIT_LINES': string;
|
|
18
|
+
'network_modifications.LOAD_SCALING': string;
|
|
19
|
+
'network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE': string;
|
|
20
|
+
'network_modifications.DELETE_ATTACHING_LINE': string;
|
|
21
|
+
'network_modifications.LOAD_CREATION': string;
|
|
22
|
+
'network_modifications.LOAD_MODIFICATION': string;
|
|
23
|
+
'network_modifications.BATTERY_CREATION': string;
|
|
24
|
+
'network_modifications.BATTERY_MODIFICATION': string;
|
|
25
|
+
'network_modifications.GENERATOR_CREATION': string;
|
|
26
|
+
'network_modifications.GENERATOR_MODIFICATION': string;
|
|
27
|
+
'network_modifications.LINE_CREATION': string;
|
|
28
|
+
'network_modifications.LINE_MODIFICATION': string;
|
|
29
|
+
'network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION': string;
|
|
30
|
+
'network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
|
|
31
|
+
'network_modifications.OPERATING_STATUS_MODIFICATION': string;
|
|
32
|
+
'network_modifications.SHUNT_COMPENSATOR_CREATION': string;
|
|
33
|
+
'network_modifications.SHUNT_COMPENSATOR_MODIFICATION': string;
|
|
34
|
+
'network_modifications.GENERATOR_SCALING': string;
|
|
35
|
+
'network_modifications.VSC_CREATION': string;
|
|
36
|
+
'network_modifications.VSC_MODIFICATION': string;
|
|
37
|
+
'network_modifications.GROOVY_SCRIPT': string;
|
|
38
|
+
'network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION': string;
|
|
39
|
+
'network_modifications.creatingModification': string;
|
|
40
|
+
'network_modifications.deletingModification': string;
|
|
41
|
+
'network_modifications.updatingModification': string;
|
|
42
|
+
'network_modifications.stashingModification': string;
|
|
43
|
+
'network_modifications.restoringModification': string;
|
|
44
|
+
'network_modifications.modifications': string;
|
|
45
|
+
'network_modifications.GENERATION_DISPATCH': string;
|
|
46
|
+
'network_modifications.VOLTAGE_INIT_MODIFICATION': string;
|
|
47
|
+
'network_modifications.TABULAR_MODIFICATION': string;
|
|
48
|
+
'network_modifications.tabular.GENERATOR_MODIFICATION': string;
|
|
49
|
+
'network_modifications.tabular.LOAD_MODIFICATION': string;
|
|
50
|
+
'network_modifications.BY_FORMULA_MODIFICATION': string;
|
|
51
|
+
'network_modifications.MODIFICATION_BY_ASSIGNMENT': string;
|
|
52
|
+
'network_modifications.tabular.LINE_MODIFICATION': string;
|
|
53
|
+
'network_modifications.tabular.BATTERY_MODIFICATION': string;
|
|
54
|
+
'network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION': string;
|
|
55
|
+
'network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
|
|
56
|
+
'network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION': string;
|
|
57
|
+
'network_modifications.tabular.SUBSTATION_MODIFICATION': string;
|
|
58
|
+
'network_modifications.TABULAR_CREATION': string;
|
|
59
|
+
'network_modifications.tabular.GENERATOR_CREATION': string;
|
|
60
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const networkModificationsFr = {
|
|
2
|
+
"network_modifications.modificationsCount": "{hide, select, false {{count, plural, =0 {aucune modification} =1 {# modification} other {# modifications}}} other {...}}",
|
|
3
|
+
"network_modifications.EQUIPMENT_DELETION": "Suppression de {computedLabel}",
|
|
4
|
+
"network_modifications.BY_FILTER_DELETION": "Suppression par filtre ({computedLabel})",
|
|
5
|
+
"network_modifications.SUBSTATION_CREATION": "Création du site {computedLabel}",
|
|
6
|
+
"network_modifications.SUBSTATION_MODIFICATION": "Modification du site {computedLabel}",
|
|
7
|
+
"network_modifications.VOLTAGE_LEVEL_CREATION": "Création du poste {computedLabel}",
|
|
8
|
+
"network_modifications.VOLTAGE_LEVEL_MODIFICATION": "Modification du poste {computedLabel}",
|
|
9
|
+
"network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL": "Création d'une coupure {computedLabel}",
|
|
10
|
+
"network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL": "Création d'un piquage {computedLabel}",
|
|
11
|
+
"network_modifications.LINES_ATTACH_TO_SPLIT_LINES": "Passage de piquage en coupure {computedLabel}",
|
|
12
|
+
"network_modifications.LOAD_SCALING": "Variation plan de consommation {computedLabel}",
|
|
13
|
+
"network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE": "Suppression d'une coupure {computedLabel}",
|
|
14
|
+
"network_modifications.DELETE_ATTACHING_LINE": "Suppression d'un piquage {computedLabel}",
|
|
15
|
+
"network_modifications.LOAD_CREATION": "Création de la charge {computedLabel}",
|
|
16
|
+
"network_modifications.LOAD_MODIFICATION": "Modification de la charge {computedLabel}",
|
|
17
|
+
"network_modifications.BATTERY_CREATION": "Création de batterie {computedLabel}",
|
|
18
|
+
"network_modifications.BATTERY_MODIFICATION": "Modification de batterie {computedLabel}",
|
|
19
|
+
"network_modifications.GENERATOR_CREATION": "Création du générateur {computedLabel}",
|
|
20
|
+
"network_modifications.GENERATOR_MODIFICATION": "Modification du générateur {computedLabel}",
|
|
21
|
+
"network_modifications.LINE_CREATION": "Création de la ligne {computedLabel}",
|
|
22
|
+
"network_modifications.LINE_MODIFICATION": "Modification de la ligne {computedLabel}",
|
|
23
|
+
"network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION": "Création du transformateur à 2 enroulements {computedLabel}",
|
|
24
|
+
"network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Modification du transformateur à 2 enroulements {computedLabel}",
|
|
25
|
+
"network_modifications.OPERATING_STATUS_MODIFICATION": "{action, select, TRIP {Déclenchement de {computedLabel}} LOCKOUT {Consignation de {computedLabel}} ENERGISE_END_ONE {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} ENERGISE_END_TWO {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} SWITCH_ON {Mise en service de {computedLabel}} other {Modification du statut opérationnel de l'équipement {computedLabel}}}",
|
|
26
|
+
"network_modifications.SHUNT_COMPENSATOR_CREATION": "Création d'un moyen de compensation {computedLabel}",
|
|
27
|
+
"network_modifications.SHUNT_COMPENSATOR_MODIFICATION": "Modification d'un moyen de compensation {computedLabel}",
|
|
28
|
+
"network_modifications.GENERATOR_SCALING": "Variation plan de production {computedLabel}",
|
|
29
|
+
"network_modifications.VSC_CREATION": "Création de la HVDC (VSC) {computedLabel}",
|
|
30
|
+
"network_modifications.VSC_MODIFICATION": "Modification de la HVDC (VSC) {computedLabel}",
|
|
31
|
+
"network_modifications.GROOVY_SCRIPT": "Modification par script",
|
|
32
|
+
"network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION": "{equipmentAttributeName, select, open {{equipmentAttributeValue, select, true {Ouverture de {computedLabel}} other {Fermeture de {computedLabel}}}} other {Modification de l'equipement {computedLabel}}}",
|
|
33
|
+
"network_modifications.creatingModification": "Création de la modification en cours ...",
|
|
34
|
+
"network_modifications.deletingModification": "Suppression de la modification en cours ...",
|
|
35
|
+
"network_modifications.updatingModification": "Mise à jour de la modification en cours ...",
|
|
36
|
+
"network_modifications.stashingModification": "Mise en corbeille de la modification en cours ...",
|
|
37
|
+
"network_modifications.restoringModification": "Restauration de la modification en cours ...",
|
|
38
|
+
"network_modifications.modifications": "Mise à jour de la liste des modifications en cours ...",
|
|
39
|
+
"network_modifications.GENERATION_DISPATCH": "Démarrage de groupes {computedLabel}",
|
|
40
|
+
"network_modifications.VOLTAGE_INIT_MODIFICATION": "Initialisation du plan de tension {computedLabel}",
|
|
41
|
+
"network_modifications.TABULAR_MODIFICATION": "Modification tabulaire - {computedLabel}",
|
|
42
|
+
"network_modifications.tabular.GENERATOR_MODIFICATION": "modifications de générateurs",
|
|
43
|
+
"network_modifications.tabular.LOAD_MODIFICATION": "modifications de consommations",
|
|
44
|
+
"network_modifications.BY_FORMULA_MODIFICATION": "Modification par formule {computedLabel}",
|
|
45
|
+
"network_modifications.MODIFICATION_BY_ASSIGNMENT": "Modification par filtre {computedLabel}",
|
|
46
|
+
"network_modifications.tabular.LINE_MODIFICATION": "modifications de lignes",
|
|
47
|
+
"network_modifications.tabular.BATTERY_MODIFICATION": "modifications de batteries",
|
|
48
|
+
"network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "modifications de postes",
|
|
49
|
+
"network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "modifications de transformateurs à 2 enroulements",
|
|
50
|
+
"network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "modifications de MCS linéaires",
|
|
51
|
+
"network_modifications.tabular.SUBSTATION_MODIFICATION": "modifications de sites",
|
|
52
|
+
"network_modifications.TABULAR_CREATION": "Création tabulaire - {computedLabel}",
|
|
53
|
+
"network_modifications.tabular.GENERATOR_CREATION": "créations de générateurs"
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
networkModificationsFr
|
|
57
|
+
};
|
package/dist/utils/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./styles.j
|
|
|
10
10
|
import { ElementType } from "./types/elementType.js";
|
|
11
11
|
import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
|
|
12
12
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./types/equipmentTypes.js";
|
|
13
|
+
import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
|
|
13
14
|
import "./yupConfig.js";
|
|
14
15
|
import * as yup from "yup";
|
|
15
16
|
export {
|
|
@@ -32,6 +33,8 @@ export {
|
|
|
32
33
|
LIGHT_THEME,
|
|
33
34
|
Line,
|
|
34
35
|
Load,
|
|
36
|
+
MODIFICATION_TYPES,
|
|
37
|
+
ModificationType,
|
|
35
38
|
OperatingStatus,
|
|
36
39
|
SVC,
|
|
37
40
|
ShuntCompensator,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementType } from "./elementType.js";
|
|
2
2
|
import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
|
|
3
3
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./equipmentTypes.js";
|
|
4
|
+
import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
|
|
4
5
|
export {
|
|
5
6
|
Battery,
|
|
6
7
|
BusBar,
|
|
@@ -13,6 +14,8 @@ export {
|
|
|
13
14
|
LCC,
|
|
14
15
|
Line,
|
|
15
16
|
Load,
|
|
17
|
+
MODIFICATION_TYPES,
|
|
18
|
+
ModificationType,
|
|
16
19
|
OperatingStatus,
|
|
17
20
|
SVC,
|
|
18
21
|
ShuntCompensator,
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ModificationType {
|
|
8
|
+
GROOVY_SCRIPT = "GROOVY_SCRIPT",
|
|
9
|
+
LOAD_CREATION = "LOAD_CREATION",
|
|
10
|
+
LOAD_MODIFICATION = "LOAD_MODIFICATION",
|
|
11
|
+
BATTERY_CREATION = "BATTERY_CREATION",
|
|
12
|
+
BATTERY_MODIFICATION = "BATTERY_MODIFICATION",
|
|
13
|
+
GENERATOR_CREATION = "GENERATOR_CREATION",
|
|
14
|
+
GENERATOR_MODIFICATION = "GENERATOR_MODIFICATION",
|
|
15
|
+
LINE_CREATION = "LINE_CREATION",
|
|
16
|
+
LINE_MODIFICATION = "LINE_MODIFICATION",
|
|
17
|
+
SUBSTATION_CREATION = "SUBSTATION_CREATION",
|
|
18
|
+
SUBSTATION_MODIFICATION = "SUBSTATION_MODIFICATION",
|
|
19
|
+
VOLTAGE_LEVEL_CREATION = "VOLTAGE_LEVEL_CREATION",
|
|
20
|
+
VOLTAGE_LEVEL_MODIFICATION = "VOLTAGE_LEVEL_MODIFICATION",
|
|
21
|
+
SHUNT_COMPENSATOR_CREATION = "SHUNT_COMPENSATOR_CREATION",
|
|
22
|
+
SHUNT_COMPENSATOR_MODIFICATION = "SHUNT_COMPENSATOR_MODIFICATION",
|
|
23
|
+
STATIC_VAR_COMPENSATOR_CREATION = "STATIC_VAR_COMPENSATOR_CREATION",
|
|
24
|
+
TWO_WINDINGS_TRANSFORMER_CREATION = "TWO_WINDINGS_TRANSFORMER_CREATION",
|
|
25
|
+
TWO_WINDINGS_TRANSFORMER_MODIFICATION = "TWO_WINDINGS_TRANSFORMER_MODIFICATION",
|
|
26
|
+
VSC_CREATION = "VSC_CREATION",
|
|
27
|
+
EQUIPMENT_DELETION = "EQUIPMENT_DELETION",
|
|
28
|
+
BY_FILTER_DELETION = "BY_FILTER_DELETION",
|
|
29
|
+
LINE_SPLIT_WITH_VOLTAGE_LEVEL = "LINE_SPLIT_WITH_VOLTAGE_LEVEL",
|
|
30
|
+
LINE_ATTACH_TO_VOLTAGE_LEVEL = "LINE_ATTACH_TO_VOLTAGE_LEVEL",
|
|
31
|
+
LINES_ATTACH_TO_SPLIT_LINES = "LINES_ATTACH_TO_SPLIT_LINES",
|
|
32
|
+
OPERATING_STATUS_MODIFICATION = "OPERATING_STATUS_MODIFICATION",
|
|
33
|
+
EQUIPMENT_ATTRIBUTE_MODIFICATION = "EQUIPMENT_ATTRIBUTE_MODIFICATION",
|
|
34
|
+
LOAD_SCALING = "LOAD_SCALING",
|
|
35
|
+
DELETE_VOLTAGE_LEVEL_ON_LINE = "DELETE_VOLTAGE_LEVEL_ON_LINE",
|
|
36
|
+
DELETE_ATTACHING_LINE = "DELETE_ATTACHING_LINE",
|
|
37
|
+
GENERATOR_SCALING = "GENERATOR_SCALING",
|
|
38
|
+
GENERATION_DISPATCH = "GENERATION_DISPATCH",
|
|
39
|
+
VOLTAGE_INIT_MODIFICATION = "VOLTAGE_INIT_MODIFICATION",
|
|
40
|
+
CONVERTER_STATION_CREATION = "CONVERTER_STATION_CREATION",
|
|
41
|
+
TABULAR_MODIFICATION = "TABULAR_MODIFICATION",
|
|
42
|
+
BY_FORMULA_MODIFICATION = "BY_FORMULA_MODIFICATION",
|
|
43
|
+
MODIFICATION_BY_ASSIGNMENT = "MODIFICATION_BY_ASSIGNMENT",
|
|
44
|
+
TABULAR_CREATION = "TABULAR_CREATION",
|
|
45
|
+
VSC_MODIFICATION = "VSC_MODIFICATION",
|
|
46
|
+
CONVERTER_STATION_MODIFICATION = "CONVERTER_STATION_MODIFICATION",
|
|
47
|
+
COMPOSITE_MODIFICATION = "COMPOSITE_MODIFICATION"
|
|
48
|
+
}
|
|
49
|
+
export declare const MODIFICATION_TYPES: {
|
|
50
|
+
GROOVY_SCRIPT: {
|
|
51
|
+
type: ModificationType;
|
|
52
|
+
};
|
|
53
|
+
LOAD_CREATION: {
|
|
54
|
+
type: ModificationType;
|
|
55
|
+
};
|
|
56
|
+
LOAD_MODIFICATION: {
|
|
57
|
+
type: ModificationType;
|
|
58
|
+
};
|
|
59
|
+
BATTERY_CREATION: {
|
|
60
|
+
type: ModificationType;
|
|
61
|
+
};
|
|
62
|
+
BATTERY_MODIFICATION: {
|
|
63
|
+
type: ModificationType;
|
|
64
|
+
};
|
|
65
|
+
GENERATOR_CREATION: {
|
|
66
|
+
type: ModificationType;
|
|
67
|
+
};
|
|
68
|
+
GENERATOR_MODIFICATION: {
|
|
69
|
+
type: ModificationType;
|
|
70
|
+
};
|
|
71
|
+
LINE_CREATION: {
|
|
72
|
+
type: ModificationType;
|
|
73
|
+
};
|
|
74
|
+
LINE_MODIFICATION: {
|
|
75
|
+
type: ModificationType;
|
|
76
|
+
};
|
|
77
|
+
SUBSTATION_CREATION: {
|
|
78
|
+
type: ModificationType;
|
|
79
|
+
};
|
|
80
|
+
SUBSTATION_MODIFICATION: {
|
|
81
|
+
type: ModificationType;
|
|
82
|
+
};
|
|
83
|
+
VOLTAGE_LEVEL_CREATION: {
|
|
84
|
+
type: ModificationType;
|
|
85
|
+
};
|
|
86
|
+
VOLTAGE_LEVEL_MODIFICATION: {
|
|
87
|
+
type: ModificationType;
|
|
88
|
+
};
|
|
89
|
+
SHUNT_COMPENSATOR_CREATION: {
|
|
90
|
+
type: ModificationType;
|
|
91
|
+
};
|
|
92
|
+
SHUNT_COMPENSATOR_MODIFICATION: {
|
|
93
|
+
type: ModificationType;
|
|
94
|
+
};
|
|
95
|
+
STATIC_VAR_COMPENSATOR_CREATION: {
|
|
96
|
+
type: ModificationType;
|
|
97
|
+
};
|
|
98
|
+
TWO_WINDINGS_TRANSFORMER_CREATION: {
|
|
99
|
+
type: ModificationType;
|
|
100
|
+
};
|
|
101
|
+
TWO_WINDINGS_TRANSFORMER_MODIFICATION: {
|
|
102
|
+
type: ModificationType;
|
|
103
|
+
};
|
|
104
|
+
VSC_CREATION: {
|
|
105
|
+
type: ModificationType;
|
|
106
|
+
};
|
|
107
|
+
EQUIPMENT_DELETION: {
|
|
108
|
+
type: ModificationType;
|
|
109
|
+
};
|
|
110
|
+
BY_FILTER_DELETION: {
|
|
111
|
+
type: ModificationType;
|
|
112
|
+
};
|
|
113
|
+
LINE_SPLIT_WITH_VOLTAGE_LEVEL: {
|
|
114
|
+
type: ModificationType;
|
|
115
|
+
};
|
|
116
|
+
LINE_ATTACH_TO_VOLTAGE_LEVEL: {
|
|
117
|
+
type: ModificationType;
|
|
118
|
+
};
|
|
119
|
+
LINES_ATTACH_TO_SPLIT_LINES: {
|
|
120
|
+
type: ModificationType;
|
|
121
|
+
};
|
|
122
|
+
OPERATING_STATUS_MODIFICATION: {
|
|
123
|
+
type: ModificationType;
|
|
124
|
+
};
|
|
125
|
+
EQUIPMENT_ATTRIBUTE_MODIFICATION: {
|
|
126
|
+
type: ModificationType;
|
|
127
|
+
};
|
|
128
|
+
LOAD_SCALING: {
|
|
129
|
+
type: ModificationType;
|
|
130
|
+
};
|
|
131
|
+
DELETE_VOLTAGE_LEVEL_ON_LINE: {
|
|
132
|
+
type: ModificationType;
|
|
133
|
+
};
|
|
134
|
+
DELETE_ATTACHING_LINE: {
|
|
135
|
+
type: ModificationType;
|
|
136
|
+
};
|
|
137
|
+
GENERATOR_SCALING: {
|
|
138
|
+
type: ModificationType;
|
|
139
|
+
};
|
|
140
|
+
GENERATION_DISPATCH: {
|
|
141
|
+
type: ModificationType;
|
|
142
|
+
};
|
|
143
|
+
VOLTAGE_INIT_MODIFICATION: {
|
|
144
|
+
type: ModificationType;
|
|
145
|
+
};
|
|
146
|
+
CONVERTER_STATION_CREATION: {
|
|
147
|
+
type: ModificationType;
|
|
148
|
+
};
|
|
149
|
+
TABULAR_MODIFICATION: {
|
|
150
|
+
type: ModificationType;
|
|
151
|
+
};
|
|
152
|
+
BY_FORMULA_MODIFICATION: {
|
|
153
|
+
type: ModificationType;
|
|
154
|
+
};
|
|
155
|
+
MODIFICATION_BY_ASSIGNMENT: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
TABULAR_CREATION: {
|
|
159
|
+
type: ModificationType;
|
|
160
|
+
};
|
|
161
|
+
VSC_MODIFICATION: {
|
|
162
|
+
type: ModificationType;
|
|
163
|
+
};
|
|
164
|
+
CONVERTER_STATION_MODIFICATION: {
|
|
165
|
+
type: ModificationType;
|
|
166
|
+
};
|
|
167
|
+
COMPOSITE_MODIFICATION: {
|
|
168
|
+
type: ModificationType;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
var ModificationType = /* @__PURE__ */ ((ModificationType2) => {
|
|
2
|
+
ModificationType2["GROOVY_SCRIPT"] = "GROOVY_SCRIPT";
|
|
3
|
+
ModificationType2["LOAD_CREATION"] = "LOAD_CREATION";
|
|
4
|
+
ModificationType2["LOAD_MODIFICATION"] = "LOAD_MODIFICATION";
|
|
5
|
+
ModificationType2["BATTERY_CREATION"] = "BATTERY_CREATION";
|
|
6
|
+
ModificationType2["BATTERY_MODIFICATION"] = "BATTERY_MODIFICATION";
|
|
7
|
+
ModificationType2["GENERATOR_CREATION"] = "GENERATOR_CREATION";
|
|
8
|
+
ModificationType2["GENERATOR_MODIFICATION"] = "GENERATOR_MODIFICATION";
|
|
9
|
+
ModificationType2["LINE_CREATION"] = "LINE_CREATION";
|
|
10
|
+
ModificationType2["LINE_MODIFICATION"] = "LINE_MODIFICATION";
|
|
11
|
+
ModificationType2["SUBSTATION_CREATION"] = "SUBSTATION_CREATION";
|
|
12
|
+
ModificationType2["SUBSTATION_MODIFICATION"] = "SUBSTATION_MODIFICATION";
|
|
13
|
+
ModificationType2["VOLTAGE_LEVEL_CREATION"] = "VOLTAGE_LEVEL_CREATION";
|
|
14
|
+
ModificationType2["VOLTAGE_LEVEL_MODIFICATION"] = "VOLTAGE_LEVEL_MODIFICATION";
|
|
15
|
+
ModificationType2["SHUNT_COMPENSATOR_CREATION"] = "SHUNT_COMPENSATOR_CREATION";
|
|
16
|
+
ModificationType2["SHUNT_COMPENSATOR_MODIFICATION"] = "SHUNT_COMPENSATOR_MODIFICATION";
|
|
17
|
+
ModificationType2["STATIC_VAR_COMPENSATOR_CREATION"] = "STATIC_VAR_COMPENSATOR_CREATION";
|
|
18
|
+
ModificationType2["TWO_WINDINGS_TRANSFORMER_CREATION"] = "TWO_WINDINGS_TRANSFORMER_CREATION";
|
|
19
|
+
ModificationType2["TWO_WINDINGS_TRANSFORMER_MODIFICATION"] = "TWO_WINDINGS_TRANSFORMER_MODIFICATION";
|
|
20
|
+
ModificationType2["VSC_CREATION"] = "VSC_CREATION";
|
|
21
|
+
ModificationType2["EQUIPMENT_DELETION"] = "EQUIPMENT_DELETION";
|
|
22
|
+
ModificationType2["BY_FILTER_DELETION"] = "BY_FILTER_DELETION";
|
|
23
|
+
ModificationType2["LINE_SPLIT_WITH_VOLTAGE_LEVEL"] = "LINE_SPLIT_WITH_VOLTAGE_LEVEL";
|
|
24
|
+
ModificationType2["LINE_ATTACH_TO_VOLTAGE_LEVEL"] = "LINE_ATTACH_TO_VOLTAGE_LEVEL";
|
|
25
|
+
ModificationType2["LINES_ATTACH_TO_SPLIT_LINES"] = "LINES_ATTACH_TO_SPLIT_LINES";
|
|
26
|
+
ModificationType2["OPERATING_STATUS_MODIFICATION"] = "OPERATING_STATUS_MODIFICATION";
|
|
27
|
+
ModificationType2["EQUIPMENT_ATTRIBUTE_MODIFICATION"] = "EQUIPMENT_ATTRIBUTE_MODIFICATION";
|
|
28
|
+
ModificationType2["LOAD_SCALING"] = "LOAD_SCALING";
|
|
29
|
+
ModificationType2["DELETE_VOLTAGE_LEVEL_ON_LINE"] = "DELETE_VOLTAGE_LEVEL_ON_LINE";
|
|
30
|
+
ModificationType2["DELETE_ATTACHING_LINE"] = "DELETE_ATTACHING_LINE";
|
|
31
|
+
ModificationType2["GENERATOR_SCALING"] = "GENERATOR_SCALING";
|
|
32
|
+
ModificationType2["GENERATION_DISPATCH"] = "GENERATION_DISPATCH";
|
|
33
|
+
ModificationType2["VOLTAGE_INIT_MODIFICATION"] = "VOLTAGE_INIT_MODIFICATION";
|
|
34
|
+
ModificationType2["CONVERTER_STATION_CREATION"] = "CONVERTER_STATION_CREATION";
|
|
35
|
+
ModificationType2["TABULAR_MODIFICATION"] = "TABULAR_MODIFICATION";
|
|
36
|
+
ModificationType2["BY_FORMULA_MODIFICATION"] = "BY_FORMULA_MODIFICATION";
|
|
37
|
+
ModificationType2["MODIFICATION_BY_ASSIGNMENT"] = "MODIFICATION_BY_ASSIGNMENT";
|
|
38
|
+
ModificationType2["TABULAR_CREATION"] = "TABULAR_CREATION";
|
|
39
|
+
ModificationType2["VSC_MODIFICATION"] = "VSC_MODIFICATION";
|
|
40
|
+
ModificationType2["CONVERTER_STATION_MODIFICATION"] = "CONVERTER_STATION_MODIFICATION";
|
|
41
|
+
ModificationType2["COMPOSITE_MODIFICATION"] = "COMPOSITE_MODIFICATION";
|
|
42
|
+
return ModificationType2;
|
|
43
|
+
})(ModificationType || {});
|
|
44
|
+
const MODIFICATION_TYPES = {
|
|
45
|
+
GROOVY_SCRIPT: {
|
|
46
|
+
type: "GROOVY_SCRIPT"
|
|
47
|
+
/* GROOVY_SCRIPT */
|
|
48
|
+
},
|
|
49
|
+
LOAD_CREATION: {
|
|
50
|
+
type: "LOAD_CREATION"
|
|
51
|
+
/* LOAD_CREATION */
|
|
52
|
+
},
|
|
53
|
+
LOAD_MODIFICATION: {
|
|
54
|
+
type: "LOAD_MODIFICATION"
|
|
55
|
+
/* LOAD_MODIFICATION */
|
|
56
|
+
},
|
|
57
|
+
BATTERY_CREATION: {
|
|
58
|
+
type: "BATTERY_CREATION"
|
|
59
|
+
/* BATTERY_CREATION */
|
|
60
|
+
},
|
|
61
|
+
BATTERY_MODIFICATION: {
|
|
62
|
+
type: "BATTERY_MODIFICATION"
|
|
63
|
+
/* BATTERY_MODIFICATION */
|
|
64
|
+
},
|
|
65
|
+
GENERATOR_CREATION: {
|
|
66
|
+
type: "GENERATOR_CREATION"
|
|
67
|
+
/* GENERATOR_CREATION */
|
|
68
|
+
},
|
|
69
|
+
GENERATOR_MODIFICATION: {
|
|
70
|
+
type: "GENERATOR_MODIFICATION"
|
|
71
|
+
/* GENERATOR_MODIFICATION */
|
|
72
|
+
},
|
|
73
|
+
LINE_CREATION: {
|
|
74
|
+
type: "LINE_CREATION"
|
|
75
|
+
/* LINE_CREATION */
|
|
76
|
+
},
|
|
77
|
+
LINE_MODIFICATION: {
|
|
78
|
+
type: "LINE_MODIFICATION"
|
|
79
|
+
/* LINE_MODIFICATION */
|
|
80
|
+
},
|
|
81
|
+
SUBSTATION_CREATION: {
|
|
82
|
+
type: "SUBSTATION_CREATION"
|
|
83
|
+
/* SUBSTATION_CREATION */
|
|
84
|
+
},
|
|
85
|
+
SUBSTATION_MODIFICATION: {
|
|
86
|
+
type: "SUBSTATION_MODIFICATION"
|
|
87
|
+
/* SUBSTATION_MODIFICATION */
|
|
88
|
+
},
|
|
89
|
+
VOLTAGE_LEVEL_CREATION: {
|
|
90
|
+
type: "VOLTAGE_LEVEL_CREATION"
|
|
91
|
+
/* VOLTAGE_LEVEL_CREATION */
|
|
92
|
+
},
|
|
93
|
+
VOLTAGE_LEVEL_MODIFICATION: {
|
|
94
|
+
type: "VOLTAGE_LEVEL_MODIFICATION"
|
|
95
|
+
/* VOLTAGE_LEVEL_MODIFICATION */
|
|
96
|
+
},
|
|
97
|
+
SHUNT_COMPENSATOR_CREATION: {
|
|
98
|
+
type: "SHUNT_COMPENSATOR_CREATION"
|
|
99
|
+
/* SHUNT_COMPENSATOR_CREATION */
|
|
100
|
+
},
|
|
101
|
+
SHUNT_COMPENSATOR_MODIFICATION: {
|
|
102
|
+
type: "SHUNT_COMPENSATOR_MODIFICATION"
|
|
103
|
+
/* SHUNT_COMPENSATOR_MODIFICATION */
|
|
104
|
+
},
|
|
105
|
+
STATIC_VAR_COMPENSATOR_CREATION: {
|
|
106
|
+
type: "STATIC_VAR_COMPENSATOR_CREATION"
|
|
107
|
+
/* STATIC_VAR_COMPENSATOR_CREATION */
|
|
108
|
+
},
|
|
109
|
+
TWO_WINDINGS_TRANSFORMER_CREATION: {
|
|
110
|
+
type: "TWO_WINDINGS_TRANSFORMER_CREATION"
|
|
111
|
+
/* TWO_WINDINGS_TRANSFORMER_CREATION */
|
|
112
|
+
},
|
|
113
|
+
TWO_WINDINGS_TRANSFORMER_MODIFICATION: {
|
|
114
|
+
type: "TWO_WINDINGS_TRANSFORMER_MODIFICATION"
|
|
115
|
+
/* TWO_WINDINGS_TRANSFORMER_MODIFICATION */
|
|
116
|
+
},
|
|
117
|
+
VSC_CREATION: {
|
|
118
|
+
type: "VSC_CREATION"
|
|
119
|
+
/* VSC_CREATION */
|
|
120
|
+
},
|
|
121
|
+
EQUIPMENT_DELETION: {
|
|
122
|
+
type: "EQUIPMENT_DELETION"
|
|
123
|
+
/* EQUIPMENT_DELETION */
|
|
124
|
+
},
|
|
125
|
+
BY_FILTER_DELETION: {
|
|
126
|
+
type: "BY_FILTER_DELETION"
|
|
127
|
+
/* BY_FILTER_DELETION */
|
|
128
|
+
},
|
|
129
|
+
LINE_SPLIT_WITH_VOLTAGE_LEVEL: {
|
|
130
|
+
type: "LINE_SPLIT_WITH_VOLTAGE_LEVEL"
|
|
131
|
+
/* LINE_SPLIT_WITH_VOLTAGE_LEVEL */
|
|
132
|
+
},
|
|
133
|
+
LINE_ATTACH_TO_VOLTAGE_LEVEL: {
|
|
134
|
+
type: "LINE_ATTACH_TO_VOLTAGE_LEVEL"
|
|
135
|
+
/* LINE_ATTACH_TO_VOLTAGE_LEVEL */
|
|
136
|
+
},
|
|
137
|
+
LINES_ATTACH_TO_SPLIT_LINES: {
|
|
138
|
+
type: "LINES_ATTACH_TO_SPLIT_LINES"
|
|
139
|
+
/* LINES_ATTACH_TO_SPLIT_LINES */
|
|
140
|
+
},
|
|
141
|
+
OPERATING_STATUS_MODIFICATION: {
|
|
142
|
+
type: "OPERATING_STATUS_MODIFICATION"
|
|
143
|
+
/* OPERATING_STATUS_MODIFICATION */
|
|
144
|
+
},
|
|
145
|
+
EQUIPMENT_ATTRIBUTE_MODIFICATION: {
|
|
146
|
+
type: "EQUIPMENT_ATTRIBUTE_MODIFICATION"
|
|
147
|
+
/* EQUIPMENT_ATTRIBUTE_MODIFICATION */
|
|
148
|
+
},
|
|
149
|
+
LOAD_SCALING: {
|
|
150
|
+
type: "LOAD_SCALING"
|
|
151
|
+
/* LOAD_SCALING */
|
|
152
|
+
},
|
|
153
|
+
DELETE_VOLTAGE_LEVEL_ON_LINE: {
|
|
154
|
+
type: "DELETE_VOLTAGE_LEVEL_ON_LINE"
|
|
155
|
+
/* DELETE_VOLTAGE_LEVEL_ON_LINE */
|
|
156
|
+
},
|
|
157
|
+
DELETE_ATTACHING_LINE: {
|
|
158
|
+
type: "DELETE_ATTACHING_LINE"
|
|
159
|
+
/* DELETE_ATTACHING_LINE */
|
|
160
|
+
},
|
|
161
|
+
GENERATOR_SCALING: {
|
|
162
|
+
type: "GENERATOR_SCALING"
|
|
163
|
+
/* GENERATOR_SCALING */
|
|
164
|
+
},
|
|
165
|
+
GENERATION_DISPATCH: {
|
|
166
|
+
type: "GENERATION_DISPATCH"
|
|
167
|
+
/* GENERATION_DISPATCH */
|
|
168
|
+
},
|
|
169
|
+
VOLTAGE_INIT_MODIFICATION: {
|
|
170
|
+
type: "VOLTAGE_INIT_MODIFICATION"
|
|
171
|
+
/* VOLTAGE_INIT_MODIFICATION */
|
|
172
|
+
},
|
|
173
|
+
CONVERTER_STATION_CREATION: {
|
|
174
|
+
type: "CONVERTER_STATION_CREATION"
|
|
175
|
+
/* CONVERTER_STATION_CREATION */
|
|
176
|
+
},
|
|
177
|
+
TABULAR_MODIFICATION: {
|
|
178
|
+
type: "TABULAR_MODIFICATION"
|
|
179
|
+
/* TABULAR_MODIFICATION */
|
|
180
|
+
},
|
|
181
|
+
BY_FORMULA_MODIFICATION: {
|
|
182
|
+
type: "BY_FORMULA_MODIFICATION"
|
|
183
|
+
/* BY_FORMULA_MODIFICATION */
|
|
184
|
+
},
|
|
185
|
+
MODIFICATION_BY_ASSIGNMENT: {
|
|
186
|
+
type: "MODIFICATION_BY_ASSIGNMENT"
|
|
187
|
+
},
|
|
188
|
+
TABULAR_CREATION: {
|
|
189
|
+
type: "TABULAR_CREATION"
|
|
190
|
+
/* TABULAR_CREATION */
|
|
191
|
+
},
|
|
192
|
+
VSC_MODIFICATION: {
|
|
193
|
+
type: "VSC_MODIFICATION"
|
|
194
|
+
/* VSC_MODIFICATION */
|
|
195
|
+
},
|
|
196
|
+
CONVERTER_STATION_MODIFICATION: {
|
|
197
|
+
type: "CONVERTER_STATION_MODIFICATION"
|
|
198
|
+
/* CONVERTER_STATION_MODIFICATION */
|
|
199
|
+
},
|
|
200
|
+
COMPOSITE_MODIFICATION: {
|
|
201
|
+
type: "COMPOSITE_MODIFICATION"
|
|
202
|
+
/* COMPOSITE_MODIFICATION */
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
export {
|
|
206
|
+
MODIFICATION_TYPES,
|
|
207
|
+
ModificationType
|
|
208
|
+
};
|
|
@@ -11,10 +11,12 @@ export type ElementAttributes = {
|
|
|
11
11
|
isPrivate: boolean;
|
|
12
12
|
};
|
|
13
13
|
owner: string;
|
|
14
|
+
ownerLabel?: string;
|
|
14
15
|
subdirectoriesCount: number;
|
|
15
16
|
creationDate: string;
|
|
16
17
|
lastModificationDate: string;
|
|
17
18
|
lastModifiedBy: string;
|
|
19
|
+
lastModifiedByLabel?: string;
|
|
18
20
|
children: any[];
|
|
19
21
|
parentUuid: null | UUID;
|
|
20
22
|
specificMetadata: Record<string, object>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.1",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"engines": {
|
|
6
6
|
"npm": ">=9",
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
"uuid": "^9.0.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@mui/system": "^5.15.15",
|
|
50
|
-
"@mui/x-tree-view": "^6.17.0",
|
|
51
|
-
"papaparse": "^5.4.1",
|
|
52
49
|
"@emotion/react": "^11.11.4",
|
|
53
50
|
"@emotion/styled": "^11.11.0",
|
|
54
51
|
"@hookform/resolvers": "^3.3.4",
|
|
55
52
|
"@mui/icons-material": "^5.15.14",
|
|
56
53
|
"@mui/lab": "5.0.0-alpha.169",
|
|
57
54
|
"@mui/material": "^5.15.14",
|
|
55
|
+
"@mui/system": "^5.15.15",
|
|
56
|
+
"@mui/x-tree-view": "^6.17.0",
|
|
58
57
|
"ag-grid-community": "^31.0.0",
|
|
59
58
|
"ag-grid-react": "^31.2.0",
|
|
60
59
|
"notistack": "^3.0.1",
|
|
60
|
+
"papaparse": "^5.4.1",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
63
|
"react-hook-form": "^7.51.2",
|
|
@@ -80,10 +80,13 @@
|
|
|
80
80
|
"@mui/lab": "5.0.0-alpha.169",
|
|
81
81
|
"@mui/material": "^5.15.14",
|
|
82
82
|
"@react-hook/window-size": "^3.1.1",
|
|
83
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
83
84
|
"@testing-library/react": "^16.0.0",
|
|
85
|
+
"@testing-library/user-event": "^14.5.2",
|
|
84
86
|
"@types/autosuggest-highlight": "^3.2.3",
|
|
85
87
|
"@types/eslint": "^8.56.7",
|
|
86
88
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
89
|
+
"@types/jest": "^29.5.13",
|
|
87
90
|
"@types/json-logic-js": "^2.0.7",
|
|
88
91
|
"@types/license-checker": "^25.0.6",
|
|
89
92
|
"@types/localized-countries": "^2.0.3",
|
|
@@ -119,6 +122,7 @@
|
|
|
119
122
|
"glob": "^10.3.12",
|
|
120
123
|
"identity-obj-proxy": "^3.0.0",
|
|
121
124
|
"jest": "^29.7.0",
|
|
125
|
+
"jest-dom": "^4.0.0",
|
|
122
126
|
"jest-environment-jsdom": "^29.7.0",
|
|
123
127
|
"license-checker": "^25.0.1",
|
|
124
128
|
"notistack": "^3.0.1",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2022, RTE (http://www.rte-france.com)
|
|
3
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
|
-
export {};
|