@gridsuite/commons-ui 0.278.0 → 0.279.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 (44) hide show
  1. package/dist/features/index.d.ts +1 -0
  2. package/dist/features/index.js +6 -0
  3. package/dist/features/side-bar/AppSideBar.d.ts +27 -0
  4. package/dist/features/side-bar/AppSideBar.js +102 -0
  5. package/dist/features/side-bar/AppSideBarHeader.d.ts +11 -0
  6. package/dist/features/side-bar/AppSideBarHeader.js +54 -0
  7. package/dist/features/side-bar/dialogs/AppSideBarDialogProvider.d.ts +14 -0
  8. package/dist/features/side-bar/dialogs/AppSideBarDialogProvider.js +36 -0
  9. package/dist/features/side-bar/dialogs/AppSideBarDialogs.d.ts +14 -0
  10. package/dist/features/side-bar/dialogs/AppSideBarDialogs.js +56 -0
  11. package/dist/features/side-bar/footer/AppSideBarFooter.d.ts +15 -0
  12. package/dist/features/side-bar/footer/AppSideBarFooter.js +60 -0
  13. package/dist/features/side-bar/footer/applications/ApplicationMenu.d.ts +5 -0
  14. package/dist/features/side-bar/footer/applications/ApplicationMenu.js +83 -0
  15. package/dist/features/side-bar/footer/applications/OtherAppRedirection.d.ts +6 -0
  16. package/dist/features/side-bar/footer/applications/OtherAppRedirection.js +105 -0
  17. package/dist/features/side-bar/footer/common/MinimizedSubMenuHeader.d.ts +9 -0
  18. package/dist/features/side-bar/footer/common/MinimizedSubMenuHeader.js +22 -0
  19. package/dist/features/side-bar/footer/common/SideBarMenuItem.d.ts +10 -0
  20. package/dist/features/side-bar/footer/common/SideBarMenuItem.js +76 -0
  21. package/dist/features/side-bar/footer/common/submenu-footer.style.d.ts +23 -0
  22. package/dist/features/side-bar/footer/common/submenu-footer.style.js +20 -0
  23. package/dist/features/side-bar/footer/profile/ProfileInfos.d.ts +4 -0
  24. package/dist/features/side-bar/footer/profile/ProfileInfos.js +32 -0
  25. package/dist/features/side-bar/footer/profile/ProfileMenu.d.ts +7 -0
  26. package/dist/features/side-bar/footer/profile/ProfileMenu.js +95 -0
  27. package/dist/features/side-bar/footer/profile/UserIcon.d.ts +9 -0
  28. package/dist/features/side-bar/footer/profile/UserIcon.js +33 -0
  29. package/dist/features/side-bar/footer/settings/DarkModeToggle.d.ts +7 -0
  30. package/dist/features/side-bar/footer/settings/DarkModeToggle.js +74 -0
  31. package/dist/features/side-bar/footer/settings/LanguageSelection.d.ts +8 -0
  32. package/dist/features/side-bar/footer/settings/LanguageSelection.js +75 -0
  33. package/dist/features/side-bar/footer/settings/SettingsMenu.d.ts +10 -0
  34. package/dist/features/side-bar/footer/settings/SettingsMenu.js +112 -0
  35. package/dist/features/side-bar/index.d.ts +7 -0
  36. package/dist/features/side-bar/index.js +4 -0
  37. package/dist/features/topBar/index.d.ts +2 -0
  38. package/dist/features/topBar/index.js +5 -1
  39. package/dist/index.js +6 -0
  40. package/dist/translations/en/topBarEn.d.ts +7 -0
  41. package/dist/translations/en/topBarEn.js +7 -0
  42. package/dist/translations/fr/topBarFr.d.ts +7 -0
  43. package/dist/translations/fr/topBarFr.js +7 -0
  44. package/package.json +1 -1
@@ -8,6 +8,7 @@ export * from './authentication';
8
8
  export * from './cardErrorBoundary';
9
9
  export * from './notifications';
10
10
  export * from './topBar';
11
+ export * from './side-bar';
11
12
  export * from './parameters';
12
13
  export * from './network-modifications';
13
14
  export * from './node';
