@flipdish/portal-library 1.0.67 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/components/themes/flipdishPublicTheme.cjs.js +1 -1
  2. package/dist/components/themes/flipdishPublicTheme.cjs.js.map +1 -1
  3. package/dist/components/themes/flipdishPublicTheme.d.ts +1 -0
  4. package/dist/components/themes/flipdishPublicTheme.js +1 -1
  5. package/dist/components/themes/flipdishPublicTheme.js.map +1 -1
  6. package/dist/components/ui/Form/GenericAutocompleteField.cjs.js +1 -1
  7. package/dist/components/ui/Form/GenericAutocompleteField.cjs.js.map +1 -1
  8. package/dist/components/ui/Form/GenericAutocompleteField.d.ts +1 -1
  9. package/dist/components/ui/Form/GenericAutocompleteField.js +1 -1
  10. package/dist/components/ui/Form/GenericAutocompleteField.js.map +1 -1
  11. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.cjs.js +1 -1
  12. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.cjs.js.map +1 -1
  13. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.js +1 -1
  14. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.js.map +1 -1
  15. package/dist/components/ui/NoResults/NoResults.cjs.js +1 -1
  16. package/dist/components/ui/NoResults/NoResults.cjs.js.map +1 -1
  17. package/dist/components/ui/NoResults/NoResults.d.ts +2 -2
  18. package/dist/components/ui/NoResults/NoResults.js +1 -1
  19. package/dist/components/ui/NoResults/NoResults.js.map +1 -1
  20. package/dist/components/ui/PageLayout/PageLayout.cjs.js +1 -1
  21. package/dist/components/ui/PageLayout/PageLayout.cjs.js.map +1 -1
  22. package/dist/components/ui/PageLayout/PageLayout.js +1 -1
  23. package/dist/components/ui/PageLayout/PageLayout.js.map +1 -1
  24. package/dist/components/ui/PortalMock/PortalMock.cjs.js +1 -1
  25. package/dist/components/ui/PortalMock/PortalMock.cjs.js.map +1 -1
  26. package/dist/components/ui/PortalMock/PortalMock.js +1 -1
  27. package/dist/components/ui/PortalMock/PortalMock.js.map +1 -1
  28. package/dist/components/ui/Switch/Switch.cjs.js +1 -1
  29. package/dist/components/ui/Switch/Switch.cjs.js.map +1 -1
  30. package/dist/components/ui/Switch/Switch.d.ts +1 -1
  31. package/dist/components/ui/Switch/Switch.js +1 -1
  32. package/dist/components/ui/Switch/Switch.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";require("@mui/material/styles");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"})}});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;
1
+ "use strict";require("@mui/material/styles");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
2
  //# sourceMappingURL=flipdishPublicTheme.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { type Breakpoint } from '@mui/material/styles';\nimport 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 },\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\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 interface Theme {\n breakpoints: {\n up: (key: number | Breakpoint) => string;\n down: (key: number | Breakpoint) => string;\n only: (key: number | Breakpoint) => string;\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","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":"+FAIA,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,C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LJ,eAAgB,CACZC,KAAM,CACFI,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAa5B,EAAMP,QAAQoC,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,aAAapC,EAAMP,QAAQoC,cAKzDQ,YAAa,CACTjB,eAAgB,CACZC,KAAM,CACF,4BAA6B,CACzBc,gBAAiBnC,EAAMP,QAAQa,WAAWT,MAC1CyC,OAAQ"}
1
+ {"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { type Breakpoint } from '@mui/material/styles';\nimport 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\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 alternateBackground: Palette['primary'];\n }\n interface Theme {\n breakpoints: {\n up: (key: number | Breakpoint) => string;\n down: (key: number | Breakpoint) => string;\n only: (key: number | Breakpoint) => string;\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":"+FAIA,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,EAA2B,CACjDY,QAAS,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I1BC,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"}
@@ -14,6 +14,7 @@ declare module '@mui/material/styles' {
14
14
  donutPanic: Palette['primary'];
15
15
  eletricLime: Palette['primary'];
16
16
  pending: Palette['primary'];
17
+ alternateBackground: Palette['primary'];
17
18
  }
18
19
  interface Theme {
19
20
  breakpoints: {
@@ -1,2 +1,2 @@
1
- import"@mui/material/styles";import e from"@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"})}});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"}}}}}});export{r as default};
1
+ import"@mui/material/styles";import e from"@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"}}}}}});export{r as default};
2
2
  //# sourceMappingURL=flipdishPublicTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { type Breakpoint } from '@mui/material/styles';\nimport 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 },\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\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 interface Theme {\n breakpoints: {\n up: (key: number | Breakpoint) => string;\n down: (key: number | Breakpoint) => string;\n only: (key: number | Breakpoint) => string;\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","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":"6EAIA,MAAMA,EAAYC,EAAY,CAC1BC,WAAY,CACRC,MAAO,CACHC,WAAY,wBAEhBC,MAAO,CACHD,WAAY,wBAEhBE,GAAI,CACAF,WA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,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,YAAa5B,EAAMP,QAAQoC,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,aAAapC,EAAMP,QAAQoC,cAKzDQ,YAAa,CACTjB,eAAgB,CACZC,KAAM,CACF,4BAA6B,CACzBc,gBAAiBnC,EAAMP,QAAQa,WAAWT,MAC1CyC,OAAQ"}
