grep-components 1.15.0-grepf-1792.11 → 1.15.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/components/AppBar/index.d.ts +3 -0
- package/dist/components/AppBar/stories/AppBar.stories.d.ts +1 -0
- package/dist/components/AppBar/styles/index.d.ts +1 -0
- package/dist/components/AppBarNavList/stories/AppBarNavList.stories.d.ts +0 -2
- package/dist/components/DropdownMenu/components/tooltip-menu-item.d.ts +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +34 -361
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/AppBar/AppBar.d.ts +0 -14
- package/dist/components/AppBar/MainAppStyles.d.ts +0 -30
- package/dist/components/AppBar/MobileAppBar.d.ts +0 -9
- package/dist/components/AppBar/stories/AppBarStory.stories.d.ts +0 -15
- package/dist/components/AppBar/types.d.ts +0 -32
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledAppBar: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/AppBar").AppBarTypeMap<{}, "header">>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemProps } from '@mui/material';
|
|
3
|
-
declare type Props =
|
|
3
|
+
declare type Props = MenuItemProps & {
|
|
4
4
|
tooltipText: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const TooltipMenuItem: React.FC<Props>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './AppBar
|
|
1
|
+
export * from './AppBar';
|
|
2
2
|
export * from './AppBarProfile';
|
|
3
3
|
export * from './AppBarNavList';
|
|
4
4
|
export * from './BodyLayout';
|
|
@@ -28,7 +28,7 @@ export * from './GrepEditor';
|
|
|
28
28
|
export * from './ConfirmationDialog';
|
|
29
29
|
export * from './GrepDialog';
|
|
30
30
|
export * from './ToC';
|
|
31
|
-
export { default as AppBar } from './AppBar
|
|
31
|
+
export { default as AppBar } from './AppBar';
|
|
32
32
|
export { default as AppBarProfile } from './AppBarProfile';
|
|
33
33
|
export { default as AppBarNavList } from './AppBarNavList';
|
|
34
34
|
export { default as BodyLayout } from './BodyLayout';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Utils from './utils';
|
|
2
2
|
export { default as Colors } from './styling/Colors';
|
|
3
|
+
export { default as AppBar } from './components/AppBar';
|
|
3
4
|
export { default as AppBarProfile } from './components/AppBarProfile';
|
|
4
5
|
export { default as AppBarNavList } from './components/AppBarNavList';
|
|
5
6
|
export { default as BodyLayout } from './components/BodyLayout';
|
|
@@ -27,7 +28,6 @@ export { default as Sidebar } from './components/Sidebar';
|
|
|
27
28
|
export { default as ServiceMessage } from './components/ServiceMessage';
|
|
28
29
|
export { default as SortableTable } from './components/SortableTable';
|
|
29
30
|
export { default as GrepEditor } from './components/GrepEditor';
|
|
30
|
-
export { default as AppBar } from './components/AppBar/AppBar';
|
|
31
31
|
export { ParseableDate } from './utils/dateHelper';
|
|
32
32
|
export { Utils };
|
|
33
33
|
export * from './components';
|
package/dist/index.js
CHANGED
|
@@ -5,14 +5,15 @@ import isBetweenPlugin from 'dayjs/plugin/isBetween';
|
|
|
5
5
|
import { red, pink, purple, deepPurple, indigo, blue, lightBlue, cyan, teal, green, lightGreen, lime, yellow, amber, orange, deepOrange, brown, grey, blueGrey } from '@mui/material/colors';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import React__default, { useContext, forwardRef, createElement, createContext, Fragment, useRef, useLayoutEffect, useState, useCallback as useCallback$1, useEffect, useMemo as useMemo$1 } from 'react';
|
|
8
|
+
import { Toolbar, useScrollTrigger, Slide, Button, Box, Typography, IconButton, Menu, MenuItem, Tabs, Tab, Collapse, MenuList, Tooltip, Container, List, ListItem, ListItemText, ListItemIcon, Divider, styled, TableCell, TableRow, TableSortLabel, TableHead, TablePagination, TableContainer, Table, TableBody, TableFooter, CircularProgress, Link, TextField, FormControl, InputLabel, Select, OutlinedInput, Input, Checkbox, FormHelperText, Grid, ToggleButtonGroup, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@mui/material';
|
|
9
|
+
import AppBar$1 from '@mui/material/AppBar';
|
|
10
|
+
import { useTheme as useTheme$1 } from '@mui/material/styles';
|
|
8
11
|
import AccountCircle from '@mui/icons-material/AccountCircle';
|
|
9
12
|
import ArrowDropdown from '@mui/icons-material/ArrowDropDown';
|
|
10
|
-
import {
|
|
11
|
-
import { useTheme as useTheme$1 } from '@mui/material/styles';
|
|
12
|
-
import { useHistory, NavLink, Prompt } from 'react-router-dom';
|
|
13
|
+
import { useHistory, Prompt } from 'react-router-dom';
|
|
13
14
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
14
15
|
import IconExpand from '@mui/icons-material/ExpandMore';
|
|
15
|
-
import { ArrowForward, Info, ExpandMore, ExpandLess
|
|
16
|
+
import { ArrowForward, Info, ExpandMore, ExpandLess } from '@mui/icons-material';
|
|
16
17
|
import ListItemIcon$1 from '@mui/material/ListItemIcon';
|
|
17
18
|
import MoreVert from '@mui/icons-material/MoreVert';
|
|
18
19
|
import { useDispatch, connect, Provider as Provider$1, useSelector } from 'react-redux';
|
|
@@ -39,10 +40,6 @@ export { ContentState } from 'draft-js';
|
|
|
39
40
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
40
41
|
import FormatBold from '@mui/icons-material/FormatBold';
|
|
41
42
|
import FormatItalic from '@mui/icons-material/FormatItalic';
|
|
42
|
-
import Divider$1 from '@mui/material/Divider';
|
|
43
|
-
import Menu$2 from '@mui/material/Menu';
|
|
44
|
-
import MenuItem$1 from '@mui/material/MenuItem';
|
|
45
|
-
import Button$1 from '@mui/material/Button';
|
|
46
43
|
import Link$1 from '@mui/material/Link';
|
|
47
44
|
|
|
48
45
|
dayjs.extend(isBetweenPlugin);
|
|
@@ -4061,6 +4058,31 @@ var makeStyles = (_a = tssReact.createMakeAndWithStyles({
|
|
|
4061
4058
|
//"useTheme": useTheme as (()=> MyTheme)
|
|
4062
4059
|
}), _a.makeStyles), withStyles = _a.withStyles;
|
|
4063
4060
|
|
|
4061
|
+
var StyledAppBar = withStyles(AppBar$1, {
|
|
4062
|
+
root: {
|
|
4063
|
+
backgroundColor: 'transparant',
|
|
4064
|
+
},
|
|
4065
|
+
positionFixed: {
|
|
4066
|
+
left: 'unset',
|
|
4067
|
+
right: 'unset',
|
|
4068
|
+
},
|
|
4069
|
+
});
|
|
4070
|
+
|
|
4071
|
+
var HideOnScroll = function (_a) {
|
|
4072
|
+
var children = _a.children;
|
|
4073
|
+
// Note that you normally won't need to set the window ref as useScrollTrigger
|
|
4074
|
+
// will default to window.
|
|
4075
|
+
// This is only being set here because the demo is in an iframe.
|
|
4076
|
+
// const trigger = useScrollTrigger({ target: window ? window() : undefined });
|
|
4077
|
+
var trigger = useScrollTrigger();
|
|
4078
|
+
return (React.createElement(Slide, { appear: false, direction: "down", in: !trigger }, children));
|
|
4079
|
+
};
|
|
4080
|
+
var AppBar = function (props) { return (React.createElement(React.Fragment, null,
|
|
4081
|
+
React.createElement(HideOnScroll, __assign({}, props),
|
|
4082
|
+
React.createElement(StyledAppBar, { color: "inherit", elevation: 0 },
|
|
4083
|
+
React.createElement(Toolbar, null, props.children))),
|
|
4084
|
+
React.createElement(Toolbar, null))); };
|
|
4085
|
+
|
|
4064
4086
|
var useStyles$i = makeStyles()(function (_a) {
|
|
4065
4087
|
var palette = _a.palette;
|
|
4066
4088
|
return ({
|
|
@@ -4215,10 +4237,10 @@ var CollapsableMenu = function (_a) {
|
|
|
4215
4237
|
};
|
|
4216
4238
|
|
|
4217
4239
|
var TooltipMenuItem = function (_a) {
|
|
4218
|
-
var children = _a.children, tooltipText = _a.tooltipText, props = __rest$1(_a, ["children", "tooltipText"]);
|
|
4240
|
+
var children = _a.children, tooltipText = _a.tooltipText, disabled = _a.disabled, props = __rest$1(_a, ["children", "tooltipText", "disabled"]);
|
|
4219
4241
|
return (React__default.createElement(Tooltip, { title: tooltipText },
|
|
4220
4242
|
React__default.createElement("span", null,
|
|
4221
|
-
React__default.createElement(MenuItem, __assign({ disabled:
|
|
4243
|
+
React__default.createElement(MenuItem, __assign({ role: "menuitem", disabled: disabled }, props), children))));
|
|
4222
4244
|
};
|
|
4223
4245
|
|
|
4224
4246
|
var useStyles$g = makeStyles()(function (_a, _b) {
|
|
@@ -4273,7 +4295,7 @@ var CollapsableMenuStatusEvent = /** @class */ (function () {
|
|
|
4273
4295
|
return CollapsableMenuStatusEvent;
|
|
4274
4296
|
}());
|
|
4275
4297
|
var CollapsableMenuItem = function (_a) {
|
|
4276
|
-
var items = _a.items, onClick = _a.onClick, children = _a.children; _a.onClose; var tooltipText = _a.tooltipText, props = __rest$1(_a, ["items", "onClick", "children", "onClose", "tooltipText"]);
|
|
4298
|
+
var items = _a.items, onClick = _a.onClick, children = _a.children; _a.onClose; var tooltipText = _a.tooltipText, disabled = _a.disabled, props = __rest$1(_a, ["items", "onClick", "children", "onClose", "tooltipText", "disabled"]);
|
|
4277
4299
|
var listItemRef = useRef(null);
|
|
4278
4300
|
var _b = __read(useState(false), 2), open = _b[0], setOpen = _b[1];
|
|
4279
4301
|
var onStatusChange = useCallback$1(function (type) { return new CollapsableMenuStatusEvent(type, listItemRef); }, [listItemRef]);
|
|
@@ -4327,7 +4349,7 @@ var CollapsableMenuItem = function (_a) {
|
|
|
4327
4349
|
return window.dispatchEvent(new Event('resize'));
|
|
4328
4350
|
});
|
|
4329
4351
|
} }, items)))); };
|
|
4330
|
-
return
|
|
4352
|
+
return tooltipText ? (React__default.createElement(TooltipMenuItem, { className: classes.root, tooltipText: tooltipText, onMouseOver: function (e) { return e.currentTarget.focus(); }, disabled: disabled, selected: open, onClick: handleClick, onKeyDown: handleKey }, renderInner())) : (React__default.createElement(MenuItem, __assign({ className: classes.root, ref: listItemRef, selected: open, onClick: handleClick, onKeyDown: handleKey }, props), renderInner()));
|
|
4331
4353
|
};
|
|
4332
4354
|
|
|
4333
4355
|
var useStyles$f = makeStyles()(function (_a) {
|
|
@@ -21710,355 +21732,6 @@ var GrepEditor = function (_a) {
|
|
|
21710
21732
|
React__default.createElement(EditorComponent, __assign({}, props))));
|
|
21711
21733
|
};
|
|
21712
21734
|
|
|
21713
|
-
var dimensions = {
|
|
21714
|
-
breadcrumbsFontSize: 16,
|
|
21715
|
-
contentWidth: 1028,
|
|
21716
|
-
footerHeight: 50,
|
|
21717
|
-
inputBoxHeight: 61,
|
|
21718
|
-
toolbarHeight: 80,
|
|
21719
|
-
toolbarHeightMobile: 40,
|
|
21720
|
-
toolbarWidth: 1260,
|
|
21721
|
-
toolbarMenuWidth: 1028,
|
|
21722
|
-
toolbarMenuHeight: 50,
|
|
21723
|
-
};
|
|
21724
|
-
var ToolbarTitle = styled(NavLink)(function () { return ({
|
|
21725
|
-
display: 'flex',
|
|
21726
|
-
fontSize: '24px',
|
|
21727
|
-
color: '#303030',
|
|
21728
|
-
fontFamily: 'Montserrat',
|
|
21729
|
-
fontWeight: 500,
|
|
21730
|
-
textDecoration: 'none',
|
|
21731
|
-
':hover': {
|
|
21732
|
-
textDecoration: 'none',
|
|
21733
|
-
},
|
|
21734
|
-
}); });
|
|
21735
|
-
var EnvironmentTitle = styled('div')(function () { return ({
|
|
21736
|
-
color: 'rgba(0, 0, 0, 0.33)',
|
|
21737
|
-
marginLeft: '17px',
|
|
21738
|
-
}); });
|
|
21739
|
-
var Toolbar = styled('div')(function (_a) {
|
|
21740
|
-
var _b;
|
|
21741
|
-
var theme = _a.theme;
|
|
21742
|
-
return (_b = {
|
|
21743
|
-
display: 'flex',
|
|
21744
|
-
flexDirection: 'column'
|
|
21745
|
-
},
|
|
21746
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21747
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21748
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21749
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21750
|
-
},
|
|
21751
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21752
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21753
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21754
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21755
|
-
},
|
|
21756
|
-
_b);
|
|
21757
|
-
});
|
|
21758
|
-
var ToolbarFixer = styled('div')(function (_a) {
|
|
21759
|
-
var _b;
|
|
21760
|
-
var theme = _a.theme;
|
|
21761
|
-
return (_b = {
|
|
21762
|
-
display: 'flex',
|
|
21763
|
-
flexDirection: 'column',
|
|
21764
|
-
position: 'fixed',
|
|
21765
|
-
top: 0,
|
|
21766
|
-
left: 0,
|
|
21767
|
-
right: 0,
|
|
21768
|
-
zIndex: 101
|
|
21769
|
-
},
|
|
21770
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21771
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21772
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21773
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21774
|
-
},
|
|
21775
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21776
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21777
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21778
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21779
|
-
},
|
|
21780
|
-
_b);
|
|
21781
|
-
});
|
|
21782
|
-
var ToolbarInner = styled('div')(function (_a) {
|
|
21783
|
-
var _b;
|
|
21784
|
-
var colors = _a.colors, theme = _a.theme;
|
|
21785
|
-
if (!theme) {
|
|
21786
|
-
return {};
|
|
21787
|
-
}
|
|
21788
|
-
return _b = {
|
|
21789
|
-
alignItems: 'center',
|
|
21790
|
-
display: 'flex',
|
|
21791
|
-
margin: '0 auto',
|
|
21792
|
-
width: '100%',
|
|
21793
|
-
padding: 0,
|
|
21794
|
-
backgroundColor: colors.headerBackgroundColor
|
|
21795
|
-
},
|
|
21796
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21797
|
-
height: "".concat(dimensions.toolbarHeightMobile, "px"),
|
|
21798
|
-
minHeight: "".concat(dimensions.toolbarHeightMobile, "px"),
|
|
21799
|
-
},
|
|
21800
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21801
|
-
padding: 0,
|
|
21802
|
-
height: "".concat(dimensions.toolbarHeight, "px"),
|
|
21803
|
-
minHeight: "".concat(dimensions.toolbarHeight, "px"),
|
|
21804
|
-
},
|
|
21805
|
-
_b;
|
|
21806
|
-
});
|
|
21807
|
-
var ToolbarLeft = styled('div')(function () { return ({
|
|
21808
|
-
alignItems: 'center',
|
|
21809
|
-
display: 'flex',
|
|
21810
|
-
marginLeft: '40px',
|
|
21811
|
-
}); });
|
|
21812
|
-
var ToolbarRight = styled('div')(function (_a) {
|
|
21813
|
-
var _b;
|
|
21814
|
-
var theme = _a.theme;
|
|
21815
|
-
return (_b = {
|
|
21816
|
-
alignItems: 'center',
|
|
21817
|
-
display: 'flex',
|
|
21818
|
-
marginLeft: 'auto',
|
|
21819
|
-
marginRight: '40px'
|
|
21820
|
-
},
|
|
21821
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21822
|
-
display: 'none',
|
|
21823
|
-
},
|
|
21824
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21825
|
-
display: 'flex',
|
|
21826
|
-
},
|
|
21827
|
-
_b);
|
|
21828
|
-
});
|
|
21829
|
-
var UserContainer = styled('div')(function () { return ({
|
|
21830
|
-
display: 'flex',
|
|
21831
|
-
flexDirection: 'column',
|
|
21832
|
-
margin: '0 17px',
|
|
21833
|
-
textAlign: 'left',
|
|
21834
|
-
textTransform: 'none',
|
|
21835
|
-
fontWeight: '400',
|
|
21836
|
-
color: 'rgba(0, 0, 0, 0.87)',
|
|
21837
|
-
}); });
|
|
21838
|
-
var AccountName = styled('span')(function () { return ({
|
|
21839
|
-
fontSize: '18px',
|
|
21840
|
-
lineHeight: '25px',
|
|
21841
|
-
}); });
|
|
21842
|
-
var ToolbarMenu = styled('div')(function (_a) {
|
|
21843
|
-
var _b;
|
|
21844
|
-
var theme = _a.theme;
|
|
21845
|
-
return _b = {
|
|
21846
|
-
backgroundColor: theme.palette.primary.main,
|
|
21847
|
-
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21848
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21849
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21850
|
-
width: '100%',
|
|
21851
|
-
display: 'flex',
|
|
21852
|
-
alignItems: 'center',
|
|
21853
|
-
fontFamily: 'MontSerrat, Helvetica Neue, Helvetica, Arial, sans-serif',
|
|
21854
|
-
boxShadow: '0 3px 5px 0 rgba(0, 0, 0, 0.3)'
|
|
21855
|
-
},
|
|
21856
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21857
|
-
display: 'none',
|
|
21858
|
-
},
|
|
21859
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21860
|
-
display: 'flex',
|
|
21861
|
-
},
|
|
21862
|
-
_b;
|
|
21863
|
-
});
|
|
21864
|
-
var MobileToolbarMenu = styled('div')(function (_a) {
|
|
21865
|
-
var _b;
|
|
21866
|
-
var theme = _a.theme;
|
|
21867
|
-
return (_b = {
|
|
21868
|
-
backgroundColor: theme.palette.primary.main,
|
|
21869
|
-
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21870
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21871
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21872
|
-
width: '100%',
|
|
21873
|
-
flexGrow: 1,
|
|
21874
|
-
alignItems: 'center',
|
|
21875
|
-
fontFamily: 'MontSerrat, Helvetica Neue, Helvetica, Arial, sans-serif',
|
|
21876
|
-
boxShadow: '0 3px 5px 0 rgba(0, 0, 0, 0.3)'
|
|
21877
|
-
},
|
|
21878
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21879
|
-
display: 'flex',
|
|
21880
|
-
},
|
|
21881
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21882
|
-
display: 'none',
|
|
21883
|
-
},
|
|
21884
|
-
_b);
|
|
21885
|
-
});
|
|
21886
|
-
var ToolbarMenuInner = styled('div')(function (_a) {
|
|
21887
|
-
var _b;
|
|
21888
|
-
var theme = _a.theme;
|
|
21889
|
-
return (_b = {
|
|
21890
|
-
display: 'flex',
|
|
21891
|
-
height: 'fit-content',
|
|
21892
|
-
maxWidth: "".concat(dimensions.toolbarMenuWidth, "px"),
|
|
21893
|
-
margin: '0 auto'
|
|
21894
|
-
},
|
|
21895
|
-
_b[theme.breakpoints.down('lg')] = {
|
|
21896
|
-
padding: '0 24px',
|
|
21897
|
-
},
|
|
21898
|
-
_b[theme.breakpoints.up('lg')] = {
|
|
21899
|
-
padding: 0,
|
|
21900
|
-
},
|
|
21901
|
-
_b);
|
|
21902
|
-
});
|
|
21903
|
-
var menuItemHoverGreen = '#B9E1CC';
|
|
21904
|
-
var ToolbarMenuItem = styled(NavLink)(function (_a) {
|
|
21905
|
-
var theme = _a.theme;
|
|
21906
|
-
return ({
|
|
21907
|
-
alignItems: 'center',
|
|
21908
|
-
borderRight: '1px solid #696868',
|
|
21909
|
-
color: theme.palette.background.default,
|
|
21910
|
-
cursor: 'pointer',
|
|
21911
|
-
display: 'flex',
|
|
21912
|
-
fontSize: '16px',
|
|
21913
|
-
padding: '0 17px',
|
|
21914
|
-
height: '100%',
|
|
21915
|
-
textTransform: 'capitalize',
|
|
21916
|
-
userSelect: 'none',
|
|
21917
|
-
position: 'relative',
|
|
21918
|
-
textDecoration: 'none',
|
|
21919
|
-
fontWeight: 500,
|
|
21920
|
-
':first-child': {
|
|
21921
|
-
paddingLeft: 0,
|
|
21922
|
-
':after': {
|
|
21923
|
-
marginLeft: '-24px',
|
|
21924
|
-
},
|
|
21925
|
-
},
|
|
21926
|
-
':last-child': {
|
|
21927
|
-
borderRight: 'none',
|
|
21928
|
-
},
|
|
21929
|
-
':after': {
|
|
21930
|
-
position: 'absolute',
|
|
21931
|
-
bottom: 0,
|
|
21932
|
-
left: '50%',
|
|
21933
|
-
width: '32px',
|
|
21934
|
-
marginLeft: '-16px',
|
|
21935
|
-
borderBottom: "2px solid ".concat(theme.palette.secondary.main),
|
|
21936
|
-
opacity: 0,
|
|
21937
|
-
content: '""',
|
|
21938
|
-
transition: 'all 0.3s ease',
|
|
21939
|
-
pointerEvents: 'none',
|
|
21940
|
-
},
|
|
21941
|
-
':focus': {
|
|
21942
|
-
outline: 'none',
|
|
21943
|
-
},
|
|
21944
|
-
':hover': {
|
|
21945
|
-
textDecoration: 'none',
|
|
21946
|
-
color: menuItemHoverGreen,
|
|
21947
|
-
},
|
|
21948
|
-
'.active:after, :hover:after, focus:after': {
|
|
21949
|
-
bottom: '-4px',
|
|
21950
|
-
opacity: '1',
|
|
21951
|
-
},
|
|
21952
|
-
});
|
|
21953
|
-
});
|
|
21954
|
-
var MobileToolbarMenuItem = styled(NavLink)(function () { return ({
|
|
21955
|
-
alignItems: 'center',
|
|
21956
|
-
color: 'black',
|
|
21957
|
-
cursor: 'pointer',
|
|
21958
|
-
display: 'flex',
|
|
21959
|
-
height: '100%',
|
|
21960
|
-
textTransform: 'capitalize',
|
|
21961
|
-
userSelect: 'none',
|
|
21962
|
-
position: 'relative',
|
|
21963
|
-
textDecoration: 'none',
|
|
21964
|
-
}); });
|
|
21965
|
-
|
|
21966
|
-
var MobileAppBar = function (_a) {
|
|
21967
|
-
var userMenuItems = _a.userMenuItems, menuItems = _a.menuItems;
|
|
21968
|
-
var _b = __read(React.useState(null), 2), anchorElNav = _b[0], setAnchorElNav = _b[1];
|
|
21969
|
-
var openNav = Boolean(anchorElNav);
|
|
21970
|
-
var handleClickNav = function (event) {
|
|
21971
|
-
setAnchorElNav(event.currentTarget);
|
|
21972
|
-
};
|
|
21973
|
-
var handleCloseNav = function () {
|
|
21974
|
-
setAnchorElNav(null);
|
|
21975
|
-
};
|
|
21976
|
-
var _c = __read(React.useState(null), 2), anchorElMenu = _c[0], setAnchorElMenu = _c[1];
|
|
21977
|
-
var openMenu = Boolean(anchorElMenu);
|
|
21978
|
-
var handleClickMenu = function (event) {
|
|
21979
|
-
setAnchorElMenu(event.currentTarget);
|
|
21980
|
-
};
|
|
21981
|
-
var handleCloseMenu = function () {
|
|
21982
|
-
setAnchorElMenu(null);
|
|
21983
|
-
};
|
|
21984
|
-
return (React.createElement(MobileToolbarMenu, { style: { flexGrow: 1 } },
|
|
21985
|
-
React.createElement(AppBar$1, { position: "static" },
|
|
21986
|
-
React.createElement(Toolbar$1, { style: { minHeight: '50px' } },
|
|
21987
|
-
React.createElement(IconButton, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
21988
|
-
React.createElement(Menu$1, { sx: { color: 'white' } })),
|
|
21989
|
-
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
21990
|
-
'aria-labelledby': 'basic-button',
|
|
21991
|
-
} }, menuItems.map(function (page) { return (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|
|
21992
|
-
React.createElement(MenuItem, { sx: {
|
|
21993
|
-
width: '100%',
|
|
21994
|
-
}, key: page.name }, page.translatedTextRef))); })),
|
|
21995
|
-
React.createElement(IconButton, { size: "medium", edge: "end", color: "inherit", "aria-label": "menu", style: { marginLeft: 'auto' }, onClick: handleClickMenu },
|
|
21996
|
-
React.createElement(MoreVert, { sx: { color: 'white' } })),
|
|
21997
|
-
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu, MenuListProps: {
|
|
21998
|
-
'aria-labelledby': 'basic-button',
|
|
21999
|
-
} }, userMenuItems.map(function (i, index) { return (React.createElement(Box, { key: i.id },
|
|
22000
|
-
React.createElement(MenuItem, { key: i.id, onClick: function () {
|
|
22001
|
-
handleCloseMenu();
|
|
22002
|
-
i.action && i.action();
|
|
22003
|
-
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
22004
|
-
textDecoration: 'inherit',
|
|
22005
|
-
color: 'inherit',
|
|
22006
|
-
}, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
|
|
22007
|
-
userMenuItems.length > index + 1 && React.createElement(Divider, null))); }))))));
|
|
22008
|
-
};
|
|
22009
|
-
|
|
22010
|
-
var AppBar = function (_a) {
|
|
22011
|
-
var username = _a.username, currentPath = _a.currentPath, isProd = _a.isProd, appTitle = _a.appTitle, userMenuItems = _a.userMenuItems, menuItems = _a.menuItems, userRole = _a.userRole, colors = _a.colors;
|
|
22012
|
-
var _b = __read(React.useState(null), 2), userMenuAnchor = _b[0], setUserMenuAnchor = _b[1];
|
|
22013
|
-
var _handleIconButtonClick = function (event) {
|
|
22014
|
-
event.preventDefault();
|
|
22015
|
-
setUserMenuAnchor(event.currentTarget);
|
|
22016
|
-
};
|
|
22017
|
-
var _handleCloseUserMenu = function () {
|
|
22018
|
-
setUserMenuAnchor(null);
|
|
22019
|
-
};
|
|
22020
|
-
var _renderToolbarMenuItem = function (page) {
|
|
22021
|
-
var isActive = (page === null || page === void 0 ? void 0 : page.exact)
|
|
22022
|
-
? currentPath === page.redirectUrl
|
|
22023
|
-
: currentPath.includes(page.redirectUrl || '');
|
|
22024
|
-
return (React.createElement(ToolbarMenuItem, { className: isActive ? 'active' : '', to: page.redirectUrl || '', key: page.name, tabIndex: 0 }, page === null || page === void 0 ? void 0 : page.translatedTextRef));
|
|
22025
|
-
};
|
|
22026
|
-
return (React.createElement(Toolbar, null,
|
|
22027
|
-
React.createElement(ToolbarFixer, null,
|
|
22028
|
-
React.createElement(ToolbarInner, { colors: colors },
|
|
22029
|
-
React.createElement(ToolbarLeft, null,
|
|
22030
|
-
React.createElement(ToolbarTitle, { to: '/' },
|
|
22031
|
-
appTitle,
|
|
22032
|
-
!isProd && (React.createElement(EnvironmentTitle, null, process.env.REACT_APP_HOST)))),
|
|
22033
|
-
React.createElement(ToolbarRight, null,
|
|
22034
|
-
React.createElement(Button$1, { onClick: _handleIconButtonClick },
|
|
22035
|
-
React.createElement(AccountCircle, { color: "primary", fontSize: "large" }),
|
|
22036
|
-
React.createElement(UserContainer, null,
|
|
22037
|
-
React.createElement(AccountName, null, username),
|
|
22038
|
-
userRole && (React.createElement(Box, { sx: { fontSize: '14px', lineHeight: '20px' } }, userRole))),
|
|
22039
|
-
React.createElement(ArrowDropdown, { color: "primary" })),
|
|
22040
|
-
React.createElement(Menu$2, { open: Boolean(userMenuAnchor), anchorEl: userMenuAnchor, onClose: _handleCloseUserMenu, anchorOrigin: {
|
|
22041
|
-
vertical: 'bottom',
|
|
22042
|
-
horizontal: 'center',
|
|
22043
|
-
}, transformOrigin: {
|
|
22044
|
-
vertical: 'top',
|
|
22045
|
-
horizontal: 'center',
|
|
22046
|
-
} }, userMenuItems.map(function (i, index) {
|
|
22047
|
-
return (React.createElement(Box, { key: i.id },
|
|
22048
|
-
React.createElement(MenuItem$1, { key: i.id, onClick: function () {
|
|
22049
|
-
setUserMenuAnchor(null);
|
|
22050
|
-
i.action && i.action();
|
|
22051
|
-
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
22052
|
-
textDecoration: 'inherit',
|
|
22053
|
-
color: 'inherit',
|
|
22054
|
-
}, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
|
|
22055
|
-
userMenuItems.length > index + 1 && React.createElement(Divider$1, null)));
|
|
22056
|
-
})))),
|
|
22057
|
-
React.createElement(ToolbarMenu, null,
|
|
22058
|
-
React.createElement(ToolbarMenuInner, null, menuItems.map(function (page) { return _renderToolbarMenuItem(page); }))),
|
|
22059
|
-
React.createElement(MobileAppBar, { menuItems: menuItems, userMenuItems: userMenuItems, colors: colors }))));
|
|
22060
|
-
};
|
|
22061
|
-
|
|
22062
21735
|
var NavGuard = function (_a) {
|
|
22063
21736
|
var when = _a.when, title = _a.title, txt = _a.txt, txtSave = _a.txtSave, txtCancel = _a.txtCancel, txtDiscard = _a.txtDiscard, onSave = _a.onSave, onCancel = _a.onCancel, onDiscard = _a.onDiscard;
|
|
22064
21737
|
var _b = __read(React.useState(false), 2), open = _b[0], setOpen = _b[1];
|