@xyo-network/react-webapp 2.41.48 → 2.41.51

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.
@@ -7,6 +7,8 @@ import { ErrorBoundary } from '@xyo-network/react-shared';
7
7
  import { Helmet } from 'react-helmet';
8
8
  import { WebAppErrorPage } from './ErrorPage';
9
9
  export const WebAppChrome = ({ appName, appbar, children, errorPage, footer, footerElevation = 4, menuItems, navigationType = 'menu', ...props }) => {
10
- return (_jsxs(FlexCol, { id: "web-chrome-flex", alignItems: "stretch", overflow: "hidden", height: "100vh", ...props, children: [_jsx(Helmet, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: _jsx("meta", { content: "website", property: "og:type" }) }), appbar ?? _jsx(ApplicationAppBar, { systemToolbar: _jsx(SystemToolbar, { menuItems: navigationType === 'menu' ? menuItems : undefined }) }), _jsxs(FlexGrowRow, { id: "sidebar-nav-flex", overflow: "hidden", alignItems: "stretch", children: [navigationType !== 'menu' ? (_jsxs(_Fragment, { children: [menuItems, _jsx(Divider, { orientation: "vertical" })] })) : null, _jsx(FlexGrowCol, { id: "main-flex", justifyContent: "flex-start", alignItems: "stretch", children: _jsx(ErrorBoundary, { fallback: errorPage ?? _jsx(WebAppErrorPage, {}), children: children }) })] }), _jsx(FlexCol, { id: "footer-flex", alignItems: "stretch", children: _jsx(Paper, { elevation: footerElevation, square: true, children: footer ?? _jsx(Footer, { dynamicHeight: true }) }) })] }));
10
+ return (_jsxs(FlexCol, { id: "web-chrome-flex", alignItems: "stretch", overflow: "hidden", height: "100vh", ...props, children: [_jsx(Helmet, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: _jsx("meta", { content: "website", property: "og:type" }) }), appbar ?? _jsx(ApplicationAppBar, { systemToolbar: _jsx(SystemToolbar, { menuItems: navigationType === 'menu' ? menuItems : undefined }) }), _jsxs(FlexGrowRow, { id: "sidebar-nav-flex", overflow: "hidden", alignItems: "stretch", children: [navigationType !== 'menu' ? (_jsxs(_Fragment, { children: [menuItems, _jsx(Divider, { orientation: "vertical" })] })) : null, _jsx(FlexGrowCol, { id: "main-flex", justifyContent: "flex-start", alignItems: "stretch", children: _jsx(ErrorBoundary, { fallbackWithError: (error) => {
11
+ return errorPage ?? _jsx(WebAppErrorPage, { error: error });
12
+ }, children: children }) })] }), _jsx(FlexCol, { id: "footer-flex", alignItems: "stretch", children: _jsx(Paper, { elevation: footerElevation, square: true, children: footer ?? _jsx(Footer, { dynamicHeight: true }) }) })] }));
11
13
  };
12
14
  //# sourceMappingURL=Chrome.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chrome.js","sourceRoot":"","sources":["../../../src/components/Chrome.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAgB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAY7C,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,MAAM,EACN,eAAe,GAAG,CAAC,EACnB,SAAS,EACT,cAAc,GAAG,MAAM,EACvB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,MAAC,OAAO,IAAC,EAAE,EAAC,iBAAiB,EAAC,UAAU,EAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,EAAC,MAAM,EAAC,OAAO,KAAK,KAAK,aAC3F,KAAC,MAAM,IAAC,YAAY,EAAE,OAAO,EAA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K,EAAE,KAAK,GAAI,CAAA;4BACvD,CAAC,YAEA,QAAQ,GACK,GACJ,IACF,EACd,KAAC,OAAO,IAAC,EAAE,EAAC,aAAa,EAAC,UAAU,EAAC,SAAS,YAC5C,KAAC,KAAK,IAAC,SAAS,EAAE,eAAe,EAAE,MAAM,kBACtC,MAAM,IAAI,KAAC,MAAM,IAAC,aAAa,SAAG,GAC7B,GACA,IACF,CACX,CAAA;AACH,CAAC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ButtonEx } from '@xylabs/react-button';
3
3
  import { WebAppPage } from './Page';
4
- export const WebAppErrorPage = (props) => (_jsxs(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [_jsx("h1", { children: "Oops! Something went wrong!" }), _jsx(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })] }));
4
+ export const WebAppErrorPage = ({ error, ...props }) => (_jsxs(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [_jsx("h1", { children: "Oops! Something went wrong!" }), _jsx("p", { children: `${error}` }), _jsx(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })] }));
5
5
  /** @deprecated use WebAppErrorPage instead */
6
6
  export const ErrorPage = WebAppErrorPage;
7
7
  //# sourceMappingURL=ErrorPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorPage.js","sourceRoot":"","sources":["../../../src/components/ErrorPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAmB,MAAM,QAAQ,CAAA;AAEpD,MAAM,CAAC,MAAM,eAAe,GAA8B,CAAC,KAAK,EAAE,EAAE,CAAC,CACnE,MAAC,UAAU,IAAC,KAAK,EAAC,4BAA4B,KAAK,KAAK,aACtD,uDAAoC,EACpC,KAAC,QAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,OAAO,EAAC,WAAW,yBAE3B,IACA,CACd,CAAA;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAA"}
