@wandelbots/wandelbots-js-react-components 1.11.3 → 1.11.4

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,4 +1,5 @@
1
- export declare const NoMotionGroupModal: ((baseUrl?: string) => import("react/jsx-runtime").JSX.Element) & {
2
- displayName: string;
1
+ export type NoMotionGroupModalProps = {
2
+ baseUrl: string;
3
3
  };
4
+ export declare function NoMotionGroupModal({ baseUrl, ...props }: NoMotionGroupModalProps): import("react/jsx-runtime").JSX.Element;
4
5
  //# sourceMappingURL=NoMotionGroupModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NoMotionGroupModal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/NoMotionGroupModal.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,kBAAkB,cACV,MAAM;;CAwE1B,CAAA"}
1
+ {"version":3,"file":"NoMotionGroupModal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/NoMotionGroupModal.tsx"],"names":[],"mappings":"AAkBA,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAsB,EACtB,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAkEzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wandelbots/wandelbots-js-react-components",
3
- "version": "1.11.3",
3
+ "version": "1.11.4",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -7,8 +7,6 @@ import {
7
7
  Stack,
8
8
  Typography,
9
9
  } from "@mui/material"
10
- import { observer } from "mobx-react-lite"
11
- import { externalizeComponent } from "../../externalizeComponent"
12
10
 
13
11
  function getBaseUrl(): string {
14
12
  const currentUrl = window.location.href
@@ -18,77 +16,77 @@ function getBaseUrl(): string {
18
16
  )
19
17
  }
20
18
 
21
- export const NoMotionGroupModal = externalizeComponent(
22
- observer((baseUrl: string = getBaseUrl()) => {
23
- return (
24
- <Dialog
25
- aria-labelledby="no-motion-group-modal-title"
26
- open={true}
27
- fullWidth
28
- sx={{
29
- "& .MuiModal-backdrop": {
30
- backdropFilter: "blur(10px)",
31
- },
32
- "& .MuiDialog-paper": {
33
- "::before": {
34
- content: '""',
35
- height: "8px",
36
- width: "100%",
37
- background: "linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)",
38
- },
39
- background: "#101629",
19
+ export type NoMotionGroupModalProps = {
20
+ baseUrl: string
21
+ }
22
+
23
+ export function NoMotionGroupModal({
24
+ baseUrl = getBaseUrl(),
25
+ ...props
26
+ }: NoMotionGroupModalProps) {
27
+ return (
28
+ <Dialog
29
+ aria-labelledby="no-motion-group-modal-title"
30
+ open={true}
31
+ fullWidth
32
+ sx={{
33
+ "& .MuiModal-backdrop": {
34
+ backdropFilter: "blur(10px)",
35
+ },
36
+ "& .MuiDialog-paper": {
37
+ "::before": {
38
+ content: '""',
39
+ height: "8px",
40
+ width: "100%",
41
+ background: "linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)",
40
42
  },
43
+ background: "#101629",
44
+ },
45
+ }}
46
+ >
47
+ <DialogTitle id="no-motion-group-modal-title">
48
+ No motion group found
49
+ </DialogTitle>
50
+
51
+ <DialogContent
52
+ sx={{
53
+ marginTop: "3rem",
54
+ marginBottom: "1.5rem",
55
+ textAlign: "center",
41
56
  }}
42
57
  >
43
- <DialogTitle id="no-motion-group-modal-title">
44
- No motion group found
45
- </DialogTitle>
46
-
47
- <DialogContent
48
- sx={{
49
- marginTop: "3rem",
50
- marginBottom: "1.5rem",
51
- textAlign: "center",
52
- }}
53
- >
54
- <Typography color="#fff">Found no devices to connect to.</Typography>
55
- <Typography color="#fff">
56
- Please ensure a motion group has been created.
57
- </Typography>
58
- </DialogContent>
58
+ <Typography color="#fff">Found no devices to connect to.</Typography>
59
+ <Typography color="#fff">
60
+ Please ensure a motion group has been created.
61
+ </Typography>
62
+ </DialogContent>
59
63
 
60
- <DialogActions>
61
- <Stack
62
- width="100%"
63
- maxWidth="300px"
64
- margin="auto"
65
- marginBottom="2rem"
64
+ <DialogActions>
65
+ <Stack width="100%" maxWidth="300px" margin="auto" marginBottom="2rem">
66
+ <Button
67
+ href={`${baseUrl}/settings`}
68
+ variant="contained"
69
+ sx={{
70
+ borderRadius: "8px",
71
+ width: "100%",
72
+ }}
66
73
  >
67
- <Button
68
- href={`${baseUrl}/settings`}
69
- variant="contained"
70
- sx={{
71
- borderRadius: "8px",
72
- width: "100%",
73
- }}
74
- >
75
- Go to settings app
76
- </Button>
77
- <Button
78
- href={`${baseUrl}`}
79
- variant="text"
80
- sx={{
81
- marginTop: "1rem",
82
- color: "#fff",
83
- textDecoration: "underline",
84
- fontSize: "0.75rem",
85
- }}
86
- >
87
- Back to Homescreen
88
- </Button>
89
- </Stack>
90
- </DialogActions>
91
- </Dialog>
92
- )
93
- }),
94
- )
74
+ Go to settings app
75
+ </Button>
76
+ <Button
77
+ href={`${baseUrl}`}
78
+ variant="text"
79
+ sx={{
80
+ marginTop: "1rem",
81
+ color: "#fff",
82
+ textDecoration: "underline",
83
+ fontSize: "0.75rem",
84
+ }}
85
+ >
86
+ Back to Homescreen
87
+ </Button>
88
+ </Stack>
89
+ </DialogActions>
90
+ </Dialog>
91
+ )
92
+ }