@xyo-network/react-webapp 2.64.0 → 2.64.3

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.
@@ -1,13 +1,31 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // src/components/Body.tsx
2
2
  import { styled } from "@mui/material";
3
3
  import { FlexGrowCol, FlexRow } from "@xylabs/react-flexbox";
4
- import { fixedContent, scrollableContent } from "./lib";
5
- const WebAppBodyName = "WebAppBody";
6
- const propsNotForwarded = ["mobileScrollingBreakpoint", "variant", "spacing", "disableBreadcrumbGutter"];
7
- const defaultStyledOptions = {
4
+
5
+ // src/components/lib/cssValues.ts
6
+ var scrollableWrap = {
7
+ inset: 0,
8
+ position: "absolute"
9
+ };
10
+ var fixedWrap = {
11
+ inset: "unset",
12
+ position: "relative"
13
+ };
14
+ var scrollableContent = {
15
+ ...fixedWrap
16
+ };
17
+ var fixedContent = {
18
+ ...scrollableWrap
19
+ };
20
+
21
+ // src/components/Body.tsx
22
+ import { jsx, jsxs } from "react/jsx-runtime";
23
+ var WebAppBodyName = "WebAppBody";
24
+ var propsNotForwarded = ["mobileScrollingBreakpoint", "variant", "spacing", "disableBreadcrumbGutter"];
25
+ var defaultStyledOptions = {
8
26
  shouldForwardProp: (prop) => !propsNotForwarded.includes(prop)
9
27
  };
10
- const WebAppBodyRoot = styled(FlexGrowCol, {
28
+ var WebAppBodyRoot = styled(FlexGrowCol, {
11
29
  ...defaultStyledOptions,
12
30
  name: WebAppBodyName,
13
31
  slot: "Root"
@@ -25,7 +43,7 @@ const WebAppBodyRoot = styled(FlexGrowCol, {
25
43
  }
26
44
  });
27
45
  });
28
- const WebAppBodyBreadcrumb = styled(FlexRow, {
46
+ var WebAppBodyBreadcrumb = styled(FlexRow, {
29
47
  ...defaultStyledOptions,
30
48
  name: WebAppBodyName,
31
49
  slot: "Breadcrumb"
@@ -35,13 +53,13 @@ const WebAppBodyBreadcrumb = styled(FlexRow, {
35
53
  marginX: disableBreadcrumbGutter ? 0 : spacing
36
54
  })
37
55
  );
38
- const WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
56
+ var WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
39
57
  name: WebAppBodyName,
40
58
  slot: "ScrollableWrapper"
41
59
  })(() => ({
42
60
  alignItems: "stretch"
43
61
  }));
44
- const WebAppBodyScrollable = styled(FlexGrowCol, {
62
+ var WebAppBodyScrollable = styled(FlexGrowCol, {
45
63
  ...defaultStyledOptions,
46
64
  name: WebAppBodyName,
47
65
  slot: "Scrollable"
@@ -57,7 +75,7 @@ const WebAppBodyScrollable = styled(FlexGrowCol, {
57
75
  }
58
76
  };
59
77
  });
60
- const WebAppBody = ({
78
+ var WebAppBody = ({
61
79
  children,
62
80
  breadcrumbs,
63
81
  disableBreadcrumbGutter,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Body.tsx"],"sourcesContent":["import { Breakpoint, styled } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport React, { ReactNode } from 'react'\n\nimport { fixedContent, scrollableContent } from './lib'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = ['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter']\nconst defaultStyledOptions = {\n shouldForwardProp: (prop: string) => !propsNotForwarded.includes(prop),\n}\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({ spacing, theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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)]: {\n overflowY: 'scroll',\n },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({ theme, disableBreadcrumbGutter, spacing }) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }),\n)\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({\n alignItems: 'stretch',\n}))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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 <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n ) : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n"],"mappings":"AAoFI,SAEI,K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D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,CAAC,MAAM,YAAY,KAAK,yBAAyB,CAAC,GAAG;AAAA,MACnD,OAAO;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF,CAAC;AAUM,MAAM,aAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,qBAAC,kBAAe,2BAAsD,SAAkB,SAAmB,GAAG,OAC3G;AAAA,kBACC,oBAAC,wBAAqB,yBAAkD,SACrE,uBACH,IACE;AAAA,IACJ,oBAAC,+BACC,8BAAC,wBAAqB,2BAAsD,SACzE,UACH,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/Body.tsx","../../../src/components/lib/cssValues.ts"],"sourcesContent":["import { Breakpoint, styled } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport React, { ReactNode } from 'react'\n\nimport { fixedContent, scrollableContent } from './lib'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = ['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter']\nconst defaultStyledOptions = {\n shouldForwardProp: (prop: string) => !propsNotForwarded.includes(prop),\n}\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({ spacing, theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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)]: {\n overflowY: 'scroll',\n },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({ theme, disableBreadcrumbGutter, spacing }) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }),\n)\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({\n alignItems: 'stretch',\n}))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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 <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n ) : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import { 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 = {\n ...fixedWrap,\n} as const\n\nexport const fixedContent: CSSProperties = {\n ...scrollableWrap,\n} as const\n"],"mappings":";AAAA,SAAqB,cAAc;AACnC,SAAuB,aAAa,eAAe;;;ACC5C,IAAM,iBAAgC;AAAA,EAC3C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,IAAM,YAA2B;AAAA,EACtC,OAAO;AAAA,EACP,UAAU;AACZ;AAGO,IAAM,oBAAmC;AAAA,EAC9C,GAAG;AACL;AAEO,IAAM,eAA8B;AAAA,EACzC,GAAG;AACL;;;ADiEI,SAEI,KAFJ;AA9EJ,IAAM,iBAAiB;AACvB,IAAM,oBAAoB,CAAC,6BAA6B,WAAW,WAAW,yBAAyB;AACvG,IAAM,uBAAuB;AAAA,EAC3B,mBAAmB,CAAC,SAAiB,CAAC,kBAAkB,SAAS,IAAI;AACvE;AAEA,IAAM,iBAAiB,OAAO,aAAa;AAAA,EACzC,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;AACR,CAAC,EAAmB,CAAC,EAAE,SAAS,OAAO,4BAA4B,MAAM,QAAQ,MAAM;AACrF,QAAM,aAAa,YAAY;AAC/B,SAAO,MAAM,YAAY;AAAA,IACvB,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,WAAW,aAAa,WAAW;AAAA,IACnC,UAAU;AAAA,IACV,CAAC,MAAM,YAAY,KAAK,yBAAyB,CAAC,GAAG;AAAA,MACnD,WAAW;AAAA,IACb;AAAA,EACF,CAAC;AACH,CAAC;AAED,IAAM,uBAAuB,OAAO,SAAS;AAAA,EAC3C,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;AACR,CAAC;AAAA,EAAmB,CAAC,EAAE,OAAO,yBAAyB,QAAQ,MAC7D,MAAM,YAAY;AAAA,IAChB,gBAAgB;AAAA,IAChB,SAAS,0BAA0B,IAAI;AAAA,EACzC,CAAC;AACH;AAEA,IAAM,8BAA8B,OAAO,aAAa;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AACR,CAAC,EAAmB,OAAO;AAAA,EACzB,YAAY;AACd,EAAE;AAEF,IAAM,uBAAuB,OAAO,aAAa;AAAA,EAC/C,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;AACR,CAAC,EAAmB,CAAC,EAAE,OAAO,4BAA4B,MAAM,QAAQ,MAAM;AAC5E,QAAM,QAAQ,YAAY,eAAe,oBAAoB;AAC7D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,CAAC,MAAM,YAAY,KAAK,yBAAyB,CAAC,GAAG;AAAA,MACnD,OAAO;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF,CAAC;AAUM,IAAM,aAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,qBAAC,kBAAe,2BAAsD,SAAkB,SAAmB,GAAG,OAC3G;AAAA,kBACC,oBAAC,wBAAqB,yBAAkD,SACrE,uBACH,IACE;AAAA,IACJ,oBAAC,+BACC,8BAAC,wBAAqB,2BAAsD,SACzE,UACH,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -1,33 +1,220 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // src/components/Chrome.tsx
2
2
  import { Divider, Paper } from "@mui/material";
3
- import { FlexCol, FlexGrowCol, FlexGrowRow } from "@xylabs/react-flexbox";
3
+ import { FlexCol, FlexGrowCol as FlexGrowCol3, FlexGrowRow } from "@xylabs/react-flexbox";
4
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 { forwardRef } from "react";
8
+ import { Helmet as Helmet2 } from "react-helmet";
9
+
10
+ // src/components/ErrorPage.tsx
11
+ import { ButtonEx } from "@xylabs/react-button";
12
+
13
+ // src/components/Page.tsx
14
+ import { Container, styled as styled2 } from "@mui/material";
15
+ import { useAsyncEffect } from "@xylabs/react-async-effect";
16
+ import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
17
+ import { useUserEvents } from "@xylabs/react-pixel";
8
18
  import { Helmet } from "react-helmet";
9
- import { WebAppErrorPage } from "./ErrorPage";
10
- const WebAppChrome = forwardRef(
19
+ import { useLocation } from "react-router-dom";
20
+
21
+ // src/components/Body.tsx
22
+ import { styled } from "@mui/material";
23
+ import { FlexGrowCol, FlexRow } from "@xylabs/react-flexbox";
24
+
25
+ // src/components/lib/cssValues.ts
26
+ var scrollableWrap = {
27
+ inset: 0,
28
+ position: "absolute"
29
+ };
30
+ var fixedWrap = {
31
+ inset: "unset",
32
+ position: "relative"
33
+ };
34
+ var scrollableContent = {
35
+ ...fixedWrap
36
+ };
37
+ var fixedContent = {
38
+ ...scrollableWrap
39
+ };
40
+
41
+ // src/components/Body.tsx
42
+ import { jsx, jsxs } from "react/jsx-runtime";
43
+ var WebAppBodyName = "WebAppBody";
44
+ var propsNotForwarded = ["mobileScrollingBreakpoint", "variant", "spacing", "disableBreadcrumbGutter"];
45
+ var defaultStyledOptions = {
46
+ shouldForwardProp: (prop) => !propsNotForwarded.includes(prop)
47
+ };
48
+ var WebAppBodyRoot = styled(FlexGrowCol, {
49
+ ...defaultStyledOptions,
50
+ name: WebAppBodyName,
51
+ slot: "Root"
52
+ })(({ spacing, theme, mobileScrollingBreakpoint = "sm", variant }) => {
53
+ const scrollable = variant === "scrollable";
54
+ return theme.unstable_sx({
55
+ alignItems: "stretch",
56
+ gap: 1,
57
+ justifyContent: "flex-start",
58
+ overflowX: "visible",
59
+ overflowY: scrollable ? "scroll" : "hidden",
60
+ paddingY: spacing,
61
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
62
+ overflowY: "scroll"
63
+ }
64
+ });
65
+ });
66
+ var WebAppBodyBreadcrumb = styled(FlexRow, {
67
+ ...defaultStyledOptions,
68
+ name: WebAppBodyName,
69
+ slot: "Breadcrumb"
70
+ })(
71
+ ({ theme, disableBreadcrumbGutter, spacing }) => theme.unstable_sx({
72
+ justifyContent: "start",
73
+ marginX: disableBreadcrumbGutter ? 0 : spacing
74
+ })
75
+ );
76
+ var WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
77
+ name: WebAppBodyName,
78
+ slot: "ScrollableWrapper"
79
+ })(() => ({
80
+ alignItems: "stretch"
81
+ }));
82
+ var WebAppBodyScrollable = styled(FlexGrowCol, {
83
+ ...defaultStyledOptions,
84
+ name: WebAppBodyName,
85
+ slot: "Scrollable"
86
+ })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
87
+ const props = variant === "scrollable" ? scrollableContent : fixedContent;
88
+ return {
89
+ ...props,
90
+ alignItems: "stretch",
91
+ justifyContent: "start",
92
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
93
+ inset: "unset",
94
+ position: "relative"
95
+ }
96
+ };
97
+ });
98
+ var WebAppBody = ({
99
+ children,
100
+ breadcrumbs,
101
+ disableBreadcrumbGutter,
102
+ mobileScrollingBreakpoint,
103
+ spacing = 1,
104
+ variant,
105
+ ...props
106
+ }) => {
107
+ return /* @__PURE__ */ jsxs(WebAppBodyRoot, { mobileScrollingBreakpoint, spacing, variant, ...props, children: [
108
+ breadcrumbs ? /* @__PURE__ */ jsx(WebAppBodyBreadcrumb, { disableBreadcrumbGutter, spacing, children: breadcrumbs }) : null,
109
+ /* @__PURE__ */ jsx(WebAppBodyScrollableWrapper, { children: /* @__PURE__ */ jsx(WebAppBodyScrollable, { mobileScrollingBreakpoint, variant, children }) })
110
+ ] });
111
+ };
112
+
113
+ // src/components/Page.tsx
114
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
115
+ var WebAppPageRoot = styled2(FlexGrowCol2, {
116
+ name: "WebAppPage",
117
+ shouldForwardProp: (propName) => propName !== "mobileScrollingBreakpoint" && propName !== "variant",
118
+ slot: "Root"
119
+ })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
120
+ const props = variant === "scrollable" ? scrollableWrap : fixedWrap;
121
+ return {
122
+ ...props,
123
+ alignItems: "stretch",
124
+ justifyContent: "start",
125
+ maxWidth: "100vw",
126
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
127
+ inset: 0,
128
+ position: "absolute"
129
+ }
130
+ };
131
+ });
132
+ var WebAppPage = ({
133
+ disableGutters,
134
+ disableBreadcrumbGutter,
135
+ title,
136
+ container,
137
+ children,
138
+ breadcrumbs,
139
+ mobileScrollingBreakpoint,
140
+ variant = "scrollable",
141
+ ...props
142
+ }) => {
143
+ const userEvents = useUserEvents();
144
+ const { pathname } = useLocation();
145
+ useAsyncEffect(
146
+ // eslint-disable-next-line react-hooks/exhaustive-deps
147
+ async () => {
148
+ await userEvents?.viewContent({ name: title ?? "NodeBasePage", path: location.pathname });
149
+ },
150
+ [pathname, title, userEvents]
151
+ );
152
+ return /* @__PURE__ */ jsxs2(WebAppPageRoot, { mobileScrollingBreakpoint, variant, ...props, children: [
153
+ /* @__PURE__ */ jsx2(Helmet, { title }),
154
+ container && container !== "none" ? /* @__PURE__ */ jsx2(
155
+ Container,
156
+ {
157
+ disableGutters,
158
+ style: { alignItems: "stretch", display: "flex", flexDirection: "column", flexGrow: 1, justifyContent: "flex-start" },
159
+ maxWidth: container,
160
+ children: /* @__PURE__ */ jsx2(
161
+ WebAppBody,
162
+ {
163
+ disableBreadcrumbGutter,
164
+ breadcrumbs,
165
+ mobileScrollingBreakpoint,
166
+ variant,
167
+ ...props,
168
+ children
169
+ }
170
+ )
171
+ }
172
+ ) : /* @__PURE__ */ jsx2(
173
+ WebAppBody,
174
+ {
175
+ disableBreadcrumbGutter,
176
+ breadcrumbs,
177
+ mobileScrollingBreakpoint,
178
+ paddingX: disableGutters ? 0 : 1,
179
+ variant,
180
+ ...props,
181
+ children
182
+ }
183
+ )
184
+ ] });
185
+ };
186
+
187
+ // src/components/ErrorPage.tsx
188
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
189
+ var WebAppErrorPage = ({ error, ...props }) => /* @__PURE__ */ jsxs3(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [
190
+ /* @__PURE__ */ jsx3("h1", { children: "Oops! Something went wrong!" }),
191
+ /* @__PURE__ */ jsx3("p", { children: `${error}` }),
192
+ /* @__PURE__ */ jsx3(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })
193
+ ] });
194
+
195
+ // src/components/Chrome.tsx
196
+ import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
197
+ var WebAppChrome = forwardRef(
11
198
  ({ appName, appbar, children, errorPage, footer, footerElevation = 4, menuItems, navigationType = "menu", ...props }, ref) => {
12
- return /* @__PURE__ */ jsxs(FlexCol, { id: "web-chrome-flex", alignItems: "stretch", overflow: "hidden", height: "100vh", ref, ...props, children: [
13
- /* @__PURE__ */ jsx(Helmet, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: /* @__PURE__ */ jsx("meta", { content: "website", property: "og:type" }) }),
14
- appbar ?? /* @__PURE__ */ jsx(ApplicationAppBar, { systemToolbar: /* @__PURE__ */ jsx(SystemToolbar, { menuItems: navigationType === "menu" ? menuItems : void 0 }) }),
15
- /* @__PURE__ */ jsxs(FlexGrowRow, { id: "sidebar-nav-flex", overflow: "hidden", alignItems: "stretch", children: [
16
- navigationType !== "menu" ? /* @__PURE__ */ jsxs(Fragment, { children: [
199
+ return /* @__PURE__ */ jsxs4(FlexCol, { id: "web-chrome-flex", alignItems: "stretch", overflow: "hidden", height: "100vh", ref, ...props, children: [
200
+ /* @__PURE__ */ jsx4(Helmet2, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: /* @__PURE__ */ jsx4("meta", { content: "website", property: "og:type" }) }),
201
+ appbar ?? /* @__PURE__ */ jsx4(ApplicationAppBar, { systemToolbar: /* @__PURE__ */ jsx4(SystemToolbar, { menuItems: navigationType === "menu" ? menuItems : void 0 }) }),
202
+ /* @__PURE__ */ jsxs4(FlexGrowRow, { id: "sidebar-nav-flex", overflow: "hidden", alignItems: "stretch", children: [
203
+ navigationType !== "menu" ? /* @__PURE__ */ jsxs4(Fragment, { children: [
17
204
  menuItems,
18
- /* @__PURE__ */ jsx(Divider, { orientation: "vertical" })
205
+ /* @__PURE__ */ jsx4(Divider, { orientation: "vertical" })
19
206
  ] }) : null,
20
- /* @__PURE__ */ jsx(FlexGrowCol, { id: "main-flex", justifyContent: "flex-start", alignItems: "stretch", children: /* @__PURE__ */ jsx(
207
+ /* @__PURE__ */ jsx4(FlexGrowCol3, { id: "main-flex", justifyContent: "flex-start", alignItems: "stretch", children: /* @__PURE__ */ jsx4(
21
208
  ErrorBoundary,
22
209
  {
23
210
  fallbackWithError: (error) => {
24
- return errorPage ?? /* @__PURE__ */ jsx(WebAppErrorPage, { error });
211
+ return errorPage ?? /* @__PURE__ */ jsx4(WebAppErrorPage, { error });
25
212
  },
26
213
  children
27
214
  }
28
215
  ) })
29
216
  ] }),
30
- /* @__PURE__ */ jsx(FlexCol, { id: "footer-flex", alignItems: "stretch", children: /* @__PURE__ */ jsx(Paper, { elevation: footerElevation, square: true, children: footer ?? /* @__PURE__ */ jsx(Footer, { dynamicHeight: true }) }) })
217
+ /* @__PURE__ */ jsx4(FlexCol, { id: "footer-flex", alignItems: "stretch", children: /* @__PURE__ */ jsx4(Paper, { elevation: footerElevation, square: true, children: footer ?? /* @__PURE__ */ jsx4(Footer, { dynamicHeight: true }) }) })
31
218
  ] });
32
219
  }
33
220
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Chrome.tsx"],"sourcesContent":["import { Divider, Paper } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { WebAppNavigationType } from '@xyo-network/react-app-settings'\nimport { ApplicationAppBar, SystemToolbar } from '@xyo-network/react-appbar'\nimport { Footer } from '@xyo-network/react-footer'\nimport { ErrorBoundary } from '@xyo-network/react-shared'\nimport { forwardRef, ReactNode } from 'react'\nimport { Helmet } from 'react-helmet'\n\nimport { WebAppErrorPage } from './ErrorPage'\n\nexport interface WebAppChromeProps extends FlexBoxProps {\n appName: string\n appbar?: ReactNode\n errorPage?: ReactNode\n footer?: ReactNode\n footerElevation?: number\n menuItems?: ReactNode\n navigationType?: WebAppNavigationType\n}\n\nexport const WebAppChrome = forwardRef<HTMLDivElement, WebAppChromeProps>(\n ({ appName, appbar, children, errorPage, footer, footerElevation = 4, menuItems, navigationType = 'menu', ...props }, ref) => {\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 <>\n {menuItems}\n <Divider orientation=\"vertical\" />\n </>\n ) : null}\n <FlexGrowCol id=\"main-flex\" justifyContent=\"flex-start\" alignItems=\"stretch\">\n <ErrorBoundary\n fallbackWithError={(error) => {\n return errorPage ?? <WebAppErrorPage error={error} />\n }}\n >\n {children}\n </ErrorBoundary>\n </FlexGrowCol>\n </FlexGrowRow>\n <FlexCol id=\"footer-flex\" alignItems=\"stretch\">\n <Paper elevation={footerElevation} square>\n {footer ?? <Footer dynamicHeight />}\n </Paper>\n </FlexCol>\n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ACF;AAEA,aAAa,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/Chrome.tsx","../../../src/components/ErrorPage.tsx","../../../src/components/Page.tsx","../../../src/components/Body.tsx","../../../src/components/lib/cssValues.ts"],"sourcesContent":["import { Divider, Paper } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { WebAppNavigationType } from '@xyo-network/react-app-settings'\nimport { ApplicationAppBar, SystemToolbar } from '@xyo-network/react-appbar'\nimport { Footer } from '@xyo-network/react-footer'\nimport { ErrorBoundary } from '@xyo-network/react-shared'\nimport { forwardRef, ReactNode } from 'react'\nimport { Helmet } from 'react-helmet'\n\nimport { WebAppErrorPage } from './ErrorPage'\n\nexport interface WebAppChromeProps extends FlexBoxProps {\n appName: string\n appbar?: ReactNode\n errorPage?: ReactNode\n footer?: ReactNode\n footerElevation?: number\n menuItems?: ReactNode\n navigationType?: WebAppNavigationType\n}\n\nexport const WebAppChrome = forwardRef<HTMLDivElement, WebAppChromeProps>(\n ({ appName, appbar, children, errorPage, footer, footerElevation = 4, menuItems, navigationType = 'menu', ...props }, ref) => {\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 <>\n {menuItems}\n <Divider orientation=\"vertical\" />\n </>\n ) : null}\n <FlexGrowCol id=\"main-flex\" justifyContent=\"flex-start\" alignItems=\"stretch\">\n <ErrorBoundary\n fallbackWithError={(error) => {\n return errorPage ?? <WebAppErrorPage error={error} />\n }}\n >\n {children}\n </ErrorBoundary>\n </FlexGrowCol>\n </FlexGrowRow>\n <FlexCol id=\"footer-flex\" alignItems=\"stretch\">\n <Paper elevation={footerElevation} square>\n {footer ?? <Footer dynamicHeight />}\n </Paper>\n </FlexCol>\n </FlexCol>\n )\n },\n)\n\nWebAppChrome.displayName = 'WebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\n\nimport { WebAppPage, WebAppPageProps } from './Page'\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 { Container, ContainerProps, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { FlexBoxProps, FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport { WebAppBody, WebAppBodyProps } from './Body'\nimport { fixedWrap, scrollableWrap } from './lib'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: (propName) => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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<WithChildren<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 // eslint-disable-next-line react-hooks/exhaustive-deps\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 <Container\n disableGutters={disableGutters}\n style={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}\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 <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 { Breakpoint, styled } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport React, { ReactNode } from 'react'\n\nimport { fixedContent, scrollableContent } from './lib'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = ['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter']\nconst defaultStyledOptions = {\n shouldForwardProp: (prop: string) => !propsNotForwarded.includes(prop),\n}\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({ spacing, theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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)]: {\n overflowY: 'scroll',\n },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({ theme, disableBreadcrumbGutter, spacing }) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }),\n)\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({\n alignItems: 'stretch',\n}))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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 <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n ) : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import { 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 = {\n ...fixedWrap,\n} as const\n\nexport const fixedContent: CSSProperties = {\n ...scrollableWrap,\n} as const\n"],"mappings":";AAAA,SAAS,SAAS,aAAa;AAC/B,SAAuB,SAAS,eAAAA,cAAa,mBAAmB;AAEhE,SAAS,mBAAmB,qBAAqB;AACjD,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,kBAA6B;AACtC,SAAS,UAAAC,eAAc;;;ACPvB,SAAS,gBAAgB;;;ACAzB,SAAS,WAA2B,UAAAC,eAAc;AAClD,SAAS,sBAAsB;AAC/B,SAAuB,eAAAC,oBAAmB;AAC1C,SAAS,qBAAqB;AAE9B,SAAS,cAAc;AACvB,SAAS,mBAAmB;;;ACN5B,SAAqB,cAAc;AACnC,SAAuB,aAAa,eAAe;;;ACC5C,IAAM,iBAAgC;AAAA,EAC3C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,IAAM,YAA2B;AAAA,EACtC,OAAO;AAAA,EACP,UAAU;AACZ;AAGO,IAAM,oBAAmC;AAAA,EAC9C,GAAG;AACL;AAEO,IAAM,eAA8B;AAAA,EACzC,G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AAO,SAAQ,KAAW,GAAG,OAChG;AAAA,sBAAAD,KAACE,SAAA,EAAO,cAAc,SAAS,eAAe,QAAQ,OAAO,IAC3D,0BAAAF,KAAC,UAAK,SAAQ,WAAU,UAAS,WAAU,GAC7C;AAAA,MACC,UAAU,gBAAAA,KAAC,qBAAkB,eAAe,gBAAAA,KAAC,iBAAc,WAAW,mBAAmB,SAAS,YAAY,QAAW,GAAI;AAAA,MAC9H,gBAAAC,MAAC,eAAY,IAAG,oBAAmB,UAAS,UAAS,YAAW,WAC7D;AAAA,2BAAmB,SAClB,gBAAAA,MAAA,YACG;AAAA;AAAA,UACD,gBAAAD,KAAC,WAAQ,aAAY,YAAW;AAAA,WAClC,IACE;AAAA,QACJ,gBAAAA,KAACG,cAAA,EAAY,IAAG,aAAY,gBAAe,cAAa,YAAW,WACjE,0BAAAH;AAAA,UAAC;AAAA;AAAA,YACC,mBAAmB,CAAC,UAAU;AAC5B,qBAAO,aAAa,gBAAAA,KAAC,mBAAgB,OAAc;AAAA,YACrD;AAAA,YAEC;AAAA;AAAA,QACH,GACF;AAAA,SACF;AAAA,MACA,gBAAAA,KAAC,WAAQ,IAAG,eAAc,YAAW,WACnC,0BAAAA,KAAC,SAAM,WAAW,iBAAiB,QAAM,MACtC,oBAAU,gBAAAA,KAAC,UAAO,eAAa,MAAC,GACnC,GACF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;","names":["FlexGrowCol","Helmet","styled","FlexGrowCol","jsx","jsxs","styled","FlexGrowCol","jsx","jsxs","jsx","jsxs","Helmet","FlexGrowCol"]}
@@ -1,12 +1,188 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // src/components/ErrorPage.tsx
2
2
  import { ButtonEx } from "@xylabs/react-button";
3
- import { WebAppPage } from "./Page";
4
- const WebAppErrorPage = ({ error, ...props }) => /* @__PURE__ */ jsxs(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [
5
- /* @__PURE__ */ jsx("h1", { children: "Oops! Something went wrong!" }),
6
- /* @__PURE__ */ jsx("p", { children: `${error}` }),
7
- /* @__PURE__ */ jsx(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })
3
+
4
+ // src/components/Page.tsx
5
+ import { Container, styled as styled2 } from "@mui/material";
6
+ import { useAsyncEffect } from "@xylabs/react-async-effect";
7
+ import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
8
+ import { useUserEvents } from "@xylabs/react-pixel";
9
+ import { Helmet } from "react-helmet";
10
+ import { useLocation } from "react-router-dom";
11
+
12
+ // src/components/Body.tsx
13
+ import { styled } from "@mui/material";
14
+ import { FlexGrowCol, FlexRow } from "@xylabs/react-flexbox";
15
+
16
+ // src/components/lib/cssValues.ts
17
+ var scrollableWrap = {
18
+ inset: 0,
19
+ position: "absolute"
20
+ };
21
+ var fixedWrap = {
22
+ inset: "unset",
23
+ position: "relative"
24
+ };
25
+ var scrollableContent = {
26
+ ...fixedWrap
27
+ };
28
+ var fixedContent = {
29
+ ...scrollableWrap
30
+ };
31
+
32
+ // src/components/Body.tsx
33
+ import { jsx, jsxs } from "react/jsx-runtime";
34
+ var WebAppBodyName = "WebAppBody";
35
+ var propsNotForwarded = ["mobileScrollingBreakpoint", "variant", "spacing", "disableBreadcrumbGutter"];
36
+ var defaultStyledOptions = {
37
+ shouldForwardProp: (prop) => !propsNotForwarded.includes(prop)
38
+ };
39
+ var WebAppBodyRoot = styled(FlexGrowCol, {
40
+ ...defaultStyledOptions,
41
+ name: WebAppBodyName,
42
+ slot: "Root"
43
+ })(({ spacing, theme, mobileScrollingBreakpoint = "sm", variant }) => {
44
+ const scrollable = variant === "scrollable";
45
+ return theme.unstable_sx({
46
+ alignItems: "stretch",
47
+ gap: 1,
48
+ justifyContent: "flex-start",
49
+ overflowX: "visible",
50
+ overflowY: scrollable ? "scroll" : "hidden",
51
+ paddingY: spacing,
52
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
53
+ overflowY: "scroll"
54
+ }
55
+ });
56
+ });
57
+ var WebAppBodyBreadcrumb = styled(FlexRow, {
58
+ ...defaultStyledOptions,
59
+ name: WebAppBodyName,
60
+ slot: "Breadcrumb"
61
+ })(
62
+ ({ theme, disableBreadcrumbGutter, spacing }) => theme.unstable_sx({
63
+ justifyContent: "start",
64
+ marginX: disableBreadcrumbGutter ? 0 : spacing
65
+ })
66
+ );
67
+ var WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
68
+ name: WebAppBodyName,
69
+ slot: "ScrollableWrapper"
70
+ })(() => ({
71
+ alignItems: "stretch"
72
+ }));
73
+ var WebAppBodyScrollable = styled(FlexGrowCol, {
74
+ ...defaultStyledOptions,
75
+ name: WebAppBodyName,
76
+ slot: "Scrollable"
77
+ })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
78
+ const props = variant === "scrollable" ? scrollableContent : fixedContent;
79
+ return {
80
+ ...props,
81
+ alignItems: "stretch",
82
+ justifyContent: "start",
83
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
84
+ inset: "unset",
85
+ position: "relative"
86
+ }
87
+ };
88
+ });
89
+ var WebAppBody = ({
90
+ children,
91
+ breadcrumbs,
92
+ disableBreadcrumbGutter,
93
+ mobileScrollingBreakpoint,
94
+ spacing = 1,
95
+ variant,
96
+ ...props
97
+ }) => {
98
+ return /* @__PURE__ */ jsxs(WebAppBodyRoot, { mobileScrollingBreakpoint, spacing, variant, ...props, children: [
99
+ breadcrumbs ? /* @__PURE__ */ jsx(WebAppBodyBreadcrumb, { disableBreadcrumbGutter, spacing, children: breadcrumbs }) : null,
100
+ /* @__PURE__ */ jsx(WebAppBodyScrollableWrapper, { children: /* @__PURE__ */ jsx(WebAppBodyScrollable, { mobileScrollingBreakpoint, variant, children }) })
101
+ ] });
102
+ };
103
+
104
+ // src/components/Page.tsx
105
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
106
+ var WebAppPageRoot = styled2(FlexGrowCol2, {
107
+ name: "WebAppPage",
108
+ shouldForwardProp: (propName) => propName !== "mobileScrollingBreakpoint" && propName !== "variant",
109
+ slot: "Root"
110
+ })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
111
+ const props = variant === "scrollable" ? scrollableWrap : fixedWrap;
112
+ return {
113
+ ...props,
114
+ alignItems: "stretch",
115
+ justifyContent: "start",
116
+ maxWidth: "100vw",
117
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
118
+ inset: 0,
119
+ position: "absolute"
120
+ }
121
+ };
122
+ });
123
+ var WebAppPage = ({
124
+ disableGutters,
125
+ disableBreadcrumbGutter,
126
+ title,
127
+ container,
128
+ children,
129
+ breadcrumbs,
130
+ mobileScrollingBreakpoint,
131
+ variant = "scrollable",
132
+ ...props
133
+ }) => {
134
+ const userEvents = useUserEvents();
135
+ const { pathname } = useLocation();
136
+ useAsyncEffect(
137
+ // eslint-disable-next-line react-hooks/exhaustive-deps
138
+ async () => {
139
+ await userEvents?.viewContent({ name: title ?? "NodeBasePage", path: location.pathname });
140
+ },
141
+ [pathname, title, userEvents]
142
+ );
143
+ return /* @__PURE__ */ jsxs2(WebAppPageRoot, { mobileScrollingBreakpoint, variant, ...props, children: [
144
+ /* @__PURE__ */ jsx2(Helmet, { title }),
145
+ container && container !== "none" ? /* @__PURE__ */ jsx2(
146
+ Container,
147
+ {
148
+ disableGutters,
149
+ style: { alignItems: "stretch", display: "flex", flexDirection: "column", flexGrow: 1, justifyContent: "flex-start" },
150
+ maxWidth: container,
151
+ children: /* @__PURE__ */ jsx2(
152
+ WebAppBody,
153
+ {
154
+ disableBreadcrumbGutter,
155
+ breadcrumbs,
156
+ mobileScrollingBreakpoint,
157
+ variant,
158
+ ...props,
159
+ children
160
+ }
161
+ )
162
+ }
163
+ ) : /* @__PURE__ */ jsx2(
164
+ WebAppBody,
165
+ {
166
+ disableBreadcrumbGutter,
167
+ breadcrumbs,
168
+ mobileScrollingBreakpoint,
169
+ paddingX: disableGutters ? 0 : 1,
170
+ variant,
171
+ ...props,
172
+ children
173
+ }
174
+ )
175
+ ] });
176
+ };
177
+
178
+ // src/components/ErrorPage.tsx
179
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
180
+ var WebAppErrorPage = ({ error, ...props }) => /* @__PURE__ */ jsxs3(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [
181
+ /* @__PURE__ */ jsx3("h1", { children: "Oops! Something went wrong!" }),
182
+ /* @__PURE__ */ jsx3("p", { children: `${error}` }),
183
+ /* @__PURE__ */ jsx3(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })
8
184
  ] });
9
- const ErrorPage = WebAppErrorPage;
185
+ var ErrorPage = WebAppErrorPage;
10
186
  export {
11
187
  ErrorPage,
12
188
  WebAppErrorPage
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ErrorPage.tsx"],"sourcesContent":["import { ButtonEx } from '@xylabs/react-button'\n\nimport { WebAppPage, WebAppPageProps } from './Page'\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"],"mappings":"AASE,SACE,KADF;AATF,SAAS,gBAAgB;AAEzB,SAAS,kBAAmC;AAMrC,MAAM,kBAAkD,CAAC,EAAE,OAAO,GAAG,MAAM,MAChF,qBAAC,cAAW,OAAM,8BAA8B,GAAG,OACjD;AAAA,sBAAC,QAAG,yCAA2B;AAAA,EAC/B,oBAAC,OAAG,aAAG,KAAK,IAAG;AAAA,EACf,oBAAC,YAAS,MAAK,KAAI,SAAQ,aAAY,sBAEvC;AAAA,GACF;AAIK,MAAM,YAAY;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/ErrorPage.tsx","../../../src/components/Page.tsx","../../../src/components/Body.tsx","../../../src/components/lib/cssValues.ts"],"sourcesContent":["import { ButtonEx } from '@xylabs/react-button'\n\nimport { WebAppPage, WebAppPageProps } from './Page'\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 { Container, ContainerProps, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { FlexBoxProps, FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport { WebAppBody, WebAppBodyProps } from './Body'\nimport { fixedWrap, scrollableWrap } from './lib'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: (propName) => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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<WithChildren<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 // eslint-disable-next-line react-hooks/exhaustive-deps\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 <Container\n disableGutters={disableGutters}\n style={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}\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 <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 { Breakpoint, styled } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport React, { ReactNode } from 'react'\n\nimport { fixedContent, scrollableContent } from './lib'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = ['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter']\nconst defaultStyledOptions = {\n shouldForwardProp: (prop: string) => !propsNotForwarded.includes(prop),\n}\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({ spacing, theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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)]: {\n overflowY: 'scroll',\n },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({ theme, disableBreadcrumbGutter, spacing }) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }),\n)\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({\n alignItems: 'stretch',\n}))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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 <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n ) : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import { 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 = {\n ...fixedWrap,\n} as const\n\nexport const fixedContent: CSSProperties = {\n ...scrollableWrap,\n} as const\n"],"mappings":";AAAA,SAAS,gBAAgB;;;ACAzB,SAAS,WAA2B,UAAAA,eAAc;AAClD,SAAS,sBAAsB;AAC/B,SAAuB,eAAAC,oBAAmB;AAC1C,SAAS,qBAAqB;AAE9B,SAAS,cAAc;AACvB,SAAS,mBAAmB;;;ACN5B,SAAqB,cAAc;AACnC,SAAuB,aAAa,eAAe;;;ACC5C,IAAM,iBAAgC;AAAA,EAC3C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,IAAM,YAA2B;AAAA,EACtC,OAAO;AAAA,EACP,UAAU;AACZ;AAGO,IAAM,oBAAmC;AAAA,EAC9C,GAAG;AACL;AAEO,IAAM,eAA8B;AAAA,EACzC,GAAG;AACL;;;ADiEI,SAEI,KAFJ;AA9EJ,IAAM,iBAAiB;AACvB,IAAM,oBAAoB,CAAC,6BAA6B,WAAW,WAAW,yBAAyB;AACvG,IAAM,uBAAuB;AAAA,EAC3B,mBAAmB,CAAC,SAAiB,CAAC,kBAAkB,SAAS,IAAI;AACvE;AAEA,IAAM,iBAAiB,OAAO,aAAa;AAAA,EACzC,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;A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