@gridsuite/commons-ui 0.83.0 → 0.85.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 (76) hide show
  1. package/dist/_mocks_/svg.d.ts +1 -1
  2. package/dist/components/authentication/AuthenticationRouter.js +1 -1
  3. package/dist/components/authentication/Login.js +1 -5
  4. package/dist/components/authentication/authenticationType.d.ts +3 -3
  5. package/dist/components/authentication/utils/authService.d.ts +3 -3
  6. package/dist/components/cardErrorBoundary/CardErrorBoundary.d.ts +1 -1
  7. package/dist/components/checkBoxList/checkBoxList.type.d.ts +7 -8
  8. package/dist/components/contingencyList/criteriaBased/CriteriaBasedForm.d.ts +1 -1
  9. package/dist/components/contingencyList/criteriaBased/criteriaBasedUtils.d.ts +3 -3
  10. package/dist/components/customAGGrid/customAggrid.d.ts +1 -1
  11. package/dist/components/customAGGrid/customAggrid.js +1 -2
  12. package/dist/components/customAGGrid/customAggrid.style.d.ts +2 -2
  13. package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.d.ts +2 -2
  14. package/dist/components/dialogs/modifyElementSelection/ModifyElementSelection.d.ts +1 -1
  15. package/dist/components/directoryItemSelector/DirectoryItemSelector.d.ts +2 -2
  16. package/dist/components/elementSearch/elementItem/EquipmentItem.d.ts +2 -2
  17. package/dist/components/elementSearch/elementSearchInput/ElementSearchInput.d.ts +1 -1
  18. package/dist/components/elementSearch/tagRenderer/TagRenderer.d.ts +1 -1
  19. package/dist/components/filter/FilterCreationDialog.d.ts +1 -1
  20. package/dist/components/filter/FilterCreationDialog.js +1 -1
  21. package/dist/components/filter/HeaderFilterForm.d.ts +2 -2
  22. package/dist/components/filter/expert/ExpertFilterForm.js +2 -3
  23. package/dist/components/filter/expert/expertFilter.type.d.ts +2 -2
  24. package/dist/components/filter/expert/expertFilterConstants.d.ts +2 -2
  25. package/dist/components/filter/expert/expertFilterConstants.js +1 -1
  26. package/dist/components/filter/expert/expertFilterUtils.d.ts +3 -75
  27. package/dist/components/filter/expert/expertFilterUtils.js +3 -4
  28. package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +3 -3
  29. package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +2 -1
  30. package/dist/components/filter/filter.type.d.ts +4 -4
  31. package/dist/components/filter/utils/filterFormUtils.d.ts +1 -1
  32. package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +2 -7
  33. package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -2
  34. package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.d.ts +1 -1
  35. package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js +1 -1
  36. package/dist/components/inputs/reactHookForm/numbers/RangeInput.d.ts +2 -3
  37. package/dist/components/inputs/reactHookForm/numbers/SliderInput.d.ts +2 -2
  38. package/dist/components/inputs/reactHookForm/numbers/SliderInput.js +26 -3
  39. package/dist/components/inputs/reactHookForm/provider/CustomFormProvider.d.ts +2 -2
  40. package/dist/components/inputs/reactHookForm/provider/CustomFormProvider.js +1 -5
  41. package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.d.ts +1 -1
  42. package/dist/components/inputs/reactHookForm/text/ExpandingTextField.d.ts +1 -1
  43. package/dist/components/inputs/reactHookForm/text/TextInput.d.ts +3 -3
  44. package/dist/components/inputs/reactHookForm/text/TextInput.js +2 -2
  45. package/dist/components/inputs/reactHookForm/text/UniqueNameInput.d.ts +2 -2
  46. package/dist/components/inputs/reactHookForm/utils/TextFieldWithAdornment.d.ts +1 -1
  47. package/dist/components/inputs/reactQueryBuilder/AutocompleteWithFavorites.js +1 -1
  48. package/dist/components/inputs/reactQueryBuilder/CustomReactQueryBuilder.js +1 -1
  49. package/dist/components/inputs/reactQueryBuilder/PropertyValueEditor.d.ts +1 -1
  50. package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.d.ts +1 -1
  51. package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.d.ts +1 -1
  52. package/dist/components/notifications/contexts/NotificationsContext.d.ts +0 -1
  53. package/dist/components/notifications/hooks/useListenerManager.d.ts +1 -1
  54. package/dist/components/notifications/hooks/useNotificationsListener.d.ts +3 -3
  55. package/dist/components/overflowableText/OverflowableText.d.ts +4 -4
  56. package/dist/components/topBar/AboutDialog.js +1 -1
  57. package/dist/components/topBar/GridLogo.d.ts +1 -1
  58. package/dist/components/topBar/TopBar.d.ts +7 -7
  59. package/dist/components/topBar/TopBar.js +1 -5
  60. package/dist/components/topBar/UserInformationDialog.js +1 -2
  61. package/dist/components/topBar/UserSettingsDialog.d.ts +1 -1
  62. package/dist/components/topBar/UserSettingsDialog.js +17 -14
  63. package/dist/components/treeViewFinder/TreeViewFinder.d.ts +3 -3
  64. package/dist/components/treeViewFinder/TreeViewFinder.js +2 -3
  65. package/dist/hooks/useIntlRef.d.ts +1 -2
  66. package/dist/hooks/useLocalizedCountries.js +1 -1
  67. package/dist/hooks/useModificationLabelComputer.d.ts +1 -1
  68. package/dist/hooks/useModificationLabelComputer.js +8 -10
  69. package/dist/hooks/usePredefinedProperties.d.ts +2 -2
  70. package/dist/services/directory.d.ts +1 -1
  71. package/dist/services/explore.d.ts +2 -2
  72. package/dist/translations/en/topBarEn.js +1 -1
  73. package/dist/translations/fr/topBarFr.js +1 -1
  74. package/dist/utils/mapper/getFileIcon.d.ts +1 -1
  75. package/dist/utils/types/types.d.ts +1 -1
  76. package/package.json +70 -76
