@wandelbots/wandelbots-js-react-components 2.16.3 → 2.17.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/JoggingJointRotationControl.d.ts.map +1 -1
- package/dist/components/jogging/JoggingOptions.d.ts.map +1 -1
- package/dist/components/jogging/JoggingStore.d.ts +8 -0
- package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4147 -4134
- package/dist/index.js.map +1 -1
- package/dist/themes/createDarkTheme.d.ts.map +1 -1
- package/dist/themes/themeTypes.d.ts +5 -0
- package/dist/themes/themeTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/jogging/JoggingJointRotationControl.tsx +2 -0
- package/src/components/jogging/JoggingOptions.tsx +101 -81
- package/src/components/jogging/JoggingStore.ts +12 -0
- package/src/themes/createDarkTheme.ts +5 -0
- package/src/themes/themeTypes.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDarkTheme.d.ts","sourceRoot":"","sources":["../../src/themes/createDarkTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjE,wBAAgB,eAAe,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"createDarkTheme.d.ts","sourceRoot":"","sources":["../../src/themes/createDarkTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjE,wBAAgB,eAAe,IAAI,KAAK,CA2RvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeTypes.d.ts","sourceRoot":"","sources":["../../src/themes/themeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,KAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC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C,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,OAAO;QACf,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;QAC5B,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;KACpD;IAED,UAAU,cAAc;QACtB,QAAQ,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;QACpC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;KACpD;IAED,UAAU,KAAM,SAAQ,uBAAuB,EAAE,yBAAyB;KAAG;IAE7E,UAAU,YACR,SAAQ,uBAAuB,EAC7B,yBAAyB;KAAG;CACjC"}
|
package/package.json
CHANGED
|
@@ -137,6 +137,7 @@ export const JoggingJointRotationControl = externalizeComponent(
|
|
|
137
137
|
<ChevronLeft
|
|
138
138
|
sx={{
|
|
139
139
|
pointerEvents: "none",
|
|
140
|
+
color: theme.componentsExt?.JoggingJoint?.Joint?.arrowColor,
|
|
140
141
|
}}
|
|
141
142
|
/>
|
|
142
143
|
</IconButton>
|
|
@@ -232,6 +233,7 @@ export const JoggingJointRotationControl = externalizeComponent(
|
|
|
232
233
|
<ChevronRight
|
|
233
234
|
sx={{
|
|
234
235
|
pointerEvents: "none",
|
|
236
|
+
color: theme.componentsExt?.JoggingJoint?.Joint?.arrowColor,
|
|
235
237
|
}}
|
|
236
238
|
/>
|
|
237
239
|
</IconButton>
|
|
@@ -30,97 +30,117 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
30
30
|
display: "grid",
|
|
31
31
|
gap: "16px",
|
|
32
32
|
gridTemplateColumns: "1fr 1fr",
|
|
33
|
-
|
|
33
|
+
gridAutoRows: "min-content",
|
|
34
34
|
"& label": { opacity: 0.7, fontSize: "12px", marginBottom: "4px" },
|
|
35
35
|
}}
|
|
36
36
|
>
|
|
37
37
|
{/* Coordinate system */}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
38
|
+
{store.showCoordSystemSelect && (
|
|
39
|
+
<Box sx={{ gridColumn: store.showTcpSelect ? "auto" : "span 2" }}>
|
|
40
|
+
<AdornedSelect
|
|
41
|
+
labelId="jogging-coord-select"
|
|
42
|
+
labelValue={t("Jogging.CoordinateSystem.hlb")}
|
|
43
|
+
value={store.selectedCoordSystemId}
|
|
44
|
+
size="small"
|
|
45
|
+
variant="filled"
|
|
46
|
+
displayEmpty={true}
|
|
47
|
+
onChange={(event) =>
|
|
48
|
+
store.setSelectedCoordSystemId(event.target.value as string)
|
|
49
|
+
}
|
|
50
|
+
disabled={store.isLocked}
|
|
51
|
+
>
|
|
52
|
+
{store.coordSystems.map((cs) => (
|
|
53
|
+
<MenuItem key={cs.coordinate_system} value={cs.coordinate_system}>
|
|
54
|
+
{cs.name && store.coordSystemCountByName[cs.name] > 1
|
|
55
|
+
? `${cs.name} / ${cs.coordinate_system}`
|
|
56
|
+
: cs.name || cs.coordinate_system}
|
|
57
|
+
</MenuItem>
|
|
58
|
+
))}
|
|
59
|
+
</AdornedSelect>
|
|
60
|
+
</Box>
|
|
61
|
+
)}
|
|
59
62
|
|
|
60
63
|
{/* TCP selection */}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
{store.showTcpSelect && (
|
|
65
|
+
<Box
|
|
66
|
+
sx={{ gridColumn: store.showCoordSystemSelect ? "auto" : "span 2" }}
|
|
67
|
+
>
|
|
68
|
+
<AdornedSelect
|
|
69
|
+
labelId="jogging-tcp-select"
|
|
70
|
+
labelValue="TCP"
|
|
71
|
+
value={store.selectedTcpId}
|
|
72
|
+
size="small"
|
|
73
|
+
variant="filled"
|
|
74
|
+
onChange={(event) =>
|
|
75
|
+
store.setSelectedTcpId(event.target.value as string)
|
|
76
|
+
}
|
|
77
|
+
disabled={store.isLocked}
|
|
78
|
+
>
|
|
79
|
+
{store.tcps.map((tcp) => (
|
|
80
|
+
<MenuItem key={tcp.id} value={tcp.id}>
|
|
81
|
+
{tcp.id}
|
|
82
|
+
</MenuItem>
|
|
83
|
+
))}
|
|
84
|
+
</AdornedSelect>
|
|
85
|
+
</Box>
|
|
86
|
+
)}
|
|
79
87
|
|
|
80
88
|
{/* Orientation */}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
</AdornedSelect>
|
|
97
|
-
|
|
98
|
-
{/* Increment selection */}
|
|
99
|
-
<AdornedSelect
|
|
100
|
-
labelValue={t("Jogging.Increment.hlb")}
|
|
101
|
-
labelId="jogging-increment-select"
|
|
102
|
-
size="small"
|
|
103
|
-
variant="filled"
|
|
104
|
-
value={store.activeDiscreteIncrement?.id || "continuous"}
|
|
105
|
-
onChange={(event) => {
|
|
106
|
-
store.setSelectedIncrementId(event.target.value as IncrementOptionId)
|
|
107
|
-
}}
|
|
108
|
-
disabled={store.isLocked}
|
|
109
|
-
>
|
|
110
|
-
<MenuItem key="continuous" value="continuous">
|
|
111
|
-
{t("Jogging.Increment.Continuous.dd")}
|
|
112
|
-
</MenuItem>
|
|
113
|
-
|
|
114
|
-
{store.selectedOrientation === "tool"
|
|
115
|
-
? null
|
|
116
|
-
: store.discreteIncrementOptions.map((inc) => (
|
|
117
|
-
<MenuItem key={inc.id} value={inc.id}>
|
|
118
|
-
{store.currentMotionType === "translate"
|
|
119
|
-
? `${inc.mm}mm`
|
|
120
|
-
: `${inc.degrees}°`}
|
|
89
|
+
{store.showOrientationSelect && (
|
|
90
|
+
<Box sx={{ gridColumn: store.showIncrementSelect ? "auto" : "span 2" }}>
|
|
91
|
+
<AdornedSelect
|
|
92
|
+
labelValue={t("Jogging.Cartesian.Orientation.lb")}
|
|
93
|
+
id="orientation-select"
|
|
94
|
+
labelId="orientation-select"
|
|
95
|
+
value={store.selectedOrientation}
|
|
96
|
+
onChange={(event) =>
|
|
97
|
+
store.setSelectedOrientation(event.target.value as OrientationId)
|
|
98
|
+
}
|
|
99
|
+
disabled={store.isLocked}
|
|
100
|
+
>
|
|
101
|
+
{ORIENTATION_IDS.map((orientationId) => (
|
|
102
|
+
<MenuItem key={orientationId} value={orientationId}>
|
|
103
|
+
{translateOrientation(orientationId)}
|
|
121
104
|
</MenuItem>
|
|
122
105
|
))}
|
|
123
|
-
|
|
106
|
+
</AdornedSelect>
|
|
107
|
+
</Box>
|
|
108
|
+
)}
|
|
109
|
+
|
|
110
|
+
{/* Increment */}
|
|
111
|
+
{store.showIncrementSelect && (
|
|
112
|
+
<Box
|
|
113
|
+
sx={{ gridColumn: store.showOrientationSelect ? "auto" : "span 2" }}
|
|
114
|
+
>
|
|
115
|
+
<AdornedSelect
|
|
116
|
+
labelValue={t("Jogging.Increment.hlb")}
|
|
117
|
+
labelId="jogging-increment-select"
|
|
118
|
+
size="small"
|
|
119
|
+
variant="filled"
|
|
120
|
+
value={store.activeDiscreteIncrement?.id || "continuous"}
|
|
121
|
+
onChange={(event) =>
|
|
122
|
+
store.setSelectedIncrementId(
|
|
123
|
+
event.target.value as IncrementOptionId,
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
disabled={store.isLocked}
|
|
127
|
+
>
|
|
128
|
+
<MenuItem key="continuous" value="continuous">
|
|
129
|
+
{t("Jogging.Increment.Continuous.dd")}
|
|
130
|
+
</MenuItem>
|
|
131
|
+
|
|
132
|
+
{store.selectedOrientation === "tool"
|
|
133
|
+
? null
|
|
134
|
+
: store.discreteIncrementOptions.map((inc) => (
|
|
135
|
+
<MenuItem key={inc.id} value={inc.id}>
|
|
136
|
+
{store.currentMotionType === "translate"
|
|
137
|
+
? `${inc.mm}mm`
|
|
138
|
+
: `${inc.degrees}°`}
|
|
139
|
+
</MenuItem>
|
|
140
|
+
))}
|
|
141
|
+
</AdornedSelect>
|
|
142
|
+
</Box>
|
|
143
|
+
)}
|
|
124
144
|
</Box>
|
|
125
145
|
)
|
|
126
146
|
})
|
|
@@ -104,6 +104,18 @@ export class JoggingStore {
|
|
|
104
104
|
/** Maximum rotation velocity user can choose on the velocity slider in °/s */
|
|
105
105
|
maxRotationVelocityDegPerSec: number = 60
|
|
106
106
|
|
|
107
|
+
/** Whether to show the coordinate system select dropdown in the UI */
|
|
108
|
+
showCoordSystemSelect: boolean = true
|
|
109
|
+
|
|
110
|
+
/** Whether to show the TCP select dropdown in the UI */
|
|
111
|
+
showTcpSelect: boolean = true
|
|
112
|
+
|
|
113
|
+
/** Whether to show the orientation select dropdown in the UI */
|
|
114
|
+
showOrientationSelect: boolean = true
|
|
115
|
+
|
|
116
|
+
/** Whether to show the increment select dropdown in the UI */
|
|
117
|
+
showIncrementSelect: boolean = true
|
|
118
|
+
|
|
107
119
|
disposers: IReactionDisposer[] = []
|
|
108
120
|
|
|
109
121
|
/**
|
package/src/themes/themeTypes.ts
CHANGED
|
@@ -35,7 +35,12 @@ interface NovaComponentsExtension {
|
|
|
35
35
|
X?: AxisControlComponentColors
|
|
36
36
|
Y?: AxisControlComponentColors
|
|
37
37
|
Z?: AxisControlComponentColors
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
JoggingJoint?: {
|
|
41
|
+
Joint?: {
|
|
42
|
+
arrowColor?: string
|
|
43
|
+
}
|
|
39
44
|
}
|
|
40
45
|
WandelscriptEditor?: {
|
|
41
46
|
monacoTheme: editor.IStandaloneThemeData
|