@gridsuite/commons-ui 0.80.0 → 0.82.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.
Files changed (54) hide show
  1. package/dist/assets/ExpertFilterForm.css +8 -1
  2. package/dist/components/authentication/AuthenticationRouterErrorDisplay.js +1 -0
  3. package/dist/components/authentication/utils/authService.d.ts +6 -1
  4. package/dist/components/authentication/utils/userManagerMock.d.ts +18 -17
  5. package/dist/components/authentication/utils/userManagerMock.js +80 -92
  6. package/dist/components/cardErrorBoundary/CardErrorBoundary.d.ts +6 -9
  7. package/dist/components/cardErrorBoundary/CardErrorBoundary.js +1 -3
  8. package/dist/components/filter/expert/expertFilterConstants.js +2 -2
  9. package/dist/components/flatParameters/FlatParameters.js +13 -14
  10. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +1 -1
  11. package/dist/components/inputs/reactHookForm/agGridTable/cellEditors/numericEditor.d.ts +6 -7
  12. package/dist/components/inputs/reactHookForm/agGridTable/cellEditors/numericEditor.js +7 -13
  13. package/dist/components/inputs/reactHookForm/selectInputs/MuiSelectInput.d.ts +1 -1
  14. package/dist/components/inputs/reactHookForm/selectInputs/MuiSelectInput.js +7 -1
  15. package/dist/components/inputs/reactQueryBuilder/CombinatorSelector.js +4 -2
  16. package/dist/components/inputs/reactQueryBuilder/FieldSelector.js +3 -1
  17. package/dist/components/inputs/reactQueryBuilder/PropertyValueEditor.js +18 -6
  18. package/dist/components/inputs/reactQueryBuilder/TextValueEditor.js +14 -2
  19. package/dist/components/inputs/reactQueryBuilder/ValueSelector.js +3 -1
  20. package/dist/components/topBar/MessageBanner.d.ts +7 -0
  21. package/dist/components/topBar/MessageBanner.js +55 -0
  22. package/dist/components/topBar/TopBar.d.ts +3 -2
  23. package/dist/components/topBar/TopBar.js +325 -312
  24. package/dist/components/topBar/UserSettingsDialog.d.ts +8 -0
  25. package/dist/components/topBar/UserSettingsDialog.js +48 -0
  26. package/dist/hooks/index.d.ts +1 -0
  27. package/dist/hooks/index.js +2 -0
  28. package/dist/hooks/useCustomFilterOptions.d.ts +6 -0
  29. package/dist/hooks/useCustomFilterOptions.js +20 -0
  30. package/dist/hooks/useSelectAppearance.d.ts +29 -0
  31. package/dist/hooks/useSelectAppearance.js +22 -0
  32. package/dist/index.js +4 -1
  33. package/dist/module-localized-countries.d.js +1 -0
  34. package/dist/translations/en/filterEn.d.ts +2 -2
  35. package/dist/translations/en/filterEn.js +5 -5
  36. package/dist/translations/en/filterExpertEn.d.ts +1 -0
  37. package/dist/translations/en/filterExpertEn.js +3 -2
  38. package/dist/translations/en/topBarEn.d.ts +7 -2
  39. package/dist/translations/en/topBarEn.js +8 -3
  40. package/dist/translations/fr/filterExpertFr.d.ts +1 -0
  41. package/dist/translations/fr/filterExpertFr.js +3 -2
  42. package/dist/translations/fr/filterFr.d.ts +2 -2
  43. package/dist/translations/fr/filterFr.js +5 -5
  44. package/dist/translations/fr/topBarFr.d.ts +6 -1
  45. package/dist/translations/fr/topBarFr.js +7 -2
  46. package/dist/utils/index.js +2 -1
  47. package/dist/utils/mapper/getFileIcon.js +0 -1
  48. package/dist/utils/types/elementType.d.ts +0 -1
  49. package/dist/utils/types/elementType.js +0 -1
  50. package/dist/utils/types/equipmentType.d.ts +4 -0
  51. package/dist/utils/types/equipmentType.js +6 -0
  52. package/dist/utils/types/index.js +2 -1
  53. package/dist/utils/types/metadata.d.ts +0 -2
  54. package/package.json +1 -2
