@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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("@emotion/styled").StyledComponent<PropTypes.InferPropsInner<Pick<{
|
|
2
|
+
bgColor: PropTypes.Requireable<string>;
|
|
3
|
+
color: PropTypes.Requireable<string>;
|
|
4
|
+
labelInfo: PropTypes.Requireable<string>;
|
|
5
|
+
labelText: PropTypes.Validator<string>;
|
|
6
|
+
}, "labelText">> & Partial<PropTypes.InferPropsInner<Pick<{
|
|
7
|
+
bgColor: PropTypes.Requireable<string>;
|
|
8
|
+
color: PropTypes.Requireable<string>;
|
|
9
|
+
labelInfo: PropTypes.Requireable<string>;
|
|
10
|
+
labelText: PropTypes.Validator<string>;
|
|
11
|
+
}, "color" | "bgColor" | "labelInfo">>> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import { Box, Typography } from "@mui/material";
|
|
4
|
+
import { styled, alpha } from "@mui/system";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import { TreeItem } from "@mui/lab";
|
|
7
|
+
import { Label } from "@mui/icons-material";
|
|
8
|
+
import ReportTreeViewContext from "./report-tree-view-context.js";
|
|
9
|
+
const styles = {
|
|
10
|
+
root: (theme) => ({
|
|
11
|
+
color: theme.palette.text.secondary,
|
|
12
|
+
"&:hover > .MuiTreeItem-content": {
|
|
13
|
+
backgroundColor: theme.palette.action.hover
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
content: (theme) => ({
|
|
17
|
+
color: theme.palette.text.secondary,
|
|
18
|
+
borderRadius: theme.spacing(2),
|
|
19
|
+
width: "fit-content",
|
|
20
|
+
paddingRight: theme.spacing(1),
|
|
21
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
22
|
+
"&.Mui-expanded": {
|
|
23
|
+
fontWeight: theme.typography.fontWeightRegular
|
|
24
|
+
},
|
|
25
|
+
/* &.MuiTreeItem-content.Mui-focused to increase specifity because mui5 has a rule for &.Mui-selected.Mui-focused */
|
|
26
|
+
"&.MuiTreeItem-content.Mui-focused, &.Mui-selected": {
|
|
27
|
+
backgroundColor: `var(--tree-view-bg-color, ${theme.palette.action.selected})`,
|
|
28
|
+
color: "var(--tree-view-color)"
|
|
29
|
+
},
|
|
30
|
+
// same as mui v4 behavior on label text only right after clicking in contrast to after moving away with arrow keys.
|
|
31
|
+
"&.Mui-selected .MuiTreeItem-label:hover, &.Mui-selected.Mui-focused .MuiTreeItem-label": {
|
|
32
|
+
borderRadius: theme.spacing(2),
|
|
33
|
+
backgroundColor: alpha(
|
|
34
|
+
theme.palette.primary.main,
|
|
35
|
+
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity
|
|
36
|
+
)
|
|
37
|
+
},
|
|
38
|
+
"&.Mui-focused .MuiTreeItem-label, &:hover .MuiTreeItem-label, &Mui-selected .MuiTreeItem-label": {
|
|
39
|
+
backgroundColor: "transparent"
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
group: (theme) => ({
|
|
43
|
+
marginLeft: "10px",
|
|
44
|
+
"& .MuiTreeItem-content": {
|
|
45
|
+
paddingLeft: theme.spacing(2)
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
expanded: {},
|
|
49
|
+
selected: {},
|
|
50
|
+
label: {
|
|
51
|
+
fontWeight: "inherit",
|
|
52
|
+
color: "inherit"
|
|
53
|
+
},
|
|
54
|
+
labelRoot: (theme) => ({
|
|
55
|
+
display: "flex",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
padding: theme.spacing(0.5, 0)
|
|
58
|
+
}),
|
|
59
|
+
labelRootHighlighted: (theme) => ({
|
|
60
|
+
display: "flex",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
padding: theme.spacing(0.5, 0),
|
|
63
|
+
backgroundColor: theme.palette.action.selected
|
|
64
|
+
}),
|
|
65
|
+
labelIcon: (theme) => ({
|
|
66
|
+
marginRight: theme.spacing(1)
|
|
67
|
+
}),
|
|
68
|
+
labelText: (theme) => ({
|
|
69
|
+
fontWeight: "inherit",
|
|
70
|
+
marginRight: theme.spacing(2)
|
|
71
|
+
})
|
|
72
|
+
};
|
|
73
|
+
const ReportItem = (props) => {
|
|
74
|
+
const { isHighlighted } = useContext(ReportTreeViewContext);
|
|
75
|
+
const highlighted = isHighlighted ? isHighlighted(props.nodeId) : false;
|
|
76
|
+
const { labelText, labelIconColor, className, ...other } = props;
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
78
|
+
TreeItem,
|
|
79
|
+
{
|
|
80
|
+
className,
|
|
81
|
+
sx: {
|
|
82
|
+
"&": styles.root,
|
|
83
|
+
"& .MuiTreeItem-content": styles.content,
|
|
84
|
+
"& .Mui-expanded": styles.expanded,
|
|
85
|
+
"& .Mui-selected": styles.selected,
|
|
86
|
+
"& .MuiTreeItem-group": styles.group,
|
|
87
|
+
"& .MuiTreeItem-label": styles.label
|
|
88
|
+
},
|
|
89
|
+
label: /* @__PURE__ */ jsxs(
|
|
90
|
+
Box,
|
|
91
|
+
{
|
|
92
|
+
sx: highlighted ? styles.labelRootHighlighted : styles.labelRoot,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx(Label, { htmlColor: labelIconColor, sx: styles.labelIcon }),
|
|
95
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", sx: styles.labelText, children: labelText })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
...other
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
ReportItem.propTypes = {
|
|
104
|
+
bgColor: PropTypes.string,
|
|
105
|
+
color: PropTypes.string,
|
|
106
|
+
labelInfo: PropTypes.string,
|
|
107
|
+
labelText: PropTypes.string.isRequired
|
|
108
|
+
};
|
|
109
|
+
const ReportItem$1 = styled(ReportItem)({});
|
|
110
|
+
export {
|
|
111
|
+
ReportItem$1 as default
|
|
112
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useMemo, useCallback, useEffect } from "react";
|
|
3
|
+
import { TreeView } from "@mui/lab";
|
|
4
|
+
import { ArrowDropDown, ArrowRight } from "@mui/icons-material";
|
|
5
|
+
import ReportItem from "./report-item.js";
|
|
6
|
+
import LogReport from "./log-report.js";
|
|
7
|
+
import { Grid } from "@mui/material";
|
|
8
|
+
import LogTable from "./log-table.js";
|
|
9
|
+
import ReportTreeViewContext from "./report-tree-view-context.js";
|
|
10
|
+
import LogReportItem from "./log-report-item.js";
|
|
11
|
+
const MAX_SUB_REPORTS = 500;
|
|
12
|
+
const styles = {
|
|
13
|
+
treeView: {
|
|
14
|
+
height: "100%",
|
|
15
|
+
overflow: "scroll"
|
|
16
|
+
},
|
|
17
|
+
treeItem: {
|
|
18
|
+
whiteSpace: "nowrap"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function ReportViewer({
|
|
22
|
+
jsonReport,
|
|
23
|
+
maxSubReports = MAX_SUB_REPORTS
|
|
24
|
+
}) {
|
|
25
|
+
const [selectedNode, setSelectedNode] = useState(null);
|
|
26
|
+
const [expandedNodes, setExpandedNodes] = useState([]);
|
|
27
|
+
const [logs, setLogs] = useState(null);
|
|
28
|
+
const [highlightedReportId, setHighlightedReportId] = useState();
|
|
29
|
+
const rootReport = useRef(null);
|
|
30
|
+
const allReports = useRef({});
|
|
31
|
+
const treeView = useRef(null);
|
|
32
|
+
const defaultSeverityFilter = useMemo(() => {
|
|
33
|
+
const filterConfig = {};
|
|
34
|
+
Object.values(LogReportItem.SEVERITY).forEach((severity) => {
|
|
35
|
+
filterConfig[severity.name] = true;
|
|
36
|
+
});
|
|
37
|
+
return filterConfig;
|
|
38
|
+
}, []);
|
|
39
|
+
const [selectedSeverity, setSelectedSeverity] = useState(
|
|
40
|
+
defaultSeverityFilter
|
|
41
|
+
);
|
|
42
|
+
const createReporterItem = useCallback(
|
|
43
|
+
(logReport) => {
|
|
44
|
+
allReports.current[logReport.getId()] = logReport;
|
|
45
|
+
if (logReport.getSubReports().length > maxSubReports) {
|
|
46
|
+
console.warn(
|
|
47
|
+
"The number (%s) being greater than %s only the first %s subreports will be displayed",
|
|
48
|
+
logReport.getSubReports().length,
|
|
49
|
+
maxSubReports,
|
|
50
|
+
maxSubReports
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
ReportItem,
|
|
55
|
+
{
|
|
56
|
+
labelText: logReport.getTitle(),
|
|
57
|
+
labelIconColor: logReport.getHighestSeverity().colorName,
|
|
58
|
+
sx: styles.treeItem,
|
|
59
|
+
nodeId: logReport.getId().toString(),
|
|
60
|
+
children: logReport.getSubReports().slice(0, maxSubReports).map((value) => createReporterItem(value))
|
|
61
|
+
},
|
|
62
|
+
logReport.getId().toString()
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
[maxSubReports]
|
|
66
|
+
);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
rootReport.current = new LogReport(jsonReport);
|
|
69
|
+
let rootId = rootReport.current.getId().toString();
|
|
70
|
+
treeView.current = createReporterItem(rootReport.current);
|
|
71
|
+
setSelectedNode(rootId);
|
|
72
|
+
setExpandedNodes([rootId]);
|
|
73
|
+
setLogs(rootReport.current.getAllLogs());
|
|
74
|
+
}, [jsonReport, createReporterItem]);
|
|
75
|
+
const handleToggleNode = (event, nodeIds) => {
|
|
76
|
+
event.persist();
|
|
77
|
+
let iconClicked = event.target.closest(".MuiTreeItem-iconContainer");
|
|
78
|
+
if (iconClicked) {
|
|
79
|
+
setExpandedNodes(nodeIds);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const handleSelectNode = (event, nodeId) => {
|
|
83
|
+
selectNode(nodeId);
|
|
84
|
+
};
|
|
85
|
+
const selectNode = (nodeId) => {
|
|
86
|
+
if (selectedNode !== nodeId) {
|
|
87
|
+
setSelectedNode(nodeId);
|
|
88
|
+
setLogs(allReports.current[nodeId].getAllLogs());
|
|
89
|
+
setHighlightedReportId(null);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const isHighlighted = useMemo(
|
|
93
|
+
() => ({
|
|
94
|
+
isHighlighted: (reportId) => highlightedReportId === reportId
|
|
95
|
+
}),
|
|
96
|
+
[highlightedReportId]
|
|
97
|
+
);
|
|
98
|
+
const onRowClick = (data) => {
|
|
99
|
+
setExpandedNodes((previouslyExpandedNodes) => {
|
|
100
|
+
var _a;
|
|
101
|
+
let nodesToExpand = [];
|
|
102
|
+
let reportId = data.reportId;
|
|
103
|
+
while ((_a = allReports.current[reportId]) == null ? void 0 : _a.parentReportId) {
|
|
104
|
+
let parentReportId = allReports.current[reportId].parentReportId;
|
|
105
|
+
if (!previouslyExpandedNodes.includes(parentReportId)) {
|
|
106
|
+
nodesToExpand.push(parentReportId);
|
|
107
|
+
}
|
|
108
|
+
reportId = parentReportId;
|
|
109
|
+
}
|
|
110
|
+
if (nodesToExpand.length > 0) {
|
|
111
|
+
return nodesToExpand.concat(previouslyExpandedNodes);
|
|
112
|
+
} else {
|
|
113
|
+
return previouslyExpandedNodes;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
setHighlightedReportId(data.reportId);
|
|
117
|
+
};
|
|
118
|
+
return rootReport.current && /* @__PURE__ */ jsxs(Grid, { container: true, style: { height: "100%" }, children: [
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
Grid,
|
|
121
|
+
{
|
|
122
|
+
item: true,
|
|
123
|
+
xs: 12,
|
|
124
|
+
sm: 3,
|
|
125
|
+
style: {
|
|
126
|
+
height: "95%",
|
|
127
|
+
borderRight: "1px solid rgba(81, 81, 81, 1)"
|
|
128
|
+
},
|
|
129
|
+
children: /* @__PURE__ */ jsx(ReportTreeViewContext.Provider, { value: isHighlighted, children: /* @__PURE__ */ jsx(
|
|
130
|
+
TreeView,
|
|
131
|
+
{
|
|
132
|
+
sx: styles.treeView,
|
|
133
|
+
defaultCollapseIcon: /* @__PURE__ */ jsx(ArrowDropDown, {}),
|
|
134
|
+
defaultExpandIcon: /* @__PURE__ */ jsx(ArrowRight, {}),
|
|
135
|
+
defaultEndIcon: /* @__PURE__ */ jsx("div", { style: { width: 24 } }),
|
|
136
|
+
onNodeToggle: handleToggleNode,
|
|
137
|
+
onNodeSelect: handleSelectNode,
|
|
138
|
+
selected: selectedNode,
|
|
139
|
+
expanded: expandedNodes,
|
|
140
|
+
children: treeView.current
|
|
141
|
+
}
|
|
142
|
+
) })
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 9, style: { height: "95%" }, children: /* @__PURE__ */ jsx(
|
|
146
|
+
LogTable,
|
|
147
|
+
{
|
|
148
|
+
logs,
|
|
149
|
+
onRowClick,
|
|
150
|
+
selectedSeverity,
|
|
151
|
+
setSelectedSeverity
|
|
152
|
+
}
|
|
153
|
+
) })
|
|
154
|
+
] });
|
|
155
|
+
}
|
|
156
|
+
export {
|
|
157
|
+
ReportViewer as default
|
|
158
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./report-viewer-dialog";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ReportViewerDialog(props: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Dialog, DialogTitle, DialogContent, DialogActions, Button } from "@mui/material";
|
|
4
|
+
import { FullscreenExit, Fullscreen } from "@mui/icons-material";
|
|
5
|
+
import { FormattedMessage } from "react-intl";
|
|
6
|
+
import ReportViewer from "../ReportViewer/report-viewer.js";
|
|
7
|
+
const styles = {
|
|
8
|
+
fullScreenIcon: {
|
|
9
|
+
cursor: "pointer"
|
|
10
|
+
},
|
|
11
|
+
paperFullWidth: {
|
|
12
|
+
height: "100%"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
function ReportViewerDialog(props) {
|
|
16
|
+
const { title, open, onClose, jsonReport } = props;
|
|
17
|
+
const [fullScreen, setFullScreen] = useState(false);
|
|
18
|
+
const showFullScreen = () => {
|
|
19
|
+
setFullScreen(true);
|
|
20
|
+
};
|
|
21
|
+
const hideFullScreen = () => {
|
|
22
|
+
setFullScreen(false);
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
Dialog,
|
|
26
|
+
{
|
|
27
|
+
open,
|
|
28
|
+
onClose,
|
|
29
|
+
fullScreen,
|
|
30
|
+
"aria-labelledby": "dialog-title-report",
|
|
31
|
+
fullWidth: true,
|
|
32
|
+
maxWidth: "lg",
|
|
33
|
+
sx: {
|
|
34
|
+
"& .MuiDialog-paperFullWidth": styles.paperFullWidth
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
38
|
+
/* @__PURE__ */ jsx(DialogContent, { dividers: true, children: /* @__PURE__ */ jsx(ReportViewer, { jsonReport }) }),
|
|
39
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
40
|
+
fullScreen ? /* @__PURE__ */ jsx(
|
|
41
|
+
FullscreenExit,
|
|
42
|
+
{
|
|
43
|
+
onClick: hideFullScreen,
|
|
44
|
+
sx: styles.fullScreenIcon
|
|
45
|
+
}
|
|
46
|
+
) : /* @__PURE__ */ jsx(
|
|
47
|
+
Fullscreen,
|
|
48
|
+
{
|
|
49
|
+
onClick: showFullScreen,
|
|
50
|
+
sx: styles.fullScreenIcon
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => onClose(), variant: "text", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "report_viewer/close" }) })
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
ReportViewerDialog as default
|
|
61
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
const SignInCallbackHandler = ({ userManager, handleSignInCallback }) => {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
if (userManager !== null) {
|
|
6
|
+
handleSignInCallback();
|
|
7
|
+
}
|
|
8
|
+
}, [userManager, handleSignInCallback]);
|
|
9
|
+
return /* @__PURE__ */ jsx("h1", { children: " " });
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
SignInCallbackHandler as default
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SignInCallbackHandler";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
const SilentRenewCallbackHandler = ({
|
|
4
|
+
userManager,
|
|
5
|
+
handleSilentRenewCallback
|
|
6
|
+
}) => {
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (userManager !== null) {
|
|
9
|
+
handleSilentRenewCallback();
|
|
10
|
+
}
|
|
11
|
+
}, [userManager, handleSilentRenewCallback]);
|
|
12
|
+
return /* @__PURE__ */ jsx("h1", { children: "Technical token renew window, you should not see this" });
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
SilentRenewCallbackHandler as default
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SilentRenewCallbackHandler";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useRef } from "react";
|
|
3
|
+
import { Button } from "@mui/material";
|
|
4
|
+
import { SnackbarProvider as SnackbarProvider$1 } from "notistack";
|
|
5
|
+
const SnackbarProvider = React.forwardRef((props, ref) => {
|
|
6
|
+
const innerRef = useRef();
|
|
7
|
+
const notistackRef = ref || innerRef;
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
SnackbarProvider$1,
|
|
10
|
+
{
|
|
11
|
+
ref: notistackRef,
|
|
12
|
+
anchorOrigin: { horizontal: "center", vertical: "bottom" },
|
|
13
|
+
hideIconVariant: true,
|
|
14
|
+
action: (key) => /* @__PURE__ */ jsx(
|
|
15
|
+
Button,
|
|
16
|
+
{
|
|
17
|
+
onClick: () => notistackRef.current.closeSnackbar(key),
|
|
18
|
+
style: { color: "#fff", fontSize: "20px" },
|
|
19
|
+
children: "✖"
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
SnackbarProvider as default
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SnackbarProvider";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default AboutDialog;
|
|
2
|
+
declare function AboutDialog({ open, onClose, globalVersionPromise, appName, appVersion, appGitTag, appLicense, additionalModulesPromise, }: {
|
|
3
|
+
open: any;
|
|
4
|
+
onClose: any;
|
|
5
|
+
globalVersionPromise: any;
|
|
6
|
+
appName: any;
|
|
7
|
+
appVersion: any;
|
|
8
|
+
appGitTag: any;
|
|
9
|
+
appLicense: any;
|
|
10
|
+
additionalModulesPromise: any;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace AboutDialog {
|
|
13
|
+
namespace propTypes {
|
|
14
|
+
const open: PropTypes.Validator<boolean>;
|
|
15
|
+
const onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
+
const appName: PropTypes.Validator<string>;
|
|
17
|
+
const appVersion: PropTypes.Requireable<string>;
|
|
18
|
+
const appGitTag: PropTypes.Requireable<string>;
|
|
19
|
+
const appLicense: PropTypes.Requireable<string>;
|
|
20
|
+
const globalVersionPromise: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
const additionalModulesPromise: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
import PropTypes from 'prop-types';
|