grep-components 1.15.0-grepf-1792.6 → 1.15.0-grepf-1737.2
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,9 @@ 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
|
-
React__default.createElement("
|
|
4221
|
-
React__default.createElement(MenuItem, __assign({ disabled: true }, props), children))));
|
|
4242
|
+
React__default.createElement(MenuItem, __assign({ role: "menuitem", disabled: disabled }, props), children)));
|
|
4222
4243
|
};
|
|
4223
4244
|
|
|
4224
4245
|
var useStyles$g = makeStyles()(function (_a, _b) {
|
|
@@ -4273,7 +4294,7 @@ var CollapsableMenuStatusEvent = /** @class */ (function () {
|
|
|
4273
4294
|
return CollapsableMenuStatusEvent;
|
|
4274
4295
|
}());
|
|
4275
4296
|
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"]);
|
|
4297
|
+
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
4298
|
var listItemRef = useRef(null);
|
|
4278
4299
|
var _b = __read(useState(false), 2), open = _b[0], setOpen = _b[1];
|
|
4279
4300
|
var onStatusChange = useCallback$1(function (type) { return new CollapsableMenuStatusEvent(type, listItemRef); }, [listItemRef]);
|
|
@@ -4327,7 +4348,7 @@ var CollapsableMenuItem = function (_a) {
|
|
|
4327
4348
|
return window.dispatchEvent(new Event('resize'));
|
|
4328
4349
|
});
|
|
4329
4350
|
} }, items)))); };
|
|
4330
|
-
return
|
|
4351
|
+
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
4352
|
};
|
|
4332
4353
|
|
|
4333
4354
|
var useStyles$f = makeStyles()(function (_a) {
|
|
@@ -21710,354 +21731,6 @@ var GrepEditor = function (_a) {
|
|
|
21710
21731
|
React__default.createElement(EditorComponent, __assign({}, props))));
|
|
21711
21732
|
};
|
|
21712
21733
|
|
|
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 medium',
|
|
21729
|
-
textDecoration: 'none',
|
|
21730
|
-
':hover': {
|
|
21731
|
-
textDecoration: 'none',
|
|
21732
|
-
},
|
|
21733
|
-
}); });
|
|
21734
|
-
var EnvironmentTitle = styled('div')(function () { return ({
|
|
21735
|
-
color: 'rgba(0, 0, 0, 0.33)',
|
|
21736
|
-
marginLeft: '17px',
|
|
21737
|
-
}); });
|
|
21738
|
-
var Toolbar = styled('div')(function (_a) {
|
|
21739
|
-
var _b;
|
|
21740
|
-
var theme = _a.theme;
|
|
21741
|
-
return (_b = {
|
|
21742
|
-
display: 'flex',
|
|
21743
|
-
flexDirection: 'column'
|
|
21744
|
-
},
|
|
21745
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21746
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21747
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21748
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21749
|
-
},
|
|
21750
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21751
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21752
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21753
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21754
|
-
},
|
|
21755
|
-
_b);
|
|
21756
|
-
});
|
|
21757
|
-
var ToolbarFixer = styled('div')(function (_a) {
|
|
21758
|
-
var _b;
|
|
21759
|
-
var theme = _a.theme;
|
|
21760
|
-
return (_b = {
|
|
21761
|
-
display: 'flex',
|
|
21762
|
-
flexDirection: 'column',
|
|
21763
|
-
position: 'fixed',
|
|
21764
|
-
top: 0,
|
|
21765
|
-
left: 0,
|
|
21766
|
-
right: 0,
|
|
21767
|
-
zIndex: 101
|
|
21768
|
-
},
|
|
21769
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21770
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21771
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21772
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21773
|
-
},
|
|
21774
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21775
|
-
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21776
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21777
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21778
|
-
},
|
|
21779
|
-
_b);
|
|
21780
|
-
});
|
|
21781
|
-
var ToolbarInner = styled('div')(function (_a) {
|
|
21782
|
-
var _b;
|
|
21783
|
-
var colors = _a.colors, theme = _a.theme;
|
|
21784
|
-
if (!theme) {
|
|
21785
|
-
return {};
|
|
21786
|
-
}
|
|
21787
|
-
return _b = {
|
|
21788
|
-
alignItems: 'center',
|
|
21789
|
-
display: 'flex',
|
|
21790
|
-
margin: '0 auto',
|
|
21791
|
-
width: '100%',
|
|
21792
|
-
padding: 0,
|
|
21793
|
-
backgroundColor: colors.headerBackgroundColor
|
|
21794
|
-
},
|
|
21795
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21796
|
-
height: "".concat(dimensions.toolbarHeightMobile, "px"),
|
|
21797
|
-
minHeight: "".concat(dimensions.toolbarHeightMobile, "px"),
|
|
21798
|
-
},
|
|
21799
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21800
|
-
padding: 0,
|
|
21801
|
-
height: "".concat(dimensions.toolbarHeight, "px"),
|
|
21802
|
-
minHeight: "".concat(dimensions.toolbarHeight, "px"),
|
|
21803
|
-
},
|
|
21804
|
-
_b;
|
|
21805
|
-
});
|
|
21806
|
-
var ToolbarLeft = styled('div')(function () { return ({
|
|
21807
|
-
alignItems: 'center',
|
|
21808
|
-
display: 'flex',
|
|
21809
|
-
marginLeft: '40px',
|
|
21810
|
-
}); });
|
|
21811
|
-
var ToolbarRight = styled('div')(function (_a) {
|
|
21812
|
-
var _b;
|
|
21813
|
-
var theme = _a.theme;
|
|
21814
|
-
return (_b = {
|
|
21815
|
-
alignItems: 'center',
|
|
21816
|
-
display: 'flex',
|
|
21817
|
-
marginLeft: 'auto',
|
|
21818
|
-
marginRight: '40px'
|
|
21819
|
-
},
|
|
21820
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21821
|
-
display: 'none',
|
|
21822
|
-
},
|
|
21823
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21824
|
-
display: 'flex',
|
|
21825
|
-
},
|
|
21826
|
-
_b);
|
|
21827
|
-
});
|
|
21828
|
-
var UserContainer = styled('div')(function () { return ({
|
|
21829
|
-
display: 'flex',
|
|
21830
|
-
flexDirection: 'column',
|
|
21831
|
-
margin: '0 17px',
|
|
21832
|
-
textAlign: 'left',
|
|
21833
|
-
textTransform: 'none',
|
|
21834
|
-
fontWeight: '400',
|
|
21835
|
-
color: 'rgba(0, 0, 0, 0.87)',
|
|
21836
|
-
}); });
|
|
21837
|
-
var AccountName = styled('span')(function () { return ({
|
|
21838
|
-
fontSize: '18px',
|
|
21839
|
-
lineHeight: '25px',
|
|
21840
|
-
}); });
|
|
21841
|
-
var ToolbarMenu = styled('div')(function (_a) {
|
|
21842
|
-
var _b;
|
|
21843
|
-
var theme = _a.theme;
|
|
21844
|
-
return _b = {
|
|
21845
|
-
backgroundColor: theme.palette.primary.main,
|
|
21846
|
-
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21847
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21848
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21849
|
-
width: '100%',
|
|
21850
|
-
display: 'flex',
|
|
21851
|
-
alignItems: 'center',
|
|
21852
|
-
fontFamily: 'MontSerrat, Helvetica Neue, Helvetica, Arial, sans-serif',
|
|
21853
|
-
boxShadow: '0 3px 5px 0 rgba(0, 0, 0, 0.3)'
|
|
21854
|
-
},
|
|
21855
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21856
|
-
display: 'none',
|
|
21857
|
-
},
|
|
21858
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21859
|
-
display: 'flex',
|
|
21860
|
-
},
|
|
21861
|
-
_b;
|
|
21862
|
-
});
|
|
21863
|
-
var MobileToolbarMenu = styled('div')(function (_a) {
|
|
21864
|
-
var _b;
|
|
21865
|
-
var theme = _a.theme;
|
|
21866
|
-
return (_b = {
|
|
21867
|
-
backgroundColor: theme.palette.primary.main,
|
|
21868
|
-
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21869
|
-
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21870
|
-
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21871
|
-
width: '100%',
|
|
21872
|
-
flexGrow: 1,
|
|
21873
|
-
alignItems: 'center',
|
|
21874
|
-
fontFamily: 'MontSerrat, Helvetica Neue, Helvetica, Arial, sans-serif',
|
|
21875
|
-
boxShadow: '0 3px 5px 0 rgba(0, 0, 0, 0.3)'
|
|
21876
|
-
},
|
|
21877
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
21878
|
-
display: 'flex',
|
|
21879
|
-
},
|
|
21880
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
21881
|
-
display: 'none',
|
|
21882
|
-
},
|
|
21883
|
-
_b);
|
|
21884
|
-
});
|
|
21885
|
-
var ToolbarMenuInner = styled('div')(function (_a) {
|
|
21886
|
-
var _b;
|
|
21887
|
-
var theme = _a.theme;
|
|
21888
|
-
return (_b = {
|
|
21889
|
-
display: 'flex',
|
|
21890
|
-
height: 'fit-content',
|
|
21891
|
-
maxWidth: "".concat(dimensions.toolbarMenuWidth, "px"),
|
|
21892
|
-
margin: '0 auto',
|
|
21893
|
-
width: '100%'
|
|
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: '1.1rem',
|
|
21913
|
-
padding: '0 17px',
|
|
21914
|
-
height: '100%',
|
|
21915
|
-
textTransform: 'capitalize',
|
|
21916
|
-
userSelect: 'none',
|
|
21917
|
-
position: 'relative',
|
|
21918
|
-
textDecoration: 'none',
|
|
21919
|
-
':first-child': {
|
|
21920
|
-
paddingLeft: 0,
|
|
21921
|
-
':after': {
|
|
21922
|
-
marginLeft: '-24px',
|
|
21923
|
-
},
|
|
21924
|
-
},
|
|
21925
|
-
':last-child': {
|
|
21926
|
-
borderRight: 'none',
|
|
21927
|
-
},
|
|
21928
|
-
':after': {
|
|
21929
|
-
position: 'absolute',
|
|
21930
|
-
bottom: 0,
|
|
21931
|
-
left: '50%',
|
|
21932
|
-
width: '32px',
|
|
21933
|
-
marginLeft: '-16px',
|
|
21934
|
-
borderBottom: "2px solid ".concat(theme.palette.secondary.main),
|
|
21935
|
-
opacity: 0,
|
|
21936
|
-
content: '""',
|
|
21937
|
-
transition: 'all 0.3s ease',
|
|
21938
|
-
pointerEvents: 'none',
|
|
21939
|
-
},
|
|
21940
|
-
':focus': {
|
|
21941
|
-
outline: 'none',
|
|
21942
|
-
},
|
|
21943
|
-
':hover': {
|
|
21944
|
-
textDecoration: 'none',
|
|
21945
|
-
color: menuItemHoverGreen,
|
|
21946
|
-
},
|
|
21947
|
-
'.active:after, :hover:after, focus:after': {
|
|
21948
|
-
bottom: '-4px',
|
|
21949
|
-
opacity: '1',
|
|
21950
|
-
},
|
|
21951
|
-
});
|
|
21952
|
-
});
|
|
21953
|
-
var MobileToolbarMenuItem = styled(NavLink)(function () { return ({
|
|
21954
|
-
alignItems: 'center',
|
|
21955
|
-
color: 'black',
|
|
21956
|
-
cursor: 'pointer',
|
|
21957
|
-
display: 'flex',
|
|
21958
|
-
height: '100%',
|
|
21959
|
-
textTransform: 'capitalize',
|
|
21960
|
-
userSelect: 'none',
|
|
21961
|
-
position: 'relative',
|
|
21962
|
-
textDecoration: 'none',
|
|
21963
|
-
}); });
|
|
21964
|
-
|
|
21965
|
-
var MobileAppBar = function (_a) {
|
|
21966
|
-
var userMenuItems = _a.userMenuItems, menuItems = _a.menuItems;
|
|
21967
|
-
var _b = __read(React.useState(null), 2), anchorElNav = _b[0], setAnchorElNav = _b[1];
|
|
21968
|
-
var openNav = Boolean(anchorElNav);
|
|
21969
|
-
var handleClickNav = function (event) {
|
|
21970
|
-
setAnchorElNav(event.currentTarget);
|
|
21971
|
-
};
|
|
21972
|
-
var handleCloseNav = function () {
|
|
21973
|
-
setAnchorElNav(null);
|
|
21974
|
-
};
|
|
21975
|
-
var _c = __read(React.useState(null), 2), anchorElMenu = _c[0], setAnchorElMenu = _c[1];
|
|
21976
|
-
var openMenu = Boolean(anchorElMenu);
|
|
21977
|
-
var handleClickMenu = function (event) {
|
|
21978
|
-
setAnchorElMenu(event.currentTarget);
|
|
21979
|
-
};
|
|
21980
|
-
var handleCloseMenu = function () {
|
|
21981
|
-
setAnchorElMenu(null);
|
|
21982
|
-
};
|
|
21983
|
-
return (React.createElement(MobileToolbarMenu, { style: { flexGrow: 1 } },
|
|
21984
|
-
React.createElement(AppBar$1, { position: "static" },
|
|
21985
|
-
React.createElement(Toolbar$1, { style: { minHeight: '50px' } },
|
|
21986
|
-
React.createElement(IconButton, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
21987
|
-
React.createElement(Menu$1, { sx: { color: 'white' } })),
|
|
21988
|
-
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
21989
|
-
'aria-labelledby': 'basic-button',
|
|
21990
|
-
} }, menuItems.map(function (page) { return (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|
|
21991
|
-
React.createElement(MenuItem, { sx: {
|
|
21992
|
-
width: '100%',
|
|
21993
|
-
}, key: page.name }, page.translatedTextRef))); })),
|
|
21994
|
-
React.createElement(IconButton, { size: "medium", edge: "end", color: "inherit", "aria-label": "menu", style: { marginLeft: 'auto' }, onClick: handleClickMenu },
|
|
21995
|
-
React.createElement(MoreVert, { sx: { color: 'white' } })),
|
|
21996
|
-
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu, MenuListProps: {
|
|
21997
|
-
'aria-labelledby': 'basic-button',
|
|
21998
|
-
} }, userMenuItems.map(function (i, index) { return (React.createElement(Box, { key: i.id },
|
|
21999
|
-
React.createElement(MenuItem, { key: i.id, onClick: function () {
|
|
22000
|
-
handleCloseMenu();
|
|
22001
|
-
i.action && i.action();
|
|
22002
|
-
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
22003
|
-
textDecoration: 'inherit',
|
|
22004
|
-
color: 'inherit',
|
|
22005
|
-
}, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
|
|
22006
|
-
userMenuItems.length > index + 1 && React.createElement(Divider, null))); }))))));
|
|
22007
|
-
};
|
|
22008
|
-
|
|
22009
|
-
var AppBar = function (_a) {
|
|
22010
|
-
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;
|
|
22011
|
-
var _b = __read(React.useState(null), 2), userMenuAnchor = _b[0], setUserMenuAnchor = _b[1];
|
|
22012
|
-
var _handleIconButtonClick = function (event) {
|
|
22013
|
-
event.preventDefault();
|
|
22014
|
-
setUserMenuAnchor(event.currentTarget);
|
|
22015
|
-
};
|
|
22016
|
-
var _handleCloseUserMenu = function () {
|
|
22017
|
-
setUserMenuAnchor(null);
|
|
22018
|
-
};
|
|
22019
|
-
var _renderToolbarMenuItem = function (page) {
|
|
22020
|
-
var isActive = (page === null || page === void 0 ? void 0 : page.exact)
|
|
22021
|
-
? currentPath === page.redirectUrl
|
|
22022
|
-
: currentPath.includes(page.redirectUrl || '');
|
|
22023
|
-
return (React.createElement(ToolbarMenuItem, { className: isActive ? 'active' : '', to: page.redirectUrl || '', key: page.name, tabIndex: 0 }, page === null || page === void 0 ? void 0 : page.translatedTextRef));
|
|
22024
|
-
};
|
|
22025
|
-
return (React.createElement(Toolbar, null,
|
|
22026
|
-
React.createElement(ToolbarFixer, null,
|
|
22027
|
-
React.createElement(ToolbarInner, { colors: colors },
|
|
22028
|
-
React.createElement(ToolbarLeft, null,
|
|
22029
|
-
React.createElement(ToolbarTitle, { to: '/' },
|
|
22030
|
-
appTitle,
|
|
22031
|
-
!isProd && (React.createElement(EnvironmentTitle, null, process.env.REACT_APP_HOST)))),
|
|
22032
|
-
React.createElement(ToolbarRight, null,
|
|
22033
|
-
React.createElement(Button$1, { onClick: _handleIconButtonClick },
|
|
22034
|
-
React.createElement(AccountCircle, { color: "primary", fontSize: "large" }),
|
|
22035
|
-
React.createElement(UserContainer, null,
|
|
22036
|
-
React.createElement(AccountName, null, username),
|
|
22037
|
-
userRole && (React.createElement(Box, { sx: { fontSize: '14px', lineHeight: '20px' } }, userRole))),
|
|
22038
|
-
React.createElement(ArrowDropdown, { color: "primary" })),
|
|
22039
|
-
React.createElement(Menu$2, { open: Boolean(userMenuAnchor), anchorEl: userMenuAnchor, onClose: _handleCloseUserMenu, anchorOrigin: {
|
|
22040
|
-
vertical: 'bottom',
|
|
22041
|
-
horizontal: 'center',
|
|
22042
|
-
}, transformOrigin: {
|
|
22043
|
-
vertical: 'top',
|
|
22044
|
-
horizontal: 'center',
|
|
22045
|
-
} }, userMenuItems.map(function (i, index) {
|
|
22046
|
-
return (React.createElement(Box, { key: i.id },
|
|
22047
|
-
React.createElement(MenuItem$1, { key: i.id, onClick: function () {
|
|
22048
|
-
setUserMenuAnchor(null);
|
|
22049
|
-
i.action && i.action();
|
|
22050
|
-
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
22051
|
-
textDecoration: 'inherit',
|
|
22052
|
-
color: 'inherit',
|
|
22053
|
-
}, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
|
|
22054
|
-
userMenuItems.length > index + 1 && React.createElement(Divider$1, null)));
|
|
22055
|
-
})))),
|
|
22056
|
-
React.createElement(ToolbarMenu, null,
|
|
22057
|
-
React.createElement(ToolbarMenuInner, null, menuItems.map(function (page) { return _renderToolbarMenuItem(page); }))),
|
|
22058
|
-
React.createElement(MobileAppBar, { menuItems: menuItems, userMenuItems: userMenuItems, colors: colors }))));
|
|
22059
|
-
};
|
|
22060
|
-
|
|
22061
21734
|
var NavGuard = function (_a) {
|
|
22062
21735
|
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;
|
|
22063
21736
|
var _b = __read(React.useState(false), 2), open = _b[0], setOpen = _b[1];
|