@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.bd2ec84 → 6.4.0-pr.revamp.667.ca77f09
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 +172 -40
- package/dist/3d.cjs +1 -1
- package/dist/3d.d.ts +3 -4
- package/dist/3d.js +35 -38
- package/dist/CurrentPose/index.cjs +1 -1
- package/dist/CurrentPose/index.js +2 -2
- package/dist/CurrentPoseBar/index.cjs +1 -1
- package/dist/CurrentPoseBar/index.js +1 -1
- package/dist/JoggingButtons/index.cjs +1 -1
- package/dist/JoggingButtons/index.js +1 -1
- package/dist/JoggingGizmo/index.cjs +1 -1
- package/dist/JoggingGizmo/index.js +2 -2
- package/dist/JoggingJointSlider/index.cjs +1 -1
- package/dist/JoggingJointSlider/index.js +1 -1
- package/dist/RobotControl/index.cjs +1 -1
- package/dist/RobotControl/index.js +2 -2
- package/dist/RobotControlPanel/index.cjs +1 -1
- package/dist/RobotControlPanel/index.d.ts +1 -1
- package/dist/RobotControlPanel/index.js +1 -1
- package/dist/RobotHeader/index.cjs +1 -1
- package/dist/RobotHeader/index.d.ts +3 -5
- package/dist/RobotHeader/index.js +6 -7
- package/dist/RobotScene/index.cjs +1 -1
- package/dist/RobotScene/index.js +3 -3
- package/dist/RobotView/index.cjs +1 -1
- package/dist/RobotView/index.js +2 -2
- package/dist/SafetyBar/IndicatorWithExplanation.d.ts +12 -1
- package/dist/SafetyBar/SafetyBar.d.ts +15 -1
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.d.ts +0 -1
- package/dist/SafetyBar/index.js +3 -4
- package/dist/SafetyBar/robotSafetyOf.d.ts +1 -0
- package/dist/chunks/{ConnectedMotionGroup-BifrgwV1.js → ConnectedMotionGroup-DNYakgxy.js} +6 -5
- package/dist/chunks/ConnectedMotionGroup-IRTsTxwB.cjs +3 -0
- package/dist/chunks/{CurrentPose-CMqO8oqX.cjs → CurrentPose-CAq9e9JY.cjs} +1 -1
- package/dist/chunks/{CurrentPose-CdD2ZB7B.js → CurrentPose-CgdINEh2.js} +3 -3
- package/dist/chunks/{CurrentPoseBar-CX1xFBtm.js → CurrentPoseBar--HkZBGnN.js} +11 -11
- package/dist/chunks/{CurrentPoseBar-BTBAwIO4.cjs → CurrentPoseBar-DoOUfRRs.cjs} +1 -1
- package/dist/chunks/{JoggingButtons-aijK-3g6.js → JoggingButtons-BNOnpcTH.js} +1 -1
- package/dist/chunks/{JoggingButtons-BOHl7hVq.cjs → JoggingButtons-Boaym2hQ.cjs} +1 -1
- package/dist/chunks/{JoggingGizmo-CoKYUtXq.cjs → JoggingGizmo-CNFjpWDv.cjs} +1 -1
- package/dist/chunks/{JoggingGizmo-DHvrJouR.js → JoggingGizmo-RDiEVQes.js} +1 -1
- package/dist/chunks/{JoggingGizmoOrientation-CIvIAIeO.js → JoggingGizmoOrientation-Dzzz2gEz.js} +1 -1
- package/dist/chunks/{JoggingGizmoOrientation-DVcagPRJ.cjs → JoggingGizmoOrientation-laUrgY0N.cjs} +1 -1
- package/dist/chunks/{JoggingJointSlider-DQtt4-pa.js → JoggingJointSlider-BY-Tof8G.js} +1 -1
- package/dist/chunks/{JoggingJointSlider-CTFYKzsU.cjs → JoggingJointSlider-Dm3vILd3.cjs} +1 -1
- package/dist/chunks/{JoggingRefusedError-BIkUM6-g.js → JoggingRefusedError-C4D8_YR_.js} +5 -3
- package/dist/chunks/JoggingRefusedError-DqyrfUcc.cjs +1 -0
- package/dist/chunks/Pose3-BfBNPRDM.cjs +1 -0
- package/dist/chunks/{Pose3-B_fLR-Wv.js → Pose3-DWxfC6Dj.js} +1 -2
- package/dist/chunks/{Robot-C-IWfxP9.js → Robot-B-VAYuAr.js} +5 -5
- package/dist/chunks/{Robot-Cfhjv9Z8.cjs → Robot-DRf8T9Zf.cjs} +1 -1
- package/dist/chunks/RobotActivation-CRVxXvlx.cjs +1 -0
- package/dist/chunks/RobotActivation-oR-8Y0iq.js +143 -0
- package/dist/chunks/RobotControl-Dbe50ZKM.cjs +1 -0
- package/dist/chunks/RobotControl-Ms1F7fFe.js +332 -0
- package/dist/chunks/RobotControlPanel-B7NxoHsO.cjs +1 -0
- package/dist/chunks/RobotControlPanel-CkQlkq8x.js +1029 -0
- package/dist/chunks/RobotHeader-CjOaf9s6.cjs +1 -0
- package/dist/chunks/RobotHeader-LSuRTDFB.js +395 -0
- package/dist/chunks/RobotScene-Au6zpHH1.cjs +1 -0
- package/dist/chunks/RobotScene-C6XEgaVR.js +1284 -0
- package/dist/chunks/RobotSessionProvider-CoF_tX0O.cjs +1 -0
- package/dist/chunks/RobotSessionProvider-DuHi-dtw.js +30 -0
- package/dist/chunks/{RobotView-BGYlAWj-.cjs → RobotView-Cg6JfGiY.cjs} +1 -1
- package/dist/chunks/{RobotView-D-v8jCM7.js → RobotView-CrAxNkyG.js} +3 -3
- package/dist/chunks/{robotSafetyOf-DuKKma1_.js → SafetyBar-C85BAKsL.js} +244 -215
- package/dist/chunks/SafetyBar-D2l81Omq.cjs +1 -0
- package/dist/chunks/externalizeComponent-CA_sHzyH.cjs +2 -0
- package/dist/chunks/{externalizeComponent-4juwPKL5.js → externalizeComponent-CChY_1bN.js} +34 -8
- package/dist/chunks/{useSmoothedMotionState-BSSV8aZN.js → hooks-BWoeBWLV.js} +43 -87
- package/dist/chunks/hooks-BXe2bNMo.cjs +1 -0
- package/dist/chunks/loadRobotSession-BzY9H3F8.cjs +1 -0
- package/dist/chunks/{loadRobotSession-GHHtv5dv.js → loadRobotSession-Ts2MumBB.js} +1065 -679
- package/dist/chunks/poseText-BxG4Caa-.js +48 -0
- package/dist/chunks/poseText-CwplkbDM.cjs +1 -0
- package/dist/chunks/useSmoothedMotionState-CCXmMZ0S.cjs +1 -0
- package/dist/chunks/useSmoothedMotionState-CELh-YJa.js +50 -0
- package/dist/components/VelocitySlider.d.ts +14 -1
- package/dist/components/connectionWarning/ConnectionWarning.d.ts +18 -4
- package/dist/components/connectionWarning/connectionWarningOf.d.ts +1 -11
- package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +7 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts +6 -0
- package/dist/components/jogging/JoggingJointTab.d.ts +5 -0
- package/dist/components/jogging/JoggingJointValueControl.d.ts +7 -1
- package/dist/components/jogging/JoggingPanel.d.ts +11 -0
- package/dist/components/jogging/JoggingRefusedError.d.ts +8 -3
- package/dist/components/jogging/JoggingStore.d.ts +206 -17
- package/dist/components/jogging/joggingColors.d.ts +6 -0
- package/dist/components/robotControl/CartesianJogTab.d.ts +14 -3
- package/dist/components/robotControl/JogArea.d.ts +6 -3
- package/dist/components/robotControl/JogDisabledReason.d.ts +15 -0
- package/dist/components/robotControl/JointJogTab.d.ts +10 -2
- package/dist/components/robotControl/MoveToTab.d.ts +24 -3
- package/dist/components/robotControl/PoseField.d.ts +3 -1
- package/dist/components/robotControl/RobotControl.d.ts +3 -0
- package/dist/components/robotControl/RobotControlPanel.d.ts +91 -22
- package/dist/components/robotControl/VelocityRow.d.ts +8 -2
- package/dist/components/robotControl/atPose.d.ts +6 -0
- package/dist/components/robotControl/poseText.d.ts +13 -1
- package/dist/components/robotControl/units.d.ts +10 -2
- package/dist/components/robotControl/useRobotControlProps.d.ts +7 -4
- package/dist/components/robotControl/velocityText.d.ts +18 -0
- package/dist/components/robotHeader/ActivationSwitch.d.ts +13 -2
- package/dist/components/robotHeader/RobotHeader.d.ts +25 -4
- package/dist/components/robotHeader/robotActivationOf.d.ts +1 -8
- package/dist/components/robotScene/RobotScene.d.ts +7 -1
- package/dist/components/robots/MotionGroupVisualizer.d.ts +6 -4
- package/dist/components/robots/SupportedLinearAxis.d.ts +6 -4
- package/dist/components/robots/SupportedRobot.d.ts +7 -5
- package/dist/components/robots/useFrameSmoothedMotionState.d.ts +25 -0
- package/dist/components/utils/useSmoothedMotionState.d.ts +11 -2
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +8 -10
- package/dist/core.js +60 -69
- package/dist/index.cjs +1 -1
- package/dist/index.js +100 -113
- package/dist/lib/ConnectedMotionGroup.d.ts +11 -0
- package/dist/lib/ControllerStateStream.d.ts +9 -9
- package/dist/lib/JoggerConnection.d.ts +48 -13
- package/dist/lib/MotionStreamConnection.d.ts +3 -2
- package/dist/lib/TrajectoryExecutionStore.d.ts +58 -20
- package/dist/lib/controllerStateSource.d.ts +6 -5
- package/dist/lib/robotSession/RobotActivation.d.ts +52 -21
- package/dist/lib/robotSession/RobotSession.d.ts +27 -8
- package/dist/lib/robotSession/RobotTargetPose.d.ts +4 -2
- package/dist/lib/robotSession/loadRobotSession.d.ts +1 -1
- package/dist/lib/robotSession/robotPose.d.ts +0 -6
- package/dist/session.cjs +1 -1
- package/dist/session.d.ts +6 -6
- package/dist/session.js +30 -38
- package/package.json +22 -1
- package/dist/chunks/ConnectedMotionGroup-CybwJHkh.cjs +0 -3
- package/dist/chunks/JoggingRefusedError-BuCGsVsa.cjs +0 -1
- package/dist/chunks/Pose3-Ch4xVeXV.cjs +0 -1
- package/dist/chunks/RobotActivation-Bb0oNSBN.cjs +0 -1
- package/dist/chunks/RobotActivation-C0rrwpQZ.js +0 -115
- package/dist/chunks/RobotControl-Cv6Sr1Ni.js +0 -289
- package/dist/chunks/RobotControl-DFnOYMAa.cjs +0 -1
- package/dist/chunks/RobotControlPanel-B1_9g9D-.js +0 -850
- package/dist/chunks/RobotControlPanel-BpTpRBgy.cjs +0 -1
- package/dist/chunks/RobotScene-0ZJzXL50.cjs +0 -1
- package/dist/chunks/RobotScene-DpFeFpnx.js +0 -1255
- package/dist/chunks/RobotSessionProvider--AekyPqD.cjs +0 -1
- package/dist/chunks/RobotSessionProvider-TVaKGzqa.js +0 -25
- package/dist/chunks/externalizeComponent-Br_U-QAr.cjs +0 -2
- package/dist/chunks/loadRobotSession-DYbeNnTI.cjs +0 -1
- package/dist/chunks/poseText-BXUaQWnK.cjs +0 -1
- package/dist/chunks/poseText-pg4cxE8R.js +0 -41
- package/dist/chunks/robotActivationOf-B4oV10Za.cjs +0 -1
- package/dist/chunks/robotActivationOf-EzcT9g07.js +0 -368
- package/dist/chunks/robotSafetyOf-Dxm6s7Pp.cjs +0 -1
- package/dist/chunks/useSmoothedMotionState-B9WO73k0.cjs +0 -1
- package/dist/components/robotHeader/robotSafetyOf.d.ts +0 -11
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as d, Fragment as I } from "react/jsx-runtime";
|
|
2
|
-
import g from "@mui/material/Box";
|
|
3
|
-
import T from "@mui/material/Paper";
|
|
4
|
-
import W, { tooltipClasses as B } from "@mui/material/Tooltip";
|
|
5
|
-
import u from "@mui/material/Typography";
|
|
6
|
-
import { WifiOff as k } from "@wandelbots/icons/WifiOff";
|
|
7
|
-
import { useState as S, useEffect as M, useId as y } from "react";
|
|
8
|
-
import { useTranslation as h } from "react-i18next";
|
|
9
|
-
import { e as C } from "./externalizeComponent-4juwPKL5.js";
|
|
10
|
-
import m from "@mui/material/Stack";
|
|
11
|
-
import { S as z } from "./robotSafetyOf-DuKKma1_.js";
|
|
12
|
-
import { S as R } from "./SmallSelect-BdD9uLKK.js";
|
|
13
|
-
import E from "@mui/material/CircularProgress";
|
|
14
|
-
import H from "@mui/material/Switch";
|
|
15
|
-
import P from "@mui/icons-material/Apps";
|
|
16
|
-
import v from "@mui/material/Button";
|
|
17
|
-
import D from "@mui/material/ButtonGroup";
|
|
18
|
-
import F from "@mui/material/Menu";
|
|
19
|
-
import N from "@mui/material/MenuItem";
|
|
20
|
-
import { FontFamilyBrand as O } from "@wandelbots/design-tokens";
|
|
21
|
-
import { SearchFilled as U } from "@wandelbots/icons/SearchFilled";
|
|
22
|
-
import { a as G } from "./RobotActivation-C0rrwpQZ.js";
|
|
23
|
-
const L = [
|
|
24
|
-
["day", 86400],
|
|
25
|
-
["hour", 3600],
|
|
26
|
-
["minute", 60],
|
|
27
|
-
["second", 1]
|
|
28
|
-
];
|
|
29
|
-
function j(e, i, r) {
|
|
30
|
-
const n = Math.max(0, Math.floor((i - e) / 1e3)), [a, l] = L.find(([, c]) => n >= c) ?? [
|
|
31
|
-
"second",
|
|
32
|
-
1
|
|
33
|
-
];
|
|
34
|
-
return new Intl.RelativeTimeFormat(r, { numeric: "auto" }).format(
|
|
35
|
-
-Math.floor(n / l),
|
|
36
|
-
a
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
function V(e) {
|
|
40
|
-
const [i, r] = S(Date.now);
|
|
41
|
-
return M(() => {
|
|
42
|
-
if (!e) return;
|
|
43
|
-
r(Date.now());
|
|
44
|
-
const n = setInterval(() => r(Date.now()), 1e3);
|
|
45
|
-
return () => clearInterval(n);
|
|
46
|
-
}, [e]), i;
|
|
47
|
-
}
|
|
48
|
-
const ft = C(
|
|
49
|
-
function({
|
|
50
|
-
quality: i,
|
|
51
|
-
lastMessageAt: r,
|
|
52
|
-
lastInvalidMessage: n
|
|
53
|
-
}) {
|
|
54
|
-
const { t: a, i18n: l } = h(), c = i === "critical", s = V(c);
|
|
55
|
-
if (!c) return null;
|
|
56
|
-
const p = (f) => j(f, s, l.language), t = n && n.receivedAt > r ? n : null;
|
|
57
|
-
return /* @__PURE__ */ o(
|
|
58
|
-
W,
|
|
59
|
-
{
|
|
60
|
-
placement: "bottom-end",
|
|
61
|
-
slotProps: {
|
|
62
|
-
popper: {
|
|
63
|
-
sx: {
|
|
64
|
-
[`& .${B.tooltip}`]: {
|
|
65
|
-
maxWidth: "340px",
|
|
66
|
-
padding: 0,
|
|
67
|
-
maxHeight: "80vh",
|
|
68
|
-
overflowY: "auto",
|
|
69
|
-
borderRadius: "10px",
|
|
70
|
-
border: 1,
|
|
71
|
-
borderColor: "divider"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
title: /* @__PURE__ */ d(T, { elevation: 8, sx: { padding: "14px" }, children: [
|
|
77
|
-
/* @__PURE__ */ o(u, { fontSize: "14px", children: a("ConnectionWarning.LastUpdate.lb", {
|
|
78
|
-
time: p(r)
|
|
79
|
-
}) }),
|
|
80
|
-
t && /* @__PURE__ */ d(u, { fontSize: "14px", marginTop: "1rem", children: [
|
|
81
|
-
a("ConnectionWarning.ErrorState.lb", {
|
|
82
|
-
time: p(t.receivedAt)
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ o(
|
|
85
|
-
"pre",
|
|
86
|
-
{
|
|
87
|
-
style: {
|
|
88
|
-
fontSize: "12px",
|
|
89
|
-
whiteSpace: "pre-wrap",
|
|
90
|
-
wordWrap: "break-word",
|
|
91
|
-
margin: "4px 0 0"
|
|
92
|
-
},
|
|
93
|
-
children: String(t.data)
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
] })
|
|
97
|
-
] }),
|
|
98
|
-
children: /* @__PURE__ */ o(
|
|
99
|
-
g,
|
|
100
|
-
{
|
|
101
|
-
component: "span",
|
|
102
|
-
role: "img",
|
|
103
|
-
"aria-label": a("ConnectionWarning.Interrupted.ti"),
|
|
104
|
-
sx: {
|
|
105
|
-
display: "inline-flex",
|
|
106
|
-
cursor: "pointer",
|
|
107
|
-
color: "error.main"
|
|
108
|
-
},
|
|
109
|
-
children: /* @__PURE__ */ o(k, { size: 20 })
|
|
110
|
-
}
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
function xt(e) {
|
|
117
|
-
const { connectionQuality: i, lastValidStateMessage: r, lastInvalidStateMessage: n } = e.state;
|
|
118
|
-
return {
|
|
119
|
-
quality: i,
|
|
120
|
-
lastMessageAt: r.receivedAt,
|
|
121
|
-
lastInvalidMessage: n
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
function Y({
|
|
125
|
-
state: e,
|
|
126
|
-
disabled: i = !1,
|
|
127
|
-
onToggle: r
|
|
128
|
-
}) {
|
|
129
|
-
const { t: n } = h(), a = y(), l = e === "activating" || e === "deactivating", c = {
|
|
130
|
-
inactive: n("SafetyBar.ActivationToggle.Activate.bt"),
|
|
131
|
-
activating: n("SafetyBar.ActivationToggle.Activating.bt"),
|
|
132
|
-
active: n("SafetyBar.ActivationToggle.Activated.bt"),
|
|
133
|
-
deactivating: n("SafetyBar.ActivationToggle.Deactivating.bt")
|
|
134
|
-
}[e];
|
|
135
|
-
return /* @__PURE__ */ d(
|
|
136
|
-
m,
|
|
137
|
-
{
|
|
138
|
-
direction: "row",
|
|
139
|
-
"data-testid": "robot-activation",
|
|
140
|
-
sx: { gap: "4px", alignItems: "center" },
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ o(
|
|
143
|
-
H,
|
|
144
|
-
{
|
|
145
|
-
size: "small",
|
|
146
|
-
checked: e === "active" || e === "deactivating",
|
|
147
|
-
disabled: l || i,
|
|
148
|
-
onChange: () => r(),
|
|
149
|
-
slotProps: { input: { role: "switch", "aria-labelledby": a } }
|
|
150
|
-
}
|
|
151
|
-
),
|
|
152
|
-
/* @__PURE__ */ o(
|
|
153
|
-
u,
|
|
154
|
-
{
|
|
155
|
-
id: a,
|
|
156
|
-
variant: "body2",
|
|
157
|
-
color: "text.secondary",
|
|
158
|
-
noWrap: !0,
|
|
159
|
-
sx: { letterSpacing: "0.17px" },
|
|
160
|
-
children: c
|
|
161
|
-
}
|
|
162
|
-
),
|
|
163
|
-
l && /* @__PURE__ */ o(E, { size: 16 })
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
const w = {
|
|
169
|
-
minWidth: 0,
|
|
170
|
-
padding: "4px 10px",
|
|
171
|
-
color: "text.primary",
|
|
172
|
-
"& svg": { width: "16px", height: "16px" }
|
|
173
|
-
};
|
|
174
|
-
function _({
|
|
175
|
-
appIcon: e,
|
|
176
|
-
appName: i,
|
|
177
|
-
apps: r,
|
|
178
|
-
onAppSelect: n,
|
|
179
|
-
onSearch: a
|
|
180
|
-
}) {
|
|
181
|
-
const { t: l } = h(), [c, s] = S(null);
|
|
182
|
-
function p(t) {
|
|
183
|
-
s(null), t.onClick ? t.onClick() : t.href && (window.location.href = t.href), n == null || n(t);
|
|
184
|
-
}
|
|
185
|
-
return /* @__PURE__ */ d(m, { direction: "row", sx: { gap: "8px", alignItems: "center" }, children: [
|
|
186
|
-
/* @__PURE__ */ d(
|
|
187
|
-
D,
|
|
188
|
-
{
|
|
189
|
-
variant: "outlined",
|
|
190
|
-
color: "secondary",
|
|
191
|
-
sx: (t) => ({
|
|
192
|
-
borderRadius: "10px",
|
|
193
|
-
boxShadow: t.shadows[2],
|
|
194
|
-
"& .MuiButtonGroup-grouped": { borderColor: t.palette.divider }
|
|
195
|
-
}),
|
|
196
|
-
children: [
|
|
197
|
-
/* @__PURE__ */ o(
|
|
198
|
-
v,
|
|
199
|
-
{
|
|
200
|
-
"aria-label": l("RobotHeader.Apps.bt"),
|
|
201
|
-
"aria-haspopup": "menu",
|
|
202
|
-
"aria-expanded": c !== null,
|
|
203
|
-
disabled: r.length === 0,
|
|
204
|
-
onClick: (t) => s(t.currentTarget),
|
|
205
|
-
sx: w,
|
|
206
|
-
children: /* @__PURE__ */ o(P, {})
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
a && /* @__PURE__ */ o(
|
|
210
|
-
v,
|
|
211
|
-
{
|
|
212
|
-
"aria-label": l("RobotHeader.Search.bt"),
|
|
213
|
-
onClick: a,
|
|
214
|
-
sx: w,
|
|
215
|
-
children: /* @__PURE__ */ o(U, {})
|
|
216
|
-
}
|
|
217
|
-
)
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
),
|
|
221
|
-
/* @__PURE__ */ d(m, { direction: "row", sx: { gap: "4px", alignItems: "center" }, children: [
|
|
222
|
-
e && /* @__PURE__ */ o(
|
|
223
|
-
g,
|
|
224
|
-
{
|
|
225
|
-
sx: {
|
|
226
|
-
display: "flex",
|
|
227
|
-
"& svg": { width: "25px", height: "25px" }
|
|
228
|
-
},
|
|
229
|
-
children: e
|
|
230
|
-
}
|
|
231
|
-
),
|
|
232
|
-
/* @__PURE__ */ o(
|
|
233
|
-
u,
|
|
234
|
-
{
|
|
235
|
-
component: "h1",
|
|
236
|
-
noWrap: !0,
|
|
237
|
-
sx: {
|
|
238
|
-
fontFamily: O,
|
|
239
|
-
fontWeight: 700,
|
|
240
|
-
fontSize: "16px",
|
|
241
|
-
letterSpacing: "0.24px"
|
|
242
|
-
},
|
|
243
|
-
children: i
|
|
244
|
-
}
|
|
245
|
-
)
|
|
246
|
-
] }),
|
|
247
|
-
/* @__PURE__ */ o(
|
|
248
|
-
F,
|
|
249
|
-
{
|
|
250
|
-
anchorEl: c,
|
|
251
|
-
open: c !== null,
|
|
252
|
-
onClose: () => s(null),
|
|
253
|
-
sx: { "& .MuiPaper-root": { minWidth: 200, mt: 1 } },
|
|
254
|
-
children: r.map((t) => /* @__PURE__ */ d(N, { onClick: () => p(t), children: [
|
|
255
|
-
t.icon && /* @__PURE__ */ o(g, { sx: { display: "flex", alignItems: "center", mr: 2 }, children: t.icon }),
|
|
256
|
-
t.name
|
|
257
|
-
] }, t.id))
|
|
258
|
-
}
|
|
259
|
-
)
|
|
260
|
-
] });
|
|
261
|
-
}
|
|
262
|
-
const q = {
|
|
263
|
-
position: "absolute",
|
|
264
|
-
width: "1px",
|
|
265
|
-
height: "1px",
|
|
266
|
-
margin: "-1px",
|
|
267
|
-
padding: 0,
|
|
268
|
-
overflow: "hidden",
|
|
269
|
-
clip: "rect(0 0 0 0)",
|
|
270
|
-
whiteSpace: "nowrap",
|
|
271
|
-
border: 0
|
|
272
|
-
}, bt = C(
|
|
273
|
-
({
|
|
274
|
-
appIcon: e,
|
|
275
|
-
appName: i,
|
|
276
|
-
apps: r = [],
|
|
277
|
-
onAppSelect: n,
|
|
278
|
-
onSearch: a,
|
|
279
|
-
motionGroup: l,
|
|
280
|
-
safety: c,
|
|
281
|
-
activation: s,
|
|
282
|
-
actions: p,
|
|
283
|
-
sx: t
|
|
284
|
-
}) => {
|
|
285
|
-
const { t: f } = h(), x = y();
|
|
286
|
-
return /* @__PURE__ */ d(
|
|
287
|
-
m,
|
|
288
|
-
{
|
|
289
|
-
component: "header",
|
|
290
|
-
direction: "row",
|
|
291
|
-
"data-testid": "robot-header",
|
|
292
|
-
sx: [
|
|
293
|
-
(A) => {
|
|
294
|
-
var b;
|
|
295
|
-
return {
|
|
296
|
-
alignItems: "center",
|
|
297
|
-
justifyContent: "space-between",
|
|
298
|
-
gap: "24px",
|
|
299
|
-
padding: "8px 24px",
|
|
300
|
-
minHeight: "52px",
|
|
301
|
-
boxSizing: "border-box",
|
|
302
|
-
background: (b = A.palette.backgroundPaperElevation) == null ? void 0 : b[1]
|
|
303
|
-
};
|
|
304
|
-
},
|
|
305
|
-
...Array.isArray(t) ? t : [t]
|
|
306
|
-
],
|
|
307
|
-
children: [
|
|
308
|
-
/* @__PURE__ */ o(
|
|
309
|
-
_,
|
|
310
|
-
{
|
|
311
|
-
appIcon: e,
|
|
312
|
-
appName: i,
|
|
313
|
-
apps: r,
|
|
314
|
-
onAppSelect: n,
|
|
315
|
-
onSearch: a
|
|
316
|
-
}
|
|
317
|
-
),
|
|
318
|
-
/* @__PURE__ */ d(m, { direction: "row", sx: { gap: "20px", alignItems: "center" }, children: [
|
|
319
|
-
l && /* @__PURE__ */ d(I, { children: [
|
|
320
|
-
/* @__PURE__ */ o(
|
|
321
|
-
g,
|
|
322
|
-
{
|
|
323
|
-
component: "span",
|
|
324
|
-
id: x,
|
|
325
|
-
sx: q,
|
|
326
|
-
children: f("RobotHeader.MotionGroup.lb")
|
|
327
|
-
}
|
|
328
|
-
),
|
|
329
|
-
/* @__PURE__ */ o(
|
|
330
|
-
R,
|
|
331
|
-
{
|
|
332
|
-
labelId: x,
|
|
333
|
-
width: "240px",
|
|
334
|
-
...l
|
|
335
|
-
}
|
|
336
|
-
)
|
|
337
|
-
] }),
|
|
338
|
-
c && /* @__PURE__ */ o(z, { ...c }),
|
|
339
|
-
s && /* @__PURE__ */ o(Y, { ...s })
|
|
340
|
-
] }),
|
|
341
|
-
/* @__PURE__ */ o(m, { direction: "row", sx: { gap: "24px", alignItems: "center" }, children: p })
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
);
|
|
347
|
-
function vt(e) {
|
|
348
|
-
return {
|
|
349
|
-
state: e.activation.state,
|
|
350
|
-
disabled: !e.safety.canBeActive,
|
|
351
|
-
onToggle: () => {
|
|
352
|
-
e.activation.toggle().catch((i) => {
|
|
353
|
-
e.reportError({
|
|
354
|
-
kind: "mode",
|
|
355
|
-
message: i instanceof Error ? i.message : String(i),
|
|
356
|
-
url: i instanceof G ? i.url : void 0,
|
|
357
|
-
cause: i
|
|
358
|
-
});
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
export {
|
|
364
|
-
ft as C,
|
|
365
|
-
bt as R,
|
|
366
|
-
xt as c,
|
|
367
|
-
vt as r
|
|
368
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),m=require("@mui/material/Divider"),y=require("@mui/material/Stack"),f=require("mobx-react-lite"),w=require("./externalizeComponent-Br_U-QAr.cjs"),E=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"),M=require("./json-Bd6uGfgP.cjs");function _(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=_(c);function R(e,t){throw new Error(`${t} ${JSON.stringify(e)}`)}function O(e){var t,a,n,r;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((r=e.response)==null?void 0:r.data)}`:e instanceof Error?e.message:`Unexpected error: ${M.tryStringifyJson(e)||e}`}const j=({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"})),B=c.forwardRef(j),F=({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"})),Z=c.forwardRef(F),p=f.observer(({id:e,icon:t,color:a,title:n,name:r,label:s,explanation:i,literalValue:u,anchorOrigin:b,transformOrigin:x})=>{const S=f.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!S.anchorEl},openPopover(v){S.anchorEl=v.currentTarget},closePopover(){S.anchorEl=null}}));return o.jsxs(o.Fragment,{children:[o.jsxs(y,{"aria-owns":S.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:S.openPopover,onMouseLeave:S.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[o.jsx(g,{component:t,sx:{color:a}}),s&&o.jsx("div",{style:{color:a},children:s})]}),o.jsx(A,{id:e,sx:{pointerEvents:"none"},open:S.isPopoverOpen,anchorEl:S.anchorEl,anchorOrigin:b??{vertical:"bottom",horizontal:"left"},transformOrigin:x??{vertical:"top",horizontal:"left"},onClose:S.closePopover,disableRestoreFocus:!0,children:o.jsxs(y,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[o.jsxs("div",{children:[n&&o.jsx(h,{component:"span",fontSize:"14px",children:`${n}: `}),o.jsx(h,{component:"span",color:a,fontWeight:"bold",fontSize:"14px",children:r})]}),o.jsx(h,{fontSize:"14px",children:i}),u&&o.jsx(h,{fontSize:"12px",children:u})]})})]})}),C=f.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:n,compact:r})=>{const s=E.useTheme(),i=c.useId(),{t:u}=d.useTranslation();return e?o.jsx(p,{id:`motion-group-virtual-${i}`,icon:Z,color:s.palette.tertiary.main,name:u("SafetyBar.ControllerType.Virtual.lb"),label:r?null:u("SafetyBar.ControllerType.Virtual.lb"),explanation:o.jsxs(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",o.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}):o.jsx(p,{id:`motion-group-physical-${i}`,icon:B,color:s.palette.primary.main,name:u("SafetyBar.ControllerType.Physical.lb"),label:r?null:u("SafetyBar.ControllerType.Physical.lb"),explanation:o.jsx(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:o.jsx("code",{}),strong:o.jsx("strong",{})}}),anchorOrigin:a,transformOrigin:n})}),P=({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"})),$=c.forwardRef(P),N=({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})),V=c.forwardRef(N),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"})),q=c.forwardRef(Y),I=f.observer(({operationMode:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:r}=d.useTranslation(),s=E.useTheme(),i=c.useId();switch(e){case"OPERATION_MODE_AUTO":return o.jsx(p,{id:`operation-mode-auto-${i}`,icon:$,title:r("SafetyBar.OperationMode.ti"),name:r("SafetyBar.OperationMode.Automatic.ti"),label:n?null:r("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:o.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 o.jsx(p,{id:`operation-mode-manual-${i}`,icon:q,color:s.palette.warning.main,title:r("SafetyBar.OperationMode.ti"),name:r("SafetyBar.OperationMode.Manual.lb"),label:n?null:r("SafetyBar.OperationMode.Manual.lb"),explanation:o.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 o.jsx(p,{id:`operation-mode-error-${i}`,icon:V,color:s.palette.warning.main,title:r("SafetyBar.OperationMode.ti"),name:r("SafetyBar.OperationMode.Error.lb"),label:n?null:r("SafetyBar.OperationMode.Error.lb"),explanation:o.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"})),K=c.forwardRef(L),D=({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"})),H=c.forwardRef(D),U=({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})),z=c.forwardRef(U),k=({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"})),W=c.forwardRef(k),G=({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"})),J=c.forwardRef(G),Q=f.observer(({safetyState:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:r}=d.useTranslation(),s=E.useTheme(),i=c.useId();switch(e){case"SAFETY_STATE_NORMAL":return o.jsx(p,{id:`safety-state-normal-${i}`,title:r("SafetyBar.SafetyState.ti"),name:r("SafetyBar.SafetyState.Normal.lb"),label:n?null:r("SafetyBar.SafetyState.Normal.lb"),icon:W,color:s.palette.text.secondary,explanation:o.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 o.jsx(p,{id:`safety-state-estop-${i}`,title:r("SafetyBar.SafetyState.ti"),name:r("SafetyBar.SafetyState.Estop.lb"),label:n?null:r("SafetyBar.SafetyState.Estop.lb"),icon:H,color:s.palette.error.main,explanation:o.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 o.jsx(p,{id:`safety-state-stop-${i}`,icon:J,title:r("SafetyBar.SafetyState.ti"),name:r("SafetyBar.SafetyState.Stop.lb"),label:n?null:r("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:o.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 o.jsx(p,{id:`safety-state-manual-action-required-${i}`,icon:z,color:s.palette.warning.main,title:r("SafetyBar.SafetyState.ti"),name:r("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:r("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:o.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 o.jsx(p,{id:`safety-state-error-${i}`,icon:K,color:s.palette.error.main,title:r("SafetyBar.SafetyState.ti"),name:r("SafetyBar.SafetyState.Error.lb"),label:n?null:r("SafetyBar.SafetyState.Error.lb"),explanation:o.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:R(e,`Unknown safety state ${e}`)}}),X=w.externalizeComponent(f.observer(({isVirtual:e,motionGroupId:t,operationMode:a,safetyState:n,anchorOrigin:r,transformOrigin:s,compact:i=!0})=>{const u=i?1:2;return o.jsxs(y,{direction:"row",gap:u,alignItems:"center",sx:{height:"24px"},children:[o.jsx(Q,{safetyState:n,anchorOrigin:r,transformOrigin:s,compact:i}),o.jsx(m,{orientation:"vertical",flexItem:!0}),o.jsx(I,{operationMode:a,anchorOrigin:r,transformOrigin:s,compact:i}),o.jsx(m,{orientation:"vertical",flexItem:!0}),o.jsx(C,{isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:s,compact:i})]})}));function ee(e){const{controllerState:t}=e.state;return{isVirtual:e.description.isVirtual,motionGroupId:e.motionGroupId,operationMode:t.operation_mode,safetyState:t.safety_state}}exports.SafetyBar=X;exports.makeErrorMessage=O;exports.robotSafetyOf=ee;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const V=require("mobx"),u=require("react");class I{constructor(t=[],e={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...e},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let e=!1,n=!0;this.updateCount++;const o=Math.min(t,1/15),c=this.updateCount===1?.7:1;for(let i=0;i<this.currentValues.length;i++){const l=this.currentValues[i],p=this.targetValues[i],d=this.velocities[i],s=p-l,a=s*this.options.tension*c,m=d*this.options.friction,h=a-m,g=d+h*o,f=l+g*o;Math.abs(s)<this.options.threshold&&Math.abs(g)<this.options.threshold*10?this.currentValues[i]!==p&&(this.currentValues[i]=p,this.velocities[i]=0,e=!0):(n=!1,this.currentValues[i]=f,this.velocities[i]=g,e=!0)}return e&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const e=performance.now(),n=e-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=e,this.updateCount=0;const o=this.previousTargetValues.every((c,i)=>c===this.currentValues[i]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!o){const c=Math.min(n/8,1);for(let i=0;i<this.targetValues.length;i++){const l=this.previousTargetValues[i]||0,p=t[i]||0;Math.abs(p-l)>.1&&(this.targetValues[i]=l+(p-l)*c)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function v(r=[],t={}){const e=u.useRef(null);return e.current||(e.current=new I(r,t)),u.useEffect(()=>{var n;(n=e.current)==null||n.updateOptions(t)},[t]),u.useEffect(()=>()=>{var n;(n=e.current)==null||n.destroy()},[]),[e.current]}function C(r){u.useEffect(r,[])}function A(r){C(()=>V.autorun(r))}function T(r){return C(()=>{let t;function e(){r(),t=requestAnimationFrame(e)}return t=requestAnimationFrame(e),()=>{cancelAnimationFrame(t)}})}function F(r,t){const[e]=u.useState(()=>V.observable({...r})),n=u.useRef(null),o=u.useRef(null),c=u.useRef(0);function i(){o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}function l(){const s=n.current;if(!s)return;const a=performance.now(),m=(a-c.current)/1e3;c.current=a;const h=s.update(m);V.runInAction(()=>{e.joint_position=s.getCurrentValues()}),o.current=h?null:requestAnimationFrame(l)}function p(){o.current===null&&(c.current=performance.now(),o.current=requestAnimationFrame(l))}function d(s){var m;const a=s.joint_position.filter(h=>h!==void 0);(m=n.current)==null||m.setTarget(a),V.runInAction(()=>{const h=s,g=e;for(const f of Object.keys(h))f!=="joint_position"&&g[f]!==h[f]&&(g[f]=h[f])}),p()}return C(()=>{const s=r.joint_position.filter(a=>a!==void 0);return n.current=new I(s,t),()=>{var a;i(),(a=n.current)==null||a.destroy()}}),u.useEffect(()=>{var s;t&&((s=n.current)==null||s.updateOptions(t))},[t]),u.useEffect(()=>V.autorun(()=>d(r)),[r]),e}exports.ValueInterpolator=I;exports.useAnimationFrame=T;exports.useAutorun=A;exports.useInterpolation=v;exports.useSmoothedMotionState=F;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { RobotSession } from "../../lib/robotSession/RobotSession";
|
|
2
|
-
import type { SafetyBarProps } from "../../SafetyBar/SafetyBar";
|
|
3
|
-
/**
|
|
4
|
-
* The robot's safety state, operation mode and controller type, as
|
|
5
|
-
* `RobotHeader`'s `safety` or `SafetyBar` take them:
|
|
6
|
-
*
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <SafetyBar {...robotSafetyOf(session)} />
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
export declare function robotSafetyOf(session: RobotSession): Pick<SafetyBarProps, "isVirtual" | "motionGroupId" | "operationMode" | "safetyState">;
|