@gridsuite/commons-ui 0.46.0 → 0.48.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/README.md +0 -17
- package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +10 -0
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +147 -0
- package/dist/components/AuthenticationRouter/index.d.ts +1 -0
- package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +18 -0
- package/dist/components/CardErrorBoundary/card-error-boundary.js +110 -0
- package/dist/components/CardErrorBoundary/index.d.ts +1 -0
- package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +22 -0
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +254 -0
- package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +16 -0
- package/dist/components/ElementSearchDialog/element-search-dialog.js +139 -0
- package/dist/components/ElementSearchDialog/equipment-item.d.ts +16 -0
- package/dist/components/ElementSearchDialog/equipment-item.js +77 -0
- package/dist/components/ElementSearchDialog/index.d.ts +2 -0
- package/dist/components/ElementSearchDialog/tag-renderer.d.ts +11 -0
- package/dist/components/ElementSearchDialog/tag-renderer.js +34 -0
- package/dist/components/FlatParameters/FlatParameters.d.ts +10 -0
- package/dist/components/FlatParameters/FlatParameters.js +411 -0
- package/dist/components/FlatParameters/index.d.ts +1 -0
- package/dist/components/Login/Login.d.ts +5 -0
- package/dist/components/Login/Login.js +78 -0
- package/dist/components/Login/Logout.d.ts +5 -0
- package/dist/components/Login/Logout.js +69 -0
- package/dist/components/Login/index.d.ts +1 -0
- package/dist/components/MuiVirtualizedTable/ColumnHeader.d.ts +4 -0
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +127 -0
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +104 -0
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +548 -0
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +131 -0
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +790 -0
- package/dist/components/MuiVirtualizedTable/index.d.ts +2 -0
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +10 -0
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +87 -0
- package/dist/components/MultipleSelectionDialog/index.d.ts +1 -0
- package/dist/components/OverflowableText/index.d.ts +1 -0
- package/dist/components/OverflowableText/overflowable-text.d.ts +2 -0
- package/dist/components/OverflowableText/overflowable-text.js +87 -0
- package/dist/components/ReportViewer/filter-button.d.ts +1 -0
- package/dist/components/ReportViewer/filter-button.js +64 -0
- package/dist/components/ReportViewer/index.d.ts +1 -0
- package/dist/components/ReportViewer/log-report-item.d.ts +68 -0
- package/dist/components/ReportViewer/log-report-item.js +95 -0
- package/dist/components/ReportViewer/log-report.d.ts +21 -0
- package/dist/components/ReportViewer/log-report.js +49 -0
- package/dist/components/ReportViewer/log-table.d.ts +8 -0
- package/dist/components/ReportViewer/log-table.js +131 -0
- package/dist/components/ReportViewer/multi-select-list.d.ts +1 -0
- package/dist/components/ReportViewer/multi-select-list.js +40 -0
- package/dist/components/ReportViewer/report-item.d.ts +13 -0
- package/dist/components/ReportViewer/report-item.js +112 -0
- package/dist/components/ReportViewer/report-tree-view-context.d.ts +2 -0
- package/dist/components/ReportViewer/report-tree-view-context.js +8 -0
- package/dist/components/ReportViewer/report-viewer.d.ts +4 -0
- package/dist/components/ReportViewer/report-viewer.js +158 -0
- package/dist/components/ReportViewerDialog/index.d.ts +1 -0
- package/dist/components/ReportViewerDialog/report-viewer-dialog.d.ts +1 -0
- package/dist/components/ReportViewerDialog/report-viewer-dialog.js +61 -0
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +5 -0
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +13 -0
- package/dist/components/SignInCallbackHandler/index.d.ts +1 -0
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +5 -0
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +16 -0
- package/dist/components/SilentRenewCallbackHandler/index.d.ts +1 -0
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +3 -0
- package/dist/components/SnackbarProvider/SnackbarProvider.js +28 -0
- package/dist/components/SnackbarProvider/index.d.ts +1 -0
- package/dist/components/TopBar/AboutDialog.d.ts +24 -0
- package/dist/components/TopBar/AboutDialog.js +467 -0
- package/dist/components/TopBar/GridLogo.d.ts +34 -0
- package/dist/components/TopBar/GridLogo.js +71 -0
- package/dist/components/TopBar/TopBar.d.ts +53 -0
- package/dist/components/TopBar/TopBar.js +679 -0
- package/dist/components/TopBar/index.d.ts +3 -0
- package/dist/components/TreeViewFinder/TreeViewFinder.d.ts +57 -0
- package/dist/components/TreeViewFinder/TreeViewFinder.js +288 -0
- package/dist/components/TreeViewFinder/index.d.ts +1 -0
- package/dist/components/react-hook-form/autocomplete-input.d.ts +30 -0
- package/dist/components/react-hook-form/autocomplete-input.js +96 -0
- package/dist/components/react-hook-form/booleans/boolean-input.d.ts +16 -0
- package/dist/components/react-hook-form/booleans/boolean-input.js +49 -0
- package/dist/components/react-hook-form/booleans/checkbox-input.d.ts +14 -0
- package/dist/components/react-hook-form/booleans/checkbox-input.js +24 -0
- package/dist/components/react-hook-form/booleans/switch-input.d.ts +14 -0
- package/dist/components/react-hook-form/booleans/switch-input.js +24 -0
- package/dist/components/react-hook-form/directory-items-input.d.ts +28 -0
- package/dist/components/react-hook-form/directory-items-input.js +185 -0
- package/dist/components/react-hook-form/error-management/error-input.d.ts +5 -0
- package/dist/components/react-hook-form/error-management/error-input.js +42 -0
- package/dist/components/react-hook-form/error-management/field-error-alert.d.ts +4 -0
- package/dist/components/react-hook-form/error-management/field-error-alert.js +9 -0
- package/dist/components/react-hook-form/error-management/mid-form-error.d.ts +4 -0
- package/dist/components/react-hook-form/error-management/mid-form-error.js +20 -0
- package/dist/components/react-hook-form/numbers/float-input.d.ts +18 -0
- package/dist/components/react-hook-form/numbers/float-input.js +51 -0
- package/dist/components/react-hook-form/numbers/integer-input.d.ts +18 -0
- package/dist/components/react-hook-form/numbers/integer-input.js +36 -0
- package/dist/components/react-hook-form/numbers/utils.d.ts +2 -0
- package/dist/components/react-hook-form/numbers/utils.js +10 -0
- package/dist/components/react-hook-form/radio-input.d.ts +18 -0
- package/dist/components/react-hook-form/radio-input.js +44 -0
- package/{es/components/MultipleSelectionDialog/index.js → dist/components/react-hook-form/raw-read-only-input.d.ts} +3 -2
- package/dist/components/react-hook-form/raw-read-only-input.js +10 -0
- package/dist/components/react-hook-form/select-input.d.ts +17 -0
- package/dist/components/react-hook-form/select-input.js +31 -0
- package/dist/components/react-hook-form/slider-input.d.ts +21 -0
- package/dist/components/react-hook-form/slider-input.js +43 -0
- package/dist/components/react-hook-form/text-input.d.ts +33 -0
- package/dist/components/react-hook-form/text-input.js +94 -0
- package/dist/components/react-hook-form/utils/cancel-button.d.ts +10 -0
- package/dist/components/react-hook-form/utils/cancel-button.js +16 -0
- package/dist/components/react-hook-form/utils/field-label.d.ts +6 -0
- package/dist/components/react-hook-form/utils/field-label.js +12 -0
- package/dist/components/react-hook-form/utils/functions.d.ts +11 -0
- package/dist/components/react-hook-form/utils/functions.js +41 -0
- package/dist/components/react-hook-form/utils/submit-button.d.ts +10 -0
- package/dist/components/react-hook-form/utils/submit-button.js +23 -0
- package/dist/components/react-hook-form/utils/text-field-with-adornment.d.ts +12 -0
- package/dist/components/react-hook-form/utils/text-field-with-adornment.js +96 -0
- package/{es/components/translations/report-viewer-fr.js → dist/components/translations/card-error-boundary-en.d.ts} +5 -6
- package/dist/components/translations/card-error-boundary-en.js +8 -0
- package/dist/components/translations/card-error-boundary-fr.d.ts +12 -0
- package/dist/components/translations/card-error-boundary-fr.js +8 -0
- package/dist/components/translations/common-button-en.d.ts +5 -0
- package/dist/components/translations/common-button-en.js +7 -0
- package/dist/components/translations/common-button-fr.d.ts +5 -0
- package/dist/components/translations/common-button-fr.js +7 -0
- package/{es/components/translations/element-search-en.js → dist/components/translations/element-search-en.d.ts} +4 -5
- package/dist/components/translations/element-search-en.js +7 -0
- package/dist/components/translations/element-search-fr.d.ts +11 -0
- package/dist/components/translations/element-search-fr.js +7 -0
- package/dist/components/translations/equipment-search-en.d.ts +25 -0
- package/dist/components/translations/equipment-search-en.js +21 -0
- package/dist/components/translations/equipment-search-fr.d.ts +25 -0
- package/dist/components/translations/equipment-search-fr.js +21 -0
- package/{es/components/translations/flat-parameters-en.js → dist/components/translations/flat-parameters-en.d.ts} +5 -6
- package/dist/components/translations/flat-parameters-en.js +8 -0
- package/{es/components/translations/common-button-en.js → dist/components/translations/flat-parameters-fr.d.ts} +5 -5
- package/dist/components/translations/flat-parameters-fr.js +8 -0
- package/dist/components/translations/login-en.d.ts +18 -0
- package/dist/components/translations/login-en.js +14 -0
- package/dist/components/translations/login-fr.d.ts +18 -0
- package/dist/components/translations/login-fr.js +14 -0
- package/{es/components/translations/flat-parameters-fr.js → dist/components/translations/multiple-selection-dialog-en.d.ts} +5 -6
- package/dist/components/translations/multiple-selection-dialog-en.js +8 -0
- package/{es/components/translations/common-button-fr.js → dist/components/translations/multiple-selection-dialog-fr.d.ts} +5 -5
- package/dist/components/translations/multiple-selection-dialog-fr.js +8 -0
- package/{es/components/translations/report-viewer-en.js → dist/components/translations/report-viewer-en.d.ts} +5 -6
- package/dist/components/translations/report-viewer-en.js +8 -0
- package/{es/components/translations/element-search-fr.js → dist/components/translations/report-viewer-fr.d.ts} +5 -5
- package/dist/components/translations/report-viewer-fr.js +8 -0
- package/{es/components/translations/table-en.js → dist/components/translations/table-en.d.ts} +3 -4
- package/dist/components/translations/table-en.js +6 -0
- package/{es/components/translations/table-fr.js → dist/components/translations/table-fr.d.ts} +3 -4
- package/dist/components/translations/table-fr.js +6 -0
- package/dist/components/translations/top-bar-en.d.ts +31 -0
- package/dist/components/translations/top-bar-en.js +27 -0
- package/dist/components/translations/top-bar-fr.d.ts +31 -0
- package/dist/components/translations/top-bar-fr.js +27 -0
- package/dist/components/translations/treeview-finder-en.d.ts +16 -0
- package/dist/components/translations/treeview-finder-en.js +12 -0
- package/dist/components/translations/treeview-finder-fr.d.ts +16 -0
- package/dist/components/translations/treeview-finder-fr.js +12 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/hooks/useDebounce.js +17 -0
- package/{es/components/ElementSearchDialog/index.js → dist/hooks/useIntlRef.d.ts} +2 -2
- package/dist/hooks/useIntlRef.js +13 -0
- package/dist/hooks/useSnackMessage.d.ts +5 -0
- package/dist/hooks/useSnackMessage.js +81 -0
- package/dist/index.d.ts +234 -0
- package/dist/index.js +158 -0
- package/dist/utils/AuthService.d.ts +9 -0
- package/dist/utils/AuthService.js +336 -0
- package/dist/utils/ElementType.d.ts +13 -0
- package/dist/utils/ElementType.js +42 -0
- package/dist/utils/EquipmentType.d.ts +136 -0
- package/dist/utils/EquipmentType.js +132 -0
- package/dist/utils/UserManagerMock.d.ts +34 -0
- package/dist/utils/UserManagerMock.js +85 -0
- package/dist/utils/actions.d.ts +50 -0
- package/dist/utils/actions.js +71 -0
- package/{es/components/CardErrorBoundary/index.js → dist/utils/algos.d.ts} +1 -1
- package/dist/utils/algos.js +24 -0
- package/dist/utils/styles.d.ts +5 -0
- package/dist/utils/styles.js +13 -0
- package/package.json +36 -21
- package/es/components/AuthenticationRouter/AuthenticationRouter.js +0 -102
- package/es/components/AuthenticationRouter/index.js +0 -7
- package/es/components/CardErrorBoundary/card-error-boundary.js +0 -138
- package/es/components/ElementSearchDialog/element-search-dialog.js +0 -153
- package/es/components/ElementSearchDialog/equipment-item.js +0 -63
- package/es/components/ElementSearchDialog/tag-renderer.js +0 -29
- package/es/components/FlatParameters/FlatParameters.js +0 -448
- package/es/components/FlatParameters/index.js +0 -8
- package/es/components/Login/Login.js +0 -79
- package/es/components/Login/Logout.js +0 -78
- package/es/components/Login/index.js +0 -7
- package/es/components/MuiVirtualizedTable/ColumnHeader.js +0 -125
- package/es/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +0 -619
- package/es/components/MuiVirtualizedTable/MuiVirtualizedTable.js +0 -780
- package/es/components/MuiVirtualizedTable/index.js +0 -9
- package/es/components/MultipleSelectionDialog/MultipleSelectionDialog.js +0 -95
- package/es/components/OverflowableText/index.js +0 -7
- package/es/components/OverflowableText/overflowable-text.js +0 -81
- package/es/components/ReportViewer/filter-button.js +0 -77
- package/es/components/ReportViewer/index.js +0 -7
- package/es/components/ReportViewer/log-report-item.js +0 -97
- package/es/components/ReportViewer/log-report.js +0 -63
- package/es/components/ReportViewer/log-table.js +0 -130
- package/es/components/ReportViewer/multi-select-list.js +0 -56
- package/es/components/ReportViewer/report-item.js +0 -131
- package/es/components/ReportViewer/report-tree-view-context.js +0 -13
- package/es/components/ReportViewer/report-viewer.js +0 -167
- package/es/components/ReportViewerDialog/index.js +0 -7
- package/es/components/ReportViewerDialog/report-viewer-dialog.js +0 -67
- package/es/components/SignInCallbackHandler/SignInCallbackHandler.js +0 -19
- package/es/components/SignInCallbackHandler/index.js +0 -7
- package/es/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +0 -19
- package/es/components/SilentRenewCallbackHandler/index.js +0 -7
- package/es/components/SnackbarProvider/SnackbarProvider.js +0 -39
- package/es/components/SnackbarProvider/index.js +0 -7
- package/es/components/TopBar/AboutDialog.js +0 -456
- package/es/components/TopBar/GridLogo.js +0 -73
- package/es/components/TopBar/TopBar.js +0 -487
- package/es/components/TopBar/index.js +0 -9
- package/es/components/TreeViewFinder/TreeViewFinder.js +0 -341
- package/es/components/TreeViewFinder/index.js +0 -7
- package/es/components/images/powsybl_logo.svg +0 -35
- package/es/components/react-hook-form/autocomplete-input.js +0 -110
- package/es/components/react-hook-form/booleans/boolean-input.js +0 -56
- package/es/components/react-hook-form/booleans/checkbox-input.js +0 -28
- package/es/components/react-hook-form/booleans/switch-input.js +0 -28
- package/es/components/react-hook-form/error-management/error-input.js +0 -50
- package/es/components/react-hook-form/error-management/field-error-alert.js +0 -22
- package/es/components/react-hook-form/error-management/mid-form-error.js +0 -25
- package/es/components/react-hook-form/numbers/float-input.js +0 -105
- package/es/components/react-hook-form/numbers/integer-input.js +0 -35
- package/es/components/react-hook-form/numbers/utils.js +0 -6
- package/es/components/react-hook-form/radio-input.js +0 -55
- package/es/components/react-hook-form/select-input.js +0 -40
- package/es/components/react-hook-form/slider-input.js +0 -48
- package/es/components/react-hook-form/text-input.js +0 -100
- package/es/components/react-hook-form/utils/cancel-button.js +0 -28
- package/es/components/react-hook-form/utils/field-label.js +0 -15
- package/es/components/react-hook-form/utils/functions.js +0 -42
- package/es/components/react-hook-form/utils/submit-button.js +0 -29
- package/es/components/react-hook-form/utils/text-field-with-adornment.js +0 -92
- package/es/components/translations/card-error-boundary-en.js +0 -13
- package/es/components/translations/card-error-boundary-fr.js +0 -13
- package/es/components/translations/equipment-search-en.js +0 -26
- package/es/components/translations/equipment-search-fr.js +0 -26
- package/es/components/translations/inputs-en.js +0 -25
- package/es/components/translations/inputs-fr.js +0 -25
- package/es/components/translations/login-en.js +0 -19
- package/es/components/translations/login-fr.js +0 -19
- package/es/components/translations/multiple-selection-dialog-en.js +0 -13
- package/es/components/translations/multiple-selection-dialog-fr.js +0 -13
- package/es/components/translations/top-bar-en.js +0 -32
- package/es/components/translations/top-bar-fr.js +0 -32
- package/es/components/translations/treeview-finder-en.js +0 -17
- package/es/components/translations/treeview-finder-fr.js +0 -17
- package/es/hooks/useDebounce.js +0 -26
- package/es/hooks/useIntlRef.js +0 -22
- package/es/hooks/useSnackMessage.js +0 -81
- package/es/index.js +0 -71
- package/es/utils/AuthService.js +0 -312
- package/es/utils/ElementType.js +0 -53
- package/es/utils/EquipmentType.js +0 -133
- package/es/utils/UserManagerMock.js +0 -81
- package/es/utils/actions.js +0 -65
- package/es/utils/algos.js +0 -29
- package/es/utils/styles.js +0 -35
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2023, 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
|
-
|
|
8
|
-
export { default } from './FlatParameters';
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020, 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
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import Avatar from '@mui/material/Avatar';
|
|
10
|
-
import Button from '@mui/material/Button';
|
|
11
|
-
import Link from '@mui/material/Link';
|
|
12
|
-
import Box from '@mui/material/Box';
|
|
13
|
-
import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
|
|
14
|
-
import Typography from '@mui/material/Typography';
|
|
15
|
-
import Container from '@mui/material/Container';
|
|
16
|
-
import { FormattedMessage } from 'react-intl';
|
|
17
|
-
var styles = {
|
|
18
|
-
paper: function paper(theme) {
|
|
19
|
-
return {
|
|
20
|
-
marginTop: theme.spacing(8),
|
|
21
|
-
display: 'flex',
|
|
22
|
-
flexDirection: 'column',
|
|
23
|
-
alignItems: 'center'
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
avatar: function avatar(theme) {
|
|
27
|
-
return {
|
|
28
|
-
margin: theme.spacing(1),
|
|
29
|
-
backgroundColor: theme.palette.secondary.main
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
submit: function submit(theme) {
|
|
33
|
-
return {
|
|
34
|
-
margin: theme.spacing(3, 0, 2),
|
|
35
|
-
borderRadius: '30px'
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
logo: {
|
|
39
|
-
width: 64,
|
|
40
|
-
height: 64
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var Login = function Login(_ref) {
|
|
44
|
-
var onLoginClick = _ref.onLoginClick,
|
|
45
|
-
disabled = _ref.disabled;
|
|
46
|
-
return /*#__PURE__*/React.createElement(Container, {
|
|
47
|
-
component: "main",
|
|
48
|
-
maxWidth: "xs"
|
|
49
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
50
|
-
sx: styles.paper
|
|
51
|
-
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
52
|
-
sx: styles.avatar
|
|
53
|
-
}, /*#__PURE__*/React.createElement(LockOutlinedIcon, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
54
|
-
component: "h1",
|
|
55
|
-
variant: "h5"
|
|
56
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
57
|
-
id: "login/login",
|
|
58
|
-
defaultMessage: 'login'
|
|
59
|
-
}), ' ', "?"), /*#__PURE__*/React.createElement(Button, {
|
|
60
|
-
disabled: disabled,
|
|
61
|
-
fullWidth: true,
|
|
62
|
-
variant: "contained",
|
|
63
|
-
sx: styles.submit,
|
|
64
|
-
onClick: onLoginClick
|
|
65
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
66
|
-
id: "login/connection",
|
|
67
|
-
defaultMessage: 'connection'
|
|
68
|
-
}))), /*#__PURE__*/React.createElement(Box, {
|
|
69
|
-
mt: 2
|
|
70
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
71
|
-
variant: "body2",
|
|
72
|
-
color: "textSecondary",
|
|
73
|
-
align: "center"
|
|
74
|
-
}, 'Copyright © ', /*#__PURE__*/React.createElement(Link, {
|
|
75
|
-
color: "inherit",
|
|
76
|
-
href: "#"
|
|
77
|
-
}, "GridSuite"), ' ', new Date().getFullYear(), '.')));
|
|
78
|
-
};
|
|
79
|
-
export default Login;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020, 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
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import Avatar from '@mui/material/Avatar';
|
|
10
|
-
import Button from '@mui/material/Button';
|
|
11
|
-
import Link from '@mui/material/Link';
|
|
12
|
-
import Box from '@mui/material/Box';
|
|
13
|
-
import LogoutOutlinedIcon from '@mui/icons-material/LogoutOutlined';
|
|
14
|
-
import Typography from '@mui/material/Typography';
|
|
15
|
-
import Container from '@mui/material/Container';
|
|
16
|
-
import { FormattedMessage } from 'react-intl';
|
|
17
|
-
var styles = {
|
|
18
|
-
paper: function paper(theme) {
|
|
19
|
-
return {
|
|
20
|
-
marginTop: theme.spacing(8),
|
|
21
|
-
display: 'flex',
|
|
22
|
-
flexDirection: 'column',
|
|
23
|
-
alignItems: 'center'
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
avatar: function avatar(theme) {
|
|
27
|
-
return {
|
|
28
|
-
margin: theme.spacing(1),
|
|
29
|
-
backgroundColor: theme.palette.error.main
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
submit: function submit(theme) {
|
|
33
|
-
return {
|
|
34
|
-
margin: theme.spacing(3, 0, 2),
|
|
35
|
-
borderRadius: '30px'
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
var Logout = function Logout(_ref) {
|
|
40
|
-
var onLogoutClick = _ref.onLogoutClick,
|
|
41
|
-
disabled = _ref.disabled;
|
|
42
|
-
function Copyright() {
|
|
43
|
-
return /*#__PURE__*/React.createElement(Typography, {
|
|
44
|
-
variant: "body2",
|
|
45
|
-
color: "textSecondary",
|
|
46
|
-
align: "center"
|
|
47
|
-
}, 'Copyright © ', /*#__PURE__*/React.createElement(Link, {
|
|
48
|
-
color: "inherit",
|
|
49
|
-
href: "#"
|
|
50
|
-
}, "GridSuite"), ' ', new Date().getFullYear(), '.');
|
|
51
|
-
}
|
|
52
|
-
return /*#__PURE__*/React.createElement(Container, {
|
|
53
|
-
component: "main",
|
|
54
|
-
maxWidth: "xs"
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
56
|
-
sx: styles.paper
|
|
57
|
-
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
58
|
-
sx: styles.avatar
|
|
59
|
-
}, /*#__PURE__*/React.createElement(LogoutOutlinedIcon, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
60
|
-
component: "h1",
|
|
61
|
-
variant: "h5"
|
|
62
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
63
|
-
id: "login/logout",
|
|
64
|
-
defaultMessage: 'logout'
|
|
65
|
-
}), ' ', "?"), /*#__PURE__*/React.createElement(Button, {
|
|
66
|
-
disabled: disabled,
|
|
67
|
-
fullWidth: true,
|
|
68
|
-
variant: "contained",
|
|
69
|
-
sx: styles.submit,
|
|
70
|
-
onClick: onLogoutClick
|
|
71
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
72
|
-
id: "login/logout",
|
|
73
|
-
defaultMessage: 'logout'
|
|
74
|
-
}))), /*#__PURE__*/React.createElement(Box, {
|
|
75
|
-
mt: 2
|
|
76
|
-
}, /*#__PURE__*/React.createElement(Copyright, null)));
|
|
77
|
-
};
|
|
78
|
-
export default Logout;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020, 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 { default } from './Login';
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2022, 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
|
-
|
|
8
|
-
import React, { useRef } from 'react';
|
|
9
|
-
import FilterAltOutlinedIcon from '@mui/icons-material/FilterAltOutlined';
|
|
10
|
-
import { styled } from '@mui/system';
|
|
11
|
-
import Box from '@mui/material/Box';
|
|
12
|
-
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
13
|
-
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
|
14
|
-
import { mergeSx } from '../../utils/styles';
|
|
15
|
-
var styles = {
|
|
16
|
-
label: {
|
|
17
|
-
fontWeight: 'bold',
|
|
18
|
-
fontSize: '0.875rem' // to mimic TableCellRoot 'binding'
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
divFlex: {
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexDirection: 'row',
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
height: '100%'
|
|
26
|
-
},
|
|
27
|
-
divNum: {
|
|
28
|
-
flexDirection: 'row-reverse',
|
|
29
|
-
textAlign: 'right'
|
|
30
|
-
},
|
|
31
|
-
sortDiv: {
|
|
32
|
-
display: 'flex',
|
|
33
|
-
flexDirection: 'column',
|
|
34
|
-
alignItems: 'center'
|
|
35
|
-
},
|
|
36
|
-
sortButton: {
|
|
37
|
-
fill: 'currentcolor'
|
|
38
|
-
},
|
|
39
|
-
filterButton: {
|
|
40
|
-
stroke: 'currentcolor'
|
|
41
|
-
},
|
|
42
|
-
filterTooLossy: function filterTooLossy(theme) {
|
|
43
|
-
return {
|
|
44
|
-
stroke: theme.palette.secondary.main
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
transparent: {
|
|
48
|
-
opacity: 0
|
|
49
|
-
},
|
|
50
|
-
hovered: {
|
|
51
|
-
opacity: 0.5
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// Shows an arrow pointing to smaller value when sorting is active.
|
|
56
|
-
// signedRank of 0 means no sorting, we only show the arrow on hovering of the header,
|
|
57
|
-
// in the same direction as it will get if clicked (once).
|
|
58
|
-
// signedRank > 0 means sorted by ascending value from lower indices to higher indices
|
|
59
|
-
// so lesser values are at top, so the upward arrow
|
|
60
|
-
var SortButton = function SortButton(props) {
|
|
61
|
-
var sortRank = Math.abs(props.signedRank);
|
|
62
|
-
var visibilityStyle = (!props.signedRank || undefined) && (props.headerHovered ? styles.hovered : styles.transparent);
|
|
63
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
64
|
-
sx: styles.sortDiv,
|
|
65
|
-
onClick: props.onClick
|
|
66
|
-
}, props.signedRank >= 0 ? /*#__PURE__*/React.createElement(ArrowUpwardIcon, {
|
|
67
|
-
sx: visibilityStyle
|
|
68
|
-
}) : /*#__PURE__*/React.createElement(ArrowDownwardIcon, {
|
|
69
|
-
sx: visibilityStyle
|
|
70
|
-
}), sortRank > 1 && !props.hovered && /*#__PURE__*/React.createElement("sub", null, sortRank));
|
|
71
|
-
};
|
|
72
|
-
var FilterButton = function FilterButton(props) {
|
|
73
|
-
var visibilityStyle = !props.filterLevel && (props.headerHovered ? styles.hovered : styles.transparent);
|
|
74
|
-
return /*#__PURE__*/React.createElement(FilterAltOutlinedIcon, {
|
|
75
|
-
onClick: props.onClick,
|
|
76
|
-
sx: mergeSx(styles.filterButton, props.filterLevel > 1 && styles.filterTooLossy, visibilityStyle)
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
export var ColumnHeader = React.forwardRef(function (props, ref) {
|
|
80
|
-
var className = props.className,
|
|
81
|
-
label = props.label,
|
|
82
|
-
numeric = props.numeric,
|
|
83
|
-
sortSignedRank = props.sortSignedRank,
|
|
84
|
-
filterLevel = props.filterLevel,
|
|
85
|
-
onSortClick = props.onSortClick,
|
|
86
|
-
onFilterClick = props.onFilterClick,
|
|
87
|
-
onContextMenu = props.onContextMenu,
|
|
88
|
-
style = props.style;
|
|
89
|
-
var _React$useState = React.useState(),
|
|
90
|
-
hovered = _React$useState[0],
|
|
91
|
-
setHovered = _React$useState[1];
|
|
92
|
-
var onHover = React.useCallback(function (evt) {
|
|
93
|
-
setHovered(evt.type === 'mouseenter');
|
|
94
|
-
}, []);
|
|
95
|
-
var topmostDiv = useRef();
|
|
96
|
-
var handleFilterClick = React.useMemo(function () {
|
|
97
|
-
if (!onFilterClick) {
|
|
98
|
-
return undefined;
|
|
99
|
-
}
|
|
100
|
-
return function (evt) {
|
|
101
|
-
onFilterClick(evt, topmostDiv.current);
|
|
102
|
-
};
|
|
103
|
-
}, [onFilterClick]);
|
|
104
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
105
|
-
ref: topmostDiv,
|
|
106
|
-
onMouseEnter: onHover,
|
|
107
|
-
onMouseLeave: onHover,
|
|
108
|
-
sx: mergeSx(styles.divFlex, numeric && styles.divNum),
|
|
109
|
-
className: className,
|
|
110
|
-
style: style,
|
|
111
|
-
onContextMenu: onContextMenu
|
|
112
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
113
|
-
ref: ref,
|
|
114
|
-
sx: styles.label
|
|
115
|
-
}, label), onSortClick && /*#__PURE__*/React.createElement(SortButton, {
|
|
116
|
-
headerHovered: hovered,
|
|
117
|
-
onClick: onSortClick,
|
|
118
|
-
signedRank: sortSignedRank
|
|
119
|
-
}), handleFilterClick && /*#__PURE__*/React.createElement(FilterButton, {
|
|
120
|
-
headerHovered: hovered,
|
|
121
|
-
onClick: handleFilterClick,
|
|
122
|
-
filterLevel: filterLevel
|
|
123
|
-
}));
|
|
124
|
-
});
|
|
125
|
-
export default styled(ColumnHeader)({});
|