1
+ {"version":3,"file":"ErrorPage.js","sourceRoot":"","sources":["../../../src/components/ErrorPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAmB,MAAM,QAAQ,CAAA;AAMpD,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CACtF,MAAC,UAAU,IAAC,KAAK,EAAC,4BAA4B,KAAK,KAAK,aACtD,uDAAoC,EACpC,sBAAI,GAAG,KAAK,EAAE,GAAK,EACnB,KAAC,QAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,OAAO,EAAC,WAAW,yBAE3B,IACA,CACd,CAAA;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Chrome.d.ts","sourceRoot":"","sources":["../../../src/components/Chrome.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqC,MAAM,uBAAuB,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAItE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,cAAc,CAAC,EAAE,oBAAoB,CAAA;CACtC;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmCpD,CAAA"}
1
+ {"version":3,"file":"Chrome.d.ts","sourceRoot":"","sources":["../../../src/components/Chrome.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqC,MAAM,uBAAuB,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAItE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,cAAc,CAAC,EAAE,oBAAoB,CAAA;CACtC;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyCpD,CAAA"}
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { WebAppPageProps } from './Page';
3
- export declare const WebAppErrorPage: React.FC<WebAppPageProps>;
3
+ export interface WebAppErrorPageProps extends WebAppPageProps {
4
+ error?: Error;
5
+ }
6
+ export declare const WebAppErrorPage: React.FC<WebAppErrorPageProps>;
4
7
  /** @deprecated use WebAppErrorPage instead */
5
- export declare const ErrorPage: import("react").FC<WebAppPageProps>;
8
+ export declare const ErrorPage: import("react").FC<WebAppErrorPageProps>;
6
9
  //# sourceMappingURL=ErrorPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorPage.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPage.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,eAAe,EAAE,MAAM,QAAQ,CAAA;AAEpD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAOrD,CAAA;AAED,8CAA8C;AAC9C,eAAO,MAAM,SAAS,qCAAkB,CAAA"}
1
+ {"version":3,"file":"ErrorPage.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPage.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,eAAe,EAAE,MAAM,QAAQ,CAAA;AAEpD,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAQ1D,CAAA;AAED,8CAA8C;AAC9C,eAAO,MAAM,SAAS,0CAAkB,CAAA"}
package/package.json CHANGED
@@ -10,28 +10,22 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xyo-network/react-app-settings": "^2.41.48",
14
- "@xyo-network/react-appbar": "^2.41.48",
15
- "@xyo-network/react-footer": "^2.41.48",
16
- "@xyo-network/react-shared": "^2.41.48"
13
+ "@xyo-network/react-app-settings": "^2.41.51",
14
+ "@xyo-network/react-appbar": "^2.41.51",
15
+ "@xyo-network/react-footer": "^2.41.51",
16
+ "@xyo-network/react-shared": "^2.41.51"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@mui/icons-material": "^5",
20
20
  "@mui/material": "^5",
21
21
  "@mui/styles": "^5",
22
22
  "@scure/bip39": "^1",
23
- "@xylabs/assert": "^2",
24
23
  "@xylabs/pixel": "^1",
25
24
  "@xylabs/react-button": "^2",
26
25
  "@xylabs/react-flexbox": "^2",
27
26
  "@xylabs/react-pixel": "^2",
28
27
  "@xylabs/react-shared": "^2",
29
- "async-mutex": "^0.4",
30
28
  "axios": "^1",
31
- "bowser": "^2",
32
- "js-cookie": "^3",
33
- "lodash": "^4",
34
- "md5": "^2",
35
29
  "react": "^18",
36
30
  "react-dom": "^18",
37
31
  "react-helmet": "^6",
@@ -49,12 +43,7 @@
49
43
  "@xylabs/react-shared": "^2.16.7",
50
44
  "@xylabs/ts-scripts-yarn3": "^2.14.2",
51
45
  "@xylabs/tsconfig-react": "^2.14.2",
52
- "async-mutex": "^0.4.0",
53
46
  "axios": "^1.3.2",
54
- "bowser": "^2.11.0",
55
- "js-cookie": "^3.0.1",
56
- "lodash": "^4.17.21",
57
- "md5": "^2.3.0",
58
47
  "react-helmet": "^6.1.0",
59
48
  "require-from-string": "^2.0.2",
60
49
  "typescript": "^4.9.5"
@@ -102,5 +91,5 @@
102
91
  },
103
92
  "sideEffects": false,
104
93
  "types": "dist/types/index.d.ts",
105
- "version": "2.41.48"
94
+ "version": "2.41.51"
106
95
  }
@@ -44,7 +44,13 @@ export const WebAppChrome: React.FC<WebAppChromeProps> = ({
44
44
  </>
45
45
  ) : null}
46
46
  <FlexGrowCol id="main-flex" justifyContent="flex-start" alignItems="stretch">
47
- <ErrorBoundary fallback={errorPage ?? <WebAppErrorPage />}>{children}</ErrorBoundary>
47
+ <ErrorBoundary
48
+ fallbackWithError={(error) => {
49
+ return errorPage ?? <WebAppErrorPage error={error} />
50
+ }}
51
+ >
52
+ {children}
53
+ </ErrorBoundary>
48
54
  </FlexGrowCol>
49
55
  </FlexGrowRow>
50
56
  <FlexCol id="footer-flex" alignItems="stretch">
@@ -2,9 +2,14 @@ import { ButtonEx } from '@xylabs/react-button'
2
2
 
3
3
  import { WebAppPage, WebAppPageProps } from './Page'
4
4
 
5
- export const WebAppErrorPage: React.FC<WebAppPageProps> = (props) => (
5
+ export interface WebAppErrorPageProps extends WebAppPageProps {
6
+ error?: Error
7
+ }
8
+
9
+ export const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (
6
10
  <WebAppPage title="Oops! Something went wrong" {...props}>
7
11
  <h1>Oops! Something went wrong!</h1>
12
+ <p>{`${error}`}</p>
8
13
  <ButtonEx href="/" variant="contained">
9
14
  Homepage
10
15
  </ButtonEx>