@wandelbots/wandelbots-js-react-components 3.3.1 → 3.3.2

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": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -37,7 +37,6 @@ export const JoggingJointTab = observer(
37
37
  justifyContent="center"
38
38
  alignItems="stretch"
39
39
  sx={{ flexGrow: "1" }}
40
- id="JointControls"
41
40
  >
42
41
  <Stack alignItems="center" gap="24px">
43
42
  {store.jogger.motionStream.joints.map((joint) => {
@@ -1,5 +1,6 @@
1
1
  import { Box, MenuItem } from "@mui/material"
2
2
  import { observer } from "mobx-react-lite"
3
+ import { useId } from "react"
3
4
  import { useTranslation } from "react-i18next"
4
5
  import AdornedSelect from "../experimental/utils/AdornedSelect"
5
6
  import {
@@ -11,6 +12,7 @@ import {
11
12
 
12
13
  export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
13
14
  const { t } = useTranslation()
15
+ const componentId = useId()
14
16
  const joggingOptions: React.ReactElement[] = []
15
17
 
16
18
  function translateOrientation(orientation: OrientationId): string {
@@ -28,7 +30,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
28
30
  joggingOptions.push(
29
31
  <AdornedSelect
30
32
  key="coord"
31
- labelId="jogging-coord-select"
33
+ labelId={`jogging-coord-select-${componentId}`}
32
34
  labelValue={t("Jogging.CoordinateSystem.hlb")}
33
35
  value={store.selectedCoordSystemId}
34
36
  size="small"
@@ -54,7 +56,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
54
56
  joggingOptions.push(
55
57
  <AdornedSelect
56
58
  key="tcp"
57
- labelId="jogging-tcp-select"
59
+ labelId={`jogging-tcp-select-${componentId}`}
58
60
  labelValue="TCP"
59
61
  value={store.selectedTcpId}
60
62
  size="small"
@@ -78,8 +80,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
78
80
  <AdornedSelect
79
81
  key="orientation"
80
82
  labelValue={t("Jogging.Cartesian.Orientation.lb")}
81
- id="orientation-select"
82
- labelId="orientation-select"
83
+ labelId={`orientation-select-${componentId}`}
83
84
  value={store.selectedOrientation}
84
85
  onChange={(event) =>
85
86
  store.setSelectedOrientation(event.target.value as OrientationId)
@@ -100,7 +101,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
100
101
  <AdornedSelect
101
102
  key="increment"
102
103
  labelValue={t("Jogging.Increment.hlb")}
103
- labelId="jogging-increment-select"
104
+ labelId={`jogging-increment-select-${componentId}`}
104
105
  size="small"
105
106
  variant="filled"
106
107
  value={store.activeDiscreteIncrement?.id || "continuous"}
@@ -1,5 +1,6 @@
1
1
  import { useTheme, type PopoverOrigin } from "@mui/material"
2
2
  import { observer } from "mobx-react-lite"
3
+ import { useId } from "react"
3
4
  import { Trans, useTranslation } from "react-i18next"
4
5
  import ControllerTypePhysicalIcon from "./icons/controller-type-physical.svg"
5
6
  import ControllerTypeVirtualIcon from "./icons/controller-type-virtual.svg"
@@ -22,12 +23,13 @@ export const ControllerTypeIndicator = observer(
22
23
  compact,
23
24
  }: ControllerTypeIndicatorProps) => {
24
25
  const theme = useTheme()
26
+ const componentId = useId()
25
27
  const { t } = useTranslation()
26
28
 
27
29
  if (isVirtual) {
28
30
  return (
29
31
  <IndicatorWithExplanation
30
- id="motion-group-virtual"
32
+ id={`motion-group-virtual-${componentId}`}
31
33
  icon={ControllerTypeVirtualIcon}
32
34
  color={theme.palette.tertiary.main}
33
35
  name={t("SafetyBar.ControllerType.Virtual.lb")}
@@ -52,7 +54,7 @@ export const ControllerTypeIndicator = observer(
52
54
 
53
55
  return (
54
56
  <IndicatorWithExplanation
55
- id="motion-group-physical"
57
+ id={`motion-group-physical-${componentId}`}
56
58
  icon={ControllerTypePhysicalIcon}
57
59
  color={theme.palette.primary.main}
58
60
  name={t("SafetyBar.ControllerType.Physical.lb")}
@@ -1,6 +1,7 @@
1
1
  import { useTheme, type PopoverOrigin } from "@mui/material"
2
2
  import type { OperationMode } from "@wandelbots/nova-js/v2"
3
3
  import { observer } from "mobx-react-lite"
4
+ import { useId } from "react"
4
5
  import { Trans, useTranslation } from "react-i18next"
5
6
  import OperationModeAutomaticIcon from "./icons/operation-mode-automatic.svg"
6
7
  import OperationModeErrorIcon from "./icons/operation-mode-error.svg"
@@ -23,12 +24,13 @@ export const OperationModeIndicator = observer(
23
24
  }: OperationModeIndicatorProps) => {
24
25
  const { t } = useTranslation()
25
26
  const theme = useTheme()
27
+ const componentId = useId()
26
28
 
27
29
  switch (operationMode) {
28
30
  case "OPERATION_MODE_AUTO":
29
31
  return (
30
32
  <IndicatorWithExplanation
31
- id="operation-mode-auto"
33
+ id={`operation-mode-auto-${componentId}`}
32
34
  icon={OperationModeAutomaticIcon}
33
35
  title={t("SafetyBar.OperationMode.ti")}
34
36
  name={t("SafetyBar.OperationMode.Automatic.ti")}
@@ -49,7 +51,7 @@ export const OperationModeIndicator = observer(
49
51
  case "OPERATION_MODE_MANUAL_T2": {
50
52
  return (
51
53
  <IndicatorWithExplanation
52
- id="operation-mode-manual"
54
+ id={`operation-mode-manual-${componentId}`}
53
55
  icon={OperationModeManualIcon}
54
56
  color={theme.palette.warning.main}
55
57
  title={t("SafetyBar.OperationMode.ti")}
@@ -71,7 +73,7 @@ export const OperationModeIndicator = observer(
71
73
  default:
72
74
  return (
73
75
  <IndicatorWithExplanation
74
- id="operation-mode-error"
76
+ id={`operation-mode-error-${componentId}`}
75
77
  icon={OperationModeErrorIcon}
76
78
  color={theme.palette.warning.main}
77
79
  title={t("SafetyBar.OperationMode.ti")}
@@ -1,6 +1,7 @@
1
1
  import { useTheme, type PopoverOrigin } from "@mui/material"
2
2
  import type { SafetyStateType } from "@wandelbots/nova-js/v2"
3
3
  import { observer } from "mobx-react-lite"
4
+ import { useId } from "react"
4
5
  import { Trans, useTranslation } from "react-i18next"
5
6
  import { assertUnreachable } from "../utils/errorHandling"
6
7
  import SafetyStateErrorIcon from "./icons/safety-state-error.svg"
@@ -26,13 +27,14 @@ export const SafetyStateIndicator = observer(
26
27
  }: SafetyStateIndicatorProps) => {
27
28
  const { t } = useTranslation()
28
29
  const theme = useTheme()
30
+ const componentId = useId()
29
31
 
30
32
  switch (safetyState) {
31
33
  // Normal state, robot can move
32
34
  case "SAFETY_STATE_NORMAL":
33
35
  return (
34
36
  <IndicatorWithExplanation
35
- id="safety-state-normal"
37
+ id={`safety-state-normal-${componentId}`}
36
38
  title={t("SafetyBar.SafetyState.ti")}
37
39
  name={t("SafetyBar.SafetyState.Normal.lb")}
38
40
  label={compact ? null : t("SafetyBar.SafetyState.Normal.lb")}
@@ -54,7 +56,7 @@ export const SafetyStateIndicator = observer(
54
56
  case "SAFETY_STATE_ROBOT_EMERGENCY_STOP":
55
57
  return (
56
58
  <IndicatorWithExplanation
57
- id="safety-state-estop"
59
+ id={`safety-state-estop-${componentId}`}
58
60
  title={t("SafetyBar.SafetyState.ti")}
59
61
  name={t("SafetyBar.SafetyState.Estop.lb")}
60
62
  label={compact ? null : t("SafetyBar.SafetyState.Estop.lb")}
@@ -81,7 +83,7 @@ export const SafetyStateIndicator = observer(
81
83
  case "SAFETY_STATE_STOP":
82
84
  return (
83
85
  <IndicatorWithExplanation
84
- id="safety-state-stop"
86
+ id={`safety-state-stop-${componentId}`}
85
87
  icon={SafetyStateStopIcon}
86
88
  title={t("SafetyBar.SafetyState.ti")}
87
89
  name={t("SafetyBar.SafetyState.Stop.lb")}
@@ -108,7 +110,7 @@ export const SafetyStateIndicator = observer(
108
110
  case "SAFETY_STATE_VIOLATION":
109
111
  return (
110
112
  <IndicatorWithExplanation
111
- id="safety-state-manual-action-required"
113
+ id={`safety-state-manual-action-required-${componentId}`}
112
114
  icon={SafetyStateManualActionRequiredIcon}
113
115
  color={theme.palette.warning.main}
114
116
  title={t("SafetyBar.SafetyState.ti")}
@@ -135,7 +137,7 @@ export const SafetyStateIndicator = observer(
135
137
  case "SAFETY_STATE_FAULT":
136
138
  return (
137
139
  <IndicatorWithExplanation
138
- id="safety-state-error"
140
+ id={`safety-state-error-${componentId}`}
139
141
  icon={SafetyStateErrorIcon}
140
142
  color={theme.palette.error.main}
141
143
  title={t("SafetyBar.SafetyState.ti")}