@@ -18,6 +18,9 @@ import { AboutDialog } from "./topBar/AboutDialog.js";
18
18
  import { GridLogo, LogoText } from "./topBar/GridLogo.js";
19
19
  import { DevModeBanner } from "./topBar/DevModeBanner.js";
20
20
  import { TopBar } from "./topBar/TopBar.js";
21
+ import { default as default3 } from "./topBar/UserInformationDialog.js";
22
+ import { default as default4 } from "./topBar/UserSettingsDialog.js";
23
+ import { AppSideBar } from "./side-bar/AppSideBar.js";
21
24
  import { ParameterLayout } from "./parameters/common/parameter-layout/parameter-layout.js";
22
25
  import { ParameterLayoutProvider, useParameterLayoutContext } from "./parameters/common/parameter-layout/parameter-layout-provider.js";
23
26
  import { formatComputingTypeLabel, isValidComputingType } from "./parameters/common/computing-type.js";
@@ -315,6 +318,7 @@ export {
315
318
  ActivePowerControlForm,
316
319
  AnnouncementBanner,
317
320
  AnnouncementNotification,
321
+ AppSideBar,
318
322
  DataType as AssignmentDataType,
319
323
  AuthenticationRouter,
320
324
  default2 as AuthenticationRouterErrorDisplay,
@@ -671,7 +675,9 @@ export {
671
675
  UPDATE_BUS_VOLTAGE,
672
676
  USE_REACTIVE_LIMITS,
673
677
  UnauthorizedAccessAlert,
678
+ default3 as UserInformationDialog,
674
679
  UserManagerMock,
680
+ default4 as UserSettingsDialog,
675
681
  VARIABLE_Q_GENERATORS,
676
682
  VARIABLE_SHUNT_COMPENSATORS,
677
683
  VARIABLE_TRANSFORMERS,
@@ -0,0 +1,27 @@
1
+ import { Breakpoint, Theme } from '@mui/material';
2
+ import { UserProfile } from 'oidc-client-ts';
3
+ import { ReactNode } from 'react';
4
+ import { GridSuiteModule } from '../topBar';
5
+ import { GsLang, GsTheme, Metadata } from '../../utils';
6
+ type SideBarProps = {
7
+ sideBarTheme: Theme;
8
+ isDeveloperMode: boolean;
9
+ smallScreenBreakpoint: number | Breakpoint;
10
+ handleChangeDeveloperMode: (newValue: boolean) => void;
11
+ currentTheme: GsTheme;
12
+ setTheme: (newTheme: GsTheme) => void;
13
+ selectedLanguage: GsLang;
14
+ setSelectedLanguage: (newSelectedLanguage: GsLang) => void;
15
+ userProfile?: UserProfile;
16
+ appsAndUrls: Metadata[];
17
+ onLogoutClick?: () => void;
18
+ appName: string;
19
+ appNameColor: string;
20
+ appLogo: ReactNode;
21
+ appLicense?: string;
22
+ appVersion?: string;
23
+ globalVersionPromise: () => Promise<string>;
24
+ additionalModulesPromise: () => Promise<GridSuiteModule[]>;
25
+ };
26
+ export declare function AppSideBar({ sideBarTheme, isDeveloperMode, smallScreenBreakpoint, handleChangeDeveloperMode, currentTheme, setTheme, selectedLanguage, setSelectedLanguage, userProfile, appsAndUrls, appName, appNameColor, appLogo, appLicense, appVersion, globalVersionPromise, additionalModulesPromise, onLogoutClick, }: Readonly<SideBarProps>): import("react").JSX.Element;
27
+ export {};
@@ -0,0 +1,102 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useMediaQuery, ThemeProvider, ScopedCssBaseline, Stack, Box } from "@mui/material";
3
+ import { useState, useEffect } from "react";
4
+ import { AppSideBarHeader } from "./AppSideBarHeader.js";
5
+ import { AppSideBarFooter } from "./footer/AppSideBarFooter.js";
6
+ import { AppSideBarDialogProvider } from "./dialogs/AppSideBarDialogProvider.js";
7
+ import { AppSideBarDialogs } from "./dialogs/AppSideBarDialogs.js";
8
+ function AppSideBar({
9
+ sideBarTheme,
10
+ isDeveloperMode,
11
+ smallScreenBreakpoint,
12
+ handleChangeDeveloperMode,
13
+ currentTheme,
14
+ setTheme,
15
+ selectedLanguage,
16
+ setSelectedLanguage,
17
+ userProfile,
18
+ appsAndUrls,
19
+ appName,
20
+ appNameColor,
21
+ appLogo,
22
+ appLicense,
23
+ appVersion,
24
+ globalVersionPromise,
25
+ additionalModulesPromise,
26
+ onLogoutClick
27
+ }) {
28
+ const [isMinimized, setIsMinimized] = useState(true);
29
+ const toggleSideBarMinimized = () => {
30
+ setIsMinimized((previousIsSideBarMinimized) => !previousIsSideBarMinimized);
31
+ };
32
+ const isSmallScreen = useMediaQuery((theme) => theme.breakpoints.down(smallScreenBreakpoint));
33
+ useEffect(() => {
34
+ if (isSmallScreen) {
35
+ setIsMinimized(true);
36
+ }
37
+ }, [isSmallScreen]);
38
+ return /* @__PURE__ */ jsxs(AppSideBarDialogProvider, { children: [
39
+ /* @__PURE__ */ jsx(
40
+ AppSideBarDialogs,
41
+ {
42
+ appLicense,
43
+ appVersion,
44
+ additionalModulesPromise,
45
+ globalVersionPromise,
46
+ appName,
47
+ userProfile,
48
+ isDeveloperMode,
49
+ handleChangeDeveloperMode
50
+ }
51
+ ),
52
+ /* @__PURE__ */ jsx(ThemeProvider, { theme: sideBarTheme, children: /* @__PURE__ */ jsx(ScopedCssBaseline, { children: /* @__PURE__ */ jsxs(
53
+ Stack,
54
+ {
55
+ component: "aside",
56
+ sx: {
57
+ width: isMinimized ? 64 : 224,
58
+ height: "100%"
59
+ },
60
+ children: [
61
+ /* @__PURE__ */ jsx(
62
+ AppSideBarHeader,
63
+ {
64
+ isMinimized,
65
+ isLoggedIn: !!userProfile,
66
+ appName,
67
+ appNameColor,
68
+ appLogo,
69
+ appVersion
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx(
73
+ Box,
74
+ {
75
+ sx: {
76
+ flex: 1
77
+ }
78
+ }
79
+ ),
80
+ /* @__PURE__ */ jsx(
81
+ AppSideBarFooter,
82
+ {
83
+ isMinimized,
84
+ isSmallScreen,
85
+ toggleSideBarMinimized,
86
+ currentTheme,
87
+ setTheme,
88
+ selectedLanguage,
89
+ setSelectedLanguage,
90
+ userProfile,
91
+ appsAndUrls,
92
+ onLogoutClick
93
+ }
94
+ )
95
+ ]
96
+ }
97
+ ) }) })
98
+ ] });
99
+ }
100
+ export {
101
+ AppSideBar
102
+ };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ interface AppSideBarHeaderProps {
3
+ isMinimized: boolean;
4
+ isLoggedIn: boolean;
5
+ appName: string;
6
+ appNameColor: string;
7
+ appLogo: ReactNode;
8
+ appVersion?: string;
9
+ }
10
+ export declare function AppSideBarHeader({ isMinimized, isLoggedIn, appName, appNameColor, appLogo, appVersion, }: Readonly<AppSideBarHeaderProps>): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,54 @@
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { Stack, Typography, Box, Tooltip, IconButton, Divider } from "@mui/material";
3
+ import { Info } from "@mui/icons-material";
4
+ import { useAppSideBarDialogs, SideBarDialogType } from "./dialogs/AppSideBarDialogProvider.js";
5
+ function AppSideBarHeader({
6
+ isMinimized,
7
+ isLoggedIn,
8
+ appName,
9
+ appNameColor,
10
+ appLogo,
11
+ appVersion
12
+ }) {
13
+ const { setOpenDialog } = useAppSideBarDialogs();
14
+ return /* @__PURE__ */ jsxs(
15
+ Stack,
16
+ {
17
+ sx: {
18
+ px: 1.5,
19
+ pt: 3
20
+ },
21
+ spacing: 1,
22
+ children: [
23
+ /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: isMinimized ? "center" : "flex-start", children: [
24
+ appLogo,
25
+ !isMinimized && /* @__PURE__ */ jsxs(Typography, { variant: "h6", children: [
26
+ "Grid",
27
+ /* @__PURE__ */ jsx(Box, { component: "span", sx: { color: appNameColor }, children: appName })
28
+ ] })
29
+ ] }),
30
+ /* @__PURE__ */ jsx(
31
+ Stack,
32
+ {
33
+ direction: "row",
34
+ visibility: isLoggedIn ? "inherit" : "hidden",
35
+ alignItems: "center",
36
+ justifyContent: isMinimized ? "center" : "end",
37
+ spacing: 1,
38
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
39
+ !isMinimized && /* @__PURE__ */ jsxs(Typography, { variant: "caption", children: [
40
+ "V",
41
+ appVersion
42
+ ] }),
43
+ /* @__PURE__ */ jsx(Tooltip, { title: `V${appVersion}`, disableHoverListener: !isMinimized, children: /* @__PURE__ */ jsx(IconButton, { sx: { padding: 0 }, onClick: () => setOpenDialog(SideBarDialogType.ABOUT), children: /* @__PURE__ */ jsx(Info, { fontSize: "small", color: "disabled" }) }) })
44
+ ] })
45
+ }
46
+ ),
47
+ /* @__PURE__ */ jsx(Divider, {})
48
+ ]
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ AppSideBarHeader
54
+ };
@@ -0,0 +1,14 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare enum SideBarDialogType {
3
+ ABOUT = "ABOUT",
4
+ PROFILE = "PROFILE",
5
+ PROFILE_SETTINGS = "PROFILE_SETTINGS"
6
+ }
7
+ type AppSideBarDialogContextValue = {
8
+ openDialog: SideBarDialogType | null;
9
+ setOpenDialog: (dialog: SideBarDialogType) => void;
10
+ closeDialog: () => void;
11
+ };
12
+ export declare function AppSideBarDialogProvider({ children }: Readonly<PropsWithChildren>): import("react").JSX.Element;
13
+ export declare function useAppSideBarDialogs(): AppSideBarDialogContextValue;
14
+ export {};
@@ -0,0 +1,36 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext, useState, useCallback, useMemo, useContext } from "react";
3
+ var SideBarDialogType = /* @__PURE__ */ ((SideBarDialogType2) => {
4
+ SideBarDialogType2["ABOUT"] = "ABOUT";
5
+ SideBarDialogType2["PROFILE"] = "PROFILE";
6
+ SideBarDialogType2["PROFILE_SETTINGS"] = "PROFILE_SETTINGS";
7
+ return SideBarDialogType2;
8
+ })(SideBarDialogType || {});
9
+ const AppSideBarDialogContext = createContext(void 0);
10
+ function AppSideBarDialogProvider({ children }) {
11
+ const [openDialog, setOpenDialog] = useState(null);
12
+ const closeDialog = useCallback(() => {
13
+ setOpenDialog(null);
14
+ }, []);
15
+ const contextValue = useMemo(
16
+ () => ({
17
+ openDialog,
18
+ setOpenDialog,
19
+ closeDialog
20
+ }),
21
+ [closeDialog, openDialog]
22
+ );
23
+ return /* @__PURE__ */ jsx(AppSideBarDialogContext.Provider, { value: contextValue, children });
24
+ }
25
+ function useAppSideBarDialogs() {
26
+ const dialogs = useContext(AppSideBarDialogContext);
27
+ if (!dialogs) {
28
+ throw new Error("useAppSideBarDialogs must be used within an AppSideBarDialogProvider");
29
+ }
30
+ return dialogs;
31
+ }
32
+ export {
33
+ AppSideBarDialogProvider,
34
+ SideBarDialogType,
35
+ useAppSideBarDialogs
36
+ };
@@ -0,0 +1,14 @@
1
+ import { UserProfile } from 'oidc-client-ts';
2
+ import { GridSuiteModule } from '../../topBar';
3
+ type AppSideBarDialogsProps = {
4
+ isDeveloperMode: boolean;
5
+ handleChangeDeveloperMode: (newValue: boolean) => void;
6
+ userProfile?: UserProfile;
7
+ appName: string;
8
+ appLicense?: string;
9
+ appVersion?: string;
10
+ globalVersionPromise: () => Promise<string>;
11
+ additionalModulesPromise: () => Promise<GridSuiteModule[]>;
12
+ };
13
+ export declare function AppSideBarDialogs({ appLicense, appVersion, additionalModulesPromise, globalVersionPromise, appName, userProfile, isDeveloperMode, handleChangeDeveloperMode, }: Readonly<AppSideBarDialogsProps>): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1,56 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { AboutDialog } from "../../topBar/AboutDialog.js";
3
+ import "@mui/material";
4
+ import "@mui/icons-material";
5
+ import "react";
6
+ import "react-intl";
7
+ import "../../topBar/TopBar.js";
8
+ import UserInformationDialog from "../../topBar/UserInformationDialog.js";
9
+ import UserSettingsDialog from "../../topBar/UserSettingsDialog.js";
10
+ import { useAppSideBarDialogs, SideBarDialogType } from "./AppSideBarDialogProvider.js";
11
+ function AppSideBarDialogs({
12
+ appLicense,
13
+ appVersion,
14
+ additionalModulesPromise,
15
+ globalVersionPromise,
16
+ appName,
17
+ userProfile,
18
+ isDeveloperMode,
19
+ handleChangeDeveloperMode
20
+ }) {
21
+ const { openDialog, closeDialog } = useAppSideBarDialogs();
22
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
23
+ /* @__PURE__ */ jsx(
24
+ AboutDialog,
25
+ {
26
+ appLicense,
27
+ appVersion,
28
+ open: openDialog === SideBarDialogType.ABOUT,
29
+ onClose: closeDialog,
30
+ additionalModulesPromise,
31
+ globalVersionPromise,
32
+ appName
33
+ }
34
+ ),
35
+ /* @__PURE__ */ jsx(
36
+ UserInformationDialog,
37
+ {
38
+ openDialog: openDialog === SideBarDialogType.PROFILE,
39
+ onClose: closeDialog,
40
+ userProfile: userProfile ?? void 0
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx(
44
+ UserSettingsDialog,
45
+ {
46
+ openDialog: openDialog === SideBarDialogType.PROFILE_SETTINGS,
47
+ onClose: closeDialog,
48
+ developerMode: isDeveloperMode,
49
+ onDeveloperModeClick: handleChangeDeveloperMode
50
+ }
51
+ )
52
+ ] });
53
+ }
54
+ export {
55
+ AppSideBarDialogs
56
+ };
@@ -0,0 +1,15 @@
1
+ import { UserProfile } from 'oidc-client-ts';
2
+ import { GsLang, GsTheme, Metadata } from '../../../utils';
3
+ export interface AppSideBarFooterProps {
4
+ isMinimized: boolean;
5
+ isSmallScreen: boolean;
6
+ toggleSideBarMinimized: () => void;
7
+ currentTheme: GsTheme;
8
+ setTheme: (newTheme: GsTheme) => void;
9
+ selectedLanguage: GsLang;
10
+ setSelectedLanguage: (newSelectedLanguage: GsLang) => void;
11
+ userProfile?: UserProfile;
12
+ appsAndUrls: Metadata[];
13
+ onLogoutClick?: () => void;
14
+ }
15
+ export declare function AppSideBarFooter({ isMinimized, isSmallScreen, toggleSideBarMinimized, currentTheme, setTheme, selectedLanguage, setSelectedLanguage, userProfile, appsAndUrls, onLogoutClick, }: Readonly<AppSideBarFooterProps>): import("react").JSX.Element;
@@ -0,0 +1,60 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { Stack, MenuList, Divider } from "@mui/material";
3
+ import { Logout, KeyboardDoubleArrowRight, KeyboardDoubleArrowLeft } from "@mui/icons-material";
4
+ import { ApplicationMenu } from "./applications/ApplicationMenu.js";
5
+ import { SideBarMenuItem } from "./common/SideBarMenuItem.js";
6
+ import { ProfileMenu } from "./profile/ProfileMenu.js";
7
+ import { SettingsMenu } from "./settings/SettingsMenu.js";
8
+ function AppSideBarFooter({
9
+ isMinimized,
10
+ isSmallScreen,
11
+ toggleSideBarMinimized,
12
+ currentTheme,
13
+ setTheme,
14
+ selectedLanguage,
15
+ setSelectedLanguage,
16
+ userProfile,
17
+ appsAndUrls,
18
+ onLogoutClick
19
+ }) {
20
+ const isUserLoggedIn = !!userProfile;
21
+ return /* @__PURE__ */ jsx(Stack, { p: 1, children: /* @__PURE__ */ jsxs(MenuList, { disablePadding: true, children: [
22
+ isUserLoggedIn && /* @__PURE__ */ jsxs(Fragment, { children: [
23
+ /* @__PURE__ */ jsx(ApplicationMenu, { isMinimized, appsAndUrls }),
24
+ /* @__PURE__ */ jsx(ProfileMenu, { isMinimized, userProfile }),
25
+ /* @__PURE__ */ jsx(
26
+ SettingsMenu,
27
+ {
28
+ isMinimized,
29
+ currentTheme,
30
+ setTheme,
31
+ selectedLanguage,
32
+ setSelectedLanguage
33
+ }
34
+ ),
35
+ /* @__PURE__ */ jsx(
36
+ SideBarMenuItem,
37
+ {
38
+ label: "top-bar/logout",
39
+ icon: /* @__PURE__ */ jsx(Logout, {}),
40
+ onClick: onLogoutClick,
41
+ showLabel: !isMinimized
42
+ }
43
+ )
44
+ ] }),
45
+ /* @__PURE__ */ jsx(Divider, {}),
46
+ /* @__PURE__ */ jsx(
47
+ SideBarMenuItem,
48
+ {
49
+ label: "top-bar/minimize",
50
+ icon: isMinimized ? /* @__PURE__ */ jsx(KeyboardDoubleArrowRight, {}) : /* @__PURE__ */ jsx(KeyboardDoubleArrowLeft, {}),
51
+ onClick: toggleSideBarMinimized,
52
+ showLabel: !isMinimized,
53
+ disabled: isSmallScreen
54
+ }
55
+ )
56
+ ] }) });
57
+ }
58
+ export {
59
+ AppSideBarFooter
60
+ };
@@ -0,0 +1,5 @@
1
+ import { Metadata } from '../../../../utils';
2
+ export declare function ApplicationMenu({ isMinimized, appsAndUrls, }: Readonly<{
3
+ isMinimized: boolean;
4
+ appsAndUrls: Metadata[];
5
+ }>): import("react").JSX.Element;
@@ -0,0 +1,83 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Apps } from "@mui/icons-material";
3
+ import { useIntl } from "react-intl";
4
+ import { OtherAppRedirection } from "./OtherAppRedirection.js";
5
+ import { MinimizedSubMenuHeader } from "../common/MinimizedSubMenuHeader.js";
6
+ import { submenuFooterStyle } from "../common/submenu-footer.style.js";
7
+ import "@mui/material";
8
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
9
+ import "../../../../utils/conversionUtils.js";
10
+ import "../../../../utils/types/equipmentType.js";
11
+ import "react";
12
+ import "react-hook-form";
13
+ import "localized-countries";
14
+ import "localized-countries/data/fr";
15
+ import "localized-countries/data/en";
16
+ import "notistack";
17
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
18
+ import "yup";
19
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
20
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
21
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
22
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
23
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
24
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
25
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
26
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
27
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
28
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
29
+ import "@hello-pangea/dnd";
30
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
31
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
32
+ import { CustomNestedMenuItem } from "../../../../components/ui/menus/custom-nested-menu.js";
33
+ import "react-resizable-panels";
34
+ import "react-papaparse";
35
+ import "react-dom";
36
+ import "autosuggest-highlight/match";
37
+ import "autosuggest-highlight/parse";
38
+ import "clsx";
39
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
40
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
41
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
42
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
43
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
44
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
45
+ import "react-querybuilder";
46
+ import "uuid";
47
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
48
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
49
+ import "@react-querybuilder/material";
50
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
51
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
52
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
53
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
54
+ import "ag-grid-community";
55
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
56
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
57
+ import "mathjs";
58
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
59
+ import "react-window";
60
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
61
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
62
+ function ApplicationMenu({
63
+ isMinimized,
64
+ appsAndUrls
65
+ }) {
66
+ const intl = useIntl();
67
+ const applicationLabel = intl.formatMessage({ id: "top-bar/myApps" });
68
+ return /* @__PURE__ */ jsxs(
69
+ CustomNestedMenuItem,
70
+ {
71
+ label: !isMinimized ? applicationLabel : "",
72
+ leftIcon: /* @__PURE__ */ jsx(Apps, {}),
73
+ sx: submenuFooterStyle.subMenu,
74
+ children: [
75
+ isMinimized && /* @__PURE__ */ jsx(MinimizedSubMenuHeader, { label: applicationLabel }),
76
+ appsAndUrls?.filter((item) => !item.hiddenInAppsMenu).map((item) => /* @__PURE__ */ jsx(OtherAppRedirection, { app: item }, item.name))
77
+ ]
78
+ }
79
+ );
80
+ }
81
+ export {
82
+ ApplicationMenu
83
+ };
@@ -0,0 +1,6 @@
1
+ import { Metadata } from '../../../../utils';
2
+ interface OtherAppRedirectionProps {
3
+ app: Metadata;
4
+ }
5
+ export declare function OtherAppRedirection({ app }: Readonly<OtherAppRedirectionProps>): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,105 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Box, Stack, Typography } from "@mui/material";
3
+ import { OpenInNew } from "@mui/icons-material";
4
+ import "react-intl";
5
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
6
+ import "../../../../utils/conversionUtils.js";
7
+ import "../../../../utils/types/equipmentType.js";
8
+ import "react";
9
+ import "react-hook-form";
10
+ import "localized-countries";
11
+ import "localized-countries/data/fr";
12
+ import "localized-countries/data/en";
13
+ import "notistack";
14
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
15
+ import "yup";
16
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
17
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
18
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
19
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
20
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
21
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
22
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
23
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
24
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
25
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
26
+ import "@hello-pangea/dnd";
27
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
28
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
29
+ import { CustomMenuItem } from "../../../../components/ui/menus/custom-nested-menu.js";
30
+ import "react-resizable-panels";
31
+ import "react-papaparse";
32
+ import "react-dom";
33
+ import "autosuggest-highlight/match";
34
+ import "autosuggest-highlight/parse";
35
+ import "clsx";
36
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
37
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
38
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
39
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
40
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
41
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
42
+ import "react-querybuilder";
43
+ import "uuid";
44
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
45
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
46
+ import "@react-querybuilder/material";
47
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
48
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
49
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
50
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
51
+ import "ag-grid-community";
52
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
53
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
54
+ import "mathjs";
55
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
56
+ import "react-window";
57
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
58
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
59
+ import { submenuFooterStyle } from "../common/submenu-footer.style.js";
60
+ function OtherAppRedirection({ app }) {
61
+ return /* @__PURE__ */ jsx(CustomMenuItem, { sx: submenuFooterStyle.subMenuChildren, children: /* @__PURE__ */ jsx(
62
+ Box,
63
+ {
64
+ sx: {
65
+ textDecoration: "none",
66
+ color: "inherit"
67
+ },
68
+ component: "a",
69
+ href: app.url.toString(),
70
+ target: "_blank",
71
+ rel: "noopener noreferrer",
72
+ width: "100%",
73
+ children: /* @__PURE__ */ jsxs(
74
+ Stack,
75
+ {
76
+ spacing: 2,
77
+ direction: "row",
78
+ alignContent: "center",
79
+ alignItems: "center",
80
+ justifyContent: "space-between",
81
+ children: [
82
+ /* @__PURE__ */ jsxs(Typography, { children: [
83
+ "Grid",
84
+ /* @__PURE__ */ jsx(
85
+ Box,
86
+ {
87
+ component: "span",
88
+ style: {
89
+ color: app.appColor ?? "grey",
90
+ fontWeight: "bold"
91
+ },
92
+ children: app.name
93
+ }
94
+ )
95
+ ] }),
96
+ /* @__PURE__ */ jsx(OpenInNew, { sx: { display: "block" } })
97
+ ]
98
+ }
99
+ )
100
+ }
101
+ ) });
102
+ }
103
+ export {
104
+ OtherAppRedirection
105
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2026, 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 function MinimizedSubMenuHeader({ label }: Readonly<{
8
+ label: string;
9
+ }>): import("react").JSX.Element;