@flipdish/portal-library 1.0.30 → 1.0.32

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 (27) 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.js +1 -1
  4. package/dist/components/themes/flipdishPublicTheme.js.map +1 -1
  5. package/dist/components/ui/Form/GenericTextField.cjs.js +1 -1
  6. package/dist/components/ui/Form/GenericTextField.cjs.js.map +1 -1
  7. package/dist/components/ui/Form/GenericTextField.js +1 -1
  8. package/dist/components/ui/Form/GenericTextField.js.map +1 -1
  9. package/dist/components/ui/GenericTable/GenericTable.cjs.js +3 -3
  10. package/dist/components/ui/GenericTable/GenericTable.cjs.js.map +1 -1
  11. package/dist/components/ui/GenericTable/GenericTable.js +3 -3
  12. package/dist/components/ui/GenericTable/GenericTable.js.map +1 -1
  13. package/dist/components/ui/GenericTableBody/GenericTableBody.cjs.js +1 -1
  14. package/dist/components/ui/GenericTableBody/GenericTableBody.cjs.js.map +1 -1
  15. package/dist/components/ui/GenericTableBody/GenericTableBody.js +1 -1
  16. package/dist/components/ui/GenericTableBody/GenericTableBody.js.map +1 -1
  17. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js +1 -1
  18. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js.map +1 -1
  19. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.d.ts +1 -0
  20. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.js +1 -1
  21. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.js.map +1 -1
  22. package/dist/components/ui/PageLayout/PageLayout.cjs.js +1 -1
  23. package/dist/components/ui/PageLayout/PageLayout.cjs.js.map +1 -1
  24. package/dist/components/ui/PageLayout/PageLayout.d.ts +3 -1
  25. package/dist/components/ui/PageLayout/PageLayout.js +1 -1
  26. package/dist/components/ui/PageLayout/PageLayout.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@mui/material/styles/createTheme");const o=e({typography:{body1:{fontFamily:"'Roboto', sans-serif"},body2:{fontFamily:"'Roboto', sans-serif"},h1:{fontFamily:"clarendon-text-pro,Domine,serif"},h2:{fontFamily:"clarendon-text-pro,Domine,serif"},h3:{fontFamily:"clarendon-text-pro,Domine,serif"},h4:{fontFamily:"clarendon-text-pro,Domine,serif"},h5:{fontFamily:"clarendon-text-pro,Domine,serif"},h6:{fontFamily:"clarendon-text-pro,Domine,serif"}},palette:{success:{main:"#20C26E",dark:"#137442",light:"#D2F3E2"},error:{main:"#CA0030",dark:"#79001D",light:"#FADBE2"},warning:{main:"#FFBC2C",dark:"#FF7A00",light:"#FFF2D5"}}}),r=e(o,{palette:{black:o.palette.augmentColor({color:{main:"#000000"},name:"black"}),white:o.palette.augmentColor({color:{main:"#ffffff"},name:"white"}),flippyBlue:o.palette.augmentColor({color:{main:"#0b75d7",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 t=e(r,{palette:{primary:{main:r.palette.flippyBlue.main},secondary:{main:r.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:r.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${r.palette.divider}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:r.palette.flippyBlue.light,cursor:"pointer"}}}}}});module.exports=t;
