@wandelbots/wandelbots-js-react-components 2.26.0 → 2.27.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/safetyBar/ControllerTypeIndicator.d.ts +2 -1
- package/dist/components/safetyBar/ControllerTypeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/IndicatorWithExplanation.d.ts +2 -1
- package/dist/components/safetyBar/IndicatorWithExplanation.d.ts.map +1 -1
- package/dist/components/safetyBar/OperationModeIndicator.d.ts +2 -1
- package/dist/components/safetyBar/OperationModeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyBar.d.ts +2 -1
- package/dist/components/safetyBar/SafetyBar.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts +2 -1
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts.map +1 -1
- package/dist/index.cjs +34 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3055 -3018
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/safetyBar/ControllerTypeIndicator.tsx +4 -0
- package/src/components/safetyBar/IndicatorWithExplanation.tsx +7 -0
- package/src/components/safetyBar/OperationModeIndicator.tsx +5 -0
- package/src/components/safetyBar/SafetyBar.tsx +45 -29
- package/src/components/safetyBar/SafetyStateIndicator.tsx +8 -0
- package/src/i18n/locales/de/translations.json +2 -2
- package/src/i18n/locales/en/translations.json +2 -2
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ interface ControllerTypeIndicatorProps {
|
|
|
10
10
|
motionGroupId: string
|
|
11
11
|
anchorOrigin?: PopoverOrigin
|
|
12
12
|
transformOrigin?: PopoverOrigin
|
|
13
|
+
compact: boolean
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const ControllerTypeIndicator = observer(
|
|
@@ -18,6 +19,7 @@ export const ControllerTypeIndicator = observer(
|
|
|
18
19
|
motionGroupId,
|
|
19
20
|
anchorOrigin,
|
|
20
21
|
transformOrigin,
|
|
22
|
+
compact,
|
|
21
23
|
}: ControllerTypeIndicatorProps) => {
|
|
22
24
|
const theme = useTheme()
|
|
23
25
|
const { t } = useTranslation()
|
|
@@ -29,6 +31,7 @@ export const ControllerTypeIndicator = observer(
|
|
|
29
31
|
icon={ControllerTypeVirtualIcon}
|
|
30
32
|
color={theme.palette.tertiary.main}
|
|
31
33
|
name={t("SafetyBar.ControllerType.Virtual.lb")}
|
|
34
|
+
label={compact ? null : t("SafetyBar.ControllerType.Virtual.lb")}
|
|
32
35
|
explanation={
|
|
33
36
|
<Trans
|
|
34
37
|
i18nKey="SafetyBar.MotionGroup.Virtual.Explanation.lb"
|
|
@@ -53,6 +56,7 @@ export const ControllerTypeIndicator = observer(
|
|
|
53
56
|
icon={ControllerTypePhysicalIcon}
|
|
54
57
|
color={theme.palette.primary.main}
|
|
55
58
|
name={t("SafetyBar.ControllerType.Physical.lb")}
|
|
59
|
+
label={compact ? null : t("SafetyBar.ControllerType.Physical.lb")}
|
|
56
60
|
explanation={
|
|
57
61
|
<Trans
|
|
58
62
|
i18nKey="SafetyBar.MotionGroup.Physical.Explanation.lb"
|
|
@@ -15,6 +15,7 @@ export type IndicatorWithExplanationProps = {
|
|
|
15
15
|
color: TypographyProps["color"]
|
|
16
16
|
title?: ReactNode
|
|
17
17
|
name: ReactNode
|
|
18
|
+
label?: ReactNode
|
|
18
19
|
explanation: ReactNode
|
|
19
20
|
literalValue?: string
|
|
20
21
|
anchorOrigin?: PopoverOrigin
|
|
@@ -28,6 +29,7 @@ export const IndicatorWithExplanation = observer(
|
|
|
28
29
|
color,
|
|
29
30
|
title,
|
|
30
31
|
name,
|
|
32
|
+
label,
|
|
31
33
|
explanation,
|
|
32
34
|
literalValue,
|
|
33
35
|
anchorOrigin,
|
|
@@ -56,6 +58,8 @@ export const IndicatorWithExplanation = observer(
|
|
|
56
58
|
aria-haspopup="true"
|
|
57
59
|
onMouseEnter={state.openPopover}
|
|
58
60
|
onMouseLeave={state.closePopover}
|
|
61
|
+
direction="row"
|
|
62
|
+
spacing={1}
|
|
59
63
|
sx={{
|
|
60
64
|
cursor: "pointer",
|
|
61
65
|
}}
|
|
@@ -66,6 +70,9 @@ export const IndicatorWithExplanation = observer(
|
|
|
66
70
|
color,
|
|
67
71
|
}}
|
|
68
72
|
/>
|
|
73
|
+
{label && (<div style={{
|
|
74
|
+
color,
|
|
75
|
+
}}>{label}</div>)}
|
|
69
76
|
</Stack>
|
|
70
77
|
<Popover
|
|
71
78
|
id={id}
|
|
@@ -11,6 +11,7 @@ interface OperationModeIndicatorProps {
|
|
|
11
11
|
operationMode: RobotControllerStateOperationModeEnum
|
|
12
12
|
anchorOrigin?: PopoverOrigin
|
|
13
13
|
transformOrigin?: PopoverOrigin
|
|
14
|
+
compact: boolean
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export const OperationModeIndicator = observer(
|
|
@@ -18,6 +19,7 @@ export const OperationModeIndicator = observer(
|
|
|
18
19
|
operationMode,
|
|
19
20
|
anchorOrigin,
|
|
20
21
|
transformOrigin,
|
|
22
|
+
compact
|
|
21
23
|
}: OperationModeIndicatorProps) => {
|
|
22
24
|
const { t } = useTranslation()
|
|
23
25
|
const theme = useTheme()
|
|
@@ -30,6 +32,7 @@ export const OperationModeIndicator = observer(
|
|
|
30
32
|
icon={OperationModeAutomaticIcon}
|
|
31
33
|
title={t("SafetyBar.OperationMode.ti")}
|
|
32
34
|
name={t("SafetyBar.OperationMode.Automatic.ti")}
|
|
35
|
+
label={compact ? null : t("SafetyBar.OperationMode.Automatic.ti")}
|
|
33
36
|
color={"rgba(255, 255, 255, 0.57)"}
|
|
34
37
|
explanation={
|
|
35
38
|
<Trans i18nKey="SafetyBar.OperationMode.Auto.Explanation.lb">
|
|
@@ -51,6 +54,7 @@ export const OperationModeIndicator = observer(
|
|
|
51
54
|
color={theme.palette.warning.main}
|
|
52
55
|
title={t("SafetyBar.OperationMode.ti")}
|
|
53
56
|
name={t("SafetyBar.OperationMode.Manual.lb")}
|
|
57
|
+
label={compact ? null : t("SafetyBar.OperationMode.Manual.lb")}
|
|
54
58
|
explanation={
|
|
55
59
|
<Trans i18nKey="SafetyBar.OperationMode.Manual.Explanation.lb">
|
|
56
60
|
The robot controller is in manual operation mode. On a physical
|
|
@@ -72,6 +76,7 @@ export const OperationModeIndicator = observer(
|
|
|
72
76
|
color={theme.palette.warning.main}
|
|
73
77
|
title={t("SafetyBar.OperationMode.ti")}
|
|
74
78
|
name={t("SafetyBar.OperationMode.Error.lb")}
|
|
79
|
+
label={compact ? null : t("SafetyBar.OperationMode.Error.lb")}
|
|
75
80
|
explanation={
|
|
76
81
|
<Trans i18nKey="SafetyBar.OperationMode.Error.Explanation.lb">
|
|
77
82
|
The robot controller has entered an unexpected operation mode.
|
|
@@ -16,40 +16,56 @@ export interface SafetyBarProps {
|
|
|
16
16
|
safetyState: RobotControllerStateSafetyStateEnum
|
|
17
17
|
anchorOrigin?: PopoverOrigin
|
|
18
18
|
transformOrigin?: PopoverOrigin
|
|
19
|
+
compact?: boolean
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export const SafetyBar = externalizeComponent(
|
|
22
|
-
observer(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
transformOrigin={props.transformOrigin}
|
|
34
|
-
/>
|
|
23
|
+
observer(
|
|
24
|
+
({
|
|
25
|
+
isVirtual,
|
|
26
|
+
motionGroupId,
|
|
27
|
+
operationMode,
|
|
28
|
+
safetyState,
|
|
29
|
+
anchorOrigin,
|
|
30
|
+
transformOrigin,
|
|
31
|
+
compact = true,
|
|
32
|
+
}: SafetyBarProps) => {
|
|
33
|
+
const gap = compact ? 1 : 2
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
return (
|
|
36
|
+
<Stack
|
|
37
|
+
direction="row"
|
|
38
|
+
gap={gap}
|
|
39
|
+
alignItems="center"
|
|
40
|
+
sx={{ height: "24px" }}
|
|
41
|
+
>
|
|
42
|
+
<SafetyStateIndicator
|
|
43
|
+
safetyState={safetyState}
|
|
44
|
+
anchorOrigin={anchorOrigin}
|
|
45
|
+
transformOrigin={transformOrigin}
|
|
46
|
+
compact={compact}
|
|
47
|
+
/>
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
operationMode={props.operationMode}
|
|
40
|
-
anchorOrigin={props.anchorOrigin}
|
|
41
|
-
transformOrigin={props.transformOrigin}
|
|
42
|
-
/>
|
|
49
|
+
<Divider orientation="vertical" flexItem />
|
|
43
50
|
|
|
44
|
-
|
|
51
|
+
<OperationModeIndicator
|
|
52
|
+
operationMode={operationMode}
|
|
53
|
+
anchorOrigin={anchorOrigin}
|
|
54
|
+
transformOrigin={transformOrigin}
|
|
55
|
+
compact={compact}
|
|
56
|
+
/>
|
|
45
57
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
<Divider orientation="vertical" flexItem />
|
|
59
|
+
|
|
60
|
+
<ControllerTypeIndicator
|
|
61
|
+
isVirtual={isVirtual}
|
|
62
|
+
motionGroupId={motionGroupId}
|
|
63
|
+
anchorOrigin={anchorOrigin}
|
|
64
|
+
transformOrigin={transformOrigin}
|
|
65
|
+
compact={compact}
|
|
66
|
+
/>
|
|
67
|
+
</Stack>
|
|
68
|
+
)
|
|
69
|
+
},
|
|
70
|
+
),
|
|
55
71
|
)
|
|
@@ -14,6 +14,7 @@ interface SafetyStateIndicatorProps {
|
|
|
14
14
|
safetyState: RobotControllerStateSafetyStateEnum
|
|
15
15
|
anchorOrigin?: PopoverOrigin
|
|
16
16
|
transformOrigin?: PopoverOrigin
|
|
17
|
+
compact: boolean
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export const SafetyStateIndicator = observer(
|
|
@@ -21,6 +22,7 @@ export const SafetyStateIndicator = observer(
|
|
|
21
22
|
safetyState,
|
|
22
23
|
anchorOrigin,
|
|
23
24
|
transformOrigin,
|
|
25
|
+
compact,
|
|
24
26
|
}: SafetyStateIndicatorProps) => {
|
|
25
27
|
const { t } = useTranslation()
|
|
26
28
|
const theme = useTheme()
|
|
@@ -33,6 +35,7 @@ export const SafetyStateIndicator = observer(
|
|
|
33
35
|
id="safety-state-normal"
|
|
34
36
|
title={t("SafetyBar.SafetyState.ti")}
|
|
35
37
|
name={t("SafetyBar.SafetyState.Normal.lb")}
|
|
38
|
+
label={compact ? null : t("SafetyBar.SafetyState.Normal.lb")}
|
|
36
39
|
icon={SafetyStateNormalIcon}
|
|
37
40
|
color={"rgba(255, 255, 255, 0.57)"}
|
|
38
41
|
explanation={
|
|
@@ -41,6 +44,7 @@ export const SafetyStateIndicator = observer(
|
|
|
41
44
|
not prevented by this state.
|
|
42
45
|
</Trans>
|
|
43
46
|
}
|
|
47
|
+
|
|
44
48
|
anchorOrigin={anchorOrigin}
|
|
45
49
|
transformOrigin={transformOrigin}
|
|
46
50
|
/>
|
|
@@ -54,6 +58,7 @@ export const SafetyStateIndicator = observer(
|
|
|
54
58
|
id="safety-state-estop"
|
|
55
59
|
title={t("SafetyBar.SafetyState.ti")}
|
|
56
60
|
name={t("SafetyBar.SafetyState.Estop.lb")}
|
|
61
|
+
label={compact ? null : t("SafetyBar.SafetyState.Estop.lb")}
|
|
57
62
|
icon={SafetyStateEstopIcon}
|
|
58
63
|
color={theme.palette.error.main}
|
|
59
64
|
explanation={
|
|
@@ -81,6 +86,7 @@ export const SafetyStateIndicator = observer(
|
|
|
81
86
|
icon={SafetyStateStopIcon}
|
|
82
87
|
title={t("SafetyBar.SafetyState.ti")}
|
|
83
88
|
name={t("SafetyBar.SafetyState.Stop.lb")}
|
|
89
|
+
label={compact ? null : t("SafetyBar.SafetyState.Stop.lb")}
|
|
84
90
|
color={theme.palette.warning.main}
|
|
85
91
|
explanation={
|
|
86
92
|
<Trans i18nKey="SafetyBar.SafetyState.Stop.Explanation.lb">
|
|
@@ -108,6 +114,7 @@ export const SafetyStateIndicator = observer(
|
|
|
108
114
|
color={theme.palette.warning.main}
|
|
109
115
|
title={t("SafetyBar.SafetyState.ti")}
|
|
110
116
|
name={t("SafetyBar.SafetyState.ManualActionRequired.lb")}
|
|
117
|
+
label={compact ? null : t("SafetyBar.SafetyState.ManualActionRequired.lb")}
|
|
111
118
|
explanation={
|
|
112
119
|
<Trans i18nKey="SafetyBar.SafetyState.ManualActionRequired.Explanation.lb">
|
|
113
120
|
The robot controller has entered a safety state requiring manual
|
|
@@ -130,6 +137,7 @@ export const SafetyStateIndicator = observer(
|
|
|
130
137
|
color={theme.palette.error.main}
|
|
131
138
|
title={t("SafetyBar.SafetyState.ti")}
|
|
132
139
|
name={t("SafetyBar.SafetyState.Error.lb")}
|
|
140
|
+
label={compact ? null : t("SafetyBar.SafetyState.Error.lb")}
|
|
133
141
|
explanation={
|
|
134
142
|
<Trans i18nKey="SafetyBar.SafetyState.Error.Explanation.lb">
|
|
135
143
|
The robot controller has entered an unexpected safety state.
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"SafetyBar.ActivationToggle.Activated.bt": "Aktiviert",
|
|
18
18
|
"SafetyBar.ActivationToggle.Activating.bt": "Wird aktiviert…",
|
|
19
19
|
"SafetyBar.ActivationToggle.Deactivating.bt": "Wird deaktiviert…",
|
|
20
|
-
"SafetyBar.ControllerType.Physical.lb": "
|
|
21
|
-
"SafetyBar.ControllerType.Virtual.lb": "
|
|
20
|
+
"SafetyBar.ControllerType.Physical.lb": "Physisch",
|
|
21
|
+
"SafetyBar.ControllerType.Virtual.lb": "Virtuell",
|
|
22
22
|
"SafetyBar.MotionGroup.Physical.Explanation.lb": "<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.",
|
|
23
23
|
"SafetyBar.MotionGroup.Virtual.Explanation.lb": "<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.",
|
|
24
24
|
"SafetyBar.OperationMode.Auto.Explanation.lb": "Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"SafetyBar.ActivationToggle.Activated.bt": "Activated",
|
|
19
19
|
"SafetyBar.ActivationToggle.Activating.bt": "Activating",
|
|
20
20
|
"SafetyBar.ActivationToggle.Deactivating.bt": "Deactivating",
|
|
21
|
-
"SafetyBar.ControllerType.Physical.lb": "Physical
|
|
22
|
-
"SafetyBar.ControllerType.Virtual.lb": "Virtual
|
|
21
|
+
"SafetyBar.ControllerType.Physical.lb": "Physical",
|
|
22
|
+
"SafetyBar.ControllerType.Virtual.lb": "Virtual",
|
|
23
23
|
"SafetyBar.MotionGroup.Physical.Explanation.lb": "<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.",
|
|
24
24
|
"SafetyBar.MotionGroup.Virtual.Explanation.lb": "<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.",
|
|
25
25
|
"SafetyBar.OperationMode.Auto.Explanation.lb": "Automatic operation mode active. Automated movement without manual confirmation enabled.",
|