@xyo-network/react-webapp 2.25.66 → 2.25.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Chrome.js +2 -2
- package/dist/cjs/components/Chrome.js.map +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Chrome.js +2 -2
- package/dist/esm/components/Chrome.js.map +1 -1
- package/package.json +5 -5
- package/src/components/Chrome.stories.tsx +12 -2
- package/src/components/Chrome.tsx +11 -9
|
@@ -11,8 +11,8 @@ const react_shared_1 = require("@xyo-network/react-shared");
|
|
|
11
11
|
const react_helmet_1 = require("react-helmet");
|
|
12
12
|
const ErrorPage_1 = require("./ErrorPage");
|
|
13
13
|
const WebAppChrome = (_a) => {
|
|
14
|
-
var { menuItems, navigationType, footerElevation = 4, errorPage, appbar, footer, children, appName } = _a, props = tslib_1.__rest(_a, ["menuItems", "navigationType", "footerElevation", "errorPage", "appbar", "footer", "children", "appName"]);
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexCol, Object.assign({ alignItems: "stretch", height: "100vh" }, props, { children: [(0, jsx_runtime_1.jsx)(react_helmet_1.Helmet, Object.assign({ defaultTitle: appName, titleTemplate: `%s | ${appName}` }, { children: (0, jsx_runtime_1.jsx)("meta", { content: "website", property: "og:type" }) })), appbar !== null && appbar !== void 0 ? appbar : (0, jsx_runtime_1.jsx)(react_appbar_1.ApplicationAppBar, { menuItems: navigationType === 'menu' ? menuItems : undefined }), (0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexGrowRow, Object.assign({ alignItems: "stretch" }, { children: [navigationType !== 'menu' ? menuItems : null, (0, jsx_runtime_1.jsx)(react_flexbox_1.FlexGrowCol, Object.assign({
|
|
14
|
+
var { menuItems, navigationType = 'menu', footerElevation = 4, errorPage, appbar, footer, children, appName } = _a, props = tslib_1.__rest(_a, ["menuItems", "navigationType", "footerElevation", "errorPage", "appbar", "footer", "children", "appName"]);
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexCol, Object.assign({ alignItems: "stretch", overflow: "hidden", height: "100vh" }, props, { children: [(0, jsx_runtime_1.jsx)(react_helmet_1.Helmet, Object.assign({ defaultTitle: appName, titleTemplate: `%s | ${appName}` }, { children: (0, jsx_runtime_1.jsx)("meta", { content: "website", property: "og:type" }) })), appbar !== null && appbar !== void 0 ? appbar : (0, jsx_runtime_1.jsx)(react_appbar_1.ApplicationAppBar, { menuItems: navigationType === 'menu' ? menuItems : undefined }), (0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexGrowRow, Object.assign({ overflow: "hidden", alignItems: "stretch" }, { children: [navigationType !== 'menu' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [menuItems, (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical" })] })) : null, (0, jsx_runtime_1.jsx)(react_flexbox_1.FlexGrowCol, Object.assign({ justifyContent: "flex-start", alignItems: "stretch" }, { children: (0, jsx_runtime_1.jsx)(react_shared_1.ErrorBoundary, Object.assign({ fallback: errorPage !== null && errorPage !== void 0 ? errorPage : (0, jsx_runtime_1.jsx)(ErrorPage_1.WebAppErrorPage, {}) }, { children: children })) }))] })), (0, jsx_runtime_1.jsx)(react_flexbox_1.FlexCol, Object.assign({ alignItems: "stretch" }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ elevation: footerElevation, square: true }, { children: footer !== null && footer !== void 0 ? footer : (0, jsx_runtime_1.jsx)(react_footer_1.Footer, { dynamicHeight: true }) })) }))] })));
|
|
16
16
|
};
|
|
17
17
|
exports.WebAppChrome = WebAppChrome;
|
|
18
18
|
//# sourceMappingURL=Chrome.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chrome.js","sourceRoot":"","sources":["../../../src/components/Chrome.tsx"],"names":[],"mappings":";;;;;A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AAG,QAAQ,IAAiB,IACzE,KACF,EACd,uBAAC,uBAAO,kBAAC,UAAU,EAAC,SAAS,gBAC3B,uBAAC,gBAAK,kBAAC,SAAS,EAAE,eAAe,EAAE,MAAM,sBACtC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,uBAAC,qBAAM,IAAC,aAAa,SAAG,IAC7B,IACA,KACF,CACX,CAAA;AACH,CAAC,CAAA;AAzBY,QAAA,YAAY,gBAyBxB"}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Divider, Paper } from '@mui/material';
|
|
3
3
|
import { FlexCol, FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox';
|
|
4
|
-
import { ApplicationAppBar } from '@xyo-network/react-appbar';
|
|
4
|
+
import { ApplicationAppBar, SystemToolbar } from '@xyo-network/react-appbar';
|
|
5
5
|
import { Footer } from '@xyo-network/react-footer';
|
|
6
6
|
import { ErrorBoundary } from '@xyo-network/react-shared';
|
|
7
7
|
import { Helmet } from 'react-helmet';
|
|
8
8
|
import { WebAppErrorPage } from './ErrorPage';
|
|
9
9
|
export const WebAppChrome = ({ menuItems, navigationType = 'menu', footerElevation = 4, errorPage, appbar, footer, children, appName, ...props }) => {
|
|
10
|
-
return (_jsxs(FlexCol, { alignItems: "stretch", height: "100vh", ...props, children: [_jsx(Helmet, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: _jsx("meta", { content: "website", property: "og:type" }) }), appbar ?? _jsx(ApplicationAppBar, { menuItems: navigationType === 'menu' ? menuItems : undefined }), _jsxs(FlexGrowRow, { alignItems: "stretch", children: [navigationType !== 'menu' ? (_jsxs(_Fragment, { children: [menuItems, _jsx(Divider, { orientation: "vertical" })] })) : null, _jsx(FlexGrowCol, {
|
|
10
|
+
return (_jsxs(FlexCol, { alignItems: "stretch", overflow: "hidden", height: "100vh", ...props, children: [_jsx(Helmet, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: _jsx("meta", { content: "website", property: "og:type" }) }), appbar ?? _jsx(ApplicationAppBar, { systemToolbar: _jsx(SystemToolbar, { menuItems: navigationType === 'menu' ? menuItems : undefined }) }), _jsxs(FlexGrowRow, { overflow: "hidden", alignItems: "stretch", children: [navigationType !== 'menu' ? (_jsxs(_Fragment, { children: [menuItems, _jsx(Divider, { orientation: "vertical" })] })) : null, _jsx(FlexGrowCol, { justifyContent: "flex-start", alignItems: "stretch", children: _jsx(ErrorBoundary, { fallback: errorPage ?? _jsx(WebAppErrorPage, {}), children: children }) })] }), _jsx(FlexCol, { alignItems: "stretch", children: _jsx(Paper, { elevation: footerElevation, square: true, children: footer ?? _jsx(Footer, { dynamicHeight: true }) }) })] }));
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Chrome.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chrome.js","sourceRoot":"","sources":["../../../src/components/Chrome.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAgB,OAAO,EAAE,WAAW,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"Chrome.js","sourceRoot":"","sources":["../../../src/components/Chrome.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAgB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;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AAG,YAAG,QAAQ,GAAiB,GACzE,IACF,EACd,KAAC,OAAO,IAAC,UAAU,EAAC,SAAS,YAC3B,KAAC,KAAK,IAAC,SAAS,EAAE,eAAe,EAAE,MAAM,kBACtC,MAAM,IAAI,KAAC,MAAM,IAAC,aAAa,SAAG,GAC7B,GACA,IACF,CACX,CAAA;AACH,CAAC,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.68",
|
|
21
|
+
"@xyo-network/react-appbar": "^2.25.69",
|
|
22
|
+
"@xyo-network/react-footer": "^2.25.69",
|
|
23
|
+
"@xyo-network/react-shared": "^2.25.69",
|
|
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.69",
|
|
89
89
|
"packageManager": "yarn@3.1.1"
|
|
90
90
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Breadcrumbs, List } from '@mui/material'
|
|
3
3
|
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
4
4
|
import { LinkEx } from '@xylabs/react-common'
|
|
5
|
-
import { FlexCol } from '@xylabs/react-flexbox'
|
|
5
|
+
import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
6
6
|
import { SiteMenuListItem } from '@xyo-network/react-appbar'
|
|
7
7
|
import { BrowserRouter } from 'react-router-dom'
|
|
8
8
|
|
|
@@ -20,6 +20,8 @@ const StorybookEntry = {
|
|
|
20
20
|
title: 'webapp/WebAppChrome',
|
|
21
21
|
} as ComponentMeta<typeof WebAppChrome>
|
|
22
22
|
|
|
23
|
+
const rowArray = [32, 64, 128, 256, 512, 1024]
|
|
24
|
+
|
|
23
25
|
const Template: ComponentStory<typeof WebAppChrome> = (args) => {
|
|
24
26
|
return (
|
|
25
27
|
<FlexCol height="80vh" alignItems="stretch" overflow="hidden">
|
|
@@ -38,7 +40,15 @@ const Template: ComponentStory<typeof WebAppChrome> = (args) => {
|
|
|
38
40
|
<LinkEx>BreadCrumbs</LinkEx>
|
|
39
41
|
</Breadcrumbs>
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
>
|
|
44
|
+
{rowArray.map((height) => {
|
|
45
|
+
return (
|
|
46
|
+
<FlexRow key={height} bgcolor="red" height={height}>
|
|
47
|
+
{height}
|
|
48
|
+
</FlexRow>
|
|
49
|
+
)
|
|
50
|
+
})}
|
|
51
|
+
</WebAppPage>
|
|
42
52
|
</WebAppChrome>
|
|
43
53
|
</BrowserRouter>
|
|
44
54
|
</FlexCol>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Divider, Paper } from '@mui/material'
|
|
2
|
-
import { FlexBoxProps, FlexCol, FlexGrowCol, FlexGrowRow
|
|
2
|
+
import { FlexBoxProps, FlexCol, FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'
|
|
3
3
|
import { WebAppNavigationType } from '@xyo-network/react-app-settings'
|
|
4
|
-
import { ApplicationAppBar } from '@xyo-network/react-appbar'
|
|
4
|
+
import { ApplicationAppBar, SystemToolbar } from '@xyo-network/react-appbar'
|
|
5
5
|
import { Footer } from '@xyo-network/react-footer'
|
|
6
6
|
import { ErrorBoundary } from '@xyo-network/react-shared'
|
|
7
7
|
import { ReactNode } from 'react'
|
|
@@ -21,25 +21,27 @@ export interface WebAppChromeProps extends FlexBoxProps {
|
|
|
21
21
|
|
|
22
22
|
export const WebAppChrome: React.FC<WebAppChromeProps> = ({ menuItems, navigationType = 'menu', footerElevation = 4, errorPage, appbar, footer, children, appName, ...props }) => {
|
|
23
23
|
return (
|
|
24
|
-
<FlexCol alignItems="stretch" height="100vh" {...props}>
|
|
24
|
+
<FlexCol alignItems="stretch" overflow="hidden" height="100vh" {...props}>
|
|
25
25
|
<Helmet defaultTitle={appName} titleTemplate={`%s | ${appName}`}>
|
|
26
26
|
<meta content="website" property="og:type" />
|
|
27
27
|
</Helmet>
|
|
28
|
-
{appbar ?? <ApplicationAppBar menuItems={navigationType === 'menu' ? menuItems : undefined} />}
|
|
29
|
-
<FlexGrowRow alignItems="stretch">
|
|
28
|
+
{appbar ?? <ApplicationAppBar systemToolbar={<SystemToolbar menuItems={navigationType === 'menu' ? menuItems : undefined} />} />}
|
|
29
|
+
<FlexGrowRow overflow="hidden" alignItems="stretch">
|
|
30
30
|
{navigationType !== 'menu' ? (
|
|
31
31
|
<>
|
|
32
32
|
{menuItems}
|
|
33
33
|
<Divider orientation="vertical" />
|
|
34
34
|
</>
|
|
35
35
|
) : null}
|
|
36
|
-
<FlexGrowCol
|
|
36
|
+
<FlexGrowCol justifyContent="flex-start" alignItems="stretch">
|
|
37
37
|
<ErrorBoundary fallback={errorPage ?? <WebAppErrorPage />}>{children}</ErrorBoundary>
|
|
38
38
|
</FlexGrowCol>
|
|
39
39
|
</FlexGrowRow>
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
<FlexCol alignItems="stretch">
|
|
41
|
+
<Paper elevation={footerElevation} square>
|
|
42
|
+
{footer ?? <Footer dynamicHeight />}
|
|
43
|
+
</Paper>
|
|
44
|
+
</FlexCol>
|
|
43
45
|
</FlexCol>
|
|
44
46
|
)
|
|
45
47
|
}
|