1
+ {"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { type Breakpoint } from '@mui/material/styles';\nimport 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\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 alternateBackground: Palette['primary'];\n }\n interface Theme {\n breakpoints: {\n up: (key: number | Breakpoint) => string;\n down: (key: number | Breakpoint) => string;\n only: (key: number | Breakpoint) => string;\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":"6EAIA,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,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Aa7B,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"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),t=require("formik");require("react");var l=require("../../custom-hooks/useRenderValidText.cjs.js"),i=require("./FormItemLayout.cjs.js");module.exports=({label:o,fieldName:a,options:n,placeholder:s,getOptionLabel:d,validation:u,onChange:p,onInputChange:m,isOptionEqualToValue:c,onScroll:h,layout:g="horizontal",variant:x="outlined",disabled:v=!1,loading:j=!1,required:b=!1,multiple:q=!1,limitTags:f})=>{const T=()=>e.jsx(t.Field,{name:a,validate:u,children:({field:t,form:i})=>{const{errors:u,touched:T,isSubmitting:y}=i,F=u[t.name],I=!!F&&T[t.name],P=l({fieldError:F,showError:I,touched:!!T[t.name],value:t.value});return e.jsx(r.Autocomplete,{options:n,getOptionLabel:d,isOptionEqualToValue:c,onChange:(e,r)=>{i.setFieldValue(a,r),p&&p(e,r)},onInputChange:m,disabled:y||v,fullWidth:!0,value:t.value||(q?[]:null),loading:j,renderInput:t=>e.jsx(r.TextField,{...t,label:"standard"===x?void 0:o,variant:x,"data-testid":`text-field-${a}`,fullWidth:!0,style:{paddingRight:"horizontal"===g?16:0},placeholder:s||void 0,required:b,error:I,helperText:P,slotProps:{input:{...t.InputProps,endAdornment:e.jsxs(e.Fragment,{children:[j&&e.jsx(r.CircularProgress,{color:"inherit",size:25}),t.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:q,limitTags:q?f??2:void 0,slotProps:{listbox:{onScroll:h}}})}});return"vertical"===g?e.jsxs(e.Fragment,{children:["standard"===x&&e.jsx(r.Typography,{variant:"subtitle1",component:"h3",color:"textPrimary",children:o}),T()]}):e.jsx(i,{label:o,children:T()})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/Autocomplete"),i=require("@mui/material/CircularProgress"),t=require("@mui/material/TextField"),l=require("@mui/material/Typography"),a=require("formik");require("react");var o=require("../../custom-hooks/useRenderValidText.cjs.js"),n=require("./FormItemLayout.cjs.js");module.exports=({label:s,fieldName:u,options:d,placeholder:m,getOptionLabel:p,validation:c,onChange:h,onInputChange:g,isOptionEqualToValue:x,onScroll:v,layout:j="horizontal",variant:q="outlined",disabled:b=!1,loading:f=!1,required:T=!1,multiple:y=!1,limitTags:F})=>{const I=()=>e.jsx(a.Field,{name:u,validate:c,children:({field:l,form:a})=>{const{errors:n,touched:c,isSubmitting:I}=a,P=n[l.name],C=!!P&&c[l.name],A=o({fieldError:P,showError:C,touched:!!c[l.name],value:l.value});return e.jsx(r,{options:d,getOptionLabel:p,isOptionEqualToValue:x,onChange:(e,r)=>{a.setFieldValue(u,r),h&&h(e,r)},onInputChange:g,disabled:I||b,fullWidth:!0,value:l.value||(y?[]:null),loading:f,renderInput:r=>e.jsx(t,{...r,label:"standard"===q?void 0:s,variant:q,"data-testid":`text-field-${u}`,fullWidth:!0,style:{paddingRight:"horizontal"===j?16:0},placeholder:m||void 0,required:T,error:C,helperText:A,slotProps:{input:{...r.InputProps,endAdornment:e.jsxs(e.Fragment,{children:[f&&e.jsx(i,{color:"inherit",size:25}),r.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:y,limitTags:y?F??2:void 0,slotProps:{listbox:{onScroll:v}}})}});return"vertical"===j?e.jsxs(e.Fragment,{children:["standard"===q&&e.jsx(l,{variant:"subtitle1",component:"h3",color:"textPrimary",children:s}),I()]}):e.jsx(n,{label:s,children:I()})};
2
2
  //# sourceMappingURL=GenericAutocompleteField.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericAutocompleteField.cjs.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type TextFieldProps, Autocomplete, TextField, Typography, CircularProgress } from '@mui/material';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","jsx","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"kOA2BiC,EAC7BA,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,gBACAC,uBACAC,WACAC,SAAS,aACTC,UAAU,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C,EAAAC,KAAAC,WAAA,CAAA7B,SAAA,CACiB,aAAZX,GACGO,EAAAqB,IAACmB,aAAU,CAAC/C,QAAQ,YAAYgD,UAAU,KAAKN,MAAM,cAChD/B,SAAAtB,IAGRiB,OAKNC,EAAAqB,IAACqB,EAAc,CAAC5D,MAAOA,EAAQsB,SAAAL,KAA+B"}
1
+ {"version":3,"file":"GenericAutocompleteField.cjs.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Autocomplete from '@mui/material/Autocomplete';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport TextField, { type TextFieldProps } from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","jsx","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"sWA8BiC,EAC7BA,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,gBACAC,uBACAC,WACAC,SAAS,aACTC,UAAU,WACVC,YAAW,EACXC,WAAU,EACVC,YAAW,EACXC,YAAW,EACXC,gBAEA,MAAMC,EAAc,IAEZC,MAACC,EAAAA,OAAMC,KAAMnB,EAAWoB,SAAUhB,EAAUiB,SACvC,EAAGC,QAAOC,WACP,MAAMC,OAAEA,EAAMC,QAAEA,EAAOC,aAAEA,GAAiBH,EACpCI,EAAaH,EAAOF,EAAMH,MAC1BS,IAAcD,GAAeF,EAAQH,EAAMH,MAC3CU,EAAaC,EAAmB,CAClCH,aACAC,YACAH,UAAWA,EAAQH,EAAMH,MACzBY,MAAOT,EAAMS,QAGjB,OACId,MAACe,EAAY,CACT/B,QAASA,EACTE,eAAgBA,EAChBI,qBAAsBA,EACtBF,SAAU,CAAC4B,EAAmBF,KAE1BR,EAAKW,cAAclC,EAAW+B,GAC1B1B,GACAA,EAAS4B,EAAGF,EACf,EAELzB,cAAeA,EACfK,SAAUe,GAAgBf,EAC1BwB,aACAJ,MAAOT,EAAMS,QAAUjB,EAAW,GAAK,MACvCF,QAASA,EACTwB,YAAcC,GACVpB,EAACqB,IAAAC,EACO,IAAAF,EACJtC,MAAmB,aAAZW,OAAyB8B,EAAYzC,EAC5CW,QAASA,EAAO,cACH,cAAcV,IAC3BmC,WAAS,EACTM,MAAO,CAAEC,aAAyB,eAAXjC,EAA0B,GAAK,GACtDP,YAAaA,QAA4BsC,EACzC3B,SAAUA,EACV8B,MAAOf,EACPC,WAAYA,EACZe,UAAW,CACPC,MAAO,IACAR,EAAOS,WACVC,aACIC,EACKC,KAAAC,WAAA,CAAA7B,SAAA,CAAAT,GAAWK,EAACqB,IAAAa,EAAiB,CAAAC,MAAM,UAAUC,KAAM,KACnDhB,EAAOS,WAAWC,iBAK/BO,eAAgB,CACZjC,SAAU,IACVoB,MAAO,CAAEc,UAAW,aAKpCzC,SAAUA,EACVC,UAAWD,EAAYC,GAAa,OAAKyB,EACzCI,UAAW,CACPY,QAAS,CACLhD,cAId,IAMlB,MAAe,aAAXC,EAEIuC,EAAAC,KAAAC,WAAA,CAAA7B,SAAA,CACiB,aAAZX,GACGO,EAAAqB,IAACmB,EAAU,CAAC/C,QAAQ,YAAYgD,UAAU,KAAKN,MAAM,cAChD/B,SAAAtB,IAGRiB,OAKNC,EAAAqB,IAACqB,EAAc,CAAC5D,MAAOA,EAAQsB,SAAAL,KAA+B"}
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { TextFieldProps } from '@mui/material';
2
+ import { TextFieldProps } from '@mui/material/TextField';
3
3
  import { SyntheticEvent } from 'react';
4
4
 
5
5
  type Props<T> = {
@@ -1,2 +1,2 @@
1
- import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{Typography as r,Autocomplete as l,TextField as i,CircularProgress as n}from"@mui/material";import{Field as a}from"formik";import"react";import d from"../../custom-hooks/useRenderValidText.js";import s from"./FormItemLayout.js";const u=({label:u,fieldName:m,options:p,placeholder:h,getOptionLabel:c,validation:f,onChange:g,onInputChange:v,isOptionEqualToValue:b,onScroll:x,layout:T="horizontal",variant:I="outlined",disabled:y=!1,loading:P=!1,required:q=!1,multiple:C=!1,limitTags:E})=>{const O=()=>o(a,{name:m,validate:f,children:({field:r,form:a})=>{const{errors:s,touched:f,isSubmitting:O}=a,V=s[r.name],j=!!V&&f[r.name],z=d({fieldError:V,showError:j,touched:!!f[r.name],value:r.value});return o(l,{options:p,getOptionLabel:c,isOptionEqualToValue:b,onChange:(e,t)=>{a.setFieldValue(m,t),g&&g(e,t)},onInputChange:v,disabled:O||y,fullWidth:!0,value:r.value||(C?[]:null),loading:P,renderInput:r=>o(i,{...r,label:"standard"===I?void 0:u,variant:I,"data-testid":`text-field-${m}`,fullWidth:!0,style:{paddingRight:"horizontal"===T?16:0},placeholder:h||void 0,required:q,error:j,helperText:z,slotProps:{input:{...r.InputProps,endAdornment:e(t,{children:[P&&o(n,{color:"inherit",size:25}),r.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:C,limitTags:C?E??2:void 0,slotProps:{listbox:{onScroll:x}}})}});return"vertical"===T?e(t,{children:["standard"===I&&o(r,{variant:"subtitle1",component:"h3",color:"textPrimary",children:u}),O()]}):o(s,{label:u,children:O()})};export{u as default};
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import o from"@mui/material/Autocomplete";import i from"@mui/material/CircularProgress";import l from"@mui/material/TextField";import a from"@mui/material/Typography";import{Field as n}from"formik";import"react";import d from"../../custom-hooks/useRenderValidText.js";import m from"./FormItemLayout.js";const u=({label:u,fieldName:s,options:p,placeholder:h,getOptionLabel:c,validation:f,onChange:g,onInputChange:v,isOptionEqualToValue:b,onScroll:x,layout:T="horizontal",variant:y="outlined",disabled:I=!1,loading:P=!1,required:C=!1,multiple:q=!1,limitTags:A})=>{const E=()=>r(n,{name:s,validate:f,children:({field:a,form:n})=>{const{errors:m,touched:f,isSubmitting:E}=n,O=m[a.name],V=!!O&&f[a.name],j=d({fieldError:O,showError:V,touched:!!f[a.name],value:a.value});return r(o,{options:p,getOptionLabel:c,isOptionEqualToValue:b,onChange:(e,t)=>{n.setFieldValue(s,t),g&&g(e,t)},onInputChange:v,disabled:E||I,fullWidth:!0,value:a.value||(q?[]:null),loading:P,renderInput:o=>r(l,{...o,label:"standard"===y?void 0:u,variant:y,"data-testid":`text-field-${s}`,fullWidth:!0,style:{paddingRight:"horizontal"===T?16:0},placeholder:h||void 0,required:C,error:V,helperText:j,slotProps:{input:{...o.InputProps,endAdornment:e(t,{children:[P&&r(i,{color:"inherit",size:25}),o.InputProps.endAdornment]})},formHelperText:{children:" ",style:{textAlign:"right"}}}}),multiple:q,limitTags:q?A??2:void 0,slotProps:{listbox:{onScroll:x}}})}});return"vertical"===T?e(t,{children:["standard"===y&&r(a,{variant:"subtitle1",component:"h3",color:"textPrimary",children:u}),E()]}):r(m,{label:u,children:E()})};export{u as default};
2
2
  //# sourceMappingURL=GenericAutocompleteField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericAutocompleteField.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type TextFieldProps, Autocomplete, TextField, Typography, CircularProgress } from '@mui/material';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["GenericAutocompleteField","label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"0SA2BM,MAAAA,EAA2B,EAC7BC,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,gBACAC,uBACAC,WACAC,SAAS,aACTC,UAAU,WACVC,YAAW,EACXC,WAAU,EACVC,YAAW,EACXC,YAAW,EACXC,gBAEA,MAAMC,EAAc,IAEZC,EAACC,GAAMC,KAAMnB,EAAWoB,SAAUhB,EAAUiB,SACvC,EAAGC,QAAOC,WACP,MAAMC,OAAEA,EAAMC,QAAEA,EAAOC,aAAEA,GAAiBH,EACpCI,EAAaH,EAAOF,EAAMH,MAC1BS,IAAcD,GAAeF,EAAQH,EAAMH,MAC3CU,EAAaC,EAAmB,CAClCH,aACAC,YACAH,UAAWA,EAAQH,EAAMH,MACzBY,MAAOT,EAAMS,QAGjB,OACId,EAACe,EAAY,CACT/B,QAASA,EACTE,eAAgBA,EAChBI,qBAAsBA,EACtBF,SAAU,CAAC4B,EAAmBF,KAE1BR,EAAKW,cAAclC,EAAW+B,GAC1B1B,GACAA,EAAS4B,EAAGF,EACf,EAELzB,cAAeA,EACfK,SAAUe,GAAgBf,EAC1BwB,aACAJ,MAAOT,EAAMS,QAAUjB,EAAW,GAAK,MACvCF,QAASA,EACTwB,YAAcC,GACVpB,EAACqB,EACO,IAAAD,EACJtC,MAAmB,aAAZW,OAAyB6B,EAAYxC,EAC5CW,QAASA,EAAO,cACH,cAAcV,IAC3BmC,WAAS,EACTK,MAAO,CAAEC,aAAyB,eAAXhC,EAA0B,GAAK,GACtDP,YAAaA,QAA4BqC,EACzC1B,SAAUA,EACV6B,MAAOd,EACPC,WAAYA,EACZc,UAAW,CACPC,MAAO,IACAP,EAAOQ,WACVC,aACIC,EACKC,EAAA,CAAA3B,SAAA,CAAAT,GAAWK,EAACgC,EAAiB,CAAAC,MAAM,UAAUC,KAAM,KACnDd,EAAOQ,WAAWC,iBAK/BM,eAAgB,CACZ/B,SAAU,IACVmB,MAAO,CAAEa,UAAW,aAKpCvC,SAAUA,EACVC,UAAWD,EAAYC,GAAa,OAAKwB,EACzCI,UAAW,CACPW,QAAS,CACL9C,cAId,IAMlB,MAAe,aAAXC,EAEIsC,EAAAC,EAAA,CAAA3B,SAAA,CACiB,aAAZX,GACGO,EAACsC,EAAU,CAAC7C,QAAQ,YAAY8C,UAAU,KAAKN,MAAM,cAChD7B,SAAAtB,IAGRiB,OAKNC,EAACwC,EAAc,CAAC1D,MAAOA,EAAQsB,SAAAL,KAA+B"}
1
+ {"version":3,"file":"GenericAutocompleteField.js","sources":["../../../../src/components/ui/Form/GenericAutocompleteField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Autocomplete from '@mui/material/Autocomplete';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport TextField, { type TextFieldProps } from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\nimport { Field, type FieldProps } from 'formik';\nimport { type SyntheticEvent } from 'react';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\n\nexport type Props<T> = {\n label: string;\n fieldName: string;\n options: T[];\n placeholder?: string;\n getOptionLabel?: (option: T) => string;\n validation?: (value: T | T[]) => string | undefined;\n onChange?: (e: SyntheticEvent, value: T | T[]) => void;\n onInputChange?: (e: SyntheticEvent, value: string) => void;\n isOptionEqualToValue?: (option: T, value: T) => boolean;\n onScroll?: (e: React.UIEvent<HTMLUListElement, UIEvent>) => void;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n loading?: boolean;\n required?: boolean;\n multiple?: boolean;\n limitTags?: number;\n};\n\nconst GenericAutocompleteField = <T,>({\n label,\n fieldName,\n options,\n placeholder,\n getOptionLabel,\n validation,\n onChange,\n onInputChange,\n isOptionEqualToValue,\n onScroll,\n layout = 'horizontal',\n variant = 'outlined',\n disabled = false,\n loading = false,\n required = false,\n multiple = false,\n limitTags = undefined,\n}: Props<T>) => {\n const renderField = () => {\n return (\n <Field name={fieldName} validate={validation}>\n {({ field, form }: FieldProps) => {\n const { errors, touched, isSubmitting } = form;\n const fieldError = errors[field.name] as string | undefined;\n const showError = !!fieldError && (touched[field.name] as boolean | undefined);\n const helperText = useRenderValidText({\n fieldError,\n showError,\n touched: !!touched[field.name],\n value: field.value,\n });\n\n return (\n <Autocomplete\n options={options}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n onChange={(e: SyntheticEvent, value: T[]) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(fieldName, value);\n if (onChange) {\n onChange(e, value);\n }\n }}\n onInputChange={onInputChange}\n disabled={isSubmitting || disabled}\n fullWidth\n value={field.value || (multiple ? [] : null)}\n loading={loading}\n renderInput={(params) => (\n <TextField\n {...params}\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n data-testid={`text-field-${fieldName}`}\n fullWidth\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n required={required}\n error={showError}\n helperText={helperText}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {loading && <CircularProgress color=\"inherit\" size={25} />}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n\n formHelperText: {\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n },\n }}\n />\n )}\n multiple={multiple}\n limitTags={multiple ? (limitTags ?? 2) : undefined}\n slotProps={{\n listbox: {\n onScroll,\n },\n }}\n />\n );\n }}\n </Field>\n );\n };\n\n if (layout === 'vertical') {\n return (\n <>\n {variant === 'standard' && (\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {label}\n </Typography>\n )}\n {renderField()}\n </>\n );\n }\n\n return <FormItemLayout label={label}>{renderField()}</FormItemLayout>;\n};\n\nexport default GenericAutocompleteField;\n"],"names":["GenericAutocompleteField","label","fieldName","options","placeholder","getOptionLabel","validation","onChange","onInputChange","isOptionEqualToValue","onScroll","layout","variant","disabled","loading","required","multiple","limitTags","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","Autocomplete","e","setFieldValue","fullWidth","renderInput","params","TextField","undefined","style","paddingRight","error","slotProps","input","InputProps","endAdornment","_jsxs","_Fragment","CircularProgress","color","size","formHelperText","textAlign","listbox","Typography","component","FormItemLayout"],"mappings":"+WA8BM,MAAAA,EAA2B,EAC7BC,QACAC,YACAC,UACAC,cACAC,iBACAC,aACAC,WACAC,gBACAC,uBACAC,WACAC,SAAS,aACTC,UAAU,WACVC,YAAW,EACXC,WAAU,EACVC,YAAW,EACXC,YAAW,EACXC,gBAEA,MAAMC,EAAc,IAEZC,EAACC,GAAMC,KAAMnB,EAAWoB,SAAUhB,EAAUiB,SACvC,EAAGC,QAAOC,WACP,MAAMC,OAAEA,EAAMC,QAAEA,EAAOC,aAAEA,GAAiBH,EACpCI,EAAaH,EAAOF,EAAMH,MAC1BS,IAAcD,GAAeF,EAAQH,EAAMH,MAC3CU,EAAaC,EAAmB,CAClCH,aACAC,YACAH,UAAWA,EAAQH,EAAMH,MACzBY,MAAOT,EAAMS,QAGjB,OACId,EAACe,EAAY,CACT/B,QAASA,EACTE,eAAgBA,EAChBI,qBAAsBA,EACtBF,SAAU,CAAC4B,EAAmBF,KAE1BR,EAAKW,cAAclC,EAAW+B,GAC1B1B,GACAA,EAAS4B,EAAGF,EACf,EAELzB,cAAeA,EACfK,SAAUe,GAAgBf,EAC1BwB,aACAJ,MAAOT,EAAMS,QAAUjB,EAAW,GAAK,MACvCF,QAASA,EACTwB,YAAcC,GACVpB,EAACqB,EACO,IAAAD,EACJtC,MAAmB,aAAZW,OAAyB6B,EAAYxC,EAC5CW,QAASA,EAAO,cACH,cAAcV,IAC3BmC,WAAS,EACTK,MAAO,CAAEC,aAAyB,eAAXhC,EAA0B,GAAK,GACtDP,YAAaA,QAA4BqC,EACzC1B,SAAUA,EACV6B,MAAOd,EACPC,WAAYA,EACZc,UAAW,CACPC,MAAO,IACAP,EAAOQ,WACVC,aACIC,EACKC,EAAA,CAAA3B,SAAA,CAAAT,GAAWK,EAACgC,EAAiB,CAAAC,MAAM,UAAUC,KAAM,KACnDd,EAAOQ,WAAWC,iBAK/BM,eAAgB,CACZ/B,SAAU,IACVmB,MAAO,CAAEa,UAAW,aAKpCvC,SAAUA,EACVC,UAAWD,EAAYC,GAAa,OAAKwB,EACzCI,UAAW,CACPW,QAAS,CACL9C,cAId,IAMlB,MAAe,aAAXC,EAEIsC,EAAAC,EAAA,CAAA3B,SAAA,CACiB,aAAZX,GACGO,EAACsC,EAAU,CAAC7C,QAAQ,YAAY8C,UAAU,KAAKN,MAAM,cAChD7B,SAAAtB,IAGRiB,OAKNC,EAACwC,EAAc,CAAC1D,MAAOA,EAAQsB,SAAAL,KAA+B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/icons-material"),i=require("@mui/material"),r=require("../ListItemLink/ListItemLink.cjs.js");const o=i.styled(r,{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),n=i.styled(i.ListItemIcon,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),s=i.styled(i.ListItemText)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),d=({borderBottom:r,customTitle:d,customSubtitle:a,disabled:c=!1,onClick:l,title:u,subtitle:m,icon:p,iconMargin:x,hideIcon:b=!1,link:g,isLast:f,customButton:h,iconComponent:y,dataFd:L="",isSelected:k=!1})=>{const j=i.useTheme(),I=i.useMediaQuery(j.breakpoints.down("md")),M=!f||I,B=d||u,C=a||m;return e.jsxs(o,{borderBottom:M?r:"none",divider:M,button:!0,fdKey:L||`link-button-${u}`,to:g,onClick:l,disabled:c,selected:k,children:[p&&e.jsx(n,{iconMargin:x,children:e.jsx("img",{src:p,alt:""})}),y&&e.jsx(n,{iconMargin:x,children:y}),e.jsx(s,{primary:B,secondary:C,sx:{pr:"60px"}}),!b&&(h||e.jsx(i.IconButton,{"aria-label":`link-button-${u}`,children:e.jsx(t.KeyboardArrowRight,{})}))]})};exports.ListItemLinkButton=d,exports.default=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/icons-material"),i=require("@mui/material/IconButton"),r=require("@mui/material/ListItemIcon"),o=require("@mui/material/ListItemText"),n=require("@mui/material/styles/useTheme"),a=require("@mui/material/useMediaQuery"),s=require("@mui/material/styles/styled");const d=s(require("../ListItemLink/ListItemLink.cjs.js"),{shouldForwardProp:e=>!["borderBottom"].includes(e)&&!["disabled"].includes(e)&&!["selected"].includes(e)})((({theme:e,borderBottom:t,selected:i})=>({borderBottom:t??"1px solid #cecece",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:e.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),c=s(r,{shouldForwardProp:e=>!["iconMargin"].includes(e)})((({iconMargin:e})=>({margin:e||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),l=s(o)((({theme:e})=>({"& .MuiListItemText-primary":{color:e.palette.text.primary},"& .MuiListItemText-secondary":{color:e.palette.text.secondary}}))),u=({borderBottom:r,customTitle:o,customSubtitle:s,disabled:u=!1,onClick:m,title:p,subtitle:x,icon:b,iconMargin:g,hideIcon:f=!1,link:h,isLast:y,customButton:L,iconComponent:k,dataFd:j="",isSelected:q=!1})=>{const I=n(),M=a(I.breakpoints.down("md")),B=!y||M,C=o||p,v=s||x;return e.jsxs(d,{borderBottom:B?r:"none",divider:B,button:!0,fdKey:j||`link-button-${p}`,to:h,onClick:m,disabled:u,selected:q,children:[b&&e.jsx(c,{iconMargin:g,children:e.jsx("img",{src:b,alt:""})}),k&&e.jsx(c,{iconMargin:g,children:k}),e.jsx(l,{primary:C,secondary:v,sx:{pr:"60px"}}),!f&&(L||e.jsx(i,{"aria-label":`link-button-${p}`,children:e.jsx(t.KeyboardArrowRight,{})}))]})};exports.ListItemLinkButton=u,exports.default=u;
2
2
  //# sourceMappingURL=ListItemLinkButton.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemLinkButton.cjs.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport { IconButton, ListItemIcon, ListItemText, useTheme, useMediaQuery, styled } from '@mui/material';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"yOAQA,MAAMA,EAAqBC,EAAMA,OAACC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBjB,EAAMA,OAACkB,eAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BH,EAEK,EAAGmB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBxB,EAAAA,OAAOyB,EAAAA,aAAPzB,EAAqB,EAAGK,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,EAAAA,WACRC,EAAWC,EAAAA,cAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAAAA,KAACnD,EAAkB,CACfO,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAAAC,IAACxC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,EAAAA,WAAKE,IAAKxB,EAAMyB,IAAI,OAI3BpB,GAAiBiB,EAAAA,IAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAACC,IAAAjC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcW,GAAI,CAAEC,GAAI,WAEzE1B,IACGG,GACGkB,MAACM,EAAUA,WAAA,CAAA,aAAa,eAAe9B,IACnCuB,SAAAC,EAAAA,IAACO,EAAAA,mBAAqB,CAAA,QAIxC"}
1
+ {"version":3,"file":"ListItemLinkButton.cjs.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"gZAaA,MAAMA,EAAqBC,iDAAqB,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FF,EAG0C,EAAGI,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAG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ardArrowRight as o}from"@mui/icons-material";import{styled as i,ListItemIcon as r,ListItemText as n,useTheme as a,useMediaQuery as d,IconButton as c}from"@mui/material";import l from"../ListItemLink/ListItemLink.js";const s=i(l,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:o})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:o?"#eaf2ff":"inherit"}))),m=i(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),p=i(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),u=({borderBottom:i,customTitle:r,customSubtitle:n,disabled:l=!1,onClick:u,title:b,subtitle:f,icon:g,iconMargin:h,hideIcon:x=!1,link:k,isLast:L,customButton:y,iconComponent:M,dataFd:B="",isSelected:C=!1})=>{const I=a(),w=d(I.breakpoints.down("md")),F=!L||w,T=r||b,j=n||f;return t(s,{borderBottom:F?i:"none",divider:F,button:!0,fdKey:B||`link-button-${b}`,to:k,onClick:u,disabled:l,selected:C,children:[g&&e(m,{iconMargin:h,children:e("img",{src:g,alt:""})}),M&&e(m,{iconMargin:h,children:M}),e(p,{primary:T,secondary:j,sx:{pr:"60px"}}),!x&&(y||e(c,{"aria-label":`link-button-${b}`,children:e(o,{})}))]})};export{u as ListItemLinkButton,u as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import{KeyboardArrowRight as i}from"@mui/icons-material";import o from"@mui/material/IconButton";import r from"@mui/material/ListItemIcon";import n from"@mui/material/ListItemText";import a from"@mui/material/styles/useTheme";import m from"@mui/material/useMediaQuery";import d from"@mui/material/styles/styled";import l from"../ListItemLink/ListItemLink.js";const c=d(l,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:i})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),s=d(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),u=d(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),p=({borderBottom:r,customTitle:n,customSubtitle:d,disabled:l=!1,onClick:p,title:f,subtitle:b,icon:g,iconMargin:h,hideIcon:x=!1,link:y,isLast:k,customButton:L,iconComponent:I,dataFd:M="",isSelected:B=!1})=>{const C=a(),T=m(C.breakpoints.down("md")),w=!k||T,F=n||f,j=d||b;return t(c,{borderBottom:w?r:"none",divider:w,button:!0,fdKey:M||`link-button-${f}`,to:y,onClick:p,disabled:l,selected:B,children:[g&&e(s,{iconMargin:h,children:e("img",{src:g,alt:""})}),I&&e(s,{iconMargin:h,children:I}),e(u,{primary:F,secondary:j,sx:{pr:"60px"}}),!x&&(L||e(o,{"aria-label":`link-button-${f}`,children:e(i,{})}))]})};export{p as ListItemLinkButton,p as default};
2
2
  //# sourceMappingURL=ListItemLinkButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemLinkButton.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport { IconButton, ListItemIcon, ListItemText, useTheme, useMediaQuery, styled } from '@mui/material';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"oSAQA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBjB,EAAOkB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BH,EAEK,EAAGmB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBxB,EAAOyB,EAAPzB,EAAqB,EAAGK,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAACnD,EAAkB,CACfO,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAACvC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,SAAKC,IAAKvB,EAAMwB,IAAI,OAI3BnB,GAAiBiB,EAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAAChC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcU,GAAI,CAAEC,GAAI,WAEzEzB,IACGG,GACGkB,EAACK,EAAU,CAAA,aAAa,eAAe7B,IACnCuB,SAAAC,EAACM,EAAqB,CAAA,QAIxC"}
1
+ {"version":3,"file":"ListItemLinkButton.js","sources":["../../../../src/components/ui/ListItemLinkButton/ListItemLinkButton.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport { ListItemLink } from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"uaAaA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAA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AAiBiB,EAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAAChC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcU,GAAI,CAAEC,GAAI,WAEzEzB,IACGG,GACGkB,EAACK,EAAU,CAAA,aAAa,eAAe7B,IACnCuB,SAAAC,EAACM,EAAqB,CAAA,QAIxC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/Card"),r=require("@mui/material/styles"),i=require("@mui/material/Typography");const n=r.styled("div")((({theme:e})=>({margin:e.spacing(8,"auto"),display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"}))),a=r.styled(t)((({theme:e})=>({padding:e.spacing(2,8)})));module.exports=({title:t,caption:r,withCard:s=!1})=>{const l=()=>e.jsxs(n,{children:[e.jsx(i,{variant:"h6",gutterBottom:!0,children:t}),r&&e.jsx(i,{variant:"body2",children:r})]});return s?e.jsx(a,{children:l()}):l()};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/Card"),r=require("@mui/material/styles"),i=require("@mui/material/Typography");const a=r.styled("div")((({theme:e})=>({margin:e.spacing(8,"auto"),display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"}))),n=r.styled(t)((({theme:e})=>({padding:e.spacing(2,8)})));module.exports=({title:t,caption:r,hasCardBackground:s=!1})=>{const l=()=>e.jsxs(a,{children:[e.jsx(i,{variant:"h6",gutterBottom:!0,children:t}),r&&e.jsx(i,{variant:"body2",children:r})]});return s?e.jsx(n,{children:l()}):l()};
2
2
  //# sourceMappingURL=NoResults.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NoResults.cjs.js","sources":["../../../../src/components/ui/NoResults/NoResults.tsx"],"sourcesContent":["import Card from '@mui/material/Card';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(8, 'auto'),\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n textAlign: 'center',\n}));\n\nconst StyledCard = styled(Card)(({ theme }) => ({\n padding: theme.spacing(2, 8),\n}));\n\ntype Props = {\n title: string;\n caption?: string;\n withCard?: boolean;\n};\n\nconst NoResults = ({ title, caption, withCard = false }: Props) => {\n const renderContent = () => {\n return (\n <StyledTextContainer>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n {caption && <Typography variant=\"body2\">{caption}</Typography>}\n </StyledTextContainer>\n );\n };\n\n if (!withCard) {\n return renderContent();\n }\n\n return <StyledCard>{renderContent()}</StyledCard>;\n};\n\nexport default NoResults;\n"],"names":["StyledTextContainer","styled","theme","margin","spacing","display","flexDirection","justifyContent","alignItems","textAlign","StyledCard","Card","padding","title","caption","withCard","renderContent","_jsxs","children","_jsx","Typography","variant","gutterBottom","jsx"],"mappings":"wJAIA,MAAMA,EAAsBC,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,OAAQD,EAAME,QAAQ,EAAG,QACzBC,QAAS,OACTC,cAAe,SACfC,eAAgB,SAChBC,WAAY,SACZC,UAAW,aAGTC,EAAaT,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC5CU,QAASV,EAAME,QAAQ,EAAG,sBASZ,EAAGS,QAAOC,UAASC,YAAW,MAC5C,MAAMC,EAAgB,IAEdC,OAACjB,EAAmB,CAAAkB,SAAA,CAChBC,EAAAA,IAACC,EAAW,CAAAC,QAAQ,KAAKC,cACpB,EAAAJ,SAAAL,IAEJC,GAAWK,EAACI,IAAAH,EAAW,CAAAC,QAAQ,QAASH,SAAAJ,OAKrD,OAAKC,EAIEI,EAAAA,IAACT,EAAU,CAAAQ,SAAEF,MAHTA,GAGsC"}
1
+ {"version":3,"file":"NoResults.cjs.js","sources":["../../../../src/components/ui/NoResults/NoResults.tsx"],"sourcesContent":["import Card from '@mui/material/Card';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(8, 'auto'),\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n textAlign: 'center',\n}));\n\nconst StyledCard = styled(Card)(({ theme }) => ({\n padding: theme.spacing(2, 8),\n}));\n\ntype Props = {\n title: string;\n caption?: string;\n hasCardBackground?: boolean;\n};\n\nconst NoResults = ({ title, caption, hasCardBackground = false }: Props) => {\n const renderContent = () => {\n return (\n <StyledTextContainer>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n {caption && <Typography variant=\"body2\">{caption}</Typography>}\n </StyledTextContainer>\n );\n };\n\n if (!hasCardBackground) {\n return renderContent();\n }\n\n return <StyledCard>{renderContent()}</StyledCard>;\n};\n\nexport default NoResults;\n"],"names":["StyledTextContainer","styled","theme","margin","spacing","display","flexDirection","justifyContent","alignItems","textAlign","StyledCard","Card","padding","title","caption","hasCardBackground","renderContent","_jsxs","children","_jsx","Typography","variant","gutterBottom","jsx"],"mappings":"wJAIA,MAAMA,EAAsBC,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,OAAQD,EAAME,QAAQ,EAAG,QACzBC,QAAS,OACTC,cAAe,SACfC,eAAgB,SAChBC,WAAY,SACZC,UAAW,aAGTC,EAAaT,EAAAA,OAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC5CU,QAASV,EAAME,QAAQ,EAAG,sBASZ,EAAGS,QAAOC,UAASC,qBAAoB,MACrD,MAAMC,EAAgB,IAEdC,OAACjB,EAAmB,CAAAkB,SAAA,CAChBC,EAAAA,IAACC,EAAW,CAAAC,QAAQ,KAAKC,cACpB,EAAAJ,SAAAL,IAEJC,GAAWK,EAACI,IAAAH,EAAW,CAAAC,QAAQ,QAASH,SAAAJ,OAKrD,OAAKC,EAIEI,EAAAA,IAACT,EAAU,CAAAQ,SAAEF,MAHTA,GAGsC"}
@@ -3,8 +3,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  type Props = {
4
4
  title: string;
5
5
  caption?: string;
6
- withCard?: boolean;
6
+ hasCardBackground?: boolean;
7
7
  };
8
- declare const NoResults: ({ title, caption, withCard }: Props) => react_jsx_runtime.JSX.Element;
8
+ declare const NoResults: ({ title, caption, hasCardBackground }: Props) => react_jsx_runtime.JSX.Element;
9
9
 
10
10
  export { NoResults as default };
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import i from"@mui/material/Card";import{styled as r}from"@mui/material/styles";import a from"@mui/material/Typography";const n=r("div")((({theme:t})=>({margin:t.spacing(8,"auto"),display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"}))),m=r(i)((({theme:t})=>({padding:t.spacing(2,8)}))),o=({title:i,caption:r,withCard:o=!1})=>{const l=()=>e(n,{children:[t(a,{variant:"h6",gutterBottom:!0,children:i}),r&&t(a,{variant:"body2",children:r})]});return o?t(m,{children:l()}):l()};export{o as default};
1
+ import{jsx as t,jsxs as r}from"react/jsx-runtime";import e from"@mui/material/Card";import{styled as i}from"@mui/material/styles";import a from"@mui/material/Typography";const n=i("div")((({theme:t})=>({margin:t.spacing(8,"auto"),display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"}))),m=i(e)((({theme:t})=>({padding:t.spacing(2,8)}))),o=({title:e,caption:i,hasCardBackground:o=!1})=>{const c=()=>r(n,{children:[t(a,{variant:"h6",gutterBottom:!0,children:e}),i&&t(a,{variant:"body2",children:i})]});return o?t(m,{children:c()}):c()};export{o as default};
2
2
  //# sourceMappingURL=NoResults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NoResults.js","sources":["../../../../src/components/ui/NoResults/NoResults.tsx"],"sourcesContent":["import Card from '@mui/material/Card';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(8, 'auto'),\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n textAlign: 'center',\n}));\n\nconst StyledCard = styled(Card)(({ theme }) => ({\n padding: theme.spacing(2, 8),\n}));\n\ntype Props = {\n title: string;\n caption?: string;\n withCard?: boolean;\n};\n\nconst NoResults = ({ title, caption, withCard = false }: Props) => {\n const renderContent = () => {\n return (\n <StyledTextContainer>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n {caption && <Typography variant=\"body2\">{caption}</Typography>}\n </StyledTextContainer>\n );\n };\n\n if (!withCard) {\n return renderContent();\n }\n\n return <StyledCard>{renderContent()}</StyledCard>;\n};\n\nexport default NoResults;\n"],"names":["StyledTextContainer","styled","theme","margin","spacing","display","flexDirection","justifyContent","alignItems","textAlign","StyledCard","Card","padding","NoResults","title","caption","withCard","renderContent","_jsxs","children","_jsx","Typography","variant","gutterBottom"],"mappings":"0KAIA,MAAMA,EAAsBC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,OAAQD,EAAME,QAAQ,EAAG,QACzBC,QAAS,OACTC,cAAe,SACfC,eAAgB,SAChBC,WAAY,SACZC,UAAW,aAGTC,EAAaT,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC5CU,QAASV,EAAME,QAAQ,EAAG,OASxBS,EAAY,EAAGC,QAAOC,UAASC,YAAW,MAC5C,MAAMC,EAAgB,IAEdC,EAAClB,EAAmB,CAAAmB,SAAA,CAChBC,EAACC,EAAW,CAAAC,QAAQ,KAAKC,cACpB,EAAAJ,SAAAL,IAEJC,GAAWK,EAACC,EAAW,CAAAC,QAAQ,QAASH,SAAAJ,OAKrD,OAAKC,EAIEI,EAACV,EAAU,CAAAS,SAAEF,MAHTA,GAGsC"}
1
+ {"version":3,"file":"NoResults.js","sources":["../../../../src/components/ui/NoResults/NoResults.tsx"],"sourcesContent":["import Card from '@mui/material/Card';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(8, 'auto'),\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n textAlign: 'center',\n}));\n\nconst StyledCard = styled(Card)(({ theme }) => ({\n padding: theme.spacing(2, 8),\n}));\n\ntype Props = {\n title: string;\n caption?: string;\n hasCardBackground?: boolean;\n};\n\nconst NoResults = ({ title, caption, hasCardBackground = false }: Props) => {\n const renderContent = () => {\n return (\n <StyledTextContainer>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n {caption && <Typography variant=\"body2\">{caption}</Typography>}\n </StyledTextContainer>\n );\n };\n\n if (!hasCardBackground) {\n return renderContent();\n }\n\n return <StyledCard>{renderContent()}</StyledCard>;\n};\n\nexport default NoResults;\n"],"names":["StyledTextContainer","styled","theme","margin","spacing","display","flexDirection","justifyContent","alignItems","textAlign","StyledCard","Card","padding","NoResults","title","caption","hasCardBackground","renderContent","_jsxs","children","_jsx","Typography","variant","gutterBottom"],"mappings":"0KAIA,MAAMA,EAAsBC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,OAAQD,EAAME,QAAQ,EAAG,QACzBC,QAAS,OACTC,cAAe,SACfC,eAAgB,SAChBC,WAAY,SACZC,UAAW,aAGTC,EAAaT,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC5CU,QAASV,EAAME,QAAQ,EAAG,OASxBS,EAAY,EAAGC,QAAOC,UAASC,qBAAoB,MACrD,MAAMC,EAAgB,IAEdC,EAAClB,EAAmB,CAAAmB,SAAA,CAChBC,EAACC,EAAW,CAAAC,QAAQ,KAAKC,cACpB,EAAAJ,SAAAL,IAEJC,GAAWK,EAACC,EAAW,CAAAC,QAAQ,QAASH,SAAAJ,OAKrD,OAAKC,EAIEI,EAACV,EAAU,CAAAS,SAAEF,MAHTA,GAGsC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var i=require("@mui/icons-material/Add"),t=require("@mui/icons-material/ArrowBack"),n=require("@mui/material/Grid"),r=require("@mui/material/IconButton"),a=require("@mui/material/styles"),s=require("@mui/material/Typography"),o=require("@mui/material/useMediaQuery"),d=require("./DocumentTitle.cjs.js"),l=require("./FullWidthContainer.cjs.js"),c=require("../FDErrorBoundary/FDErrorBoundary.cjs.js"),m=require("@mui/material/Button"),p=require("../../renderUtilities/renderUtilities.cjs.js"),g=require("../../../utilities/validation.cjs.js"),h=require("../Spacer/Spacer.cjs.js"),u=require("@mui/material/Box"),x=require("@mui/material/Divider");const j=1112,v=a.styled("div")((({theme:e,fluid:i,useAlternateBackground:t})=>({maxWidth:i?"none":j,[e.breakpoints.down("md")]:{maxWidth:"none"},margin:e.spacing(2,4),position:"relative",minHeight:"100vh",":before":t?{content:'""',position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"#F7F7F7",zIndex:-1e3}:void 0}))),f=a.styled(n)((({theme:e})=>({[e.breakpoints.down("sm")]:{width:"100%",paddingTop:e.spacing(2)}}))),y=a.styled(n)((({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)}}))),b=a.styled(n)((({theme:e})=>({paddingTop:e.spacing(2)}))),k=a.styled(n)((()=>({flexGrow:1}))),B=a.styled("div")((({theme:e})=>({maxWidth:j,paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),q=a.styled(r,{shouldForwardProp:e=>"hasTitleComponent"!==e})((({theme:e,hasTitleComponent:i})=>({margin:i?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)}}))),w=a.styled("div")((({theme:e})=>({maxWidth:j,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"}}))),T=a.styled(n)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),W=a.styled(s)((()=>({lineHeight:"26px"}))),F=a.styled(s)((()=>({fontWeight:"bold"}))),A=a.styled(x)((({theme:e})=>({marginBottom:e.spacing(4)}))),C=({title:i})=>e.jsx(F,{variant:"h5",component:"h2",children:i});exports.PageTitle=C,exports.default=r=>{const{actionBtnTitle:s,caption:x,children:j,contextButtons:F,documentTitle:L,fluid:P=!1,fullWidth:I,header:z,hideHeader:D,actionButtonLink:R,openLinkInNewTab:H=!1,pageHeader:_,showActionButton:G,showAddIcon:M,title:U,titleComponent:E,toPrevious:S,toParent:N,strictToParent:O,navigate:Q,hideDivider:$=!1,customActionButtons:J,useAlternateBackground:K=!1}=r,V=a.useTheme(),X=o(V.breakpoints.down("md")),Y=p.getMicroFrontendAttribute("data-portal-base-url")||"/",Z=R?.startsWith("https://"),ee=Z?R:void 0!==R?g.joinUrlPaths(Y,R):"";return e.jsxs(v,{fluid:P,useAlternateBackground:K,children:[L&&e.jsx(d,{children:L}),_||null,e.jsxs(w,{children:[_&&e.jsx(h,{size:16,variant:"vertical"}),!D&&e.jsxs(e.Fragment,{children:[e.jsxs(y,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(n,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:e.jsx(T,{item:!0,children:F&&F.map(((i,t)=>e.jsx("div",{children:i},t)))})}),e.jsxs(b,{item:!0,container:!0,children:[(N||S)&&e.jsx(u,{children:e.jsx(q,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!E,component:"button",onClick:()=>{S?Q(-1):N&&O||N&&history.length<3?Q(N):Q(-1)},children:e.jsx(t,{})})}),e.jsxs(k,{item:!0,children:[E?e.jsx(E,{}):e.jsx(C,{title:U}),x&&e.jsx(W,{variant:"caption",component:"h3",children:x})]}),G&&e.jsxs(e.Fragment,{children:[X&&e.jsx(h,{size:56,variant:"vertical"}),e.jsx(f,{item:!0,children:e.jsxs(m,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${s}`,href:H||Z?ee:"",target:H?"_blank":void 0,rel:H?"noopener noreferrer":void 0,onClick:H||Z?()=>{}:()=>Q(R),children:[M&&e.jsx(i,{}),s]})})]}),J&&J.map(((i,t)=>e.jsxs("div",{children:[X&&e.jsx(h,{size:56,variant:"vertical"}),!X&&e.jsx(h,{size:16,variant:"vertical"}),e.jsx(f,{item:!0,children:i})]},t)))]})]}),!$&&e.jsx(A,{})]}),e.jsxs(l,{fullWidth:I,children:[z?e.jsx(B,{children:z}):null,e.jsx(c,{identifier:L,children:e.jsx(e.Fragment,{children:j})})]})]})]})},exports.maxWidth=j;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),t=require("@mui/icons-material/Add"),n=require("@mui/icons-material/ArrowBack"),r=require("@mui/material/Grid"),a=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"),m=require("../FDErrorBoundary/FDErrorBoundary.cjs.js"),p=require("@mui/material/Button"),u=require("../../renderUtilities/renderUtilities.cjs.js"),h=require("../../../utilities/validation.cjs.js"),g=require("../Spacer/Spacer.cjs.js"),x=require("@mui/material/Box"),j=require("@mui/material/Divider");const y=1112,f=s.styled("div")((({theme:e,fluid:i})=>({maxWidth:i?"none":y,[e.breakpoints.down("md")]:{maxWidth:"none"},margin:e.spacing(2,4),position:"relative",minHeight:"100vh"}))),v=s.styled(r)((({theme:e})=>({[e.breakpoints.down("sm")]:{width:"100%",paddingTop:e.spacing(2)}}))),b=s.styled(r)((({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)}}))),k=s.styled(r)((({theme:e})=>({paddingTop:e.spacing(2)}))),B=s.styled(r)((()=>({flexGrow:1}))),q=s.styled("div")((({theme:e})=>({maxWidth:y,paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),w=s.styled(a,{shouldForwardProp:e=>"hasTitleComponent"!==e})((({theme:e,hasTitleComponent:i})=>({margin:i?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)}}))),T=s.styled("div")((({theme:e})=>({maxWidth:y,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"}}))),W=s.styled(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),C=s.styled(o)((()=>({lineHeight:"26px"}))),L=s.styled(o)((()=>({fontWeight:"bold"}))),A=s.styled(j)((({theme:e})=>({marginBottom:e.spacing(4)}))),F=({title:i})=>e.jsx(L,{variant:"h5",component:"h2",children:i});exports.PageTitle=F,exports.default=a=>{const{actionBtnTitle:o,caption:j,children:y,contextButtons:L,documentTitle:P,fluid:D=!1,fullWidth:I,header:R,hideHeader:z,actionButtonLink:H,openLinkInNewTab:_=!1,pageHeader:E,showActionButton:G,showAddIcon:M,title:U,titleComponent:S,toPrevious:N,toParent:O,strictToParent:Q,navigate:$,hideDivider:J=!1,customActionButtons:K,useAlternateBackground:V=!1}=a,X=s.useTheme(),Y=d(X.breakpoints.down("md"));i.useEffect((()=>(V&&(document.body.style.backgroundColor=X.palette.alternateBackground.main),()=>{V&&(document.body.style.backgroundColor=X.palette.white.main)})),[V]);const Z=u.getMicroFrontendAttribute("data-portal-base-url")||"/",ee=H?.startsWith("https://"),ie=ee?H:void 0!==H?h.joinUrlPaths(Z,H):"";return e.jsxs(f,{fluid:D,children:[P&&e.jsx(l,{children:P}),E||null,e.jsxs(T,{children:[E&&e.jsx(g,{size:16,variant:"vertical"}),!z&&e.jsxs(e.Fragment,{children:[e.jsxs(b,{container:!0,alignItems:"center",direction:"column",children:[e.jsx(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:e.jsx(W,{item:!0,children:L&&L.map(((i,t)=>e.jsx("div",{children:i},t)))})}),e.jsxs(k,{item:!0,container:!0,children:[(O||N)&&e.jsx(x,{children:e.jsx(w,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!S,component:"button",onClick:()=>{N?$(-1):O&&Q||O&&history.length<3?$(O):$(-1)},children:e.jsx(n,{})})}),e.jsxs(B,{item:!0,children:[S?e.jsx(S,{}):e.jsx(F,{title:U}),j&&e.jsx(C,{variant:"caption",component:"h3",children:j})]}),G&&e.jsxs(e.Fragment,{children:[Y&&e.jsx(g,{size:56,variant:"vertical"}),e.jsx(v,{item:!0,children:e.jsxs(p,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${o}`,href:_||ee?ie:"",target:_?"_blank":void 0,rel:_?"noopener noreferrer":void 0,onClick:_||ee?()=>{}:()=>$(H),children:[M&&e.jsx(t,{}),o]})})]}),K&&K.map(((i,t)=>e.jsxs("div",{children:[Y&&e.jsx(g,{size:56,variant:"vertical"}),!Y&&e.jsx(g,{size:16,variant:"vertical"}),e.jsx(v,{item:!0,children:i})]},t)))]})]}),!J&&e.jsx(A,{})]}),e.jsxs(c,{fullWidth:I,children:[R?e.jsx(q,{children:R}):null,e.jsx(m,{identifier:P,children:e.jsx(e.Fragment,{children:y})})]})]})]})},exports.maxWidth=y;
2
2
  //# sourceMappingURL=PageLayout.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.cjs.js","sources":["../../../../src/components/ui/PageLayout/PageLayout.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/FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../renderUtilities';\nimport { joinUrlPaths } from '../../../utilities/validation';\nimport Spacer from '../Spacer/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; useAlternateBackground: boolean }>(({ theme, fluid, useAlternateBackground }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n margin: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n ':before': useAlternateBackground\n ? {\n content: '\"\"',\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: '#F7F7F7',\n zIndex: -1000,\n }\n : undefined,\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\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 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 } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const actionButtonLinkFinal = actionButtonWithHttps\n ? actionButtonLink\n : actionButtonLink !== undefined\n ? joinUrlPaths(baseUrl, actionButtonLink)\n : '';\n\n return (\n <StyledWrapper fluid={fluid} useAlternateBackground={useAlternateBackground}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader ? 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 && contextButtons.map((button, index) => <div key={index}>{button}</div>)}\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 ? <TitleComponent /> : <PageTitle title={title} />}\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={!openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}}\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons &&\n customActionButtons.map((button, index) => (\n <div key={index}>\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 );\n};\n\nexport default PageLayout;\n"],"names":["maxWidth","StyledWrapper","styled","theme","fluid","useAlternateBackground","breakpoints","down","margin","spacing","position","minHeight","content","top","left","right","bottom","backgroundColor","zIndex","undefined","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","jsx","map","button","index","jsxs","Box","onClick","history","length","ArrowBackIcon","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"4vB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B,KAC1DV,EAAAA,IAAC2D,EAAe,CAACC,WAAYpD,EACzBL,SAAAH,MAAAsC,EAAAA,SAAA,CAAAnC,SAAGA,cAKrB"}
1
+ {"version":3,"file":"PageLayout.cjs.js","sources":["../../../../src/components/ui/PageLayout/PageLayout.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode, useEffect } 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/FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../renderUtilities';\nimport { joinUrlPaths } from '../../../utilities/validation';\nimport Spacer from '../Spacer/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 margin: 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\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 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 } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n useEffect(() => {\n if (useAlternateBackground) {\n document.body.style.backgroundColor = theme.palette.alternateBackground.main;\n }\n\n return () => {\n if (useAlternateBackground) {\n document.body.style.backgroundColor = theme.palette.white.main;\n }\n };\n }, [useAlternateBackground]);\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const actionButtonLinkFinal = actionButtonWithHttps\n ? actionButtonLink\n : actionButtonLink !== undefined\n ? joinUrlPaths(baseUrl, actionButtonLink)\n : '';\n\n return (\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader ? 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 && contextButtons.map((button, index) => <div key={index}>{button}</div>)}\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 ? <TitleComponent /> : <PageTitle title={title} />}\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={!openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}}\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons &&\n customActionButtons.map((button, index) => (\n <div key={index}>\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 );\n};\n\nexport default PageLayout;\n"],"names":["maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","margin","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","useAlternateBackground","useTheme","isMobile","useMediaQuery","useEffect","document","body","style","backgroundColor","palette","alternateBackground","main","white","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","jsx","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","index","Box","onClick","history","length","ArrowBackIcon","jsxs","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"0vBAwBO,MAAMA,EAAW,KAGl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O,IAA6B,KAC1DV,EAAAA,IAACsE,EAAe,CAACC,WAAY/D,EACzBL,SAAAH,MAAAkD,EAAAA,SAAA,CAAA/C,SAAGA,cAKrB"}
@@ -1,2 +1,2 @@
1
- import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import"react";import e from"@mui/icons-material/Add";import r from"@mui/icons-material/ArrowBack";import o from"@mui/material/Grid";import a from"@mui/material/IconButton";import{styled as m,useTheme as d}from"@mui/material/styles";import l from"@mui/material/Typography";import p from"@mui/material/useMediaQuery";import c from"./DocumentTitle.js";import s from"./FullWidthContainer.js";import h from"../FDErrorBoundary/FDErrorBoundary.js";import g from"@mui/material/Button";import{getMicroFrontendAttribute as u}from"../../renderUtilities/renderUtilities.js";import{joinUrlPaths as f}from"../../../utilities/validation.js";import v from"../Spacer/Spacer.js";import b from"@mui/material/Box";import k from"@mui/material/Divider";const x=1112,B=m("div")((({theme:i,fluid:t,useAlternateBackground:n})=>({maxWidth:t?"none":x,[i.breakpoints.down("md")]:{maxWidth:"none"},margin:i.spacing(2,4),position:"relative",minHeight:"100vh",":before":n?{content:'""',position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"#F7F7F7",zIndex:-1e3}:void 0}))),w=m(o)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),y=m(o)((({theme:i})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:i.spacing(3),paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingTop:i.spacing(2),paddingBottom:i.spacing(3)}}))),T=m(o)((({theme:i})=>({paddingTop:i.spacing(2)}))),W=m(o)((()=>({flexGrow:1}))),C=m("div")((({theme:i})=>({maxWidth:x,paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingBottom:i.spacing(2),paddingLeft:i.spacing(2),paddingRight:i.spacing(2)}}))),A=m(a,{shouldForwardProp:i=>"hasTitleComponent"!==i})((({theme:i,hasTitleComponent:t})=>({margin:t?i.spacing(-.75,2,-1.5,-1.5):i.spacing(-1.5,2,-1.5,-1.5),[i.breakpoints.only("sm")]:{marginLeft:i.spacing(-2)},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(-2)}}))),L=m("div")((({theme:i})=>({maxWidth:x,marginLeft:i.spacing(6),marginRight:i.spacing(4),paddingBottom:i.spacing(2),[i.breakpoints.only("md")]:{marginLeft:12,marginRight:i.spacing(3)},[i.breakpoints.only("sm")]:{marginLeft:i.spacing(3),marginRight:i.spacing(3),maxWidth:"none"},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(2),marginRight:i.spacing(2),maxWidth:"none"}}))),j=m(o)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),F=m(l)((()=>({lineHeight:"26px"}))),I=m(l)((()=>({fontWeight:"bold"}))),z=m(k)((({theme:i})=>({marginBottom:i.spacing(4)}))),D=({title:i})=>t(I,{variant:"h5",component:"h2",children:i}),R=a=>{const{actionBtnTitle:m,caption:l,children:k,contextButtons:x,documentTitle:I,fluid:R=!1,fullWidth:H,header:P,hideHeader:G,actionButtonLink:E,openLinkInNewTab:S=!1,pageHeader:U,showActionButton:_,showAddIcon:M,title:N,titleComponent:Q,toPrevious:$,toParent:q,strictToParent:J,navigate:K,hideDivider:O=!1,customActionButtons:V,useAlternateBackground:X=!1}=a,Y=d(),Z=p(Y.breakpoints.down("md")),ii=u("data-portal-base-url")||"/",ti=E?.startsWith("https://"),ni=ti?E:void 0!==E?f(ii,E):"";return i(B,{fluid:R,useAlternateBackground:X,children:[I&&t(c,{children:I}),U||null,i(L,{children:[U&&t(v,{size:16,variant:"vertical"}),!G&&i(n,{children:[i(y,{container:!0,alignItems:"center",direction:"column",children:[t(o,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:t(j,{item:!0,children:x&&x.map(((i,n)=>t("div",{children:i},n)))})}),i(T,{item:!0,container:!0,children:[(q||$)&&t(b,{children:t(A,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!Q,component:"button",onClick:()=>{$?K(-1):q&&J||q&&history.length<3?K(q):K(-1)},children:t(r,{})})}),i(W,{item:!0,children:[Q?t(Q,{}):t(D,{title:N}),l&&t(F,{variant:"caption",component:"h3",children:l})]}),_&&i(n,{children:[Z&&t(v,{size:56,variant:"vertical"}),t(w,{item:!0,children:i(g,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${m}`,href:S||ti?ni:"",target:S?"_blank":void 0,rel:S?"noopener noreferrer":void 0,onClick:S||ti?()=>{}:()=>K(E),children:[M&&t(e,{}),m]})})]}),V&&V.map(((n,e)=>i("div",{children:[Z&&t(v,{size:56,variant:"vertical"}),!Z&&t(v,{size:16,variant:"vertical"}),t(w,{item:!0,children:n})]},e)))]})]}),!O&&t(z,{})]}),i(s,{fullWidth:H,children:[P?t(C,{children:P}):null,t(h,{identifier:I,children:t(n,{children:k})})]})]})]})};export{D as PageTitle,R as default,x as maxWidth};
1
+ import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import{useEffect as e}from"react";import r from"@mui/icons-material/Add";import o from"@mui/icons-material/ArrowBack";import a from"@mui/material/Grid";import m from"@mui/material/IconButton";import{styled as d,useTheme as l}from"@mui/material/styles";import c from"@mui/material/Typography";import p from"@mui/material/useMediaQuery";import s from"./DocumentTitle.js";import h from"./FullWidthContainer.js";import g from"../FDErrorBoundary/FDErrorBoundary.js";import u from"@mui/material/Button";import{getMicroFrontendAttribute as f}from"../../renderUtilities/renderUtilities.js";import{joinUrlPaths as v}from"../../../utilities/validation.js";import b from"../Spacer/Spacer.js";import k from"@mui/material/Box";import B from"@mui/material/Divider";const x=1112,y=d("div")((({theme:i,fluid:t})=>({maxWidth:t?"none":x,[i.breakpoints.down("md")]:{maxWidth:"none"},margin:i.spacing(2,4),position:"relative",minHeight:"100vh"}))),w=d(a)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),T=d(a)((({theme:i})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:i.spacing(3),paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingTop:i.spacing(2),paddingBottom:i.spacing(3)}}))),W=d(a)((({theme:i})=>({paddingTop:i.spacing(2)}))),C=d(a)((()=>({flexGrow:1}))),L=d("div")((({theme:i})=>({maxWidth:x,paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingBottom:i.spacing(2),paddingLeft:i.spacing(2),paddingRight:i.spacing(2)}}))),j=d(m,{shouldForwardProp:i=>"hasTitleComponent"!==i})((({theme:i,hasTitleComponent:t})=>({margin:t?i.spacing(-.75,2,-1.5,-1.5):i.spacing(-1.5,2,-1.5,-1.5),[i.breakpoints.only("sm")]:{marginLeft:i.spacing(-2)},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(-2)}}))),A=d("div")((({theme:i})=>({maxWidth:x,marginLeft:i.spacing(6),marginRight:i.spacing(4),paddingBottom:i.spacing(2),[i.breakpoints.only("md")]:{marginLeft:12,marginRight:i.spacing(3)},[i.breakpoints.only("sm")]:{marginLeft:i.spacing(3),marginRight:i.spacing(3),maxWidth:"none"},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(2),marginRight:i.spacing(2),maxWidth:"none"}}))),D=d(a)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),I=d(c)((()=>({lineHeight:"26px"}))),R=d(c)((()=>({fontWeight:"bold"}))),z=d(B)((({theme:i})=>({marginBottom:i.spacing(4)}))),F=({title:i})=>t(R,{variant:"h5",component:"h2",children:i}),H=m=>{const{actionBtnTitle:d,caption:c,children:B,contextButtons:x,documentTitle:R,fluid:H=!1,fullWidth:P,header:G,hideHeader:E,actionButtonLink:S,openLinkInNewTab:U=!1,pageHeader:_,showActionButton:M,showAddIcon:N,title:Q,titleComponent:$,toPrevious:q,toParent:J,strictToParent:K,navigate:O,hideDivider:V=!1,customActionButtons:X,useAlternateBackground:Y=!1}=m,Z=l(),ii=p(Z.breakpoints.down("md"));e((()=>(Y&&(document.body.style.backgroundColor=Z.palette.alternateBackground.main),()=>{Y&&(document.body.style.backgroundColor=Z.palette.white.main)})),[Y]);const ti=f("data-portal-base-url")||"/",ni=S?.startsWith("https://"),ei=ni?S:void 0!==S?v(ti,S):"";return i(y,{fluid:H,children:[R&&t(s,{children:R}),_||null,i(A,{children:[_&&t(b,{size:16,variant:"vertical"}),!E&&i(n,{children:[i(T,{container:!0,alignItems:"center",direction:"column",children:[t(a,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:t(D,{item:!0,children:x&&x.map(((i,n)=>t("div",{children:i},n)))})}),i(W,{item:!0,container:!0,children:[(J||q)&&t(k,{children:t(j,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!$,component:"button",onClick:()=>{q?O(-1):J&&K||J&&history.length<3?O(J):O(-1)},children:t(o,{})})}),i(C,{item:!0,children:[$?t($,{}):t(F,{title:Q}),c&&t(I,{variant:"caption",component:"h3",children:c})]}),M&&i(n,{children:[ii&&t(b,{size:56,variant:"vertical"}),t(w,{item:!0,children:i(u,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${d}`,href:U||ni?ei:"",target:U?"_blank":void 0,rel:U?"noopener noreferrer":void 0,onClick:U||ni?()=>{}:()=>O(S),children:[N&&t(r,{}),d]})})]}),X&&X.map(((n,e)=>i("div",{children:[ii&&t(b,{size:56,variant:"vertical"}),!ii&&t(b,{size:16,variant:"vertical"}),t(w,{item:!0,children:n})]},e)))]})]}),!V&&t(z,{})]}),i(h,{fullWidth:P,children:[G?t(L,{children:G}):null,t(g,{identifier:R,children:t(n,{children:B})})]})]})]})};export{F as PageTitle,H as default,x as maxWidth};
2
2
  //# sourceMappingURL=PageLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","sources":["../../../../src/components/ui/PageLayout/PageLayout.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/FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../renderUtilities';\nimport { joinUrlPaths } from '../../../utilities/validation';\nimport Spacer from '../Spacer/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; useAlternateBackground: boolean }>(({ theme, fluid, useAlternateBackground }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n margin: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n ':before': useAlternateBackground\n ? {\n content: '\"\"',\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: '#F7F7F7',\n zIndex: -1000,\n }\n : undefined,\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\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 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 } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const actionButtonLinkFinal = actionButtonWithHttps\n ? actionButtonLink\n : actionButtonLink !== undefined\n ? joinUrlPaths(baseUrl, actionButtonLink)\n : '';\n\n return (\n <StyledWrapper fluid={fluid} useAlternateBackground={useAlternateBackground}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader ? 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 && contextButtons.map((button, index) => <div key={index}>{button}</div>)}\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 ? <TitleComponent /> : <PageTitle title={title} />}\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={!openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}}\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons &&\n customActionButtons.map((button, index) => (\n <div key={index}>\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 );\n};\n\nexport default PageLayout;\n"],"names":["maxWidth","StyledWrapper","styled","theme","fluid","useAlternateBackground","breakpoints","down","margin","spacing","position","minHeight","content","top","left","right","bottom","backgroundColor","zIndex","undefined","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","PageLayout","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","index","Box","onClick","history","length","ArrowBackIcon","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"2xBAwBO,MAAMA,EAAW,KAGlBC,EAAgBC,EAAO,MAAPA,EAAmE,EAAGC,QAAOC,QAAOC,6BAA8B,CACpIL,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAMG,YAAYC,KAAK,OAAQ,CAC5BP,SAAU,QAEdQ,OAAQL,EAAMM,QAAQ,EAAG,GACzBC,SAAU,WACVC,UAAW,QACX,UAAWN,EACL,CACIO,QAAS,KACTF,SAAU,QACVG,IAAK,EACLC,KAAM,EACNC,MAAO,EACPC,OAAQ,EACRC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E,iBACpBP,EAACiB,GACGnD,QAAQ,YACRS,WAAW,gBACE,iBAAiBJ,IAC9B+C,KAAMvC,GAAoBiB,GAAwBE,GAAwB,GAC1EqB,OAAQxC,EAAmB,cAAWnD,EACtC4F,IAAKzC,EAAmB,2BAAwBnD,EAChDqF,QAAUlC,GAAqBiB,GAA2D,OAAnC,IAAMR,EAASV,GAA4BV,SAAA,CAEjGc,GAAejB,EAACwD,EAAG,CAAA,GACnBlD,UAKhBmB,GACGA,EAAoBmB,KAAI,CAACC,EAAQC,IAC7BX,mBACKR,GAAY3B,EAACqC,EAAM,CAACC,KAAM,GAAIrC,QAAQ,cACrC0B,GAAY3B,EAACqC,EAAO,CAAAC,KAAM,GAAIrC,QAAQ,aACxCD,EAACpC,GAAuB8E,MAAI,EAAAvC,SAAE0C,MAHxBC,YAQxBtB,GAAexB,EAACL,EAAoB,OAG9CwC,EAACsB,EAAmB,CAAA/C,UAAWA,EAASP,SAAA,CACnCQ,EAASX,EAACzB,EAAgB,CAAA4B,SAAEQ,IAA6B,KAC1DX,EAAC0D,EAAe,CAACC,WAAYlD,EACzBN,SAAAH,EAAAuC,EAAA,CAAApC,SAAGA,cAKrB"}
1
+ {"version":3,"file":"PageLayout.js","sources":["../../../../src/components/ui/PageLayout/PageLayout.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode, useEffect } 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/FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../renderUtilities';\nimport { joinUrlPaths } from '../../../utilities/validation';\nimport Spacer from '../Spacer/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 margin: 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\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 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 } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n useEffect(() => {\n if (useAlternateBackground) {\n document.body.style.backgroundColor = theme.palette.alternateBackground.main;\n }\n\n return () => {\n if (useAlternateBackground) {\n document.body.style.backgroundColor = theme.palette.white.main;\n }\n };\n }, [useAlternateBackground]);\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const actionButtonLinkFinal = actionButtonWithHttps\n ? actionButtonLink\n : actionButtonLink !== undefined\n ? joinUrlPaths(baseUrl, actionButtonLink)\n : '';\n\n return (\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader ? 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 && contextButtons.map((button, index) => <div key={index}>{button}</div>)}\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 ? <TitleComponent /> : <PageTitle title={title} />}\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={!openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}}\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons &&\n customActionButtons.map((button, index) => (\n <div key={index}>\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 );\n};\n\nexport default PageLayout;\n"],"names":["maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","margin","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","PageLayout","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","useAlternateBackground","useTheme","isMobile","useMediaQuery","useEffect","document","body","style","backgroundColor","palette","alternateBackground","main","white","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","index","Box","onClick","history","length","ArrowBackIcon","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"+yBAwBO,MAAMA,EAAW,KAGlBC,EAAgBC,EAAO,MAAPA,EAAkC,EAAGC,QAAOC,YAAa,CAC3EJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,OAAQ,CAC5BN,SAAU,QAEdO,OAAQJ,EAAMK,QAAQ,EAAG,GACzBC,SAAU,WACVC,UAAW,YAGTC,EAAyBT,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CACxD,CAACA,EAAME,YAAYC,KAAK,OAAQ,CAC5BO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAI5BO,EAAeb,EAAOU,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,EAAOU,EAAPV,EAAa,EAAGC,YAAa,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EAAoB8B,KAAI,CAACC,EAAQC,IAC7BX,mBACKlB,IAAY5B,EAACgD,EAAM,CAACC,KAAM,GAAIhD,QAAQ,cACrC2B,IAAY5B,EAACgD,EAAO,CAAAC,KAAM,GAAIhD,QAAQ,aACxCD,EAACpC,GAAuByF,MAAI,EAAAlD,SAAEqD,MAHxBC,YAQxBjC,GAAexB,EAACL,EAAoB,OAG9CmD,EAACsB,EAAmB,CAAA1D,UAAWA,EAASP,SAAA,CACnCQ,EAASX,EAACzB,EAAgB,CAAA4B,SAAEQ,IAA6B,KAC1DX,EAACqE,EAAe,CAACC,WAAY7D,EACzBN,SAAAH,EAAAkD,EAAA,CAAA/C,SAAGA,cAKrB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/styles"),t=require("@mui/material");const i=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]}`}))),o=r.styled("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),l=198;module.exports=({children:s,loadedFromPortal:n})=>{const a=r.useTheme();if(n)return e.jsx(e.Fragment,{children:s});const x=e.jsx(o,{children:e.jsx(t.Typography,{sx:{fontWeight:"bold"},children:"Sidebar"})});return e.jsxs(t.Box,{sx:{display:"flex"},children:[e.jsx(t.CssBaseline,{}),e.jsx(t.AppBar,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e.jsx(i,{children:e.jsx(t.Typography,{sx:{fontWeight:"bold"},children:"Header"})})}),e.jsx(t.Box,{component:"nav",sx:{width:{sm:l},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e.jsx(t.Drawer,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:l,borderColor:a.palette.grey[400],borderWidth:"2px"}},open:!0,children:x})}),e.jsx(t.Box,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:s})]})};
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
2
  //# sourceMappingURL=PortalMock.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PortalMock.cjs.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 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":"6GAGA,MAAMA,EAAeC,EAAAA,OAAO,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,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,YAOxBG,EAAc,mBAED,EAAGC,WAAUC,uBAC5B,MAAMf,EAAQgB,EAAAA,WAEd,GAAID,EACA,OAAOE,EAAAC,IAAAC,EAAAC,SAAA,CAAAN,SAAGA,IAGd,MAAMO,EACFJ,EAAAA,IAACL,EAAa,CAAAE,SACVG,MAACK,aAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BV,SAAA,cAIpE,OACIW,EAAAA,KAACC,EAAAA,IAAI,CAAAH,GAAI,CAAEtB,QAAS,QAAQa,SAAA,CACxBG,MAACU,EAAWA,YAAA,CAAA,GACZV,EAAAC,IAACU,EAAMA,OAAA,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfnB,SAAAG,EAAAC,IAACpB,EAAY,CAAAgB,SACTG,MAACK,EAAAA,YAAWC,GAAI,CAAEC,WAAY,QAA6BV,SAAA,eAGnEG,MAACS,EAAAA,IAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIlB,GAAesB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBjB,SACxGG,EAAAA,IAACmB,EAAAA,OACG,CAAAC,QAAQ,YACRd,GAAI,CACAtB,QAAS,CAAEqC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOjB,EACP2B,YAAaxC,EAAMK,QAAQC,KAAK,KAChCmC,YAAa,QAGrBC,MAEC,EAAA5B,SAAAO,MAGTJ,MAACS,EAAAA,IAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU9B,SACvGA,MAGX"}
1
+ {"version":3,"file":"PortalMock.cjs.js","sources":["../../../../src/components/ui/PortalMock/PortalMock.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,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,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,YAOxBG,EAAc,mBAED,EAAGC,WAAUC,uBAC5B,MAAMf,EAAQgB,EAAAA,WAEd,GAAID,EACA,OAAOE,EAAAC,IAAAC,EAAAC,SAAA,CAAAN,SAAGA,IAGd,MAAMO,EACFJ,EAAAA,IAACL,EAAa,CAAAE,SACVG,MAACK,EAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BV,SAAA,cAIpE,OACIW,EAAAA,KAACC,EAAI,CAAAH,GAAI,CAAEtB,QAAS,QAAQa,SAAA,CACxBG,MAACU,EAAW,CAAA,GACZV,EAAAC,IAACU,EAAM,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfnB,SAAAG,EAAAC,IAACpB,EAAY,CAAAgB,SACTG,MAACK,GAAWC,GAAI,CAAEC,WAAY,QAA6BV,SAAA,eAGnEG,MAACS,EAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIlB,GAAesB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBjB,SACxGG,EAAAA,IAACmB,EACG,CAAAC,QAAQ,YACRd,GAAI,CACAtB,QAAS,CAAEqC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOjB,EACP2B,YAAaxC,EAAMK,QAAQC,KAAK,KAChCmC,YAAa,QAGrBC,MAEC,EAAA5B,SAAAO,MAGTJ,MAACS,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU9B,SACvGA,MAGX"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{styled as o,useTheme as i}from"@mui/material/styles";import{Typography as l,Box as n,CssBaseline as a,AppBar as d,Drawer as m}from"@mui/material";const s=o("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=o("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:o,loadedFromPortal:x})=>{const h=i();if(x)return e(r,{children:o});const f=e(p,{children:e(l,{sx:{fontWeight:"bold"},children:"Sidebar"})});return t(n,{sx:{display:"flex"},children:[e(a,{}),e(d,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e(s,{children:e(l,{sx:{fontWeight:"bold"},children:"Header"})})}),e(n,{component:"nav",sx:{width:{sm:c},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e(m,{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:f})}),e(n,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:o})]})};export{x as default};
1
+ import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{styled as i,useTheme as o}from"@mui/material/styles";import l from"@mui/material/AppBar";import a from"@mui/material/Box";import n from"@mui/material/CssBaseline";import m from"@mui/material/Drawer";import d from"@mui/material/Typography";const p=i("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]}`}))),s=i("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:i,loadedFromPortal:x})=>{const h=o();if(x)return e(r,{children:i});const f=e(s,{children:e(d,{sx:{fontWeight:"bold"},children:"Sidebar"})});return t(a,{sx:{display:"flex"},children:[e(n,{}),e(l,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e(p,{children:e(d,{sx:{fontWeight:"bold"},children:"Header"})})}),e(a,{component:"nav",sx:{width:{sm:c},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e(m,{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:f})}),e(a,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:i})]})};export{x as default};
2
2
  //# sourceMappingURL=PortalMock.js.map
