@wandelbots/wandelbots-js-react-components 2.33.0-pr.feature-robot-precondition-list.372.cb78a22 → 2.33.0-pr.feature-robot-precondition-list.372.da7759d
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/DataGrid.d.ts.map +1 -1
- package/dist/components/LogPanel.d.ts +0 -16
- package/dist/components/LogPanel.d.ts.map +1 -1
- package/dist/components/LogViewer.d.ts.map +1 -1
- package/dist/components/RobotCard.d.ts.map +1 -1
- package/dist/index.cjs +37 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2034 -2021
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DataGrid.tsx +8 -4
- package/src/components/LogPanel.tsx +0 -16
- package/src/components/LogViewer.tsx +30 -16
- package/src/components/RobotCard.tsx +6 -5
- package/src/components/RobotListItem.tsx +5 -5
- package/src/components/RobotSetupReadinessIndicator.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "2.33.0-pr.feature-robot-precondition-list.372.
|
|
3
|
+
"version": "2.33.0-pr.feature-robot-precondition-list.372.da7759d",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ClearIcon from "@mui/icons-material/Clear"
|
|
2
2
|
import FilterListIcon from "@mui/icons-material/FilterList"
|
|
3
3
|
import SearchIcon from "@mui/icons-material/Search"
|
|
4
|
-
import { Box, Divider, Typography } from "@mui/material"
|
|
4
|
+
import { Box, Divider, Typography, useTheme } from "@mui/material"
|
|
5
5
|
import {
|
|
6
6
|
DataGrid,
|
|
7
7
|
type DataGridProps,
|
|
@@ -101,6 +101,8 @@ export const WandelbotsDataGrid = externalizeComponent(
|
|
|
101
101
|
CustomToolbar,
|
|
102
102
|
selectFirstByDefault = false,
|
|
103
103
|
}: WandelbotsDataGridProps<T>) => {
|
|
104
|
+
const theme = useTheme()
|
|
105
|
+
|
|
104
106
|
// Internal state for selection when not controlled
|
|
105
107
|
const [internalSelectedItem, setInternalSelectedItem] =
|
|
106
108
|
useState<T | null>(null)
|
|
@@ -276,7 +278,8 @@ export const WandelbotsDataGrid = externalizeComponent(
|
|
|
276
278
|
height: "100%",
|
|
277
279
|
display: "flex",
|
|
278
280
|
flexDirection: "column",
|
|
279
|
-
background:
|
|
281
|
+
background:
|
|
282
|
+
theme.palette.backgroundPaperElevation?.[5] || "#202233",
|
|
280
283
|
}}
|
|
281
284
|
>
|
|
282
285
|
<DataGrid
|
|
@@ -331,12 +334,13 @@ export const WandelbotsDataGrid = externalizeComponent(
|
|
|
331
334
|
"& .MuiDataGrid-columnHeaders": {
|
|
332
335
|
border: "none",
|
|
333
336
|
borderBottom: "none !important",
|
|
334
|
-
backgroundColor:
|
|
337
|
+
backgroundColor:
|
|
338
|
+
theme.palette.backgroundPaperElevation?.[5] || "#202233",
|
|
335
339
|
},
|
|
336
340
|
"& .MuiDataGrid-row": {
|
|
337
341
|
cursor: onRowClick ? "pointer" : "default",
|
|
338
342
|
border: "none",
|
|
339
|
-
margin: "
|
|
343
|
+
margin: "1px 0",
|
|
340
344
|
position: "relative",
|
|
341
345
|
"&:hover": {
|
|
342
346
|
backgroundColor: "transparent !important",
|
|
@@ -21,7 +21,6 @@ export type LogPanelProps = {
|
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```tsx
|
|
24
|
-
* // Simple usage with automatic state management
|
|
25
24
|
* function MyComponent() {
|
|
26
25
|
* const [logStore, setLogStore] = useState<LogStore>()
|
|
27
26
|
*
|
|
@@ -38,21 +37,6 @@ export type LogPanelProps = {
|
|
|
38
37
|
* logStore?.addError("Something went wrong")
|
|
39
38
|
* logStore?.addWarning("Warning message")
|
|
40
39
|
* ```
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```tsx
|
|
44
|
-
* // Usage with external store for shared state
|
|
45
|
-
* function MyApp() {
|
|
46
|
-
* const logStore = useMemo(() => new LogStore(), [])
|
|
47
|
-
*
|
|
48
|
-
* return (
|
|
49
|
-
* <div>
|
|
50
|
-
* <LogPanel store={logStore} height={300} />
|
|
51
|
-
* <SomeOtherComponent onError={(msg) => logStore.addError(msg)} />
|
|
52
|
-
* </div>
|
|
53
|
-
* )
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
40
|
*/
|
|
57
41
|
export const LogPanel = externalizeComponent(
|
|
58
42
|
observer((props: LogPanelProps) => {
|
|
@@ -5,7 +5,14 @@ import {
|
|
|
5
5
|
ExpandMore,
|
|
6
6
|
} from "@mui/icons-material"
|
|
7
7
|
import type { SxProps } from "@mui/material"
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
Box,
|
|
10
|
+
Button,
|
|
11
|
+
IconButton,
|
|
12
|
+
Paper,
|
|
13
|
+
Typography,
|
|
14
|
+
useTheme,
|
|
15
|
+
} from "@mui/material"
|
|
9
16
|
import { observer } from "mobx-react-lite"
|
|
10
17
|
import { useEffect, useRef, useState } from "react"
|
|
11
18
|
import { externalizeComponent } from "../externalizeComponent"
|
|
@@ -37,6 +44,7 @@ export type LogViewerProps = {
|
|
|
37
44
|
export const LogViewer = externalizeComponent(
|
|
38
45
|
observer((props: LogViewerProps) => {
|
|
39
46
|
const { messages = [], onClear, height = 400, sx } = props
|
|
47
|
+
const theme = useTheme()
|
|
40
48
|
const scrollContainerRef = useRef<HTMLDivElement>(null)
|
|
41
49
|
|
|
42
50
|
// Auto-scroll to bottom when new messages are added
|
|
@@ -67,12 +75,12 @@ export const LogViewer = externalizeComponent(
|
|
|
67
75
|
const getMessageColor = (level: LogLevel) => {
|
|
68
76
|
switch (level) {
|
|
69
77
|
case "error":
|
|
70
|
-
return
|
|
78
|
+
return theme.palette.error.main
|
|
71
79
|
case "warning":
|
|
72
|
-
return
|
|
80
|
+
return theme.palette.warning.main
|
|
73
81
|
case "info":
|
|
74
82
|
default:
|
|
75
|
-
return
|
|
83
|
+
return theme.palette.text.secondary
|
|
76
84
|
}
|
|
77
85
|
}
|
|
78
86
|
|
|
@@ -109,7 +117,7 @@ export const LogViewer = externalizeComponent(
|
|
|
109
117
|
fontFamily: "monospace",
|
|
110
118
|
flexDirection: "column",
|
|
111
119
|
"&:hover": {
|
|
112
|
-
backgroundColor:
|
|
120
|
+
backgroundColor: theme.palette.action.hover,
|
|
113
121
|
},
|
|
114
122
|
borderRadius: "4px",
|
|
115
123
|
padding: "2px 4px",
|
|
@@ -125,7 +133,7 @@ export const LogViewer = externalizeComponent(
|
|
|
125
133
|
fontSize: "12px",
|
|
126
134
|
lineHeight: "18px",
|
|
127
135
|
letterSpacing: "0.4px",
|
|
128
|
-
color:
|
|
136
|
+
color: theme.palette.text.disabled,
|
|
129
137
|
whiteSpace: "nowrap",
|
|
130
138
|
flexShrink: 0,
|
|
131
139
|
}}
|
|
@@ -168,9 +176,9 @@ export const LogViewer = externalizeComponent(
|
|
|
168
176
|
onClick={handleCopy}
|
|
169
177
|
sx={{
|
|
170
178
|
padding: "2px",
|
|
171
|
-
color:
|
|
179
|
+
color: theme.palette.text.secondary,
|
|
172
180
|
"&:hover": {
|
|
173
|
-
backgroundColor:
|
|
181
|
+
backgroundColor: theme.palette.action.hover,
|
|
174
182
|
},
|
|
175
183
|
}}
|
|
176
184
|
title={copyTooltip ? "Copied!" : "Copy message"}
|
|
@@ -184,9 +192,9 @@ export const LogViewer = externalizeComponent(
|
|
|
184
192
|
onClick={() => setIsExpanded(!isExpanded)}
|
|
185
193
|
sx={{
|
|
186
194
|
padding: "2px",
|
|
187
|
-
color:
|
|
195
|
+
color: theme.palette.text.secondary,
|
|
188
196
|
"&:hover": {
|
|
189
|
-
backgroundColor:
|
|
197
|
+
backgroundColor: theme.palette.action.hover,
|
|
190
198
|
},
|
|
191
199
|
}}
|
|
192
200
|
title={isExpanded ? "Collapse" : "Expand"}
|
|
@@ -207,7 +215,9 @@ export const LogViewer = externalizeComponent(
|
|
|
207
215
|
return (
|
|
208
216
|
<Paper
|
|
209
217
|
sx={{
|
|
210
|
-
|
|
218
|
+
backgroundColor:
|
|
219
|
+
theme.palette.backgroundPaperElevation?.[2] || "#171927",
|
|
220
|
+
backgroundImage: "none", // Override any gradient from elevation
|
|
211
221
|
height,
|
|
212
222
|
display: "flex",
|
|
213
223
|
flexDirection: "column",
|
|
@@ -226,7 +236,11 @@ export const LogViewer = externalizeComponent(
|
|
|
226
236
|
>
|
|
227
237
|
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
|
228
238
|
<DocumentIcon
|
|
229
|
-
sx={{
|
|
239
|
+
sx={{
|
|
240
|
+
fontSize: 16,
|
|
241
|
+
color: theme.palette.action.active,
|
|
242
|
+
opacity: 0.56,
|
|
243
|
+
}}
|
|
230
244
|
/>
|
|
231
245
|
<Typography
|
|
232
246
|
sx={{
|
|
@@ -234,7 +248,7 @@ export const LogViewer = externalizeComponent(
|
|
|
234
248
|
fontSize: "14px",
|
|
235
249
|
lineHeight: "143%",
|
|
236
250
|
letterSpacing: "0.17px",
|
|
237
|
-
color:
|
|
251
|
+
color: theme.palette.text.primary,
|
|
238
252
|
}}
|
|
239
253
|
>
|
|
240
254
|
Log
|
|
@@ -248,12 +262,12 @@ export const LogViewer = externalizeComponent(
|
|
|
248
262
|
fontSize: "13px",
|
|
249
263
|
lineHeight: "22px",
|
|
250
264
|
letterSpacing: "0.46px",
|
|
251
|
-
color:
|
|
265
|
+
color: theme.palette.primary.main,
|
|
252
266
|
textTransform: "none",
|
|
253
267
|
minWidth: "auto",
|
|
254
268
|
padding: "4px 8px",
|
|
255
269
|
"&:hover": {
|
|
256
|
-
backgroundColor: "
|
|
270
|
+
backgroundColor: theme.palette.primary.main + "14", // 8% opacity
|
|
257
271
|
},
|
|
258
272
|
}}
|
|
259
273
|
>
|
|
@@ -276,7 +290,7 @@ export const LogViewer = externalizeComponent(
|
|
|
276
290
|
{messages.length === 0 ? (
|
|
277
291
|
<Typography
|
|
278
292
|
sx={{
|
|
279
|
-
color:
|
|
293
|
+
color: theme.palette.text.disabled,
|
|
280
294
|
fontSize: "12px",
|
|
281
295
|
fontStyle: "italic",
|
|
282
296
|
textAlign: "center",
|
|
@@ -252,7 +252,6 @@ export const RobotCard = externalizeComponent(
|
|
|
252
252
|
<Card
|
|
253
253
|
ref={cardRef}
|
|
254
254
|
className={className}
|
|
255
|
-
elevation={5}
|
|
256
255
|
sx={{
|
|
257
256
|
width: "100%",
|
|
258
257
|
height: "100%",
|
|
@@ -264,10 +263,12 @@ export const RobotCard = externalizeComponent(
|
|
|
264
263
|
minHeight: isLandscape
|
|
265
264
|
? { xs: 160, sm: 200, md: 250 }
|
|
266
265
|
: { xs: 200, sm: 280, md: 350 },
|
|
267
|
-
border:
|
|
268
|
-
"1px solid var(--secondary-_states-outlinedBorder, #FFFFFF1F)",
|
|
266
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
269
267
|
borderRadius: "18px",
|
|
270
268
|
boxShadow: "none",
|
|
269
|
+
backgroundColor:
|
|
270
|
+
theme.palette.backgroundPaperElevation?.[8] || "#2A2A3F",
|
|
271
|
+
backgroundImage: "none", // Override any gradient from elevation
|
|
271
272
|
}}
|
|
272
273
|
>
|
|
273
274
|
{isLandscape ? (
|
|
@@ -367,7 +368,7 @@ export const RobotCard = externalizeComponent(
|
|
|
367
368
|
variant="body1"
|
|
368
369
|
sx={{
|
|
369
370
|
mb: 0,
|
|
370
|
-
color:
|
|
371
|
+
color: theme.palette.text.secondary,
|
|
371
372
|
textAlign: "left",
|
|
372
373
|
}}
|
|
373
374
|
>
|
|
@@ -511,7 +512,7 @@ export const RobotCard = externalizeComponent(
|
|
|
511
512
|
variant="body1"
|
|
512
513
|
sx={{
|
|
513
514
|
mb: 0,
|
|
514
|
-
color:
|
|
515
|
+
color: theme.palette.text.secondary,
|
|
515
516
|
}}
|
|
516
517
|
>
|
|
517
518
|
{t("RobotCard.Runtime.lb")}
|
|
@@ -58,9 +58,9 @@ export const RobotListItem = externalizeComponent(
|
|
|
58
58
|
<Box
|
|
59
59
|
className={className}
|
|
60
60
|
sx={{
|
|
61
|
-
border:
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
62
|
+
background:
|
|
63
|
+
theme.palette.backgroundPaperElevation?.[8] || "#292B3F",
|
|
64
64
|
height: 80,
|
|
65
65
|
minHeight: "80px",
|
|
66
66
|
borderRadius: "8px",
|
|
@@ -90,10 +90,10 @@ export const RobotListItem = externalizeComponent(
|
|
|
90
90
|
width: 24,
|
|
91
91
|
height: 24,
|
|
92
92
|
"& svg": {
|
|
93
|
-
fill:
|
|
93
|
+
fill: `${theme.palette.primary.main} !important`,
|
|
94
94
|
},
|
|
95
95
|
"& svg path": {
|
|
96
|
-
fill:
|
|
96
|
+
fill: `${theme.palette.primary.main} !important`,
|
|
97
97
|
},
|
|
98
98
|
}}
|
|
99
99
|
>
|
|
@@ -47,7 +47,7 @@ export const RobotSetupReadinessIndicator = externalizeComponent(
|
|
|
47
47
|
backgroundColor:
|
|
48
48
|
theme.palette.backgroundPaperElevation?.[11] ||
|
|
49
49
|
theme.palette.background.paper,
|
|
50
|
-
textColor:
|
|
50
|
+
textColor: theme.palette.secondary.contrastText,
|
|
51
51
|
}
|
|
52
52
|
case RobotSetupReadinessState.ROBOT_DISCONNECTED:
|
|
53
53
|
return {
|
|
@@ -56,7 +56,7 @@ export const RobotSetupReadinessIndicator = externalizeComponent(
|
|
|
56
56
|
backgroundColor:
|
|
57
57
|
theme.palette.backgroundPaperElevation?.[11] ||
|
|
58
58
|
theme.palette.background.paper,
|
|
59
|
-
textColor:
|
|
59
|
+
textColor: theme.palette.secondary.contrastText,
|
|
60
60
|
}
|
|
61
61
|
case RobotSetupReadinessState.PRECONDITION_NOT_FULFILLED:
|
|
62
62
|
default:
|
|
@@ -68,7 +68,7 @@ export const RobotSetupReadinessIndicator = externalizeComponent(
|
|
|
68
68
|
backgroundColor:
|
|
69
69
|
theme.palette.backgroundPaperElevation?.[11] ||
|
|
70
70
|
theme.palette.background.paper,
|
|
71
|
-
textColor:
|
|
71
|
+
textColor: theme.palette.secondary.contrastText,
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|