grep-components 1.15.0-grepf-1792.11 → 1.15.0-grepf-1697.7
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/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/Footer/index.d.ts +3 -0
- package/dist/components/Footer/styles/index.d.ts +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +105 -387
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- 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
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledAppBar: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/AppBar").AppBarTypeMap<{}, "header">>;
|
|
@@ -4,7 +4,7 @@ export declare const useFooterStyles: (params: void, styleOverrides?: {
|
|
|
4
4
|
} & Record<string, unknown>;
|
|
5
5
|
ownerState?: Record<string, unknown> | undefined;
|
|
6
6
|
} | undefined) => {
|
|
7
|
-
classes: Record<"footer" | "list" | "item" | "itemText" | "itemBtn", string>;
|
|
7
|
+
classes: Record<"footer" | "content" | "serviceNameText" | "list" | "item" | "itemText" | "itemBtn", string>;
|
|
8
8
|
theme: import("@mui/material").Theme;
|
|
9
9
|
css: import("tss-react").Css;
|
|
10
10
|
cx: import("tss-react").Cx;
|
|
@@ -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,9 +28,9 @@ 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';
|
|
34
34
|
export * from './hooks';
|
|
35
35
|
export * from './styling';
|
|
36
|
+
export * from './assets';
|
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 ({
|
|
@@ -4369,7 +4391,7 @@ var DropdownMenu = function (_a) {
|
|
|
4369
4391
|
};
|
|
4370
4392
|
|
|
4371
4393
|
var useFooterStyles = makeStyles()(function (theme) {
|
|
4372
|
-
var _a, _b, _c;
|
|
4394
|
+
var _a, _b, _c, _d, _e;
|
|
4373
4395
|
return ({
|
|
4374
4396
|
footer: (_a = {
|
|
4375
4397
|
bottom: 0,
|
|
@@ -4379,48 +4401,81 @@ var useFooterStyles = makeStyles()(function (theme) {
|
|
|
4379
4401
|
alignItems: 'center',
|
|
4380
4402
|
backgroundColor: theme.palette.primary.main
|
|
4381
4403
|
},
|
|
4382
|
-
_a[theme.breakpoints.down('
|
|
4404
|
+
_a[theme.breakpoints.down('md')] = {
|
|
4383
4405
|
minHeight: 'unset',
|
|
4384
4406
|
},
|
|
4385
4407
|
_a[theme.breakpoints.up('md')] = {
|
|
4386
|
-
minHeight:
|
|
4408
|
+
minHeight: '100px',
|
|
4387
4409
|
},
|
|
4410
|
+
_a.fontFamily = 'Montserrat',
|
|
4411
|
+
_a.fontWeight = 600,
|
|
4412
|
+
_a.fontSize = '14px',
|
|
4388
4413
|
_a),
|
|
4389
|
-
|
|
4414
|
+
content: (_b = {
|
|
4390
4415
|
display: 'flex',
|
|
4391
|
-
|
|
4416
|
+
width: '100%'
|
|
4392
4417
|
},
|
|
4393
|
-
_b[theme.breakpoints.down('
|
|
4418
|
+
_b[theme.breakpoints.down('md')] = {
|
|
4394
4419
|
flexDirection: 'column',
|
|
4420
|
+
padding: '0',
|
|
4421
|
+
a: {
|
|
4422
|
+
width: '150px',
|
|
4423
|
+
margin: '40px auto 40px auto',
|
|
4424
|
+
},
|
|
4395
4425
|
},
|
|
4396
4426
|
_b[theme.breakpoints.up('md')] = {
|
|
4397
4427
|
flexDirection: 'row',
|
|
4428
|
+
padding: '0 12px 0 12px',
|
|
4429
|
+
a: {
|
|
4430
|
+
marginLeft: '28px',
|
|
4431
|
+
},
|
|
4398
4432
|
},
|
|
4399
4433
|
_b),
|
|
4400
|
-
|
|
4434
|
+
serviceNameText: (_c = {
|
|
4401
4435
|
color: Colors.white,
|
|
4402
|
-
width: 'fit-content',
|
|
4403
|
-
height: '10px'
|
|
4404
|
-
},
|
|
4405
|
-
_c[theme.breakpoints.down('lg')] = {
|
|
4406
|
-
margin: '0 auto',
|
|
4407
4436
|
textAlign: 'center',
|
|
4408
|
-
|
|
4437
|
+
display: 'block'
|
|
4438
|
+
},
|
|
4439
|
+
_c[theme.breakpoints.down('md')] = {
|
|
4440
|
+
marginBottom: '30px',
|
|
4441
|
+
},
|
|
4442
|
+
_c),
|
|
4443
|
+
list: (_d = {
|
|
4444
|
+
display: 'flex',
|
|
4445
|
+
flexDirection: 'row',
|
|
4446
|
+
justifyContent: 'center'
|
|
4447
|
+
},
|
|
4448
|
+
_d[theme.breakpoints.down('md')] = {
|
|
4449
|
+
marginBottom: '40px',
|
|
4450
|
+
flexWrap: 'wrap',
|
|
4451
|
+
height: '64px',
|
|
4409
4452
|
},
|
|
4410
|
-
|
|
4453
|
+
_d),
|
|
4454
|
+
item: (_e = {
|
|
4455
|
+
color: Colors.white,
|
|
4456
|
+
width: 'fit-content',
|
|
4411
4457
|
margin: '0',
|
|
4412
|
-
|
|
4413
|
-
|
|
4458
|
+
height: '10px',
|
|
4459
|
+
gap: '10px',
|
|
4460
|
+
borderRight: "1px solid ".concat(theme.palette.divider)
|
|
4461
|
+
},
|
|
4462
|
+
_e[theme.breakpoints.down('md')] = {
|
|
4463
|
+
textAlign: 'center',
|
|
4464
|
+
width: 'filter-content',
|
|
4414
4465
|
},
|
|
4415
|
-
|
|
4466
|
+
_e['&:last-child'] = {
|
|
4416
4467
|
border: '0 !important',
|
|
4417
4468
|
},
|
|
4418
|
-
|
|
4469
|
+
_e),
|
|
4419
4470
|
itemText: {
|
|
4420
4471
|
padding: 0,
|
|
4421
4472
|
margin: '0 auto',
|
|
4473
|
+
fontFamily: 'Montserrat',
|
|
4474
|
+
fontWeight: 400,
|
|
4475
|
+
fontSize: '14px',
|
|
4422
4476
|
},
|
|
4423
4477
|
itemBtn: {
|
|
4478
|
+
textDecoration: 'underline',
|
|
4424
4479
|
'&:hover': {
|
|
4425
4480
|
backgroundColor: 'unset',
|
|
4426
4481
|
},
|
|
@@ -4429,18 +4484,28 @@ var useFooterStyles = makeStyles()(function (theme) {
|
|
|
4429
4484
|
});
|
|
4430
4485
|
|
|
4431
4486
|
var Footer = function (_a) {
|
|
4432
|
-
var items = _a.items;
|
|
4487
|
+
var items = _a.items, serviceNameText = _a.serviceNameText, udirLink = _a.udirLink, udirLogo = _a.udirLogo;
|
|
4433
4488
|
var classes = useFooterStyles().classes;
|
|
4434
|
-
var renderItem = function (text) { return (React__default.createElement(ListItemText, { className: classes.itemText, primary: text, primaryTypographyProps: {
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4489
|
+
var renderItem = function (text) { return (React__default.createElement(ListItemText, { className: classes.itemText, primary: text, primaryTypographyProps: {
|
|
4490
|
+
style: { fontSize: 14, fontFamily: 'Montserrat', fontWeight: 400 },
|
|
4491
|
+
} })); };
|
|
4492
|
+
return (React__default.createElement(Box, { className: classes.footer },
|
|
4493
|
+
React__default.createElement(Box, { className: classes.content },
|
|
4494
|
+
React__default.createElement("a", { href: udirLink },
|
|
4495
|
+
React__default.createElement("img", { src: udirLogo, alt: "Utdanningsdirektoratet logo", style: { height: '43px', width: '150px' } })),
|
|
4496
|
+
React__default.createElement(Container, { sx: {
|
|
4497
|
+
maxWidth: '100% !important',
|
|
4498
|
+
paddingLeft: '16px !important',
|
|
4499
|
+
paddingRight: '16px !important',
|
|
4500
|
+
} },
|
|
4501
|
+
React__default.createElement("span", { className: classes.serviceNameText }, serviceNameText),
|
|
4502
|
+
React__default.createElement(List, { className: classes.list }, items.map(function (_a, i) {
|
|
4503
|
+
var label = _a.label, render = _a.render, onClickItem = _a.onClickItem;
|
|
4504
|
+
return (React__default.createElement(ListItem, { key: i, classes: {
|
|
4505
|
+
root: classes.item,
|
|
4506
|
+
button: onClickItem ? classes.itemBtn : undefined,
|
|
4507
|
+
}, onClick: onClickItem, button: !!onClickItem }, render ? render(function () { return renderItem(label); }) : renderItem(label)));
|
|
4508
|
+
}))))));
|
|
4444
4509
|
};
|
|
4445
4510
|
|
|
4446
4511
|
var LinkList = function (props) { return (React.createElement(Box, { width: "100%", flexDirection: "column" },
|
|
@@ -21710,355 +21775,6 @@ var GrepEditor = function (_a) {
|
|
|
21710
21775
|
React__default.createElement(EditorComponent, __assign({}, props))));
|
|
21711
21776
|
};
|
|
21712
21777
|
|
|
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
21778
|
var NavGuard = function (_a) {
|
|
22063
21779
|
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
21780
|
var _b = __read(React.useState(false), 2), open = _b[0], setOpen = _b[1];
|
|
@@ -22954,5 +22670,7 @@ var GrepTableOfContent = function (_a) {
|
|
|
22954
22670
|
};
|
|
22955
22671
|
GrepTableOfContent.displayName = 'Grep.ToC';
|
|
22956
22672
|
|
|
22957
|
-
|
|
22673
|
+
var utdanningsdirektoratetLogoRgbNeg = "41017f048e09b7d9.png";
|
|
22674
|
+
|
|
22675
|
+
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 };
|
|
22958
22676
|
//# sourceMappingURL=index.js.map
|