@xyo-network/react-webapp 2.25.71 → 2.25.74
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/esm/components/ErrorPage.d.ts +3 -2
- package/dist/esm/components/ErrorPage.js +1 -1
- package/dist/esm/components/ErrorPage.js.map +1 -1
- package/dist/esm/components/Page.d.ts +1 -1
- package/dist/esm/components/Page.js +1 -1
- package/dist/esm/components/Page.js.map +1 -1
- package/package.json +5 -5
- package/src/components/ErrorPage.tsx +3 -3
- package/src/components/Page.tsx +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { WebAppPageProps } from './Page';
|
|
3
|
+
export declare const WebAppErrorPage: React.FC<WebAppPageProps>;
|
|
3
4
|
/** @deprecated use WebAppErrorPage instead */
|
|
4
|
-
export declare const ErrorPage: ()
|
|
5
|
+
export declare const ErrorPage: import("react").FC<WebAppPageProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ButtonEx } from '@xylabs/react-button';
|
|
3
3
|
import { WebAppPage } from './Page';
|
|
4
|
-
export const WebAppErrorPage = () => (_jsxs(WebAppPage, { title: "Oops! Something went wrong", children: [_jsx("h1", { children: "Oops! Something went wrong!" }), _jsx(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })] }));
|
|
4
|
+
export const WebAppErrorPage = (props) => (_jsxs(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [_jsx("h1", { children: "Oops! Something went wrong!" }), _jsx(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })] }));
|
|
5
5
|
/** @deprecated use WebAppErrorPage instead */
|
|
6
6
|
export const ErrorPage = WebAppErrorPage;
|
|
7
7
|
//# sourceMappingURL=ErrorPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorPage.js","sourceRoot":"","sources":["../../../src/components/ErrorPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ErrorPage.js","sourceRoot":"","sources":["../../../src/components/ErrorPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAmB,MAAM,QAAQ,CAAA;AAEpD,MAAM,CAAC,MAAM,eAAe,GAA8B,CAAC,KAAK,EAAE,EAAE,CAAC,CACnE,MAAC,UAAU,IAAC,KAAK,EAAC,4BAA4B,KAAK,KAAK,aACtD,uDAAoC,EACpC,KAAC,QAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,OAAO,EAAC,WAAW,yBAE3B,IACA,CACd,CAAA;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { ContainerProps } from '@mui/material';
|
|
|
2
2
|
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
export interface WebAppPageProps extends FlexBoxProps {
|
|
5
|
-
container?: ContainerProps['maxWidth'];
|
|
5
|
+
container?: ContainerProps['maxWidth'] | 'none';
|
|
6
6
|
disableGutters?: boolean;
|
|
7
7
|
breadcrumbs?: ReactNode;
|
|
8
8
|
disableBreadcrumbGutter?: boolean;
|
|
@@ -14,7 +14,7 @@ export const WebAppPage = ({ spacing = 1, disableBreadcrumbGutter, disableGutter
|
|
|
14
14
|
await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname });
|
|
15
15
|
}, [pathname, title, userEvents]);
|
|
16
16
|
const Body = (props) => (_jsxs(FlexGrowCol, { gap: 1, paddingY: spacing, justifyContent: "flex-start", alignItems: "stretch", ...props, children: [_jsx(FlexRow, { justifyContent: "flex-start", marginX: disableBreadcrumbGutter ? 0 : spacing, children: breadcrumbs }), children] }));
|
|
17
|
-
return (_jsxs(FlexGrowCol, { alignItems: "stretch", justifyContent: "flex-start", minHeight: 0, maxWidth: "100vw", overflow: "visible scroll", children: [_jsx(Helmet, { title: title }), container ? (_jsx(Container, { disableGutters: disableGutters, style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }, maxWidth: container, children: _jsx(Body, { ...props }) })) : (_jsx(Body, { paddingX: disableGutters ? 0 : 1, ...props }))] }));
|
|
17
|
+
return (_jsxs(FlexGrowCol, { alignItems: "stretch", justifyContent: "flex-start", minHeight: 0, maxWidth: "100vw", overflow: "visible scroll", children: [_jsx(Helmet, { title: title }), container && container !== 'none' ? (_jsx(Container, { disableGutters: disableGutters, style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }, maxWidth: container, children: _jsx(Body, { ...props }) })) : (_jsx(Body, { paddingX: disableGutters ? 0 : 1, ...props }))] }));
|
|
18
18
|
};
|
|
19
19
|
/** @deprecated use WebAppPagePage instead */
|
|
20
20
|
export const FlexPage = WebAppPage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,eAAe,CAAA;AACzD,OAAO,EAAgB,WAAW,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAS9C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,uBAAuB,EAAE,cAAc,EAA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,KAAK,GAAI,EACvB,SAAS,IAAI,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CACnC,KAAC,SAAS,IACR,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,YAAY,EAAE,EACrH,QAAQ,EAAE,SAAS,YAEnB,KAAC,IAAI,OAAK,KAAK,GAAI,GACT,CACb,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAM,KAAK,GAAI,CACtD,IACW,CACf,CAAA;AACH,CAAC,CAAA;AAED,6CAA6C;AAC7C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"@xylabs/react-flexbox": "^2.14.4",
|
|
18
18
|
"@xylabs/react-pixel": "^2.14.4",
|
|
19
19
|
"@xylabs/react-shared": "^2.14.4",
|
|
20
|
-
"@xyo-network/react-app-settings": "^2.25.
|
|
21
|
-
"@xyo-network/react-appbar": "^2.25.
|
|
22
|
-
"@xyo-network/react-footer": "^2.25.
|
|
23
|
-
"@xyo-network/react-shared": "^2.25.
|
|
20
|
+
"@xyo-network/react-app-settings": "^2.25.73",
|
|
21
|
+
"@xyo-network/react-appbar": "^2.25.74",
|
|
22
|
+
"@xyo-network/react-footer": "^2.25.74",
|
|
23
|
+
"@xyo-network/react-shared": "^2.25.74",
|
|
24
24
|
"react": "^18.2.0",
|
|
25
25
|
"react-dom": "^18.2.0",
|
|
26
26
|
"react-helmet": "^6.1.0",
|
|
@@ -85,6 +85,6 @@
|
|
|
85
85
|
},
|
|
86
86
|
"sideEffects": false,
|
|
87
87
|
"types": "dist/esm/index.d.ts",
|
|
88
|
-
"version": "2.25.
|
|
88
|
+
"version": "2.25.74",
|
|
89
89
|
"packageManager": "yarn@3.1.1"
|
|
90
90
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ButtonEx } from '@xylabs/react-button'
|
|
2
2
|
|
|
3
|
-
import { WebAppPage } from './Page'
|
|
3
|
+
import { WebAppPage, WebAppPageProps } from './Page'
|
|
4
4
|
|
|
5
|
-
export const WebAppErrorPage = () => (
|
|
6
|
-
<WebAppPage title="Oops! Something went wrong">
|
|
5
|
+
export const WebAppErrorPage: React.FC<WebAppPageProps> = (props) => (
|
|
6
|
+
<WebAppPage title="Oops! Something went wrong" {...props}>
|
|
7
7
|
<h1>Oops! Something went wrong!</h1>
|
|
8
8
|
<ButtonEx href="/" variant="contained">
|
|
9
9
|
Homepage
|
package/src/components/Page.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { ReactNode } from 'react'
|
|
|
6
6
|
import { Helmet } from 'react-helmet'
|
|
7
7
|
import { useLocation } from 'react-router-dom'
|
|
8
8
|
export interface WebAppPageProps extends FlexBoxProps {
|
|
9
|
-
container?: ContainerProps['maxWidth']
|
|
9
|
+
container?: ContainerProps['maxWidth'] | 'none'
|
|
10
10
|
disableGutters?: boolean
|
|
11
11
|
breadcrumbs?: ReactNode
|
|
12
12
|
disableBreadcrumbGutter?: boolean
|
|
@@ -37,7 +37,7 @@ export const WebAppPage: React.FC<WebAppPageProps> = ({ spacing = 1, disableBrea
|
|
|
37
37
|
return (
|
|
38
38
|
<FlexGrowCol alignItems="stretch" justifyContent="flex-start" minHeight={0} maxWidth="100vw" overflow="visible scroll">
|
|
39
39
|
<Helmet title={title} />
|
|
40
|
-
{container ? (
|
|
40
|
+
{container && container !== 'none' ? (
|
|
41
41
|
<Container
|
|
42
42
|
disableGutters={disableGutters}
|
|
43
43
|
style={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}
|