grep-components 2.21.0 → 2.22.0-GREPF-2893.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppBar/MainAppStyles.d.ts +14 -14
- package/dist/components/DropdownMenu/stories/DropDownMenu.stories.d.ts +1 -1
- package/dist/components/GrepDatePicker/index.d.ts +4 -3
- package/dist/components/GrepDatePicker/stories/DatePicker.stories.d.ts +10 -5
- package/dist/components/GrepDateRange/index.d.ts +2 -2
- package/dist/components/GrepDateRange/stories/GrepDateRange.stories.d.ts +7 -4
- package/dist/components/GrepEditor/stories/GrepEditor.stories.d.ts +19 -43
- package/dist/components/LoadingOverlay/stories/LoadingOverlay.stories.d.ts +13 -7
- package/dist/components/NavGuard/stories/NavGuard.stories.d.ts +20 -14
- package/dist/components/Sidebar/stories/Sidebar.stories.d.ts +12 -10
- package/dist/components/SortableTable/stories/SortableTable.stories.d.ts +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/index.js +68 -40
- package/dist/index.js.map +1 -1
- package/dist/utils/dateHelper.d.ts +1 -1
- package/package.json +13 -12
- package/dist/styling/makeStyles.d.ts +0 -35
|
@@ -11,19 +11,19 @@ export declare const dimensions: {
|
|
|
11
11
|
toolbarMenuWidth: number;
|
|
12
12
|
toolbarMenuHeight: number;
|
|
13
13
|
};
|
|
14
|
-
export declare const ToolbarTitle: import("@emotion/styled").StyledComponent<import("react-router").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material
|
|
15
|
-
export declare const EnvironmentTitle: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
16
|
-
export declare const Toolbar: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
17
|
-
export declare const ToolbarFixer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
18
|
-
export declare const ToolbarInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
14
|
+
export declare const ToolbarTitle: import("@emotion/styled").StyledComponent<import("react-router").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
15
|
+
export declare const EnvironmentTitle: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
export declare const Toolbar: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
+
export declare const ToolbarFixer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
+
export declare const ToolbarInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
19
19
|
colors: v0colors;
|
|
20
20
|
} & MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
21
|
-
export declare const ToolbarLeft: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
22
|
-
export declare const ToolbarRight: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
23
|
-
export declare const UserContainer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
24
|
-
export declare const AccountName: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
25
|
-
export declare const ToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
26
|
-
export declare const MobileToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
27
|
-
export declare const ToolbarMenuInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material
|
|
28
|
-
export declare const ToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material
|
|
29
|
-
export declare const MobileToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material
|
|
21
|
+
export declare const ToolbarLeft: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
|
+
export declare const ToolbarRight: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
+
export declare const UserContainer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const AccountName: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
25
|
+
export declare const ToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
|
+
export declare const MobileToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
27
|
+
export declare const ToolbarMenuInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
28
|
+
export declare const ToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
29
|
+
export declare const MobileToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -3,10 +3,11 @@ import { DatePickerProps } from '@mui/x-date-pickers';
|
|
|
3
3
|
import { TextFieldProps } from '@mui/material';
|
|
4
4
|
import '../../utils/dateHelper';
|
|
5
5
|
import { ParseableDate } from '../../utils/dateHelper';
|
|
6
|
-
type InputProps = Pick<TextFieldProps, 'id' | 'variant' | 'label' | 'fullWidth' | '
|
|
6
|
+
type InputProps = Pick<TextFieldProps, 'id' | 'variant' | 'label' | 'fullWidth' | 'helperText' | 'required' | 'margin' | 'sx'>;
|
|
7
7
|
export interface GrepDatePickerProps extends Omit<DatePickerProps, 'value' | 'renderInput'>, InputProps {
|
|
8
8
|
value?: ParseableDate | null;
|
|
9
9
|
errorMessage?: string;
|
|
10
|
+
clearable?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare const
|
|
12
|
-
export default
|
|
12
|
+
export declare const GrepDatePicker: React.FunctionComponent<GrepDatePickerProps>;
|
|
13
|
+
export default GrepDatePicker;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { GrepDatePickerProps } from '..';
|
|
3
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
component: (args: Omit<GrepDatePickerProps, "value" | "onChange">) => React.JSX.Element;
|
|
3
6
|
title: string;
|
|
7
|
+
render: ({ ...args }: Omit<GrepDatePickerProps, "value" | "onChange">) => React.JSX.Element;
|
|
4
8
|
decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
|
|
5
9
|
};
|
|
6
|
-
export default
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const WithError: Story;
|
|
13
|
+
export declare const WithHelperText: Story;
|
|
14
|
+
export declare const WithMoreControls: Story;
|
|
@@ -4,7 +4,7 @@ import { GrepDatePickerProps } from '../GrepDatePicker';
|
|
|
4
4
|
import { Dayjs } from 'dayjs';
|
|
5
5
|
import { GridSpacing } from '@mui/material/Grid';
|
|
6
6
|
type CommonProperties = Pick<GrepDatePickerProps, 'variant' | 'margin' | 'sx'>;
|
|
7
|
-
interface
|
|
7
|
+
export interface GrepDateRangeProps extends CommonProperties {
|
|
8
8
|
from: Omit<GrepDatePickerProps, 'onChange'>;
|
|
9
9
|
to: Omit<GrepDatePickerProps, 'onChange'>;
|
|
10
10
|
onChange: (date: DateRangeValue) => void;
|
|
@@ -16,5 +16,5 @@ interface Props extends CommonProperties {
|
|
|
16
16
|
minDate?: Dayjs;
|
|
17
17
|
maxDate?: Dayjs;
|
|
18
18
|
}
|
|
19
|
-
export declare const GrepDateRange: React.FunctionComponent<
|
|
19
|
+
export declare const GrepDateRange: React.FunctionComponent<GrepDateRangeProps>;
|
|
20
20
|
export default GrepDateRange;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import 'dayjs/locale/nb';
|
|
3
|
-
|
|
3
|
+
import { GrepDateRangeProps } from '..';
|
|
4
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
5
|
+
declare const meta: {
|
|
6
|
+
component: (args: Omit<GrepDateRangeProps, "from" | "to" | "onChange">) => React.JSX.Element;
|
|
4
7
|
title: string;
|
|
5
|
-
decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
|
|
6
8
|
};
|
|
7
|
-
export default
|
|
8
|
-
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
export declare const Standard: Story;
|
|
@@ -1,47 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
3
|
+
declare const meta: {
|
|
3
4
|
title: string;
|
|
5
|
+
component: React.FunctionComponent<import("../entities").Properties>;
|
|
6
|
+
args: {
|
|
7
|
+
onContentChange: (editorState: import("lexical").EditorState, editor: import("lexical").LexicalEditor) => void;
|
|
8
|
+
};
|
|
4
9
|
decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
|
|
5
10
|
};
|
|
6
|
-
export default
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
export declare const PasteStrippingAndBlockedInlineStyles: {
|
|
21
|
-
render: () => React.JSX.Element;
|
|
22
|
-
name: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const WithCharacterCount: {
|
|
25
|
-
render: () => React.JSX.Element;
|
|
26
|
-
name: string;
|
|
27
|
-
};
|
|
28
|
-
export declare const DisableAndStripNewlines: {
|
|
29
|
-
render: () => React.JSX.Element;
|
|
30
|
-
name: string;
|
|
31
|
-
};
|
|
32
|
-
export declare const DisablePasting: {
|
|
33
|
-
render: () => React.JSX.Element;
|
|
34
|
-
name: string;
|
|
35
|
-
};
|
|
36
|
-
export declare const WithLabel: {
|
|
37
|
-
render: () => React.JSX.Element;
|
|
38
|
-
name: string;
|
|
39
|
-
};
|
|
40
|
-
export declare const OnlyHeading: {
|
|
41
|
-
render: () => React.JSX.Element;
|
|
42
|
-
name: string;
|
|
43
|
-
};
|
|
44
|
-
export declare const ReadOnly: {
|
|
45
|
-
render: () => React.JSX.Element;
|
|
46
|
-
name: string;
|
|
47
|
-
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Standard: Story;
|
|
14
|
+
export declare const CustomStyles: Story;
|
|
15
|
+
export declare const CustomToolbar: Story;
|
|
16
|
+
export declare const CustomButtons: Story;
|
|
17
|
+
export declare const PasteStrippingAndBlockedInlineStyles: Story;
|
|
18
|
+
export declare const WithCharacterCount: Story;
|
|
19
|
+
export declare const DisableAndStripNewlines: Story;
|
|
20
|
+
export declare const DisablePasting: Story;
|
|
21
|
+
export declare const WithLabel: Story;
|
|
22
|
+
export declare const OnlyHeading: Story;
|
|
23
|
+
export declare const ReadOnly: Story;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { LoadingOverlayProps } from '..';
|
|
3
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
4
|
+
declare const meta: {
|
|
3
5
|
title: string;
|
|
6
|
+
args: {
|
|
7
|
+
zIndex: number;
|
|
8
|
+
};
|
|
9
|
+
render: ({ ...args }: Omit<LoadingOverlayProps, "show">) => React.JSX.Element;
|
|
4
10
|
};
|
|
5
|
-
export default
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: string;
|
|
9
|
-
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Standard: Story;
|
|
10
14
|
export declare const CustomOverlay: {
|
|
11
|
-
|
|
15
|
+
args: {
|
|
16
|
+
overlay: string;
|
|
17
|
+
};
|
|
12
18
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { NavGuardProperties } from '..';
|
|
3
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
4
|
export declare const v0colors: {
|
|
3
5
|
primary: string;
|
|
4
6
|
secondary: string;
|
|
@@ -14,20 +16,24 @@ export declare const v0colors: {
|
|
|
14
16
|
white: string;
|
|
15
17
|
lightGrey: string;
|
|
16
18
|
};
|
|
17
|
-
|
|
19
|
+
type testType = 'button' | 'appBar';
|
|
20
|
+
declare const meta: {
|
|
21
|
+
args: {
|
|
22
|
+
when: true;
|
|
23
|
+
txt: string;
|
|
24
|
+
txtDiscard: string;
|
|
25
|
+
txtCancel: string;
|
|
26
|
+
txtSave: string;
|
|
27
|
+
testType: "button";
|
|
28
|
+
};
|
|
29
|
+
render: ({ ...args }: Omit<NavGuardProperties, "title" | "onSave" | "onCancel" | "onDiscard"> & {
|
|
30
|
+
testType: testType;
|
|
31
|
+
}) => React.JSX.Element;
|
|
18
32
|
title: string;
|
|
19
33
|
excludeStories: string[];
|
|
20
34
|
};
|
|
21
|
-
export default
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export declare const WithAppBar: {
|
|
27
|
-
render: () => React.JSX.Element;
|
|
28
|
-
name: string;
|
|
29
|
-
};
|
|
30
|
-
export declare const WithExclude: {
|
|
31
|
-
render: () => React.JSX.Element;
|
|
32
|
-
name: string;
|
|
33
|
-
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
export declare const Default: Story;
|
|
38
|
+
export declare const WithAppBar: Story;
|
|
39
|
+
export declare const WithExclude: Story;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { SidebarProps } from '..';
|
|
2
3
|
import { NavigationProps } from '../../AppBarNavList';
|
|
4
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
3
5
|
export declare const adminPages: NavigationProps[];
|
|
4
|
-
declare const
|
|
6
|
+
declare const meta: {
|
|
7
|
+
component: (args: Omit<SidebarProps, "currentPageId" | "onPageClick">) => React.JSX.Element;
|
|
5
8
|
title: string;
|
|
6
9
|
excludeStories: string[];
|
|
10
|
+
args: {
|
|
11
|
+
pages: NavigationProps[];
|
|
12
|
+
};
|
|
13
|
+
render: ({ ...args }: Omit<SidebarProps, "onPageClick" | "currentPageId">) => React.JSX.Element;
|
|
7
14
|
};
|
|
8
|
-
export default
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export declare const ExpandAndClick: {
|
|
14
|
-
render: () => React.JSX.Element;
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Standard: Story;
|
|
18
|
+
export declare const ExpandAndClick: Story;
|
|
@@ -52,7 +52,6 @@ export { default as InfoContainer } from './InfoContainer';
|
|
|
52
52
|
export { default as OverflowTooltip } from './OverflowTooltip';
|
|
53
53
|
export { default as Sidebar } from './Sidebar';
|
|
54
54
|
export { default as NavGuard } from './NavGuard';
|
|
55
|
-
export { default as DatePicker } from './GrepDatePicker';
|
|
56
55
|
export { default as GrepDatePicker } from './GrepDatePicker';
|
|
57
56
|
export { default as GrepDateRange } from './GrepDateRange';
|
|
58
57
|
export { default as ServiceMessage } from './ServiceMessage';
|
package/dist/index.js
CHANGED
|
@@ -40,7 +40,8 @@ import Search from '@mui/icons-material/Search';
|
|
|
40
40
|
import CircularProgress$1 from '@mui/material/CircularProgress';
|
|
41
41
|
import Info from '@mui/icons-material/Info';
|
|
42
42
|
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
43
|
-
import { LocalizationProvider
|
|
43
|
+
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
44
|
+
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
44
45
|
import Grid from '@mui/material/Grid';
|
|
45
46
|
import ListItem$1 from '@mui/material/ListItem';
|
|
46
47
|
import Collapse$1 from '@mui/material/Collapse';
|
|
@@ -1568,9 +1569,7 @@ const MobileAppBarNavList = ({ pages, }) => {
|
|
|
1568
1569
|
return (React.createElement(Box$1, { style: { flexGrow: 1 }, className: classes.mobileNavList },
|
|
1569
1570
|
React.createElement(IconButton, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
1570
1571
|
React.createElement(MenuIcon, { fontSize: "large" })),
|
|
1571
|
-
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav,
|
|
1572
|
-
'aria-labelledby': 'basic-button',
|
|
1573
|
-
} }, pages.map((page) => (React.createElement(MenuItem, { key: page.id, onClick: () => {
|
|
1572
|
+
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav }, pages.map((page) => (React.createElement(MenuItem, { key: page.id, onClick: () => {
|
|
1574
1573
|
handleCloseNav();
|
|
1575
1574
|
navigate(page?.toUrl || '');
|
|
1576
1575
|
}, onKeyDown: keyboard.onActivation(() => navigate(page?.toUrl || '')) }, page.label))))));
|
|
@@ -1584,13 +1583,20 @@ const AppBarNavList = ({ selectedPage, pages, onChange, }) => {
|
|
|
1584
1583
|
onChange(newValue);
|
|
1585
1584
|
};
|
|
1586
1585
|
return (React.createElement(React.Fragment, null,
|
|
1587
|
-
React.createElement(Tabs, { classes: { root: classes.tabs, indicator: classes.indicator }, value: value, onChange: handleChange,
|
|
1586
|
+
React.createElement(Tabs, { classes: { root: classes.tabs, indicator: classes.indicator }, value: value, onChange: handleChange, slotProps: { indicator: { children: React.createElement("div", null) } } }, pages.map((page) => (React.createElement(Tab, { disableTouchRipple: true, className: classes.tab, key: page.id, label: page.label })))),
|
|
1588
1587
|
React.createElement(MobileAppBarNavList, { pages: pages })));
|
|
1589
1588
|
};
|
|
1590
1589
|
|
|
1591
|
-
const BodyLayout = (props) => (React.createElement(Box, {
|
|
1590
|
+
const BodyLayout = (props) => (React.createElement(Box, { sx: {
|
|
1591
|
+
width: '100%',
|
|
1592
|
+
paddingTop: '20px',
|
|
1593
|
+
display: 'flex',
|
|
1594
|
+
flexDirection: 'row',
|
|
1595
|
+
marginBottom: '20px',
|
|
1596
|
+
justifyContent: 'space-between',
|
|
1597
|
+
} }, props.children));
|
|
1592
1598
|
|
|
1593
|
-
const MainLayout = (props) => (React.createElement(Box, { display:
|
|
1599
|
+
const MainLayout = (props) => (React.createElement(Box, { sx: { display: 'flex', flex: '1', flexDirection: 'column' } }, props.children));
|
|
1594
1600
|
|
|
1595
1601
|
const CollapsableMenu = ({ children, onMenuClose, ...collapseProps }) => {
|
|
1596
1602
|
const onKeyDown = (e) => {
|
|
@@ -1702,15 +1708,21 @@ const CollapsableMenuItem = ({ items, onClick, children, onClose: _onclose, tool
|
|
|
1702
1708
|
return () => document.removeEventListener('click', onScrimClick);
|
|
1703
1709
|
}, [listItemRef, onScrimClick]);
|
|
1704
1710
|
const { classes } = useStyles$f({ open });
|
|
1705
|
-
const renderInner = () => (React__default.createElement(Box, { display:
|
|
1706
|
-
React__default.createElement(Box, {
|
|
1711
|
+
const renderInner = () => (React__default.createElement(Box, { sx: { display: 'flex', flexDirection: 'column', width: '100%' } },
|
|
1712
|
+
React__default.createElement(Box, { sx: {
|
|
1713
|
+
display: 'flex',
|
|
1714
|
+
justifyContent: 'space-between',
|
|
1715
|
+
alignItems: 'center',
|
|
1716
|
+
minHeight: 48,
|
|
1717
|
+
} },
|
|
1707
1718
|
children,
|
|
1708
1719
|
items && React__default.createElement(ExpandMore, { className: classes.expander })),
|
|
1709
1720
|
items && (React__default.createElement(CollapsableMenu, { className: classes.subMenu, in: open, onMenuClose: collapse, onEntered: () => requestAnimationFrame(() => window.dispatchEvent(new Event('resize'))), ...props }, items))));
|
|
1710
1721
|
return tooltipText ? (React__default.createElement(Tooltip, { title: tooltipText, placement: tooltipPlacement, describeChild: true, arrow: true, open: openTooltip },
|
|
1711
1722
|
React__default.createElement(MenuItem$1, { role: "menuitem", sx: disabled && !items
|
|
1712
1723
|
? { cursor: 'not-allowed', pointerEvents: 'inherit !important' }
|
|
1713
|
-
: { pointerEvents: 'inherit !important' }, className: classes.root, onFocusVisible: handleOpenTooltip, onMouseOver: (e) => (e.currentTarget.focus(),
|
|
1724
|
+
: { pointerEvents: 'inherit !important' }, className: classes.root, onFocusVisible: handleOpenTooltip, onMouseOver: (e) => (e.currentTarget.focus(),
|
|
1725
|
+
handleOpenTooltip()), onMouseLeave: handleCloseTooltip, selected: open, ref: listItemRef, onClick: handleClick, onKeyDown: (e) => (handleKey(e), handleCloseTooltip()), ...props }, 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()));
|
|
1714
1726
|
};
|
|
1715
1727
|
|
|
1716
1728
|
const useStyles$e = makeStyles()(({ palette }) => ({
|
|
@@ -1889,7 +1901,7 @@ const Footer = ({ items, serviceNameText, udirLink, udirLogo, }) => {
|
|
|
1889
1901
|
: renderItem(item)))))))));
|
|
1890
1902
|
};
|
|
1891
1903
|
|
|
1892
|
-
const LinkList = (props) => (React__default.createElement(Box$1, { width:
|
|
1904
|
+
const LinkList = (props) => (React__default.createElement(Box$1, { sx: { width: '100%', flexDirection: 'column' } },
|
|
1893
1905
|
React__default.createElement(Typography$1, { style: { fontSize: 24, color: Colors.black, marginBottom: 20 } }, props.title),
|
|
1894
1906
|
React__default.createElement(List$1, null, props.pages.map((page) => (React__default.createElement(Box$1, { key: page.id },
|
|
1895
1907
|
React__default.createElement(ListItemButton, { onMouseDown: (e) => {
|
|
@@ -2181,7 +2193,7 @@ const GrepTable = ({ placeholderText, dropdownItems, isRowDisabled, pagination,
|
|
|
2181
2193
|
}
|
|
2182
2194
|
}
|
|
2183
2195
|
}, [tableRef, selectedRowIndex]);
|
|
2184
|
-
React__default.
|
|
2196
|
+
React__default.useEffect(() => {
|
|
2185
2197
|
setCurrentPage(0);
|
|
2186
2198
|
}, [data.length, setCurrentPage]);
|
|
2187
2199
|
const _openDropdown = (e, row) => {
|
|
@@ -2343,19 +2355,35 @@ const GrepTableCard = (props) => {
|
|
|
2343
2355
|
React.createElement(GrepTable, { ...props, header: true })));
|
|
2344
2356
|
};
|
|
2345
2357
|
|
|
2346
|
-
const LoadingOverlay = ({ overlay = 'rgba(255,255,255, .5)', show, children, minTime, zIndex, sx, ...box }) => {
|
|
2358
|
+
const LoadingOverlay = ({ overlay = 'rgba(255,255,255, .5)', show, children, minTime, zIndex, minHeight, sx, ...box }) => {
|
|
2347
2359
|
const [enabled, setEnabled] = useState(show);
|
|
2348
2360
|
useEffect(() => {
|
|
2349
2361
|
const timeout = setTimeout(() => setEnabled(show), show ? 0 : minTime);
|
|
2350
2362
|
return () => clearTimeout(timeout);
|
|
2351
2363
|
}, [show, minTime, setEnabled]);
|
|
2352
|
-
return (React__default.createElement(Box, {
|
|
2364
|
+
return (React__default.createElement(Box, { sx: {
|
|
2365
|
+
position: 'relative',
|
|
2366
|
+
display: 'block',
|
|
2367
|
+
overflow: show ? 'hidden' : '',
|
|
2368
|
+
} },
|
|
2353
2369
|
children,
|
|
2354
|
-
React__default.createElement(Box, {
|
|
2370
|
+
React__default.createElement(Box, { sx: {
|
|
2371
|
+
position: 'absolute',
|
|
2372
|
+
display: 'flex',
|
|
2373
|
+
alignItems: 'center',
|
|
2374
|
+
justifyContent: 'center',
|
|
2375
|
+
top: 0,
|
|
2376
|
+
left: 0,
|
|
2377
|
+
height: '100%',
|
|
2378
|
+
width: '100%',
|
|
2379
|
+
zIndex: enabled ? (zIndex ? zIndex : 999) : -999,
|
|
2380
|
+
minHeight: minHeight,
|
|
2381
|
+
...sx,
|
|
2382
|
+
}, style: {
|
|
2355
2383
|
backgroundColor: overlay,
|
|
2356
2384
|
opacity: show ? 1 : 0,
|
|
2357
2385
|
transition: `opacity ${show ? 0 : minTime}ms ease`,
|
|
2358
|
-
},
|
|
2386
|
+
}, ...box },
|
|
2359
2387
|
React__default.createElement(CircularProgress, { "aria-label": "Laster inn" }))));
|
|
2360
2388
|
};
|
|
2361
2389
|
|
|
@@ -2405,9 +2433,9 @@ const GrepCrumbs = ({ style, onClick, breadcrumbs, }) => {
|
|
|
2405
2433
|
crumb.path && navigate(crumb.path);
|
|
2406
2434
|
}
|
|
2407
2435
|
};
|
|
2408
|
-
return (React__default.createElement("div", { className: classes.container, style: style }, breadcrumbs.map((crumb, index) => crumb.path ? (React__default.createElement(Box$1, { key:
|
|
2436
|
+
return (React__default.createElement("div", { className: classes.container, style: style }, breadcrumbs.map((crumb, index) => crumb.path ? (React__default.createElement(Box$1, { key: crumb.label, sx: { display: 'flex' } },
|
|
2409
2437
|
React__default.createElement(Link, { className: classes.link, tabIndex: 0, component: "button", onClick: () => handleClick(crumb) }, crumb.label),
|
|
2410
|
-
index !== breadcrumbs.length - 1 && (React__default.createElement(Box$1, { margin:
|
|
2438
|
+
index !== breadcrumbs.length - 1 && (React__default.createElement(Box$1, { sx: { margin: 'auto 8px', height: 'fit-content' } }, ">")))) : (React__default.createElement(Tooltip$1, { key: crumb.label, title: showTooltip ? crumb.label : '' },
|
|
2411
2439
|
React__default.createElement("div", { className: classes.current, ref: ref }, crumb.label))))));
|
|
2412
2440
|
};
|
|
2413
2441
|
|
|
@@ -2487,7 +2515,13 @@ const GreyCover = ({ elevation, children }) => {
|
|
|
2487
2515
|
return React.createElement(Box, { className: classes.cover }, children);
|
|
2488
2516
|
};
|
|
2489
2517
|
|
|
2490
|
-
const CircularLoading = ({ height, ...props }) => (React.createElement(Box, {
|
|
2518
|
+
const CircularLoading = ({ height, ...props }) => (React.createElement(Box, { sx: {
|
|
2519
|
+
height: { height },
|
|
2520
|
+
width: '100%',
|
|
2521
|
+
display: 'flex',
|
|
2522
|
+
alignItems: 'center',
|
|
2523
|
+
justifyContent: 'center',
|
|
2524
|
+
} },
|
|
2491
2525
|
React.createElement(CircularProgress$1, { ...props })));
|
|
2492
2526
|
|
|
2493
2527
|
const useStyles$7 = makeStyles()((theme) => ({
|
|
@@ -2622,6 +2656,7 @@ const useDate = (value = null, options) => {
|
|
|
2622
2656
|
const nextDate = getDate(next);
|
|
2623
2657
|
hasDateChanged(date, nextDate) && _setDate(nextDate);
|
|
2624
2658
|
};
|
|
2659
|
+
// eslint-disable-next-line @eslint-react/use-memo
|
|
2625
2660
|
useMemo(() => setDate(value ? parseDate(value, { utc }) : null), [value, utc]);
|
|
2626
2661
|
return [date, setDate];
|
|
2627
2662
|
};
|
|
@@ -3092,12 +3127,12 @@ const useContentElements = (container, selector, options) => {
|
|
|
3092
3127
|
return elements;
|
|
3093
3128
|
};
|
|
3094
3129
|
|
|
3095
|
-
const
|
|
3130
|
+
const GrepDatePicker = ({ id, label, value, variant, errorMessage, fullWidth, required, margin, clearable, sx, ...props }) => {
|
|
3096
3131
|
const [date, setDate] = useDate(value);
|
|
3097
3132
|
const [error, setError] = useState();
|
|
3098
3133
|
const helperText = errorMessage || error || props.helperText;
|
|
3099
3134
|
return (React__default.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: 'nb' },
|
|
3100
|
-
React__default.createElement(
|
|
3135
|
+
React__default.createElement(DatePicker
|
|
3101
3136
|
// clearable @todo
|
|
3102
3137
|
, {
|
|
3103
3138
|
// clearable @todo
|
|
@@ -3120,14 +3155,13 @@ const DatePicker = ({ id, label, value, variant, errorMessage, placeholder, full
|
|
|
3120
3155
|
setError(undefined);
|
|
3121
3156
|
}
|
|
3122
3157
|
}, value: date, onChange: setDate, slotProps: {
|
|
3158
|
+
field: { clearable: clearable },
|
|
3123
3159
|
textField: {
|
|
3124
3160
|
id: id,
|
|
3125
3161
|
label: label,
|
|
3126
3162
|
variant: variant,
|
|
3127
|
-
onFocus: onFocus,
|
|
3128
3163
|
required: required,
|
|
3129
3164
|
fullWidth: fullWidth,
|
|
3130
|
-
placeholder: placeholder,
|
|
3131
3165
|
sx: sx,
|
|
3132
3166
|
margin: margin,
|
|
3133
3167
|
error: !!error || !!errorMessage,
|
|
@@ -3140,20 +3174,20 @@ const GrepDateRange = ({ onChange, spacing = 3, style, fullWidth, from: fromProp
|
|
|
3140
3174
|
const [from, setFrom] = useDate(fromProperties.value);
|
|
3141
3175
|
const [to, setTo] = useDate(toProperties.value);
|
|
3142
3176
|
const { minDate, maxDate, ...commonProperties } = properties;
|
|
3143
|
-
|
|
3177
|
+
useCallback(() => onChange(new DateRangeValue(from ? String(from) : from, to ? String(to) : to)), [from, to, onChange]);
|
|
3144
3178
|
return (React__default.createElement(Grid, { container: true, spacing: spacing, style: style },
|
|
3145
3179
|
React__default.createElement(Grid, { size: { xs: 12, sm: fullWidth ? 12 : 6 } },
|
|
3146
|
-
React__default.createElement(
|
|
3180
|
+
React__default.createElement(GrepDatePicker, { id: String(fromProperties.label), fullWidth: true, minDate: minDate, ...commonProperties, ...fromProperties, value: from, maxDate: to?.subtract(1, 'day') || undefined, onChange: setFrom })),
|
|
3147
3181
|
React__default.createElement(Grid, { size: { xs: 12, sm: fullWidth ? 12 : 6 } },
|
|
3148
|
-
React__default.createElement(
|
|
3182
|
+
React__default.createElement(GrepDatePicker, { id: String(toProperties.label), fullWidth: true, maxDate: maxDate, ...commonProperties, ...toProperties, value: to, minDate: from?.add(1, 'day') || undefined, onChange: setTo }))));
|
|
3149
3183
|
};
|
|
3150
3184
|
|
|
3151
|
-
const renderField = ({ key, value }) => (React.createElement(Box$1, { key: key, display:
|
|
3185
|
+
const renderField = ({ key, value }) => (React.createElement(Box$1, { key: key, sx: { display: 'flex', marginRight: '20px' } },
|
|
3152
3186
|
React.createElement(Typography$1, { variant: "body1", style: { color: Colors.grey, marginRight: '2rem' } },
|
|
3153
3187
|
key,
|
|
3154
3188
|
":"),
|
|
3155
3189
|
React.createElement(Typography$1, { variant: "body1" }, value)));
|
|
3156
|
-
const renderHorizontal = (infoFields) => (React.createElement(Box$1, { display:
|
|
3190
|
+
const renderHorizontal = (infoFields) => (React.createElement(Box$1, { sx: { display: 'flex', flexWrap: 'wrap', justifyContent: 'space-between' } }, infoFields.map(renderField)));
|
|
3157
3191
|
const renderVertical = (infoFields) => infoFields.map(renderField);
|
|
3158
3192
|
const InfoContainer = (props) => (React.createElement(Box$1, { style: { paddingTop: 20, ...props.style } },
|
|
3159
3193
|
props.header && (React.createElement(Typography$1, { variant: "h6", style: { paddingBottom: 10 } }, props.header)),
|
|
@@ -8394,7 +8428,7 @@ const SortableTable = ({ data, onChange, ...props }) => {
|
|
|
8394
8428
|
return (React__default.createElement(TableCell, { key: `header-${index}` }, label.toString().charAt(0).toUpperCase() +
|
|
8395
8429
|
label.toString().slice(1)));
|
|
8396
8430
|
})))),
|
|
8397
|
-
React__default.createElement(SortableContext, { items: stateItems, strategy: verticalListSortingStrategy },
|
|
8431
|
+
React__default.createElement(SortableContext, { items: stateItems, strategy: verticalListSortingStrategy, disabled: props.disabled },
|
|
8398
8432
|
React__default.createElement(TableBody, null, stateItems.map((item) => (React__default.createElement(SortableTableRow2, { key: item.id, id: item.id, item: item, columns: props.columns })))))),
|
|
8399
8433
|
React__default.createElement(DragOverlay, null, activeId !== '' ? (React__default.createElement(Table, { size: size, className: classes.dragOverlayRow, sx: { cursor: cursor } },
|
|
8400
8434
|
React__default.createElement(TableBody, null,
|
|
@@ -8609,7 +8643,7 @@ function StyleWrapperPlugin({ showCharcount, helperText, readOnly, classes, labe
|
|
|
8609
8643
|
React__default.createElement("legend", { className: clsx(styles.legend, classes?.legend) }),
|
|
8610
8644
|
label && (React__default.createElement("label", { className: clsx(styles.label, classes?.label) }, label)),
|
|
8611
8645
|
React__default.createElement(Box, { className: clsx(styles.editor, classes?.editor) }, children),
|
|
8612
|
-
(showCharcount || helperText) && (React__default.createElement(Box, { margin:
|
|
8646
|
+
(showCharcount || helperText) && (React__default.createElement(Box, { sx: { margin: '.5rem' } },
|
|
8613
8647
|
showCharcount && (React__default.createElement(FormHelperText, { className: styles.charcount }, `Antall tegn: ${charCount}`)),
|
|
8614
8648
|
helperText && (React__default.createElement(FormHelperText, { className: styles.helpertext }, helperText))))));
|
|
8615
8649
|
}
|
|
@@ -9206,9 +9240,7 @@ function Editor({ html, label, classes, autoFocus, helperText, showCharCount, al
|
|
|
9206
9240
|
setFloatingAnchorElem(_floatingAnchorElem);
|
|
9207
9241
|
}
|
|
9208
9242
|
};
|
|
9209
|
-
|
|
9210
|
-
editorRef = useRef(null);
|
|
9211
|
-
}
|
|
9243
|
+
editorRef = useRef(null);
|
|
9212
9244
|
const canStyle = allowedStyles === undefined || allowedStyles.length > 0;
|
|
9213
9245
|
const buttons = !allowedStyles
|
|
9214
9246
|
? createDefaultButtons()
|
|
@@ -9481,17 +9513,13 @@ const MobileAppBar = ({ userMenuItems, menuItems, }) => {
|
|
|
9481
9513
|
React.createElement(Toolbar$1, { style: { minHeight: '50px' } },
|
|
9482
9514
|
React.createElement(IconButton$1, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
9483
9515
|
React.createElement(MenuIcon, { sx: { color: 'white' } })),
|
|
9484
|
-
React.createElement(Menu$1, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav,
|
|
9485
|
-
'aria-labelledby': 'basic-button',
|
|
9486
|
-
} }, menuItems.map((page) => (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|
|
9516
|
+
React.createElement(Menu$1, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav }, menuItems.map((page) => (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|
|
9487
9517
|
React.createElement(MenuItem$1, { sx: {
|
|
9488
9518
|
width: '100%',
|
|
9489
9519
|
}, key: page.name }, page.translatedTextRef))))),
|
|
9490
9520
|
React.createElement(IconButton$1, { size: "medium", edge: "end", color: "inherit", "aria-label": "menu", style: { marginLeft: 'auto' }, onClick: handleClickMenu },
|
|
9491
9521
|
React.createElement(MoreVert, { sx: { color: 'white' } })),
|
|
9492
|
-
React.createElement(Menu$1, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu,
|
|
9493
|
-
'aria-labelledby': 'basic-button',
|
|
9494
|
-
} }, userMenuItems.map((i, index) => (React.createElement(Box, { key: i.id },
|
|
9522
|
+
React.createElement(Menu$1, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu }, userMenuItems.map((i, index) => (React.createElement(Box, { key: i.id },
|
|
9495
9523
|
React.createElement(MenuItem$1, { key: i.id, onClick: () => {
|
|
9496
9524
|
handleCloseMenu();
|
|
9497
9525
|
i.action && i.action();
|
|
@@ -10392,5 +10420,5 @@ const GrepTableOfContent = ({ style, className, setSelectedValue, percentageRend
|
|
|
10392
10420
|
};
|
|
10393
10421
|
GrepTableOfContent.displayName = 'Grep.ToC';
|
|
10394
10422
|
|
|
10395
|
-
export { AppBar, AppBarNavList, AppBarProfile, BodyLayout, CircularLoading, Colors, ConfirmationServiceProvider, ContainedLinkList,
|
|
10423
|
+
export { AppBar, AppBarNavList, AppBarProfile, BodyLayout, CircularLoading, Colors, ConfirmationServiceProvider, ContainedLinkList, DropdownMenu, Footer, GDPR, GrepCrumbs, GrepDatePicker, GrepDateRange, GrepDialogServiceProvider, GrepEditor, GrepInput, GrepSelect, GrepTable, GrepTableCard, GrepTableOfContent, GrepTableRow, GreyCover, InfoContainer, LinkList, LoadingOverlay, MainLayout, NavGuard, OverflowTooltip, ProfileInfo, SearchBar, ServiceMessage, Sidebar, SortableTable, index as Utils, convertToRgba, filterElements as filterContentElements, hex2rgb, hex2rgba, makeStyles, useConfirmation, useContentElements, useDate, useDebounce, useGrepDialog, useStyles$c as useStyles, withStyles };
|
|
10396
10424
|
//# sourceMappingURL=index.js.map
|