@flipdish/portal-library 1.0.2 → 1.0.4
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/components/{library.d.ts → index.d.ts} +2 -2
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/themes/flipdishPublicTheme.d.ts +6 -0
- package/dist/components/themes/flipdishPublicTheme.js +1 -1
- package/dist/components/themes/flipdishPublicTheme.js.map +1 -1
- package/dist/components/ui/PortalMock/PortalMock.d.ts +8 -0
- package/dist/components/ui/PortalMock/PortalMock.js +2 -0
- package/dist/components/ui/PortalMock/PortalMock.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_material@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_style_oc5snlirzewyt2bjqzs6ppevzu/node_modules/@mui/material/styles/useTheme.js +2 -0
- package/dist/node_modules/.pnpm/@mui_material@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_style_oc5snlirzewyt2bjqzs6ppevzu/node_modules/@mui/material/styles/useTheme.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_system@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_styled@_o44stj6xodossuagg3jw6vmktq/node_modules/@mui/system/esm/useTheme.js +2 -0
- package/dist/node_modules/.pnpm/@mui_system@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_styled@_o44stj6xodossuagg3jw6vmktq/node_modules/@mui/system/esm/useTheme.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_system@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_styled@_o44stj6xodossuagg3jw6vmktq/node_modules/@mui/system/esm/useThemeWithoutDefault.js +2 -0
- package/dist/node_modules/.pnpm/@mui_system@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_styled@_o44stj6xodossuagg3jw6vmktq/node_modules/@mui/system/esm/useThemeWithoutDefault.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/library.js +0 -2
- package/dist/components/library.js.map +0 -1
- package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.d.ts +0 -9
- package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js +0 -2
- package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js.map +0 -1
- package/dist/components/ui/Layout/PortalMock.js +0 -2
- package/dist/components/ui/Layout/PortalMock.js.map +0 -1
- package/dist/node_modules/.pnpm/react-error-boundary@4.1.1_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.esm.js +0 -2
- package/dist/node_modules/.pnpm/react-error-boundary@4.1.1_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.esm.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
3
|
+
export { default as PortalMock } from './ui/PortalMock/PortalMock.js';
|
|
4
4
|
export { default as LazyComponent } from './ui/LazyComponent/LazyComponent.js';
|
|
5
5
|
export { default as Spacer } from './ui/Spacer/Spacer.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{default as flipdishPublicTheme}from"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.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";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import * as _mui_material from '@mui/material';
|
|
2
|
+
|
|
3
|
+
declare const _default: _mui_material.Theme;
|
|
4
|
+
|
|
1
5
|
declare module '@mui/material/styles' {
|
|
2
6
|
interface Palette {
|
|
3
7
|
black: Palette['primary'];
|
|
@@ -11,3 +15,5 @@ declare module '@mui/material/styles' {
|
|
|
11
15
|
pending: Palette['primary'];
|
|
12
16
|
}
|
|
13
17
|
}
|
|
18
|
+
|
|
19
|
+
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createTheme as e}from"@mui/material";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"}}}),r=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"},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"})}});e(r,{palette:{primary:{main:r.palette.flippyBlue.main},secondary:{main:r.palette.spricyCarrot.main}},components:{MuiButton:{styleOverrides:{root:{padding:"7px 14px",textTransform:"none",boxShadow:"none","&:hover":{boxShadow:"none"},borderRadius:"25px"}}},MuiCard:{styleOverrides:{root:{borderRadius:0,boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:"#999999"}}},MuiChip:{styleOverrides:{root:{borderRadius:"5px",fontWeight:"bold",textTransform:"uppercase"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${r.palette.divider}`}}}}}});
|
|
1
|
+
import{createTheme as e}from"@mui/material";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"}}}),r=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"},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"})}});var t=e(r,{palette:{primary:{main:r.palette.flippyBlue.main},secondary:{main:r.palette.spricyCarrot.main}},components:{MuiButton:{styleOverrides:{root:{padding:"7px 14px",textTransform:"none",boxShadow:"none","&:hover":{boxShadow:"none"},borderRadius:"25px"}}},MuiCard:{styleOverrides:{root:{borderRadius:0,boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:"#999999"}}},MuiChip:{styleOverrides:{root:{borderRadius:"5px",fontWeight:"bold",textTransform:"uppercase"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${r.palette.divider}`}}}}}});export{t as default};
|
|
2
2
|
//# sourceMappingURL=flipdishPublicTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { createTheme } from '@mui/material';\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, {\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 },\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 },\n});\n\nexport default createTheme(theme, {\n palette: {\n primary: {\n main: theme.palette.flippyBlue.main,\n },\n secondary: {\n main: theme.palette.spricyCarrot.main,\n },\n },\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '7px 14px',\n textTransform: 'none',\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none',\n },\n borderRadius: '25px',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: '#999999',\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n borderRadius: '5px',\n fontWeight: 'bold',\n textTransform: 'uppercase',\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 },\n});\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n black: Palette['primary'];\n white: Palette['primary'];\n flippyBlue: Palette['primary'];\n freezerBurn: Palette['primary'];\n spricyCarrot: Palette['primary'];\n pebble: Palette['primary'];\n donutPanic: Palette['primary'];\n eletricLime: Palette['primary'];\n pending: Palette['primary'];\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","primary","secondary","components","MuiButton","styleOverrides","root","padding","textTransform","boxShadow","borderRadius","MuiCard","borderWidth","borderStyle","borderColor","MuiChip","fontWeight","MuiListItemButton","backgroundColor","borderBottom","divider"],"mappings":"4CAGA,MAAMA,EAAYC,EAAY,CAC1BC,WAAY,CACRC,MAAO,CACHC,WAAY,wBAEhBC,MAAO,CACHD,WAAY,wBAEhBE,GAAI,CACAF,WAAY,mCAEhBG,GAAI,CACAH,WAAY,mCAEhBI,GAAI,CACAJ,WAAY,mCAEhBK,GAAI,CACAL,WAAY,mCAEhBM,GAAI,CACAN,WAAY,mCAEhBO,GAAI,CACAP,WAAY,oCAGpBQ,QAAS,CACLC,QAAS,CACLC,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXC,MAAO,CACHH,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXE,QAAS,CACLJ,KAAM,UACNC,KAAM,UACNC,MAAO,cAKbG,EAAQlB,EAAYD,EAAW,CACjCY,QAAS,CAELQ,MAAOpB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVC,MAAOxB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVE,WAAYzB,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,
|
|
1
|
+
{"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { createTheme } from '@mui/material';\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, {\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 },\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 },\n});\n\nexport default createTheme(theme, {\n palette: {\n primary: {\n main: theme.palette.flippyBlue.main,\n },\n secondary: {\n main: theme.palette.spricyCarrot.main,\n },\n },\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '7px 14px',\n textTransform: 'none',\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none',\n },\n borderRadius: '25px',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: '#999999',\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n borderRadius: '5px',\n fontWeight: 'bold',\n textTransform: 'uppercase',\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 },\n});\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n black: Palette['primary'];\n white: Palette['primary'];\n flippyBlue: Palette['primary'];\n freezerBurn: Palette['primary'];\n spricyCarrot: Palette['primary'];\n pebble: Palette['primary'];\n donutPanic: Palette['primary'];\n eletricLime: Palette['primary'];\n pending: Palette['primary'];\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","flipdishPublicTheme","primary","secondary","components","MuiButton","styleOverrides","root","padding","textTransform","boxShadow","borderRadius","MuiCard","borderWidth","borderStyle","borderColor","MuiChip","fontWeight","MuiListItemButton","backgroundColor","borderBottom","divider"],"mappings":"4CAGA,MAAMA,EAAYC,EAAY,CAC1BC,WAAY,CACRC,MAAO,CACHC,WAAY,wBAEhBC,MAAO,CACHD,WAAY,wBAEhBE,GAAI,CACAF,WAAY,mCAEhBG,GAAI,CACAH,WAAY,mCAEhBI,GAAI,CACAJ,WAAY,mCAEhBK,GAAI,CACAL,WAAY,mCAEhBM,GAAI,CACAN,WAAY,mCAEhBO,GAAI,CACAP,WAAY,oCAGpBQ,QAAS,CACLC,QAAS,CACLC,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXC,MAAO,CACHH,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXE,QAAS,CACLJ,KAAM,UACNC,KAAM,UACNC,MAAO,cAKbG,EAAQlB,EAAYD,EAAW,CACjCY,QAAS,CAELQ,MAAOpB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVC,MAAOxB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVE,WAAYzB,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,eAKlB,IAAeS,EAAA/B,EAAYkB,EAAO,CAC9BP,QAAS,CACLqB,QAAS,CACLnB,KAAMK,EAAMP,QAAQa,WAAWX,MAEnCoB,UAAW,CACPpB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCqB,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,WACTC,cAAe,OACfC,UAAW,OACX,UAAW,CACPA,UAAW,QAEfC,aAAc,UAI1BC,QAAS,CACLN,eAAgB,CACZC,KAAM,CACFI,aAAc,EACdD,UAAW,OACXG,YAAa,MACbC,YAAa,QACbC,YAAa,aAIzBC,QAAS,CACLV,eAAgB,CACZC,KAAM,CACFI,aAAc,MACdM,WAAY,OACZR,cAAe,eAI3BS,kBAAmB,CACfZ,eAAgB,CACZC,KAAM,CACF,UAAW,CACPY,gBAAiB,WAErB,qBAAsB,CAClBC,aAAc,aAAahC,EAAMP,QAAQwC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Typography as o,Box as i,CssBaseline as n,AppBar as l,Drawer as a}from"@mui/material";import m from"../../../node_modules/.pnpm/@mui_material@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_style_oc5snlirzewyt2bjqzs6ppevzu/node_modules/@mui/material/styles/styled.js";import s from"../../../node_modules/.pnpm/@mui_material@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_style_oc5snlirzewyt2bjqzs6ppevzu/node_modules/@mui/material/styles/useTheme.js";const d=m("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]}`}))),p=m("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),c=198,x=({children:m})=>{const x=void 0!==import.meta.env.VITE_CODE_BASE_URL,h=s();if(x)return e(t,{children:m});const _=e(p,{children:e(o,{sx:{fontWeight:"bold"},children:"Sidebar"})});return r(i,{sx:{display:"flex"},children:[e(n,{}),e(l,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e(d,{children:e(o,{sx:{fontWeight:"bold"},children:"Header"})})}),e(i,{component:"nav",sx:{width:{sm:c},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e(a,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:c,borderColor:h.palette.grey[400],borderWidth:"2px"}},open:!0,children:_})}),e(i,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:m})]})};export{x as default};
|
|
2
|
+
//# sourceMappingURL=PortalMock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PortalMock.js","sources":["../../../../src/components/ui/PortalMock/PortalMock.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport { AppBar, Box, CssBaseline, Drawer, Typography } from '@mui/material';\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 children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children }: Props) => {\n const loadedFromPortal = import.meta.env.VITE_CODE_BASE_URL !== undefined;\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","PortalMock","children","loadedFromPortal","undefined","env","VITE_CODE_BASE_URL","useTheme","_jsx","_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":"+jBAGA,MAAMA,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAC/CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,QAC1BC,aAAc,aAAaX,EAAMK,QAAQC,KAAK,WAG5CM,EAAgBb,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,YAMxBG,EAAc,IAEdC,EAAa,EAAGC,eAClB,MAAMC,OAA0DC,gBAA3BC,IAAIC,mBACnCnB,EAAQoB,IAEd,GAAIJ,EACA,OAAOK,EAAAC,EAAA,CAAAP,SAAGA,IAGd,MAAMQ,EACFF,EAACT,EAAa,CAAAG,SACVM,EAACG,EAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BX,SAAA,cAIpE,OACIY,EAACC,EAAI,CAAAH,GAAI,CAAExB,QAAS,QAAQc,SAAA,CACxBM,EAACQ,EAAW,CAAA,GACZR,EAACS,EAAM,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfpB,SAAAM,EAACvB,EAAY,CAAAiB,SACTM,EAACG,GAAWC,GAAI,CAAEC,WAAY,QAA6BX,SAAA,eAGnEM,EAACO,EAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIpB,GAAewB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBlB,SACxGM,EAACiB,EACG,CAAAC,QAAQ,YACRd,GAAI,CACAxB,QAAS,CAAEuC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOnB,EACP6B,YAAa1C,EAAMK,QAAQC,KAAK,KAChCqC,YAAa,QAGrBC,MAEC,EAAA7B,SAAAQ,MAGTF,EAACO,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU/B,SACvGA,MAGX"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"react";import t from"./defaultTheme.js";import o from"./identifier.js";import s from"../../../../../@mui_system@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_styled@_o44stj6xodossuagg3jw6vmktq/node_modules/@mui/system/esm/useTheme.js";function m(){const m=s(t);return"production"!==process.env.NODE_ENV&&e.useDebugValue(m),m[o]||m}export{m as default};
|
|
2
|
+
//# sourceMappingURL=useTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.js","sources":["../../../../../../../../../../node_modules/.pnpm/@mui+material@5.16.7_@emotion+react@11.13.3_@types+react@18.3.11_react@18.3.1__@emotion+style_oc5snlirzewyt2bjqzs6ppevzu/node_modules/@mui/material/styles/useTheme.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\n}"],"names":["useTheme","theme","useThemeSystem","defaultTheme","process","env","NODE_ENV","React","useDebugValue","THEME_ID"],"mappings":"wRAMe,SAASA,IACtB,MAAMC,EAAQC,EAAeC,GAK7B,MAJ6B,eAAzBC,QAAQC,IAAIC,UAEdC,EAAMC,cAAcP,GAEfA,EAAMQ,IAAaR,CAC5B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.js","sources":["../../../../../../../../../../node_modules/.pnpm/@mui+system@5.16.7_@emotion+react@11.13.3_@types+react@18.3.11_react@18.3.1__@emotion+styled@_o44stj6xodossuagg3jw6vmktq/node_modules/@mui/system/esm/useTheme.js"],"sourcesContent":["'use client';\n\nimport createTheme from './createTheme';\nimport useThemeWithoutDefault from './useThemeWithoutDefault';\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;"],"names":["systemDefaultTheme","createTheme","useTheme","defaultTheme","useThemeWithoutDefault"],"mappings":"uFAIY,MAACA,EAAqBC,IAClC,SAASC,EAASC,EAAeH,GAC/B,OAAOI,EAAuBD,EAChC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useThemeWithoutDefault.js","sources":["../../../../../../../../../../node_modules/.pnpm/@mui+system@5.16.7_@emotion+react@11.13.3_@types+react@18.3.11_react@18.3.1__@emotion+styled@_o44stj6xodossuagg3jw6vmktq/node_modules/@mui/system/esm/useThemeWithoutDefault.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;"],"names":["useTheme","defaultTheme","contextTheme","React","useContext","ThemeContext","obj","Object","keys","length"],"mappings":"sEAOA,SAASA,EAASC,EAAe,MAC/B,MAAMC,EAAeC,EAAMC,WAAWC,GACtC,OAAQH,IALaI,EAKiBJ,EAJH,IAA5BK,OAAOC,KAAKF,GAAKG,QAI6CP,EAAfD,EALxD,IAAuBK,CAMvB","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.js";export{default as FDErrorBoundary}from"./ui/FDErrorBoundary/FDErrorBoundary.js";import"./ui/Layout/PortalMock.js";export{default as LazyComponent}from"./ui/LazyComponent/LazyComponent.js";export{default as Spacer}from"./ui/Spacer/Spacer.js";
|
|
2
|
-
//# sourceMappingURL=library.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
declare const FDErrorBoundary: ({ identifier, children }: {
|
|
5
|
-
identifier: string;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
8
|
-
|
|
9
|
-
export { FDErrorBoundary as default };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{ErrorBoundary as r}from"../../../node_modules/.pnpm/react-error-boundary@4.1.1_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.esm.js";import{useTranslation as o}from"../../../providers/TranslationProvider.js";import t from"../../../node_modules/.pnpm/@mui_material@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_style_oc5snlirzewyt2bjqzs6ppevzu/node_modules/@mui/material/styles/styled.js";const n=t("div")((({theme:e})=>({marginTop:e.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"}))),s=({identifier:t,children:s})=>{const{translate:a}=o();return e(r,{FallbackComponent:()=>e(n,{children:a("Something_went_wrong_please_refresh_the_page")}),onError:(e,r)=>{window.fdlogger?.error(`${t?.toString()} Error Boundary`,{message:e?.message,stack:r})},children:s})};export{s as default};
|
|
2
|
-
//# sourceMappingURL=FDErrorBoundary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FDErrorBoundary.js","sources":["../../../../src/components/ui/FDErrorBoundary/FDErrorBoundary.tsx"],"sourcesContent":["import { ErrorBoundary } from 'react-error-boundary';\nimport { useTranslation } from '../../../providers/TranslationProvider';\nimport { ReactNode } from 'react';\nimport { styled } from '@mui/material/styles';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\n\nconst FDErrorBoundary = ({ identifier, children }: { identifier: string; children: ReactNode }) => {\n const { translate } = useTranslation();\n return (\n <ErrorBoundary\n FallbackComponent={() => <StyledTextContainer>{translate('Something_went_wrong_please_refresh_the_page')}</StyledTextContainer>}\n onError={(error, info) => {\n window.fdlogger?.error(`${identifier?.toString()} Error Boundary`, {\n message: error?.message,\n stack: info,\n });\n }}\n >\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default FDErrorBoundary;\n"],"names":["StyledTextContainer","styled","theme","marginTop","spacing","display","justifyContent","alignItems","FDErrorBoundary","identifier","children","translate","useTranslation","_jsx","ErrorBoundary","FallbackComponent","onError","error","info","window","fdlogger","toString","message","stack"],"mappings":"0eAKA,MAAMA,EAAsBC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,aAGVC,EAAkB,EAAGC,aAAYC,eACnC,MAAMC,UAAEA,GAAcC,IACtB,OACIC,EAACC,EACG,CAAAC,kBAAmB,IAAMF,EAACb,EAAmB,CAAAU,SAAEC,EAAU,kDACzDK,QAAS,CAACC,EAAOC,KACbC,OAAOC,UAAUH,MAAM,GAAGR,GAAYY,4BAA6B,CAC/DC,QAASL,GAAOK,QAChBC,MAAOL,GACT,EAGLR,SAAAA,GAEP"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@mui/material";import e from"../../../node_modules/.pnpm/@mui_material@5.16.7_@emotion_react@11.13.3_@types_react@18.3.11_react@18.3.1__@emotion_style_oc5snlirzewyt2bjqzs6ppevzu/node_modules/@mui/material/styles/styled.js";e("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]}`}))),e("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary})));
|
|
2
|
-
//# sourceMappingURL=PortalMock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PortalMock.js","sources":["../../../../src/components/ui/Layout/PortalMock.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport { AppBar, Box, CssBaseline, Drawer, Typography } from '@mui/material';\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 children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children }: Props) => {\n const loadedFromPortal = import.meta.env.VITE_CODE_BASE_URL !== undefined;\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":["styled","theme","display","justifyContent","alignItems","backgroundColor","palette","grey","height","color","text","primary","borderBottom"],"mappings":"gQAGqBA,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAC/CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,QAC1BC,aAAc,aAAaX,EAAMK,QAAQC,KAAK,WAG5BP,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as r,Component as e,createElement as t}from"react";const o=r(null),s={didCatch:!1,error:null};class n extends e{constructor(r){super(r),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=s}static getDerivedStateFromError(r){return{didCatch:!0,error:r}}resetErrorBoundary(){const{error:r}=this.state;if(null!==r){for(var e,t,o=arguments.length,n=new Array(o),i=0;i<o;i++)n[i]=arguments[i];null===(e=(t=this.props).onReset)||void 0===e||e.call(t,{args:n,reason:"imperative-api"}),this.setState(s)}}componentDidCatch(r,e){var t,o;null===(t=(o=this.props).onError)||void 0===t||t.call(o,r,e)}componentDidUpdate(r,e){const{didCatch:t}=this.state,{resetKeys:o}=this.props;var n,i;t&&null!==e.error&&function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r.length!==e.length||r.some(((r,t)=>!Object.is(r,e[t])))}(r.resetKeys,o)&&(null===(n=(i=this.props).onReset)||void 0===n||n.call(i,{next:o,prev:r.resetKeys,reason:"keys"}),this.setState(s))}render(){const{children:r,fallbackRender:e,FallbackComponent:s,fallback:n}=this.props,{didCatch:i,error:a}=this.state;let l=r;if(i){const r={error:a,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)l=e(r);else if(s)l=t(s,r);else{if(void 0===n)throw a;l=n}}return t(o.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},l)}}export{n as ErrorBoundary,o as ErrorBoundaryContext};
|
|
2
|
-
//# sourceMappingURL=react-error-boundary.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-error-boundary.esm.js","sources":["../../../../../../../../../node_modules/.pnpm/react-error-boundary@4.1.1_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.esm.js"],"sourcesContent":["'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n didCatch: false,\n error: null\n};\nclass ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n this.state = initialState;\n }\n static getDerivedStateFromError(error) {\n return {\n didCatch: true,\n error\n };\n }\n resetErrorBoundary() {\n const {\n error\n } = this.state;\n if (error !== null) {\n var _this$props$onReset, _this$props;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n args,\n reason: \"imperative-api\"\n });\n this.setState(initialState);\n }\n }\n componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n }\n componentDidUpdate(prevProps, prevState) {\n const {\n didCatch\n } = this.state;\n const {\n resetKeys\n } = this.props;\n\n // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n // we'd end up resetting the error boundary immediately.\n // This would likely trigger a second error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n var _this$props$onReset2, _this$props3;\n (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n next: resetKeys,\n prev: prevProps.resetKeys,\n reason: \"keys\"\n });\n this.setState(initialState);\n }\n }\n render() {\n const {\n children,\n fallbackRender,\n FallbackComponent,\n fallback\n } = this.props;\n const {\n didCatch,\n error\n } = this.state;\n let childToRender = children;\n if (didCatch) {\n const props = {\n error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof fallbackRender === \"function\") {\n childToRender = fallbackRender(props);\n } else if (FallbackComponent) {\n childToRender = createElement(FallbackComponent, props);\n } else if (fallback !== undefined) {\n childToRender = fallback;\n } else {\n throw error;\n }\n }\n return createElement(ErrorBoundaryContext.Provider, {\n value: {\n didCatch,\n error,\n resetErrorBoundary: this.resetErrorBoundary\n }\n }, childToRender);\n }\n}\nfunction hasArrayChanged() {\n let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n throw new Error(\"ErrorBoundaryContext not found\");\n }\n}\n\nfunction useErrorBoundary() {\n const context = useContext(ErrorBoundaryContext);\n assertErrorBoundaryContext(context);\n const [state, setState] = useState({\n error: null,\n hasError: false\n });\n const memoized = useMemo(() => ({\n resetBoundary: () => {\n context.resetErrorBoundary();\n setState({\n error: null,\n hasError: false\n });\n },\n showBoundary: error => setState({\n error,\n hasError: true\n })\n }), [context.resetErrorBoundary]);\n if (state.hasError) {\n throw state.error;\n }\n return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n ...props,\n ref\n })));\n\n // Format for display in DevTools\n const name = component.displayName || component.name || \"Unknown\";\n Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n"],"names":["ErrorBoundaryContext","createContext","initialState","didCatch","error","ErrorBoundary","Component","constructor","props","super","this","resetErrorBoundary","bind","state","getDerivedStateFromError","_this$props$onReset","_this$props","_len","arguments","length","args","Array","_key","onReset","call","reason","setState","componentDidCatch","info","_this$props$onError","_this$props2","onError","componentDidUpdate","prevProps","prevState","resetKeys","_this$props$onReset2","_this$props3","a","undefined","b","some","item","index","Object","is","hasArrayChanged","next","prev","render","children","fallbackRender","FallbackComponent","fallback","childToRender","createElement","Provider","value"],"mappings":"wEAGK,MAACA,EAAuBC,EAAc,MAErCC,EAAe,CACnBC,UAAU,EACVC,MAAO,MAET,MAAMC,UAAsBC,EAC1B,WAAAC,CAAYC,GACVC,MAAMD,GACNE,KAAKC,mBAAqBD,KAAKC,mBAAmBC,KAAKF,MACvDA,KAAKG,MAAQX,CACd,CACD,+BAAOY,CAAyBV,GAC9B,MAAO,CACLD,UAAU,EACVC,QAEH,CACD,kBAAAO,GACE,MAAMP,MACJA,GACEM,KAAKG,MACT,GAAc,OAAVT,EAAgB,CAElB,IADA,IAAIW,EAAqBC,EAChBC,EAAOC,UAAUC,OAAQC,EAAO,IAAIC,MAAMJ,GAAOK,EAAO,EAAGA,EAAOL,EAAMK,IAC/EF,EAAKE,GAAQJ,UAAUI,GAEsC,QAA9DP,GAAuBC,EAAcN,KAAKF,OAAOe,eAA6C,IAAxBR,GAA0CA,EAAoBS,KAAKR,EAAa,CACrJI,OACAK,OAAQ,mBAEVf,KAAKgB,SAASxB,EACf,CACF,CACD,iBAAAyB,CAAkBvB,EAAOwB,GACvB,IAAIC,EAAqBC,EACuC,QAA/DD,GAAuBC,EAAepB,KAAKF,OAAOuB,eAA6C,IAAxBF,GAA0CA,EAAoBL,KAAKM,EAAc1B,EAAOwB,EACjK,CACD,kBAAAI,CAAmBC,EAAWC,GAC5B,MAAM/B,SACJA,GACEO,KAAKG,OACHsB,UACJA,GACEzB,KAAKF,MAQP,IAAI4B,EAAsBC,EADxBlC,GAAgC,OAApB+B,EAAU9B,OA8C9B,WACE,IAAIkC,EAAIpB,UAAUC,OAAS,QAAsBoB,IAAjBrB,UAAU,GAAmBA,UAAU,GAAK,GACxEsB,EAAItB,UAAUC,OAAS,QAAsBoB,IAAjBrB,UAAU,GAAmBA,UAAU,GAAK,GAC5E,OAAOoB,EAAEnB,SAAWqB,EAAErB,QAAUmB,EAAEG,MAAK,CAACC,EAAMC,KAAWC,OAAOC,GAAGH,EAAMF,EAAEG,KAC7E,CAlDgDG,CAAgBb,EAAUE,UAAWA,KAEd,QAAhEC,GAAwBC,EAAe3B,KAAKF,OAAOe,eAA8C,IAAzBa,GAA2CA,EAAqBZ,KAAKa,EAAc,CAC1JU,KAAMZ,EACNa,KAAMf,EAAUE,UAChBV,OAAQ,SAEVf,KAAKgB,SAASxB,GAEjB,CACD,MAAA+C,GACE,MAAMC,SACJA,EAAQC,eACRA,EAAcC,kBACdA,EAAiBC,SACjBA,GACE3C,KAAKF,OACHL,SACJA,EAAQC,MACRA,GACEM,KAAKG,MACT,IAAIyC,EAAgBJ,EACpB,GAAI/C,EAAU,CACZ,MAAMK,EAAQ,CACZJ,QACAO,mBAAoBD,KAAKC,oBAE3B,GAA8B,mBAAnBwC,EACTG,EAAgBH,EAAe3C,QAC1B,GAAI4C,EACTE,EAAgBC,EAAcH,EAAmB5C,OAC5C,SAAiB+B,IAAbc,EAGT,MAAMjD,EAFNkD,EAAgBD,CAGjB,CACF,CACD,OAAOE,EAAcvD,EAAqBwD,SAAU,CAClDC,MAAO,CACLtD,WACAC,QACAO,mBAAoBD,KAAKC,qBAE1B2C,EACJ","x_google_ignoreList":[0]}
|