@flipdish/portal-library 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./themes/flipdishPublicTheme.cjs.js"),i=require("./ui/NotFoundPage/NotFoundPage.cjs.js"),r=require("./ui/PageLayout/PageLayout.cjs.js"),o=require("./ui/PortalMock/PortalMock.cjs.js"),t=require("./ui/LazyComponent/LazyComponent.cjs.js"),s=require("./ui/Spacer/Spacer.cjs.js"),c=require("./ui/Chip/Chip.cjs.js"),a=require("./ui/Switch/Switch.cjs.js"),u=require("./ui/Form/utilities/formValidation.cjs.js"),n=require("./ui/Form/GenericAutocompleteField.cjs.js"),l=require("./ui/Form/GenericFormContainer.cjs.js"),j=require("./ui/Form/GenericTextField.cjs.js"),p=require("./ui/Form/PaginatedAutocompleteField.cjs.js"),d=require("./ui/GenericDateTimePickerField/GenericDateTimePickerField.cjs.js"),m=require("./ui/GenericRadioButtons/GenericRadioButtons.cjs.js"),T=require("./ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.cjs.js"),G=require("./ui/GenericTable/GenericTable.cjs.js"),q=require("./ui/GenericTableBody/GenericTableBody.cjs.js"),x=require("./ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js"),P=require("./ui/GenericTableTitle/GenericTableTitle.cjs.js");require("react/jsx-runtime"),require("react"),require("../providers/TranslationProvider.cjs.js"),exports.flipdishPublicTheme=e,exports.NotFoundPage=i,exports.PageLayout=r.default,exports.PortalMock=o,exports.LazyComponent=t,exports.Spacer=s,exports.Chip=c,exports.Switch=a,exports.formikValidate=u.formikValidate,exports.GenericAutocompleteField=n,exports.GenericFormContainer=l,exports.GenericTextField=j,exports.PaginatedAutocompleteField=p,exports.GenericDatePickerField=d,exports.GenericRadioButtons=m,exports.DateTimeLocalizationProvider=T,exports.GenericTable=G,exports.GenericTableBody=q,exports.GenericTableBodyRow=x,exports.GenericTableTitle=P;
1
+ "use strict";var e=require("./themes/flipdishPublicTheme.cjs.js"),i=require("./ui/NotFoundPage/NotFoundPage.cjs.js"),r=require("./ui/FlipdishStaffContainer/FlipdishStaffContainer.cjs.js"),o=require("./ui/PageLayout/PageLayout.cjs.js"),t=require("./ui/PortalMock/PortalMock.cjs.js"),s=require("./ui/LazyComponent/LazyComponent.cjs.js"),c=require("./ui/Spacer/Spacer.cjs.js"),a=require("./ui/Chip/Chip.cjs.js"),u=require("./ui/Switch/Switch.cjs.js"),n=require("./ui/Form/utilities/formValidation.cjs.js"),l=require("./ui/Form/GenericAutocompleteField.cjs.js"),j=require("./ui/Form/GenericFormContainer.cjs.js"),p=require("./ui/Form/GenericTextField.cjs.js"),d=require("./ui/Form/PaginatedAutocompleteField.cjs.js"),m=require("./ui/GenericDateTimePickerField/GenericDateTimePickerField.cjs.js"),T=require("./ui/GenericRadioButtons/GenericRadioButtons.cjs.js"),q=require("./ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.cjs.js"),x=require("./ui/GenericTable/GenericTable.cjs.js"),G=require("./ui/GenericTableBody/GenericTableBody.cjs.js"),F=require("./ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js"),P=require("./ui/GenericTableTitle/GenericTableTitle.cjs.js");require("react/jsx-runtime"),require("react"),require("../providers/TranslationProvider.cjs.js"),exports.flipdishPublicTheme=e,exports.NotFoundPage=i,exports.FlipdishStaffContainer=r,exports.PageLayout=o.default,exports.PortalMock=t,exports.LazyComponent=s,exports.Spacer=c,exports.Chip=a,exports.Switch=u,exports.formikValidate=n.formikValidate,exports.GenericAutocompleteField=l,exports.GenericFormContainer=j,exports.GenericTextField=p,exports.PaginatedAutocompleteField=d,exports.GenericDatePickerField=m,exports.GenericRadioButtons=T,exports.DateTimeLocalizationProvider=q,exports.GenericTable=x,exports.GenericTableBody=G,exports.GenericTableBodyRow=F,exports.GenericTableTitle=P;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,5 +1,6 @@
1
1
  export { default as flipdishPublicTheme } from './themes/flipdishPublicTheme.js';
