@wandelbots/wandelbots-js-react-components 2.34.2-pr.feature-robot-precondition-list.372.9dfd57e → 2.34.2
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 +16 -33
- package/dist/components/CycleTimer.d.ts.map +1 -1
- package/dist/components/ProgramControl.d.ts +2 -8
- package/dist/components/ProgramControl.d.ts.map +1 -1
- package/dist/components/ProgramStateIndicator.d.ts +1 -1
- package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
- package/dist/components/robots/Robot.d.ts +2 -3
- package/dist/components/robots/Robot.d.ts.map +1 -1
- package/dist/icons/index.d.ts +0 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/index.cjs +50 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9576 -11435
- package/dist/index.js.map +1 -1
- package/dist/themes/createDarkTheme.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/components/CycleTimer.tsx +159 -384
- package/src/components/ProgramControl.tsx +12 -27
- package/src/components/ProgramStateIndicator.tsx +8 -25
- package/src/components/robots/Robot.tsx +2 -5
- package/src/i18n/locales/de/translations.json +1 -8
- package/src/i18n/locales/en/translations.json +1 -8
- package/src/icons/index.ts +0 -1
- package/src/index.ts +0 -14
- package/src/themes/createDarkTheme.ts +1 -75
- package/dist/components/AppHeader.d.ts +0 -34
- package/dist/components/AppHeader.d.ts.map +0 -1
- package/dist/components/DataGrid.d.ts +0 -66
- package/dist/components/DataGrid.d.ts.map +0 -1
- package/dist/components/LogPanel.d.ts +0 -38
- package/dist/components/LogPanel.d.ts.map +0 -1
- package/dist/components/LogStore.d.ts +0 -12
- package/dist/components/LogStore.d.ts.map +0 -1
- package/dist/components/LogViewer.d.ts +0 -46
- package/dist/components/LogViewer.d.ts.map +0 -1
- package/dist/components/RobotCard.d.ts +0 -103
- package/dist/components/RobotCard.d.ts.map +0 -1
- package/dist/components/RobotListItem.d.ts +0 -34
- package/dist/components/RobotListItem.d.ts.map +0 -1
- package/dist/components/RobotSetupReadinessIndicator.d.ts +0 -31
- package/dist/components/RobotSetupReadinessIndicator.d.ts.map +0 -1
- package/dist/components/RobotSetupReadinessIndicator.test.d.ts +0 -2
- package/dist/components/RobotSetupReadinessIndicator.test.d.ts.map +0 -1
- package/dist/components/TabBar.d.ts +0 -30
- package/dist/components/TabBar.d.ts.map +0 -1
- package/dist/components/robots/manufacturerHomePositions.d.ts +0 -21
- package/dist/components/robots/manufacturerHomePositions.d.ts.map +0 -1
- package/dist/icons/DropdownArrowIcon.d.ts +0 -3
- package/dist/icons/DropdownArrowIcon.d.ts.map +0 -1
- package/src/components/AppHeader.md +0 -84
- package/src/components/AppHeader.tsx +0 -199
- package/src/components/DataGrid.tsx +0 -659
- package/src/components/LogPanel.tsx +0 -69
- package/src/components/LogStore.ts +0 -44
- package/src/components/LogViewer.tsx +0 -370
- package/src/components/RobotCard.tsx +0 -568
- package/src/components/RobotListItem.tsx +0 -150
- package/src/components/RobotSetupReadinessIndicator.test.tsx +0 -60
- package/src/components/RobotSetupReadinessIndicator.tsx +0 -124
- package/src/components/TabBar.tsx +0 -144
- package/src/components/robots/manufacturerHomePositions.ts +0 -76
- package/src/icons/DropdownArrowIcon.tsx +0 -13
- package/src/icons/chevronDown.svg +0 -3
|
@@ -4,13 +4,7 @@ import { observer } from "mobx-react-lite"
|
|
|
4
4
|
import { useTranslation } from "react-i18next"
|
|
5
5
|
import { externalizeComponent } from "../externalizeComponent"
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
IDLE = "idle",
|
|
9
|
-
RUNNING = "running",
|
|
10
|
-
PAUSED = "paused",
|
|
11
|
-
STOPPING = "stopping",
|
|
12
|
-
ERROR = "error",
|
|
13
|
-
}
|
|
7
|
+
export type ProgramState = "idle" | "running" | "paused" | "stopping"
|
|
14
8
|
|
|
15
9
|
export interface ProgramControlProps {
|
|
16
10
|
/** The current state of the program control */
|
|
@@ -52,7 +46,7 @@ interface ButtonConfig {
|
|
|
52
46
|
* A control component for program execution with run, pause, and stop functionality.
|
|
53
47
|
*
|
|
54
48
|
* Features:
|
|
55
|
-
* - State machine with idle, running, paused,
|
|
49
|
+
* - State machine with idle, running, paused, and stopping states
|
|
56
50
|
* - Two variants: with_pause (3 buttons) and without_pause (2 buttons)
|
|
57
51
|
* - Optional manual reset functionality
|
|
58
52
|
* - Responsive design with 110px circular buttons
|
|
@@ -76,28 +70,22 @@ export const ProgramControl = externalizeComponent(
|
|
|
76
70
|
const getButtonConfigs = (): ButtonConfig[] => {
|
|
77
71
|
const baseConfigs: Record<string, ButtonConfig> = {
|
|
78
72
|
run: {
|
|
79
|
-
enabled:
|
|
80
|
-
state === ProgramState.IDLE ||
|
|
81
|
-
state === ProgramState.PAUSED ||
|
|
82
|
-
state === ProgramState.ERROR,
|
|
73
|
+
enabled: state === "idle" || state === "paused",
|
|
83
74
|
label:
|
|
84
|
-
state ===
|
|
75
|
+
state === "paused"
|
|
85
76
|
? t("ProgramControl.Resume.bt")
|
|
86
|
-
:
|
|
87
|
-
? t("ProgramControl.Retry.bt")
|
|
88
|
-
: t("ProgramControl.Start.bt"),
|
|
77
|
+
: t("ProgramControl.Start.bt"),
|
|
89
78
|
color: theme.palette.success.main,
|
|
90
79
|
onClick: onRun,
|
|
91
80
|
},
|
|
92
81
|
pause: {
|
|
93
|
-
enabled: state ===
|
|
82
|
+
enabled: state === "running",
|
|
94
83
|
label: t("ProgramControl.Pause.bt"),
|
|
95
84
|
color: "#FFFFFF33",
|
|
96
85
|
onClick: onPause || (() => {}),
|
|
97
86
|
},
|
|
98
87
|
stop: {
|
|
99
|
-
enabled:
|
|
100
|
-
state === ProgramState.RUNNING || state === ProgramState.PAUSED,
|
|
88
|
+
enabled: state === "running" || state === "paused",
|
|
101
89
|
label: t("ProgramControl.Stop.bt"),
|
|
102
90
|
color: theme.palette.error.main,
|
|
103
91
|
onClick: onStop,
|
|
@@ -169,7 +157,7 @@ export const ProgramControl = externalizeComponent(
|
|
|
169
157
|
variant="contained"
|
|
170
158
|
disabled={
|
|
171
159
|
!config.enabled ||
|
|
172
|
-
(state ===
|
|
160
|
+
(state === "stopping" && !requiresManualReset)
|
|
173
161
|
}
|
|
174
162
|
onClick={config.onClick}
|
|
175
163
|
sx={{
|
|
@@ -179,17 +167,14 @@ export const ProgramControl = externalizeComponent(
|
|
|
179
167
|
backgroundColor: config.color,
|
|
180
168
|
opacity:
|
|
181
169
|
config.enabled &&
|
|
182
|
-
!(state ===
|
|
170
|
+
!(state === "stopping" && !requiresManualReset)
|
|
183
171
|
? 1
|
|
184
172
|
: 0.3,
|
|
185
173
|
"&:hover": {
|
|
186
174
|
backgroundColor: config.color,
|
|
187
175
|
opacity:
|
|
188
176
|
config.enabled &&
|
|
189
|
-
!(
|
|
190
|
-
state === ProgramState.STOPPING &&
|
|
191
|
-
!requiresManualReset
|
|
192
|
-
)
|
|
177
|
+
!(state === "stopping" && !requiresManualReset)
|
|
193
178
|
? 0.8
|
|
194
179
|
: 0.3,
|
|
195
180
|
},
|
|
@@ -209,13 +194,13 @@ export const ProgramControl = externalizeComponent(
|
|
|
209
194
|
sx={{
|
|
210
195
|
color:
|
|
211
196
|
config.enabled &&
|
|
212
|
-
!(state ===
|
|
197
|
+
!(state === "stopping" && !requiresManualReset)
|
|
213
198
|
? config.color
|
|
214
199
|
: theme.palette.text.disabled,
|
|
215
200
|
textAlign: "center",
|
|
216
201
|
opacity:
|
|
217
202
|
config.enabled &&
|
|
218
|
-
!(state ===
|
|
203
|
+
!(state === "stopping" && !requiresManualReset)
|
|
219
204
|
? 1
|
|
220
205
|
: 0.3,
|
|
221
206
|
}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chip,
|
|
1
|
+
import { Chip, useTheme } from "@mui/material"
|
|
2
2
|
import type {
|
|
3
3
|
RobotControllerStateOperationModeEnum,
|
|
4
4
|
RobotControllerStateSafetyStateEnum,
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
import { observer } from "mobx-react-lite"
|
|
7
7
|
import { useTranslation } from "react-i18next"
|
|
8
8
|
import { externalizeComponent } from "../externalizeComponent"
|
|
9
|
-
import { ProgramState } from "./ProgramControl"
|
|
9
|
+
import type { ProgramState } from "./ProgramControl"
|
|
10
10
|
|
|
11
11
|
export interface ProgramStateIndicatorProps {
|
|
12
12
|
/** The current state of the program */
|
|
@@ -77,27 +77,22 @@ 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
|
|
80
|
+
case "running":
|
|
81
81
|
return {
|
|
82
82
|
label: t("ProgramStateIndicator.Running.lb"),
|
|
83
83
|
color: theme.palette.success.main,
|
|
84
84
|
}
|
|
85
|
-
case
|
|
85
|
+
case "paused":
|
|
86
86
|
return {
|
|
87
87
|
label: t("ProgramStateIndicator.Paused.lb"),
|
|
88
88
|
color: theme.palette.grey[600],
|
|
89
89
|
}
|
|
90
|
-
case
|
|
90
|
+
case "stopping":
|
|
91
91
|
return {
|
|
92
92
|
label: t("ProgramStateIndicator.Stopped.lb"),
|
|
93
93
|
color: theme.palette.error.main,
|
|
94
94
|
}
|
|
95
|
-
case
|
|
96
|
-
return {
|
|
97
|
-
label: t("ProgramStateIndicator.Error.lb"),
|
|
98
|
-
color: theme.palette.error.main,
|
|
99
|
-
}
|
|
100
|
-
case ProgramState.IDLE:
|
|
95
|
+
case "idle":
|
|
101
96
|
default:
|
|
102
97
|
return {
|
|
103
98
|
label: t("ProgramStateIndicator.Ready.lb"),
|
|
@@ -136,26 +131,14 @@ export const ProgramStateIndicator = externalizeComponent(
|
|
|
136
131
|
return (
|
|
137
132
|
<Chip
|
|
138
133
|
className={className}
|
|
139
|
-
label={
|
|
140
|
-
<Typography
|
|
141
|
-
variant="body2"
|
|
142
|
-
sx={{
|
|
143
|
-
fontSize: "0.75rem", // Smaller than body2
|
|
144
|
-
lineHeight: 1.2,
|
|
145
|
-
}}
|
|
146
|
-
>
|
|
147
|
-
{fullLabel}
|
|
148
|
-
</Typography>
|
|
149
|
-
}
|
|
134
|
+
label={fullLabel}
|
|
150
135
|
variant="filled"
|
|
151
136
|
sx={{
|
|
152
137
|
backgroundColor: color,
|
|
153
138
|
color: theme.palette.getContrastText(color),
|
|
154
139
|
fontWeight: 500,
|
|
155
|
-
height: "auto",
|
|
156
140
|
"& .MuiChip-label": {
|
|
157
|
-
paddingX:
|
|
158
|
-
paddingY: 0.5,
|
|
141
|
+
paddingX: 2,
|
|
159
142
|
},
|
|
160
143
|
}}
|
|
161
144
|
/>
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ThreeElements } from "@react-three/fiber"
|
|
2
2
|
|
|
3
3
|
import type { ConnectedMotionGroup } from "@wandelbots/nova-js/v1"
|
|
4
4
|
import type { Group } from "three"
|
|
5
|
-
import { defaultGetModel } from "./robotModelLogic"
|
|
6
5
|
import { SupportedRobot } from "./SupportedRobot"
|
|
6
|
+
import { defaultGetModel } from "./robotModelLogic"
|
|
7
7
|
|
|
8
8
|
export type RobotProps = {
|
|
9
9
|
connectedMotionGroup: ConnectedMotionGroup
|
|
10
10
|
getModel?: (modelFromController: string) => string
|
|
11
11
|
flangeRef?: React.Ref<Group>
|
|
12
12
|
transparentColor?: string
|
|
13
|
-
postModelRender?: () => void
|
|
14
13
|
} & ThreeElements["group"]
|
|
15
14
|
|
|
16
15
|
/**
|
|
@@ -29,7 +28,6 @@ export function Robot({
|
|
|
29
28
|
getModel = defaultGetModel,
|
|
30
29
|
flangeRef,
|
|
31
30
|
transparentColor,
|
|
32
|
-
postModelRender,
|
|
33
31
|
...props
|
|
34
32
|
}: RobotProps) {
|
|
35
33
|
if (!connectedMotionGroup.dhParameters) {
|
|
@@ -46,7 +44,6 @@ export function Robot({
|
|
|
46
44
|
getModel={getModel}
|
|
47
45
|
flangeRef={flangeRef}
|
|
48
46
|
transparentColor={transparentColor}
|
|
49
|
-
postModelRender={postModelRender}
|
|
50
47
|
{...props}
|
|
51
48
|
/>
|
|
52
49
|
)
|
|
@@ -47,10 +47,8 @@
|
|
|
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",
|
|
51
50
|
"ProgramControl.Start.bt": "Start",
|
|
52
51
|
"ProgramControl.Resume.bt": "Weiter",
|
|
53
|
-
"ProgramControl.Retry.bt": "Wiederholen",
|
|
54
52
|
"ProgramControl.Pause.bt": "Pause",
|
|
55
53
|
"ProgramControl.Stop.bt": "Stopp",
|
|
56
54
|
"ProgramStateIndicator.Running.lb": "In Betrieb",
|
|
@@ -63,10 +61,5 @@
|
|
|
63
61
|
"ProgramStateIndicator.Auto.lb": "Auto",
|
|
64
62
|
"ProgramStateIndicator.Manual.lb": "Manuell",
|
|
65
63
|
"ProgramStateIndicator.ManualT1.lb": "Manuell T1",
|
|
66
|
-
"ProgramStateIndicator.ManualT2.lb": "Manuell T2"
|
|
67
|
-
"RobotSetupReadinessIndicator.Ready.lb": "Bereit",
|
|
68
|
-
"RobotSetupReadinessIndicator.RobotDisconnected.lb": "Roboter getrennt",
|
|
69
|
-
"RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb": "Voraussetzung nicht erfüllt",
|
|
70
|
-
"RobotCard.Runtime.lb": "Laufzeit",
|
|
71
|
-
"RobotCard.DriveToHome.bt": "Zur Home-Position fahren"
|
|
64
|
+
"ProgramStateIndicator.ManualT2.lb": "Manuell T2"
|
|
72
65
|
}
|
|
@@ -48,10 +48,8 @@
|
|
|
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",
|
|
52
51
|
"ProgramControl.Start.bt": "Start",
|
|
53
52
|
"ProgramControl.Resume.bt": "Resume",
|
|
54
|
-
"ProgramControl.Retry.bt": "Retry",
|
|
55
53
|
"ProgramControl.Pause.bt": "Pause",
|
|
56
54
|
"ProgramControl.Stop.bt": "Stop",
|
|
57
55
|
"ProgramStateIndicator.Running.lb": "Running",
|
|
@@ -64,10 +62,5 @@
|
|
|
64
62
|
"ProgramStateIndicator.Auto.lb": "Auto",
|
|
65
63
|
"ProgramStateIndicator.Manual.lb": "Manual",
|
|
66
64
|
"ProgramStateIndicator.ManualT1.lb": "Manual T1",
|
|
67
|
-
"ProgramStateIndicator.ManualT2.lb": "Manual T2"
|
|
68
|
-
"RobotSetupReadinessIndicator.Ready.lb": "Ready",
|
|
69
|
-
"RobotSetupReadinessIndicator.RobotDisconnected.lb": "Robot disconnected",
|
|
70
|
-
"RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb": "Precondition not fulfilled",
|
|
71
|
-
"RobotCard.Runtime.lb": "Runtime",
|
|
72
|
-
"RobotCard.DriveToHome.bt": "Drive to Home"
|
|
65
|
+
"ProgramStateIndicator.ManualT2.lb": "Manual T2"
|
|
73
66
|
}
|
package/src/icons/index.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as ArrowForwardFilledIcon } from "./arrowForwardFilled.svg"
|
|
2
|
-
export { default as ChevronDownIcon } from "./chevronDown.svg"
|
|
3
2
|
export { default as ExpandFilledIcon } from "./expandFilled.svg"
|
|
4
3
|
export { default as HomeIcon } from "./home.svg"
|
|
5
4
|
export { default as InfoOutlinedIcon } from "./infoOutlined.svg"
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export * from "./components/3d-viewport/PresetEnvironment"
|
|
2
2
|
export * from "./components/3d-viewport/SafetyZonesRenderer"
|
|
3
3
|
export * from "./components/3d-viewport/TrajectoryRenderer"
|
|
4
|
-
export * from "./components/AppHeader"
|
|
5
4
|
export * from "./components/CycleTimer"
|
|
6
|
-
export * from "./components/DataGrid"
|
|
7
5
|
export * from "./components/jogging/JoggingCartesianAxisControl"
|
|
8
6
|
export * from "./components/jogging/JoggingJointRotationControl"
|
|
9
7
|
export * from "./components/jogging/JoggingPanel"
|
|
@@ -11,27 +9,15 @@ export { JoggingStore } from "./components/jogging/JoggingStore"
|
|
|
11
9
|
export * from "./components/jogging/PoseCartesianValues"
|
|
12
10
|
export * from "./components/jogging/PoseJointValues"
|
|
13
11
|
export * from "./components/LoadingCover"
|
|
14
|
-
export * from "./components/LogPanel"
|
|
15
|
-
export { LogStore } from "./components/LogStore"
|
|
16
|
-
export * from "./components/LogViewer"
|
|
17
12
|
export * from "./components/modal/NoMotionGroupModal"
|
|
18
13
|
export * from "./components/ProgramControl"
|
|
19
14
|
export * from "./components/ProgramStateIndicator"
|
|
20
|
-
export * from "./components/RobotCard"
|
|
21
|
-
export * from "./components/RobotListItem"
|
|
22
15
|
export * from "./components/robots/AxisConfig"
|
|
23
|
-
export {
|
|
24
|
-
extractManufacturer,
|
|
25
|
-
getDefaultHomeConfig,
|
|
26
|
-
MANUFACTURER_HOME_CONFIGS,
|
|
27
|
-
} from "./components/robots/manufacturerHomePositions"
|
|
28
16
|
export * from "./components/robots/Robot"
|
|
29
17
|
export { defaultGetModel } from "./components/robots/robotModelLogic"
|
|
30
18
|
export * from "./components/robots/SupportedRobot"
|
|
31
|
-
export * from "./components/RobotSetupReadinessIndicator"
|
|
32
19
|
export * from "./components/safetyBar/SafetyBar"
|
|
33
20
|
export * from "./components/SelectableFab"
|
|
34
|
-
export * from "./components/TabBar"
|
|
35
21
|
export * from "./components/utils/hooks"
|
|
36
22
|
export * from "./components/utils/interpolation"
|
|
37
23
|
export * from "./components/VelocitySlider"
|
|
@@ -109,80 +109,6 @@ export function createDarkTheme(): Theme {
|
|
|
109
109
|
scrollbarWidth: "thin",
|
|
110
110
|
scrollbarColor: `${baseTheme.palette.divider} transparent`,
|
|
111
111
|
},
|
|
112
|
-
|
|
113
|
-
// Global styles for DataGrid filter popup
|
|
114
|
-
".MuiDataGrid-panelContent": {
|
|
115
|
-
borderRadius: "16px !important",
|
|
116
|
-
"& .MuiPaper-root": {
|
|
117
|
-
borderRadius: "16px !important",
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
".MuiDataGrid-filterForm": {
|
|
121
|
-
borderRadius: "16px !important",
|
|
122
|
-
"& .MuiInputBase-root": {
|
|
123
|
-
borderRadius: "16px !important",
|
|
124
|
-
"& fieldset": {
|
|
125
|
-
borderRadius: "16px !important",
|
|
126
|
-
},
|
|
127
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
128
|
-
borderRadius: "16px !important",
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
"& .MuiTextField-root": {
|
|
132
|
-
"& .MuiInputBase-root": {
|
|
133
|
-
borderRadius: "16px !important",
|
|
134
|
-
"& fieldset": {
|
|
135
|
-
borderRadius: "16px !important",
|
|
136
|
-
},
|
|
137
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
138
|
-
borderRadius: "16px !important",
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
".MuiDataGrid-filterFormValueInput": {
|
|
144
|
-
"& .MuiInputBase-root": {
|
|
145
|
-
borderRadius: "16px !important",
|
|
146
|
-
"& fieldset": {
|
|
147
|
-
borderRadius: "16px !important",
|
|
148
|
-
},
|
|
149
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
150
|
-
borderRadius: "16px !important",
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
MuiDataGrid: {
|
|
157
|
-
styleOverrides: {
|
|
158
|
-
root: {
|
|
159
|
-
// Main DataGrid styling can go here if needed
|
|
160
|
-
},
|
|
161
|
-
panelContent: {
|
|
162
|
-
borderRadius: "16px !important",
|
|
163
|
-
},
|
|
164
|
-
filterForm: {
|
|
165
|
-
"& .MuiInputBase-root": {
|
|
166
|
-
borderRadius: "10px !important",
|
|
167
|
-
"& fieldset": {
|
|
168
|
-
borderRadius: "10px !important",
|
|
169
|
-
},
|
|
170
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
171
|
-
borderRadius: "10px !important",
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
filterFormValueInput: {
|
|
176
|
-
"& .MuiInputBase-root": {
|
|
177
|
-
borderRadius: "10px !important",
|
|
178
|
-
"& fieldset": {
|
|
179
|
-
borderRadius: "10px !important",
|
|
180
|
-
},
|
|
181
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
182
|
-
borderRadius: "10px !important",
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
112
|
},
|
|
187
113
|
},
|
|
188
114
|
MuiButton: {
|
|
@@ -361,5 +287,5 @@ export function createDarkTheme(): Theme {
|
|
|
361
287
|
},
|
|
362
288
|
},
|
|
363
289
|
},
|
|
364
|
-
}
|
|
290
|
+
}
|
|
365
291
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type SxProps } from "@mui/material";
|
|
2
|
-
import { type ReactNode } from "react";
|
|
3
|
-
export type AppItem = {
|
|
4
|
-
/** Unique identifier for the app */
|
|
5
|
-
id: string;
|
|
6
|
-
/** Display name of the app */
|
|
7
|
-
name: string;
|
|
8
|
-
/** Icon component to display */
|
|
9
|
-
icon: ReactNode;
|
|
10
|
-
/** URL or callback to navigate to the app */
|
|
11
|
-
href?: string;
|
|
12
|
-
/** Click handler for the app */
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
};
|
|
15
|
-
export type AppHeaderProps = {
|
|
16
|
-
/** Current app icon */
|
|
17
|
-
appIcon: ReactNode;
|
|
18
|
-
/** Current app name */
|
|
19
|
-
appName: string;
|
|
20
|
-
/** List of other available apps */
|
|
21
|
-
apps?: AppItem[];
|
|
22
|
-
/** Callback when an app is selected */
|
|
23
|
-
onAppSelect?: (app: AppItem) => void;
|
|
24
|
-
/** Additional styling */
|
|
25
|
-
sx?: SxProps;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* A top navigation header component that displays the current app and provides
|
|
29
|
-
* a dropdown menu to navigate to other apps.
|
|
30
|
-
*/
|
|
31
|
-
export declare const AppHeader: ((props: AppHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
32
|
-
displayName: string;
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=AppHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../src/components/AppHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,OAAO,EAGb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAmB,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AAIjE,MAAM,MAAM,OAAO,GAAG;IACpB,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,gCAAgC;IAChC,IAAI,EAAE,SAAS,CAAA;IACf,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,uBAAuB;IACvB,OAAO,EAAE,SAAS,CAAA;IAClB,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,mCAAmC;IACnC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;IAChB,uCAAuC;IACvC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;IACpC,yBAAyB;IACzB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,WACH,cAAc;;CAsJhC,CAAA"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Box } from "@mui/material";
|
|
2
|
-
import { type DataGridProps, type GridColDef, type GridRowParams } from "@mui/x-data-grid";
|
|
3
|
-
export interface WandelbotsDataGridProps<T = Record<string, unknown>> {
|
|
4
|
-
/**
|
|
5
|
-
* Array of data items to display in the grid
|
|
6
|
-
*/
|
|
7
|
-
data: T[];
|
|
8
|
-
/**
|
|
9
|
-
* Column definitions for the DataGrid
|
|
10
|
-
*/
|
|
11
|
-
columns: GridColDef[];
|
|
12
|
-
/**
|
|
13
|
-
* Function to transform data items into DataGrid rows
|
|
14
|
-
* Should return an object with an 'id' field and other fields matching column definitions
|
|
15
|
-
*/
|
|
16
|
-
getRowData: (item: T) => Record<string, unknown> & {
|
|
17
|
-
id: string | number;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Callback when a row is clicked
|
|
21
|
-
*/
|
|
22
|
-
onRowClick?: (item: T, params: GridRowParams) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Currently selected item (for highlighting)
|
|
25
|
-
*/
|
|
26
|
-
selectedItem?: T | null;
|
|
27
|
-
/**
|
|
28
|
-
* Function to get the ID of an item (used for selection highlighting)
|
|
29
|
-
*/
|
|
30
|
-
getItemId?: (item: T) => string | number;
|
|
31
|
-
/**
|
|
32
|
-
* Title displayed in the toolbar
|
|
33
|
-
*/
|
|
34
|
-
title?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Show item count in title
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
showCount?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Placeholder text for the search input
|
|
42
|
-
* @default "Search programs"
|
|
43
|
-
*/
|
|
44
|
-
searchPlaceholder?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Additional DataGrid props to pass through
|
|
47
|
-
*/
|
|
48
|
-
dataGridProps?: Partial<DataGridProps>;
|
|
49
|
-
/**
|
|
50
|
-
* Custom toolbar component to replace the default one
|
|
51
|
-
*/
|
|
52
|
-
CustomToolbar?: React.ComponentType;
|
|
53
|
-
/**
|
|
54
|
-
* Select the first item by default
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
selectFirstByDefault?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Custom sx styles for the root container
|
|
60
|
-
*/
|
|
61
|
-
sx?: React.ComponentProps<typeof Box>["sx"];
|
|
62
|
-
}
|
|
63
|
-
export declare const WandelbotsDataGrid: (<T>({ data, columns, getRowData, onRowClick, selectedItem, getItemId, title, showCount, searchPlaceholder, dataGridProps, CustomToolbar, selectFirstByDefault, sx, }: WandelbotsDataGridProps<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
64
|
-
displayName: string;
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=DataGrid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../src/components/DataGrid.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAiC,MAAM,eAAe,CAAA;AAClE,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,UAAU,EACf,KAAK,aAAa,EAQnB,MAAM,kBAAkB,CAAA;AAKzB,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,CAAC,EAAE,CAAA;IAET;;OAEG;IACH,OAAO,EAAE,UAAU,EAAE,CAAA;IAErB;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAE1E;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;IAErD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,CAAA;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAEtC;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAEnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;CAC5C;AAED,eAAO,MAAM,kBAAkB,IAE1B,CAAC,oKAcC,uBAAuB,CAAC,CAAC,CAAC;;CAmiBhC,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { SxProps } from "@mui/material";
|
|
2
|
-
import { LogStore } from "./LogStore";
|
|
3
|
-
export type LogPanelProps = {
|
|
4
|
-
/** Log store instance to use, or create one automatically if not provided */
|
|
5
|
-
store?: LogStore;
|
|
6
|
-
/** Height of the component */
|
|
7
|
-
height?: string | number;
|
|
8
|
-
/** Additional styles */
|
|
9
|
-
sx?: SxProps;
|
|
10
|
-
/** Ref to the log store for external access */
|
|
11
|
-
onStoreReady?: (store: LogStore) => void;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* A complete log panel component with built-in state management.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* function MyComponent() {
|
|
19
|
-
* const [logStore, setLogStore] = useState<LogStore>()
|
|
20
|
-
*
|
|
21
|
-
* return (
|
|
22
|
-
* <LogPanel
|
|
23
|
-
* height={400}
|
|
24
|
-
* onStoreReady={setLogStore}
|
|
25
|
-
* />
|
|
26
|
-
* )
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* // Then use the store to add messages
|
|
30
|
-
* logStore?.addInfo("Operation completed successfully")
|
|
31
|
-
* logStore?.addError("Something went wrong")
|
|
32
|
-
* logStore?.addWarning("Warning message")
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare const LogPanel: ((props: LogPanelProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
36
|
-
displayName: string;
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=LogPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogPanel.d.ts","sourceRoot":"","sources":["../../src/components/LogPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAI5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,MAAM,MAAM,aAAa,GAAG;IAC1B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,wBAAwB;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,+CAA+C;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAA;CACzC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,WACF,aAAa;;CA2B/B,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { LogLevel, LogMessage } from "./LogViewer";
|
|
2
|
-
export declare class LogStore {
|
|
3
|
-
messages: LogMessage[];
|
|
4
|
-
constructor();
|
|
5
|
-
addMessage: (message: string, level?: LogLevel) => void;
|
|
6
|
-
clearMessages: () => void;
|
|
7
|
-
addInfo: (message: string) => void;
|
|
8
|
-
addWarning: (message: string) => void;
|
|
9
|
-
addError: (message: string) => void;
|
|
10
|
-
addDebug: (message: string) => void;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=LogStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogStore.d.ts","sourceRoot":"","sources":["../../src/components/LogStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,qBAAa,QAAQ;IACnB,QAAQ,EAAE,UAAU,EAAE,CAAK;;IAU3B,UAAU,GAAI,SAAS,MAAM,EAAE,QAAO,QAAiB,UAQtD;IAED,aAAa,aAEZ;IAED,OAAO,GAAI,SAAS,MAAM,UAEzB;IAED,UAAU,GAAI,SAAS,MAAM,UAE5B;IAED,QAAQ,GAAI,SAAS,MAAM,UAE1B;IAED,QAAQ,GAAI,SAAS,MAAM,UAE1B;CACF"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { SxProps } from "@mui/material";
|
|
2
|
-
export type LogLevel = "info" | "error" | "warning" | "debug";
|
|
3
|
-
export type LogMessage = {
|
|
4
|
-
id: string;
|
|
5
|
-
timestamp: Date;
|
|
6
|
-
message: string;
|
|
7
|
-
level: LogLevel;
|
|
8
|
-
};
|
|
9
|
-
export type LogViewerProps = {
|
|
10
|
-
/** Log messages to display */
|
|
11
|
-
messages: LogMessage[];
|
|
12
|
-
/** Callback when clear button is clicked */
|
|
13
|
-
onClear?: () => void;
|
|
14
|
-
/** Height of the component */
|
|
15
|
-
height?: string | number;
|
|
16
|
-
/** Additional styles */
|
|
17
|
-
sx?: SxProps;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Utility function to create a log message
|
|
21
|
-
*/
|
|
22
|
-
export declare const createLogMessage: (message: string, level: LogLevel, id?: string) => LogMessage;
|
|
23
|
-
/**
|
|
24
|
-
* Utility function to create a debug log message
|
|
25
|
-
*/
|
|
26
|
-
export declare const createDebugMessage: (message: string, id?: string) => LogMessage;
|
|
27
|
-
/**
|
|
28
|
-
* Utility function to create an info log message
|
|
29
|
-
*/
|
|
30
|
-
export declare const createInfoMessage: (message: string, id?: string) => LogMessage;
|
|
31
|
-
/**
|
|
32
|
-
* Utility function to create a warning log message
|
|
33
|
-
*/
|
|
34
|
-
export declare const createWarningMessage: (message: string, id?: string) => LogMessage;
|
|
35
|
-
/**
|
|
36
|
-
* Utility function to create an error log message
|
|
37
|
-
*/
|
|
38
|
-
export declare const createErrorMessage: (message: string, id?: string) => LogMessage;
|
|
39
|
-
/**
|
|
40
|
-
* A log viewer component that displays timestamped log messages with different levels.
|
|
41
|
-
* Features a header with document icon and clear button, and scrollable message area.
|
|
42
|
-
*/
|
|
43
|
-
export declare const LogViewer: ((props: LogViewerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
44
|
-
displayName: string;
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=LogViewer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogViewer.d.ts","sourceRoot":"","sources":["../../src/components/LogViewer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAa5C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;AAE7D,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,IAAI,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,UAAU,EAAE,CAAA;IACtB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,wBAAwB;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,MAAM,EACf,OAAO,QAAQ,EACf,KAAK,MAAM,KACV,UAKD,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,KAAK,MAAM,KAAG,UAC1B,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,EAAE,KAAK,MAAM,KAAG,UAC1B,CAAA;AAEvC;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,KAAK,MAAM,KACV,UAAsD,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,KAAK,MAAM,KAAG,UAC1B,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,SAAS,WACH,cAAc;;CA6RhC,CAAA"}
|