@gridsuite/commons-ui 0.83.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_mocks_/svg.d.ts +1 -1
- package/dist/components/authentication/AuthenticationRouter.js +1 -1
- package/dist/components/authentication/Login.js +1 -5
- package/dist/components/authentication/authenticationType.d.ts +3 -3
- package/dist/components/authentication/utils/authService.d.ts +3 -3
- package/dist/components/cardErrorBoundary/CardErrorBoundary.d.ts +1 -1
- package/dist/components/checkBoxList/checkBoxList.type.d.ts +7 -8
- package/dist/components/contingencyList/criteriaBased/CriteriaBasedForm.d.ts +1 -1
- package/dist/components/contingencyList/criteriaBased/criteriaBasedUtils.d.ts +3 -3
- package/dist/components/customAGGrid/customAggrid.d.ts +1 -1
- package/dist/components/customAGGrid/customAggrid.js +1 -2
- package/dist/components/customAGGrid/customAggrid.style.d.ts +2 -2
- package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.d.ts +2 -2
- package/dist/components/dialogs/modifyElementSelection/ModifyElementSelection.d.ts +1 -1
- package/dist/components/directoryItemSelector/DirectoryItemSelector.d.ts +2 -2
- package/dist/components/elementSearch/elementItem/EquipmentItem.d.ts +2 -2
- package/dist/components/elementSearch/elementSearchInput/ElementSearchInput.d.ts +1 -1
- package/dist/components/elementSearch/tagRenderer/TagRenderer.d.ts +1 -1
- package/dist/components/filter/FilterCreationDialog.d.ts +1 -1
- package/dist/components/filter/FilterCreationDialog.js +1 -1
- package/dist/components/filter/HeaderFilterForm.d.ts +2 -2
- package/dist/components/filter/expert/ExpertFilterForm.js +2 -3
- package/dist/components/filter/expert/expertFilter.type.d.ts +2 -2
- package/dist/components/filter/expert/expertFilterConstants.d.ts +2 -2
- package/dist/components/filter/expert/expertFilterConstants.js +1 -1
- package/dist/components/filter/expert/expertFilterUtils.d.ts +3 -75
- package/dist/components/filter/expert/expertFilterUtils.js +3 -4
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +3 -3
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +2 -1
- package/dist/components/filter/filter.type.d.ts +4 -4
- package/dist/components/filter/utils/filterFormUtils.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +2 -7
- package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -2
- package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js +1 -1
- package/dist/components/inputs/reactHookForm/numbers/RangeInput.d.ts +2 -3
- package/dist/components/inputs/reactHookForm/numbers/SliderInput.d.ts +2 -2
- package/dist/components/inputs/reactHookForm/numbers/SliderInput.js +26 -3
- package/dist/components/inputs/reactHookForm/provider/CustomFormProvider.d.ts +2 -2
- package/dist/components/inputs/reactHookForm/provider/CustomFormProvider.js +1 -5
- package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/text/ExpandingTextField.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/text/TextInput.d.ts +3 -3
- package/dist/components/inputs/reactHookForm/text/TextInput.js +2 -2
- package/dist/components/inputs/reactHookForm/text/UniqueNameInput.d.ts +2 -2
- package/dist/components/inputs/reactHookForm/utils/TextFieldWithAdornment.d.ts +1 -1
- package/dist/components/inputs/reactQueryBuilder/AutocompleteWithFavorites.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/CustomReactQueryBuilder.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/PropertyValueEditor.d.ts +1 -1
- package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.d.ts +1 -1
- package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.d.ts +1 -1
- package/dist/components/notifications/contexts/NotificationsContext.d.ts +0 -1
- package/dist/components/notifications/hooks/useListenerManager.d.ts +1 -1
- package/dist/components/notifications/hooks/useNotificationsListener.d.ts +3 -3
- package/dist/components/overflowableText/OverflowableText.d.ts +4 -4
- package/dist/components/topBar/AboutDialog.js +1 -1
- package/dist/components/topBar/GridLogo.d.ts +1 -1
- package/dist/components/topBar/TopBar.d.ts +7 -7
- package/dist/components/topBar/TopBar.js +1 -5
- package/dist/components/topBar/UserInformationDialog.js +1 -2
- package/dist/components/topBar/UserSettingsDialog.d.ts +1 -1
- package/dist/components/topBar/UserSettingsDialog.js +17 -14
- package/dist/components/treeViewFinder/TreeViewFinder.d.ts +3 -3
- package/dist/components/treeViewFinder/TreeViewFinder.js +2 -3
- package/dist/hooks/useIntlRef.d.ts +1 -2
- package/dist/hooks/useLocalizedCountries.js +1 -1
- package/dist/hooks/useModificationLabelComputer.d.ts +1 -1
- package/dist/hooks/useModificationLabelComputer.js +8 -10
- package/dist/hooks/usePredefinedProperties.d.ts +2 -2
- package/dist/services/directory.d.ts +1 -1
- package/dist/services/explore.d.ts +2 -2
- package/dist/translations/en/topBarEn.js +1 -1
- package/dist/translations/fr/topBarFr.js +1 -1
- package/dist/utils/mapper/getFileIcon.d.ts +1 -1
- package/dist/utils/types/types.d.ts +1 -1
- 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
|
|
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 {
|
|
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;
|
|
@@ -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,
|
|
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,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;
|
|
@@ -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
|
|
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?: (
|
|
9
|
-
listenerCallbackOnReopen?: (
|
|
10
|
-
propsId?: string
|
|
8
|
+
listenerCallbackMessage?: (event: MessageEvent) => void;
|
|
9
|
+
listenerCallbackOnReopen?: () => void;
|
|
10
|
+
propsId?: string;
|
|
11
11
|
}) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { BoxProps, SxProps, Theme } from '@mui/material';
|
|
3
|
-
import {
|
|
3
|
+
import { Style } from 'node:util';
|
|
4
4
|
|
|
5
5
|
export interface OverflowableTextProps extends BoxProps {
|
|
6
|
-
text?:
|
|
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(
|
|
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,
|
|
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,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
|
|
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
|
|
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
|
|
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 = (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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(
|
|
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/
|
|
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 {
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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,
|
|
6
|
+
const getOperatingStatusModificationValues = (modification, formatBold) => {
|
|
7
7
|
return {
|
|
8
8
|
action: modification.action,
|
|
9
9
|
energizedEnd: modification.energizedVoltageLevelId,
|
|
10
|
-
computedLabel:
|
|
10
|
+
computedLabel: formatBold ? /* @__PURE__ */ jsx("strong", { children: modification.equipmentId }) : modification.equipmentId
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
const getEquipmentAttributeModificationValues = (modification,
|
|
13
|
+
const getEquipmentAttributeModificationValues = (modification, formatBold) => {
|
|
14
14
|
return {
|
|
15
15
|
equipmentAttributeName: modification.equipmentAttributeName,
|
|
16
16
|
equipmentAttributeValue: modification.equipmentAttributeValue,
|
|
17
|
-
computedLabel:
|
|
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,
|
|
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,
|
|
59
|
+
return getOperatingStatusModificationValues(modificationValues, formatBold);
|
|
60
60
|
case MODIFICATION_TYPES.EQUIPMENT_ATTRIBUTE_MODIFICATION.type:
|
|
61
|
-
return getEquipmentAttributeModificationValues(modificationValues,
|
|
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": "
|
|
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": "
|
|
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;
|