@@ -0,0 +1,8 @@
1
+ interface UserSettingsDialogProps {
2
+ openDialog: boolean;
3
+ onClose: () => void;
4
+ developerMode: boolean;
5
+ onDeveloperModeClick?: (value: boolean) => void;
6
+ }
7
+ declare function UserSettingsDialog({ openDialog, onClose, developerMode, onDeveloperModeClick }: UserSettingsDialogProps): import("react/jsx-runtime").JSX.Element;
8
+ export default UserSettingsDialog;
@@ -0,0 +1,48 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { FormattedMessage } from "react-intl";
3
+ import { Dialog, DialogTitle, DialogContent, Box, Switch, Alert, DialogActions, Button } from "@mui/material";
4
+ const styles = {
5
+ parameterName: (theme) => ({
6
+ fontWeight: "bold",
7
+ marginTop: theme.spacing(1),
8
+ flexGrow: 1
9
+ }),
10
+ parameterLine: {
11
+ display: "flex"
12
+ }
13
+ };
14
+ function UserSettingsDialog({ openDialog, onClose, developerMode, onDeveloperModeClick }) {
15
+ const handleDeveloperModeClick = (value) => {
16
+ if (onDeveloperModeClick) {
17
+ onDeveloperModeClick(value);
18
+ }
19
+ };
20
+ const handleClose = (_, reason) => {
21
+ if (reason === "backdropClick") {
22
+ return;
23
+ }
24
+ onClose();
25
+ };
26
+ return /* @__PURE__ */ jsxs(Dialog, { fullWidth: true, open: openDialog, onClose: handleClose, children: [
27
+ /* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-settings-dialog/title" }) }),
28
+ /* @__PURE__ */ jsxs(DialogContent, { children: [
29
+ /* @__PURE__ */ jsxs(Box, { sx: styles.parameterLine, children: [
30
+ /* @__PURE__ */ jsx(Box, { sx: styles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-settings-dialog/label-developer-mode" }) }),
31
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
32
+ Switch,
33
+ {
34
+ checked: developerMode,
35
+ onChange: (_event, isChecked) => handleDeveloperModeClick(isChecked),
36
+ value: developerMode,
37
+ inputProps: { "aria-label": "developer mode checkbox" }
38
+ }
39
+ ) })
40
+ ] }),
41
+ developerMode && /* @__PURE__ */ jsx(Alert, { severity: "warning", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-settings-dialog/warning-developer-mode" }) })
42
+ ] }),
43
+ /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, { onClick: handleClose, variant: "outlined", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-settings-dialog/close" }) }) })
44
+ ] });
45
+ }
46
+ export {
47
+ UserSettingsDialog as default
48
+ };
@@ -14,3 +14,4 @@ export * from './usePredefinedProperties';
14
14
  export * from './usePrevious';
15
15
  export * from './useSnackMessage';
16
16
  export * from './useFormatLabelWithUnit';
17
+ export * from './useSelectAppearance';
@@ -9,6 +9,7 @@ import { usePredefinedProperties } from "./usePredefinedProperties.js";
9
9
  import { usePrevious } from "./usePrevious.js";
10
10
  import { useSnackMessage } from "./useSnackMessage.js";
11
11
  import { useFormatLabelWithUnit } from "./useFormatLabelWithUnit.js";
12
+ import { useSelectAppearance } from "./useSelectAppearance.js";
12
13
  export {
13
14
  getComputedLanguage,
14
15
  getSystemLanguage,
@@ -20,6 +21,7 @@ export {
20
21
  useModificationLabelComputer,
21
22
  usePredefinedProperties,
22
23
  usePrevious,
24
+ useSelectAppearance,
23
25
  useSnackMessage,
24
26
  useStateBoolean,
25
27
  useStateNumber
@@ -0,0 +1,6 @@
1
+ import { FilterOptionsState } from '@mui/material';
2
+
3
+ /**
4
+ * Hook used to add custom filterOptions, use only when freeSolo = true
5
+ */
6
+ export declare function useCustomFilterOptions(): (options: string[], params: FilterOptionsState<string>) => string[];
@@ -0,0 +1,20 @@
1
+ import { useCallback } from "react";
2
+ import { createFilterOptions } from "@mui/material";
3
+ function useCustomFilterOptions() {
4
+ return useCallback((options, params) => {
5
+ const filter = createFilterOptions();
6
+ const filteredOptions = filter(options, params);
7
+ const { inputValue } = params;
8
+ const isExisting = options.some((option) => inputValue === option);
9
+ if (isExisting && options.length === 1 && options[0] === inputValue) {
10
+ return [];
11
+ }
12
+ if (inputValue !== "" && !isExisting) {
13
+ filteredOptions.push(inputValue);
14
+ }
15
+ return filteredOptions;
16
+ }, []);
17
+ }
18
+ export {
19
+ useCustomFilterOptions
20
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) 2025, 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
+ /** Hook used to modify the appearance of Select into a readonly TextField,
8
+ by hiding display button and setting readOnly prop to true
9
+ if options list is only one element long.
10
+ P.S : Do not use on AutoComplete.
11
+ */
12
+ export declare function useSelectAppearance(listLength: number): {
13
+ IconComponent: () => null;
14
+ sx: {
15
+ boxShadow: string;
16
+ '.MuiOutlinedInput-notchedOutline': {
17
+ border: string;
18
+ };
19
+ pointerEvents: string;
20
+ border: string;
21
+ };
22
+ readOnly: boolean;
23
+ disableUnderline: boolean;
24
+ } | {
25
+ IconComponent?: undefined;
26
+ sx?: undefined;
27
+ readOnly?: undefined;
28
+ disableUnderline?: undefined;
29
+ };
@@ -0,0 +1,22 @@
1
+ import { useMemo } from "react";
2
+ function useSelectAppearance(listLength) {
3
+ return useMemo(() => {
4
+ if (listLength === 1) {
5
+ return {
6
+ IconComponent: () => null,
7
+ sx: {
8
+ boxShadow: "none",
9
+ ".MuiOutlinedInput-notchedOutline": { border: "none" },
10
+ pointerEvents: "none",
11
+ border: "none"
12
+ },
13
+ readOnly: true,
14
+ disableUnderline: true
15
+ };
16
+ }
17
+ return {};
18
+ }, [listLength]);
19
+ }
20
+ export {
21
+ useSelectAppearance
22
+ };
package/dist/index.js CHANGED
@@ -114,6 +114,7 @@ import { usePredefinedProperties } from "./hooks/usePredefinedProperties.js";
114
114
  import { usePrevious } from "./hooks/usePrevious.js";
115
115
  import { useSnackMessage } from "./hooks/useSnackMessage.js";
116
116
  import { useFormatLabelWithUnit } from "./hooks/useFormatLabelWithUnit.js";
117
+ import { useSelectAppearance } from "./hooks/useSelectAppearance.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
120
  import { backendFetch, backendFetchJson, catchErrorHandler, getRequestParamFromList } from "./services/utils.js";
@@ -133,7 +134,7 @@ import { getFileIcon } from "./utils/mapper/getFileIcon.js";
133
134
  import { equipmentTypesForPredefinedPropertiesMapper } from "./utils/mapper/equipmentTypesForPredefinedPropertiesMapper.js";
134
135
  import { makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./utils/styles.js";
135
136
  import { ElementType } from "./utils/types/elementType.js";
136
- import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./utils/types/equipmentType.js";
137
+ import { EQUIPMENT_TYPE, EquipmentType, HvdcType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./utils/types/equipmentType.js";
137
138
  import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./utils/types/equipmentTypes.js";
138
139
  import { MODIFICATION_TYPES, ModificationType } from "./utils/types/modificationType.js";
139
140
  import { FieldType } from "./utils/types/fieldType.js";
@@ -260,6 +261,7 @@ export {
260
261
  GridLogo,
261
262
  GroupValueEditor,
262
263
  Hvdc,
264
+ HvdcType,
263
265
  InputWithPopupConfirmation,
264
266
  IntegerInput,
265
267
  KILO_AMPERE,
@@ -492,6 +494,7 @@ export {
492
494
  useNotificationsListener,
493
495
  usePredefinedProperties,
494
496
  usePrevious,
497
+ useSelectAppearance,
495
498
  useSnackMessage,
496
499
  useStateBoolean,
497
500
  useStateNumber,
@@ -17,8 +17,8 @@ export declare const filterEn: {
17
17
  not_exists: string;
18
18
  between: string;
19
19
  in: string;
20
- isPartOf: string;
21
- isNotPartOf: string;
20
+ inFilter: string;
21
+ notInFilter: string;
22
22
  emptyRule: string;
23
23
  incorrectRule: string;
24
24
  obsoleteFilter: string;
@@ -1,7 +1,7 @@
1
1
  const filterEn = {
2
2
  OR: "OR",
3
3
  AND: "AND",
4
- rule: "rule",
4
+ rule: "criterion",
5
5
  subGroup: "subgroup",
6
6
  is: "is",
7
7
  contains: "contains",
@@ -11,13 +11,13 @@ const filterEn = {
11
11
  not_exists: "not exists",
12
12
  between: "between",
13
13
  in: "in",
14
- isPartOf: "is part of",
15
- isNotPartOf: "is not part of",
14
+ inFilter: "in filter",
15
+ notInFilter: "not in filter",
16
16
  emptyRule: "Filter contains an empty field",
17
17
  incorrectRule: "Filter contains an incorrect field",
18
18
  obsoleteFilter: "This filter is no longer supported. Please remove it or change its equipment type.",
19
- betweenRule: "Left value of 'between' rule have to be lower than the right value",
20
- emptyGroup: "Filter contains an empty group. Consider removing it or adding rules to this group",
19
+ betweenRule: "Left value of 'between' criterion has to be lower than the right value",
20
+ emptyGroup: "Filter contains an empty group. Consider removing it or adding criteria to this group",
21
21
  Hvdc: "HVDC",
22
22
  "filter.expert": "Criteria based",
23
23
  "filter.explicitNaming": "Explicit naming",
@@ -187,4 +187,5 @@ export declare const filterExpertEn: {
187
187
  changeOperatorMessage: string;
188
188
  lowShortCircuitCurrentLimit: string;
189
189
  highShortCircuitCurrentLimit: string;
190
+ valuesList: string;
190
191
  };
@@ -178,9 +178,10 @@ const filterExpertEn = {
178
178
  lessOrEqual: "<=",
179
179
  YupNotTypeNumber: "This field only accepts numeric values",
180
180
  YupNotTypeDefault: "Field value format is incorrect",
181
- changeOperatorMessage: "The operator will be changed and will be applied to all the rules already created in the group.",
181
+ changeOperatorMessage: "The operator will be changed and will be applied to all the criteria already created in the group.",
182
182
  lowShortCircuitCurrentLimit: "Low short-circuit current limit",
183
- highShortCircuitCurrentLimit: "High short-circuit current limit"
183
+ highShortCircuitCurrentLimit: "High short-circuit current limit",
184
+ valuesList: "Values list"
184
185
  };
185
186
  export {
186
187
  filterExpertEn
@@ -5,17 +5,18 @@
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
7
  export declare const topBarEn: {
8
- 'top-bar/settings': string;
8
+ 'top-bar/userSettings': string;
9
9
  'top-bar/logout': string;
10
10
  'top-bar/goFullScreen': string;
11
11
  'top-bar/exitFullScreen': string;
12
- 'top-bar/user-information': string;
12
+ 'top-bar/userInformation': string;
13
13
  'top-bar/about': string;
14
14
  'top-bar/displayMode': string;
15
15
  'top-bar/equipmentLabel': string;
16
16
  'top-bar/id': string;
17
17
  'top-bar/name': string;
18
18
  'top-bar/language': string;
19
+ 'top-bar/developerModeWarning': string;
19
20
  'about-dialog/title': string;
20
21
  'about-dialog/version': string;
21
22
  'about-dialog/alert-running-old-version-msg': string;
@@ -37,4 +38,8 @@ export declare const topBarEn: {
37
38
  'user-information-dialog/number-of-cases-or-studies': string;
38
39
  'user-information-dialog/used': string;
39
40
  'user-information-dialog/number-of-builds-per-study': string;
41
+ 'user-settings-dialog/title': string;
42
+ 'user-settings-dialog/label-developer-mode': string;
43
+ 'user-settings-dialog/warning-developer-mode': string;
44
+ 'user-settings-dialog/close': string;
40
45
  };
@@ -1,15 +1,16 @@
1
1
  const topBarEn = {
2
- "top-bar/settings": "Settings",
2
+ "top-bar/userSettings": "User settings",
3
3
  "top-bar/logout": "Logout",
4
4
  "top-bar/goFullScreen": "Full screen",
5
5
  "top-bar/exitFullScreen": "Exit full screen mode",
6
- "top-bar/user-information": "User information",
6
+ "top-bar/userInformation": "User information",
7
7
  "top-bar/about": "About",
8
8
  "top-bar/displayMode": "Display mode",
9
9
  "top-bar/equipmentLabel": "Equipment label",
10
10
  "top-bar/id": "Id",
11
11
  "top-bar/name": "Name",
12
12
  "top-bar/language": "Language",
13
+ "top-bar/developerModeWarning": "Developer mode: Some features are incomplete and may not work as expected.",
13
14
  "about-dialog/title": "About",
14
15
  "about-dialog/version": "Version {version}",
15
16
  "about-dialog/alert-running-old-version-msg": "Running old version.\nSave your work and refresh the application to load the latest version.",
@@ -30,7 +31,11 @@ const topBarEn = {
30
31
  "user-information-dialog/quotas": "User quotas",
31
32
  "user-information-dialog/number-of-cases-or-studies": "Number of cases or studies",
32
33
  "user-information-dialog/used": "Used",
33
- "user-information-dialog/number-of-builds-per-study": "Number of builds per study"
34
+ "user-information-dialog/number-of-builds-per-study": "Number of builds per study",
35
+ "user-settings-dialog/title": "User settings",
36
+ "user-settings-dialog/label-developer-mode": "Enable developer mode",
37
+ "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.",
38
+ "user-settings-dialog/close": "Close"
34
39
  };
35
40
  export {
36
41
  topBarEn
@@ -187,4 +187,5 @@ export declare const filterExpertFr: {
187
187
  changeOperatorMessage: string;
188
188
  lowShortCircuitCurrentLimit: string;
189
189
  highShortCircuitCurrentLimit: string;
190
+ valuesList: string;
190
191
  };
@@ -178,9 +178,10 @@ const filterExpertFr = {
178
178
  lessOrEqual: "<=",
179
179
  YupNotTypeNumber: "Ce champ n'accepte que des valeurs numériques",
180
180
  YupNotTypeDefault: "La valeur du champ n'est pas au bon format",
181
- changeOperatorMessage: "L'opérateur sera modifié et s'appliquera sur toutes les règles déjà créées dans le groupe.",
181
+ changeOperatorMessage: "L'opérateur sera modifié et s'appliquera sur tous les critères déjà créés dans le groupe.",
182
182
  lowShortCircuitCurrentLimit: "Limite ICC min",
183
- highShortCircuitCurrentLimit: "Limite ICC max"
183
+ highShortCircuitCurrentLimit: "Limite ICC max",
184
+ valuesList: "Liste de valeurs"
184
185
  };
185
186
  export {
186
187
  filterExpertFr
@@ -17,8 +17,8 @@ export declare const filterFr: {
17
17
  not_exists: string;
18
18
  between: string;
19
19
  in: string;
20
- isPartOf: string;
21
- isNotPartOf: string;
20
+ inFilter: string;
21
+ notInFilter: string;
22
22
  emptyRule: string;
23
23
  incorrectRule: string;
24
24
  obsoleteFilter: string;
@@ -1,7 +1,7 @@
1
1
  const filterFr = {
2
2
  OR: "OU",
3
3
  AND: "ET",
4
- rule: "règle",
4
+ rule: "critère",
5
5
  subGroup: "sous-groupe",
6
6
  is: "est",
7
7
  contains: "contient",
@@ -11,13 +11,13 @@ const filterFr = {
11
11
  not_exists: "n'existe pas",
12
12
  between: "entre",
13
13
  in: "dans",
14
- isPartOf: "fait partie de",
15
- isNotPartOf: "ne fait pas partie de",
14
+ inFilter: "dans le filtre",
15
+ notInFilter: "pas dans le filtre",
16
16
  emptyRule: "Le filtre contient un champ vide",
17
17
  incorrectRule: "Le filtre contient un champ incorrect",
18
18
  obsoleteFilter: "Ce filtre n'est plus supporté. Veuillez le supprimer ou changer son type d'équipement.",
19
- betweenRule: "La valeur de gauche d'une règle 'entre' doit être inférieure à la valeur de droite",
20
- emptyGroup: "Le filtre contient un groupe vide. Supprimez le ou ajoutez des règles à ce groupe",
19
+ betweenRule: "La valeur de gauche d'un critère 'entre' doit être inférieure à la valeur de droite",
20
+ emptyGroup: "Le filtre contient un groupe vide. Supprimez le ou ajoutez des critères à ce groupe",
21
21
  Hvdc: "HVDC",
22
22
  "filter.expert": "Par critères",
23
23
  "filter.explicitNaming": "Par nommage",
@@ -5,7 +5,7 @@
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
7
  export declare const topBarFr: {
8
- 'top-bar/settings': string;
8
+ 'top-bar/userSettings': string;
9
9
  'top-bar/logout': string;
10
10
  'top-bar/goFullScreen': string;
11
11
  'top-bar/exitFullScreen': string;
@@ -16,6 +16,7 @@ export declare const topBarFr: {
16
16
  'top-bar/id': string;
17
17
  'top-bar/name': string;
18
18
  'top-bar/language': string;
19
+ 'top-bar/developerModeWarning': string;
19
20
  'about-dialog/title': string;
20
21
  'about-dialog/version': string;
21
22
  'about-dialog/alert-running-old-version-msg': string;
@@ -37,4 +38,8 @@ export declare const topBarFr: {
37
38
  'user-information-dialog/number-of-cases-or-studies': string;
38
39
  'user-information-dialog/used': string;
39
40
  'user-information-dialog/number-of-builds-per-study': string;
41
+ 'user-settings-dialog/title': string;
42
+ 'user-settings-dialog/label-developer-mode': string;
43
+ 'user-settings-dialog/warning-developer-mode': string;
44
+ 'user-settings-dialog/close': string;
40
45
  };
@@ -1,5 +1,5 @@
1
1
  const topBarFr = {
2
- "top-bar/settings": "Paramètres",
2
+ "top-bar/userSettings": "Paramètres utilisateur",
3
3
  "top-bar/logout": "Se déconnecter",
4
4
  "top-bar/goFullScreen": "Plein écran",
5
5
  "top-bar/exitFullScreen": "Quitter mode plein écran",
@@ -10,6 +10,7 @@ const topBarFr = {
10
10
  "top-bar/id": "Id",
11
11
  "top-bar/name": "Nom",
12
12
  "top-bar/language": "Langue",
13
+ "top-bar/developerModeWarning": "Mode développeur : Certaines fonctionnalités ne sont pas complètes et peuvent ne pas fonctionner comme prévu.",
13
14
  "about-dialog/title": "À propos",
14
15
  "about-dialog/version": "Version {version}",
15
16
  "about-dialog/alert-running-old-version-msg": "Ancienne version de l'application.\nVeuillez sauvegarder votre travail et rafraîchir l'application pour charger la dernière version",
@@ -30,7 +31,11 @@ const topBarFr = {
30
31
  "user-information-dialog/quotas": "Quotas",
31
32
  "user-information-dialog/number-of-cases-or-studies": "Nombre situations ou études",
32
33
  "user-information-dialog/used": "Utilisé",
33
- "user-information-dialog/number-of-builds-per-study": "Nombre réalisations par étude"
34
+ "user-information-dialog/number-of-builds-per-study": "Nombre réalisations par étude",
35
+ "user-settings-dialog/title": "Paramètres utilisateur",
36
+ "user-settings-dialog/label-developer-mode": "Activer le mode développeur",
37
+ "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.",
38
+ "user-settings-dialog/close": "Fermer"
34
39
  };
35
40
  export {
36
41
  topBarFr
@@ -10,7 +10,7 @@ import { getFileIcon } from "./mapper/getFileIcon.js";
10
10
  import { equipmentTypesForPredefinedPropertiesMapper } from "./mapper/equipmentTypesForPredefinedPropertiesMapper.js";
11
11
  import { makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./styles.js";
12
12
  import { ElementType } from "./types/elementType.js";
13
- import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
13
+ import { EQUIPMENT_TYPE, EquipmentType, HvdcType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
14
14
  import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./types/equipmentTypes.js";
15
15
  import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
16
16
  import { FieldType } from "./types/fieldType.js";
@@ -32,6 +32,7 @@ export {
32
32
  GRIDSUITE_DEFAULT_PRECISION,
33
33
  Generator,
34
34
  Hvdc,
35
+ HvdcType,
35
36
  KILO_AMPERE,
36
37
  KILO_METER,
37
38
  KILO_VOLT,
@@ -13,7 +13,6 @@ function getFileIcon(type, style) {
13
13
  return /* @__PURE__ */ jsx(NoteAlt, { sx: style });
14
14
  case ElementType.FILTER:
15
15
  return /* @__PURE__ */ jsx(Article, { sx: style });
16
- case ElementType.PARAMETERS:
17
16
  case ElementType.VOLTAGE_INIT_PARAMETERS:
18
17
  case ElementType.SECURITY_ANALYSIS_PARAMETERS:
19
18
  case ElementType.LOADFLOW_PARAMETERS:
@@ -6,7 +6,6 @@ export declare enum ElementType {
6
6
  CASE = "CASE",
7
7
  FILTER = "FILTER",
8
8
  MODIFICATION = "MODIFICATION",
9
- PARAMETERS = "PARAMETERS",
10
9
  CONTINGENCY_LIST = "CONTINGENCY_LIST",
11
10
  VOLTAGE_INIT_PARAMETERS = "VOLTAGE_INIT_PARAMETERS",
12
11
  SECURITY_ANALYSIS_PARAMETERS = "SECURITY_ANALYSIS_PARAMETERS",
@@ -4,7 +4,6 @@ var ElementType = /* @__PURE__ */ ((ElementType2) => {
4
4
  ElementType2["CASE"] = "CASE";
5
5
  ElementType2["FILTER"] = "FILTER";
6
6
  ElementType2["MODIFICATION"] = "MODIFICATION";
7
- ElementType2["PARAMETERS"] = "PARAMETERS";
8
7
  ElementType2["CONTINGENCY_LIST"] = "CONTINGENCY_LIST";
9
8
  ElementType2["VOLTAGE_INIT_PARAMETERS"] = "VOLTAGE_INIT_PARAMETERS";
10
9
  ElementType2["SECURITY_ANALYSIS_PARAMETERS"] = "SECURITY_ANALYSIS_PARAMETERS";
@@ -63,6 +63,10 @@ export declare enum EquipmentType {
63
63
  DISCONNECTOR = "DISCONNECTOR",
64
64
  BREAKER = "BREAKER"
65
65
  }
66
+ export declare enum HvdcType {
67
+ LCC = "LCC",
68
+ VSC = "VSC"
69
+ }
66
70
  export declare const EQUIPMENT_TYPE: Record<EquipmentType, {
67
71
  name: EquipmentType;
68
72
  tagLabel: string;
@@ -65,6 +65,11 @@ var EquipmentType = /* @__PURE__ */ ((EquipmentType2) => {
65
65
  EquipmentType2["BREAKER"] = "BREAKER";
66
66
  return EquipmentType2;
67
67
  })(EquipmentType || {});
68
+ var HvdcType = /* @__PURE__ */ ((HvdcType2) => {
69
+ HvdcType2["LCC"] = "LCC";
70
+ HvdcType2["VSC"] = "VSC";
71
+ return HvdcType2;
72
+ })(HvdcType || {});
68
73
  const EQUIPMENT_TYPE = {
69
74
  [
70
75
  "SUBSTATION"
@@ -239,6 +244,7 @@ const getEquipmentsInfosForSearchBar = (equipmentsInfos, getNameOrId) => {
239
244
  export {
240
245
  EQUIPMENT_TYPE,
241
246
  EquipmentType,
247
+ HvdcType,
242
248
  OperatingStatus,
243
249
  TYPE_TAG_MAX_SIZE,
244
250
  VL_TAG_MAX_SIZE,
@@ -1,5 +1,5 @@
1
1
  import { ElementType } from "./elementType.js";
2
- import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
2
+ import { EQUIPMENT_TYPE, EquipmentType, HvdcType, 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
4
  import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
5
5
  import { FieldType } from "./fieldType.js";
@@ -13,6 +13,7 @@ export {
13
13
  FieldType,
14
14
  Generator,
15
15
  Hvdc,
16
+ HvdcType,
16
17
  LCC,
17
18
  Line,
18
19
  Load,
@@ -18,9 +18,7 @@ export type StudyMetadata = Metadata & {
18
18
  [networkElementType: string]: PredefinedProperties;
19
19
  };
20
20
  defaultParametersValues?: {
21
- fluxConvention?: string;
22
21
  enableDeveloperMode?: string;
23
- mapManualRefresh?: string;
24
22
  };
25
23
  defaultCountry?: string;
26
24
  favoriteCountries?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.80.0",
3
+ "version": "0.82.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "engines": {
6
6
  "npm": ">=9",
@@ -34,7 +34,6 @@
34
34
  "clsx": "^2.1.0",
35
35
  "jwt-decode": "^4.0.0",
36
36
  "localized-countries": "^2.0.0",
37
- "memoize-one": "^6.0.0",
38
37
  "oidc-client": "^1.11.5",
39
38
  "prop-types": "^15.8.1",
40
39
  "react-beautiful-dnd": "^13.1.1",