1
+ "use strict";var e=require("@mui/material/styles/createTheme");const o=e({typography:{body1:{fontFamily:"'Roboto', sans-serif"},body2:{fontFamily:"'Roboto', sans-serif"},h1:{fontFamily:"clarendon-text-pro,Domine,serif"},h2:{fontFamily:"clarendon-text-pro,Domine,serif"},h3:{fontFamily:"clarendon-text-pro,Domine,serif"},h4:{fontFamily:"clarendon-text-pro,Domine,serif"},h5:{fontFamily:"clarendon-text-pro,Domine,serif"},h6:{fontFamily:"clarendon-text-pro,Domine,serif"}},palette:{success:{main:"#20C26E",dark:"#137442",light:"#D2F3E2"},error:{main:"#CA0030",dark:"#79001D",light:"#FADBE2"},warning:{main:"#FFBC2C",dark:"#FF7A00",light:"#FFF2D5"}}}),t=e(o,{palette:{black:o.palette.augmentColor({color:{main:"#000000"},name:"black"}),white:o.palette.augmentColor({color:{main:"#ffffff"},name:"white"}),flippyBlue:o.palette.augmentColor({color:{main:"#0b75d7",light:"#e3f2fe"},name:"flippyBlue"}),freezerBurn:o.palette.augmentColor({color:{main:"#a5e2f6"},name:"freezerBurn"}),spricyCarrot:o.palette.augmentColor({color:{main:"#f7742b"},name:"spricyCarrot"}),pebble:o.palette.augmentColor({color:{main:"#eeebe3"},name:"pebble"}),donutPanic:o.palette.augmentColor({color:{main:"#ffbae4"},name:"donutPanic"}),eletricLime:o.palette.augmentColor({color:{main:"#cff27d"},name:"eletricLime"}),pending:o.palette.augmentColor({color:{main:"#DEACFA",dark:"#A56AC6",light:"#FCF7FE"},name:"pending"})}});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 { Breakpoint } from '@mui/material/styles';\nimport createTheme, { 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 },\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","MuiListItemButton","backgroundColor","borderBottom","MuiTableRow","cursor"],"mappings":"+DAIA,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,CAELQ,MAAOpB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVC,MAAOxB,EAAUY,QAAQS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WT,MAC1CuC,OAAQ"}
1
+ {"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { Breakpoint } from '@mui/material/styles';\nimport createTheme, { 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":"+DAIA,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,CAELQ,MAAOpB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVC,MAAOxB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVE,WAAYzB,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,UACNE,MAAO,WAEXO,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,eAKlB,IAAeS,EAAA/B,EAAYkB,EAAuB,CAC9CP,QAAS,CACLqB,QAAS,CACLnB,KAAMK,EAAMP,QAAQa,WAAWX,MAEnCoB,UAAW,CACPpB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCqB,MAAO,CACHC,aAAc,OAElBC,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,YACTC,cAAe,UAI3BC,QAAS,CACLJ,eAAgB,CACZC,KAAM,CACFI,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,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,2 +1,2 @@
1
- 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"}}},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 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};
2
2
  //# sourceMappingURL=flipdishPublicTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { Breakpoint } from '@mui/material/styles';\nimport createTheme, { 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 },\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","MuiListItemButton","backgroundColor","borderBottom","MuiTableRow","cursor"],"mappings":"gDAIA,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,CAELQ,MAAOpB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVC,MAAOxB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVE,WAAYzB,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,UACNE,MAAO,WAEXO,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,eAKlB,IAAeS,EAAA/B,EAAYkB,EAAuB,CAC9CP,QAAS,CACLqB,QAAS,CACLnB,KAAMK,EAAMP,QAAQa,WAAWX,MAEnCoB,UAAW,CACPpB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCqB,MAAO,CACHC,aAAc,OAElBC,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,YACTC,cAAe,UAI3BC,QAAS,CACLJ,eAAgB,CACZC,KAAM,CACFI,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAa5B,EAAMP,QAAQoC,WAIvCC,QAAS,CACLV,eAAgB,CACZC,KAAM,CACFU,WAAY,UAIxBC,kBAAmB,CACfZ,eAAgB,CACZC,KAAM,CACF,UAAW,CACPY,gBAAiB,WAErB,qBAAsB,CAClBC,aAAc,aAAalC,EAAMP,QAAQoC,cAKzDM,YAAa,CACTf,eAAgB,CACZC,KAAM,CACF,4BAA6B,CACzBY,gBAAiBjC,EAAMP,QAAQa,WAAWT,MAC1CuC,OAAQ"}
1
+ {"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { Breakpoint } from '@mui/material/styles';\nimport createTheme, { 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":"gDAIA,MAAMA,EAAYC,EAAY,CAC1BC,WAAY,CACRC,MAAO,CACHC,WAAY,wBAEhBC,MAAO,CACHD,WAAY,wBAEhBE,GAAI,CACAF,WAAY,mCAEhBG,GAAI,CACAH,WAAY,m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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,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("formik"),t=require("@mui/material/TextField"),i=require("../../custom-hooks/useRenderValidText.cjs.js"),a=require("./FormItemLayout.cjs.js"),l=require("@mui/material/Typography");module.exports=({label:d,fieldName:o,placeholder:n,validation:s,multiline:u,layout:m="horizontal",variant:h="standard",disabled:c=!1})=>{const p=()=>e.jsx(r.Field,{name:o,validate:s,children:({field:r,form:a})=>{const{errors:l,touched:s,isSubmitting:m}=a,p=l[r.name],v=!!p&&s[r.name],x=i({fieldError:p,showError:v,touched:!!s[r.name],value:r.value});return e.jsx(t,{label:"standard"===h?void 0:d,variant:h,value:r.value,"data-testid":`text-field-${o}`,autoComplete:"off",fullWidth:!0,multiline:!0,minRows:u?3:1,style:{paddingRight:16},placeholder:n||void 0,disabled:m||c,error:v,helperText:x,FormHelperTextProps:{children:" ",style:{textAlign:"right"}},inputProps:{style:{paddingTop:0,height:"1.1876em"}},onChange:e=>{a.setFieldValue(r.name,e.target.value)}})}});return"vertical"===m?e.jsxs(e.Fragment,{children:["standard"===h&&e.jsx(l,{variant:"subtitle1",component:"h3",color:"textPrimary",children:d}),p()]}):e.jsx(a,{label:d,children:p()})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("formik"),t=require("@mui/material/TextField"),i=require("../../custom-hooks/useRenderValidText.cjs.js"),a=require("./FormItemLayout.cjs.js"),l=require("@mui/material/Typography");module.exports=({label:o,fieldName:d,placeholder:n,validation:s,multiline:u,layout:m="horizontal",variant:h="standard",disabled:c=!1})=>{const p=()=>e.jsx(r.Field,{name:d,validate:s,children:({field:r,form:a})=>{const{errors:l,touched:s,isSubmitting:p}=a,v=l[r.name],x=!!v&&s[r.name],g=i({fieldError:v,showError:x,touched:!!s[r.name],value:r.value});return e.jsx(t,{label:"standard"===h?void 0:o,variant:h,value:r.value,"data-testid":`text-field-${d}`,autoComplete:"off",fullWidth:!0,multiline:!0,minRows:u?3:1,style:{paddingRight:"horizontal"===m?16:0},placeholder:n||void 0,disabled:p||c,error:x,helperText:g,FormHelperTextProps:{children:" ",style:{textAlign:"right"}},inputProps:{style:{paddingTop:0,height:"1.1876em"}},onChange:e=>{a.setFieldValue(r.name,e.target.value)}})}});return"vertical"===m?e.jsxs(e.Fragment,{children:["standard"===h&&e.jsx(l,{variant:"subtitle1",component:"h3",color:"textPrimary",children:o}),p()]}):e.jsx(a,{label:o,children:p()})};
2
2
  //# sourceMappingURL=GenericTextField.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTextField.cjs.js","sources":["../../../../src/components/ui/Form/GenericTextField.tsx"],"sourcesContent":["import { ChangeEvent } from 'react';\n\nimport { type FieldProps, Field } from 'formik';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\nimport Typography from '@mui/material/Typography';\n\ntype Props = {\n label: string;\n fieldName: string;\n placeholder?: string;\n validation?: (value: string) => string | undefined;\n multiline?: boolean;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n};\n\nconst GenericTextField = ({\n label,\n fieldName,\n placeholder,\n validation,\n multiline,\n layout = 'horizontal',\n variant = 'standard',\n disabled = false,\n}: Props) => {\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 <TextField\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n value={field.value}\n data-testid={`text-field-${fieldName}`}\n autoComplete=\"off\"\n fullWidth\n multiline\n minRows={multiline ? 3 : 1}\n style={{ paddingRight: 16 }}\n placeholder={placeholder ? placeholder : undefined}\n disabled={isSubmitting || disabled}\n error={showError}\n helperText={helperText}\n FormHelperTextProps={{\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n }}\n inputProps={{\n style: {\n paddingTop: 0,\n height: '1.1876em',\n },\n }}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(field.name, e.target.value);\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 GenericTextField;\n"],"names":["label","fieldName","placeholder","validation","multiline","layout","variant","disabled","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","jsx","TextField","undefined","autoComplete","fullWidth","minRows","style","paddingRight","error","FormHelperTextProps","textAlign","inputProps","paddingTop","height","onChange","e","setFieldValue","target","_jsxs","jsxs","_Fragment","Typography","component","color","FormItemLayout"],"mappings":"6PAmByB,EACrBA,QACAC,YACAC,cACAC,aACAC,YACAC,SAAS,aACTC,UAAU,WACVC,YAAW,MAEX,MAAMC,EAAc,IAEZC,MAACC,EAAAA,OAAMC,KAAMV,EAAWW,SAAUT,EAAUU,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,IAAAC,GACGzB,MAAmB,aAAZM,OAAyBoB,EAAY1B,EAC5CM,QAASA,EACTiB,MAAOT,EAAMS,MAAK,cACL,cAActB,IAC3B0B,aAAa,MACbC,aACAxB,WAAS,EACTyB,QAASzB,EAAY,EAAI,EACzB0B,MAAO,CAAEC,aAAc,IACvB7B,YAAaA,QAA4BwB,EACzCnB,SAAUW,GAAgBX,EAC1ByB,MAAOZ,EACPC,WAAYA,EACZY,oBAAqB,CACjBpB,SAAU,IACViB,MAAO,CAAEI,UAAW,UAExBC,WAAY,CACRL,MAAO,CACHM,WAAY,EACZC,OAAQ,aAGhBC,SAAWC,IAEPxB,EAAKyB,cAAc1B,EAAMH,KAAM4B,EAAEE,OAAOlB,MAAM,GAGxD,IAMlB,MAAe,aAAXlB,EAEIqC,EAAAC,KAAAC,WAAA,CAAA/B,SAAA,CACiB,aAAZP,GACGG,EAAAe,IAACqB,EAAU,CAACvC,QAAQ,YAAYwC,UAAU,KAAKC,MAAM,cAChDlC,SAAAb,IAGRQ,OAKNC,EAAAe,IAACwB,EAAc,CAAChD,MAAOA,EAAQa,SAAAL,KAA+B"}
1
+ {"version":3,"file":"GenericTextField.cjs.js","sources":["../../../../src/components/ui/Form/GenericTextField.tsx"],"sourcesContent":["import { ChangeEvent } from 'react';\n\nimport { type FieldProps, Field } from 'formik';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\nimport Typography from '@mui/material/Typography';\n\ntype Props = {\n label: string;\n fieldName: string;\n placeholder?: string;\n validation?: (value: string) => string | undefined;\n multiline?: boolean;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n};\n\nconst GenericTextField = ({\n label,\n fieldName,\n placeholder,\n validation,\n multiline,\n layout = 'horizontal',\n variant = 'standard',\n disabled = false,\n}: Props) => {\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 <TextField\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n value={field.value}\n data-testid={`text-field-${fieldName}`}\n autoComplete=\"off\"\n fullWidth\n multiline\n minRows={multiline ? 3 : 1}\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n disabled={isSubmitting || disabled}\n error={showError}\n helperText={helperText}\n FormHelperTextProps={{\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n }}\n inputProps={{\n style: {\n paddingTop: 0,\n height: '1.1876em',\n },\n }}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(field.name, e.target.value);\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 GenericTextField;\n"],"names":["label","fieldName","placeholder","validation","multiline","layout","variant","disabled","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","TextField","undefined","autoComplete","fullWidth","minRows","style","paddingRight","error","FormHelperTextProps","textAlign","inputProps","paddingTop","height","onChange","e","setFieldValue","target","_jsxs","jsxs","_Fragment","jsx","Typography","component","color","FormItemLayout"],"mappings":"6PAmByB,EACrBA,QACAC,YACAC,cACAC,aACAC,YACAC,SAAS,aACTC,UAAU,WACVC,YAAW,MAEX,MAAMC,EAAc,IAEZC,MAACC,EAAAA,OAAMC,KAAMV,EAAWW,SAAUT,EAAUU,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,EAAS,CACNxB,MAAmB,aAAZM,OAAyBmB,EAAYzB,EAC5CM,QAASA,EACTiB,MAAOT,EAAMS,MACA,cAAA,cAActB,IAC3ByB,aAAa,MACbC,WAAS,EACTvB,WACA,EAAAwB,QAASxB,EAAY,EAAI,EACzByB,MAAO,CAAEC,aAAyB,eAAXzB,EAA0B,GAAK,GACtDH,YAAaA,QAA4BuB,EACzClB,SAAUW,GAAgBX,EAC1BwB,MAAOX,EACPC,WAAYA,EACZW,oBAAqB,CACjBnB,SAAU,IACVgB,MAAO,CAAEI,UAAW,UAExBC,WAAY,CACRL,MAAO,CACHM,WAAY,EACZC,OAAQ,aAGhBC,SAAWC,IAEPvB,EAAKwB,cAAczB,EAAMH,KAAM2B,EAAEE,OAAOjB,MAAM,GAGxD,IAMlB,MAAe,aAAXlB,EAEIoC,EAAAC,KAAAC,WAAA,CAAA9B,SAAA,CACiB,aAAZP,GACGG,EAAAmC,IAACC,EAAU,CAACvC,QAAQ,YAAYwC,UAAU,KAAKC,MAAM,cAChDlC,SAAAb,IAGRQ,OAKNC,EAAAmC,IAACI,EAAc,CAAChD,MAAOA,EAAQa,SAAAL,KAA+B"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{Field as a}from"formik";import i from"@mui/material/TextField";import l from"../../custom-hooks/useRenderValidText.js";import o from"./FormItemLayout.js";import d from"@mui/material/Typography";const m=({label:m,fieldName:n,placeholder:s,validation:u,multiline:h,layout:p="horizontal",variant:c="standard",disabled:f=!1})=>{const v=()=>r(a,{name:n,validate:u,children:({field:e,form:t})=>{const{errors:a,touched:o,isSubmitting:d}=t,u=a[e.name],p=!!u&&o[e.name],v=l({fieldError:u,showError:p,touched:!!o[e.name],value:e.value});return r(i,{label:"standard"===c?void 0:m,variant:c,value:e.value,"data-testid":`text-field-${n}`,autoComplete:"off",fullWidth:!0,multiline:!0,minRows:h?3:1,style:{paddingRight:16},placeholder:s||void 0,disabled:d||f,error:p,helperText:v,FormHelperTextProps:{children:" ",style:{textAlign:"right"}},inputProps:{style:{paddingTop:0,height:"1.1876em"}},onChange:r=>{t.setFieldValue(e.name,r.target.value)}})}});return"vertical"===p?e(t,{children:["standard"===c&&r(d,{variant:"subtitle1",component:"h3",color:"textPrimary",children:m}),v()]}):r(o,{label:m,children:v()})};export{m as default};
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{Field as a}from"formik";import i from"@mui/material/TextField";import l from"../../custom-hooks/useRenderValidText.js";import o from"./FormItemLayout.js";import d from"@mui/material/Typography";const n=({label:n,fieldName:m,placeholder:s,validation:u,multiline:h,layout:p="horizontal",variant:c="standard",disabled:f=!1})=>{const v=()=>r(a,{name:m,validate:u,children:({field:e,form:t})=>{const{errors:a,touched:o,isSubmitting:d}=t,u=a[e.name],v=!!u&&o[e.name],g=l({fieldError:u,showError:v,touched:!!o[e.name],value:e.value});return r(i,{label:"standard"===c?void 0:n,variant:c,value:e.value,"data-testid":`text-field-${m}`,autoComplete:"off",fullWidth:!0,multiline:!0,minRows:h?3:1,style:{paddingRight:"horizontal"===p?16:0},placeholder:s||void 0,disabled:d||f,error:v,helperText:g,FormHelperTextProps:{children:" ",style:{textAlign:"right"}},inputProps:{style:{paddingTop:0,height:"1.1876em"}},onChange:r=>{t.setFieldValue(e.name,r.target.value)}})}});return"vertical"===p?e(t,{children:["standard"===c&&r(d,{variant:"subtitle1",component:"h3",color:"textPrimary",children:n}),v()]}):r(o,{label:n,children:v()})};export{n as default};
2
2
  //# sourceMappingURL=GenericTextField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTextField.js","sources":["../../../../src/components/ui/Form/GenericTextField.tsx"],"sourcesContent":["import { ChangeEvent } from 'react';\n\nimport { type FieldProps, Field } from 'formik';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\nimport Typography from '@mui/material/Typography';\n\ntype Props = {\n label: string;\n fieldName: string;\n placeholder?: string;\n validation?: (value: string) => string | undefined;\n multiline?: boolean;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n};\n\nconst GenericTextField = ({\n label,\n fieldName,\n placeholder,\n validation,\n multiline,\n layout = 'horizontal',\n variant = 'standard',\n disabled = false,\n}: Props) => {\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 <TextField\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n value={field.value}\n data-testid={`text-field-${fieldName}`}\n autoComplete=\"off\"\n fullWidth\n multiline\n minRows={multiline ? 3 : 1}\n style={{ paddingRight: 16 }}\n placeholder={placeholder ? placeholder : undefined}\n disabled={isSubmitting || disabled}\n error={showError}\n helperText={helperText}\n FormHelperTextProps={{\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n }}\n inputProps={{\n style: {\n paddingTop: 0,\n height: '1.1876em',\n },\n }}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(field.name, e.target.value);\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 GenericTextField;\n"],"names":["GenericTextField","label","fieldName","placeholder","validation","multiline","layout","variant","disabled","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","TextField","undefined","autoComplete","fullWidth","minRows","style","paddingRight","error","FormHelperTextProps","textAlign","inputProps","paddingTop","height","onChange","e","setFieldValue","target","_jsxs","_Fragment","Typography","component","color","FormItemLayout"],"mappings":"yQAmBM,MAAAA,EAAmB,EACrBC,QACAC,YACAC,cACAC,aACAC,YACAC,SAAS,aACTC,UAAU,WACVC,YAAW,MAEX,MAAMC,EAAc,IAEZC,EAACC,GAAMC,KAAMV,EAAWW,SAAUT,EAAUU,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,GACGxB,MAAmB,aAAZM,OAAyBmB,EAAYzB,EAC5CM,QAASA,EACTiB,MAAOT,EAAMS,MAAK,cACL,cAActB,IAC3ByB,aAAa,MACbC,aACAvB,WAAS,EACTwB,QAASxB,EAAY,EAAI,EACzByB,MAAO,CAAEC,aAAc,IACvB5B,YAAaA,QAA4BuB,EACzClB,SAAUW,GAAgBX,EAC1BwB,MAAOX,EACPC,WAAYA,EACZW,oBAAqB,CACjBnB,SAAU,IACVgB,MAAO,CAAEI,UAAW,UAExBC,WAAY,CACRL,MAAO,CACHM,WAAY,EACZC,OAAQ,aAGhBC,SAAWC,IAEPvB,EAAKwB,cAAczB,EAAMH,KAAM2B,EAAEE,OAAOjB,MAAM,GAGxD,IAMlB,MAAe,aAAXlB,EAEIoC,EAAAC,EAAA,CAAA7B,SAAA,CACiB,aAAZP,GACGG,EAACkC,EAAU,CAACrC,QAAQ,YAAYsC,UAAU,KAAKC,MAAM,cAChDhC,SAAAb,IAGRQ,OAKNC,EAACqC,EAAc,CAAC9C,MAAOA,EAAQa,SAAAL,KAA+B"}
1
+ {"version":3,"file":"GenericTextField.js","sources":["../../../../src/components/ui/Form/GenericTextField.tsx"],"sourcesContent":["import { ChangeEvent } from 'react';\n\nimport { type FieldProps, Field } from 'formik';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport useRenderValidText from '../../custom-hooks/useRenderValidText';\nimport FormItemLayout from './FormItemLayout';\nimport Typography from '@mui/material/Typography';\n\ntype Props = {\n label: string;\n fieldName: string;\n placeholder?: string;\n validation?: (value: string) => string | undefined;\n multiline?: boolean;\n layout?: 'horizontal' | 'vertical';\n variant?: TextFieldProps['variant'];\n disabled?: boolean;\n};\n\nconst GenericTextField = ({\n label,\n fieldName,\n placeholder,\n validation,\n multiline,\n layout = 'horizontal',\n variant = 'standard',\n disabled = false,\n}: Props) => {\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 <TextField\n label={variant === 'standard' ? undefined : label}\n variant={variant}\n value={field.value}\n data-testid={`text-field-${fieldName}`}\n autoComplete=\"off\"\n fullWidth\n multiline\n minRows={multiline ? 3 : 1}\n style={{ paddingRight: layout === 'horizontal' ? 16 : 0 }}\n placeholder={placeholder ? placeholder : undefined}\n disabled={isSubmitting || disabled}\n error={showError}\n helperText={helperText}\n FormHelperTextProps={{\n children: ' ', // reserves line height for error message\n style: { textAlign: 'right' },\n }}\n inputProps={{\n style: {\n paddingTop: 0,\n height: '1.1876em',\n },\n }}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n form.setFieldValue(field.name, e.target.value);\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 GenericTextField;\n"],"names":["GenericTextField","label","fieldName","placeholder","validation","multiline","layout","variant","disabled","renderField","_jsx","Field","name","validate","children","field","form","errors","touched","isSubmitting","fieldError","showError","helperText","useRenderValidText","value","TextField","undefined","autoComplete","fullWidth","minRows","style","paddingRight","error","FormHelperTextProps","textAlign","inputProps","paddingTop","height","onChange","e","setFieldValue","target","_jsxs","_Fragment","Typography","component","color","FormItemLayout"],"mappings":"yQAmBM,MAAAA,EAAmB,EACrBC,QACAC,YACAC,cACAC,aACAC,YACAC,SAAS,aACTC,UAAU,WACVC,YAAW,MAEX,MAAMC,EAAc,IAEZC,EAACC,GAAMC,KAAMV,EAAWW,SAAUT,EAAUU,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,EAAS,CACNxB,MAAmB,aAAZM,OAAyBmB,EAAYzB,EAC5CM,QAASA,EACTiB,MAAOT,EAAMS,MACA,cAAA,cAActB,IAC3ByB,aAAa,MACbC,WAAS,EACTvB,WACA,EAAAwB,QAASxB,EAAY,EAAI,EACzByB,MAAO,CAAEC,aAAyB,eAAXzB,EAA0B,GAAK,GACtDH,YAAaA,QAA4BuB,EACzClB,SAAUW,GAAgBX,EAC1BwB,MAAOX,EACPC,WAAYA,EACZW,oBAAqB,CACjBnB,SAAU,IACVgB,MAAO,CAAEI,UAAW,UAExBC,WAAY,CACRL,MAAO,CACHM,WAAY,EACZC,OAAQ,aAGhBC,SAAWC,IAEPvB,EAAKwB,cAAczB,EAAMH,KAAM2B,EAAEE,OAAOjB,MAAM,GAGxD,IAMlB,MAAe,aAAXlB,EAEIoC,EAAAC,EAAA,CAAA7B,SAAA,CACiB,aAAZP,GACGG,EAACkC,EAAU,CAACrC,QAAQ,YAAYsC,UAAU,KAAKC,MAAM,cAChDhC,SAAAb,IAGRQ,OAKNC,EAACqC,EAAc,CAAC9C,MAAOA,EAAQa,SAAAL,KAA+B"}
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/styles"),r=require("@mui/material/Table"),l=require("@mui/material/TableCell"),a=require("@mui/material/TableHead"),t=require("@mui/material/TableRow"),s=require("@mui/material/useMediaQuery"),n=require("../GenericTableTitle/GenericTableTitle.cjs.js"),o=require("./HighlightScrollbar.cjs.js"),d=require("../GenericTableBody/GenericTableBody.cjs.js"),c=require("@mui/material/Card");const u=i.styled("div")`
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/styles"),r=require("@mui/material/Table"),a=require("@mui/material/TableCell"),l=require("@mui/material/TableHead"),t=require("@mui/material/TableRow"),s=require("@mui/material/useMediaQuery"),n=require("../GenericTableTitle/GenericTableTitle.cjs.js"),o=require("./HighlightScrollbar.cjs.js"),d=require("../GenericTableBody/GenericTableBody.cjs.js"),c=require("@mui/material/Card");const u=i.styled("div")`
2
2
  overflow-x: auto;
3
3
  &::-webkit-scrollbar {
4
4
  padding: 2px 0;
@@ -12,7 +12,7 @@
12
12
  background: #f5f5f5;
13
13
  border-radius: 3px;
14
14
  }
15
- `,m=i.styled(l)((({theme:e,isSticky:i})=>({fontSize:13,padding:e.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),b=i.styled(c)`
15
+ `,m=i.styled(a)((({theme:e,isSticky:i})=>({fontSize:13,padding:e.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),b=i.styled(c)`
16
16
  overflow: hidden;
17
- `;module.exports=({data:l,title:c,subTitle:h,showTitle:x=!0,onRowClick:j,loading:p,metadata:T})=>{const k=new Set(T.filter((e=>e.isVisible)).sort(((e,i)=>e.ordinal-i.ordinal)).map((e=>e.columnName))),y=T.reduce(((e,i)=>(e[i.columnName]=i,e)),{}),f=i.useTheme(),g=!s(f.breakpoints.up("sm")),w=g?"normal":"sticky";return e.jsxs(u,{children:[x&&e.jsx(n,{title:c,subTitle:h}),e.jsx(b,{children:e.jsx(o,{children:e.jsxs(r,{"aria-label":c,children:[e.jsx(a,{children:e.jsx(t,{children:Array.from(k).map(((i,r)=>{const{columnName:l,columnTitle:a,align:t="left"}=y[i];return e.jsx(m,{align:t,isSticky:0===r&&!g,children:e.jsx("div",{children:e.jsx("span",{children:a})})},l)}))})}),e.jsx(d,{type:w,data:l,columns:k,onRowClick:j,loading:p,meta:y})]})})})]})};
17
+ `;module.exports=({data:a,title:c,subTitle:h,showTitle:x=!0,onRowClick:j,loading:p,metadata:T})=>{const g=new Set(T.filter((e=>e.isVisible)).sort(((e,i)=>e.ordinal-i.ordinal)).map((e=>e.columnName))),k=T.reduce(((e,i)=>(e[i.columnName]=i,e)),{}),w=i.useTheme(),y=!s(w.breakpoints.up("sm")),f=y?"normal":"sticky";return e.jsxs(u,{children:[x&&e.jsx(n,{title:c,subTitle:h}),e.jsx(b,{children:e.jsx(o,{children:e.jsxs(r,{"aria-label":c,"data-testid":"generic-table"+(x?`-${c.replace(" ","-").toLowerCase()}`:""),children:[e.jsx(l,{children:e.jsx(t,{children:Array.from(g).map(((i,r)=>{const{columnName:a,columnTitle:l,align:t="left"}=k[i];return e.jsx(m,{align:t,isSticky:0===r&&!y,children:e.jsx("div",{children:e.jsx("span",{children:l})})},a)}))})}),e.jsx(d,{type:f,data:a,columns:g,onRowClick:j,loading:p,meta:k})]})})})]})};
18
18
  //# sourceMappingURL=GenericTable.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTable.cjs.js","sources":["../../../../src/components/ui/GenericTable/GenericTable.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { GenericTableColumns } from './types';\nimport GenericTableTitle from '../GenericTableTitle/GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport { GenericTableBody } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell)<{ isSticky: boolean }>(({ theme, isSticky }) => ({\n fontSize: 13,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left' } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile}>\n <div>\n <span>{columnTitle}</span>\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","theme","isSticky","fontSize","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","children","_jsx","jsx","GenericTableTitle","HighlightScrollbar","Table","TableHead","TableRow","Array","from","prop","idx","columnTitle","align","GenericTableBody","type","meta"],"mappings":"ucAyBA,MAAMA,EAAkBC,EAAAA,OAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAMA,OAACE,EAAPF,EAAyC,EAAGG,QAAOC,eAAgB,CACvFC,SAAU,GACVC,QAASH,EAAMI,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUL,EAAW,SAAW,WAChCM,OAAQN,EAAW,EAAI,WAGrBO,EAAcX,EAAAA,OAAOY,EAAK;;iBAIX,EAAGC,OAAMC,QAAOC,WAAUC,aAAY,EAAMC,aAAYC,UAASC,eAClF,MAAMC,EAAU,IAAIC,IAChBF,EACKG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEhBC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC5ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACR,CAAE,GAEC9B,EAAQgC,EAAAA,WACRC,GAAYC,EAAclC,EAAMmC,YAAYC,GAAG,OAG/CC,EAA2BJ,EAAW,SAAW,SAmBvD,OACIK,OAAC1C,EAAe,CAAA2C,SAAA,CACX1B,GAAa2B,EAACC,IAAAC,EAAkB,CAAA/B,MAAOA,EAAOC,SAAUA,IACzD4B,EAAAC,IAACjC,EAAW,CAAA+B,SACRC,EAAAA,IAACG,EACG,CAAAJ,SAAAD,OAACM,EAAK,CAAA,aAAajC,EAAK4B,SAAA,CArBpCC,EAAAC,IAACI,EAAS,CAAAN,SACNC,EAAAA,IAACM,EACI,CAAAP,SAAAQ,MAAMC,KAAK/B,GAASS,KAAI,CAACuB,EAAMC,KAC5B,MAAMvB,WAAEA,EAAUwB,YAAEA,EAAWC,MAAEA,EAAQ,QAAWxB,EAAUqB,GAC9D,OACIT,MAAC1C,EAAiC,CAAAsD,MAAOA,EAAOnD,SAAkB,IAARiD,IAAcjB,EACpEM,SAAAC,EAAAA,IAAA,MAAA,CAAAD,SACIC,MAAO,OAAA,CAAAD,SAAAY,OAFOxB,EAKxB,QAaEa,EAAAA,IAACa,EACG,CAAAC,KAAMjB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACTwC,KAAM3B,aAM5B"}
1
+ {"version":3,"file":"GenericTable.cjs.js","sources":["../../../../src/components/ui/GenericTable/GenericTable.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { GenericTableColumns } from './types';\nimport GenericTableTitle from '../GenericTableTitle/GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport { GenericTableBody } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell)<{ isSticky: boolean }>(({ theme, isSticky }) => ({\n fontSize: 13,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left' } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile}>\n <div>\n <span>{columnTitle}</span>\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","theme","isSticky","fontSize","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","jsx","TableHead","TableRow","Array","from","prop","idx","columnTitle","align","GenericTableBody","type","meta"],"mappings":"ucAyBA,MAAMA,EAAkBC,EAAAA,OAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAMA,OAACE,EAAPF,EAAyC,EAAGG,QAAOC,eAAgB,CACvFC,SAAU,GACVC,QAASH,EAAMI,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUL,EAAW,SAAW,WAChCM,OAAQN,EAAW,EAAI,WAGrBO,EAAcX,EAAAA,OAAOY,EAAK;;iBAIX,EAAGC,OAAMC,QAAOC,WAAUC,aAAY,EAAMC,aAAYC,UAASC,eAClF,MAAMC,EAAU,IAAIC,IAChBF,EACKG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEhBC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC5ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACR,CAAE,GAEC9B,EAAQgC,EAAAA,WACRC,GAAYC,EAAclC,EAAMmC,YAAYC,GAAG,OAG/CC,EAA2BJ,EAAW,SAAW,SAmBvD,OACIK,EAACC,KAAA3C,aACIiB,GAAa2B,MAACC,EAAiB,CAAC9B,MAAOA,EAAOC,SAAUA,IACzD4B,EAAAA,IAAChC,EAAW,CAAAkC,SACRF,MAACG,EAAkB,CAAAD,SACfJ,EAAAA,KAACM,EAAK,CAAA,aAAajC,EAAoB,cAAA,iBAAmBE,EAAY,IAAIF,EAAMkC,QAAQ,IAAK,KAAKC,gBAAkB,IAC/GJ,SAAA,CAtBjBF,EAAAO,IAACC,EAAS,CAAAN,SACNF,EAAAA,IAACS,EACI,CAAAP,SAAAQ,MAAMC,KAAKlC,GAASS,KAAI,CAAC0B,EAAMC,KAC5B,MAAM1B,WAAEA,EAAU2B,YAAEA,EAAWC,MAAEA,EAAQ,QAAW3B,EAAUwB,GAC9D,OACIZ,MAAC1C,EAAiC,CAAAyD,MAAOA,EAAOtD,SAAkB,IAARoD,IAAcpB,EACpES,SAAAF,EAAAA,IAAA,MAAA,CAAAE,SACIF,MAAO,OAAA,CAAAE,SAAAY,OAFO3B,EAKxB,QAaEa,EAAAO,IAACS,EACG,CAAAC,KAAMpB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACT2C,KAAM9B,aAM5B"}
@@ -1,4 +1,4 @@
1
- import{jsxs as i,jsx as e}from"react/jsx-runtime";import{styled as r,useTheme as a}from"@mui/material/styles";import l from"@mui/material/Table";import t from"@mui/material/TableCell";import o from"@mui/material/TableHead";import m from"@mui/material/TableRow";import n from"@mui/material/useMediaQuery";import d from"../GenericTableTitle/GenericTableTitle.js";import c from"./HighlightScrollbar.js";import s from"../GenericTableBody/GenericTableBody.js";import p from"@mui/material/Card";const u=r("div")`
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import{styled as r,useTheme as a}from"@mui/material/styles";import t from"@mui/material/Table";import l from"@mui/material/TableCell";import o from"@mui/material/TableHead";import m from"@mui/material/TableRow";import n from"@mui/material/useMediaQuery";import d from"../GenericTableTitle/GenericTableTitle.js";import c from"./HighlightScrollbar.js";import s from"../GenericTableBody/GenericTableBody.js";import p from"@mui/material/Card";const u=r("div")`
2
2
  overflow-x: auto;
3
3
  &::-webkit-scrollbar {
4
4
  padding: 2px 0;
@@ -12,7 +12,7 @@ import{jsxs as i,jsx as e}from"react/jsx-runtime";import{styled as r,useTheme as
12
12
  background: #f5f5f5;
13
13
  border-radius: 3px;
14
14
  }
15
- `,b=r(t)((({theme:i,isSticky:e})=>({fontSize:13,padding:i.spacing(1.25,2),whiteSpace:"nowrap",position:e?"sticky":"relative",zIndex:e?1:"auto"}))),f=r(p)`
15
+ `,b=r(l)((({theme:e,isSticky:i})=>({fontSize:13,padding:e.spacing(1.25,2),whiteSpace:"nowrap",position:i?"sticky":"relative",zIndex:i?1:"auto"}))),f=r(p)`
16
16
  overflow: hidden;
17
- `,h=({data:r,title:t,subTitle:p,showTitle:h=!0,onRowClick:T,loading:k,metadata:g})=>{const w=new Set(g.filter((i=>i.isVisible)).sort(((i,e)=>i.ordinal-e.ordinal)).map((i=>i.columnName))),y=g.reduce(((i,e)=>(i[e.columnName]=e,i)),{}),x=a(),S=!n(x.breakpoints.up("sm")),v=S?"normal":"sticky";return i(u,{children:[h&&e(d,{title:t,subTitle:p}),e(f,{children:e(c,{children:i(l,{"aria-label":t,children:[e(o,{children:e(m,{children:Array.from(w).map(((i,r)=>{const{columnName:a,columnTitle:l,align:t="left"}=y[i];return e(b,{align:t,isSticky:0===r&&!S,children:e("div",{children:e("span",{children:l})})},a)}))})}),e(s,{type:v,data:r,columns:w,onRowClick:T,loading:k,meta:y})]})})})]})};export{h as default};
17
+ `,h=({data:r,title:l,subTitle:p,showTitle:h=!0,onRowClick:T,loading:g,metadata:k})=>{const w=new Set(k.filter((e=>e.isVisible)).sort(((e,i)=>e.ordinal-i.ordinal)).map((e=>e.columnName))),y=k.reduce(((e,i)=>(e[i.columnName]=i,e)),{}),x=a(),S=!n(x.breakpoints.up("sm")),v=S?"normal":"sticky";return e(u,{children:[h&&i(d,{title:l,subTitle:p}),i(f,{children:i(c,{children:e(t,{"aria-label":l,"data-testid":"generic-table"+(h?`-${l.replace(" ","-").toLowerCase()}`:""),children:[i(o,{children:i(m,{children:Array.from(w).map(((e,r)=>{const{columnName:a,columnTitle:t,align:l="left"}=y[e];return i(b,{align:l,isSticky:0===r&&!S,children:i("div",{children:i("span",{children:t})})},a)}))})}),i(s,{type:v,data:r,columns:w,onRowClick:T,loading:g,meta:y})]})})})]})};export{h as default};
18
18
  //# sourceMappingURL=GenericTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTable.js","sources":["../../../../src/components/ui/GenericTable/GenericTable.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { GenericTableColumns } from './types';\nimport GenericTableTitle from '../GenericTableTitle/GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport { GenericTableBody } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell)<{ isSticky: boolean }>(({ theme, isSticky }) => ({\n fontSize: 13,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left' } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile}>\n <div>\n <span>{columnTitle}</span>\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","theme","isSticky","fontSize","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","GenericTable","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","children","_jsx","GenericTableTitle","HighlightScrollbar","Table","TableHead","TableRow","Array","from","prop","idx","columnTitle","align","GenericTableBody","type","meta"],"mappings":"yeAyBA,MAAMA,EAAkBC,EAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAOE,EAAPF,EAAyC,EAAGG,QAAOC,eAAgB,CACvFC,SAAU,GACVC,QAASH,EAAMI,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUL,EAAW,SAAW,WAChCM,OAAQN,EAAW,EAAI,WAGrBO,EAAcX,EAAOY,EAAK;;EAI1BC,EAAe,EAAGC,OAAMC,QAAOC,WAAUC,aAAY,EAAMC,aAAYC,UAASC,eAClF,MAAMC,EAAU,IAAIC,IAChBF,EACKG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEhBC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC5ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACR,CAAE,GAEC/B,EAAQiC,IACRC,GAAYC,EAAcnC,EAAMoC,YAAYC,GAAG,OAG/CC,EAA2BJ,EAAW,SAAW,SAmBvD,OACIK,EAAC3C,EAAe,CAAA4C,SAAA,CACX1B,GAAa2B,EAACC,EAAkB,CAAA9B,MAAOA,EAAOC,SAAUA,IACzD4B,EAACjC,EAAW,CAAAgC,SACRC,EAACE,EACG,CAAAH,SAAAD,EAACK,EAAK,CAAA,aAAahC,EAAK4B,SAAA,CArBpCC,EAACI,EAAS,CAAAL,SACNC,EAACK,EACI,CAAAN,SAAAO,MAAMC,KAAK9B,GAASS,KAAI,CAACsB,EAAMC,KAC5B,MAAMtB,WAAEA,EAAUuB,YAAEA,EAAWC,MAAEA,EAAQ,QAAWvB,EAAUoB,GAC9D,OACIR,EAAC3C,EAAiC,CAAAsD,MAAOA,EAAOnD,SAAkB,IAARiD,IAAchB,EACpEM,SAAAC,EAAA,MAAA,CAAAD,SACIC,EAAO,OAAA,CAAAD,SAAAW,OAFOvB,EAKxB,QAaEa,EAACY,EACG,CAAAC,KAAMhB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACTuC,KAAM1B,aAM5B"}
1
+ {"version":3,"file":"GenericTable.js","sources":["../../../../src/components/ui/GenericTable/GenericTable.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\n\nimport Table from '@mui/material/Table';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { GenericTableColumns } from './types';\nimport GenericTableTitle from '../GenericTableTitle/GenericTableTitle';\nimport HighlightScrollbar from './HighlightScrollbar';\nimport { GenericTableBody } from '../GenericTableBody';\nimport Card from '@mui/material/Card';\n\ntype GenericTableProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n metadata: GenericTableColumns[];\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n showTitle?: boolean;\n subTitle?: string;\n title?: string;\n};\n\nconst StyledContainer = styled('div')`\n overflow-x: auto;\n &::-webkit-scrollbar {\n padding: 2px 0;\n height: 6px;\n border: 1px solid #d5d5d5;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #f5f5f5;\n border-radius: 3px;\n }\n`;\n\nconst StyledTableCell = styled(TableCell)<{ isSticky: boolean }>(({ theme, isSticky }) => ({\n fontSize: 13,\n padding: theme.spacing(1.25, 2),\n whiteSpace: 'nowrap',\n position: isSticky ? 'sticky' : 'relative',\n zIndex: isSticky ? 1 : 'auto',\n}));\n\nconst StyledPaper = styled(Card)`\n overflow: hidden;\n`;\n\nconst GenericTable = ({ data, title, subTitle, showTitle = true, onRowClick, loading, metadata }: GenericTableProps) => {\n const columns = new Set(\n metadata\n .filter((m) => m.isVisible)\n .sort((a, b) => a.ordinal - b.ordinal)\n .map((m) => m.columnName),\n );\n const tableMeta = metadata.reduce<{ [key: string]: GenericTableColumns }>((obj, mData) => {\n obj[mData.columnName] = mData;\n return obj;\n }, {});\n\n const theme = useTheme();\n const isMobile = !useMediaQuery(theme.breakpoints.up('sm'));\n\n // We never want sticky on mobile - only on desktop\n const firstColumnStylePosition = isMobile ? 'normal' : 'sticky';\n\n const renderTableHeader = () => (\n <TableHead>\n <TableRow>\n {Array.from(columns).map((prop, idx) => {\n const { columnName, columnTitle, align = 'left' } = tableMeta[prop];\n return (\n <StyledTableCell key={columnName} align={align} isSticky={idx === 0 && !isMobile}>\n <div>\n <span>{columnTitle}</span>\n </div>\n </StyledTableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n\n return (\n <StyledContainer>\n {showTitle && <GenericTableTitle title={title} subTitle={subTitle}></GenericTableTitle>}\n <StyledPaper>\n <HighlightScrollbar>\n <Table aria-label={title} data-testid={`generic-table` + (showTitle ? `-${title.replace(' ', '-').toLowerCase()}` : '')}>\n {renderTableHeader()}\n <GenericTableBody\n type={firstColumnStylePosition}\n data={data}\n columns={columns}\n onRowClick={onRowClick}\n loading={loading}\n meta={tableMeta}\n />\n </Table>\n </HighlightScrollbar>\n </StyledPaper>\n </StyledContainer>\n );\n};\n\nexport default GenericTable;\n"],"names":["StyledContainer","styled","StyledTableCell","TableCell","theme","isSticky","fontSize","padding","spacing","whiteSpace","position","zIndex","StyledPaper","Card","GenericTable","data","title","subTitle","showTitle","onRowClick","loading","metadata","columns","Set","filter","m","isVisible","sort","a","b","ordinal","map","columnName","tableMeta","reduce","obj","mData","useTheme","isMobile","useMediaQuery","breakpoints","up","firstColumnStylePosition","_jsxs","_jsx","GenericTableTitle","children","HighlightScrollbar","Table","replace","toLowerCase","TableHead","TableRow","Array","from","prop","idx","columnTitle","align","GenericTableBody","type","meta"],"mappings":"yeAyBA,MAAMA,EAAkBC,EAAO,MAAM;;;;;;;;;;;;;;EAgB/BC,EAAkBD,EAAOE,EAAPF,EAAyC,EAAGG,QAAOC,eAAgB,CACvFC,SAAU,GACVC,QAASH,EAAMI,QAAQ,KAAM,GAC7BC,WAAY,SACZC,SAAUL,EAAW,SAAW,WAChCM,OAAQN,EAAW,EAAI,WAGrBO,EAAcX,EAAOY,EAAK;;EAI1BC,EAAe,EAAGC,OAAMC,QAAOC,WAAUC,aAAY,EAAMC,aAAYC,UAASC,eAClF,MAAMC,EAAU,IAAIC,IAChBF,EACKG,QAAQC,GAAMA,EAAEC,YAChBC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,QAAUD,EAAEC,UAC7BC,KAAKN,GAAMA,EAAEO,cAEhBC,EAAYZ,EAASa,QAA+C,CAACC,EAAKC,KAC5ED,EAAIC,EAAMJ,YAAcI,EACjBD,IACR,CAAE,GAEC/B,EAAQiC,IACRC,GAAYC,EAAcnC,EAAMoC,YAAYC,GAAG,OAG/CC,EAA2BJ,EAAW,SAAW,SAmBvD,OACIK,EAAC3C,aACIkB,GAAa0B,EAACC,EAAiB,CAAC7B,MAAOA,EAAOC,SAAUA,IACzD2B,EAAChC,EAAW,CAAAkC,SACRF,EAACG,EAAkB,CAAAD,SACfH,EAACK,EAAK,CAAA,aAAahC,EAAoB,cAAA,iBAAmBE,EAAY,IAAIF,EAAMiC,QAAQ,IAAK,KAAKC,gBAAkB,IAC/GJ,SAAA,CAtBjBF,EAACO,EAAS,CAAAL,SACNF,EAACQ,EACI,CAAAN,SAAAO,MAAMC,KAAKhC,GAASS,KAAI,CAACwB,EAAMC,KAC5B,MAAMxB,WAAEA,EAAUyB,YAAEA,EAAWC,MAAEA,EAAQ,QAAWzB,EAAUsB,GAC9D,OACIX,EAAC1C,EAAiC,CAAAwD,MAAOA,EAAOrD,SAAkB,IAARmD,IAAclB,EACpEQ,SAAAF,EAAA,MAAA,CAAAE,SACIF,EAAO,OAAA,CAAAE,SAAAW,OAFOzB,EAKxB,QAaEY,EAACe,EACG,CAAAC,KAAMlB,EACN3B,KAAMA,EACNO,QAASA,EACTH,WAAYA,EACZC,QAASA,EACTyC,KAAM5B,aAM5B"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/styles"),i=require("@mui/material/TableBody"),t=require("@mui/material/TableCell"),l=require("@mui/material/TableRow"),a=require("@mui/material/Skeleton"),n=require("../GenericTableBodyRow/GenericTableBodyRow.cjs.js");const o=r.styled(t)((({align:e,titleCell:r,warning:i,sticky:t})=>({textAlign:e,fontWeight:r?"bold":"normal",backgroundColor:i?"#ffcccb":"inherit",position:t?"sticky":"static"}))),c=({colIdx:r,colName:i,hasWarning:t,hasTitle:l,meta:a,row:n,type:c})=>{const s=n[i],m={align:a[i].align??"left",warning:t,titleCell:l,sticky:"sticky"===c&&0===r};switch(a[i].columnType){case"String":default:return e.jsx(o,{...m,children:s??"-"});case"Custom":return e.jsx(o,{...m,children:s?a[i].customComponent(s):"-"})}};module.exports=({columns:r,data:t,loading:s,type:m,onRowClick:u,meta:d})=>e.jsx(i,{children:s?Array.from(Array(5)).map(((i,t)=>e.jsx(l,{children:Array.from(r).map(((r,i)=>e.jsx(o,{align:"left",titleCell:!1,warning:!1,sticky:!1,children:e.jsx(a,{width:"90%",height:22})},i)))},t))):t?.map(((i,t)=>e.jsx(n,{onRowClick:u,row:i,children:Array.from(r).map(((r,t)=>e.jsx(c,{colIdx:t,colName:r,row:i,type:m,meta:d})))},t)))});
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/styles"),i=require("@mui/material/TableBody"),r=require("@mui/material/TableCell"),a=require("@mui/material/TableRow"),l=require("@mui/material/Skeleton"),o=require("../GenericTableBodyRow/GenericTableBodyRow.cjs.js");const n=t.styled(r)((({align:e,titleCell:t,warning:i,sticky:r})=>({textAlign:e,fontWeight:t?"bold":"normal",backgroundColor:i?"#ffcccb":"inherit",position:r?"sticky":"static"}))),s=({colIdx:t,colName:i,hasWarning:r,hasTitle:a,meta:l,row:o,type:s})=>{const c=o[i],m={align:l[i].align??"left",warning:r,titleCell:a,sticky:"sticky"===s&&0===t,"data-testid":`col-${i}`};switch(l[i].columnType){case"String":default:return e.jsx(n,{...m,children:c??"-"});case"Custom":return e.jsx(n,{...m,children:c?l[i].customComponent(c):"-"})}};module.exports=({columns:t,data:r,loading:c,type:m,onRowClick:d,meta:u})=>e.jsx(i,{children:c?Array.from(Array(5)).map(((i,r)=>e.jsx(a,{"data-testid":"row-loader",children:Array.from(t).map(((t,i)=>e.jsx(n,{align:"left",titleCell:!1,warning:!1,sticky:!1,"data-testid":`col-${t}`,children:e.jsx(l,{width:"90%",height:22})},i)))},r))):r?.map(((i,r)=>e.jsx(o,{onRowClick:d,row:i,tableRowTestKey:r.toString(),children:Array.from(t).map(((t,r)=>e.jsx(s,{colIdx:r,colName:t,row:i,type:m,meta:u})))},r)))});
2
2
  //# sourceMappingURL=GenericTableBody.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTableBody.cjs.js","sources":["../../../../src/components/ui/GenericTableBody/GenericTableBody.tsx"],"sourcesContent":["import React from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiTableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableRow from '@mui/material/TableRow';\n\nimport { GenericTableColumns } from '../GenericTable';\nimport Skeleton from '@mui/material/Skeleton';\nimport { GenericTableBodyRow } from '../GenericTableBodyRow';\n\nconst StyledTableCell = styled(TableCell)<{ align: string; titleCell: boolean; warning: boolean; sticky: boolean }>(\n ({ align, titleCell, warning, sticky }) => ({\n textAlign: align,\n fontWeight: titleCell ? 'bold' : 'normal',\n backgroundColor: warning ? '#ffcccb' : 'inherit',\n position: sticky ? 'sticky' : 'static',\n }),\n);\n\nexport type TableCellProps = {\n colIdx: number;\n colName: string;\n hasWarning?: boolean;\n hasTitle?: boolean;\n meta: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: Record<string, any>;\n type: 'sticky' | 'normal';\n};\n\nconst RenderTableCell: React.FC<TableCellProps> = ({ colIdx, colName, hasWarning, hasTitle, meta, row, type }) => {\n const prop = row[colName];\n const align = meta[colName].align ?? 'left';\n const tableCellProps = { align, warning: hasWarning, titleCell: hasTitle, sticky: type === 'sticky' && colIdx === 0 };\n\n switch (meta[colName].columnType) {\n case 'String':\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n case 'Custom':\n return <StyledTableCell {...tableCellProps}>{prop ? meta[colName].customComponent(prop) : '-'}</StyledTableCell>;\n default:\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n }\n};\n\ntype TableBodyProps = {\n columns: Set<string>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n meta?: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n type: 'sticky' | 'normal';\n};\n\nconst GenericTableBody: React.FC<TableBodyProps> = ({ columns, data, loading, type, onRowClick, meta }) => {\n const rowsPerPage = 5;\n return (\n <MuiTableBody>\n {loading\n ? Array.from(Array(rowsPerPage)).map((_, idx) => (\n <TableRow key={idx}>\n {Array.from(columns).map((_col, colIdx) => (\n <StyledTableCell key={colIdx} align={'left'} titleCell={false} warning={false} sticky={false}>\n <Skeleton width=\"90%\" height={22} />\n </StyledTableCell>\n ))}\n </TableRow>\n ))\n : data?.map((row, rowIdx) => (\n <GenericTableBodyRow key={rowIdx} onRowClick={onRowClick} row={row}>\n {Array.from(columns).map((colName, colIdx) => (\n <RenderTableCell colIdx={colIdx} colName={colName} row={row} type={type} meta={meta} />\n ))}\n </GenericTableBodyRow>\n ))}\n </MuiTableBody>\n );\n};\n\nexport default GenericTableBody;\n"],"names":["StyledTableCell","styled","TableCell","align","titleCell","warning","sticky","textAlign","fontWeight","backgroundColor","position","RenderTableCell","colIdx","colName","hasWarning","hasTitle","meta","row","type","prop","tableCellProps","columnType","_jsx","jsx","customComponent","columns","data","loading","onRowClick","MuiTableBody","children","Array","from","map","_","idx","TableRow","_col","Skeleton","width","height","rowIdx","GenericTableBodyRow"],"mappings":"mSAUA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAPD,EACpB,EAAGE,QAAOC,YAAWC,UAASC,aAAc,CACxCC,UAAWJ,EACXK,WAAYJ,EAAY,OAAS,SACjCK,gBAAiBJ,EAAU,UAAY,UACvCK,SAAUJ,EAAS,SAAW,aAehCK,EAA4C,EAAGC,SAAQC,UAASC,aAAYC,WAAUC,OAAMC,MAAKC,WACnG,MAAMC,EAAOF,EAAIJ,GAEXO,EAAiB,CAAEjB,MADXa,EAAKH,GAASV,OAAS,OACLE,QAASS,EAAYV,UAAWW,EAAUT,OAAiB,WAATY,GAAgC,IAAXN,GAEvG,OAAQI,EAAKH,GAASQ,YAClB,IAAK,SAIL,QACI,OAAOC,EAAAC,IAACvB,EAAoB,IAAAoB,WAAiBD,GAAQ,MAHzD,IAAK,SACD,OAAOG,EAAAC,IAACvB,EAAoB,IAAAoB,WAAiBD,EAAOH,EAAKH,GAASW,gBAAgBL,GAAQ,MAGjG,iBAc8C,EAAGM,UAASC,OAAMC,UAAST,OAAMU,aAAYZ,UAGxFM,MAACO,EAAY,CAAAC,SACRH,EACKI,MAAMC,KAAKD,MAJL,IAIyBE,KAAI,CAACC,EAAGC,IACnCb,MAACc,EAAQ,CAAAN,SACJC,MAAMC,KAAKP,GAASQ,KAAI,CAACI,EAAMzB,IAC5BU,EAAAC,IAACvB,EAA6B,CAAAG,MAAO,OAAQC,WAAW,EAAOC,SAAS,EAAOC,QAAQ,EACnFwB,SAAAR,EAAAA,IAACgB,EAAQ,CAACC,MAAM,MAAMC,OAAQ,MADZ5B,MAFfuB,KAQnBT,GAAMO,KAAI,CAAChB,EAAKwB,IACZnB,MAACoB,EAAiC,CAAAd,WAAYA,EAAYX,IAAKA,WAC1Dc,MAAMC,KAAKP,GAASQ,KAAI,CAACpB,EAASD,IAC/BU,EAAAA,IAACX,EAAgB,CAAAC,OAAQA,EAAQC,QAASA,EAASI,IAAKA,EAAKC,KAAMA,EAAMF,KAAMA,OAF7DyB"}
1
+ {"version":3,"file":"GenericTableBody.cjs.js","sources":["../../../../src/components/ui/GenericTableBody/GenericTableBody.tsx"],"sourcesContent":["import React from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiTableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableRow from '@mui/material/TableRow';\n\nimport { GenericTableColumns } from '../GenericTable';\nimport Skeleton from '@mui/material/Skeleton';\nimport { GenericTableBodyRow } from '../GenericTableBodyRow';\n\nconst StyledTableCell = styled(TableCell)<{ align: string; titleCell: boolean; warning: boolean; sticky: boolean }>(\n ({ align, titleCell, warning, sticky }) => ({\n textAlign: align,\n fontWeight: titleCell ? 'bold' : 'normal',\n backgroundColor: warning ? '#ffcccb' : 'inherit',\n position: sticky ? 'sticky' : 'static',\n }),\n);\n\nexport type TableCellProps = {\n colIdx: number;\n colName: string;\n hasWarning?: boolean;\n hasTitle?: boolean;\n meta: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: Record<string, any>;\n type: 'sticky' | 'normal';\n};\n\nconst RenderTableCell: React.FC<TableCellProps> = ({ colIdx, colName, hasWarning, hasTitle, meta, row, type }) => {\n const prop = row[colName];\n const align = meta[colName].align ?? 'left';\n const tableCellProps = {\n align,\n warning: hasWarning,\n titleCell: hasTitle,\n sticky: type === 'sticky' && colIdx === 0,\n 'data-testid': `col-${colName}`,\n };\n\n switch (meta[colName].columnType) {\n case 'String':\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n case 'Custom':\n return <StyledTableCell {...tableCellProps}>{prop ? meta[colName].customComponent(prop) : '-'}</StyledTableCell>;\n default:\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n }\n};\n\ntype TableBodyProps = {\n columns: Set<string>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n meta?: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n type: 'sticky' | 'normal';\n};\n\nconst GenericTableBody: React.FC<TableBodyProps> = ({ columns, data, loading, type, onRowClick, meta }) => {\n const rowsPerPage = 5;\n return (\n <MuiTableBody>\n {loading\n ? Array.from(Array(rowsPerPage)).map((_, idx) => (\n <TableRow key={idx} data-testid=\"row-loader\">\n {Array.from(columns).map((columnName, colIdx) => (\n <StyledTableCell\n key={colIdx}\n align={'left'}\n titleCell={false}\n warning={false}\n sticky={false}\n data-testid={`col-${columnName}`}\n >\n <Skeleton width=\"90%\" height={22} />\n </StyledTableCell>\n ))}\n </TableRow>\n ))\n : data?.map((row, rowIdx) => (\n <GenericTableBodyRow key={rowIdx} onRowClick={onRowClick} row={row} tableRowTestKey={rowIdx.toString()}>\n {Array.from(columns).map((colName, colIdx) => (\n <RenderTableCell colIdx={colIdx} colName={colName} row={row} type={type} meta={meta} />\n ))}\n </GenericTableBodyRow>\n ))}\n </MuiTableBody>\n );\n};\n\nexport default GenericTableBody;\n"],"names":["StyledTableCell","styled","TableCell","align","titleCell","warning","sticky","textAlign","fontWeight","backgroundColor","position","RenderTableCell","colIdx","colName","hasWarning","hasTitle","meta","row","type","prop","tableCellProps","columnType","_jsx","jsx","customComponent","columns","data","loading","onRowClick","MuiTableBody","children","Array","from","map","_","idx","TableRow","columnName","Skeleton","width","height","rowIdx","GenericTableBodyRow","tableRowTestKey","toString"],"mappings":"mSAUA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAPD,EACpB,EAAGE,QAAOC,YAAWC,UAASC,aAAc,CACxCC,UAAWJ,EACXK,WAAYJ,EAAY,OAAS,SACjCK,gBAAiBJ,EAAU,UAAY,UACvCK,SAAUJ,EAAS,SAAW,aAehCK,EAA4C,EAAGC,SAAQC,UAASC,aAAYC,WAAUC,OAAMC,MAAKC,WACnG,MAAMC,EAAOF,EAAIJ,GAEXO,EAAiB,CACnBjB,MAFUa,EAAKH,GAASV,OAAS,OAGjCE,QAASS,EACTV,UAAWW,EACXT,OAAiB,WAATY,GAAgC,IAAXN,EAC7B,cAAe,OAAOC,KAG1B,OAAQG,EAAKH,GAASQ,YAClB,IAAK,SAIL,QACI,OAAOC,EAAAC,IAACvB,EAAoB,IAAAoB,WAAiBD,GAAQ,MAHzD,IAAK,SACD,OAAOG,EAAAC,IAACvB,EAAoB,IAAAoB,WAAiBD,EAAOH,EAAKH,GAASW,gBAAgBL,GAAQ,MAGjG,iBAc8C,EAAGM,UAASC,OAAMC,UAAST,OAAMU,aAAYZ,UAGxFM,MAACO,EAAY,CAAAC,SACRH,EACKI,MAAMC,KAAKD,MAJL,IAIyBE,KAAI,CAACC,EAAGC,IACnCb,EAAAC,IAACa,EAA+B,CAAA,cAAA,sBAC3BL,MAAMC,KAAKP,GAASQ,KAAI,CAACI,EAAYzB,IAClCU,MAACtB,GAEGG,MAAO,OACPC,WAAW,EACXC,SAAS,EACTC,QAAQ,EAAK,cACA,OAAO+B,IAEpBP,SAAAR,EAAAA,IAACgB,EAAS,CAAAC,MAAM,MAAMC,OAAQ,MAPzB5B,MAHFuB,KAenBT,GAAMO,KAAI,CAAChB,EAAKwB,IACZnB,EAAAA,IAACoB,EAAmB,CAAcd,WAAYA,EAAYX,IAAKA,EAAK0B,gBAAiBF,EAAOG,WAAUd,SACjGC,MAAMC,KAAKP,GAASQ,KAAI,CAACpB,EAASD,IAC/BU,EAACC,IAAAZ,EAAgB,CAAAC,OAAQA,EAAQC,QAASA,EAASI,IAAKA,EAAKC,KAAMA,EAAMF,KAAMA,OAF7DyB"}
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import{styled as i}from"@mui/material/styles";import r from"@mui/material/TableBody";import e from"@mui/material/TableCell";import o from"@mui/material/TableRow";import l from"@mui/material/Skeleton";import a from"../GenericTableBodyRow/GenericTableBodyRow.js";const m=i(e)((({align:t,titleCell:i,warning:r,sticky:e})=>({textAlign:t,fontWeight:i?"bold":"normal",backgroundColor:r?"#ffcccb":"inherit",position:e?"sticky":"static"}))),n=({colIdx:i,colName:r,hasWarning:e,hasTitle:o,meta:l,row:a,type:n})=>{const c=a[r],s={align:l[r].align??"left",warning:e,titleCell:o,sticky:"sticky"===n&&0===i};switch(l[r].columnType){case"String":default:return t(m,{...s,children:c??"-"});case"Custom":return t(m,{...s,children:c?l[r].customComponent(c):"-"})}},c=({columns:i,data:e,loading:c,type:s,onRowClick:d,meta:p})=>t(r,{children:c?Array.from(Array(5)).map(((r,e)=>t(o,{children:Array.from(i).map(((i,r)=>t(m,{align:"left",titleCell:!1,warning:!1,sticky:!1,children:t(l,{width:"90%",height:22})},r)))},e))):e?.map(((r,e)=>t(a,{onRowClick:d,row:r,children:Array.from(i).map(((i,e)=>t(n,{colIdx:e,colName:i,row:r,type:s,meta:p})))},e)))});export{c as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{styled as e}from"@mui/material/styles";import i from"@mui/material/TableBody";import r from"@mui/material/TableCell";import o from"@mui/material/TableRow";import a from"@mui/material/Skeleton";import l from"../GenericTableBodyRow/GenericTableBodyRow.js";const m=e(r)((({align:t,titleCell:e,warning:i,sticky:r})=>({textAlign:t,fontWeight:e?"bold":"normal",backgroundColor:i?"#ffcccb":"inherit",position:r?"sticky":"static"}))),n=({colIdx:e,colName:i,hasWarning:r,hasTitle:o,meta:a,row:l,type:n})=>{const c=l[i],s={align:a[i].align??"left",warning:r,titleCell:o,sticky:"sticky"===n&&0===e,"data-testid":`col-${i}`};switch(a[i].columnType){case"String":default:return t(m,{...s,children:c??"-"});case"Custom":return t(m,{...s,children:c?a[i].customComponent(c):"-"})}},c=({columns:e,data:r,loading:c,type:s,onRowClick:d,meta:p})=>t(i,{children:c?Array.from(Array(5)).map(((i,r)=>t(o,{"data-testid":"row-loader",children:Array.from(e).map(((e,i)=>t(m,{align:"left",titleCell:!1,warning:!1,sticky:!1,"data-testid":`col-${e}`,children:t(a,{width:"90%",height:22})},i)))},r))):r?.map(((i,r)=>t(l,{onRowClick:d,row:i,tableRowTestKey:r.toString(),children:Array.from(e).map(((e,r)=>t(n,{colIdx:r,colName:e,row:i,type:s,meta:p})))},r)))});export{c as default};
2
2
  //# sourceMappingURL=GenericTableBody.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTableBody.js","sources":["../../../../src/components/ui/GenericTableBody/GenericTableBody.tsx"],"sourcesContent":["import React from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiTableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableRow from '@mui/material/TableRow';\n\nimport { GenericTableColumns } from '../GenericTable';\nimport Skeleton from '@mui/material/Skeleton';\nimport { GenericTableBodyRow } from '../GenericTableBodyRow';\n\nconst StyledTableCell = styled(TableCell)<{ align: string; titleCell: boolean; warning: boolean; sticky: boolean }>(\n ({ align, titleCell, warning, sticky }) => ({\n textAlign: align,\n fontWeight: titleCell ? 'bold' : 'normal',\n backgroundColor: warning ? '#ffcccb' : 'inherit',\n position: sticky ? 'sticky' : 'static',\n }),\n);\n\nexport type TableCellProps = {\n colIdx: number;\n colName: string;\n hasWarning?: boolean;\n hasTitle?: boolean;\n meta: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: Record<string, any>;\n type: 'sticky' | 'normal';\n};\n\nconst RenderTableCell: React.FC<TableCellProps> = ({ colIdx, colName, hasWarning, hasTitle, meta, row, type }) => {\n const prop = row[colName];\n const align = meta[colName].align ?? 'left';\n const tableCellProps = { align, warning: hasWarning, titleCell: hasTitle, sticky: type === 'sticky' && colIdx === 0 };\n\n switch (meta[colName].columnType) {\n case 'String':\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n case 'Custom':\n return <StyledTableCell {...tableCellProps}>{prop ? meta[colName].customComponent(prop) : '-'}</StyledTableCell>;\n default:\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n }\n};\n\ntype TableBodyProps = {\n columns: Set<string>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n meta?: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n type: 'sticky' | 'normal';\n};\n\nconst GenericTableBody: React.FC<TableBodyProps> = ({ columns, data, loading, type, onRowClick, meta }) => {\n const rowsPerPage = 5;\n return (\n <MuiTableBody>\n {loading\n ? Array.from(Array(rowsPerPage)).map((_, idx) => (\n <TableRow key={idx}>\n {Array.from(columns).map((_col, colIdx) => (\n <StyledTableCell key={colIdx} align={'left'} titleCell={false} warning={false} sticky={false}>\n <Skeleton width=\"90%\" height={22} />\n </StyledTableCell>\n ))}\n </TableRow>\n ))\n : data?.map((row, rowIdx) => (\n <GenericTableBodyRow key={rowIdx} onRowClick={onRowClick} row={row}>\n {Array.from(columns).map((colName, colIdx) => (\n <RenderTableCell colIdx={colIdx} colName={colName} row={row} type={type} meta={meta} />\n ))}\n </GenericTableBodyRow>\n ))}\n </MuiTableBody>\n );\n};\n\nexport default GenericTableBody;\n"],"names":["StyledTableCell","styled","TableCell","align","titleCell","warning","sticky","textAlign","fontWeight","backgroundColor","position","RenderTableCell","colIdx","colName","hasWarning","hasTitle","meta","row","type","prop","tableCellProps","columnType","_jsx","customComponent","GenericTableBody","columns","data","loading","onRowClick","MuiTableBody","children","Array","from","map","_","idx","TableRow","_col","Skeleton","width","height","rowIdx","GenericTableBodyRow"],"mappings":"6SAUA,MAAMA,EAAkBC,EAAOC,EAAPD,EACpB,EAAGE,QAAOC,YAAWC,UAASC,aAAc,CACxCC,UAAWJ,EACXK,WAAYJ,EAAY,OAAS,SACjCK,gBAAiBJ,EAAU,UAAY,UACvCK,SAAUJ,EAAS,SAAW,aAehCK,EAA4C,EAAGC,SAAQC,UAASC,aAAYC,WAAUC,OAAMC,MAAKC,WACnG,MAAMC,EAAOF,EAAIJ,GAEXO,EAAiB,CAAEjB,MADXa,EAAKH,GAASV,OAAS,OACLE,QAASS,EAAYV,UAAWW,EAAUT,OAAiB,WAATY,GAAgC,IAAXN,GAEvG,OAAQI,EAAKH,GAASQ,YAClB,IAAK,SAIL,QACI,OAAOC,EAACtB,EAAoB,IAAAoB,WAAiBD,GAAQ,MAHzD,IAAK,SACD,OAAOG,EAACtB,EAAoB,IAAAoB,WAAiBD,EAAOH,EAAKH,GAASU,gBAAgBJ,GAAQ,MAGjG,EAcCK,EAA6C,EAAGC,UAASC,OAAMC,UAAST,OAAMU,aAAYZ,UAGxFM,EAACO,EAAY,CAAAC,SACRH,EACKI,MAAMC,KAAKD,MAJL,IAIyBE,KAAI,CAACC,EAAGC,IACnCb,EAACc,EAAQ,CAAAN,SACJC,MAAMC,KAAKP,GAASQ,KAAI,CAACI,EAAMzB,IAC5BU,EAACtB,EAA6B,CAAAG,MAAO,OAAQC,WAAW,EAAOC,SAAS,EAAOC,QAAQ,EACnFwB,SAAAR,EAACgB,EAAQ,CAACC,MAAM,MAAMC,OAAQ,MADZ5B,MAFfuB,KAQnBT,GAAMO,KAAI,CAAChB,EAAKwB,IACZnB,EAACoB,EAAiC,CAAAd,WAAYA,EAAYX,IAAKA,WAC1Dc,MAAMC,KAAKP,GAASQ,KAAI,CAACpB,EAASD,IAC/BU,EAACX,EAAgB,CAAAC,OAAQA,EAAQC,QAASA,EAASI,IAAKA,EAAKC,KAAMA,EAAMF,KAAMA,OAF7DyB"}
1
+ {"version":3,"file":"GenericTableBody.js","sources":["../../../../src/components/ui/GenericTableBody/GenericTableBody.tsx"],"sourcesContent":["import React from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiTableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableRow from '@mui/material/TableRow';\n\nimport { GenericTableColumns } from '../GenericTable';\nimport Skeleton from '@mui/material/Skeleton';\nimport { GenericTableBodyRow } from '../GenericTableBodyRow';\n\nconst StyledTableCell = styled(TableCell)<{ align: string; titleCell: boolean; warning: boolean; sticky: boolean }>(\n ({ align, titleCell, warning, sticky }) => ({\n textAlign: align,\n fontWeight: titleCell ? 'bold' : 'normal',\n backgroundColor: warning ? '#ffcccb' : 'inherit',\n position: sticky ? 'sticky' : 'static',\n }),\n);\n\nexport type TableCellProps = {\n colIdx: number;\n colName: string;\n hasWarning?: boolean;\n hasTitle?: boolean;\n meta: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: Record<string, any>;\n type: 'sticky' | 'normal';\n};\n\nconst RenderTableCell: React.FC<TableCellProps> = ({ colIdx, colName, hasWarning, hasTitle, meta, row, type }) => {\n const prop = row[colName];\n const align = meta[colName].align ?? 'left';\n const tableCellProps = {\n align,\n warning: hasWarning,\n titleCell: hasTitle,\n sticky: type === 'sticky' && colIdx === 0,\n 'data-testid': `col-${colName}`,\n };\n\n switch (meta[colName].columnType) {\n case 'String':\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n case 'Custom':\n return <StyledTableCell {...tableCellProps}>{prop ? meta[colName].customComponent(prop) : '-'}</StyledTableCell>;\n default:\n return <StyledTableCell {...tableCellProps}>{prop ?? '-'}</StyledTableCell>;\n }\n};\n\ntype TableBodyProps = {\n columns: Set<string>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any[];\n loading?: boolean;\n meta?: { [key: string]: GenericTableColumns };\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n type: 'sticky' | 'normal';\n};\n\nconst GenericTableBody: React.FC<TableBodyProps> = ({ columns, data, loading, type, onRowClick, meta }) => {\n const rowsPerPage = 5;\n return (\n <MuiTableBody>\n {loading\n ? Array.from(Array(rowsPerPage)).map((_, idx) => (\n <TableRow key={idx} data-testid=\"row-loader\">\n {Array.from(columns).map((columnName, colIdx) => (\n <StyledTableCell\n key={colIdx}\n align={'left'}\n titleCell={false}\n warning={false}\n sticky={false}\n data-testid={`col-${columnName}`}\n >\n <Skeleton width=\"90%\" height={22} />\n </StyledTableCell>\n ))}\n </TableRow>\n ))\n : data?.map((row, rowIdx) => (\n <GenericTableBodyRow key={rowIdx} onRowClick={onRowClick} row={row} tableRowTestKey={rowIdx.toString()}>\n {Array.from(columns).map((colName, colIdx) => (\n <RenderTableCell colIdx={colIdx} colName={colName} row={row} type={type} meta={meta} />\n ))}\n </GenericTableBodyRow>\n ))}\n </MuiTableBody>\n );\n};\n\nexport default GenericTableBody;\n"],"names":["StyledTableCell","styled","TableCell","align","titleCell","warning","sticky","textAlign","fontWeight","backgroundColor","position","RenderTableCell","colIdx","colName","hasWarning","hasTitle","meta","row","type","prop","tableCellProps","columnType","_jsx","customComponent","GenericTableBody","columns","data","loading","onRowClick","MuiTableBody","children","Array","from","map","_","idx","TableRow","columnName","Skeleton","width","height","rowIdx","GenericTableBodyRow","tableR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AKA,EAAKC,KAAMA,EAAMF,KAAMA,OAF7DyB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/TableRow");module.exports=o=>{const{onRowClick:i,row:t,children:l}=o,n=e=>{e.preventDefault(),i&&i({row:t})};return i?e.jsx(r,{role:"button",onClick:n,hover:void 0!==n,children:l}):e.jsx(r,{children:l})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/TableRow");module.exports=t=>{const{onRowClick:o,row:i,children:a,tableRowTestKey:l}=t,n=e=>{e.preventDefault(),o&&o(i)};return o?e.jsx(r,{role:"button",onClick:n,hover:void 0!==n,"data-testid":`row-${l}`,children:a}):e.jsx(r,{"data-testid":`row-${l}`,children:a})};
2
2
  //# sourceMappingURL=GenericTableBodyRow.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTableBodyRow.cjs.js","sources":["../../../../src/components/ui/GenericTableBodyRow/GenericTableBodyRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport TableRow from '@mui/material/TableRow';\n\nexport type TableBodyRowProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n};\n\ntype TableBodyRowProp = TableBodyRowProps & { children: React.ReactNode };\n\nconst GenericTableBodyRow: React.FC<React.PropsWithChildren<TableBodyRowProp>> = (props) => {\n const { onRowClick, row, children } = props;\n\n const onClick = (e) => {\n e.preventDefault();\n onRowClick && onRowClick({ row });\n };\n\n if (onRowClick) {\n return (\n <TableRow role=\"button\" onClick={onClick} hover={onClick !== undefined}>\n {children}\n </TableRow>\n );\n }\n\n return <TableRow>{children}</TableRow>;\n};\n\nexport default GenericTableBodyRow;\n"],"names":["props","onRowClick","row","children","onClick","e","preventDefault","_jsx","TableRow","role","hover","undefined","jsx"],"mappings":"mGAakFA,IAC9E,MAAMC,WAAEA,EAAUC,IAAEA,EAAGC,SAAEA,GAAaH,EAEhCI,EAAWC,IACbA,EAAEC,iBACFL,GAAcA,EAAW,CAAEC,OAAM,EAGrC,OAAID,EAEIM,MAACC,EAAQ,CAACC,KAAK,SAASL,QAASA,EAASM,WAAmBC,IAAZP,EAC5CD,SAAAA,IAKNI,EAACK,IAAAJ,EAAU,CAAAL,SAAAA,GAAoB"}
1
+ {"version":3,"file":"GenericTableBodyRow.cjs.js","sources":["../../../../src/components/ui/GenericTableBodyRow/GenericTableBodyRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport TableRow from '@mui/material/TableRow';\n\nexport type TableBodyRowProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n tableRowTestKey: string;\n};\n\ntype TableBodyRowProp = TableBodyRowProps & { children: React.ReactNode };\n\nconst GenericTableBodyRow: React.FC<React.PropsWithChildren<TableBodyRowProp>> = (props) => {\n const { onRowClick, row, children, tableRowTestKey } = props;\n\n const onClick = (e) => {\n e.preventDefault();\n onRowClick && onRowClick(row);\n };\n\n if (onRowClick) {\n return (\n <TableRow role=\"button\" onClick={onClick} hover={onClick !== undefined} data-testid={`row-${tableRowTestKey}`}>\n {children}\n </TableRow>\n );\n }\n\n return <TableRow data-testid={`row-${tableRowTestKey}`}>{children}</TableRow>;\n};\n\nexport default GenericTableBodyRow;\n"],"names":["props","onRowClick","row","children","tableRowTestKey","onClick","e","preventDefault","_jsx","TableRow","role","hover","undefined"],"mappings":"mGAckFA,IAC9E,MAAMC,WAAEA,EAAUC,IAAEA,EAAGC,SAAEA,EAAQC,gBAAEA,GAAoBJ,EAEjDK,EAAWC,IACbA,EAAEC,iBACFN,GAAcA,EAAWC,EAAI,EAGjC,OAAID,EAEIO,EAAAA,IAACC,EAAS,CAAAC,KAAK,SAASL,QAASA,EAASM,WAAmBC,IAAZP,EAAoC,cAAA,OAAOD,IACvFD,SAAAA,IAKNK,MAACC,EAAsB,CAAA,cAAA,OAAOL,IAAiBD,SAAGA,GAAoB"}
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  type TableBodyRowProps = {
4
4
  row: any;
5
5
  onRowClick?: Function;
6
+ tableRowTestKey: string;
6
7
  };
7
8
  type TableBodyRowProp = TableBodyRowProps & {
8
9
  children: React.ReactNode;
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import o from"@mui/material/TableRow";const e=e=>{const{onRowClick:t,row:i,children:n}=e,l=r=>{r.preventDefault(),t&&t({row:i})};return r(o,t?{role:"button",onClick:l,hover:void 0!==l,children:n}:{children:n})};export{e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import e from"@mui/material/TableRow";const o=o=>{const{onRowClick:r,row:i,children:a,tableRowTestKey:l}=o,n=t=>{t.preventDefault(),r&&r(i)};return t(e,r?{role:"button",onClick:n,hover:void 0!==n,"data-testid":`row-${l}`,children:a}:{"data-testid":`row-${l}`,children:a})};export{o as default};
2
2
  //# sourceMappingURL=GenericTableBodyRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenericTableBodyRow.js","sources":["../../../../src/components/ui/GenericTableBodyRow/GenericTableBodyRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport TableRow from '@mui/material/TableRow';\n\nexport type TableBodyRowProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n};\n\ntype TableBodyRowProp = TableBodyRowProps & { children: React.ReactNode };\n\nconst GenericTableBodyRow: React.FC<React.PropsWithChildren<TableBodyRowProp>> = (props) => {\n const { onRowClick, row, children } = props;\n\n const onClick = (e) => {\n e.preventDefault();\n onRowClick && onRowClick({ row });\n };\n\n if (onRowClick) {\n return (\n <TableRow role=\"button\" onClick={onClick} hover={onClick !== undefined}>\n {children}\n </TableRow>\n );\n }\n\n return <TableRow>{children}</TableRow>;\n};\n\nexport default GenericTableBodyRow;\n"],"names":["GenericTableBodyRow","props","onRowClick","row","children","onClick","e","preventDefault","_jsx","TableRow","role","hover","undefined"],"mappings":"8EAaA,MAAMA,EAA4EC,IAC9E,MAAMC,WAAEA,EAAUC,IAAEA,EAAGC,SAAEA,GAAaH,EAEhCI,EAAWC,IACbA,EAAEC,iBACFL,GAAcA,EAAW,CAAEC,OAAM,EAGrC,OAEQK,EAACC,EAFLP,EAEa,CAACQ,KAAK,SAASL,QAASA,EAASM,WAAmBC,IAAZP,EAC5CD,SAAAA,GAKK,CAAAA,SAAAA,GAAoB"}
1
+ {"version":3,"file":"GenericTableBodyRow.js","sources":["../../../../src/components/ui/GenericTableBodyRow/GenericTableBodyRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport TableRow from '@mui/material/TableRow';\n\nexport type TableBodyRowProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n onRowClick?: Function;\n tableRowTestKey: string;\n};\n\ntype TableBodyRowProp = TableBodyRowProps & { children: React.ReactNode };\n\nconst GenericTableBodyRow: React.FC<React.PropsWithChildren<TableBodyRowProp>> = (props) => {\n const { onRowClick, row, children, tableRowTestKey } = props;\n\n const onClick = (e) => {\n e.preventDefault();\n onRowClick && onRowClick(row);\n };\n\n if (onRowClick) {\n return (\n <TableRow role=\"button\" onClick={onClick} hover={onClick !== undefined} data-testid={`row-${tableRowTestKey}`}>\n {children}\n </TableRow>\n );\n }\n\n return <TableRow data-testid={`row-${tableRowTestKey}`}>{children}</TableRow>;\n};\n\nexport default GenericTableBodyRow;\n"],"names":["GenericTableBodyRow","props","onRowClick","row","children","tableRowTestKey","onClick","e","preventDefault","_jsx","TableRow","role","hover","undefined"],"mappings":"8EAcA,MAAMA,EAA4EC,IAC9E,MAAMC,WAAEA,EAAUC,IAAEA,EAAGC,SAAEA,EAAQC,gBAAEA,GAAoBJ,EAEjDK,EAAWC,IACbA,EAAEC,iBACFN,GAAcA,EAAWC,EAAI,EAGjC,OAEQM,EAACC,EAFLR,EAEc,CAAAS,KAAK,SAASL,QAASA,EAASM,WAAmBC,IAAZP,EAAoC,cAAA,OAAOD,IACvFD,SAAAA,GAKiB,CAAA,cAAA,OAAOC,IAAiBD,SAAGA,GAAoB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),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("../../../providers/TranslationProvider.cjs.js"),g=require("../../../utilities/renderUtilities.cjs.js"),h=require("../../../utilities/validation.cjs.js"),u=require("../Spacer/Spacer.cjs.js");const x=1112,j=a.styled("div")((({theme:e,fluid:i})=>({maxWidth:i?"none":x,[e.breakpoints.down("md")]:{maxWidth:"none"},margin:e.spacing(2,4)}))),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)}))),v=a.styled(n)((()=>({flexGrow:1}))),k=a.styled("div")((({theme:e})=>({maxWidth:x,paddingBottom:e.spacing(3),[e.breakpoints.down("md")]:{paddingBottom:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}))),q=a.styled(r)((({theme:e,hasTitleComponent:i})=>({margin:i?e.spacing(-.75,0,-1.5,-1.5):e.spacing(-1.5,0,-1.5,-1.5),[e.breakpoints.only("sm")]:{marginLeft:e.spacing(-2)},[e.breakpoints.only("xs")]:{marginLeft:e.spacing(-2)}}))),T=a.styled("div")((({theme:e})=>({maxWidth:x,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=a.styled(n)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),B=a.styled(s)((()=>({lineHeight:"26px"}))),W=({title:i})=>e.jsx(s,{variant:"h5",component:"h2",children:i});exports.PageTitle=W,exports.default=r=>{const{actionBtnTitle:s,caption:x,children:L,contextButtons:C,documentTitle:F,fluid:A=!1,fullWidth:P,header:I,hideHeader:R,actionButtonLink:_,openLinkInNewTab:D=!1,pageHeader:G,showActionButton:H,showAddIcon:M,strictToParent:z,title:E,titleComponent:S,toParent:U,navigate:N}=r,{translate:O}=p.useTranslation(),Q=a.useTheme(),$=o(Q.breakpoints.down("md")),J=g.getMicroFrontendAttribute("data-portal-base-url")||"/",K=_?.startsWith("https://"),V=K?_:void 0!==_?h.joinUrlPaths(J,_):"";return e.jsxs(j,{fluid:A,children:[F&&e.jsx(d,{children:F}),G||null,e.jsxs(T,{children:[G&&e.jsx(u,{size:16,variant:"vertical"}),!R&&e.jsxs(y,{container:!0,alignItems:"center",direction:"column",children:[e.jsxs(n,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:[U&&e.jsx(n,{item:!0,children:e.jsx(q,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!S,component:"button",onClick:()=>{U&&z||U&&history.length<3?N(U):N(-1)},children:e.jsx(t,{})})}),e.jsx(w,{item:!0,children:C&&C.map((i=>e.jsx(e.Fragment,{children:i})))})]}),e.jsxs(b,{item:!0,container:!0,children:[e.jsxs(v,{item:!0,children:[S?e.jsx(S,{}):e.jsx(W,{title:E}),x&&e.jsx(B,{variant:"caption",component:"h3",children:x})]}),H&&e.jsxs(e.Fragment,{children:[$&&e.jsx(u,{size:56,variant:"vertical"}),e.jsx(f,{item:!0,children:e.jsxs(m,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${s}`,href:D||K?V:"",target:D?"_blank":void 0,rel:D?"noopener noreferrer":void 0,onClick:D||K?()=>{}:()=>N(_),children:[M&&e.jsx(i,{}),s&&O(s)]})})]})]})]}),e.jsxs(l,{fullWidth:P,children:[I?e.jsx(k,{children:I}):null,e.jsx(c,{identifier:F,children:e.jsx(e.Fragment,{children:L})})]})]})]})},exports.maxWidth=x;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),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("../../../utilities/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,y=a.styled("div")((({theme:e,fluid:i})=>({maxWidth:i?"none":j,[e.breakpoints.down("md")]:{maxWidth:"none"},margin:e.spacing(2,4)}))),f=a.styled(n)((({theme:e})=>({[e.breakpoints.down("sm")]:{width:"100%",paddingTop:e.spacing(2)}}))),v=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)((({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"}))),L=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:A,fluid:D=!1,fullWidth:I,header:P,hideHeader:R,actionButtonLink:z,openLinkInNewTab:_=!1,pageHeader:G,showActionButton:H,showAddIcon:M,strictToParent:E,title:S,titleComponent:U,toParent:N,navigate:O,hideDivider:Q=!1,customActionButtons:$}=r,J=a.useTheme(),K=o(J.breakpoints.down("md")),V=p.getMicroFrontendAttribute("data-portal-base-url")||"/",X=z?.startsWith("https://"),Y=X?z:void 0!==z?g.joinUrlPaths(V,z):"";return e.jsxs(y,{fluid:D,children:[A&&e.jsx(d,{children:A}),G||null,e.jsxs(w,{children:[G&&e.jsx(h,{size:16,variant:"vertical"}),!R&&e.jsxs(e.Fragment,{children:[e.jsxs(v,{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=>e.jsx(e.Fragment,{children:i})))})}),e.jsxs(b,{item:!0,container:!0,children:[N&&e.jsx(u,{children:e.jsx(q,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!U,component:"button",onClick:()=>{N&&E||N&&history.length<3?O(N):O(-1)},children:e.jsx(t,{})})}),e.jsxs(k,{item:!0,children:[U?e.jsx(U,{}):e.jsx(C,{title:S}),x&&e.jsx(W,{variant:"caption",component:"h3",children:x})]}),H&&e.jsxs(e.Fragment,{children:[K&&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:_||X?Y:"",target:_?"_blank":void 0,rel:_?"noopener noreferrer":void 0,onClick:_||X?()=>{}:()=>O(z),children:[M&&e.jsx(i,{}),s]})})]}),$&&$.map((i=>e.jsxs(e.Fragment,{children:[K&&e.jsx(h,{size:56,variant:"vertical"}),!K&&e.jsx(h,{size:16,variant:"vertical"}),e.jsx(f,{item:!0,children:i})]})))]})]}),!Q&&e.jsx(L,{})]}),e.jsxs(l,{fullWidth:I,children:[P?e.jsx(B,{children:P}):null,e.jsx(c,{identifier:A,children:e.jsx(e.Fragment,{children:j})})]})]})]})},exports.maxWidth=j;
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, { ComponentType, 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 { useTranslation } from '../../../providers/TranslationProvider';\nimport { getMicroFrontendAttribute } from '../../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../../utilities/validation';\nimport Spacer from '../Spacer/Spacer';\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}));\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\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst StyledBackButton = styled(IconButton)<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 0, -1.5, -1.5) : theme.spacing(-1.5, 0, -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\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <Typography variant=\"h5\" component=\"h2\">\n {title}\n </Typography>\n);\n\nexport type Props = {\n actionBtnTitle?: TranslationId;\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 strictToParent?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n toParent?: string;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\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 strictToParent,\n title,\n titleComponent: TitleComponent,\n toParent,\n navigate,\n } = props;\n const { translate } = useTranslation();\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}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader ? pageHeader : null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n {toParent && (\n <Grid item>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n 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 </Grid>\n )}\n <StyledHeaderContainer item>{contextButtons && contextButtons.map((button) => <>{button}</>)}</StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\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 && translate(actionBtnTitle)}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n </StyledTitleContainer>\n </StyledHeader>\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","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","hasTitleComponent","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","PageTitle","title","_jsx","variant","component","children","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","strictToParent","titleComponent","TitleComponent","toParent","navigate","translate","useTranslation","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","jsxs","Spacer","size","container","direction","item","alignContent","onClick","history","length","jsx","ArrowBackIcon","map","button","_Fragment","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier","Fragment"],"mappings":"6tBAuBO,MAAMA,EAAW,KAGlBC,EAAgBC,EAAMA,OAAC,M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C,KAAM,GAAIrC,QAAQ,aACvCD,MAAC7B,EAAsB,CAACsE,MAAI,EAAAtC,SACxB+B,OAACiB,EAAM,CACHlD,QAAQ,YACRQ,WAAW,EAAI,cACF,iBAAiBJ,IAC9B+C,KAAMvC,GAAoBgB,EAAwBE,EAAwB,GAC1EsB,OAAQxC,EAAmB,cAAWmB,EACtCsB,IAAKzC,EAAmB,2BAAwBmB,EAChDW,QAAU9B,GAAqBgB,EAA2D,OAAnC,IAAMR,EAAST,GAA4BT,SAAA,CAEjGa,GAAehB,MAACuD,EAAM,CAAA,GACtBlD,GAAkBiB,EAAUjB,iBAQzD6B,EAAAA,KAACsB,EAAkB,CAAC/C,UAAWA,EAASN,SAAA,CACnCO,EAASV,MAAClB,EAAgB,CAAAqB,SAAEO,IAA6B,KAC1DV,MAACyD,EAAe,CAACC,WAAYlD,EAAaL,SACtCH,EAAG8C,IAAAI,EAAAS,SAAA,CAAAxD,SAAAA,cAKrB"}
1
+ {"version":3,"file":"PageLayout.cjs.js","sources":["../../../../src/components/ui/PageLayout/PageLayout.tsx"],"sourcesContent":["import React, { ComponentType, 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 '../../../utilities/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}));\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\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst StyledBackButton = styled(IconButton)<{ 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 strictToParent?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n toParent?: string;\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};\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 strictToParent,\n title,\n titleComponent: TitleComponent,\n toParent,\n navigate,\n hideDivider = false,\n customActionButtons,\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}>\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>{contextButtons && contextButtons.map((button) => <>{button}</>)}</StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {toParent && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n 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) => (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </>\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","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","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","strictToParent","titleComponent","TitleComponent","toParent","navigate","hideDivider","customActionButtons","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","jsx","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","Fragment","Box","onClick","history","length","ArrowBackIcon","jsxs","Button","href","target","rel","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MAACmB,EAAc,CAAA,GAAMnB,EAACoC,IAAAtC,GAAUC,MAAOA,IACxDO,GACGN,EAACoC,IAAA9C,GAAcW,QAAQ,UAAUC,UAAU,KACtCC,SAAAG,OAKZS,GACGmB,EAAAkB,KAAAb,WAAA,CAAApC,SAAA,CACKsB,GAAYzB,EAAAoC,IAACC,EAAO,CAAAC,KAAM,GAAIrC,QAAQ,aACvCD,MAAClC,EAAuB,CAAA4E,iBACpBR,EAAAA,KAACmB,GACGpD,QAAQ,YACRQ,WAAW,gBACE,iBAAiBJ,IAC9BiD,KAAMzC,GAAoBgB,EAAwBE,EAAwB,GAC1EwB,OAAQ1C,EAAmB,cAAWmB,EACtCwB,IAAK3C,EAAmB,2BAAwBmB,EAChDgB,QAAUnC,GAAqBgB,EAA2D,OAAnC,IAAMR,EAAST,GAA4BT,SAAA,CAEjGa,GAAehB,MAACyD,EAAG,CAAA,GACnBpD,UAKhBkB,GACGA,EAAoBqB,KAAKC,GACrBX,EAAAkB,KAAAb,WAAA,CAAApC,SAAA,CACKsB,GAAYzB,EAAAoC,IAACC,EAAO,CAAAC,KAAM,GAAIrC,QAAQ,cACrCwB,GAAYzB,EAAAA,IAACqC,GAAOC,KAAM,GAAIrC,QAAQ,aACxCD,EAACoC,IAAAtE,GAAuB4E,MAAI,EAAAvC,SAAE0C,gBAKhDvB,GAAetB,EAAAA,IAACL,SAG1BuC,OAACwB,GAAmBjD,UAAWA,EAC1BN,SAAA,CAAAO,EAASV,MAACvB,EAAkB,CAAA0B,SAAAO,IAA6B,KAC1DV,EAAAA,IAAC2D,EAAgB,CAAAC,WAAYpD,EAAaL,SACtCH,2BAAGG,cAKrB"}
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { ReactNode, ComponentType } from 'react';
3
3
 
4
4
  type Props = {
5
- actionBtnTitle?: TranslationId;
5
+ actionBtnTitle?: string;
6
6
  caption?: ReactNode;
7
7
  children: ReactNode;
8
8
  contextButtons?: ReactNode[];
@@ -21,6 +21,8 @@ type Props = {
21
21
  toParent?: string;
22
22
  openLinkInNewTab?: boolean;
23
23
  navigate: (to: any) => void;
24
+ hideDivider?: boolean;
25
+ customActionButtons?: ReactNode[];
24
26
  };
25
27
  declare const PageLayout: (props: Props) => react_jsx_runtime.JSX.Element;
26
28
 
@@ -1,2 +1,2 @@
1
- import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import e from"@mui/icons-material/Add";import a from"@mui/icons-material/ArrowBack";import r from"@mui/material/Grid";import o 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 g from"../FDErrorBoundary/FDErrorBoundary.js";import h from"@mui/material/Button";import{useTranslation as f}from"../../../providers/TranslationProvider.js";import{getMicroFrontendAttribute as u}from"../../../utilities/renderUtilities.js";import{joinUrlPaths as b}from"../../../utilities/validation.js";import k from"../Spacer/Spacer.js";const x=1112,v=m("div")((({theme:i,fluid:t})=>({maxWidth:t?"none":x,[i.breakpoints.down("md")]:{maxWidth:"none"},margin:i.spacing(2,4)}))),w=m(r)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),B=m(r)((({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)}}))),y=m(r)((({theme:i})=>({paddingTop:i.spacing(2)}))),T=m(r)((()=>({flexGrow:1}))),W=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)}}))),j=m(o)((({theme:i,hasTitleComponent:t})=>({margin:t?i.spacing(-.75,0,-1.5,-1.5):i.spacing(-1.5,0,-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"}}))),C=m(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),A=m(l)((()=>({lineHeight:"26px"}))),I=({title:i})=>t(l,{variant:"h5",component:"h2",children:i}),R=o=>{const{actionBtnTitle:m,caption:l,children:x,contextButtons:R,documentTitle:D,fluid:F=!1,fullWidth:G,header:H,hideHeader:P,actionButtonLink:z,openLinkInNewTab:E=!1,pageHeader:S,showActionButton:_,showAddIcon:M,strictToParent:N,title:Q,titleComponent:U,toParent:$,navigate:q}=o,{translate:J}=f(),K=d(),O=p(K.breakpoints.down("md")),V=u("data-portal-base-url")||"/",X=z?.startsWith("https://"),Y=X?z:void 0!==z?b(V,z):"";return i(v,{fluid:F,children:[D&&t(c,{children:D}),S||null,i(L,{children:[S&&t(k,{size:16,variant:"vertical"}),!P&&i(B,{container:!0,alignItems:"center",direction:"column",children:[i(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:[$&&t(r,{item:!0,children:t(j,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!U,component:"button",onClick:()=>{$&&N||$&&history.length<3?q($):q(-1)},children:t(a,{})})}),t(C,{item:!0,children:R&&R.map((i=>t(n,{children:i})))})]}),i(y,{item:!0,container:!0,children:[i(T,{item:!0,children:[U?t(U,{}):t(I,{title:Q}),l&&t(A,{variant:"caption",component:"h3",children:l})]}),_&&i(n,{children:[O&&t(k,{size:56,variant:"vertical"}),t(w,{item:!0,children:i(h,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${m}`,href:E||X?Y:"",target:E?"_blank":void 0,rel:E?"noopener noreferrer":void 0,onClick:E||X?()=>{}:()=>q(z),children:[M&&t(e,{}),m&&J(m)]})})]})]})]}),i(s,{fullWidth:G,children:[H?t(W,{children:H}):null,t(g,{identifier:D,children:t(n,{children:x})})]})]})]})};export{I as PageTitle,R as default,x as maxWidth};
1
+ import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import e from"@mui/icons-material/Add";import a from"@mui/icons-material/ArrowBack";import r from"@mui/material/Grid";import o 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"../../../utilities/renderUtilities.js";import{joinUrlPaths as f}from"../../../utilities/validation.js";import v from"../Spacer/Spacer.js";import b from"@mui/material/Box";import x from"@mui/material/Divider";const k=1112,B=m("div")((({theme:i,fluid:t})=>({maxWidth:t?"none":k,[i.breakpoints.down("md")]:{maxWidth:"none"},margin:i.spacing(2,4)}))),w=m(r)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),y=m(r)((({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=m(r)((({theme:i})=>({paddingTop:i.spacing(2)}))),T=m(r)((()=>({flexGrow:1}))),L=m("div")((({theme:i})=>({maxWidth:k,paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingBottom:i.spacing(2),paddingLeft:i.spacing(2),paddingRight:i.spacing(2)}}))),j=m(o)((({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)}}))),C=m("div")((({theme:i})=>({maxWidth:k,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"}}))),A=m(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),D=m(l)((()=>({lineHeight:"26px"}))),I=m(l)((()=>({fontWeight:"bold"}))),R=m(x)((({theme:i})=>({marginBottom:i.spacing(4)}))),z=({title:i})=>t(I,{variant:"h5",component:"h2",children:i}),F=o=>{const{actionBtnTitle:m,caption:l,children:x,contextButtons:k,documentTitle:I,fluid:F=!1,fullWidth:G,header:H,hideHeader:E,actionButtonLink:P,openLinkInNewTab:S=!1,pageHeader:_,showActionButton:M,showAddIcon:N,strictToParent:Q,title:U,titleComponent:$,toParent:q,navigate:J,hideDivider:K=!1,customActionButtons:O}=o,V=d(),X=p(V.breakpoints.down("md")),Y=u("data-portal-base-url")||"/",Z=P?.startsWith("https://"),ii=Z?P:void 0!==P?f(Y,P):"";return i(B,{fluid:F,children:[I&&t(c,{children:I}),_||null,i(C,{children:[_&&t(v,{size:16,variant:"vertical"}),!E&&i(n,{children:[i(y,{container:!0,alignItems:"center",direction:"column",children:[t(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:t(A,{item:!0,children:k&&k.map((i=>t(n,{children:i})))})}),i(W,{item:!0,container:!0,children:[q&&t(b,{children:t(j,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!$,component:"button",onClick:()=>{q&&Q||q&&history.length<3?J(q):J(-1)},children:t(a,{})})}),i(T,{item:!0,children:[$?t($,{}):t(z,{title:U}),l&&t(D,{variant:"caption",component:"h3",children:l})]}),M&&i(n,{children:[X&&t(v,{size:56,variant:"vertical"}),t(w,{item:!0,children:i(g,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${m}`,href:S||Z?ii:"",target:S?"_blank":void 0,rel:S?"noopener noreferrer":void 0,onClick:S||Z?()=>{}:()=>J(P),children:[N&&t(e,{}),m]})})]}),O&&O.map((e=>i(n,{children:[X&&t(v,{size:56,variant:"vertical"}),!X&&t(v,{size:16,variant:"vertical"}),t(w,{item:!0,children:e})]})))]})]}),!K&&t(R,{})]}),i(s,{fullWidth:G,children:[H?t(L,{children:H}):null,t(h,{identifier:I,children:t(n,{children:x})})]})]})]})};export{z as PageTitle,F as default,k 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, { ComponentType, 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 { useTranslation } from '../../../providers/TranslationProvider';\nimport { getMicroFrontendAttribute } from '../../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../../utilities/validation';\nimport Spacer from '../Spacer/Spacer';\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}));\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\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst StyledBackButton = styled(IconButton)<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 0, -1.5, -1.5) : theme.spacing(-1.5, 0, -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\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <Typography variant=\"h5\" component=\"h2\">\n {title}\n </Typography>\n);\n\nexport type Props = {\n actionBtnTitle?: TranslationId;\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 strictToParent?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n toParent?: string;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\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 strictToParent,\n title,\n titleComponent: TitleComponent,\n toParent,\n navigate,\n } = props;\n const { translate } = useTranslation();\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}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader ? pageHeader : null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n {toParent && (\n <Grid item>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n 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 </Grid>\n )}\n <StyledHeaderContainer item>{contextButtons && contextButtons.map((button) => <>{button}</>)}</StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\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 && translate(actionBtnTitle)}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n </StyledTitleContainer>\n </StyledHeader>\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","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","hasTitleComponent","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","PageTitle","title","_jsx","variant","component","children","PageLayout","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","strictToParent","titleComponent","TitleComponent","toParent","navigate","translate","useTranslation","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","container","direction","item","alignContent","onClick","history","length","ArrowBackIcon","map","button","_Fragment","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"+wBAuBO,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,OAGvBC,EAAyBP,EAAOQ,EAAPR,EAAa,EAAGC,YAAa,CACxD,CAACA,EAAME,YAAYC,KAAK,OAAQ,CAC5BK,MAAO,OACPC,WAAYT,EAAMK,QAAQ,QAI5BK,EAAeX,EAAOQ,EAAPR,EAAa,EAAGC,YAAa,CAC9CW,SAAU,SACVC,WAAY,aACZH,WAAYT,EAAMK,QAAQ,GAC1BQ,cAAeb,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,OAAQ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XyC,QAAS,KACDtB,GAAYH,GAELG,GAAYuB,QAAQC,OAhLlD,EA+KuBvB,EAASD,GAITC,GAAU,EACb,EACJnB,SAEDH,EAAC8C,EAAgB,CAAA,OAI7B9C,EAACR,EAAqB,CAACiD,MAAI,EAAAtC,SAAEK,GAAkBA,EAAeuC,KAAKC,GAAWhD,EAAGiD,EAAA,CAAA9C,SAAA6C,WAErFb,EAACxD,EAAqB,CAAA8D,MAAK,EAAAF,WACvB,EAAApC,SAAA,CAAAgC,EAACvD,EAAkB,CAAC6D,MAAI,EAAAtC,SAAA,CACnBiB,EAAiBpB,EAACoB,EAAc,IAAMpB,EAACF,EAAS,CAACC,MAAOA,IACxDQ,GACGP,EAACL,EAAa,CAACM,QAAQ,UAAUC,UAAU,KACtCC,SAAAI,OAKZS,GACGmB,EAAAc,EAAA,CAAA9C,SAAA,CACKuB,GAAY1B,EAACqC,GAAOC,KAAM,GAAIrC,QAAQ,aACvCD,EAAC7B,EAAsB,CAACsE,MAAI,EAAAtC,SACxBgC,EAACe,EAAM,CACHjD,QAAQ,YACRS,WAAW,EAAI,cACF,iBAAiBJ,IAC9B6C,KAAMrC,GAAoBgB,EAAwBE,EAAwB,GAC1EoB,OAAQtC,EAAmB,cAAWmB,EACtCoB,IAAKvC,EAAmB,2BAAwBmB,EAChDU,QAAU7B,GAAqBgB,EAA2D,OAAnC,IAAMR,EAAST,GAA4BV,SAAA,CAEjGc,GAAejB,EAACsD,EAAM,CAAA,GACtBhD,GAAkBiB,EAAUjB,iBAQzD6B,EAACoB,EAAkB,CAAC7C,UAAWA,EAASP,SAAA,CACnCQ,EAASX,EAAClB,EAAgB,CAAAqB,SAAEQ,IAA6B,KAC1DX,EAACwD,EAAe,CAACC,WAAYhD,EAAaN,SACtCH,EAAGiD,EAAA,CAAA9C,SAAAA,cAKrB"}
1
+ {"version":3,"file":"PageLayout.js","sources":["../../../../src/components/ui/PageLayout/PageLayout.tsx"],"sourcesContent":["import React, { ComponentType, 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 '../../../utilities/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}));\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\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst StyledBackButton = styled(IconButton)<{ 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 strictToParent?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n toParent?: string;\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};\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 strictToParent,\n title,\n titleComponent: TitleComponent,\n toParent,\n navigate,\n hideDivider = false,\n customActionButtons,\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}>\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>{contextButtons && contextButtons.map((button) => <>{button}</>)}</StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {toParent && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n 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) => (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </>\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","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","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","strictToParent","titleComponent","TitleComponent","toParent","navigate","hideDivider","customActionButtons","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","Box","onClick","history","length","ArrowBackIcon","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"0wBAwBO,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,OAGvBC,EAAyBP,EAAOQ,EAAPR,EAAa,EAAGC,YAAa,CACxD,CAACA,EAAME,YAAYC,KAAK,OAAQ,CAC5BK,MAAO,OACPC,WAAYT,EAAMK,QAAQ,QAI5BK,EAAeX,EAAOQ,EAAPR,EAAa,EAAGC,YAAa,CAC9CW,SAAU,SACVC,WAAY,aACZH,WAAYT,EAAMK,QAAQ,GAC1BQ,cAAeb,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,OAAQ,CAC5BM,WAAYT,EAAMK,QAAQ,GAC1BQ,cAAeb,EAAMK,QAAQ,QAI/BS,EAAuBf,EAAOQ,EAAPR,EAAa,EAAGC,YAAa,CACtDS,WAAYT,EAAMK,QAAQ,OAGxBU,EAAqBhB,EA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EAAaN,SACtCH,cAAGG,cAKrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "files": [
5
5
  "dist"
6
6
  ],