@wandelbots/wandelbots-js-react-components 1.24.4 → 1.24.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wandelbots/wandelbots-js-react-components",
3
- "version": "1.24.4",
3
+ "version": "1.24.6",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -54,7 +54,10 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
54
54
  >
55
55
  {store.coordSystems.map((cs) => (
56
56
  <MenuItem key={cs.coordinate_system} value={cs.coordinate_system}>
57
- {cs.name || cs.coordinate_system}
57
+ {/* Distinguish coordinate systems with the same name */}
58
+ {cs.name && store.coordSystemCountByName[cs.name] > 1
59
+ ? `${cs.name} / ${cs.coordinate_system}`
60
+ : cs.name || cs.coordinate_system}
58
61
  </MenuItem>
59
62
  ))}
60
63
  </Select>
@@ -5,6 +5,7 @@ import type {
5
5
  RobotTcp,
6
6
  } from "@wandelbots/wandelbots-js"
7
7
  import { tryParseJson } from "@wandelbots/wandelbots-js"
8
+ import { countBy } from "lodash-es"
8
9
  import keyBy from "lodash-es/keyBy"
9
10
  import uniqueId from "lodash-es/uniqueId"
10
11
  import {
@@ -169,6 +170,10 @@ export class JoggingStore {
169
170
  this.jogger.dispose()
170
171
  }
171
172
 
173
+ get coordSystemCountByName() {
174
+ return countBy(this.coordSystems, (cs) => cs.name)
175
+ }
176
+
172
177
  async deactivate(opts: { requireManualReactivation?: boolean } = {}) {
173
178
  if (this.activationState === "inactive") return
174
179
  const websocket = this.jogger.activeWebsocket
@@ -198,7 +203,6 @@ export class JoggingStore {
198
203
 
199
204
  /** Activate the jogger with current settings */
200
205
  async activate(opts: { manual?: boolean } = {}) {
201
- console.log("activate!!")
202
206
  if (this.manualActivationRequired && !opts.manual) return
203
207
 
204
208
  runInAction(() => {
@@ -157,19 +157,19 @@ export const SupportedRobot = externalizeComponent(
157
157
  }, [isGhost])
158
158
 
159
159
  switch (modelFromController) {
160
- case "UniversalRobots_UR3CB":
160
+ case "UniversalRobots_UR3":
161
161
  Robot = UniversalRobots_UR3CB
162
162
  break
163
163
  case "UniversalRobots_UR3e":
164
164
  Robot = UniversalRobots_UR3e
165
165
  break
166
- case "UniversalRobots_UR5CB":
166
+ case "UniversalRobots_UR5":
167
167
  Robot = UniversalRobots_UR5CB
168
168
  break
169
169
  case "UniversalRobots_UR5e":
170
170
  Robot = UniversalRobots_UR5e
171
171
  break
172
- case "UniversalRobots_UR10CB":
172
+ case "UniversalRobots_UR10":
173
173
  Robot = UniversalRobots_UR10CB
174
174
  break
175
175
  case "UniversalRobots_UR10e":