@wandelbots/wandelbots-js-react-components 4.5.0 → 4.6.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/3d.cjs.js +1 -1
- package/dist/3d.es.js +1 -1
- package/dist/{MotionGroupVisualizer-Ce9kTMPy.js → MotionGroupVisualizer-BlWkdkaM.js} +458 -409
- package/dist/MotionGroupVisualizer-BlWkdkaM.js.map +1 -0
- package/dist/MotionGroupVisualizer-Bw-h3U_t.cjs +2 -0
- package/dist/MotionGroupVisualizer-Bw-h3U_t.cjs.map +1 -0
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts +3 -2
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
- package/dist/core.cjs.js +1 -1
- package/dist/core.es.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +3 -3
- package/dist/{interpolation-Chyc6Hfo.js → interpolation-BxZtUOAs.js} +273 -273
- package/dist/interpolation-BxZtUOAs.js.map +1 -0
- package/dist/{interpolation-CiEw5jkz.cjs → interpolation-D4zTPZou.cjs} +4 -4
- package/dist/interpolation-D4zTPZou.cjs.map +1 -0
- package/dist/{theming-CZbXnFej.js → theming-3PEA0ksG.js} +2 -2
- package/dist/{theming-CZbXnFej.js.map → theming-3PEA0ksG.js.map} +1 -1
- package/dist/{theming-b98f6nXs.cjs → theming-U3LOZpcT.cjs} +2 -2
- package/dist/{theming-b98f6nXs.cjs.map → theming-U3LOZpcT.cjs.map} +1 -1
- package/package.json +1 -1
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +83 -11
- package/dist/MotionGroupVisualizer-COKQraKa.cjs +0 -2
- package/dist/MotionGroupVisualizer-COKQraKa.cjs.map +0 -1
- package/dist/MotionGroupVisualizer-Ce9kTMPy.js.map +0 -1
- package/dist/interpolation-Chyc6Hfo.js.map +0 -1
- package/dist/interpolation-CiEw5jkz.cjs.map +0 -1
|
@@ -1,268 +1,11 @@
|
|
|
1
|
+
import m, { isAxiosError as ke, AxiosError as qe } from "axios";
|
|
1
2
|
import { e as we, j as $ } from "./externalizeComponent-Dc3fViZA.js";
|
|
2
|
-
import { useTheme as Ae, Box as ne, Button as
|
|
3
|
+
import { useTheme as Ae, Box as ne, Button as ge, Typography as Re, Chip as De } from "@mui/material";
|
|
3
4
|
import { observer as Ue } from "mobx-react-lite";
|
|
4
5
|
import { useTranslation as Te } from "react-i18next";
|
|
5
|
-
import { PlayArrow as be, Stop as ye, Pause as
|
|
6
|
-
import m, { isAxiosError as De, AxiosError as Qe } from "axios";
|
|
6
|
+
import { PlayArrow as be, Stop as ye, Pause as Qe } from "@mui/icons-material";
|
|
7
7
|
import { reaction as He, autorun as Ne } from "mobx";
|
|
8
8
|
import ce, { useEffect as Ke } from "react";
|
|
9
|
-
var K = /* @__PURE__ */ ((e) => (e.IDLE = "idle", e.PREPARING = "preparing", e.STARTING = "starting", e.RUNNING = "running", e.PAUSING = "pausing", e.PAUSED = "paused", e.STOPPING = "stopping", e.COMPLETED = "completed", e.FAILED = "failed", e.STOPPED = "stopped", e.ERROR = "error", e))(K || {});
|
|
10
|
-
const Vr = we(
|
|
11
|
-
Ue(
|
|
12
|
-
({
|
|
13
|
-
state: e,
|
|
14
|
-
onRun: r,
|
|
15
|
-
onPause: t,
|
|
16
|
-
onStop: s,
|
|
17
|
-
onReset: a,
|
|
18
|
-
requiresManualReset: n = !1,
|
|
19
|
-
variant: l = "with_pause",
|
|
20
|
-
className: o
|
|
21
|
-
}) => {
|
|
22
|
-
const c = Ae(), { t: i } = Te(), p = () => {
|
|
23
|
-
const I = {
|
|
24
|
-
run: {
|
|
25
|
-
enabled: e === "idle" || e === "stopped" || e === "paused" || e === "completed" || e === "failed" || e === "error",
|
|
26
|
-
label: i(e === "paused" ? "ProgramControl.Resume.bt" : e === "error" || e === "failed" ? "ProgramControl.Retry.bt" : "ProgramControl.Start.bt"),
|
|
27
|
-
color: c.palette.success.main,
|
|
28
|
-
onClick: r
|
|
29
|
-
},
|
|
30
|
-
pause: {
|
|
31
|
-
enabled: e === "running",
|
|
32
|
-
label: i("ProgramControl.Pause.bt"),
|
|
33
|
-
color: "#FFFFFF33",
|
|
34
|
-
onClick: t || (() => {
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
|
-
stop: {
|
|
38
|
-
enabled: e === "preparing" || e === "starting" || e === "running" || e === "pausing" || e === "paused",
|
|
39
|
-
label: i("ProgramControl.Stop.bt"),
|
|
40
|
-
color: c.palette.error.main,
|
|
41
|
-
onClick: s
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return l === "without_pause" ? [I.run, I.stop] : [I.run, I.pause, I.stop];
|
|
45
|
-
}, d = (I) => {
|
|
46
|
-
const j = { sx: { fontSize: "55px" } };
|
|
47
|
-
if (l === "without_pause")
|
|
48
|
-
return I === 0 ? /* @__PURE__ */ $.jsx(be, { ...j }) : /* @__PURE__ */ $.jsx(ye, { ...j });
|
|
49
|
-
switch (I) {
|
|
50
|
-
case 0:
|
|
51
|
-
return /* @__PURE__ */ $.jsx(be, { ...j });
|
|
52
|
-
case 1:
|
|
53
|
-
return /* @__PURE__ */ $.jsx(ge, { ...j });
|
|
54
|
-
case 2:
|
|
55
|
-
return /* @__PURE__ */ $.jsx(ye, { ...j });
|
|
56
|
-
default:
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
}, u = p();
|
|
60
|
-
return /* @__PURE__ */ $.jsx(
|
|
61
|
-
ne,
|
|
62
|
-
{
|
|
63
|
-
className: o,
|
|
64
|
-
sx: {
|
|
65
|
-
display: "flex",
|
|
66
|
-
flexDirection: "column",
|
|
67
|
-
alignItems: "center",
|
|
68
|
-
gap: 2
|
|
69
|
-
},
|
|
70
|
-
children: /* @__PURE__ */ $.jsx(
|
|
71
|
-
ne,
|
|
72
|
-
{
|
|
73
|
-
sx: {
|
|
74
|
-
display: "flex",
|
|
75
|
-
gap: "40px",
|
|
76
|
-
flexWrap: "wrap",
|
|
77
|
-
justifyContent: "center",
|
|
78
|
-
alignItems: "center"
|
|
79
|
-
},
|
|
80
|
-
children: u.map((I, j) => /* @__PURE__ */ $.jsxs(
|
|
81
|
-
ne,
|
|
82
|
-
{
|
|
83
|
-
sx: {
|
|
84
|
-
display: "flex",
|
|
85
|
-
flexDirection: "column",
|
|
86
|
-
alignItems: "center",
|
|
87
|
-
gap: 1
|
|
88
|
-
},
|
|
89
|
-
children: [
|
|
90
|
-
/* @__PURE__ */ $.jsx(
|
|
91
|
-
ke,
|
|
92
|
-
{
|
|
93
|
-
variant: "contained",
|
|
94
|
-
disabled: !I.enabled || e === "preparing" || e === "starting" || e === "pausing" || e === "stopping" && !n,
|
|
95
|
-
onClick: I.onClick,
|
|
96
|
-
sx: {
|
|
97
|
-
width: "88px",
|
|
98
|
-
height: "88px",
|
|
99
|
-
borderRadius: "88px",
|
|
100
|
-
backgroundColor: I.color,
|
|
101
|
-
opacity: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? 1 : 0.3,
|
|
102
|
-
"&:hover": {
|
|
103
|
-
backgroundColor: I.color,
|
|
104
|
-
opacity: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? 0.8 : 0.3
|
|
105
|
-
},
|
|
106
|
-
"&:disabled": {
|
|
107
|
-
backgroundColor: I.color,
|
|
108
|
-
opacity: 0.3
|
|
109
|
-
},
|
|
110
|
-
minWidth: "88px",
|
|
111
|
-
flexShrink: 0
|
|
112
|
-
},
|
|
113
|
-
children: d(j)
|
|
114
|
-
}
|
|
115
|
-
),
|
|
116
|
-
/* @__PURE__ */ $.jsx(
|
|
117
|
-
Re,
|
|
118
|
-
{
|
|
119
|
-
variant: "body1",
|
|
120
|
-
sx: {
|
|
121
|
-
color: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? I.color : c.palette.text.disabled,
|
|
122
|
-
textAlign: "center",
|
|
123
|
-
opacity: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? 1 : 0.3
|
|
124
|
-
},
|
|
125
|
-
children: I.label
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
]
|
|
129
|
-
},
|
|
130
|
-
I.label
|
|
131
|
-
))
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
), Cr = we(
|
|
139
|
-
Ue(
|
|
140
|
-
({
|
|
141
|
-
programState: e,
|
|
142
|
-
safetyState: r,
|
|
143
|
-
operationMode: t,
|
|
144
|
-
className: s
|
|
145
|
-
}) => {
|
|
146
|
-
const a = Ae(), { t: n } = Te(), l = () => {
|
|
147
|
-
if (r === "SAFETY_STATE_DEVICE_EMERGENCY_STOP" || r === "SAFETY_STATE_ROBOT_EMERGENCY_STOP" || r === "SAFETY_STATE_STOP_0" || r === "SAFETY_STATE_STOP_1" || r === "SAFETY_STATE_STOP_2" || r === "SAFETY_STATE_PROTECTIVE_STOP" || r === "SAFETY_STATE_STOP" || r === "SAFETY_STATE_REDUCED" || r === "SAFETY_STATE_MASTERING" || r === "SAFETY_STATE_CONFIRM_SAFETY" || r === "SAFETY_STATE_OPERATOR_SAFETY" || r === "SAFETY_STATE_RECOVERY" || r === "SAFETY_STATE_VIOLATION")
|
|
148
|
-
return {
|
|
149
|
-
label: n("ProgramStateIndicator.EStop.lb"),
|
|
150
|
-
color: a.palette.error.main
|
|
151
|
-
};
|
|
152
|
-
if (r === "SAFETY_STATE_UNKNOWN" || r === "SAFETY_STATE_FAULT")
|
|
153
|
-
return {
|
|
154
|
-
label: n("ProgramStateIndicator.Error.lb"),
|
|
155
|
-
color: a.palette.error.main
|
|
156
|
-
};
|
|
157
|
-
if (r === "SAFETY_STATE_NORMAL")
|
|
158
|
-
switch (e) {
|
|
159
|
-
case K.PREPARING:
|
|
160
|
-
return {
|
|
161
|
-
label: n("ProgramStateIndicator.Preparing.lb"),
|
|
162
|
-
color: a.palette.warning.main
|
|
163
|
-
};
|
|
164
|
-
case K.STARTING:
|
|
165
|
-
return {
|
|
166
|
-
label: n("ProgramStateIndicator.Starting.lb"),
|
|
167
|
-
color: a.palette.warning.main
|
|
168
|
-
};
|
|
169
|
-
case K.RUNNING:
|
|
170
|
-
return {
|
|
171
|
-
label: n("ProgramStateIndicator.Running.lb"),
|
|
172
|
-
color: a.palette.success.main
|
|
173
|
-
};
|
|
174
|
-
case K.PAUSING:
|
|
175
|
-
return {
|
|
176
|
-
label: n("ProgramStateIndicator.Pausing.lb"),
|
|
177
|
-
color: a.palette.warning.main
|
|
178
|
-
};
|
|
179
|
-
case K.PAUSED:
|
|
180
|
-
return {
|
|
181
|
-
label: n("ProgramStateIndicator.Paused.lb"),
|
|
182
|
-
color: a.palette.grey[600]
|
|
183
|
-
};
|
|
184
|
-
case K.STOPPING:
|
|
185
|
-
return {
|
|
186
|
-
label: n("ProgramStateIndicator.Stopping.lb"),
|
|
187
|
-
color: a.palette.warning.main
|
|
188
|
-
};
|
|
189
|
-
case K.COMPLETED:
|
|
190
|
-
return {
|
|
191
|
-
label: n("ProgramStateIndicator.Completed.lb"),
|
|
192
|
-
color: a.palette.success.main
|
|
193
|
-
};
|
|
194
|
-
case K.FAILED:
|
|
195
|
-
return {
|
|
196
|
-
label: n("ProgramStateIndicator.Failed.lb"),
|
|
197
|
-
color: a.palette.error.main
|
|
198
|
-
};
|
|
199
|
-
case K.STOPPED:
|
|
200
|
-
return {
|
|
201
|
-
label: n("ProgramStateIndicator.Stopped.lb"),
|
|
202
|
-
color: a.palette.warning.main
|
|
203
|
-
};
|
|
204
|
-
case K.ERROR:
|
|
205
|
-
return {
|
|
206
|
-
label: n("ProgramStateIndicator.Error.lb"),
|
|
207
|
-
color: a.palette.error.main
|
|
208
|
-
};
|
|
209
|
-
case K.IDLE:
|
|
210
|
-
default:
|
|
211
|
-
return {
|
|
212
|
-
label: n("ProgramStateIndicator.Ready.lb"),
|
|
213
|
-
color: a.palette.success.main
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
return {
|
|
217
|
-
label: n("ProgramStateIndicator.Idle.lb"),
|
|
218
|
-
color: a.palette.grey[600]
|
|
219
|
-
};
|
|
220
|
-
}, { label: o, color: c } = l(), p = `${o} / ${(() => {
|
|
221
|
-
switch (t) {
|
|
222
|
-
case "OPERATION_MODE_AUTO":
|
|
223
|
-
return n("ProgramStateIndicator.Auto.lb");
|
|
224
|
-
case "OPERATION_MODE_MANUAL":
|
|
225
|
-
return n("ProgramStateIndicator.Manual.lb");
|
|
226
|
-
case "OPERATION_MODE_MANUAL_T1":
|
|
227
|
-
return n("ProgramStateIndicator.ManualT1.lb");
|
|
228
|
-
case "OPERATION_MODE_MANUAL_T2":
|
|
229
|
-
return n("ProgramStateIndicator.ManualT2.lb");
|
|
230
|
-
default:
|
|
231
|
-
return n("ProgramStateIndicator.Auto.lb");
|
|
232
|
-
}
|
|
233
|
-
})()}`;
|
|
234
|
-
return /* @__PURE__ */ $.jsx(
|
|
235
|
-
qe,
|
|
236
|
-
{
|
|
237
|
-
className: s,
|
|
238
|
-
label: /* @__PURE__ */ $.jsx(
|
|
239
|
-
Re,
|
|
240
|
-
{
|
|
241
|
-
variant: "body2",
|
|
242
|
-
sx: {
|
|
243
|
-
fontSize: "0.75rem",
|
|
244
|
-
// Smaller than body2
|
|
245
|
-
lineHeight: 1.2
|
|
246
|
-
},
|
|
247
|
-
children: p
|
|
248
|
-
}
|
|
249
|
-
),
|
|
250
|
-
variant: "filled",
|
|
251
|
-
sx: {
|
|
252
|
-
backgroundColor: c,
|
|
253
|
-
color: a.palette.getContrastText(c),
|
|
254
|
-
fontWeight: 500,
|
|
255
|
-
height: "auto",
|
|
256
|
-
"& .MuiChip-label": {
|
|
257
|
-
paddingX: 1.5,
|
|
258
|
-
paddingY: 0.5
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
)
|
|
265
|
-
);
|
|
266
9
|
/*! *****************************************************************************
|
|
267
10
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
268
11
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -1139,10 +882,10 @@ const b = function(e, ...r) {
|
|
|
1139
882
|
};
|
|
1140
883
|
return a.request(l);
|
|
1141
884
|
};
|
|
1142
|
-
},
|
|
885
|
+
}, Vr = {
|
|
1143
886
|
RevoluteJoint: "REVOLUTE_JOINT",
|
|
1144
887
|
PrismaticJoint: "PRISMATIC_JOINT"
|
|
1145
|
-
},
|
|
888
|
+
}, Cr = {
|
|
1146
889
|
Abb: "abb",
|
|
1147
890
|
Fanuc: "fanuc",
|
|
1148
891
|
Kuka: "kuka",
|
|
@@ -6862,7 +6605,7 @@ var lr = class {
|
|
|
6862
6605
|
};
|
|
6863
6606
|
}
|
|
6864
6607
|
}
|
|
6865
|
-
throw new
|
|
6608
|
+
throw new qe(`No mock handler matched this request: ${t} ${s}`, "404", e);
|
|
6866
6609
|
}
|
|
6867
6610
|
handleWebsocketConnection(e) {
|
|
6868
6611
|
this.connections.push(e), setTimeout(() => {
|
|
@@ -6923,7 +6666,7 @@ const or = { result: {
|
|
|
6923
6666
|
]
|
|
6924
6667
|
}
|
|
6925
6668
|
} };
|
|
6926
|
-
var
|
|
6669
|
+
var Sr = class {
|
|
6927
6670
|
constructor(e) {
|
|
6928
6671
|
this.authPromise = null, this.accessToken = null;
|
|
6929
6672
|
const r = e.cellId ?? "cell";
|
|
@@ -6937,7 +6680,7 @@ var yr = class {
|
|
|
6937
6680
|
});
|
|
6938
6681
|
t.interceptors.request.use(async (s) => (s.headers.Authorization || (this.accessToken ? s.headers.Authorization = `Bearer ${this.accessToken}` : this.config.username && this.config.password && (s.headers.Authorization = `Basic ${btoa(`${e.username}:${e.password}`)}`)), s)), typeof window < "u" && t.interceptors.response.use((s) => s, async (s) => {
|
|
6939
6682
|
var a, n;
|
|
6940
|
-
if (
|
|
6683
|
+
if (ke(s))
|
|
6941
6684
|
if (((a = s.response) == null ? void 0 : a.status) === 401) try {
|
|
6942
6685
|
if (await this.renewAuthentication(), s.config)
|
|
6943
6686
|
return this.accessToken ? s.config.headers.Authorization = `Bearer ${this.accessToken}` : delete s.config.headers.Authorization, t.request(s.config);
|
|
@@ -6984,7 +6727,7 @@ var yr = class {
|
|
|
6984
6727
|
return new et(this.makeWebsocketURL(e), { mock: this.mock });
|
|
6985
6728
|
}
|
|
6986
6729
|
};
|
|
6987
|
-
function
|
|
6730
|
+
function br(e) {
|
|
6988
6731
|
var n, l, o, c, i, p;
|
|
6989
6732
|
const r = [
|
|
6990
6733
|
((n = e.position) == null ? void 0 : n[0]) ?? 0,
|
|
@@ -6997,6 +6740,263 @@ function Pr(e) {
|
|
|
6997
6740
|
], s = r.map((d) => d.toFixed(1)), a = t.map((d) => d.toFixed(4));
|
|
6998
6741
|
return `(${s.concat(a).join(", ")})`;
|
|
6999
6742
|
}
|
|
6743
|
+
var K = /* @__PURE__ */ ((e) => (e.IDLE = "idle", e.PREPARING = "preparing", e.STARTING = "starting", e.RUNNING = "running", e.PAUSING = "pausing", e.PAUSED = "paused", e.STOPPING = "stopping", e.COMPLETED = "completed", e.FAILED = "failed", e.STOPPED = "stopped", e.ERROR = "error", e))(K || {});
|
|
6744
|
+
const yr = we(
|
|
6745
|
+
Ue(
|
|
6746
|
+
({
|
|
6747
|
+
state: e,
|
|
6748
|
+
onRun: r,
|
|
6749
|
+
onPause: t,
|
|
6750
|
+
onStop: s,
|
|
6751
|
+
onReset: a,
|
|
6752
|
+
requiresManualReset: n = !1,
|
|
6753
|
+
variant: l = "with_pause",
|
|
6754
|
+
className: o
|
|
6755
|
+
}) => {
|
|
6756
|
+
const c = Ae(), { t: i } = Te(), p = () => {
|
|
6757
|
+
const I = {
|
|
6758
|
+
run: {
|
|
6759
|
+
enabled: e === "idle" || e === "stopped" || e === "paused" || e === "completed" || e === "failed" || e === "error",
|
|
6760
|
+
label: i(e === "paused" ? "ProgramControl.Resume.bt" : e === "error" || e === "failed" ? "ProgramControl.Retry.bt" : "ProgramControl.Start.bt"),
|
|
6761
|
+
color: c.palette.success.main,
|
|
6762
|
+
onClick: r
|
|
6763
|
+
},
|
|
6764
|
+
pause: {
|
|
6765
|
+
enabled: e === "running",
|
|
6766
|
+
label: i("ProgramControl.Pause.bt"),
|
|
6767
|
+
color: "#FFFFFF33",
|
|
6768
|
+
onClick: t || (() => {
|
|
6769
|
+
})
|
|
6770
|
+
},
|
|
6771
|
+
stop: {
|
|
6772
|
+
enabled: e === "preparing" || e === "starting" || e === "running" || e === "pausing" || e === "paused",
|
|
6773
|
+
label: i("ProgramControl.Stop.bt"),
|
|
6774
|
+
color: c.palette.error.main,
|
|
6775
|
+
onClick: s
|
|
6776
|
+
}
|
|
6777
|
+
};
|
|
6778
|
+
return l === "without_pause" ? [I.run, I.stop] : [I.run, I.pause, I.stop];
|
|
6779
|
+
}, d = (I) => {
|
|
6780
|
+
const j = { sx: { fontSize: "55px" } };
|
|
6781
|
+
if (l === "without_pause")
|
|
6782
|
+
return I === 0 ? /* @__PURE__ */ $.jsx(be, { ...j }) : /* @__PURE__ */ $.jsx(ye, { ...j });
|
|
6783
|
+
switch (I) {
|
|
6784
|
+
case 0:
|
|
6785
|
+
return /* @__PURE__ */ $.jsx(be, { ...j });
|
|
6786
|
+
case 1:
|
|
6787
|
+
return /* @__PURE__ */ $.jsx(Qe, { ...j });
|
|
6788
|
+
case 2:
|
|
6789
|
+
return /* @__PURE__ */ $.jsx(ye, { ...j });
|
|
6790
|
+
default:
|
|
6791
|
+
return null;
|
|
6792
|
+
}
|
|
6793
|
+
}, u = p();
|
|
6794
|
+
return /* @__PURE__ */ $.jsx(
|
|
6795
|
+
ne,
|
|
6796
|
+
{
|
|
6797
|
+
className: o,
|
|
6798
|
+
sx: {
|
|
6799
|
+
display: "flex",
|
|
6800
|
+
flexDirection: "column",
|
|
6801
|
+
alignItems: "center",
|
|
6802
|
+
gap: 2
|
|
6803
|
+
},
|
|
6804
|
+
children: /* @__PURE__ */ $.jsx(
|
|
6805
|
+
ne,
|
|
6806
|
+
{
|
|
6807
|
+
sx: {
|
|
6808
|
+
display: "flex",
|
|
6809
|
+
gap: "40px",
|
|
6810
|
+
flexWrap: "wrap",
|
|
6811
|
+
justifyContent: "center",
|
|
6812
|
+
alignItems: "center"
|
|
6813
|
+
},
|
|
6814
|
+
children: u.map((I, j) => /* @__PURE__ */ $.jsxs(
|
|
6815
|
+
ne,
|
|
6816
|
+
{
|
|
6817
|
+
sx: {
|
|
6818
|
+
display: "flex",
|
|
6819
|
+
flexDirection: "column",
|
|
6820
|
+
alignItems: "center",
|
|
6821
|
+
gap: 1
|
|
6822
|
+
},
|
|
6823
|
+
children: [
|
|
6824
|
+
/* @__PURE__ */ $.jsx(
|
|
6825
|
+
ge,
|
|
6826
|
+
{
|
|
6827
|
+
variant: "contained",
|
|
6828
|
+
disabled: !I.enabled || e === "preparing" || e === "starting" || e === "pausing" || e === "stopping" && !n,
|
|
6829
|
+
onClick: I.onClick,
|
|
6830
|
+
sx: {
|
|
6831
|
+
width: "88px",
|
|
6832
|
+
height: "88px",
|
|
6833
|
+
borderRadius: "88px",
|
|
6834
|
+
backgroundColor: I.color,
|
|
6835
|
+
opacity: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? 1 : 0.3,
|
|
6836
|
+
"&:hover": {
|
|
6837
|
+
backgroundColor: I.color,
|
|
6838
|
+
opacity: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? 0.8 : 0.3
|
|
6839
|
+
},
|
|
6840
|
+
"&:disabled": {
|
|
6841
|
+
backgroundColor: I.color,
|
|
6842
|
+
opacity: 0.3
|
|
6843
|
+
},
|
|
6844
|
+
minWidth: "88px",
|
|
6845
|
+
flexShrink: 0
|
|
6846
|
+
},
|
|
6847
|
+
children: d(j)
|
|
6848
|
+
}
|
|
6849
|
+
),
|
|
6850
|
+
/* @__PURE__ */ $.jsx(
|
|
6851
|
+
Re,
|
|
6852
|
+
{
|
|
6853
|
+
variant: "body1",
|
|
6854
|
+
sx: {
|
|
6855
|
+
color: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? I.color : c.palette.text.disabled,
|
|
6856
|
+
textAlign: "center",
|
|
6857
|
+
opacity: I.enabled && e !== "preparing" && e !== "starting" && e !== "pausing" && !(e === "stopping" && !n) ? 1 : 0.3
|
|
6858
|
+
},
|
|
6859
|
+
children: I.label
|
|
6860
|
+
}
|
|
6861
|
+
)
|
|
6862
|
+
]
|
|
6863
|
+
},
|
|
6864
|
+
I.label
|
|
6865
|
+
))
|
|
6866
|
+
}
|
|
6867
|
+
)
|
|
6868
|
+
}
|
|
6869
|
+
);
|
|
6870
|
+
}
|
|
6871
|
+
)
|
|
6872
|
+
), Pr = we(
|
|
6873
|
+
Ue(
|
|
6874
|
+
({
|
|
6875
|
+
programState: e,
|
|
6876
|
+
safetyState: r,
|
|
6877
|
+
operationMode: t,
|
|
6878
|
+
className: s
|
|
6879
|
+
}) => {
|
|
6880
|
+
const a = Ae(), { t: n } = Te(), l = () => {
|
|
6881
|
+
if (r === "SAFETY_STATE_DEVICE_EMERGENCY_STOP" || r === "SAFETY_STATE_ROBOT_EMERGENCY_STOP" || r === "SAFETY_STATE_STOP_0" || r === "SAFETY_STATE_STOP_1" || r === "SAFETY_STATE_STOP_2" || r === "SAFETY_STATE_PROTECTIVE_STOP" || r === "SAFETY_STATE_STOP" || r === "SAFETY_STATE_REDUCED" || r === "SAFETY_STATE_MASTERING" || r === "SAFETY_STATE_CONFIRM_SAFETY" || r === "SAFETY_STATE_OPERATOR_SAFETY" || r === "SAFETY_STATE_RECOVERY" || r === "SAFETY_STATE_VIOLATION")
|
|
6882
|
+
return {
|
|
6883
|
+
label: n("ProgramStateIndicator.EStop.lb"),
|
|
6884
|
+
color: a.palette.error.main
|
|
6885
|
+
};
|
|
6886
|
+
if (r === "SAFETY_STATE_UNKNOWN" || r === "SAFETY_STATE_FAULT")
|
|
6887
|
+
return {
|
|
6888
|
+
label: n("ProgramStateIndicator.Error.lb"),
|
|
6889
|
+
color: a.palette.error.main
|
|
6890
|
+
};
|
|
6891
|
+
if (r === "SAFETY_STATE_NORMAL")
|
|
6892
|
+
switch (e) {
|
|
6893
|
+
case K.PREPARING:
|
|
6894
|
+
return {
|
|
6895
|
+
label: n("ProgramStateIndicator.Preparing.lb"),
|
|
6896
|
+
color: a.palette.warning.main
|
|
6897
|
+
};
|
|
6898
|
+
case K.STARTING:
|
|
6899
|
+
return {
|
|
6900
|
+
label: n("ProgramStateIndicator.Starting.lb"),
|
|
6901
|
+
color: a.palette.warning.main
|
|
6902
|
+
};
|
|
6903
|
+
case K.RUNNING:
|
|
6904
|
+
return {
|
|
6905
|
+
label: n("ProgramStateIndicator.Running.lb"),
|
|
6906
|
+
color: a.palette.success.main
|
|
6907
|
+
};
|
|
6908
|
+
case K.PAUSING:
|
|
6909
|
+
return {
|
|
6910
|
+
label: n("ProgramStateIndicator.Pausing.lb"),
|
|
6911
|
+
color: a.palette.warning.main
|
|
6912
|
+
};
|
|
6913
|
+
case K.PAUSED:
|
|
6914
|
+
return {
|
|
6915
|
+
label: n("ProgramStateIndicator.Paused.lb"),
|
|
6916
|
+
color: a.palette.grey[600]
|
|
6917
|
+
};
|
|
6918
|
+
case K.STOPPING:
|
|
6919
|
+
return {
|
|
6920
|
+
label: n("ProgramStateIndicator.Stopping.lb"),
|
|
6921
|
+
color: a.palette.warning.main
|
|
6922
|
+
};
|
|
6923
|
+
case K.COMPLETED:
|
|
6924
|
+
return {
|
|
6925
|
+
label: n("ProgramStateIndicator.Completed.lb"),
|
|
6926
|
+
color: a.palette.success.main
|
|
6927
|
+
};
|
|
6928
|
+
case K.FAILED:
|
|
6929
|
+
return {
|
|
6930
|
+
label: n("ProgramStateIndicator.Failed.lb"),
|
|
6931
|
+
color: a.palette.error.main
|
|
6932
|
+
};
|
|
6933
|
+
case K.STOPPED:
|
|
6934
|
+
return {
|
|
6935
|
+
label: n("ProgramStateIndicator.Stopped.lb"),
|
|
6936
|
+
color: a.palette.warning.main
|
|
6937
|
+
};
|
|
6938
|
+
case K.ERROR:
|
|
6939
|
+
return {
|
|
6940
|
+
label: n("ProgramStateIndicator.Error.lb"),
|
|
6941
|
+
color: a.palette.error.main
|
|
6942
|
+
};
|
|
6943
|
+
case K.IDLE:
|
|
6944
|
+
default:
|
|
6945
|
+
return {
|
|
6946
|
+
label: n("ProgramStateIndicator.Ready.lb"),
|
|
6947
|
+
color: a.palette.success.main
|
|
6948
|
+
};
|
|
6949
|
+
}
|
|
6950
|
+
return {
|
|
6951
|
+
label: n("ProgramStateIndicator.Idle.lb"),
|
|
6952
|
+
color: a.palette.grey[600]
|
|
6953
|
+
};
|
|
6954
|
+
}, { label: o, color: c } = l(), p = `${o} / ${(() => {
|
|
6955
|
+
switch (t) {
|
|
6956
|
+
case "OPERATION_MODE_AUTO":
|
|
6957
|
+
return n("ProgramStateIndicator.Auto.lb");
|
|
6958
|
+
case "OPERATION_MODE_MANUAL":
|
|
6959
|
+
return n("ProgramStateIndicator.Manual.lb");
|
|
6960
|
+
case "OPERATION_MODE_MANUAL_T1":
|
|
6961
|
+
return n("ProgramStateIndicator.ManualT1.lb");
|
|
6962
|
+
case "OPERATION_MODE_MANUAL_T2":
|
|
6963
|
+
return n("ProgramStateIndicator.ManualT2.lb");
|
|
6964
|
+
default:
|
|
6965
|
+
return n("ProgramStateIndicator.Auto.lb");
|
|
6966
|
+
}
|
|
6967
|
+
})()}`;
|
|
6968
|
+
return /* @__PURE__ */ $.jsx(
|
|
6969
|
+
De,
|
|
6970
|
+
{
|
|
6971
|
+
className: s,
|
|
6972
|
+
label: /* @__PURE__ */ $.jsx(
|
|
6973
|
+
Re,
|
|
6974
|
+
{
|
|
6975
|
+
variant: "body2",
|
|
6976
|
+
sx: {
|
|
6977
|
+
fontSize: "0.75rem",
|
|
6978
|
+
// Smaller than body2
|
|
6979
|
+
lineHeight: 1.2
|
|
6980
|
+
},
|
|
6981
|
+
children: p
|
|
6982
|
+
}
|
|
6983
|
+
),
|
|
6984
|
+
variant: "filled",
|
|
6985
|
+
sx: {
|
|
6986
|
+
backgroundColor: c,
|
|
6987
|
+
color: a.palette.getContrastText(c),
|
|
6988
|
+
fontWeight: 500,
|
|
6989
|
+
height: "auto",
|
|
6990
|
+
"& .MuiChip-label": {
|
|
6991
|
+
paddingX: 1.5,
|
|
6992
|
+
paddingY: 0.5
|
|
6993
|
+
}
|
|
6994
|
+
}
|
|
6995
|
+
}
|
|
6996
|
+
);
|
|
6997
|
+
}
|
|
6998
|
+
)
|
|
6999
|
+
);
|
|
7000
7000
|
function Ce(e) {
|
|
7001
7001
|
Ke(e, []);
|
|
7002
7002
|
}
|
|
@@ -7150,18 +7150,18 @@ function wr(e = [], r = {}) {
|
|
|
7150
7150
|
}, []), [t.current];
|
|
7151
7151
|
}
|
|
7152
7152
|
export {
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7153
|
+
Vr as J,
|
|
7154
|
+
Cr as M,
|
|
7155
|
+
Sr as N,
|
|
7156
|
+
yr as P,
|
|
7157
7157
|
nr as V,
|
|
7158
7158
|
K as a,
|
|
7159
|
-
|
|
7159
|
+
Pr as b,
|
|
7160
7160
|
Ir as c,
|
|
7161
7161
|
wr as d,
|
|
7162
7162
|
Ce as e,
|
|
7163
7163
|
vr as f,
|
|
7164
|
-
|
|
7164
|
+
br as p,
|
|
7165
7165
|
xr as u
|
|
7166
7166
|
};
|
|
7167
|
-
//# sourceMappingURL=interpolation-
|
|
7167
|
+
//# sourceMappingURL=interpolation-BxZtUOAs.js.map
|