wcz-layout 6.2.1 → 6.2.2

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.
@@ -1,16 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Close } from "@mui/icons-material";
3
- import { AppBar, DialogActions, DialogContent, DialogTitle, Grid, IconButton, Dialog as MaterialDialog, Toolbar, Typography, useMediaQuery } from "@mui/material";
3
+ import { AppBar, Dialog as MaterialDialog, DialogActions, DialogContent, DialogTitle, Grid, IconButton, LinearProgress, Toolbar, Typography, useMediaQuery } from "@mui/material";
4
4
  import { useTheme } from "@mui/material/styles";
5
+ import { useIsFetching, useIsMutating } from "@tanstack/react-query";
5
6
  import { Fragment } from "react";
6
7
  import { LayoutSnackbar } from "./LayoutSnackbar";
7
8
  export const Dialog = ({ open, onClose, title, subtitle, children, color, maxWidth, actions, disablePadding, disableAutoClose }) => {
8
9
  const theme = useTheme();
9
10
  const fullScreen = useMediaQuery(theme.breakpoints.down("sm"));
11
+ const isFetching = !!useIsFetching();
12
+ const isMutating = !!useIsMutating();
10
13
  return (_jsxs(MaterialDialog, { open: open, onClose: disableAutoClose ? undefined : onClose, fullScreen: fullScreen, fullWidth: true, maxWidth: maxWidth, children: [fullScreen ?
11
- _jsx(Fragment, { children: _jsx(AppBar, { sx: { position: "relative", bgcolor: `${color}.main` }, children: _jsxs(Toolbar, { children: [_jsxs(Typography, { sx: { flex: 1 }, variant: "h6", children: [title, subtitle && _jsx(Typography, { variant: "body2", sx: { opacity: 0.5 }, children: subtitle })] }), _jsx(IconButton, { edge: "start", onClick: onClose, children: _jsx(Close, { sx: { color: `${color}.contrastText` } }) })] }) }) })
14
+ _jsxs(Fragment, { children: [_jsx(AppBar, { sx: { position: "relative", bgcolor: `${color}.main` }, children: _jsxs(Toolbar, { children: [_jsxs(Typography, { sx: { flex: 1 }, variant: "h6", children: [title, subtitle && _jsx(Typography, { variant: "body2", sx: { opacity: 0.5 }, children: subtitle })] }), _jsx(IconButton, { edge: "start", onClick: onClose, children: _jsx(Close, { sx: { color: `${color}.contrastText` } }) })] }) }), (isFetching || isMutating) && _jsx(LinearProgress, { color: color === "default" ? undefined : color })] })
12
15
  :
13
- _jsx(Fragment, { children: _jsxs(Grid, { container: true, justifyContent: "space-between", sx: { bgcolor: `${color}.main`, color: `${color}.contrastText` }, children: [_jsx(Grid, { item: true, xs: true, children: _jsxs(DialogTitle, { children: [title, subtitle && _jsx(Typography, { variant: "body2", sx: { opacity: 0.5 }, children: subtitle })] }) }), _jsx(Grid, { item: true, xs: 2, sx: { p: 1, textAlign: "right" }, children: _jsx(IconButton, { onClick: onClose, children: _jsx(Close, { fontSize: "small", sx: { color: `${color}.contrastText` } }) }) })] }) }), disablePadding ? children : _jsx(DialogContent, { children: children }), actions &&
16
+ _jsxs(Fragment, { children: [_jsxs(Grid, { container: true, justifyContent: "space-between", sx: { bgcolor: `${color}.main`, color: `${color}.contrastText` }, children: [_jsx(Grid, { item: true, xs: true, children: _jsxs(DialogTitle, { children: [title, subtitle && _jsx(Typography, { variant: "body2", sx: { opacity: 0.5 }, children: subtitle })] }) }), _jsx(Grid, { item: true, xs: 2, sx: { p: 1, textAlign: "right" }, children: _jsx(IconButton, { onClick: onClose, children: _jsx(Close, { fontSize: "small", sx: { color: `${color}.contrastText` } }) }) })] }), (isFetching || isMutating) && _jsx(LinearProgress, { color: color === "default" ? undefined : color })] }), disablePadding ? children : _jsx(DialogContent, { children: children }), actions &&
14
17
  _jsx(DialogActions, { children: actions.map(action => action) }), _jsx(LayoutSnackbar, {})] }));
15
18
  };
