@xylabs/react-webapp 7.1.9 → 7.1.10
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/browser/components/Chrome.stories.d.ts +3 -3
- package/dist/browser/components/NotFoundPage/Page.stories.d.ts +1 -1
- package/dist/browser/components/Page.d.ts.map +1 -1
- package/dist/browser/index.mjs +2 -1
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +28 -27
- package/src/components/Page.tsx +2 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Meta } from '@storybook/react-vite';
|
|
2
2
|
import { WebAppChrome } from './Chrome.tsx';
|
|
3
3
|
declare const StorybookEntry: Meta<typeof WebAppChrome>;
|
|
4
|
-
declare const Default: import(".store/storybook-virtual-
|
|
5
|
-
declare const DefaultSideBar: import(".store/storybook-virtual-
|
|
6
|
-
declare const WithFixedSizePage: import(".store/storybook-virtual-
|
|
4
|
+
declare const Default: import(".store/storybook-virtual-880380e42c/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
5
|
+
declare const DefaultSideBar: import(".store/storybook-virtual-880380e42c/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
6
|
+
declare const WithFixedSizePage: import(".store/storybook-virtual-880380e42c/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
7
7
|
export { Default, DefaultSideBar, WithFixedSizePage, };
|
|
8
8
|
export default StorybookEntry;
|
|
9
9
|
//# sourceMappingURL=Chrome.stories.d.ts.map
|
|
@@ -2,7 +2,7 @@ import type { Meta } from '@storybook/react-vite';
|
|
|
2
2
|
import { NotFound } from '@xylabs/react-shared';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
declare const StorybookEntry: Meta<typeof NotFound>;
|
|
5
|
-
declare const Default: import(".store/storybook-virtual-
|
|
5
|
+
declare const Default: import(".store/storybook-virtual-880380e42c/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import(".store/@mui-system-virtual-759037b833/package").BoxOwnProps<import("@mui/material").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import(".store/@mui-system-virtual-759037b833/package").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
6
6
|
component?: React.ElementType;
|
|
7
7
|
}>;
|
|
8
8
|
export { Default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAIzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAwBjD,MAAM,WAAW,eAAgB,SAAQ,eAAe,EAAE,YAAY;IACpE,SAAS,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,MAAM,CAAA;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA0DnE,CAAA;AAED,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,8CAAa,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -110,6 +110,7 @@ import { Container, styled as styled2 } from "@mui/material";
|
|
|
110
110
|
import { useAsyncEffect } from "@xylabs/react-async-effect";
|
|
111
111
|
import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
|
|
112
112
|
import { useUserEvents } from "@xylabs/react-pixel";
|
|
113
|
+
import { isDefined } from "@xylabs/sdk-js";
|
|
113
114
|
import { Helmet } from "react-helmet";
|
|
114
115
|
import { useLocation } from "react-router-dom";
|
|
115
116
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -155,7 +156,7 @@ var WebAppPage = ({
|
|
|
155
156
|
);
|
|
156
157
|
return /* @__PURE__ */ jsxs2(WebAppPageRoot, { mobileScrollingBreakpoint, variant, ...props, children: [
|
|
157
158
|
/* @__PURE__ */ jsx2(Helmet, { title }),
|
|
158
|
-
container && container !== "none" ? /* @__PURE__ */ jsx2(
|
|
159
|
+
isDefined(container) && container !== "none" ? /* @__PURE__ */ jsx2(
|
|
159
160
|
Container,
|
|
160
161
|
{
|
|
161
162
|
disableGutters,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Body.tsx","../../src/components/lib/cssValues.ts","../../src/components/Chrome.tsx","../../src/components/ErrorPage.tsx","../../src/components/Page.tsx","../../src/components/NotFoundPage/Page.tsx"],"sourcesContent":["import type { Breakpoint } from '@mui/material'\nimport { styled } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { fixedContent, scrollableContent } from './lib/index.ts'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])\nconst defaultStyledOptions = { shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop) }\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({\n spacing, theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const scrollable = variant === 'scrollable'\n return theme.unstable_sx({\n alignItems: 'stretch',\n gap: 1,\n justifyContent: 'flex-start',\n overflowX: 'visible',\n overflowY: scrollable ? 'scroll' : 'hidden',\n paddingY: spacing,\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: 'scroll' },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({\n theme, disableBreadcrumbGutter, spacing,\n}) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }))\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({ alignItems: 'stretch' }))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableContent : fixedContent\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 'unset',\n position: 'relative',\n },\n }\n})\n\nexport interface WebAppBodyProps extends FlexBoxProps {\n breadcrumbs?: ReactNode\n disableBreadcrumbGutter?: boolean\n mobileScrollingBreakpoint?: Breakpoint\n spacing?: string | number\n variant?: 'scrollable' | 'fixed'\n}\n\nexport const WebAppBody: React.FC<WebAppBodyProps> = ({\n children,\n breadcrumbs,\n disableBreadcrumbGutter,\n mobileScrollingBreakpoint,\n spacing = 1,\n variant,\n ...props\n}) => {\n return (\n <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>\n {breadcrumbs\n ? (\n <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n )\n : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import type { CSSProperties } from 'react'\n\nexport const scrollableWrap: CSSProperties = {\n inset: 0,\n position: 'absolute',\n} as const\n\nexport const fixedWrap: CSSProperties = {\n inset: 'unset',\n position: 'relative',\n} as const\n\n// Making a scrollable vs fixed wrapper and content is an inversion of the wrap and content styles\nexport const scrollableContent: CSSProperties = { ...fixedWrap } as const\n\nexport const fixedContent: CSSProperties = { ...scrollableWrap } as const\n","import { Divider, Paper } from '@mui/material'\nimport type { WebAppNavigationType } from '@xylabs/react-app-settings'\nimport { ApplicationAppBar, SystemToolbar } from '@xylabs/react-appbar'\nimport { ErrorBoundary } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport {\n FlexCol, FlexGrowCol, FlexGrowRow,\n} from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\n\nimport { WebAppErrorPage } from './ErrorPage.tsx'\n\nexport interface WebAppChromeProps extends FlexBoxProps {\n appName: string\n appbar?: ReactNode\n errorBoundary?: boolean\n errorPage?: ReactNode\n footer?: ReactNode\n footerElevation?: number\n menuItems?: ReactNode\n navigationType?: WebAppNavigationType\n}\n\nexport const WebAppChrome = ({\n ref, appName, appbar, children, errorBoundary, errorPage, footer, footerElevation = 4, menuItems, navigationType = 'menu', ...props\n}: WebAppChromeProps) => {\n return (\n <FlexCol id=\"web-chrome-flex\" alignItems=\"stretch\" overflow=\"hidden\" height=\"100vh\" ref={ref} {...props}>\n <Helmet defaultTitle={appName} titleTemplate={`%s | ${appName}`}>\n <meta content=\"website\" property=\"og:type\" />\n </Helmet>\n {appbar ?? <ApplicationAppBar systemToolbar={<SystemToolbar menuItems={navigationType === 'menu' ? menuItems : undefined} />} />}\n <FlexGrowRow id=\"sidebar-nav-flex\" overflow=\"hidden\" alignItems=\"stretch\">\n {navigationType === 'menu'\n ? null\n : (\n <>\n {menuItems}\n <Divider orientation=\"vertical\" />\n </>\n )}\n <FlexGrowCol id=\"main-flex\" justifyContent=\"flex-start\" alignItems=\"stretch\">\n {errorBoundary\n ? (\n <ErrorBoundary\n fallbackWithError={(error) => {\n return errorPage ?? <WebAppErrorPage error={error} />\n }}\n >\n {children}\n </ErrorBoundary>\n )\n : children}\n </FlexGrowCol>\n </FlexGrowRow>\n <FlexCol id=\"footer-flex\" alignItems=\"stretch\">\n <Paper elevation={footerElevation} square>\n {footer}\n </Paper>\n </FlexCol>\n </FlexCol>\n )\n}\n\nWebAppChrome.displayName = 'WebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\nimport React from 'react'\n\nimport type { WebAppPageProps } from './Page.tsx'\nimport { WebAppPage } from './Page.tsx'\n\nexport interface WebAppErrorPageProps extends WebAppPageProps {\n error?: Error\n}\n\nexport const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (\n <WebAppPage title=\"Oops! Something went wrong\" {...props}>\n <h1>Oops! Something went wrong!</h1>\n <p>{`${error}`}</p>\n <ButtonEx href=\"/\" variant=\"contained\">\n Homepage\n </ButtonEx>\n </WebAppPage>\n)\n\n/** @deprecated use WebAppErrorPage instead */\nexport const ErrorPage = WebAppErrorPage\n","import type { ContainerProps } from '@mui/material'\nimport { Container, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport type { WebAppBodyProps } from './Body.tsx'\nimport { WebAppBody } from './Body.tsx'\nimport { fixedWrap, scrollableWrap } from './lib/index.ts'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: propName => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableWrap : fixedWrap\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n maxWidth: '100vw',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 0,\n position: 'absolute',\n },\n }\n})\n\nexport interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {\n container?: ContainerProps['maxWidth'] | 'none'\n disableGutters?: boolean\n}\n\nexport const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({\n disableGutters,\n disableBreadcrumbGutter,\n title,\n container,\n children,\n breadcrumbs,\n mobileScrollingBreakpoint,\n variant = 'scrollable',\n ...props\n}) => {\n const userEvents = useUserEvents()\n const { pathname } = useLocation()\n\n useAsyncEffect(\n async () => {\n await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname })\n },\n [pathname, title, userEvents],\n )\n\n return (\n <WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>\n <Helmet title={title} />\n {container && container !== 'none'\n ? (\n <Container\n disableGutters={disableGutters}\n style={{\n alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start',\n }}\n maxWidth={container}\n >\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n </Container>\n )\n : (\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n paddingX={disableGutters ? 0 : 1}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n )}\n </WebAppPageRoot>\n )\n}\n\n/** @deprecated use WebAppPagePage instead */\nexport const FlexPage = WebAppPage\n","import { NotFound } from '@xylabs/react-shared'\nimport React from 'react'\n\nimport type { WebAppPageProps } from '../Page.tsx'\nimport { WebAppPage } from '../Page.tsx'\n\nexport const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (\n <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>\n <NotFound />\n </WebAppPage>\n)\n\n/** @deprecated use WebAppNotFoundPage instead */\nexport const NotFoundPage = WebAppNotFoundPage\n"],"mappings":";AACA,SAAS,cAAc;AAEvB,SAAS,aAAa,eAAe;;;ACD9B,IAAM,iBAAgC;AAAA,EAC3C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,IAAM,YAA2B;AAAA,EACtC,OAAO;AAAA,EACP,UAAU;AACZ;AAGO,IAAM,oBAAmC,EAAE,GAAG,UAAU;AAExD,IAAM,eAA8B,EAAE,GAAG,eAAe;;;ADuE3D,SAGQ,KAHR;AA7EJ,IAAM,iBAAiB;AACvB,IAAM,oBAAoB,oBAAI,IAAI,CAAC,6BAA6B,WAAW,WAAW,yBAAyB,CAAC;AAChH,IAAM,uBAAuB,EAAE,mBAAmB,CAAC,SAAiB,CAAC,kBAAkB,IAAI,IAAI,EAAE;AAEjG,IAAM,iBAAiB,OAAO,aAAa;AAAA,EACzC,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;AACR,CAAC,EAAmB,CAAC;AAAA,EACnB;AAAA,EAAS;AAAA,EAAO,4BAA4B;AAAA,EAAM;AACpD,MAAM;AACJ,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s","jsx","jsxs","Helmet","FlexGrowCol","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/Body.tsx","../../src/components/lib/cssValues.ts","../../src/components/Chrome.tsx","../../src/components/ErrorPage.tsx","../../src/components/Page.tsx","../../src/components/NotFoundPage/Page.tsx"],"sourcesContent":["import type { Breakpoint } from '@mui/material'\nimport { styled } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { fixedContent, scrollableContent } from './lib/index.ts'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])\nconst defaultStyledOptions = { shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop) }\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({\n spacing, theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const scrollable = variant === 'scrollable'\n return theme.unstable_sx({\n alignItems: 'stretch',\n gap: 1,\n justifyContent: 'flex-start',\n overflowX: 'visible',\n overflowY: scrollable ? 'scroll' : 'hidden',\n paddingY: spacing,\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: 'scroll' },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({\n theme, disableBreadcrumbGutter, spacing,\n}) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }))\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({ alignItems: 'stretch' }))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableContent : fixedContent\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 'unset',\n position: 'relative',\n },\n }\n})\n\nexport interface WebAppBodyProps extends FlexBoxProps {\n breadcrumbs?: ReactNode\n disableBreadcrumbGutter?: boolean\n mobileScrollingBreakpoint?: Breakpoint\n spacing?: string | number\n variant?: 'scrollable' | 'fixed'\n}\n\nexport const WebAppBody: React.FC<WebAppBodyProps> = ({\n children,\n breadcrumbs,\n disableBreadcrumbGutter,\n mobileScrollingBreakpoint,\n spacing = 1,\n variant,\n ...props\n}) => {\n return (\n <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>\n {breadcrumbs\n ? (\n <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n )\n : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import type { CSSProperties } from 'react'\n\nexport const scrollableWrap: CSSProperties = {\n inset: 0,\n position: 'absolute',\n} as const\n\nexport const fixedWrap: CSSProperties = {\n inset: 'unset',\n position: 'relative',\n} as const\n\n// Making a scrollable vs fixed wrapper and content is an inversion of the wrap and content styles\nexport const scrollableContent: CSSProperties = { ...fixedWrap } as const\n\nexport const fixedContent: CSSProperties = { ...scrollableWrap } as const\n","import { Divider, Paper } from '@mui/material'\nimport type { WebAppNavigationType } from '@xylabs/react-app-settings'\nimport { ApplicationAppBar, SystemToolbar } from '@xylabs/react-appbar'\nimport { ErrorBoundary } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport {\n FlexCol, FlexGrowCol, FlexGrowRow,\n} from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\n\nimport { WebAppErrorPage } from './ErrorPage.tsx'\n\nexport interface WebAppChromeProps extends FlexBoxProps {\n appName: string\n appbar?: ReactNode\n errorBoundary?: boolean\n errorPage?: ReactNode\n footer?: ReactNode\n footerElevation?: number\n menuItems?: ReactNode\n navigationType?: WebAppNavigationType\n}\n\nexport const WebAppChrome = ({\n ref, appName, appbar, children, errorBoundary, errorPage, footer, footerElevation = 4, menuItems, navigationType = 'menu', ...props\n}: WebAppChromeProps) => {\n return (\n <FlexCol id=\"web-chrome-flex\" alignItems=\"stretch\" overflow=\"hidden\" height=\"100vh\" ref={ref} {...props}>\n <Helmet defaultTitle={appName} titleTemplate={`%s | ${appName}`}>\n <meta content=\"website\" property=\"og:type\" />\n </Helmet>\n {appbar ?? <ApplicationAppBar systemToolbar={<SystemToolbar menuItems={navigationType === 'menu' ? menuItems : undefined} />} />}\n <FlexGrowRow id=\"sidebar-nav-flex\" overflow=\"hidden\" alignItems=\"stretch\">\n {navigationType === 'menu'\n ? null\n : (\n <>\n {menuItems}\n <Divider orientation=\"vertical\" />\n </>\n )}\n <FlexGrowCol id=\"main-flex\" justifyContent=\"flex-start\" alignItems=\"stretch\">\n {errorBoundary\n ? (\n <ErrorBoundary\n fallbackWithError={(error) => {\n return errorPage ?? <WebAppErrorPage error={error} />\n }}\n >\n {children}\n </ErrorBoundary>\n )\n : children}\n </FlexGrowCol>\n </FlexGrowRow>\n <FlexCol id=\"footer-flex\" alignItems=\"stretch\">\n <Paper elevation={footerElevation} square>\n {footer}\n </Paper>\n </FlexCol>\n </FlexCol>\n )\n}\n\nWebAppChrome.displayName = 'WebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\nimport React from 'react'\n\nimport type { WebAppPageProps } from './Page.tsx'\nimport { WebAppPage } from './Page.tsx'\n\nexport interface WebAppErrorPageProps extends WebAppPageProps {\n error?: Error\n}\n\nexport const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (\n <WebAppPage title=\"Oops! Something went wrong\" {...props}>\n <h1>Oops! Something went wrong!</h1>\n <p>{`${error}`}</p>\n <ButtonEx href=\"/\" variant=\"contained\">\n Homepage\n </ButtonEx>\n </WebAppPage>\n)\n\n/** @deprecated use WebAppErrorPage instead */\nexport const ErrorPage = WebAppErrorPage\n","import type { ContainerProps } from '@mui/material'\nimport { Container, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport { isDefined } from '@xylabs/sdk-js'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport type { WebAppBodyProps } from './Body.tsx'\nimport { WebAppBody } from './Body.tsx'\nimport { fixedWrap, scrollableWrap } from './lib/index.ts'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: propName => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableWrap : fixedWrap\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n maxWidth: '100vw',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 0,\n position: 'absolute',\n },\n }\n})\n\nexport interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {\n container?: ContainerProps['maxWidth'] | 'none'\n disableGutters?: boolean\n}\n\nexport const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({\n disableGutters,\n disableBreadcrumbGutter,\n title,\n container,\n children,\n breadcrumbs,\n mobileScrollingBreakpoint,\n variant = 'scrollable',\n ...props\n}) => {\n const userEvents = useUserEvents()\n const { pathname } = useLocation()\n\n useAsyncEffect(\n async () => {\n await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname })\n },\n [pathname, title, userEvents],\n )\n\n return (\n <WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>\n <Helmet title={title} />\n {isDefined(container) && container !== 'none'\n ? (\n <Container\n disableGutters={disableGutters}\n style={{\n alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start',\n }}\n maxWidth={container}\n >\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n </Container>\n )\n : (\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n paddingX={disableGutters ? 0 : 1}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n )}\n </WebAppPageRoot>\n )\n}\n\n/** @deprecated use WebAppPagePage instead */\nexport const FlexPage = WebAppPage\n","import { NotFound } from '@xylabs/react-shared'\nimport React from 'react'\n\nimport type { WebAppPageProps } from '../Page.tsx'\nimport { WebAppPage } from '../Page.tsx'\n\nexport const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (\n <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>\n <NotFound />\n </WebAppPage>\n)\n\n/** @deprecated use WebAppNotFoundPage instead */\nexport const NotFoundPage = WebAppNotFoundPage\n"],"mappings":";AACA,SAAS,cAAc;AAEvB,SAAS,aAAa,eAAe;;;ACD9B,IAAM,iBAAgC;AAAA,EAC3C,OA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AAA,QAAC;AAAA;AAAA,UACC,mBAAmB,CAAC,UAAU;AAC5B,mBAAO,aAAa,gBAAAA,KAAC,mBAAgB,OAAc;AAAA,UACrD;AAAA,UAEC;AAAA;AAAA,MACH,IAEF,UACN;AAAA,OACF;AAAA,IACA,gBAAAA,KAAC,WAAQ,IAAG,eAAc,YAAW,WACnC,0BAAAA,KAAC,SAAM,WAAW,iBAAiB,QAAM,MACtC,kBACH,GACF;AAAA,KACF;AAEJ;AAEA,aAAa,cAAc;;;AGlE3B,SAAS,gBAAgB;AAQrB,gBAAAI,YAAA;AAFG,IAAM,qBAAgD,CAAC,EAAE,OAAO,GAAG,MAAM,MAC9E,gBAAAA,KAAC,cAAW,OAAO,SAAS,yBAA0B,GAAG,OACvD,0BAAAA,KAAC,YAAS,GACZ;AAIK,IAAM,eAAe;","names":["FlexGrowCol","Helmet","styled","FlexGrowCol","jsx","jsxs","styled","FlexGrowCol","jsx","jsxs","jsx","jsxs","Helmet","FlexGrowCol","jsx"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/react-webapp",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.10",
|
|
4
4
|
"description": "Common React library for all XY Labs projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"utility",
|
|
@@ -42,36 +42,37 @@
|
|
|
42
42
|
"src"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@xylabs/react-app-settings": "~7.1.
|
|
46
|
-
"@xylabs/react-appbar": "~7.1.
|
|
47
|
-
"@xylabs/react-async-effect": "~7.1.
|
|
48
|
-
"@xylabs/react-button": "~7.1.
|
|
49
|
-
"@xylabs/react-error": "~7.1.
|
|
50
|
-
"@xylabs/react-flexbox": "~7.1.
|
|
51
|
-
"@xylabs/react-pixel": "~7.1.
|
|
52
|
-
"@xylabs/react-shared": "~7.1.
|
|
45
|
+
"@xylabs/react-app-settings": "~7.1.10",
|
|
46
|
+
"@xylabs/react-appbar": "~7.1.10",
|
|
47
|
+
"@xylabs/react-async-effect": "~7.1.10",
|
|
48
|
+
"@xylabs/react-button": "~7.1.10",
|
|
49
|
+
"@xylabs/react-error": "~7.1.10",
|
|
50
|
+
"@xylabs/react-flexbox": "~7.1.10",
|
|
51
|
+
"@xylabs/react-pixel": "~7.1.10",
|
|
52
|
+
"@xylabs/react-shared": "~7.1.10",
|
|
53
|
+
"@xylabs/sdk-js": "~5.0.64",
|
|
53
54
|
"react-helmet": "~6.1.0"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
|
-
"@mui/icons-material": "~7.3.
|
|
57
|
-
"@mui/material": "~7.3.
|
|
58
|
-
"@storybook/react-vite": "~10.1
|
|
59
|
-
"@types/react": "^19.2.
|
|
57
|
+
"@mui/icons-material": "~7.3.7",
|
|
58
|
+
"@mui/material": "~7.3.7",
|
|
59
|
+
"@storybook/react-vite": "~10.2.1",
|
|
60
|
+
"@types/react": "^19.2.10",
|
|
60
61
|
"@types/react-helmet": "~6.1.11",
|
|
61
|
-
"@xylabs/react-button": "~7.1.
|
|
62
|
-
"@xylabs/react-flexbox": "~7.1.
|
|
63
|
-
"@xylabs/react-link": "~7.1.
|
|
64
|
-
"@xylabs/react-pixel": "~7.1.
|
|
65
|
-
"@xylabs/ts-scripts-yarn3": "~7.2
|
|
66
|
-
"@xylabs/tsconfig": "~7.2
|
|
67
|
-
"@xylabs/tsconfig-dom": "~7.2
|
|
68
|
-
"@xylabs/tsconfig-react": "~7.2
|
|
69
|
-
"react": "^19.2.
|
|
70
|
-
"react-dom": "^19.2.
|
|
71
|
-
"react-router-dom": "^7.
|
|
72
|
-
"storybook": "~10.1
|
|
62
|
+
"@xylabs/react-button": "~7.1.10",
|
|
63
|
+
"@xylabs/react-flexbox": "~7.1.10",
|
|
64
|
+
"@xylabs/react-link": "~7.1.10",
|
|
65
|
+
"@xylabs/react-pixel": "~7.1.10",
|
|
66
|
+
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
|
67
|
+
"@xylabs/tsconfig": "~7.3.2",
|
|
68
|
+
"@xylabs/tsconfig-dom": "~7.3.2",
|
|
69
|
+
"@xylabs/tsconfig-react": "~7.3.2",
|
|
70
|
+
"react": "^19.2.4",
|
|
71
|
+
"react-dom": "^19.2.4",
|
|
72
|
+
"react-router-dom": "^7.13.0",
|
|
73
|
+
"storybook": "~10.2.1",
|
|
73
74
|
"typescript": "^5.9.3",
|
|
74
|
-
"vite": "~7.
|
|
75
|
+
"vite": "~7.3.1"
|
|
75
76
|
},
|
|
76
77
|
"peerDependencies": {
|
|
77
78
|
"@mui/icons-material": ">=6 <8",
|
|
@@ -84,4 +85,4 @@
|
|
|
84
85
|
"access": "public"
|
|
85
86
|
},
|
|
86
87
|
"docs": "dist/docs.json"
|
|
87
|
-
}
|
|
88
|
+
}
|
package/src/components/Page.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { useAsyncEffect } from '@xylabs/react-async-effect'
|
|
|
4
4
|
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
5
5
|
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
|
6
6
|
import { useUserEvents } from '@xylabs/react-pixel'
|
|
7
|
+
import { isDefined } from '@xylabs/sdk-js'
|
|
7
8
|
import type { PropsWithChildren } from 'react'
|
|
8
9
|
import React from 'react'
|
|
9
10
|
import { Helmet } from 'react-helmet'
|
|
@@ -62,7 +63,7 @@ export const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({
|
|
|
62
63
|
return (
|
|
63
64
|
<WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>
|
|
64
65
|
<Helmet title={title} />
|
|
65
|
-
{container && container !== 'none'
|
|
66
|
+
{isDefined(container) && container !== 'none'
|
|
66
67
|
? (
|
|
67
68
|
<Container
|
|
68
69
|
disableGutters={disableGutters}
|