@xylabs/react-webapp 6.4.0 → 7.0.1
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/Chrome.stories.d.ts.map +1 -1
- package/dist/browser/components/NotFoundPage/Page.stories.d.ts +1 -1
- package/dist/browser/index.mjs +148 -143
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +36 -30
- package/knip.config.ts +0 -16
- package/typedoc.json +0 -5
- package/xy.config.ts +0 -10
|
@@ -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("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
5
|
-
declare const DefaultSideBar: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
6
|
-
declare const WithFixedSizePage: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
4
|
+
declare const Default: import(".store/storybook-virtual-ae2e92fa55/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
5
|
+
declare const DefaultSideBar: import(".store/storybook-virtual-ae2e92fa55/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Chrome.tsx").WebAppChromeProps>;
|
|
6
|
+
declare const WithFixedSizePage: import(".store/storybook-virtual-ae2e92fa55/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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chrome.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Chrome.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAO1D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAI3C,QAAA,MAAM,cAAc,EAKf,IAAI,CAAC,OAAO,YAAY,CAAC,CAAA;AAwC9B,QAAA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Chrome.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Chrome.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAO1D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAI3C,QAAA,MAAM,cAAc,EAKf,IAAI,CAAC,OAAO,YAAY,CAAC,CAAA;AAwC9B,QAAA,MAAM,OAAO,8KAAoB,CAAA;AAGjC,QAAA,MAAM,cAAc,8KAAoB,CAAA;AAGxC,QAAA,MAAM,iBAAiB,8KAAoB,CAAA;AAG3C,OAAO,EACL,OAAO,EAAE,cAAc,EAAE,iBAAiB,GAC3C,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -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("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("
|
|
5
|
+
declare const Default: import(".store/storybook-virtual-ae2e92fa55/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import(".store/@mui-system-virtual-b81e086dd0/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-b81e086dd0/package").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
6
6
|
component?: React.ElementType;
|
|
7
7
|
}>;
|
|
8
8
|
export { Default };
|
package/dist/browser/index.mjs
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/components/Body.tsx
|
|
5
2
|
import { styled } from "@mui/material";
|
|
6
3
|
import { FlexGrowCol, FlexRow } from "@xylabs/react-flexbox";
|
|
7
|
-
import React from "react";
|
|
8
4
|
|
|
9
5
|
// src/components/lib/cssValues.ts
|
|
10
6
|
var scrollableWrap = {
|
|
@@ -15,29 +11,24 @@ var fixedWrap = {
|
|
|
15
11
|
inset: "unset",
|
|
16
12
|
position: "relative"
|
|
17
13
|
};
|
|
18
|
-
var scrollableContent = {
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
var fixedContent = {
|
|
22
|
-
...scrollableWrap
|
|
23
|
-
};
|
|
14
|
+
var scrollableContent = { ...fixedWrap };
|
|
15
|
+
var fixedContent = { ...scrollableWrap };
|
|
24
16
|
|
|
25
17
|
// src/components/Body.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
19
|
var WebAppBodyName = "WebAppBody";
|
|
27
|
-
var propsNotForwarded = /* @__PURE__ */ new Set([
|
|
28
|
-
|
|
29
|
-
"variant",
|
|
30
|
-
"spacing",
|
|
31
|
-
"disableBreadcrumbGutter"
|
|
32
|
-
]);
|
|
33
|
-
var defaultStyledOptions = {
|
|
34
|
-
shouldForwardProp: /* @__PURE__ */ __name((prop) => !propsNotForwarded.has(prop), "shouldForwardProp")
|
|
35
|
-
};
|
|
20
|
+
var propsNotForwarded = /* @__PURE__ */ new Set(["mobileScrollingBreakpoint", "variant", "spacing", "disableBreadcrumbGutter"]);
|
|
21
|
+
var defaultStyledOptions = { shouldForwardProp: (prop) => !propsNotForwarded.has(prop) };
|
|
36
22
|
var WebAppBodyRoot = styled(FlexGrowCol, {
|
|
37
23
|
...defaultStyledOptions,
|
|
38
24
|
name: WebAppBodyName,
|
|
39
25
|
slot: "Root"
|
|
40
|
-
})(({
|
|
26
|
+
})(({
|
|
27
|
+
spacing,
|
|
28
|
+
theme,
|
|
29
|
+
mobileScrollingBreakpoint = "sm",
|
|
30
|
+
variant
|
|
31
|
+
}) => {
|
|
41
32
|
const scrollable = variant === "scrollable";
|
|
42
33
|
return theme.unstable_sx({
|
|
43
34
|
alignItems: "stretch",
|
|
@@ -46,30 +37,34 @@ var WebAppBodyRoot = styled(FlexGrowCol, {
|
|
|
46
37
|
overflowX: "visible",
|
|
47
38
|
overflowY: scrollable ? "scroll" : "hidden",
|
|
48
39
|
paddingY: spacing,
|
|
49
|
-
[theme.breakpoints.down(mobileScrollingBreakpoint)]: {
|
|
50
|
-
overflowY: "scroll"
|
|
51
|
-
}
|
|
40
|
+
[theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: "scroll" }
|
|
52
41
|
});
|
|
53
42
|
});
|
|
54
43
|
var WebAppBodyBreadcrumb = styled(FlexRow, {
|
|
55
44
|
...defaultStyledOptions,
|
|
56
45
|
name: WebAppBodyName,
|
|
57
46
|
slot: "Breadcrumb"
|
|
58
|
-
})(({
|
|
47
|
+
})(({
|
|
48
|
+
theme,
|
|
49
|
+
disableBreadcrumbGutter,
|
|
50
|
+
spacing
|
|
51
|
+
}) => theme.unstable_sx({
|
|
59
52
|
justifyContent: "start",
|
|
60
53
|
marginX: disableBreadcrumbGutter ? 0 : spacing
|
|
61
54
|
}));
|
|
62
55
|
var WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
|
|
63
56
|
name: WebAppBodyName,
|
|
64
57
|
slot: "ScrollableWrapper"
|
|
65
|
-
})(() => ({
|
|
66
|
-
alignItems: "stretch"
|
|
67
|
-
}));
|
|
58
|
+
})(() => ({ alignItems: "stretch" }));
|
|
68
59
|
var WebAppBodyScrollable = styled(FlexGrowCol, {
|
|
69
60
|
...defaultStyledOptions,
|
|
70
61
|
name: WebAppBodyName,
|
|
71
62
|
slot: "Scrollable"
|
|
72
|
-
})(({
|
|
63
|
+
})(({
|
|
64
|
+
theme,
|
|
65
|
+
mobileScrollingBreakpoint = "sm",
|
|
66
|
+
variant
|
|
67
|
+
}) => {
|
|
73
68
|
const props = variant === "scrollable" ? scrollableContent : fixedContent;
|
|
74
69
|
return {
|
|
75
70
|
...props,
|
|
@@ -81,46 +76,52 @@ var WebAppBodyScrollable = styled(FlexGrowCol, {
|
|
|
81
76
|
}
|
|
82
77
|
};
|
|
83
78
|
});
|
|
84
|
-
var WebAppBody =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
variant
|
|
96
|
-
}
|
|
97
|
-
}
|
|
79
|
+
var WebAppBody = ({
|
|
80
|
+
children,
|
|
81
|
+
breadcrumbs,
|
|
82
|
+
disableBreadcrumbGutter,
|
|
83
|
+
mobileScrollingBreakpoint,
|
|
84
|
+
spacing = 1,
|
|
85
|
+
variant,
|
|
86
|
+
...props
|
|
87
|
+
}) => {
|
|
88
|
+
return /* @__PURE__ */ jsxs(WebAppBodyRoot, { mobileScrollingBreakpoint, spacing, variant, ...props, children: [
|
|
89
|
+
breadcrumbs ? /* @__PURE__ */ jsx(WebAppBodyBreadcrumb, { disableBreadcrumbGutter, spacing, children: breadcrumbs }) : null,
|
|
90
|
+
/* @__PURE__ */ jsx(WebAppBodyScrollableWrapper, { children: /* @__PURE__ */ jsx(WebAppBodyScrollable, { mobileScrollingBreakpoint, variant, children }) })
|
|
91
|
+
] });
|
|
92
|
+
};
|
|
98
93
|
|
|
99
94
|
// src/components/Chrome.tsx
|
|
100
95
|
import { Divider, Paper } from "@mui/material";
|
|
101
96
|
import { ApplicationAppBar, SystemToolbar } from "@xylabs/react-appbar";
|
|
102
97
|
import { ErrorBoundary } from "@xylabs/react-error";
|
|
103
|
-
import {
|
|
104
|
-
|
|
98
|
+
import {
|
|
99
|
+
FlexCol,
|
|
100
|
+
FlexGrowCol as FlexGrowCol3,
|
|
101
|
+
FlexGrowRow
|
|
102
|
+
} from "@xylabs/react-flexbox";
|
|
105
103
|
import { Helmet as Helmet2 } from "react-helmet";
|
|
106
104
|
|
|
107
105
|
// src/components/ErrorPage.tsx
|
|
108
106
|
import { ButtonEx } from "@xylabs/react-button";
|
|
109
|
-
import React3 from "react";
|
|
110
107
|
|
|
111
108
|
// src/components/Page.tsx
|
|
112
109
|
import { Container, styled as styled2 } from "@mui/material";
|
|
113
110
|
import { useAsyncEffect } from "@xylabs/react-async-effect";
|
|
114
111
|
import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
|
|
115
112
|
import { useUserEvents } from "@xylabs/react-pixel";
|
|
116
|
-
import React2 from "react";
|
|
117
113
|
import { Helmet } from "react-helmet";
|
|
118
114
|
import { useLocation } from "react-router-dom";
|
|
115
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
119
116
|
var WebAppPageRoot = styled2(FlexGrowCol2, {
|
|
120
117
|
name: "WebAppPage",
|
|
121
|
-
shouldForwardProp:
|
|
118
|
+
shouldForwardProp: (propName) => propName !== "mobileScrollingBreakpoint" && propName !== "variant",
|
|
122
119
|
slot: "Root"
|
|
123
|
-
})(({
|
|
120
|
+
})(({
|
|
121
|
+
theme,
|
|
122
|
+
mobileScrollingBreakpoint = "sm",
|
|
123
|
+
variant
|
|
124
|
+
}) => {
|
|
124
125
|
const props = variant === "scrollable" ? scrollableWrap : fixedWrap;
|
|
125
126
|
return {
|
|
126
127
|
...props,
|
|
@@ -133,114 +134,118 @@ var WebAppPageRoot = styled2(FlexGrowCol2, {
|
|
|
133
134
|
}
|
|
134
135
|
};
|
|
135
136
|
});
|
|
136
|
-
var WebAppPage =
|
|
137
|
+
var WebAppPage = ({
|
|
138
|
+
disableGutters,
|
|
139
|
+
disableBreadcrumbGutter,
|
|
140
|
+
title,
|
|
141
|
+
container,
|
|
142
|
+
children,
|
|
143
|
+
breadcrumbs,
|
|
144
|
+
mobileScrollingBreakpoint,
|
|
145
|
+
variant = "scrollable",
|
|
146
|
+
...props
|
|
147
|
+
}) => {
|
|
137
148
|
const userEvents = useUserEvents();
|
|
138
149
|
const { pathname } = useLocation();
|
|
139
|
-
useAsyncEffect(
|
|
140
|
-
|
|
141
|
-
name: title ?? "NodeBasePage",
|
|
142
|
-
path: location.pathname
|
|
143
|
-
});
|
|
144
|
-
}, [
|
|
145
|
-
pathname,
|
|
146
|
-
title,
|
|
147
|
-
userEvents
|
|
148
|
-
]);
|
|
149
|
-
return /* @__PURE__ */ React2.createElement(WebAppPageRoot, {
|
|
150
|
-
mobileScrollingBreakpoint,
|
|
151
|
-
variant,
|
|
152
|
-
...props
|
|
153
|
-
}, /* @__PURE__ */ React2.createElement(Helmet, {
|
|
154
|
-
title
|
|
155
|
-
}), container && container !== "none" ? /* @__PURE__ */ React2.createElement(Container, {
|
|
156
|
-
disableGutters,
|
|
157
|
-
style: {
|
|
158
|
-
alignItems: "stretch",
|
|
159
|
-
display: "flex",
|
|
160
|
-
flexDirection: "column",
|
|
161
|
-
flexGrow: 1,
|
|
162
|
-
justifyContent: "flex-start"
|
|
150
|
+
useAsyncEffect(
|
|
151
|
+
async () => {
|
|
152
|
+
await userEvents?.viewContent({ name: title ?? "NodeBasePage", path: location.pathname });
|
|
163
153
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
154
|
+
[pathname, title, userEvents]
|
|
155
|
+
);
|
|
156
|
+
return /* @__PURE__ */ jsxs2(WebAppPageRoot, { mobileScrollingBreakpoint, variant, ...props, children: [
|
|
157
|
+
/* @__PURE__ */ jsx2(Helmet, { title }),
|
|
158
|
+
container && container !== "none" ? /* @__PURE__ */ jsx2(
|
|
159
|
+
Container,
|
|
160
|
+
{
|
|
161
|
+
disableGutters,
|
|
162
|
+
style: {
|
|
163
|
+
alignItems: "stretch",
|
|
164
|
+
display: "flex",
|
|
165
|
+
flexDirection: "column",
|
|
166
|
+
flexGrow: 1,
|
|
167
|
+
justifyContent: "flex-start"
|
|
168
|
+
},
|
|
169
|
+
maxWidth: container,
|
|
170
|
+
children: /* @__PURE__ */ jsx2(
|
|
171
|
+
WebAppBody,
|
|
172
|
+
{
|
|
173
|
+
disableBreadcrumbGutter,
|
|
174
|
+
breadcrumbs,
|
|
175
|
+
mobileScrollingBreakpoint,
|
|
176
|
+
variant,
|
|
177
|
+
...props,
|
|
178
|
+
children
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
) : /* @__PURE__ */ jsx2(
|
|
183
|
+
WebAppBody,
|
|
184
|
+
{
|
|
185
|
+
disableBreadcrumbGutter,
|
|
186
|
+
breadcrumbs,
|
|
187
|
+
mobileScrollingBreakpoint,
|
|
188
|
+
paddingX: disableGutters ? 0 : 1,
|
|
189
|
+
variant,
|
|
190
|
+
...props,
|
|
191
|
+
children
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
] });
|
|
195
|
+
};
|
|
180
196
|
var FlexPage = WebAppPage;
|
|
181
197
|
|
|
182
198
|
// src/components/ErrorPage.tsx
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
href: "/",
|
|
188
|
-
|
|
189
|
-
}, "Homepage")), "WebAppErrorPage");
|
|
199
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
200
|
+
var WebAppErrorPage = ({ error, ...props }) => /* @__PURE__ */ jsxs3(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [
|
|
201
|
+
/* @__PURE__ */ jsx3("h1", { children: "Oops! Something went wrong!" }),
|
|
202
|
+
/* @__PURE__ */ jsx3("p", { children: `${error}` }),
|
|
203
|
+
/* @__PURE__ */ jsx3(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })
|
|
204
|
+
] });
|
|
190
205
|
var ErrorPage = WebAppErrorPage;
|
|
191
206
|
|
|
192
207
|
// src/components/Chrome.tsx
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
id: "footer-flex",
|
|
229
|
-
alignItems: "stretch"
|
|
230
|
-
}, /* @__PURE__ */ React4.createElement(Paper, {
|
|
231
|
-
elevation: footerElevation,
|
|
232
|
-
square: true
|
|
233
|
-
}, footer)));
|
|
234
|
-
}, "WebAppChrome");
|
|
208
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
209
|
+
var WebAppChrome = ({
|
|
210
|
+
ref,
|
|
211
|
+
appName,
|
|
212
|
+
appbar,
|
|
213
|
+
children,
|
|
214
|
+
errorBoundary,
|
|
215
|
+
errorPage,
|
|
216
|
+
footer,
|
|
217
|
+
footerElevation = 4,
|
|
218
|
+
menuItems,
|
|
219
|
+
navigationType = "menu",
|
|
220
|
+
...props
|
|
221
|
+
}) => {
|
|
222
|
+
return /* @__PURE__ */ jsxs4(FlexCol, { id: "web-chrome-flex", alignItems: "stretch", overflow: "hidden", height: "100vh", ref, ...props, children: [
|
|
223
|
+
/* @__PURE__ */ jsx4(Helmet2, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: /* @__PURE__ */ jsx4("meta", { content: "website", property: "og:type" }) }),
|
|
224
|
+
appbar ?? /* @__PURE__ */ jsx4(ApplicationAppBar, { systemToolbar: /* @__PURE__ */ jsx4(SystemToolbar, { menuItems: navigationType === "menu" ? menuItems : void 0 }) }),
|
|
225
|
+
/* @__PURE__ */ jsxs4(FlexGrowRow, { id: "sidebar-nav-flex", overflow: "hidden", alignItems: "stretch", children: [
|
|
226
|
+
navigationType === "menu" ? null : /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
227
|
+
menuItems,
|
|
228
|
+
/* @__PURE__ */ jsx4(Divider, { orientation: "vertical" })
|
|
229
|
+
] }),
|
|
230
|
+
/* @__PURE__ */ jsx4(FlexGrowCol3, { id: "main-flex", justifyContent: "flex-start", alignItems: "stretch", children: errorBoundary ? /* @__PURE__ */ jsx4(
|
|
231
|
+
ErrorBoundary,
|
|
232
|
+
{
|
|
233
|
+
fallbackWithError: (error) => {
|
|
234
|
+
return errorPage ?? /* @__PURE__ */ jsx4(WebAppErrorPage, { error });
|
|
235
|
+
},
|
|
236
|
+
children
|
|
237
|
+
}
|
|
238
|
+
) : children })
|
|
239
|
+
] }),
|
|
240
|
+
/* @__PURE__ */ jsx4(FlexCol, { id: "footer-flex", alignItems: "stretch", children: /* @__PURE__ */ jsx4(Paper, { elevation: footerElevation, square: true, children: footer }) })
|
|
241
|
+
] });
|
|
242
|
+
};
|
|
235
243
|
WebAppChrome.displayName = "WebAppChrome";
|
|
236
244
|
|
|
237
245
|
// src/components/NotFoundPage/Page.tsx
|
|
238
246
|
import { NotFound } from "@xylabs/react-shared";
|
|
239
|
-
import
|
|
240
|
-
var WebAppNotFoundPage = /* @__PURE__ */
|
|
241
|
-
title: title ?? "Sorry! Page Not Found",
|
|
242
|
-
...props
|
|
243
|
-
}, /* @__PURE__ */ React5.createElement(NotFound, null)), "WebAppNotFoundPage");
|
|
247
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
248
|
+
var WebAppNotFoundPage = ({ title, ...props }) => /* @__PURE__ */ jsx5(WebAppPage, { title: title ?? "Sorry! Page Not Found", ...props, children: /* @__PURE__ */ jsx5(NotFound, {}) });
|
|
244
249
|
var NotFoundPage = WebAppNotFoundPage;
|
|
245
250
|
export {
|
|
246
251
|
ErrorPage,
|
|
@@ -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,SAASA,cAAc;AAEvB,SAASC,aAAaC,eAAe;AAErC,OAAOC,WAAW;;;ACHX,IAAMC,iBAAgC;EAC3CC,OAAO;EACPC,UAAU;AACZ;AAEO,IAAMC,YAA2B;EACtCF,OAAO;EACPC,UAAU;AACZ;AAGO,IAAME,oBAAmC;EAAE,GAAGD;AAAU;AAExD,IAAME,eAA8B;EAAE,GAAGL;AAAe;;;ADN/D,IAAMM,iBAAiB;AACvB,IAAMC,oBAAoB,oBAAIC,IAAI;EAAC;EAA6B;EAAW;EAAW;CAA0B;AAChH,IAAMC,uBAAuB;EAAEC,mBAAmB,wBAACC,SAAiB,CAACJ,kBAAkBK,IAAID,IAAAA,GAAzC;AAA+C;AAEjG,IAAME,iBAAiBC,OAAOC,aAAa;EACzC,GAAGN;EACHO,MAAMV;EACNW,MAAM;AACR,CAAA,EAAoB,CAAC,EACnBC,SAASC,OAAOC,4BAA4B,MAAMC,QAAO,MAC1D;AACC,QAAMC,aAAaD,YAAY;AAC/B,SAAOF,MAAMI,YAAY;IACvBC,YAAY;IACZC,KAAK;IACLC,gBAAgB;IAChBC,WAAW;IACXC,WAAWN,aAAa,WAAW;IACnCO,UAAUX;IACV,CAACC,MAAMW,YAAYC,KAAKX,yBAAAA,CAAAA,GAA6B;MAAEQ,WAAW;IAAS;EAC7E,CAAA;AACF,CAAA;AAEA,IAAMI,uBAAuBlB,OAAOmB,SAAS;EAC3C,GAAGxB;EACHO,MAAMV;EACNW,MAAM;A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AAYjB,IAAG;IAAYkB,gBAAe;IAAajB,YAAW;KAChEV,gBAEK,gBAAAO,OAAA,cAACqB,eAAAA;IACCC,mBAAmB,wBAACC,UAAAA;AAClB,aAAO7B,aAAa,gBAAAM,OAAA,cAACwB,iBAAAA;QAAgBD;;IACvC,GAFmB;KAIlB/B,QAAAA,IAGLA,QAAAA,CAAAA,GAGR,gBAAAQ,OAAA,cAACC,SAAAA;IAAQC,IAAG;IAAcC,YAAW;KACnC,gBAAAH,OAAA,cAACyB,OAAAA;IAAMC,WAAW9B;IAAiB+B,QAAAA;KAChChC,MAAAA,CAAAA,CAAAA;AAKX,GAvC4B;AAyC5BP,aAAawC,cAAc;;;AGlE3B,SAASC,gBAAgB;AACzB,OAAOC,YAAW;AAKX,IAAMC,qBAAgD,wBAAC,EAAEC,OAAO,GAAGC,MAAAA,MACxE,gBAAAC,OAAA,cAACC,YAAAA;EAAWH,OAAOA,SAAS;EAA0B,GAAGC;GACvD,gBAAAC,OAAA,cAACE,UAAAA,IAAAA,CAAAA,GAFwD;AAOtD,IAAMC,eAAeN;","names":["styled","FlexGrowCol","FlexRow","React","scrollableWrap","inset","position","fixedWrap","scrollableContent","fixedContent","WebAppBodyName","propsNotForwarded","Set","defaultStyledOptions","shouldForwardProp","prop","has","WebAppBodyRoot","styled","FlexGrowCol","name","slot","spacing","theme","mobileScrollingBreakpoint","variant","scrollable","unstable_sx","alignItems","gap","justifyContent","overflowX","overflowY","paddingY","breakpoints","down","WebAppBodyBreadcrumb","FlexRow","disableBreadcrumbGutter","marginX","WebAppBodyScrollableWrapper","WebAppBodyScrollable","props","scrollableContent","fixedContent","inset","position","WebAppBody","children","breadcrumbs","Divider","Paper","ApplicationAppBar","SystemToolbar","ErrorBoundary","FlexCol","FlexGrowCol","FlexGrowRow","React","Helmet","ButtonEx","React","Container","styled","useAsyncEffect","FlexGrowCol","useUserEvents","React","Helmet","useLocation","WebAppPageRoot","styled","FlexGrowCol","name","shouldForwardProp","propName","slot","theme","mobileScrollingBreakpoint","variant","props","scrollableWrap","fixedWrap","alignItems","justifyContent","maxWidth","breakpoints","down","inset","position","WebAppPage","disableGutters","disableBreadcrumbGutter","title","container","children","breadcrumbs","userEvents","useUserEvents","pathname","useLocation","useAsyncEffect","viewContent","path","location","React","Helmet","Container","style","display","flexDirection","flexGrow","WebAppBody","paddingX","FlexPage","WebAppErrorPage","error","props","React","WebAppPage","title","h1","p","ButtonEx","href","variant","ErrorPage","WebAppChrome","ref","appName","appbar","children","errorBoundary","errorPage","footer","footerElevation","menuItems","navigationType","props","React","FlexCol","id","alignItems","overflow","height","Helmet","defaultTitle","titleTemplate","meta","content","property","ApplicationAppBar","systemToolbar","SystemToolbar","undefined","FlexGrowRow","Divider","orientation","FlexGrowCol","justifyContent","ErrorBoundary","fallbackWithError","error","WebAppErrorPage","Paper","elevation","square","displayName","NotFound","React","WebAppNotFoundPage","title","props","React","WebAppPage","NotFound","NotFoundPage"]}
|
|
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,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,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AO,cAAc,SAAS,eAAe,QAAQ,OAAO,IAC3D,0BAAAF,KAAC,UAAK,SAAQ,WAAU,UAAS,WAAU,GAC7C;AAAA,IACC,UAAU,gBAAAA,KAAC,qBAAkB,eAAe,gBAAAA,KAAC,iBAAc,WAAW,mBAAmB,SAAS,YAAY,QAAW,GAAI;AAAA,IAC9H,gBAAAC,MAAC,eAAY,IAAG,oBAAmB,UAAS,UAAS,YAAW,WAC7D;AAAA,yBAAmB,SAChB,OAEE,gBAAAA,MAAA,YACG;AAAA;AAAA,QACD,gBAAAD,KAAC,WAAQ,aAAY,YAAW;AAAA,SAClC;AAAA,MAEN,gBAAAA,KAACG,cAAA,EAAY,IAAG,aAAY,gBAAe,cAAa,YAAW,WAChE,0BAEK,gBAAAH;AAAA,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": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Common React library for all XY Labs projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"utility",
|
|
@@ -37,42 +37,48 @@
|
|
|
37
37
|
},
|
|
38
38
|
"module": "dist/browser/index.mjs",
|
|
39
39
|
"types": "dist/browser/index.d.ts",
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"src"
|
|
43
|
+
],
|
|
40
44
|
"dependencies": {
|
|
41
|
-
"@xylabs/react-app-settings": "
|
|
42
|
-
"@xylabs/react-appbar": "
|
|
43
|
-
"@xylabs/react-async-effect": "
|
|
44
|
-
"@xylabs/react-button": "
|
|
45
|
-
"@xylabs/react-error": "
|
|
46
|
-
"@xylabs/react-flexbox": "
|
|
47
|
-
"@xylabs/react-pixel": "
|
|
48
|
-
"@xylabs/react-shared": "
|
|
49
|
-
"react-helmet": "
|
|
45
|
+
"@xylabs/react-app-settings": "~7.0.1",
|
|
46
|
+
"@xylabs/react-appbar": "~7.0.1",
|
|
47
|
+
"@xylabs/react-async-effect": "~7.0.1",
|
|
48
|
+
"@xylabs/react-button": "~7.0.1",
|
|
49
|
+
"@xylabs/react-error": "~7.0.1",
|
|
50
|
+
"@xylabs/react-flexbox": "~7.0.1",
|
|
51
|
+
"@xylabs/react-pixel": "~7.0.1",
|
|
52
|
+
"@xylabs/react-shared": "~7.0.1",
|
|
53
|
+
"react-helmet": "~6.1.0"
|
|
50
54
|
},
|
|
51
55
|
"devDependencies": {
|
|
52
|
-
"@mui/icons-material": "
|
|
53
|
-
"@mui/material": "
|
|
54
|
-
"@storybook/react-vite": "
|
|
55
|
-
"@types/react": "
|
|
56
|
-
"@types/react-helmet": "
|
|
57
|
-
"@xylabs/react-button": "
|
|
58
|
-
"@xylabs/react-flexbox": "
|
|
59
|
-
"@xylabs/react-link": "
|
|
60
|
-
"@xylabs/react-pixel": "
|
|
61
|
-
"@xylabs/ts-scripts-yarn3": "
|
|
62
|
-
"@xylabs/tsconfig
|
|
63
|
-
"
|
|
64
|
-
"react": "
|
|
65
|
-
"react
|
|
66
|
-
"react-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
56
|
+
"@mui/icons-material": "~7.3.1",
|
|
57
|
+
"@mui/material": "~7.3.1",
|
|
58
|
+
"@storybook/react-vite": "~9.1.2",
|
|
59
|
+
"@types/react": "~19.1.10",
|
|
60
|
+
"@types/react-helmet": "~6.1.11",
|
|
61
|
+
"@xylabs/react-button": "~7.0.1",
|
|
62
|
+
"@xylabs/react-flexbox": "~7.0.1",
|
|
63
|
+
"@xylabs/react-link": "~7.0.1",
|
|
64
|
+
"@xylabs/react-pixel": "~7.0.1",
|
|
65
|
+
"@xylabs/ts-scripts-yarn3": "~7.1.1",
|
|
66
|
+
"@xylabs/tsconfig": "~7.1.1",
|
|
67
|
+
"@xylabs/tsconfig-dom": "~7.1.1",
|
|
68
|
+
"@xylabs/tsconfig-react": "~7.1.1",
|
|
69
|
+
"react": "~19.1.1",
|
|
70
|
+
"react-dom": "~19.1.1",
|
|
71
|
+
"react-router-dom": "~7.8.0",
|
|
72
|
+
"storybook": "~9.1.2",
|
|
73
|
+
"typescript": "~5.9.2",
|
|
74
|
+
"vite": "~7.1.2"
|
|
69
75
|
},
|
|
70
76
|
"peerDependencies": {
|
|
71
77
|
"@mui/icons-material": ">=6 <8",
|
|
72
78
|
"@mui/material": ">=6 <8",
|
|
73
|
-
"react": "
|
|
74
|
-
"react-dom": "
|
|
75
|
-
"react-router-dom": "
|
|
79
|
+
"react": "~19",
|
|
80
|
+
"react-dom": "~19",
|
|
81
|
+
"react-router-dom": "~7"
|
|
76
82
|
},
|
|
77
83
|
"publishConfig": {
|
|
78
84
|
"access": "public"
|
package/knip.config.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { KnipConfig } from 'knip'
|
|
2
|
-
|
|
3
|
-
const config: KnipConfig = {
|
|
4
|
-
entry: [
|
|
5
|
-
'src/index.ts',
|
|
6
|
-
],
|
|
7
|
-
ignore: ['packages/**'],
|
|
8
|
-
project: ['src/**/*.ts*'],
|
|
9
|
-
typescript: {
|
|
10
|
-
config: [
|
|
11
|
-
'tsconfig.json',
|
|
12
|
-
],
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default config
|
package/typedoc.json
DELETED