@evoke-platform/ui-components 1.5.0-dev.1 → 1.5.0-dev.3

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.
Files changed (23) hide show
  1. package/dist/published/components/core/List/ListItemIcon/ListItemIcon.d.ts +4 -0
  2. package/dist/published/components/core/List/ListItemIcon/ListItemIcon.js +6 -0
  3. package/dist/published/components/core/List/ListItemIcon/index.d.ts +3 -0
  4. package/dist/published/components/core/List/ListItemIcon/index.js +3 -0
  5. package/dist/published/components/core/List/index.d.ts +2 -1
  6. package/dist/published/components/core/List/index.js +2 -1
  7. package/dist/published/components/core/index.d.ts +1 -1
  8. package/dist/published/components/core/index.js +1 -1
  9. package/dist/published/components/custom/Form/FormComponents/ObjectComponent/RelatedObjectInstance.js +3 -3
  10. package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/RepeatableField.js +7 -6
  11. package/dist/published/components/layout/Box/Box.d.ts +3 -3
  12. package/dist/published/components/layout/Box/Box.js +4 -4
  13. package/dist/published/icons/custom/NoNavigation.d.ts +3 -0
  14. package/dist/published/icons/custom/NoNavigation.js +10 -0
  15. package/dist/published/icons/custom/SideNavigation.d.ts +3 -0
  16. package/dist/published/icons/custom/SideNavigation.js +11 -0
  17. package/dist/published/icons/custom/TopNavigation.d.ts +3 -0
  18. package/dist/published/icons/custom/TopNavigation.js +11 -0
  19. package/dist/published/icons/custom/index.d.ts +3 -0
  20. package/dist/published/icons/custom/index.js +3 -0
  21. package/dist/published/stories/Box.stories.d.ts +3 -12
  22. package/dist/published/stories/Palette.stories.d.ts +2 -12
  23. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import { ListItemIconProps } from '@mui/material';
2
+ import React from 'react';
3
+ declare const ListItemIcon: (props: ListItemIconProps) => React.JSX.Element;
4
+ export default ListItemIcon;
@@ -0,0 +1,6 @@
1
+ import { ListItemIcon as MUIListItemIcon } from '@mui/material';
2
+ import React from 'react';
3
+ const ListItemIcon = (props) => {
4
+ return React.createElement(MUIListItemIcon, { ...props });
5
+ };
6
+ export default ListItemIcon;
@@ -0,0 +1,3 @@
1
+ import ListItemIcon from './ListItemIcon';
2
+ export default ListItemIcon;
3
+ export { ListItemIcon };
@@ -0,0 +1,3 @@
1
+ import ListItemIcon from './ListItemIcon';
2
+ export default ListItemIcon;
3
+ export { ListItemIcon };
@@ -1,4 +1,5 @@
1
1
  import List from './List';
2
2
  import ListItem from './ListItem';
3
+ import ListItemIcon from './ListItemIcon';
3
4
  export default List;
4
- export { List, ListItem };
5
+ export { List, ListItem, ListItemIcon };
@@ -1,4 +1,5 @@
1
1
  import List from './List';
2
2
  import ListItem from './ListItem';
3
+ import ListItemIcon from './ListItemIcon';
3
4
  export default List;
4
- export { List, ListItem };
5
+ export { List, ListItem, ListItemIcon };
@@ -24,7 +24,7 @@ export { FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } f
24
24
  export { IconButton } from './IconButton';
25
25
  export { LinearProgress } from './LinearProgress';
26
26
  export { Link } from './Link';
27
- export { List, ListItem } from './List';
27
+ export { List, ListItem, ListItemIcon } from './List';
28
28
  export { LoadingButton } from './LoadingButton';
29
29
  export * from './LocalizationProvider';
30
30
  export { Menu, MenuItem } from './Menu';
@@ -24,7 +24,7 @@ export { FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } f
24
24
  export { IconButton } from './IconButton';
25
25
  export { LinearProgress } from './LinearProgress';
26
26
  export { Link } from './Link';
27
- export { List, ListItem } from './List';
27
+ export { List, ListItem, ListItemIcon } from './List';
28
28
  export { LoadingButton } from './LoadingButton';
29
29
  export * from './LocalizationProvider';
30
30
  export { Menu, MenuItem } from './Menu';
@@ -41,7 +41,7 @@ export const RelatedObjectInstance = (props) => {
41
41
  handleClose();
42
42
  setErrors([]);
43
43
  };
