@wandelbots/wandelbots-js-react-components 5.10.0 → 6.0.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/README.md +5 -8
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.js +1 -1
- package/dist/chunks/SafetyBar-Cy9DiXp9.js +453 -0
- package/dist/chunks/SafetyBar-DPrv_OQA.cjs +1 -0
- package/dist/chunks/{theming-D4Vvwf6q.js → theming-B2dYJ4Ca.js} +948 -919
- package/dist/chunks/theming-BwZXb5-H.cjs +4 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +48 -73
- package/package.json +1 -6
- package/dist/SafetyBar/icons/index.d.ts +0 -10
- package/dist/chunks/SafetyBar-CxxIVVeR.js +0 -413
- package/dist/chunks/SafetyBar-VvOZ9aRM.cjs +0 -1
- package/dist/chunks/robot-Cy9ST5-m.js +0 -40
- package/dist/chunks/robot-SEtfVAmf.cjs +0 -1
- package/dist/chunks/safety-state-stop-CJW5CKkp.js +0 -55
- package/dist/chunks/safety-state-stop-CgPfwC18.cjs +0 -1
- package/dist/chunks/theming-DL6p0QAr.cjs +0 -4
- package/dist/chunks/wbLogo-CObCmqTw.js +0 -30
- package/dist/chunks/wbLogo-G_IfZ03l.cjs +0 -1
- package/dist/wb-icons.cjs +0 -1
- package/dist/wb-icons.d.ts +0 -2
- package/dist/wb-icons.js +0 -27
package/README.md
CHANGED
|
@@ -33,17 +33,15 @@ For 3D-enabled components, use `/3d`:
|
|
|
33
33
|
import { Robot, RobotCard } from "@wandelbots/wandelbots-js-react-components/3d"
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
For
|
|
36
|
+
For icons, use the dedicated [`@wandelbots/icons`](https://www.npmjs.com/package/@wandelbots/icons) package (the `/wb-icons` entry point has been removed). Each icon is imported from its own subpath — there is no bulk export:
|
|
37
37
|
|
|
38
38
|
```typescript
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
HomeIcon,
|
|
42
|
-
ControllerTypeVirtualIcon,
|
|
43
|
-
SafetyStateNormalIcon,
|
|
44
|
-
} from "@wandelbots/wandelbots-js-react-components/wb-icons"
|
|
39
|
+
import { Home } from "@wandelbots/icons/Home"
|
|
40
|
+
import { Robot } from "@wandelbots/icons/Robot"
|
|
45
41
|
```
|
|
46
42
|
|
|
43
|
+
Browse the full icon set at https://wandelbotsgmbh.github.io/nova-design-system/#icons
|
|
44
|
+
|
|
47
45
|
You can also import from the top-level package, but then you'll need to provide all optional dependencies:
|
|
48
46
|
|
|
49
47
|
```bash
|
|
@@ -58,7 +56,6 @@ pnpm add @wandelbots/wandelbots-js-react-components \
|
|
|
58
56
|
|
|
59
57
|
- **`.`** (Main) — All components. Requires: React 18+, MUI v6/v7, @emotion/react, @emotion/styled, @mui/icons-material + all below.
|
|
60
58
|
- **`/core`** — Base components (AppHeader, ProgramControl, SafetyBar, VelocitySlider, JoggingPanel, DataGrid, Timer, themes, i18n, etc.). Requires: React 18+, MUI v6/v7, @emotion/react, @emotion/styled, @mui/icons-material.
|
|
61
|
-
- **`/wb-icons`** — SVG icon components (general UI icons, safety bar icons, jogging icons, axis icons). Requires: React 18+.
|
|
62
59
|
- **`/3d`** — 3D visualization (Robot, RobotCard, CollisionSceneRenderer, SafetyZonesRenderer, TrajectoryRenderer). Requires: all from `/core` + three, @react-three/fiber, @react-three/drei, three-stdlib.
|
|
63
60
|
|
|
64
61
|
## 4.x to 5.x Migration Guide
|
package/dist/SafetyBar/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-DPrv_OQA.cjs");exports.SafetyBar=e.SafetyBar;exports.default=e.SafetyBar;
|
package/dist/SafetyBar/index.js
CHANGED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as x, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import b from "@mui/material/Divider";
|
|
3
|
+
import u from "@mui/material/Stack";
|
|
4
|
+
import { observer as f, useLocalObservable as _ } from "mobx-react-lite";
|
|
5
|
+
import { t as R, e as O } from "./externalizeComponent-EDymnaGR.js";
|
|
6
|
+
import { useTheme as y } from "@mui/material/styles";
|
|
7
|
+
import * as r from "react";
|
|
8
|
+
import { forwardRef as d, useId as v } from "react";
|
|
9
|
+
import { useTranslation as T, Trans as s } from "react-i18next";
|
|
10
|
+
import B from "@mui/material/Popover";
|
|
11
|
+
import F from "@mui/material/SvgIcon";
|
|
12
|
+
import E from "@mui/material/Typography";
|
|
13
|
+
import { AxiosError as w } from "axios";
|
|
14
|
+
function Z(e, t) {
|
|
15
|
+
throw new Error(`${t} ${JSON.stringify(e)}`);
|
|
16
|
+
}
|
|
17
|
+
function me(e) {
|
|
18
|
+
var t, a, o, l;
|
|
19
|
+
return e instanceof w && e.code === "ERR_NETWORK" ? "Failed to connect to the server. Please check your internet connection." : e instanceof w && e.response ? `${(t = e.response) == null ? void 0 : t.status} ${(a = e.response) == null ? void 0 : a.statusText} from ${(o = e.response) == null ? void 0 : o.config.url}: ${JSON.stringify((l = e.response) == null ? void 0 : l.data)}` : e instanceof Error ? e.message : `Unexpected error: ${R(e) || e}`;
|
|
20
|
+
}
|
|
21
|
+
const C = ({
|
|
22
|
+
title: e,
|
|
23
|
+
titleId: t,
|
|
24
|
+
...a
|
|
25
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z" })), $ = d(C), P = ({
|
|
26
|
+
title: e,
|
|
27
|
+
titleId: t,
|
|
28
|
+
...a
|
|
29
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z" })), N = d(P), p = f(
|
|
30
|
+
({
|
|
31
|
+
id: e,
|
|
32
|
+
icon: t,
|
|
33
|
+
color: a,
|
|
34
|
+
title: o,
|
|
35
|
+
name: l,
|
|
36
|
+
label: i,
|
|
37
|
+
explanation: c,
|
|
38
|
+
literalValue: h,
|
|
39
|
+
anchorOrigin: A,
|
|
40
|
+
transformOrigin: g
|
|
41
|
+
}) => {
|
|
42
|
+
const S = _(() => ({
|
|
43
|
+
anchorEl: null,
|
|
44
|
+
get isPopoverOpen() {
|
|
45
|
+
return !!S.anchorEl;
|
|
46
|
+
},
|
|
47
|
+
openPopover(M) {
|
|
48
|
+
S.anchorEl = M.currentTarget;
|
|
49
|
+
},
|
|
50
|
+
closePopover() {
|
|
51
|
+
S.anchorEl = null;
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
return /* @__PURE__ */ m(x, { children: [
|
|
55
|
+
/* @__PURE__ */ m(
|
|
56
|
+
u,
|
|
57
|
+
{
|
|
58
|
+
"aria-owns": S.isPopoverOpen ? e : void 0,
|
|
59
|
+
"aria-haspopup": "true",
|
|
60
|
+
onMouseEnter: S.openPopover,
|
|
61
|
+
onMouseLeave: S.closePopover,
|
|
62
|
+
direction: "row",
|
|
63
|
+
spacing: 1,
|
|
64
|
+
sx: {
|
|
65
|
+
cursor: "pointer"
|
|
66
|
+
},
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ n(
|
|
69
|
+
F,
|
|
70
|
+
{
|
|
71
|
+
component: t,
|
|
72
|
+
sx: {
|
|
73
|
+
color: a
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
i && /* @__PURE__ */ n(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
style: {
|
|
81
|
+
color: a
|
|
82
|
+
},
|
|
83
|
+
children: i
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ n(
|
|
90
|
+
B,
|
|
91
|
+
{
|
|
92
|
+
id: e,
|
|
93
|
+
sx: {
|
|
94
|
+
pointerEvents: "none"
|
|
95
|
+
},
|
|
96
|
+
open: S.isPopoverOpen,
|
|
97
|
+
anchorEl: S.anchorEl,
|
|
98
|
+
anchorOrigin: A ?? {
|
|
99
|
+
vertical: "bottom",
|
|
100
|
+
horizontal: "left"
|
|
101
|
+
},
|
|
102
|
+
transformOrigin: g ?? {
|
|
103
|
+
vertical: "top",
|
|
104
|
+
horizontal: "left"
|
|
105
|
+
},
|
|
106
|
+
onClose: S.closePopover,
|
|
107
|
+
disableRestoreFocus: !0,
|
|
108
|
+
children: /* @__PURE__ */ m(
|
|
109
|
+
u,
|
|
110
|
+
{
|
|
111
|
+
gap: "1rem",
|
|
112
|
+
padding: 2,
|
|
113
|
+
maxWidth: "450px",
|
|
114
|
+
sx: {
|
|
115
|
+
wordWrap: "break-word"
|
|
116
|
+
},
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ m("div", { children: [
|
|
119
|
+
o && /* @__PURE__ */ n(E, { component: "span", fontSize: "14px", children: `${o}: ` }),
|
|
120
|
+
/* @__PURE__ */ n(
|
|
121
|
+
E,
|
|
122
|
+
{
|
|
123
|
+
component: "span",
|
|
124
|
+
color: a,
|
|
125
|
+
fontWeight: "bold",
|
|
126
|
+
fontSize: "14px",
|
|
127
|
+
children: l
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ n(E, { fontSize: "14px", children: c }),
|
|
132
|
+
h && /* @__PURE__ */ n(E, { fontSize: "12px", children: h })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] });
|
|
139
|
+
}
|
|
140
|
+
), Y = f(
|
|
141
|
+
({
|
|
142
|
+
isVirtual: e,
|
|
143
|
+
motionGroupId: t,
|
|
144
|
+
anchorOrigin: a,
|
|
145
|
+
transformOrigin: o,
|
|
146
|
+
compact: l
|
|
147
|
+
}) => {
|
|
148
|
+
const i = y(), c = v(), { t: h } = T();
|
|
149
|
+
return e ? /* @__PURE__ */ n(
|
|
150
|
+
p,
|
|
151
|
+
{
|
|
152
|
+
id: `motion-group-virtual-${c}`,
|
|
153
|
+
icon: N,
|
|
154
|
+
color: i.palette.tertiary.main,
|
|
155
|
+
name: h("SafetyBar.ControllerType.Virtual.lb"),
|
|
156
|
+
label: l ? null : h("SafetyBar.ControllerType.Virtual.lb"),
|
|
157
|
+
explanation: /* @__PURE__ */ m(
|
|
158
|
+
s,
|
|
159
|
+
{
|
|
160
|
+
i18nKey: "SafetyBar.MotionGroup.Virtual.Explanation.lb",
|
|
161
|
+
values: {
|
|
162
|
+
motionGroupId: t
|
|
163
|
+
},
|
|
164
|
+
children: [
|
|
165
|
+
"Motion group ",
|
|
166
|
+
/* @__PURE__ */ n("code", { children: t }),
|
|
167
|
+
" refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
anchorOrigin: a,
|
|
172
|
+
transformOrigin: o
|
|
173
|
+
}
|
|
174
|
+
) : /* @__PURE__ */ n(
|
|
175
|
+
p,
|
|
176
|
+
{
|
|
177
|
+
id: `motion-group-physical-${c}`,
|
|
178
|
+
icon: $,
|
|
179
|
+
color: i.palette.primary.main,
|
|
180
|
+
name: h("SafetyBar.ControllerType.Physical.lb"),
|
|
181
|
+
label: l ? null : h("SafetyBar.ControllerType.Physical.lb"),
|
|
182
|
+
explanation: /* @__PURE__ */ n(
|
|
183
|
+
s,
|
|
184
|
+
{
|
|
185
|
+
i18nKey: "SafetyBar.MotionGroup.Physical.Explanation.lb",
|
|
186
|
+
values: {
|
|
187
|
+
motionGroupId: t
|
|
188
|
+
},
|
|
189
|
+
components: { code: /* @__PURE__ */ n("code", {}), strong: /* @__PURE__ */ n("strong", {}) }
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
anchorOrigin: a,
|
|
193
|
+
transformOrigin: o
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
), V = ({
|
|
198
|
+
title: e,
|
|
199
|
+
titleId: t,
|
|
200
|
+
...a
|
|
201
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z" })), L = d(V), K = ({
|
|
202
|
+
title: e,
|
|
203
|
+
titleId: t,
|
|
204
|
+
...a
|
|
205
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z", fill: "#fff", fillOpacity: 0.56 })), I = d(K), H = ({
|
|
206
|
+
title: e,
|
|
207
|
+
titleId: t,
|
|
208
|
+
...a
|
|
209
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z" })), U = d(H), D = f(
|
|
210
|
+
({
|
|
211
|
+
operationMode: e,
|
|
212
|
+
anchorOrigin: t,
|
|
213
|
+
transformOrigin: a,
|
|
214
|
+
compact: o
|
|
215
|
+
}) => {
|
|
216
|
+
const { t: l } = T(), i = y(), c = v();
|
|
217
|
+
switch (e) {
|
|
218
|
+
case "OPERATION_MODE_AUTO":
|
|
219
|
+
return /* @__PURE__ */ n(
|
|
220
|
+
p,
|
|
221
|
+
{
|
|
222
|
+
id: `operation-mode-auto-${c}`,
|
|
223
|
+
icon: L,
|
|
224
|
+
title: l("SafetyBar.OperationMode.ti"),
|
|
225
|
+
name: l("SafetyBar.OperationMode.Automatic.ti"),
|
|
226
|
+
label: o ? null : l("SafetyBar.OperationMode.Automatic.ti"),
|
|
227
|
+
color: i.palette.text.secondary,
|
|
228
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.OperationMode.Auto.Explanation.lb", children: "The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode." }),
|
|
229
|
+
anchorOrigin: t,
|
|
230
|
+
transformOrigin: a
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
case "OPERATION_MODE_MANUAL":
|
|
234
|
+
case "OPERATION_MODE_MANUAL_T1":
|
|
235
|
+
case "OPERATION_MODE_MANUAL_T2":
|
|
236
|
+
return /* @__PURE__ */ n(
|
|
237
|
+
p,
|
|
238
|
+
{
|
|
239
|
+
id: `operation-mode-manual-${c}`,
|
|
240
|
+
icon: U,
|
|
241
|
+
color: i.palette.warning.main,
|
|
242
|
+
title: l("SafetyBar.OperationMode.ti"),
|
|
243
|
+
name: l("SafetyBar.OperationMode.Manual.lb"),
|
|
244
|
+
label: o ? null : l("SafetyBar.OperationMode.Manual.lb"),
|
|
245
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.OperationMode.Manual.Explanation.lb", children: "The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully." }),
|
|
246
|
+
literalValue: e,
|
|
247
|
+
anchorOrigin: t,
|
|
248
|
+
transformOrigin: a
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
default:
|
|
252
|
+
return /* @__PURE__ */ n(
|
|
253
|
+
p,
|
|
254
|
+
{
|
|
255
|
+
id: `operation-mode-error-${c}`,
|
|
256
|
+
icon: I,
|
|
257
|
+
color: i.palette.warning.main,
|
|
258
|
+
title: l("SafetyBar.OperationMode.ti"),
|
|
259
|
+
name: l("SafetyBar.OperationMode.Error.lb"),
|
|
260
|
+
label: o ? null : l("SafetyBar.OperationMode.Error.lb"),
|
|
261
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.OperationMode.Error.Explanation.lb", children: "The robot controller has entered an unexpected operation mode. Motion group movement may not be possible." }),
|
|
262
|
+
literalValue: e,
|
|
263
|
+
anchorOrigin: t,
|
|
264
|
+
transformOrigin: a
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
), z = ({
|
|
270
|
+
title: e,
|
|
271
|
+
titleId: t,
|
|
272
|
+
...a
|
|
273
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z" })), q = d(z), W = ({
|
|
274
|
+
title: e,
|
|
275
|
+
titleId: t,
|
|
276
|
+
...a
|
|
277
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "M10.24 10.636 12 13.764l1.76-3.128h-3.52Z" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z" })), k = d(W), G = ({
|
|
278
|
+
title: e,
|
|
279
|
+
titleId: t,
|
|
280
|
+
...a
|
|
281
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z", fill: "#fff", fillOpacity: 0.56 })), J = d(G), j = ({
|
|
282
|
+
title: e,
|
|
283
|
+
titleId: t,
|
|
284
|
+
...a
|
|
285
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z" })), Q = d(j), X = ({
|
|
286
|
+
title: e,
|
|
287
|
+
titleId: t,
|
|
288
|
+
...a
|
|
289
|
+
}, o) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, xmlns: "http://www.w3.org/2000/svg", ref: o, "aria-labelledby": t, ...a }, e ? /* @__PURE__ */ r.createElement("title", { id: t }, e) : null, /* @__PURE__ */ r.createElement("path", { d: "M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z" })), ee = d(X), te = f(
|
|
290
|
+
({
|
|
291
|
+
safetyState: e,
|
|
292
|
+
anchorOrigin: t,
|
|
293
|
+
transformOrigin: a,
|
|
294
|
+
compact: o
|
|
295
|
+
}) => {
|
|
296
|
+
const { t: l } = T(), i = y(), c = v();
|
|
297
|
+
switch (e) {
|
|
298
|
+
// Normal state, robot can move
|
|
299
|
+
case "SAFETY_STATE_NORMAL":
|
|
300
|
+
return /* @__PURE__ */ n(
|
|
301
|
+
p,
|
|
302
|
+
{
|
|
303
|
+
id: `safety-state-normal-${c}`,
|
|
304
|
+
title: l("SafetyBar.SafetyState.ti"),
|
|
305
|
+
name: l("SafetyBar.SafetyState.Normal.lb"),
|
|
306
|
+
label: o ? null : l("SafetyBar.SafetyState.Normal.lb"),
|
|
307
|
+
icon: Q,
|
|
308
|
+
color: i.palette.text.secondary,
|
|
309
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.SafetyState.Normal.Explanation.lb", children: "The robot controller is in a normal safety state. Movement is not prevented by this state." }),
|
|
310
|
+
anchorOrigin: t,
|
|
311
|
+
transformOrigin: a
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
// Estop
|
|
315
|
+
case "SAFETY_STATE_DEVICE_EMERGENCY_STOP":
|
|
316
|
+
case "SAFETY_STATE_ROBOT_EMERGENCY_STOP":
|
|
317
|
+
return /* @__PURE__ */ n(
|
|
318
|
+
p,
|
|
319
|
+
{
|
|
320
|
+
id: `safety-state-estop-${c}`,
|
|
321
|
+
title: l("SafetyBar.SafetyState.ti"),
|
|
322
|
+
name: l("SafetyBar.SafetyState.Estop.lb"),
|
|
323
|
+
label: o ? null : l("SafetyBar.SafetyState.Estop.lb"),
|
|
324
|
+
icon: k,
|
|
325
|
+
color: i.palette.error.main,
|
|
326
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.StopState.Estop.Explanation.lb", children: "An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released." }),
|
|
327
|
+
literalValue: e,
|
|
328
|
+
anchorOrigin: t,
|
|
329
|
+
transformOrigin: a
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
// General stop
|
|
333
|
+
case "SAFETY_STATE_STOP_0":
|
|
334
|
+
case "SAFETY_STATE_STOP_1":
|
|
335
|
+
case "SAFETY_STATE_STOP_2":
|
|
336
|
+
case "SAFETY_STATE_PROTECTIVE_STOP":
|
|
337
|
+
case "SAFETY_STATE_STOP":
|
|
338
|
+
return /* @__PURE__ */ n(
|
|
339
|
+
p,
|
|
340
|
+
{
|
|
341
|
+
id: `safety-state-stop-${c}`,
|
|
342
|
+
icon: ee,
|
|
343
|
+
title: l("SafetyBar.SafetyState.ti"),
|
|
344
|
+
name: l("SafetyBar.SafetyState.Stop.lb"),
|
|
345
|
+
label: o ? null : l("SafetyBar.SafetyState.Stop.lb"),
|
|
346
|
+
color: i.palette.warning.main,
|
|
347
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.SafetyState.Stop.Explanation.lb", children: "The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved." }),
|
|
348
|
+
literalValue: e,
|
|
349
|
+
anchorOrigin: t,
|
|
350
|
+
transformOrigin: a
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
// Manual action required
|
|
354
|
+
case "SAFETY_STATE_REDUCED":
|
|
355
|
+
case "SAFETY_STATE_MASTERING":
|
|
356
|
+
case "SAFETY_STATE_CONFIRM_SAFETY":
|
|
357
|
+
case "SAFETY_STATE_OPERATOR_SAFETY":
|
|
358
|
+
case "SAFETY_STATE_RECOVERY":
|
|
359
|
+
case "SAFETY_STATE_VIOLATION":
|
|
360
|
+
return /* @__PURE__ */ n(
|
|
361
|
+
p,
|
|
362
|
+
{
|
|
363
|
+
id: `safety-state-manual-action-required-${c}`,
|
|
364
|
+
icon: J,
|
|
365
|
+
color: i.palette.warning.main,
|
|
366
|
+
title: l("SafetyBar.SafetyState.ti"),
|
|
367
|
+
name: l("SafetyBar.SafetyState.ManualActionRequired.lb"),
|
|
368
|
+
label: o ? null : l("SafetyBar.SafetyState.ManualActionRequired.lb"),
|
|
369
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.SafetyState.ManualActionRequired.Explanation.lb", children: "The robot controller has entered a safety state requiring manual action to resolve." }),
|
|
370
|
+
literalValue: e,
|
|
371
|
+
anchorOrigin: t,
|
|
372
|
+
transformOrigin: a
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
// Error
|
|
376
|
+
case "SAFETY_STATE_UNKNOWN":
|
|
377
|
+
case "SAFETY_STATE_FAULT":
|
|
378
|
+
return /* @__PURE__ */ n(
|
|
379
|
+
p,
|
|
380
|
+
{
|
|
381
|
+
id: `safety-state-error-${c}`,
|
|
382
|
+
icon: q,
|
|
383
|
+
color: i.palette.error.main,
|
|
384
|
+
title: l("SafetyBar.SafetyState.ti"),
|
|
385
|
+
name: l("SafetyBar.SafetyState.Error.lb"),
|
|
386
|
+
label: o ? null : l("SafetyBar.SafetyState.Error.lb"),
|
|
387
|
+
explanation: /* @__PURE__ */ n(s, { i18nKey: "SafetyBar.SafetyState.Error.Explanation.lb", children: "The robot controller has entered an unexpected safety state." }),
|
|
388
|
+
literalValue: e,
|
|
389
|
+
anchorOrigin: t,
|
|
390
|
+
transformOrigin: a
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
default:
|
|
394
|
+
Z(e, `Unknown safety state ${e}`);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
), fe = O(
|
|
398
|
+
f(
|
|
399
|
+
({
|
|
400
|
+
isVirtual: e,
|
|
401
|
+
motionGroupId: t,
|
|
402
|
+
operationMode: a,
|
|
403
|
+
safetyState: o,
|
|
404
|
+
anchorOrigin: l,
|
|
405
|
+
transformOrigin: i,
|
|
406
|
+
compact: c = !0
|
|
407
|
+
}) => /* @__PURE__ */ m(
|
|
408
|
+
u,
|
|
409
|
+
{
|
|
410
|
+
direction: "row",
|
|
411
|
+
gap: c ? 1 : 2,
|
|
412
|
+
alignItems: "center",
|
|
413
|
+
sx: { height: "24px" },
|
|
414
|
+
children: [
|
|
415
|
+
/* @__PURE__ */ n(
|
|
416
|
+
te,
|
|
417
|
+
{
|
|
418
|
+
safetyState: o,
|
|
419
|
+
anchorOrigin: l,
|
|
420
|
+
transformOrigin: i,
|
|
421
|
+
compact: c
|
|
422
|
+
}
|
|
423
|
+
),
|
|
424
|
+
/* @__PURE__ */ n(b, { orientation: "vertical", flexItem: !0 }),
|
|
425
|
+
/* @__PURE__ */ n(
|
|
426
|
+
D,
|
|
427
|
+
{
|
|
428
|
+
operationMode: a,
|
|
429
|
+
anchorOrigin: l,
|
|
430
|
+
transformOrigin: i,
|
|
431
|
+
compact: c
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
/* @__PURE__ */ n(b, { orientation: "vertical", flexItem: !0 }),
|
|
435
|
+
/* @__PURE__ */ n(
|
|
436
|
+
Y,
|
|
437
|
+
{
|
|
438
|
+
isVirtual: e,
|
|
439
|
+
motionGroupId: t,
|
|
440
|
+
anchorOrigin: l,
|
|
441
|
+
transformOrigin: i,
|
|
442
|
+
compact: c
|
|
443
|
+
}
|
|
444
|
+
)
|
|
445
|
+
]
|
|
446
|
+
}
|
|
447
|
+
)
|
|
448
|
+
)
|
|
449
|
+
);
|
|
450
|
+
export {
|
|
451
|
+
fe as S,
|
|
452
|
+
me as m
|
|
453
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),m=require("@mui/material/Divider"),E=require("@mui/material/Stack"),f=require("mobx-react-lite"),x=require("./externalizeComponent-OO4jcrz5.cjs"),y=require("@mui/material/styles"),c=require("react"),d=require("react-i18next"),A=require("@mui/material/Popover"),g=require("@mui/material/SvgIcon"),h=require("@mui/material/Typography"),T=require("axios");function M(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=M(c);function _(e,t){throw new Error(`${t} ${JSON.stringify(e)}`)}function R(e){var t,a,n,o;return e instanceof T.AxiosError&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof T.AxiosError&&e.response?`${(t=e.response)==null?void 0:t.status} ${(a=e.response)==null?void 0:a.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${x.tryStringifyJson(e)||e}`}const O=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),j=c.forwardRef(O),B=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),F=c.forwardRef(B),p=f.observer(({id:e,icon:t,color:a,title:n,name:o,label:s,explanation:i,literalValue:S,anchorOrigin:b,transformOrigin:v})=>{const u=f.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(w){u.anchorEl=w.currentTarget},closePopover(){u.anchorEl=null}}));return r.jsxs(r.Fragment,{children:[r.jsxs(E,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[r.jsx(g,{component:t,sx:{color:a}}),s&&r.jsx("div",{style:{color:a},children:s})]}),r.jsx(A,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:b??{vertical:"bottom",horizontal:"left"},transformOrigin:v??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:r.jsxs(E,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[r.jsxs("div",{children:[n&&r.jsx(h,{component:"span",fontSize:"14px",children:`${n}: `}),r.jsx(h,{component:"span",color:a,fontWeight:"bold",fontSize:"14px",children:o})]}),r.jsx(h,{fontSize:"14px",children:i}),S&&r.jsx(h,{fontSize:"12px",children:S})]})})]})}),Z=f.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:n,compact:o})=>{const s=y.useTheme(),i=c.useId(),{t:S}=d.useTranslation();return e?r.jsx(p,{id:`motion-group-virtual-${i}`,icon:F,color:s.palette.tertiary.main,name:S("SafetyBar.ControllerType.Virtual.lb"),label:o?null:S("SafetyBar.ControllerType.Virtual.lb"),explanation:r.jsxs(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",r.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:a,transformOrigin:n}):r.jsx(p,{id:`motion-group-physical-${i}`,icon:j,color:s.palette.primary.main,name:S("SafetyBar.ControllerType.Physical.lb"),label:o?null:S("SafetyBar.ControllerType.Physical.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:r.jsx("code",{}),strong:r.jsx("strong",{})}}),anchorOrigin:a,transformOrigin:n})}),C=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),P=c.forwardRef(C),$=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),N=c.forwardRef($),Y=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),V=c.forwardRef(Y),q=f.observer(({operationMode:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:o}=d.useTranslation(),s=y.useTheme(),i=c.useId();switch(e){case"OPERATION_MODE_AUTO":return r.jsx(p,{id:`operation-mode-auto-${i}`,icon:P,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:a});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return r.jsx(p,{id:`operation-mode-manual-${i}`,icon:V,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:a});default:return r.jsx(p,{id:`operation-mode-error-${i}`,icon:N,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:a})}}),L=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),I=c.forwardRef(L),K=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),D=c.forwardRef(K),H=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),U=c.forwardRef(H),z=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),k=c.forwardRef(z),W=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),G=c.forwardRef(W),J=f.observer(({safetyState:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:o}=d.useTranslation(),s=y.useTheme(),i=c.useId();switch(e){case"SAFETY_STATE_NORMAL":return r.jsx(p,{id:`safety-state-normal-${i}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:k,color:s.palette.text.secondary,explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:a});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return r.jsx(p,{id:`safety-state-estop-${i}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:D,color:s.palette.error.main,explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:a});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return r.jsx(p,{id:`safety-state-stop-${i}`,icon:G,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:a});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return r.jsx(p,{id:`safety-state-manual-action-required-${i}`,icon:U,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:a});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return r.jsx(p,{id:`safety-state-error-${i}`,icon:I,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:a});default:_(e,`Unknown safety state ${e}`)}}),Q=x.externalizeComponent(f.observer(({isVirtual:e,motionGroupId:t,operationMode:a,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i=!0})=>{const S=i?1:2;return r.jsxs(E,{direction:"row",gap:S,alignItems:"center",sx:{height:"24px"},children:[r.jsx(J,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(q,{operationMode:a,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(Z,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:i})]})}));exports.SafetyBar=Q;exports.makeErrorMessage=R;
|