grep-components 1.29.1-GREPF-2262.5 → 1.29.1-GREPF-2262.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/build/components/AppBar/MainAppStyles.d.ts +14 -14
- package/dist/build/components/AppBar/stories/AppBarStory.stories.d.ts +0 -2
- package/dist/build/components/AppBarNavList/stories/AppBarNavList.stories.d.ts +0 -2
- package/dist/build/components/GrepCrumbs/stories/GrepCrumbs.stories.d.ts +0 -2
- package/dist/build/components/NavGuard/stories/NavGuard.stories.d.ts +0 -1
- package/dist/build/components/ToC/stories/_scaffold.d.ts +2 -2
- package/dist/build/stories/index.stories.d.ts +1 -1
- package/dist/index.js +73 -62
- package/dist/index.js.map +1 -1
- package/package.json +11 -19
|
@@ -12,19 +12,19 @@ export declare const dimensions: {
|
|
|
12
12
|
toolbarMenuWidth: number;
|
|
13
13
|
toolbarMenuHeight: number;
|
|
14
14
|
};
|
|
15
|
-
export declare const ToolbarTitle: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
16
|
-
export declare const EnvironmentTitle: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
-
export declare const Toolbar: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
-
export declare const ToolbarFixer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
19
|
-
export declare const ToolbarInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
15
|
+
export declare const ToolbarTitle: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
16
|
+
export declare const EnvironmentTitle: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
+
export declare const Toolbar: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
+
export declare const ToolbarFixer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
19
|
+
export declare const ToolbarInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
20
20
|
colors: v0colors;
|
|
21
21
|
} & MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
|
-
export declare const ToolbarLeft: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
-
export declare const ToolbarRight: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
-
export declare const UserContainer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
25
|
-
export declare const AccountName: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
26
|
-
export declare const ToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
27
|
-
export declare const MobileToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
28
|
-
export declare const ToolbarMenuInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
29
|
-
export declare const ToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
30
|
-
export declare const MobileToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
22
|
+
export declare const ToolbarLeft: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
+
export declare const ToolbarRight: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const UserContainer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
25
|
+
export declare const AccountName: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
26
|
+
export declare const ToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
27
|
+
export declare const MobileToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
28
|
+
export declare const ToolbarMenuInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
29
|
+
export declare const ToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
30
|
+
export declare const MobileToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -17,8 +17,6 @@ export declare const v0colors: {
|
|
|
17
17
|
declare const _default: {
|
|
18
18
|
title: string;
|
|
19
19
|
excludeStories: string[];
|
|
20
|
-
render: () => React.JSX.Element;
|
|
21
|
-
decorators: import("@storybook/preview-api/dist/addons").MakeDecoratorResult[];
|
|
22
20
|
};
|
|
23
21
|
export default _default;
|
|
24
22
|
export declare const WithContent: {
|
|
@@ -10,8 +10,6 @@ export declare const navbarPages: {
|
|
|
10
10
|
declare const _default: {
|
|
11
11
|
title: string;
|
|
12
12
|
excludeStories: string[];
|
|
13
|
-
render: () => React.JSX.Element;
|
|
14
|
-
decorators: import("@storybook/preview-api/dist/addons").MakeDecoratorResult[];
|
|
15
13
|
};
|
|
16
14
|
export default _default;
|
|
17
15
|
export declare const WithThemeAndAppbar: {
|
|
@@ -4,8 +4,6 @@ export declare const breadcrumbs: Breadcrumb[];
|
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
excludeStories: string[];
|
|
7
|
-
render: () => React.JSX.Element;
|
|
8
|
-
decorators: import("@storybook/preview-api/dist/addons").MakeDecoratorResult[];
|
|
9
7
|
};
|
|
10
8
|
export default _default;
|
|
11
9
|
export declare const Standard: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
decorators:
|
|
4
|
+
decorators: ((storyFn: any) => React.JSX.Element)[];
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Dashboard: {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
import 'dayjs/locale/nb';
|
|
3
2
|
import LocalizedFormatPlugin from 'dayjs/plugin/localizedFormat';
|
|
4
3
|
import isBetweenPlugin from 'dayjs/plugin/isBetween';
|
|
5
4
|
import { red, pink, purple, deepPurple, indigo, blue, lightBlue, cyan, teal, green, lightGreen, lime, yellow, amber, orange, deepOrange, brown, grey, blueGrey } from '@mui/material/colors';
|
|
@@ -7,18 +6,21 @@ import * as React from 'react';
|
|
|
7
6
|
import React__default, { useRef, useMemo as useMemo$1, createContext, useContext, forwardRef, createElement, useState, useCallback as useCallback$1, useEffect, useLayoutEffect } from 'react';
|
|
8
7
|
import AccountCircle from '@mui/icons-material/AccountCircle';
|
|
9
8
|
import ArrowDropdown from '@mui/icons-material/ArrowDropDown';
|
|
10
|
-
import { Button, Box, Typography,
|
|
11
|
-
import { useTheme } from '@mui/material/styles';
|
|
9
|
+
import { Button, Box, Typography, Tabs, Tab, Collapse, MenuList, Tooltip, MenuItem as MenuItem$1, Menu as Menu$1, Container, List, ListItem, ListItemText, ListItemButton, CircularProgress, TextField, FormControl, InputLabel, Select, OutlinedInput, Input, Checkbox, FormHelperText, IconButton as IconButton$1, TableHead as TableHead$1, TableRow as TableRow$1, ToggleButtonGroup, AppBar as AppBar$1, Toolbar as Toolbar$1, Divider as Divider$1, Dialog as Dialog$1, DialogTitle as DialogTitle$1, DialogContent as DialogContent$1, DialogContentText as DialogContentText$1, DialogActions as DialogActions$1 } from '@mui/material';
|
|
10
|
+
import { useTheme, styled } from '@mui/material/styles';
|
|
12
11
|
import { __unsafe_useEmotionCache } from '@emotion/react';
|
|
13
|
-
import {
|
|
12
|
+
import { useHistory, NavLink, Prompt } from 'react-router-dom';
|
|
14
13
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
14
|
+
import Box$1 from '@mui/material/Box';
|
|
15
|
+
import IconButton from '@mui/material/IconButton';
|
|
16
|
+
import Menu from '@mui/material/Menu';
|
|
17
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
15
18
|
import ExpandMore from '@mui/icons-material/ExpandMore';
|
|
16
19
|
import List$1 from '@mui/material/List';
|
|
17
20
|
import ListItem$1 from '@mui/material/ListItem';
|
|
18
21
|
import ListItemText$1 from '@mui/material/ListItemText';
|
|
19
22
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
20
23
|
import Divider from '@mui/material/Divider';
|
|
21
|
-
import Box$1 from '@mui/material/Box';
|
|
22
24
|
import Typography$1 from '@mui/material/Typography';
|
|
23
25
|
import ArrowForward from '@mui/icons-material/ArrowForward';
|
|
24
26
|
import MoreVert from '@mui/icons-material/MoreVert';
|
|
@@ -28,12 +30,12 @@ import TableBody from '@mui/material/TableBody';
|
|
|
28
30
|
import TableFooter from '@mui/material/TableFooter';
|
|
29
31
|
import TableContainer from '@mui/material/TableContainer';
|
|
30
32
|
import Tooltip$1 from '@mui/material/Tooltip';
|
|
31
|
-
import IconButton$1 from '@mui/material/IconButton';
|
|
32
33
|
import TableCell from '@mui/material/TableCell';
|
|
33
34
|
import TableHead from '@mui/material/TableHead';
|
|
34
35
|
import TableSortLabel from '@mui/material/TableSortLabel';
|
|
35
36
|
import TablePagination from '@mui/material/TablePagination';
|
|
36
37
|
import Button$1 from '@mui/material/Button';
|
|
38
|
+
import Link from '@mui/material/Link';
|
|
37
39
|
import Close from '@mui/icons-material/Close';
|
|
38
40
|
import Search from '@mui/icons-material/Search';
|
|
39
41
|
import CircularProgress$1 from '@mui/material/CircularProgress';
|
|
@@ -53,12 +55,13 @@ export { ContentState } from 'draft-js';
|
|
|
53
55
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
54
56
|
import FormatBold from '@mui/icons-material/FormatBold';
|
|
55
57
|
import FormatItalic from '@mui/icons-material/FormatItalic';
|
|
56
|
-
import Menu$2 from '@mui/material
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
58
|
+
import { Menu as Menu$2 } from '@mui/icons-material';
|
|
59
|
+
import Dialog from '@mui/material/Dialog';
|
|
60
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
61
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
62
|
+
import DialogContentText from '@mui/material/DialogContentText';
|
|
63
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
60
64
|
import { getHash, getLocation } from 'connected-react-router';
|
|
61
|
-
import Link$1 from '@mui/material/Link';
|
|
62
65
|
|
|
63
66
|
dayjs.extend(isBetweenPlugin);
|
|
64
67
|
dayjs.extend(LocalizedFormatPlugin);
|
|
@@ -1625,7 +1628,7 @@ const useMobileStyles = makeStyles()(({ palette, breakpoints }) => ({
|
|
|
1625
1628
|
|
|
1626
1629
|
const MobileAppBarNavList = ({ pages, }) => {
|
|
1627
1630
|
const { classes } = useMobileStyles();
|
|
1628
|
-
const
|
|
1631
|
+
const history = useHistory();
|
|
1629
1632
|
const [anchorElNav, setAnchorElNav] = React.useState(null);
|
|
1630
1633
|
const openNav = Boolean(anchorElNav);
|
|
1631
1634
|
const handleClickNav = (event) => {
|
|
@@ -1634,15 +1637,15 @@ const MobileAppBarNavList = ({ pages, }) => {
|
|
|
1634
1637
|
const handleCloseNav = () => {
|
|
1635
1638
|
setAnchorElNav(null);
|
|
1636
1639
|
};
|
|
1637
|
-
return (React.createElement(Box, { style: { flexGrow: 1 }, className: classes.mobileNavList },
|
|
1640
|
+
return (React.createElement(Box$1, { style: { flexGrow: 1 }, className: classes.mobileNavList },
|
|
1638
1641
|
React.createElement(IconButton, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
1639
1642
|
React.createElement(MenuIcon, { fontSize: "large" })),
|
|
1640
1643
|
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
1641
1644
|
'aria-labelledby': 'basic-button',
|
|
1642
1645
|
} }, pages.map((page) => (React.createElement(MenuItem, { key: page.id, onClick: () => {
|
|
1643
1646
|
handleCloseNav();
|
|
1644
|
-
|
|
1645
|
-
}, onKeyDown: keyboard.onActivation(() =>
|
|
1647
|
+
history.push(page?.toUrl || '');
|
|
1648
|
+
}, onKeyDown: keyboard.onActivation(() => history.push(page?.toUrl || '')) }, page.label))))));
|
|
1646
1649
|
};
|
|
1647
1650
|
|
|
1648
1651
|
const AppBarNavList = ({ selectedPage, pages, onChange, }) => {
|
|
@@ -1771,9 +1774,9 @@ const CollapsableMenuItem = ({ items, onClick, children, onClose: _onclose, tool
|
|
|
1771
1774
|
items && React__default.createElement(ExpandMore, { className: classes.expander })),
|
|
1772
1775
|
items && (React__default.createElement(CollapsableMenu, { className: classes.subMenu, in: open, onMenuClose: collapse, onEntered: () => requestAnimationFrame(() => window.dispatchEvent(new Event('resize'))) }, items))));
|
|
1773
1776
|
return tooltipText ? (React__default.createElement(Tooltip, { title: tooltipText },
|
|
1774
|
-
React__default.createElement(MenuItem, { role: "menuitem", sx: disabled && !items
|
|
1777
|
+
React__default.createElement(MenuItem$1, { role: "menuitem", sx: disabled && !items
|
|
1775
1778
|
? { cursor: 'not-allowed', pointerEvents: 'inherit !important' }
|
|
1776
|
-
: { pointerEvents: 'inherit !important' }, className: classes.root, onMouseOver: (e) => e.currentTarget.focus(), selected: open, ref: listItemRef, onClick: handleClick, onKeyDown: handleKey }, renderInner()))) : (React__default.createElement(MenuItem, { sx: disabled && !items ? { cursor: 'not-allowed' } : {}, className: classes.root, onMouseOver: (e) => e.currentTarget.focus(), ref: listItemRef, selected: open, onClick: handleClick, onKeyDown: handleKey, ...props }, renderInner()));
|
|
1779
|
+
: { pointerEvents: 'inherit !important' }, className: classes.root, onMouseOver: (e) => e.currentTarget.focus(), selected: open, ref: listItemRef, onClick: handleClick, onKeyDown: handleKey }, renderInner()))) : (React__default.createElement(MenuItem$1, { sx: disabled && !items ? { cursor: 'not-allowed' } : {}, className: classes.root, onMouseOver: (e) => e.currentTarget.focus(), ref: listItemRef, selected: open, onClick: handleClick, onKeyDown: handleKey, ...props }, renderInner()));
|
|
1777
1780
|
};
|
|
1778
1781
|
|
|
1779
1782
|
const useStyles$f = makeStyles()(({ palette }) => ({
|
|
@@ -1813,7 +1816,7 @@ const DropdownMenu = ({ context, menuItems, ...menuProps }) => {
|
|
|
1813
1816
|
return (React__default.createElement(CollapsableMenuItem, { sx: isDisabled && !children ? { cursor: 'not-allowed' } : {}, level: level, id: label, disabled: isDisabled, items: children?.map(renderChild(level + 1, isDisabled)), ...props },
|
|
1814
1817
|
React__default.createElement("span", { style: style }, label)));
|
|
1815
1818
|
};
|
|
1816
|
-
return (React__default.createElement(Menu, { ...menuProps, anchorOrigin: menuProps?.anchorOrigin || {
|
|
1819
|
+
return (React__default.createElement(Menu$1, { ...menuProps, anchorOrigin: menuProps?.anchorOrigin || {
|
|
1817
1820
|
vertical: 'bottom',
|
|
1818
1821
|
horizontal: 'center',
|
|
1819
1822
|
}, transformOrigin: menuProps.transformOrigin || {
|
|
@@ -2250,7 +2253,7 @@ const GrepTable = ({ placeholderText, dropdownItems, isRowDisabled, pagination,
|
|
|
2250
2253
|
const tooltip = menuTooltip ? menuTooltip(row) : '';
|
|
2251
2254
|
return (React__default.createElement(Tooltip$1, { title: tooltip, placement: "bottom" },
|
|
2252
2255
|
React__default.createElement("div", { style: { display: 'flex', justifyContent: 'end' } },
|
|
2253
|
-
React__default.createElement(IconButton
|
|
2256
|
+
React__default.createElement(IconButton, { disableTouchRipple: true, disabled: disabled, style: { float: 'right' }, onMouseDown: (e) => {
|
|
2254
2257
|
e.preventDefault();
|
|
2255
2258
|
e.stopPropagation();
|
|
2256
2259
|
}, onClick: (e) => {
|
|
@@ -2423,7 +2426,7 @@ const useStyles$b = makeStyles()({
|
|
|
2423
2426
|
const isOverflowing = (e) => e.offsetWidth < e.scrollWidth;
|
|
2424
2427
|
const GrepCrumbs = ({ style, onClick, breadcrumbs, }) => {
|
|
2425
2428
|
const { classes } = useStyles$b();
|
|
2426
|
-
const
|
|
2429
|
+
const history = useHistory();
|
|
2427
2430
|
const ref = React__default.useRef(null);
|
|
2428
2431
|
const [showTooltip, setShowTooltip] = React__default.useState(false);
|
|
2429
2432
|
React__default.useEffect(() => {
|
|
@@ -2435,12 +2438,12 @@ const GrepCrumbs = ({ style, onClick, breadcrumbs, }) => {
|
|
|
2435
2438
|
onClick(crumb);
|
|
2436
2439
|
}
|
|
2437
2440
|
else {
|
|
2438
|
-
crumb.path &&
|
|
2441
|
+
crumb.path && history.push(crumb.path);
|
|
2439
2442
|
}
|
|
2440
2443
|
};
|
|
2441
|
-
return (React__default.createElement("div", { className: classes.container, style: style }, breadcrumbs.map((crumb, index) => crumb.path ? (React__default.createElement(Box, { key: index, display: "flex" },
|
|
2444
|
+
return (React__default.createElement("div", { className: classes.container, style: style }, breadcrumbs.map((crumb, index) => crumb.path ? (React__default.createElement(Box$1, { key: index, display: "flex" },
|
|
2442
2445
|
React__default.createElement(Link, { className: classes.link, tabIndex: 0, component: "button", onClick: () => handleClick(crumb) }, crumb.label),
|
|
2443
|
-
index !== breadcrumbs.length - 1 && (React__default.createElement(Box, { margin: "auto 8px", height: "fit-content" /*lineHeight="20px"*/ }, ">")))) : (React__default.createElement(Tooltip, { key: index, title: showTooltip ? crumb.label : '' },
|
|
2446
|
+
index !== breadcrumbs.length - 1 && (React__default.createElement(Box$1, { margin: "auto 8px", height: "fit-content" /*lineHeight="20px"*/ }, ">")))) : (React__default.createElement(Tooltip$1, { key: index, title: showTooltip ? crumb.label : '' },
|
|
2444
2447
|
React__default.createElement("div", { className: classes.current, ref: ref }, crumb.label))))));
|
|
2445
2448
|
};
|
|
2446
2449
|
|
|
@@ -2623,9 +2626,9 @@ const GrepSelect = (props) => {
|
|
|
2623
2626
|
horizontal: 'center',
|
|
2624
2627
|
},
|
|
2625
2628
|
} },
|
|
2626
|
-
unselectOption && (React.createElement(MenuItem, { value: "" },
|
|
2629
|
+
unselectOption && (React.createElement(MenuItem$1, { value: "" },
|
|
2627
2630
|
React.createElement("em", null, "Fjern valgt"))),
|
|
2628
|
-
selectItems.map(({ label, value, disabled, lang }, i) => (React.createElement(MenuItem, { key: i, value: value, disabled: disabled, lang: lang },
|
|
2631
|
+
selectItems.map(({ label, value, disabled, lang }, i) => (React.createElement(MenuItem$1, { key: i, value: value, disabled: disabled, lang: lang },
|
|
2629
2632
|
useCheckedSelect && (React.createElement(Checkbox, { checked: selected?.indexOf(value) > -1 })),
|
|
2630
2633
|
React.createElement(ListItemText, { sx: { margin: '0px', span: { lineHeight: '1.4375em' } }, primary: label ? label : value }))))),
|
|
2631
2634
|
React.createElement(FormHelperText, null, errorMessage || helperText)));
|
|
@@ -3326,7 +3329,7 @@ const ServiceMessage = ({ id, message, isPublic, onDismiss }) => {
|
|
|
3326
3329
|
React.createElement(Warning, { className: classes.warning }),
|
|
3327
3330
|
"Driftsmelding"),
|
|
3328
3331
|
React.createElement(Typography, { className: classes.messageText }, message),
|
|
3329
|
-
!isPublic && onDismiss && (React.createElement(IconButton, { className: classes.button, onClick: () => onDismiss(id), size: "large" },
|
|
3332
|
+
!isPublic && onDismiss && (React.createElement(IconButton$1, { className: classes.button, onClick: () => onDismiss(id), size: "large" },
|
|
3330
3333
|
React.createElement(Close, { className: classes.close })))));
|
|
3331
3334
|
};
|
|
3332
3335
|
|
|
@@ -19520,20 +19523,20 @@ const MobileAppBar = ({ userMenuItems, menuItems, }) => {
|
|
|
19520
19523
|
return (React.createElement(MobileToolbarMenu, { style: { flexGrow: 1 } },
|
|
19521
19524
|
React.createElement(AppBar$1, { position: "static", role: "navigation" },
|
|
19522
19525
|
React.createElement(Toolbar$1, { style: { minHeight: '50px' } },
|
|
19523
|
-
React.createElement(IconButton, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
19524
|
-
React.createElement(Menu$
|
|
19525
|
-
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
19526
|
+
React.createElement(IconButton$1, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
19527
|
+
React.createElement(Menu$2, { sx: { color: 'white' } })),
|
|
19528
|
+
React.createElement(Menu$1, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
19526
19529
|
'aria-labelledby': 'basic-button',
|
|
19527
19530
|
} }, menuItems.map((page) => (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|
|
19528
|
-
React.createElement(MenuItem, { sx: {
|
|
19531
|
+
React.createElement(MenuItem$1, { sx: {
|
|
19529
19532
|
width: '100%',
|
|
19530
19533
|
}, key: page.name }, page.translatedTextRef))))),
|
|
19531
|
-
React.createElement(IconButton, { size: "medium", edge: "end", color: "inherit", "aria-label": "menu", style: { marginLeft: 'auto' }, onClick: handleClickMenu },
|
|
19534
|
+
React.createElement(IconButton$1, { size: "medium", edge: "end", color: "inherit", "aria-label": "menu", style: { marginLeft: 'auto' }, onClick: handleClickMenu },
|
|
19532
19535
|
React.createElement(MoreVert, { sx: { color: 'white' } })),
|
|
19533
|
-
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu, MenuListProps: {
|
|
19536
|
+
React.createElement(Menu$1, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu, MenuListProps: {
|
|
19534
19537
|
'aria-labelledby': 'basic-button',
|
|
19535
19538
|
} }, userMenuItems.map((i, index) => (React.createElement(Box, { key: i.id },
|
|
19536
|
-
React.createElement(MenuItem, { key: i.id, onClick: () => {
|
|
19539
|
+
React.createElement(MenuItem$1, { key: i.id, onClick: () => {
|
|
19537
19540
|
handleCloseMenu();
|
|
19538
19541
|
i.action && i.action();
|
|
19539
19542
|
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
@@ -19572,14 +19575,14 @@ const AppBar = ({ username, currentPath, isProd, appTitle, userMenuItems, menuIt
|
|
|
19572
19575
|
React.createElement(AccountName, null, username),
|
|
19573
19576
|
userRole && (React.createElement(Box, { sx: { fontSize: '14px', lineHeight: '20px' } }, userRole))),
|
|
19574
19577
|
React.createElement(ArrowDropdown, { color: "primary" })),
|
|
19575
|
-
React.createElement(Menu
|
|
19578
|
+
React.createElement(Menu, { open: Boolean(userMenuAnchor), anchorEl: userMenuAnchor, onClose: _handleCloseUserMenu, anchorOrigin: {
|
|
19576
19579
|
vertical: 'bottom',
|
|
19577
19580
|
horizontal: 'center',
|
|
19578
19581
|
}, transformOrigin: {
|
|
19579
19582
|
vertical: 'top',
|
|
19580
19583
|
horizontal: 'center',
|
|
19581
19584
|
} }, userMenuItems.map((i, index) => {
|
|
19582
|
-
return (React.createElement(MenuItem
|
|
19585
|
+
return (React.createElement(MenuItem, { key: i.id, onClick: () => {
|
|
19583
19586
|
setUserMenuAnchor(null);
|
|
19584
19587
|
i.action && i.action();
|
|
19585
19588
|
}, divider: userMenuItems.length > index + 1, sx: {
|
|
@@ -19598,35 +19601,43 @@ const AppBar = ({ username, currentPath, isProd, appTitle, userMenuItems, menuIt
|
|
|
19598
19601
|
|
|
19599
19602
|
const NavGuard = ({ when, title, txt, txtSave, txtCancel, txtDiscard, onSave, onCancel, onDiscard, }) => {
|
|
19600
19603
|
const [open, setOpen] = React.useState(false);
|
|
19601
|
-
const
|
|
19604
|
+
const [leave, setLeave] = React.useState(false);
|
|
19605
|
+
const [lastLocation, setLastLocation] = React.useState();
|
|
19606
|
+
const history = useHistory();
|
|
19602
19607
|
const handleCancel = () => {
|
|
19608
|
+
setLeave(false);
|
|
19603
19609
|
setOpen(false);
|
|
19604
19610
|
onCancel && onCancel();
|
|
19605
|
-
blocker.reset ? blocker.reset() : null;
|
|
19606
19611
|
};
|
|
19607
19612
|
const handleDiscard = () => {
|
|
19613
|
+
setLeave(true);
|
|
19608
19614
|
setOpen(false);
|
|
19609
19615
|
onDiscard && onDiscard();
|
|
19610
|
-
|
|
19616
|
+
lastLocation &&
|
|
19617
|
+
window.requestAnimationFrame(() => history.push(lastLocation));
|
|
19611
19618
|
};
|
|
19612
19619
|
const handleSave = () => {
|
|
19613
19620
|
onSave && onSave();
|
|
19621
|
+
setLeave(true);
|
|
19614
19622
|
setOpen(false);
|
|
19615
|
-
|
|
19623
|
+
lastLocation &&
|
|
19624
|
+
window.requestAnimationFrame(() => history.push(lastLocation));
|
|
19616
19625
|
};
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
}
|
|
19622
|
-
return (React.createElement(React.Fragment, null,
|
|
19623
|
-
React.createElement(
|
|
19624
|
-
React.createElement(
|
|
19625
|
-
React.createElement(
|
|
19626
|
-
|
|
19627
|
-
|
|
19628
|
-
React.createElement(
|
|
19629
|
-
|
|
19626
|
+
const handleLeave = (location) => {
|
|
19627
|
+
setLastLocation(location);
|
|
19628
|
+
setOpen(!leave);
|
|
19629
|
+
return !!leave;
|
|
19630
|
+
};
|
|
19631
|
+
return (React.createElement(React.Fragment, null,
|
|
19632
|
+
React.createElement(Prompt, { when: when, message: handleLeave }),
|
|
19633
|
+
React.createElement(Dialog, { open: open, "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description" },
|
|
19634
|
+
React.createElement(DialogTitle, { id: "alert-dialog-title" }, title),
|
|
19635
|
+
React.createElement(DialogContent, null,
|
|
19636
|
+
React.createElement(DialogContentText, { id: "alert-dialog-description" }, txt)),
|
|
19637
|
+
React.createElement(DialogActions, null,
|
|
19638
|
+
React.createElement(Button$1, { onClick: handleCancel, autoFocus: true, color: "inherit" }, txtCancel),
|
|
19639
|
+
React.createElement(Button$1, { onClick: handleDiscard, color: "error" }, txtDiscard),
|
|
19640
|
+
onSave && (React.createElement(Button$1, { onClick: handleSave, color: "primary" }, txtSave))))));
|
|
19630
19641
|
};
|
|
19631
19642
|
|
|
19632
19643
|
const useStyles$3 = makeStyles()(({ palette }) => ({
|
|
@@ -19640,11 +19651,11 @@ const useStyles$3 = makeStyles()(({ palette }) => ({
|
|
|
19640
19651
|
|
|
19641
19652
|
const ConfirmationDialog = ({ open, title, description, warning, onSubmit, onCancel, confirmText = 'OK', cancelText = 'Avbryt', }) => {
|
|
19642
19653
|
const { classes } = useStyles$3();
|
|
19643
|
-
return (React__default.createElement(Dialog, { open: open },
|
|
19644
|
-
React__default.createElement(DialogTitle, null, title),
|
|
19645
|
-
React__default.createElement(DialogContent, null,
|
|
19646
|
-
React__default.createElement(DialogContentText, null, description)),
|
|
19647
|
-
React__default.createElement(DialogActions, null,
|
|
19654
|
+
return (React__default.createElement(Dialog$1, { open: open },
|
|
19655
|
+
React__default.createElement(DialogTitle$1, null, title),
|
|
19656
|
+
React__default.createElement(DialogContent$1, null,
|
|
19657
|
+
React__default.createElement(DialogContentText$1, null, description)),
|
|
19658
|
+
React__default.createElement(DialogActions$1, null,
|
|
19648
19659
|
React__default.createElement(Button, { color: "primary", onClick: onCancel }, cancelText),
|
|
19649
19660
|
React__default.createElement(Button, { className: warning ? classes.discard : '', onClick: onSubmit }, confirmText))));
|
|
19650
19661
|
};
|
|
@@ -19680,10 +19691,10 @@ const GrepDialog = ({ open, title, content, onClose, closeBtnText = 'Lukk', ...p
|
|
|
19680
19691
|
];
|
|
19681
19692
|
if (props.actions)
|
|
19682
19693
|
actions.push(...props.actions);
|
|
19683
|
-
return (React__default.createElement(Dialog, { open: open, onClose: onClose },
|
|
19684
|
-
React__default.createElement(DialogTitle, null, title),
|
|
19685
|
-
React__default.createElement(DialogContent, null, content),
|
|
19686
|
-
React__default.createElement(DialogActions, null, actions.map((action) => action))));
|
|
19694
|
+
return (React__default.createElement(Dialog$1, { open: open, onClose: onClose },
|
|
19695
|
+
React__default.createElement(DialogTitle$1, null, title),
|
|
19696
|
+
React__default.createElement(DialogContent$1, null, content),
|
|
19697
|
+
React__default.createElement(DialogActions$1, null, actions.map((action) => action))));
|
|
19687
19698
|
};
|
|
19688
19699
|
|
|
19689
19700
|
const GrepDialogServiceContext = React__default.createContext(() => null);
|
|
@@ -20310,7 +20321,7 @@ const GrepTableOfContentNavTreeNode = (props) => {
|
|
|
20310
20321
|
}
|
|
20311
20322
|
};
|
|
20312
20323
|
return (React__default.createElement("li", { key: index, "data-lvl": lvl, className: className, style: style },
|
|
20313
|
-
React__default.createElement(Link
|
|
20324
|
+
React__default.createElement(Link, { ref: linkRef, className: clsx(styles.link, isSelected && `${styles.link}--selected`), href: url, tabIndex: tabIndex, onClick: (event) => {
|
|
20314
20325
|
console.debug('node click', node);
|
|
20315
20326
|
event.preventDefault();
|
|
20316
20327
|
event.stopPropagation();
|