44
- const createNewInstance = async (submission) => {
44
+ const createNewInstance = async (submission, setSubmitting) => {
45
45
  if (!relatedObject) {
46
46
  // Handle the case where relatedObject is undefined
47
47
  return { isSuccessful: false };
@@ -74,12 +74,12 @@ export const RelatedObjectInstance = (props) => {
74
74
  setSnackbarError({
75
75
  showAlert: true,
76
76
  message: err.response?.data?.error?.details?.[0]?.message ??
77
- err.data?.error?.message ??
77
+ err.response?.data?.error?.message ??
78
78
  `An error occurred. The new instance was not created.`,
79
79
  isError: true,
80
80
  });
81
81
  error = err.response?.data?.error;
82
- onClose();
82
+ setSubmitting && setSubmitting(false);
83
83
  }
84
84
  return { isSuccessful, error };
85
85
  };
@@ -250,13 +250,13 @@ const RepeatableField = (props) => {
250
250
  isSuccessful = true;
251
251
  }
252
252
  catch (err) {
253
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
254
+ error = err.response?.data?.error;
253
255
  setSnackbarError({
254
256
  showAlert: true,
255
- message: `An error occurred while creating an instance`,
257
+ message: error?.message ?? `An error occurred while creating an instance`,
256
258
  isError: true,
257
259
  });
258
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
259
- error = err.response?.data?.error;
260
260
  setSubmitting && setSubmitting(false);
261
261
  }
262
262
  }
@@ -284,13 +284,14 @@ const RepeatableField = (props) => {
284
284
  isSuccessful = true;
285
285
  }
286
286
  catch (err) {
287
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
288
+ error = err.response?.data?.error;
287
289
  setSnackbarError({
288
290
  showAlert: true,
289
- message: `An error occurred while ${actionType === 'delete' ? ' deleting' : ' updating'} an instance`,
291
+ message: error?.message ??
292
+ `An error occurred while ${actionType === 'delete' ? ' deleting' : ' updating'} an instance`,
290
293
  isError: true,
291
294
  });
292
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
293
- error = err.response?.data?.error;
294
295
  }
295
296
  }
296
297
  return { isSuccessful, error };
@@ -1,8 +1,8 @@
1
- import { BoxProps } from '@mui/material';
1
+ import { BoxProps as MUIBoxProps } from '@mui/material';
2
2
  import React, { ElementType } from 'react';
