grep-components 2.19.1 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ export type UserMenuItem = {
4
4
  action?: () => void;
5
5
  isAnchor?: boolean;
6
6
  href?: string;
7
- onClick?: (e: any) => void;
7
+ onClick?: (e: unknown) => void;
8
8
  };
9
9
  export interface IAuthorizedPage {
10
10
  name: string;
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
- decorators: ((storyFn: any) => React.JSX.Element)[];
4
+ decorators: ((storyFn: () => ReactNode) => React.JSX.Element)[];
5
5
  };
6
6
  export default _default;
7
7
  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: ((storyFn: any) => React.JSX.Element)[];
4
+ decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
5
5
  };
6
6
  export default _default;
7
7
  export declare const Standard: () => React.JSX.Element;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import 'dayjs/locale/nb';
3
3
  declare const _default: {
4
4
  title: string;
5
- decorators: ((storyFn: any) => React.JSX.Element)[];
5
+ decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
6
6
  };
7
7
  export default _default;
8
8
  export declare const Standard: () => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React, { JSX } from 'react';
1
+ import React, { JSX, ReactNode } from 'react';
2
2
  export declare const content = "Some content";
3
3
  export declare const openText = "Open dialog";
4
4
  export declare const title = "Title text";
@@ -7,7 +7,7 @@ export declare const Component: React.FC<{
7
7
  }>;
8
8
  declare const _default: {
9
9
  title: string;
10
- decorators: ((storyFn: any) => JSX.Element)[];
10
+ decorators: ((storyFn: () => ReactNode) => JSX.Element)[];
11
11
  excludeStories: string[];
12
12
  };
13
13
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
- decorators: ((storyFn: any) => React.JSX.Element)[];
4
+ decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
5
5
  };
6
6
  export default _default;
7
7
  export declare const Standard: () => React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
- decorators: ((storyFn: any) => React.JSX.Element)[];
4
+ decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
5
5
  };
6
6
  export default _default;
7
7
  export declare const Input: () => React.JSX.Element;
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
- decorators: ((storyFn: any) => React.JSX.Element)[];
4
+ decorators: ((storyFn: () => ReactNode) => React.JSX.Element)[];
5
5
  };
6
6
  export default _default;
7
7
  export declare const Standard: () => React.JSX.Element;
@@ -6,12 +6,13 @@ export interface ICurriculum {
6
6
  title: string;
7
7
  statusText: string;
8
8
  lastModified: string;
9
+ responsibleUsername?: string;
9
10
  }
10
11
  export declare const tableColumns: TableColumn<ICurriculum>[];
11
12
  export declare const tableData: (samples?: number) => ICurriculum[];
12
13
  declare const _default: {
13
14
  title: string;
14
- decorators: ((storyFn: any) => React.JSX.Element)[];
15
+ decorators: ((storyFn: () => React.ReactNode) => React.JSX.Element)[];
15
16
  excludeStories: string[];
16
17
  };
17
18
  export default _default;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import dayjs from 'dayjs';
2
- import LocalizedFormatPlugin from 'dayjs/plugin/localizedFormat';
3
- import isBetweenPlugin from 'dayjs/plugin/isBetween';
2
+ import LocalizedFormatPlugin from 'dayjs/plugin/localizedFormat.js';
3
+ import isBetweenPlugin from 'dayjs/plugin/isBetween.js';
4
4
  import { blueGrey, grey, brown, deepOrange, orange, amber, yellow, lime, lightGreen, green, teal, cyan, lightBlue, blue, indigo, deepPurple, purple, pink, red } from '@mui/material/colors';
5
5
  import * as React from 'react';
6
6
  import React__default, { useRef, useMemo, createContext, useContext, forwardRef, createElement, useState, useCallback, useEffect, useLayoutEffect, memo, useReducer, cloneElement } from 'react';
@@ -1722,9 +1722,7 @@ const useStyles$e = makeStyles()(({ palette }) => ({
1722
1722
 
1723
1723
  const DropdownMenu = ({ context, menuItems, ...menuProps }) => {
1724
1724
  const { classes } = useStyles$e();
1725
- const renderChild = (level = 0, parentDisabled) =>
1726
- // eslint-disable-next-line react/display-name
1727
- (item, index) => {
1725
+ const renderChild = (level = 0, parentDisabled) => (item, index) => {
1728
1726
  const { label, children, handleClick, disabled, ...props } = item;
1729
1727
  const itemOrParentDisabled = (parentDisabled || disabled) ?? false;
1730
1728
  const isDisabled = typeof itemOrParentDisabled === 'function'
@@ -9637,11 +9635,11 @@ const ConfirmationServiceProvider = ({ children, }) => {
9637
9635
  awaitingPromiseRef.current?.resolve();
9638
9636
  setDialogOpen(false);
9639
9637
  };
9640
- return (React__default.createElement(ConfirmationServiceContext.Provider, { value: openDialog },
9638
+ return (React__default.createElement(ConfirmationServiceContext, { value: openDialog },
9641
9639
  React__default.createElement(ConfirmationDialog, { open: dialogOpen, onSubmit: handleSubmit, onCancel: handleCancel, ...confirmationState }),
9642
9640
  children));
9643
9641
  };
9644
- const useConfirmation = () => React__default.useContext(ConfirmationServiceContext);
9642
+ const useConfirmation = () => React__default.use(ConfirmationServiceContext);
9645
9643
 
9646
9644
  const GrepDialog = ({ open, title, content, onClose, closeBtnText = 'Lukk', ...props }) => {
9647
9645
  const actions = [