@wandelbots/wandelbots-js-react-components 1.39.0 → 1.41.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/JoggingPanel.d.ts +5 -0
- package/dist/components/jogging/JoggingPanel.d.ts.map +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/jogging/JoggingPanel.tsx +17 -6
- package/src/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@mui/icons-material": "^5.16.7",
|
|
120
120
|
"@mui/lab": "^5.0.0-alpha.173",
|
|
121
121
|
"@shikijs/monaco": "^1.22.2",
|
|
122
|
-
"@wandelbots/wandelbots-js": "^1.
|
|
122
|
+
"@wandelbots/wandelbots-js": "^1.12.0",
|
|
123
123
|
"i18next-browser-languagedetector": "^8.0.0",
|
|
124
124
|
"lodash-es": "^4.17.21",
|
|
125
125
|
"mobx": "^6.13.5",
|
|
@@ -25,6 +25,12 @@ export type JoggingPanelProps = {
|
|
|
25
25
|
/** Set this to true to disable jogging UI temporarily e.g. when a program is executing */
|
|
26
26
|
locked?: boolean
|
|
27
27
|
sx?: SxProps
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* To preserve state while the jogging panel is hidden, you can create and pass a
|
|
31
|
+
* JoggingStore here and it will be used instead of creating a new one.
|
|
32
|
+
*/
|
|
33
|
+
store?: JoggingStore
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
/**
|
|
@@ -48,8 +54,11 @@ export const JoggingPanel = externalizeComponent(
|
|
|
48
54
|
})
|
|
49
55
|
|
|
50
56
|
try {
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
let joggingStore = props.store
|
|
58
|
+
if (!joggingStore) {
|
|
59
|
+
const jogger = await nova.connectJogger(props.motionGroupId)
|
|
60
|
+
joggingStore = await JoggingStore.loadFor(jogger)
|
|
61
|
+
}
|
|
53
62
|
runInAction(() => {
|
|
54
63
|
state.joggingStore = joggingStore
|
|
55
64
|
})
|
|
@@ -63,10 +72,12 @@ export const JoggingPanel = externalizeComponent(
|
|
|
63
72
|
|
|
64
73
|
useEffect(() => {
|
|
65
74
|
init()
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
return props.store
|
|
76
|
+
? () => null
|
|
77
|
+
: () => {
|
|
78
|
+
state.joggingStore?.dispose()
|
|
79
|
+
}
|
|
80
|
+
}, [props.store, props.nova, props.motionGroupId])
|
|
70
81
|
|
|
71
82
|
useEffect(() => {
|
|
72
83
|
const store = state.joggingStore
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from "./components/3d-viewport/SafetyZonesRenderer"
|
|
|
3
3
|
export * from "./components/jogging/JoggingCartesianAxisControl"
|
|
4
4
|
export * from "./components/jogging/JoggingJointRotationControl"
|
|
5
5
|
export * from "./components/jogging/JoggingPanel"
|
|
6
|
-
export
|
|
6
|
+
export { JoggingStore } from "./components/jogging/JoggingStore"
|
|
7
7
|
export * from "./components/jogging/PoseCartesianValues"
|
|
8
8
|
export * from "./components/jogging/PoseJointValues"
|
|
9
9
|
export * from "./components/LoadingCover"
|