@pautena/react-design-system 0.15.0 → 0.16.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.
Files changed (65) hide show
  1. package/README.md +2 -2
  2. package/action/cjs/index.js +1 -1
  3. package/action/cjs/index.js.map +1 -1
  4. package/action/cjs/package.json +0 -1
  5. package/action/index.js +1 -1
  6. package/action/index.js.map +1 -1
  7. package/action/package.json +0 -1
  8. package/board/board.d.ts +2 -3
  9. package/board/cjs/index.js +1 -1
  10. package/board/cjs/index.js.map +1 -1
  11. package/board/cjs/package.json +0 -1
  12. package/board/index.js +1 -1
  13. package/board/index.js.map +1 -1
  14. package/board/package.json +0 -1
  15. package/bootstrap-dialog/cjs/index.js +1 -1
  16. package/bootstrap-dialog/cjs/index.js.map +1 -1
  17. package/bootstrap-dialog/cjs/package.json +0 -1
  18. package/bootstrap-dialog/index.js +1 -1
  19. package/bootstrap-dialog/index.js.map +1 -1
  20. package/bootstrap-dialog/package.json +0 -1
  21. package/cjs/index.js +1 -1
  22. package/cjs/index.js.map +1 -1
  23. package/confirm-dialog/cjs/index.js +1 -1
  24. package/confirm-dialog/cjs/index.js.map +1 -1
  25. package/confirm-dialog/cjs/package.json +0 -1
  26. package/confirm-dialog/index.js +1 -1
  27. package/confirm-dialog/index.js.map +1 -1
  28. package/confirm-dialog/package.json +0 -1
  29. package/expandable-alert/cjs/index.js +1 -1
  30. package/expandable-alert/cjs/index.js.map +1 -1
  31. package/expandable-alert/cjs/package.json +0 -1
  32. package/expandable-alert/index.js +1 -1
  33. package/expandable-alert/index.js.map +1 -1
  34. package/expandable-alert/package.json +0 -1
  35. package/form-dialog/cjs/index.js +1 -1
  36. package/form-dialog/cjs/index.js.map +1 -1
  37. package/form-dialog/cjs/package.json +0 -1
  38. package/form-dialog/index.js +1 -1
  39. package/form-dialog/index.js.map +1 -1
  40. package/form-dialog/package.json +0 -1
  41. package/index.d.ts +0 -1
  42. package/index.js +1 -1
  43. package/index.js.map +1 -1
  44. package/markdown/cjs/index.js +1 -1
  45. package/markdown/cjs/index.js.map +1 -1
  46. package/markdown/cjs/package.json +1 -3
  47. package/markdown/index.js +1 -1
  48. package/markdown/index.js.map +1 -1
  49. package/markdown/markdown.d.ts +45 -7
  50. package/markdown/package.json +1 -3
  51. package/package.json +8 -16
  52. package/sign-in/cjs/index.js +1 -1
  53. package/sign-in/cjs/index.js.map +1 -1
  54. package/sign-in/cjs/package.json +0 -1
  55. package/sign-in/index.js +1 -1
  56. package/sign-in/index.js.map +1 -1
  57. package/sign-in/package.json +0 -1
  58. package/lorem-ipsum-placeholder/cjs/index.js +0 -2
  59. package/lorem-ipsum-placeholder/cjs/index.js.map +0 -1
  60. package/lorem-ipsum-placeholder/cjs/package.json +0 -12
  61. package/lorem-ipsum-placeholder/index.d.ts +0 -1
  62. package/lorem-ipsum-placeholder/index.js +0 -2
  63. package/lorem-ipsum-placeholder/index.js.map +0 -1
  64. package/lorem-ipsum-placeholder/lorem-ipsum-placeholder.d.ts +0 -8
  65. package/lorem-ipsum-placeholder/package.json +0 -12
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/markdown/markdown.tsx","../src/board/board.tsx","../src/expandable-alert/expandable-alert.tsx","../src/content/content.tsx","../src/center-container/center-container.tsx","../src/utils/arrays.ts","../src/utils/theme.ts","../src/utils/breakpoints.ts","../src/utils/forms.ts","../src/list-panel/list-panel.context.tsx","../src/list-panel/list-panel.tsx","../src/bullet/bullet.tsx","../src/label/label.tsx","../src/tab-provider/tab-provider.context.ts","../src/tab-provider/tab-provider.provider.tsx","../src/header/header-title.tsx","../src/header/header.tsx","../src/bootstrap-dialog/bootstrap-dialog.tsx","../src/confirm-dialog/confirm-dialog.tsx","../src/form-dialog/form-dialog.tsx","../src/dialog/use-dialog.ts","../src/drawer-provider/drawer-context.ts","../src/drawer-provider/drawer-mixins.ts","../src/drawer/drawer.tsx","../src/drawer-provider/drawer.provider.tsx","../src/drawer-subheader/drawer-subheader.tsx","../src/drawer/drawer.types.ts","../src/drawer-item/drawer-item-link.tsx","../src/drawer-item/drawer-item.tsx","../src/drawer-item/drawer-menu-item.tsx","../src/drawer-section/drawer-section.tsx","../src/drawer-content/drawer-content.tsx","../src/drawer-app-bar/drawer-app-bar.tsx","../src/drawer-main/drawer-main.tsx","../src/loading-area/loading-area.tsx","../src/query-container/query-container.tsx","../src/select/select.tsx","../src/sign-in/sign-in.tsx","../node_modules/@mui/utils/esm/useId/useId.js","../src/text-field/text-field.tsx","../src/autocomplete/autocomplete.tsx","../src/date-range-calendar/date-range-calendar.tsx","../src/date-range-picker/date-range-picker.tsx","../src/action/action-header.tsx","../src/action/action.tsx","../src/tab-card/tab-card.context.tsx","../src/tab-card/tab-card.tsx","../src/tab-card/tab-card-panel.tsx","../src/tab-panel/tab-panel.tsx","../src/placeholder/placeholder.tsx","../src/skeleton-card/skeleton-card.tsx","../src/skeleton-grid/skeleton-grid.tsx","../src/content-placeholder/content-placeholder.tsx","../src/lorem-ipsum-placeholder/lorem-ipsum-placeholder.tsx","../node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js","../src/enhanced-table/enhanced-table-head.tsx","../src/enhanced-table/enhanced-table.tsx","../src/enhanced-remote-table/enhanced-remote-table.tsx","../src/value-base/value-edit.tsx","../src/value-base/value-displays.types.ts","../src/value-content/value-content.tsx","../src/value-text/value-text.tsx","../src/value-card/value-card.tsx","../src/value-boolean/value-boolean.tsx","../src/value-datetime/value-datetime.tsx","../src/group-value-card/group-value-card.tsx","../src/value-rating/value-rating.tsx","../src/value-item/value-item.tsx","../src/value-label/value-label.tsx","../src/drawer-layout/drawer-layout.tsx","../src/header-layout/header-layout.tsx","../src/notification-center/notification-center.context.ts","../src/notification-center/notification-center.provider.tsx","../src/notification-center/notification-center.hooks.ts","../src/object-details/object-details.tsx","../src/generators/generators.model.ts","../src/model-form/model-form-field.tsx","../node_modules/ramda/es/internal/_isPlaceholder.js","../node_modules/ramda/es/internal/_curry1.js","../node_modules/ramda/es/internal/_curry2.js","../node_modules/ramda/es/internal/_curry3.js","../node_modules/ramda/es/internal/_isArray.js","../node_modules/ramda/es/internal/_isInteger.js","../node_modules/ramda/es/isNil.js","../node_modules/ramda/es/assocPath.js","../node_modules/ramda/es/internal/_has.js","../node_modules/ramda/es/internal/_assoc.js","../src/model-form/model-form.tsx","../src/table-list/table-list.tsx"],"sourcesContent":["import Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport ReactMarkdown, { MarkdownToJSX } from \"markdown-to-jsx\";\n\nexport interface MarkdownProps {\n content: string;\n options?: MarkdownToJSX.Options;\n}\n\nexport const markdownDefaultOptions: MarkdownToJSX.Options = {\n overrides: {\n h1: {\n component: Typography,\n props: {\n gutterBottom: true,\n variant: \"h5\",\n },\n },\n h2: { component: Typography, props: { gutterBottom: true, variant: \"h6\" } },\n h3: {\n component: Typography,\n props: { gutterBottom: true, variant: \"subtitle1\" },\n },\n h4: {\n component: Typography,\n props: { gutterBottom: true, variant: \"caption\", paragraph: true },\n },\n p: { component: Typography, props: { paragraph: true } },\n a: { component: Link },\n li: {\n component: \"li\",\n },\n },\n};\n\nexport const Markdown = ({ content, options = markdownDefaultOptions }: MarkdownProps) => {\n return <ReactMarkdown options={options}>{content}</ReactMarkdown>;\n};\n","import Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme, SxProps, Theme } from \"@mui/material/styles\";\nimport { blueGrey } from \"@mui/material/colors\";\nimport { PropsWithChildren, ReactNode } from \"react\";\nimport { Markdown } from \"../markdown\";\nimport ContentCopyIcon from \"@mui/icons-material/ContentCopy\";\n\nexport type BoardProps = PropsWithChildren<{\n markdown?: string;\n content?: string | string[];\n spacing?: 0 | 1 | 2 | 3 | 4 | 5;\n sx?: SxProps<Theme>;\n}>;\n\nexport const Board = ({\n markdown: markdownProps,\n content: contentProp,\n spacing = 0,\n children,\n sx,\n}: BoardProps) => {\n const { spacing: themeSpacing, typography } = useTheme();\n let copyContent: string;\n let content: ReactNode;\n\n if (markdownProps) {\n copyContent = markdownProps || \"\";\n } else if (Array.isArray(contentProp)) {\n content = contentProp.map((line, i) => (\n <Typography key={i} sx={{ pb: spacing }}>\n {line}\n </Typography>\n ));\n copyContent = contentProp.join(\"\\n\");\n } else {\n content = <Typography>{contentProp}</Typography>;\n copyContent = contentProp || \"\";\n }\n\n const markdown = markdownProps && <Markdown content={markdownProps} />;\n\n return (\n <Paper\n sx={{\n position: \"relative\",\n pl: 2,\n pr: 4,\n py: 1,\n backgroundColor: blueGrey[800],\n color: \"white\",\n ...sx,\n }}\n >\n <Box display=\"flex\" flexDirection=\"row\">\n <Box width={1}>{children || markdown || content}</Box>\n <Box sx={{ position: \"absolute\", top: themeSpacing(0.5), right: themeSpacing(0.5) }}>\n {copyContent && (\n <IconButton\n aria-label=\"copy board content\"\n color=\"inherit\"\n onClick={() => navigator.clipboard.writeText(copyContent)}\n >\n <Tooltip title=\"Copy\">\n <ContentCopyIcon sx={{ fontSize: typography.pxToRem(18) }} />\n </Tooltip>\n </IconButton>\n )}\n </Box>\n </Box>\n </Paper>\n );\n};\n","import Alert, { alertClasses, AlertColor } from \"@mui/material/Alert\";\nimport Box from \"@mui/material/Box\";\nimport Collapse from \"@mui/material/Collapse\";\nimport IconButton from \"@mui/material/IconButton\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport { SxProps, Theme } from \"@mui/material/styles\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { forwardRef, ReactElement, useState } from \"react\";\nimport { Board } from \"../board\";\n\nexport interface ExpandableAlertProps {\n severity: AlertColor;\n iconMapping?: Partial<Record<AlertColor, React.ReactNode>>;\n title?: string;\n message: string;\n metadata?: string | string[];\n metadataComponent?: ReactElement;\n onClose: () => void;\n sx?: SxProps<Theme>;\n}\n\nconst alertSx = {\n [`& .${alertClasses.message}`]: {\n width: 1,\n },\n};\n\nexport const ExpandableAlert = forwardRef<any, ExpandableAlertProps>(\n (\n { severity, iconMapping, title, message, metadata, metadataComponent, onClose, sx = {} },\n ref,\n ) => {\n const [expanded, setExpanded] = useState(false);\n return (\n <Alert\n ref={ref}\n severity={severity}\n iconMapping={iconMapping}\n onClose={onClose}\n action={\n <Box display=\"flex\" flexDirection=\"column\">\n <IconButton color=\"inherit\" onClick={onClose}>\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n {metadata && (\n <IconButton color=\"inherit\" onClick={() => setExpanded((e) => !e)}>\n {expanded ? (\n <ExpandLessIcon fontSize=\"small\" />\n ) : (\n <ExpandMoreIcon fontSize=\"small\" />\n )}\n </IconButton>\n )}\n </Box>\n }\n sx={{ ...alertSx, ...sx }}\n >\n <Box sx={{ w: 1 }}>\n {title && <AlertTitle>{title}</AlertTitle>}\n {message}\n {metadata && (\n <Collapse in={expanded} sx={{ mt: 2 }}>\n <Board content={metadata}>{metadataComponent}</Board>\n </Collapse>\n )}\n </Box>\n </Alert>\n );\n },\n);\n","import Container from \"@mui/material/Container\";\nimport { ContentProps } from \"./content.types\";\n\nexport const Content = ({ children }: ContentProps) => {\n return (\n <Container component=\"main\" sx={{ py: 3, flexGrow: 1 }}>\n {children}\n </Container>\n );\n};\n","import { ReactNode } from \"react\";\nimport Box from \"@mui/material/Box\";\nimport { SxProps, Theme } from \"@mui/material/styles\";\n\nexport interface CenterContainerProps {\n children: ReactNode | undefined;\n centerVertical?: boolean;\n centerHorizontal?: boolean;\n sx?: SxProps<Theme>;\n}\n\nexport function CenterContainer({\n children,\n centerVertical = true,\n centerHorizontal = true,\n sx,\n}: CenterContainerProps) {\n return (\n <Box\n width={1}\n height={1}\n sx={{\n ...sx,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: centerVertical ? \"center\" : \"flex-start\",\n alignItems: centerHorizontal ? \"center\" : \"flex-start\",\n }}\n >\n {children}\n </Box>\n );\n}\n","export const newArrayWithSize = <T>(size: number, fillValue: T) => new Array(size).fill(fillValue);\n\nexport const getRandomItem = <T>(items: T[]): { index: number; item: T } => {\n const index = Math.floor(Math.random() * items.length);\n const item = items[index];\n return { index, item };\n};\n","import { Color, useTheme } from \"@mui/material\";\n\ntype KeyColor = keyof Color;\n\nexport const useGetDefaultThemeColor = ({\n lightWeight = 100,\n darkWeight = 900,\n}: { lightWeight?: KeyColor; darkWeight?: KeyColor } = {}) => {\n const { palette } = useTheme();\n return palette.mode === \"light\" ? palette.grey[lightWeight] : palette.grey[darkWeight];\n};\n","import { ResponsiveStyleValue } from \"@mui/system\";\n\ninterface Breakpoints {\n xs: number;\n sm: number;\n md: number;\n lg: number;\n xl: number;\n}\n\ninterface BreakpointsCounter extends Breakpoints {\n increment(breakpoints: Partial<Breakpoints>): ResponsiveStyleValue<boolean>;\n}\n\nexport const newBreakpointsCounter = (breakpoint = 12): BreakpointsCounter => {\n const calculateBreakpointIncrement = (\n breakpointsCounter: BreakpointsCounter,\n key: keyof Breakpoints,\n value: number,\n ): boolean => {\n const initialValue = breakpointsCounter[key];\n breakpointsCounter[key] += value;\n if (breakpointsCounter[key] > breakpoint) {\n breakpointsCounter[key] = value;\n return false;\n }\n\n if (breakpointsCounter[key] == breakpoint) {\n breakpointsCounter[key] = 0;\n }\n\n return initialValue > 0;\n };\n\n return {\n xs: 0,\n sm: 0,\n md: 0,\n lg: 0,\n xl: 0,\n increment: function ({\n xs = 0,\n sm = 0,\n md = 0,\n lg = 0,\n xl = 0,\n }): ResponsiveStyleValue<boolean> {\n const smInc = sm || xs;\n const mdInc = md || smInc;\n const lgInc = lg || mdInc;\n const xlInc = xl || lgInc;\n\n return {\n xs: calculateBreakpointIncrement(this, \"xs\", xs),\n sm: calculateBreakpointIncrement(this, \"sm\", smInc),\n md: calculateBreakpointIncrement(this, \"md\", mdInc),\n lg: calculateBreakpointIncrement(this, \"lg\", lgInc),\n xl: calculateBreakpointIncrement(this, \"xl\", xlInc),\n };\n },\n };\n};\n","import { FormEvent } from \"react\";\n\nexport const getFormData = <T>(e: FormEvent<HTMLFormElement>): T => {\n const data = new FormData(e.currentTarget);\n const rawData: Record<string, any> = {};\n\n data.forEach((value, key) => {\n rawData[key] = value;\n });\n return rawData as T;\n};\n","import { createContext, useContext } from \"react\";\n\nexport const ListPanelContext = createContext<string | undefined>(undefined);\nexport const ListPanelContextProvider = ListPanelContext.Provider;\nexport const useListPanel = () => useContext(ListPanelContext);\n","import Grid from \"@mui/material/Grid\";\nimport List from \"@mui/material/List\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Link, useTheme } from \"@mui/material\";\nimport { PropsWithChildren, useState } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { ListPanelContextProvider } from \"./list-panel.context\";\nimport { grey } from \"@mui/material/colors\";\n\nexport interface ListPanelItem {\n id: string;\n text: string;\n tooltip?: string;\n href?: string;\n path?: string;\n}\n\nexport type ListPanelProps = PropsWithChildren<{\n defaultSelectedItem?: string;\n items: ListPanelItem[];\n listMode?: \"panel\" | \"navigation\";\n colBreakpoint?: number;\n onSelectedItemChange?: (id: string) => void;\n}>;\n\nexport const ListPanel = ({\n items,\n defaultSelectedItem,\n colBreakpoint = 3,\n listMode = \"panel\",\n children,\n onSelectedItemChange = () => null,\n}: ListPanelProps) => {\n const paths = items.map((item) => item.path).filter(Boolean) as string[];\n\n const bgColor = useGetDefaultThemeColor();\n const { palette, typography } = useTheme();\n const [selectedItem, setSelectedItem] = useState(defaultSelectedItem);\n\n const handleSelectItem = (id: string) => {\n setSelectedItem(id);\n onSelectedItemChange(id);\n };\n\n return (\n <ListPanelContextProvider value={selectedItem}>\n <Grid container bgcolor={bgColor} height={1}>\n <Grid item xs={colBreakpoint} pl={1} height={1}>\n <List sx={{ height: 1, overflowY: \"auto\" }}>\n {items.map(({ id, text, tooltip, path, href }) => {\n const linkProps = listMode === \"navigation\" ? { component: Link, href } : {};\n\n const contentEl = (\n <ListItemButton\n {...linkProps}\n key={id}\n dense\n onClick={() => handleSelectItem(id)}\n aria-label={text}\n >\n <ListItemText\n primary={text}\n primaryTypographyProps={{\n color: grey[600],\n }}\n />\n </ListItemButton>\n );\n\n return tooltip ? (\n <Tooltip key={id} title={tooltip} enterDelay={1500} placement=\"right\">\n {contentEl}\n </Tooltip>\n ) : (\n contentEl\n );\n })}\n </List>\n </Grid>\n <Grid item xs={12 - colBreakpoint} pl={1} py={1} pr={1}>\n <Paper\n elevation={0}\n sx={{\n width: 1,\n height: 1,\n backgroundColor: palette.background.paper,\n }}\n >\n {children}\n </Paper>\n </Grid>\n </Grid>\n </ListPanelContextProvider>\n );\n};\n","import Badge from \"@mui/material/Badge\";\nimport { SxProps, Theme } from \"@mui/material/styles\";\n\nexport type BulletVariant = \"primary\" | \"secondary\" | \"default\" | \"info\" | \"warning\" | \"error\";\n\nexport const bulletClasses = {\n root: \"RdsBullet-root\",\n};\n\nexport interface BulletProps {\n /**\n * Color palette used to draw the component\n */\n variant?: BulletVariant;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\n/**\n * Dot to attract the user attention\n */\nexport const Bullet = ({ variant = \"primary\", sx }: BulletProps) => {\n return (\n <Badge\n color={variant}\n variant=\"dot\"\n className={bulletClasses.root}\n role=\"bullet\"\n aria-describedby={variant}\n sx={sx}\n />\n );\n};\n","import Box from \"@mui/material/Box\";\nimport { SxProps, Theme, useTheme } from \"@mui/material/styles\";\n\nexport type LabelVariant =\n | \"primary\"\n | \"secondary\"\n | \"default\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport const labelClasses = {\n root: \"RdsLabel-root\",\n};\n\nexport interface LabelProps {\n /**\n * Content of the component\n */\n text: string;\n /**\n * Color palette used to draw the component\n */\n variant?: LabelVariant;\n /**\n * Background color. Overrides variant\n */\n color?: string;\n\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n\n /**\n * Show the text as uppercase\n */\n textTransform?: \"none\" | \"capitalize\" | \"uppercase\";\n}\n\n/**\n * Compact element to represent a text\n */\nexport const Label = ({\n text,\n color: colorProp,\n variant = \"default\",\n textTransform = \"capitalize\",\n sx,\n}: LabelProps) => {\n const { palette, typography } = useTheme();\n\n const backgroundColor: Record<LabelVariant, string> = {\n default: palette.mode === \"light\" ? palette.grey[100] : palette.grey[900],\n primary: palette.primary.light,\n secondary: palette.secondary.light,\n info: palette.info.light,\n warning: palette.warning.light,\n error: palette.error.light,\n success: palette.success.light,\n };\n\n const textColor: Record<LabelVariant, string> = {\n default: palette.getContrastText(backgroundColor.default),\n primary: palette.primary.contrastText,\n secondary: palette.secondary.contrastText,\n info: palette.info.contrastText,\n warning: palette.warning.contrastText,\n error: palette.error.contrastText,\n success: palette.success.contrastText,\n };\n\n const bgcolor = colorProp ? colorProp : backgroundColor[variant];\n const color = colorProp ? palette.getContrastText(colorProp) : textColor[variant];\n\n return (\n <Box\n height={24}\n minWidth={22}\n display=\"inline-flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n bgcolor={bgcolor}\n color={color}\n fontSize={typography.caption.fontSize}\n fontWeight={typography.fontWeightBold}\n lineHeight={0}\n textTransform={textTransform}\n whiteSpace=\"nowrap\"\n borderRadius={2}\n role=\"label\"\n aria-label={`${text} ${variant} label`}\n py={0}\n px={1}\n sx={{ cursor: \"default\", ...sx }}\n >\n {text}\n </Box>\n );\n};\n","import { createContext, Dispatch, SetStateAction, useContext } from \"react\";\n\nexport const TabContext = createContext<[number, Dispatch<SetStateAction<number>>]>([\n 0,\n () => null,\n]);\nexport const TabContextProvider = TabContext.Provider;\nexport const useTab = () => useContext(TabContext);\n","import { PropsWithChildren, useState } from \"react\";\nimport { TabContextProvider } from \"./tab-provider.context\";\n\ntype TabProviderProps = PropsWithChildren<{\n initialValue?: number;\n}>;\n\nexport const TabProvider = ({ children, initialValue = 0 }: TabProviderProps) => {\n const tabState = useState(initialValue);\n\n return <TabContextProvider value={tabState}>{children}</TabContextProvider>;\n};\n","import CircularProgress from \"@mui/material/CircularProgress\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { PropsWithChildren } from \"react\";\n\nexport type HeaderTitleProps = PropsWithChildren<{ loading?: boolean }>;\n\nexport const HeaderTitle = ({ loading, children }: HeaderTitleProps) => {\n const { typography } = useTheme();\n\n if (loading) {\n return (\n <CircularProgress color=\"inherit\" size={typography.h4.fontSize} aria-label=\"title loading\" />\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <Typography variant=\"h4\" role=\"heading\" aria-level={1}>\n {children}\n </Typography>\n );\n }\n\n return <>{children}</>;\n};\n\nexport type HeaderSubtitleProps = PropsWithChildren<{ loading?: boolean }>;\n\nexport const HeaderSubtitle = ({ loading, children }: HeaderSubtitleProps) => {\n const { typography } = useTheme();\n\n if (loading) {\n return (\n <CircularProgress\n color=\"inherit\"\n size={typography.body1.fontSize}\n aria-label=\"subtitle loading\"\n />\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <Typography variant=\"body1\" role=\"heading\" aria-level={2}>\n {children}\n </Typography>\n );\n }\n\n return <>{children}</>;\n};\n","import { useTheme } from \"@mui/material/styles\";\nimport Breadcrumbs from \"@mui/material/Breadcrumbs\";\nimport Container from \"@mui/material/Container\";\nimport Box from \"@mui/material/Box\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Button from \"@mui/material/Button\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { HeaderComponent, HeaderPreset, HeaderProps } from \"./header.types\";\nimport { useTab } from \"../tab-provider\";\nimport { HeaderSubtitle, HeaderTitle } from \"./header-title\";\nimport Link from \"@mui/material/Link\";\n\n/**\n * Section used to explain give basic information about the page\n * and put the main actions\n */\nexport const Header: HeaderComponent = ({\n title = \"\",\n loadingTitle,\n subtitle,\n loadingSubtitle,\n preset = \"default\",\n actionsVariant = \"outlined\",\n breadcrumbs,\n actions,\n tabs,\n tabsMode = \"panel\",\n navigationButton,\n}: HeaderProps) => {\n const { palette } = useTheme();\n const defaultColor = useGetDefaultThemeColor();\n const [selectedTab, setSelectedTab] = useTab();\n\n const bgColorPresets: Record<HeaderPreset, string> = {\n default: defaultColor,\n primary: palette.primary.main,\n secondary: palette.secondary.main,\n inherit: \"inherit\",\n transparent: \"transparent\",\n };\n const bgColor = bgColorPresets[preset];\n const textColorPresets: Record<HeaderPreset, string> = {\n default: palette.getContrastText(bgColorPresets.default),\n primary: palette.primary.contrastText,\n secondary: palette.secondary.contrastText,\n inherit: \"inherit\",\n transparent: palette.text.primary,\n };\n const textColor = textColorPresets[preset];\n\n const modedSelectedTab = selectedTab;\n\n return (\n <Box bgcolor={bgColor} color={textColor}>\n <Container>\n <Box sx={{ py: 3, display: \"flex\", flexDirection: \"row\", justifyContent: \"space-between\" }}>\n <Box>\n {navigationButton && (\n <Button\n href={navigationButton.href}\n size=\"small\"\n color=\"inherit\"\n LinkComponent={Link}\n startIcon={navigationButton.icon}\n sx={{ mb: 1 }}\n >\n {navigationButton.text}\n </Button>\n )}\n {breadcrumbs?.length && (\n <Breadcrumbs\n color=\"inherit\"\n separator=\"›\"\n aria-label=\"breadcrumb\"\n sx={{ marginTop: 1 }}\n >\n {breadcrumbs.map(({ id, link, text }) => (\n <Link\n key={id}\n underline=\"hover\"\n color=\"inherit\"\n href={link}\n variant=\"body2\"\n role=\"link\"\n >\n {text}\n </Link>\n ))}\n </Breadcrumbs>\n )}\n <HeaderTitle loading={loadingTitle}>{title}</HeaderTitle>\n {(subtitle || loadingSubtitle) && (\n <HeaderSubtitle loading={loadingSubtitle}>{subtitle}</HeaderSubtitle>\n )}\n </Box>\n {actions && (\n <Box>\n {actions.map(({ disabled, id, href, onClick, text }, i) => (\n <Button\n component={href ? Link : \"button\"}\n role=\"button\"\n color=\"inherit\"\n disabled={disabled}\n key={id}\n variant={actionsVariant}\n size=\"small\"\n href={href}\n onClick={onClick}\n sx={{ mr: i != actions.length - 1 ? 1 : 0 }}\n >\n {text}\n </Button>\n ))}\n </Box>\n )}\n </Box>\n {tabs && (\n <Tabs\n value={modedSelectedTab}\n textColor=\"inherit\"\n onChange={tabsMode === \"panel\" ? (_, index) => setSelectedTab(index) : undefined}\n >\n {tabs.map(({ id, label, disabled, path, href }) => {\n const tabProps = { label, disabled };\n if (tabsMode === \"panel\") {\n return <Tab key={id} {...tabProps} />;\n } else {\n return <Tab key={id} {...tabProps} component={Link} href={href} value={path} />;\n }\n })}\n </Tabs>\n )}\n </Container>\n </Box>\n );\n};\n","import Dialog from \"@mui/material/Dialog\";\nimport DialogTitle from \"@mui/material/DialogTitle\";\nimport DialogActions from \"@mui/material/DialogActions\";\nimport IconButton from \"@mui/material/IconButton\";\nimport DialogContent from \"@mui/material/DialogContent\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport LoadingButton from \"@mui/lab/LoadingButton\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { BootstrapDialogDialogProps } from \"../dialog/dialog.types\";\n\nexport const BootstrapDialog = ({\n open,\n title,\n component,\n componentProps = {},\n disabled,\n disableAccept,\n disableCancel,\n actions = [],\n children,\n loading,\n cancelable,\n callCloseWhenCancel = true,\n acceptable,\n acceptText = \"Accept\",\n cancelText = \"Cancel\",\n onAccept,\n onCancel = () => null,\n onClose,\n acceptType = \"button\",\n}: BootstrapDialogDialogProps) => {\n const hasActions = actions.length > 0 || acceptable || cancelable;\n\n return (\n <Dialog open={open} onClose={onClose}>\n <DialogTitle sx={{ display: \"flex\", alignItems: \"center\" }}>\n {title}\n {loading && !acceptable && (\n <CircularProgress size={20} sx={{ ml: 2, color: (theme) => theme.palette.grey[500] }} />\n )}\n <IconButton\n disabled={disabled}\n aria-label=\"close\"\n onClick={onClose}\n sx={{\n position: \"absolute\",\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n >\n <CloseIcon />\n </IconButton>\n </DialogTitle>\n <Box component={component} {...componentProps}>\n <DialogContent dividers>{children}</DialogContent>\n {hasActions && (\n <DialogActions>\n {actions.map(({ id, text, type = \"button\", onClick, color = \"primary\" }) => (\n <Button key={id} type={type} disabled={disabled} onClick={onClick} color={color}>\n {text}\n </Button>\n ))}\n {cancelable && (\n <Button\n color=\"error\"\n disabled={disabled || disableCancel}\n onClick={() => {\n onCancel();\n if (callCloseWhenCancel) {\n onClose();\n }\n }}\n >\n {cancelText}\n </Button>\n )}\n\n {acceptable && (\n <LoadingButton\n type={acceptType}\n loading={loading}\n disabled={disabled || disableAccept}\n onClick={onAccept}\n >\n {acceptText}\n </LoadingButton>\n )}\n </DialogActions>\n )}\n </Box>\n </Dialog>\n );\n};\n","import { useState } from \"react\";\nimport { BootstrapDialog } from \"../bootstrap-dialog\";\nimport { BootstrapDialogDialogProps } from \"../dialog/dialog.types\";\nimport TextField from \"@mui/material/TextField\";\n\ntype OmitBaseDialogProps =\n | \"cancelable\"\n | \"acceptable\"\n | \"onAccept\"\n | \"onCancel\"\n | \"onClose\"\n | \"actions\"\n | \"callCloseWhenCancel\"\n | \"component\"\n | \"acceptType\";\nexport interface ConfirmDialogProps extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {\n confirmText?: string;\n canceText?: string;\n passphrase?: string;\n onCancel: () => void;\n onConfirm: () => void;\n}\n\nexport const ConfirmDialog = ({\n open,\n title,\n loading,\n disabled,\n confirmText = \"Confirm\",\n cancelText = \"Cancel\",\n passphrase,\n children,\n onConfirm,\n onCancel,\n}: ConfirmDialogProps) => {\n const [inputPassphrase, setInputPassphrase] = useState(\"\");\n const validPassphrase = !passphrase || inputPassphrase === passphrase;\n\n return (\n <BootstrapDialog\n title={title}\n loading={loading}\n disabled={loading || disabled}\n disableAccept={!validPassphrase}\n open={open}\n onClose={onCancel}\n acceptable\n cancelable\n callCloseWhenCancel={false}\n acceptText={confirmText}\n cancelText={cancelText}\n onCancel={onCancel}\n onAccept={onConfirm}\n >\n {children}\n {passphrase && (\n <TextField\n size=\"small\"\n fullWidth\n value={inputPassphrase}\n onChange={(e) => setInputPassphrase(e.target.value)}\n placeholder={passphrase}\n />\n )}\n </BootstrapDialog>\n );\n};\n","import { BootstrapDialog } from \"../bootstrap-dialog\";\nimport { FormEvent } from \"react\";\nimport { BootstrapDialogDialogProps } from \"../dialog\";\nimport { getFormData } from \"../utils/forms\";\n\ntype OmitBaseDialogProps =\n | \"cancelable\"\n | \"acceptable\"\n | \"onAccept\"\n | \"onCancel\"\n | \"onClose\"\n | \"actions\"\n | \"callCloseWhenCancel\"\n | \"component\"\n | \"acceptType\";\nexport interface FormDialogProps<T> extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {\n submitText?: string;\n canceText?: string;\n onCancel: () => void;\n onSubmit: (data: T) => void;\n}\n\nexport const FormDialog = <T,>({\n open,\n title,\n loading,\n disabled,\n submitText = \"Submit\",\n cancelText = \"Cancel\",\n children,\n onSubmit,\n onCancel,\n}: FormDialogProps<T>) => {\n const handleSubmit = (e: FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n\n onSubmit(getFormData<T>(e));\n };\n\n return (\n <BootstrapDialog\n component=\"form\"\n componentProps={{\n onSubmit: handleSubmit,\n }}\n title={title}\n loading={loading}\n disabled={loading || disabled}\n open={open}\n onClose={onCancel}\n callCloseWhenCancel={false}\n cancelable\n acceptable\n cancelText={cancelText}\n onCancel={onCancel}\n acceptText={submitText}\n acceptType=\"submit\"\n >\n {children}\n </BootstrapDialog>\n );\n};\n","import { useState } from \"react\";\n\nexport const useDialog = (intialOpen = false) => {\n const [isOpen, setIsOpen] = useState(intialOpen);\n\n const open = () => setIsOpen(true);\n const close = () => setIsOpen(false);\n\n return { isOpen, open, close, setIsOpen };\n};\n","import { useContext, createContext } from \"react\";\nimport { DrawerState, DrawerVariant } from \"../drawer\";\n\nexport interface DrawerContextProps {\n selectedItemId?: string;\n state: DrawerState;\n variant: DrawerVariant;\n drawerWidth: number;\n underAppBar: boolean;\n switchState(): void;\n close(): void;\n collapse(): void;\n open(): void;\n setState: (state: DrawerState) => void;\n}\n\nexport const DrawerContext = createContext<DrawerContextProps | undefined>(undefined);\nexport const UndefinedProvider = new Error(\"DrawerContext.Provider is required and was undefined\");\n\nexport const useDrawer = () => {\n const context = useContext(DrawerContext);\n\n if (context === undefined) {\n throw UndefinedProvider;\n }\n\n return context;\n};\n","import { Theme, CSSObject } from \"@mui/material/styles\";\n\nexport const drawerWidth = 240;\n\nexport const openedMixin = (theme: Theme): CSSObject => ({\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n});\n\nexport const closedMixin = (theme: Theme): CSSObject => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(7)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(8)} + 1px)`,\n },\n});\n","import { SxProps, Theme, styled, useTheme } from \"@mui/material/styles\";\nimport MuiDrawer, { drawerClasses } from \"@mui/material/Drawer\";\nimport { paperClasses } from \"@mui/material/Paper\";\nimport Divider from \"@mui/material/Divider\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport { DrawerComponent, DrawerProps, DrawerState, DrawerVariant } from \"./drawer.types\";\nimport { useDrawer } from \"../drawer-provider/drawer-context\";\nimport { closedMixin, openedMixin } from \"../drawer-provider/drawer-mixins\";\n\nexport const DrawerHeader = styled(\"div\")(({ theme }) => ({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: theme.spacing(0, 1),\n ...theme.mixins.toolbar,\n}));\n\nconst showCloseButton: Record<DrawerVariant, boolean> = {\n temporary: true,\n mini: true,\n persistent: true,\n clipped: false,\n};\n\nconst muiDrawerVariant: Record<DrawerVariant, \"permanent\" | \"persistent\" | \"temporary\"> = {\n temporary: \"temporary\",\n mini: \"permanent\",\n clipped: \"permanent\",\n persistent: \"persistent\",\n};\n\ntype SxGenerator = (state: DrawerState, theme: Theme) => SxProps<Theme>;\nconst NoopSxGenerator = () => ({});\nconst variantsSx: Readonly<Record<DrawerVariant, SxGenerator>> = {\n mini: (state: DrawerState, theme: Theme) => ({\n boxSizing: \"border-box\",\n [`& .${paperClasses.root}`]: {\n zIndex: theme.zIndex.drawer - 1,\n },\n }),\n temporary: NoopSxGenerator,\n clipped: NoopSxGenerator,\n persistent: NoopSxGenerator,\n};\n\nexport const Drawer: DrawerComponent = ({ children, ...rest }: DrawerProps) => {\n const theme = useTheme();\n const { state, switchState, underAppBar, close, drawerWidth, variant } = useDrawer();\n\n const sx: any = {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n ...(state === \"open\" && {\n ...openedMixin(theme),\n [`& .${drawerClasses.paper}`]: openedMixin(theme),\n }),\n ...(state !== \"open\" && {\n ...closedMixin(theme),\n [`& .${drawerClasses.paper}`]: closedMixin(theme),\n }),\n ...variantsSx[variant](state, theme),\n };\n\n return (\n <MuiDrawer\n open={state === \"open\"}\n variant={muiDrawerVariant[variant]}\n role=\"menu\"\n aria-hidden={state === \"close\"}\n onClose={close}\n sx={sx}\n {...rest}\n >\n <DrawerHeader>\n {!underAppBar && showCloseButton[variant] && (\n <IconButton onClick={switchState}>\n <ChevronLeftIcon />\n </IconButton>\n )}\n </DrawerHeader>\n <Divider />\n {children}\n </MuiDrawer>\n );\n};\n","import { useState } from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport { DrawerContext } from \"./drawer-context\";\nimport { DrawerState, DrawerVariant } from \"../drawer\";\nimport { drawerWidth } from \"./drawer-mixins\";\n\nconst initialState: Record<DrawerVariant, DrawerState> = {\n temporary: \"close\",\n mini: \"collapse\",\n clipped: \"open\",\n persistent: \"close\",\n};\n\nconst targetStates: Record<DrawerVariant, [DrawerState, DrawerState]> = {\n temporary: [\"close\", \"open\"],\n mini: [\"collapse\", \"open\"],\n clipped: [\"open\", \"open\"],\n persistent: [\"close\", \"open\"],\n};\n\nexport type DrawerProviderProps = PropsWithChildren<{\n initialState?: DrawerState;\n underAppBar?: boolean;\n drawerWidth?: number;\n variant?: DrawerVariant;\n selectedItemId?: string;\n onStateChange?: (newState: DrawerState) => void;\n}>;\n\nexport const DrawerProvider = ({\n children,\n initialState: initialStateProp,\n variant = \"temporary\",\n drawerWidth: drawerWidthProp = drawerWidth,\n underAppBar = false,\n selectedItemId,\n onStateChange = () => null,\n}: DrawerProviderProps) => {\n const [state, setState] = useState<DrawerState>(initialStateProp || initialState[variant]);\n\n const handleChangeState = (newState: DrawerState) => {\n onStateChange(newState);\n setState(newState);\n };\n\n return (\n <DrawerContext.Provider\n value={{\n state,\n variant,\n selectedItemId,\n underAppBar,\n drawerWidth: drawerWidthProp,\n switchState: () => handleChangeState(targetStates[variant][state === \"open\" ? 0 : 1]),\n collapse: () => handleChangeState(\"collapse\"),\n close: () => handleChangeState(\"close\"),\n open: () => handleChangeState(\"open\"),\n setState,\n }}\n >\n {children}\n </DrawerContext.Provider>\n );\n};\n","import ListSubheader, { ListSubheaderProps } from \"@mui/material/ListSubheader\";\nimport { styled } from \"@mui/material/styles\";\nimport { DrawerSize } from \"../drawer\";\n\nexport interface DrawerSubheaderProps extends ListSubheaderProps {\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n}\n\nexport const DrawerSubheader = styled(ListSubheader, {\n shouldForwardProp: (prop) => prop !== \"size\",\n})<DrawerSubheaderProps>(({ size, theme }) => ({\n lineHeight: size === \"small\" ? theme.typography.pxToRem(40) : undefined,\n}));\n","import { FunctionComponent, ReactElement } from \"react\";\nimport { BulletVariant } from \"../bullet\";\nimport { LabelVariant } from \"../label\";\nimport { DrawerProps as MuiDrawerProps } from \"@mui/material/Drawer\";\nimport { Theme } from \"@mui/material/styles\";\nimport { DrawerAppBarProps } from \"../drawer-app-bar\";\n\nexport type DrawerVariant = \"temporary\" | \"mini\" | \"persistent\" | \"clipped\";\nexport type DrawerState = \"open\" | \"collapse\" | \"close\";\nexport type DrawerSize = \"small\" | \"medium\";\n\nexport interface DrawerItemAvatar {\n src: string;\n alt: string;\n}\n\nexport interface DrawerItemLabel {\n text: string;\n variant: LabelVariant;\n}\n\nexport interface DrawerItemBullet {\n variant: BulletVariant;\n}\n\nexport interface DrawerNavigationItemLink {\n id: string;\n text: string;\n href: string;\n icon?: ReactElement;\n avatar?: DrawerItemAvatar;\n label?: DrawerItemLabel;\n bullet?: DrawerItemBullet;\n}\n\nexport type DrawerNavigationItemCollapsable = Pick<\n DrawerNavigationItemLink,\n \"id\" | \"text\" | \"icon\"\n> & {\n items: DrawerNavigationItem[];\n};\n\nexport type DrawerNavigationItem = DrawerNavigationItemLink | DrawerNavigationItemCollapsable;\n\nexport interface DrawerNavigationSection {\n title?: string;\n items: DrawerNavigationItem[];\n}\n\nexport interface DrawerNavigation {\n items: DrawerNavigationSection[];\n}\n\nexport interface DrawerContentProps {\n /**\n * Object with the content that has to be rendered\n */\n nav: DrawerNavigation;\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n}\n\nexport type DrawerContentComponent = FunctionComponent<DrawerContentProps>;\nexport type DrawerContentElement = ReactElement<DrawerContentProps, DrawerContentComponent>;\n\nexport interface DrawerProps extends MuiDrawerProps {\n children: DrawerContentElement;\n}\n\nexport type DrawerComponent = FunctionComponent<DrawerProps>;\nexport type DrawerElement = ReactElement<DrawerProps, DrawerComponent>;\n\nexport const getDrawerItemColors = (theme: Theme, selected: boolean | undefined) => ({\n color: selected ? theme.palette.primary.main : undefined,\n fontWeight: selected ? theme.typography.fontWeightBold : theme.typography.fontWeightMedium,\n});\n\nexport type DrawerAppBarComponent = FunctionComponent<DrawerAppBarProps>;\nexport type DrawerAppBarElement = ReactElement<DrawerAppBarProps, DrawerAppBarComponent>;\n","import { ReactElement } from \"react\";\nimport Avatar from \"@mui/material/Avatar\";\nimport ListItemAvatar from \"@mui/material/ListItemAvatar\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Link from \"@mui/material/Link\";\nimport { SxProps, Theme, styled, useTheme } from \"@mui/material/styles\";\nimport { Bullet } from \"../bullet\";\nimport { Label } from \"../label\";\nimport {\n DrawerItemAvatar,\n DrawerItemBullet,\n DrawerItemLabel,\n DrawerSize,\n getDrawerItemColors,\n} from \"../drawer/drawer.types\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerItemLinkProps {\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n /**\n * Text displayed inside the item\n */\n text: string;\n /**\n * Url where the user is going to be redirected\n * if the item is clicked\n */\n href: string;\n /**\n * Icon displayed to the left\n */\n icon?: ReactElement;\n /**\n * Avatar displayed to the left\n */\n avatar?: DrawerItemAvatar;\n /**\n * Label with extra info displayed to the right\n */\n label?: DrawerItemLabel;\n /**\n * Bullet to attract the user attention displyed to the right\n */\n bullet?: DrawerItemBullet;\n /**\n * The item has to be marked as selected\n */\n selected?: boolean;\n /**\n * Deep level of this item inside the submenus\n */\n level: number;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst StyledLink = styled(Link)(({ theme }) => {\n return {\n color: theme.palette.text.primary,\n };\n});\n\nconst sxCollapsedIcon = {\n minWidth: 0,\n justifyContent: \"center\",\n marginRight: \"auto\",\n};\n\n/**\n * Clicable item inside a drawer\n */\nexport const DrawerItemLink = ({\n text,\n icon,\n avatar,\n label,\n bullet,\n href,\n selected,\n size = \"medium\",\n level,\n sx,\n}: DrawerItemLinkProps) => {\n const { state } = useDrawer();\n const theme = useTheme();\n const { color, fontWeight } = getDrawerItemColors(theme, selected);\n\n return (\n <ListItemButton\n LinkComponent={StyledLink}\n dense={size === \"small\"}\n aria-label={text}\n href={href}\n selected={selected}\n sx={{\n ...sx,\n pl: state === \"open\" ? theme.spacing(2 + 1.5 * level) : undefined,\n ...(state === \"collapse\" && {\n paddingHorizontal: theme.spacing(2.5),\n justifyContent: \"center\",\n }),\n }}\n >\n {icon && (\n <ListItemIcon sx={{ color, ...(state === \"collapse\" && level === 0 && sxCollapsedIcon) }}>\n {icon}\n </ListItemIcon>\n )}\n {avatar && (\n <ListItemAvatar\n sx={{\n ...(state === \"collapse\" && level === 0 && sxCollapsedIcon),\n }}\n >\n <Avatar\n alt={avatar.alt}\n src={avatar.src}\n sx={{\n ...(size === \"small\" && { width: 24, height: 24 }),\n ...(state === \"collapse\" && { width: 30, height: 30 }),\n }}\n />\n </ListItemAvatar>\n )}\n <ListItemText\n disableTypography\n primary={text}\n sx={{ color, fontWeight, opacity: state === \"collapse\" && level === 0 ? 0 : undefined }}\n />\n {label && state === \"open\" && (\n <Label text={label.text} variant={label.variant} sx={{ ml: 2 }} />\n )}\n {bullet && state === \"open\" && <Bullet variant={bullet.variant} sx={{ ml: 2 }} />}\n </ListItemButton>\n );\n};\n","import { DrawerMenuItem } from \"./drawer-menu-item\";\nimport { DrawerNavigationItem, DrawerSize } from \"../drawer/drawer.types\";\nimport { DrawerItemLink } from \"./drawer-item-link\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerItemProps {\n /**\n * Data to be rendered\n */\n item: DrawerNavigationItem;\n /**\n * Size of the item\n */\n size?: DrawerSize;\n /**\n * Deep level of this item inside the submenus\n */\n level?: number;\n}\n\nexport const DrawerItem = ({ item, size = \"medium\", level = 0 }: DrawerItemProps) => {\n const { selectedItemId } = useDrawer();\n if (\"items\" in item) {\n const { id, text, icon, items } = item;\n const childrenSelected = items.some((item) => item.id === selectedItemId);\n return (\n <DrawerMenuItem\n size={size}\n selected={id === selectedItemId || childrenSelected}\n text={text}\n icon={icon}\n items={items}\n level={level}\n />\n );\n } else {\n const { id, text, icon, avatar, label, bullet, href } = item;\n return (\n <DrawerItemLink\n selected={id === selectedItemId}\n size={size}\n text={text}\n icon={icon}\n avatar={avatar}\n label={label}\n bullet={bullet}\n href={href}\n level={level}\n />\n );\n }\n};\n","import ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Collapse from \"@mui/material/Collapse\";\nimport List from \"@mui/material/List\";\nimport Popover from \"@mui/material/Popover\";\nimport { SxProps, useTheme, Theme } from \"@mui/material/styles\";\nimport { ReactElement, useState, useRef } from \"react\";\nimport { DrawerNavigationItem, DrawerSize, getDrawerItemColors } from \"../drawer\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport ChevronRightIcon from \"@mui/icons-material/ChevronRight\";\nimport { DrawerItem } from \"./drawer-item\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerMenuItemProps {\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n /**\n * Text displayed inside the item\n */\n text: string;\n /**\n * Icon displayed to the left\n */\n icon?: ReactElement;\n /**\n * The item has to be marked as selected\n */\n selected?: boolean;\n /**\n * Items that are going to be displayed inside\n * the collapsable\n */\n items: DrawerNavigationItem[];\n /**\n * Deep level of this item inside the submenus\n */\n level: number;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\nexport const DrawerMenuItem = ({\n text,\n icon,\n selected,\n items,\n size = \"medium\",\n level,\n sx = {},\n}: DrawerMenuItemProps) => {\n const { state } = useDrawer();\n const anchorEl = useRef<HTMLDivElement | null>(null);\n const { palette, spacing } = useTheme();\n const [menuOpen, setMenuOpen] = useState(false);\n const { color, fontWeight } = getDrawerItemColors(useTheme(), selected);\n\n const submenu = (\n <List component=\"div\" disablePadding>\n {items.map((item) => (\n <DrawerItem key={item.id} level={level + 1} item={item} size={size} />\n ))}\n </List>\n );\n\n const collapsedButtonSx =\n state === \"collapse\" && level === 0\n ? {\n position: \"absolute\",\n right: 0,\n }\n : {};\n\n return (\n <>\n <ListItemButton\n ref={anchorEl}\n selected={selected}\n aria-label={text}\n onClick={() => setMenuOpen((o) => !o)}\n dense={size === \"small\"}\n sx={{\n ...sx,\n pl: state === \"open\" ? spacing(2 + 1.5 * level) : undefined,\n backgroundColor: menuOpen ? palette.action.hover : undefined,\n }}\n >\n {icon && <ListItemIcon sx={{ color }}>{icon}</ListItemIcon>}\n <ListItemText\n disableTypography\n primary={text}\n sx={{ color, fontWeight, opacity: state === \"collapse\" && level === 0 ? 0 : undefined }}\n />\n {menuOpen && state === \"open\" ? (\n <ExpandMoreIcon sx={[{ color, ml: 2 }, collapsedButtonSx]} />\n ) : (\n <ChevronRightIcon sx={[{ color, ml: 2 }, collapsedButtonSx]} />\n )}\n </ListItemButton>\n {state === \"open\" ? (\n <Collapse\n in={menuOpen}\n timeout=\"auto\"\n unmountOnExit\n aria-label={`${text} collapse submenu`}\n >\n {submenu}\n </Collapse>\n ) : (\n <Popover\n open={menuOpen}\n PaperProps={{\n elevation: 0,\n variant: \"outlined\",\n }}\n aria-label={`${text} popover submenu`}\n anchorEl={anchorEl.current}\n onClose={() => setMenuOpen(false)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"right\",\n }}\n >\n {submenu}\n </Popover>\n )}\n </>\n );\n};\n","import List from \"@mui/material/List\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { DrawerNavigationItem, DrawerSize } from \"../drawer\";\nimport { DrawerSubheader } from \"../drawer-subheader\";\nimport { DrawerItem } from \"../drawer-item\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerSectionProps {\n /**\n * Section title\n */\n title?: string;\n /**\n * List of items of that section\n */\n items: DrawerNavigationItem[];\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n}\n\n/**\n * Render a group of items inside the drawer\n * with an optional title\n */\nexport const DrawerSection = ({ title, items, size = \"medium\" }: DrawerSectionProps) => {\n const { state } = useDrawer();\n const { spacing } = useTheme();\n return (\n <>\n {title && state === \"open\" && (\n <DrawerSubheader size={size} role=\"heading\">\n {title}\n </DrawerSubheader>\n )}\n <List\n sx={{\n paddingTop: size === \"small\" ? spacing(0) : undefined,\n paddingY: state === \"collapse\" ? 0 : undefined,\n }}\n >\n {items.map((item) => (\n <DrawerItem key={item.id} item={item} size={size} />\n ))}\n </List>\n </>\n );\n};\n","import { DrawerSection } from \"../drawer-section\";\nimport { DrawerContentComponent, DrawerContentProps } from \"../drawer\";\n\n/**\n * Content to be shown inside a navigation\n */\nexport const DrawerContent: DrawerContentComponent = ({\n nav: { items },\n size = \"medium\",\n}: DrawerContentProps) => {\n return (\n <>\n {items.map(({ title, items }, i) => (\n <DrawerSection key={i} title={title} items={items} size={size} />\n ))}\n </>\n );\n};\n","import MuiAppBar from \"@mui/material/AppBar\";\nimport Toolbar from \"@mui/material/Toolbar\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme, Theme } from \"@mui/material/styles\";\nimport MenuIcon from \"@mui/icons-material/Menu\";\nimport { useDrawer } from \"../drawer-provider\";\nimport { AppBarProps as MuiAppBarProps } from \"@mui/material\";\nimport { DrawerState, DrawerVariant } from \"../drawer\";\n\nconst moveWithDrawer: Record<DrawerVariant, boolean> = {\n temporary: false,\n mini: true,\n persistent: true,\n clipped: true,\n};\n\nconst showMenuButton: Record<DrawerVariant, (state: DrawerState) => boolean> = {\n temporary: () => true,\n mini: (state) => state !== \"open\",\n persistent: () => true,\n clipped: () => false,\n};\n\nexport interface DrawerAppBarProps extends MuiAppBarProps {\n title?: string;\n}\n\nexport const DrawerAppBar = ({ title, sx, children, ...rest }: DrawerAppBarProps) => {\n const theme = useTheme();\n const { state, variant, switchState, drawerWidth, underAppBar } = useDrawer();\n\n const rootSx =\n (moveWithDrawer[variant] &&\n !underAppBar && {\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n ...(state === \"open\" && {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n }),\n }) ||\n {};\n\n return (\n <MuiAppBar\n position={underAppBar ? \"fixed\" : undefined}\n {...rest}\n sx={{\n ...sx,\n ...rootSx,\n zIndex: (theme: Theme) => theme.zIndex.drawer + (underAppBar ? 1 : 0),\n }}\n >\n <Toolbar>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={switchState}\n edge=\"start\"\n sx={{\n marginRight: 5,\n display: showMenuButton[variant](state) ? undefined : \"none\",\n }}\n >\n <MenuIcon />\n </IconButton>\n {title && (\n <Typography variant=\"h6\" component=\"h1\" role=\"heading\" aria-level={1} noWrap>\n {title}\n </Typography>\n )}\n {children}\n </Toolbar>\n </MuiAppBar>\n );\n};\n","import { styled, useTheme } from \"@mui/material/styles\";\nimport { PropsWithChildren } from \"react\";\nimport { DrawerHeader, useDrawer } from \"../drawer-provider\";\nimport { DrawerVariant } from \"../drawer\";\n\nconst drawerSpace: Record<DrawerVariant, boolean> = {\n temporary: false,\n mini: true,\n clipped: true,\n persistent: true,\n};\n\nconst StyledDiv = styled(\"div\")(({ theme }) => {\n const { spacing } = useTheme();\n const { drawerWidth, state, variant } = useDrawer();\n\n const marginLeft = drawerSpace[variant]\n ? state === \"open\"\n ? drawerWidth\n : state === \"collapse\"\n ? spacing(8)\n : 0\n : 0;\n\n return {\n marginLeft,\n transition: theme.transitions.create(\"margin\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n };\n});\n\nexport type DrawerMainProps = PropsWithChildren;\n\nexport const DrawerMain = ({ children }: DrawerMainProps) => (\n <StyledDiv>\n <DrawerHeader />\n {children}\n </StyledDiv>\n);\n","import CircularProgress from \"@mui/material/CircularProgress\";\nimport Box from \"@mui/material/Box\";\n\n/**\n * Displays a centered loading indicator\n */\nexport const LoadingArea = () => {\n return (\n <Box width={1} height={1} display=\"flex\" justifyContent=\"center\" alignItems=\"center\">\n <CircularProgress />\n </Box>\n );\n};\n","import Alert from \"@mui/material/Alert\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport Box from \"@mui/material/Box\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { PropsWithChildren } from \"react\";\nimport { LoadingArea } from \"../loading-area\";\n\nexport interface QueryContainerError {\n /**\n * The error title\n */\n name?: string;\n /**\n * The description of the error\n */\n message: string;\n}\n\nexport interface QueryContainerSuccess {\n /**\n * The success title\n */\n name?: string;\n /**\n * The success text\n */\n message: string;\n}\n\nexport type QueryContainerProps = PropsWithChildren<{\n /**\n * There is a query in progress and we have available data\n */\n fetching?: boolean | boolean[];\n\n /**\n * There is a query in progress and we don't have available data\n */\n loading?: boolean | boolean[];\n /**\n * The query has returned an error\n */\n error?: QueryContainerError;\n /**\n * The query has finished successfully\n */\n success?: QueryContainerSuccess;\n}>;\n\n/**\n * Component to show different indicators based on the usual api query statuses\n */\nexport function QueryContainer({\n fetching: fetchingProp = false,\n loading: loadingProp = false,\n error,\n success,\n children,\n}: QueryContainerProps) {\n const fetching = Array.isArray(fetchingProp) ? fetchingProp.some((f) => f) : fetchingProp;\n const loading = Array.isArray(loadingProp) ? loadingProp.some((f) => f) : loadingProp;\n\n if (loading) {\n return <LoadingArea />;\n }\n\n if (error) {\n return (\n <Alert severity=\"error\" role=\"alert\" aria-describedby=\"error\">\n {error.name && <AlertTitle role=\"heading\">{error.name}</AlertTitle>}\n {error.message}\n </Alert>\n );\n }\n\n return (\n <Box>\n {success && (\n <Alert severity=\"success\" role=\"alert\" aria-describedby=\"success\" sx={{ mb: 2 }}>\n {success.name && <AlertTitle role=\"heading\">{success.name}</AlertTitle>}\n {success.message}\n </Alert>\n )}\n {fetching && <LinearProgress sx={{ width: 1, mb: 1 }} />}\n {children}\n </Box>\n );\n}\n","import { ReactNode, useId } from \"react\";\nimport { styled } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport FormControl from \"@mui/material/FormControl\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport MuiSelect from \"@mui/material/Select\";\nimport { CenterContainer } from \"../center-container\";\nimport { SelectInputProps } from \"@mui/material/Select/SelectInput\";\n\nexport type SelectSize = \"small\" | \"medium\";\n\nexport interface SelectProps<T> {\n label: string;\n value: T;\n loading?: boolean;\n fetching?: boolean;\n size?: SelectSize;\n color?: string;\n fullWidth?: boolean;\n children?: ReactNode;\n onChange?: SelectInputProps<T>[\"onChange\"];\n}\n\nconst ProgressSize: Record<SelectSize, number> = {\n small: 15,\n medium: 20,\n};\n\nexport const Select = <T extends ReactNode>({\n label,\n value,\n loading = false,\n fetching = false,\n size = \"medium\",\n fullWidth = false,\n color,\n children,\n onChange,\n}: SelectProps<T>) => {\n const id = useId();\n\n const renderValue = (value: T): ReactNode => {\n if (fetching) {\n return (\n <CenterContainer centerVertical centerHorizontal>\n <CircularProgress color=\"inherit\" size={ProgressSize[size]} />\n </CenterContainer>\n );\n }\n\n if (loading) {\n return (\n <Box display=\"flex\" flexDirection=\"column\">\n {value}\n <LinearProgress\n color=\"inherit\"\n sx={{ position: \"absolute\", left: 0, right: 0, bottom: 0 }}\n />\n </Box>\n );\n }\n\n return value;\n };\n\n const StyledFormControl = styled(FormControl)(() => {\n if (!color) {\n return {};\n }\n\n return {\n label: {\n color,\n },\n \".MuiOutlinedInput-notchedOutline\": {\n borderColor: `${color} !important`,\n },\n \".MuiInputBase-root\": {\n color,\n },\n \".MuiSelect-icon\": {\n fill: color,\n },\n };\n });\n\n return (\n <StyledFormControl fullWidth={fullWidth}>\n <InputLabel id={id}>{label}</InputLabel>\n <MuiSelect\n labelId={id}\n id={id}\n value={value}\n label={label}\n onChange={onChange}\n disabled={fetching}\n size={size}\n renderValue={renderValue}\n >\n {children}\n </MuiSelect>\n </StyledFormControl>\n );\n};\n","import { FormEvent, useState } from \"react\";\nimport Stack from \"@mui/material/Stack\";\nimport Box from \"@mui/material/Box\";\nimport TextField from \"@mui/material/TextField\";\nimport Typography from \"@mui/material/Typography\";\nimport Alert from \"@mui/material/Alert\";\nimport LoadingButton from \"@mui/lab/LoadingButton\";\n\nexport interface SignInProps {\n title: string;\n subtitle: string;\n error?: Error;\n loading?: boolean;\n onSubmitSignIn: (email: string, password: string) => void;\n}\n\nexport const SignIn = ({ title, subtitle, loading, error, onSubmitSignIn }: SignInProps) => {\n const [emailError, setEmailError] = useState(\"\");\n const [passwordError, setPasswordError] = useState(\"\");\n\n function handleSubmit(e: FormEvent<HTMLFormElement>) {\n e.preventDefault();\n setEmailError(\"\");\n setPasswordError(\"\");\n\n const data = new FormData(e.currentTarget);\n const email = data.get(\"email\")?.toString();\n const password = data.get(\"password\")?.toString();\n\n if (!email) {\n setEmailError(\"Please fill out this field\");\n }\n\n if (!password) {\n setPasswordError(\"Please fill out this field\");\n }\n\n if (email && password) {\n onSubmitSignIn(email, password);\n }\n }\n\n return (\n <>\n <Box marginBottom={2}>\n <Typography component=\"h1\" variant=\"h4\">\n {title}\n </Typography>\n <Typography variant=\"body1\">{subtitle}</Typography>\n </Box>\n <Box component=\"form\" onSubmit={handleSubmit}>\n {error && (\n <Stack width=\"100%\" marginTop={1}>\n <Alert variant=\"filled\" severity=\"error\">\n {error.message}\n </Alert>\n </Stack>\n )}\n <TextField\n margin=\"normal\"\n fullWidth\n id=\"email\"\n label=\"Email Address\"\n name=\"email\"\n autoComplete=\"email\"\n autoFocus\n disabled={loading}\n type=\"email\"\n inputProps={{ role: \"input\" }}\n error={!!emailError}\n helperText={emailError}\n />\n <TextField\n margin=\"normal\"\n fullWidth\n role=\"input\"\n name=\"password\"\n label=\"Password\"\n type=\"password\"\n id=\"password\"\n disabled={loading}\n autoComplete=\"current-password\"\n inputProps={{ role: \"input\" }}\n error={!!passwordError}\n helperText={passwordError}\n />\n <LoadingButton\n type=\"submit\"\n fullWidth\n variant=\"contained\"\n loading={loading}\n disabled={loading}\n role=\"button\"\n sx={{ mt: 2 }}\n >\n Sign In\n </LoadingButton>\n </Box>\n </>\n );\n};\n","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import { TextFieldProps as MuiTextFieldProps } from \"@mui/material/TextField\";\nimport CircularProgress, { circularProgressClasses } from \"@mui/material/CircularProgress\";\nimport FormControl from \"@mui/material/FormControl\";\nimport FormHelperText from \"@mui/material/FormHelperText\";\nimport { iconButtonClasses } from \"@mui/material/IconButton\";\nimport LinearProgress, { linearProgressClasses } from \"@mui/material/LinearProgress\";\nimport OutlinedInput, { outlinedInputClasses } from \"@mui/material/OutlinedInput\";\nimport InputLabel, { inputLabelClasses } from \"@mui/material/InputLabel\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport { autocompleteClasses } from \"@mui/material/Autocomplete\";\nimport useId from \"@mui/utils/useId\";\n\nexport type TextFieldProps = MuiTextFieldProps & {\n fetching?: boolean;\n loading?: boolean;\n hexColor?: string;\n};\n\nexport const TextField = ({\n id: overrideId,\n label,\n InputLabelProps,\n InputProps,\n fetching,\n loading,\n helperText,\n hexColor,\n size,\n fullWidth,\n sx,\n ...rest\n}: TextFieldProps) => {\n const id = useId(overrideId);\n const helperTextId = helperText && id ? `${id}-helper-text` : undefined;\n const inputLabelId = label && id ? `${id}-label` : undefined;\n\n const hexColorSx = hexColor\n ? {\n [`& .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: `${hexColor} !important`,\n },\n [`& .${inputLabelClasses.root}`]: {\n color: hexColor,\n },\n [`& .${outlinedInputClasses.input}`]: {\n color: hexColor,\n },\n [`& .${circularProgressClasses.root}`]: {\n color: hexColor,\n },\n [`& .${linearProgressClasses.bar}`]: {\n backgroundColor: hexColor,\n },\n [`& .${autocompleteClasses.endAdornment} .${iconButtonClasses.root}`]: {\n color: hexColor,\n },\n }\n : {};\n\n return (\n <FormControl sx={hexColorSx} fullWidth={fullWidth}>\n <InputLabel\n size={size === \"small\" ? \"small\" : \"normal\"}\n id={inputLabelId}\n htmlFor={id}\n {...InputLabelProps}\n >\n {label}\n </InputLabel>\n <OutlinedInput\n {...InputProps}\n id={id}\n label={label}\n size={size}\n fullWidth={fullWidth}\n endAdornment={\n <InputAdornment position=\"end\">\n {InputProps?.endAdornment}\n {loading ? <CircularProgress color=\"inherit\" size={20} sx={{ ml: 1 }} /> : null}\n </InputAdornment>\n }\n sx={sx}\n {...(rest as any)}\n />\n {fetching && !loading && (\n <LinearProgress\n color=\"inherit\"\n sx={{ position: \"absolute\", left: 0, right: 0, bottom: 0 }}\n />\n )}\n {helperText && <FormHelperText id={helperTextId}>{helperText}</FormHelperText>}\n </FormControl>\n );\n};\n","import MuiAutocomplete, {\n AutocompleteProps as MuiAutocompleteProps,\n} from \"@mui/material/Autocomplete\";\nimport React from \"react\";\nimport { TextField } from \"../text-field\";\nimport { ChipTypeMap } from \"@mui/material/Chip\";\n\nexport interface AutocompleteProps<\n T,\n Multiple extends boolean | undefined,\n DisableClearable extends boolean | undefined,\n FreeSolo extends boolean | undefined,\n ChipComponent extends React.ElementType = ChipTypeMap[\"defaultComponent\"],\n> extends Omit<\n MuiAutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>,\n \"renderInput\" | \"onChange\" | \"color\"\n > {\n label: string;\n helperText?: string;\n color?: string;\n fetching?: boolean;\n onChangeValue?: (value: T) => void;\n}\n\nexport const Autocomplete = <\n T,\n Multiple extends boolean | undefined,\n DisableClearable extends boolean | undefined,\n FreeSolo extends boolean | undefined,\n ChipComponent extends React.ElementType = ChipTypeMap[\"defaultComponent\"],\n>(\n props: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>,\n) => {\n const {\n label,\n loading,\n fetching,\n options,\n helperText,\n color,\n onChangeValue = () => null,\n sx,\n ...rest\n } = props;\n const loadingOrFetching = loading || fetching;\n\n return (\n <MuiAutocomplete\n loading={loadingOrFetching}\n options={fetching ? [] : options}\n onChange={(_, value) => onChangeValue(value as T)}\n {...(rest as any)}\n renderInput={(params) => (\n <TextField\n {...params}\n label={label}\n fullWidth\n fetching={fetching}\n loading={loading}\n hexColor={color}\n helperText={helperText}\n />\n )}\n sx={sx}\n />\n );\n};\n","import Box, { BoxProps } from \"@mui/material/Box\";\nimport { styled } from \"@mui/material/styles\";\nimport { DateCalendar, PickersDay, PickersDayProps } from \"@mui/x-date-pickers\";\nimport { endOfWeek, format, isAfter, isBefore, isSameDay, startOfWeek } from \"date-fns\";\nimport { useState } from \"react\";\n\ntype DateRange = [Date, Date | undefined];\n\ninterface CustomPickerDayProps extends BoxProps {\n dayIsBetween: boolean;\n isFirstDay: boolean;\n isLastDay: boolean;\n}\n\nconst CustomPickersDayBackground = styled(Box, {\n shouldForwardProp: (prop) =>\n prop !== \"dayIsBetween\" &&\n prop !== \"isFirstDay\" &&\n prop !== \"isLastDay\" &&\n prop !== \"isStartOfWeek\" &&\n prop !== \"isEndOfWeek\",\n})<CustomPickerDayProps>(({ theme, dayIsBetween, isFirstDay, isLastDay }) => {\n return {\n ...((isFirstDay || isLastDay || dayIsBetween) && {\n borderRadius: 0,\n backgroundColor: `${theme.palette.primary.light}40`,\n margin: 0,\n }),\n ...(isFirstDay && {\n borderTopLeftRadius: \"50%\",\n borderBottomLeftRadius: \"50%\",\n }),\n ...(isLastDay && {\n borderTopRightRadius: \"50%\",\n borderBottomRightRadius: \"50%\",\n }),\n };\n}) as React.ComponentType<CustomPickerDayProps>;\n\nconst Day = (props: PickersDayProps<Date> & { dateRange?: DateRange | null }) => {\n const { day, dateRange, ...other } = props;\n\n if (dateRange == null) {\n return <PickersDay day={day} {...other} />;\n }\n\n const [start, end] = dateRange;\n\n const dayIsBetween = !!end && isAfter(day, start) && isBefore(day, end);\n const isFirstDay = isSameDay(day, start);\n const isLastDay = !!end && isSameDay(day, end);\n const isStartOfWeek = isSameDay(day, startOfWeek(day));\n const isEndOfWeek = isSameDay(day, endOfWeek(day));\n\n return (\n <CustomPickersDayBackground\n dayIsBetween={dayIsBetween}\n isFirstDay={isFirstDay || (dayIsBetween && isStartOfWeek)}\n isLastDay={isLastDay || (dayIsBetween && isEndOfWeek)}\n aria-label={format(day, \"yyyy-MM-dd\")}\n aria-selected={dayIsBetween || isFirstDay || isLastDay}\n role=\"gridcell\"\n >\n <PickersDay {...other} day={day} selected={isFirstDay || isLastDay} />\n </CustomPickersDayBackground>\n );\n};\n\nexport interface DateRangeCalendarProps {\n defaultValue: DateRange;\n onValueChange: (value: DateRange, updatedIndex: number) => void;\n}\nexport const DateRangeCalendar = ({ defaultValue, onValueChange }: DateRangeCalendarProps) => {\n const [value, setValue] = useState(defaultValue);\n const [index, setIndex] = useState(0);\n\n const setValueRange = (newRange: DateRange, index: number, newIndex: number) => {\n setValue(newRange);\n onValueChange(newRange, index);\n setIndex(newIndex);\n };\n\n const handleChange = (newValue: Date | null) => {\n if (!newValue) {\n return;\n }\n\n // If is the end date and is minor than the start date\n if (index === 1 && newValue < value[0]) {\n return setValueRange([newValue, undefined], 0, 1);\n }\n\n // If is the start date and is bigger than the end date\n if (index === 0 && value[1] && newValue > value[1]) {\n return setValueRange([newValue, undefined], 0, 1);\n }\n\n // Default case\n setValueRange(\n [index === 0 ? newValue : value[0], index === 1 ? newValue : value[1]],\n index,\n index === 0 ? 1 : 0,\n );\n };\n return (\n <DateCalendar\n value={null}\n onChange={handleChange}\n slots={{ day: Day }}\n slotProps={{\n day: {\n dateRange: value,\n } as any,\n }}\n aria-label=\"calendar range picker\"\n />\n );\n};\n","import { useState } from \"react\";\nimport { format } from \"date-fns\";\nimport Collapse from \"@mui/material/Collapse\";\nimport IconButton from \"@mui/material/IconButton\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport TextField from \"@mui/material/TextField\";\nimport Paper from \"@mui/material/Paper\";\nimport EventIcon from \"@mui/icons-material/Event\";\nimport { DateRangeCalendar } from \"../date-range-calendar\";\n\ntype DateRange = [Date, Date | undefined];\nexport interface DateRangePickerProps {\n label: string;\n defaultValue: DateRange;\n format: string;\n fullWidth?: boolean;\n size?: \"small\" | \"medium\";\n onValueChange: (value: DateRange, index: number) => void;\n}\n\nexport const DateRangePicker = ({\n defaultValue,\n format: fmt,\n label,\n fullWidth,\n onValueChange,\n size = \"medium\",\n}: DateRangePickerProps) => {\n const [isPopoverOpened, setIsPopoverOpened] = useState(false);\n const [value, setValue] = useState(defaultValue);\n\n const handleValueChange = (newValue: DateRange, index: number) => {\n setValue(newValue);\n onValueChange(newValue, index);\n setIsPopoverOpened(index < 1);\n };\n\n return (\n <>\n <TextField\n label={label}\n fullWidth={fullWidth}\n size={size}\n value={`${format(value[0], fmt)} - ${value[1] ? format(value[1], fmt) : fmt.toUpperCase()}`}\n InputProps={{\n endAdornment: (\n <InputAdornment position=\"end\">\n <IconButton onClick={() => setIsPopoverOpened((o) => !o)} aria-label=\"open calendar\">\n <EventIcon />\n </IconButton>\n </InputAdornment>\n ),\n }}\n />\n <Paper>\n <Collapse in={isPopoverOpened} aria-label=\"calendar collapse\">\n <DateRangeCalendar defaultValue={defaultValue} onValueChange={handleValueChange} />\n </Collapse>\n </Paper>\n </>\n );\n};\n","import Typography from \"@mui/material/Typography\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { Variant } from \"@mui/material/styles/createTypography\";\n\ntype ActionVariant = \"primary\" | \"error\" | \"warning\" | \"success\";\n\nexport interface ActionHeaderProps {\n variant?: ActionVariant;\n title: string;\n titleVariant?: Extract<Variant, \"h4\" | \"h5\" | \"h6\">;\n}\n\nexport const ActionHeader = ({\n title,\n titleVariant = \"h4\",\n variant = \"primary\",\n}: ActionHeaderProps) => {\n const { palette } = useTheme();\n\n const titleColor: Record<ActionVariant, string | undefined> = {\n primary: undefined,\n error: \"error\",\n warning: palette.warning.main,\n success: palette.success.main,\n };\n return (\n <Typography\n color={titleColor[variant]}\n variant={titleVariant}\n pb={1}\n borderBottom={1}\n borderColor=\"grey.300\"\n >\n {title}\n </Typography>\n );\n};\n","import Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport DialogContentText from \"@mui/material/DialogContentText\";\nimport { Variant } from \"@mui/material/styles/createTypography\";\nimport { ReactElement } from \"react\";\nimport { ActionHeader } from \"./action-header\";\nimport { ConfirmDialog } from \"../confirm-dialog\";\nimport { useDialog } from \"../dialog\";\n\nexport type ActionVariant = \"primary\" | \"error\" | \"warning\" | \"success\";\n\nexport interface ActionProps {\n variant: ActionVariant;\n title: string;\n titleVariant?: Extract<Variant, \"h4\" | \"h5\" | \"h6\">;\n description?: string | ReactElement;\n descriptionVariant?: Variant;\n helperText?: string;\n helperTextVariant?: Variant;\n buttonText: string;\n confirmable?: boolean;\n confirmTitle?: string;\n confirmDescription?: string;\n passphrase?: string;\n onAction: () => void;\n}\n\nexport const Action = ({\n variant = \"primary\",\n title,\n titleVariant = \"h4\",\n description,\n descriptionVariant = \"body2\",\n buttonText,\n helperText,\n helperTextVariant = \"caption\",\n confirmable,\n passphrase,\n confirmTitle = \"\",\n confirmDescription = \"\",\n onAction,\n}: ActionProps) => {\n const { isOpen, open, close } = useDialog();\n\n const handleClickActionButton = () => {\n if (confirmable) {\n open();\n } else {\n onAction();\n }\n };\n\n const handleConfirmDialog = () => {\n onAction();\n close();\n };\n\n return (\n <>\n <Grid container spacing={1}>\n <Grid item xs={12} mb={2}>\n <ActionHeader title={title} titleVariant={titleVariant} />\n </Grid>\n {description && (\n <Grid item xs={12}>\n <Typography variant={descriptionVariant}>{description}</Typography>\n </Grid>\n )}\n <Grid item xs={12} mt={1}>\n <Button color={variant} variant=\"contained\" onClick={handleClickActionButton}>\n {buttonText}\n </Button>\n </Grid>\n {helperText && (\n <Grid item xs={12}>\n <Typography variant={helperTextVariant}>{helperText}</Typography>\n </Grid>\n )}\n </Grid>\n <ConfirmDialog\n open={isOpen}\n title={confirmTitle}\n passphrase={passphrase}\n onCancel={close}\n onConfirm={handleConfirmDialog}\n >\n <DialogContentText>{confirmDescription}</DialogContentText>\n </ConfirmDialog>\n </>\n );\n};\n","import { createContext, Dispatch, SetStateAction } from \"react\";\n\nexport const TabCardContext = createContext<[number, Dispatch<SetStateAction<number>>]>([\n 0,\n () => null,\n]);\nexport const TabCardContextProvider = TabCardContext.Provider;\n","import { styled } from \"@mui/material/styles\";\nimport Paper from \"@mui/material/Paper\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Box from \"@mui/material/Box\";\nimport { PropsWithChildren, ReactElement, SyntheticEvent, useState } from \"react\";\nimport { TabCardContextProvider } from \"./tab-card.context\";\nimport { useGetDefaultThemeColor } from \"../utils\";\n\nexport interface TabData {\n text: string;\n icon?: ReactElement;\n}\n\ninterface StyledTabsProps {\n children?: React.ReactNode;\n value: number;\n onChange: (event: React.SyntheticEvent, newValue: number) => void;\n}\n\nconst StyledTabs = styled((props: StyledTabsProps) => (\n <Tabs {...props} TabIndicatorProps={{ children: <span className=\"MuiTabs-indicatorSpan\" /> }} />\n))(({ theme }) => ({\n minHeight: theme.spacing(5),\n \"& .MuiTabs-indicator\": {\n display: \"flex\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n },\n \"& .MuiTabs-indicatorSpan\": {\n maxWidth: 40,\n width: \"100%\",\n backgroundColor: theme.palette.primary.main,\n },\n}));\n\nconst StyledTab = styled(Tab)(({ theme }) => ({\n textTransform: \"none\",\n fontWeight: theme.typography.fontWeightRegular,\n marginRight: theme.spacing(1),\n color: theme.palette.text.secondary,\n paddingTop: 0,\n paddingBottom: 0,\n minHeight: theme.spacing(5),\n \"&.Mui-selected\": {\n color: theme.palette.text.secondary,\n fontWeight: theme.typography.fontWeightBold,\n },\n}));\n\nexport type TabCardProps = PropsWithChildren<{\n tabs: TabData[];\n initialTab?: number;\n onChangeTab?: (tab: TabData, index: number) => void;\n}>;\n\nexport const TabCard = ({\n children,\n tabs,\n initialTab = 0,\n onChangeTab = () => null,\n}: TabCardProps) => {\n const bgColor = useGetDefaultThemeColor();\n const [selectedTab, setSelectedTab] = useState(initialTab);\n\n const handleChangeTab = (_: SyntheticEvent<Element, Event>, index: number) => {\n setSelectedTab(index);\n onChangeTab(tabs[index], index);\n };\n\n return (\n <TabCardContextProvider value={[selectedTab, setSelectedTab]}>\n <Paper variant=\"outlined\">\n <Box bgcolor={bgColor}>\n <StyledTabs value={selectedTab} onChange={handleChangeTab}>\n {tabs.map(({ text, icon }) => (\n <StyledTab iconPosition=\"start\" disableRipple key={text} label={text} icon={icon} />\n ))}\n </StyledTabs>\n </Box>\n {children}\n </Paper>\n </TabCardContextProvider>\n );\n};\n","import { PropsWithChildren, useContext } from \"react\";\nimport { TabCardContext } from \"./tab-card.context\";\nimport { SxProps, Theme } from \"@mui/material\";\nimport Box from \"@mui/material/Box\";\n\nexport type TabCardPanelProps = PropsWithChildren<{\n index: number | number[];\n sx?: SxProps<Theme>;\n}>;\n\nexport const TabCardPanel = ({ index, children, sx }: TabCardPanelProps) => {\n const [value] = useContext(TabCardContext);\n let isTab = value === index;\n if (Array.isArray(index)) {\n isTab = index.includes(value);\n }\n\n return isTab ? <Box sx={sx}>{children}</Box> : null;\n};\n","import Box from \"@mui/material/Box\";\nimport { useTab } from \"../tab-provider\";\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: number | number[];\n}\n\nexport function TabPanel({ children, index }: TabPanelProps) {\n const [value] = useTab();\n let isTab = value === index;\n if (Array.isArray(index)) {\n isTab = index.includes(value);\n }\n\n return (\n <div\n role=\"tabpanel\"\n hidden={!isTab}\n id={`simple-tabpanel-${index}`}\n aria-labelledby={`simple-tab-${index}`}\n >\n {isTab && <Box sx={{ p: 3 }}>{children}</Box>}\n </div>\n );\n}\n","import { ReactElement } from \"react\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ntype IconColor =\n | \"inherit\"\n | \"action\"\n | \"disabled\"\n | \"primary\"\n | \"secondary\"\n | \"error\"\n | \"info\"\n | \"success\"\n | \"warning\";\n\nexport interface PlaceholderAction {\n id: string;\n text: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface PlaceholderIconArgs {\n size: number;\n color: IconColor;\n}\n\nexport type PlaceholderIcon = ({ size, color }: PlaceholderIconArgs) => ReactElement;\n\nexport interface PlaceholderProps {\n title: string;\n subtitle: string;\n iconSize?: number;\n icon?: PlaceholderIcon;\n actions?: PlaceholderAction[];\n}\n\nexport const Placeholder = ({\n title,\n subtitle,\n icon,\n iconSize = 200,\n actions,\n}: PlaceholderProps) => {\n return (\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n justifyContent=\"center\"\n alignItems=\"center\"\n textAlign=\"center\"\n >\n {icon && icon({ size: iconSize, color: \"primary\" })}\n <Typography variant=\"h4\" role=\"heading\" aria-level={1}>\n {title}\n </Typography>\n <Typography variant=\"subtitle1\" role=\"heading\" aria-level={2} sx={{ mt: 2 }}>\n {subtitle}\n </Typography>\n {actions && (\n <Box sx={{ pt: 2 }}>\n {actions.map(({ id, text, href, onClick }, index) => (\n <Button\n key={id}\n role=\"button\"\n variant=\"contained\"\n href={href}\n onClick={onClick}\n sx={{ mr: index < actions.length - 1 ? 2 : 0 }}\n >\n {text}\n </Button>\n ))}\n </Box>\n )}\n </Box>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport Skeleton from \"@mui/material/Skeleton\";\n\nexport interface SkeletonCardProps {\n width?: number | string;\n animation?: \"pulse\" | \"wave\" | false;\n}\n\nexport const SkeletonCard = ({ width = \"100%\", animation = false }: SkeletonCardProps) => {\n return (\n <Box width={width}>\n <Skeleton animation={animation} variant=\"rectangular\" height={118} />\n <Skeleton animation={animation} variant=\"rectangular\" height={16} sx={{ my: 1 }} />\n <Skeleton animation={animation} variant=\"rectangular\" width=\"80%\" height={16} />\n </Box>\n );\n};\n","import Grid from \"@mui/material/Grid\";\nimport { newArrayWithSize } from \"../utils\";\nimport { SkeletonCard } from \"../skeleton-card\";\n\nexport interface SkeletonGridProps {\n size?: number;\n}\n\nexport const SkeletonGrid = ({ size = 20 }: SkeletonGridProps) => {\n return (\n <Grid container spacing={2}>\n {newArrayWithSize(size, 0).map((_, i) => (\n <Grid item key={i} xs={4}>\n <SkeletonCard width={1} />\n </Grid>\n ))}\n </Grid>\n );\n};\n","import Container from \"@mui/material/Container\";\nimport { PropsWithChildren } from \"react\";\nimport { SkeletonGrid } from \"../skeleton-grid\";\n\nexport type ContentPlaceholderProps = PropsWithChildren<{\n size?: number;\n p?: number;\n}>;\n\nexport const ContentPlaceholder = ({ size = 20, children, p }: ContentPlaceholderProps) => {\n return (\n <Container component=\"main\" sx={{ p }} data-testid=\"content-placeholder-test\">\n {children}\n <SkeletonGrid size={size} />\n </Container>\n );\n};\n","import Typography from \"@mui/material/Typography\";\nimport { Variant } from \"@mui/material/styles/createTypography\";\nimport { loremIpsum } from \"lorem-ipsum\";\nimport { LoremUnit } from \"lorem-ipsum/types/src/constants/units\";\n\nexport interface LoremIpsumPlaceholderProps {\n count?: number;\n units?: LoremUnit;\n variant?: Variant;\n}\n\nexport const LoremIpsumPlaceholder = ({\n count = 3,\n units = \"paragraph\",\n variant = \"body1\",\n}: LoremIpsumPlaceholderProps) => {\n return (\n <Typography variant={variant}>\n {loremIpsum({\n count,\n units,\n })}\n </Typography>\n );\n};\n","const visuallyHidden = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n};\nexport default visuallyHidden;","import TableSortLabel from \"@mui/material/TableSortLabel\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Box from \"@mui/material/Box\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableHead from \"@mui/material/TableHead\";\nimport { visuallyHidden } from \"@mui/utils\";\n\nexport type Order = \"asc\" | \"desc\";\nexport interface HeadCell<T> {\n disablePadding: boolean;\n id: keyof T;\n label: string;\n numeric: boolean;\n sort: boolean;\n}\n\ninterface EnhancedTableHeadProps<T> {\n onRequestSort: (property: keyof T) => void;\n order: Order;\n orderBy: keyof T;\n headCells: HeadCell<T>[];\n}\n\nexport const EnhancedTableHead = <T,>({\n order,\n orderBy,\n headCells,\n onRequestSort,\n}: EnhancedTableHeadProps<T>) => {\n const createSortHandler = (property: keyof T) => () => {\n onRequestSort(property);\n };\n\n return (\n <TableHead>\n <TableRow>\n {headCells.map((headCell) => (\n <TableCell\n variant=\"head\"\n key={String(headCell.id)}\n padding={headCell.disablePadding ? \"none\" : \"normal\"}\n sortDirection={orderBy === headCell.id ? order : false}\n sx={{ fontWeight: \"bold\" }}\n >\n {headCell.sort ? (\n <TableSortLabel\n active={orderBy === headCell.id}\n direction={orderBy === headCell.id ? order : \"asc\"}\n onClick={createSortHandler(headCell.id)}\n >\n {headCell.label}\n {orderBy === headCell.id ? (\n <Box component=\"span\" sx={visuallyHidden}>\n {order === \"desc\" ? \"sorted descending\" : \"sorted ascending\"}\n </Box>\n ) : null}\n </TableSortLabel>\n ) : (\n headCell.label\n )}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n );\n};\n","import { ChangeEvent } from \"react\";\nimport { ReactNode, useState } from \"react\";\nimport Box from \"@mui/material/Box\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TextField from \"@mui/material/TextField\";\nimport TableBody from \"@mui/material/TableBody\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport Table from \"@mui/material/Table\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Search from \"@mui/icons-material/Search\";\nimport { EnhancedTableHead, HeadCell, Order } from \"./enhanced-table-head\";\n\nfunction getFilter<T>(columns: HeadCell<T>[], search: string) {\n return (d: T) => {\n return (\n !search ||\n columns.some((col) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let value = (d as any)[col.id];\n if (value?.toLowerCase) {\n value = value.toLowerCase();\n }\n return value?.toString().includes(search.toLowerCase());\n })\n );\n };\n}\n\nfunction getComparator<T>(order: Order, orderBy: keyof T): (a: T, b: T) => number {\n return order === \"desc\"\n ? (a, b) => descendingComparator(a, b, orderBy)\n : (a, b) => -descendingComparator(a, b, orderBy);\n}\nfunction descendingComparator<T>(a: T, b: T, orderBy: keyof T) {\n if (b[orderBy] < a[orderBy]) {\n return -1;\n }\n if (b[orderBy] > a[orderBy]) {\n return 1;\n }\n return 0;\n}\n\ninterface Props<T> {\n readonly data: T[];\n search?: boolean;\n defaultSort: keyof T;\n defaultOrder?: Order;\n loading?: boolean;\n columns: HeadCell<T>[];\n children: (data: T[]) => ReactNode;\n}\n\nexport const EnhancedTable = <T,>({\n children,\n data,\n search,\n columns,\n defaultSort,\n defaultOrder = \"asc\",\n loading = false,\n}: Props<T>) => {\n const [searchFilter, setSearchFilter] = useState<string>(\"\");\n const [order, setOrder] = useState<Order>(defaultOrder);\n const [orderBy, setOrderBy] = useState<keyof T>(defaultSort);\n\n const handleRequestSort = (property: keyof T) => {\n const isAsc = orderBy === property && order === \"asc\";\n setOrder(isAsc ? \"desc\" : \"asc\");\n setOrderBy(property);\n };\n\n const filteredData = data\n .slice()\n .filter(getFilter<T>(columns, searchFilter))\n .sort(getComparator(order, orderBy));\n\n return (\n <>\n <Box sx={{ paddingX: 1, paddingBottom: 2 }}>\n {search && (\n <Box paddingY={2}>\n <TextField\n fullWidth\n placeholder=\"Search\"\n InputProps={{\n role: \"search\",\n startAdornment: (\n <InputAdornment position=\"start\">\n <Search />\n </InputAdornment>\n ),\n }}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setSearchFilter(e.target.value)}\n />\n </Box>\n )}\n <TableContainer>\n <Table>\n <EnhancedTableHead\n order={order}\n orderBy={orderBy}\n headCells={columns}\n onRequestSort={handleRequestSort}\n />\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell colSpan={columns.length} sx={{ textAlign: \"center\" }}>\n <CircularProgress />\n </TableCell>\n </TableRow>\n ) : filteredData.length === 0 ? (\n <TableRow>\n <TableCell colSpan={columns.length} sx={{ textAlign: \"center\" }}>\n No data\n </TableCell>\n </TableRow>\n ) : (\n children(filteredData)\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </Box>\n </>\n );\n};\n\nEnhancedTable.defaultProps = {\n defaultOrder: \"asc\",\n};\n","import { ReactNode, useState } from \"react\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport TableCell from \"@mui/material/TableCell\";\nimport { EnhancedTableHead, HeadCell, Order } from \"../enhanced-table\";\n\nexport interface EnhancedRemoteTableProps<T> {\n data: T[];\n loading: boolean;\n defaultSort: keyof T;\n defaultOrder?: Order;\n columns: HeadCell<T>[];\n children: (data: T, index: number) => ReactNode;\n onRequestSort: (col: keyof T, orderBy: \"asc\" | \"desc\") => void;\n}\n\nexport const EnhancedRemoteTable = <T,>({\n children,\n data,\n loading,\n columns,\n defaultSort,\n defaultOrder,\n onRequestSort,\n}: EnhancedRemoteTableProps<T>) => {\n const [order, setOrder] = useState({\n orderBy: defaultSort,\n order: defaultOrder || \"asc\",\n });\n\n const handleRequestSort = (property: keyof T) => {\n setOrder(({ orderBy, order }) => {\n const newOrder = orderBy === property && order === \"asc\" ? \"desc\" : \"asc\";\n onRequestSort(property, newOrder);\n\n return {\n orderBy: property,\n order: newOrder,\n };\n });\n };\n\n return (\n <>\n <TableContainer>\n <Table>\n <EnhancedTableHead\n order={order.order}\n orderBy={order.orderBy}\n headCells={columns}\n onRequestSort={handleRequestSort}\n />\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell colSpan={columns.length} sx={{ textAlign: \"center\" }}>\n <CircularProgress />\n </TableCell>\n </TableRow>\n ) : (\n data.map((d, i) => children(d, i))\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </>\n );\n};\n","import { useState } from \"react\";\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport { SxProps, Theme, useTheme } from \"@mui/material/styles\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport EditIcon from \"@mui/icons-material/Edit\";\n\nexport interface ValueEditButtonsProps {\n onClickCancel: () => void;\n onClickSubmit: () => void;\n sx?: SxProps<Theme>;\n}\n\nexport const ValueEditButtons = ({ onClickCancel, onClickSubmit, sx }: ValueEditButtonsProps) => {\n return (\n <InputAdornment position=\"end\" sx={sx}>\n <Button\n variant=\"contained\"\n size=\"small\"\n color=\"error\"\n aria-label=\"cancel button\"\n startIcon={<ClearIcon sx={{ fontSize: 12 }} />}\n onClick={onClickCancel}\n sx={{ paddingRight: 0, minWidth: 0, marginRight: 1 }}\n />\n <Button\n variant=\"contained\"\n size=\"small\"\n color=\"primary\"\n aria-label=\"submit button\"\n startIcon={<CheckIcon sx={{ fontSize: 12 }} />}\n onClick={onClickSubmit}\n sx={{ paddingRight: 0, minWidth: 0 }}\n />\n </InputAdornment>\n );\n};\n\n/**\n * Hook to manage the editing behaviour\n */\nexport const useEditableValueDisplay = <T,>(\n initialValue: T | undefined,\n onEdit: (value?: T) => void,\n) => {\n const [isEditing, setIsEditing] = useState(false);\n const [editValue, setEditValue] = useState<T | undefined>(initialValue);\n\n const cancelEdit = () => {\n setIsEditing(false);\n setEditValue(initialValue);\n };\n const startEdit = () => {\n setIsEditing(true);\n };\n\n const submitEdit = () => {\n onEdit(editValue);\n cancelEdit();\n };\n\n return { isEditing, cancelEdit, editValue, setEditValue, startEdit, submitEdit };\n};\n\nexport interface ValueEditButtonProps {\n dense?: boolean;\n onClick: () => void;\n}\n\nexport const ValueEditButton = ({ dense, onClick }: ValueEditButtonProps) => {\n const { typography } = useTheme();\n return (\n <IconButton\n size=\"small\"\n onClick={onClick}\n sx={{ ml: dense ? 0.5 : 1 }}\n aria-label=\"edit button\"\n >\n <EditIcon sx={{ fontSize: typography.pxToRem(dense ? 18 : 24) }} />\n </IconButton>\n );\n};\n","export interface BaseValueProps<T> {\n /**\n * Name of the displayed value\n */\n label: string;\n\n /**\n * Value displayed\n */\n value?: T;\n\n /**\n * String rendered if value is undefined\n */\n placeholder?: string;\n\n /**\n * The value has to be displayed as compact or not.\n * False by default\n */\n dense?: boolean;\n}\n\nexport interface EditableValueProps<T> {\n /**\n * This field can be edited or not\n */\n editable?: boolean;\n\n /**\n * Callback executed when the value is edited\n */\n onEdit?: (value?: T) => void;\n}\n\nexport const DefaultPlaceholder = \"-\";\n","import { SxProps, Theme, useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Typography from \"@mui/material/Typography\";\n\nexport const getValueContentLabelId = (label: string): string =>\n `label-${label.replace(/ /g, \"-\")}`;\n\nexport interface ValueContentProps {\n /**\n * Name of the displayed value\n */\n label: string;\n\n /**\n * If true, the label will not be shown\n */\n hideLabel?: boolean;\n\n /**\n * If defined, a tooltip is going to be added arround the children;\n */\n tooltip?: string;\n\n /**\n * Timeout before the tooltip appears when the user hovers the value\n */\n tooltipEnterDelay?: number;\n\n /**\n * Component that's going to be renderd under the label\n */\n children: React.ReactElement<any, any>;\n\n /**\n * The value has to be displayed as compact or not.\n * False by default\n */\n dense?: boolean;\n\n /**\n * Custom styles for the root component\n */\n sx?: SxProps<Theme>;\n}\n\n/**\n * Displays a string value with a label\n */\nexport const ValueContent = ({\n label,\n hideLabel,\n tooltip,\n tooltipEnterDelay = 2000,\n children,\n dense,\n sx,\n}: ValueContentProps) => {\n const { typography } = useTheme();\n const id = getValueContentLabelId(label);\n\n return (\n <Box width={1} lineHeight={dense ? 0 : undefined} sx={sx}>\n {!hideLabel && (\n <Typography\n variant={dense ? \"caption\" : \"subtitle2\"}\n role=\"label\"\n id={id}\n lineHeight={dense ? typography.pxToRem(15) : undefined}\n >\n {label}\n </Typography>\n )}\n {tooltip ? (\n <Tooltip title={tooltip} placement=\"top\" enterDelay={tooltipEnterDelay}>\n {children}\n </Tooltip>\n ) : (\n children\n )}\n </Box>\n );\n};\n","import Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { useEffect, useRef } from \"react\";\nimport {\n BaseValueProps,\n DefaultPlaceholder,\n EditableValueProps,\n useEditableValueDisplay,\n ValueEditButton,\n ValueEditButtons,\n} from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\n\nexport type ValueTextProps = BaseValueProps<string | number> & EditableValueProps<string>;\n\n/**\n * Displays a string value with a label\n */\nexport const ValueText = ({\n label,\n value: valueProp,\n placeholder = DefaultPlaceholder,\n editable,\n dense,\n onEdit = () => null,\n}: ValueTextProps) => {\n const editInputRef = useRef<HTMLInputElement>(null);\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(valueProp?.toString(), onEdit);\n const id = getValueContentLabelId(label);\n const value = valueProp?.toString() || placeholder;\n\n const editKeyPressListener = (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n onEdit((e.target as any).value);\n }\n };\n\n useEffect(() => {\n editInputRef.current?.addEventListener(\"keypress\", editKeyPressListener);\n return () => editInputRef.current?.removeEventListener(\"keypress\", editKeyPressListener);\n }, [editInputRef.current]);\n\n return (\n <ValueContent hideLabel={isEditing} label={label} tooltip={value} dense={dense}>\n {isEditing ? (\n <TextField\n inputRef={editInputRef}\n value={editValue}\n label={label}\n size=\"small\"\n onChange={(e) => setEditValue(e.target.value)}\n InputProps={{\n endAdornment: (\n <ValueEditButtons onClickCancel={cancelEdit} onClickSubmit={submitEdit} />\n ),\n }}\n sx={{ marginY: !dense ? 1 : 0 }}\n />\n ) : (\n <Box display=\"flex\" aria-labelledby={id}>\n <Typography variant={dense ? \"body1\" : \"h5\"} noWrap>\n {value}\n </Typography>\n {editable && <ValueEditButton dense={dense} onClick={startEdit} />}\n </Box>\n )}\n </ValueContent>\n );\n};\n","import Paper from \"@mui/material/Paper\";\nimport { PropsWithChildren } from \"react\";\n\nexport type ValueCardProps = PropsWithChildren;\n\n/**\n * Container to show a labeled value\n */\nexport const ValueCard = ({ children }: ValueCardProps) => {\n return <Paper sx={{ p: 2 }}>{children}</Paper>;\n};\n","import { useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport Switch from \"@mui/material/Switch\";\nimport Typography from \"@mui/material/Typography\";\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport {\n BaseValueProps,\n DefaultPlaceholder,\n EditableValueProps,\n useEditableValueDisplay,\n ValueEditButton,\n ValueEditButtons,\n} from \"../value-base\";\nimport { ValueContent, getValueContentLabelId } from \"../value-content\";\n\nexport type ValueBooleanProps = BaseValueProps<boolean> & EditableValueProps<boolean>;\n\n/**\n * Displays a boolean value with a label\n */\nexport const ValueBoolean = ({\n label,\n value,\n placeholder = DefaultPlaceholder,\n editable,\n dense,\n onEdit = () => null,\n}: ValueBooleanProps) => {\n const id = getValueContentLabelId(label);\n const { typography } = useTheme();\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(value, onEdit);\n\n const iconSx = { fontSize: dense ? typography.h6.fontSize : typography.h5.fontSize };\n\n return (\n <ValueContent label={label} dense={dense}>\n {isEditing ? (\n <Box display=\"flex\" alignItems=\"center\">\n <Switch\n size={dense ? \"small\" : \"medium\"}\n checked={editValue}\n onChange={(e) => setEditValue(e.target.checked)}\n />\n <ValueEditButtons onClickCancel={cancelEdit} onClickSubmit={submitEdit} />\n </Box>\n ) : (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n aria-labelledby={id}\n role=\"checkbox\"\n aria-checked={value}\n >\n {value === undefined ? (\n <Typography variant=\"h5\">{placeholder}</Typography>\n ) : value ? (\n <CheckIcon color=\"success\" sx={iconSx} />\n ) : (\n <CloseIcon color=\"error\" sx={iconSx} />\n )}\n {editable && <ValueEditButton dense={dense} onClick={startEdit} />}\n </Box>\n )}\n </ValueContent>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport TextField from \"@mui/material/TextField\";\nimport Typography from \"@mui/material/Typography\";\nimport { format } from \"date-fns\";\nimport { BaseValueProps, DefaultPlaceholder, EditableValueProps } from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\nimport { useEditableValueDisplay, ValueEditButton, ValueEditButtons } from \"../value-base\";\nimport { DatePicker } from \"@mui/x-date-pickers/DatePicker\";\nimport { DateTimePicker } from \"@mui/x-date-pickers/DateTimePicker\";\nimport { TimePicker } from \"@mui/x-date-pickers/TimePicker\";\n\nexport type EditInputType = \"datetime\" | \"date\" | \"time\";\n\nexport interface ValueDatetimeProps extends BaseValueProps<Date>, EditableValueProps<Date> {\n /**\n * Datetime format\n */\n format: string;\n\n /**\n * Edit input type\n */\n editInputType?: EditInputType;\n}\n\n/**\n * Displays a formated datetime with a label\n */\nexport const ValueDatetime = ({\n label,\n value: valueProp,\n format: fmt,\n placeholder = DefaultPlaceholder,\n editable,\n editInputType = \"datetime\",\n dense,\n onEdit = () => null,\n}: ValueDatetimeProps) => {\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(valueProp, onEdit);\n const id = getValueContentLabelId(label);\n const value = (valueProp && format(valueProp, fmt)) || placeholder;\n\n const EditPickerComponent =\n editInputType === \"datetime\"\n ? DateTimePicker\n : editInputType === \"time\"\n ? TimePicker\n : DatePicker;\n\n return (\n <ValueContent\n label={label}\n hideLabel={isEditing}\n tooltip={value}\n dense={dense}\n sx={{ display: \"flex\", flexDirection: \"column\" }}\n >\n {isEditing ? (\n <EditPickerComponent\n value={editValue}\n format={fmt}\n label={label}\n onChange={(newValue) => setEditValue(newValue ? newValue : undefined)}\n slots={{\n textField: (params) => (\n <TextField\n {...params}\n size=\"small\"\n InputProps={{\n ...params.InputProps,\n endAdornment: (\n <>\n {params.InputProps?.endAdornment}\n <ValueEditButtons\n onClickCancel={cancelEdit}\n onClickSubmit={submitEdit}\n sx={{ ml: 2 }}\n />\n </>\n ),\n sx: { marginY: !dense ? 1 : 0.2 },\n }}\n />\n ),\n }}\n />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" aria-labelledby={id}>\n <Typography variant={dense ? \"body1\" : \"h5\"} noWrap>\n {value}\n </Typography>\n {editable && <ValueEditButton dense={dense} onClick={startEdit} />}\n </Box>\n )}\n </ValueContent>\n );\n};\n","import Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { ValueItemElement } from \"../value-item\";\n\nexport interface GroupValueCardProps {\n title: string;\n subtitle?: string;\n centered?: boolean;\n children: ValueItemElement | ValueItemElement[];\n dense?: boolean;\n}\n\nexport const GroupValueCard = ({\n title,\n subtitle,\n centered,\n children,\n dense,\n}: GroupValueCardProps) => {\n const { typography } = useTheme();\n const defaultColor = useGetDefaultThemeColor({ lightWeight: 200, darkWeight: 800 });\n\n return (\n <Paper\n sx={{\n paddingBottom: dense ? 0 : 1,\n }}\n >\n <Box\n bgcolor={defaultColor}\n px={dense ? 1 : 2}\n py={dense ? 0.5 : 1}\n lineHeight={dense ? 0 : undefined}\n >\n <Typography variant={dense ? \"body1\" : \"h6\"} role=\"heading\" aria-level={1}>\n {title}\n </Typography>\n {subtitle && (\n <Typography\n variant={dense ? \"caption\" : \"body2\"}\n role=\"heading\"\n aria-level={2}\n lineHeight={dense ? typography.pxToRem(15) : undefined}\n >\n {subtitle}\n </Typography>\n )}\n </Box>\n <Grid\n container\n padding={1}\n rowSpacing={dense ? 1 : 2}\n justifyContent={centered ? \"center\" : \"flex-start\"}\n >\n {children}\n </Grid>\n </Paper>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport Rating from \"@mui/material/Rating\";\nimport { useEditableValueDisplay, ValueEditButton, ValueEditButtons } from \"../value-base\";\nimport { BaseValueProps, EditableValueProps } from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\n\nexport type ValueRatingProps = BaseValueProps<number> & {\n maxRating?: number;\n} & EditableValueProps<number>;\n\n/**\n * Displays a number using stars\n */\nexport const ValueRating = ({\n label,\n value = 0,\n maxRating = 5,\n editable,\n dense,\n onEdit = () => null,\n}: ValueRatingProps) => {\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(value, onEdit);\n const id = getValueContentLabelId(label);\n\n return (\n <ValueContent label={label} tooltip={value.toString()} dense={dense}>\n <Box display=\"flex\" alignItems=\"center\" aria-labelledby={id}>\n <Rating\n readOnly={!isEditing}\n max={maxRating}\n size={dense ? \"small\" : \"medium\"}\n value={isEditing ? editValue : value}\n onChange={(e, newValue) => {\n if (Number.isNaN(newValue) && (e.currentTarget as any).value) {\n setEditValue(parseInt((e.currentTarget as any).value, 10));\n } else if (newValue) {\n setEditValue(newValue);\n }\n }}\n />\n {editable && !isEditing && <ValueEditButton dense={dense} onClick={startEdit} />}\n {isEditing && <ValueEditButtons onClickCancel={cancelEdit} onClickSubmit={submitEdit} />}\n </Box>\n </ValueContent>\n );\n};\n","import Grid, { GridProps } from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\nimport { ResponsiveStyleValue } from \"@mui/system\";\nimport { PropsWithChildren, FunctionComponent, ReactElement } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\n\nexport type ValueItemProps = PropsWithChildren<\n Omit<GridProps, \"item\" | \"container\"> & { bordered?: ResponsiveStyleValue<boolean> }\n>;\nexport type ValueItemComponent = FunctionComponent<ValueItemProps>;\nexport type ValueItemElement = ReactElement<ValueItemProps, ValueItemComponent>;\n\nexport const valueItemClasses = {\n root: \"RdsValueItem-root\",\n content: \"RdsValueItem-content\",\n};\n\nconst resolveBorderStyle = (bordered: ResponsiveStyleValue<boolean>, color: string) => {\n const borderStyle = `solid ${color} 1px`;\n const noBorder = \"none\";\n\n if (!bordered) {\n return undefined;\n }\n\n if (Array.isArray(bordered)) {\n return bordered.map((b) => (b ? borderStyle : noBorder));\n }\n\n if (typeof bordered === \"object\") {\n const style: Record<string, string | undefined> = {};\n Object.entries(bordered).forEach(([key, value]) => {\n style[key] = value ? borderStyle : noBorder;\n });\n return style;\n }\n\n return borderStyle;\n};\n\nexport const ValueItem: ValueItemComponent = ({\n children,\n bordered = true,\n ...rest\n}: ValueItemProps) => {\n const defaultColor = useGetDefaultThemeColor({ lightWeight: 200, darkWeight: 800 });\n const borderLeft = resolveBorderStyle(bordered, defaultColor);\n return (\n <Grid item className={valueItemClasses.root} {...rest}>\n <Box className={valueItemClasses.content} px={1} borderLeft={borderLeft}>\n {children}\n </Box>\n </Grid>\n );\n};\n","import { BaseValueProps, DefaultPlaceholder } from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\nimport { Label, LabelVariant } from \"../label\";\nimport Grid from \"@mui/material/Grid\";\n\nexport type ValueLabelProps = BaseValueProps<string | number | string[] | number[]> & {\n variant?: LabelVariant | LabelVariant[];\n color?: string | string[];\n};\n\n/**\n * Displays a label component value with a label\n */\nexport const ValueLabel = ({\n label,\n value: valueProp,\n placeholder = DefaultPlaceholder,\n color,\n variant,\n}: ValueLabelProps) => {\n const id = getValueContentLabelId(label);\n const value = Array.isArray(valueProp) ? (\n valueProp.map((value, i) => (\n <Label\n text={value.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[i] : variant}\n color={Array.isArray(color) ? color[i] : color}\n key={i}\n />\n ))\n ) : (\n <Label\n text={valueProp?.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[0] : variant}\n color={Array.isArray(color) ? color[0] : color}\n />\n );\n\n return (\n <ValueContent label={label}>\n <Grid container gap={1} aria-labelledby={id}>\n {value}\n </Grid>\n </ValueContent>\n );\n};\n","import { ReactNode } from \"react\";\nimport { DrawerProvider, DrawerProviderProps } from \"../drawer-provider\";\nimport { DrawerMain } from \"../drawer-main\";\nimport { DrawerAppBarElement, DrawerElement } from \"../drawer/drawer.types\";\n\nexport interface DrawerLayoutProps {\n drawerProviderProps?: DrawerProviderProps;\n children: [DrawerElement, DrawerAppBarElement, ReactNode];\n}\n\nexport const DrawerLayout = ({\n drawerProviderProps,\n children: childrenProps,\n}: DrawerLayoutProps) => {\n const [appBar, drawer, children] = childrenProps;\n\n return (\n <DrawerProvider {...drawerProviderProps}>\n {appBar}\n {drawer}\n <DrawerMain>{children}</DrawerMain>\n </DrawerProvider>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { LoadingArea } from \"../loading-area\";\nimport { TabProvider } from \"../tab-provider\";\nimport ReportProblemIcon from \"@mui/icons-material/ReportProblem\";\nimport { Placeholder, PlaceholderIcon } from \"../placeholder\";\nimport { HeaderElement } from \"../header\";\nimport { ContentElement } from \"../content\";\n\nexport interface HeaderLayoutError {\n icon?: PlaceholderIcon;\n title?: string;\n message: string;\n}\n\nexport interface HeaderLayoutProps {\n loading?: boolean;\n fetching?: boolean;\n error?: HeaderLayoutError;\n children: [HeaderElement, ContentElement];\n}\n\nconst DefaultErrorIcon = () => <ReportProblemIcon color=\"error\" sx={{ width: 200, height: 200 }} />;\n\nexport const HeaderLayout = ({ loading, children, fetching, error }: HeaderLayoutProps) => {\n const [headerElement, contentElement] = children;\n\n return (\n <TabProvider>\n <Box display=\"flex\" flexDirection=\"column\" height={1}>\n {headerElement}\n {fetching && (\n <Box width={1}>\n <LinearProgress />\n </Box>\n )}\n {loading && <LoadingArea />}\n {error && (\n <Box mt={4}>\n <Placeholder\n icon={error.icon || DefaultErrorIcon}\n title={error.title || \"There has been an error\"}\n subtitle={error.message}\n />\n </Box>\n )}\n {!loading && !error && contentElement}\n </Box>\n </TabProvider>\n );\n};\n","import { AlertColor } from \"@mui/material/Alert\";\nimport { createContext, useContext } from \"react\";\n\nexport const NotificationCenterProviderUndefinedError = new Error(\n \"NotificationCenterContext.Provider is required and was undefined\",\n);\n\nexport interface Notification {\n severity: AlertColor;\n title?: string;\n message: string;\n}\n\nexport interface NotificationCenterProps {\n show(notification: Notification): void;\n hide(): void;\n}\n\nexport const NotificationCenterContext = createContext<NotificationCenterProps | undefined>(\n undefined,\n);\n\nexport const useNotificationCenter = () => {\n const context = useContext(NotificationCenterContext);\n\n if (context === undefined) {\n throw NotificationCenterProviderUndefinedError;\n }\n\n return context;\n};\n","import { useState, PropsWithChildren } from \"react\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport Alert from \"@mui/material/Alert\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport { Notification, NotificationCenterContext } from \"./notification-center.context\";\n\nexport type NotificationCenterProviderProps = PropsWithChildren<{\n autoHideDuration?: number;\n}>;\n\nexport const NotificationCenterProvider = ({\n children,\n autoHideDuration = 6000,\n}: NotificationCenterProviderProps) => {\n const [notification, setNotification] = useState<Notification | undefined>(undefined);\n const [open, setOpen] = useState(false);\n const show = (notification: Notification) => {\n setNotification(notification);\n setOpen(true);\n };\n\n const hide = () => {\n setOpen(false);\n };\n\n return (\n <NotificationCenterContext.Provider\n value={{\n show,\n hide,\n }}\n >\n <Snackbar\n open={open}\n autoHideDuration={autoHideDuration}\n onClose={hide}\n anchorOrigin={{ vertical: \"top\", horizontal: \"right\" }}\n >\n <Alert\n onClose={hide}\n severity={notification?.severity}\n aria-label={notification?.severity}\n sx={{ width: \"100%\" }}\n >\n {notification?.title && <AlertTitle>{notification?.title}</AlertTitle>}\n {notification?.message}\n </Alert>\n </Snackbar>\n {children}\n </NotificationCenterContext.Provider>\n );\n};\n","import { useEffect, useRef } from \"react\";\nimport { useNotificationCenter, Notification } from \"./notification-center.context\";\n\nexport interface NotifyWhenValueChangesOptions<T> {\n from: T;\n to: T;\n}\n\nexport const useNotifyWhenValueChanges = <T>(\n notification: Notification,\n value: T | undefined,\n { from, to }: NotifyWhenValueChangesOptions<T>,\n) => {\n const prevRef = useRef<T>(undefined);\n const { show } = useNotificationCenter();\n\n useEffect(() => {\n if (prevRef.current === from && value === to) {\n show(notification);\n }\n prevRef.current = value;\n }, [value]);\n};\n","import Grid from \"@mui/material/Grid\";\nimport { newBreakpointsCounter } from \"../utils/breakpoints\";\nimport { ValueBoolean } from \"../value-boolean\";\nimport { ValueDatetime } from \"../value-datetime\";\nimport { ValueText } from \"../value-text\";\nimport { GroupValueCard } from \"../group-value-card\";\nimport { ValueItem } from \"../value-item\";\nimport {\n ArrayGroupField,\n ArrayInstanceType,\n BasicModelInstance,\n GroupField,\n GroupInstanceType,\n Model,\n ModelField,\n} from \"../generators/generators.model\";\nimport { GridColDef, DataGrid } from \"@mui/x-data-grid\";\n\ninterface SingleDetailValueFactoryOptions {\n dense?: boolean;\n}\n\nconst singleDetailValueFactory = <T extends BasicModelInstance>(\n field: ModelField,\n instance: T | GroupInstanceType,\n { dense }: SingleDetailValueFactoryOptions = {},\n) => {\n const { id, name, type } = field;\n const value = instance[id];\n if (type === \"boolean\") {\n return <ValueBoolean dense={dense} label={name} value={value as boolean} />;\n } else if (type === \"date\" || type === \"time\" || type === \"datetime\") {\n return <ValueDatetime dense={dense} label={name} value={value as Date} format={field.format} />;\n }\n\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return <ValueText dense={dense} label={name} value={JSON.stringify(value)} />;\n }\n return <ValueText dense={dense} label={name} value={value?.toString()} />;\n};\n\ninterface ObjectArrayGroupProps {\n field: ArrayGroupField;\n instance: ArrayInstanceType;\n dense?: boolean;\n}\n\nconst ObjectArrayGroup = ({\n field: { name, description, value },\n instance,\n dense,\n}: ObjectArrayGroupProps) => {\n const columns: GridColDef[] = [{ field: \"id\", headerName: \"ID\", width: 70 }];\n\n value.forEach((column) => {\n columns.push({\n field: column.id,\n headerName: column.name,\n });\n });\n\n const rows = instance.map((f, id) => ({\n id,\n ...f,\n }));\n\n return (\n <GroupValueCard title={name} subtitle={description} dense={dense}>\n <Grid item xs={12}>\n <DataGrid\n rows={rows}\n columns={columns}\n density={dense ? \"compact\" : \"standard\"}\n disableRowSelectionOnClick\n pageSizeOptions={[5]}\n initialState={{\n pagination: {\n paginationModel: {\n pageSize: 5,\n },\n },\n }}\n sx={{ height: 400 }}\n />\n </Grid>\n </GroupValueCard>\n );\n};\n\ninterface ObjectDetailGroupProps {\n field: GroupField;\n instance: GroupInstanceType;\n dense?: boolean;\n}\n\nconst ObjectDetailGroup = ({\n field: { name, description, value },\n instance,\n dense,\n}: ObjectDetailGroupProps) => {\n const breakpointsCounter = newBreakpointsCounter();\n\n return (\n <GroupValueCard title={name} subtitle={description} dense={dense}>\n {value.map((field) => {\n const { id, xs, sm, md, lg, xl } = field;\n const bordered = breakpointsCounter.increment(field);\n return (\n <ValueItem key={id} xs={xs} sm={sm} md={md} lg={lg} xl={xl} bordered={bordered}>\n {singleDetailValueFactory(field, instance, { dense })}\n </ValueItem>\n );\n })}\n </GroupValueCard>\n );\n};\n\nexport interface ObjectDetailsProps<T extends BasicModelInstance> {\n model: Model;\n dense?: boolean;\n instance: T;\n}\n\nexport const ObjectDetails = <T extends BasicModelInstance>({\n model,\n instance,\n dense,\n}: ObjectDetailsProps<T>) => {\n const breakpointsCounter = newBreakpointsCounter();\n return (\n <Grid container spacing={dense ? 1 : 2}>\n {model.fields.map((field) => {\n const { id, type, xs = 3, sm = 0, md = 0, lg = 0, xl = 0 } = field;\n\n if (type === \"group\") {\n breakpointsCounter.increment({ xs: 12 });\n return (\n <Grid item key={id} xs={12}>\n <ObjectDetailGroup\n field={field}\n instance={instance[id] as GroupInstanceType}\n dense={dense}\n />\n </Grid>\n );\n }\n\n if (type === \"group[]\") {\n breakpointsCounter.increment({ xs: 12 });\n return (\n <Grid item key={id} xs={12}>\n <ObjectArrayGroup field={field} instance={instance[id] as any} dense={dense} />\n </Grid>\n );\n }\n\n const bordered = breakpointsCounter.increment(field);\n return (\n <ValueItem key={id} xs={xs} sm={sm} md={md} lg={lg} xl={xl} bordered={bordered}>\n {singleDetailValueFactory(field, instance, { dense })}\n </ValueItem>\n );\n })}\n </Grid>\n );\n};\n","/**\n * MODEL TYPES\n * Types used to specify the model\n */\nexport type ModelFieldTypes =\n | \"string\"\n | \"number\"\n | \"string[]\"\n | \"number[]\"\n | \"boolean\"\n | \"enum\"\n | \"multienum\"\n | \"date\"\n | \"time\"\n | \"datetime\";\n\ntype Base = {\n id: string;\n description: string;\n name: string;\n listable?: boolean;\n updatable?: boolean;\n required?: boolean;\n};\n\ntype Breakpoints = {\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n};\n\ntype StringField = {\n type: \"string\";\n};\n\ntype StringArrayField = {\n type: \"string[]\";\n};\n\ntype NumberField = {\n type: \"number\";\n};\n\ntype NumberArrayField = {\n type: \"number[]\";\n};\n\ntype BooleanField = {\n type: \"boolean\";\n};\n\ntype EnumField = {\n type: \"enum\";\n value: string[];\n};\n\ntype MultiEnumField = {\n type: \"multienum\";\n value: string[];\n};\n\ntype DateField = {\n type: \"date\";\n format: string;\n default: Date;\n};\n\ntype TimeField = {\n type: \"time\";\n format: string;\n default: Date;\n};\n\ntype DatetimeField = {\n type: \"datetime\";\n format: string;\n default: Date;\n};\n\ntype SingleFields =\n | StringField\n | NumberField\n | StringArrayField\n | NumberArrayField\n | BooleanField\n | EnumField\n | MultiEnumField\n | DateField\n | TimeField\n | DatetimeField;\n\nexport type GroupField = {\n type: \"group\";\n value: (Base & Breakpoints & SingleFields)[];\n} & Base;\n\nexport type ArrayGroupField = {\n type: \"group[]\";\n value: (Base & Breakpoints & SingleFields)[];\n} & Base;\n\ntype Fields = SingleFields | GroupField | ArrayGroupField;\nexport type ModelField = Base & Breakpoints & Fields;\n\nexport type Model = {\n fields: ModelField[];\n};\n\n/**\n * INSTANCE TYPES\n * Types used to represent an instance of a model specification\n */\nexport type BaseFieldType = string | number | boolean | Date;\nexport type ArrayFieldType = string[] | number[];\nexport type SingleFieldType = BaseFieldType | ArrayFieldType;\nexport type GroupInstanceType = { [key: string]: SingleFieldType };\nexport type ArrayInstanceType = { [key: string]: SingleFieldType }[];\nexport type FieldType = SingleFieldType | GroupInstanceType;\n\nexport interface BasicModelInstance {\n id: string;\n [key: string]: FieldType;\n}\n\n/**\n * UTILITIES\n * Some functions used in several places to help to manage models\n */\nconst InitialStateZeroValue: Record<ModelFieldTypes | \"group\" | \"group[]\", FieldType | undefined> =\n {\n string: \"\",\n number: 0,\n boolean: false,\n enum: \"\",\n multienum: [],\n date: new Date(1970, 0, 1, 0, 0),\n time: new Date(1970, 0, 1, 0, 0),\n datetime: new Date(1970, 0, 1, 0, 0),\n group: {},\n \"group[]\": [],\n \"string[]\": [],\n \"number[]\": [],\n };\n\nconst getFieldValueOrZero = (\n field: ModelField,\n values: BasicModelInstance | GroupInstanceType | undefined,\n) => {\n return (\n (values && values[field.id]) ||\n (\"default\" in field && field.default) ||\n InitialStateZeroValue[field.type]\n );\n};\n\nexport const newInstanceFromValuesOrZeroValue = <T extends BasicModelInstance>(\n model: Model,\n values: T | undefined = undefined,\n): T => {\n const obj: Record<string, FieldType | undefined> = {};\n\n model.fields.forEach((field) => {\n if (field.type === \"group\") {\n const value: GroupInstanceType = {};\n field.value.forEach((groupField) => {\n value[groupField.id] = getFieldValueOrZero(\n groupField,\n values && (values[field.id] as GroupInstanceType),\n ) as SingleFieldType;\n });\n obj[field.id] = value;\n } else {\n obj[field.id] = getFieldValueOrZero(field, values);\n }\n });\n\n return obj as T;\n};\n","import Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport FormControl from \"@mui/material/FormControl\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport Select from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport TextField from \"@mui/material/TextField\";\nimport { SelectChangeEvent } from \"@mui/material/Select\";\nimport { DesktopDatePicker, TimePicker, DateTimePicker } from \"@mui/x-date-pickers\";\nimport { ChangeEvent, ReactElement } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { GroupValueCard } from \"../group-value-card\";\nimport {\n ArrayFieldType,\n FieldType,\n ModelField,\n ModelFieldTypes,\n} from \"../generators/generators.model\";\n\nexport interface ModelFormField {\n field: ModelField;\n update: boolean;\n dense?: boolean;\n path?: string[];\n value: any;\n onChangeValue: (path: string[], value: any) => void;\n}\n\nexport const ModelFormField = ({\n field,\n path = [],\n value,\n dense,\n update,\n onChangeValue,\n}: ModelFormField) => {\n const handleCheckboxChange = (e: ChangeEvent<HTMLInputElement>) => {\n e.preventDefault();\n onChangeValue([...path, e.target.name], e.target.checked);\n };\n\n const handleSelectChange = (e: SelectChangeEvent<FieldType>) => {\n e.preventDefault();\n onChangeValue([...path, e.target.name], e.target.value);\n };\n\n const handleMultiSelectChange = (e: SelectChangeEvent<FieldType>) => {\n e.preventDefault();\n const { value } = e.target;\n const newValue = typeof value === \"string\" ? value.split(\",\") : value;\n onChangeValue([...path, e.target.name], newValue);\n };\n\n const handleInputChange = (\n e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n type: ModelFieldTypes,\n ) => {\n e.preventDefault();\n\n let value: string | number | string[] | number[] = e.target.value;\n if (type === \"number\" && typeof value === \"string\") {\n value = parseInt(e.target.value, 10);\n } else if (type.includes(\"[]\")) {\n value = e.target.value.split(\",\");\n }\n onChangeValue([...path, e.target.name], value);\n };\n\n const handleDateChange = (value: FieldType | null, id: string) => {\n onChangeValue([...path, id], value);\n };\n\n const defaultColor = useGetDefaultThemeColor({ lightWeight: 200, darkWeight: 800 });\n\n const {\n id,\n type,\n name,\n description,\n updatable = true,\n required = true,\n xs,\n sm,\n md,\n lg,\n xl,\n } = field;\n const disabled: boolean = !updatable && update;\n\n let fieldInput: ReactElement;\n const size = dense ? \"small\" : \"medium\";\n if (type === \"group\") {\n fieldInput = (\n <GroupValueCard title={name} subtitle={description} dense={dense}>\n <Grid container spacing={2} sx={{ p: 2 }}>\n {field.value.map((f) => (\n <ModelFormField\n key={f.id}\n field={f}\n dense={dense}\n path={[...path, id]}\n value={value[f.id]}\n update={update}\n onChangeValue={onChangeValue}\n />\n ))}\n </Grid>\n </GroupValueCard>\n );\n } else if (type === \"boolean\") {\n fieldInput = (\n <Box sx={{ height: 1, display: \"flex\", alignItems: \"center\" }}>\n <FormControlLabel\n control={\n <Checkbox\n name={id}\n size={size}\n onChange={handleCheckboxChange}\n checked={value as boolean}\n disabled={disabled}\n />\n }\n label={name}\n />\n </Box>\n );\n } else if (type === \"enum\") {\n fieldInput = (\n <FormControl fullWidth>\n <InputLabel id={`${id}-select-label`}>{name}</InputLabel>\n <Select\n labelId={`${id}-select-label`}\n id={`${id}-select`}\n value={value}\n label={name}\n name={id}\n size={size}\n onChange={handleSelectChange}\n required={required}\n disabled={disabled}\n >\n {field.value.map((fieldValue) => (\n <MenuItem key={fieldValue} value={fieldValue}>\n {fieldValue}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n );\n } else if (type === \"multienum\") {\n fieldInput = (\n <FormControl fullWidth>\n <InputLabel id={`${id}-select-label`}>{name}</InputLabel>\n <Select\n labelId={`${id}-select-label`}\n id={`${id}-select`}\n value={value || []}\n renderValue={(selected) => (selected as ArrayFieldType).join(\", \")}\n label={name}\n name={id}\n size={size}\n onChange={handleMultiSelectChange}\n required={required}\n disabled={disabled}\n multiple\n >\n {field.value.map((fieldValue) => (\n <MenuItem key={fieldValue} value={fieldValue}>\n <Checkbox checked={((value as any[]) || []).includes(fieldValue)} />\n <ListItemText primary={fieldValue} />\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n );\n } else if (type === \"date\") {\n fieldInput = (\n <DesktopDatePicker\n label={name}\n format={field.format}\n value={value}\n slotProps={\n {\n field: {\n size,\n },\n } as any\n }\n disabled={disabled}\n onChange={(value) => handleDateChange(value, id)}\n />\n );\n } else if (type === \"time\") {\n fieldInput = (\n <TimePicker\n label={name}\n format={field.format}\n value={value}\n slotProps={\n {\n field: {\n size,\n },\n } as any\n }\n disabled={disabled}\n onChange={(value) => handleDateChange(value, id)}\n />\n );\n } else if (type === \"datetime\") {\n fieldInput = (\n <DateTimePicker\n label={name}\n format={field.format}\n value={value}\n slotProps={\n {\n field: {\n size,\n },\n } as any\n }\n disabled={disabled}\n onChange={(value) => handleDateChange(value, id)}\n />\n );\n } else if (type === \"group[]\") {\n return null;\n } else if (type.includes(\"[]\")) {\n fieldInput = (\n <TextField\n required={required}\n type=\"text\"\n label={name}\n name={id}\n size={size}\n variant=\"outlined\"\n helperText=\"Use comas to separate multiple values\"\n fullWidth\n disabled={disabled}\n value={(value as any[]).join(\",\")}\n onChange={(e) => handleInputChange(e, type)}\n />\n );\n } else {\n fieldInput = (\n <TextField\n required={required}\n type={type}\n label={name}\n size={size}\n name={id}\n variant=\"outlined\"\n fullWidth\n value={value}\n disabled={disabled}\n onChange={(e) => handleInputChange(e, type)}\n />\n );\n }\n\n return (\n <Grid item key={id} xs={xs} sm={sm} md={md} lg={lg} xl={xl}>\n {fieldInput}\n </Grid>\n );\n};\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\nvar isNil = /*#__PURE__*/_curry1(function isNil(x) {\n return x == null;\n});\nexport default isNil;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport isNil from \"./isNil.js\";\n\n/**\n * Makes a shallow clone of an object, setting or overriding the nodes required\n * to create the given path, and placing the specific value at the tail end of\n * that path. Note that this copies and flattens prototype properties onto the\n * new object as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> a -> {a} -> {a}\n * @param {Array} path the path to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except along the specified path.\n * @see R.dissocPath\n * @example\n *\n * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}\n *\n * // Any missing or non-object keys in path will be overridden\n * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}\n */\nvar assocPath = /*#__PURE__*/_curry3(function assocPath(path, val, obj) {\n if (path.length === 0) {\n return val;\n }\n var idx = path[0];\n if (path.length > 1) {\n var nextObj = !isNil(obj) && _has(idx, obj) && typeof obj[idx] === 'object' ? obj[idx] : _isInteger(path[1]) ? [] : {};\n val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);\n }\n return _assoc(idx, val, obj);\n});\nexport default assocPath;","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _isArray from \"./_isArray.js\";\nimport _isInteger from \"./_isInteger.js\";\n\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @private\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object|Array} obj The object to clone\n * @return {Object|Array} A new object equivalent to the original except for the changed property.\n */\nexport default function _assoc(prop, val, obj) {\n if (_isInteger(prop) && _isArray(obj)) {\n var arr = [].concat(obj);\n arr[prop] = val;\n return arr;\n }\n var result = {};\n for (var p in obj) {\n result[p] = obj[p];\n }\n result[prop] = val;\n return result;\n}","import Button from \"@mui/material/Button\";\nimport Grid from \"@mui/material/Grid\";\nimport { FormEvent, useMemo } from \"react\";\nimport { useState } from \"react\";\nimport {\n Model,\n BasicModelInstance,\n FieldType,\n newInstanceFromValuesOrZeroValue,\n} from \"../generators\";\nimport { ModelFormField } from \"./model-form-field\";\nimport { assocPath } from \"ramda\";\n\nexport interface ModelFormProps<T extends BasicModelInstance> {\n model: Model;\n dense?: boolean;\n initialValues?: T;\n saveButtonText: string;\n onSubmit: (values: T) => void;\n}\n\nexport const ModelForm = <T extends BasicModelInstance>({\n model,\n saveButtonText,\n dense,\n onSubmit,\n initialValues,\n}: ModelFormProps<T>) => {\n const valuesInitialState = useMemo(\n () => newInstanceFromValuesOrZeroValue<T>(model, initialValues),\n [model, initialValues],\n );\n const [values, setValues] = useState<T>(valuesInitialState);\n\n const setKeyValue = (path: string[], value: FieldType | null) => {\n setValues((v) => assocPath(path, value, v));\n };\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n onSubmit(values);\n };\n\n return (\n <Grid container component=\"form\" spacing={2} onSubmit={handleSubmit}>\n {model.fields.map((f) => (\n <ModelFormField\n key={f.id}\n dense={dense}\n field={f}\n value={values[f.id]}\n update={!!initialValues}\n onChangeValue={setKeyValue}\n />\n ))}\n <Grid item xs={12}>\n <Button type=\"submit\" variant=\"contained\" size={dense ? \"small\" : \"medium\"}>\n {saveButtonText}\n </Button>\n </Grid>\n </Grid>\n );\n};\n","import TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport IconButton from \"@mui/material/IconButton\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Menu from \"@mui/material/Menu\";\nimport { EnhancedTable, HeadCell, Order } from \"../enhanced-table\";\nimport MoreVertIcon from \"@mui/icons-material/MoreVert\";\nimport { BasicModelInstance } from \"../generators\";\nimport { useState } from \"react\";\n\nconst OptionsId = \"__options\";\n\nexport interface TableRowOption<T extends BasicModelInstance> {\n id: string;\n label: string;\n onClick: (item: T) => void;\n}\n\nexport interface TableListProps<T extends BasicModelInstance> {\n columns: HeadCell<T>[];\n data: T[];\n search?: boolean;\n defaultSort: string;\n defaultOrder?: Order;\n loading?: boolean;\n options?: TableRowOption<T>[];\n onClick?: (d: T) => void;\n}\n\n// TODO: Move this to teh generators section\nexport const TableList = <T extends BasicModelInstance>({\n columns: columnsProp,\n options,\n data,\n onClick,\n search,\n defaultSort,\n defaultOrder,\n loading,\n}: TableListProps<T>) => {\n const columns = [\n ...columnsProp,\n {\n id: OptionsId,\n label: \"\",\n disablePadding: false,\n numeric: false,\n sort: false,\n },\n ];\n const [anchorMenuEl, setAnchorMenuEl] = useState<null | { item: T; anchor: HTMLElement }>(null);\n\n return (\n <>\n <EnhancedTable<T>\n columns={columns}\n data={data}\n search={search}\n defaultSort={defaultSort}\n defaultOrder={defaultOrder}\n loading={loading}\n >\n {(filteredData) =>\n filteredData.map((row, i) => {\n return (\n <TableRow\n key={row.id}\n onClick={() => onClick && onClick(row)}\n role=\"row\"\n aria-rowindex={i}\n sx={{ cursor: onClick && \"pointer\" }}\n >\n {columns.map(({ id }, j) => (\n <TableCell\n role=\"cell\"\n scope=\"row\"\n key={id.toString()}\n aria-rowindex={i}\n aria-colindex={j}\n >\n {\n row[\n id\n ] as string /* TODO: This has to be reimplemented having a cell based on each model type */\n }\n </TableCell>\n ))}\n {options && (\n <TableCell>\n <IconButton\n data-testid={`options-${row.id}`}\n onClick={(event) => {\n event.stopPropagation();\n setAnchorMenuEl({\n item: row,\n anchor: event.currentTarget,\n });\n }}\n >\n <MoreVertIcon />\n </IconButton>\n </TableCell>\n )}\n </TableRow>\n );\n })\n }\n </EnhancedTable>\n {options && (\n <Menu\n anchorEl={anchorMenuEl?.anchor}\n open={!!anchorMenuEl}\n onClose={() => setAnchorMenuEl(null)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n >\n {options.map(({ id, label, onClick }) => (\n <MenuItem\n key={id}\n onClick={() => {\n if (anchorMenuEl) {\n onClick(anchorMenuEl?.item);\n }\n setAnchorMenuEl(null);\n }}\n >\n {label}\n </MenuItem>\n ))}\n </Menu>\n )}\n </>\n );\n};\n"],"names":["markdownDefaultOptions","overrides","h1","component","Typography","props","gutterBottom","variant","h2","h3","h4","paragraph","p","a","Link","li","Markdown","content","options","_jsx","ReactMarkdown","children","Board","markdown","markdownProps","contentProp","spacing","sx","themeSpacing","typography","useTheme","copyContent","Array","isArray","map","line","i","pb","join","Paper","position","pl","pr","py","backgroundColor","blueGrey","color","_jsxs","Box","display","flexDirection","width","top","right","IconButton","onClick","navigator","clipboard","writeText","Tooltip","title","ContentCopyIcon","fontSize","pxToRem","alertSx","alertClasses","message","ExpandableAlert","forwardRef","severity","iconMapping","metadata","metadataComponent","onClose","ref","expanded","setExpanded","useState","Alert","action","CloseIcon","e","ExpandLessIcon","ExpandMoreIcon","w","AlertTitle","Collapse","in","mt","Content","Container","flexGrow","CenterContainer","centerVertical","centerHorizontal","height","justifyContent","alignItems","newArrayWithSize","size","fillValue","fill","getRandomItem","items","index","Math","floor","random","length","item","useGetDefaultThemeColor","lightWeight","darkWeight","palette","mode","grey","newBreakpointsCounter","breakpoint","calculateBreakpointIncrement","breakpointsCounter","key","value","initialValue","xs","sm","md","lg","xl","increment","smInc","mdInc","lgInc","xlInc","this","getFormData","data","FormData","currentTarget","rawData","forEach","ListPanelContext","createContext","undefined","ListPanelContextProvider","Provider","useListPanel","useContext","ListPanel","defaultSelectedItem","colBreakpoint","listMode","onSelectedItemChange","path","filter","Boolean","bgColor","selectedItem","setSelectedItem","Grid","container","bgcolor","List","overflowY","id","text","tooltip","href","contentEl","_createElement","ListItemButton","dense","handleSelectItem","ListItemText","primary","primaryTypographyProps","enterDelay","placement","elevation","background","paper","bulletClasses","root","Bullet","Badge","className","role","labelClasses","Label","colorProp","textTransform","default","light","secondary","info","warning","error","success","textColor","getContrastText","contrastText","minWidth","caption","fontWeight","fontWeightBold","lineHeight","whiteSpace","borderRadius","px","cursor","TabContext","TabContextProvider","useTab","TabProvider","tabState","HeaderTitle","loading","CircularProgress","_Fragment","HeaderSubtitle","body1","Header","loadingTitle","subtitle","loadingSubtitle","preset","actionsVariant","breadcrumbs","actions","tabs","tabsMode","navigationButton","defaultColor","selectedTab","setSelectedTab","bgColorPresets","main","inherit","transparent","textColorPresets","modedSelectedTab","Button","LinkComponent","startIcon","icon","mb","Breadcrumbs","separator","marginTop","link","underline","disabled","mr","Tabs","onChange","_","label","tabProps","Tab","BootstrapDialog","open","componentProps","disableAccept","disableCancel","cancelable","callCloseWhenCancel","acceptable","acceptText","cancelText","onAccept","onCancel","acceptType","hasActions","Dialog","DialogTitle","ml","theme","DialogContent","dividers","DialogActions","type","LoadingButton","ConfirmDialog","confirmText","passphrase","onConfirm","inputPassphrase","setInputPassphrase","TextField","fullWidth","target","placeholder","FormDialog","submitText","onSubmit","preventDefault","useDialog","intialOpen","isOpen","setIsOpen","close","DrawerContext","UndefinedProvider","Error","useDrawer","context","openedMixin","transition","transitions","create","easing","sharp","duration","enteringScreen","overflowX","closedMixin","leavingScreen","breakpoints","up","DrawerHeader","styled","padding","mixins","toolbar","showCloseButton","temporary","mini","persistent","clipped","muiDrawerVariant","NoopSxGenerator","variantsSx","state","boxSizing","paperClasses","zIndex","drawer","Drawer","rest","switchState","underAppBar","drawerWidth","flexShrink","drawerClasses","MuiDrawer","ChevronLeftIcon","Divider","initialState","targetStates","DrawerProvider","initialStateProp","drawerWidthProp","selectedItemId","onStateChange","setState","handleChangeState","newState","collapse","DrawerSubheader","ListSubheader","shouldForwardProp","prop","getDrawerItemColors","selected","fontWeightMedium","StyledLink","sxCollapsedIcon","marginRight","DrawerItemLink","avatar","bullet","level","paddingHorizontal","ListItemIcon","ListItemAvatar","Avatar","alt","src","disableTypography","opacity","DrawerItem","childrenSelected","some","DrawerMenuItem","anchorEl","useRef","menuOpen","setMenuOpen","submenu","disablePadding","collapsedButtonSx","o","hover","ChevronRightIcon","timeout","unmountOnExit","Popover","PaperProps","current","anchorOrigin","vertical","horizontal","DrawerSection","paddingTop","paddingY","DrawerContent","nav","moveWithDrawer","showMenuButton","DrawerAppBar","rootSx","marginLeft","MuiAppBar","Toolbar","edge","MenuIcon","noWrap","drawerSpace","StyledDiv","DrawerMain","LoadingArea","QueryContainer","fetching","fetchingProp","loadingProp","f","name","LinearProgress","ProgressSize","small","medium","Select","useId","StyledFormControl","FormControl","borderColor","InputLabel","MuiSelect","labelId","renderValue","left","bottom","SignIn","onSubmitSignIn","emailError","setEmailError","passwordError","setPasswordError","marginBottom","email","get","toString","password","Stack","margin","autoComplete","autoFocus","inputProps","helperText","globalId","maybeReactUseId","React","idOverride","reactId","defaultId","setDefaultId","useEffect","useGlobalId","overrideId","InputLabelProps","InputProps","hexColor","helperTextId","inputLabelId","hexColorSx","outlinedInputClasses","notchedOutline","inputLabelClasses","input","circularProgressClasses","linearProgressClasses","bar","autocompleteClasses","endAdornment","iconButtonClasses","htmlFor","OutlinedInput","InputAdornment","FormHelperText","Autocomplete","onChangeValue","MuiAutocomplete","renderInput","params","CustomPickersDayBackground","dayIsBetween","isFirstDay","isLastDay","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","Day","day","dateRange","other","PickersDay","start","end","isAfter","isBefore","isSameDay","isStartOfWeek","startOfWeek","isEndOfWeek","endOfWeek","format","DateRangeCalendar","defaultValue","onValueChange","setValue","setIndex","setValueRange","newRange","newIndex","DateCalendar","newValue","slots","slotProps","DateRangePicker","fmt","isPopoverOpened","setIsPopoverOpened","toUpperCase","EventIcon","ActionHeader","titleVariant","titleColor","borderBottom","Action","description","descriptionVariant","buttonText","helperTextVariant","confirmable","confirmTitle","confirmDescription","onAction","DialogContentText","TabCardContext","TabCardContextProvider","StyledTabs","TabIndicatorProps","minHeight","maxWidth","StyledTab","fontWeightRegular","paddingBottom","TabCard","initialTab","onChangeTab","iconPosition","disableRipple","TabCardPanel","isTab","includes","TabPanel","hidden","Placeholder","iconSize","textAlign","pt","SkeletonCard","animation","Skeleton","my","SkeletonGrid","ContentPlaceholder","LoremIpsumPlaceholder","count","units","loremIpsum","visuallyHidden","border","clip","overflow","EnhancedTableHead","order","orderBy","headCells","onRequestSort","TableHead","TableRow","headCell","TableCell","sortDirection","sort","TableSortLabel","active","direction","property","String","descendingComparator","b","EnhancedTable","search","columns","defaultSort","defaultOrder","searchFilter","setSearchFilter","setOrder","setOrderBy","filteredData","slice","d","col","toLowerCase","getFilter","getComparator","paddingX","startAdornment","Search","TableContainer","Table","TableBody","colSpan","defaultProps","EnhancedRemoteTable","newOrder","ValueEditButtons","onClickCancel","onClickSubmit","ClearIcon","paddingRight","CheckIcon","useEditableValueDisplay","onEdit","isEditing","setIsEditing","editValue","setEditValue","cancelEdit","startEdit","submitEdit","ValueEditButton","EditIcon","DefaultPlaceholder","getValueContentLabelId","replace","ValueContent","hideLabel","tooltipEnterDelay","ValueText","valueProp","editable","editInputRef","editKeyPressListener","addEventListener","removeEventListener","inputRef","marginY","ValueCard","ValueBoolean","iconSx","h6","h5","Switch","checked","ValueDatetime","editInputType","DateTimePicker","TimePicker","DatePicker","textField","GroupValueCard","centered","rowSpacing","ValueRating","maxRating","Rating","readOnly","max","Number","isNaN","parseInt","valueItemClasses","ValueItem","bordered","borderLeft","borderStyle","noBorder","style","Object","entries","resolveBorderStyle","ValueLabel","gap","DrawerLayout","drawerProviderProps","childrenProps","appBar","DefaultErrorIcon","ReportProblemIcon","HeaderLayout","headerElement","contentElement","NotificationCenterProviderUndefinedError","NotificationCenterContext","useNotificationCenter","NotificationCenterProvider","autoHideDuration","notification","setNotification","setOpen","hide","show","Snackbar","useNotifyWhenValueChanges","from","to","prevRef","singleDetailValueFactory","field","instance","JSON","stringify","ObjectArrayGroup","headerName","column","push","rows","DataGrid","density","disableRowSelectionOnClick","pageSizeOptions","pagination","paginationModel","pageSize","ObjectDetailGroup","ObjectDetails","model","fields","InitialStateZeroValue","string","number","boolean","enum","multienum","date","Date","time","datetime","group","getFieldValueOrZero","values","newInstanceFromValuesOrZeroValue","obj","groupField","ModelFormField","update","handleCheckboxChange","handleSelectChange","handleMultiSelectChange","split","handleInputChange","handleDateChange","updatable","required","fieldInput","FormControlLabel","control","Checkbox","fieldValue","MenuItem","multiple","DesktopDatePicker","_isPlaceholder","_curry1","fn","f1","arguments","apply","_curry2","f2","_b","_a","_curry3","f3","c","_c","_isArray","val","prototype","call","_isInteger","isInteger","n","isNil","x","assocPath","idx","nextObj","hasOwnProperty","_has","arr","concat","result","_assoc","ModelForm","saveButtonText","initialValues","valuesInitialState","useMemo","setValues","setKeyValue","v","TableList","columnsProp","numeric","anchorMenuEl","setAnchorMenuEl","row","j","scope","event","stopPropagation","anchor","MoreVertIcon","Menu","transformOrigin"],"mappings":"olIASa,MAAAA,GAAgD,CAC3DC,UAAW,CACTC,GAAI,CACFC,UAAWC,EACXC,MAAO,CACLC,cAAc,EACdC,QAAS,OAGbC,GAAI,CAAEL,UAAWC,EAAYC,MAAO,CAAEC,cAAc,EAAMC,QAAS,OACnEE,GAAI,CACFN,UAAWC,EACXC,MAAO,CAAEC,cAAc,EAAMC,QAAS,cAExCG,GAAI,CACFP,UAAWC,EACXC,MAAO,CAAEC,cAAc,EAAMC,QAAS,UAAWI,WAAW,IAE9DC,EAAG,CAAET,UAAWC,EAAYC,MAAO,CAAEM,WAAW,IAChDE,EAAG,CAAEV,UAAWW,GAChBC,GAAI,CACFZ,UAAW,QAKJ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KACH4vB,GACF5vB,EAAQ4vB,GAActsB,MAExBusB,EAAgB,KAAK,EACtB/xB,SAEA0O,GARI5F,SAaZ","x_google_ignoreList":[38,54,77,78,79,80,81,82,83,84,85,86]}
1
+ {"version":3,"file":"index.js","sources":["../src/board/board.tsx","../src/expandable-alert/expandable-alert.tsx","../src/content/content.tsx","../src/center-container/center-container.tsx","../src/utils/arrays.ts","../src/utils/theme.ts","../src/utils/breakpoints.ts","../src/utils/forms.ts","../src/list-panel/list-panel.context.tsx","../src/list-panel/list-panel.tsx","../src/bullet/bullet.tsx","../src/label/label.tsx","../src/tab-provider/tab-provider.context.ts","../src/tab-provider/tab-provider.provider.tsx","../src/header/header-title.tsx","../src/header/header.tsx","../src/markdown/markdown.tsx","../src/bootstrap-dialog/bootstrap-dialog.tsx","../src/confirm-dialog/confirm-dialog.tsx","../src/form-dialog/form-dialog.tsx","../src/dialog/use-dialog.ts","../src/drawer-provider/drawer-context.ts","../src/drawer-provider/drawer-mixins.ts","../src/drawer/drawer.tsx","../src/drawer-provider/drawer.provider.tsx","../src/drawer-subheader/drawer-subheader.tsx","../src/drawer/drawer.types.ts","../src/drawer-item/drawer-item-link.tsx","../src/drawer-item/drawer-item.tsx","../src/drawer-item/drawer-menu-item.tsx","../src/drawer-section/drawer-section.tsx","../src/drawer-content/drawer-content.tsx","../src/drawer-app-bar/drawer-app-bar.tsx","../src/drawer-main/drawer-main.tsx","../src/loading-area/loading-area.tsx","../src/query-container/query-container.tsx","../src/select/select.tsx","../src/sign-in/sign-in.tsx","../node_modules/@mui/utils/esm/useId/useId.js","../src/text-field/text-field.tsx","../src/autocomplete/autocomplete.tsx","../src/date-range-calendar/date-range-calendar.tsx","../src/date-range-picker/date-range-picker.tsx","../src/action/action-header.tsx","../src/action/action.tsx","../src/tab-card/tab-card.context.tsx","../src/tab-card/tab-card.tsx","../src/tab-card/tab-card-panel.tsx","../src/tab-panel/tab-panel.tsx","../src/placeholder/placeholder.tsx","../src/skeleton-card/skeleton-card.tsx","../src/skeleton-grid/skeleton-grid.tsx","../src/content-placeholder/content-placeholder.tsx","../node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js","../src/enhanced-table/enhanced-table-head.tsx","../src/enhanced-table/enhanced-table.tsx","../src/enhanced-remote-table/enhanced-remote-table.tsx","../src/value-base/value-edit.tsx","../src/value-base/value-displays.types.ts","../src/value-content/value-content.tsx","../src/value-text/value-text.tsx","../src/value-card/value-card.tsx","../src/value-boolean/value-boolean.tsx","../src/value-datetime/value-datetime.tsx","../src/group-value-card/group-value-card.tsx","../src/value-rating/value-rating.tsx","../src/value-item/value-item.tsx","../src/value-label/value-label.tsx","../src/drawer-layout/drawer-layout.tsx","../src/header-layout/header-layout.tsx","../src/notification-center/notification-center.context.ts","../src/notification-center/notification-center.provider.tsx","../src/notification-center/notification-center.hooks.ts","../src/object-details/object-details.tsx","../src/generators/generators.model.ts","../src/model-form/model-form-field.tsx","../node_modules/ramda/es/internal/_isPlaceholder.js","../node_modules/ramda/es/internal/_curry1.js","../node_modules/ramda/es/internal/_curry2.js","../node_modules/ramda/es/internal/_curry3.js","../node_modules/ramda/es/internal/_isArray.js","../node_modules/ramda/es/internal/_isInteger.js","../node_modules/ramda/es/isNil.js","../node_modules/ramda/es/assocPath.js","../node_modules/ramda/es/internal/_has.js","../node_modules/ramda/es/internal/_assoc.js","../src/model-form/model-form.tsx","../src/table-list/table-list.tsx"],"sourcesContent":["import Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme, SxProps, Theme } from \"@mui/material/styles\";\nimport { blueGrey } from \"@mui/material/colors\";\nimport { PropsWithChildren, ReactNode } from \"react\";\nimport ContentCopyIcon from \"@mui/icons-material/ContentCopy\";\n\nexport type BoardProps = PropsWithChildren<{\n content: string | string[];\n spacing?: 0 | 1 | 2 | 3 | 4 | 5;\n sx?: SxProps<Theme>;\n}>;\n\nexport const Board = ({ content: contentProp, spacing = 0, children, sx }: BoardProps) => {\n const { spacing: themeSpacing, typography } = useTheme();\n let copyContent: string;\n let content: ReactNode;\n\n if (Array.isArray(contentProp)) {\n content = contentProp.map((line, i) => (\n <Typography key={i} sx={{ pb: spacing }}>\n {line}\n </Typography>\n ));\n copyContent = contentProp.join(\"\\n\");\n } else {\n content = <Typography>{contentProp}</Typography>;\n copyContent = contentProp || \"\";\n }\n\n return (\n <Paper\n sx={{\n position: \"relative\",\n pl: 2,\n pr: 4,\n py: 1,\n backgroundColor: blueGrey[800],\n color: \"white\",\n ...sx,\n }}\n >\n <Box display=\"flex\" flexDirection=\"row\">\n <Box width={1}>{children || content}</Box>\n <Box sx={{ position: \"absolute\", top: themeSpacing(0.5), right: themeSpacing(0.5) }}>\n {copyContent && (\n <IconButton\n aria-label=\"copy board content\"\n color=\"inherit\"\n onClick={() => navigator.clipboard.writeText(copyContent)}\n >\n <Tooltip title=\"Copy\">\n <ContentCopyIcon sx={{ fontSize: typography.pxToRem(18) }} />\n </Tooltip>\n </IconButton>\n )}\n </Box>\n </Box>\n </Paper>\n );\n};\n","import Alert, { alertClasses, AlertColor } from \"@mui/material/Alert\";\nimport Box from \"@mui/material/Box\";\nimport Collapse from \"@mui/material/Collapse\";\nimport IconButton from \"@mui/material/IconButton\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport { SxProps, Theme } from \"@mui/material/styles\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { forwardRef, ReactElement, useState } from \"react\";\nimport { Board } from \"../board\";\n\nexport interface ExpandableAlertProps {\n severity: AlertColor;\n iconMapping?: Partial<Record<AlertColor, React.ReactNode>>;\n title?: string;\n message: string;\n metadata?: string | string[];\n metadataComponent?: ReactElement;\n onClose: () => void;\n sx?: SxProps<Theme>;\n}\n\nconst alertSx = {\n [`& .${alertClasses.message}`]: {\n width: 1,\n },\n};\n\nexport const ExpandableAlert = forwardRef<any, ExpandableAlertProps>(\n (\n { severity, iconMapping, title, message, metadata, metadataComponent, onClose, sx = {} },\n ref,\n ) => {\n const [expanded, setExpanded] = useState(false);\n return (\n <Alert\n ref={ref}\n severity={severity}\n iconMapping={iconMapping}\n onClose={onClose}\n action={\n <Box display=\"flex\" flexDirection=\"column\">\n <IconButton color=\"inherit\" onClick={onClose}>\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n {metadata && (\n <IconButton color=\"inherit\" onClick={() => setExpanded((e) => !e)}>\n {expanded ? (\n <ExpandLessIcon fontSize=\"small\" />\n ) : (\n <ExpandMoreIcon fontSize=\"small\" />\n )}\n </IconButton>\n )}\n </Box>\n }\n sx={{ ...alertSx, ...sx }}\n >\n <Box sx={{ w: 1 }}>\n {title && <AlertTitle>{title}</AlertTitle>}\n {message}\n {metadata && (\n <Collapse in={expanded} sx={{ mt: 2 }}>\n <Board content={metadata}>{metadataComponent}</Board>\n </Collapse>\n )}\n </Box>\n </Alert>\n );\n },\n);\n","import Container from \"@mui/material/Container\";\nimport { ContentProps } from \"./content.types\";\n\nexport const Content = ({ children }: ContentProps) => {\n return (\n <Container component=\"main\" sx={{ py: 3, flexGrow: 1 }}>\n {children}\n </Container>\n );\n};\n","import { ReactNode } from \"react\";\nimport Box from \"@mui/material/Box\";\nimport { SxProps, Theme } from \"@mui/material/styles\";\n\nexport interface CenterContainerProps {\n children: ReactNode | undefined;\n centerVertical?: boolean;\n centerHorizontal?: boolean;\n sx?: SxProps<Theme>;\n}\n\nexport function CenterContainer({\n children,\n centerVertical = true,\n centerHorizontal = true,\n sx,\n}: CenterContainerProps) {\n return (\n <Box\n width={1}\n height={1}\n sx={{\n ...sx,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: centerVertical ? \"center\" : \"flex-start\",\n alignItems: centerHorizontal ? \"center\" : \"flex-start\",\n }}\n >\n {children}\n </Box>\n );\n}\n","export const newArrayWithSize = <T>(size: number, fillValue: T) => new Array(size).fill(fillValue);\n\nexport const getRandomItem = <T>(items: T[]): { index: number; item: T } => {\n const index = Math.floor(Math.random() * items.length);\n const item = items[index];\n return { index, item };\n};\n","import { Color, useTheme } from \"@mui/material\";\n\ntype KeyColor = keyof Color;\n\nexport const useGetDefaultThemeColor = ({\n lightWeight = 100,\n darkWeight = 900,\n}: { lightWeight?: KeyColor; darkWeight?: KeyColor } = {}) => {\n const { palette } = useTheme();\n return palette.mode === \"light\" ? palette.grey[lightWeight] : palette.grey[darkWeight];\n};\n","import { ResponsiveStyleValue } from \"@mui/system\";\n\ninterface Breakpoints {\n xs: number;\n sm: number;\n md: number;\n lg: number;\n xl: number;\n}\n\ninterface BreakpointsCounter extends Breakpoints {\n increment(breakpoints: Partial<Breakpoints>): ResponsiveStyleValue<boolean>;\n}\n\nexport const newBreakpointsCounter = (breakpoint = 12): BreakpointsCounter => {\n const calculateBreakpointIncrement = (\n breakpointsCounter: BreakpointsCounter,\n key: keyof Breakpoints,\n value: number,\n ): boolean => {\n const initialValue = breakpointsCounter[key];\n breakpointsCounter[key] += value;\n if (breakpointsCounter[key] > breakpoint) {\n breakpointsCounter[key] = value;\n return false;\n }\n\n if (breakpointsCounter[key] == breakpoint) {\n breakpointsCounter[key] = 0;\n }\n\n return initialValue > 0;\n };\n\n return {\n xs: 0,\n sm: 0,\n md: 0,\n lg: 0,\n xl: 0,\n increment: function ({\n xs = 0,\n sm = 0,\n md = 0,\n lg = 0,\n xl = 0,\n }): ResponsiveStyleValue<boolean> {\n const smInc = sm || xs;\n const mdInc = md || smInc;\n const lgInc = lg || mdInc;\n const xlInc = xl || lgInc;\n\n return {\n xs: calculateBreakpointIncrement(this, \"xs\", xs),\n sm: calculateBreakpointIncrement(this, \"sm\", smInc),\n md: calculateBreakpointIncrement(this, \"md\", mdInc),\n lg: calculateBreakpointIncrement(this, \"lg\", lgInc),\n xl: calculateBreakpointIncrement(this, \"xl\", xlInc),\n };\n },\n };\n};\n","import { FormEvent } from \"react\";\n\nexport const getFormData = <T>(e: FormEvent<HTMLFormElement>): T => {\n const data = new FormData(e.currentTarget);\n const rawData: Record<string, any> = {};\n\n data.forEach((value, key) => {\n rawData[key] = value;\n });\n return rawData as T;\n};\n","import { createContext, useContext } from \"react\";\n\nexport const ListPanelContext = createContext<string | undefined>(undefined);\nexport const ListPanelContextProvider = ListPanelContext.Provider;\nexport const useListPanel = () => useContext(ListPanelContext);\n","import Grid from \"@mui/material/Grid\";\nimport List from \"@mui/material/List\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Link, useTheme } from \"@mui/material\";\nimport { PropsWithChildren, useState } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { ListPanelContextProvider } from \"./list-panel.context\";\nimport { grey } from \"@mui/material/colors\";\n\nexport interface ListPanelItem {\n id: string;\n text: string;\n tooltip?: string;\n href?: string;\n path?: string;\n}\n\nexport type ListPanelProps = PropsWithChildren<{\n defaultSelectedItem?: string;\n items: ListPanelItem[];\n listMode?: \"panel\" | \"navigation\";\n colBreakpoint?: number;\n onSelectedItemChange?: (id: string) => void;\n}>;\n\nexport const ListPanel = ({\n items,\n defaultSelectedItem,\n colBreakpoint = 3,\n listMode = \"panel\",\n children,\n onSelectedItemChange = () => null,\n}: ListPanelProps) => {\n const paths = items.map((item) => item.path).filter(Boolean) as string[];\n\n const bgColor = useGetDefaultThemeColor();\n const { palette, typography } = useTheme();\n const [selectedItem, setSelectedItem] = useState(defaultSelectedItem);\n\n const handleSelectItem = (id: string) => {\n setSelectedItem(id);\n onSelectedItemChange(id);\n };\n\n return (\n <ListPanelContextProvider value={selectedItem}>\n <Grid container bgcolor={bgColor} height={1}>\n <Grid item xs={colBreakpoint} pl={1} height={1}>\n <List sx={{ height: 1, overflowY: \"auto\" }}>\n {items.map(({ id, text, tooltip, path, href }) => {\n const linkProps = listMode === \"navigation\" ? { component: Link, href } : {};\n\n const contentEl = (\n <ListItemButton\n {...linkProps}\n key={id}\n dense\n onClick={() => handleSelectItem(id)}\n aria-label={text}\n >\n <ListItemText\n primary={text}\n primaryTypographyProps={{\n color: grey[600],\n }}\n />\n </ListItemButton>\n );\n\n return tooltip ? (\n <Tooltip key={id} title={tooltip} enterDelay={1500} placement=\"right\">\n {contentEl}\n </Tooltip>\n ) : (\n contentEl\n );\n })}\n </List>\n </Grid>\n <Grid item xs={12 - colBreakpoint} pl={1} py={1} pr={1}>\n <Paper\n elevation={0}\n sx={{\n width: 1,\n height: 1,\n backgroundColor: palette.background.paper,\n }}\n >\n {children}\n </Paper>\n </Grid>\n </Grid>\n </ListPanelContextProvider>\n );\n};\n","import Badge from \"@mui/material/Badge\";\nimport { SxProps, Theme } from \"@mui/material/styles\";\n\nexport type BulletVariant = \"primary\" | \"secondary\" | \"default\" | \"info\" | \"warning\" | \"error\";\n\nexport const bulletClasses = {\n root: \"RdsBullet-root\",\n};\n\nexport interface BulletProps {\n /**\n * Color palette used to draw the component\n */\n variant?: BulletVariant;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\n/**\n * Dot to attract the user attention\n */\nexport const Bullet = ({ variant = \"primary\", sx }: BulletProps) => {\n return (\n <Badge\n color={variant}\n variant=\"dot\"\n className={bulletClasses.root}\n role=\"bullet\"\n aria-describedby={variant}\n sx={sx}\n />\n );\n};\n","import Box from \"@mui/material/Box\";\nimport { SxProps, Theme, useTheme } from \"@mui/material/styles\";\n\nexport type LabelVariant =\n | \"primary\"\n | \"secondary\"\n | \"default\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport const labelClasses = {\n root: \"RdsLabel-root\",\n};\n\nexport interface LabelProps {\n /**\n * Content of the component\n */\n text: string;\n /**\n * Color palette used to draw the component\n */\n variant?: LabelVariant;\n /**\n * Background color. Overrides variant\n */\n color?: string;\n\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n\n /**\n * Show the text as uppercase\n */\n textTransform?: \"none\" | \"capitalize\" | \"uppercase\";\n}\n\n/**\n * Compact element to represent a text\n */\nexport const Label = ({\n text,\n color: colorProp,\n variant = \"default\",\n textTransform = \"capitalize\",\n sx,\n}: LabelProps) => {\n const { palette, typography } = useTheme();\n\n const backgroundColor: Record<LabelVariant, string> = {\n default: palette.mode === \"light\" ? palette.grey[100] : palette.grey[900],\n primary: palette.primary.light,\n secondary: palette.secondary.light,\n info: palette.info.light,\n warning: palette.warning.light,\n error: palette.error.light,\n success: palette.success.light,\n };\n\n const textColor: Record<LabelVariant, string> = {\n default: palette.getContrastText(backgroundColor.default),\n primary: palette.primary.contrastText,\n secondary: palette.secondary.contrastText,\n info: palette.info.contrastText,\n warning: palette.warning.contrastText,\n error: palette.error.contrastText,\n success: palette.success.contrastText,\n };\n\n const bgcolor = colorProp ? colorProp : backgroundColor[variant];\n const color = colorProp ? palette.getContrastText(colorProp) : textColor[variant];\n\n return (\n <Box\n height={24}\n minWidth={22}\n display=\"inline-flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n bgcolor={bgcolor}\n color={color}\n fontSize={typography.caption.fontSize}\n fontWeight={typography.fontWeightBold}\n lineHeight={0}\n textTransform={textTransform}\n whiteSpace=\"nowrap\"\n borderRadius={2}\n role=\"label\"\n aria-label={`${text} ${variant} label`}\n py={0}\n px={1}\n sx={{ cursor: \"default\", ...sx }}\n >\n {text}\n </Box>\n );\n};\n","import { createContext, Dispatch, SetStateAction, useContext } from \"react\";\n\nexport const TabContext = createContext<[number, Dispatch<SetStateAction<number>>]>([\n 0,\n () => null,\n]);\nexport const TabContextProvider = TabContext.Provider;\nexport const useTab = () => useContext(TabContext);\n","import { PropsWithChildren, useState } from \"react\";\nimport { TabContextProvider } from \"./tab-provider.context\";\n\ntype TabProviderProps = PropsWithChildren<{\n initialValue?: number;\n}>;\n\nexport const TabProvider = ({ children, initialValue = 0 }: TabProviderProps) => {\n const tabState = useState(initialValue);\n\n return <TabContextProvider value={tabState}>{children}</TabContextProvider>;\n};\n","import CircularProgress from \"@mui/material/CircularProgress\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { PropsWithChildren } from \"react\";\n\nexport type HeaderTitleProps = PropsWithChildren<{ loading?: boolean }>;\n\nexport const HeaderTitle = ({ loading, children }: HeaderTitleProps) => {\n const { typography } = useTheme();\n\n if (loading) {\n return (\n <CircularProgress color=\"inherit\" size={typography.h4.fontSize} aria-label=\"title loading\" />\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <Typography variant=\"h4\" role=\"heading\" aria-level={1}>\n {children}\n </Typography>\n );\n }\n\n return <>{children}</>;\n};\n\nexport type HeaderSubtitleProps = PropsWithChildren<{ loading?: boolean }>;\n\nexport const HeaderSubtitle = ({ loading, children }: HeaderSubtitleProps) => {\n const { typography } = useTheme();\n\n if (loading) {\n return (\n <CircularProgress\n color=\"inherit\"\n size={typography.body1.fontSize}\n aria-label=\"subtitle loading\"\n />\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <Typography variant=\"body1\" role=\"heading\" aria-level={2}>\n {children}\n </Typography>\n );\n }\n\n return <>{children}</>;\n};\n","import { useTheme } from \"@mui/material/styles\";\nimport Breadcrumbs from \"@mui/material/Breadcrumbs\";\nimport Container from \"@mui/material/Container\";\nimport Box from \"@mui/material/Box\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Button from \"@mui/material/Button\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { HeaderComponent, HeaderPreset, HeaderProps } from \"./header.types\";\nimport { useTab } from \"../tab-provider\";\nimport { HeaderSubtitle, HeaderTitle } from \"./header-title\";\nimport Link from \"@mui/material/Link\";\n\n/**\n * Section used to explain give basic information about the page\n * and put the main actions\n */\nexport const Header: HeaderComponent = ({\n title = \"\",\n loadingTitle,\n subtitle,\n loadingSubtitle,\n preset = \"default\",\n actionsVariant = \"outlined\",\n breadcrumbs,\n actions,\n tabs,\n tabsMode = \"panel\",\n navigationButton,\n}: HeaderProps) => {\n const { palette } = useTheme();\n const defaultColor = useGetDefaultThemeColor();\n const [selectedTab, setSelectedTab] = useTab();\n\n const bgColorPresets: Record<HeaderPreset, string> = {\n default: defaultColor,\n primary: palette.primary.main,\n secondary: palette.secondary.main,\n inherit: \"inherit\",\n transparent: \"transparent\",\n };\n const bgColor = bgColorPresets[preset];\n const textColorPresets: Record<HeaderPreset, string> = {\n default: palette.getContrastText(bgColorPresets.default),\n primary: palette.primary.contrastText,\n secondary: palette.secondary.contrastText,\n inherit: \"inherit\",\n transparent: palette.text.primary,\n };\n const textColor = textColorPresets[preset];\n\n const modedSelectedTab = selectedTab;\n\n return (\n <Box bgcolor={bgColor} color={textColor}>\n <Container>\n <Box sx={{ py: 3, display: \"flex\", flexDirection: \"row\", justifyContent: \"space-between\" }}>\n <Box>\n {navigationButton && (\n <Button\n href={navigationButton.href}\n size=\"small\"\n color=\"inherit\"\n LinkComponent={Link}\n startIcon={navigationButton.icon}\n sx={{ mb: 1 }}\n >\n {navigationButton.text}\n </Button>\n )}\n {breadcrumbs?.length && (\n <Breadcrumbs\n color=\"inherit\"\n separator=\"›\"\n aria-label=\"breadcrumb\"\n sx={{ marginTop: 1 }}\n >\n {breadcrumbs.map(({ id, link, text }) => (\n <Link\n key={id}\n underline=\"hover\"\n color=\"inherit\"\n href={link}\n variant=\"body2\"\n role=\"link\"\n >\n {text}\n </Link>\n ))}\n </Breadcrumbs>\n )}\n <HeaderTitle loading={loadingTitle}>{title}</HeaderTitle>\n {(subtitle || loadingSubtitle) && (\n <HeaderSubtitle loading={loadingSubtitle}>{subtitle}</HeaderSubtitle>\n )}\n </Box>\n {actions && (\n <Box>\n {actions.map(({ disabled, id, href, onClick, text }, i) => (\n <Button\n component={href ? Link : \"button\"}\n role=\"button\"\n color=\"inherit\"\n disabled={disabled}\n key={id}\n variant={actionsVariant}\n size=\"small\"\n href={href}\n onClick={onClick}\n sx={{ mr: i != actions.length - 1 ? 1 : 0 }}\n >\n {text}\n </Button>\n ))}\n </Box>\n )}\n </Box>\n {tabs && (\n <Tabs\n value={modedSelectedTab}\n textColor=\"inherit\"\n onChange={tabsMode === \"panel\" ? (_, index) => setSelectedTab(index) : undefined}\n >\n {tabs.map(({ id, label, disabled, path, href }) => {\n const tabProps = { label, disabled };\n if (tabsMode === \"panel\") {\n return <Tab key={id} {...tabProps} />;\n } else {\n return <Tab key={id} {...tabProps} component={Link} href={href} value={path} />;\n }\n })}\n </Tabs>\n )}\n </Container>\n </Box>\n );\n};\n","import Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\n\nexport const markdownMuiOptions = {\n overrides: {\n h1: {\n component: Typography,\n props: {\n gutterBottom: true,\n variant: \"h5\",\n },\n },\n h2: { component: Typography, props: { gutterBottom: true, variant: \"h6\" } },\n h3: {\n component: Typography,\n props: { gutterBottom: true, variant: \"subtitle1\" },\n },\n h4: {\n component: Typography,\n props: { gutterBottom: true, variant: \"caption\", paragraph: true },\n },\n p: { component: Typography, props: { paragraph: true } },\n a: { component: Link },\n li: {\n component: \"li\",\n },\n },\n};\n","import Dialog from \"@mui/material/Dialog\";\nimport DialogTitle from \"@mui/material/DialogTitle\";\nimport DialogActions from \"@mui/material/DialogActions\";\nimport IconButton from \"@mui/material/IconButton\";\nimport DialogContent from \"@mui/material/DialogContent\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { BootstrapDialogDialogProps } from \"../dialog/dialog.types\";\n\nexport const BootstrapDialog = ({\n open,\n title,\n component,\n componentProps = {},\n disabled,\n disableAccept,\n disableCancel,\n actions = [],\n children,\n loading,\n cancelable,\n callCloseWhenCancel = true,\n acceptable,\n acceptText = \"Accept\",\n cancelText = \"Cancel\",\n onAccept,\n onCancel = () => null,\n onClose,\n acceptType = \"button\",\n}: BootstrapDialogDialogProps) => {\n const hasActions = actions.length > 0 || acceptable || cancelable;\n\n return (\n <Dialog open={open} onClose={onClose}>\n <DialogTitle sx={{ display: \"flex\", alignItems: \"center\" }}>\n {title}\n {loading && !acceptable && (\n <CircularProgress size={20} sx={{ ml: 2, color: (theme) => theme.palette.grey[500] }} />\n )}\n <IconButton\n disabled={disabled}\n aria-label=\"close\"\n onClick={onClose}\n sx={{\n position: \"absolute\",\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n >\n <CloseIcon />\n </IconButton>\n </DialogTitle>\n <Box component={component} {...componentProps}>\n <DialogContent dividers>{children}</DialogContent>\n {hasActions && (\n <DialogActions>\n {actions.map(({ id, text, type = \"button\", onClick, color = \"primary\" }) => (\n <Button key={id} type={type} disabled={disabled} onClick={onClick} color={color}>\n {text}\n </Button>\n ))}\n {cancelable && (\n <Button\n color=\"error\"\n disabled={disabled || disableCancel}\n onClick={() => {\n onCancel();\n if (callCloseWhenCancel) {\n onClose();\n }\n }}\n >\n {cancelText}\n </Button>\n )}\n\n {acceptable && (\n <Button\n type={acceptType}\n loading={loading}\n disabled={disabled || disableAccept}\n onClick={onAccept}\n >\n {acceptText}\n </Button>\n )}\n </DialogActions>\n )}\n </Box>\n </Dialog>\n );\n};\n","import { useState } from \"react\";\nimport { BootstrapDialog } from \"../bootstrap-dialog\";\nimport { BootstrapDialogDialogProps } from \"../dialog/dialog.types\";\nimport TextField from \"@mui/material/TextField\";\n\ntype OmitBaseDialogProps =\n | \"cancelable\"\n | \"acceptable\"\n | \"onAccept\"\n | \"onCancel\"\n | \"onClose\"\n | \"actions\"\n | \"callCloseWhenCancel\"\n | \"component\"\n | \"acceptType\";\nexport interface ConfirmDialogProps extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {\n confirmText?: string;\n canceText?: string;\n passphrase?: string;\n onCancel: () => void;\n onConfirm: () => void;\n}\n\nexport const ConfirmDialog = ({\n open,\n title,\n loading,\n disabled,\n confirmText = \"Confirm\",\n cancelText = \"Cancel\",\n passphrase,\n children,\n onConfirm,\n onCancel,\n}: ConfirmDialogProps) => {\n const [inputPassphrase, setInputPassphrase] = useState(\"\");\n const validPassphrase = !passphrase || inputPassphrase === passphrase;\n\n return (\n <BootstrapDialog\n title={title}\n loading={loading}\n disabled={loading || disabled}\n disableAccept={!validPassphrase}\n open={open}\n onClose={onCancel}\n acceptable\n cancelable\n callCloseWhenCancel={false}\n acceptText={confirmText}\n cancelText={cancelText}\n onCancel={onCancel}\n onAccept={onConfirm}\n >\n {children}\n {passphrase && (\n <TextField\n size=\"small\"\n fullWidth\n value={inputPassphrase}\n onChange={(e) => setInputPassphrase(e.target.value)}\n placeholder={passphrase}\n />\n )}\n </BootstrapDialog>\n );\n};\n","import { BootstrapDialog } from \"../bootstrap-dialog\";\nimport { FormEvent } from \"react\";\nimport { BootstrapDialogDialogProps } from \"../dialog\";\nimport { getFormData } from \"../utils/forms\";\n\ntype OmitBaseDialogProps =\n | \"cancelable\"\n | \"acceptable\"\n | \"onAccept\"\n | \"onCancel\"\n | \"onClose\"\n | \"actions\"\n | \"callCloseWhenCancel\"\n | \"component\"\n | \"acceptType\";\nexport interface FormDialogProps<T> extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {\n submitText?: string;\n canceText?: string;\n onCancel: () => void;\n onSubmit: (data: T) => void;\n}\n\nexport const FormDialog = <T,>({\n open,\n title,\n loading,\n disabled,\n submitText = \"Submit\",\n cancelText = \"Cancel\",\n children,\n onSubmit,\n onCancel,\n}: FormDialogProps<T>) => {\n const handleSubmit = (e: FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n\n onSubmit(getFormData<T>(e));\n };\n\n return (\n <BootstrapDialog\n component=\"form\"\n componentProps={{\n onSubmit: handleSubmit,\n }}\n title={title}\n loading={loading}\n disabled={loading || disabled}\n open={open}\n onClose={onCancel}\n callCloseWhenCancel={false}\n cancelable\n acceptable\n cancelText={cancelText}\n onCancel={onCancel}\n acceptText={submitText}\n acceptType=\"submit\"\n >\n {children}\n </BootstrapDialog>\n );\n};\n","import { useState } from \"react\";\n\nexport const useDialog = (intialOpen = false) => {\n const [isOpen, setIsOpen] = useState(intialOpen);\n\n const open = () => setIsOpen(true);\n const close = () => setIsOpen(false);\n\n return { isOpen, open, close, setIsOpen };\n};\n","import { useContext, createContext } from \"react\";\nimport { DrawerState, DrawerVariant } from \"../drawer\";\n\nexport interface DrawerContextProps {\n selectedItemId?: string;\n state: DrawerState;\n variant: DrawerVariant;\n drawerWidth: number;\n underAppBar: boolean;\n switchState(): void;\n close(): void;\n collapse(): void;\n open(): void;\n setState: (state: DrawerState) => void;\n}\n\nexport const DrawerContext = createContext<DrawerContextProps | undefined>(undefined);\nexport const UndefinedProvider = new Error(\"DrawerContext.Provider is required and was undefined\");\n\nexport const useDrawer = () => {\n const context = useContext(DrawerContext);\n\n if (context === undefined) {\n throw UndefinedProvider;\n }\n\n return context;\n};\n","import { Theme, CSSObject } from \"@mui/material/styles\";\n\nexport const drawerWidth = 240;\n\nexport const openedMixin = (theme: Theme): CSSObject => ({\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n});\n\nexport const closedMixin = (theme: Theme): CSSObject => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(7)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(8)} + 1px)`,\n },\n});\n","import { SxProps, Theme, styled, useTheme } from \"@mui/material/styles\";\nimport MuiDrawer, { drawerClasses } from \"@mui/material/Drawer\";\nimport { paperClasses } from \"@mui/material/Paper\";\nimport Divider from \"@mui/material/Divider\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport { DrawerComponent, DrawerProps, DrawerState, DrawerVariant } from \"./drawer.types\";\nimport { useDrawer } from \"../drawer-provider/drawer-context\";\nimport { closedMixin, openedMixin } from \"../drawer-provider/drawer-mixins\";\n\nexport const DrawerHeader = styled(\"div\")(({ theme }) => ({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: theme.spacing(0, 1),\n ...theme.mixins.toolbar,\n}));\n\nconst showCloseButton: Record<DrawerVariant, boolean> = {\n temporary: true,\n mini: true,\n persistent: true,\n clipped: false,\n};\n\nconst muiDrawerVariant: Record<DrawerVariant, \"permanent\" | \"persistent\" | \"temporary\"> = {\n temporary: \"temporary\",\n mini: \"permanent\",\n clipped: \"permanent\",\n persistent: \"persistent\",\n};\n\ntype SxGenerator = (state: DrawerState, theme: Theme) => SxProps<Theme>;\nconst NoopSxGenerator = () => ({});\nconst variantsSx: Readonly<Record<DrawerVariant, SxGenerator>> = {\n mini: (state: DrawerState, theme: Theme) => ({\n boxSizing: \"border-box\",\n [`& .${paperClasses.root}`]: {\n zIndex: theme.zIndex.drawer - 1,\n },\n }),\n temporary: NoopSxGenerator,\n clipped: NoopSxGenerator,\n persistent: NoopSxGenerator,\n};\n\nexport const Drawer: DrawerComponent = ({ children, ...rest }: DrawerProps) => {\n const theme = useTheme();\n const { state, switchState, underAppBar, close, drawerWidth, variant } = useDrawer();\n\n const sx: any = {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n ...(state === \"open\" && {\n ...openedMixin(theme),\n [`& .${drawerClasses.paper}`]: openedMixin(theme),\n }),\n ...(state !== \"open\" && {\n ...closedMixin(theme),\n [`& .${drawerClasses.paper}`]: closedMixin(theme),\n }),\n ...variantsSx[variant](state, theme),\n };\n\n return (\n <MuiDrawer\n open={state === \"open\"}\n variant={muiDrawerVariant[variant]}\n role=\"menu\"\n aria-hidden={state === \"close\"}\n onClose={close}\n sx={sx}\n {...rest}\n >\n <DrawerHeader>\n {!underAppBar && showCloseButton[variant] && (\n <IconButton onClick={switchState}>\n <ChevronLeftIcon />\n </IconButton>\n )}\n </DrawerHeader>\n <Divider />\n {children}\n </MuiDrawer>\n );\n};\n","import { useState } from \"react\";\nimport { PropsWithChildren } from \"react\";\nimport { DrawerContext } from \"./drawer-context\";\nimport { DrawerState, DrawerVariant } from \"../drawer\";\nimport { drawerWidth } from \"./drawer-mixins\";\n\nconst initialState: Record<DrawerVariant, DrawerState> = {\n temporary: \"close\",\n mini: \"collapse\",\n clipped: \"open\",\n persistent: \"close\",\n};\n\nconst targetStates: Record<DrawerVariant, [DrawerState, DrawerState]> = {\n temporary: [\"close\", \"open\"],\n mini: [\"collapse\", \"open\"],\n clipped: [\"open\", \"open\"],\n persistent: [\"close\", \"open\"],\n};\n\nexport type DrawerProviderProps = PropsWithChildren<{\n initialState?: DrawerState;\n underAppBar?: boolean;\n drawerWidth?: number;\n variant?: DrawerVariant;\n selectedItemId?: string;\n onStateChange?: (newState: DrawerState) => void;\n}>;\n\nexport const DrawerProvider = ({\n children,\n initialState: initialStateProp,\n variant = \"temporary\",\n drawerWidth: drawerWidthProp = drawerWidth,\n underAppBar = false,\n selectedItemId,\n onStateChange = () => null,\n}: DrawerProviderProps) => {\n const [state, setState] = useState<DrawerState>(initialStateProp || initialState[variant]);\n\n const handleChangeState = (newState: DrawerState) => {\n onStateChange(newState);\n setState(newState);\n };\n\n return (\n <DrawerContext.Provider\n value={{\n state,\n variant,\n selectedItemId,\n underAppBar,\n drawerWidth: drawerWidthProp,\n switchState: () => handleChangeState(targetStates[variant][state === \"open\" ? 0 : 1]),\n collapse: () => handleChangeState(\"collapse\"),\n close: () => handleChangeState(\"close\"),\n open: () => handleChangeState(\"open\"),\n setState,\n }}\n >\n {children}\n </DrawerContext.Provider>\n );\n};\n","import ListSubheader, { ListSubheaderProps } from \"@mui/material/ListSubheader\";\nimport { styled } from \"@mui/material/styles\";\nimport { DrawerSize } from \"../drawer\";\n\nexport interface DrawerSubheaderProps extends ListSubheaderProps {\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n}\n\nexport const DrawerSubheader = styled(ListSubheader, {\n shouldForwardProp: (prop) => prop !== \"size\",\n})<DrawerSubheaderProps>(({ size, theme }) => ({\n lineHeight: size === \"small\" ? theme.typography.pxToRem(40) : undefined,\n}));\n","import { FunctionComponent, ReactElement } from \"react\";\nimport { BulletVariant } from \"../bullet\";\nimport { LabelVariant } from \"../label\";\nimport { DrawerProps as MuiDrawerProps } from \"@mui/material/Drawer\";\nimport { Theme } from \"@mui/material/styles\";\nimport { DrawerAppBarProps } from \"../drawer-app-bar\";\n\nexport type DrawerVariant = \"temporary\" | \"mini\" | \"persistent\" | \"clipped\";\nexport type DrawerState = \"open\" | \"collapse\" | \"close\";\nexport type DrawerSize = \"small\" | \"medium\";\n\nexport interface DrawerItemAvatar {\n src: string;\n alt: string;\n}\n\nexport interface DrawerItemLabel {\n text: string;\n variant: LabelVariant;\n}\n\nexport interface DrawerItemBullet {\n variant: BulletVariant;\n}\n\nexport interface DrawerNavigationItemLink {\n id: string;\n text: string;\n href: string;\n icon?: ReactElement;\n avatar?: DrawerItemAvatar;\n label?: DrawerItemLabel;\n bullet?: DrawerItemBullet;\n}\n\nexport type DrawerNavigationItemCollapsable = Pick<\n DrawerNavigationItemLink,\n \"id\" | \"text\" | \"icon\"\n> & {\n items: DrawerNavigationItem[];\n};\n\nexport type DrawerNavigationItem = DrawerNavigationItemLink | DrawerNavigationItemCollapsable;\n\nexport interface DrawerNavigationSection {\n title?: string;\n items: DrawerNavigationItem[];\n}\n\nexport interface DrawerNavigation {\n items: DrawerNavigationSection[];\n}\n\nexport interface DrawerContentProps {\n /**\n * Object with the content that has to be rendered\n */\n nav: DrawerNavigation;\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n}\n\nexport type DrawerContentComponent = FunctionComponent<DrawerContentProps>;\nexport type DrawerContentElement = ReactElement<DrawerContentProps, DrawerContentComponent>;\n\nexport interface DrawerProps extends MuiDrawerProps {\n children: DrawerContentElement;\n}\n\nexport type DrawerComponent = FunctionComponent<DrawerProps>;\nexport type DrawerElement = ReactElement<DrawerProps, DrawerComponent>;\n\nexport const getDrawerItemColors = (theme: Theme, selected: boolean | undefined) => ({\n color: selected ? theme.palette.primary.main : undefined,\n fontWeight: selected ? theme.typography.fontWeightBold : theme.typography.fontWeightMedium,\n});\n\nexport type DrawerAppBarComponent = FunctionComponent<DrawerAppBarProps>;\nexport type DrawerAppBarElement = ReactElement<DrawerAppBarProps, DrawerAppBarComponent>;\n","import { ReactElement } from \"react\";\nimport Avatar from \"@mui/material/Avatar\";\nimport ListItemAvatar from \"@mui/material/ListItemAvatar\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Link from \"@mui/material/Link\";\nimport { SxProps, Theme, styled, useTheme } from \"@mui/material/styles\";\nimport { Bullet } from \"../bullet\";\nimport { Label } from \"../label\";\nimport {\n DrawerItemAvatar,\n DrawerItemBullet,\n DrawerItemLabel,\n DrawerSize,\n getDrawerItemColors,\n} from \"../drawer/drawer.types\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerItemLinkProps {\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n /**\n * Text displayed inside the item\n */\n text: string;\n /**\n * Url where the user is going to be redirected\n * if the item is clicked\n */\n href: string;\n /**\n * Icon displayed to the left\n */\n icon?: ReactElement;\n /**\n * Avatar displayed to the left\n */\n avatar?: DrawerItemAvatar;\n /**\n * Label with extra info displayed to the right\n */\n label?: DrawerItemLabel;\n /**\n * Bullet to attract the user attention displyed to the right\n */\n bullet?: DrawerItemBullet;\n /**\n * The item has to be marked as selected\n */\n selected?: boolean;\n /**\n * Deep level of this item inside the submenus\n */\n level: number;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst StyledLink = styled(Link)(({ theme }) => {\n return {\n color: theme.palette.text.primary,\n };\n});\n\nconst sxCollapsedIcon = {\n minWidth: 0,\n justifyContent: \"center\",\n marginRight: \"auto\",\n};\n\n/**\n * Clicable item inside a drawer\n */\nexport const DrawerItemLink = ({\n text,\n icon,\n avatar,\n label,\n bullet,\n href,\n selected,\n size = \"medium\",\n level,\n sx,\n}: DrawerItemLinkProps) => {\n const { state } = useDrawer();\n const theme = useTheme();\n const { color, fontWeight } = getDrawerItemColors(theme, selected);\n\n return (\n <ListItemButton\n LinkComponent={StyledLink}\n dense={size === \"small\"}\n aria-label={text}\n href={href}\n selected={selected}\n sx={{\n ...sx,\n pl: state === \"open\" ? theme.spacing(2 + 1.5 * level) : undefined,\n ...(state === \"collapse\" && {\n paddingHorizontal: theme.spacing(2.5),\n justifyContent: \"center\",\n }),\n }}\n >\n {icon && (\n <ListItemIcon sx={{ color, ...(state === \"collapse\" && level === 0 && sxCollapsedIcon) }}>\n {icon}\n </ListItemIcon>\n )}\n {avatar && (\n <ListItemAvatar\n sx={{\n ...(state === \"collapse\" && level === 0 && sxCollapsedIcon),\n }}\n >\n <Avatar\n alt={avatar.alt}\n src={avatar.src}\n sx={{\n ...(size === \"small\" && { width: 24, height: 24 }),\n ...(state === \"collapse\" && { width: 30, height: 30 }),\n }}\n />\n </ListItemAvatar>\n )}\n <ListItemText\n disableTypography\n primary={text}\n sx={{ color, fontWeight, opacity: state === \"collapse\" && level === 0 ? 0 : undefined }}\n />\n {label && state === \"open\" && (\n <Label text={label.text} variant={label.variant} sx={{ ml: 2 }} />\n )}\n {bullet && state === \"open\" && <Bullet variant={bullet.variant} sx={{ ml: 2 }} />}\n </ListItemButton>\n );\n};\n","import { DrawerMenuItem } from \"./drawer-menu-item\";\nimport { DrawerNavigationItem, DrawerSize } from \"../drawer/drawer.types\";\nimport { DrawerItemLink } from \"./drawer-item-link\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerItemProps {\n /**\n * Data to be rendered\n */\n item: DrawerNavigationItem;\n /**\n * Size of the item\n */\n size?: DrawerSize;\n /**\n * Deep level of this item inside the submenus\n */\n level?: number;\n}\n\nexport const DrawerItem = ({ item, size = \"medium\", level = 0 }: DrawerItemProps) => {\n const { selectedItemId } = useDrawer();\n if (\"items\" in item) {\n const { id, text, icon, items } = item;\n const childrenSelected = items.some((item) => item.id === selectedItemId);\n return (\n <DrawerMenuItem\n size={size}\n selected={id === selectedItemId || childrenSelected}\n text={text}\n icon={icon}\n items={items}\n level={level}\n />\n );\n } else {\n const { id, text, icon, avatar, label, bullet, href } = item;\n return (\n <DrawerItemLink\n selected={id === selectedItemId}\n size={size}\n text={text}\n icon={icon}\n avatar={avatar}\n label={label}\n bullet={bullet}\n href={href}\n level={level}\n />\n );\n }\n};\n","import ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Collapse from \"@mui/material/Collapse\";\nimport List from \"@mui/material/List\";\nimport Popover from \"@mui/material/Popover\";\nimport { SxProps, useTheme, Theme } from \"@mui/material/styles\";\nimport { ReactElement, useState, useRef } from \"react\";\nimport { DrawerNavigationItem, DrawerSize, getDrawerItemColors } from \"../drawer\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport ChevronRightIcon from \"@mui/icons-material/ChevronRight\";\nimport { DrawerItem } from \"./drawer-item\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerMenuItemProps {\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n /**\n * Text displayed inside the item\n */\n text: string;\n /**\n * Icon displayed to the left\n */\n icon?: ReactElement;\n /**\n * The item has to be marked as selected\n */\n selected?: boolean;\n /**\n * Items that are going to be displayed inside\n * the collapsable\n */\n items: DrawerNavigationItem[];\n /**\n * Deep level of this item inside the submenus\n */\n level: number;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\nexport const DrawerMenuItem = ({\n text,\n icon,\n selected,\n items,\n size = \"medium\",\n level,\n sx = {},\n}: DrawerMenuItemProps) => {\n const { state } = useDrawer();\n const anchorEl = useRef<HTMLDivElement | null>(null);\n const { palette, spacing } = useTheme();\n const [menuOpen, setMenuOpen] = useState(false);\n const { color, fontWeight } = getDrawerItemColors(useTheme(), selected);\n\n const submenu = (\n <List component=\"div\" disablePadding>\n {items.map((item) => (\n <DrawerItem key={item.id} level={level + 1} item={item} size={size} />\n ))}\n </List>\n );\n\n const collapsedButtonSx =\n state === \"collapse\" && level === 0\n ? {\n position: \"absolute\",\n right: 0,\n }\n : {};\n\n return (\n <>\n <ListItemButton\n ref={anchorEl}\n selected={selected}\n aria-label={text}\n onClick={() => setMenuOpen((o) => !o)}\n dense={size === \"small\"}\n sx={{\n ...sx,\n pl: state === \"open\" ? spacing(2 + 1.5 * level) : undefined,\n backgroundColor: menuOpen ? palette.action.hover : undefined,\n }}\n >\n {icon && <ListItemIcon sx={{ color }}>{icon}</ListItemIcon>}\n <ListItemText\n disableTypography\n primary={text}\n sx={{ color, fontWeight, opacity: state === \"collapse\" && level === 0 ? 0 : undefined }}\n />\n {menuOpen && state === \"open\" ? (\n <ExpandMoreIcon sx={[{ color, ml: 2 }, collapsedButtonSx]} />\n ) : (\n <ChevronRightIcon sx={[{ color, ml: 2 }, collapsedButtonSx]} />\n )}\n </ListItemButton>\n {state === \"open\" ? (\n <Collapse\n in={menuOpen}\n timeout=\"auto\"\n unmountOnExit\n aria-label={`${text} collapse submenu`}\n >\n {submenu}\n </Collapse>\n ) : (\n <Popover\n open={menuOpen}\n PaperProps={{\n elevation: 0,\n variant: \"outlined\",\n }}\n aria-label={`${text} popover submenu`}\n anchorEl={anchorEl.current}\n onClose={() => setMenuOpen(false)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"right\",\n }}\n >\n {submenu}\n </Popover>\n )}\n </>\n );\n};\n","import List from \"@mui/material/List\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { DrawerNavigationItem, DrawerSize } from \"../drawer\";\nimport { DrawerSubheader } from \"../drawer-subheader\";\nimport { DrawerItem } from \"../drawer-item\";\nimport { useDrawer } from \"../drawer-provider\";\n\nexport interface DrawerSectionProps {\n /**\n * Section title\n */\n title?: string;\n /**\n * List of items of that section\n */\n items: DrawerNavigationItem[];\n /**\n * Item size. default to medium\n */\n size?: DrawerSize;\n}\n\n/**\n * Render a group of items inside the drawer\n * with an optional title\n */\nexport const DrawerSection = ({ title, items, size = \"medium\" }: DrawerSectionProps) => {\n const { state } = useDrawer();\n const { spacing } = useTheme();\n return (\n <>\n {title && state === \"open\" && (\n <DrawerSubheader size={size} role=\"heading\">\n {title}\n </DrawerSubheader>\n )}\n <List\n sx={{\n paddingTop: size === \"small\" ? spacing(0) : undefined,\n paddingY: state === \"collapse\" ? 0 : undefined,\n }}\n >\n {items.map((item) => (\n <DrawerItem key={item.id} item={item} size={size} />\n ))}\n </List>\n </>\n );\n};\n","import { DrawerSection } from \"../drawer-section\";\nimport { DrawerContentComponent, DrawerContentProps } from \"../drawer\";\n\n/**\n * Content to be shown inside a navigation\n */\nexport const DrawerContent: DrawerContentComponent = ({\n nav: { items },\n size = \"medium\",\n}: DrawerContentProps) => {\n return (\n <>\n {items.map(({ title, items }, i) => (\n <DrawerSection key={i} title={title} items={items} size={size} />\n ))}\n </>\n );\n};\n","import MuiAppBar from \"@mui/material/AppBar\";\nimport Toolbar from \"@mui/material/Toolbar\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme, Theme } from \"@mui/material/styles\";\nimport MenuIcon from \"@mui/icons-material/Menu\";\nimport { useDrawer } from \"../drawer-provider\";\nimport { AppBarProps as MuiAppBarProps } from \"@mui/material\";\nimport { DrawerState, DrawerVariant } from \"../drawer\";\n\nconst moveWithDrawer: Record<DrawerVariant, boolean> = {\n temporary: false,\n mini: true,\n persistent: true,\n clipped: true,\n};\n\nconst showMenuButton: Record<DrawerVariant, (state: DrawerState) => boolean> = {\n temporary: () => true,\n mini: (state) => state !== \"open\",\n persistent: () => true,\n clipped: () => false,\n};\n\nexport interface DrawerAppBarProps extends MuiAppBarProps {\n title?: string;\n}\n\nexport const DrawerAppBar = ({ title, sx, children, ...rest }: DrawerAppBarProps) => {\n const theme = useTheme();\n const { state, variant, switchState, drawerWidth, underAppBar } = useDrawer();\n\n const rootSx =\n (moveWithDrawer[variant] &&\n !underAppBar && {\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n ...(state === \"open\" && {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n }),\n }) ||\n {};\n\n return (\n <MuiAppBar\n position={underAppBar ? \"fixed\" : undefined}\n {...rest}\n sx={{\n ...sx,\n ...rootSx,\n zIndex: (theme: Theme) => theme.zIndex.drawer + (underAppBar ? 1 : 0),\n }}\n >\n <Toolbar>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={switchState}\n edge=\"start\"\n sx={{\n marginRight: 5,\n display: showMenuButton[variant](state) ? undefined : \"none\",\n }}\n >\n <MenuIcon />\n </IconButton>\n {title && (\n <Typography variant=\"h6\" component=\"h1\" role=\"heading\" aria-level={1} noWrap>\n {title}\n </Typography>\n )}\n {children}\n </Toolbar>\n </MuiAppBar>\n );\n};\n","import { styled, useTheme } from \"@mui/material/styles\";\nimport { PropsWithChildren } from \"react\";\nimport { DrawerHeader, useDrawer } from \"../drawer-provider\";\nimport { DrawerVariant } from \"../drawer\";\n\nconst drawerSpace: Record<DrawerVariant, boolean> = {\n temporary: false,\n mini: true,\n clipped: true,\n persistent: true,\n};\n\nconst StyledDiv = styled(\"div\")(({ theme }) => {\n const { spacing } = useTheme();\n const { drawerWidth, state, variant } = useDrawer();\n\n const marginLeft = drawerSpace[variant]\n ? state === \"open\"\n ? drawerWidth\n : state === \"collapse\"\n ? spacing(8)\n : 0\n : 0;\n\n return {\n marginLeft,\n transition: theme.transitions.create(\"margin\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n };\n});\n\nexport type DrawerMainProps = PropsWithChildren;\n\nexport const DrawerMain = ({ children }: DrawerMainProps) => (\n <StyledDiv>\n <DrawerHeader />\n {children}\n </StyledDiv>\n);\n","import CircularProgress from \"@mui/material/CircularProgress\";\nimport Box from \"@mui/material/Box\";\n\n/**\n * Displays a centered loading indicator\n */\nexport const LoadingArea = () => {\n return (\n <Box width={1} height={1} display=\"flex\" justifyContent=\"center\" alignItems=\"center\">\n <CircularProgress />\n </Box>\n );\n};\n","import Alert from \"@mui/material/Alert\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport Box from \"@mui/material/Box\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { PropsWithChildren } from \"react\";\nimport { LoadingArea } from \"../loading-area\";\n\nexport interface QueryContainerError {\n /**\n * The error title\n */\n name?: string;\n /**\n * The description of the error\n */\n message: string;\n}\n\nexport interface QueryContainerSuccess {\n /**\n * The success title\n */\n name?: string;\n /**\n * The success text\n */\n message: string;\n}\n\nexport type QueryContainerProps = PropsWithChildren<{\n /**\n * There is a query in progress and we have available data\n */\n fetching?: boolean | boolean[];\n\n /**\n * There is a query in progress and we don't have available data\n */\n loading?: boolean | boolean[];\n /**\n * The query has returned an error\n */\n error?: QueryContainerError;\n /**\n * The query has finished successfully\n */\n success?: QueryContainerSuccess;\n}>;\n\n/**\n * Component to show different indicators based on the usual api query statuses\n */\nexport function QueryContainer({\n fetching: fetchingProp = false,\n loading: loadingProp = false,\n error,\n success,\n children,\n}: QueryContainerProps) {\n const fetching = Array.isArray(fetchingProp) ? fetchingProp.some((f) => f) : fetchingProp;\n const loading = Array.isArray(loadingProp) ? loadingProp.some((f) => f) : loadingProp;\n\n if (loading) {\n return <LoadingArea />;\n }\n\n if (error) {\n return (\n <Alert severity=\"error\" role=\"alert\" aria-describedby=\"error\">\n {error.name && <AlertTitle role=\"heading\">{error.name}</AlertTitle>}\n {error.message}\n </Alert>\n );\n }\n\n return (\n <Box>\n {success && (\n <Alert severity=\"success\" role=\"alert\" aria-describedby=\"success\" sx={{ mb: 2 }}>\n {success.name && <AlertTitle role=\"heading\">{success.name}</AlertTitle>}\n {success.message}\n </Alert>\n )}\n {fetching && <LinearProgress sx={{ width: 1, mb: 1 }} />}\n {children}\n </Box>\n );\n}\n","import { ReactNode, useId } from \"react\";\nimport { styled } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport FormControl from \"@mui/material/FormControl\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport MuiSelect from \"@mui/material/Select\";\nimport { CenterContainer } from \"../center-container\";\nimport { SelectInputProps } from \"@mui/material/Select/SelectInput\";\n\nexport type SelectSize = \"small\" | \"medium\";\n\nexport interface SelectProps<T> {\n label: string;\n value: T;\n loading?: boolean;\n fetching?: boolean;\n size?: SelectSize;\n color?: string;\n fullWidth?: boolean;\n children?: ReactNode;\n onChange?: SelectInputProps<T>[\"onChange\"];\n}\n\nconst ProgressSize: Record<SelectSize, number> = {\n small: 15,\n medium: 20,\n};\n\nexport const Select = <T extends ReactNode>({\n label,\n value,\n loading = false,\n fetching = false,\n size = \"medium\",\n fullWidth = false,\n color,\n children,\n onChange,\n}: SelectProps<T>) => {\n const id = useId();\n\n const renderValue = (value: T): ReactNode => {\n if (fetching) {\n return (\n <CenterContainer centerVertical centerHorizontal>\n <CircularProgress color=\"inherit\" size={ProgressSize[size]} />\n </CenterContainer>\n );\n }\n\n if (loading) {\n return (\n <Box display=\"flex\" flexDirection=\"column\">\n {value}\n <LinearProgress\n color=\"inherit\"\n sx={{ position: \"absolute\", left: 0, right: 0, bottom: 0 }}\n />\n </Box>\n );\n }\n\n return value;\n };\n\n const StyledFormControl = styled(FormControl)(() => {\n if (!color) {\n return {};\n }\n\n return {\n label: {\n color,\n },\n \".MuiOutlinedInput-notchedOutline\": {\n borderColor: `${color} !important`,\n },\n \".MuiInputBase-root\": {\n color,\n },\n \".MuiSelect-icon\": {\n fill: color,\n },\n };\n });\n\n return (\n <StyledFormControl fullWidth={fullWidth}>\n <InputLabel id={id}>{label}</InputLabel>\n <MuiSelect\n labelId={id}\n id={id}\n value={value}\n label={label}\n onChange={onChange}\n disabled={fetching}\n size={size}\n renderValue={renderValue}\n >\n {children}\n </MuiSelect>\n </StyledFormControl>\n );\n};\n","import { FormEvent, useState } from \"react\";\nimport Stack from \"@mui/material/Stack\";\nimport Box from \"@mui/material/Box\";\nimport TextField from \"@mui/material/TextField\";\nimport Typography from \"@mui/material/Typography\";\nimport Alert from \"@mui/material/Alert\";\nimport Button from \"@mui/material/Button\";\n\nexport interface SignInProps {\n title: string;\n subtitle: string;\n error?: Error;\n loading?: boolean;\n onSubmitSignIn: (email: string, password: string) => void;\n}\n\nexport const SignIn = ({ title, subtitle, loading, error, onSubmitSignIn }: SignInProps) => {\n const [emailError, setEmailError] = useState(\"\");\n const [passwordError, setPasswordError] = useState(\"\");\n\n function handleSubmit(e: FormEvent<HTMLFormElement>) {\n e.preventDefault();\n setEmailError(\"\");\n setPasswordError(\"\");\n\n const data = new FormData(e.currentTarget);\n const email = data.get(\"email\")?.toString();\n const password = data.get(\"password\")?.toString();\n\n if (!email) {\n setEmailError(\"Please fill out this field\");\n }\n\n if (!password) {\n setPasswordError(\"Please fill out this field\");\n }\n\n if (email && password) {\n onSubmitSignIn(email, password);\n }\n }\n\n return (\n <>\n <Box marginBottom={2}>\n <Typography component=\"h1\" variant=\"h4\">\n {title}\n </Typography>\n <Typography variant=\"body1\">{subtitle}</Typography>\n </Box>\n <Box component=\"form\" onSubmit={handleSubmit}>\n {error && (\n <Stack width=\"100%\" marginTop={1}>\n <Alert variant=\"filled\" severity=\"error\">\n {error.message}\n </Alert>\n </Stack>\n )}\n <TextField\n margin=\"normal\"\n fullWidth\n id=\"email\"\n label=\"Email Address\"\n name=\"email\"\n autoComplete=\"email\"\n autoFocus\n disabled={loading}\n type=\"email\"\n inputProps={{ role: \"input\" }}\n error={!!emailError}\n helperText={emailError}\n />\n <TextField\n margin=\"normal\"\n fullWidth\n role=\"input\"\n name=\"password\"\n label=\"Password\"\n type=\"password\"\n id=\"password\"\n disabled={loading}\n autoComplete=\"current-password\"\n inputProps={{ role: \"input\" }}\n error={!!passwordError}\n helperText={passwordError}\n />\n <Button\n type=\"submit\"\n fullWidth\n variant=\"contained\"\n loading={loading}\n disabled={loading}\n role=\"button\"\n sx={{ mt: 2 }}\n >\n Sign In\n </Button>\n </Box>\n </>\n );\n};\n","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import { TextFieldProps as MuiTextFieldProps } from \"@mui/material/TextField\";\nimport CircularProgress, { circularProgressClasses } from \"@mui/material/CircularProgress\";\nimport FormControl from \"@mui/material/FormControl\";\nimport FormHelperText from \"@mui/material/FormHelperText\";\nimport { iconButtonClasses } from \"@mui/material/IconButton\";\nimport LinearProgress, { linearProgressClasses } from \"@mui/material/LinearProgress\";\nimport OutlinedInput, { outlinedInputClasses } from \"@mui/material/OutlinedInput\";\nimport InputLabel, { inputLabelClasses } from \"@mui/material/InputLabel\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport { autocompleteClasses } from \"@mui/material/Autocomplete\";\nimport useId from \"@mui/utils/useId\";\n\nexport type TextFieldProps = MuiTextFieldProps & {\n fetching?: boolean;\n loading?: boolean;\n hexColor?: string;\n};\n\nexport const TextField = ({\n id: overrideId,\n label,\n InputLabelProps,\n InputProps,\n fetching,\n loading,\n helperText,\n hexColor,\n size,\n fullWidth,\n sx,\n ...rest\n}: TextFieldProps) => {\n const id = useId(overrideId);\n const helperTextId = helperText && id ? `${id}-helper-text` : undefined;\n const inputLabelId = label && id ? `${id}-label` : undefined;\n\n const hexColorSx = hexColor\n ? {\n [`& .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: `${hexColor} !important`,\n },\n [`& .${inputLabelClasses.root}`]: {\n color: hexColor,\n },\n [`& .${outlinedInputClasses.input}`]: {\n color: hexColor,\n },\n [`& .${circularProgressClasses.root}`]: {\n color: hexColor,\n },\n [`& .${linearProgressClasses.bar}`]: {\n backgroundColor: hexColor,\n },\n [`& .${autocompleteClasses.endAdornment} .${iconButtonClasses.root}`]: {\n color: hexColor,\n },\n }\n : {};\n\n return (\n <FormControl sx={hexColorSx} fullWidth={fullWidth}>\n <InputLabel\n size={size === \"small\" ? \"small\" : \"normal\"}\n id={inputLabelId}\n htmlFor={id}\n {...InputLabelProps}\n >\n {label}\n </InputLabel>\n <OutlinedInput\n {...InputProps}\n id={id}\n label={label}\n size={size}\n fullWidth={fullWidth}\n endAdornment={\n <InputAdornment position=\"end\">\n {InputProps?.endAdornment}\n {loading ? <CircularProgress color=\"inherit\" size={20} sx={{ ml: 1 }} /> : null}\n </InputAdornment>\n }\n sx={sx}\n {...(rest as any)}\n />\n {fetching && !loading && (\n <LinearProgress\n color=\"inherit\"\n sx={{ position: \"absolute\", left: 0, right: 0, bottom: 0 }}\n />\n )}\n {helperText && <FormHelperText id={helperTextId}>{helperText}</FormHelperText>}\n </FormControl>\n );\n};\n","import MuiAutocomplete, {\n AutocompleteProps as MuiAutocompleteProps,\n} from \"@mui/material/Autocomplete\";\nimport React from \"react\";\nimport { TextField } from \"../text-field\";\nimport { ChipTypeMap } from \"@mui/material/Chip\";\n\nexport interface AutocompleteProps<\n T,\n Multiple extends boolean | undefined,\n DisableClearable extends boolean | undefined,\n FreeSolo extends boolean | undefined,\n ChipComponent extends React.ElementType = ChipTypeMap[\"defaultComponent\"],\n> extends Omit<\n MuiAutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>,\n \"renderInput\" | \"onChange\" | \"color\"\n > {\n label: string;\n helperText?: string;\n color?: string;\n fetching?: boolean;\n onChangeValue?: (value: T) => void;\n}\n\nexport const Autocomplete = <\n T,\n Multiple extends boolean | undefined,\n DisableClearable extends boolean | undefined,\n FreeSolo extends boolean | undefined,\n ChipComponent extends React.ElementType = ChipTypeMap[\"defaultComponent\"],\n>(\n props: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>,\n) => {\n const {\n label,\n loading,\n fetching,\n options,\n helperText,\n color,\n onChangeValue = () => null,\n sx,\n ...rest\n } = props;\n const loadingOrFetching = loading || fetching;\n\n return (\n <MuiAutocomplete\n loading={loadingOrFetching}\n options={fetching ? [] : options}\n onChange={(_, value) => onChangeValue(value as T)}\n {...(rest as any)}\n renderInput={(params) => (\n <TextField\n {...params}\n label={label}\n fullWidth\n fetching={fetching}\n loading={loading}\n hexColor={color}\n helperText={helperText}\n />\n )}\n sx={sx}\n />\n );\n};\n","import Box, { BoxProps } from \"@mui/material/Box\";\nimport { styled } from \"@mui/material/styles\";\nimport { DateCalendar, PickersDay, PickersDayProps } from \"@mui/x-date-pickers\";\nimport { endOfWeek, format, isAfter, isBefore, isSameDay, startOfWeek } from \"date-fns\";\nimport { useState } from \"react\";\n\ntype DateRange = [Date, Date | undefined];\n\ninterface CustomPickerDayProps extends BoxProps {\n dayIsBetween: boolean;\n isFirstDay: boolean;\n isLastDay: boolean;\n}\n\nconst CustomPickersDayBackground = styled(Box, {\n shouldForwardProp: (prop) =>\n prop !== \"dayIsBetween\" &&\n prop !== \"isFirstDay\" &&\n prop !== \"isLastDay\" &&\n prop !== \"isStartOfWeek\" &&\n prop !== \"isEndOfWeek\",\n})<CustomPickerDayProps>(({ theme, dayIsBetween, isFirstDay, isLastDay }) => {\n return {\n ...((isFirstDay || isLastDay || dayIsBetween) && {\n borderRadius: 0,\n backgroundColor: `${theme.palette.primary.light}40`,\n margin: 0,\n }),\n ...(isFirstDay && {\n borderTopLeftRadius: \"50%\",\n borderBottomLeftRadius: \"50%\",\n }),\n ...(isLastDay && {\n borderTopRightRadius: \"50%\",\n borderBottomRightRadius: \"50%\",\n }),\n };\n}) as React.ComponentType<CustomPickerDayProps>;\n\nconst Day = (props: PickersDayProps<Date> & { dateRange?: DateRange | null }) => {\n const { day, dateRange, ...other } = props;\n\n if (dateRange == null) {\n return <PickersDay day={day} {...other} />;\n }\n\n const [start, end] = dateRange;\n\n const dayIsBetween = !!end && isAfter(day, start) && isBefore(day, end);\n const isFirstDay = isSameDay(day, start);\n const isLastDay = !!end && isSameDay(day, end);\n const isStartOfWeek = isSameDay(day, startOfWeek(day));\n const isEndOfWeek = isSameDay(day, endOfWeek(day));\n\n return (\n <CustomPickersDayBackground\n dayIsBetween={dayIsBetween}\n isFirstDay={isFirstDay || (dayIsBetween && isStartOfWeek)}\n isLastDay={isLastDay || (dayIsBetween && isEndOfWeek)}\n aria-label={format(day, \"yyyy-MM-dd\")}\n aria-selected={dayIsBetween || isFirstDay || isLastDay}\n role=\"gridcell\"\n >\n <PickersDay {...other} day={day} selected={isFirstDay || isLastDay} />\n </CustomPickersDayBackground>\n );\n};\n\nexport interface DateRangeCalendarProps {\n defaultValue: DateRange;\n onValueChange: (value: DateRange, updatedIndex: number) => void;\n}\nexport const DateRangeCalendar = ({ defaultValue, onValueChange }: DateRangeCalendarProps) => {\n const [value, setValue] = useState(defaultValue);\n const [index, setIndex] = useState(0);\n\n const setValueRange = (newRange: DateRange, index: number, newIndex: number) => {\n setValue(newRange);\n onValueChange(newRange, index);\n setIndex(newIndex);\n };\n\n const handleChange = (newValue: Date | null) => {\n if (!newValue) {\n return;\n }\n\n // If is the end date and is minor than the start date\n if (index === 1 && newValue < value[0]) {\n return setValueRange([newValue, undefined], 0, 1);\n }\n\n // If is the start date and is bigger than the end date\n if (index === 0 && value[1] && newValue > value[1]) {\n return setValueRange([newValue, undefined], 0, 1);\n }\n\n // Default case\n setValueRange(\n [index === 0 ? newValue : value[0], index === 1 ? newValue : value[1]],\n index,\n index === 0 ? 1 : 0,\n );\n };\n return (\n <DateCalendar\n value={null}\n onChange={handleChange}\n slots={{ day: Day }}\n slotProps={{\n day: {\n dateRange: value,\n } as any,\n }}\n aria-label=\"calendar range picker\"\n />\n );\n};\n","import { useState } from \"react\";\nimport { format } from \"date-fns\";\nimport Collapse from \"@mui/material/Collapse\";\nimport IconButton from \"@mui/material/IconButton\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport TextField from \"@mui/material/TextField\";\nimport Paper from \"@mui/material/Paper\";\nimport EventIcon from \"@mui/icons-material/Event\";\nimport { DateRangeCalendar } from \"../date-range-calendar\";\n\ntype DateRange = [Date, Date | undefined];\nexport interface DateRangePickerProps {\n label: string;\n defaultValue: DateRange;\n format: string;\n fullWidth?: boolean;\n size?: \"small\" | \"medium\";\n onValueChange: (value: DateRange, index: number) => void;\n}\n\nexport const DateRangePicker = ({\n defaultValue,\n format: fmt,\n label,\n fullWidth,\n onValueChange,\n size = \"medium\",\n}: DateRangePickerProps) => {\n const [isPopoverOpened, setIsPopoverOpened] = useState(false);\n const [value, setValue] = useState(defaultValue);\n\n const handleValueChange = (newValue: DateRange, index: number) => {\n setValue(newValue);\n onValueChange(newValue, index);\n setIsPopoverOpened(index < 1);\n };\n\n return (\n <>\n <TextField\n label={label}\n fullWidth={fullWidth}\n size={size}\n value={`${format(value[0], fmt)} - ${value[1] ? format(value[1], fmt) : fmt.toUpperCase()}`}\n InputProps={{\n endAdornment: (\n <InputAdornment position=\"end\">\n <IconButton onClick={() => setIsPopoverOpened((o) => !o)} aria-label=\"open calendar\">\n <EventIcon />\n </IconButton>\n </InputAdornment>\n ),\n }}\n />\n <Paper>\n <Collapse in={isPopoverOpened} aria-label=\"calendar collapse\">\n <DateRangeCalendar defaultValue={defaultValue} onValueChange={handleValueChange} />\n </Collapse>\n </Paper>\n </>\n );\n};\n","import Typography from \"@mui/material/Typography\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { Variant } from \"@mui/material/styles/createTypography\";\n\ntype ActionVariant = \"primary\" | \"error\" | \"warning\" | \"success\";\n\nexport interface ActionHeaderProps {\n variant?: ActionVariant;\n title: string;\n titleVariant?: Extract<Variant, \"h4\" | \"h5\" | \"h6\">;\n}\n\nexport const ActionHeader = ({\n title,\n titleVariant = \"h4\",\n variant = \"primary\",\n}: ActionHeaderProps) => {\n const { palette } = useTheme();\n\n const titleColor: Record<ActionVariant, string | undefined> = {\n primary: undefined,\n error: \"error\",\n warning: palette.warning.main,\n success: palette.success.main,\n };\n return (\n <Typography\n color={titleColor[variant]}\n variant={titleVariant}\n pb={1}\n borderBottom={1}\n borderColor=\"grey.300\"\n >\n {title}\n </Typography>\n );\n};\n","import Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport DialogContentText from \"@mui/material/DialogContentText\";\nimport { Variant } from \"@mui/material/styles/createTypography\";\nimport { ReactElement } from \"react\";\nimport { ActionHeader } from \"./action-header\";\nimport { ConfirmDialog } from \"../confirm-dialog\";\nimport { useDialog } from \"../dialog\";\n\nexport type ActionVariant = \"primary\" | \"error\" | \"warning\" | \"success\";\n\nexport interface ActionProps {\n variant: ActionVariant;\n title: string;\n titleVariant?: Extract<Variant, \"h4\" | \"h5\" | \"h6\">;\n description?: string | ReactElement;\n descriptionVariant?: Variant;\n helperText?: string;\n helperTextVariant?: Variant;\n buttonText: string;\n confirmable?: boolean;\n confirmTitle?: string;\n confirmDescription?: string;\n passphrase?: string;\n onAction: () => void;\n}\n\nexport const Action = ({\n variant = \"primary\",\n title,\n titleVariant = \"h4\",\n description,\n descriptionVariant = \"body2\",\n buttonText,\n helperText,\n helperTextVariant = \"caption\",\n confirmable,\n passphrase,\n confirmTitle = \"\",\n confirmDescription = \"\",\n onAction,\n}: ActionProps) => {\n const { isOpen, open, close } = useDialog();\n\n const handleClickActionButton = () => {\n if (confirmable) {\n open();\n } else {\n onAction();\n }\n };\n\n const handleConfirmDialog = () => {\n onAction();\n close();\n };\n\n return (\n <>\n <Grid container spacing={1}>\n <Grid item xs={12} mb={2}>\n <ActionHeader title={title} titleVariant={titleVariant} />\n </Grid>\n {description && (\n <Grid item xs={12}>\n <Typography variant={descriptionVariant}>{description}</Typography>\n </Grid>\n )}\n <Grid item xs={12} mt={1}>\n <Button color={variant} variant=\"contained\" onClick={handleClickActionButton}>\n {buttonText}\n </Button>\n </Grid>\n {helperText && (\n <Grid item xs={12}>\n <Typography variant={helperTextVariant}>{helperText}</Typography>\n </Grid>\n )}\n </Grid>\n <ConfirmDialog\n open={isOpen}\n title={confirmTitle}\n passphrase={passphrase}\n onCancel={close}\n onConfirm={handleConfirmDialog}\n >\n <DialogContentText>{confirmDescription}</DialogContentText>\n </ConfirmDialog>\n </>\n );\n};\n","import { createContext, Dispatch, SetStateAction } from \"react\";\n\nexport const TabCardContext = createContext<[number, Dispatch<SetStateAction<number>>]>([\n 0,\n () => null,\n]);\nexport const TabCardContextProvider = TabCardContext.Provider;\n","import { styled } from \"@mui/material/styles\";\nimport Paper from \"@mui/material/Paper\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Box from \"@mui/material/Box\";\nimport { PropsWithChildren, ReactElement, SyntheticEvent, useState } from \"react\";\nimport { TabCardContextProvider } from \"./tab-card.context\";\nimport { useGetDefaultThemeColor } from \"../utils\";\n\nexport interface TabData {\n text: string;\n icon?: ReactElement;\n}\n\ninterface StyledTabsProps {\n children?: React.ReactNode;\n value: number;\n onChange: (event: React.SyntheticEvent, newValue: number) => void;\n}\n\nconst StyledTabs = styled((props: StyledTabsProps) => (\n <Tabs {...props} TabIndicatorProps={{ children: <span className=\"MuiTabs-indicatorSpan\" /> }} />\n))(({ theme }) => ({\n minHeight: theme.spacing(5),\n \"& .MuiTabs-indicator\": {\n display: \"flex\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n },\n \"& .MuiTabs-indicatorSpan\": {\n maxWidth: 40,\n width: \"100%\",\n backgroundColor: theme.palette.primary.main,\n },\n}));\n\nconst StyledTab = styled(Tab)(({ theme }) => ({\n textTransform: \"none\",\n fontWeight: theme.typography.fontWeightRegular,\n marginRight: theme.spacing(1),\n color: theme.palette.text.secondary,\n paddingTop: 0,\n paddingBottom: 0,\n minHeight: theme.spacing(5),\n \"&.Mui-selected\": {\n color: theme.palette.text.secondary,\n fontWeight: theme.typography.fontWeightBold,\n },\n}));\n\nexport type TabCardProps = PropsWithChildren<{\n tabs: TabData[];\n initialTab?: number;\n onChangeTab?: (tab: TabData, index: number) => void;\n}>;\n\nexport const TabCard = ({\n children,\n tabs,\n initialTab = 0,\n onChangeTab = () => null,\n}: TabCardProps) => {\n const bgColor = useGetDefaultThemeColor();\n const [selectedTab, setSelectedTab] = useState(initialTab);\n\n const handleChangeTab = (_: SyntheticEvent<Element, Event>, index: number) => {\n setSelectedTab(index);\n onChangeTab(tabs[index], index);\n };\n\n return (\n <TabCardContextProvider value={[selectedTab, setSelectedTab]}>\n <Paper variant=\"outlined\">\n <Box bgcolor={bgColor}>\n <StyledTabs value={selectedTab} onChange={handleChangeTab}>\n {tabs.map(({ text, icon }) => (\n <StyledTab iconPosition=\"start\" disableRipple key={text} label={text} icon={icon} />\n ))}\n </StyledTabs>\n </Box>\n {children}\n </Paper>\n </TabCardContextProvider>\n );\n};\n","import { PropsWithChildren, useContext } from \"react\";\nimport { TabCardContext } from \"./tab-card.context\";\nimport { SxProps, Theme } from \"@mui/material\";\nimport Box from \"@mui/material/Box\";\n\nexport type TabCardPanelProps = PropsWithChildren<{\n index: number | number[];\n sx?: SxProps<Theme>;\n}>;\n\nexport const TabCardPanel = ({ index, children, sx }: TabCardPanelProps) => {\n const [value] = useContext(TabCardContext);\n let isTab = value === index;\n if (Array.isArray(index)) {\n isTab = index.includes(value);\n }\n\n return isTab ? <Box sx={sx}>{children}</Box> : null;\n};\n","import Box from \"@mui/material/Box\";\nimport { useTab } from \"../tab-provider\";\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: number | number[];\n}\n\nexport function TabPanel({ children, index }: TabPanelProps) {\n const [value] = useTab();\n let isTab = value === index;\n if (Array.isArray(index)) {\n isTab = index.includes(value);\n }\n\n return (\n <div\n role=\"tabpanel\"\n hidden={!isTab}\n id={`simple-tabpanel-${index}`}\n aria-labelledby={`simple-tab-${index}`}\n >\n {isTab && <Box sx={{ p: 3 }}>{children}</Box>}\n </div>\n );\n}\n","import { ReactElement } from \"react\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ntype IconColor =\n | \"inherit\"\n | \"action\"\n | \"disabled\"\n | \"primary\"\n | \"secondary\"\n | \"error\"\n | \"info\"\n | \"success\"\n | \"warning\";\n\nexport interface PlaceholderAction {\n id: string;\n text: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface PlaceholderIconArgs {\n size: number;\n color: IconColor;\n}\n\nexport type PlaceholderIcon = ({ size, color }: PlaceholderIconArgs) => ReactElement;\n\nexport interface PlaceholderProps {\n title: string;\n subtitle: string;\n iconSize?: number;\n icon?: PlaceholderIcon;\n actions?: PlaceholderAction[];\n}\n\nexport const Placeholder = ({\n title,\n subtitle,\n icon,\n iconSize = 200,\n actions,\n}: PlaceholderProps) => {\n return (\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n justifyContent=\"center\"\n alignItems=\"center\"\n textAlign=\"center\"\n >\n {icon && icon({ size: iconSize, color: \"primary\" })}\n <Typography variant=\"h4\" role=\"heading\" aria-level={1}>\n {title}\n </Typography>\n <Typography variant=\"subtitle1\" role=\"heading\" aria-level={2} sx={{ mt: 2 }}>\n {subtitle}\n </Typography>\n {actions && (\n <Box sx={{ pt: 2 }}>\n {actions.map(({ id, text, href, onClick }, index) => (\n <Button\n key={id}\n role=\"button\"\n variant=\"contained\"\n href={href}\n onClick={onClick}\n sx={{ mr: index < actions.length - 1 ? 2 : 0 }}\n >\n {text}\n </Button>\n ))}\n </Box>\n )}\n </Box>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport Skeleton from \"@mui/material/Skeleton\";\n\nexport interface SkeletonCardProps {\n width?: number | string;\n animation?: \"pulse\" | \"wave\" | false;\n}\n\nexport const SkeletonCard = ({ width = \"100%\", animation = false }: SkeletonCardProps) => {\n return (\n <Box width={width}>\n <Skeleton animation={animation} variant=\"rectangular\" height={118} />\n <Skeleton animation={animation} variant=\"rectangular\" height={16} sx={{ my: 1 }} />\n <Skeleton animation={animation} variant=\"rectangular\" width=\"80%\" height={16} />\n </Box>\n );\n};\n","import Grid from \"@mui/material/Grid\";\nimport { newArrayWithSize } from \"../utils\";\nimport { SkeletonCard } from \"../skeleton-card\";\n\nexport interface SkeletonGridProps {\n size?: number;\n}\n\nexport const SkeletonGrid = ({ size = 20 }: SkeletonGridProps) => {\n return (\n <Grid container spacing={2}>\n {newArrayWithSize(size, 0).map((_, i) => (\n <Grid item key={i} xs={4}>\n <SkeletonCard width={1} />\n </Grid>\n ))}\n </Grid>\n );\n};\n","import Container from \"@mui/material/Container\";\nimport { PropsWithChildren } from \"react\";\nimport { SkeletonGrid } from \"../skeleton-grid\";\n\nexport type ContentPlaceholderProps = PropsWithChildren<{\n size?: number;\n p?: number;\n}>;\n\nexport const ContentPlaceholder = ({ size = 20, children, p }: ContentPlaceholderProps) => {\n return (\n <Container component=\"main\" sx={{ p }} data-testid=\"content-placeholder-test\">\n {children}\n <SkeletonGrid size={size} />\n </Container>\n );\n};\n","const visuallyHidden = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n};\nexport default visuallyHidden;","import TableSortLabel from \"@mui/material/TableSortLabel\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Box from \"@mui/material/Box\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableHead from \"@mui/material/TableHead\";\nimport { visuallyHidden } from \"@mui/utils\";\n\nexport type Order = \"asc\" | \"desc\";\nexport interface HeadCell<T> {\n disablePadding: boolean;\n id: keyof T;\n label: string;\n numeric: boolean;\n sort: boolean;\n}\n\ninterface EnhancedTableHeadProps<T> {\n onRequestSort: (property: keyof T) => void;\n order: Order;\n orderBy: keyof T;\n headCells: HeadCell<T>[];\n}\n\nexport const EnhancedTableHead = <T,>({\n order,\n orderBy,\n headCells,\n onRequestSort,\n}: EnhancedTableHeadProps<T>) => {\n const createSortHandler = (property: keyof T) => () => {\n onRequestSort(property);\n };\n\n return (\n <TableHead>\n <TableRow>\n {headCells.map((headCell) => (\n <TableCell\n variant=\"head\"\n key={String(headCell.id)}\n padding={headCell.disablePadding ? \"none\" : \"normal\"}\n sortDirection={orderBy === headCell.id ? order : false}\n sx={{ fontWeight: \"bold\" }}\n >\n {headCell.sort ? (\n <TableSortLabel\n active={orderBy === headCell.id}\n direction={orderBy === headCell.id ? order : \"asc\"}\n onClick={createSortHandler(headCell.id)}\n >\n {headCell.label}\n {orderBy === headCell.id ? (\n <Box component=\"span\" sx={visuallyHidden}>\n {order === \"desc\" ? \"sorted descending\" : \"sorted ascending\"}\n </Box>\n ) : null}\n </TableSortLabel>\n ) : (\n headCell.label\n )}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n );\n};\n","import { ChangeEvent } from \"react\";\nimport { ReactNode, useState } from \"react\";\nimport Box from \"@mui/material/Box\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TextField from \"@mui/material/TextField\";\nimport TableBody from \"@mui/material/TableBody\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport Table from \"@mui/material/Table\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Search from \"@mui/icons-material/Search\";\nimport { EnhancedTableHead, HeadCell, Order } from \"./enhanced-table-head\";\n\nfunction getFilter<T>(columns: HeadCell<T>[], search: string) {\n return (d: T) => {\n return (\n !search ||\n columns.some((col) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let value = (d as any)[col.id];\n if (value?.toLowerCase) {\n value = value.toLowerCase();\n }\n return value?.toString().includes(search.toLowerCase());\n })\n );\n };\n}\n\nfunction getComparator<T>(order: Order, orderBy: keyof T): (a: T, b: T) => number {\n return order === \"desc\"\n ? (a, b) => descendingComparator(a, b, orderBy)\n : (a, b) => -descendingComparator(a, b, orderBy);\n}\nfunction descendingComparator<T>(a: T, b: T, orderBy: keyof T) {\n if (b[orderBy] < a[orderBy]) {\n return -1;\n }\n if (b[orderBy] > a[orderBy]) {\n return 1;\n }\n return 0;\n}\n\ninterface Props<T> {\n readonly data: T[];\n search?: boolean;\n defaultSort: keyof T;\n defaultOrder?: Order;\n loading?: boolean;\n columns: HeadCell<T>[];\n children: (data: T[]) => ReactNode;\n}\n\nexport const EnhancedTable = <T,>({\n children,\n data,\n search,\n columns,\n defaultSort,\n defaultOrder = \"asc\",\n loading = false,\n}: Props<T>) => {\n const [searchFilter, setSearchFilter] = useState<string>(\"\");\n const [order, setOrder] = useState<Order>(defaultOrder);\n const [orderBy, setOrderBy] = useState<keyof T>(defaultSort);\n\n const handleRequestSort = (property: keyof T) => {\n const isAsc = orderBy === property && order === \"asc\";\n setOrder(isAsc ? \"desc\" : \"asc\");\n setOrderBy(property);\n };\n\n const filteredData = data\n .slice()\n .filter(getFilter<T>(columns, searchFilter))\n .sort(getComparator(order, orderBy));\n\n return (\n <>\n <Box sx={{ paddingX: 1, paddingBottom: 2 }}>\n {search && (\n <Box paddingY={2}>\n <TextField\n fullWidth\n placeholder=\"Search\"\n InputProps={{\n role: \"search\",\n startAdornment: (\n <InputAdornment position=\"start\">\n <Search />\n </InputAdornment>\n ),\n }}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setSearchFilter(e.target.value)}\n />\n </Box>\n )}\n <TableContainer>\n <Table>\n <EnhancedTableHead\n order={order}\n orderBy={orderBy}\n headCells={columns}\n onRequestSort={handleRequestSort}\n />\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell colSpan={columns.length} sx={{ textAlign: \"center\" }}>\n <CircularProgress />\n </TableCell>\n </TableRow>\n ) : filteredData.length === 0 ? (\n <TableRow>\n <TableCell colSpan={columns.length} sx={{ textAlign: \"center\" }}>\n No data\n </TableCell>\n </TableRow>\n ) : (\n children(filteredData)\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </Box>\n </>\n );\n};\n\nEnhancedTable.defaultProps = {\n defaultOrder: \"asc\",\n};\n","import { ReactNode, useState } from \"react\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport TableCell from \"@mui/material/TableCell\";\nimport { EnhancedTableHead, HeadCell, Order } from \"../enhanced-table\";\n\nexport interface EnhancedRemoteTableProps<T> {\n data: T[];\n loading: boolean;\n defaultSort: keyof T;\n defaultOrder?: Order;\n columns: HeadCell<T>[];\n children: (data: T, index: number) => ReactNode;\n onRequestSort: (col: keyof T, orderBy: \"asc\" | \"desc\") => void;\n}\n\nexport const EnhancedRemoteTable = <T,>({\n children,\n data,\n loading,\n columns,\n defaultSort,\n defaultOrder,\n onRequestSort,\n}: EnhancedRemoteTableProps<T>) => {\n const [order, setOrder] = useState({\n orderBy: defaultSort,\n order: defaultOrder || \"asc\",\n });\n\n const handleRequestSort = (property: keyof T) => {\n setOrder(({ orderBy, order }) => {\n const newOrder = orderBy === property && order === \"asc\" ? \"desc\" : \"asc\";\n onRequestSort(property, newOrder);\n\n return {\n orderBy: property,\n order: newOrder,\n };\n });\n };\n\n return (\n <>\n <TableContainer>\n <Table>\n <EnhancedTableHead\n order={order.order}\n orderBy={order.orderBy}\n headCells={columns}\n onRequestSort={handleRequestSort}\n />\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell colSpan={columns.length} sx={{ textAlign: \"center\" }}>\n <CircularProgress />\n </TableCell>\n </TableRow>\n ) : (\n data.map((d, i) => children(d, i))\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </>\n );\n};\n","import { useState } from \"react\";\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport { SxProps, Theme, useTheme } from \"@mui/material/styles\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport EditIcon from \"@mui/icons-material/Edit\";\n\nexport interface ValueEditButtonsProps {\n onClickCancel: () => void;\n onClickSubmit: () => void;\n sx?: SxProps<Theme>;\n}\n\nexport const ValueEditButtons = ({ onClickCancel, onClickSubmit, sx }: ValueEditButtonsProps) => {\n return (\n <InputAdornment position=\"end\" sx={sx}>\n <Button\n variant=\"contained\"\n size=\"small\"\n color=\"error\"\n aria-label=\"cancel button\"\n startIcon={<ClearIcon sx={{ fontSize: 12 }} />}\n onClick={onClickCancel}\n sx={{ paddingRight: 0, minWidth: 0, marginRight: 1 }}\n />\n <Button\n variant=\"contained\"\n size=\"small\"\n color=\"primary\"\n aria-label=\"submit button\"\n startIcon={<CheckIcon sx={{ fontSize: 12 }} />}\n onClick={onClickSubmit}\n sx={{ paddingRight: 0, minWidth: 0 }}\n />\n </InputAdornment>\n );\n};\n\n/**\n * Hook to manage the editing behaviour\n */\nexport const useEditableValueDisplay = <T,>(\n initialValue: T | undefined,\n onEdit: (value?: T) => void,\n) => {\n const [isEditing, setIsEditing] = useState(false);\n const [editValue, setEditValue] = useState<T | undefined>(initialValue);\n\n const cancelEdit = () => {\n setIsEditing(false);\n setEditValue(initialValue);\n };\n const startEdit = () => {\n setIsEditing(true);\n };\n\n const submitEdit = () => {\n onEdit(editValue);\n cancelEdit();\n };\n\n return { isEditing, cancelEdit, editValue, setEditValue, startEdit, submitEdit };\n};\n\nexport interface ValueEditButtonProps {\n dense?: boolean;\n onClick: () => void;\n}\n\nexport const ValueEditButton = ({ dense, onClick }: ValueEditButtonProps) => {\n const { typography } = useTheme();\n return (\n <IconButton\n size=\"small\"\n onClick={onClick}\n sx={{ ml: dense ? 0.5 : 1 }}\n aria-label=\"edit button\"\n >\n <EditIcon sx={{ fontSize: typography.pxToRem(dense ? 18 : 24) }} />\n </IconButton>\n );\n};\n","export interface BaseValueProps<T> {\n /**\n * Name of the displayed value\n */\n label: string;\n\n /**\n * Value displayed\n */\n value?: T;\n\n /**\n * String rendered if value is undefined\n */\n placeholder?: string;\n\n /**\n * The value has to be displayed as compact or not.\n * False by default\n */\n dense?: boolean;\n}\n\nexport interface EditableValueProps<T> {\n /**\n * This field can be edited or not\n */\n editable?: boolean;\n\n /**\n * Callback executed when the value is edited\n */\n onEdit?: (value?: T) => void;\n}\n\nexport const DefaultPlaceholder = \"-\";\n","import { SxProps, Theme, useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Typography from \"@mui/material/Typography\";\n\nexport const getValueContentLabelId = (label: string): string =>\n `label-${label.replace(/ /g, \"-\")}`;\n\nexport interface ValueContentProps {\n /**\n * Name of the displayed value\n */\n label: string;\n\n /**\n * If true, the label will not be shown\n */\n hideLabel?: boolean;\n\n /**\n * If defined, a tooltip is going to be added arround the children;\n */\n tooltip?: string;\n\n /**\n * Timeout before the tooltip appears when the user hovers the value\n */\n tooltipEnterDelay?: number;\n\n /**\n * Component that's going to be renderd under the label\n */\n children: React.ReactElement<any, any>;\n\n /**\n * The value has to be displayed as compact or not.\n * False by default\n */\n dense?: boolean;\n\n /**\n * Custom styles for the root component\n */\n sx?: SxProps<Theme>;\n}\n\n/**\n * Displays a string value with a label\n */\nexport const ValueContent = ({\n label,\n hideLabel,\n tooltip,\n tooltipEnterDelay = 2000,\n children,\n dense,\n sx,\n}: ValueContentProps) => {\n const { typography } = useTheme();\n const id = getValueContentLabelId(label);\n\n return (\n <Box width={1} lineHeight={dense ? 0 : undefined} sx={sx}>\n {!hideLabel && (\n <Typography\n variant={dense ? \"caption\" : \"subtitle2\"}\n role=\"label\"\n id={id}\n lineHeight={dense ? typography.pxToRem(15) : undefined}\n >\n {label}\n </Typography>\n )}\n {tooltip ? (\n <Tooltip title={tooltip} placement=\"top\" enterDelay={tooltipEnterDelay}>\n {children}\n </Tooltip>\n ) : (\n children\n )}\n </Box>\n );\n};\n","import Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { useEffect, useRef } from \"react\";\nimport {\n BaseValueProps,\n DefaultPlaceholder,\n EditableValueProps,\n useEditableValueDisplay,\n ValueEditButton,\n ValueEditButtons,\n} from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\n\nexport type ValueTextProps = BaseValueProps<string | number> & EditableValueProps<string>;\n\n/**\n * Displays a string value with a label\n */\nexport const ValueText = ({\n label,\n value: valueProp,\n placeholder = DefaultPlaceholder,\n editable,\n dense,\n onEdit = () => null,\n}: ValueTextProps) => {\n const editInputRef = useRef<HTMLInputElement>(null);\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(valueProp?.toString(), onEdit);\n const id = getValueContentLabelId(label);\n const value = valueProp?.toString() || placeholder;\n\n const editKeyPressListener = (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n onEdit((e.target as any).value);\n }\n };\n\n useEffect(() => {\n editInputRef.current?.addEventListener(\"keypress\", editKeyPressListener);\n return () => editInputRef.current?.removeEventListener(\"keypress\", editKeyPressListener);\n }, [editInputRef.current]);\n\n return (\n <ValueContent hideLabel={isEditing} label={label} tooltip={value} dense={dense}>\n {isEditing ? (\n <TextField\n inputRef={editInputRef}\n value={editValue}\n label={label}\n size=\"small\"\n onChange={(e) => setEditValue(e.target.value)}\n InputProps={{\n endAdornment: (\n <ValueEditButtons onClickCancel={cancelEdit} onClickSubmit={submitEdit} />\n ),\n }}\n sx={{ marginY: !dense ? 1 : 0 }}\n />\n ) : (\n <Box display=\"flex\" aria-labelledby={id}>\n <Typography variant={dense ? \"body1\" : \"h5\"} noWrap>\n {value}\n </Typography>\n {editable && <ValueEditButton dense={dense} onClick={startEdit} />}\n </Box>\n )}\n </ValueContent>\n );\n};\n","import Paper from \"@mui/material/Paper\";\nimport { PropsWithChildren } from \"react\";\n\nexport type ValueCardProps = PropsWithChildren;\n\n/**\n * Container to show a labeled value\n */\nexport const ValueCard = ({ children }: ValueCardProps) => {\n return <Paper sx={{ p: 2 }}>{children}</Paper>;\n};\n","import { useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport Switch from \"@mui/material/Switch\";\nimport Typography from \"@mui/material/Typography\";\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport {\n BaseValueProps,\n DefaultPlaceholder,\n EditableValueProps,\n useEditableValueDisplay,\n ValueEditButton,\n ValueEditButtons,\n} from \"../value-base\";\nimport { ValueContent, getValueContentLabelId } from \"../value-content\";\n\nexport type ValueBooleanProps = BaseValueProps<boolean> & EditableValueProps<boolean>;\n\n/**\n * Displays a boolean value with a label\n */\nexport const ValueBoolean = ({\n label,\n value,\n placeholder = DefaultPlaceholder,\n editable,\n dense,\n onEdit = () => null,\n}: ValueBooleanProps) => {\n const id = getValueContentLabelId(label);\n const { typography } = useTheme();\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(value, onEdit);\n\n const iconSx = { fontSize: dense ? typography.h6.fontSize : typography.h5.fontSize };\n\n return (\n <ValueContent label={label} dense={dense}>\n {isEditing ? (\n <Box display=\"flex\" alignItems=\"center\">\n <Switch\n size={dense ? \"small\" : \"medium\"}\n checked={editValue}\n onChange={(e) => setEditValue(e.target.checked)}\n />\n <ValueEditButtons onClickCancel={cancelEdit} onClickSubmit={submitEdit} />\n </Box>\n ) : (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n aria-labelledby={id}\n role=\"checkbox\"\n aria-checked={value}\n >\n {value === undefined ? (\n <Typography variant=\"h5\">{placeholder}</Typography>\n ) : value ? (\n <CheckIcon color=\"success\" sx={iconSx} />\n ) : (\n <CloseIcon color=\"error\" sx={iconSx} />\n )}\n {editable && <ValueEditButton dense={dense} onClick={startEdit} />}\n </Box>\n )}\n </ValueContent>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport TextField from \"@mui/material/TextField\";\nimport Typography from \"@mui/material/Typography\";\nimport { format } from \"date-fns\";\nimport { BaseValueProps, DefaultPlaceholder, EditableValueProps } from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\nimport { useEditableValueDisplay, ValueEditButton, ValueEditButtons } from \"../value-base\";\nimport { DatePicker } from \"@mui/x-date-pickers/DatePicker\";\nimport { DateTimePicker } from \"@mui/x-date-pickers/DateTimePicker\";\nimport { TimePicker } from \"@mui/x-date-pickers/TimePicker\";\n\nexport type EditInputType = \"datetime\" | \"date\" | \"time\";\n\nexport interface ValueDatetimeProps extends BaseValueProps<Date>, EditableValueProps<Date> {\n /**\n * Datetime format\n */\n format: string;\n\n /**\n * Edit input type\n */\n editInputType?: EditInputType;\n}\n\n/**\n * Displays a formated datetime with a label\n */\nexport const ValueDatetime = ({\n label,\n value: valueProp,\n format: fmt,\n placeholder = DefaultPlaceholder,\n editable,\n editInputType = \"datetime\",\n dense,\n onEdit = () => null,\n}: ValueDatetimeProps) => {\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(valueProp, onEdit);\n const id = getValueContentLabelId(label);\n const value = (valueProp && format(valueProp, fmt)) || placeholder;\n\n const EditPickerComponent =\n editInputType === \"datetime\"\n ? DateTimePicker\n : editInputType === \"time\"\n ? TimePicker\n : DatePicker;\n\n return (\n <ValueContent\n label={label}\n hideLabel={isEditing}\n tooltip={value}\n dense={dense}\n sx={{ display: \"flex\", flexDirection: \"column\" }}\n >\n {isEditing ? (\n <EditPickerComponent\n value={editValue}\n format={fmt}\n label={label}\n onChange={(newValue) => setEditValue(newValue ? newValue : undefined)}\n slots={{\n textField: (params) => (\n <TextField\n {...params}\n size=\"small\"\n InputProps={{\n ...params.InputProps,\n endAdornment: (\n <>\n {params.InputProps?.endAdornment}\n <ValueEditButtons\n onClickCancel={cancelEdit}\n onClickSubmit={submitEdit}\n sx={{ ml: 2 }}\n />\n </>\n ),\n sx: { marginY: !dense ? 1 : 0.2 },\n }}\n />\n ),\n }}\n />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" aria-labelledby={id}>\n <Typography variant={dense ? \"body1\" : \"h5\"} noWrap>\n {value}\n </Typography>\n {editable && <ValueEditButton dense={dense} onClick={startEdit} />}\n </Box>\n )}\n </ValueContent>\n );\n};\n","import Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { ValueItemElement } from \"../value-item\";\n\nexport interface GroupValueCardProps {\n title: string;\n subtitle?: string;\n centered?: boolean;\n children: ValueItemElement | ValueItemElement[];\n dense?: boolean;\n}\n\nexport const GroupValueCard = ({\n title,\n subtitle,\n centered,\n children,\n dense,\n}: GroupValueCardProps) => {\n const { typography } = useTheme();\n const defaultColor = useGetDefaultThemeColor({ lightWeight: 200, darkWeight: 800 });\n\n return (\n <Paper\n sx={{\n paddingBottom: dense ? 0 : 1,\n }}\n >\n <Box\n bgcolor={defaultColor}\n px={dense ? 1 : 2}\n py={dense ? 0.5 : 1}\n lineHeight={dense ? 0 : undefined}\n >\n <Typography variant={dense ? \"body1\" : \"h6\"} role=\"heading\" aria-level={1}>\n {title}\n </Typography>\n {subtitle && (\n <Typography\n variant={dense ? \"caption\" : \"body2\"}\n role=\"heading\"\n aria-level={2}\n lineHeight={dense ? typography.pxToRem(15) : undefined}\n >\n {subtitle}\n </Typography>\n )}\n </Box>\n <Grid\n container\n padding={1}\n rowSpacing={dense ? 1 : 2}\n justifyContent={centered ? \"center\" : \"flex-start\"}\n >\n {children}\n </Grid>\n </Paper>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport Rating from \"@mui/material/Rating\";\nimport { useEditableValueDisplay, ValueEditButton, ValueEditButtons } from \"../value-base\";\nimport { BaseValueProps, EditableValueProps } from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\n\nexport type ValueRatingProps = BaseValueProps<number> & {\n maxRating?: number;\n} & EditableValueProps<number>;\n\n/**\n * Displays a number using stars\n */\nexport const ValueRating = ({\n label,\n value = 0,\n maxRating = 5,\n editable,\n dense,\n onEdit = () => null,\n}: ValueRatingProps) => {\n const { isEditing, editValue, startEdit, cancelEdit, setEditValue, submitEdit } =\n useEditableValueDisplay(value, onEdit);\n const id = getValueContentLabelId(label);\n\n return (\n <ValueContent label={label} tooltip={value.toString()} dense={dense}>\n <Box display=\"flex\" alignItems=\"center\" aria-labelledby={id}>\n <Rating\n readOnly={!isEditing}\n max={maxRating}\n size={dense ? \"small\" : \"medium\"}\n value={isEditing ? editValue : value}\n onChange={(e, newValue) => {\n if (Number.isNaN(newValue) && (e.currentTarget as any).value) {\n setEditValue(parseInt((e.currentTarget as any).value, 10));\n } else if (newValue) {\n setEditValue(newValue);\n }\n }}\n />\n {editable && !isEditing && <ValueEditButton dense={dense} onClick={startEdit} />}\n {isEditing && <ValueEditButtons onClickCancel={cancelEdit} onClickSubmit={submitEdit} />}\n </Box>\n </ValueContent>\n );\n};\n","import Grid, { GridProps } from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\nimport { ResponsiveStyleValue } from \"@mui/system\";\nimport { PropsWithChildren, FunctionComponent, ReactElement } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\n\nexport type ValueItemProps = PropsWithChildren<\n Omit<GridProps, \"item\" | \"container\"> & { bordered?: ResponsiveStyleValue<boolean> }\n>;\nexport type ValueItemComponent = FunctionComponent<ValueItemProps>;\nexport type ValueItemElement = ReactElement<ValueItemProps, ValueItemComponent>;\n\nexport const valueItemClasses = {\n root: \"RdsValueItem-root\",\n content: \"RdsValueItem-content\",\n};\n\nconst resolveBorderStyle = (bordered: ResponsiveStyleValue<boolean>, color: string) => {\n const borderStyle = `solid ${color} 1px`;\n const noBorder = \"none\";\n\n if (!bordered) {\n return undefined;\n }\n\n if (Array.isArray(bordered)) {\n return bordered.map((b) => (b ? borderStyle : noBorder));\n }\n\n if (typeof bordered === \"object\") {\n const style: Record<string, string | undefined> = {};\n Object.entries(bordered).forEach(([key, value]) => {\n style[key] = value ? borderStyle : noBorder;\n });\n return style;\n }\n\n return borderStyle;\n};\n\nexport const ValueItem: ValueItemComponent = ({\n children,\n bordered = true,\n ...rest\n}: ValueItemProps) => {\n const defaultColor = useGetDefaultThemeColor({ lightWeight: 200, darkWeight: 800 });\n const borderLeft = resolveBorderStyle(bordered, defaultColor);\n return (\n <Grid item className={valueItemClasses.root} {...rest}>\n <Box className={valueItemClasses.content} px={1} borderLeft={borderLeft}>\n {children}\n </Box>\n </Grid>\n );\n};\n","import { BaseValueProps, DefaultPlaceholder } from \"../value-base\";\nimport { getValueContentLabelId, ValueContent } from \"../value-content\";\nimport { Label, LabelVariant } from \"../label\";\nimport Grid from \"@mui/material/Grid\";\n\nexport type ValueLabelProps = BaseValueProps<string | number | string[] | number[]> & {\n variant?: LabelVariant | LabelVariant[];\n color?: string | string[];\n};\n\n/**\n * Displays a label component value with a label\n */\nexport const ValueLabel = ({\n label,\n value: valueProp,\n placeholder = DefaultPlaceholder,\n color,\n variant,\n}: ValueLabelProps) => {\n const id = getValueContentLabelId(label);\n const value = Array.isArray(valueProp) ? (\n valueProp.map((value, i) => (\n <Label\n text={value.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[i] : variant}\n color={Array.isArray(color) ? color[i] : color}\n key={i}\n />\n ))\n ) : (\n <Label\n text={valueProp?.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[0] : variant}\n color={Array.isArray(color) ? color[0] : color}\n />\n );\n\n return (\n <ValueContent label={label}>\n <Grid container gap={1} aria-labelledby={id}>\n {value}\n </Grid>\n </ValueContent>\n );\n};\n","import { ReactNode } from \"react\";\nimport { DrawerProvider, DrawerProviderProps } from \"../drawer-provider\";\nimport { DrawerMain } from \"../drawer-main\";\nimport { DrawerAppBarElement, DrawerElement } from \"../drawer/drawer.types\";\n\nexport interface DrawerLayoutProps {\n drawerProviderProps?: DrawerProviderProps;\n children: [DrawerElement, DrawerAppBarElement, ReactNode];\n}\n\nexport const DrawerLayout = ({\n drawerProviderProps,\n children: childrenProps,\n}: DrawerLayoutProps) => {\n const [appBar, drawer, children] = childrenProps;\n\n return (\n <DrawerProvider {...drawerProviderProps}>\n {appBar}\n {drawer}\n <DrawerMain>{children}</DrawerMain>\n </DrawerProvider>\n );\n};\n","import Box from \"@mui/material/Box\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { LoadingArea } from \"../loading-area\";\nimport { TabProvider } from \"../tab-provider\";\nimport ReportProblemIcon from \"@mui/icons-material/ReportProblem\";\nimport { Placeholder, PlaceholderIcon } from \"../placeholder\";\nimport { HeaderElement } from \"../header\";\nimport { ContentElement } from \"../content\";\n\nexport interface HeaderLayoutError {\n icon?: PlaceholderIcon;\n title?: string;\n message: string;\n}\n\nexport interface HeaderLayoutProps {\n loading?: boolean;\n fetching?: boolean;\n error?: HeaderLayoutError;\n children: [HeaderElement, ContentElement];\n}\n\nconst DefaultErrorIcon = () => <ReportProblemIcon color=\"error\" sx={{ width: 200, height: 200 }} />;\n\nexport const HeaderLayout = ({ loading, children, fetching, error }: HeaderLayoutProps) => {\n const [headerElement, contentElement] = children;\n\n return (\n <TabProvider>\n <Box display=\"flex\" flexDirection=\"column\" height={1}>\n {headerElement}\n {fetching && (\n <Box width={1}>\n <LinearProgress />\n </Box>\n )}\n {loading && <LoadingArea />}\n {error && (\n <Box mt={4}>\n <Placeholder\n icon={error.icon || DefaultErrorIcon}\n title={error.title || \"There has been an error\"}\n subtitle={error.message}\n />\n </Box>\n )}\n {!loading && !error && contentElement}\n </Box>\n </TabProvider>\n );\n};\n","import { AlertColor } from \"@mui/material/Alert\";\nimport { createContext, useContext } from \"react\";\n\nexport const NotificationCenterProviderUndefinedError = new Error(\n \"NotificationCenterContext.Provider is required and was undefined\",\n);\n\nexport interface Notification {\n severity: AlertColor;\n title?: string;\n message: string;\n}\n\nexport interface NotificationCenterProps {\n show(notification: Notification): void;\n hide(): void;\n}\n\nexport const NotificationCenterContext = createContext<NotificationCenterProps | undefined>(\n undefined,\n);\n\nexport const useNotificationCenter = () => {\n const context = useContext(NotificationCenterContext);\n\n if (context === undefined) {\n throw NotificationCenterProviderUndefinedError;\n }\n\n return context;\n};\n","import { useState, PropsWithChildren } from \"react\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport Alert from \"@mui/material/Alert\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport { Notification, NotificationCenterContext } from \"./notification-center.context\";\n\nexport type NotificationCenterProviderProps = PropsWithChildren<{\n autoHideDuration?: number;\n}>;\n\nexport const NotificationCenterProvider = ({\n children,\n autoHideDuration = 6000,\n}: NotificationCenterProviderProps) => {\n const [notification, setNotification] = useState<Notification | undefined>(undefined);\n const [open, setOpen] = useState(false);\n const show = (notification: Notification) => {\n setNotification(notification);\n setOpen(true);\n };\n\n const hide = () => {\n setOpen(false);\n };\n\n return (\n <NotificationCenterContext.Provider\n value={{\n show,\n hide,\n }}\n >\n <Snackbar\n open={open}\n autoHideDuration={autoHideDuration}\n onClose={hide}\n anchorOrigin={{ vertical: \"top\", horizontal: \"right\" }}\n >\n <Alert\n onClose={hide}\n severity={notification?.severity}\n aria-label={notification?.severity}\n sx={{ width: \"100%\" }}\n >\n {notification?.title && <AlertTitle>{notification?.title}</AlertTitle>}\n {notification?.message}\n </Alert>\n </Snackbar>\n {children}\n </NotificationCenterContext.Provider>\n );\n};\n","import { useEffect, useRef } from \"react\";\nimport { useNotificationCenter, Notification } from \"./notification-center.context\";\n\nexport interface NotifyWhenValueChangesOptions<T> {\n from: T;\n to: T;\n}\n\nexport const useNotifyWhenValueChanges = <T>(\n notification: Notification,\n value: T | undefined,\n { from, to }: NotifyWhenValueChangesOptions<T>,\n) => {\n const prevRef = useRef<T>(undefined);\n const { show } = useNotificationCenter();\n\n useEffect(() => {\n if (prevRef.current === from && value === to) {\n show(notification);\n }\n prevRef.current = value;\n }, [value]);\n};\n","import Grid from \"@mui/material/Grid\";\nimport { newBreakpointsCounter } from \"../utils/breakpoints\";\nimport { ValueBoolean } from \"../value-boolean\";\nimport { ValueDatetime } from \"../value-datetime\";\nimport { ValueText } from \"../value-text\";\nimport { GroupValueCard } from \"../group-value-card\";\nimport { ValueItem } from \"../value-item\";\nimport {\n ArrayGroupField,\n ArrayInstanceType,\n BasicModelInstance,\n GroupField,\n GroupInstanceType,\n Model,\n ModelField,\n} from \"../generators/generators.model\";\nimport { GridColDef, DataGrid } from \"@mui/x-data-grid\";\n\ninterface SingleDetailValueFactoryOptions {\n dense?: boolean;\n}\n\nconst singleDetailValueFactory = <T extends BasicModelInstance>(\n field: ModelField,\n instance: T | GroupInstanceType,\n { dense }: SingleDetailValueFactoryOptions = {},\n) => {\n const { id, name, type } = field;\n const value = instance[id];\n if (type === \"boolean\") {\n return <ValueBoolean dense={dense} label={name} value={value as boolean} />;\n } else if (type === \"date\" || type === \"time\" || type === \"datetime\") {\n return <ValueDatetime dense={dense} label={name} value={value as Date} format={field.format} />;\n }\n\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return <ValueText dense={dense} label={name} value={JSON.stringify(value)} />;\n }\n return <ValueText dense={dense} label={name} value={value?.toString()} />;\n};\n\ninterface ObjectArrayGroupProps {\n field: ArrayGroupField;\n instance: ArrayInstanceType;\n dense?: boolean;\n}\n\nconst ObjectArrayGroup = ({\n field: { name, description, value },\n instance,\n dense,\n}: ObjectArrayGroupProps) => {\n const columns: GridColDef[] = [{ field: \"id\", headerName: \"ID\", width: 70 }];\n\n value.forEach((column) => {\n columns.push({\n field: column.id,\n headerName: column.name,\n });\n });\n\n const rows = instance.map((f, id) => ({\n id,\n ...f,\n }));\n\n return (\n <GroupValueCard title={name} subtitle={description} dense={dense}>\n <Grid item xs={12}>\n <DataGrid\n rows={rows}\n columns={columns}\n density={dense ? \"compact\" : \"standard\"}\n disableRowSelectionOnClick\n pageSizeOptions={[5]}\n initialState={{\n pagination: {\n paginationModel: {\n pageSize: 5,\n },\n },\n }}\n sx={{ height: 400 }}\n />\n </Grid>\n </GroupValueCard>\n );\n};\n\ninterface ObjectDetailGroupProps {\n field: GroupField;\n instance: GroupInstanceType;\n dense?: boolean;\n}\n\nconst ObjectDetailGroup = ({\n field: { name, description, value },\n instance,\n dense,\n}: ObjectDetailGroupProps) => {\n const breakpointsCounter = newBreakpointsCounter();\n\n return (\n <GroupValueCard title={name} subtitle={description} dense={dense}>\n {value.map((field) => {\n const { id, xs, sm, md, lg, xl } = field;\n const bordered = breakpointsCounter.increment(field);\n return (\n <ValueItem key={id} xs={xs} sm={sm} md={md} lg={lg} xl={xl} bordered={bordered}>\n {singleDetailValueFactory(field, instance, { dense })}\n </ValueItem>\n );\n })}\n </GroupValueCard>\n );\n};\n\nexport interface ObjectDetailsProps<T extends BasicModelInstance> {\n model: Model;\n dense?: boolean;\n instance: T;\n}\n\nexport const ObjectDetails = <T extends BasicModelInstance>({\n model,\n instance,\n dense,\n}: ObjectDetailsProps<T>) => {\n const breakpointsCounter = newBreakpointsCounter();\n return (\n <Grid container spacing={dense ? 1 : 2}>\n {model.fields.map((field) => {\n const { id, type, xs = 3, sm = 0, md = 0, lg = 0, xl = 0 } = field;\n\n if (type === \"group\") {\n breakpointsCounter.increment({ xs: 12 });\n return (\n <Grid item key={id} xs={12}>\n <ObjectDetailGroup\n field={field}\n instance={instance[id] as GroupInstanceType}\n dense={dense}\n />\n </Grid>\n );\n }\n\n if (type === \"group[]\") {\n breakpointsCounter.increment({ xs: 12 });\n return (\n <Grid item key={id} xs={12}>\n <ObjectArrayGroup field={field} instance={instance[id] as any} dense={dense} />\n </Grid>\n );\n }\n\n const bordered = breakpointsCounter.increment(field);\n return (\n <ValueItem key={id} xs={xs} sm={sm} md={md} lg={lg} xl={xl} bordered={bordered}>\n {singleDetailValueFactory(field, instance, { dense })}\n </ValueItem>\n );\n })}\n </Grid>\n );\n};\n","/**\n * MODEL TYPES\n * Types used to specify the model\n */\nexport type ModelFieldTypes =\n | \"string\"\n | \"number\"\n | \"string[]\"\n | \"number[]\"\n | \"boolean\"\n | \"enum\"\n | \"multienum\"\n | \"date\"\n | \"time\"\n | \"datetime\";\n\ntype Base = {\n id: string;\n description: string;\n name: string;\n listable?: boolean;\n updatable?: boolean;\n required?: boolean;\n};\n\ntype Breakpoints = {\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n};\n\ntype StringField = {\n type: \"string\";\n};\n\ntype StringArrayField = {\n type: \"string[]\";\n};\n\ntype NumberField = {\n type: \"number\";\n};\n\ntype NumberArrayField = {\n type: \"number[]\";\n};\n\ntype BooleanField = {\n type: \"boolean\";\n};\n\ntype EnumField = {\n type: \"enum\";\n value: string[];\n};\n\ntype MultiEnumField = {\n type: \"multienum\";\n value: string[];\n};\n\ntype DateField = {\n type: \"date\";\n format: string;\n default: Date;\n};\n\ntype TimeField = {\n type: \"time\";\n format: string;\n default: Date;\n};\n\ntype DatetimeField = {\n type: \"datetime\";\n format: string;\n default: Date;\n};\n\ntype SingleFields =\n | StringField\n | NumberField\n | StringArrayField\n | NumberArrayField\n | BooleanField\n | EnumField\n | MultiEnumField\n | DateField\n | TimeField\n | DatetimeField;\n\nexport type GroupField = {\n type: \"group\";\n value: (Base & Breakpoints & SingleFields)[];\n} & Base;\n\nexport type ArrayGroupField = {\n type: \"group[]\";\n value: (Base & Breakpoints & SingleFields)[];\n} & Base;\n\ntype Fields = SingleFields | GroupField | ArrayGroupField;\nexport type ModelField = Base & Breakpoints & Fields;\n\nexport type Model = {\n fields: ModelField[];\n};\n\n/**\n * INSTANCE TYPES\n * Types used to represent an instance of a model specification\n */\nexport type BaseFieldType = string | number | boolean | Date;\nexport type ArrayFieldType = string[] | number[];\nexport type SingleFieldType = BaseFieldType | ArrayFieldType;\nexport type GroupInstanceType = { [key: string]: SingleFieldType };\nexport type ArrayInstanceType = { [key: string]: SingleFieldType }[];\nexport type FieldType = SingleFieldType | GroupInstanceType;\n\nexport interface BasicModelInstance {\n id: string;\n [key: string]: FieldType;\n}\n\n/**\n * UTILITIES\n * Some functions used in several places to help to manage models\n */\nconst InitialStateZeroValue: Record<ModelFieldTypes | \"group\" | \"group[]\", FieldType | undefined> =\n {\n string: \"\",\n number: 0,\n boolean: false,\n enum: \"\",\n multienum: [],\n date: new Date(1970, 0, 1, 0, 0),\n time: new Date(1970, 0, 1, 0, 0),\n datetime: new Date(1970, 0, 1, 0, 0),\n group: {},\n \"group[]\": [],\n \"string[]\": [],\n \"number[]\": [],\n };\n\nconst getFieldValueOrZero = (\n field: ModelField,\n values: BasicModelInstance | GroupInstanceType | undefined,\n) => {\n return (\n (values && values[field.id]) ||\n (\"default\" in field && field.default) ||\n InitialStateZeroValue[field.type]\n );\n};\n\nexport const newInstanceFromValuesOrZeroValue = <T extends BasicModelInstance>(\n model: Model,\n values: T | undefined = undefined,\n): T => {\n const obj: Record<string, FieldType | undefined> = {};\n\n model.fields.forEach((field) => {\n if (field.type === \"group\") {\n const value: GroupInstanceType = {};\n field.value.forEach((groupField) => {\n value[groupField.id] = getFieldValueOrZero(\n groupField,\n values && (values[field.id] as GroupInstanceType),\n ) as SingleFieldType;\n });\n obj[field.id] = value;\n } else {\n obj[field.id] = getFieldValueOrZero(field, values);\n }\n });\n\n return obj as T;\n};\n","import Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport FormControl from \"@mui/material/FormControl\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport Select from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport TextField from \"@mui/material/TextField\";\nimport { SelectChangeEvent } from \"@mui/material/Select\";\nimport { DesktopDatePicker, TimePicker, DateTimePicker } from \"@mui/x-date-pickers\";\nimport { ChangeEvent, ReactElement } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { GroupValueCard } from \"../group-value-card\";\nimport {\n ArrayFieldType,\n FieldType,\n ModelField,\n ModelFieldTypes,\n} from \"../generators/generators.model\";\n\nexport interface ModelFormField {\n field: ModelField;\n update: boolean;\n dense?: boolean;\n path?: string[];\n value: any;\n onChangeValue: (path: string[], value: any) => void;\n}\n\nexport const ModelFormField = ({\n field,\n path = [],\n value,\n dense,\n update,\n onChangeValue,\n}: ModelFormField) => {\n const handleCheckboxChange = (e: ChangeEvent<HTMLInputElement>) => {\n e.preventDefault();\n onChangeValue([...path, e.target.name], e.target.checked);\n };\n\n const handleSelectChange = (e: SelectChangeEvent<FieldType>) => {\n e.preventDefault();\n onChangeValue([...path, e.target.name], e.target.value);\n };\n\n const handleMultiSelectChange = (e: SelectChangeEvent<FieldType>) => {\n e.preventDefault();\n const { value } = e.target;\n const newValue = typeof value === \"string\" ? value.split(\",\") : value;\n onChangeValue([...path, e.target.name], newValue);\n };\n\n const handleInputChange = (\n e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n type: ModelFieldTypes,\n ) => {\n e.preventDefault();\n\n let value: string | number | string[] | number[] = e.target.value;\n if (type === \"number\" && typeof value === \"string\") {\n value = parseInt(e.target.value, 10);\n } else if (type.includes(\"[]\")) {\n value = e.target.value.split(\",\");\n }\n onChangeValue([...path, e.target.name], value);\n };\n\n const handleDateChange = (value: FieldType | null, id: string) => {\n onChangeValue([...path, id], value);\n };\n\n const defaultColor = useGetDefaultThemeColor({ lightWeight: 200, darkWeight: 800 });\n\n const {\n id,\n type,\n name,\n description,\n updatable = true,\n required = true,\n xs,\n sm,\n md,\n lg,\n xl,\n } = field;\n const disabled: boolean = !updatable && update;\n\n let fieldInput: ReactElement;\n const size = dense ? \"small\" : \"medium\";\n if (type === \"group\") {\n fieldInput = (\n <GroupValueCard title={name} subtitle={description} dense={dense}>\n <Grid container spacing={2} sx={{ p: 2 }}>\n {field.value.map((f) => (\n <ModelFormField\n key={f.id}\n field={f}\n dense={dense}\n path={[...path, id]}\n value={value[f.id]}\n update={update}\n onChangeValue={onChangeValue}\n />\n ))}\n </Grid>\n </GroupValueCard>\n );\n } else if (type === \"boolean\") {\n fieldInput = (\n <Box sx={{ height: 1, display: \"flex\", alignItems: \"center\" }}>\n <FormControlLabel\n control={\n <Checkbox\n name={id}\n size={size}\n onChange={handleCheckboxChange}\n checked={value as boolean}\n disabled={disabled}\n />\n }\n label={name}\n />\n </Box>\n );\n } else if (type === \"enum\") {\n fieldInput = (\n <FormControl fullWidth>\n <InputLabel id={`${id}-select-label`}>{name}</InputLabel>\n <Select\n labelId={`${id}-select-label`}\n id={`${id}-select`}\n value={value}\n label={name}\n name={id}\n size={size}\n onChange={handleSelectChange}\n required={required}\n disabled={disabled}\n >\n {field.value.map((fieldValue) => (\n <MenuItem key={fieldValue} value={fieldValue}>\n {fieldValue}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n );\n } else if (type === \"multienum\") {\n fieldInput = (\n <FormControl fullWidth>\n <InputLabel id={`${id}-select-label`}>{name}</InputLabel>\n <Select\n labelId={`${id}-select-label`}\n id={`${id}-select`}\n value={value || []}\n renderValue={(selected) => (selected as ArrayFieldType).join(\", \")}\n label={name}\n name={id}\n size={size}\n onChange={handleMultiSelectChange}\n required={required}\n disabled={disabled}\n multiple\n >\n {field.value.map((fieldValue) => (\n <MenuItem key={fieldValue} value={fieldValue}>\n <Checkbox checked={((value as any[]) || []).includes(fieldValue)} />\n <ListItemText primary={fieldValue} />\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n );\n } else if (type === \"date\") {\n fieldInput = (\n <DesktopDatePicker\n label={name}\n format={field.format}\n value={value}\n slotProps={\n {\n field: {\n size,\n },\n } as any\n }\n disabled={disabled}\n onChange={(value) => handleDateChange(value, id)}\n />\n );\n } else if (type === \"time\") {\n fieldInput = (\n <TimePicker\n label={name}\n format={field.format}\n value={value}\n slotProps={\n {\n field: {\n size,\n },\n } as any\n }\n disabled={disabled}\n onChange={(value) => handleDateChange(value, id)}\n />\n );\n } else if (type === \"datetime\") {\n fieldInput = (\n <DateTimePicker\n label={name}\n format={field.format}\n value={value}\n slotProps={\n {\n field: {\n size,\n },\n } as any\n }\n disabled={disabled}\n onChange={(value) => handleDateChange(value, id)}\n />\n );\n } else if (type === \"group[]\") {\n return null;\n } else if (type.includes(\"[]\")) {\n fieldInput = (\n <TextField\n required={required}\n type=\"text\"\n label={name}\n name={id}\n size={size}\n variant=\"outlined\"\n helperText=\"Use comas to separate multiple values\"\n fullWidth\n disabled={disabled}\n value={(value as any[]).join(\",\")}\n onChange={(e) => handleInputChange(e, type)}\n />\n );\n } else {\n fieldInput = (\n <TextField\n required={required}\n type={type}\n label={name}\n size={size}\n name={id}\n variant=\"outlined\"\n fullWidth\n value={value}\n disabled={disabled}\n onChange={(e) => handleInputChange(e, type)}\n />\n );\n }\n\n return (\n <Grid item key={id} xs={xs} sm={sm} md={md} lg={lg} xl={xl}>\n {fieldInput}\n </Grid>\n );\n};\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\nvar isNil = /*#__PURE__*/_curry1(function isNil(x) {\n return x == null;\n});\nexport default isNil;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport isNil from \"./isNil.js\";\n\n/**\n * Makes a shallow clone of an object, setting or overriding the nodes required\n * to create the given path, and placing the specific value at the tail end of\n * that path. Note that this copies and flattens prototype properties onto the\n * new object as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> a -> {a} -> {a}\n * @param {Array} path the path to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except along the specified path.\n * @see R.dissocPath\n * @example\n *\n * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}\n *\n * // Any missing or non-object keys in path will be overridden\n * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}\n */\nvar assocPath = /*#__PURE__*/_curry3(function assocPath(path, val, obj) {\n if (path.length === 0) {\n return val;\n }\n var idx = path[0];\n if (path.length > 1) {\n var nextObj = !isNil(obj) && _has(idx, obj) && typeof obj[idx] === 'object' ? obj[idx] : _isInteger(path[1]) ? [] : {};\n val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);\n }\n return _assoc(idx, val, obj);\n});\nexport default assocPath;","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _isArray from \"./_isArray.js\";\nimport _isInteger from \"./_isInteger.js\";\n\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @private\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object|Array} obj The object to clone\n * @return {Object|Array} A new object equivalent to the original except for the changed property.\n */\nexport default function _assoc(prop, val, obj) {\n if (_isInteger(prop) && _isArray(obj)) {\n var arr = [].concat(obj);\n arr[prop] = val;\n return arr;\n }\n var result = {};\n for (var p in obj) {\n result[p] = obj[p];\n }\n result[prop] = val;\n return result;\n}","import Button from \"@mui/material/Button\";\nimport Grid from \"@mui/material/Grid\";\nimport { FormEvent, useMemo } from \"react\";\nimport { useState } from \"react\";\nimport {\n Model,\n BasicModelInstance,\n FieldType,\n newInstanceFromValuesOrZeroValue,\n} from \"../generators\";\nimport { ModelFormField } from \"./model-form-field\";\nimport { assocPath } from \"ramda\";\n\nexport interface ModelFormProps<T extends BasicModelInstance> {\n model: Model;\n dense?: boolean;\n initialValues?: T;\n saveButtonText: string;\n onSubmit: (values: T) => void;\n}\n\nexport const ModelForm = <T extends BasicModelInstance>({\n model,\n saveButtonText,\n dense,\n onSubmit,\n initialValues,\n}: ModelFormProps<T>) => {\n const valuesInitialState = useMemo(\n () => newInstanceFromValuesOrZeroValue<T>(model, initialValues),\n [model, initialValues],\n );\n const [values, setValues] = useState<T>(valuesInitialState);\n\n const setKeyValue = (path: string[], value: FieldType | null) => {\n setValues((v) => assocPath(path, value, v));\n };\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n onSubmit(values);\n };\n\n return (\n <Grid container component=\"form\" spacing={2} onSubmit={handleSubmit}>\n {model.fields.map((f) => (\n <ModelFormField\n key={f.id}\n dense={dense}\n field={f}\n value={values[f.id]}\n update={!!initialValues}\n onChangeValue={setKeyValue}\n />\n ))}\n <Grid item xs={12}>\n <Button type=\"submit\" variant=\"contained\" size={dense ? \"small\" : \"medium\"}>\n {saveButtonText}\n </Button>\n </Grid>\n </Grid>\n );\n};\n","import TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport IconButton from \"@mui/material/IconButton\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Menu from \"@mui/material/Menu\";\nimport { EnhancedTable, HeadCell, Order } from \"../enhanced-table\";\nimport MoreVertIcon from \"@mui/icons-material/MoreVert\";\nimport { BasicModelInstance } from \"../generators\";\nimport { useState } from \"react\";\n\nconst OptionsId = \"__options\";\n\nexport interface TableRowOption<T extends BasicModelInstance> {\n id: string;\n label: string;\n onClick: (item: T) => void;\n}\n\nexport interface TableListProps<T extends BasicModelInstance> {\n columns: HeadCell<T>[];\n data: T[];\n search?: boolean;\n defaultSort: string;\n defaultOrder?: Order;\n loading?: boolean;\n options?: TableRowOption<T>[];\n onClick?: (d: T) => void;\n}\n\n// TODO: Move this to teh generators section\nexport const TableList = <T extends BasicModelInstance>({\n columns: columnsProp,\n options,\n data,\n onClick,\n search,\n defaultSort,\n defaultOrder,\n loading,\n}: TableListProps<T>) => {\n const columns = [\n ...columnsProp,\n {\n id: OptionsId,\n label: \"\",\n disablePadding: false,\n numeric: false,\n sort: false,\n },\n ];\n const [anchorMenuEl, setAnchorMenuEl] = useState<null | { item: T; anchor: HTMLElement }>(null);\n\n return (\n <>\n <EnhancedTable<T>\n columns={columns}\n data={data}\n search={search}\n defaultSort={defaultSort}\n defaultOrder={defaultOrder}\n loading={loading}\n >\n {(filteredData) =>\n filteredData.map((row, i) => {\n return (\n <TableRow\n key={row.id}\n onClick={() => onClick && onClick(row)}\n role=\"row\"\n aria-rowindex={i}\n sx={{ cursor: onClick && \"pointer\" }}\n >\n {columns.map(({ id }, j) => (\n <TableCell\n role=\"cell\"\n scope=\"row\"\n key={id.toString()}\n aria-rowindex={i}\n aria-colindex={j}\n >\n {\n row[\n id\n ] as string /* TODO: This has to be reimplemented having a cell based on each model type */\n }\n </TableCell>\n ))}\n {options && (\n <TableCell>\n <IconButton\n data-testid={`options-${row.id}`}\n onClick={(event) => {\n event.stopPropagation();\n setAnchorMenuEl({\n item: row,\n anchor: event.currentTarget,\n });\n }}\n >\n <MoreVertIcon />\n </IconButton>\n </TableCell>\n )}\n </TableRow>\n );\n })\n }\n </EnhancedTable>\n {options && (\n <Menu\n anchorEl={anchorMenuEl?.anchor}\n open={!!anchorMenuEl}\n onClose={() => setAnchorMenuEl(null)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n >\n {options.map(({ id, label, onClick }) => (\n <MenuItem\n key={id}\n onClick={() => {\n if (anchorMenuEl) {\n onClick(anchorMenuEl?.item);\n }\n setAnchorMenuEl(null);\n }}\n >\n {label}\n </MenuItem>\n ))}\n </Menu>\n )}\n </>\n );\n};\n"],"names":["Board","content","contentProp","spacing","children","sx","themeSpacing","typography","useTheme","copyContent","Array","isArray","map","line","i","_jsx","Typography","pb","join","Paper","position","pl","pr","py","backgroundColor","blueGrey","color","_jsxs","Box","display","flexDirection","width","top","right","IconButton","onClick","navigator","clipboard","writeText","Tooltip","title","ContentCopyIcon","fontSize","pxToRem","alertSx","alertClasses","message","ExpandableAlert","forwardRef","severity","iconMapping","metadata","metadataComponent","onClose","ref","expanded","setExpanded","useState","Alert","action","CloseIcon","e","ExpandLessIcon","ExpandMoreIcon","w","AlertTitle","Collapse","in","mt","Content","Container","component","flexGrow","CenterContainer","centerVertical","centerHorizontal","height","justifyContent","alignItems","newArrayWithSize","size","fillValue","fill","getRandomItem","items","index","Math","floor","random","length","item","useGetDefaultThemeColor","lightWeight","darkWeight","palette","mode","grey","newBreakpointsCounter","breakpoint","calculateBreakpointIncrement","breakpointsCounter","key","value","initialValue","xs","sm","md","lg","xl","increment","smInc","mdInc","lgInc","xlInc","this","getFormData","data","FormData","currentTarget","rawData","forEach","ListPanelContext","createContext","undefined","ListPanelContextProvider","Provider","useListPanel","useContext","ListPanel","defaultSelectedItem","colBreakpoint","listMode","onSelectedItemChange","path","filter","Boolean","bgColor","selectedItem","setSelectedItem","Grid","container","bgcolor","List","overflowY","id","text","tooltip","href","contentEl","_createElement","ListItemButton","Link","dense","handleSelectItem","ListItemText","primary","primaryTypographyProps","enterDelay","placement","elevation","background","paper","bulletClasses","root","Bullet","variant","Badge","className","role","labelClasses","Label","colorProp","textTransform","default","light","secondary","info","warning","error","success","textColor","getContrastText","contrastText","minWidth","caption","fontWeight","fontWeightBold","lineHeight","whiteSpace","borderRadius","px","cursor","TabContext","TabContextProvider","useTab","TabProvider","tabState","HeaderTitle","loading","CircularProgress","h4","_Fragment","HeaderSubtitle","body1","Header","loadingTitle","subtitle","loadingSubtitle","preset","actionsVariant","breadcrumbs","actions","tabs","tabsMode","navigationButton","defaultColor","selectedTab","setSelectedTab","bgColorPresets","main","inherit","transparent","textColorPresets","modedSelectedTab","Button","LinkComponent","startIcon","icon","mb","Breadcrumbs","separator","marginTop","link","underline","disabled","mr","Tabs","onChange","_","label","tabProps","Tab","markdownMuiOptions","overrides","h1","props","gutterBottom","h2","h3","paragraph","p","a","li","BootstrapDialog","open","componentProps","disableAccept","disableCancel","cancelable","callCloseWhenCancel","acceptable","acceptText","cancelText","onAccept","onCancel","acceptType","hasActions","Dialog","DialogTitle","ml","theme","DialogContent","dividers","DialogActions","type","ConfirmDialog","confirmText","passphrase","onConfirm","inputPassphrase","setInputPassphrase","TextField","fullWidth","target","placeholder","FormDialog","submitText","onSubmit","preventDefault","useDialog","intialOpen","isOpen","setIsOpen","close","DrawerContext","UndefinedProvider","Error","useDrawer","context","openedMixin","transition","transitions","create","easing","sharp","duration","enteringScreen","overflowX","closedMixin","leavingScreen","breakpoints","up","DrawerHeader","styled","padding","mixins","toolbar","showCloseButton","temporary","mini","persistent","clipped","muiDrawerVariant","NoopSxGenerator","variantsSx","state","boxSizing","paperClasses","zIndex","drawer","Drawer","rest","switchState","underAppBar","drawerWidth","flexShrink","drawerClasses","MuiDrawer","ChevronLeftIcon","Divider","initialState","targetStates","DrawerProvider","initialStateProp","drawerWidthProp","selectedItemId","onStateChange","setState","handleChangeState","newState","collapse","DrawerSubheader","ListSubheader","shouldForwardProp","prop","getDrawerItemColors","selected","fontWeightMedium","StyledLink","sxCollapsedIcon","marginRight","DrawerItemLink","avatar","bullet","level","paddingHorizontal","ListItemIcon","ListItemAvatar","Avatar","alt","src","disableTypography","opacity","DrawerItem","childrenSelected","some","DrawerMenuItem","anchorEl","useRef","menuOpen","setMenuOpen","submenu","disablePadding","collapsedButtonSx","o","hover","ChevronRightIcon","timeout","unmountOnExit","Popover","PaperProps","current","anchorOrigin","vertical","horizontal","DrawerSection","paddingTop","paddingY","DrawerContent","nav","moveWithDrawer","showMenuButton","DrawerAppBar","rootSx","marginLeft","MuiAppBar","Toolbar","edge","MenuIcon","noWrap","drawerSpace","StyledDiv","DrawerMain","LoadingArea","QueryContainer","fetching","fetchingProp","loadingProp","f","name","LinearProgress","ProgressSize","small","medium","Select","useId","StyledFormControl","FormControl","borderColor","InputLabel","MuiSelect","labelId","renderValue","left","bottom","SignIn","onSubmitSignIn","emailError","setEmailError","passwordError","setPasswordError","marginBottom","email","get","toString","password","Stack","margin","autoComplete","autoFocus","inputProps","helperText","globalId","maybeReactUseId","React","idOverride","reactId","defaultId","setDefaultId","useEffect","useGlobalId","overrideId","InputLabelProps","InputProps","hexColor","helperTextId","inputLabelId","hexColorSx","outlinedInputClasses","notchedOutline","inputLabelClasses","input","circularProgressClasses","linearProgressClasses","bar","autocompleteClasses","endAdornment","iconButtonClasses","htmlFor","OutlinedInput","InputAdornment","FormHelperText","Autocomplete","options","onChangeValue","MuiAutocomplete","renderInput","params","CustomPickersDayBackground","dayIsBetween","isFirstDay","isLastDay","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","Day","day","dateRange","other","PickersDay","start","end","isAfter","isBefore","isSameDay","isStartOfWeek","startOfWeek","isEndOfWeek","endOfWeek","format","DateRangeCalendar","defaultValue","onValueChange","setValue","setIndex","setValueRange","newRange","newIndex","DateCalendar","newValue","slots","slotProps","DateRangePicker","fmt","isPopoverOpened","setIsPopoverOpened","toUpperCase","EventIcon","ActionHeader","titleVariant","titleColor","borderBottom","Action","description","descriptionVariant","buttonText","helperTextVariant","confirmable","confirmTitle","confirmDescription","onAction","DialogContentText","TabCardContext","TabCardContextProvider","StyledTabs","TabIndicatorProps","minHeight","maxWidth","StyledTab","fontWeightRegular","paddingBottom","TabCard","initialTab","onChangeTab","iconPosition","disableRipple","TabCardPanel","isTab","includes","TabPanel","hidden","Placeholder","iconSize","textAlign","pt","SkeletonCard","animation","Skeleton","my","SkeletonGrid","ContentPlaceholder","visuallyHidden","border","clip","overflow","EnhancedTableHead","order","orderBy","headCells","onRequestSort","TableHead","TableRow","headCell","TableCell","sortDirection","sort","TableSortLabel","active","direction","property","String","descendingComparator","b","EnhancedTable","search","columns","defaultSort","defaultOrder","searchFilter","setSearchFilter","setOrder","setOrderBy","filteredData","slice","d","col","toLowerCase","getFilter","getComparator","paddingX","startAdornment","Search","TableContainer","Table","TableBody","colSpan","defaultProps","EnhancedRemoteTable","newOrder","ValueEditButtons","onClickCancel","onClickSubmit","ClearIcon","paddingRight","CheckIcon","useEditableValueDisplay","onEdit","isEditing","setIsEditing","editValue","setEditValue","cancelEdit","startEdit","submitEdit","ValueEditButton","EditIcon","DefaultPlaceholder","getValueContentLabelId","replace","ValueContent","hideLabel","tooltipEnterDelay","ValueText","valueProp","editable","editInputRef","editKeyPressListener","addEventListener","removeEventListener","inputRef","marginY","ValueCard","ValueBoolean","iconSx","h6","h5","Switch","checked","ValueDatetime","editInputType","DateTimePicker","TimePicker","DatePicker","textField","GroupValueCard","centered","rowSpacing","ValueRating","maxRating","Rating","readOnly","max","Number","isNaN","parseInt","valueItemClasses","ValueItem","bordered","borderLeft","borderStyle","noBorder","style","Object","entries","resolveBorderStyle","ValueLabel","gap","DrawerLayout","drawerProviderProps","childrenProps","appBar","DefaultErrorIcon","ReportProblemIcon","HeaderLayout","headerElement","contentElement","NotificationCenterProviderUndefinedError","NotificationCenterContext","useNotificationCenter","NotificationCenterProvider","autoHideDuration","notification","setNotification","setOpen","hide","show","Snackbar","useNotifyWhenValueChanges","from","to","prevRef","singleDetailValueFactory","field","instance","JSON","stringify","ObjectArrayGroup","headerName","column","push","rows","DataGrid","density","disableRowSelectionOnClick","pageSizeOptions","pagination","paginationModel","pageSize","ObjectDetailGroup","ObjectDetails","model","fields","InitialStateZeroValue","string","number","boolean","enum","multienum","date","Date","time","datetime","group","getFieldValueOrZero","values","newInstanceFromValuesOrZeroValue","obj","groupField","ModelFormField","update","handleCheckboxChange","handleSelectChange","handleMultiSelectChange","split","handleInputChange","handleDateChange","updatable","required","fieldInput","FormControlLabel","control","Checkbox","fieldValue","MenuItem","multiple","DesktopDatePicker","_isPlaceholder","_curry1","fn","f1","arguments","apply","_curry2","f2","_b","_a","_curry3","f3","c","_c","_isArray","val","prototype","call","_isInteger","isInteger","n","isNil","x","assocPath","idx","nextObj","hasOwnProperty","_has","arr","concat","result","_assoc","ModelForm","saveButtonText","initialValues","valuesInitialState","useMemo","setValues","setKeyValue","v","TableList","columnsProp","numeric","anchorMenuEl","setAnchorMenuEl","row","j","scope","event","stopPropagation","anchor","MoreVertIcon","Menu","transformOrigin"],"mappings":"m+HAgBa,MAAAA,GAAQ,EAAGC,QAASC,EAAaC,UAAU,EAAGC,WAAUC,SACnE,MAAQF,QAASG,EAAYC,WAAEA,GAAeC,IAC9C,IAAIC,EACAR,EAcJ,OAZIS,MAAMC,QAAQT,IAChBD,EAAUC,EAAYU,KAAI,CAACC,EAAMC,IAC/BC,EAACC,EAAmB,CAAAX,GAAI,CAAEY,GAAId,GAC3BC,SAAAS,GADcC,KAInBL,EAAcP,EAAYgB,KAAK,QAE/BjB,EAAUc,EAACC,EAAY,CAAAZ,SAAAF,IACvBO,EAAcP,GAAe,IAI7Ba,EAACI,EAAK,CACJd,GAAI,CACFe,SAAU,WACVC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,gBAAiBC,EAAS,KAC1BC,MAAO,WACJrB,GAGLD,SAAAuB,EAACC,EAAI,CAAAC,QAAQ,OAAOC,cAAc,MAAK1B,SAAA,CACrCW,EAACa,EAAG,CAACG,MAAO,EAAC3B,SAAGA,GAAYH,IAC5Bc,EA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