@wandelbots/wandelbots-js-react-components 2.44.0-pr.feature-seperate-timer.383.8ca3799 → 2.44.0-pr.feature-seperate-timer.383.59e079b

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wandelbots/wandelbots-js-react-components",
3
- "version": "2.44.0-pr.feature-seperate-timer.383.8ca3799",
3
+ "version": "2.44.0-pr.feature-seperate-timer.383.59e079b",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -6,12 +6,15 @@ import { externalizeComponent } from "../externalizeComponent"
6
6
 
7
7
  export enum ProgramState {
8
8
  IDLE = "idle",
9
- STOPPED = "stopped",
9
+ PREPARING = "preparing",
10
10
  STARTING = "starting",
11
11
  RUNNING = "running",
12
12
  PAUSING = "pausing",
13
13
  PAUSED = "paused",
14
14
  STOPPING = "stopping",
15
+ COMPLETED = "completed",
16
+ FAILED = "failed",
17
+ STOPPED = "stopped",
15
18
  ERROR = "error",
16
19
  }
17
20
 
@@ -55,7 +58,7 @@ interface ButtonConfig {
55
58
  * A control component for program execution with run, pause, and stop functionality.
56
59
  *
57
60
  * Features:
58
- * - State machine with idle, stopped, starting, running, pausing, paused, stopping, and error states
61
+ * - State machine with idle, preparing, starting, running, pausing, paused, stopping, completed, failed, stopped, and error states
59
62
  * - Two variants: with_pause (3 buttons) and without_pause (2 buttons)
60
63
  * - Optional manual reset functionality
61
64
  * - Responsive design with 110px circular buttons
@@ -83,11 +86,13 @@ export const ProgramControl = externalizeComponent(
83
86
  state === ProgramState.IDLE ||
84
87
  state === ProgramState.STOPPED ||
85
88
  state === ProgramState.PAUSED ||
89
+ state === ProgramState.COMPLETED ||
90
+ state === ProgramState.FAILED ||
86
91
  state === ProgramState.ERROR,
87
92
  label:
88
93
  state === ProgramState.PAUSED
89
94
  ? t("ProgramControl.Resume.bt")
90
- : state === ProgramState.ERROR
95
+ : state === ProgramState.ERROR || state === ProgramState.FAILED
91
96
  ? t("ProgramControl.Retry.bt")
92
97
  : t("ProgramControl.Start.bt"),
93
98
  color: theme.palette.success.main,
@@ -101,6 +106,7 @@ export const ProgramControl = externalizeComponent(
101
106
  },
102
107
  stop: {
103
108
  enabled:
109
+ state === ProgramState.PREPARING ||
104
110
  state === ProgramState.STARTING ||
105
111
  state === ProgramState.RUNNING ||
106
112
  state === ProgramState.PAUSING ||
@@ -176,6 +182,7 @@ export const ProgramControl = externalizeComponent(
176
182
  variant="contained"
177
183
  disabled={
178
184
  !config.enabled ||
185
+ state === ProgramState.PREPARING ||
179
186
  state === ProgramState.STARTING ||
180
187
  state === ProgramState.PAUSING ||
181
188
  (state === ProgramState.STOPPING && !requiresManualReset)
@@ -188,6 +195,7 @@ export const ProgramControl = externalizeComponent(
188
195
  backgroundColor: config.color,
189
196
  opacity:
190
197
  config.enabled &&
198
+ state !== ProgramState.PREPARING &&
191
199
  state !== ProgramState.STARTING &&
192
200
  state !== ProgramState.PAUSING &&
193
201
  !(state === ProgramState.STOPPING && !requiresManualReset)
@@ -197,6 +205,7 @@ export const ProgramControl = externalizeComponent(
197
205
  backgroundColor: config.color,
198
206
  opacity:
199
207
  config.enabled &&
208
+ state !== ProgramState.PREPARING &&
200
209
  state !== ProgramState.STARTING &&
201
210
  state !== ProgramState.PAUSING &&
202
211
  !(
@@ -222,6 +231,7 @@ export const ProgramControl = externalizeComponent(
222
231
  sx={{
223
232
  color:
224
233
  config.enabled &&
234
+ state !== ProgramState.PREPARING &&
225
235
  state !== ProgramState.STARTING &&
226
236
  state !== ProgramState.PAUSING &&
227
237
  !(state === ProgramState.STOPPING && !requiresManualReset)
@@ -230,6 +240,7 @@ export const ProgramControl = externalizeComponent(
230
240
  textAlign: "center",
231
241
  opacity:
232
242
  config.enabled &&
243
+ state !== ProgramState.PREPARING &&
233
244
  state !== ProgramState.STARTING &&
234
245
  state !== ProgramState.PAUSING &&
235
246
  !(state === ProgramState.STOPPING && !requiresManualReset)
@@ -77,6 +77,11 @@ export const ProgramStateIndicator = externalizeComponent(
77
77
  // For normal safety states, check program state
78
78
  if (safetyState === "SAFETY_STATE_NORMAL") {
79
79
  switch (programState) {
80
+ case ProgramState.PREPARING:
81
+ return {
82
+ label: t("ProgramStateIndicator.Preparing.lb"),
83
+ color: theme.palette.warning.main,
84
+ }
80
85
  case ProgramState.STARTING:
81
86
  return {
82
87
  label: t("ProgramStateIndicator.Starting.lb"),
@@ -102,6 +107,16 @@ export const ProgramStateIndicator = externalizeComponent(
102
107
  label: t("ProgramStateIndicator.Stopping.lb"),
103
108
  color: theme.palette.warning.main,
104
109
  }
110
+ case ProgramState.COMPLETED:
111
+ return {
112
+ label: t("ProgramStateIndicator.Completed.lb"),
113
+ color: theme.palette.success.main,
114
+ }
115
+ case ProgramState.FAILED:
116
+ return {
117
+ label: t("ProgramStateIndicator.Failed.lb"),
118
+ color: theme.palette.error.main,
119
+ }
105
120
  case ProgramState.STOPPED:
106
121
  return {
107
122
  label: t("ProgramStateIndicator.Stopped.lb"),
@@ -58,10 +58,13 @@
58
58
  "ProgramControl.Retry.bt": "Wiederholen",
59
59
  "ProgramControl.Pause.bt": "Pause",
60
60
  "ProgramControl.Stop.bt": "Stopp",
61
+ "ProgramStateIndicator.Preparing.lb": "Vorbereitung",
61
62
  "ProgramStateIndicator.Starting.lb": "Startet",
62
63
  "ProgramStateIndicator.Running.lb": "In Betrieb",
63
64
  "ProgramStateIndicator.Pausing.lb": "Pausiert",
64
65
  "ProgramStateIndicator.Stopping.lb": "Stoppt",
66
+ "ProgramStateIndicator.Completed.lb": "Abgeschlossen",
67
+ "ProgramStateIndicator.Failed.lb": "Fehlgeschlagen",
65
68
  "ProgramStateIndicator.Error.lb": "Fehler",
66
69
  "ProgramStateIndicator.EStop.lb": "Not-Aus",
67
70
  "ProgramStateIndicator.Idle.lb": "Leerlauf",
@@ -59,10 +59,13 @@
59
59
  "ProgramControl.Retry.bt": "Retry",
60
60
  "ProgramControl.Pause.bt": "Pause",
61
61
  "ProgramControl.Stop.bt": "Stop",
62
+ "ProgramStateIndicator.Preparing.lb": "Preparing",
62
63
  "ProgramStateIndicator.Starting.lb": "Starting",
63
64
  "ProgramStateIndicator.Running.lb": "Running",
64
65
  "ProgramStateIndicator.Pausing.lb": "Pausing",
65
66
  "ProgramStateIndicator.Stopping.lb": "Stopping",
67
+ "ProgramStateIndicator.Completed.lb": "Completed",
68
+ "ProgramStateIndicator.Failed.lb": "Failed",
66
69
  "ProgramStateIndicator.Error.lb": "Error",
67
70
  "ProgramStateIndicator.EStop.lb": "E-Stop",
68
71
  "ProgramStateIndicator.Idle.lb": "Idle",