@flipdish/portal-library 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/fd-loader.gif.cjs.js +2 -0
- package/dist/assets/images/fd-loader.gif.cjs.js.map +1 -0
- package/dist/components/Chip/index.cjs.js +2 -0
- package/dist/components/Chip/index.cjs.js.map +1 -0
- package/dist/components/FDErrorBoundary/index.cjs.js +2 -0
- package/dist/components/FDErrorBoundary/index.cjs.js.map +1 -0
- package/dist/components/FlipdishLogoLoader/index.cjs.js +2 -0
- package/dist/components/FlipdishLogoLoader/index.cjs.js.map +1 -0
- package/dist/components/FlipdishStaffContainer/index.cjs.js +2 -0
- package/dist/components/FlipdishStaffContainer/index.cjs.js.map +1 -0
- package/dist/components/Form/FormItemLayout/index.cjs.js +2 -0
- package/dist/components/Form/FormItemLayout/index.cjs.js.map +1 -0
- package/dist/components/Form/GenericAutocompleteField/index.cjs.js +2 -0
- package/dist/components/Form/GenericAutocompleteField/index.cjs.js.map +1 -0
- package/dist/components/Form/GenericFormContainer/index.cjs.js +2 -0
- package/dist/components/Form/GenericFormContainer/index.cjs.js.map +1 -0
- package/dist/components/Form/GenericTextField/index.cjs.js +2 -0
- package/dist/components/Form/GenericTextField/index.cjs.js.map +1 -0
- package/dist/components/Form/PaginatedAutocompleteField/index.cjs.js +2 -0
- package/dist/components/Form/PaginatedAutocompleteField/index.cjs.js.map +1 -0
- package/dist/components/GenericDatePickerField/GenericDateFieldBase.cjs.js +2 -0
- package/dist/components/GenericDatePickerField/GenericDateFieldBase.cjs.js.map +1 -0
- package/dist/components/GenericDatePickerField/index.cjs.js +2 -0
- package/dist/components/GenericDatePickerField/index.cjs.js.map +1 -0
- package/dist/components/GenericDateTimePickerField/index.cjs.js +2 -0
- package/dist/components/GenericDateTimePickerField/index.cjs.js.map +1 -0
- package/dist/components/GenericRadioButtons/index.cjs.js +2 -0
- package/dist/components/GenericRadioButtons/index.cjs.js.map +1 -0
- package/dist/components/GenericTable/HighlightScrollbar.cjs.js +2 -0
- package/dist/components/GenericTable/HighlightScrollbar.cjs.js.map +1 -0
- package/dist/components/GenericTable/index.cjs.js +18 -0
- package/dist/components/GenericTable/index.cjs.js.map +1 -0
- package/dist/components/GenericTableBody/index.cjs.js +2 -0
- package/dist/components/GenericTableBody/index.cjs.js.map +1 -0
- package/dist/components/GenericTableBodyRow/index.cjs.js +2 -0
- package/dist/components/GenericTableBodyRow/index.cjs.js.map +1 -0
- package/dist/components/GenericTableTitle/index.cjs.js +2 -0
- package/dist/components/GenericTableTitle/index.cjs.js.map +1 -0
- package/dist/components/LazyComponent/index.cjs.js +2 -0
- package/dist/components/LazyComponent/index.cjs.js.map +1 -0
- package/dist/components/ListItemLink/index.cjs.js +2 -0
- package/dist/components/ListItemLink/index.cjs.js.map +1 -0
- package/dist/components/ListItemLinkButton/index.cjs.js +2 -0
- package/dist/components/ListItemLinkButton/index.cjs.js.map +1 -0
- package/dist/components/NoResults/index.cjs.js +2 -0
- package/dist/components/NoResults/index.cjs.js.map +1 -0
- package/dist/components/NotFoundPage/index.cjs.js +2 -0
- package/dist/components/NotFoundPage/index.cjs.js.map +1 -0
- package/dist/components/PageLayout/DocumentTitle.cjs.js +2 -0
- package/dist/components/PageLayout/DocumentTitle.cjs.js.map +1 -0
- package/dist/components/PageLayout/FullWidthContainer.cjs.js +2 -0
- package/dist/components/PageLayout/FullWidthContainer.cjs.js.map +1 -0
- package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js +2 -0
- package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js.map +1 -0
- package/dist/components/PageLayout/index.cjs.js +2 -0
- package/dist/components/PageLayout/index.cjs.js.map +1 -0
- package/dist/components/PortalMock/index.cjs.js +2 -0
- package/dist/components/PortalMock/index.cjs.js.map +1 -0
- package/dist/components/Spacer/index.cjs.js +2 -0
- package/dist/components/Spacer/index.cjs.js.map +1 -0
- package/dist/components/Switch/index.cjs.js +2 -0
- package/dist/components/Switch/index.cjs.js.map +1 -0
- package/dist/components/Tooltip/index.cjs.js +2 -0
- package/dist/components/Tooltip/index.cjs.js.map +1 -0
- package/dist/custom-hooks/useMicroFrontendAttributes.cjs.js +2 -0
- package/dist/custom-hooks/useMicroFrontendAttributes.cjs.js.map +1 -0
- package/dist/custom-hooks/useRenderValidText.cjs.js +2 -0
- package/dist/custom-hooks/useRenderValidText.cjs.js.map +1 -0
- package/dist/custom-hooks/useToasts.cjs.js +2 -0
- package/dist/custom-hooks/useToasts.cjs.js.map +1 -0
- package/dist/icons/AccessTimeIcon.cjs.js +2 -0
- package/dist/icons/AccessTimeIcon.cjs.js.map +1 -0
- package/dist/{Icons/AccessTimeIcon/index.js → icons/AccessTimeIcon.js} +1 -1
- package/dist/icons/AccessTimeIcon.js.map +1 -0
- package/dist/icons/CalenderTodayIcon.cjs.js +2 -0
- package/dist/icons/CalenderTodayIcon.cjs.js.map +1 -0
- package/dist/{Icons/CalenderTodayIcon/index.js → icons/CalenderTodayIcon.js} +1 -1
- package/dist/icons/CalenderTodayIcon.js.map +1 -0
- package/dist/icons/DoneIcon.cjs.js +2 -0
- package/dist/icons/DoneIcon.cjs.js.map +1 -0
- package/dist/{Icons/DoneIcon/index.js → icons/DoneIcon.js} +1 -1
- package/dist/icons/DoneIcon.js.map +1 -0
- package/dist/icons/SearchIcon.cjs.js +2 -0
- package/dist/icons/SearchIcon.cjs.js.map +1 -0
- package/dist/{Icons/SearchIcon/index.js → icons/SearchIcon.js} +1 -1
- package/dist/icons/SearchIcon.js.map +1 -0
- package/dist/icons/logo/Deliveroo.cjs.js +2 -0
- package/dist/icons/logo/Deliveroo.cjs.js.map +1 -0
- package/dist/{Icons/logo/Deliveroo/index.js → icons/logo/Deliveroo.js} +1 -1
- package/dist/icons/logo/Deliveroo.js.map +1 -0
- package/dist/localization/de.json.cjs.js +2 -0
- package/dist/localization/de.json.cjs.js.map +1 -0
- package/dist/localization/dev-lang.json.cjs.js +2 -0
- package/dist/localization/dev-lang.json.cjs.js.map +1 -0
- package/dist/localization/en-US.json.cjs.js +2 -0
- package/dist/localization/en-US.json.cjs.js.map +1 -0
- package/dist/localization/en.json.cjs.js +2 -0
- package/dist/localization/en.json.cjs.js.map +1 -0
- package/dist/localization/es-MX.json.cjs.js +2 -0
- package/dist/localization/es-MX.json.cjs.js.map +1 -0
- package/dist/localization/es.json.cjs.js +2 -0
- package/dist/localization/es.json.cjs.js.map +1 -0
- package/dist/localization/fr.json.cjs.js +2 -0
- package/dist/localization/fr.json.cjs.js.map +1 -0
- package/dist/localization/it.json.cjs.js +2 -0
- package/dist/localization/it.json.cjs.js.map +1 -0
- package/dist/localization/nl.json.cjs.js +2 -0
- package/dist/localization/nl.json.cjs.js.map +1 -0
- package/dist/localization/pt.json.cjs.js +2 -0
- package/dist/localization/pt.json.cjs.js.map +1 -0
- package/dist/providers/DateTimeLocalizationProvider.cjs.js +2 -0
- package/dist/providers/DateTimeLocalizationProvider.cjs.js.map +1 -0
- package/dist/providers/ToastProvider.cjs.js +2 -0
- package/dist/providers/ToastProvider.cjs.js.map +1 -0
- package/dist/providers/TranslationProvider.cjs.js +2 -0
- package/dist/providers/TranslationProvider.cjs.js.map +1 -0
- package/dist/stories/utilities/MockPageContent.cjs.js +2 -0
- package/dist/stories/utilities/MockPageContent.cjs.js.map +1 -0
- package/dist/themes/flipdishPublicTheme.cjs.js +2 -0
- package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -0
- package/dist/utilities/formValidation.cjs.js +2 -0
- package/dist/utilities/formValidation.cjs.js.map +1 -0
- package/dist/utilities/genericUtilities.cjs.js +2 -0
- package/dist/utilities/genericUtilities.cjs.js.map +1 -0
- package/dist/utilities/renderUtilities.cjs.js +2 -0
- package/dist/utilities/renderUtilities.cjs.js.map +1 -0
- package/dist/utilities/validation.cjs.js +2 -0
- package/dist/utilities/validation.cjs.js.map +1 -0
- package/package.json +14 -9
- package/dist/Icons/AccessTimeIcon/index.js.map +0 -1
- package/dist/Icons/CalenderTodayIcon/index.js.map +0 -1
- package/dist/Icons/DoneIcon/index.js.map +0 -1
- package/dist/Icons/SearchIcon/index.js.map +0 -1
- package/dist/Icons/logo/Deliveroo/index.js.map +0 -1
- /package/dist/{Icons/AccessTimeIcon/index.d.ts → icons/AccessTimeIcon.d.ts} +0 -0
- /package/dist/{Icons/CalenderTodayIcon/index.d.ts → icons/CalenderTodayIcon.d.ts} +0 -0
- /package/dist/{Icons/DoneIcon/index.d.ts → icons/DoneIcon.d.ts} +0 -0
- /package/dist/{Icons/SearchIcon/index.d.ts → icons/SearchIcon.d.ts} +0 -0
- /package/dist/{Icons/logo/Deliveroo/index.d.ts → icons/logo/Deliveroo.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("@mui/icons-material/Add"),n=require("@mui/icons-material/ArrowBack"),a=require("@mui/material/Grid"),r=require("@mui/material/IconButton"),s=require("@mui/material/styles"),o=require("@mui/material/Typography"),d=require("@mui/material/useMediaQuery"),l=require("./DocumentTitle.cjs.js"),c=require("./FullWidthContainer.cjs.js"),p=require("../FDErrorBoundary/index.cjs.js"),m=require("@mui/material/Button"),h=require("../../utilities/renderUtilities.cjs.js"),g=require("../../utilities/validation.cjs.js"),u=require("../Spacer/index.cjs.js"),x=require("@mui/material/Box"),j=require("@mui/material/Divider");const f=1112,v=s.styled("div")((({theme:e,fluid:t})=>({maxWidth:t?"none":f,[e.breakpoints.down("md")]:{maxWidth:"none"},padding:e.spacing(2,4),position:"relative",minHeight:"100vh"}))),y=s.styled(a)((({theme:e})=>({[e.breakpoints.down("sm")]:{width:"100%",paddingTop:e.spacing(2)}}))),b=s.styled(a)((({theme:e})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:e.spacing(3),paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingTop:e.spacing(2),paddingBottom:e.spacing(3)}}))),A=s.styled(a)((({theme:e})=>({paddingTop:e.spacing(2)}))),k=s.styled(a)((()=>({flexGrow:1}))),B=s.styled("div")((({theme:e})=>({maxWidth:f,paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),T=s.styled(r,{shouldForwardProp:e=>"hasTitleComponent"!==e})((({theme:e,hasTitleComponent:t})=>({margin:t?e.spacing(-.75,2,-1.5,-1.5):e.spacing(-1.5,2,-1.5,-1.5),[e.breakpoints.only("sm")]:{marginLeft:e.spacing(-2)},[e.breakpoints.only("xs")]:{marginLeft:e.spacing(-2)}}))),C=s.styled("div")((({theme:e})=>({maxWidth:f,marginLeft:e.spacing(6),marginRight:e.spacing(4),paddingBottom:e.spacing(2),[e.breakpoints.only("md")]:{marginLeft:12,marginRight:e.spacing(3)},[e.breakpoints.only("sm")]:{marginLeft:e.spacing(3),marginRight:e.spacing(3),maxWidth:"none"},[e.breakpoints.only("xs")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),maxWidth:"none"}}))),q=s.styled(a)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),w=s.styled(o)((()=>({lineHeight:"26px"}))),L=s.styled(o)((()=>({fontWeight:"bold"}))),W=s.styled(j)((({theme:e})=>({marginBottom:e.spacing(4)}))),_=({title:t})=>e.jsx(L,{variant:"h5",component:"h2",children:t}),E=s.styled("div")((({useAlternateBackground:e,theme:t})=>({backgroundColor:e?t.palette.alternateBackground.main:t.palette.white.main,width:"100%",height:"100%"})));exports.HORIZONTAL_SPACE_CLASSNAME="horizontal-content-space",exports.LEFT_HORIZONTAL_SPACE_CLASSNAME="left-horizontal-content-space",exports.PageTitle=_,exports.RIGHT_HORIZONTAL_SPACE_CLASSNAME="right-horizontal-content-space",exports.VERTICAL_SPACE_CLASSNAME="vertical-content-space",exports.default=r=>{const{actionBtnTitle:o,caption:j,children:f,contextButtons:L,documentTitle:S,fluid:I=!1,fullWidth:P,header:R,hideHeader:F,actionButtonLink:H,openLinkInNewTab:N=!1,pageHeader:z,showActionButton:M,showAddIcon:O,title:D,titleComponent:G,toPrevious:V,toParent:Z,strictToParent:$,navigate:U,hideDivider:Q=!1,customActionButtons:J,useAlternateBackground:K=!1,titleComponentAfter:X}=r,Y=s.useTheme(),ee=d(Y.breakpoints.down("md")),te=h.getMicroFrontendAttribute("data-portal-base-url")||"/",ie=H?.startsWith("https://"),ne=ie?H:void 0!==H?g.joinUrlPaths(te,H):"";return e.jsx(E,{useAlternateBackground:K,children:e.jsxs(v,{fluid:I,children:[S&&e.jsx(l,{children:S}),z||null,e.jsxs(C,{children:[z&&e.jsx(u,{size:16,variant:"vertical"}),!F&&e.jsxs(e.Fragment,{children:[e.jsxs(b,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(a,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:e.jsx(q,{item:!0,children:L?.map((i=>e.jsx("div",{children:i},`context-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))})}),e.jsxs(A,{item:!0,container:!0,children:[(Z||V)&&e.jsx(x,{children:e.jsx(T,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!G,component:"button",onClick:()=>{V?U(-1):Z&&$||Z&&history.length<3?U(Z):U(-1)},children:e.jsx(n,{})})}),e.jsxs(k,{item:!0,children:[G?e.jsx(G,{}):e.jsxs(x,{display:"flex",alignItems:"center",gap:2,children:[e.jsx(_,{title:D}),X]}),j&&e.jsx(w,{variant:"caption",component:"h3",children:j})]}),M&&e.jsxs(e.Fragment,{children:[ee&&e.jsx(u,{size:56,variant:"vertical"}),e.jsx(y,{item:!0,children:e.jsxs(m,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${o}`,href:N||ie?ne:"",target:N?"_blank":void 0,rel:N?"noopener noreferrer":void 0,onClick:N||ie?()=>{}:()=>U(H),children:[O&&e.jsx(i,{}),o]})})]}),J?.map((i=>e.jsxs("div",{children:[ee&&e.jsx(u,{size:56,variant:"vertical"}),!ee&&e.jsx(u,{size:16,variant:"vertical"}),e.jsx(y,{item:!0,children:i})]},`custom-action-button-${t.isValidElement(i)?i.props?.["data-testid"]||i.props?.children:"fallback"}`)))]})]}),!Q&&e.jsx(W,{})]}),e.jsxs(c,{fullWidth:P,children:[R?e.jsx(B,{children:R}):null,e.jsx(p,{identifier:S,children:e.jsx(e.Fragment,{children:f})})]})]})]})})},exports.maxWidth=f;
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Add from '@mui/icons-material/Add';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Spacer from '../Spacer';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\n\nexport const HORIZONTAL_SPACE_CLASSNAME = 'horizontal-content-space';\nexport const LEFT_HORIZONTAL_SPACE_CLASSNAME = 'left-horizontal-content-space';\nexport const RIGHT_HORIZONTAL_SPACE_CLASSNAME = 'right-horizontal-content-space';\nexport const VERTICAL_SPACE_CLASSNAME = 'vertical-content-space';\nexport const maxWidth = 1112;\nconst historyMinLength = 3;\n\nconst StyledWrapper = styled('div')<{ fluid: boolean }>(({ theme, fluid }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n padding: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n}));\n\nconst StyledActionButtonGrid = styled(Grid)(({ theme }) => ({\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n paddingTop: theme.spacing(2),\n },\n}));\n\nconst StyledHeader = styled(Grid)(({ theme }) => ({\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 2, -1.5, -1.5) : theme.spacing(-1.5, 2, -1.5, -1.5),\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n },\n}));\n\nconst StyledInnerWrapper = styled('div')(({ theme }) => ({\n maxWidth,\n marginLeft: theme.spacing(6),\n marginRight: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('md')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n maxWidth: 'none',\n },\n}));\n\nconst StyledHeaderContainer = styled(Grid)(() => ({\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'flex-end',\n}));\nconst StyledCaption = styled(Typography)<{ component: string }>(() => ({\n lineHeight: '26px',\n}));\n\nconst StyledPageTitle = styled(Typography)<{ component: string }>(() => ({\n fontWeight: 'bold',\n}));\n\nconst StyledPageDivider = styled(Divider)(({ theme }) => ({\n marginBottom: theme.spacing(4),\n}));\n\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <StyledPageTitle variant=\"h5\" component=\"h2\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground ? theme.palette.alternateBackground.main : theme.palette.white.main,\n width: '100%',\n height: '100%',\n}));\n\nexport type Props = {\n actionBtnTitle?: string;\n caption?: ReactNode;\n children: ReactNode;\n contextButtons?: ReactNode[];\n documentTitle: string;\n fluid?: boolean;\n fullWidth?: boolean;\n header?: ReactNode;\n hideHeader?: boolean;\n actionButtonLink?: string;\n pageHeader?: ReactNode;\n showActionButton?: boolean;\n showAddIcon?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n titleComponentAfter?: ReactNode;\n toPrevious?: boolean;\n toParent?: string;\n strictToParent?: boolean;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\n hideDivider?: boolean;\n customActionButtons?: ReactNode[];\n useAlternateBackground?: boolean;\n};\n\nconst PageLayout = (props: Props) => {\n const {\n actionBtnTitle,\n caption,\n children,\n contextButtons,\n documentTitle,\n fluid = false,\n fullWidth,\n header,\n hideHeader,\n actionButtonLink,\n openLinkInNewTab = false,\n pageHeader,\n showActionButton,\n showAddIcon,\n title,\n titleComponent: TitleComponent,\n toPrevious,\n toParent,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n <StyledHeaderContainer item>\n {contextButtons?.map((button) => (\n <div\n key={`context-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {button}\n </div>\n ))}\n </StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n if (toPrevious) {\n navigate(-1);\n } else if (toParent && strictToParent) {\n navigate(toParent);\n } else if (toParent && history.length < historyMinLength) {\n navigate(toParent);\n } else {\n navigate(-1);\n }\n }}\n >\n <ArrowBackIcon />\n </StyledBackButton>\n </Box>\n )}\n\n <StyledTitleSection item>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption variant=\"caption\" component=\"h3\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid item>\n <Button\n variant=\"contained\"\n fullWidth={true}\n data-testid={`Action-button-${actionBtnTitle}`}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n target={openLinkInNewTab ? '_blank' : undefined}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}\n }\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n key={`custom-action-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary identifier={documentTitle}>\n <>{children}</>\n </FDErrorBoundary>\n </FullWidthContainer>\n </StyledInnerWrapper>\n </StyledWrapper>\n </StyledPageContainer>\n );\n};\n\nexport default PageLayout;\n"],"names":["maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","padding","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","alternateBackground","main","white","height","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","jsx","_jsxs","DocumentTitle","Spacer","size","_Fragment","jsxs","container","direction","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowBackIcon","gap","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"suBAoBO,MAIMA,EAAW,KAGlBC,EAAgBC,EAAMA,OAAC,MAAPA,EAAkC,EAAGC,QAAOC,YAAa,CAC3EJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,OAAQ,CAC5BN,SAAU,QAEdO,QAASJ,EAAMK,QAAQ,EAAG,GAC1BC,SAAU,WACVC,UAAW,YAGTC,EAAyBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CACxD,CAACA,EAAME,YAAYC,KAAK,OAAQ,CAC5BO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAI5BO,EAAeb,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC9Ca,SAAU,SACVC,WAAY,aACZH,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,OAAQ,CAC5BQ,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,QAI/BW,EAAuBjB,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CACtDW,WAAYX,EAAMK,QAAQ,OAGxBY,EAAqBlB,EAAAA,OA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AA,CAAA9C,SAAA,CAAAgC,IAAYnC,EAAAA,IAAC+C,EAAM,CAACC,KAAM,GAAI/C,QAAQ,aACvCD,EAAA4C,IAACjF,EAAsB,CAAC0F,MACpB,EAAAlD,SAAA0C,EAAAA,KAACoB,EAAM,CACHhE,QAAQ,YACRgB,WAAW,EAAI,cACF,iBAAiBJ,IAC9BqD,KAAM7C,GAAoBkB,GAAwBE,GAAwB,GAC1E0B,OAAQ9C,EAAmB,cAAWqB,EACtC0B,IAAK/C,EAAmB,2BAAwBqB,EAChDkB,QACKvC,GAAqBkB,GAA2D,OAAnC,IAAMT,EAASV,aAGhEI,GAAexB,EAAAA,IAACqE,MAChBxD,UAKhBmB,GAAqBuB,KAAKC,GACvBX,EAAAA,KAGK,MAAA,CAAA1C,SAAA,CAAAgC,IAAYnC,MAAC+C,EAAO,CAAAC,KAAM,GAAI/C,QAAQ,cACrCkC,IAAYnC,EAAAA,IAAC+C,EAAO,CAAAC,KAAM,GAAI/C,QAAQ,aACxCD,EAAC4C,IAAAjF,GAAuB0F,MAAI,EAAAlD,SAAEqD,MAJzB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO5C,QAAQ,gBAAkB4C,EAAO5C,OAAOT,SAAW,uBASpI4B,GAAe/B,MAACL,SAG1BkD,EAAAK,KAACoB,EAAmB,CAAArD,UAAWA,YAC1BC,EAASlB,EAAAA,IAAC1B,EAAgB,CAAA6B,SAAEe,IAA6B,KAC1DlB,MAACuE,EAAe,CAACC,WAAYxD,EACzBb,SAAAH,EAAA4C,IAAAK,WAAA,CAAA9C,SAAGA,gBAMzB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/styles"),i=require("@mui/material/AppBar"),t=require("@mui/material/Box"),l=require("@mui/material/CssBaseline"),a=require("@mui/material/Drawer"),o=require("@mui/material/Typography");const s=r.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"65px",color:e.palette.text.primary,borderBottom:`2px solid ${e.palette.grey[400]}`}))),n=r.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),d=198;module.exports=({children:x,loadedFromPortal:m})=>{const p=r.useTheme();if(m)return e.jsx(e.Fragment,{children:x});const c=e.jsx(n,{children:e.jsx(o,{sx:{fontWeight:"bold"},children:"Sidebar"})});return e.jsxs(t,{sx:{display:"flex"},children:[e.jsx(l,{}),e.jsx(i,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e.jsx(s,{children:e.jsx(o,{sx:{fontWeight:"bold"},children:"Header"})})}),e.jsx(t,{component:"nav",sx:{width:{sm:d},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e.jsx(a,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:d,borderColor:p.palette.grey[400],borderWidth:"2px"}},open:!0,children:c})}),e.jsx(t,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:x})]})};
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport Typography from '@mui/material/Typography';\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '65px',\n color: theme.palette.text.primary,\n borderBottom: `2px solid ${theme.palette.grey[400]}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '100%',\n color: theme.palette.text.primary,\n}));\n\ntype Props = {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n const theme = useTheme();\n\n if (loadedFromPortal) {\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <Typography sx={{ fontWeight: 'bold' }}>Sidebar</Typography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <AppBar\n position=\"fixed\"\n sx={{\n width: { sm: `calc(100% - ${drawerWidth}px)` },\n ml: { sm: `${drawerWidth}px` },\n boxShadow: 'none',\n }}\n >\n <StyledHeader>\n <Typography sx={{ fontWeight: 'bold' }}>Header</Typography>\n </StyledHeader>\n </AppBar>\n <Box component=\"nav\" sx={{ width: { sm: drawerWidth }, flexShrink: { sm: 0 } }} aria-label=\"mailbox folders\">\n <Drawer\n variant=\"permanent\"\n sx={{\n display: { xs: 'none', sm: 'block' },\n '& .MuiDrawer-paper': {\n boxSizing: 'border-box',\n width: drawerWidth,\n borderColor: theme.palette.grey[400],\n borderWidth: '2px',\n },\n }}\n open\n >\n {drawer}\n </Drawer>\n </Box>\n <Box component=\"main\" sx={{ flexGrow: 1, width: { sm: `calc(100% - ${drawerWidth}px)`, marginTop: '65px' } }}>\n {children}\n </Box>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","grey","height","color","text","primary","borderBottom","StyledSidebar","drawerWidth","children","loadedFromPortal","useTheme","_jsx","jsx","_Fragment","Fragment","drawer","Typography","sx","fontWeight","_jsxs","Box","CssBaseline","AppBar","position","width","sm","ml","boxShadow","component","flexShrink","Drawer","variant","xs","boxSizing","borderColor","borderWidth","open","flexGrow","marginTop"],"mappings":"kQAOA,MAAMA,EAAeC,EAAAA,OAAO,MAAPA,EAAc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rBC,MAEC,EAAA5B,SAAAO,MAGTJ,MAACS,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU9B,SACvGA,MAGX"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");require("react");const i=require("@mui/material/styles").styled("div")((({size:e=8,variant:i,children:r})=>{const a={padding:r?`${e}px`:void 0};return r?"horizontal"===i?a.margin=`${e}px 0`:"vertical"===i&&(a.margin=`0 ${e}px`):"horizontal"===i?a.height=`${e}px`:"vertical"===i&&(a.width=`${e}px`),a}));module.exports=({className:r,variant:a,size:t=8,children:s})=>e.jsx(i,{className:r,variant:a,size:t,children:s});
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/Spacer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport { styled } from '@mui/material/styles';\n\nexport interface ISpacerProps {\n className?: string;\n variant?: 'horizontal' | 'vertical';\n size?: 8 | 16 | 24 | 32 | 40 | 56;\n children?: ReactNode;\n}\n\nconst SpacerDiv = styled('div')<ISpacerProps>(({ size = 8, variant, children }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const style: any = {\n padding: children ? `${size}px` : undefined,\n };\n\n if (!children) {\n if (variant === 'horizontal') {\n style.height = `${size}px`;\n } else if (variant === 'vertical') {\n style.width = `${size}px`;\n }\n } else if (variant === 'horizontal') {\n style.margin = `${size}px 0`;\n } else if (variant === 'vertical') {\n style.margin = `0 ${size}px`;\n }\n\n return style;\n});\n\nconst Spacer = ({ className, variant, size = 8, children }: ISpacerProps) => {\n return (\n <SpacerDiv className={className} variant={variant} size={size}>\n {children}\n </SpacerDiv>\n );\n};\n\nexport default Spacer;\n"],"names":["SpacerDiv","styled","size","variant","children","style","padding","undefined","margin","height","width","className","_jsx"],"mappings":"iEAUA,MAAMA,kCAAYC,OAAO,MAAPA,EAA4B,EAAGC,OAAO,EAAGC,UAASC,eAEhE,MAAMC,EAAa,CACfC,QAASF,EAAW,GAAGF,WAAWK,GAetC,OAZKH,EAMkB,eAAZD,EACPE,EAAMG,OAAS,GAAGN,QACC,aAAZC,IACPE,EAAMG,OAAS,KAAKN,OARJ,eAAZC,EACAE,EAAMI,OAAS,GAAGP,MACC,aAAZC,IACPE,EAAMK,MAAQ,GAAGR,OAQlBG,CAAK,mBAGD,EAAGM,YAAWR,UAASD,OAAO,EAAGE,cAExCQ,MAACZ,GAAUW,UAAWA,EAAWR,QAASA,EAASD,KAAMA,WACpDE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),a=require("@mui/material/FormControlLabel"),r=require("@mui/material/Switch");module.exports=({label:l,checked:t,onChange:i,labelPlacement:m="start",size:s="medium",disabled:c=!1,testId:d})=>e.jsx(a,{label:l,labelPlacement:m,control:e.jsx(r,{checked:t,onChange:i,color:"primary",size:s,disabled:c,"data-fd":d})});
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/Switch/index.tsx"],"sourcesContent":["import FormControlLabel, { type FormControlLabelProps } from '@mui/material/FormControlLabel';\nimport MuiSwitch, { type SwitchProps as MuiSwitchProps } from '@mui/material/Switch';\n\nexport type SwitchProps = {\n label: string;\n labelPlacement?: FormControlLabelProps['labelPlacement'];\n checked?: boolean;\n onChange?: MuiSwitchProps['onChange'];\n size?: MuiSwitchProps['size'];\n disabled?: boolean;\n testId?: string;\n};\n\nconst Switch = ({ label, checked, onChange, labelPlacement = 'start', size = 'medium', disabled = false, testId = undefined }: SwitchProps) => {\n return (\n <FormControlLabel\n label={label}\n labelPlacement={labelPlacement}\n control={<MuiSwitch checked={checked} onChange={onChange} color=\"primary\" size={size} disabled={disabled} data-fd={testId} />}\n />\n );\n};\n\nexport default Switch;\n"],"names":["label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"6IAae,EAAGA,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,MAACC,GACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAAAA,IAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("@mui/material/Tooltip"),r=require("@mui/material/IconButton"),t=require("@mui/icons-material/InfoOutlined");exports.ICON_SIZES=["small","medium","large"],exports.default=({text:l,iconSize:u="small"})=>e.jsx(i,{title:l,children:e.jsx(r,{children:e.jsx(t,{fontSize:u})})});
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/Tooltip/index.tsx"],"sourcesContent":["import MuiTooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\n\nexport const ICON_SIZES = ['small', 'medium', 'large'] as const;\nexport type IconSize = (typeof ICON_SIZES)[number];\n\nexport type TooltipProps = {\n text: string;\n iconSize?: IconSize;\n};\n\nconst Tooltip = ({ text, iconSize = 'small' }: TooltipProps) => (\n <MuiTooltip title={text}>\n <IconButton>\n <InfoOutlinedIcon fontSize={iconSize} />\n </IconButton>\n </MuiTooltip>\n);\n\nexport default Tooltip;\n"],"names":["text","iconSize","_jsx","MuiTooltip","title","children","IconButton","InfoOutlinedIcon","fontSize"],"mappings":"iPAI0B,CAAC,QAAS,SAAU,yBAQ9B,EAAGA,OAAMC,WAAW,WAChCC,EAAAA,IAACC,EAAU,CAACC,MAAOJ,EAAIK,SACnBH,EAAAA,IAACI,YACGJ,MAACK,EAAiB,CAAAC,SAAUP"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=require("react");const e=["orgId","appId",{key:"isFlipdishStaff",type:"boolean"}],n=(t,e)=>t||"boolean"===e?"boolean"===e?"true"===t:"number"===e?Number(t):t:null,o=t=>[...e.map((t=>"string"==typeof t?t:t.key)),...t.map((t=>"string"==typeof t?t:t.key))];module.exports=(r=[])=>{const[s,i]=t.useState((()=>(t=>{const e=o(t),n={};return e.forEach((t=>{const e="string"==typeof t?t:t.key;n[e]=null})),n})(r)));return t.useEffect((()=>{const t=document.getElementById("flipdish-micro-frontend");if(!t)return void console.warn("Micro-frontend div not found");const s=o(r),u=[...e,...r],c=()=>{i((e=>{const o={...e};let r=!1;return s.forEach((e=>{const{value:s,key:i}=((t,e,o)=>{const r=((t,e)=>e.find((e=>"string"==typeof e?e===t:e.key===t)))(t,o),s=(t=>t&&"string"!=typeof t&&"type"in t?t.type:"string")(r),i="string"==typeof t?t:t.key,u=(void 0)[`VITE_${i.toUpperCase()}_OVERRIDE`],c=`data-${i}`,a=e.getAttribute(c);return{value:n(u?u.toString():a,s),key:i}})(e,t,u);o[i]!==s&&(o[i]=s,r=!0)})),r?o:e}))};c();const a=new MutationObserver(c);return a.observe(t,{attributes:!0}),()=>a.disconnect()}),[r]),s};
|
|
2
|
+
//# sourceMappingURL=useMicroFrontendAttributes.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMicroFrontendAttributes.cjs.js","sources":["../../src/custom-hooks/useMicroFrontendAttributes.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ntype KeyType = 'string' | 'boolean' | 'number';\n\ninterface KeyConfig {\n key: string;\n type?: KeyType; // type is optional, defaults to 'string'\n}\n\nconst ALWAYS_RETURN_KEYS: (string | KeyConfig)[] = ['orgId', 'appId', { key: 'isFlipdishStaff', type: 'boolean' }] as const;\n\ntype AlwaysReturnKeys = (typeof ALWAYS_RETURN_KEYS)[number] extends KeyConfig\n ? (typeof ALWAYS_RETURN_KEYS)[number]['key']\n : (typeof ALWAYS_RETURN_KEYS)[number];\n\ntype ExtractKey<T> = T extends KeyConfig ? T['key'] : T;\n\ntype AttributeValue = string | boolean | number | null;\n\n// Utility functions moved outside\ntype KeyArg<T> = string | T | AlwaysReturnKeys;\nconst getKeyConfig = <T extends string | KeyConfig>(key: KeyArg<T>, allConfigs: (string | KeyConfig)[]) => {\n return allConfigs.find((config) => (typeof config === 'string' ? config === key : config.key === key));\n};\n\nconst getValueType = (keyConfig: KeyConfig | string | undefined): KeyType => {\n return keyConfig && typeof keyConfig !== 'string' && 'type' in keyConfig ? keyConfig.type : 'string';\n};\n\nconst parseValue = (value: string | null, type: KeyType): AttributeValue => {\n if (!value && type !== 'boolean') return null;\n if (type === 'boolean') return value === 'true';\n if (type === 'number') return Number(value);\n return value;\n};\n\nconst getAllKeys = <T extends string | KeyConfig>(customKeys: (T | KeyConfig)[]): (string | T | AlwaysReturnKeys)[] => {\n return [\n ...ALWAYS_RETURN_KEYS.map((key) => (typeof key === 'string' ? key : key.key)),\n ...customKeys.map((key) => (typeof key === 'string' ? key : key.key)),\n ];\n};\n\nconst getInitialState = <T extends string | KeyConfig>(customKeys: (T | KeyConfig)[]): Record<ExtractKey<AlwaysReturnKeys | T>, AttributeValue> => {\n const allKeys = getAllKeys(customKeys);\n const initialState = {} as Record<ExtractKey<AlwaysReturnKeys | T>, AttributeValue>;\n allKeys.forEach((key) => {\n const typedKey = (typeof key === 'string' ? key : key.key) as ExtractKey<AlwaysReturnKeys | T>;\n initialState[typedKey] = null;\n });\n return initialState;\n};\n\nconst processAttribute = <T extends string | KeyConfig>(\n key: string | T | AlwaysReturnKeys,\n microFrontendDiv: HTMLElement,\n allConfigs: (string | KeyConfig)[],\n): { value: AttributeValue; key: ExtractKey<AlwaysReturnKeys | T> } => {\n const keyConfig = getKeyConfig(key, allConfigs);\n const type = getValueType(keyConfig);\n const keyString = typeof key === 'string' ? key : key.key;\n\n const envVar = import.meta.env[`VITE_${keyString.toUpperCase()}_OVERRIDE`] as string | undefined | null;\n const attributeKey = `data-${keyString}`;\n const domValue = microFrontendDiv.getAttribute(attributeKey);\n\n const value = envVar ? parseValue(envVar.toString(), type) : parseValue(domValue, type);\n return { value, key: keyString as ExtractKey<AlwaysReturnKeys | T> };\n};\n\n/**\n * Custom hook to manage micro-frontend attributes.\n *\n * This hook initializes and updates a set of attributes based on a combination of predefined keys (ALWAYS_RETURN_KEYS)\n * and custom keys provided as arguments. The attributes are fetched from environment variables or DOM attributes\n * and are updated dynamically using a MutationObserver.\n *\n * @template T - The type of custom keys, which can be either a string or a KeyConfig object.\n *\n * @param {Array<T | KeyConfig>} [customKeys=[]] - An array of custom keys or KeyConfig objects to be included in the attributes.\n *\n * @returns {Record<ExtractKey<AlwaysReturnKeys | T>, string | boolean | number | null>} - A record of attributes with their values.\n *\n * @example\n * const attributes = useMicroFrontendAttributes(['customKey1', { key: 'customKey2', type: 'boolean' }]);\n * console.log(attributes);\n */\nconst useMicroFrontendAttributes = <T extends string | KeyConfig>(\n customKeys: (T | KeyConfig)[] = [],\n): Record<ExtractKey<AlwaysReturnKeys | T>, AttributeValue> => {\n const [attributes, setAttributes] = useState(() => getInitialState(customKeys));\n\n useEffect(() => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n if (!microFrontendDiv) {\n console.warn('Micro-frontend div not found');\n return;\n }\n\n const allKeys = getAllKeys(customKeys);\n const allConfigs = [...ALWAYS_RETURN_KEYS, ...customKeys];\n\n const updateValues = () => {\n setAttributes((prev) => {\n const newAttributes = { ...prev };\n let isChanged = false;\n\n allKeys.forEach((key) => {\n const { value, key: typedKey } = processAttribute(key, microFrontendDiv, allConfigs);\n if (newAttributes[typedKey] !== value) {\n newAttributes[typedKey] = value;\n isChanged = true;\n }\n });\n\n return isChanged ? newAttributes : prev;\n });\n };\n\n updateValues();\n\n const observer = new MutationObserver(updateValues);\n observer.observe(microFrontendDiv, { attributes: true });\n\n return () => observer.disconnect();\n }, [customKeys]);\n\n return attributes;\n};\n\nexport default useMicroFrontendAttributes;\n"],"names":["ALWAYS_RETURN_KEYS","key","type","parseValue","value","Number","getAllKeys","customKeys","map","attributes","setAttributes","useState","allKeys","initialState","forEach","typedKey","getInitialState","useEffect","microFrontendDiv","document","getElementById","console","warn","allConfigs","updateValues","prev","newAttributes","isChanged","keyConfig","find","config","getKeyConfig","getValueType","keyString","envVar","undefined","toUpperCase","attributeKey","domValue","getAttribute","toString","processAttribute","observer","MutationObserver","observe","disconnect"],"mappings":"oCASA,MAAMA,EAA6C,CAAC,QAAS,QAAS,CAAEC,IAAK,kBAAmBC,KAAM,YAoBhGC,EAAa,CAACC,EAAsBF,IACjCE,GAAkB,YAATF,EACD,YAATA,EAAqC,SAAVE,EAClB,WAATF,EAA0BG,OAAOD,GAC9BA,EAHkC,KAMvCE,EAA4CC,GACvC,IACAP,EAAmBQ,KAAKP,GAAwB,iBAARA,EAAmBA,EAAMA,EAAIA,SACrEM,EAAWC,KAAKP,GAAwB,iBAARA,EAAmBA,EAAMA,EAAIA,sBAgDrC,CAC/BM,EAAgC,MAEhC,MAAOE,EAAYC,GAAiBC,EAAQA,UAAC,IA/CzB,CAA+BJ,IACnD,MAAMK,EAAUN,EAAWC,GACrBM,EAAe,CAAA,EAKrB,OAJAD,EAAQE,SAASb,IACb,MAAMc,EAA2B,iBAARd,EAAmBA,EAAMA,EAAIA,IACtDY,EAAaE,GAAY,IAAI,IAE1BF,CAAY,EAwCgCG,CAAgBT,KAqCnE,OAnCAU,EAAAA,WAAU,KACN,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,IAAKF,EAED,YADAG,QAAQC,KAAK,gCAIjB,MAAMV,EAAUN,EAAWC,GACrBgB,EAAa,IAAIvB,KAAuBO,GAExCiB,EAAe,KACjBd,GAAee,IACX,MAAMC,EAAgB,IAAKD,GAC3B,IAAIE,GAAY,EAUhB,OARAf,EAAQE,SAASb,IACb,MAAMG,MAAEA,EAAOH,IAAKc,GAvDf,EACrBd,EACAiB,EACAK,KAEA,MAAMK,EArCW,EAA+B3B,EAAgBsB,IACzDA,EAAWM,MAAMC,GAA8B,iBAAXA,EAAsBA,IAAW7B,EAAM6B,EAAO7B,MAAQA,IAoC/E8B,CAAa9B,EAAKsB,GAC9BrB,EAlCW,CAAC0B,GACXA,GAAkC,iBAAdA,GAA0B,SAAUA,EAAYA,EAAU1B,KAAO,SAiC/E8B,CAAaJ,GACpBK,EAA2B,iBAARhC,EAAmBA,EAAMA,EAAIA,IAEhDiC,QAASC,GAAgB,QAAQF,EAAUG,0BAC3CC,EAAe,QAAQJ,IACvBK,EAAWpB,EAAiBqB,aAAaF,GAG/C,MAAO,CAAEjC,MADcD,EAAT+B,EAAoBA,EAAOM,WAA+BF,EAAnBpC,GACrCD,IAAKgC,EAA+C,EAyCnBQ,CAAiBxC,EAAKiB,EAAkBK,GACrEG,EAAcX,KAAcX,IAC5BsB,EAAcX,GAAYX,EAC1BuB,GAAY,EACf,IAGEA,EAAYD,EAAgBD,CAAI,GACzC,EAGND,IAEA,MAAMkB,EAAW,IAAIC,iBAAiBnB,GAGtC,OAFAkB,EAASE,QAAQ1B,EAAkB,CAAET,YAAY,IAE1C,IAAMiC,EAASG,YAAY,GACnC,CAACtC,IAEGE,CAAU"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=require("react/jsx-runtime"),e=require("react"),s=require("../providers/TranslationProvider.cjs.js");module.exports=({fieldError:t,showError:a,touched:o,value:i})=>{const[u,c]=e.useState(""),{translate:l}=s.useTranslation(),n=()=>!a&&o&&i?r.jsx("span",{style:{color:"#1dc798"},children:l("Valid")}):a?t:"";return e.useEffect((()=>{c(n())}),[t,i,a,o]),u};
|
|
2
|
+
//# sourceMappingURL=useRenderValidText.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRenderValidText.cjs.js","sources":["../../src/custom-hooks/useRenderValidText.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { useTranslation } from '../providers/TranslationProvider';\n\ntype ValidationState = {\n fieldError?: string;\n showError?: boolean;\n touched: boolean;\n value: string;\n};\n\ntype ValidationElement = JSX.Element | string | undefined;\n\n/**\n * @description Custom hook for rendering validation text in form fields\n * @description Handles different validation states with separate methods for better clarity\n */\nconst useRenderValidText = ({ fieldError, showError, touched, value }: ValidationState) => {\n const [validTextElement, setValidTextElement] = useState<ValidationElement>('');\n const { translate } = useTranslation();\n\n const renderValidState = (): ValidationElement => {\n return <span style={{ color: '#1dc798' }}>{translate('Valid')}</span>;\n };\n\n const renderErrorState = (): ValidationElement => {\n return fieldError;\n };\n\n const renderEmptyState = (): ValidationElement => {\n return '';\n };\n\n const determineValidationState = (): ValidationElement => {\n if (!showError && touched && value) {\n return renderValidState();\n }\n\n if (showError) {\n return renderErrorState();\n }\n\n return renderEmptyState();\n };\n\n useEffect(() => {\n setValidTextElement(determineValidationState());\n }, [fieldError, value, showError, touched]);\n\n return validTextElement;\n};\n\nexport default useRenderValidText;\n"],"names":["fieldError","showError","touched","value","validTextElement","setValidTextElement","useState","translate","useTranslation","determineValidationState","_jsx","style","color","children","useEffect"],"mappings":"uIAgB2B,EAAGA,aAAYC,YAAWC,UAASC,YAC1D,MAAOC,EAAkBC,GAAuBC,EAAQA,SAAoB,KACtEC,UAAEA,GAAcC,EAAAA,iBAchBC,EAA2B,KACxBR,GAAaC,GAAWC,EAZtBO,MAAM,OAAA,CAAAC,MAAO,CAAEC,MAAO,WAAWC,SAAGN,EAAU,WAgBjDN,EAZGD,EAIA,GAmBX,OAJAc,EAAAA,WAAU,KACNT,EAAoBI,IAA2B,GAChD,CAACT,EAAYG,EAAOF,EAAWC,IAE3BE,CAAgB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=require("notistack");module.exports=()=>{const{enqueueSnackbar:o,closeSnackbar:r}=s.useSnackbar(),a=(s,r,a=void 0)=>o(s,{autoHideDuration:a?.durationMs,persist:a?.persist,variant:r});return{dismissAllToasts:()=>{r()},dismissToast:s=>{r(s)},showDefaultToast:(s,o=void 0)=>a(s,"default",o),showSuccessToast:(s,o=void 0)=>a(s,"success",o),showErrorToast:(s,o=void 0)=>a(s,"error",o)}};
|
|
2
|
+
//# sourceMappingURL=useToasts.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToasts.cjs.js","sources":["../../src/custom-hooks/useToasts.tsx"],"sourcesContent":["import { useSnackbar, type SnackbarKey, type VariantType } from 'notistack';\n\n/**\n * Configuration options for toast notifications\n * @interface ToastOptions\n * @property {boolean} [persist] - If true, the toast will not auto-dismiss\n * @property {number} [durationMs] - Duration in milliseconds before the toast auto-dismisses\n */\nexport interface ToastOptions {\n /** If true, the toast will not auto-dismiss */\n persist?: boolean;\n /** Duration in milliseconds before the toast auto-dismisses */\n durationMs?: number;\n}\n\n/**\n * Type alias for toast notification keys\n * Used to uniquely identify toast notifications for dismissal\n */\nexport type ToastKey = SnackbarKey;\n\n/**\n * Interface defining the return value of the useToasts hook\n */\nexport interface UseToastsReturn {\n /** Dismisses all active toast notifications */\n dismissAllToasts: () => void;\n /** Dismisses a specific toast by its key */\n dismissToast: (key: string) => void;\n /** Shows a default toast notification */\n showDefaultToast: (message: string, options?: ToastOptions) => ToastKey;\n /** Shows a success toast notification */\n showSuccessToast: (message: string, options?: ToastOptions) => ToastKey;\n /** Shows an error toast notification */\n showErrorToast: (message: string, options?: ToastOptions) => ToastKey;\n}\n\n/**\n * Custom hook for managing toast notifications\n * Provides methods to show different types of toasts (default, success, error)\n * and dismiss them individually or all at once\n *\n * @example\n * ```tsx\n * const { showSuccessToast, showErrorToast, dismissAllToasts } = useToasts();\n *\n * // Show a success toast that auto-dismisses after 3 seconds\n * const toastKey = showSuccessToast('Operation successful', { durationMs: 3000 });\n *\n * // Show a persistent error toast\n * const errorToastKey = showErrorToast('Error occurred', { persist: true });\n *\n * // Later, dismiss a specific toast using its key\n * dismissToast(toastKey);\n *\n * // Or dismiss all toasts\n * dismissAllToasts();\n * ```\n */\nconst useToasts = (): UseToastsReturn => {\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\n\n /**\n * Dismisses all currently active toast notifications\n */\n const dismissAllToasts = () => {\n closeSnackbar();\n };\n\n /**\n * Dismisses a specific toast notification by its key\n * @param {string} key - Unique identifier of the toast to dismiss\n */\n const dismissToast = (key: string) => {\n closeSnackbar(key);\n };\n\n /**\n * Internal method to show a toast notification with specified variant and options\n * @param {string} message - The message to display in the toast\n * @param {VariantType} variant - The type of toast (default, success, error)\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showToast = (message: string, variant: VariantType, options: ToastOptions | undefined = undefined): ToastKey => {\n return enqueueSnackbar(message, {\n autoHideDuration: options?.durationMs,\n persist: options?.persist,\n variant,\n });\n };\n\n /**\n * Shows a default toast notification\n * @param {string} message - The message to display\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showDefaultToast = (message: string, options: ToastOptions | undefined = undefined): ToastKey => {\n return showToast(message, 'default', options);\n };\n\n /**\n * Shows a success toast notification\n * @param {string} message - The message to display\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showSuccessToast = (message: string, options: ToastOptions | undefined = undefined): ToastKey => {\n return showToast(message, 'success', options);\n };\n\n /**\n * Shows an error toast notification\n * @param {string} message - The message to display\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showErrorToast = (message: string, options: ToastOptions | undefined = undefined): ToastKey => {\n return showToast(message, 'error', options);\n };\n\n return { dismissAllToasts, dismissToast, showDefaultToast, showSuccessToast, showErrorToast };\n};\n\nexport default useToasts;\n"],"names":["enqueueSnackbar","closeSnackbar","useSnackbar","showToast","message","variant","options","undefined","autoHideDuration","durationMs","persist","dismissAllToasts","dismissToast","key","showDefaultToast","showSuccessToast","showErrorToast"],"mappings":"uDA2DkB,KACd,MAAMA,gBAAEA,EAAeC,cAAEA,GAAkBC,EAAWA,cAwBhDC,EAAY,CAACC,EAAiBC,EAAsBC,OAAoCC,IACnFP,EAAgBI,EAAS,CAC5BI,iBAAkBF,GAASG,WAC3BC,QAASJ,GAASI,QAClBL,YAkCR,MAAO,CAAEM,iBAzDgB,KACrBV,GAAe,EAwDQW,aAjDLC,IAClBZ,EAAcY,EAAI,EAgDmBC,iBAxBhB,CAACV,EAAiBE,OAAoCC,IACpEJ,EAAUC,EAAS,UAAWE,GAuBkBS,iBAdlC,CAACX,EAAiBE,OAAoCC,IACpEJ,EAAUC,EAAS,UAAWE,GAaoCU,eAJtD,CAACZ,EAAiBE,OAAoCC,IAClEJ,EAAUC,EAAS,QAASE,GAGsD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessTimeIcon.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import i from"@mui/icons-material/AccessTime";export{default}from"@mui/icons-material/AccessTime";
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=AccessTimeIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessTimeIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalenderTodayIcon.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import a from"@mui/icons-material/CalendarToday";export{default}from"@mui/icons-material/CalendarToday";
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=CalenderTodayIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalenderTodayIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DoneIcon.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import o from"@mui/icons-material/Done";export{default}from"@mui/icons-material/Done";
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=DoneIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DoneIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchIcon.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import r from"@mui/icons-material/Search";export{default}from"@mui/icons-material/Search";
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=SearchIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var C=require("react/jsx-runtime");module.exports=({width:e=24,height:i=24,fill:t="#00CDBC"})=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:i,viewBox:"0 0 24 24",fill:"none",children:C.jsx("path",{d:"M16.0509 2L15.1117 10.82L13.5084 3.38333L8.48088 4.43833L10.0842 11.8733L2.83838 13.3917L4.11755 19.3308L16.86 22L19.775 15.5467L21.1617 2.53L16.0509 2ZM11.4917 13.3417C11.5841 13.3401 11.6757 13.3588 11.76 13.3967C11.9334 13.4742 12.2267 13.6383 12.285 13.89C12.3709 14.2517 12.2884 14.5558 12.025 14.7933V14.795C11.7625 15.0317 11.415 15.01 11.0467 14.8892C10.6792 14.7683 10.5159 14.3292 10.655 13.7983C10.7584 13.4042 11.2467 13.3458 11.4917 13.3417ZM14.9434 13.7983C15.3159 13.7883 15.6367 13.9533 15.8184 14.2508C15.9992 14.5483 15.9075 14.8758 15.7167 15.2033H15.715C15.5242 15.53 15.0234 15.5742 14.53 15.3367C14.1975 15.1758 14.1992 14.7667 14.2359 14.5175C14.2551 14.3812 14.3107 14.2525 14.3967 14.145C14.515 13.9975 14.7142 13.805 14.9434 13.7983Z",fill:t})});
|
|
2
|
+
//# sourceMappingURL=Deliveroo.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Deliveroo.cjs.js","sources":["../../../src/icons/logo/Deliveroo.tsx"],"sourcesContent":["type DeliverooLogoProps = {\n width?: number;\n height?: number;\n fill?: string;\n};\n\nconst DeliverooLogo: React.FC<DeliverooLogoProps> = ({ width = 24, height = 24, fill = '#00CDBC' }) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={width} height={height} viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d=\"M16.0509 2L15.1117 10.82L13.5084 3.38333L8.48088 4.43833L10.0842 11.8733L2.83838 13.3917L4.11755 19.3308L16.86 22L19.775 15.5467L21.1617 2.53L16.0509 2ZM11.4917 13.3417C11.5841 13.3401 11.6757 13.3588 11.76 13.3967C11.9334 13.4742 12.2267 13.6383 12.285 13.89C12.3709 14.2517 12.2884 14.5558 12.025 14.7933V14.795C11.7625 15.0317 11.415 15.01 11.0467 14.8892C10.6792 14.7683 10.5159 14.3292 10.655 13.7983C10.7584 13.4042 11.2467 13.3458 11.4917 13.3417ZM14.9434 13.7983C15.3159 13.7883 15.6367 13.9533 15.8184 14.2508C15.9992 14.5483 15.9075 14.8758 15.7167 15.2033H15.715C15.5242 15.53 15.0234 15.5742 14.53 15.3367C14.1975 15.1758 14.1992 14.7667 14.2359 14.5175C14.2551 14.3812 14.3107 14.2525 14.3967 14.145C14.515 13.9975 14.7142 13.805 14.9434 13.7983Z\"\n fill={fill}\n />\n </svg>\n );\n};\n\nexport default DeliverooLogo;\n"],"names":["width","height","fill","_jsx","xmlns","viewBox","children","d"],"mappings":"+DAMoD,EAAGA,QAAQ,GAAIC,SAAS,GAAIC,OAAO,aAE/EC,MAAA,MAAA,CAAKC,MAAM,6BAA6BJ,MAAOA,EAAOC,OAAQA,EAAQI,QAAQ,YAAYH,KAAK,OAAMI,SACjGH,cACII,EAAE,0vBACFL,KAAMA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{jsx as C}from"react/jsx-runtime";const t=({width:t=24,height:i=24,fill:L="#00CDBC"})=>C("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:i,viewBox:"0 0 24 24",fill:"none",children:C("path",{d:"M16.0509 2L15.1117 10.82L13.5084 3.38333L8.48088 4.43833L10.0842 11.8733L2.83838 13.3917L4.11755 19.3308L16.86 22L19.775 15.5467L21.1617 2.53L16.0509 2ZM11.4917 13.3417C11.5841 13.3401 11.6757 13.3588 11.76 13.3967C11.9334 13.4742 12.2267 13.6383 12.285 13.89C12.3709 14.2517 12.2884 14.5558 12.025 14.7933V14.795C11.7625 15.0317 11.415 15.01 11.0467 14.8892C10.6792 14.7683 10.5159 14.3292 10.655 13.7983C10.7584 13.4042 11.2467 13.3458 11.4917 13.3417ZM14.9434 13.7983C15.3159 13.7883 15.6367 13.9533 15.8184 14.2508C15.9992 14.5483 15.9075 14.8758 15.7167 15.2033H15.715C15.5242 15.53 15.0234 15.5742 14.53 15.3367C14.1975 15.1758 14.1992 14.7667 14.2359 14.5175C14.2551 14.3812 14.3107 14.2525 14.3967 14.145C14.515 13.9975 14.7142 13.805 14.9434 13.7983Z",fill:L})});export{t as default};
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=Deliveroo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Deliveroo.js","sources":["../../../src/icons/logo/Deliveroo.tsx"],"sourcesContent":["type DeliverooLogoProps = {\n width?: number;\n height?: number;\n fill?: string;\n};\n\nconst DeliverooLogo: React.FC<DeliverooLogoProps> = ({ width = 24, height = 24, fill = '#00CDBC' }) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={width} height={height} viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d=\"M16.0509 2L15.1117 10.82L13.5084 3.38333L8.48088 4.43833L10.0842 11.8733L2.83838 13.3917L4.11755 19.3308L16.86 22L19.775 15.5467L21.1617 2.53L16.0509 2ZM11.4917 13.3417C11.5841 13.3401 11.6757 13.3588 11.76 13.3967C11.9334 13.4742 12.2267 13.6383 12.285 13.89C12.3709 14.2517 12.2884 14.5558 12.025 14.7933V14.795C11.7625 15.0317 11.415 15.01 11.0467 14.8892C10.6792 14.7683 10.5159 14.3292 10.655 13.7983C10.7584 13.4042 11.2467 13.3458 11.4917 13.3417ZM14.9434 13.7983C15.3159 13.7883 15.6367 13.9533 15.8184 14.2508C15.9992 14.5483 15.9075 14.8758 15.7167 15.2033H15.715C15.5242 15.53 15.0234 15.5742 14.53 15.3367C14.1975 15.1758 14.1992 14.7667 14.2359 14.5175C14.2551 14.3812 14.3107 14.2525 14.3967 14.145C14.515 13.9975 14.7142 13.805 14.9434 13.7983Z\"\n fill={fill}\n />\n </svg>\n );\n};\n\nexport default DeliverooLogo;\n"],"names":["DeliverooLogo","width","height","fill","_jsx","xmlns","viewBox","children","d"],"mappings":"wCAMA,MAAMA,EAA8C,EAAGC,QAAQ,GAAIC,SAAS,GAAIC,OAAO,aAE/EC,EAAA,MAAA,CAAKC,MAAM,6BAA6BJ,MAAOA,EAAOC,OAAQA,EAAQI,QAAQ,YAAYH,KAAK,OAAMI,SACjGH,UACII,EAAE,0vBACFL,KAAMA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"Über"},t={value:"Über Seite"},o={value:"Klicken Sie auf die Vite- und React-Logos, um mehr zu erfahren"},a={value:"Nur Flipdish-Mitarbeiter"},r={value:"Zur Über-Seite"},_={value:"Zur Startseite"},i={value:"Zuhause"},l={value:"Seite Nicht Gefunden"},u={value:"Erforderlich"},s={value:"Etwas ist schief gelaufen. Bitte aktualisieren Sie die Seite."},p={value:"Gültig"},n={value:"Willkommen auf der Über-Seite"},d={value:"Willkommen im neuen Flipdish Portal"},g={About:e,About_Page:t,Click_vite_react:o,Flipdish_staff_only:a,Go_to_about_page:r,Go_to_home_page:_,Home:i,"Micro-Frontend_Example":{value:"Micro-Frontend Beispiel"},Page_Not_Found:l,Required:u,Something_went_wrong_please_refresh_the_page:s,Valid:p,Welcome_about_page:n,Welcome_to_new_portal:d};exports.About=e,exports.About_Page=t,exports.Click_vite_react=o,exports.Flipdish_staff_only=a,exports.Go_to_about_page=r,exports.Go_to_home_page=_,exports.Home=i,exports.Page_Not_Found=l,exports.Required=u,exports.Something_went_wrong_please_refresh_the_page=s,exports.Valid=p,exports.Welcome_about_page=n,exports.Welcome_to_new_portal=d,exports.default=g;
|
|
2
|
+
//# sourceMappingURL=de.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"AboutAbout"},o={value:"About PageAbout Page"},t={value:"Click on the Vite and React logos to learn moreClick on the Vite and React logos to learn more"},a={value:"Count is {count}Count is {count}"},l={value:"Flipdish staff onlyFlipdish staff only"},_={value:"Go to About PageGo to About Page"},r={value:"Go to home PageGo to home Page"},u={value:"HomeHome"},n={value:"Page Not FoundPage Not Found"},s={value:"RequiredRequired"},p={value:"Something went wrong, please refresh the pageSomething went wrong, please refresh the page"},i={value:"ValidValid"},g={value:"Welcome to the About PageWelcome to the About Page"},h={value:"Welcome to the new Flipdish PortalWelcome to the new Flipdish Portal"},d={About:e,About_Page:o,Click_vite_react:t,Count_is:a,Flipdish_staff_only:l,Go_to_about_page:_,Go_to_home_page:r,Home:u,"Micro-Frontend_Example":{value:"Micro-Frontend ExampleMicro-Frontend Example"},Page_Not_Found:n,Required:s,Something_went_wrong_please_refresh_the_page:p,Valid:i,Welcome_about_page:g,Welcome_to_new_portal:h};exports.About=e,exports.About_Page=o,exports.Click_vite_react=t,exports.Count_is=a,exports.Flipdish_staff_only=l,exports.Go_to_about_page=_,exports.Go_to_home_page=r,exports.Home=u,exports.Page_Not_Found=n,exports.Required=s,exports.Something_went_wrong_please_refresh_the_page=p,exports.Valid=i,exports.Welcome_about_page=g,exports.Welcome_to_new_portal=h,exports.default=d;
|
|
2
|
+
//# sourceMappingURL=dev-lang.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-lang.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"About"},o={value:"About Page"},t={value:"Click on the Vite and React logos to learn more"},a={value:"Count is {count}"},_={value:"Flipdish staff only"},l={value:"Go to About Page"},r={value:"Go to Home Page"},u={value:"Home"},p={value:"Page Not Found"},s={value:"Required"},i={value:"Something went wrong, please refresh the page"},n={value:"Valid"},g={value:"Welcome to the About Page"},d={value:"Welcome to the new Flipdish Portal"},v={About:e,About_Page:o,Click_vite_react:t,Count_is:a,Flipdish_staff_only:_,Go_to_about_page:l,Go_to_home_page:r,Home:u,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:p,Required:s,Something_went_wrong_please_refresh_the_page:i,Valid:n,Welcome_about_page:g,Welcome_to_new_portal:d};exports.About=e,exports.About_Page=o,exports.Click_vite_react=t,exports.Count_is=a,exports.Flipdish_staff_only=_,exports.Go_to_about_page=l,exports.Go_to_home_page=r,exports.Home=u,exports.Page_Not_Found=p,exports.Required=s,exports.Something_went_wrong_please_refresh_the_page=i,exports.Valid=n,exports.Welcome_about_page=g,exports.Welcome_to_new_portal=d,exports.default=v;
|
|
2
|
+
//# sourceMappingURL=en-US.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-US.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"About"},o={value:"About Page"},t={value:"Click on the Vite and React logos to learn more"},a={value:"Count is {count}"},_={value:"Flipdish staff only"},l={value:"Go to About Page"},r={value:"Go to home Page"},u={value:"Home"},p={value:"Page Not Found"},s={value:"Required"},i={value:"Something went wrong, please refresh the page"},n={value:"Valid"},g={value:"Welcome to the About Page"},d={value:"Welcome to the new Flipdish Portal"},h={About:e,About_Page:o,Click_vite_react:t,Count_is:a,Flipdish_staff_only:_,Go_to_about_page:l,Go_to_home_page:r,Home:u,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:p,Required:s,Something_went_wrong_please_refresh_the_page:i,Valid:n,Welcome_about_page:g,Welcome_to_new_portal:d};exports.About=e,exports.About_Page=o,exports.Click_vite_react=t,exports.Count_is=a,exports.Flipdish_staff_only=_,exports.Go_to_about_page=l,exports.Go_to_home_page=r,exports.Home=u,exports.Page_Not_Found=p,exports.Required=s,exports.Something_went_wrong_please_refresh_the_page=i,exports.Valid=n,exports.Welcome_about_page=g,exports.Welcome_to_new_portal=d,exports.default=h;
|
|
2
|
+
//# sourceMappingURL=en.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"Acerca de"},o={value:"Página de Acerca de"},a={value:"Haz clic en los logos de Vite y React para aprender más"},t={value:"El recuento es {count}"},l={value:"Solo para el personal de Flipdish"},r={value:"Ir a la página de Acerca de"},_={value:"Ir a la página de Inicio"},i={value:"Inicio"},p={value:"Página No Encontrada"},n={value:"Requerido"},s={value:"Algo salió mal. Por favor, refresca la página."},u={value:"Válido"},d={value:"Bienvenido a la página de Acerca de"},c={value:"Bienvenido al nuevo Flipdish Portal"},g={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:l,Go_to_about_page:r,Go_to_home_page:_,Home:i,"Micro-Frontend_Example":{value:"Ejemplo de Micro-Frontend"},Page_Not_Found:p,Required:n,Something_went_wrong_please_refresh_the_page:s,Valid:u,Welcome_about_page:d,Welcome_to_new_portal:c};exports.About=e,exports.About_Page=o,exports.Click_vite_react=a,exports.Count_is=t,exports.Flipdish_staff_only=l,exports.Go_to_about_page=r,exports.Go_to_home_page=_,exports.Home=i,exports.Page_Not_Found=p,exports.Required=n,exports.Something_went_wrong_please_refresh_the_page=s,exports.Valid=u,exports.Welcome_about_page=d,exports.Welcome_to_new_portal=c,exports.default=g;
|
|
2
|
+
//# sourceMappingURL=es-MX.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es-MX.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"Acerca de"},o={value:"Página de Acerca de"},a={value:"Haz clic en los logos de Vite y React para aprender más"},t={value:"El recuento es {count}"},l={value:"Solo para el personal de Flipdish"},r={value:"Ir a la página de Acerca de"},_={value:"Ir a la página de Inicio"},i={value:"Inicio"},p={value:"Página No Encontrada"},n={value:"Requerido"},s={value:"Algo salió mal. Por favor, refresca la página."},u={value:"Válido"},d={value:"Bienvenido a la página de Acerca de"},c={value:"Bienvenido al nuevo Flipdish Portal"},g={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:l,Go_to_about_page:r,Go_to_home_page:_,Home:i,"Micro-Frontend_Example":{value:"Ejemplo de Micro-Frontend"},Page_Not_Found:p,Required:n,Something_went_wrong_please_refresh_the_page:s,Valid:u,Welcome_about_page:d,Welcome_to_new_portal:c};exports.About=e,exports.About_Page=o,exports.Click_vite_react=a,exports.Count_is=t,exports.Flipdish_staff_only=l,exports.Go_to_about_page=r,exports.Go_to_home_page=_,exports.Home=i,exports.Page_Not_Found=p,exports.Required=n,exports.Something_went_wrong_please_refresh_the_page=s,exports.Valid=u,exports.Welcome_about_page=d,exports.Welcome_to_new_portal=c,exports.default=g;
|
|
2
|
+
//# sourceMappingURL=es.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"À propos"},o={value:"Page À propos"},a={value:"Cliquez sur les logos Vite et React pour en savoir plus"},t={value:"Le compte est de {count}"},l={value:"Réservé au personnel Flipdish"},r={value:"Aller à la page À propos"},_={value:"Aller à la page d'accueil"},p={value:"Accueil"},u={value:"Page Non Trouvée"},s={value:"Requis"},i={value:"Quelque chose s'est mal passé, veuillez rafraîchir la page"},n={value:"Valide"},v={value:"Bienvenue sur la page À propos"},g={value:"Bienvenue sur le nouveau Flipdish Portal"},c={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:l,Go_to_about_page:r,Go_to_home_page:_,Home:p,"Micro-Frontend_Example":{value:"Exemple de Micro-Frontend"},Page_Not_Found:u,Required:s,Something_went_wrong_please_refresh_the_page:i,Valid:n,Welcome_about_page:v,Welcome_to_new_portal:g};exports.About=e,exports.About_Page=o,exports.Click_vite_react=a,exports.Count_is=t,exports.Flipdish_staff_only=l,exports.Go_to_about_page=r,exports.Go_to_home_page=_,exports.Home=p,exports.Page_Not_Found=u,exports.Required=s,exports.Something_went_wrong_please_refresh_the_page=i,exports.Valid=n,exports.Welcome_about_page=v,exports.Welcome_to_new_portal=g,exports.default=c;
|
|
2
|
+
//# sourceMappingURL=fr.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"Informazioni"},o={value:"Pagina Informazioni"},a={value:"Clicca sui loghi Vite e React per saperne di più"},t={value:"Il conteggio è {count}"},l={value:"Solo per il personale Flipdish"},i={value:"Vai alla pagina Informazioni"},_={value:"Vai alla Home"},r={value:"Home"},n={value:"Pagina Non Trovata"},p={value:"Richiesto"},u={value:"Qualcosa è andato storto, per favore aggiorna la pagina"},s={value:"Valido"},g={value:"Benvenuto nella pagina Informazioni"},v={value:"Benvenuto nel nuovo Flipdish Portal"},c={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:l,Go_to_about_page:i,Go_to_home_page:_,Home:r,"Micro-Frontend_Example":{value:"Esempio di Micro-Frontend"},Page_Not_Found:n,Required:p,Something_went_wrong_please_refresh_the_page:u,Valid:s,Welcome_about_page:g,Welcome_to_new_portal:v};exports.About=e,exports.About_Page=o,exports.Click_vite_react=a,exports.Count_is=t,exports.Flipdish_staff_only=l,exports.Go_to_about_page=i,exports.Go_to_home_page=_,exports.Home=r,exports.Page_Not_Found=n,exports.Required=p,exports.Something_went_wrong_please_refresh_the_page=u,exports.Valid=s,exports.Welcome_about_page=g,exports.Welcome_to_new_portal=v,exports.default=c;
|
|
2
|
+
//# sourceMappingURL=it.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"it.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"Over"},o={value:"Over Pagina"},a={value:"Klik op de Vite- en React-logo's om meer te leren"},t={value:"Het aantal is {count}"},r={value:"Alleen Flipdish-medewerkers"},_={value:"Ga naar de Over-pagina"},l={value:"Ga naar de Startpagina"},i={value:"Thuis"},s={value:"Pagina Niet Gevonden"},p={value:"Vereist"},u={value:"Er is iets misgegaan, ververs de pagina alstublieft"},n={value:"Geldig"},g={value:"Welkom op de Over-pagina"},v={value:"Welkom bij het nieuwe Flipdish Portal"},d={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:r,Go_to_about_page:_,Go_to_home_page:l,Home:i,"Micro-Frontend_Example":{value:"Micro-Frontend Voorbeeld"},Page_Not_Found:s,Required:p,Something_went_wrong_please_refresh_the_page:u,Valid:n,Welcome_about_page:g,Welcome_to_new_portal:v};exports.About=e,exports.About_Page=o,exports.Click_vite_react=a,exports.Count_is=t,exports.Flipdish_staff_only=r,exports.Go_to_about_page=_,exports.Go_to_home_page=l,exports.Home=i,exports.Page_Not_Found=s,exports.Required=p,exports.Something_went_wrong_please_refresh_the_page=u,exports.Valid=n,exports.Welcome_about_page=g,exports.Welcome_to_new_portal=v,exports.default=d;
|
|
2
|
+
//# sourceMappingURL=nl.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nl.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"Sobre"},o={value:"Página Sobre"},a={value:"Clique nos logos do Vite e React para saber mais"},t={value:"O contador é {count}"},r={value:"Apenas funcionários da Flipdish"},_={value:"Ir para a página Sobre"},l={value:"Ir para a página Inicial"},i={value:"Início"},p={value:"Página Não Encontrada"},n={value:"Obrigatório"},u={value:"Algo deu errado, por favor atualize a página"},s={value:"Válido"},d={value:"Bem-vindo à página Sobre"},g={value:"Bem-vindo ao novo Flipdish Portal"},v={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:r,Go_to_about_page:_,Go_to_home_page:l,Home:i,"Micro-Frontend_Example":{value:"Exemplo de Micro-Frontend"},Page_Not_Found:p,Required:n,Something_went_wrong_please_refresh_the_page:u,Valid:s,Welcome_about_page:d,Welcome_to_new_portal:g};exports.About=e,exports.About_Page=o,exports.Click_vite_react=a,exports.Count_is=t,exports.Flipdish_staff_only=r,exports.Go_to_about_page=_,exports.Go_to_home_page=l,exports.Home=i,exports.Page_Not_Found=p,exports.Required=n,exports.Something_went_wrong_please_refresh_the_page=u,exports.Valid=s,exports.Welcome_about_page=d,exports.Welcome_to_new_portal=g,exports.default=v;
|
|
2
|
+
//# sourceMappingURL=pt.json.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt.json.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");require("react");var r=require("@mui/x-date-pickers/AdapterMoment"),i=require("@mui/x-date-pickers/LocalizationProvider");module.exports=({children:t})=>e.jsx(i.LocalizationProvider,{dateAdapter:r.AdapterMoment,children:t});
|
|
2
|
+
//# sourceMappingURL=DateTimeLocalizationProvider.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimeLocalizationProvider.cjs.js","sources":["../../src/providers/DateTimeLocalizationProvider.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';\n\nconst DateTimeLocalizationProvider = ({ children }: { children: ReactNode }) => {\n return <LocalizationProvider dateAdapter={AdapterMoment}>{children}</LocalizationProvider>;\n};\n\nexport default DateTimeLocalizationProvider;\n"],"names":["children","_jsx","LocalizationProvider","dateAdapter","AdapterMoment"],"mappings":"yLAIqC,EAAGA,cAC7BC,EAAAA,IAACC,EAAAA,qBAAqB,CAAAC,YAAaC,EAAAA,cAAaJ,SAAGA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/styles"),r=require("notistack");const n=t.styled(r.MaterialDesignContent)((({theme:e})=>({"&.notistack-MuiContent-default":{backgroundColor:e.palette.black.main},"&.notistack-MuiContent-success":{backgroundColor:e.palette.success.main},"&.notistack-MuiContent-error":{backgroundColor:e.palette.error.main}})));module.exports=({children:t})=>e.jsx(r.SnackbarProvider,{maxSnack:3,anchorOrigin:{vertical:"bottom",horizontal:"center"},Components:{success:n,error:n,default:n},children:t});
|
|
2
|
+
//# sourceMappingURL=ToastProvider.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastProvider.cjs.js","sources":["../../src/providers/ToastProvider.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport { SnackbarProvider, MaterialDesignContent } from 'notistack';\n\nconst StyledMaterialDesignContent = styled(MaterialDesignContent)(({ theme }) => ({\n '&.notistack-MuiContent-default': {\n backgroundColor: theme.palette.black.main,\n },\n '&.notistack-MuiContent-success': {\n backgroundColor: theme.palette.success.main,\n },\n '&.notistack-MuiContent-error': {\n backgroundColor: theme.palette.error.main,\n },\n}));\n\n/**\n * ToastProvider component that wraps the application with notistack's SnackbarProvider.\n * Provides a centralized toast notification system with custom styling.\n *\n * Features:\n * - Maximum of 3 notifications displayed simultaneously\n * - Notifications appear at the bottom center of the scree\n *\n * @param {Object} props - Component props\n * @param {React.ReactNode} props.children - Child components to be wrapped by the provider\n * @returns {JSX.Element} ToastProvider component\n *\n * @example\n * ```tsx\n * <ToastProvider>\n * <App />\n * </ToastProvider>\n * ```\n */\nconst ToastProvider = ({ children }: { children: React.ReactNode }) => {\n return (\n <SnackbarProvider\n maxSnack={3}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n Components={{\n success: StyledMaterialDesignContent,\n error: StyledMaterialDesignContent,\n default: StyledMaterialDesignContent,\n }}\n >\n {children}\n </SnackbarProvider>\n );\n};\n\nexport default ToastProvider;\n"],"names":["StyledMaterialDesignContent","styled","MaterialDesignContent","theme","backgroundColor","palette","black","main","success","error","children","_jsx","SnackbarProvider","maxSnack","anchorOrigin","vertical","horizontal","Components","default"],"mappings":"yGAGA,MAAMA,EAA8BC,EAAAA,OAAOC,EAAAA,sBAAPD,EAA8B,EAAGE,YAAa,CAC9E,iCAAkC,CAC9BC,gBAAiBD,EAAME,QAAQC,MAAMC,MAEzC,iCAAkC,CAC9BH,gBAAiBD,EAAME,QAAQG,QAAQD,MAE3C,+BAAgC,CAC5BH,gBAAiBD,EAAME,QAAQI,MAAMF,yBAuBvB,EAAGG,cAEjBC,MAACC,EAAgBA,iBAAA,CACbC,SAAU,EACVC,aAAc,CACVC,SAAU,SACVC,WAAY,UAEhBC,WAAY,CACRT,QAASR,EACTS,MAAOT,EACPkB,QAASlB,GAGZU,SAAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),n=require("react"),r=require("../localization/en.json.cjs.js"),o=require("../utilities/renderUtilities.cjs.js");const t=n.createContext({}),s=["nl","en-US","de","fr","it","es","pt","es-MX","dev-lang"];exports.TranslationProvider=({children:r,translations:o})=>{const s=n.useMemo((()=>({translations:o})),[o]);return e.jsx(t.Provider,{value:s,children:r})},exports.useLoadTranslations=()=>{const[e,r]=n.useState({loading:!0,translations:{}}),t=o.getMicroFrontendAttribute("data-language")||"";return n.useEffect((()=>{(async()=>{s.includes(t)?function(e){switch(e){case"../../../../localization/de.json":return Promise.resolve().then((function(){return require("../localization/de.json.cjs.js")}));case"../../../../localization/dev-lang.json":return Promise.resolve().then((function(){return require("../localization/dev-lang.json.cjs.js")}));case"../../../../localization/en-US.json":return Promise.resolve().then((function(){return require("../localization/en-US.json.cjs.js")}));case"../../../../localization/en.json":return Promise.resolve().then((function(){return require("../localization/en.json.cjs.js")}));case"../../../../localization/es-MX.json":return Promise.resolve().then((function(){return require("../localization/es-MX.json.cjs.js")}));case"../../../../localization/es.json":return Promise.resolve().then((function(){return require("../localization/es.json.cjs.js")}));case"../../../../localization/fr.json":return Promise.resolve().then((function(){return require("../localization/fr.json.cjs.js")}));case"../../../../localization/it.json":return Promise.resolve().then((function(){return require("../localization/it.json.cjs.js")}));case"../../../../localization/nl.json":return Promise.resolve().then((function(){return require("../localization/nl.json.cjs.js")}));case"../../../../localization/pt.json":return Promise.resolve().then((function(){return require("../localization/pt.json.cjs.js")}));default:return new Promise((function(n,r){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`../../../../localization/${t}.json`).then((e=>e.default)).then((e=>{r({loading:!1,translations:e})})).catch((e=>{r({loading:!1}),window.fdlogger?.error(`Error while fetching ${t||"en"} language JSON data: ${e.message}`)})):r({loading:!1})})()}),[t]),{translations:e.translations||{},loading:e.loading}},exports.useTranslation=()=>{const{translations:e}=n.useContext(t);return{translate:n.useCallback(((n,o)=>{let t=e?.[n]?.value||r.default[n]?.value||n;return o&&t&&Object.keys(o)?.forEach((e=>{t=t.replace(new RegExp(`{${e}}`,"g"),`${o[e]}`)})),t}),[e]),translations:e}};
|
|
2
|
+
//# sourceMappingURL=TranslationProvider.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranslationProvider.cjs.js","sources":["../../src/providers/TranslationProvider.tsx"],"sourcesContent":["import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport en from '../../../../localization/en.json';\nimport { getMicroFrontendAttribute } from '../utilities/renderUtilities';\n\nexport type TranslationId = keyof typeof en;\n\ntype Translation = { value: string };\n\ninterface TranslationBase {\n translations: Record<string, Translation>;\n}\n\nconst TranslationContext = createContext<TranslationBase>({} as unknown as TranslationBase);\n\ntype TranslationProp = {\n children: JSX.Element;\n} & TranslationBase;\n\nexport const TranslationProvider = ({ children, translations }: TranslationProp): JSX.Element => {\n const value = useMemo(() => ({ translations }), [translations]);\n return <TranslationContext.Provider value={value}>{children}</TranslationContext.Provider>;\n};\n\nexport const useTranslation = (): {\n translate: (key: TranslationId, data?: Record<string, string | number>) => string;\n translations: Record<string, Translation>;\n} => {\n const { translations } = useContext(TranslationContext);\n\n const translate = useCallback(\n (key: TranslationId, data?: Record<string, string | number>): string => {\n let translation = translations?.[key]?.value || en[key]?.value || key;\n if (data && translation) {\n Object.keys(data)?.forEach((key) => {\n translation = translation.replace(new RegExp(`{${key}}`, 'g'), `${data[key]}`);\n });\n }\n return translation;\n },\n [translations],\n );\n return { translate, translations };\n};\n\nconst languagesToLoad = ['nl', 'en-US', 'de', 'fr', 'it', 'es', 'pt', 'es-MX', 'dev-lang'];\n\nexport const useLoadTranslations = () => {\n const [translations, setTranslations] = useState<{\n loading: boolean;\n translations?: Record<string, { value: string }>;\n }>({ loading: true, translations: {} });\n const languageFromParentDiv = getMicroFrontendAttribute('data-language') || '';\n\n useEffect(() => {\n const fetchJSONData = async () => {\n // en loaded as default fallback already\n const shouldLoadLanguage = languagesToLoad.includes(languageFromParentDiv);\n if (shouldLoadLanguage) {\n import(`../../../../localization/${languageFromParentDiv}.json`)\n .then((response) => response.default) // Access the default export of the module\n .then((text) => {\n setTranslations({ loading: false, translations: text });\n })\n .catch((error) => {\n setTranslations({ loading: false });\n window.fdlogger?.error(`Error while fetching ${languageFromParentDiv || 'en'} language JSON data: ${error.message}`);\n });\n } else {\n setTranslations({ loading: false });\n }\n };\n\n void fetchJSONData();\n }, [languageFromParentDiv]);\n\n return {\n translations: translations.translations || {},\n loading: translations.loading,\n };\n};\n"],"names":["TranslationContext","createContext","languagesToLoad","children","translations","value","useMemo","_jsx","jsx","Provider","setTranslations","useState","loading","languageFromParentDiv","getMicroFrontendAttribute","useEffect","async","includes","__variableDynamicImportRuntime0__","then","response","default","text","catch","error","window","fdlogger","message","fetchJSONData","useContext","translate","useCallback","key","data","translation","en","Object","keys","forEach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 -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/Button"),i=require("@mui/material/Card"),t=require("@mui/material/CardActions"),a=require("@mui/material/CardContent"),o=require("@mui/material/CardMedia"),s=require("@mui/material/Typography");module.exports=()=>e.jsxs(i,{sx:{maxWidth:345},children:[e.jsx(o,{component:"img",height:"140",image:"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",alt:"green iguana"}),e.jsxs(a,{children:[e.jsx(s,{gutterBottom:!0,variant:"h5",component:"div",children:"Cafe Shirley"}),e.jsx(s,{variant:"body2",sx:{color:"text.secondary"},children:"Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic coffee, and delectable pastries, it's the perfect spot to unwind."})]}),e.jsx(t,{children:e.jsx(r,{size:"small",variant:"contained",children:"Learn More"})})]});
|
|
2
|
+
//# sourceMappingURL=MockPageContent.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockPageContent.cjs.js","sources":["../../../src/stories/utilities/MockPageContent.tsx"],"sourcesContent":["import Button from '@mui/material/Button';\nimport Card from '@mui/material/Card';\nimport CardActions from '@mui/material/CardActions';\nimport CardContent from '@mui/material/CardContent';\nimport CardMedia from '@mui/material/CardMedia';\nimport Typography from '@mui/material/Typography';\n\nconst MockPageContent = () => {\n return (\n <Card sx={{ maxWidth: 345 }}>\n <CardMedia\n component=\"img\"\n height=\"140\"\n image=\"https://images.unsplash.com/photo-1551632436-cbf8dd35adfa?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"green iguana\"\n />\n <CardContent>\n <Typography gutterBottom variant=\"h5\" component=\"div\">\n Cafe Shirley\n </Typography>\n <Typography variant=\"body2\" sx={{ color: 'text.secondary' }}>\n Nestled in the heart of the city, Cafe Shirley offers a cozy retreat from the hustle and bustle. With its warm ambiance, aromatic\n coffee, and delectable pastries, it's the perfect spot to unwind.\n </Typography>\n </CardContent>\n <CardActions>\n <Button size=\"small\" variant=\"contained\">\n Learn More\n </Button>\n </CardActions>\n </Card>\n );\n};\n\nexport default MockPageContent;\n"],"names":["_jsxs","Card","sx","maxWidth","children","_jsx","CardMedia","component","height","image","alt","CardContent","Typography","gutterBottom","variant","color","CardActions","jsx","Button","size"],"mappings":"0RAOwB,IAEhBA,EAAAA,KAACC,EAAK,CAAAC,GAAI,CAAEC,SAAU,KAClBC,SAAA,CAAAC,EAAAA,IAACC,EACG,CAAAC,UAAU,MACVC,OAAO,MACPC,MAAM,sKACNC,IAAI,iBAERV,OAACW,EAAW,CAAAP,SAAA,CACRC,MAACO,EAAU,CAACC,cAAa,EAAAC,QAAQ,KAAKP,UAAU,MAEnCH,SAAA,iBACbC,MAACO,EAAU,CAACE,QAAQ,QAAQZ,GAAI,CAAEa,MAAO,kBAG5BX,SAAA,2MAEjBC,EAAAA,IAACW,YACGX,EAACY,IAAAC,GAAOC,KAAK,QAAQL,QAAQ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("@mui/material/styles/createTheme");const o=e({typography:{body1:{fontFamily:"'Roboto', sans-serif"},body2:{fontFamily:"'Roboto', sans-serif"},h1:{fontFamily:"clarendon-text-pro,Domine,serif"},h2:{fontFamily:"clarendon-text-pro,Domine,serif"},h3:{fontFamily:"clarendon-text-pro,Domine,serif"},h4:{fontFamily:"clarendon-text-pro,Domine,serif"},h5:{fontFamily:"clarendon-text-pro,Domine,serif"},h6:{fontFamily:"clarendon-text-pro,Domine,serif"}},palette:{success:{main:"#20C26E",dark:"#137442",light:"#D2F3E2"},error:{main:"#CA0030",dark:"#79001D",light:"#FADBE2"},warning:{main:"#FFBC2C",dark:"#FF7A00",light:"#FFF2D5"}}}),t=e(o,{palette:{black:o.palette.augmentColor({color:{main:"#000000"},name:"black"}),white:o.palette.augmentColor({color:{main:"#ffffff"},name:"white"}),flippyBlue:o.palette.augmentColor({color:{main:"#0b75d7",light:"#e3f2fe"},name:"flippyBlue"}),freezerBurn:o.palette.augmentColor({color:{main:"#a5e2f6"},name:"freezerBurn"}),spricyCarrot:o.palette.augmentColor({color:{main:"#f7742b"},name:"spricyCarrot"}),pebble:o.palette.augmentColor({color:{main:"#eeebe3"},name:"pebble"}),donutPanic:o.palette.augmentColor({color:{main:"#ffbae4"},name:"donutPanic"}),eletricLime:o.palette.augmentColor({color:{main:"#cff27d"},name:"eletricLime"}),pending:o.palette.augmentColor({color:{main:"#DEACFA",dark:"#A56AC6",light:"#FCF7FE"},name:"pending"}),alternateBackground:o.palette.augmentColor({color:{main:"#F7F7F7"},name:"alternateBackground"})}});var r=e(t,{palette:{primary:{main:t.palette.flippyBlue.main},secondary:{main:t.palette.spricyCarrot.main}},shape:{borderRadius:"4px"},components:{MuiButton:{styleOverrides:{root:{padding:"12px 24px",textTransform:"none"}}},MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:t.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${t.palette.divider}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:t.palette.flippyBlue.light,cursor:"pointer"}}}}}});module.exports=r;
|
|
2
|
+
//# sourceMappingURL=flipdishPublicTheme.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type ThemeOptions } from '@mui/material/styles/createTheme';\n\n// Colours and fonts as per our brand guidelines\nconst fontTheme = createTheme({\n typography: {\n body1: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n body2: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n h1: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h2: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h3: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h4: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h5: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h6: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n },\n palette: {\n success: {\n main: '#20C26E',\n dark: '#137442',\n light: '#D2F3E2',\n },\n error: {\n main: '#CA0030',\n dark: '#79001D',\n light: '#FADBE2',\n },\n warning: {\n main: '#FFBC2C',\n dark: '#FF7A00',\n light: '#FFF2D5',\n },\n },\n});\n\nconst theme = createTheme(fontTheme as ThemeOptions, {\n palette: {\n // Primary\n black: fontTheme.palette.augmentColor({\n color: {\n main: '#000000',\n },\n name: 'black',\n }),\n white: fontTheme.palette.augmentColor({\n color: {\n main: '#ffffff',\n },\n name: 'white',\n }),\n flippyBlue: fontTheme.palette.augmentColor({\n color: {\n main: '#0b75d7',\n light: '#e3f2fe',\n },\n name: 'flippyBlue',\n }),\n // Core\n freezerBurn: fontTheme.palette.augmentColor({\n color: {\n main: '#a5e2f6',\n },\n name: 'freezerBurn',\n }),\n spricyCarrot: fontTheme.palette.augmentColor({\n color: {\n main: '#f7742b',\n },\n name: 'spricyCarrot',\n }),\n pebble: fontTheme.palette.augmentColor({\n color: {\n main: '#eeebe3',\n },\n name: 'pebble',\n }),\n // Secondary\n donutPanic: fontTheme.palette.augmentColor({\n color: {\n main: '#ffbae4',\n },\n name: 'donutPanic',\n }),\n eletricLime: fontTheme.palette.augmentColor({\n color: {\n main: '#cff27d',\n },\n name: 'eletricLime',\n }),\n pending: fontTheme.palette.augmentColor({\n color: {\n main: '#DEACFA',\n dark: '#A56AC6',\n light: '#FCF7FE',\n },\n name: 'pending',\n }),\n alternateBackground: fontTheme.palette.augmentColor({\n color: {\n main: '#F7F7F7',\n },\n name: 'alternateBackground',\n }),\n },\n});\n\nexport default createTheme(theme as ThemeOptions, {\n palette: {\n primary: {\n main: theme.palette.flippyBlue.main,\n },\n secondary: {\n main: theme.palette.spricyCarrot.main,\n },\n },\n shape: {\n borderRadius: '4px',\n },\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '12px 24px',\n textTransform: 'none',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: theme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: theme.palette.flippyBlue.light,\n cursor: 'pointer',\n },\n },\n },\n },\n },\n});\n"],"names":["fontTheme","createTheme","typography","body1","fontFamily","body2","h1","h2","h3","h4","h5","h6","palette","success","main","dark","light","error","warning","theme","black","augmentColor","color","name","white","flippyBlue","freezerBurn","spricyCarrot","pebble","donutPanic","eletricLime","pending","alternateBackground","flipdishPublicTheme","primary","secondary","shape","borderRadius","components","MuiButton","styleOverrides","root","padding","textTransform","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","borderBottom","MuiTableRow","cursor"],"mappings":"+DAGA,MAAMA,EAAYC,EAAY,CAC1BC,WAAY,CACRC,MAAO,CACHC,WAAY,wBAEhBC,MAAO,CACHD,WAAY,wBAEhBE,GAAI,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EAAMP,QAAQa,WAAWX,MAEnCqB,UAAW,CACPrB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCsB,MAAO,CACHC,aAAc,OAElBC,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,YACTC,cAAe,UAI3BC,QAAS,CACLJ,eAAgB,CACZC,KAAM,CACFI,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAa7B,EAAMP,QAAQqC,WAIvCC,QAAS,CACLV,eAAgB,CACZC,KAAM,CACFU,WAAY,OACZC,YAAa,MACbC,aAAc,SAI1BC,kBAAmB,CACfd,eAAgB,CACZC,KAAM,CACF,UAAW,CACPc,gBAAiB,WAErB,qBAAsB,CAClBC,aAAc,aAAarC,EAAMP,QAAQqC,cAKzDQ,YAAa,CACTjB,eAAgB,CACZC,KAAM,CACF,4BAA6B,CACzBc,gBAAiBpC,EAAMP,QAAQa,WAAWT,MAC1C0C,OAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formValidation.cjs.js","sources":["../../src/utilities/formValidation.tsx"],"sourcesContent":["export const formikValidate = {\n Required: (value: string): string | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n },\n AtLeastOneSelected: (value: Array<string | number>): string | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n },\n};\n"],"names":["Required","value","length","AtLeastOneSelected"],"mappings":"oCAA8B,CAC1BA,SAAWC,IACP,GAAqB,IAAjBA,EAAMC,OACN,MAAO,UACV,EAELC,mBAAqBF,IACjB,GAAqB,IAAjBA,EAAMC,OACN,MAAO,UACV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericUtilities.cjs.js","sources":["../../src/utilities/genericUtilities.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["func","waitMs","lodashDebounce"],"mappings":"+DAWwB,CAACA,EAAgCC,IAAmBC,EAAeF,EAAMC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react");const t=e=>{const t=document.getElementById("flipdish-micro-frontend");return t?.getAttribute(e)||""};exports.getAppId=()=>(void 0).VITE_APPID_OVERRIDE||t("data-appId"),exports.getBrandId=()=>(void 0).VITE_BRANDID_OVERRIDE||t("data-brandId"),exports.getIsFlipdishStaff=()=>{const e=(void 0).VITE_ISFLIPDISHSTAFFOVERRIDE||t("data-isFlipdishStaff");return"true"===e?.toString()},exports.getMicroFrontendAttribute=t,exports.getOrgId=()=>(void 0).VITE_ORGID_OVERRIDE||t("data-orgId"),exports.lazyWithRetry=t=>e.lazy((async()=>{const e=JSON.parse(window.sessionStorage.getItem("page-has-been-force-refreshed")||"false");try{const e=await t();return window.sessionStorage.setItem("page-has-been-force-refreshed","false"),e}catch(t){if(!e)return window.sessionStorage.setItem("page-has-been-force-refreshed","true"),window.location.reload();throw t}}));
|
|
2
|
+
//# sourceMappingURL=renderUtilities.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderUtilities.cjs.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv?.getAttribute(key) || '';\n};\n\n/**\n * Retrieves the AppId.\n *\n * Attempts to get the value from the environment variable `VITE_APPID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-appId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getAppId = (): string => {\n return import.meta.env.VITE_APPID_OVERRIDE || getMicroFrontendAttribute('data-appId');\n};\n\n/**\n * Retrieves the OrgId.\n *\n * Attempts to get the value from the environment variable `VITE_ORGID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-orgId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getOrgId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n return import.meta.env.VITE_ORGID_OVERRIDE || getMicroFrontendAttribute('data-orgId');\n};\n\n/**\n * Retrieves the BrandId.\n *\n * Attempts to get the value from the environment variable `VITE_BRANDID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-brandId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getBrandId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n return import.meta.env.VITE_BRANDID_OVERRIDE || getMicroFrontendAttribute('data-brandId');\n};\n\n/**\n * Retrieves the isFlipdishStaff attribute.\n *\n * Attempts to get the value from the environment variable `VITE_ISFLIPDISHSTAFFOVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-isFlipdishStaff`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getIsFlipdishStaff = (): boolean => {\n const stringValue = import.meta.env.VITE_ISFLIPDISHSTAFFOVERRIDE || getMicroFrontendAttribute('data-isFlipdishStaff');\n return stringValue?.toString() === 'true';\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lazyWithRetry = (componentImport: () => any) =>\n lazy(async () => {\n const pageHasAlreadyBeenForceRefreshed = JSON.parse(window.sessionStorage.getItem('page-has-been-force-refreshed') || 'false');\n\n try {\n const component = await componentImport();\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'false');\n\n return component;\n } catch (error) {\n if (!pageHasAlreadyBeenForceRefreshed) {\n // Assuming that the user is not on the latest version of the application.\n // Let's refresh the page immediately.\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'true');\n return window.location.reload();\n }\n\n // The page has already been reloaded\n // Assuming that user is already using the latest version of the application.\n // Let's let the application crash and raise the error.\n throw error;\n }\n });\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute","undefined","VITE_APPID_OVERRIDE","VITE_BRANDID_OVERRIDE","stringValue","VITE_ISFLIPDISHSTAFFOVERRIDE","toString","VITE_ORGID_OVERRIDE","componentImport","lazy","async","pageHasAlreadyBeenForceRefreshed","JSON","parse","window","sessionStorage","getItem","component","setItem","error","location","reload"],"mappings":"oCAEa,MAAAA,EAA6BC,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAkBG,aAAaJ,IAAQ,EAAE,mBAW5B,UACbK,GAAgBC,qBAAuBP,EAA0B,iCAwBlD,UAEfM,GAAgBE,uBAAyBR,EAA0B,2CAW5C,KAC9B,MAAMS,QAAcH,GAAgBI,8BAAgCV,EAA0B,wBAC9F,MAAmC,SAA5BS,GAAaE,UAAqB,uDA5BrB,UAEbL,GAAgBM,qBAAuBZ,EAA0B,oCA8B9Ca,GAC1BC,EAAAA,MAAKC,UACD,MAAMC,EAAmCC,KAAKC,MAAMC,OAAOC,eAAeC,QAAQ,kCAAoC,SAEtH,IACI,MAAMC,QAAkBT,IAGxB,OAFAM,OAAOC,eAAeG,QAAQ,gCAAiC,SAExDD,CACV,CAAC,MAAOE,GACL,IAAKR,EAID,OADAG,OAAOC,eAAeG,QAAQ,gCAAiC,QACxDJ,OAAOM,SAASC,SAM3B,MAAMF,CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.cjs.js","sources":["../../src/utilities/validation.ts"],"sourcesContent":["export const joinUrlPaths = (baseUrl: string, path: string): string => {\n if (!baseUrl.endsWith('/')) {\n baseUrl += '/';\n }\n if (path.startsWith('/')) {\n path = path.substring(1);\n }\n return baseUrl + path;\n};\n"],"names":["baseUrl","path","endsWith","startsWith","substring"],"mappings":"kCAA4B,CAACA,EAAiBC,KACrCD,EAAQE,SAAS,OAClBF,GAAW,KAEXC,EAAKE,WAAW,OAChBF,EAAOA,EAAKG,UAAU,IAEnBJ,EAAUC"}
|