@gridsuite/commons-ui 0.277.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.
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.js +8 -2
- package/dist/features/network-modification-table/index.js +2 -2
- package/dist/features/network-modification-table/row/modification-row.js +68 -76
- package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +23 -14
- package/dist/features/network-modification-table/utils.d.ts +1 -3
- package/dist/features/network-modification-table/utils.js +9 -7
- package/dist/features/side-bar/AppSideBar.d.ts +27 -0
- package/dist/features/side-bar/AppSideBar.js +102 -0
- package/dist/features/side-bar/AppSideBarHeader.d.ts +11 -0
- package/dist/features/side-bar/AppSideBarHeader.js +54 -0
- package/dist/features/side-bar/dialogs/AppSideBarDialogProvider.d.ts +14 -0
- package/dist/features/side-bar/dialogs/AppSideBarDialogProvider.js +36 -0
- package/dist/features/side-bar/dialogs/AppSideBarDialogs.d.ts +14 -0
- package/dist/features/side-bar/dialogs/AppSideBarDialogs.js +56 -0
- package/dist/features/side-bar/footer/AppSideBarFooter.d.ts +15 -0
- package/dist/features/side-bar/footer/AppSideBarFooter.js +60 -0
- package/dist/features/side-bar/footer/applications/ApplicationMenu.d.ts +5 -0
- package/dist/features/side-bar/footer/applications/ApplicationMenu.js +83 -0
- package/dist/features/side-bar/footer/applications/OtherAppRedirection.d.ts +6 -0
- package/dist/features/side-bar/footer/applications/OtherAppRedirection.js +105 -0
- package/dist/features/side-bar/footer/common/MinimizedSubMenuHeader.d.ts +9 -0
- package/dist/features/side-bar/footer/common/MinimizedSubMenuHeader.js +22 -0
- package/dist/features/side-bar/footer/common/SideBarMenuItem.d.ts +10 -0
- package/dist/features/side-bar/footer/common/SideBarMenuItem.js +76 -0
- package/dist/features/side-bar/footer/common/submenu-footer.style.d.ts +23 -0
- package/dist/features/side-bar/footer/common/submenu-footer.style.js +20 -0
- package/dist/features/side-bar/footer/profile/ProfileInfos.d.ts +4 -0
- package/dist/features/side-bar/footer/profile/ProfileInfos.js +32 -0
- package/dist/features/side-bar/footer/profile/ProfileMenu.d.ts +7 -0
- package/dist/features/side-bar/footer/profile/ProfileMenu.js +95 -0
- package/dist/features/side-bar/footer/profile/UserIcon.d.ts +9 -0
- package/dist/features/side-bar/footer/profile/UserIcon.js +33 -0
- package/dist/features/side-bar/footer/settings/DarkModeToggle.d.ts +7 -0
- package/dist/features/side-bar/footer/settings/DarkModeToggle.js +74 -0
- package/dist/features/side-bar/footer/settings/LanguageSelection.d.ts +8 -0
- package/dist/features/side-bar/footer/settings/LanguageSelection.js +75 -0
- package/dist/features/side-bar/footer/settings/SettingsMenu.d.ts +10 -0
- package/dist/features/side-bar/footer/settings/SettingsMenu.js +112 -0
- package/dist/features/side-bar/index.d.ts +7 -0
- package/dist/features/side-bar/index.js +4 -0
- package/dist/features/topBar/index.d.ts +2 -0
- package/dist/features/topBar/index.js +5 -1
- package/dist/index.js +8 -2
- package/dist/translations/en/topBarEn.d.ts +7 -0
- package/dist/translations/en/topBarEn.js +7 -0
- package/dist/translations/fr/topBarFr.d.ts +7 -0
- package/dist/translations/fr/topBarFr.js +7 -0
- package/package.json +1 -1
|
@@ -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,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,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;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ListSubheader } from "@mui/material";
|
|
3
|
+
function MinimizedSubMenuHeader({ label }) {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
ListSubheader,
|
|
6
|
+
{
|
|
7
|
+
sx: {
|
|
8
|
+
backgroundImage: "var(--Paper-overlay)",
|
|
9
|
+
".MuiMenuItem-root, .MuiTypography-root": {
|
|
10
|
+
px: 1.5
|
|
11
|
+
// customize padding for text
|
|
12
|
+
},
|
|
13
|
+
px: 1.5
|
|
14
|
+
// customize padding for the whole menu item
|
|
15
|
+
},
|
|
16
|
+
children: label
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
MinimizedSubMenuHeader
|
|
22
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface SideBarMenuItemProps {
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
showLabel?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function SideBarMenuItem({ label, icon, onClick, showLabel, disabled, }: Readonly<SideBarMenuItemProps>): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Typography } from "@mui/material";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { submenuFooterStyle } from "./submenu-footer.style.js";
|
|
5
|
+
import "@mui/icons-material";
|
|
6
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
7
|
+
import "../../../../utils/conversionUtils.js";
|
|
8
|
+
import "../../../../utils/types/equipmentType.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import "react-hook-form";
|
|
11
|
+
import "localized-countries";
|
|
12
|
+
import "localized-countries/data/fr";
|
|
13
|
+
import "localized-countries/data/en";
|
|
14
|
+
import "notistack";
|
|
15
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
16
|
+
import "yup";
|
|
17
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
18
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
19
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
20
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
21
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
|
|
24
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
25
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
26
|
+
import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
27
|
+
import "@hello-pangea/dnd";
|
|
28
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
29
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
30
|
+
import { CustomMenuItem } from "../../../../components/ui/menus/custom-nested-menu.js";
|
|
31
|
+
import "react-resizable-panels";
|
|
32
|
+
import "react-papaparse";
|
|
33
|
+
import "react-dom";
|
|
34
|
+
import "autosuggest-highlight/match";
|
|
35
|
+
import "autosuggest-highlight/parse";
|
|
36
|
+
import "clsx";
|
|
37
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
38
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
39
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
40
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
41
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
42
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
43
|
+
import "react-querybuilder";
|
|
44
|
+
import "uuid";
|
|
45
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
46
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
47
|
+
import "@react-querybuilder/material";
|
|
48
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
49
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
50
|
+
import "../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
51
|
+
import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
52
|
+
import "ag-grid-community";
|
|
53
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
54
|
+
import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
55
|
+
import "mathjs";
|
|
56
|
+
import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
57
|
+
import "react-window";
|
|
58
|
+
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
59
|
+
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
60
|
+
function SideBarMenuItem({
|
|
61
|
+
label,
|
|
62
|
+
icon,
|
|
63
|
+
onClick,
|
|
64
|
+
showLabel = true,
|
|
65
|
+
disabled = false
|
|
66
|
+
}) {
|
|
67
|
+
const intl = useIntl();
|
|
68
|
+
return /* @__PURE__ */ jsxs(CustomMenuItem, { disabled, onClick, sx: submenuFooterStyle.subMenu, children: [
|
|
69
|
+
icon,
|
|
70
|
+
" ",
|
|
71
|
+
showLabel && /* @__PURE__ */ jsx(Typography, { px: 1, children: intl.formatMessage({ id: label }) })
|
|
72
|
+
] });
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
SideBarMenuItem
|
|
76
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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 const submenuFooterStyle: {
|
|
8
|
+
subMenu: {
|
|
9
|
+
pl: number;
|
|
10
|
+
mb: number;
|
|
11
|
+
color: string;
|
|
12
|
+
'&:hover': {
|
|
13
|
+
color: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
subMenuChildren: {
|
|
17
|
+
pl: number;
|
|
18
|
+
color: string;
|
|
19
|
+
'&:hover': {
|
|
20
|
+
color: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const submenuFooterStyle = {
|
|
2
|
+
subMenu: {
|
|
3
|
+
pl: 1.5,
|
|
4
|
+
mb: 0.5,
|
|
5
|
+
color: "inherit",
|
|
6
|
+
"&:hover": {
|
|
7
|
+
color: "inherit"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
subMenuChildren: {
|
|
11
|
+
pl: 2,
|
|
12
|
+
color: "inherit",
|
|
13
|
+
"&:hover": {
|
|
14
|
+
color: "inherit"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
submenuFooterStyle
|
|
20
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItem, Box, Divider } from "@mui/material";
|
|
3
|
+
import { Person } from "@mui/icons-material";
|
|
4
|
+
function ProfileInfos({ userProfile }) {
|
|
5
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6
|
+
/* @__PURE__ */ jsxs(
|
|
7
|
+
MenuItem,
|
|
8
|
+
{
|
|
9
|
+
sx: {
|
|
10
|
+
px: 1.5,
|
|
11
|
+
"&.Mui-disabled": {
|
|
12
|
+
opacity: 1
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
disabled: true,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Person, {}),
|
|
18
|
+
/* @__PURE__ */ jsxs(Box, { component: "span", px: 1, children: [
|
|
19
|
+
userProfile?.name,
|
|
20
|
+
" ",
|
|
21
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
22
|
+
/* @__PURE__ */ jsx(Box, { component: "span", children: userProfile?.email })
|
|
23
|
+
] })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ jsx(Divider, {})
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
ProfileInfos
|
|
32
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UserProfile } from 'oidc-client-ts';
|
|
2
|
+
interface ProfileMenuProps {
|
|
3
|
+
isMinimized: boolean;
|
|
4
|
+
userProfile?: UserProfile;
|
|
5
|
+
}
|
|
6
|
+
export declare function ProfileMenu({ isMinimized, userProfile }: Readonly<ProfileMenuProps>): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Badge, ManageAccounts } from "@mui/icons-material";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { MinimizedSubMenuHeader } from "../common/MinimizedSubMenuHeader.js";
|
|
5
|
+
import { ProfileInfos } from "./ProfileInfos.js";
|
|
6
|
+
import { UserAvatarIcon } from "./UserIcon.js";
|
|
7
|
+
import { SideBarMenuItem } from "../common/SideBarMenuItem.js";
|
|
8
|
+
import { submenuFooterStyle } from "../common/submenu-footer.style.js";
|
|
9
|
+
import "@mui/material";
|
|
10
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
11
|
+
import "../../../../utils/conversionUtils.js";
|
|
12
|
+
import "../../../../utils/types/equipmentType.js";
|
|
13
|
+
import "react";
|
|
14
|
+
import "react-hook-form";
|
|
15
|
+
import "localized-countries";
|
|
16
|
+
import "localized-countries/data/fr";
|
|
17
|
+
import "localized-countries/data/en";
|
|
18
|
+
import "notistack";
|
|
19
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
20
|
+
import "yup";
|
|
21
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
22
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
|
|
28
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
|
+
import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
31
|
+
import "@hello-pangea/dnd";
|
|
32
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
33
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
34
|
+
import { CustomNestedMenuItem } from "../../../../components/ui/menus/custom-nested-menu.js";
|
|
35
|
+
import "react-resizable-panels";
|
|
36
|
+
import "react-papaparse";
|
|
37
|
+
import "react-dom";
|
|
38
|
+
import "autosuggest-highlight/match";
|
|
39
|
+
import "autosuggest-highlight/parse";
|
|
40
|
+
import "clsx";
|
|
41
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
42
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
43
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
44
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
45
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
46
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
47
|
+
import "react-querybuilder";
|
|
48
|
+
import "uuid";
|
|
49
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
50
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
51
|
+
import "@react-querybuilder/material";
|
|
52
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
53
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
54
|
+
import "../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
55
|
+
import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
56
|
+
import "ag-grid-community";
|
|
57
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
58
|
+
import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
59
|
+
import "mathjs";
|
|
60
|
+
import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
61
|
+
import "react-window";
|
|
62
|
+
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
63
|
+
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
64
|
+
import { useAppSideBarDialogs, SideBarDialogType } from "../../dialogs/AppSideBarDialogProvider.js";
|
|
65
|
+
function ProfileMenu({ isMinimized, userProfile }) {
|
|
66
|
+
const intl = useIntl();
|
|
67
|
+
const { setOpenDialog } = useAppSideBarDialogs();
|
|
68
|
+
const openProfileDialog = () => setOpenDialog(SideBarDialogType.PROFILE);
|
|
69
|
+
const openProfileSettingsDialog = () => setOpenDialog(SideBarDialogType.PROFILE_SETTINGS);
|
|
70
|
+
const profileLabel = intl.formatMessage({ id: "user-information-dialog/profile" });
|
|
71
|
+
return /* @__PURE__ */ jsxs(
|
|
72
|
+
CustomNestedMenuItem,
|
|
73
|
+
{
|
|
74
|
+
label: !isMinimized ? profileLabel : "",
|
|
75
|
+
leftIcon: /* @__PURE__ */ jsx(UserAvatarIcon, { label: userProfile?.name ?? "" }),
|
|
76
|
+
sx: submenuFooterStyle.subMenu,
|
|
77
|
+
children: [
|
|
78
|
+
isMinimized && /* @__PURE__ */ jsx(MinimizedSubMenuHeader, { label: profileLabel }),
|
|
79
|
+
/* @__PURE__ */ jsx(ProfileInfos, { userProfile }),
|
|
80
|
+
/* @__PURE__ */ jsx(SideBarMenuItem, { label: "top-bar/userInformation", icon: /* @__PURE__ */ jsx(Badge, {}), onClick: openProfileDialog }),
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
SideBarMenuItem,
|
|
83
|
+
{
|
|
84
|
+
label: "top-bar/userSettings",
|
|
85
|
+
icon: /* @__PURE__ */ jsx(ManageAccounts, {}),
|
|
86
|
+
onClick: openProfileSettingsDialog
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
ProfileMenu
|
|
95
|
+
};
|