@flipdish/portal-library 1.0.20 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs.js +2 -0
- package/dist/components/index.cjs.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -15
- package/dist/components/index.js.map +1 -1
- package/dist/components/themes/flipdishPublicTheme.cjs.js +2 -0
- package/dist/components/themes/flipdishPublicTheme.cjs.js.map +1 -0
- package/dist/components/themes/flipdishPublicTheme.d.ts +9 -2
- package/dist/components/themes/flipdishPublicTheme.js +1 -172
- package/dist/components/themes/flipdishPublicTheme.js.map +1 -1
- package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.cjs.js +2 -0
- package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.cjs.js.map +1 -0
- package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js +2 -0
- package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js.map +1 -0
- package/dist/components/ui/LazyComponent/LazyComponent.cjs.js +2 -0
- package/dist/components/ui/LazyComponent/{LazyComponent.esm.js.map → LazyComponent.cjs.js.map} +1 -1
- package/dist/components/ui/LazyComponent/LazyComponent.js +1 -15
- package/dist/components/ui/LazyComponent/LazyComponent.js.map +1 -1
- package/dist/components/ui/NotFoundPage/NotFoundPage.cjs.js +2 -0
- package/dist/components/ui/NotFoundPage/NotFoundPage.cjs.js.map +1 -0
- package/dist/components/ui/NotFoundPage/NotFoundPage.js +1 -20
- package/dist/components/ui/NotFoundPage/NotFoundPage.js.map +1 -1
- package/dist/components/ui/PageLayout/DocumentTitle.cjs.js +2 -0
- package/dist/components/ui/PageLayout/DocumentTitle.cjs.js.map +1 -0
- package/dist/components/ui/PageLayout/DocumentTitle.js +2 -0
- package/dist/components/ui/PageLayout/DocumentTitle.js.map +1 -0
- package/dist/components/ui/PageLayout/FullWidthContainer.cjs.js +2 -0
- package/dist/components/ui/PageLayout/FullWidthContainer.cjs.js.map +1 -0
- package/dist/components/ui/PageLayout/FullWidthContainer.js +2 -0
- package/dist/components/ui/PageLayout/FullWidthContainer.js.map +1 -0
- package/dist/components/ui/PageLayout/PageLayout.cjs.js +2 -0
- package/dist/components/ui/PageLayout/PageLayout.cjs.js.map +1 -0
- package/dist/components/ui/PageLayout/PageLayout.d.ts +26 -0
- package/dist/components/ui/PageLayout/PageLayout.js +2 -0
- package/dist/components/ui/PageLayout/PageLayout.js.map +1 -0
- package/dist/components/ui/PortalMock/PortalMock.cjs.js +2 -0
- package/dist/components/ui/PortalMock/{PortalMock.esm.js.map → PortalMock.cjs.js.map} +1 -1
- package/dist/components/ui/PortalMock/PortalMock.js +1 -46
- package/dist/components/ui/PortalMock/PortalMock.js.map +1 -1
- package/dist/components/ui/Spacer/Spacer.cjs.js +2 -0
- package/dist/components/ui/Spacer/{Spacer.esm.js.map → Spacer.cjs.js.map} +1 -1
- package/dist/components/ui/Spacer/Spacer.js +1 -33
- package/dist/components/ui/Spacer/Spacer.js.map +1 -1
- package/dist/localization/en.json.cjs.js +2 -0
- package/dist/localization/en.json.cjs.js.map +1 -0
- package/dist/localization/en.json.js +1 -66
- package/dist/localization/en.json.js.map +1 -1
- package/dist/node_modules/.pnpm/@remix-run_router@1.20.0/node_modules/@remix-run/router/dist/router.cjs.js +12 -0
- package/dist/node_modules/.pnpm/@remix-run_router@1.20.0/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@remix-run_router@1.20.0/node_modules/@remix-run/router/dist/router.js +12 -0
- package/dist/node_modules/.pnpm/@remix-run_router@1.20.0/node_modules/@remix-run/router/dist/router.js.map +1 -0
- package/dist/node_modules/.pnpm/react-router@6.27.0_react@18.3.1/node_modules/react-router/dist/index.cjs.js +12 -0
- package/dist/node_modules/.pnpm/react-router@6.27.0_react@18.3.1/node_modules/react-router/dist/index.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/react-router@6.27.0_react@18.3.1/node_modules/react-router/dist/index.js +12 -0
- package/dist/node_modules/.pnpm/react-router@6.27.0_react@18.3.1/node_modules/react-router/dist/index.js.map +1 -0
- package/dist/providers/TranslationProvider.cjs.js +2 -0
- package/dist/providers/{TranslationProvider.esm.js.map → TranslationProvider.cjs.js.map} +1 -1
- package/dist/providers/TranslationProvider.js +1 -22
- package/dist/providers/TranslationProvider.js.map +1 -1
- package/dist/utilities/renderUtilities.cjs.js +2 -0
- package/dist/utilities/renderUtilities.cjs.js.map +1 -0
- package/dist/utilities/renderUtilities.js +2 -0
- package/dist/utilities/renderUtilities.js.map +1 -0
- package/dist/utilities/validation.cjs.js +2 -0
- package/dist/utilities/validation.cjs.js.map +1 -0
- package/dist/utilities/validation.js +2 -0
- package/dist/utilities/validation.js.map +1 -0
- package/package.json +3 -10
- package/dist/components/index.esm.js +0 -6
- package/dist/components/index.esm.js.map +0 -1
- package/dist/components/themes/flipdishPublicTheme.esm.js +0 -171
- package/dist/components/themes/flipdishPublicTheme.esm.js.map +0 -1
- package/dist/components/ui/LazyComponent/LazyComponent.esm.js +0 -14
- package/dist/components/ui/NotFoundPage/NotFoundPage.esm.js +0 -19
- package/dist/components/ui/NotFoundPage/NotFoundPage.esm.js.map +0 -1
- package/dist/components/ui/PortalMock/PortalMock.esm.js +0 -45
- package/dist/components/ui/Spacer/Spacer.esm.js +0 -32
- package/dist/localization/en.json.esm.js +0 -52
- package/dist/localization/en.json.esm.js.map +0 -1
- package/dist/providers/TranslationProvider.esm.js +0 -21
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./themes/flipdishPublicTheme.cjs.js"),o=require("./ui/NotFoundPage/NotFoundPage.cjs.js"),r=require("./ui/PageLayout/PageLayout.cjs.js"),s=require("./ui/PortalMock/PortalMock.cjs.js"),t=require("./ui/LazyComponent/LazyComponent.cjs.js"),u=require("./ui/Spacer/Spacer.cjs.js");exports.flipdishPublicTheme=e,exports.NotFoundPage=o,exports.PageLayout=r.default,exports.PortalMock=s,exports.LazyComponent=t,exports.Spacer=u;
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as flipdishPublicTheme } from './themes/flipdishPublicTheme.js';
|
|
2
2
|
export { default as NotFoundPage } from './ui/NotFoundPage/NotFoundPage.js';
|
|
3
|
+
export { default as PageLayout } from './ui/PageLayout/PageLayout.js';
|
|
3
4
|
export { default as PortalMock } from './ui/PortalMock/PortalMock.js';
|
|
4
5
|
export { default as LazyComponent } from './ui/LazyComponent/LazyComponent.js';
|
|
5
6
|
export { default as Spacer } from './ui/Spacer/Spacer.js';
|
package/dist/components/index.js
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var flipdishPublicTheme = require('./themes/flipdishPublicTheme.js');
|
|
4
|
-
var NotFoundPage = require('./ui/NotFoundPage/NotFoundPage.js');
|
|
5
|
-
var PortalMock = require('./ui/PortalMock/PortalMock.js');
|
|
6
|
-
var LazyComponent = require('./ui/LazyComponent/LazyComponent.js');
|
|
7
|
-
var Spacer = require('./ui/Spacer/Spacer.js');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.flipdishPublicTheme = flipdishPublicTheme;
|
|
12
|
-
exports.NotFoundPage = NotFoundPage;
|
|
13
|
-
exports.PortalMock = PortalMock;
|
|
14
|
-
exports.LazyComponent = LazyComponent;
|
|
15
|
-
exports.Spacer = Spacer;
|
|
1
|
+
export{default as flipdishPublicTheme}from"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.js";export{default as PageLayout}from"./ui/PageLayout/PageLayout.js";export{default as PortalMock}from"./ui/PortalMock/PortalMock.js";export{default as LazyComponent}from"./ui/LazyComponent/LazyComponent.js";export{default as Spacer}from"./ui/Spacer/Spacer.js";
|
|
16
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("@mui/material/styles/createTheme");const o=e({typography:{body1:{fontFamily:"'Roboto', sans-serif"},body2:{fontFamily:"'Roboto', sans-serif"},h1:{fontFamily:"clarendon-text-pro,Domine,serif"},h2:{fontFamily:"clarendon-text-pro,Domine,serif"},h3:{fontFamily:"clarendon-text-pro,Domine,serif"},h4:{fontFamily:"clarendon-text-pro,Domine,serif"},h5:{fontFamily:"clarendon-text-pro,Domine,serif"},h6:{fontFamily:"clarendon-text-pro,Domine,serif"}},palette:{success:{main:"#20C26E",dark:"#137442",light:"#D2F3E2"},error:{main:"#CA0030",dark:"#79001D",light:"#FADBE2"},warning:{main:"#FFBC2C",dark:"#FF7A00",light:"#FFF2D5"}}}),r=e(o,{palette:{black:o.palette.augmentColor({color:{main:"#000000"},name:"black"}),white:o.palette.augmentColor({color:{main:"#ffffff"},name:"white"}),flippyBlue:o.palette.augmentColor({color:{main:"#0b75d7"},name:"flippyBlue"}),freezerBurn:o.palette.augmentColor({color:{main:"#a5e2f6"},name:"freezerBurn"}),spricyCarrot:o.palette.augmentColor({color:{main:"#f7742b"},name:"spricyCarrot"}),pebble:o.palette.augmentColor({color:{main:"#eeebe3"},name:"pebble"}),donutPanic:o.palette.augmentColor({color:{main:"#ffbae4"},name:"donutPanic"}),eletricLime:o.palette.augmentColor({color:{main:"#cff27d"},name:"eletricLime"}),pending:o.palette.augmentColor({color:{main:"#DEACFA",dark:"#A56AC6",light:"#FCF7FE"},name:"pending"})}});var t=e(r,{palette:{primary:{main:r.palette.flippyBlue.main},secondary:{main:r.palette.spricyCarrot.main}},components:{MuiButton:{styleOverrides:{root:{padding:"7px 14px",textTransform:"none",boxShadow:"none","&:hover":{boxShadow:"none"},borderRadius:"25px"}}},MuiCard:{styleOverrides:{root:{borderRadius:0,boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:"#999999"}}},MuiChip:{styleOverrides:{root:{borderRadius:"5px",fontWeight:"bold",textTransform:"uppercase"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${r.palette.divider}`}}}}}});module.exports=t;
|
|
2
|
+
//# sourceMappingURL=flipdishPublicTheme.cjs.js.map
|
|
@@ -0,0 +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 },\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 components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '7px 14px',\n textTransform: 'none',\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none',\n },\n borderRadius: '25px',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: '#999999',\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n borderRadius: '5px',\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n },\n },\n },\n});\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n black: Palette['primary'];\n white: Palette['primary'];\n flippyBlue: Palette['primary'];\n freezerBurn: Palette['primary'];\n spricyCarrot: Palette['primary'];\n pebble: Palette['primary'];\n donutPanic: Palette['primary'];\n eletricLime: Palette['primary'];\n pending: Palette['primary'];\n }\n interface Theme {\n breakpoints: {\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","components","MuiButton","styleOverrides","root","padding","textTransform","boxShadow","borderRadius","MuiCard","borderWidth","borderStyle","borderColor","MuiChip","fontWeight","MuiListItemButton","backgroundColor","borderBottom","divider"],"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,WAEVS,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,eAKlB,IAAeS,EAAA/B,EAAYkB,EAAuB,CAC9CP,QAAS,CACLqB,QAAS,CACLnB,KAAMK,EAAMP,QAAQa,WAAWX,MAEnCoB,UAAW,CACPpB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCqB,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,WACTC,cAAe,OACfC,UAAW,OACX,UAAW,CACPA,UAAW,QAEfC,aAAc,UAI1BC,QAAS,CACLN,eAAgB,CACZC,KAAM,CACFI,aAAc,EACdD,UAAW,OACXG,YAAa,MACbC,YAAa,QACbC,YAAa,aAIzBC,QAAS,CACLV,eAAgB,CACZC,KAAM,CACFI,aAAc,MACdM,WAAY,OACZR,cAAe,eAI3BS,kBAAmB,CACfZ,eAAgB,CACZC,KAAM,CACF,UAAW,CACPY,gBAAiB,WAErB,qBAAsB,CAClBC,aAAc,aAAahC,EAAMP,QAAQwC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _mui_material_styles from '@mui/material/styles';
|
|
2
|
+
import { Breakpoint } from '@mui/material/styles';
|
|
2
3
|
|
|
3
|
-
declare const _default:
|
|
4
|
+
declare const _default: _mui_material_styles.Theme;
|
|
4
5
|
|
|
5
6
|
declare module '@mui/material/styles' {
|
|
6
7
|
interface Palette {
|
|
@@ -14,6 +15,12 @@ declare module '@mui/material/styles' {
|
|
|
14
15
|
eletricLime: Palette['primary'];
|
|
15
16
|
pending: Palette['primary'];
|
|
16
17
|
}
|
|
18
|
+
interface Theme {
|
|
19
|
+
breakpoints: {
|
|
20
|
+
down: (key: number | Breakpoint) => string;
|
|
21
|
+
only: (key: number | Breakpoint) => string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
export { _default as default };
|
|
@@ -1,173 +1,2 @@
|
|
|
1
|
-
'
|
|
2
|
-
|
|
3
|
-
var material = require('@mui/material');
|
|
4
|
-
|
|
5
|
-
// Colours and fonts as per our brand guidelines
|
|
6
|
-
const fontTheme = material.createTheme({
|
|
7
|
-
typography: {
|
|
8
|
-
body1: {
|
|
9
|
-
fontFamily: "'Roboto', sans-serif",
|
|
10
|
-
},
|
|
11
|
-
body2: {
|
|
12
|
-
fontFamily: "'Roboto', sans-serif",
|
|
13
|
-
},
|
|
14
|
-
h1: {
|
|
15
|
-
fontFamily: 'clarendon-text-pro,Domine,serif',
|
|
16
|
-
},
|
|
17
|
-
h2: {
|
|
18
|
-
fontFamily: 'clarendon-text-pro,Domine,serif',
|
|
19
|
-
},
|
|
20
|
-
h3: {
|
|
21
|
-
fontFamily: 'clarendon-text-pro,Domine,serif',
|
|
22
|
-
},
|
|
23
|
-
h4: {
|
|
24
|
-
fontFamily: 'clarendon-text-pro,Domine,serif',
|
|
25
|
-
},
|
|
26
|
-
h5: {
|
|
27
|
-
fontFamily: 'clarendon-text-pro,Domine,serif',
|
|
28
|
-
},
|
|
29
|
-
h6: {
|
|
30
|
-
fontFamily: 'clarendon-text-pro,Domine,serif',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
palette: {
|
|
34
|
-
success: {
|
|
35
|
-
main: '#20C26E',
|
|
36
|
-
dark: '#137442',
|
|
37
|
-
light: '#D2F3E2',
|
|
38
|
-
},
|
|
39
|
-
error: {
|
|
40
|
-
main: '#CA0030',
|
|
41
|
-
dark: '#79001D',
|
|
42
|
-
light: '#FADBE2',
|
|
43
|
-
},
|
|
44
|
-
warning: {
|
|
45
|
-
main: '#FFBC2C',
|
|
46
|
-
dark: '#FF7A00',
|
|
47
|
-
light: '#FFF2D5',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
const theme = material.createTheme(fontTheme, {
|
|
52
|
-
palette: {
|
|
53
|
-
// Primary
|
|
54
|
-
black: fontTheme.palette.augmentColor({
|
|
55
|
-
color: {
|
|
56
|
-
main: '#000000',
|
|
57
|
-
},
|
|
58
|
-
name: 'black',
|
|
59
|
-
}),
|
|
60
|
-
white: fontTheme.palette.augmentColor({
|
|
61
|
-
color: {
|
|
62
|
-
main: '#ffffff',
|
|
63
|
-
},
|
|
64
|
-
name: 'white',
|
|
65
|
-
}),
|
|
66
|
-
flippyBlue: fontTheme.palette.augmentColor({
|
|
67
|
-
color: {
|
|
68
|
-
main: '#0b75d7',
|
|
69
|
-
},
|
|
70
|
-
name: 'flippyBlue',
|
|
71
|
-
}),
|
|
72
|
-
// Core
|
|
73
|
-
freezerBurn: fontTheme.palette.augmentColor({
|
|
74
|
-
color: {
|
|
75
|
-
main: '#a5e2f6',
|
|
76
|
-
},
|
|
77
|
-
name: 'freezerBurn',
|
|
78
|
-
}),
|
|
79
|
-
spricyCarrot: fontTheme.palette.augmentColor({
|
|
80
|
-
color: {
|
|
81
|
-
main: '#f7742b',
|
|
82
|
-
},
|
|
83
|
-
name: 'spricyCarrot',
|
|
84
|
-
}),
|
|
85
|
-
pebble: fontTheme.palette.augmentColor({
|
|
86
|
-
color: {
|
|
87
|
-
main: '#eeebe3',
|
|
88
|
-
},
|
|
89
|
-
name: 'pebble',
|
|
90
|
-
}),
|
|
91
|
-
// Secondary
|
|
92
|
-
donutPanic: fontTheme.palette.augmentColor({
|
|
93
|
-
color: {
|
|
94
|
-
main: '#ffbae4',
|
|
95
|
-
},
|
|
96
|
-
name: 'donutPanic',
|
|
97
|
-
}),
|
|
98
|
-
eletricLime: fontTheme.palette.augmentColor({
|
|
99
|
-
color: {
|
|
100
|
-
main: '#cff27d',
|
|
101
|
-
},
|
|
102
|
-
name: 'eletricLime',
|
|
103
|
-
}),
|
|
104
|
-
pending: fontTheme.palette.augmentColor({
|
|
105
|
-
color: {
|
|
106
|
-
main: '#DEACFA',
|
|
107
|
-
dark: '#A56AC6',
|
|
108
|
-
light: '#FCF7FE',
|
|
109
|
-
},
|
|
110
|
-
name: 'pending',
|
|
111
|
-
}),
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
var flipdishPublicTheme = material.createTheme(theme, {
|
|
115
|
-
palette: {
|
|
116
|
-
primary: {
|
|
117
|
-
main: theme.palette.flippyBlue.main,
|
|
118
|
-
},
|
|
119
|
-
secondary: {
|
|
120
|
-
main: theme.palette.spricyCarrot.main,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
components: {
|
|
124
|
-
MuiButton: {
|
|
125
|
-
styleOverrides: {
|
|
126
|
-
root: {
|
|
127
|
-
padding: '7px 14px',
|
|
128
|
-
textTransform: 'none',
|
|
129
|
-
boxShadow: 'none',
|
|
130
|
-
'&:hover': {
|
|
131
|
-
boxShadow: 'none',
|
|
132
|
-
},
|
|
133
|
-
borderRadius: '25px',
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
MuiCard: {
|
|
138
|
-
styleOverrides: {
|
|
139
|
-
root: {
|
|
140
|
-
borderRadius: 0,
|
|
141
|
-
boxShadow: 'none',
|
|
142
|
-
borderWidth: '1px',
|
|
143
|
-
borderStyle: 'solid',
|
|
144
|
-
borderColor: '#999999',
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
MuiChip: {
|
|
149
|
-
styleOverrides: {
|
|
150
|
-
root: {
|
|
151
|
-
borderRadius: '5px',
|
|
152
|
-
fontWeight: 'bold',
|
|
153
|
-
textTransform: 'uppercase',
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
MuiListItemButton: {
|
|
158
|
-
styleOverrides: {
|
|
159
|
-
root: {
|
|
160
|
-
'&:hover': {
|
|
161
|
-
backgroundColor: '#eaf2ff',
|
|
162
|
-
},
|
|
163
|
-
'&:not(:last-child)': {
|
|
164
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
module.exports = flipdishPublicTheme;
|
|
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"}}}),r=e(o,{palette:{black:o.palette.augmentColor({color:{main:"#000000"},name:"black"}),white:o.palette.augmentColor({color:{main:"#ffffff"},name:"white"}),flippyBlue:o.palette.augmentColor({color:{main:"#0b75d7"},name:"flippyBlue"}),freezerBurn:o.palette.augmentColor({color:{main:"#a5e2f6"},name:"freezerBurn"}),spricyCarrot:o.palette.augmentColor({color:{main:"#f7742b"},name:"spricyCarrot"}),pebble:o.palette.augmentColor({color:{main:"#eeebe3"},name:"pebble"}),donutPanic:o.palette.augmentColor({color:{main:"#ffbae4"},name:"donutPanic"}),eletricLime:o.palette.augmentColor({color:{main:"#cff27d"},name:"eletricLime"}),pending:o.palette.augmentColor({color:{main:"#DEACFA",dark:"#A56AC6",light:"#FCF7FE"},name:"pending"})}});var t=e(r,{palette:{primary:{main:r.palette.flippyBlue.main},secondary:{main:r.palette.spricyCarrot.main}},components:{MuiButton:{styleOverrides:{root:{padding:"7px 14px",textTransform:"none",boxShadow:"none","&:hover":{boxShadow:"none"},borderRadius:"25px"}}},MuiCard:{styleOverrides:{root:{borderRadius:0,boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:"#999999"}}},MuiChip:{styleOverrides:{root:{borderRadius:"5px",fontWeight:"bold",textTransform:"uppercase"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${r.palette.divider}`}}}}}});export{t as default};
|
|
173
2
|
//# sourceMappingURL=flipdishPublicTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { createTheme } from '@mui/material';\n\n// Colours and fonts as per our brand guidelines\nconst fontTheme = createTheme({\n typography: {\n body1: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n body2: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n h1: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h2: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h3: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h4: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h5: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h6: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n },\n palette: {\n success: {\n main: '#20C26E',\n dark: '#137442',\n light: '#D2F3E2',\n },\n error: {\n main: '#CA0030',\n dark: '#79001D',\n light: '#FADBE2',\n },\n warning: {\n main: '#FFBC2C',\n dark: '#FF7A00',\n light: '#FFF2D5',\n },\n },\n});\n\nconst theme = createTheme(fontTheme, {\n palette: {\n // Primary\n black: fontTheme.palette.augmentColor({\n color: {\n main: '#000000',\n },\n name: 'black',\n }),\n white: fontTheme.palette.augmentColor({\n color: {\n main: '#ffffff',\n },\n name: 'white',\n }),\n flippyBlue: fontTheme.palette.augmentColor({\n color: {\n main: '#0b75d7',\n },\n name: 'flippyBlue',\n }),\n // Core\n freezerBurn: fontTheme.palette.augmentColor({\n color: {\n main: '#a5e2f6',\n },\n name: 'freezerBurn',\n }),\n spricyCarrot: fontTheme.palette.augmentColor({\n color: {\n main: '#f7742b',\n },\n name: 'spricyCarrot',\n }),\n pebble: fontTheme.palette.augmentColor({\n color: {\n main: '#eeebe3',\n },\n name: 'pebble',\n }),\n // Secondary\n donutPanic: fontTheme.palette.augmentColor({\n color: {\n main: '#ffbae4',\n },\n name: 'donutPanic',\n }),\n eletricLime: fontTheme.palette.augmentColor({\n color: {\n main: '#cff27d',\n },\n name: 'eletricLime',\n }),\n pending: fontTheme.palette.augmentColor({\n color: {\n main: '#DEACFA',\n dark: '#A56AC6',\n light: '#FCF7FE',\n },\n name: 'pending',\n }),\n },\n});\n\nexport default createTheme(theme, {\n palette: {\n primary: {\n main: theme.palette.flippyBlue.main,\n },\n secondary: {\n main: theme.palette.spricyCarrot.main,\n },\n },\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '7px 14px',\n textTransform: 'none',\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none',\n },\n borderRadius: '25px',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: '#999999',\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n borderRadius: '5px',\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n },\n },\n },\n});\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n black: Palette['primary'];\n white: Palette['primary'];\n flippyBlue: Palette['primary'];\n freezerBurn: Palette['primary'];\n spricyCarrot: Palette['primary'];\n pebble: Palette['primary'];\n donutPanic: Palette['primary'];\n eletricLime: Palette['primary'];\n pending: Palette['primary'];\n }\n}\n"],"names":["createTheme"
|
|
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 },\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 components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '7px 14px',\n textTransform: 'none',\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none',\n },\n borderRadius: '25px',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: '#999999',\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n borderRadius: '5px',\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n },\n },\n },\n});\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n black: Palette['primary'];\n white: Palette['primary'];\n flippyBlue: Palette['primary'];\n freezerBurn: Palette['primary'];\n spricyCarrot: Palette['primary'];\n pebble: Palette['primary'];\n donutPanic: Palette['primary'];\n eletricLime: Palette['primary'];\n pending: Palette['primary'];\n }\n interface Theme {\n breakpoints: {\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","components","MuiButton","styleOverrides","root","padding","textTransform","boxShadow","borderRadius","MuiCard","borderWidth","borderStyle","borderColor","MuiChip","fontWeight","MuiListItemButton","backgroundColor","borderBottom","divider"],"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,WAEVS,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,eAKlB,IAAeS,EAAA/B,EAAYkB,EAAuB,CAC9CP,QAAS,CACLqB,QAAS,CACLnB,KAAMK,EAAMP,QAAQa,WAAWX,MAEnCoB,UAAW,CACPpB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCqB,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,WACTC,cAAe,OACfC,UAAW,OACX,UAAW,CACPA,UAAW,QAEfC,aAAc,UAI1BC,QAAS,CACLN,eAAgB,CACZC,KAAM,CACFI,aAAc,EACdD,UAAW,OACXG,YAAa,MACbC,YAAa,QACbC,YAAa,aAIzBC,QAAS,CACLV,eAAgB,CACZC,KAAM,CACFI,aAAc,MACdM,WAAY,OACZR,cAAe,eAI3BS,kBAAmB,CACfZ,eAAgB,CACZC,KAAM,CACF,UAAW,CACPY,gBAAiB,WAErB,qBAAsB,CAClBC,aAAc,aAAahC,EAAMP,QAAQwC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=require("react/jsx-runtime"),e=require("react-error-boundary"),n=require("../../../providers/TranslationProvider.cjs.js");const t=require("@mui/material/styles").styled("div")((({theme:r})=>({marginTop:r.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"})));module.exports=({identifier:s,children:i})=>{const{translate:o}=n.useTranslation();return r.jsx(e.ErrorBoundary,{FallbackComponent:()=>r.jsx(t,{children:o("Something_went_wrong_please_refresh_the_page")}),onError:(r,e)=>{window.fdlogger?.error(`${s?.toString()} Error Boundary`,{message:r?.message,stack:e})},children:i})};
|
|
2
|
+
//# sourceMappingURL=FDErrorBoundary.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FDErrorBoundary.cjs.js","sources":["../../../../src/components/ui/FDErrorBoundary/FDErrorBoundary.tsx"],"sourcesContent":["import { ErrorBoundary } from 'react-error-boundary';\nimport { useTranslation } from '../../../providers/TranslationProvider';\nimport { ReactNode } from 'react';\nimport { styled } from '@mui/material/styles';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\nconst FDErrorBoundary = ({ identifier, children }: { identifier: string; children: ReactNode }) => {\n const { translate } = useTranslation();\n return (\n <ErrorBoundary\n FallbackComponent={() => <StyledTextContainer>{translate('Something_went_wrong_please_refresh_the_page')}</StyledTextContainer>}\n onError={(error, info) => {\n window.fdlogger?.error(`${identifier?.toString()} Error Boundary`, {\n message: error?.message,\n stack: info,\n });\n }}\n >\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default FDErrorBoundary;\n"],"names":["StyledTextContainer","styled","theme","marginTop","spacing","display","justifyContent","alignItems","identifier","children","translate","useTranslation","_jsx","ErrorBoundary","FallbackComponent","onError","error","info","window","fdlogger","toString","message","stack"],"mappings":"6IAKA,MAAMA,kCAAsBC,OAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,4BAEQ,EAAGC,aAAYC,eACnC,MAAMC,UAAEA,GAAcC,EAAAA,iBACtB,OACIC,EAAAA,IAACC,EAAAA,cACG,CAAAC,kBAAmB,IAAMF,EAAAA,IAACZ,EAAmB,CAAAS,SAAEC,EAAU,kDACzDK,QAAS,CAACC,EAAOC,KACbC,OAAOC,UAAUH,MAAM,GAAGR,GAAYY,4BAA6B,CAC/DC,QAASL,GAAOK,QAChBC,MAAOL,GACT,EAGLR,SAAAA,GAEP"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{ErrorBoundary as e}from"react-error-boundary";import{useTranslation as t}from"../../../providers/TranslationProvider.js";import{styled as o}from"@mui/material/styles";const n=o("div")((({theme:r})=>({marginTop:r.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"}))),i=({identifier:o,children:i})=>{const{translate:a}=t();return r(e,{FallbackComponent:()=>r(n,{children:a("Something_went_wrong_please_refresh_the_page")}),onError:(r,e)=>{window.fdlogger?.error(`${o?.toString()} Error Boundary`,{message:r?.message,stack:e})},children:i})};export{i as default};
|
|
2
|
+
//# sourceMappingURL=FDErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FDErrorBoundary.js","sources":["../../../../src/components/ui/FDErrorBoundary/FDErrorBoundary.tsx"],"sourcesContent":["import { ErrorBoundary } from 'react-error-boundary';\nimport { useTranslation } from '../../../providers/TranslationProvider';\nimport { ReactNode } from 'react';\nimport { styled } from '@mui/material/styles';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\nconst FDErrorBoundary = ({ identifier, children }: { identifier: string; children: ReactNode }) => {\n const { translate } = useTranslation();\n return (\n <ErrorBoundary\n FallbackComponent={() => <StyledTextContainer>{translate('Something_went_wrong_please_refresh_the_page')}</StyledTextContainer>}\n onError={(error, info) => {\n window.fdlogger?.error(`${identifier?.toString()} Error Boundary`, {\n message: error?.message,\n stack: info,\n });\n }}\n >\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default FDErrorBoundary;\n"],"names":["StyledTextContainer","styled","theme","marginTop","spacing","display","justifyContent","alignItems","FDErrorBoundary","identifier","children","translate","useTranslation","_jsx","ErrorBoundary","FallbackComponent","onError","error","info","window","fdlogger","toString","message","stack"],"mappings":"sNAKA,MAAMA,EAAsBC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,aAEVC,EAAkB,EAAGC,aAAYC,eACnC,MAAMC,UAAEA,GAAcC,IACtB,OACIC,EAACC,EACG,CAAAC,kBAAmB,IAAMF,EAACb,EAAmB,CAAAU,SAAEC,EAAU,kDACzDK,QAAS,CAACC,EAAOC,KACbC,OAAOC,UAAUH,MAAM,GAAGR,GAAYY,4BAA6B,CAC/DC,QAASL,GAAOK,QAChBC,MAAOL,GACT,EAGLR,SAAAA,GAEP"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material/CircularProgress");const s=require("@mui/material/styles").styled("div")({display:"flex",justifyContent:"center",alignItems:"center"});module.exports=({children:t})=>e.jsx(r.Suspense,{fallback:e.jsx(s,{children:e.jsx(i,{size:56})}),children:t});
|
|
2
|
+
//# sourceMappingURL=LazyComponent.cjs.js.map
|
package/dist/components/ui/LazyComponent/{LazyComponent.esm.js.map → LazyComponent.cjs.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyComponent.
|
|
1
|
+
{"version":3,"file":"LazyComponent.cjs.js","sources":["../../../../src/components/ui/LazyComponent/LazyComponent.tsx"],"sourcesContent":["import { Suspense, ReactNode } from 'react';\n\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { styled } from '@mui/material/styles';\n\ntype LazyComponentProps = {\n children: ReactNode;\n};\n\nconst StyledLoadingContainer = styled('div')({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nconst LazyComponent = ({ children }: LazyComponentProps) => (\n <Suspense\n fallback={\n <StyledLoadingContainer>\n <CircularProgress size={56} />\n </StyledLoadingContainer>\n }\n >\n {children}\n </Suspense>\n);\n\nexport default LazyComponent;\n"],"names":["StyledLoadingContainer","styled","display","justifyContent","alignItems","children","_jsx","Suspense","fallback","jsx","CircularProgress","size"],"mappings":"+GASA,MAAMA,kCAAyBC,OAAO,MAAPA,CAAc,CACzCC,QAAS,OACTC,eAAgB,SAChBC,WAAY,0BAGM,EAAGC,cACrBC,EAAAA,IAACC,EAAAA,UACGC,SACIF,EAACG,IAAAT,EACG,CAAAK,SAAAC,MAACI,EAAgB,CAACC,KAAM,OACHN,SAG5BA"}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var CircularProgress = require('@mui/material/CircularProgress');
|
|
6
|
-
var styles = require('@mui/material/styles');
|
|
7
|
-
|
|
8
|
-
const StyledLoadingContainer = styles.styled('div')({
|
|
9
|
-
display: 'flex',
|
|
10
|
-
justifyContent: 'center',
|
|
11
|
-
alignItems: 'center',
|
|
12
|
-
});
|
|
13
|
-
const LazyComponent = ({ children }) => (jsxRuntime.jsx(react.Suspense, { fallback: jsxRuntime.jsx(StyledLoadingContainer, { children: jsxRuntime.jsx(CircularProgress, { size: 56 }) }), children: children }));
|
|
14
|
-
|
|
15
|
-
module.exports = LazyComponent;
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Suspense as e}from"react";import t from"@mui/material/CircularProgress";import{styled as i}from"@mui/material/styles";const m=i("div")({display:"flex",justifyContent:"center",alignItems:"center"}),a=({children:i})=>r(e,{fallback:r(m,{children:r(t,{size:56})}),children:i});export{a as default};
|
|
16
2
|
//# sourceMappingURL=LazyComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyComponent.js","sources":["../../../../src/components/ui/LazyComponent/LazyComponent.tsx"],"sourcesContent":["import { Suspense, ReactNode } from 'react';\n\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { styled } from '@mui/material/styles';\n\ntype LazyComponentProps = {\n children: ReactNode;\n};\n\nconst StyledLoadingContainer = styled('div')({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nconst LazyComponent = ({ children }: LazyComponentProps) => (\n <Suspense\n fallback={\n <StyledLoadingContainer>\n <CircularProgress size={56} />\n </StyledLoadingContainer>\n }\n >\n {children}\n </Suspense>\n);\n\nexport default LazyComponent;\n"],"names":["styled","
|
|
1
|
+
{"version":3,"file":"LazyComponent.js","sources":["../../../../src/components/ui/LazyComponent/LazyComponent.tsx"],"sourcesContent":["import { Suspense, ReactNode } from 'react';\n\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { styled } from '@mui/material/styles';\n\ntype LazyComponentProps = {\n children: ReactNode;\n};\n\nconst StyledLoadingContainer = styled('div')({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nconst LazyComponent = ({ children }: LazyComponentProps) => (\n <Suspense\n fallback={\n <StyledLoadingContainer>\n <CircularProgress size={56} />\n </StyledLoadingContainer>\n }\n >\n {children}\n </Suspense>\n);\n\nexport default LazyComponent;\n"],"names":["StyledLoadingContainer","styled","display","justifyContent","alignItems","LazyComponent","children","_jsx","Suspense","fallback","CircularProgress","size"],"mappings":"qKASA,MAAMA,EAAyBC,EAAO,MAAPA,CAAc,CACzCC,QAAS,OACTC,eAAgB,SAChBC,WAAY,WAGVC,EAAgB,EAAGC,cACrBC,EAACC,GACGC,SACIF,EAACP,EACG,CAAAM,SAAAC,EAACG,EAAgB,CAACC,KAAM,OACHL,SAG5BA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material/styles"),t=require("@mui/material/Typography"),i=require("@mui/material/Box"),s=require("../../../providers/TranslationProvider.cjs.js");const a=r.styled(i)((({theme:e})=>({marginTop:e.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"})));module.exports=()=>{const{translate:r}=s.useTranslation();return e.jsx(a,{children:e.jsx(t,{children:r("Page_Not_Found")})})};
|
|
2
|
+
//# sourceMappingURL=NotFoundPage.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFoundPage.cjs.js","sources":["../../../../src/components/ui/NotFoundPage/NotFoundPage.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport { useTranslation } from '../../../providers/TranslationProvider';\n\nconst StyledTextContainer = styled(Box)(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\n\nconst NotFoundPage = () => {\n const { translate } = useTranslation();\n return (\n <StyledTextContainer>\n <Typography>{translate('Page_Not_Found')}</Typography>\n </StyledTextContainer>\n );\n};\n\nexport default NotFoundPage;\n"],"names":["StyledTextContainer","styled","Box","theme","marginTop","spacing","display","justifyContent","alignItems","translate","useTranslation","_jsx","children","Typography"],"mappings":"kNAKA,MAAMA,EAAsBC,EAAAA,OAAOC,EAAPD,EAAY,EAAGE,YAAa,CACpDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,4BAGK,KACjB,MAAMC,UAAEA,GAAcC,EAAAA,iBACtB,OACIC,MAACX,EAAmB,CAAAY,SAChBD,EAAAA,IAACE,EAAU,CAAAD,SAAEH,EAAU,qBAE7B"}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var styles = require('@mui/material/styles');
|
|
5
|
-
var Typography = require('@mui/material/Typography');
|
|
6
|
-
var Box = require('@mui/material/Box');
|
|
7
|
-
var TranslationProvider = require('../../../providers/TranslationProvider.js');
|
|
8
|
-
|
|
9
|
-
const StyledTextContainer = styles.styled(props => jsxRuntime.jsx(Box, { ...props }))(({ theme }) => ({
|
|
10
|
-
marginTop: theme.spacing(2),
|
|
11
|
-
display: 'flex',
|
|
12
|
-
justifyContent: 'center',
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
}));
|
|
15
|
-
const NotFoundPage = () => {
|
|
16
|
-
const { translate } = TranslationProvider.useTranslation();
|
|
17
|
-
return (jsxRuntime.jsx(StyledTextContainer, { children: jsxRuntime.jsx(Typography, { children: translate('Page_Not_Found') }) }));
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = NotFoundPage;
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{styled as t}from"@mui/material/styles";import e from"@mui/material/Typography";import i from"@mui/material/Box";import{useTranslation as o}from"../../../providers/TranslationProvider.js";const m=t(i)((({theme:r})=>({marginTop:r.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"}))),a=()=>{const{translate:t}=o();return r(m,{children:r(e,{children:t("Page_Not_Found")})})};export{a as default};
|
|
21
2
|
//# sourceMappingURL=NotFoundPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotFoundPage.js","sources":["../../../../src/components/ui/NotFoundPage/NotFoundPage.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport { useTranslation } from '../../../providers/TranslationProvider';\n\nconst StyledTextContainer = styled(
|
|
1
|
+
{"version":3,"file":"NotFoundPage.js","sources":["../../../../src/components/ui/NotFoundPage/NotFoundPage.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport { useTranslation } from '../../../providers/TranslationProvider';\n\nconst StyledTextContainer = styled(Box)(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\n\nconst NotFoundPage = () => {\n const { translate } = useTranslation();\n return (\n <StyledTextContainer>\n <Typography>{translate('Page_Not_Found')}</Typography>\n </StyledTextContainer>\n );\n};\n\nexport default NotFoundPage;\n"],"names":["StyledTextContainer","styled","Box","theme","marginTop","spacing","display","justifyContent","alignItems","NotFoundPage","translate","useTranslation","_jsx","children","Typography"],"mappings":"0OAKA,MAAMA,EAAsBC,EAAOC,EAAPD,EAAY,EAAGE,YAAa,CACpDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,aAGVC,EAAe,KACjB,MAAMC,UAAEA,GAAcC,IACtB,OACIC,EAACZ,EAAmB,CAAAa,SAChBD,EAACE,EAAU,CAAAD,SAAEH,EAAU,qBAE7B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react"),r=require("../../../providers/TranslationProvider.cjs.js");module.exports=({children:t})=>{const{translate:i}=r.useTranslation();return e.useEffect((()=>(document.title=`${i(t)} | Flipdish`,()=>{document.title="Flipdish Portal"})),[t]),null};
|
|
2
|
+
//# sourceMappingURL=DocumentTitle.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentTitle.cjs.js","sources":["../../../../src/components/ui/PageLayout/DocumentTitle.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useTranslation } from '../../../providers/TranslationProvider';\n\ntype Props = {\n children: string;\n};\n\nconst DEFAULT_TITLE = 'Flipdish Portal';\n\nconst DocumentTitle = ({ children }: Props) => {\n const { translate } = useTranslation();\n\n useEffect(() => {\n document.title = `${translate(children as TranslationId)} | Flipdish`;\n return () => {\n document.title = DEFAULT_TITLE;\n };\n }, [children]);\n\n return null;\n};\n\nexport default DocumentTitle;\n"],"names":["children","translate","useTranslation","useEffect","document","title"],"mappings":"8GASsB,EAAGA,eACrB,MAAMC,UAAEA,GAAcC,EAAAA,iBAStB,OAPAC,EAAAA,WAAU,KACNC,SAASC,MAAQ,GAAGJ,EAAUD,gBACvB,KACHI,SAASC,MARC,iBAQoB,IAEnC,CAACL,IAEG,IAAI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useEffect as t}from"react";import{useTranslation as r}from"../../../providers/TranslationProvider.js";const o=({children:o})=>{const{translate:e}=r();return t((()=>(document.title=`${e(o)} | Flipdish`,()=>{document.title="Flipdish Portal"})),[o]),null};export{o as default};
|
|
2
|
+
//# sourceMappingURL=DocumentTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentTitle.js","sources":["../../../../src/components/ui/PageLayout/DocumentTitle.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useTranslation } from '../../../providers/TranslationProvider';\n\ntype Props = {\n children: string;\n};\n\nconst DEFAULT_TITLE = 'Flipdish Portal';\n\nconst DocumentTitle = ({ children }: Props) => {\n const { translate } = useTranslation();\n\n useEffect(() => {\n document.title = `${translate(children as TranslationId)} | Flipdish`;\n return () => {\n document.title = DEFAULT_TITLE;\n };\n }, [children]);\n\n return null;\n};\n\nexport default DocumentTitle;\n"],"names":["DocumentTitle","children","translate","useTranslation","useEffect","document","title"],"mappings":"6GAOA,MAEMA,EAAgB,EAAGC,eACrB,MAAMC,UAAEA,GAAcC,IAStB,OAPAC,GAAU,KACNC,SAASC,MAAQ,GAAGJ,EAAUD,gBACvB,KACHI,SAASC,MARC,iBAQoB,IAEnC,CAACL,IAEG,IAAI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=require("react/jsx-runtime"),a=require("@mui/material/styles");module.exports=({children:n,className:e="",fullWidth:r,fullSize:s,noTopSpace:t})=>{const g=a.useTheme(),m=a.styled("div")((()=>({...r&&{marginLeft:-20,marginRight:-20},...s&&{[g.breakpoints.up("sm")]:{marginLeft:g.spacing(-3),marginRight:g.spacing(-3)}},...t&&{marginTop:`${g.spacing(-3)} !important`,[g.breakpoints.only("xs")]:{marginTop:`${g.spacing(-2)} !important`}},[g.breakpoints.only("sm")]:{marginLeft:g.spacing(-3),marginRight:g.spacing(-3)},[g.breakpoints.only("xs")]:{marginLeft:g.spacing(-2),marginRight:g.spacing(-2)}})));return i.jsx(m,{className:e,children:n})};
|
|
2
|
+
//# sourceMappingURL=FullWidthContainer.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FullWidthContainer.cjs.js","sources":["../../../../src/components/ui/PageLayout/FullWidthContainer.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { styled, useTheme, Theme } from '@mui/material/styles';\n\ntype Props = {\n className?: string;\n children: ReactNode;\n fullWidth?: boolean;\n fullSize?: boolean;\n noTopSpace?: boolean;\n};\n\nconst FullWidthContainer = ({ children, className = '', fullWidth, fullSize, noTopSpace }: Props) => {\n const theme = useTheme<Theme>();\n\n const FullWidthDiv = styled('div')(() => ({\n // Base styles\n ...(fullWidth && {\n marginLeft: -20,\n marginRight: -20,\n }),\n ...(fullSize && {\n [theme.breakpoints.up('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n }),\n ...(noTopSpace && {\n marginTop: `${theme.spacing(-3)} !important`,\n [theme.breakpoints.only('xs')]: {\n marginTop: `${theme.spacing(-2)} !important`,\n },\n }),\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n },\n }));\n\n return <FullWidthDiv className={className}>{children}</FullWidthDiv>;\n};\n\nexport default FullWidthContainer;\n"],"names":["children","className","fullWidth","fullSize","noTopSpace","theme","useTheme","FullWidthDiv","styled","marginLeft","marginRight","breakpoints","up","spacing","marginTop","only","_jsx"],"mappings":"iGAW2B,EAAGA,WAAUC,YAAY,GAAIC,YAAWC,WAAUC,iBACzE,MAAMC,EAAQC,EAAAA,WAERC,EAAeC,EAAAA,OAAO,MAAPA,EAAc,KAAO,IAElCN,GAAa,CACbO,YAAa,GACbC,aAAc,OAEdP,GAAY,CACZ,CAACE,EAAMM,YAAYC,GAAG,OAAQ,CAC1BH,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,QAGhCT,GAAc,CACdU,UAAW,GAAGT,EAAMQ,SAAS,gBAC7B,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BD,UAAW,GAAGT,EAAMQ,SAAS,kBAGrC,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,IAEhC,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,QAIpC,OAAOG,EAAAA,IAACT,EAAa,CAAAN,UAAWA,EAASD,SAAGA,GAAwB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{useTheme as a,styled as n}from"@mui/material/styles";const r=({children:r,className:t="",fullWidth:s,fullSize:m,noTopSpace:g})=>{const p=a(),e=n("div")((()=>({...s&&{marginLeft:-20,marginRight:-20},...m&&{[p.breakpoints.up("sm")]:{marginLeft:p.spacing(-3),marginRight:p.spacing(-3)}},...g&&{marginTop:`${p.spacing(-3)} !important`,[p.breakpoints.only("xs")]:{marginTop:`${p.spacing(-2)} !important`}},[p.breakpoints.only("sm")]:{marginLeft:p.spacing(-3),marginRight:p.spacing(-3)},[p.breakpoints.only("xs")]:{marginLeft:p.spacing(-2),marginRight:p.spacing(-2)}})));return i(e,{className:t,children:r})};export{r as default};
|
|
2
|
+
//# sourceMappingURL=FullWidthContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FullWidthContainer.js","sources":["../../../../src/components/ui/PageLayout/FullWidthContainer.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { styled, useTheme, Theme } from '@mui/material/styles';\n\ntype Props = {\n className?: string;\n children: ReactNode;\n fullWidth?: boolean;\n fullSize?: boolean;\n noTopSpace?: boolean;\n};\n\nconst FullWidthContainer = ({ children, className = '', fullWidth, fullSize, noTopSpace }: Props) => {\n const theme = useTheme<Theme>();\n\n const FullWidthDiv = styled('div')(() => ({\n // Base styles\n ...(fullWidth && {\n marginLeft: -20,\n marginRight: -20,\n }),\n ...(fullSize && {\n [theme.breakpoints.up('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n }),\n ...(noTopSpace && {\n marginTop: `${theme.spacing(-3)} !important`,\n [theme.breakpoints.only('xs')]: {\n marginTop: `${theme.spacing(-2)} !important`,\n },\n }),\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n },\n }));\n\n return <FullWidthDiv className={className}>{children}</FullWidthDiv>;\n};\n\nexport default FullWidthContainer;\n"],"names":["FullWidthContainer","children","className","fullWidth","fullSize","noTopSpace","theme","useTheme","FullWidthDiv","styled","marginLeft","marginRight","breakpoints","up","spacing","marginTop","only","_jsx"],"mappings":"oGAWA,MAAMA,EAAqB,EAAGC,WAAUC,YAAY,GAAIC,YAAWC,WAAUC,iBACzE,MAAMC,EAAQC,IAERC,EAAeC,EAAO,MAAPA,EAAc,KAAO,IAElCN,GAAa,CACbO,YAAa,GACbC,aAAc,OAEdP,GAAY,CACZ,CAACE,EAAMM,YAAYC,GAAG,OAAQ,CAC1BH,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,QAGhCT,GAAc,CACdU,UAAW,GAAGT,EAAMQ,SAAS,gBAC7B,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BD,UAAW,GAAGT,EAAMQ,SAAS,kBAGrC,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,IAEhC,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,QAIpC,OAAOG,EAACT,EAAa,CAAAN,UAAWA,EAASD,SAAGA,GAAwB"}
|
|
@@ -0,0 +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"),u=require("../../../utilities/renderUtilities.cjs.js"),g=require("../../../utilities/validation.cjs.js"),h=require("../Spacer/Spacer.cjs.js"),x=require("../../../node_modules/.pnpm/react-router@6.27.0_react@18.3.1/node_modules/react-router/dist/index.cjs.js");const j=1112,f=a.styled("div")((({theme:e,fluid:i})=>({maxWidth:i?"none":j,[e.breakpoints.down("md")]:{maxWidth:"none"},margin:e.spacing(2,4)}))),y=a.styled(n)((({theme:e})=>({[e.breakpoints.down("sm")]:{width:"100%",paddingTop:e.spacing(2)}}))),b=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)}}))),v=a.styled(n)((({theme:e})=>({paddingTop:e.spacing(2)}))),k=a.styled(n)((()=>({flexGrow:1}))),q=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)}}))),T=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)}}))),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"}}))),B=a.styled(n)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),W=a.styled(s)((()=>({lineHeight:"26px"}))),L=({title:i})=>e.jsx(s,{variant:"h5",component:"h2",children:i});exports.PageTitle=L,exports.default=r=>{const{actionBtnTitle:s,caption:j,children:C,contextButtons:F,documentTitle:_,fluid:A=!1,fullWidth:P,header:I,hideHeader:R,actionButtonLink:D,openLinkInNewTab:G=!1,pageHeader:H,showActionButton:M,showAddIcon:z,strictToParent:E,title:N,titleComponent:S,toParent:U}=r,{translate:O}=p.useTranslation(),Q=x.useNavigate(),$=a.useTheme(),J=o($.breakpoints.down("md")),K=u.getMicroFrontendAttribute("data-portal-base-url")||"/",V=D?.startsWith("https://"),X=V?D:void 0!==D?g.joinUrlPaths(K,D):"";return e.jsxs(f,{fluid:A,children:[_&&e.jsx(d,{children:_}),H||null,e.jsxs(w,{children:[H&&e.jsx(h,{size:16,variant:"vertical"}),!R&&e.jsxs(b,{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(T,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!S,component:"button",onClick:()=>{U&&E||U&&history.length<3?Q(U):Q(-1)},children:e.jsx(t,{})})}),e.jsx(B,{item:!0,children:F&&F.map((i=>e.jsx(e.Fragment,{children:i})))})]}),e.jsxs(v,{item:!0,container:!0,children:[e.jsxs(k,{item:!0,children:[S?e.jsx(S,{}):e.jsx(L,{title:N}),j&&e.jsx(W,{variant:"caption",component:"h3",children:j})]}),M&&e.jsxs(e.Fragment,{children:[J&&e.jsx(h,{size:56,variant:"vertical"}),e.jsx(y,{item:!0,children:e.jsxs(m,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${s}`,href:G||V?X:"",target:G?"_blank":void 0,rel:G?"noopener noreferrer":void 0,onClick:G||V?()=>{}:()=>Q(D),children:[z&&e.jsx(i,{}),s&&O(s)]})})]})]})]}),e.jsxs(l,{fullWidth:P,children:[I?e.jsx(q,{children:I}):null,e.jsx(c,{identifier:_,children:e.jsx(e.Fragment,{children:C})})]})]})]})},exports.maxWidth=j;
|
|
2
|
+
//# sourceMappingURL=PageLayout.cjs.js.map
|
|
@@ -0,0 +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';\nimport { useNavigate } from 'react-router-dom';\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};\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 } = props;\n const { translate } = useTranslation();\n const navigate = useNavigate();\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","translate","useTranslation","navigate","useNavigate","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":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React, { ReactNode, ComponentType } from 'react';
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
actionBtnTitle?: TranslationId;
|
|
6
|
+
caption?: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
contextButtons?: ReactNode[];
|
|
9
|
+
documentTitle: string;
|
|
10
|
+
fluid?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
header?: ReactNode;
|
|
13
|
+
hideHeader?: boolean;
|
|
14
|
+
actionButtonLink?: string;
|
|
15
|
+
pageHeader?: ReactNode;
|
|
16
|
+
showActionButton?: boolean;
|
|
17
|
+
showAddIcon?: boolean;
|
|
18
|
+
strictToParent?: boolean;
|
|
19
|
+
title: ReactNode;
|
|
20
|
+
titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;
|
|
21
|
+
toParent?: string;
|
|
22
|
+
openLinkInNewTab?: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare const PageLayout: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { type Props, PageLayout as default };
|
|
@@ -0,0 +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 r from"@mui/icons-material/ArrowBack";import o from"@mui/material/Grid";import a from"@mui/material/IconButton";import{styled as m,useTheme as d}from"@mui/material/styles";import p from"@mui/material/Typography";import l 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{useTranslation as u}from"../../../providers/TranslationProvider.js";import{getMicroFrontendAttribute as f}from"../../../utilities/renderUtilities.js";import{joinUrlPaths as b}from"../../../utilities/validation.js";import x from"../Spacer/Spacer.js";import{useNavigate as k}from"../../../node_modules/.pnpm/react-router@6.27.0_react@18.3.1/node_modules/react-router/dist/index.js";const v=1112,w=m("div")((({theme:i,fluid:t})=>({maxWidth:t?"none":v,[i.breakpoints.down("md")]:{maxWidth:"none"},margin:i.spacing(2,4)}))),B=m(o)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),y=m(o)((({theme:i})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:i.spacing(3),paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingTop:i.spacing(2),paddingBottom:i.spacing(3)}}))),T=m(o)((({theme:i})=>({paddingTop:i.spacing(2)}))),W=m(o)((()=>({flexGrow:1}))),j=m("div")((({theme:i})=>({maxWidth:v,paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingBottom:i.spacing(2),paddingLeft:i.spacing(2),paddingRight:i.spacing(2)}}))),L=m(a)((({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)}}))),C=m("div")((({theme:i})=>({maxWidth:v,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(o)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),I=m(p)((()=>({lineHeight:"26px"}))),R=({title:i})=>t(p,{variant:"h5",component:"h2",children:i}),_=a=>{const{actionBtnTitle:m,caption:p,children:v,contextButtons:_,documentTitle:D,fluid:F=!1,fullWidth:G,header:H,hideHeader:P,actionButtonLink:z,openLinkInNewTab:E=!1,pageHeader:S,showActionButton:M,showAddIcon:N,strictToParent:Q,title:U,titleComponent:$,toParent:q}=a,{translate:J}=u(),K=k(),O=d(),V=l(O.breakpoints.down("md")),X=f("data-portal-base-url")||"/",Y=z?.startsWith("https://"),Z=Y?z:void 0!==z?b(X,z):"";return i(w,{fluid:F,children:[D&&t(c,{children:D}),S||null,i(C,{children:[S&&t(x,{size:16,variant:"vertical"}),!P&&i(y,{container:!0,alignItems:"center",direction:"column",children:[i(o,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:[q&&t(o,{item:!0,children:t(L,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!$,component:"button",onClick:()=>{q&&Q||q&&history.length<3?K(q):K(-1)},children:t(r,{})})}),t(A,{item:!0,children:_&&_.map((i=>t(n,{children:i})))})]}),i(T,{item:!0,container:!0,children:[i(W,{item:!0,children:[$?t($,{}):t(R,{title:U}),p&&t(I,{variant:"caption",component:"h3",children:p})]}),M&&i(n,{children:[V&&t(x,{size:56,variant:"vertical"}),t(B,{item:!0,children:i(g,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${m}`,href:E||Y?Z:"",target:E?"_blank":void 0,rel:E?"noopener noreferrer":void 0,onClick:E||Y?()=>{}:()=>K(z),children:[N&&t(e,{}),m&&J(m)]})})]})]})]}),i(s,{fullWidth:G,children:[H?t(j,{children:H}):null,t(h,{identifier:D,children:t(n,{children:v})})]})]})]})};export{R as PageTitle,_ as default,v as maxWidth};
|
|
2
|
+
//# sourceMappingURL=PageLayout.js.map
|