@wandelbots/wandelbots-js-react-components 2.31.0 → 2.32.0-pr.feature-robot-precondition-list.372.8c2beb0
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/ProgramStateIndicator.d.ts +26 -0
- package/dist/components/ProgramStateIndicator.d.ts.map +1 -0
- package/dist/components/RobotListItem.d.ts +34 -0
- package/dist/components/RobotListItem.d.ts.map +1 -0
- package/dist/components/RobotSetupReadinessIndicator.d.ts +31 -0
- package/dist/components/RobotSetupReadinessIndicator.d.ts.map +1 -0
- package/dist/components/RobotSetupReadinessIndicator.test.d.ts +2 -0
- package/dist/components/RobotSetupReadinessIndicator.test.d.ts.map +1 -0
- package/dist/index.cjs +49 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5578 -5267
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/ProgramStateIndicator.tsx +148 -0
- package/src/components/RobotListItem.tsx +153 -0
- package/src/components/RobotSetupReadinessIndicator.test.tsx +60 -0
- package/src/components/RobotSetupReadinessIndicator.tsx +122 -0
- package/src/i18n/locales/de/translations.json +15 -1
- package/src/i18n/locales/en/translations.json +15 -1
- package/src/index.ts +3 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { RobotControllerStateOperationModeEnum, RobotControllerStateSafetyStateEnum } from "@wandelbots/nova-js/v1";
|
|
2
|
+
import type { ProgramState } from "./ProgramControl";
|
|
3
|
+
export interface ProgramStateIndicatorProps {
|
|
4
|
+
/** The current state of the program */
|
|
5
|
+
programState: ProgramState;
|
|
6
|
+
/** The current safety state of the robot controller */
|
|
7
|
+
safetyState: RobotControllerStateSafetyStateEnum;
|
|
8
|
+
/** The current operation mode of the robot controller */
|
|
9
|
+
operationMode: RobotControllerStateOperationModeEnum;
|
|
10
|
+
/** Additional CSS class name */
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A state indicator component that displays the current program execution state
|
|
15
|
+
* combined with robot controller safety and operation mode states.
|
|
16
|
+
*
|
|
17
|
+
* Features:
|
|
18
|
+
* - Combines program state with safety and operation mode states
|
|
19
|
+
* - Color-coded based on state severity (success, warning, error)
|
|
20
|
+
* - Rendered as Material-UI filled chip
|
|
21
|
+
* - Localization support via react-i18next
|
|
22
|
+
*/
|
|
23
|
+
export declare const ProgramStateIndicator: (({ programState, safetyState, operationMode, className, }: ProgramStateIndicatorProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=ProgramStateIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgramStateIndicator.d.ts","sourceRoot":"","sources":["../../src/components/ProgramStateIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qCAAqC,EACrC,mCAAmC,EACpC,MAAM,wBAAwB,CAAA;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD,MAAM,WAAW,0BAA0B;IACzC,uCAAuC;IACvC,YAAY,EAAE,YAAY,CAAA;IAC1B,uDAAuD;IACvD,WAAW,EAAE,mCAAmC,CAAA;IAChD,yDAAyD;IACzD,aAAa,EAAE,qCAAqC,CAAA;IACpD,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8DAO3B,0BAA0B;;CA6GhC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
import { RobotSetupReadinessState } from "./RobotSetupReadinessIndicator";
|
|
3
|
+
export interface RobotListItemProps {
|
|
4
|
+
/** The name of the robot */
|
|
5
|
+
robotName: string;
|
|
6
|
+
/** The type/model of the robot (will try to derive from nova if not provided) */
|
|
7
|
+
robotType?: string;
|
|
8
|
+
/** The current setup readiness state of the robot */
|
|
9
|
+
setupState: RobotSetupReadinessState;
|
|
10
|
+
/**
|
|
11
|
+
* Component to render for the precondition indicator.
|
|
12
|
+
* Defaults to RobotSetupReadinessIndicator.
|
|
13
|
+
* Pass null or undefined to hide the indicator.
|
|
14
|
+
*/
|
|
15
|
+
PreconditionComponent?: ComponentType<{
|
|
16
|
+
setupState: RobotSetupReadinessState;
|
|
17
|
+
}> | null;
|
|
18
|
+
/** Additional CSS class name */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A list item component that displays robot information and setup readiness state.
|
|
23
|
+
*
|
|
24
|
+
* Features:
|
|
25
|
+
* - Shows robot name, type, and customizable precondition component
|
|
26
|
+
* - Color-coded icon based on readiness state (robot icon for ready, warning for issues)
|
|
27
|
+
* - Styled with consistent border, background, and spacing
|
|
28
|
+
* - Responsive layout with proper spacing and alignment
|
|
29
|
+
* - Flexible precondition component that can be customized or hidden
|
|
30
|
+
*/
|
|
31
|
+
export declare const RobotListItem: (({ robotName, robotType, setupState, PreconditionComponent, className, }: RobotListItemProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=RobotListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RobotListItem.d.ts","sourceRoot":"","sources":["../../src/components/RobotListItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,EAEL,wBAAwB,EACzB,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qDAAqD;IACrD,UAAU,EAAE,wBAAwB,CAAA;IACpC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACpC,UAAU,EAAE,wBAAwB,CAAA;KACrC,CAAC,GAAG,IAAI,CAAA;IACT,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,6EAQnB,kBAAkB;;CAwGxB,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing the robot setup readiness state
|
|
3
|
+
*/
|
|
4
|
+
export declare enum RobotSetupReadinessState {
|
|
5
|
+
/** Preconditions are not fulfilled for robot operation */
|
|
6
|
+
PRECONDITION_NOT_FULFILLED = "PRECONDITION_NOT_FULFILLED",
|
|
7
|
+
/** Robot is disconnected from the system */
|
|
8
|
+
ROBOT_DISCONNECTED = "ROBOT_DISCONNECTED",
|
|
9
|
+
/** Robot is ready for operation */
|
|
10
|
+
READY = "READY"
|
|
11
|
+
}
|
|
12
|
+
export interface RobotSetupReadinessIndicatorProps {
|
|
13
|
+
/** The current setup readiness state of the robot */
|
|
14
|
+
setupState: RobotSetupReadinessState;
|
|
15
|
+
/** Additional CSS class name */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A state indicator component that displays the current robot setup readiness state.
|
|
20
|
+
*
|
|
21
|
+
* Features:
|
|
22
|
+
* - Shows three states: Precondition not fulfilled, Robot disconnected, Ready
|
|
23
|
+
* - Color-coded based on state (ready: tertiary/main, others: error/main)
|
|
24
|
+
* - Rendered as Material-UI filled chip with paper-elevation-11 background
|
|
25
|
+
* - Includes colored circle indicator (8px width)
|
|
26
|
+
* - Localization support via react-i18next
|
|
27
|
+
*/
|
|
28
|
+
export declare const RobotSetupReadinessIndicator: (({ setupState, className }: RobotSetupReadinessIndicatorProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=RobotSetupReadinessIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RobotSetupReadinessIndicator.d.ts","sourceRoot":"","sources":["../../src/components/RobotSetupReadinessIndicator.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,wBAAwB;IAClC,0DAA0D;IAC1D,0BAA0B,+BAA+B;IACzD,4CAA4C;IAC5C,kBAAkB,uBAAuB;IACzC,mCAAmC;IACnC,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,iCAAiC;IAChD,qDAAqD;IACrD,UAAU,EAAE,wBAAwB,CAAA;IACpC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,+BACF,iCAAiC;;CAsFvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RobotSetupReadinessIndicator.test.d.ts","sourceRoot":"","sources":["../../src/components/RobotSetupReadinessIndicator.test.tsx"],"names":[],"mappings":""}
|