@@ -1 +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 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","PortalMock","children","loadedFromPortal","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":"yNAGA,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,YAOxBG,EAAc,IAEdC,EAAa,EAAGC,WAAUC,uBAC5B,MAAMhB,EAAQiB,IAEd,GAAID,EACA,OAAOE,EAAAC,EAAA,CAAAJ,SAAGA,IAGd,MAAMK,EACFF,EAACN,EAAa,CAAAG,SACVG,EAACG,EAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BR,SAAA,cAIpE,OACIS,EAACC,EAAI,CAAAH,GAAI,CAAErB,QAAS,QAAQc,SAAA,CACxBG,EAACQ,EAAW,CAAA,GACZR,EAACS,EAAM,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfjB,SAAAG,EAACpB,EAAY,CAAAiB,SACTG,EAACG,GAAWC,GAAI,CAAEC,WAAY,QAA6BR,SAAA,eAGnEG,EAACO,EAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIjB,GAAeqB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBf,SACxGG,EAACiB,EACG,CAAAC,QAAQ,YACRd,GAAI,CACArB,QAAS,CAAEoC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOhB,EACP0B,YAAavC,EAAMK,QAAQC,KAAK,KAChCkC,YAAa,QAGrBC,MAEC,EAAA1B,SAAAK,MAGTF,EAACO,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU5B,SACvGA,MAGX"}
1
+ {"version":3,"file":"PortalMock.js","sources":["../../../../src/components/ui/PortalMock/PortalMock.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","PortalMock","children","loadedFromPortal","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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,EAAA1B,SAAAK,MAGTF,EAACO,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU5B,SACvGA,MAGX"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),a=require("@mui/material"),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.FormControlLabel,{label:l,labelPlacement:m,control:e.jsx(r,{checked:t,onChange:i,color:"primary",size:s,disabled:c,"data-fd":d})});
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
2
  //# sourceMappingURL=Switch.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.cjs.js","sources":["../../../../src/components/ui/Switch/Switch.tsx"],"sourcesContent":["import { FormControlLabel, type FormControlLabelProps } from '@mui/material';\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":"4HAae,EAAGA,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,MAACC,EAAAA,kBACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAAAA,IAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
