@wandelbots/wandelbots-js-react-components 4.6.0 → 4.7.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/{LoadingCover-6gWr11KP.js → LoadingCover-B3UN1lnU.js} +12 -19
- package/dist/LoadingCover-B3UN1lnU.js.map +1 -0
- package/dist/LoadingCover-DXcsXWDy.cjs +2 -0
- package/dist/LoadingCover-DXcsXWDy.cjs.map +1 -0
- package/dist/MotionGroupVisualizer-D8_sA8PA.js +1347 -0
- package/dist/MotionGroupVisualizer-D8_sA8PA.js.map +1 -0
- package/dist/MotionGroupVisualizer-DcHXsQ4A.cjs +2 -0
- package/dist/MotionGroupVisualizer-DcHXsQ4A.cjs.map +1 -0
- package/dist/{WandelscriptEditor-D6_vS5Uk.cjs → WandelscriptEditor-6sAoniLC.cjs} +2 -2
- package/dist/{WandelscriptEditor-D6_vS5Uk.cjs.map → WandelscriptEditor-6sAoniLC.cjs.map} +1 -1
- package/dist/{WandelscriptEditor-7eN-Yw7m.js → WandelscriptEditor-kWC2VyG_.js} +3 -3
- package/dist/{WandelscriptEditor-7eN-Yw7m.js.map → WandelscriptEditor-kWC2VyG_.js.map} +1 -1
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts +1 -1
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
- package/dist/components/utils/converters.d.ts +9 -0
- package/dist/components/utils/converters.d.ts.map +1 -1
- package/dist/core.cjs.js +1 -1
- package/dist/core.es.js +4 -4
- package/dist/{externalizeComponent-CkVWk2F_.cjs → externalizeComponent-B98tgTPP.cjs} +6 -6
- package/dist/externalizeComponent-B98tgTPP.cjs.map +1 -0
- package/dist/{externalizeComponent-Dc3fViZA.js → externalizeComponent-BOqKMZMc.js} +167 -130
- package/dist/externalizeComponent-BOqKMZMc.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/{interpolation-BxZtUOAs.js → interpolation-B8AcxfdD.js} +274 -274
- package/dist/interpolation-B8AcxfdD.js.map +1 -0
- package/dist/{interpolation-D4zTPZou.cjs → interpolation-SWzo5zr4.cjs} +4 -4
- package/dist/interpolation-SWzo5zr4.cjs.map +1 -0
- package/dist/{theming-3PEA0ksG.js → theming-BKpqgTRM.js} +4 -4
- package/dist/{theming-3PEA0ksG.js.map → theming-BKpqgTRM.js.map} +1 -1
- package/dist/{theming-U3LOZpcT.cjs → theming-CatQaIl_.cjs} +2 -2
- package/dist/{theming-U3LOZpcT.cjs.map → theming-CatQaIl_.cjs.map} +1 -1
- package/dist/wandelscript.cjs.js +1 -1
- package/dist/wandelscript.es.js +1 -1
- package/package.json +1 -1
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +139 -149
- package/src/components/utils/converters.ts +64 -0
- package/dist/LoadingCover-6gWr11KP.js.map +0 -1
- package/dist/LoadingCover-CukpS_aj.cjs +0 -2
- package/dist/LoadingCover-CukpS_aj.cjs.map +0 -1
- package/dist/MotionGroupVisualizer-BlWkdkaM.js +0 -1338
- package/dist/MotionGroupVisualizer-BlWkdkaM.js.map +0 -1
- package/dist/MotionGroupVisualizer-Bw-h3U_t.cjs +0 -2
- package/dist/MotionGroupVisualizer-Bw-h3U_t.cjs.map +0 -1
- package/dist/externalizeComponent-CkVWk2F_.cjs.map +0 -1
- package/dist/externalizeComponent-Dc3fViZA.js.map +0 -1
- package/dist/interpolation-BxZtUOAs.js.map +0 -1
- package/dist/interpolation-D4zTPZou.cjs.map +0 -1
|
@@ -1,11 +1,268 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { useTheme as Ae, Box as ne, Button as ge, Typography as Re, Chip as De } from "@mui/material";
|
|
1
|
+
import { e as we, j as $ } from "./externalizeComponent-BOqKMZMc.js";
|
|
2
|
+
import { useTheme as Ae, Box as ne, Button as ke, Typography as Re, Chip as qe } from "@mui/material";
|
|
4
3
|
import { observer as Ue } from "mobx-react-lite";
|
|
5
4
|
import { useTranslation as Te } from "react-i18next";
|
|
6
|
-
import { PlayArrow as be, Stop as ye, Pause as
|
|
5
|
+
import { PlayArrow as be, Stop as ye, Pause as ge } from "@mui/icons-material";
|
|
6
|
+
import m, { isAxiosError as De, AxiosError as Qe } from "axios";
|
|
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
|
+
);
|
|
9
266
|
/*! *****************************************************************************
|
|
10
267
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
268
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -882,10 +1139,10 @@ const b = function(e, ...r) {
|
|
|
882
1139
|
};
|
|
883
1140
|
return a.request(l);
|
|
884
1141
|
};
|
|
885
|
-
},
|
|
1142
|
+
}, Sr = {
|
|
886
1143
|
RevoluteJoint: "REVOLUTE_JOINT",
|
|
887
1144
|
PrismaticJoint: "PRISMATIC_JOINT"
|
|
888
|
-
},
|
|
1145
|
+
}, br = {
|
|
889
1146
|
Abb: "abb",
|
|
890
1147
|
Fanuc: "fanuc",
|
|
891
1148
|
Kuka: "kuka",
|
|
@@ -6605,7 +6862,7 @@ var lr = class {
|
|
|
6605
6862
|
};
|
|
6606
6863
|
}
|
|
6607
6864
|
}
|
|
6608
|
-
throw new
|
|
6865
|
+
throw new Qe(`No mock handler matched this request: ${t} ${s}`, "404", e);
|
|
6609
6866
|
}
|
|
6610
6867
|
handleWebsocketConnection(e) {
|
|
6611
6868
|
this.connections.push(e), setTimeout(() => {
|
|
@@ -6666,7 +6923,7 @@ const or = { result: {
|
|
|
6666
6923
|
]
|
|
6667
6924
|
}
|
|
6668
6925
|
} };
|
|
6669
|
-
var
|
|
6926
|
+
var yr = class {
|
|
6670
6927
|
constructor(e) {
|
|
6671
6928
|
this.authPromise = null, this.accessToken = null;
|
|
6672
6929
|
const r = e.cellId ?? "cell";
|
|
@@ -6680,7 +6937,7 @@ var Sr = class {
|
|
|
6680
6937
|
});
|
|
6681
6938
|
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) => {
|
|
6682
6939
|
var a, n;
|
|
6683
|
-
if (
|
|
6940
|
+
if (De(s))
|
|
6684
6941
|
if (((a = s.response) == null ? void 0 : a.status) === 401) try {
|
|
6685
6942
|
if (await this.renewAuthentication(), s.config)
|
|
6686
6943
|
return this.accessToken ? s.config.headers.Authorization = `Bearer ${this.accessToken}` : delete s.config.headers.Authorization, t.request(s.config);
|
|
@@ -6727,7 +6984,7 @@ var Sr = class {
|
|
|
6727
6984
|
return new et(this.makeWebsocketURL(e), { mock: this.mock });
|
|
6728
6985
|
}
|
|
6729
6986
|
};
|
|
6730
|
-
function
|
|
6987
|
+
function Pr(e) {
|
|
6731
6988
|
var n, l, o, c, i, p;
|
|
6732
6989
|
const r = [
|
|
6733
6990
|
((n = e.position) == null ? void 0 : n[0]) ?? 0,
|
|
@@ -6740,263 +6997,6 @@ function br(e) {
|
|
|
6740
6997
|
], s = r.map((d) => d.toFixed(1)), a = t.map((d) => d.toFixed(4));
|
|
6741
6998
|
return `(${s.concat(a).join(", ")})`;
|
|
6742
6999
|
}
|
|
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
|
+
Sr as J,
|
|
7154
|
+
br as M,
|
|
7155
|
+
yr as N,
|
|
7156
|
+
Vr as P,
|
|
7157
7157
|
nr as V,
|
|
7158
7158
|
K as a,
|
|
7159
|
-
|
|
7159
|
+
Cr as b,
|
|
7160
7160
|
Ir as c,
|
|
7161
7161
|
wr as d,
|
|
7162
7162
|
Ce as e,
|
|
7163
7163
|
vr as f,
|
|
7164
|
-
|
|
7164
|
+
Pr as p,
|
|
7165
7165
|
xr as u
|
|
7166
7166
|
};
|
|
7167
|
-
//# sourceMappingURL=interpolation-
|
|
7167
|
+
//# sourceMappingURL=interpolation-B8AcxfdD.js.map
|