3
- type CustomBoxProps = BoxProps & {
3
+ export type BoxProps = MUIBoxProps & {
4
4
  sx?: object;
5
5
  component?: ElementType;
6
6
  };
7
- declare const Box: (props: CustomBoxProps) => React.JSX.Element;
7
+ declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<unknown>>;
8
8
  export default Box;
@@ -1,8 +1,8 @@
1
1
  import { Box as MUIBox } from '@mui/material';
2
- import React from 'react';
2
+ import React, { forwardRef } from 'react';
3
3
  import UIThemeProvider from '../../../theme';
4
- const Box = (props) => {
4
+ const Box = forwardRef((props, ref) => {
5
5
  return (React.createElement(UIThemeProvider, null,
6
- React.createElement(MUIBox, { ...props })));
7
- };
6
+ React.createElement(MUIBox, { ref: ref, ...props })));
7
+ });
8
8
  export default Box;
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material';
2
+ import React from 'react';
3
+ export declare const NoNavigation: (props: SvgIconProps) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { SvgIcon } from '@mui/material';
2
+ import React from 'react';
3
+ export const NoNavigation = (props) => (React.createElement(SvgIcon, { ...props, viewBox: '0 0 24 24', sx: {
4
+ verticalAlign: 'top',
5
+ maxWidth: props.width ?? '24',
6
+ maxHeight: props.height ?? '24',
7
+ ...(props.sx ?? {}),
8
+ } },
9
+ React.createElement("g", { id: "icon/no_navigation" },
10
+ React.createElement("rect", { x: "2.75", y: "4.75", width: "18.5", height: "14.5", rx: "1.25", stroke: props?.htmlColor ?? '#212B36', strokeWidth: "1.5", fill: "transparent" }))));
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material';
2
+ import React from 'react';
3
+ export declare const SideNavigation: (props: SvgIconProps) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { SvgIcon } from '@mui/material';
2
+ import React from 'react';
3
+ export const SideNavigation = (props) => (React.createElement(SvgIcon, { ...props, viewBox: '0 0 24 24', sx: {
4
+ verticalAlign: 'top',
5
+ maxWidth: props.width ?? '24',
6
+ maxHeight: props.height ?? '24',
7
+ ...(props.sx ?? {}),
8
+ } },
9
+ React.createElement("g", { id: "icon/side_navigation" },
10
+ React.createElement("rect", { x: "2.75", y: "4.75", width: "18.5", height: "14.5", rx: "1.25", stroke: props?.htmlColor ?? '#212B36', strokeWidth: "1.5", fill: "transparent" }),
11
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 4C2.89543 4 2 4.89543 2 6V18C2 19.1046 2.89543 20 4 20H11V4H4ZM4.5 6C4.22386 6 4 6.22386 4 6.5C4 6.77614 4.22386 7 4.5 7H8.5C8.77614 7 9 6.77614 9 6.5C9 6.22386 8.77614 6 8.5 6H4.5ZM4 8.5C4 8.22386 4.22386 8 4.5 8H7.5C7.77614 8 8 8.22386 8 8.5C8 8.77614 7.77614 9 7.5 9H4.5C4.22386 9 4 8.77614 4 8.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H8.5C8.77614 11 9 10.7761 9 10.5C9 10.2239 8.77614 10 8.5 10H4.5ZM4 14.5C4 14.2239 4.22386 14 4.5 14H8.5C8.77614 14 9 14.2239 9 14.5C9 14.7761 8.77614 15 8.5 15H4.5C4.22386 15 4 14.7761 4 14.5ZM4.5 12C4.22386 12 4 12.2239 4 12.5C4 12.7761 4.22386 13 4.5 13H7.5C7.77614 13 8 12.7761 8 12.5C8 12.2239 7.77614 12 7.5 12H4.5Z", fill: props?.htmlColor ?? '#212B36' }))));
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material';
2
+ import React from 'react';
3
+ export declare const TopNavigation: (props: SvgIconProps) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { SvgIcon } from '@mui/material';
2
+ import React from 'react';
3
+ export const TopNavigation = (props) => (React.createElement(SvgIcon, { ...props, viewBox: '0 0 24 24', sx: {
4
+ verticalAlign: 'top',
5
+ maxWidth: props.width ?? '24',
6
+ maxHeight: props.height ?? '24',
7
+ ...(props.sx ?? {}),
8
+ } },
9
+ React.createElement("g", { id: "icon/top_navigation" },
10
+ React.createElement("rect", { x: "2.75", y: "4.75", width: "18.5", height: "14.5", rx: "1.25", stroke: props?.htmlColor ?? '#212B36', "stroke-width": "1.5", "stroke-linejoin": "round", fill: "transparent" }),
11
+ React.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22 5.66667C22 4.74619 21.2538 4 20.3333 4H3.66667C2.74619 4 2 4.74619 2 5.66667V9L22 9V5.66667ZM4.5 6C4.22386 6 4 6.22386 4 6.5C4 6.77614 4.22386 7 4.5 7H7.5C7.77614 7 8 6.77614 8 6.5C8 6.22386 7.77614 6 7.5 6H4.5ZM9 6.5C9 6.22386 9.22386 6 9.5 6H11.5C11.7761 6 12 6.22386 12 6.5C12 6.77614 11.7761 7 11.5 7H9.5C9.22386 7 9 6.77614 9 6.5ZM13.5 6C13.2239 6 13 6.22386 13 6.5C13 6.77614 13.2239 7 13.5 7H16.5C16.7761 7 17 6.77614 17 6.5C17 6.22386 16.7761 6 16.5 6H13.5Z", fill: props?.htmlColor ?? '#212B36' }))));
@@ -1,5 +1,8 @@
1
1
  export * from './FileWithExtension';
2
2
  export * from './Inherited';
3
+ export * from './NoNavigation';
3
4
  export * from './Overrides';
5
+ export * from './SideNavigation';
6
+ export * from './TopNavigation';
4
7
  export * from './TrashCan';
5
8
  export * from './UploadCloud';
@@ -1,5 +1,8 @@
1
1
  export * from './FileWithExtension';
2
2
  export * from './Inherited';
3
+ export * from './NoNavigation';
3
4
  export * from './Overrides';
5
+ export * from './SideNavigation';
6
+ export * from './TopNavigation';
4
7
  export * from './TrashCan';
5
8
  export * from './UploadCloud';
@@ -1,15 +1,6 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react';
2
2
  import React from 'react';
3
- declare const _default: ComponentMeta<(props: import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
- ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
5
- }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
6
- sx?: object | undefined;
7
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
8
- }) => React.JSX.Element>;
3
+ import { BoxProps } from '../components/layout/Box/Box';
4
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<unknown>>>;
9
5
  export default _default;
10
- export declare const Box: ComponentStory<(props: import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
- ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
12
- }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
13
- sx?: object | undefined;
14
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
15
- }) => React.JSX.Element>;
6
+ export declare const Box: ComponentStory<React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<unknown>>>;
@@ -1,15 +1,5 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react';
2
2
  import React from 'react';
3
- declare const _default: ComponentMeta<(props: import("@mui/system").BoxOwnProps<import("@mui/material/styles/createTheme").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
- ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
5
- }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles/createTheme").Theme>> & {
6
- sx?: object | undefined;
7
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
8
- }) => React.JSX.Element>;
3
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<import("../components/layout/Box/Box").BoxProps, "ref"> & React.RefAttributes<unknown>>>;
9
4
  export default _default;
10
- export declare const Palette: ComponentStory<(props: import("@mui/system").BoxOwnProps<import("@mui/material/styles/createTheme").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
- ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
12
- }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles/createTheme").Theme>> & {
13
- sx?: object | undefined;
14
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
15
- }) => React.JSX.Element>;
5
+ export declare const Palette: ComponentStory<React.ForwardRefExoticComponent<Omit<import("../components/layout/Box/Box").BoxProps, "ref"> & React.RefAttributes<unknown>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.5.0-dev.1",
3
+ "version": "1.5.0-dev.3",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",