2
2
  export { default as NotFoundPage } from './ui/NotFoundPage/NotFoundPage.js';
3
+ export { default as FlipdishStaffContainer } from './ui/FlipdishStaffContainer/FlipdishStaffContainer.js';
3
4
  export { default as PageLayout } from './ui/PageLayout/PageLayout.js';
4
5
  export { default as PortalMock } from './ui/PortalMock/PortalMock.js';
5
6
  export { default as LazyComponent } from './ui/LazyComponent/LazyComponent.js';
@@ -1,2 +1,2 @@
1
- export{default as flipdishPublicTheme}from"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.js";export{default as PageLayout}from"./ui/PageLayout/PageLayout.js";export{default as PortalMock}from"./ui/PortalMock/PortalMock.js";export{default as LazyComponent}from"./ui/LazyComponent/LazyComponent.js";export{default as Spacer}from"./ui/Spacer/Spacer.js";export{default as Chip}from"./ui/Chip/Chip.js";export{default as Switch}from"./ui/Switch/Switch.js";export{formikValidate}from"./ui/Form/utilities/formValidation.js";export{default as GenericAutocompleteField}from"./ui/Form/GenericAutocompleteField.js";export{default as GenericFormContainer}from"./ui/Form/GenericFormContainer.js";export{default as GenericTextField}from"./ui/Form/GenericTextField.js";export{default as PaginatedAutocompleteField}from"./ui/Form/PaginatedAutocompleteField.js";export{default as GenericDatePickerField}from"./ui/GenericDateTimePickerField/GenericDateTimePickerField.js";export{default as GenericRadioButtons}from"./ui/GenericRadioButtons/GenericRadioButtons.js";export{default as DateTimeLocalizationProvider}from"./ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.js";export{default as GenericTable}from"./ui/GenericTable/GenericTable.js";export{default as GenericTableBody}from"./ui/GenericTableBody/GenericTableBody.js";export{default as GenericTableBodyRow}from"./ui/GenericTableBodyRow/GenericTableBodyRow.js";export{default as GenericTableTitle}from"./ui/GenericTableTitle/GenericTableTitle.js";import"react/jsx-runtime";import"react";import"../providers/TranslationProvider.js";
1
+ export{default as flipdishPublicTheme}from"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.js";export{default as FlipdishStaffContainer}from"./ui/FlipdishStaffContainer/FlipdishStaffContainer.js";export{default as PageLayout}from"./ui/PageLayout/PageLayout.js";export{default as PortalMock}from"./ui/PortalMock/PortalMock.js";export{default as LazyComponent}from"./ui/LazyComponent/LazyComponent.js";export{default as Spacer}from"./ui/Spacer/Spacer.js";export{default as Chip}from"./ui/Chip/Chip.js";export{default as Switch}from"./ui/Switch/Switch.js";export{formikValidate}from"./ui/Form/utilities/formValidation.js";export{default as GenericAutocompleteField}from"./ui/Form/GenericAutocompleteField.js";export{default as GenericFormContainer}from"./ui/Form/GenericFormContainer.js";export{default as GenericTextField}from"./ui/Form/GenericTextField.js";export{default as PaginatedAutocompleteField}from"./ui/Form/PaginatedAutocompleteField.js";export{default as GenericDatePickerField}from"./ui/GenericDateTimePickerField/GenericDateTimePickerField.js";export{default as GenericRadioButtons}from"./ui/GenericRadioButtons/GenericRadioButtons.js";export{default as DateTimeLocalizationProvider}from"./ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.js";export{default as GenericTable}from"./ui/GenericTable/GenericTable.js";export{default as GenericTableBody}from"./ui/GenericTableBody/GenericTableBody.js";export{default as GenericTableBodyRow}from"./ui/GenericTableBodyRow/GenericTableBodyRow.js";export{default as GenericTableTitle}from"./ui/GenericTableTitle/GenericTableTitle.js";import"react/jsx-runtime";import"react";import"../providers/TranslationProvider.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("../../../providers/TranslationProvider.cjs.js"),i=require("@mui/icons-material/SupportAgentOutlined"),t=require("@mui/material/Grid"),s=require("@mui/material/styles"),a=require("@mui/material/Typography"),n=require("@mui/material/Box");const l=s.styled(n)((({theme:e})=>({backgroundColor:e.palette.grey[200],borderRadius:"4px",padding:e.spacing(2)}))),d=s.styled(t)((({theme:e})=>({alignItems:"center",display:"flex",marginBottom:e.spacing(1.5)}))),o=s.styled(a)((({theme:e})=>({fontWeight:500,marginLeft:e.spacing(1)})));module.exports=({titleOverride:t,children:s})=>{const{translate:a}=r.useTranslation();return e.jsxs(l,{"data-testid":"flipdish-staff-only-container",children:[e.jsxs(d,{children:[e.jsx(i,{}),e.jsx(o,{children:t||a("Flipdish_staff_only")})]}),s]})};
2
+ //# sourceMappingURL=FlipdishStaffContainer.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlipdishStaffContainer.cjs.js","sources":["../../../../src/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { useTranslation } from '../../../providers/TranslationProvider';\nimport SupportAgentOutlinedIcon from '@mui/icons-material/SupportAgentOutlined';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n titleOverride?: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ titleOverride, children }: Props) => {\n const { translate } = useTranslation();\n\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{titleOverride || translate('Flipdish_staff_only')}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","titleOverride","children","translate","useTranslation","_jsxs","_jsx","jsx","SupportAgentOutlinedIcon"],"mappings":"wSAQA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAPD,EAAY,EAAGE,YAAa,CAChDC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAAA,OAAOU,EAAPV,EAAa,EAAGE,YAAa,CAChDS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAAA,OAAOe,EAAPf,EAAmB,EAAGE,YAAa,CAC7Cc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,sBAQC,EAAGU,gBAAeC,eAC7C,MAAMC,UAAEA,GAAcC,EAAAA,iBAEtB,OACIC,OAACvB,EAAe,CAAA,cAAa,gCAA+BoB,SAAA,CACxDG,EAAAA,KAACb,EACG,CAAAU,SAAA,CAAAI,EAAAC,IAACC,EAAwB,IACzBF,EAAAC,IAACV,EAAK,CAAAK,SAAED,GAAiBE,EAAU,4BAGtCD,IAEP"}
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type Props = {
5
+ titleOverride?: string;
6
+ children: ReactNode;
7
+ };
8
+ declare const FlipdishStaffContainer: ({ titleOverride, children }: Props) => react_jsx_runtime.JSX.Element;
9
+
10
+ export { FlipdishStaffContainer as default };
@@ -0,0 +1,2 @@
1
+ import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useTranslation as t}from"../../../providers/TranslationProvider.js";import e from"@mui/icons-material/SupportAgentOutlined";import a from"@mui/material/Grid";import{styled as o}from"@mui/material/styles";import m from"@mui/material/Typography";import n from"@mui/material/Box";const l=o(n)((({theme:r})=>({backgroundColor:r.palette.grey[200],borderRadius:"4px",padding:r.spacing(2)}))),p=o(a)((({theme:r})=>({alignItems:"center",display:"flex",marginBottom:r.spacing(1.5)}))),s=o(m)((({theme:r})=>({fontWeight:500,marginLeft:r.spacing(1)}))),d=({titleOverride:a,children:o})=>{const{translate:m}=t();return r(l,{"data-testid":"flipdish-staff-only-container",children:[r(p,{children:[i(e,{}),i(s,{children:a||m("Flipdish_staff_only")})]}),o]})};export{d as default};
2
+ //# sourceMappingURL=FlipdishStaffContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlipdishStaffContainer.js","sources":["../../../../src/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { useTranslation } from '../../../providers/TranslationProvider';\nimport SupportAgentOutlinedIcon from '@mui/icons-material/SupportAgentOutlined';\nimport Grid from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\n\nconst StyledContainer = styled(Box)(({ theme }) => ({\n backgroundColor: theme.palette.grey[200],\n borderRadius: '4px',\n padding: theme.spacing(2),\n}));\n\nconst TitleContainer = styled(Grid)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst Title = styled(Typography)(({ theme }) => ({\n fontWeight: 500,\n marginLeft: theme.spacing(1),\n}));\n\ntype Props = {\n titleOverride?: string;\n children: ReactNode;\n};\n\nconst FlipdishStaffContainer = ({ titleOverride, children }: Props) => {\n const { translate } = useTranslation();\n\n return (\n <StyledContainer data-testid=\"flipdish-staff-only-container\">\n <TitleContainer>\n <SupportAgentOutlinedIcon />\n <Title>{titleOverride || translate('Flipdish_staff_only')}</Title>\n </TitleContainer>\n\n {children}\n </StyledContainer>\n );\n};\n\nexport default FlipdishStaffContainer;\n"],"names":["StyledContainer","styled","Box","theme","backgroundColor","palette","grey","borderRadius","padding","spacing","TitleContainer","Grid","alignItems","display","marginBottom","Title","Typography","fontWeight","marginLeft","FlipdishStaffContainer","titleOverride","children","translate","useTranslation","_jsxs","_jsx","SupportAgentOutlinedIcon"],"mappings":"8UAQA,MAAMA,EAAkBC,EAAOC,EAAPD,EAAY,EAAGE,YAAa,CAChDC,gBAAiBD,EAAME,QAAQC,KAAK,KACpCC,aAAc,MACdC,QAASL,EAAMM,QAAQ,OAGrBC,EAAiBT,EAAOU,EAAPV,EAAa,EAAGE,YAAa,CAChDS,WAAY,SACZC,QAAS,OACTC,aAAcX,EAAMM,QAAQ,SAG1BM,EAAQd,EAAOe,EAAPf,EAAmB,EAAGE,YAAa,CAC7Cc,WAAY,IACZC,WAAYf,EAAMM,QAAQ,OAQxBU,EAAyB,EAAGC,gBAAeC,eAC7C,MAAMC,UAAEA,GAAcC,IAEtB,OACIC,EAACxB,EAAe,CAAA,cAAa,gCAA+BqB,SAAA,CACxDG,EAACd,EACG,CAAAW,SAAA,CAAAI,EAACC,EAAwB,IACzBD,EAACV,EAAK,CAAAM,SAAED,GAAiBE,EAAU,4BAGtCD,IAEP"}
@@ -1,2 +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:"Go to About Page"},r={value:"Go to home Page"},l={value:"Home"},u={value:"Page Not Found"},p={value:"Required"},s={value:"Something went wrong, please refresh the page"},n={value:"Valid"},g={value:"Welcome to the About Page"},i={value:"Welcome to the new Flipdish Portal"},m={About:e,About_Page:o,Click_vite_react:t,Count_is:a,Go_to_about_page:_,Go_to_home_page:r,Home:l,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:u,Required:p,Something_went_wrong_please_refresh_the_page:s,Valid:n,Welcome_about_page:g,Welcome_to_new_portal:i};exports.About=e,exports.About_Page=o,exports.Click_vite_react=t,exports.Count_is=a,exports.Go_to_about_page=_,exports.Go_to_home_page=r,exports.Home=l,exports.Page_Not_Found=u,exports.Required=p,exports.Something_went_wrong_please_refresh_the_page=s,exports.Valid=n,exports.Welcome_about_page=g,exports.Welcome_to_new_portal=i,exports.default=m;
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
2
  //# sourceMappingURL=en.json.cjs.js.map
