@wandelbots/wandelbots-js-react-components 2.34.1-pr.feature-robot-precondition-list.372.2f4c672 → 2.34.1-pr.feature-robot-precondition-list.372.de237f9
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/components/CycleTimer.d.ts.map +1 -1
- package/dist/index.cjs +47 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1055 -1008
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CycleTimer.tsx +62 -21
- package/src/i18n/locales/de/translations.json +1 -0
- package/src/i18n/locales/en/translations.json +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "2.34.1-pr.feature-robot-precondition-list.372.
|
|
3
|
+
"version": "2.34.1-pr.feature-robot-precondition-list.372.de237f9",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -531,19 +531,24 @@ export const CycleTimer = externalizeComponent(
|
|
|
531
531
|
<Typography
|
|
532
532
|
variant="body2"
|
|
533
533
|
sx={{
|
|
534
|
-
color:
|
|
534
|
+
color: hasError
|
|
535
|
+
? theme.palette.error.light
|
|
536
|
+
: theme.palette.text.primary,
|
|
535
537
|
fontSize: "14px",
|
|
538
|
+
transition: "color 0.5s ease-out",
|
|
536
539
|
}}
|
|
537
540
|
>
|
|
538
|
-
{
|
|
539
|
-
?
|
|
540
|
-
|
|
541
|
-
? //
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
541
|
+
{hasError
|
|
542
|
+
? t("CycleTimer.Error.lb", "Error")
|
|
543
|
+
: maxTime !== null
|
|
544
|
+
? // Count-down mode: show remaining time
|
|
545
|
+
compact
|
|
546
|
+
? // Compact mode: show remaining time with "min." suffix
|
|
547
|
+
`${formatTime(remainingTime)} ${t("CycleTimer.Time.lb", { time: "" }).replace(/\s*$/, "")}`
|
|
548
|
+
: // Full mode: show "remaining / of total min." format
|
|
549
|
+
`${formatTime(remainingTime)} / ${t("CycleTimer.Time.lb", { time: formatTime(maxTime) })}`
|
|
550
|
+
: // Count-up mode: show elapsed time only
|
|
551
|
+
formatTime(remainingTime)}
|
|
547
552
|
</Typography>
|
|
548
553
|
</Box>
|
|
549
554
|
)
|
|
@@ -616,7 +621,10 @@ export const CycleTimer = externalizeComponent(
|
|
|
616
621
|
marginBottom: 0.5,
|
|
617
622
|
}}
|
|
618
623
|
>
|
|
619
|
-
<Fade
|
|
624
|
+
<Fade
|
|
625
|
+
in={showLabels && maxTime !== null && !hasError}
|
|
626
|
+
timeout={300}
|
|
627
|
+
>
|
|
620
628
|
<Typography
|
|
621
629
|
variant="body2"
|
|
622
630
|
sx={{
|
|
@@ -629,19 +637,49 @@ export const CycleTimer = externalizeComponent(
|
|
|
629
637
|
</Fade>
|
|
630
638
|
</Box>
|
|
631
639
|
|
|
632
|
-
{/* Main timer display
|
|
633
|
-
<
|
|
634
|
-
variant="h1"
|
|
640
|
+
{/* Main timer display with error state transition */}
|
|
641
|
+
<Box
|
|
635
642
|
sx={{
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
643
|
+
position: "relative",
|
|
644
|
+
height: "48px", // Fixed height to prevent layout shift
|
|
645
|
+
display: "flex",
|
|
646
|
+
alignItems: "center",
|
|
647
|
+
justifyContent: "center",
|
|
640
648
|
marginBottom: 0.5,
|
|
641
649
|
}}
|
|
642
650
|
>
|
|
643
|
-
{
|
|
644
|
-
|
|
651
|
+
{/* Error text */}
|
|
652
|
+
<Fade in={hasError} timeout={500}>
|
|
653
|
+
<Typography
|
|
654
|
+
variant="h3"
|
|
655
|
+
sx={{
|
|
656
|
+
position: "absolute",
|
|
657
|
+
fontSize: "40px",
|
|
658
|
+
fontWeight: 400,
|
|
659
|
+
color: "#FFFFFF",
|
|
660
|
+
lineHeight: "116.7%",
|
|
661
|
+
}}
|
|
662
|
+
>
|
|
663
|
+
{t("CycleTimer.Error.lb", "Error")}
|
|
664
|
+
</Typography>
|
|
665
|
+
</Fade>
|
|
666
|
+
|
|
667
|
+
{/* Normal timer text */}
|
|
668
|
+
<Fade in={!hasError} timeout={500}>
|
|
669
|
+
<Typography
|
|
670
|
+
variant="h1"
|
|
671
|
+
sx={{
|
|
672
|
+
position: "absolute",
|
|
673
|
+
fontSize: "48px",
|
|
674
|
+
fontWeight: 500,
|
|
675
|
+
color: theme.palette.text.primary,
|
|
676
|
+
lineHeight: 1,
|
|
677
|
+
}}
|
|
678
|
+
>
|
|
679
|
+
{formatTime(remainingTime)}
|
|
680
|
+
</Typography>
|
|
681
|
+
</Fade>
|
|
682
|
+
</Box>
|
|
645
683
|
|
|
646
684
|
{/* Total time display - always reserves space to prevent layout shift */}
|
|
647
685
|
<Box
|
|
@@ -652,7 +690,10 @@ export const CycleTimer = externalizeComponent(
|
|
|
652
690
|
justifyContent: "center",
|
|
653
691
|
}}
|
|
654
692
|
>
|
|
655
|
-
<Fade
|
|
693
|
+
<Fade
|
|
694
|
+
in={showLabels && maxTime !== null && !hasError}
|
|
695
|
+
timeout={300}
|
|
696
|
+
>
|
|
656
697
|
<Typography
|
|
657
698
|
variant="body2"
|
|
658
699
|
sx={{
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"CycleTimer.RemainingTime.lb": "Verbleibende Zeit",
|
|
48
48
|
"CycleTimer.OfTime.lb": "von {{time}} min.",
|
|
49
49
|
"CycleTimer.Time.lb": "{{time}} min.",
|
|
50
|
+
"CycleTimer.Error.lb": "Fehler",
|
|
50
51
|
"ProgramControl.Start.bt": "Start",
|
|
51
52
|
"ProgramControl.Resume.bt": "Weiter",
|
|
52
53
|
"ProgramControl.Retry.bt": "Wiederholen",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"CycleTimer.RemainingTime.lb": "Time remaining",
|
|
49
49
|
"CycleTimer.OfTime.lb": "of {{time}} min.",
|
|
50
50
|
"CycleTimer.Time.lb": "{{time}} min.",
|
|
51
|
+
"CycleTimer.Error.lb": "Error",
|
|
51
52
|
"ProgramControl.Start.bt": "Start",
|
|
52
53
|
"ProgramControl.Resume.bt": "Resume",
|
|
53
54
|
"ProgramControl.Retry.bt": "Retry",
|