Implement native BPMN workflows and guided modes
This commit is contained in:
@@ -1,4 +1,33 @@
|
||||
import {
|
||||
Asterisk,
|
||||
BadgeDollarSign,
|
||||
BoxSelect,
|
||||
Braces,
|
||||
CircleDashed,
|
||||
CircleDot,
|
||||
CircleDotDashed,
|
||||
CirclePlus,
|
||||
CircleStop,
|
||||
Cog,
|
||||
Database,
|
||||
Diamond,
|
||||
ExternalLink,
|
||||
File,
|
||||
FileCode2,
|
||||
GitBranch,
|
||||
Hand,
|
||||
Inbox,
|
||||
MessagesSquare,
|
||||
Plus,
|
||||
RadioTower,
|
||||
RectangleHorizontal,
|
||||
Rows3,
|
||||
Scale,
|
||||
Send,
|
||||
Shuffle,
|
||||
Square,
|
||||
TextQuote,
|
||||
UserRoundCheck,
|
||||
CalendarClock,
|
||||
CheckCircle2,
|
||||
CirclePlay,
|
||||
@@ -41,7 +70,36 @@ const iconByName: Record<string, LucideIcon> = {
|
||||
split: Split,
|
||||
"square-check-big": SquareCheckBig,
|
||||
timer: Timer,
|
||||
waypoints: Waypoints
|
||||
waypoints: Waypoints,
|
||||
asterisk: Asterisk,
|
||||
"badge-dollar-sign": BadgeDollarSign,
|
||||
"box-select": BoxSelect,
|
||||
braces: Braces,
|
||||
"circle-dashed": CircleDashed,
|
||||
"circle-dot": CircleDot,
|
||||
"circle-dot-dashed": CircleDotDashed,
|
||||
"circle-plus": CirclePlus,
|
||||
"circle-stop": CircleStop,
|
||||
cog: Cog,
|
||||
database: Database,
|
||||
diamond: Diamond,
|
||||
"external-link": ExternalLink,
|
||||
file: File,
|
||||
"file-code-2": FileCode2,
|
||||
"git-branch": GitBranch,
|
||||
hand: Hand,
|
||||
inbox: Inbox,
|
||||
"messages-square": MessagesSquare,
|
||||
plus: Plus,
|
||||
"radio-tower": RadioTower,
|
||||
"rectangle-horizontal": RectangleHorizontal,
|
||||
"rows-3": Rows3,
|
||||
scale: Scale,
|
||||
send: Send,
|
||||
shuffle: Shuffle,
|
||||
square: Square,
|
||||
"text-quote": TextQuote,
|
||||
"user-round-check": UserRoundCheck
|
||||
};
|
||||
|
||||
export default function WorkflowNode({
|
||||
@@ -50,6 +108,7 @@ export default function WorkflowNode({
|
||||
isConnectable
|
||||
}: NodeProps<WorkflowFlowNode>) {
|
||||
const Icon = iconByName[data.definition.icon] ?? GitFork;
|
||||
const shape = String(data.definition.metadata?.shape ?? "activity");
|
||||
const inputPorts = data.definition.input_ports;
|
||||
const outputPorts = data.definition.output_ports;
|
||||
return (
|
||||
@@ -57,6 +116,7 @@ export default function WorkflowNode({
|
||||
className={[
|
||||
"workflow-node",
|
||||
`workflow-node-${data.definition.category}`,
|
||||
`workflow-node-shape-${shape}`,
|
||||
selected ? "is-selected" : "",
|
||||
data.hasError ? "has-error" : ""
|
||||
].filter(Boolean).join(" ")}
|
||||
|
||||
Reference in New Issue
Block a user