@@ -1,2 +1,2 @@
1
- var e={value:"About"},o={value:"About Page"},a={value:"Click on the Vite and React logos to learn more"},t={value:"Count is {count}"},l={value:"Go to About Page"},u={value:"Go to home Page"},_={value:"Home"},n={value:"Page Not Found"},r={value:"Required"},g={value:"Something went wrong, please refresh the page"},i={value:"Valid"},v={value:"Welcome to the About Page"},m={value:"Welcome to the new Flipdish Portal"},h={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Go_to_about_page:l,Go_to_home_page:u,Home:_,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:n,Required:r,Something_went_wrong_please_refresh_the_page:g,Valid:i,Welcome_about_page:v,Welcome_to_new_portal:m};export{e as About,o as About_Page,a as Click_vite_react,t as Count_is,l as Go_to_about_page,u as Go_to_home_page,_ as Home,n as Page_Not_Found,r as Required,g as Something_went_wrong_please_refresh_the_page,i as Valid,v as Welcome_about_page,m as Welcome_to_new_portal,h as default};
1
+ var e={value:"About"},o={value:"About Page"},a={value:"Click on the Vite and React logos to learn more"},t={value:"Count is {count}"},l={value:"Flipdish staff only"},u={value:"Go to About Page"},_={value:"Go to home Page"},n={value:"Home"},i={value:"Page Not Found"},r={value:"Required"},g={value:"Something went wrong, please refresh the page"},v={value:"Valid"},h={value:"Welcome to the About Page"},p={value:"Welcome to the new Flipdish Portal"},d={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:l,Go_to_about_page:u,Go_to_home_page:_,Home:n,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:i,Required:r,Something_went_wrong_please_refresh_the_page:g,Valid:v,Welcome_about_page:h,Welcome_to_new_portal:p};export{e as About,o as About_Page,a as Click_vite_react,t as Count_is,l as Flipdish_staff_only,u as Go_to_about_page,_ as Go_to_home_page,n as Home,i as Page_Not_Found,r as Required,g as Something_went_wrong_please_refresh_the_page,v as Valid,h as Welcome_about_page,p as Welcome_to_new_portal,d as default};
2
2
  //# sourceMappingURL=en.json.js.map
