@wandelbots/wandelbots-js-react-components 1.10.3 → 1.11.0
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/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/components/modal/NoMotionGroupModal.d.ts +4 -0
- package/dist/components/modal/NoMotionGroupModal.d.ts.map +1 -0
- package/dist/index.cjs +30 -30
- 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 +4065 -2965
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ThemeSelect.tsx +1 -1
- package/src/components/VelocitySlider.tsx +1 -1
- package/src/components/jogging/JoggingJointLimitDetector.tsx +1 -1
- package/src/components/jogging/JoggingJointRotationControl.tsx +1 -1
- package/src/components/jogging/JoggingStore.tsx +2 -1
- package/src/components/modal/NoMotionGroupModal.tsx +86 -0
- package/src/index.ts +4 -0
- package/src/themes/theming.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// TODO implement this as part of theme?
|
|
2
2
|
|
|
3
3
|
import { Select, useTheme, type SxProps } from "@mui/material"
|
|
4
|
-
import
|
|
4
|
+
import defaultsDeep from "lodash-es/defaultsDeep"
|
|
5
5
|
|
|
6
6
|
type ThemeSelectProps = {
|
|
7
7
|
kind: "filled" | "outlined" | "text"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Typography } from "@mui/material"
|
|
2
2
|
import { useTranslation } from "react-i18next"
|
|
3
3
|
import { useState } from "react"
|
|
4
|
-
import
|
|
4
|
+
import isEqual from "lodash-es/isEqual"
|
|
5
5
|
import { useAnimationFrame } from "../utils/hooks"
|
|
6
6
|
import type { JoggingStore } from "./JoggingStore"
|
|
7
7
|
|
|
@@ -5,7 +5,7 @@ import ChevronLeft from "@mui/icons-material/ChevronLeft"
|
|
|
5
5
|
import ChevronRight from "@mui/icons-material/ChevronRight"
|
|
6
6
|
import { useAnimationFrame } from "../utils/hooks"
|
|
7
7
|
import { useState } from "react"
|
|
8
|
-
import
|
|
8
|
+
import throttle from "lodash-es/throttle"
|
|
9
9
|
import { useTranslation } from "react-i18next"
|
|
10
10
|
|
|
11
11
|
type JoggingJointRotationControlProps = {
|
|
@@ -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"
|
package/src/themes/theming.ts
CHANGED