16
19
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAc,aAAa,EAAE,aAAa,E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AAC,OAAO,EAAE,OAAO,YACrC,KAAC,KAAK,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,eAAe,EAAE,GAAI,GACxC,IACP,GACL,GACF;gBACX,CAAC;oBACD,KAAC,QAAQ,cACL,MAAC,IAAI,IAAC,SAAS,QAAC,cAAc,EAAC,eAAe,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,eAAe,EAAE,aAC3G,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,kBACT,MAAC,WAAW,eACP,KAAK,EACL,QAAQ,IAAI,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,YAAG,QAAQ,GAAc,IAC5E,GACX,EAEP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,YAC9C,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,YACxB,KAAC,KAAK,IAAC,QAAQ,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,eAAe,EAAE,GAAI,GACzD,GACV,IACJ,GACA,EAGd,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,aAAa,cAAE,QAAQ,GAAiB,EAErE,OAAO;gBACJ,KAAC,aAAa,cACT,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAClB,EAGpB,KAAC,cAAc,KAAG,IACL,CACpB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { Close } from \"@mui/icons-material\";\r\nimport { AppBar, Breakpoint, DialogActions, DialogContent, DialogTitle, Grid, IconButton, Dialog as MaterialDialog, Toolbar, Typography, useMediaQuery } from \"@mui/material\";\r\nimport { useTheme } from \"@mui/material/styles\";\r\nimport { Fragment, ReactNode } from \"react\";\r\nimport { LayoutSnackbar } from \"./LayoutSnackbar\";\r\n\r\ninterface DialogProps {\r\n children?: ReactNode,\r\n title: string | ReactNode;\r\n subtitle?: string | ReactNode;\r\n open: boolean;\r\n onClose: () => void;\r\n color?: \"success\" | \"info\" | \"warning\" | \"error\" | \"primary\" | \"secondary\" | \"inherit\" | \"default\";\r\n maxWidth?: Breakpoint;\r\n actions?: ReactNode[];\r\n disablePadding?: boolean;\r\n disableAutoClose?: boolean;\r\n}\r\n\r\nexport const Dialog: React.FC<DialogProps> = ({ open, onClose, title, subtitle, children, color, maxWidth, actions, disablePadding, disableAutoClose }) => {\r\n const theme = useTheme();\r\n const fullScreen = useMediaQuery(theme.breakpoints.down(\"sm\"));\r\n\r\n return (\r\n <MaterialDialog open={open} onClose={disableAutoClose ? undefined : onClose} fullScreen={fullScreen} fullWidth maxWidth={maxWidth}>\r\n {fullScreen ?\r\n <Fragment>\r\n <AppBar sx={{ position: \"relative\", bgcolor: `${color}.main` }}>\r\n <Toolbar>\r\n <Typography sx={{ flex: 1 }} variant=\"h6\">\r\n {title}\r\n {subtitle && <Typography variant=\"body2\" sx={{ opacity: 0.5 }}>{subtitle}</Typography>}\r\n </Typography>\r\n <IconButton edge=\"start\" onClick={onClose}>\r\n <Close sx={{ color: `${color}.contrastText` }} />\r\n </IconButton>\r\n </Toolbar>\r\n </AppBar>\r\n </Fragment>\r\n :\r\n <Fragment>\r\n <Grid container justifyContent=\"space-between\" sx={{ bgcolor: `${color}.main`, color: `${color}.contrastText` }}>\r\n <Grid item xs>\r\n <DialogTitle>\r\n {title}\r\n {subtitle && <Typography variant=\"body2\" sx={{ opacity: 0.5 }}>{subtitle}</Typography>}\r\n </DialogTitle>\r\n </Grid>\r\n\r\n <Grid item xs={2} sx={{ p: 1, textAlign: \"right\" }}>\r\n <IconButton onClick={onClose}>\r\n <Close fontSize=\"small\" sx={{ color: `${color}.contrastText` }} />\r\n </IconButton>\r\n </Grid>\r\n </Grid>\r\n </Fragment>\r\n }\r\n\r\n {disablePadding ? children : <DialogContent>{children}</DialogContent>}\r\n\r\n {actions &&\r\n <DialogActions>\r\n {actions.map(action => action)}\r\n </DialogActions>\r\n }\r\n\r\n <LayoutSnackbar />\r\n </MaterialDialog>\r\n );\r\n};\r\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAc,MAAM,IAAI,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9L,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAelD,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,EAAE,EAAE;IACtJ,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,MAAM,UAAU,GAAG,CAAC,CAAC,aAAa,EAAE,CAAC;IACrC,MAAM,UAAU,GAAG,CAAC,CAAC,aAAa,EAAE,CAAC;IAErC,OAAO,CACH,MAAC,cAAc,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gB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,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,YAC9C,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,YACxB,KAAC,KAAK,IAAC,QAAQ,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,eAAe,EAAE,GAAI,GACzD,GACV,IACJ,EACN,CAAC,UAAU,IAAI,UAAU,CAAC,IAAI,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,GAAI,IAC1F,EAGd,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,aAAa,cAAE,QAAQ,GAAiB,EAErE,OAAO;gBACJ,KAAC,aAAa,cACT,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAClB,EAGpB,KAAC,cAAc,KAAG,IACL,CACpB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { Close } from \"@mui/icons-material\";\r\nimport { AppBar, Breakpoint, Dialog as MaterialDialog, DialogActions, DialogContent, DialogTitle, Grid, IconButton, LinearProgress, Toolbar, Typography, useMediaQuery } from \"@mui/material\";\r\nimport { useTheme } from \"@mui/material/styles\";\r\nimport { useIsFetching, useIsMutating } from \"@tanstack/react-query\";\r\nimport { Fragment, ReactNode } from \"react\";\r\nimport { LayoutSnackbar } from \"./LayoutSnackbar\";\r\n\r\ninterface DialogProps {\r\n children?: ReactNode,\r\n title: string | ReactNode;\r\n subtitle?: string | ReactNode;\r\n open: boolean;\r\n onClose: () => void;\r\n color?: \"success\" | \"info\" | \"warning\" | \"error\" | \"primary\" | \"secondary\" | \"inherit\" | \"default\";\r\n maxWidth?: Breakpoint;\r\n actions?: ReactNode[];\r\n disablePadding?: boolean;\r\n disableAutoClose?: boolean;\r\n}\r\n\r\nexport const Dialog: React.FC<DialogProps> = ({ open, onClose, title, subtitle, children, color, maxWidth, actions, disablePadding, disableAutoClose }) => {\r\n const theme = useTheme();\r\n const fullScreen = useMediaQuery(theme.breakpoints.down(\"sm\"));\r\n const isFetching = !!useIsFetching();\r\n const isMutating = !!useIsMutating();\r\n\r\n return (\r\n <MaterialDialog open={open} onClose={disableAutoClose ? undefined : onClose} fullScreen={fullScreen} fullWidth maxWidth={maxWidth}>\r\n {fullScreen ?\r\n <Fragment>\r\n <AppBar sx={{ position: \"relative\", bgcolor: `${color}.main` }}>\r\n <Toolbar>\r\n <Typography sx={{ flex: 1 }} variant=\"h6\">\r\n {title}\r\n {subtitle && <Typography variant=\"body2\" sx={{ opacity: 0.5 }}>{subtitle}</Typography>}\r\n </Typography>\r\n <IconButton edge=\"start\" onClick={onClose}>\r\n <Close sx={{ color: `${color}.contrastText` }} />\r\n </IconButton>\r\n </Toolbar>\r\n </AppBar>\r\n {(isFetching || isMutating) && <LinearProgress color={color === \"default\" ? undefined : color} />}\r\n </Fragment>\r\n :\r\n <Fragment>\r\n <Grid container justifyContent=\"space-between\" sx={{ bgcolor: `${color}.main`, color: `${color}.contrastText` }}>\r\n <Grid item xs>\r\n <DialogTitle>\r\n {title}\r\n {subtitle && <Typography variant=\"body2\" sx={{ opacity: 0.5 }}>{subtitle}</Typography>}\r\n </DialogTitle>\r\n </Grid>\r\n\r\n <Grid item xs={2} sx={{ p: 1, textAlign: \"right\" }}>\r\n <IconButton onClick={onClose}>\r\n <Close fontSize=\"small\" sx={{ color: `${color}.contrastText` }} />\r\n </IconButton>\r\n </Grid>\r\n </Grid>\r\n {(isFetching || isMutating) && <LinearProgress color={color === \"default\" ? undefined : color} />}\r\n </Fragment>\r\n }\r\n\r\n {disablePadding ? children : <DialogContent>{children}</DialogContent>}\r\n\r\n {actions &&\r\n <DialogActions>\r\n {actions.map(action => action)}\r\n </DialogActions>\r\n }\r\n\r\n <LayoutSnackbar />\r\n </MaterialDialog>\r\n );\r\n};\r\n"]}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Stack, Typography } from "@mui/material";
3
3
  const stackSxProps = [
4
- "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "m", "mt", "mr", "mb", "ml",
5
- "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "p", "pt", "pr", "pb", "pl",
4
+ "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "m", "mt", "mr", "mb", "ml", "mx", "my",
5
+ "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "p", "pt", "pr", "pb", "pl", "px", "py",
6
6
  "flexGrow", "flexShrink", "flexBasis", "flexDirection", "alignItems", "justifyContent",
7
7
  "position", "zIndex", "top", "right", "bottom", "left",
8
8
  "gridGap", "gridColumnGap", "gridRowGap", "gridColumn", "gridRow", "gridAutoFlow",
@@ -1 +1 @@
1
- {"version":3,"file":"TypographyWithIcon.js","sourceRoot":"","sources":["../../../../src/components/layout/TypographyWithIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,UAAU,EAAmB,MAAM,eAAe,CAAC;AAEnF,MAAM,YAAY,GAAG;IACjB,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC/F,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACpG,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB;IACtF,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;IACtD,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc;IACjF,KAAK,EAAE,WAAW,EAAE,QAAQ;CAC/B,CAAC;AAOF,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAClI,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;IAEzB,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QAClD,IAAI,MAAM,IAAK,MAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,GAAW,CAAC,IAAI,CAAC,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC;YAC3C,OAAQ,MAAc,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAoB,CAAC,CAAC;IAEzB,OAAO,CACH,MAAC,KAAK,IAAC,SAAS,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,aACjG,SAAS,IAAI,SAAS,EACvB,KAAC,UAAU,OAAK,KAAK,EAAE,EAAE,EAAE,MAAM,YAAG,QAAQ,GAAc,EACzD,OAAO,IAAI,OAAO,IACf,CACX,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { Stack, SxProps, Theme, Typography, TypographyProps } from \"@mui/material\";\r\n\r\nconst stackSxProps = [\r\n \"margin\", \"marginTop\", \"marginRight\", \"marginBottom\", \"marginLeft\", \"m\", \"mt\", \"mr\", \"mb\", \"ml\",\r\n \"padding\", \"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\", \"p\", \"pt\", \"pr\", \"pb\", \"pl\",\r\n \"flexGrow\", \"flexShrink\", \"flexBasis\", \"flexDirection\", \"alignItems\", \"justifyContent\",\r\n \"position\", \"zIndex\", \"top\", \"right\", \"bottom\", \"left\",\r\n \"gridGap\", \"gridColumnGap\", \"gridRowGap\", \"gridColumn\", \"gridRow\", \"gridAutoFlow\",\r\n \"gap\", \"columnGap\", \"rowGap\"\r\n];\r\n\r\ninterface TypographyWithIconProps extends TypographyProps {\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n}\r\n\r\nexport const TypographyWithIcon: React.FC<TypographyWithIconProps> = ({ startIcon, endIcon, children, sx, gutterBottom, ...props }) => {\r\n const sxCopy = { ...sx };\r\n\r\n const stackStyles = stackSxProps.reduce((acc, curr) => {\r\n if (sxCopy && (sxCopy as any)[curr]) {\r\n (acc as any)[curr] = (sxCopy as any)[curr];\r\n delete (sxCopy as any)[curr];\r\n }\r\n return acc;\r\n }, {} as SxProps<Theme>);\r\n\r\n return (\r\n <Stack direction=\"row\" alignItems=\"center\" gap={1} sx={stackStyles} mb={gutterBottom ? 0.7 : undefined}>\r\n {startIcon && startIcon}\r\n <Typography {...props} sx={sxCopy}>{children}</Typography>\r\n {endIcon && endIcon}\r\n </Stack>\r\n );\r\n};"]}
1
+ {"version":3,"file":"TypographyWithIcon.js","sourceRoot":"","sources":["../../../../src/components/layout/TypographyWithIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,UAAU,EAAmB,MAAM,eAAe,CAAC;AAEnF,MAAM,YAAY,GAAG;IACjB,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC3G,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAChH,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB;IACtF,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;IACtD,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc;IACjF,KAAK,EAAE,WAAW,EAAE,QAAQ;CAC/B,CAAC;AAOF,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAClI,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;IAEzB,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QAClD,IAAI,MAAM,IAAK,MAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,GAAW,CAAC,IAAI,CAAC,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC;YAC3C,OAAQ,MAAc,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAoB,CAAC,CAAC;IAEzB,OAAO,CACH,MAAC,KAAK,IAAC,SAAS,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,aACjG,SAAS,IAAI,SAAS,EACvB,KAAC,UAAU,OAAK,KAAK,EAAE,EAAE,EAAE,MAAM,YAAG,QAAQ,GAAc,EACzD,OAAO,IAAI,OAAO,IACf,CACX,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { Stack, SxProps, Theme, Typography, TypographyProps } from \"@mui/material\";\r\n\r\nconst stackSxProps = [\r\n \"margin\", \"marginTop\", \"marginRight\", \"marginBottom\", \"marginLeft\", \"m\", \"mt\", \"mr\", \"mb\", \"ml\", \"mx\", \"my\",\r\n \"padding\", \"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\", \"p\", \"pt\", \"pr\", \"pb\", \"pl\", \"px\", \"py\",\r\n \"flexGrow\", \"flexShrink\", \"flexBasis\", \"flexDirection\", \"alignItems\", \"justifyContent\",\r\n \"position\", \"zIndex\", \"top\", \"right\", \"bottom\", \"left\",\r\n \"gridGap\", \"gridColumnGap\", \"gridRowGap\", \"gridColumn\", \"gridRow\", \"gridAutoFlow\",\r\n \"gap\", \"columnGap\", \"rowGap\"\r\n];\r\n\r\ninterface TypographyWithIconProps extends TypographyProps {\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n}\r\n\r\nexport const TypographyWithIcon: React.FC<TypographyWithIconProps> = ({ startIcon, endIcon, children, sx, gutterBottom, ...props }) => {\r\n const sxCopy = { ...sx };\r\n\r\n const stackStyles = stackSxProps.reduce((acc, curr) => {\r\n if (sxCopy && (sxCopy as any)[curr]) {\r\n (acc as any)[curr] = (sxCopy as any)[curr];\r\n delete (sxCopy as any)[curr];\r\n }\r\n return acc;\r\n }, {} as SxProps<Theme>);\r\n\r\n return (\r\n <Stack direction=\"row\" alignItems=\"center\" gap={1} sx={stackStyles} mb={gutterBottom ? 0.7 : undefined}>\r\n {startIcon && startIcon}\r\n <Typography {...props} sx={sxCopy}>{children}</Typography>\r\n {endIcon && endIcon}\r\n </Stack>\r\n );\r\n};"]}
@@ -0,0 +1,2 @@
1
+ import "moment/locale/cs";
2
+ export declare const LayoutLocalizationProvider: React.FC;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LocalizationProvider } from "@mui/x-date-pickers-pro";
3
+ import { AdapterMoment } from "@mui/x-date-pickers-pro/AdapterMoment";
4
+ import moment from "moment";
5
+ import "moment/locale/cs";
6
+ import { Outlet } from "react-router-dom";
7
+ import { useLayout } from "./LayoutContext";
8
+ export const LayoutLocalizationProvider = () => {
9
+ const { i18n } = useLayout();
10
+ if (moment.locale() !== i18n.resolvedLanguage) {
11
+ moment.locale(i18n.resolvedLanguage);
12
+ }
13
+ return (_jsx(LocalizationProvider, { dateAdapter: AdapterMoment, adapterLocale: i18n.resolvedLanguage, children: _jsx(Outlet, {}) }));
14
+ };
15
+ //# sourceMappingURL=LayoutLocalizationProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutLocalizationProvider.js","sourceRoot":"","sources":["../../../src/contexts/LayoutLocalizationProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,MAAM,0BAA0B,GAAa,GAAG,EAAE;IACrD,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC;IAE7B,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CACH,KAAC,oBAAoB,IAAC,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,IAAI,CAAC,gBAAgB,YAClF,KAAC,MAAM,KAAG,GACS,CAC1B,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { LocalizationProvider } from \"@mui/x-date-pickers-pro\";\r\nimport { AdapterMoment } from \"@mui/x-date-pickers-pro/AdapterMoment\";\r\nimport moment from \"moment\";\r\nimport \"moment/locale/cs\";\r\nimport { Outlet } from \"react-router-dom\";\r\nimport { useLayout } from \"./LayoutContext\";\r\n\r\nexport const LayoutLocalizationProvider: React.FC = () => {\r\n const { i18n } = useLayout();\r\n\r\n if (moment.locale() !== i18n.resolvedLanguage) {\r\n moment.locale(i18n.resolvedLanguage);\r\n }\r\n\r\n return (\r\n <LocalizationProvider dateAdapter={AdapterMoment} adapterLocale={i18n.resolvedLanguage}>\r\n <Outlet />\r\n </LocalizationProvider>\r\n );\r\n};"]}
@@ -0,0 +1,14 @@
1
+ import { Breakpoint } from "@mui/material";
2
+ import { ReactNode } from "react";
3
+ interface UseDialogProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ title: string | ReactNode;
7
+ color?: "success" | "info" | "warning" | "error" | "primary" | "secondary" | "inherit" | "default";
8
+ maxWidth?: Breakpoint;
9
+ }
10
+ interface LayoutDialogProps {
11
+ children?: ReactNode;
12
+ }
13
+ export declare const useDialog: ({ open, onClose, title, color, maxWidth }: UseDialogProps) => React.FC<LayoutDialogProps>;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LayoutDialog } from "../components/layout/LayoutDialog";
3
+ export const useDialog = ({ open, onClose, title, color, maxWidth }) => {
4
+ const Dialog = ({ children }) => (_jsx(LayoutDialog, { open: open, onClose: onClose, title: title, color: color, maxWidth: maxWidth, children: children }));
5
+ return Dialog;
6
+ };
7
+ //# sourceMappingURL=UseDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UseDialog.js","sourceRoot":"","sources":["../../../src/hooks/UseDialog.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAcjE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAkB,EAA+B,EAAE;IAEhH,MAAM,MAAM,GAAgC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC1D,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,YACrF,QAAQ,GACE,CAClB,CAAC;IAEF,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC","sourcesContent":["import { Breakpoint } from \"@mui/material\";\r\nimport { ReactNode } from \"react\";\r\nimport { LayoutDialog } from \"../components/layout/LayoutDialog\";\r\n\r\ninterface UseDialogProps {\r\n open: boolean;\r\n onClose: () => void;\r\n title: string | ReactNode;\r\n color?: \"success\" | \"info\" | \"warning\" | \"error\" | \"primary\" | \"secondary\" | \"inherit\" | \"default\";\r\n maxWidth?: Breakpoint;\r\n}\r\n\r\ninterface LayoutDialogProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport const useDialog = ({ open, onClose, title, color, maxWidth }: UseDialogProps): React.FC<LayoutDialogProps> => {\r\n\r\n const Dialog: React.FC<LayoutDialogProps> = ({ children }) => (\r\n <LayoutDialog open={open} onClose={onClose} title={title} color={color} maxWidth={maxWidth}>\r\n {children}\r\n </LayoutDialog>\r\n );\r\n\r\n return Dialog;\r\n};"]}
@@ -1 +1 @@
1
- {"version":3,"file":"KeycloakExtendedConfig.js","sourceRoot":"","sources":["../../../src/models/KeycloakExtendedConfig.ts"],"names":[],"mappings":"","sourcesContent":["export default interface KeycloakExtendedConfig {\n autoLogin?: boolean,\n confidential?: Confidential,\n realm: string,\n \"auth-server-url\": string,\n idpHint?: string\n}\n\nexport interface Confidential {\n client: string,\n secret: string\n}"]}
1
+ {"version":3,"file":"KeycloakExtendedConfig.js","sourceRoot":"","sources":["../../../src/models/KeycloakExtendedConfig.ts"],"names":[],"mappings":"","sourcesContent":["export default interface KeycloakExtendedConfig {\r\n autoLogin?: boolean,\r\n confidential?: Confidential,\r\n realm: string,\r\n \"auth-server-url\": string,\r\n idpHint?: string\r\n}\r\n\r\nexport interface Confidential {\r\n client: string,\r\n secret: string\r\n}"]}