@@ -1,2 +1,2 @@
1
- "use strict";exports.getMicroFrontendAttribute=t=>{const e=document.getElementById("flipdish-micro-frontend");return e&&e.getAttribute(t)};
1
+ "use strict";require("react");exports.getMicroFrontendAttribute=t=>{const e=document.getElementById("flipdish-micro-frontend");return e&&e.getAttribute(t)};
2
2
  //# sourceMappingURL=renderUtilities.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderUtilities.cjs.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["export const getMicroFrontendAttribute = (key: string): string | null => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv && microFrontendDiv.getAttribute(key);\n};\n"],"names":["key","microFrontendDiv","document","getElementById","getAttribute"],"mappings":"+CAA0CA,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAoBA,EAAiBG,aAAaJ,EAAI"}
1
+ {"version":3,"file":"renderUtilities.cjs.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string | null => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv && microFrontendDiv.getAttribute(key);\n};\n\nexport const getAppId = (): string | null => {\n return import.meta.env.VITE_APPID_OVERRIDE || getMicroFrontendAttribute('data-appId');\n};\n\nexport const getOrgId = (): string | null => {\n return import.meta.env.VITE_ORGID_OVERRIDE || getMicroFrontendAttribute('data-orgId');\n};\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":["key","microFrontendDiv","document","getElementById","getAttribute"],"mappings":"gEAE0CA,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAoBA,EAAiBG,aAAaJ,EAAI"}
@@ -1,2 +1,2 @@
1
- const t=t=>{const e=document.getElementById("flipdish-micro-frontend");return e&&e.getAttribute(t)};export{t as getMicroFrontendAttribute};
1
+ import"react";const t=t=>{const e=document.getElementById("flipdish-micro-frontend");return e&&e.getAttribute(t)};export{t as getMicroFrontendAttribute};
2
2
  //# sourceMappingURL=renderUtilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderUtilities.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["export const getMicroFrontendAttribute = (key: string): string | null => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv && microFrontendDiv.getAttribute(key);\n};\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute"],"mappings":"AAAa,MAAAA,EAA6BC,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAoBA,EAAiBG,aAAaJ,EAAI"}
1
+ {"version":3,"file":"renderUtilities.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string | null => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv && microFrontendDiv.getAttribute(key);\n};\n\nexport const getAppId = (): string | null => {\n return import.meta.env.VITE_APPID_OVERRIDE || getMicroFrontendAttribute('data-appId');\n};\n\nexport const getOrgId = (): string | null => {\n return import.meta.env.VITE_ORGID_OVERRIDE || getMicroFrontendAttribute('data-orgId');\n};\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"],"mappings":"cAEa,MAAAA,EAA6BC,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAoBA,EAAiBG,aAAaJ,EAAI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "files": [
5
5
  "dist"
6
6
  ],