@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,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 UserAvatarIcon({ label }: Readonly<{
|
|
8
|
+
label: string;
|
|
9
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar } from "@mui/material";
|
|
3
|
+
import "../../../../utils/conversionUtils.js";
|
|
4
|
+
import "../../../../utils/types/equipmentType.js";
|
|
5
|
+
import { isEmpty } from "../../../../utils/functions.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
function getAbbreviationFromUserName(name) {
|
|
8
|
+
if (isEmpty(name)) {
|
|
9
|
+
return "";
|
|
10
|
+
}
|
|
11
|
+
const [firstName, ...otherNames] = name.split(" ");
|
|
12
|
+
if (otherNames.length > 0) {
|
|
13
|
+
return `${firstName[0]}${otherNames.at(-1)[0]}`;
|
|
14
|
+
}
|
|
15
|
+
return firstName[0];
|
|
16
|
+
}
|
|
17
|
+
function UserAvatarIcon({ label }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
Avatar,
|
|
20
|
+
{
|
|
21
|
+
sx: (theme) => ({
|
|
22
|
+
height: "24px",
|
|
23
|
+
width: "24px",
|
|
24
|
+
fontSize: theme.typography.pxToRem(11),
|
|
25
|
+
textTransform: "uppercase"
|
|
26
|
+
}),
|
|
27
|
+
children: getAbbreviationFromUserName(label)
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
UserAvatarIcon
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GsTheme } from '../../../../utils';
|
|
2
|
+
interface DarkModeToggleProps {
|
|
3
|
+
currentTheme: GsTheme;
|
|
4
|
+
setTheme: (newTheme: GsTheme) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function DarkModeToggle({ currentTheme, setTheme }: Readonly<DarkModeToggleProps>): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Switch } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import "../../../../utils/conversionUtils.js";
|
|
5
|
+
import "../../../../utils/types/equipmentType.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
import { DARK_THEME, LIGHT_THEME } from "../../../../utils/styles.js";
|
|
8
|
+
import "../../../../components/ui/overflowableText/OverflowableText.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
|
+
import { submenuFooterStyle } from "../common/submenu-footer.style.js";
|
|
61
|
+
function DarkModeToggle({ currentTheme, setTheme }) {
|
|
62
|
+
const isDarkMode = currentTheme === DARK_THEME;
|
|
63
|
+
const toggleMode = (event) => {
|
|
64
|
+
const targetModeValue = event.target.checked ? DARK_THEME : LIGHT_THEME;
|
|
65
|
+
setTheme(targetModeValue);
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ jsx(CustomMenuItem, { sx: submenuFooterStyle.subMenuChildren, children: /* @__PURE__ */ jsxs(Stack, { width: "100%", direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2, children: [
|
|
68
|
+
/* @__PURE__ */ jsx(FormattedMessage, { id: "top-bar/darkMode" }),
|
|
69
|
+
/* @__PURE__ */ jsx(Switch, { checked: isDarkMode, onChange: toggleMode })
|
|
70
|
+
] }) });
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
DarkModeToggle
|
|
74
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GsLang } from '../../../../utils';
|
|
2
|
+
interface LanguageSelectionProps {
|
|
3
|
+
language: GsLang;
|
|
4
|
+
isSelectedLanguage: boolean;
|
|
5
|
+
setSelectedLanguage: (newLanguage: GsLang) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function LanguageSelection({ language, isSelectedLanguage, setSelectedLanguage, }: Readonly<LanguageSelectionProps>): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Done } from "@mui/icons-material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import "@mui/material";
|
|
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 LanguageSelection({
|
|
61
|
+
language,
|
|
62
|
+
isSelectedLanguage,
|
|
63
|
+
setSelectedLanguage
|
|
64
|
+
}) {
|
|
65
|
+
const onClick = () => {
|
|
66
|
+
setSelectedLanguage(language);
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ jsxs(CustomMenuItem, { sx: submenuFooterStyle.subMenuChildren, onClick, children: [
|
|
69
|
+
/* @__PURE__ */ jsx(FormattedMessage, { id: `top-bar/language/${language}` }),
|
|
70
|
+
/* @__PURE__ */ jsx(Done, { color: "info", sx: { ml: 1, visibility: isSelectedLanguage ? "initial" : "hidden" } })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
LanguageSelection
|
|
75
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GsLang, GsTheme } from '../../../../utils';
|
|
2
|
+
interface SettingsMenuProps {
|
|
3
|
+
isMinimized: boolean;
|
|
4
|
+
currentTheme: GsTheme;
|
|
5
|
+
setTheme: (newTheme: GsTheme) => void;
|
|
6
|
+
selectedLanguage: GsLang;
|
|
7
|
+
setSelectedLanguage: (newSelectedLanguage: GsLang) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function SettingsMenu({ isMinimized, currentTheme, setTheme, selectedLanguage, setSelectedLanguage, }: Readonly<SettingsMenuProps>): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DisplaySettings } from "@mui/icons-material";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { Box, Typography } from "@mui/material";
|
|
5
|
+
import { MinimizedSubMenuHeader } from "../common/MinimizedSubMenuHeader.js";
|
|
6
|
+
import { DarkModeToggle } from "./DarkModeToggle.js";
|
|
7
|
+
import { LanguageSelection } from "./LanguageSelection.js";
|
|
8
|
+
import { submenuFooterStyle } from "../common/submenu-footer.style.js";
|
|
9
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
10
|
+
import "../../../../utils/conversionUtils.js";
|
|
11
|
+
import "../../../../utils/types/equipmentType.js";
|
|
12
|
+
import "react";
|
|
13
|
+
import "react-hook-form";
|
|
14
|
+
import "localized-countries";
|
|
15
|
+
import "localized-countries/data/fr";
|
|
16
|
+
import "localized-countries/data/en";
|
|
17
|
+
import "notistack";
|
|
18
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
19
|
+
import "yup";
|
|
20
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
21
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
|
|
27
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
|
+
import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
30
|
+
import "@hello-pangea/dnd";
|
|
31
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
32
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
33
|
+
import { CustomNestedMenuItem } from "../../../../components/ui/menus/custom-nested-menu.js";
|
|
34
|
+
import "react-resizable-panels";
|
|
35
|
+
import "react-papaparse";
|
|
36
|
+
import "react-dom";
|
|
37
|
+
import "autosuggest-highlight/match";
|
|
38
|
+
import "autosuggest-highlight/parse";
|
|
39
|
+
import "clsx";
|
|
40
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
41
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
42
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
43
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
44
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
45
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
46
|
+
import "react-querybuilder";
|
|
47
|
+
import "uuid";
|
|
48
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
49
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
50
|
+
import "@react-querybuilder/material";
|
|
51
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
52
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
53
|
+
import "../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
54
|
+
import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
55
|
+
import "ag-grid-community";
|
|
56
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
57
|
+
import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
58
|
+
import "mathjs";
|
|
59
|
+
import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
60
|
+
import "react-window";
|
|
61
|
+
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
62
|
+
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
63
|
+
function SettingsMenu({
|
|
64
|
+
isMinimized,
|
|
65
|
+
currentTheme,
|
|
66
|
+
setTheme,
|
|
67
|
+
selectedLanguage,
|
|
68
|
+
setSelectedLanguage
|
|
69
|
+
}) {
|
|
70
|
+
const intl = useIntl();
|
|
71
|
+
const settingsLabel = intl.formatMessage({ id: "top-bar/settings" });
|
|
72
|
+
const availableLanguages = ["sys", "fr", "en"];
|
|
73
|
+
return /* @__PURE__ */ jsxs(
|
|
74
|
+
CustomNestedMenuItem,
|
|
75
|
+
{
|
|
76
|
+
label: !isMinimized ? settingsLabel : "",
|
|
77
|
+
leftIcon: /* @__PURE__ */ jsx(DisplaySettings, {}),
|
|
78
|
+
sx: submenuFooterStyle.subMenu,
|
|
79
|
+
children: [
|
|
80
|
+
isMinimized && /* @__PURE__ */ jsx(MinimizedSubMenuHeader, { label: settingsLabel }),
|
|
81
|
+
/* @__PURE__ */ jsx(DarkModeToggle, { currentTheme, setTheme }),
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
CustomNestedMenuItem,
|
|
84
|
+
{
|
|
85
|
+
sx: submenuFooterStyle.subMenuChildren,
|
|
86
|
+
renderLabel: () => /* @__PURE__ */ jsxs(Box, { children: [
|
|
87
|
+
intl.formatMessage({ id: "top-bar/language" }),
|
|
88
|
+
/* @__PURE__ */ jsxs(Typography, { component: "span", fontSize: 12, sx: { color: "text.disabled" }, children: [
|
|
89
|
+
" - ",
|
|
90
|
+
intl.formatMessage({
|
|
91
|
+
id: `top-bar/language/${selectedLanguage}`
|
|
92
|
+
})
|
|
93
|
+
] })
|
|
94
|
+
] }),
|
|
95
|
+
children: availableLanguages.map((language) => /* @__PURE__ */ jsx(
|
|
96
|
+
LanguageSelection,
|
|
97
|
+
{
|
|
98
|
+
language,
|
|
99
|
+
isSelectedLanguage: selectedLanguage === language,
|
|
100
|
+
setSelectedLanguage
|
|
101
|
+
},
|
|
102
|
+
language
|
|
103
|
+
))
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
SettingsMenu
|
|
112
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
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 * from './AppSideBar';
|
|
@@ -8,3 +8,5 @@ export * from './AboutDialog';
|
|
|
8
8
|
export * from './GridLogo';
|
|
9
9
|
export * from './DevModeBanner';
|
|
10
10
|
export * from './TopBar';
|
|
11
|
+
export { default as UserInformationDialog } from './UserInformationDialog';
|
|
12
|
+
export { default as UserSettingsDialog } from './UserSettingsDialog';
|
|
@@ -2,10 +2,14 @@ import { AboutDialog } from "./AboutDialog.js";
|
|
|
2
2
|
import { GridLogo, LogoText } from "./GridLogo.js";
|
|
3
3
|
import { DevModeBanner } from "./DevModeBanner.js";
|
|
4
4
|
import { TopBar } from "./TopBar.js";
|
|
5
|
+
import { default as default2 } from "./UserInformationDialog.js";
|
|
6
|
+
import { default as default3 } from "./UserSettingsDialog.js";
|
|
5
7
|
export {
|
|
6
8
|
AboutDialog,
|
|
7
9
|
DevModeBanner,
|
|
8
10
|
GridLogo,
|
|
9
11
|
LogoText,
|
|
10
|
-
TopBar
|
|
12
|
+
TopBar,
|
|
13
|
+
default2 as UserInformationDialog,
|
|
14
|
+
default3 as UserSettingsDialog
|
|
11
15
|
};
|
package/dist/index.js
CHANGED
|
@@ -179,6 +179,9 @@ import { AboutDialog } from "./features/topBar/AboutDialog.js";
|
|
|
179
179
|
import { GridLogo, LogoText } from "./features/topBar/GridLogo.js";
|
|
180
180
|
import { DevModeBanner } from "./features/topBar/DevModeBanner.js";
|
|
181
181
|
import { TopBar } from "./features/topBar/TopBar.js";
|
|
182
|
+
import { default as default5 } from "./features/topBar/UserInformationDialog.js";
|
|
183
|
+
import { default as default6 } from "./features/topBar/UserSettingsDialog.js";
|
|
184
|
+
import { AppSideBar } from "./features/side-bar/AppSideBar.js";
|
|
182
185
|
import { ParameterLayout } from "./features/parameters/common/parameter-layout/parameter-layout.js";
|
|
183
186
|
import { ParameterLayoutProvider, useParameterLayoutContext } from "./features/parameters/common/parameter-layout/parameter-layout-provider.js";
|
|
184
187
|
import { formatComputingTypeLabel, isValidComputingType } from "./features/parameters/common/computing-type.js";
|
|
@@ -466,7 +469,7 @@ import { SelectHeaderCell } from "./features/network-modification-table/renderer
|
|
|
466
469
|
import { SwitchCell } from "./features/network-modification-table/renderers/switch-cell.js";
|
|
467
470
|
import { DragCloneRow } from "./features/network-modification-table/row/drag-row-clone.js";
|
|
468
471
|
import { ModificationRow } from "./features/network-modification-table/row/modification-row.js";
|
|
469
|
-
import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification,
|
|
472
|
+
import { MAX_COMPOSITE_NESTING_DEPTH, containsReferenceModification, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./features/network-modification-table/utils.js";
|
|
470
473
|
import { AnnouncementBanner } from "./features/announcement/AnnouncementBanner.js";
|
|
471
474
|
import { AnnouncementNotification } from "./features/announcement/AnnouncementNotification.js";
|
|
472
475
|
import { useGlobalAnnouncement } from "./features/announcement/useGlobalAnnouncement.js";
|
|
@@ -604,6 +607,7 @@ export {
|
|
|
604
607
|
AnnouncementBanner,
|
|
605
608
|
AnnouncementNotification,
|
|
606
609
|
AnnouncementSeverity,
|
|
610
|
+
AppSideBar,
|
|
607
611
|
ArrayAction,
|
|
608
612
|
ArrowsInputIcon,
|
|
609
613
|
ArrowsOutputIcon,
|
|
@@ -1264,7 +1268,9 @@ export {
|
|
|
1264
1268
|
UnauthorizedAccessAlert,
|
|
1265
1269
|
UndisplayedFilterNumberComparators,
|
|
1266
1270
|
UniqueNameInput,
|
|
1271
|
+
default5 as UserInformationDialog,
|
|
1267
1272
|
UserManagerMock,
|
|
1273
|
+
default6 as UserSettingsDialog,
|
|
1268
1274
|
VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR,
|
|
1269
1275
|
VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR,
|
|
1270
1276
|
VARIABLE_Q_GENERATORS,
|
|
@@ -1348,6 +1354,7 @@ export {
|
|
|
1348
1354
|
computeSwitchedOnValue,
|
|
1349
1355
|
computeTagMinSize,
|
|
1350
1356
|
computeTolerance,
|
|
1357
|
+
containsReferenceModification,
|
|
1351
1358
|
convertFilterValues,
|
|
1352
1359
|
convertInputValue,
|
|
1353
1360
|
convertLimitsToOperationalLimitsGroupFormSchema,
|
|
@@ -1712,7 +1719,6 @@ export {
|
|
|
1712
1719
|
isProcessType,
|
|
1713
1720
|
isReferenceModification,
|
|
1714
1721
|
isStudyMetadata,
|
|
1715
|
-
isTargetChildOfReference,
|
|
1716
1722
|
isValidComputingType,
|
|
1717
1723
|
isValidContingencyRow,
|
|
1718
1724
|
italicFontTextField,
|
|
@@ -10,13 +10,20 @@ export declare const topBarEn: {
|
|
|
10
10
|
'top-bar/goFullScreen': string;
|
|
11
11
|
'top-bar/exitFullScreen': string;
|
|
12
12
|
'top-bar/userInformation': string;
|
|
13
|
+
'top-bar/myApps': string;
|
|
13
14
|
'top-bar/about': string;
|
|
14
15
|
'top-bar/displayMode': string;
|
|
16
|
+
'top-bar/darkMode': string;
|
|
15
17
|
'top-bar/equipmentLabel': string;
|
|
16
18
|
'top-bar/id': string;
|
|
17
19
|
'top-bar/name': string;
|
|
18
20
|
'top-bar/language': string;
|
|
21
|
+
'top-bar/language/fr': string;
|
|
22
|
+
'top-bar/language/en': string;
|
|
23
|
+
'top-bar/language/sys': string;
|
|
19
24
|
'top-bar/developerModeWarning': string;
|
|
25
|
+
'top-bar/settings': string;
|
|
26
|
+
'top-bar/minimize': string;
|
|
20
27
|
'about-dialog/title': string;
|
|
21
28
|
'about-dialog/version': string;
|
|
22
29
|
'about-dialog/alert-running-old-version-msg': string;
|
|
@@ -4,13 +4,20 @@ const topBarEn = {
|
|
|
4
4
|
"top-bar/goFullScreen": "Full screen",
|
|
5
5
|
"top-bar/exitFullScreen": "Exit full screen mode",
|
|
6
6
|
"top-bar/userInformation": "User information",
|
|
7
|
+
"top-bar/myApps": "My apps",
|
|
7
8
|
"top-bar/about": "About",
|
|
8
9
|
"top-bar/displayMode": "Display mode",
|
|
10
|
+
"top-bar/darkMode": "Dark mode",
|
|
9
11
|
"top-bar/equipmentLabel": "Equipment label",
|
|
10
12
|
"top-bar/id": "Id",
|
|
11
13
|
"top-bar/name": "Name",
|
|
12
14
|
"top-bar/language": "Language",
|
|
15
|
+
"top-bar/language/fr": "Français",
|
|
16
|
+
"top-bar/language/en": "English",
|
|
17
|
+
"top-bar/language/sys": "Browser",
|
|
13
18
|
"top-bar/developerModeWarning": "Developer mode: Some features are incomplete and may not work as expected.",
|
|
19
|
+
"top-bar/settings": "Settings",
|
|
20
|
+
"top-bar/minimize": "Minimize",
|
|
14
21
|
"about-dialog/title": "About",
|
|
15
22
|
"about-dialog/version": "Version {version}",
|
|
16
23
|
"about-dialog/alert-running-old-version-msg": "Running old version.\nSave your work and refresh the application to load the latest version.",
|
|
@@ -10,13 +10,20 @@ export declare const topBarFr: {
|
|
|
10
10
|
'top-bar/goFullScreen': string;
|
|
11
11
|
'top-bar/exitFullScreen': string;
|
|
12
12
|
'top-bar/userInformation': string;
|
|
13
|
+
'top-bar/myApps': string;
|
|
13
14
|
'top-bar/about': string;
|
|
14
15
|
'top-bar/displayMode': string;
|
|
16
|
+
'top-bar/darkMode': string;
|
|
15
17
|
'top-bar/equipmentLabel': string;
|
|
16
18
|
'top-bar/id': string;
|
|
17
19
|
'top-bar/name': string;
|
|
18
20
|
'top-bar/language': string;
|
|
21
|
+
'top-bar/language/fr': string;
|
|
22
|
+
'top-bar/language/en': string;
|
|
23
|
+
'top-bar/language/sys': string;
|
|
19
24
|
'top-bar/developerModeWarning': string;
|
|
25
|
+
'top-bar/settings': string;
|
|
26
|
+
'top-bar/minimize': string;
|
|
20
27
|
'about-dialog/title': string;
|
|
21
28
|
'about-dialog/version': string;
|
|
22
29
|
'about-dialog/alert-running-old-version-msg': string;
|
|
@@ -4,13 +4,20 @@ const topBarFr = {
|
|
|
4
4
|
"top-bar/goFullScreen": "Plein écran",
|
|
5
5
|
"top-bar/exitFullScreen": "Quitter mode plein écran",
|
|
6
6
|
"top-bar/userInformation": "Informations utilisateur",
|
|
7
|
+
"top-bar/myApps": "Mes applications",
|
|
7
8
|
"top-bar/about": "À propos",
|
|
8
9
|
"top-bar/displayMode": "Mode d'affichage",
|
|
10
|
+
"top-bar/darkMode": "Mode sombre",
|
|
9
11
|
"top-bar/equipmentLabel": "Label des ouvrages",
|
|
10
12
|
"top-bar/id": "Id",
|
|
11
13
|
"top-bar/name": "Nom",
|
|
12
14
|
"top-bar/language": "Langue",
|
|
15
|
+
"top-bar/language/fr": "Français",
|
|
16
|
+
"top-bar/language/en": "English",
|
|
17
|
+
"top-bar/language/sys": "Navigateur",
|
|
13
18
|
"top-bar/developerModeWarning": "Mode développeur : Certaines fonctionnalités ne sont pas complètes et peuvent ne pas fonctionner comme prévu.",
|
|
19
|
+
"top-bar/settings": "Réglages",
|
|
20
|
+
"top-bar/minimize": "Réduire le menu",
|
|
14
21
|
"about-dialog/title": "À propos",
|
|
15
22
|
"about-dialog/version": "Version {version}",
|
|
16
23
|
"about-dialog/alert-running-old-version-msg": "Ancienne version de l'application.\nVeuillez sauvegarder votre travail et rafraîchir l'application pour charger la dernière version",
|