@@ -1,7 +1,7 @@
1
- import { Input } from '../../../../utils/types/types';
2
- import { TextFieldWithAdornmentProps } from '../utils/TextFieldWithAdornment';
3
- import { TextFieldProps } from '@mui/material';
4
1
  import { ReactElement } from 'react';
2
+ import { TextFieldProps } from '@mui/material';
3
+ import { TextFieldWithAdornmentProps } from '../utils/TextFieldWithAdornment';
4
+ import { Input } from '../../../../utils/types/types';
5
5
 
6
6
  export interface TextInputProps {
7
7
  name: string;
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { InputAdornment, IconButton, TextField } from "@mui/material";
2
+ import { TextField, InputAdornment, IconButton } from "@mui/material";
3
3
  import { Clear } from "@mui/icons-material";
4
4
  import { useController } from "react-hook-form";
5
5
  import { TextFieldWithAdornment } from "../utils/TextFieldWithAdornment.js";
6
6
  import { FieldLabel } from "../utils/FieldLabel.js";
7
- import { isFieldRequired, genHelperPreviousValue, genHelperError, identity } from "../utils/functions.js";
7
+ import { identity, isFieldRequired, genHelperError, genHelperPreviousValue } from "../utils/functions.js";
8
8
  import { useCustomFormContext } from "../provider/useCustomFormContext.js";
9
9
  function TextInput({
10
10
  name,
@@ -1,6 +1,6 @@
1
- import { ElementExistsType, ElementType } from '../../../../utils/types/elementType';
2
- import { UUID } from 'crypto';
3
1
  import { TextFieldProps } from '@mui/material';
2
+ import { UUID } from 'crypto';
3
+ import { ElementExistsType, ElementType } from '../../../../utils/types/elementType';
4
4
 
5
5
  export interface UniqueNameInputProps {
6
6
  name: string;
@@ -1,5 +1,5 @@
1
- import { Input } from '../../../../utils/types/types';
2
1
  import { TextFieldProps } from '@mui/material';
2
+ import { Input } from '../../../../utils/types/types';
3
3
 
4
4
  export type TextFieldWithAdornmentProps = TextFieldProps & {
5
5
  value: Input;
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Autocomplete, TextField, Box } from "@mui/material";
2
+ import { Autocomplete, Box, TextField } from "@mui/material";
3
3
  import { useMemo } from "react";
4
4
  const styles = {
5
5
  favBox: (theme) => ({
@@ -15,7 +15,7 @@ import { ValueSelector } from "./ValueSelector.js";
15
15
  import { COMBINATOR_OPTIONS } from "../../filter/expert/expertFilterConstants.js";
16
16
  import { ErrorInput } from "../reactHookForm/errorManagement/ErrorInput.js";
17
17
  import { FieldErrorAlert } from "../reactHookForm/errorManagement/FieldErrorAlert.js";
18
- import { countRules, getOperators, queryValidator } from "../../filter/expert/expertFilterUtils.js";
18
+ import { countRules, queryValidator, getOperators } from "../../filter/expert/expertFilterUtils.js";
19
19
  import { RemoveButton } from "./RemoveButton.js";
20
20
  import { FieldSelector } from "./FieldSelector.js";
21
21
  function RuleAddButton(props) {
@@ -1,5 +1,5 @@
1
- import { EquipmentType } from '../../../utils';
2
1
  import { ValueEditorProps } from 'react-querybuilder';
2
+ import { EquipmentType } from '../../../utils';
3
3
 
4
4
  interface ExpertFilterPropertyProps {
5
5
  equipmentType: EquipmentType;
@@ -1,4 +1,4 @@
1
- import { CompositeField } from '../../../filter/expert/expertFilter.type';
2
1
  import { ValueEditorProps } from 'react-querybuilder';
2
+ import { CompositeField } from '../../../filter/expert/expertFilter.type';
3
3
 
4
4
  export declare function GroupValueEditor(props: ValueEditorProps<CompositeField>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { CompositeRule } from '../../../filter/expert/expertFilter.type';
2
1
  import { ValueEditorProps } from 'react-querybuilder';
2
+ import { CompositeRule } from '../../../filter/expert/expertFilter.type';
3
3
 
4
4
  type RuleValueEditorProps = ValueEditorProps & {
5
5
  rule?: CompositeRule;
@@ -4,7 +4,6 @@
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
- /// <reference types="react" />
8
7
  export type ListenerEventWS = {
9
8
  id: string;
10
9
  callback: (event: MessageEvent) => void;
@@ -1,6 +1,6 @@
1
1
  import { ListenerEventWS, ListenerOnReopen } from '../contexts/NotificationsContext';
2
2
 
3
- export declare const useListenerManager: <TListener extends ListenerEventWS | ListenerOnReopen, TMessage extends MessageEvent<any>>(urls: Record<string, string | undefined>) => {
3
+ export declare const useListenerManager: <TListener extends ListenerEventWS | ListenerOnReopen, TMessage extends MessageEvent>(urls: Record<string, string | undefined>) => {
4
4
  addListener: (urlKey: string, listener: TListener) => void;
5
5
  removeListener: (urlKey: string, id: string) => void;
6
6
  broadcast: (urlKey: string) => (event: TMessage) => void;
@@ -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 useNotificationsListener: (listenerKey: string, { listenerCallbackMessage, listenerCallbackOnReopen, propsId, }: {
8
- listenerCallbackMessage?: ((event: MessageEvent) => void) | undefined;
9
- listenerCallbackOnReopen?: (() => void) | undefined;
10
- propsId?: string | undefined;
8
+ listenerCallbackMessage?: (event: MessageEvent) => void;
9
+ listenerCallbackOnReopen?: () => void;
10
+ propsId?: string;
11
11
  }) => void;
@@ -1,11 +1,11 @@
1
- import { Style } from 'node:util';
1
+ import { ReactNode } from 'react';
2
2
  import { BoxProps, SxProps, Theme } from '@mui/material';
3
- import { ReactElement } from 'react';
3
+ import { Style } from 'node:util';
4
4
 
5
5
  export interface OverflowableTextProps extends BoxProps {
6
- text?: ReactElement | string;
6
+ text?: ReactNode;
7
7
  maxLineCount?: number;
8
8
  tooltipStyle?: Style;
9
9
  tooltipSx?: SxProps<Theme>;
10
10
  }
11
- export declare const OverflowableText: import('@emotion/styled').StyledComponent<OverflowableTextProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
11
+ export declare const OverflowableText: import('@emotion/styled').StyledComponent<OverflowableTextProps & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useCallback } from "react";
3
3
  import { useTheme, Dialog, useMediaQuery, DialogTitle, Collapse, Alert, Box, Fade, CircularProgress, Typography, DialogContent, Accordion, AccordionSummary, AccordionDetails, Grid, DialogActions, Button, Tooltip, Zoom, Stack, tooltipClasses } from "@mui/material";
4
4
  import { LoadingButton } from "@mui/lab";
5
- import { Refresh, ExpandMore, Gavel, Apps, WidgetsOutlined, DnsOutlined, QuestionMark } from "@mui/icons-material";
5
+ import { Refresh, Gavel, ExpandMore, Apps, QuestionMark, DnsOutlined, WidgetsOutlined } from "@mui/icons-material";
6
6
  import { FormattedMessage } from "react-intl";
7
7
  import { LogoText } from "./GridLogo.js";
8
8
  const styles = {
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
1
  import { SxProps } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
3
 
4
4
  export interface GridLogoProps extends Omit<LogoTextProps, 'style'> {
5
5
  appLogo: ReactNode;
@@ -1,10 +1,10 @@
1
- import { DARK_THEME, LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, LIGHT_THEME } from '../../utils/constants/browserConstants';
2
- import { Metadata } from '../../utils';
3
- import { LogoutProps } from '../authentication/Logout';
4
- import { AboutDialogProps } from './AboutDialog';
5
- import { GridLogoProps } from './GridLogo';
6
- import { User } from 'oidc-client';
7
1
  import { PropsWithChildren, ReactNode } from 'react';
2
+ import { User } from 'oidc-client';
3
+ import { GridLogoProps } from './GridLogo';
4
+ import { AboutDialogProps } from './AboutDialog';
5
+ import { LogoutProps } from '../authentication/Logout';
6
+ import { Metadata } from '../../utils';
7
+ import { DARK_THEME, LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, LIGHT_THEME } from '../../utils/constants/browserConstants';
8
8
 
9
9
  export type GsLangUser = typeof LANG_ENGLISH | typeof LANG_FRENCH;
10
10
  export type GsLang = GsLangUser | typeof LANG_SYSTEM;
@@ -21,7 +21,7 @@ export type TopBarProps = Omit<GridLogoProps, 'onClick'> & Omit<LogoutProps, 'di
21
21
  equipmentLabelling?: boolean;
22
22
  onLanguageClick: (value: GsLang) => void;
23
23
  language: GsLang;
24
- developerMode: boolean;
24
+ developerMode?: boolean;
25
25
  onDeveloperModeClick?: (value: boolean) => void;
26
26
  };
27
27
  export declare function TopBar({ appName, appColor, appLogo, appVersion, appLicense, logoAboutDialog, onLogoutClick, onLogoClick, user, children, appsAndUrls, onAboutClick, globalVersionPromise, additionalModulesPromise, onThemeClick, theme, developerMode, onDeveloperModeClick, onEquipmentLabellingClick, equipmentLabelling, onLanguageClick, language, }: PropsWithChildren<TopBarProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useMemo } from "react";
3
3
  import { FormattedMessage } from "react-intl";
4
- import { Menu, MenuItem, ListItemIcon, AppBar, Toolbar, Box, IconButton, ListItemText, Button, Popper, Paper, ClickAwayListener, MenuList, Typography, ToggleButtonGroup, ToggleButton, darken } from "@mui/material";
4
+ import { styled, Menu, MenuItem, ListItemIcon, AppBar, Toolbar, Box, IconButton, ListItemText, Button, darken, Popper, Paper, ClickAwayListener, MenuList, Typography, ToggleButtonGroup, ToggleButton } from "@mui/material";
5
5
  import { Apps, ArrowDropUp, ArrowDropDown, Person, Badge, ManageAccounts, HelpOutline, WbSunny, Brightness3, Computer, ExitToApp } from "@mui/icons-material";
6
- import { styled } from "@mui/system";
7
6
  import { GridLogo } from "./GridLogo.js";
8
7
  import { AboutDialog } from "./AboutDialog.js";
9
8
  import { useStateBoolean } from "../../hooks/customStates/useStateBoolean.js";
@@ -43,9 +42,6 @@ const styles = {
43
42
  borderBottom: {
44
43
  borderBottom: "1px solid #ccc"
45
44
  },
46
- borderTop: {
47
- borderTop: "1px solid #ccc"
48
- },
49
45
  settingsMenu: {
50
46
  maxWidth: "385px",
51
47
  zIndex: 60
@@ -1,6 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Dialog, DialogTitle, DialogContent, Grid, Typography, DialogActions } from "@mui/material";
3
- import { Box } from "@mui/system";
2
+ import { Dialog, DialogTitle, DialogContent, Grid, Typography, Box, DialogActions } from "@mui/material";
4
3
  import { FormattedMessage } from "react-intl";
5
4
  import { useState, useEffect } from "react";
6
5
  import { CancelButton } from "../inputs/reactHookForm/utils/CancelButton.js";
@@ -1,7 +1,7 @@
1
1
  interface UserSettingsDialogProps {
2
2
  openDialog: boolean;
3
3
  onClose: () => void;
4
- developerMode: boolean;
4
+ developerMode?: boolean;
5
5
  onDeveloperModeClick?: (value: boolean) => void;
6
6
  }
7
7
  declare function UserSettingsDialog({ openDialog, onClose, developerMode, onDeveloperModeClick }: UserSettingsDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useCallback } from "react";
2
3
  import { FormattedMessage } from "react-intl";
3
4
  import { Dialog, DialogTitle, DialogContent, Box, Switch, Alert, DialogActions, Button } from "@mui/material";
4
5
  const styles = {
@@ -12,17 +13,19 @@ const styles = {
12
13
  }
13
14
  };
14
15
  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
- };
16
+ const handleDeveloperModeClick = useCallback(
17
+ (event) => onDeveloperModeClick == null ? void 0 : onDeveloperModeClick(event.target.checked),
18
+ [onDeveloperModeClick]
19
+ );
20
+ const handleClose = useCallback(
21
+ (_, reason) => {
22
+ if (reason === "backdropClick") {
23
+ return;
24
+ }
25
+ onClose();
26
+ },
27
+ [onClose]
28
+ );
26
29
  return /* @__PURE__ */ jsxs(Dialog, { fullWidth: true, open: openDialog, onClose: handleClose, children: [
27
30
  /* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "user-settings-dialog/title" }) }),
28
31
  /* @__PURE__ */ jsxs(DialogContent, { children: [
@@ -31,9 +34,9 @@ function UserSettingsDialog({ openDialog, onClose, developerMode, onDeveloperMod
31
34
  /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
32
35
  Switch,
33
36
  {
34
- checked: developerMode,
35
- onChange: (_event, isChecked) => handleDeveloperModeClick(isChecked),
36
- value: developerMode,
37
+ checked: developerMode ?? false,
38
+ disabled: handleDeveloperModeClick === void 0,
39
+ onChange: handleDeveloperModeClick,
37
40
  inputProps: { "aria-label": "developer mode checkbox" }
38
41
  }
39
42
  ) })
@@ -1,6 +1,6 @@
1
- import { TreeViewClasses } from '@mui/x-tree-view';
2
- import { ButtonProps, ModalProps } from '@mui/material';
3
1
  import { ReactElement } from 'react';
2
+ import { ButtonProps, ModalProps } from '@mui/material';
3
+ import { TreeViewClasses } from '@mui/x-tree-view';
4
4
 
5
5
  export declare const generateTreeViewFinderClass: (className: string) => string;
6
6
  export interface TreeViewFinderNodeProps {
@@ -29,4 +29,4 @@ export interface TreeViewFinderProps {
29
29
  onTreeBrowse?: (nodeId: string) => void;
30
30
  sortMethod?: (a: TreeViewFinderNodeProps, b: TreeViewFinderNodeProps) => number;
31
31
  }
32
- export declare const TreeViewFinder: import('@emotion/styled').StyledComponent<TreeViewFinderProps & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
32
+ export declare const TreeViewFinder: import('@emotion/styled').StyledComponent<TreeViewFinderProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
@@ -1,10 +1,9 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useRef, useCallback, useEffect } from "react";
3
3
  import { useIntl } from "react-intl";
4
- import { styled } from "@mui/system";
5
- import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Typography } from "@mui/material";
4
+ import { styled, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Typography } from "@mui/material";
6
5
  import { TreeView, TreeItem } from "@mui/x-tree-view";
7
- import { ChevronRight, ExpandMore, Check } from "@mui/icons-material";
6
+ import { ExpandMore, ChevronRight, Check } from "@mui/icons-material";
8
7
  import { toNestedGlobalSelectors, makeComposeClasses } from "../../utils/styles.js";
9
8
  import { CancelButton } from "../inputs/reactHookForm/utils/CancelButton.js";
10
9
  const cssDialogPaper = "dialogPaper";
@@ -4,5 +4,4 @@
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
- /// <reference types="react" />
8
- export declare function useIntlRef(): import('react').MutableRefObject<import("react-intl").IntlShape>;
7
+ export declare function useIntlRef(): import('react').MutableRefObject<import('react-intl').IntlShape>;
@@ -2,7 +2,7 @@ import { useState, useEffect, useMemo, useCallback } from "react";
2
2
  import localizedCountries from "localized-countries";
3
3
  import countriesFr from "localized-countries/data/fr";
4
4
  import countriesEn from "localized-countries/data/en";
5
- import { LANG_ENGLISH, LANG_SYSTEM, LANG_FRENCH } from "../utils/constants/browserConstants.js";
5
+ import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM } from "../utils/constants/browserConstants.js";
6
6
  const supportedLanguages = [LANG_FRENCH, LANG_ENGLISH];
7
7
  const getSystemLanguage = () => {
8
8
  const systemLanguage = navigator.language.split(/[-_]/)[0];
@@ -10,7 +10,7 @@ export interface NetworkModificationMetadata {
10
10
  messageValues: string;
11
11
  }
12
12
  export declare const useModificationLabelComputer: () => {
13
- computeLabel: (modif: NetworkModificationMetadata, withFormat?: boolean) => {
13
+ computeLabel: (modif: NetworkModificationMetadata, formatBold?: boolean) => {
14
14
  action: string;
15
15
  energizedEnd: string;
16
16
  computedLabel: string | import("react/jsx-runtime").JSX.Element;
@@ -3,18 +3,18 @@ import { useIntl } from "react-intl";
3
3
  import { useCallback } from "react";
4
4
  import { MODIFICATION_TYPES } from "../utils/types/modificationType.js";
5
5
  import { EQUIPMENT_TYPE } from "../utils/types/equipmentType.js";
6
- const getOperatingStatusModificationValues = (modification, withFormat) => {
6
+ const getOperatingStatusModificationValues = (modification, formatBold) => {
7
7
  return {
8
8
  action: modification.action,
9
9
  energizedEnd: modification.energizedVoltageLevelId,
10
- computedLabel: withFormat ? /* @__PURE__ */ jsx("strong", { children: modification.equipmentId }) : modification.equipmentId
10
+ computedLabel: formatBold ? /* @__PURE__ */ jsx("strong", { children: modification.equipmentId }) : modification.equipmentId
11
11
  };
12
12
  };
13
- const getEquipmentAttributeModificationValues = (modification, withFormat) => {
13
+ const getEquipmentAttributeModificationValues = (modification, formatBold) => {
14
14
  return {
15
15
  equipmentAttributeName: modification.equipmentAttributeName,
16
16
  equipmentAttributeValue: modification.equipmentAttributeValue,
17
- computedLabel: withFormat ? /* @__PURE__ */ jsx("strong", { children: modification.equipmentId }) : modification.equipmentId
17
+ computedLabel: formatBold ? /* @__PURE__ */ jsx("strong", { children: modification.equipmentId }) : modification.equipmentId
18
18
  };
19
19
  };
20
20
  const useModificationLabelComputer = () => {
@@ -52,17 +52,15 @@ const useModificationLabelComputer = () => {
52
52
  [intl]
53
53
  );
54
54
  const computeLabel = useCallback(
55
- (modif, withFormat = true) => {
55
+ (modif, formatBold = true) => {
56
56
  const modificationValues = JSON.parse(modif.messageValues);
57
57
  switch (modif.messageType) {
58
58
  case MODIFICATION_TYPES.OPERATING_STATUS_MODIFICATION.type:
59
- return getOperatingStatusModificationValues(modificationValues, withFormat);
59
+ return getOperatingStatusModificationValues(modificationValues, formatBold);
60
60
  case MODIFICATION_TYPES.EQUIPMENT_ATTRIBUTE_MODIFICATION.type:
61
- return getEquipmentAttributeModificationValues(modificationValues, withFormat);
61
+ return getEquipmentAttributeModificationValues(modificationValues, formatBold);
62
62
  default:
63
- return {
64
- computedLabel: withFormat ? /* @__PURE__ */ jsx("strong", { children: getLabel(modif) }) : getLabel(modif)
65
- };
63
+ return { computedLabel: formatBold ? /* @__PURE__ */ jsx("strong", { children: getLabel(modif) }) : getLabel(modif) };
66
64
  }
67
65
  },
68
66
  [getLabel]
@@ -1,5 +1,5 @@
1
- import { EquipmentType } from '../utils';
2
- import { PredefinedProperties } from '../utils/types/types';
3
1
  import { Dispatch, SetStateAction } from 'react';
2
+ import { PredefinedProperties } from '../utils/types/types';
3
+ import { EquipmentType } from '../utils';
4
4
 
5
5
  export declare const usePredefinedProperties: (initialType: EquipmentType | null) => [PredefinedProperties, Dispatch<SetStateAction<EquipmentType | null>>];
@@ -1,5 +1,5 @@
1
- import { ElementAttributes } from '../utils/types/types';
2
1
  import { UUID } from 'crypto';
2
+ import { ElementAttributes } from '../utils/types/types';
3
3
 
4
4
  export declare function fetchRootFolders(types: string[]): Promise<ElementAttributes[]>;
5
5
  export declare function fetchDirectoryContent(directoryUuid: UUID, types?: string[]): Promise<ElementAttributes[]>;
@@ -1,6 +1,6 @@
1
- import { NewFilterType } from '../components/filter/filter.type';
2
- import { ElementAttributes } from '../utils/types/types';
3
1
  import { UUID } from 'crypto';
2
+ import { ElementAttributes } from '../utils/types/types';
3
+ import { NewFilterType } from '../components/filter/filter.type';
4
4
 
5
5
  export declare function createFilter(newFilter: NewFilterType, name: string, description: string, parentDirectoryUuid: UUID | undefined | null, token?: string): Promise<Response>;
6
6
  export declare function saveFilter(filter: NewFilterType, name: string, description: string, token?: string): Promise<Response>;
@@ -33,7 +33,7 @@ const topBarEn = {
33
33
  "user-information-dialog/used": "Used",
34
34
  "user-information-dialog/number-of-builds-per-study": "Number of builds per study",
35
35
  "user-settings-dialog/title": "User settings",
36
- "user-settings-dialog/label-developer-mode": "Enable developer mode",
36
+ "user-settings-dialog/label-developer-mode": "Developer mode",
37
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
38
  "user-settings-dialog/close": "Close"
39
39
  };
@@ -33,7 +33,7 @@ const topBarFr = {
33
33
  "user-information-dialog/used": "Utilisé",
34
34
  "user-information-dialog/number-of-builds-per-study": "Nombre réalisations par étude",
35
35
  "user-settings-dialog/title": "Paramètres utilisateur",
36
- "user-settings-dialog/label-developer-mode": "Activer le mode développeur",
36
+ "user-settings-dialog/label-developer-mode": "Mode développeur",
37
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
38
  "user-settings-dialog/close": "Fermer"
39
39
  };
@@ -1,4 +1,4 @@
1
- import { ElementType } from '../types/elementType';
2
1
  import { SxProps, Theme } from '@mui/material';
2
+ import { ElementType } from '../types/elementType';
3
3
 
4
4
  export declare function getFileIcon(type: ElementType, style: SxProps<Theme>): import("react/jsx-runtime").JSX.Element | undefined;
@@ -1,5 +1,5 @@
1
- import { ElementType } from './elementType';
2
1
  import { UUID } from 'crypto';
2
+ import { ElementType } from './elementType';
3
3
 
4
4
  export type Input = string | number;
5
5
  export type ElementAttributes = {