@wandelbots/wandelbots-js-react-components 3.3.1 → 3.3.2-pr.docs-robot.419.890441d
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-Dr9hDTku.js → LoadingCover-CunO727J.js} +2 -2
- package/dist/{LoadingCover-Dr9hDTku.js.map → LoadingCover-CunO727J.js.map} +1 -1
- package/dist/{LoadingCover-r2yhJZF9.cjs → LoadingCover-TeNDvBAl.cjs} +2 -2
- package/dist/{LoadingCover-r2yhJZF9.cjs.map → LoadingCover-TeNDvBAl.cjs.map} +1 -1
- package/dist/{WandelscriptEditor-DnJvITTA.js → WandelscriptEditor-CB2JeI-5.js} +3 -3
- package/dist/{WandelscriptEditor-DnJvITTA.js.map → WandelscriptEditor-CB2JeI-5.js.map} +1 -1
- package/dist/{WandelscriptEditor-Dj7TBCkF.cjs → WandelscriptEditor-b2onJkmt.cjs} +2 -2
- package/dist/{WandelscriptEditor-Dj7TBCkF.cjs.map → WandelscriptEditor-b2onJkmt.cjs.map} +1 -1
- package/dist/components/jogging/JoggingJointTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingOptions.d.ts.map +1 -1
- package/dist/components/safetyBar/ControllerTypeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/OperationModeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts.map +1 -1
- package/dist/core.cjs.js +1 -1
- package/dist/core.es.js +4 -4
- package/dist/externalizeComponent.d.ts.map +1 -1
- package/dist/{index-CxasuX80.js → index-BSBCGCFW.js} +2 -2
- package/dist/{index-CxasuX80.js.map → index-BSBCGCFW.js.map} +1 -1
- package/dist/index-DH-ITo65.cjs +115 -0
- package/dist/index-DH-ITo65.cjs.map +1 -0
- package/dist/index-DLrnRIOH.js +5676 -0
- package/dist/index-DLrnRIOH.js.map +1 -0
- package/dist/{index-CqMZL0FV.cjs → index-KsgdpgvF.cjs} +2 -2
- package/dist/{index-CqMZL0FV.cjs.map → index-KsgdpgvF.cjs.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/{manufacturerHomePositions-Ca80ycLi.cjs → manufacturerHomePositions--1G0LNoV.cjs} +2 -2
- package/dist/{manufacturerHomePositions-Ca80ycLi.cjs.map → manufacturerHomePositions--1G0LNoV.cjs.map} +1 -1
- package/dist/{manufacturerHomePositions-CgaG5vaK.js → manufacturerHomePositions-CZto6Qyy.js} +3 -3
- package/dist/{manufacturerHomePositions-CgaG5vaK.js.map → manufacturerHomePositions-CZto6Qyy.js.map} +1 -1
- package/dist/{theming-BWOmVwDm.js → theming-BHuWUUZY.js} +5944 -8583
- package/dist/theming-BHuWUUZY.js.map +1 -0
- package/dist/theming-neVGQ-FN.cjs +79 -0
- package/dist/theming-neVGQ-FN.cjs.map +1 -0
- package/dist/wandelscript.cjs.js +1 -1
- package/dist/wandelscript.es.js +1 -1
- package/package.json +1 -1
- package/src/components/jogging/JoggingJointTab.tsx +0 -1
- package/src/components/jogging/JoggingOptions.tsx +6 -5
- package/src/components/safetyBar/ControllerTypeIndicator.tsx +4 -2
- package/src/components/safetyBar/OperationModeIndicator.tsx +5 -3
- package/src/components/safetyBar/SafetyStateIndicator.tsx +7 -5
- package/src/externalizeComponent.tsx +17 -1
- package/dist/index-CAib4NKw.js +0 -2261
- package/dist/index-CAib4NKw.js.map +0 -1
- package/dist/index-DxwppshT.cjs +0 -29
- package/dist/index-DxwppshT.cjs.map +0 -1
- package/dist/theming-BWOmVwDm.js.map +0 -1
- package/dist/theming-hsf8KjGm.cjs +0 -133
- package/dist/theming-hsf8KjGm.cjs.map +0 -1
package/dist/wandelscript.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./WandelscriptEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./WandelscriptEditor-b2onJkmt.cjs");exports.WandelscriptEditor=t.WandelscriptEditor;
|
|
2
2
|
//# sourceMappingURL=wandelscript.cjs.js.map
|
package/dist/wandelscript.es.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2-pr.docs-robot.419.890441d",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Box, MenuItem } from "@mui/material"
|
|
2
2
|
import { observer } from "mobx-react-lite"
|
|
3
|
+
import { useId } from "react"
|
|
3
4
|
import { useTranslation } from "react-i18next"
|
|
4
5
|
import AdornedSelect from "../experimental/utils/AdornedSelect"
|
|
5
6
|
import {
|
|
@@ -11,6 +12,7 @@ import {
|
|
|
11
12
|
|
|
12
13
|
export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
13
14
|
const { t } = useTranslation()
|
|
15
|
+
const componentId = useId()
|
|
14
16
|
const joggingOptions: React.ReactElement[] = []
|
|
15
17
|
|
|
16
18
|
function translateOrientation(orientation: OrientationId): string {
|
|
@@ -28,7 +30,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
28
30
|
joggingOptions.push(
|
|
29
31
|
<AdornedSelect
|
|
30
32
|
key="coord"
|
|
31
|
-
labelId=
|
|
33
|
+
labelId={`jogging-coord-select-${componentId}`}
|
|
32
34
|
labelValue={t("Jogging.CoordinateSystem.hlb")}
|
|
33
35
|
value={store.selectedCoordSystemId}
|
|
34
36
|
size="small"
|
|
@@ -54,7 +56,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
54
56
|
joggingOptions.push(
|
|
55
57
|
<AdornedSelect
|
|
56
58
|
key="tcp"
|
|
57
|
-
labelId=
|
|
59
|
+
labelId={`jogging-tcp-select-${componentId}`}
|
|
58
60
|
labelValue="TCP"
|
|
59
61
|
value={store.selectedTcpId}
|
|
60
62
|
size="small"
|
|
@@ -78,8 +80,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
78
80
|
<AdornedSelect
|
|
79
81
|
key="orientation"
|
|
80
82
|
labelValue={t("Jogging.Cartesian.Orientation.lb")}
|
|
81
|
-
|
|
82
|
-
labelId="orientation-select"
|
|
83
|
+
labelId={`orientation-select-${componentId}`}
|
|
83
84
|
value={store.selectedOrientation}
|
|
84
85
|
onChange={(event) =>
|
|
85
86
|
store.setSelectedOrientation(event.target.value as OrientationId)
|
|
@@ -100,7 +101,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
100
101
|
<AdornedSelect
|
|
101
102
|
key="increment"
|
|
102
103
|
labelValue={t("Jogging.Increment.hlb")}
|
|
103
|
-
labelId=
|
|
104
|
+
labelId={`jogging-increment-select-${componentId}`}
|
|
104
105
|
size="small"
|
|
105
106
|
variant="filled"
|
|
106
107
|
value={store.activeDiscreteIncrement?.id || "continuous"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useTheme, type PopoverOrigin } from "@mui/material"
|
|
2
2
|
import { observer } from "mobx-react-lite"
|
|
3
|
+
import { useId } from "react"
|
|
3
4
|
import { Trans, useTranslation } from "react-i18next"
|
|
4
5
|
import ControllerTypePhysicalIcon from "./icons/controller-type-physical.svg"
|
|
5
6
|
import ControllerTypeVirtualIcon from "./icons/controller-type-virtual.svg"
|
|
@@ -22,12 +23,13 @@ export const ControllerTypeIndicator = observer(
|
|
|
22
23
|
compact,
|
|
23
24
|
}: ControllerTypeIndicatorProps) => {
|
|
24
25
|
const theme = useTheme()
|
|
26
|
+
const componentId = useId()
|
|
25
27
|
const { t } = useTranslation()
|
|
26
28
|
|
|
27
29
|
if (isVirtual) {
|
|
28
30
|
return (
|
|
29
31
|
<IndicatorWithExplanation
|
|
30
|
-
id=
|
|
32
|
+
id={`motion-group-virtual-${componentId}`}
|
|
31
33
|
icon={ControllerTypeVirtualIcon}
|
|
32
34
|
color={theme.palette.tertiary.main}
|
|
33
35
|
name={t("SafetyBar.ControllerType.Virtual.lb")}
|
|
@@ -52,7 +54,7 @@ export const ControllerTypeIndicator = observer(
|
|
|
52
54
|
|
|
53
55
|
return (
|
|
54
56
|
<IndicatorWithExplanation
|
|
55
|
-
id=
|
|
57
|
+
id={`motion-group-physical-${componentId}`}
|
|
56
58
|
icon={ControllerTypePhysicalIcon}
|
|
57
59
|
color={theme.palette.primary.main}
|
|
58
60
|
name={t("SafetyBar.ControllerType.Physical.lb")}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useTheme, type PopoverOrigin } from "@mui/material"
|
|
2
2
|
import type { OperationMode } from "@wandelbots/nova-js/v2"
|
|
3
3
|
import { observer } from "mobx-react-lite"
|
|
4
|
+
import { useId } from "react"
|
|
4
5
|
import { Trans, useTranslation } from "react-i18next"
|
|
5
6
|
import OperationModeAutomaticIcon from "./icons/operation-mode-automatic.svg"
|
|
6
7
|
import OperationModeErrorIcon from "./icons/operation-mode-error.svg"
|
|
@@ -23,12 +24,13 @@ export const OperationModeIndicator = observer(
|
|
|
23
24
|
}: OperationModeIndicatorProps) => {
|
|
24
25
|
const { t } = useTranslation()
|
|
25
26
|
const theme = useTheme()
|
|
27
|
+
const componentId = useId()
|
|
26
28
|
|
|
27
29
|
switch (operationMode) {
|
|
28
30
|
case "OPERATION_MODE_AUTO":
|
|
29
31
|
return (
|
|
30
32
|
<IndicatorWithExplanation
|
|
31
|
-
id=
|
|
33
|
+
id={`operation-mode-auto-${componentId}`}
|
|
32
34
|
icon={OperationModeAutomaticIcon}
|
|
33
35
|
title={t("SafetyBar.OperationMode.ti")}
|
|
34
36
|
name={t("SafetyBar.OperationMode.Automatic.ti")}
|
|
@@ -49,7 +51,7 @@ export const OperationModeIndicator = observer(
|
|
|
49
51
|
case "OPERATION_MODE_MANUAL_T2": {
|
|
50
52
|
return (
|
|
51
53
|
<IndicatorWithExplanation
|
|
52
|
-
id=
|
|
54
|
+
id={`operation-mode-manual-${componentId}`}
|
|
53
55
|
icon={OperationModeManualIcon}
|
|
54
56
|
color={theme.palette.warning.main}
|
|
55
57
|
title={t("SafetyBar.OperationMode.ti")}
|
|
@@ -71,7 +73,7 @@ export const OperationModeIndicator = observer(
|
|
|
71
73
|
default:
|
|
72
74
|
return (
|
|
73
75
|
<IndicatorWithExplanation
|
|
74
|
-
id=
|
|
76
|
+
id={`operation-mode-error-${componentId}`}
|
|
75
77
|
icon={OperationModeErrorIcon}
|
|
76
78
|
color={theme.palette.warning.main}
|
|
77
79
|
title={t("SafetyBar.OperationMode.ti")}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useTheme, type PopoverOrigin } from "@mui/material"
|
|
2
2
|
import type { SafetyStateType } from "@wandelbots/nova-js/v2"
|
|
3
3
|
import { observer } from "mobx-react-lite"
|
|
4
|
+
import { useId } from "react"
|
|
4
5
|
import { Trans, useTranslation } from "react-i18next"
|
|
5
6
|
import { assertUnreachable } from "../utils/errorHandling"
|
|
6
7
|
import SafetyStateErrorIcon from "./icons/safety-state-error.svg"
|
|
@@ -26,13 +27,14 @@ export const SafetyStateIndicator = observer(
|
|
|
26
27
|
}: SafetyStateIndicatorProps) => {
|
|
27
28
|
const { t } = useTranslation()
|
|
28
29
|
const theme = useTheme()
|
|
30
|
+
const componentId = useId()
|
|
29
31
|
|
|
30
32
|
switch (safetyState) {
|
|
31
33
|
// Normal state, robot can move
|
|
32
34
|
case "SAFETY_STATE_NORMAL":
|
|
33
35
|
return (
|
|
34
36
|
<IndicatorWithExplanation
|
|
35
|
-
id=
|
|
37
|
+
id={`safety-state-normal-${componentId}`}
|
|
36
38
|
title={t("SafetyBar.SafetyState.ti")}
|
|
37
39
|
name={t("SafetyBar.SafetyState.Normal.lb")}
|
|
38
40
|
label={compact ? null : t("SafetyBar.SafetyState.Normal.lb")}
|
|
@@ -54,7 +56,7 @@ export const SafetyStateIndicator = observer(
|
|
|
54
56
|
case "SAFETY_STATE_ROBOT_EMERGENCY_STOP":
|
|
55
57
|
return (
|
|
56
58
|
<IndicatorWithExplanation
|
|
57
|
-
id=
|
|
59
|
+
id={`safety-state-estop-${componentId}`}
|
|
58
60
|
title={t("SafetyBar.SafetyState.ti")}
|
|
59
61
|
name={t("SafetyBar.SafetyState.Estop.lb")}
|
|
60
62
|
label={compact ? null : t("SafetyBar.SafetyState.Estop.lb")}
|
|
@@ -81,7 +83,7 @@ export const SafetyStateIndicator = observer(
|
|
|
81
83
|
case "SAFETY_STATE_STOP":
|
|
82
84
|
return (
|
|
83
85
|
<IndicatorWithExplanation
|
|
84
|
-
id=
|
|
86
|
+
id={`safety-state-stop-${componentId}`}
|
|
85
87
|
icon={SafetyStateStopIcon}
|
|
86
88
|
title={t("SafetyBar.SafetyState.ti")}
|
|
87
89
|
name={t("SafetyBar.SafetyState.Stop.lb")}
|
|
@@ -108,7 +110,7 @@ export const SafetyStateIndicator = observer(
|
|
|
108
110
|
case "SAFETY_STATE_VIOLATION":
|
|
109
111
|
return (
|
|
110
112
|
<IndicatorWithExplanation
|
|
111
|
-
id=
|
|
113
|
+
id={`safety-state-manual-action-required-${componentId}`}
|
|
112
114
|
icon={SafetyStateManualActionRequiredIcon}
|
|
113
115
|
color={theme.palette.warning.main}
|
|
114
116
|
title={t("SafetyBar.SafetyState.ti")}
|
|
@@ -135,7 +137,7 @@ export const SafetyStateIndicator = observer(
|
|
|
135
137
|
case "SAFETY_STATE_FAULT":
|
|
136
138
|
return (
|
|
137
139
|
<IndicatorWithExplanation
|
|
138
|
-
id=
|
|
140
|
+
id={`safety-state-error-${componentId}`}
|
|
139
141
|
icon={SafetyStateErrorIcon}
|
|
140
142
|
color={theme.palette.error.main}
|
|
141
143
|
title={t("SafetyBar.SafetyState.ti")}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThemeProvider, useTheme } from "@mui/material/styles"
|
|
1
2
|
import { type FC } from "react"
|
|
2
3
|
import { I18nextProvider } from "react-i18next"
|
|
3
4
|
import { i18n } from "./i18n/config"
|
|
@@ -22,5 +23,20 @@ export function externalizeComponent<T extends React.JSX.ElementType>(
|
|
|
22
23
|
const NovaComponentsProvider: FC<{ children: React.ReactNode }> = ({
|
|
23
24
|
children,
|
|
24
25
|
}) => {
|
|
25
|
-
|
|
26
|
+
// Preserve the existing MUI theme from parent context if it exists
|
|
27
|
+
let theme
|
|
28
|
+
try {
|
|
29
|
+
theme = useTheme()
|
|
30
|
+
} catch {
|
|
31
|
+
// No theme context exists, which is fine - MUI will use defaults
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const content = <I18nextProvider i18n={i18n}>{children}</I18nextProvider>
|
|
35
|
+
|
|
36
|
+
// If a theme exists in parent context, pass it through to maintain theme inheritance
|
|
37
|
+
return theme ? (
|
|
38
|
+
<ThemeProvider theme={theme}>{content}</ThemeProvider>
|
|
39
|
+
) : (
|
|
40
|
+
content
|
|
41
|
+
)
|
|
26
42
|
}
|