@wandelbots/wandelbots-js-react-components 1.10.4 → 1.11.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/components/modal/NoMotionGroupModal.d.ts +4 -0
- package/dist/components/modal/NoMotionGroupModal.d.ts.map +1 -0
- package/dist/index.cjs +25 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1801 -1727
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/modal/NoMotionGroupModal.tsx +86 -0
- package/src/index.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -82,8 +82,7 @@
|
|
|
82
82
|
"typescript": "^5.5.4",
|
|
83
83
|
"vite": "^5.3.5",
|
|
84
84
|
"vite-plugin-svgr": "^4.2.0",
|
|
85
|
-
"vitest": "^2.0.5"
|
|
86
|
-
"@wandelbots/wandelbots-js": "^1.8.0"
|
|
85
|
+
"vitest": "^2.0.5"
|
|
87
86
|
},
|
|
88
87
|
"peerDependencies": {
|
|
89
88
|
"@emotion/react": "^11.11.1",
|
|
@@ -113,6 +112,7 @@
|
|
|
113
112
|
"mobx-react-lite": "^4.0.7",
|
|
114
113
|
"react-error-boundary": "^4.0.13",
|
|
115
114
|
"react-i18next": "^15.0.0",
|
|
116
|
-
"shiki": "^1.12.0"
|
|
115
|
+
"shiki": "^1.12.0",
|
|
116
|
+
"@wandelbots/wandelbots-js": "^1.8.0"
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Dialog,
|
|
4
|
+
DialogActions,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogTitle,
|
|
7
|
+
Stack,
|
|
8
|
+
Typography,
|
|
9
|
+
} from "@mui/material"
|
|
10
|
+
import { observer } from "mobx-react-lite"
|
|
11
|
+
|
|
12
|
+
function getBaseUrl(): string {
|
|
13
|
+
const currentUrl = window.location.href
|
|
14
|
+
return currentUrl.substring(
|
|
15
|
+
0,
|
|
16
|
+
currentUrl.indexOf("/", currentUrl.indexOf("//") + 2),
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const NoMotionGroupModal = observer((baseUrl: string = getBaseUrl()) => {
|
|
21
|
+
return (
|
|
22
|
+
<Dialog
|
|
23
|
+
aria-labelledby="no-motion-group-modal-title"
|
|
24
|
+
open={true}
|
|
25
|
+
fullWidth
|
|
26
|
+
sx={{
|
|
27
|
+
"& .MuiModal-backdrop": {
|
|
28
|
+
backdropFilter: "blur(10px)",
|
|
29
|
+
},
|
|
30
|
+
"& .MuiDialog-paper": {
|
|
31
|
+
"::before": {
|
|
32
|
+
content: '""',
|
|
33
|
+
height: "8px",
|
|
34
|
+
width: "100%",
|
|
35
|
+
background: "linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)",
|
|
36
|
+
},
|
|
37
|
+
background: "#101629",
|
|
38
|
+
},
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
<DialogTitle id="no-motion-group-modal-title">
|
|
42
|
+
No motion group found
|
|
43
|
+
</DialogTitle>
|
|
44
|
+
|
|
45
|
+
<DialogContent
|
|
46
|
+
sx={{
|
|
47
|
+
marginTop: "3rem",
|
|
48
|
+
marginBottom: "1.5rem",
|
|
49
|
+
textAlign: "center",
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
<Typography color="#fff">Found no devices to connect to.</Typography>
|
|
53
|
+
<Typography color="#fff">
|
|
54
|
+
Please ensure a motion group has been created.
|
|
55
|
+
</Typography>
|
|
56
|
+
</DialogContent>
|
|
57
|
+
|
|
58
|
+
<DialogActions>
|
|
59
|
+
<Stack width="100%" maxWidth="300px" margin="auto" marginBottom="2rem">
|
|
60
|
+
<Button
|
|
61
|
+
href={`${baseUrl}/settings`}
|
|
62
|
+
variant="contained"
|
|
63
|
+
sx={{
|
|
64
|
+
borderRadius: "8px",
|
|
65
|
+
width: "100%",
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
68
|
+
Go to settings app
|
|
69
|
+
</Button>
|
|
70
|
+
<Button
|
|
71
|
+
href={`${baseUrl}`}
|
|
72
|
+
variant="text"
|
|
73
|
+
sx={{
|
|
74
|
+
marginTop: "1rem",
|
|
75
|
+
color: "#fff",
|
|
76
|
+
textDecoration: "underline",
|
|
77
|
+
fontSize: "0.75rem",
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
Back to Homescreen
|
|
81
|
+
</Button>
|
|
82
|
+
</Stack>
|
|
83
|
+
</DialogActions>
|
|
84
|
+
</Dialog>
|
|
85
|
+
)
|
|
86
|
+
})
|
package/src/index.ts
CHANGED
|
@@ -37,5 +37,9 @@ export type * from "./components/VelocitySlider"
|
|
|
37
37
|
import { VelocitySlider as VS } from "./components/VelocitySlider"
|
|
38
38
|
export const VelocitySlider = externalizeComponent(VS)
|
|
39
39
|
|
|
40
|
+
export type * from "./components/modal/NoMotionGroupModal"
|
|
41
|
+
import { NoMotionGroupModal as NMGM } from "./components/modal/NoMotionGroupModal"
|
|
42
|
+
export const NoMotionGroupModal = externalizeComponent(NMGM)
|
|
43
|
+
|
|
40
44
|
export * from "./components/utils/hooks"
|
|
41
45
|
export * from "./components/robots/AxisConfig"
|