1
+ {"version":3,"file":"Switch.cjs.js","sources":["../../../../src/components/ui/Switch/Switch.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"}
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FormControlLabelProps } from '@mui/material';
2
+ import { FormControlLabelProps } from '@mui/material/FormControlLabel';
3
3
  import { SwitchProps as SwitchProps$1 } from '@mui/material/Switch';
4
4
 
5
5
  type SwitchProps = {
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{FormControlLabel as a}from"@mui/material";import t from"@mui/material/Switch";const l=({label:l,checked:m,onChange:r,labelPlacement:i="start",size:o="medium",disabled:c=!1,testId:d})=>e(a,{label:l,labelPlacement:i,control:e(t,{checked:m,onChange:r,color:"primary",size:o,disabled:c,"data-fd":d})});export{l as default};
1
+ import{jsx as e}from"react/jsx-runtime";import a from"@mui/material/FormControlLabel";import t from"@mui/material/Switch";const l=({label:l,checked:r,onChange:m,labelPlacement:o="start",size:i="medium",disabled:c=!1,testId:d})=>e(a,{label:l,labelPlacement:o,control:e(t,{checked:r,onChange:m,color:"primary",size:i,disabled:c,"data-fd":d})});export{l as default};
2
2
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sources":["../../../../src/components/ui/Switch/Switch.tsx"],"sourcesContent":["import { FormControlLabel, type FormControlLabelProps } from '@mui/material';\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":["Switch","label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"6HAaM,MAAAA,EAAS,EAAGC,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,EAACC,GACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
1
+ {"version":3,"file":"Switch.js","sources":["../../../../src/components/ui/Switch/Switch.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":["Switch","label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"0HAaM,MAAAA,EAAS,EAAGC,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,EAACC,GACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "files": [
5
5
  "dist"
6
6
  ],