grep-components 1.16.0-grepf-1693.2 → 1.16.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/41017f048e09b7d9.png +0 -0
- package/dist/assets/index.d.ts +2 -0
- package/dist/components/AppBar/AppBar.d.ts +14 -0
- package/dist/components/AppBar/MainAppStyles.d.ts +30 -0
- package/dist/components/AppBar/MobileAppBar.d.ts +9 -0
- package/dist/components/AppBar/stories/AppBarStory.stories.d.ts +15 -0
- package/dist/components/AppBar/types.d.ts +32 -0
- package/dist/components/AppBarNavList/stories/AppBarNavList.stories.d.ts +2 -0
- package/dist/components/Footer/index.d.ts +3 -0
- package/dist/components/Footer/styles/index.d.ts +1 -1
- package/dist/components/GrepDatePicker/index.d.ts +1 -1
- package/dist/components/GrepDateRange/index.d.ts +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +434 -62
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/components/AppBar/index.d.ts +0 -3
- package/dist/components/AppBar/stories/AppBar.stories.d.ts +0 -1
- package/dist/components/AppBar/styles/index.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -5,15 +5,14 @@ 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';
|
|
11
8
|
import AccountCircle from '@mui/icons-material/AccountCircle';
|
|
12
9
|
import ArrowDropdown from '@mui/icons-material/ArrowDropDown';
|
|
13
|
-
import {
|
|
10
|
+
import { 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, AppBar as AppBar$1, Toolbar as Toolbar$1, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@mui/material';
|
|
11
|
+
import { useTheme as useTheme$1 } from '@mui/material/styles';
|
|
12
|
+
import { useHistory, NavLink, Prompt } from 'react-router-dom';
|
|
14
13
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
15
14
|
import IconExpand from '@mui/icons-material/ExpandMore';
|
|
16
|
-
import { ArrowForward, Info, ExpandMore, ExpandLess } from '@mui/icons-material';
|
|
15
|
+
import { ArrowForward, Info, ExpandMore, ExpandLess, Menu as Menu$1 } from '@mui/icons-material';
|
|
17
16
|
import ListItemIcon$1 from '@mui/material/ListItemIcon';
|
|
18
17
|
import MoreVert from '@mui/icons-material/MoreVert';
|
|
19
18
|
import { useDispatch, connect, Provider as Provider$1, useSelector } from 'react-redux';
|
|
@@ -40,6 +39,10 @@ export { ContentState } from 'draft-js';
|
|
|
40
39
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
41
40
|
import FormatBold from '@mui/icons-material/FormatBold';
|
|
42
41
|
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';
|
|
43
46
|
import Link$1 from '@mui/material/Link';
|
|
44
47
|
|
|
45
48
|
dayjs.extend(isBetweenPlugin);
|
|
@@ -4058,31 +4061,6 @@ var makeStyles = (_a = tssReact.createMakeAndWithStyles({
|
|
|
4058
4061
|
//"useTheme": useTheme as (()=> MyTheme)
|
|
4059
4062
|
}), _a.makeStyles), withStyles = _a.withStyles;
|
|
4060
4063
|
|
|
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
|
-
|
|
4086
4064
|
var useStyles$i = makeStyles()(function (_a) {
|
|
4087
4065
|
var palette = _a.palette;
|
|
4088
4066
|
return ({
|
|
@@ -4391,7 +4369,7 @@ var DropdownMenu = function (_a) {
|
|
|
4391
4369
|
};
|
|
4392
4370
|
|
|
4393
4371
|
var useFooterStyles = makeStyles()(function (theme) {
|
|
4394
|
-
var _a, _b, _c;
|
|
4372
|
+
var _a, _b, _c, _d, _e;
|
|
4395
4373
|
return ({
|
|
4396
4374
|
footer: (_a = {
|
|
4397
4375
|
bottom: 0,
|
|
@@ -4401,48 +4379,81 @@ var useFooterStyles = makeStyles()(function (theme) {
|
|
|
4401
4379
|
alignItems: 'center',
|
|
4402
4380
|
backgroundColor: theme.palette.primary.main
|
|
4403
4381
|
},
|
|
4404
|
-
_a[theme.breakpoints.down('
|
|
4382
|
+
_a[theme.breakpoints.down('md')] = {
|
|
4405
4383
|
minHeight: 'unset',
|
|
4406
4384
|
},
|
|
4407
4385
|
_a[theme.breakpoints.up('md')] = {
|
|
4408
|
-
minHeight:
|
|
4386
|
+
minHeight: '100px',
|
|
4409
4387
|
},
|
|
4388
|
+
_a.fontFamily = 'Montserrat',
|
|
4389
|
+
_a.fontWeight = 600,
|
|
4390
|
+
_a.fontSize = '14px',
|
|
4410
4391
|
_a),
|
|
4411
|
-
|
|
4392
|
+
content: (_b = {
|
|
4412
4393
|
display: 'flex',
|
|
4413
|
-
|
|
4394
|
+
width: '100%'
|
|
4414
4395
|
},
|
|
4415
|
-
_b[theme.breakpoints.down('
|
|
4396
|
+
_b[theme.breakpoints.down('md')] = {
|
|
4416
4397
|
flexDirection: 'column',
|
|
4398
|
+
padding: '0',
|
|
4399
|
+
a: {
|
|
4400
|
+
width: '150px',
|
|
4401
|
+
margin: '40px auto 40px auto',
|
|
4402
|
+
},
|
|
4417
4403
|
},
|
|
4418
4404
|
_b[theme.breakpoints.up('md')] = {
|
|
4419
4405
|
flexDirection: 'row',
|
|
4406
|
+
padding: '0 12px 0 12px',
|
|
4407
|
+
a: {
|
|
4408
|
+
marginLeft: '28px',
|
|
4409
|
+
},
|
|
4420
4410
|
},
|
|
4421
4411
|
_b),
|
|
4422
|
-
|
|
4412
|
+
serviceNameText: (_c = {
|
|
4423
4413
|
color: Colors.white,
|
|
4424
|
-
width: 'fit-content',
|
|
4425
|
-
height: '10px'
|
|
4426
|
-
},
|
|
4427
|
-
_c[theme.breakpoints.down('lg')] = {
|
|
4428
|
-
margin: '0 auto',
|
|
4429
4414
|
textAlign: 'center',
|
|
4430
|
-
|
|
4415
|
+
display: 'block'
|
|
4416
|
+
},
|
|
4417
|
+
_c[theme.breakpoints.down('md')] = {
|
|
4418
|
+
marginBottom: '30px',
|
|
4419
|
+
},
|
|
4420
|
+
_c),
|
|
4421
|
+
list: (_d = {
|
|
4422
|
+
display: 'flex',
|
|
4423
|
+
flexDirection: 'row',
|
|
4424
|
+
justifyContent: 'center'
|
|
4425
|
+
},
|
|
4426
|
+
_d[theme.breakpoints.down('md')] = {
|
|
4427
|
+
marginBottom: '40px',
|
|
4428
|
+
flexWrap: 'wrap',
|
|
4429
|
+
height: '64px',
|
|
4431
4430
|
},
|
|
4432
|
-
|
|
4431
|
+
_d),
|
|
4432
|
+
item: (_e = {
|
|
4433
|
+
color: Colors.white,
|
|
4434
|
+
width: 'fit-content',
|
|
4433
4435
|
margin: '0',
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
+
height: '10px',
|
|
4437
|
+
gap: '10px',
|
|
4438
|
+
borderRight: "1px solid ".concat(theme.palette.divider)
|
|
4439
|
+
},
|
|
4440
|
+
_e[theme.breakpoints.down('md')] = {
|
|
4441
|
+
textAlign: 'center',
|
|
4442
|
+
width: 'filter-content',
|
|
4436
4443
|
},
|
|
4437
|
-
|
|
4444
|
+
_e['&:last-child'] = {
|
|
4438
4445
|
border: '0 !important',
|
|
4439
4446
|
},
|
|
4440
|
-
|
|
4447
|
+
_e),
|
|
4441
4448
|
itemText: {
|
|
4442
4449
|
padding: 0,
|
|
4443
4450
|
margin: '0 auto',
|
|
4451
|
+
fontFamily: 'Montserrat',
|
|
4452
|
+
fontWeight: 400,
|
|
4453
|
+
fontSize: '14px',
|
|
4444
4454
|
},
|
|
4445
4455
|
itemBtn: {
|
|
4456
|
+
textDecoration: 'underline',
|
|
4446
4457
|
'&:hover': {
|
|
4447
4458
|
backgroundColor: 'unset',
|
|
4448
4459
|
},
|
|
@@ -4451,18 +4462,28 @@ var useFooterStyles = makeStyles()(function (theme) {
|
|
|
4451
4462
|
});
|
|
4452
4463
|
|
|
4453
4464
|
var Footer = function (_a) {
|
|
4454
|
-
var items = _a.items;
|
|
4465
|
+
var items = _a.items, serviceNameText = _a.serviceNameText, udirLink = _a.udirLink, udirLogo = _a.udirLogo;
|
|
4455
4466
|
var classes = useFooterStyles().classes;
|
|
4456
|
-
var renderItem = function (text) { return (React__default.createElement(ListItemText, { className: classes.itemText, primary: text, primaryTypographyProps: {
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4467
|
+
var renderItem = function (text) { return (React__default.createElement(ListItemText, { className: classes.itemText, primary: text, primaryTypographyProps: {
|
|
4468
|
+
style: { fontSize: 14, fontFamily: 'Montserrat', fontWeight: 400 },
|
|
4469
|
+
} })); };
|
|
4470
|
+
return (React__default.createElement(Box, { className: classes.footer },
|
|
4471
|
+
React__default.createElement(Box, { className: classes.content },
|
|
4472
|
+
React__default.createElement("a", { href: udirLink },
|
|
4473
|
+
React__default.createElement("img", { src: udirLogo, alt: "Utdanningsdirektoratet logo", style: { height: '43px', width: '150px' } })),
|
|
4474
|
+
React__default.createElement(Container, { sx: {
|
|
4475
|
+
maxWidth: '100% !important',
|
|
4476
|
+
paddingLeft: '16px !important',
|
|
4477
|
+
paddingRight: '16px !important',
|
|
4478
|
+
} },
|
|
4479
|
+
React__default.createElement("span", { className: classes.serviceNameText }, serviceNameText),
|
|
4480
|
+
React__default.createElement(List, { className: classes.list }, items.map(function (_a, i) {
|
|
4481
|
+
var label = _a.label, render = _a.render, onClickItem = _a.onClickItem;
|
|
4482
|
+
return (React__default.createElement(ListItem, { key: i, classes: {
|
|
4483
|
+
root: classes.item,
|
|
4484
|
+
button: onClickItem ? classes.itemBtn : undefined,
|
|
4485
|
+
}, onClick: onClickItem, button: !!onClickItem }, render ? render(function () { return renderItem(label); }) : renderItem(label)));
|
|
4486
|
+
}))))));
|
|
4466
4487
|
};
|
|
4467
4488
|
|
|
4468
4489
|
var LinkList = function (props) { return (React.createElement(Box, { width: "100%", flexDirection: "column" },
|
|
@@ -5624,7 +5645,7 @@ var useContentElements = function (container, selector, options) {
|
|
|
5624
5645
|
};
|
|
5625
5646
|
|
|
5626
5647
|
var DatePicker = function (_a) {
|
|
5627
|
-
var id = _a.id, label = _a.label, value = _a.value, variant = _a.variant, onChange = _a.onChange, errorMessage = _a.errorMessage, placeholder = _a.placeholder, fullWidth = _a.fullWidth, required = _a.required, onFocus = _a.onFocus,
|
|
5648
|
+
var id = _a.id, label = _a.label, value = _a.value, variant = _a.variant, onChange = _a.onChange, errorMessage = _a.errorMessage, placeholder = _a.placeholder, fullWidth = _a.fullWidth, required = _a.required, onFocus = _a.onFocus, props = __rest$1(_a, ["id", "label", "value", "variant", "onChange", "errorMessage", "placeholder", "fullWidth", "required", "onFocus"]);
|
|
5628
5649
|
var _b = __read(useDate(value), 2), date = _b[0], setDate = _b[1];
|
|
5629
5650
|
var _c = __read(useState(), 2), error = _c[0], setError = _c[1];
|
|
5630
5651
|
var helperText = errorMessage || error || props.helperText;
|
|
@@ -5652,7 +5673,7 @@ var DatePicker = function (_a) {
|
|
|
5652
5673
|
default:
|
|
5653
5674
|
setError(undefined);
|
|
5654
5675
|
}
|
|
5655
|
-
}, value: date, onChange: setDate, renderInput: function (params) { return (React__default.createElement(TextField, __assign({ id: id }, params, { label: label, variant: variant, onFocus: onFocus, required: required, fullWidth: fullWidth, placeholder: placeholder,
|
|
5676
|
+
}, value: date, onChange: setDate, renderInput: function (params) { return (React__default.createElement(TextField, __assign({ id: id }, params, { label: label, variant: variant, onFocus: onFocus, required: required, fullWidth: fullWidth, placeholder: placeholder, error: !!error || !!errorMessage }, (helperText && { helperText: helperText })))); } }, props))));
|
|
5656
5677
|
};
|
|
5657
5678
|
|
|
5658
5679
|
var GrepDateRange = function (_a) {
|
|
@@ -21732,6 +21753,355 @@ var GrepEditor = function (_a) {
|
|
|
21732
21753
|
React__default.createElement(EditorComponent, __assign({}, props))));
|
|
21733
21754
|
};
|
|
21734
21755
|
|
|
21756
|
+
var dimensions = {
|
|
21757
|
+
breadcrumbsFontSize: 16,
|
|
21758
|
+
contentWidth: 1028,
|
|
21759
|
+
footerHeight: 50,
|
|
21760
|
+
inputBoxHeight: 61,
|
|
21761
|
+
toolbarHeight: 80,
|
|
21762
|
+
toolbarHeightMobile: 40,
|
|
21763
|
+
toolbarWidth: 1260,
|
|
21764
|
+
toolbarMenuWidth: 1028,
|
|
21765
|
+
toolbarMenuHeight: 50,
|
|
21766
|
+
};
|
|
21767
|
+
var ToolbarTitle = styled(NavLink)(function () { return ({
|
|
21768
|
+
display: 'flex',
|
|
21769
|
+
fontSize: '24px',
|
|
21770
|
+
color: '#303030',
|
|
21771
|
+
fontFamily: 'Montserrat',
|
|
21772
|
+
fontWeight: 500,
|
|
21773
|
+
textDecoration: 'none',
|
|
21774
|
+
':hover': {
|
|
21775
|
+
textDecoration: 'none',
|
|
21776
|
+
},
|
|
21777
|
+
}); });
|
|
21778
|
+
var EnvironmentTitle = styled('div')(function () { return ({
|
|
21779
|
+
color: 'rgba(0, 0, 0, 0.33)',
|
|
21780
|
+
marginLeft: '17px',
|
|
21781
|
+
}); });
|
|
21782
|
+
var Toolbar = styled('div')(function (_a) {
|
|
21783
|
+
var _b;
|
|
21784
|
+
var theme = _a.theme;
|
|
21785
|
+
return (_b = {
|
|
21786
|
+
display: 'flex',
|
|
21787
|
+
flexDirection: 'column'
|
|
21788
|
+
},
|
|
21789
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
21790
|
+
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21791
|
+
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21792
|
+
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21793
|
+
},
|
|
21794
|
+
_b[theme.breakpoints.up('sm')] = {
|
|
21795
|
+
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21796
|
+
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21797
|
+
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21798
|
+
},
|
|
21799
|
+
_b);
|
|
21800
|
+
});
|
|
21801
|
+
var ToolbarFixer = styled('div')(function (_a) {
|
|
21802
|
+
var _b;
|
|
21803
|
+
var theme = _a.theme;
|
|
21804
|
+
return (_b = {
|
|
21805
|
+
display: 'flex',
|
|
21806
|
+
flexDirection: 'column',
|
|
21807
|
+
position: 'fixed',
|
|
21808
|
+
top: 0,
|
|
21809
|
+
left: 0,
|
|
21810
|
+
right: 0,
|
|
21811
|
+
zIndex: 101
|
|
21812
|
+
},
|
|
21813
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
21814
|
+
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21815
|
+
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21816
|
+
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
|
|
21817
|
+
},
|
|
21818
|
+
_b[theme.breakpoints.up('sm')] = {
|
|
21819
|
+
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21820
|
+
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21821
|
+
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21822
|
+
},
|
|
21823
|
+
_b);
|
|
21824
|
+
});
|
|
21825
|
+
var ToolbarInner = styled('div')(function (_a) {
|
|
21826
|
+
var _b;
|
|
21827
|
+
var colors = _a.colors, theme = _a.theme;
|
|
21828
|
+
if (!theme) {
|
|
21829
|
+
return {};
|
|
21830
|
+
}
|
|
21831
|
+
return _b = {
|
|
21832
|
+
alignItems: 'center',
|
|
21833
|
+
display: 'flex',
|
|
21834
|
+
margin: '0 auto',
|
|
21835
|
+
width: '100%',
|
|
21836
|
+
padding: 0,
|
|
21837
|
+
backgroundColor: colors.headerBackgroundColor
|
|
21838
|
+
},
|
|
21839
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
21840
|
+
height: "".concat(dimensions.toolbarHeightMobile, "px"),
|
|
21841
|
+
minHeight: "".concat(dimensions.toolbarHeightMobile, "px"),
|
|
21842
|
+
},
|
|
21843
|
+
_b[theme.breakpoints.up('sm')] = {
|
|
21844
|
+
padding: 0,
|
|
21845
|
+
height: "".concat(dimensions.toolbarHeight, "px"),
|
|
21846
|
+
minHeight: "".concat(dimensions.toolbarHeight, "px"),
|
|
21847
|
+
},
|
|
21848
|
+
_b;
|
|
21849
|
+
});
|
|
21850
|
+
var ToolbarLeft = styled('div')(function () { return ({
|
|
21851
|
+
alignItems: 'center',
|
|
21852
|
+
display: 'flex',
|
|
21853
|
+
marginLeft: '40px',
|
|
21854
|
+
}); });
|
|
21855
|
+
var ToolbarRight = styled('div')(function (_a) {
|
|
21856
|
+
var _b;
|
|
21857
|
+
var theme = _a.theme;
|
|
21858
|
+
return (_b = {
|
|
21859
|
+
alignItems: 'center',
|
|
21860
|
+
display: 'flex',
|
|
21861
|
+
marginLeft: 'auto',
|
|
21862
|
+
marginRight: '40px'
|
|
21863
|
+
},
|
|
21864
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
21865
|
+
display: 'none',
|
|
21866
|
+
},
|
|
21867
|
+
_b[theme.breakpoints.up('sm')] = {
|
|
21868
|
+
display: 'flex',
|
|
21869
|
+
},
|
|
21870
|
+
_b);
|
|
21871
|
+
});
|
|
21872
|
+
var UserContainer = styled('div')(function () { return ({
|
|
21873
|
+
display: 'flex',
|
|
21874
|
+
flexDirection: 'column',
|
|
21875
|
+
margin: '0 17px',
|
|
21876
|
+
textAlign: 'left',
|
|
21877
|
+
textTransform: 'none',
|
|
21878
|
+
fontWeight: '400',
|
|
21879
|
+
color: 'rgba(0, 0, 0, 0.87)',
|
|
21880
|
+
}); });
|
|
21881
|
+
var AccountName = styled('span')(function () { return ({
|
|
21882
|
+
fontSize: '18px',
|
|
21883
|
+
lineHeight: '25px',
|
|
21884
|
+
}); });
|
|
21885
|
+
var ToolbarMenu = styled('div')(function (_a) {
|
|
21886
|
+
var _b;
|
|
21887
|
+
var theme = _a.theme;
|
|
21888
|
+
return _b = {
|
|
21889
|
+
backgroundColor: theme.palette.primary.main,
|
|
21890
|
+
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21891
|
+
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21892
|
+
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21893
|
+
width: '100%',
|
|
21894
|
+
display: 'flex',
|
|
21895
|
+
alignItems: 'center',
|
|
21896
|
+
fontFamily: 'MontSerrat, Helvetica Neue, Helvetica, Arial, sans-serif',
|
|
21897
|
+
boxShadow: '0 3px 5px 0 rgba(0, 0, 0, 0.3)'
|
|
21898
|
+
},
|
|
21899
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
21900
|
+
display: 'none',
|
|
21901
|
+
},
|
|
21902
|
+
_b[theme.breakpoints.up('sm')] = {
|
|
21903
|
+
display: 'flex',
|
|
21904
|
+
},
|
|
21905
|
+
_b;
|
|
21906
|
+
});
|
|
21907
|
+
var MobileToolbarMenu = styled('div')(function (_a) {
|
|
21908
|
+
var _b;
|
|
21909
|
+
var theme = _a.theme;
|
|
21910
|
+
return (_b = {
|
|
21911
|
+
backgroundColor: theme.palette.primary.main,
|
|
21912
|
+
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21913
|
+
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21914
|
+
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21915
|
+
width: '100%',
|
|
21916
|
+
flexGrow: 1,
|
|
21917
|
+
alignItems: 'center',
|
|
21918
|
+
fontFamily: 'MontSerrat, Helvetica Neue, Helvetica, Arial, sans-serif',
|
|
21919
|
+
boxShadow: '0 3px 5px 0 rgba(0, 0, 0, 0.3)'
|
|
21920
|
+
},
|
|
21921
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
21922
|
+
display: 'flex',
|
|
21923
|
+
},
|
|
21924
|
+
_b[theme.breakpoints.up('sm')] = {
|
|
21925
|
+
display: 'none',
|
|
21926
|
+
},
|
|
21927
|
+
_b);
|
|
21928
|
+
});
|
|
21929
|
+
var ToolbarMenuInner = styled('div')(function (_a) {
|
|
21930
|
+
var _b;
|
|
21931
|
+
var theme = _a.theme;
|
|
21932
|
+
return (_b = {
|
|
21933
|
+
display: 'flex',
|
|
21934
|
+
height: 'fit-content',
|
|
21935
|
+
maxWidth: "".concat(dimensions.toolbarMenuWidth, "px"),
|
|
21936
|
+
margin: '0 auto'
|
|
21937
|
+
},
|
|
21938
|
+
_b[theme.breakpoints.down('lg')] = {
|
|
21939
|
+
padding: '0 24px',
|
|
21940
|
+
},
|
|
21941
|
+
_b[theme.breakpoints.up('lg')] = {
|
|
21942
|
+
padding: 0,
|
|
21943
|
+
},
|
|
21944
|
+
_b);
|
|
21945
|
+
});
|
|
21946
|
+
var menuItemHoverGreen = '#B9E1CC';
|
|
21947
|
+
var ToolbarMenuItem = styled(NavLink)(function (_a) {
|
|
21948
|
+
var theme = _a.theme;
|
|
21949
|
+
return ({
|
|
21950
|
+
alignItems: 'center',
|
|
21951
|
+
borderRight: '1px solid #696868',
|
|
21952
|
+
color: theme.palette.background.default,
|
|
21953
|
+
cursor: 'pointer',
|
|
21954
|
+
display: 'flex',
|
|
21955
|
+
fontSize: '16px',
|
|
21956
|
+
padding: '0 17px',
|
|
21957
|
+
height: '100%',
|
|
21958
|
+
textTransform: 'capitalize',
|
|
21959
|
+
userSelect: 'none',
|
|
21960
|
+
position: 'relative',
|
|
21961
|
+
textDecoration: 'none',
|
|
21962
|
+
fontWeight: 500,
|
|
21963
|
+
':first-child': {
|
|
21964
|
+
paddingLeft: 0,
|
|
21965
|
+
':after': {
|
|
21966
|
+
marginLeft: '-24px',
|
|
21967
|
+
},
|
|
21968
|
+
},
|
|
21969
|
+
':last-child': {
|
|
21970
|
+
borderRight: 'none',
|
|
21971
|
+
},
|
|
21972
|
+
':after': {
|
|
21973
|
+
position: 'absolute',
|
|
21974
|
+
bottom: 0,
|
|
21975
|
+
left: '50%',
|
|
21976
|
+
width: '32px',
|
|
21977
|
+
marginLeft: '-16px',
|
|
21978
|
+
borderBottom: "2px solid ".concat(theme.palette.secondary.main),
|
|
21979
|
+
opacity: 0,
|
|
21980
|
+
content: '""',
|
|
21981
|
+
transition: 'all 0.3s ease',
|
|
21982
|
+
pointerEvents: 'none',
|
|
21983
|
+
},
|
|
21984
|
+
':focus': {
|
|
21985
|
+
outline: 'none',
|
|
21986
|
+
},
|
|
21987
|
+
':hover': {
|
|
21988
|
+
textDecoration: 'none',
|
|
21989
|
+
color: menuItemHoverGreen,
|
|
21990
|
+
},
|
|
21991
|
+
'.active:after, :hover:after, focus:after': {
|
|
21992
|
+
bottom: '-4px',
|
|
21993
|
+
opacity: '1',
|
|
21994
|
+
},
|
|
21995
|
+
});
|
|
21996
|
+
});
|
|
21997
|
+
var MobileToolbarMenuItem = styled(NavLink)(function () { return ({
|
|
21998
|
+
alignItems: 'center',
|
|
21999
|
+
color: 'black',
|
|
22000
|
+
cursor: 'pointer',
|
|
22001
|
+
display: 'flex',
|
|
22002
|
+
height: '100%',
|
|
22003
|
+
textTransform: 'capitalize',
|
|
22004
|
+
userSelect: 'none',
|
|
22005
|
+
position: 'relative',
|
|
22006
|
+
textDecoration: 'none',
|
|
22007
|
+
}); });
|
|
22008
|
+
|
|
22009
|
+
var MobileAppBar = function (_a) {
|
|
22010
|
+
var userMenuItems = _a.userMenuItems, menuItems = _a.menuItems;
|
|
22011
|
+
var _b = __read(React.useState(null), 2), anchorElNav = _b[0], setAnchorElNav = _b[1];
|
|
22012
|
+
var openNav = Boolean(anchorElNav);
|
|
22013
|
+
var handleClickNav = function (event) {
|
|
22014
|
+
setAnchorElNav(event.currentTarget);
|
|
22015
|
+
};
|
|
22016
|
+
var handleCloseNav = function () {
|
|
22017
|
+
setAnchorElNav(null);
|
|
22018
|
+
};
|
|
22019
|
+
var _c = __read(React.useState(null), 2), anchorElMenu = _c[0], setAnchorElMenu = _c[1];
|
|
22020
|
+
var openMenu = Boolean(anchorElMenu);
|
|
22021
|
+
var handleClickMenu = function (event) {
|
|
22022
|
+
setAnchorElMenu(event.currentTarget);
|
|
22023
|
+
};
|
|
22024
|
+
var handleCloseMenu = function () {
|
|
22025
|
+
setAnchorElMenu(null);
|
|
22026
|
+
};
|
|
22027
|
+
return (React.createElement(MobileToolbarMenu, { style: { flexGrow: 1 } },
|
|
22028
|
+
React.createElement(AppBar$1, { position: "static" },
|
|
22029
|
+
React.createElement(Toolbar$1, { style: { minHeight: '50px' } },
|
|
22030
|
+
React.createElement(IconButton, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
22031
|
+
React.createElement(Menu$1, { sx: { color: 'white' } })),
|
|
22032
|
+
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
22033
|
+
'aria-labelledby': 'basic-button',
|
|
22034
|
+
} }, menuItems.map(function (page) { return (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|
|
22035
|
+
React.createElement(MenuItem, { sx: {
|
|
22036
|
+
width: '100%',
|
|
22037
|
+
}, key: page.name }, page.translatedTextRef))); })),
|
|
22038
|
+
React.createElement(IconButton, { size: "medium", edge: "end", color: "inherit", "aria-label": "menu", style: { marginLeft: 'auto' }, onClick: handleClickMenu },
|
|
22039
|
+
React.createElement(MoreVert, { sx: { color: 'white' } })),
|
|
22040
|
+
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu, MenuListProps: {
|
|
22041
|
+
'aria-labelledby': 'basic-button',
|
|
22042
|
+
} }, userMenuItems.map(function (i, index) { return (React.createElement(Box, { key: i.id },
|
|
22043
|
+
React.createElement(MenuItem, { key: i.id, onClick: function () {
|
|
22044
|
+
handleCloseMenu();
|
|
22045
|
+
i.action && i.action();
|
|
22046
|
+
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
22047
|
+
textDecoration: 'inherit',
|
|
22048
|
+
color: 'inherit',
|
|
22049
|
+
}, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
|
|
22050
|
+
userMenuItems.length > index + 1 && React.createElement(Divider, null))); }))))));
|
|
22051
|
+
};
|
|
22052
|
+
|
|
22053
|
+
var AppBar = function (_a) {
|
|
22054
|
+
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;
|
|
22055
|
+
var _b = __read(React.useState(null), 2), userMenuAnchor = _b[0], setUserMenuAnchor = _b[1];
|
|
22056
|
+
var _handleIconButtonClick = function (event) {
|
|
22057
|
+
event.preventDefault();
|
|
22058
|
+
setUserMenuAnchor(event.currentTarget);
|
|
22059
|
+
};
|
|
22060
|
+
var _handleCloseUserMenu = function () {
|
|
22061
|
+
setUserMenuAnchor(null);
|
|
22062
|
+
};
|
|
22063
|
+
var _renderToolbarMenuItem = function (page) {
|
|
22064
|
+
var isActive = (page === null || page === void 0 ? void 0 : page.exact)
|
|
22065
|
+
? currentPath === page.redirectUrl
|
|
22066
|
+
: currentPath.includes(page.redirectUrl || '');
|
|
22067
|
+
return (React.createElement(ToolbarMenuItem, { className: isActive ? 'active' : '', to: page.redirectUrl || '', key: page.name, tabIndex: 0 }, page === null || page === void 0 ? void 0 : page.translatedTextRef));
|
|
22068
|
+
};
|
|
22069
|
+
return (React.createElement(Toolbar, null,
|
|
22070
|
+
React.createElement(ToolbarFixer, null,
|
|
22071
|
+
React.createElement(ToolbarInner, { colors: colors },
|
|
22072
|
+
React.createElement(ToolbarLeft, null,
|
|
22073
|
+
React.createElement(ToolbarTitle, { to: '/' },
|
|
22074
|
+
appTitle,
|
|
22075
|
+
!isProd && (React.createElement(EnvironmentTitle, null, process.env.REACT_APP_HOST)))),
|
|
22076
|
+
React.createElement(ToolbarRight, null,
|
|
22077
|
+
React.createElement(Button$1, { onClick: _handleIconButtonClick },
|
|
22078
|
+
React.createElement(AccountCircle, { color: "primary", fontSize: "large" }),
|
|
22079
|
+
React.createElement(UserContainer, null,
|
|
22080
|
+
React.createElement(AccountName, null, username),
|
|
22081
|
+
userRole && (React.createElement(Box, { sx: { fontSize: '14px', lineHeight: '20px' } }, userRole))),
|
|
22082
|
+
React.createElement(ArrowDropdown, { color: "primary" })),
|
|
22083
|
+
React.createElement(Menu$2, { open: Boolean(userMenuAnchor), anchorEl: userMenuAnchor, onClose: _handleCloseUserMenu, anchorOrigin: {
|
|
22084
|
+
vertical: 'bottom',
|
|
22085
|
+
horizontal: 'center',
|
|
22086
|
+
}, transformOrigin: {
|
|
22087
|
+
vertical: 'top',
|
|
22088
|
+
horizontal: 'center',
|
|
22089
|
+
} }, userMenuItems.map(function (i, index) {
|
|
22090
|
+
return (React.createElement(Box, { key: i.id },
|
|
22091
|
+
React.createElement(MenuItem$1, { key: i.id, onClick: function () {
|
|
22092
|
+
setUserMenuAnchor(null);
|
|
22093
|
+
i.action && i.action();
|
|
22094
|
+
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
22095
|
+
textDecoration: 'inherit',
|
|
22096
|
+
color: 'inherit',
|
|
22097
|
+
}, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
|
|
22098
|
+
userMenuItems.length > index + 1 && React.createElement(Divider$1, null)));
|
|
22099
|
+
})))),
|
|
22100
|
+
React.createElement(ToolbarMenu, null,
|
|
22101
|
+
React.createElement(ToolbarMenuInner, null, menuItems.map(function (page) { return _renderToolbarMenuItem(page); }))),
|
|
22102
|
+
React.createElement(MobileAppBar, { menuItems: menuItems, userMenuItems: userMenuItems, colors: colors }))));
|
|
22103
|
+
};
|
|
22104
|
+
|
|
21735
22105
|
var NavGuard = function (_a) {
|
|
21736
22106
|
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;
|
|
21737
22107
|
var _b = __read(React.useState(false), 2), open = _b[0], setOpen = _b[1];
|
|
@@ -22627,5 +22997,7 @@ var GrepTableOfContent = function (_a) {
|
|
|
22627
22997
|
};
|
|
22628
22998
|
GrepTableOfContent.displayName = 'Grep.ToC';
|
|
22629
22999
|
|
|
22630
|
-
|
|
23000
|
+
var utdanningsdirektoratetLogoRgbNeg = "41017f048e09b7d9.png";
|
|
23001
|
+
|
|
23002
|
+
export { AppBar, AppBarNavList, AppBarProfile, BodyLayout, CircularLoading, Colors, ConfirmationServiceProvider, ContainedLinkList, DatePicker, DropdownMenu, EditorContext, Footer, GDPR, GrepCrumbs, DatePicker as GrepDatePicker, GrepDateRange, GrepDialogServiceProvider, GrepEditor, GrepInput, GrepSelect, GrepTable, GrepTableCard, GrepTableOfContent, GrepTableRow, GreyCover, InfoContainer, LinkList, LoadingOverlay, MainLayout, NavGuard, OverflowTooltip, ProfileInfo, SearchBar, ServiceMessage, Sidebar, SortableTable, utdanningsdirektoratetLogoRgbNeg as UdirLogo, UpdateStyle, index as Utils, convert2html, convert2txt, convertToRgba, createState, filterElements as filterContentElements, hex2rgb, hex2rgba, makeStyles, parseContent, parseContentState, useConfirmation, useContentElements, useDate, useDebounce, useGrepDialog, useStyles$d as useStyles, withStyles };
|
|
22631
23003
|
//# sourceMappingURL=index.js.map
|