nucleus-core-ts 0.8.106 → 0.8.108
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/fe/components/LoginPage/components/LoginForm.js +1 -1
- package/dist/fe/components/VerificationFlowPage/components/FlowNode.d.ts +15 -0
- package/dist/fe/components/VerificationFlowPage/components/FlowNode.js +111 -0
- package/dist/fe/components/VerificationFlowPage/components/PendingTab.d.ts +10 -0
- package/dist/fe/components/VerificationFlowPage/components/PendingTab.js +157 -0
- package/dist/fe/components/VerificationFlowPage/components/VerificationFlowPage.d.ts +5 -0
- package/dist/fe/components/VerificationFlowPage/components/VerificationFlowPage.js +474 -0
- package/dist/fe/components/VerificationFlowPage/index.d.ts +8 -0
- package/dist/fe/components/VerificationFlowPage/index.js +5 -0
- package/dist/fe/components/VerificationFlowPage/store/index.d.ts +23 -0
- package/dist/fe/components/VerificationFlowPage/store/index.js +70 -0
- package/dist/fe/components/VerificationFlowPage/theme/index.d.ts +99 -0
- package/dist/fe/components/VerificationFlowPage/theme/index.js +138 -0
- package/dist/fe/components/VerificationFlowPage/types/index.d.ts +111 -0
- package/dist/fe/components/VerificationFlowPage/types/index.js +1 -0
- package/dist/fe/index.d.ts +2 -0
- package/dist/fe/index.js +1 -0
- package/package.json +3 -2
|
@@ -140,7 +140,7 @@ export function LoginForm({ loginAction, captchaGenerateAction, captchaConfig, s
|
|
|
140
140
|
generateAction: captchaGenerateAction,
|
|
141
141
|
config: captchaConfig,
|
|
142
142
|
onChallengeLoad: (challenge)=>{
|
|
143
|
-
store.setCaptchaId(challenge.challengeId);
|
|
143
|
+
store.setCaptchaId(challenge.data?.challengeId ?? "");
|
|
144
144
|
store.setCaptchaAnswer("");
|
|
145
145
|
},
|
|
146
146
|
onAnswerChange: (_, answer)=>{
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
interface FlowNodeData {
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
nodeType: string;
|
|
6
|
+
stepOrder: number;
|
|
7
|
+
decision: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function FlowNode({ data }: {
|
|
12
|
+
data: FlowNodeData;
|
|
13
|
+
}): ReactElement;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=FlowNode.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Handle, Position } from "@xyflow/react";
|
|
4
|
+
import { cn } from "../../../utils/cn";
|
|
5
|
+
import { verificationFlowPageTheme } from "../theme";
|
|
6
|
+
const StepIcon = ({ className })=>/*#__PURE__*/ _jsxs("svg", {
|
|
7
|
+
className: className,
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ _jsx("title", {
|
|
13
|
+
children: "Step"
|
|
14
|
+
}),
|
|
15
|
+
/*#__PURE__*/ _jsx("path", {
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
strokeWidth: 2,
|
|
19
|
+
d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
const VerifierIcon = ({ className })=>/*#__PURE__*/ _jsxs("svg", {
|
|
24
|
+
className: className,
|
|
25
|
+
fill: "none",
|
|
26
|
+
viewBox: "0 0 24 24",
|
|
27
|
+
stroke: "currentColor",
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ _jsx("title", {
|
|
30
|
+
children: "Verifier"
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ _jsx("path", {
|
|
33
|
+
strokeLinecap: "round",
|
|
34
|
+
strokeLinejoin: "round",
|
|
35
|
+
strokeWidth: 2,
|
|
36
|
+
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
const NotificationIcon = ({ className })=>/*#__PURE__*/ _jsxs("svg", {
|
|
41
|
+
className: className,
|
|
42
|
+
fill: "none",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
stroke: "currentColor",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ _jsx("title", {
|
|
47
|
+
children: "Notification"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx("path", {
|
|
50
|
+
strokeLinecap: "round",
|
|
51
|
+
strokeLinejoin: "round",
|
|
52
|
+
strokeWidth: 2,
|
|
53
|
+
d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
const iconMap = {
|
|
58
|
+
step: StepIcon,
|
|
59
|
+
verifier: VerifierIcon,
|
|
60
|
+
notification: NotificationIcon
|
|
61
|
+
};
|
|
62
|
+
export function FlowNode({ data }) {
|
|
63
|
+
const theme = verificationFlowPageTheme;
|
|
64
|
+
const nodeType = data.nodeType || "step";
|
|
65
|
+
const colorKey = nodeType;
|
|
66
|
+
const colors = colorKey in theme.node ? theme.node[colorKey] : theme.node.step;
|
|
67
|
+
const decision = data.decision;
|
|
68
|
+
const isActive = data.isActive;
|
|
69
|
+
const Icon = iconMap[nodeType] || StepIcon;
|
|
70
|
+
const badgeKey = decision || (isActive ? "active" : "");
|
|
71
|
+
const badgeClass = badgeKey in theme.node.badge ? theme.node.badge[badgeKey] : "";
|
|
72
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
73
|
+
className: cn(theme.node.base, colors.border, colors.bg, isActive && !decision ? theme.node.activeRing : ""),
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ _jsx(Handle, {
|
|
76
|
+
type: "target",
|
|
77
|
+
position: Position.Top,
|
|
78
|
+
className: theme.node.handle
|
|
79
|
+
}),
|
|
80
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
81
|
+
className: "flex items-center gap-2 mb-1",
|
|
82
|
+
children: [
|
|
83
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
84
|
+
className: cn("w-4 h-4", colors.icon)
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ _jsx("span", {
|
|
87
|
+
className: theme.node.typeLabel,
|
|
88
|
+
children: nodeType
|
|
89
|
+
}),
|
|
90
|
+
badgeClass && /*#__PURE__*/ _jsx("span", {
|
|
91
|
+
className: cn("ml-auto text-[10px] font-bold px-1.5 py-0.5 rounded-full", badgeClass),
|
|
92
|
+
children: decision || "active"
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
96
|
+
/*#__PURE__*/ _jsx("p", {
|
|
97
|
+
className: theme.node.nameLabel,
|
|
98
|
+
children: data.label || `Step ${data.stepOrder}`
|
|
99
|
+
}),
|
|
100
|
+
data.description ? /*#__PURE__*/ _jsx("p", {
|
|
101
|
+
className: theme.node.description,
|
|
102
|
+
children: String(data.description)
|
|
103
|
+
}) : null,
|
|
104
|
+
/*#__PURE__*/ _jsx(Handle, {
|
|
105
|
+
type: "source",
|
|
106
|
+
position: Position.Bottom,
|
|
107
|
+
className: theme.node.handle
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { VerificationDecideAction, VerificationPendingAction } from "../types";
|
|
3
|
+
interface PendingTabProps {
|
|
4
|
+
pendingAction: VerificationPendingAction;
|
|
5
|
+
decideAction: VerificationDecideAction;
|
|
6
|
+
onDecisionMade?: (entityName: string, entityId: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function PendingTab({ pendingAction, decideAction, onDecisionMade, }: PendingTabProps): ReactElement;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=PendingTab.d.ts.map
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useEffectEvent } from "react";
|
|
4
|
+
import { useVerificationFlowStore } from "../store";
|
|
5
|
+
import { verificationFlowPageTheme } from "../theme";
|
|
6
|
+
export function PendingTab({ pendingAction, decideAction, onDecisionMade }) {
|
|
7
|
+
const theme = verificationFlowPageTheme;
|
|
8
|
+
const store = useVerificationFlowStore();
|
|
9
|
+
const loadPending = useEffectEvent(()=>{
|
|
10
|
+
store.setLoadingPending(true);
|
|
11
|
+
pendingAction.start({
|
|
12
|
+
payload: undefined,
|
|
13
|
+
onAfterHandle: (res)=>{
|
|
14
|
+
const data = res.data;
|
|
15
|
+
store.setPendingItems(data ?? []);
|
|
16
|
+
store.setLoadingPending(false);
|
|
17
|
+
},
|
|
18
|
+
onErrorHandle: ()=>{
|
|
19
|
+
store.setLoadingPending(false);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
useEffect(()=>{
|
|
24
|
+
loadPending();
|
|
25
|
+
}, []);
|
|
26
|
+
const handleDecide = useEffectEvent((item, decision)=>{
|
|
27
|
+
decideAction.start({
|
|
28
|
+
payload: {
|
|
29
|
+
entity_name: item.entity_name,
|
|
30
|
+
entity_id: item.entity_id,
|
|
31
|
+
decision,
|
|
32
|
+
reason: store.decisionReason || undefined
|
|
33
|
+
},
|
|
34
|
+
onAfterHandle: ()=>{
|
|
35
|
+
store.setDecidingId(null);
|
|
36
|
+
store.setDecisionReason("");
|
|
37
|
+
onDecisionMade?.(item.entity_name, item.entity_id);
|
|
38
|
+
loadPending();
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
if (store.isLoadingPending) {
|
|
43
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
44
|
+
className: "flex items-center justify-center py-20",
|
|
45
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
46
|
+
className: theme.loading.spinner
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (store.pendingItems.length === 0) {
|
|
51
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
52
|
+
className: theme.pending.empty.container,
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ _jsxs("svg", {
|
|
55
|
+
className: theme.pending.empty.icon,
|
|
56
|
+
fill: "none",
|
|
57
|
+
viewBox: "0 0 24 24",
|
|
58
|
+
stroke: "currentColor",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ _jsx("title", {
|
|
61
|
+
children: "No pending items"
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ _jsx("path", {
|
|
64
|
+
strokeLinecap: "round",
|
|
65
|
+
strokeLinejoin: "round",
|
|
66
|
+
strokeWidth: 1,
|
|
67
|
+
d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx("p", {
|
|
72
|
+
className: theme.pending.empty.text,
|
|
73
|
+
children: "No pending verifications"
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
79
|
+
className: theme.pending.container,
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ _jsxs("h2", {
|
|
82
|
+
className: theme.pending.title,
|
|
83
|
+
children: [
|
|
84
|
+
"Pending Approvals (",
|
|
85
|
+
store.pendingItems.length,
|
|
86
|
+
")"
|
|
87
|
+
]
|
|
88
|
+
}),
|
|
89
|
+
store.pendingItems.map((item)=>/*#__PURE__*/ _jsx("div", {
|
|
90
|
+
className: theme.pending.card.container,
|
|
91
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
92
|
+
className: "flex items-center justify-between",
|
|
93
|
+
children: [
|
|
94
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
95
|
+
children: [
|
|
96
|
+
/*#__PURE__*/ _jsxs("p", {
|
|
97
|
+
className: theme.pending.card.title,
|
|
98
|
+
children: [
|
|
99
|
+
item.flow_name,
|
|
100
|
+
" — Step ",
|
|
101
|
+
item.step_order
|
|
102
|
+
]
|
|
103
|
+
}),
|
|
104
|
+
/*#__PURE__*/ _jsxs("p", {
|
|
105
|
+
className: theme.pending.card.subtitle,
|
|
106
|
+
children: [
|
|
107
|
+
item.entity_name,
|
|
108
|
+
"/",
|
|
109
|
+
item.entity_id
|
|
110
|
+
]
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
}),
|
|
114
|
+
store.decidingId === item.instance_id ? /*#__PURE__*/ _jsxs("div", {
|
|
115
|
+
className: theme.pending.card.actions,
|
|
116
|
+
children: [
|
|
117
|
+
/*#__PURE__*/ _jsx("input", {
|
|
118
|
+
type: "text",
|
|
119
|
+
placeholder: "Reason (optional)",
|
|
120
|
+
value: store.decisionReason,
|
|
121
|
+
onChange: (e)=>store.setDecisionReason(e.target.value),
|
|
122
|
+
className: theme.pending.input
|
|
123
|
+
}),
|
|
124
|
+
/*#__PURE__*/ _jsx("button", {
|
|
125
|
+
type: "button",
|
|
126
|
+
onClick: ()=>handleDecide(item, "approved"),
|
|
127
|
+
className: theme.pending.approveButton,
|
|
128
|
+
children: "Approve"
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ _jsx("button", {
|
|
131
|
+
type: "button",
|
|
132
|
+
onClick: ()=>handleDecide(item, "rejected"),
|
|
133
|
+
className: theme.pending.rejectButton,
|
|
134
|
+
children: "Reject"
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ _jsx("button", {
|
|
137
|
+
type: "button",
|
|
138
|
+
onClick: ()=>{
|
|
139
|
+
store.setDecidingId(null);
|
|
140
|
+
store.setDecisionReason("");
|
|
141
|
+
},
|
|
142
|
+
className: theme.pending.cancelButton,
|
|
143
|
+
children: "Cancel"
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
}) : /*#__PURE__*/ _jsx("button", {
|
|
147
|
+
type: "button",
|
|
148
|
+
onClick: ()=>store.setDecidingId(item.instance_id),
|
|
149
|
+
className: theme.pending.reviewButton,
|
|
150
|
+
children: "Review"
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
})
|
|
154
|
+
}, `${item.instance_id}-${item.step_order}`))
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "@xyflow/react/dist/style.css";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { VerificationFlowPageProps } from "../types";
|
|
4
|
+
export declare function VerificationFlowPage({ entityName, title, subtitle, flowListAction, flowGetAction, pendingAction, decideAction, onFlowSelected, onDecisionMade, showPending, className, }: VerificationFlowPageProps): ReactElement;
|
|
5
|
+
//# sourceMappingURL=VerificationFlowPage.d.ts.map
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ReactFlow, Background, Controls, MiniMap, MarkerType } from "@xyflow/react";
|
|
4
|
+
import "@xyflow/react/dist/style.css";
|
|
5
|
+
import { useEffect, useEffectEvent, useState } from "react";
|
|
6
|
+
import { cn } from "../../../utils/cn";
|
|
7
|
+
import { useVerificationFlowStore } from "../store";
|
|
8
|
+
import { verificationFlowPageTheme } from "../theme";
|
|
9
|
+
import { FlowNode } from "./FlowNode";
|
|
10
|
+
import { PendingTab } from "./PendingTab";
|
|
11
|
+
const nodeTypes = {
|
|
12
|
+
step: FlowNode,
|
|
13
|
+
verifier: FlowNode,
|
|
14
|
+
notification: FlowNode
|
|
15
|
+
};
|
|
16
|
+
function stepsToNodes(steps) {
|
|
17
|
+
return steps.map((s)=>({
|
|
18
|
+
id: s.node_id,
|
|
19
|
+
type: s.node_type,
|
|
20
|
+
position: {
|
|
21
|
+
x: s.position_x,
|
|
22
|
+
y: s.position_y
|
|
23
|
+
},
|
|
24
|
+
...s.width && s.height ? {
|
|
25
|
+
width: s.width,
|
|
26
|
+
height: s.height
|
|
27
|
+
} : {},
|
|
28
|
+
data: {
|
|
29
|
+
label: s.name || `Step ${s.step_order}`,
|
|
30
|
+
description: s.description || "",
|
|
31
|
+
nodeType: s.node_type,
|
|
32
|
+
stepOrder: s.step_order,
|
|
33
|
+
decision: "",
|
|
34
|
+
isActive: false
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
function edgesToFlow(flowEdges) {
|
|
39
|
+
return flowEdges.map((e)=>({
|
|
40
|
+
id: e.edge_id,
|
|
41
|
+
source: e.source_node_id,
|
|
42
|
+
target: e.target_node_id,
|
|
43
|
+
sourceHandle: e.source_handle || undefined,
|
|
44
|
+
targetHandle: e.target_handle || undefined,
|
|
45
|
+
type: "smoothstep",
|
|
46
|
+
animated: e.animated ?? true,
|
|
47
|
+
label: e.label || undefined,
|
|
48
|
+
markerEnd: {
|
|
49
|
+
type: MarkerType.ArrowClosed,
|
|
50
|
+
width: 16,
|
|
51
|
+
height: 16
|
|
52
|
+
},
|
|
53
|
+
style: {
|
|
54
|
+
stroke: "#94a3b8",
|
|
55
|
+
strokeWidth: 2
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
function generateDemoFlow() {
|
|
60
|
+
const nodes = [
|
|
61
|
+
{
|
|
62
|
+
id: "start",
|
|
63
|
+
type: "step",
|
|
64
|
+
position: {
|
|
65
|
+
x: 250,
|
|
66
|
+
y: 0
|
|
67
|
+
},
|
|
68
|
+
data: {
|
|
69
|
+
label: "Entity Created",
|
|
70
|
+
nodeType: "step",
|
|
71
|
+
stepOrder: 0,
|
|
72
|
+
description: "Trigger: on create",
|
|
73
|
+
decision: "",
|
|
74
|
+
isActive: false
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "review",
|
|
79
|
+
type: "step",
|
|
80
|
+
position: {
|
|
81
|
+
x: 250,
|
|
82
|
+
y: 120
|
|
83
|
+
},
|
|
84
|
+
data: {
|
|
85
|
+
label: "Initial Review",
|
|
86
|
+
nodeType: "step",
|
|
87
|
+
stepOrder: 1,
|
|
88
|
+
description: "First review step",
|
|
89
|
+
decision: "",
|
|
90
|
+
isActive: false
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "reviewer1",
|
|
95
|
+
type: "verifier",
|
|
96
|
+
position: {
|
|
97
|
+
x: 50,
|
|
98
|
+
y: 260
|
|
99
|
+
},
|
|
100
|
+
data: {
|
|
101
|
+
label: "Manager Approval",
|
|
102
|
+
nodeType: "verifier",
|
|
103
|
+
stepOrder: 1,
|
|
104
|
+
description: "Role: manager",
|
|
105
|
+
decision: "",
|
|
106
|
+
isActive: false
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "reviewer2",
|
|
111
|
+
type: "verifier",
|
|
112
|
+
position: {
|
|
113
|
+
x: 450,
|
|
114
|
+
y: 260
|
|
115
|
+
},
|
|
116
|
+
data: {
|
|
117
|
+
label: "QA Check",
|
|
118
|
+
nodeType: "verifier",
|
|
119
|
+
stepOrder: 2,
|
|
120
|
+
description: "Role: qa_team",
|
|
121
|
+
decision: "",
|
|
122
|
+
isActive: false
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "notify",
|
|
127
|
+
type: "notification",
|
|
128
|
+
position: {
|
|
129
|
+
x: 250,
|
|
130
|
+
y: 400
|
|
131
|
+
},
|
|
132
|
+
data: {
|
|
133
|
+
label: "Notify Stakeholders",
|
|
134
|
+
nodeType: "notification",
|
|
135
|
+
stepOrder: 3,
|
|
136
|
+
description: "Email + Portal",
|
|
137
|
+
decision: "",
|
|
138
|
+
isActive: false
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "complete",
|
|
143
|
+
type: "step",
|
|
144
|
+
position: {
|
|
145
|
+
x: 250,
|
|
146
|
+
y: 520
|
|
147
|
+
},
|
|
148
|
+
data: {
|
|
149
|
+
label: "Verified",
|
|
150
|
+
nodeType: "step",
|
|
151
|
+
stepOrder: 4,
|
|
152
|
+
description: "Entity verified",
|
|
153
|
+
decision: "",
|
|
154
|
+
isActive: false
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
];
|
|
158
|
+
const edgeStyle = {
|
|
159
|
+
type: "smoothstep",
|
|
160
|
+
animated: true,
|
|
161
|
+
markerEnd: {
|
|
162
|
+
type: MarkerType.ArrowClosed,
|
|
163
|
+
width: 16,
|
|
164
|
+
height: 16
|
|
165
|
+
},
|
|
166
|
+
style: {
|
|
167
|
+
stroke: "#94a3b8",
|
|
168
|
+
strokeWidth: 2
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const edges = [
|
|
172
|
+
{
|
|
173
|
+
id: "e1",
|
|
174
|
+
source: "start",
|
|
175
|
+
target: "review",
|
|
176
|
+
...edgeStyle
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "e2",
|
|
180
|
+
source: "review",
|
|
181
|
+
target: "reviewer1",
|
|
182
|
+
label: "Assign",
|
|
183
|
+
...edgeStyle
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "e3",
|
|
187
|
+
source: "review",
|
|
188
|
+
target: "reviewer2",
|
|
189
|
+
label: "Assign",
|
|
190
|
+
...edgeStyle
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "e4",
|
|
194
|
+
source: "reviewer1",
|
|
195
|
+
target: "notify",
|
|
196
|
+
...edgeStyle
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: "e5",
|
|
200
|
+
source: "reviewer2",
|
|
201
|
+
target: "notify",
|
|
202
|
+
...edgeStyle
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "e6",
|
|
206
|
+
source: "notify",
|
|
207
|
+
target: "complete",
|
|
208
|
+
...edgeStyle
|
|
209
|
+
}
|
|
210
|
+
];
|
|
211
|
+
return {
|
|
212
|
+
nodes,
|
|
213
|
+
edges
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
export function VerificationFlowPage({ entityName, title, subtitle, flowListAction, flowGetAction, pendingAction, decideAction, onFlowSelected, onDecisionMade, showPending = true, className }) {
|
|
217
|
+
const theme = verificationFlowPageTheme;
|
|
218
|
+
const store = useVerificationFlowStore();
|
|
219
|
+
const [nodes, setNodes] = useState([]);
|
|
220
|
+
const [edges, setEdges] = useState([]);
|
|
221
|
+
const resolvedTitle = title || `${entityName} Verification Flow`;
|
|
222
|
+
const resolvedSubtitle = subtitle || `Verification workflow for the ${entityName} entity`;
|
|
223
|
+
const loadFlows = useEffectEvent(()=>{
|
|
224
|
+
store.setLoadingFlows(true);
|
|
225
|
+
const fallback = ()=>{
|
|
226
|
+
const demo = generateDemoFlow();
|
|
227
|
+
setNodes(demo.nodes);
|
|
228
|
+
setEdges(demo.edges);
|
|
229
|
+
store.setLoadingFlows(false);
|
|
230
|
+
};
|
|
231
|
+
flowListAction.start({
|
|
232
|
+
payload: {
|
|
233
|
+
entity_name: entityName
|
|
234
|
+
},
|
|
235
|
+
onAfterHandle: (res)=>{
|
|
236
|
+
const resObj = res;
|
|
237
|
+
const flowData = resObj.data;
|
|
238
|
+
const firstFlow = flowData?.[0];
|
|
239
|
+
if (flowData && firstFlow) {
|
|
240
|
+
store.setFlows(flowData);
|
|
241
|
+
store.setSelectedFlowId(firstFlow.id);
|
|
242
|
+
onFlowSelected?.(firstFlow.id);
|
|
243
|
+
} else {
|
|
244
|
+
fallback();
|
|
245
|
+
}
|
|
246
|
+
store.setLoadingFlows(false);
|
|
247
|
+
},
|
|
248
|
+
onErrorHandle: ()=>{
|
|
249
|
+
fallback();
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
const loadFlowDetail = useEffectEvent((flowId)=>{
|
|
254
|
+
store.setLoadingGraph(true);
|
|
255
|
+
flowGetAction.start({
|
|
256
|
+
payload: {
|
|
257
|
+
flow_id: flowId
|
|
258
|
+
},
|
|
259
|
+
onAfterHandle: (res)=>{
|
|
260
|
+
const resObj = res;
|
|
261
|
+
const graph = resObj.data?.graph;
|
|
262
|
+
if (graph?.steps && graph.steps.length > 0) {
|
|
263
|
+
setNodes(stepsToNodes(graph.steps));
|
|
264
|
+
setEdges(edgesToFlow(graph.edges));
|
|
265
|
+
} else {
|
|
266
|
+
const demo = generateDemoFlow();
|
|
267
|
+
setNodes(demo.nodes);
|
|
268
|
+
setEdges(demo.edges);
|
|
269
|
+
}
|
|
270
|
+
store.setLoadingGraph(false);
|
|
271
|
+
},
|
|
272
|
+
onErrorHandle: ()=>{
|
|
273
|
+
store.setLoadingGraph(false);
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
useEffect(()=>{
|
|
278
|
+
loadFlows();
|
|
279
|
+
}, []);
|
|
280
|
+
useEffect(()=>{
|
|
281
|
+
if (store.selectedFlowId) {
|
|
282
|
+
loadFlowDetail(store.selectedFlowId);
|
|
283
|
+
}
|
|
284
|
+
}, [
|
|
285
|
+
store.selectedFlowId
|
|
286
|
+
]);
|
|
287
|
+
const selectedFlow = store.flows.find((f)=>f.id === store.selectedFlowId);
|
|
288
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
289
|
+
className: cn(theme.container.base, className),
|
|
290
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
291
|
+
className: theme.container.wrapper,
|
|
292
|
+
children: [
|
|
293
|
+
/*#__PURE__*/ _jsx("header", {
|
|
294
|
+
className: theme.header.container,
|
|
295
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
296
|
+
className: "flex items-center justify-between",
|
|
297
|
+
children: [
|
|
298
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
299
|
+
children: [
|
|
300
|
+
/*#__PURE__*/ _jsx("h1", {
|
|
301
|
+
className: theme.header.title,
|
|
302
|
+
children: resolvedTitle
|
|
303
|
+
}),
|
|
304
|
+
/*#__PURE__*/ _jsx("p", {
|
|
305
|
+
className: theme.header.subtitle,
|
|
306
|
+
children: resolvedSubtitle
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}),
|
|
310
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
311
|
+
className: theme.header.actions,
|
|
312
|
+
children: [
|
|
313
|
+
showPending && /*#__PURE__*/ _jsxs("nav", {
|
|
314
|
+
className: theme.tabs.container,
|
|
315
|
+
children: [
|
|
316
|
+
/*#__PURE__*/ _jsx("button", {
|
|
317
|
+
type: "button",
|
|
318
|
+
className: store.activeTab === "flow" ? theme.tabs.tabActive : theme.tabs.tab,
|
|
319
|
+
onClick: ()=>store.setActiveTab("flow"),
|
|
320
|
+
children: "Flow Designer"
|
|
321
|
+
}),
|
|
322
|
+
/*#__PURE__*/ _jsx("button", {
|
|
323
|
+
type: "button",
|
|
324
|
+
className: store.activeTab === "pending" ? theme.tabs.tabActive : theme.tabs.tab,
|
|
325
|
+
onClick: ()=>store.setActiveTab("pending"),
|
|
326
|
+
children: "Pending"
|
|
327
|
+
})
|
|
328
|
+
]
|
|
329
|
+
}),
|
|
330
|
+
store.flows.length > 0 && /*#__PURE__*/ _jsx("select", {
|
|
331
|
+
className: theme.flowSelector.select,
|
|
332
|
+
value: store.selectedFlowId || "",
|
|
333
|
+
onChange: (e)=>{
|
|
334
|
+
store.setSelectedFlowId(e.target.value);
|
|
335
|
+
onFlowSelected?.(e.target.value);
|
|
336
|
+
},
|
|
337
|
+
children: store.flows.map((f)=>/*#__PURE__*/ _jsxs("option", {
|
|
338
|
+
value: f.id,
|
|
339
|
+
children: [
|
|
340
|
+
f.name,
|
|
341
|
+
" ",
|
|
342
|
+
f.is_draft ? "(Draft)" : ""
|
|
343
|
+
]
|
|
344
|
+
}, f.id))
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
})
|
|
350
|
+
}),
|
|
351
|
+
store.activeTab === "flow" && /*#__PURE__*/ _jsxs("div", {
|
|
352
|
+
className: theme.canvas.container,
|
|
353
|
+
children: [
|
|
354
|
+
(store.isLoadingFlows || store.isLoadingGraph) && /*#__PURE__*/ _jsx("div", {
|
|
355
|
+
className: theme.loading.container,
|
|
356
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
357
|
+
className: theme.loading.spinner
|
|
358
|
+
})
|
|
359
|
+
}),
|
|
360
|
+
/*#__PURE__*/ _jsxs(ReactFlow, {
|
|
361
|
+
nodes: nodes,
|
|
362
|
+
edges: edges,
|
|
363
|
+
nodeTypes: nodeTypes,
|
|
364
|
+
fitView: true,
|
|
365
|
+
minZoom: 0.3,
|
|
366
|
+
maxZoom: 2,
|
|
367
|
+
proOptions: {
|
|
368
|
+
hideAttribution: true
|
|
369
|
+
},
|
|
370
|
+
className: theme.canvas.background,
|
|
371
|
+
children: [
|
|
372
|
+
/*#__PURE__*/ _jsx(Background, {
|
|
373
|
+
color: "#d4d4d8",
|
|
374
|
+
gap: 20,
|
|
375
|
+
size: 1
|
|
376
|
+
}),
|
|
377
|
+
/*#__PURE__*/ _jsx(Controls, {}),
|
|
378
|
+
/*#__PURE__*/ _jsx(MiniMap, {
|
|
379
|
+
nodeColor: (node)=>{
|
|
380
|
+
const nt = String(node.data?.nodeType || "step");
|
|
381
|
+
if (nt === "verifier") return "#f59e0b";
|
|
382
|
+
if (nt === "notification") return "#a855f7";
|
|
383
|
+
return "#3b82f6";
|
|
384
|
+
}
|
|
385
|
+
})
|
|
386
|
+
]
|
|
387
|
+
}),
|
|
388
|
+
selectedFlow && /*#__PURE__*/ _jsxs("div", {
|
|
389
|
+
className: theme.overlay.info,
|
|
390
|
+
children: [
|
|
391
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
392
|
+
className: theme.overlay.infoTitle,
|
|
393
|
+
children: selectedFlow.name
|
|
394
|
+
}),
|
|
395
|
+
/*#__PURE__*/ _jsx("p", {
|
|
396
|
+
className: theme.overlay.infoDescription,
|
|
397
|
+
children: selectedFlow.description || "No description"
|
|
398
|
+
}),
|
|
399
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
400
|
+
className: "flex gap-2 mt-2",
|
|
401
|
+
children: [
|
|
402
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
403
|
+
className: cn(theme.overlay.badge, "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300"),
|
|
404
|
+
children: [
|
|
405
|
+
"Trigger: ",
|
|
406
|
+
selectedFlow.trigger_on
|
|
407
|
+
]
|
|
408
|
+
}),
|
|
409
|
+
/*#__PURE__*/ _jsx("span", {
|
|
410
|
+
className: cn(theme.overlay.badge, selectedFlow.is_draft ? theme.overlay.badgeDraft : theme.overlay.badgePublished),
|
|
411
|
+
children: selectedFlow.is_draft ? "Draft" : "Published"
|
|
412
|
+
})
|
|
413
|
+
]
|
|
414
|
+
})
|
|
415
|
+
]
|
|
416
|
+
}),
|
|
417
|
+
/*#__PURE__*/ _jsx("div", {
|
|
418
|
+
className: theme.legend.container,
|
|
419
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
420
|
+
className: "flex items-center gap-4 text-xs",
|
|
421
|
+
children: [
|
|
422
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
423
|
+
className: theme.legend.item,
|
|
424
|
+
children: [
|
|
425
|
+
/*#__PURE__*/ _jsx("div", {
|
|
426
|
+
className: theme.legend.dot.step
|
|
427
|
+
}),
|
|
428
|
+
/*#__PURE__*/ _jsx("span", {
|
|
429
|
+
className: theme.legend.label,
|
|
430
|
+
children: "Step"
|
|
431
|
+
})
|
|
432
|
+
]
|
|
433
|
+
}),
|
|
434
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
435
|
+
className: theme.legend.item,
|
|
436
|
+
children: [
|
|
437
|
+
/*#__PURE__*/ _jsx("div", {
|
|
438
|
+
className: theme.legend.dot.verifier
|
|
439
|
+
}),
|
|
440
|
+
/*#__PURE__*/ _jsx("span", {
|
|
441
|
+
className: theme.legend.label,
|
|
442
|
+
children: "Verifier"
|
|
443
|
+
})
|
|
444
|
+
]
|
|
445
|
+
}),
|
|
446
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
447
|
+
className: theme.legend.item,
|
|
448
|
+
children: [
|
|
449
|
+
/*#__PURE__*/ _jsx("div", {
|
|
450
|
+
className: theme.legend.dot.notification
|
|
451
|
+
}),
|
|
452
|
+
/*#__PURE__*/ _jsx("span", {
|
|
453
|
+
className: theme.legend.label,
|
|
454
|
+
children: "Notification"
|
|
455
|
+
})
|
|
456
|
+
]
|
|
457
|
+
})
|
|
458
|
+
]
|
|
459
|
+
})
|
|
460
|
+
})
|
|
461
|
+
]
|
|
462
|
+
}),
|
|
463
|
+
store.activeTab === "pending" && showPending && /*#__PURE__*/ _jsx("div", {
|
|
464
|
+
className: "flex-1 overflow-auto p-6",
|
|
465
|
+
children: /*#__PURE__*/ _jsx(PendingTab, {
|
|
466
|
+
pendingAction: pendingAction,
|
|
467
|
+
decideAction: decideAction,
|
|
468
|
+
onDecisionMade: onDecisionMade
|
|
469
|
+
})
|
|
470
|
+
})
|
|
471
|
+
]
|
|
472
|
+
})
|
|
473
|
+
});
|
|
474
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { VerificationFlowPage } from "./components/VerificationFlowPage";
|
|
2
|
+
export { PendingTab } from "./components/PendingTab";
|
|
3
|
+
export { FlowNode } from "./components/FlowNode";
|
|
4
|
+
export { useVerificationFlowStore } from "./store";
|
|
5
|
+
export type { VerificationFlowPageTheme } from "./theme";
|
|
6
|
+
export { verificationFlowPageTheme, extendVerificationFlowPageTheme, } from "./theme";
|
|
7
|
+
export type { FlowDeleteAction, FlowEdgeData, FlowGetAction, FlowItemData, FlowListAction, FlowPublishAction, FlowSaveAction, GenericAction as VerificationFlowGenericAction, PendingItem as VerificationFlowPendingItem, StepNodeData, VerificationDecideAction as VerificationFlowDecideAction, VerificationFlowPageConfig, VerificationFlowPageProps, VerificationFlowPageState, VerificationFlowPageVariant, VerificationPendingAction as VerificationFlowPendingAction, VerificationStartAction as VerificationFlowStartAction, } from "./types";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { VerificationFlowPage } from "./components/VerificationFlowPage";
|
|
2
|
+
export { PendingTab } from "./components/PendingTab";
|
|
3
|
+
export { FlowNode } from "./components/FlowNode";
|
|
4
|
+
export { useVerificationFlowStore } from "./store";
|
|
5
|
+
export { verificationFlowPageTheme, extendVerificationFlowPageTheme } from "./theme";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { FlowEdgeData, FlowItemData, PendingItem, StepNodeData, VerificationFlowPageState } from "../types";
|
|
2
|
+
type VerificationFlowMethods = {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
setFlows: (flows: FlowItemData[]) => void;
|
|
5
|
+
setSelectedFlowId: (id: string | null) => void;
|
|
6
|
+
setGraphNodes: (nodes: StepNodeData[]) => void;
|
|
7
|
+
setGraphEdges: (edges: FlowEdgeData[]) => void;
|
|
8
|
+
setPendingItems: (items: PendingItem[]) => void;
|
|
9
|
+
setActiveTab: (tab: "flow" | "pending") => void;
|
|
10
|
+
setLoadingFlows: (value: boolean) => void;
|
|
11
|
+
setLoadingGraph: (value: boolean) => void;
|
|
12
|
+
setLoadingPending: (value: boolean) => void;
|
|
13
|
+
setDecidingId: (id: string | null) => void;
|
|
14
|
+
setDecisionReason: (reason: string) => void;
|
|
15
|
+
setError: (error: string | null) => void;
|
|
16
|
+
reset: () => void;
|
|
17
|
+
};
|
|
18
|
+
type StoreState = VerificationFlowPageState & {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
export declare const useVerificationFlowStore: () => import("h-state").StoreType<StoreState, VerificationFlowMethods>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { batch, createStore } from "h-state";
|
|
3
|
+
const initialState = {
|
|
4
|
+
flows: [],
|
|
5
|
+
selectedFlowId: null,
|
|
6
|
+
graphNodes: [],
|
|
7
|
+
graphEdges: [],
|
|
8
|
+
pendingItems: [],
|
|
9
|
+
activeTab: "flow",
|
|
10
|
+
isLoadingFlows: false,
|
|
11
|
+
isLoadingGraph: false,
|
|
12
|
+
isLoadingPending: false,
|
|
13
|
+
decidingId: null,
|
|
14
|
+
decisionReason: "",
|
|
15
|
+
error: null
|
|
16
|
+
};
|
|
17
|
+
export const { useStore: useVerificationFlowStore } = createStore(initialState, {
|
|
18
|
+
setFlows: (store)=>(flows)=>{
|
|
19
|
+
store.flows = flows;
|
|
20
|
+
},
|
|
21
|
+
setSelectedFlowId: (store)=>(id)=>{
|
|
22
|
+
store.selectedFlowId = id;
|
|
23
|
+
},
|
|
24
|
+
setGraphNodes: (store)=>(nodes)=>{
|
|
25
|
+
store.graphNodes = nodes;
|
|
26
|
+
},
|
|
27
|
+
setGraphEdges: (store)=>(edges)=>{
|
|
28
|
+
store.graphEdges = edges;
|
|
29
|
+
},
|
|
30
|
+
setPendingItems: (store)=>(items)=>{
|
|
31
|
+
store.pendingItems = items;
|
|
32
|
+
},
|
|
33
|
+
setActiveTab: (store)=>(tab)=>{
|
|
34
|
+
store.activeTab = tab;
|
|
35
|
+
},
|
|
36
|
+
setLoadingFlows: (store)=>(value)=>{
|
|
37
|
+
store.isLoadingFlows = value;
|
|
38
|
+
},
|
|
39
|
+
setLoadingGraph: (store)=>(value)=>{
|
|
40
|
+
store.isLoadingGraph = value;
|
|
41
|
+
},
|
|
42
|
+
setLoadingPending: (store)=>(value)=>{
|
|
43
|
+
store.isLoadingPending = value;
|
|
44
|
+
},
|
|
45
|
+
setDecidingId: (store)=>(id)=>{
|
|
46
|
+
store.decidingId = id;
|
|
47
|
+
},
|
|
48
|
+
setDecisionReason: (store)=>(reason)=>{
|
|
49
|
+
store.decisionReason = reason;
|
|
50
|
+
},
|
|
51
|
+
setError: (store)=>(error)=>{
|
|
52
|
+
store.error = error;
|
|
53
|
+
},
|
|
54
|
+
reset: (store)=>()=>{
|
|
55
|
+
batch(()=>{
|
|
56
|
+
store.flows = [];
|
|
57
|
+
store.selectedFlowId = null;
|
|
58
|
+
store.graphNodes = [];
|
|
59
|
+
store.graphEdges = [];
|
|
60
|
+
store.pendingItems = [];
|
|
61
|
+
store.activeTab = "flow";
|
|
62
|
+
store.isLoadingFlows = false;
|
|
63
|
+
store.isLoadingGraph = false;
|
|
64
|
+
store.isLoadingPending = false;
|
|
65
|
+
store.decidingId = null;
|
|
66
|
+
store.decisionReason = "";
|
|
67
|
+
store.error = null;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export type VerificationFlowPageTheme = {
|
|
2
|
+
container: {
|
|
3
|
+
base: string;
|
|
4
|
+
wrapper: string;
|
|
5
|
+
};
|
|
6
|
+
header: {
|
|
7
|
+
container: string;
|
|
8
|
+
titleWrapper: string;
|
|
9
|
+
title: string;
|
|
10
|
+
subtitle: string;
|
|
11
|
+
actions: string;
|
|
12
|
+
};
|
|
13
|
+
tabs: {
|
|
14
|
+
container: string;
|
|
15
|
+
tab: string;
|
|
16
|
+
tabActive: string;
|
|
17
|
+
};
|
|
18
|
+
flowSelector: {
|
|
19
|
+
select: string;
|
|
20
|
+
};
|
|
21
|
+
canvas: {
|
|
22
|
+
container: string;
|
|
23
|
+
background: string;
|
|
24
|
+
};
|
|
25
|
+
overlay: {
|
|
26
|
+
info: string;
|
|
27
|
+
infoTitle: string;
|
|
28
|
+
infoDescription: string;
|
|
29
|
+
badge: string;
|
|
30
|
+
badgeDraft: string;
|
|
31
|
+
badgePublished: string;
|
|
32
|
+
};
|
|
33
|
+
legend: {
|
|
34
|
+
container: string;
|
|
35
|
+
item: string;
|
|
36
|
+
dot: {
|
|
37
|
+
step: string;
|
|
38
|
+
verifier: string;
|
|
39
|
+
notification: string;
|
|
40
|
+
};
|
|
41
|
+
label: string;
|
|
42
|
+
};
|
|
43
|
+
node: {
|
|
44
|
+
step: {
|
|
45
|
+
bg: string;
|
|
46
|
+
border: string;
|
|
47
|
+
icon: string;
|
|
48
|
+
};
|
|
49
|
+
verifier: {
|
|
50
|
+
bg: string;
|
|
51
|
+
border: string;
|
|
52
|
+
icon: string;
|
|
53
|
+
};
|
|
54
|
+
notification: {
|
|
55
|
+
bg: string;
|
|
56
|
+
border: string;
|
|
57
|
+
icon: string;
|
|
58
|
+
};
|
|
59
|
+
base: string;
|
|
60
|
+
activeRing: string;
|
|
61
|
+
typeLabel: string;
|
|
62
|
+
nameLabel: string;
|
|
63
|
+
description: string;
|
|
64
|
+
badge: {
|
|
65
|
+
approved: string;
|
|
66
|
+
rejected: string;
|
|
67
|
+
pending: string;
|
|
68
|
+
active: string;
|
|
69
|
+
};
|
|
70
|
+
handle: string;
|
|
71
|
+
};
|
|
72
|
+
pending: {
|
|
73
|
+
container: string;
|
|
74
|
+
title: string;
|
|
75
|
+
empty: {
|
|
76
|
+
container: string;
|
|
77
|
+
icon: string;
|
|
78
|
+
text: string;
|
|
79
|
+
};
|
|
80
|
+
card: {
|
|
81
|
+
container: string;
|
|
82
|
+
title: string;
|
|
83
|
+
subtitle: string;
|
|
84
|
+
actions: string;
|
|
85
|
+
};
|
|
86
|
+
input: string;
|
|
87
|
+
approveButton: string;
|
|
88
|
+
rejectButton: string;
|
|
89
|
+
cancelButton: string;
|
|
90
|
+
reviewButton: string;
|
|
91
|
+
};
|
|
92
|
+
loading: {
|
|
93
|
+
container: string;
|
|
94
|
+
spinner: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export declare const verificationFlowPageTheme: VerificationFlowPageTheme;
|
|
98
|
+
export declare function extendVerificationFlowPageTheme(overrides: Partial<VerificationFlowPageTheme>): VerificationFlowPageTheme;
|
|
99
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export const verificationFlowPageTheme = {
|
|
2
|
+
container: {
|
|
3
|
+
base: "min-h-screen bg-zinc-50 dark:bg-black",
|
|
4
|
+
wrapper: "flex flex-col h-screen"
|
|
5
|
+
},
|
|
6
|
+
header: {
|
|
7
|
+
container: "flex-shrink-0 border-b border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-6 py-4",
|
|
8
|
+
titleWrapper: "",
|
|
9
|
+
title: "text-xl font-bold text-zinc-900 dark:text-white tracking-tight",
|
|
10
|
+
subtitle: "text-sm text-zinc-500 dark:text-zinc-400",
|
|
11
|
+
actions: "flex items-center gap-3"
|
|
12
|
+
},
|
|
13
|
+
tabs: {
|
|
14
|
+
container: "flex gap-1 p-1 bg-zinc-100 dark:bg-zinc-800/50 rounded-lg",
|
|
15
|
+
tab: "px-3 py-1.5 rounded-md text-xs font-medium transition-all text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-white",
|
|
16
|
+
tabActive: "px-3 py-1.5 rounded-md text-xs font-medium transition-all bg-white dark:bg-zinc-700 text-zinc-900 dark:text-white shadow-sm"
|
|
17
|
+
},
|
|
18
|
+
flowSelector: {
|
|
19
|
+
select: "rounded-lg border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-1.5 text-xs text-zinc-900 dark:text-white"
|
|
20
|
+
},
|
|
21
|
+
canvas: {
|
|
22
|
+
container: "flex-1 relative",
|
|
23
|
+
background: "bg-zinc-50 dark:bg-zinc-950"
|
|
24
|
+
},
|
|
25
|
+
overlay: {
|
|
26
|
+
info: "absolute top-4 left-4 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-xl border border-zinc-200 dark:border-zinc-800 p-4 shadow-lg max-w-xs",
|
|
27
|
+
infoTitle: "text-sm font-semibold text-zinc-900 dark:text-white",
|
|
28
|
+
infoDescription: "text-xs text-zinc-500 dark:text-zinc-400 mt-1",
|
|
29
|
+
badge: "text-[10px] font-medium px-2 py-0.5 rounded-full",
|
|
30
|
+
badgeDraft: "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300",
|
|
31
|
+
badgePublished: "bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300"
|
|
32
|
+
},
|
|
33
|
+
legend: {
|
|
34
|
+
container: "absolute bottom-4 left-4 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-xl border border-zinc-200 dark:border-zinc-800 p-3 shadow-lg",
|
|
35
|
+
item: "flex items-center gap-1.5",
|
|
36
|
+
dot: {
|
|
37
|
+
step: "w-3 h-3 rounded bg-blue-500",
|
|
38
|
+
verifier: "w-3 h-3 rounded bg-amber-500",
|
|
39
|
+
notification: "w-3 h-3 rounded bg-purple-500"
|
|
40
|
+
},
|
|
41
|
+
label: "text-zinc-600 dark:text-zinc-400"
|
|
42
|
+
},
|
|
43
|
+
node: {
|
|
44
|
+
step: {
|
|
45
|
+
bg: "bg-blue-50 dark:bg-blue-950/40",
|
|
46
|
+
border: "border-blue-300 dark:border-blue-700",
|
|
47
|
+
icon: "text-blue-600 dark:text-blue-400"
|
|
48
|
+
},
|
|
49
|
+
verifier: {
|
|
50
|
+
bg: "bg-amber-50 dark:bg-amber-950/40",
|
|
51
|
+
border: "border-amber-300 dark:border-amber-700",
|
|
52
|
+
icon: "text-amber-600 dark:text-amber-400"
|
|
53
|
+
},
|
|
54
|
+
notification: {
|
|
55
|
+
bg: "bg-purple-50 dark:bg-purple-950/40",
|
|
56
|
+
border: "border-purple-300 dark:border-purple-700",
|
|
57
|
+
icon: "text-purple-600 dark:text-purple-400"
|
|
58
|
+
},
|
|
59
|
+
base: "rounded-xl border-2 px-4 py-3 min-w-[180px] shadow-lg transition-all",
|
|
60
|
+
activeRing: "ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-black",
|
|
61
|
+
typeLabel: "text-xs font-semibold uppercase tracking-wider text-zinc-500 dark:text-zinc-400",
|
|
62
|
+
nameLabel: "text-sm font-medium text-zinc-900 dark:text-white truncate",
|
|
63
|
+
description: "text-xs text-zinc-500 dark:text-zinc-400 mt-0.5 truncate",
|
|
64
|
+
badge: {
|
|
65
|
+
approved: "bg-emerald-500 text-white",
|
|
66
|
+
rejected: "bg-red-500 text-white",
|
|
67
|
+
pending: "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300",
|
|
68
|
+
active: "bg-blue-500 text-white animate-pulse"
|
|
69
|
+
},
|
|
70
|
+
handle: "!w-3 !h-3 !bg-zinc-400 dark:!bg-zinc-500 !border-2 !border-white dark:!border-zinc-900"
|
|
71
|
+
},
|
|
72
|
+
pending: {
|
|
73
|
+
container: "max-w-3xl mx-auto space-y-3",
|
|
74
|
+
title: "text-lg font-semibold text-zinc-900 dark:text-white mb-4",
|
|
75
|
+
empty: {
|
|
76
|
+
container: "text-center py-20",
|
|
77
|
+
icon: "w-16 h-16 text-zinc-300 dark:text-zinc-600 mx-auto mb-4",
|
|
78
|
+
text: "text-zinc-500 dark:text-zinc-400"
|
|
79
|
+
},
|
|
80
|
+
card: {
|
|
81
|
+
container: "rounded-xl border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 p-4 shadow-sm",
|
|
82
|
+
title: "text-sm font-medium text-zinc-900 dark:text-white",
|
|
83
|
+
subtitle: "text-xs text-zinc-500 dark:text-zinc-400 mt-0.5",
|
|
84
|
+
actions: "flex items-center gap-2"
|
|
85
|
+
},
|
|
86
|
+
input: "rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-3 py-1.5 text-xs text-zinc-900 dark:text-white w-40",
|
|
87
|
+
approveButton: "rounded-lg bg-emerald-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-700 transition-colors",
|
|
88
|
+
rejectButton: "rounded-lg bg-red-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-red-700 transition-colors",
|
|
89
|
+
cancelButton: "rounded-lg bg-zinc-200 dark:bg-zinc-700 px-3 py-1.5 text-xs font-medium text-zinc-700 dark:text-zinc-300 hover:bg-zinc-300 dark:hover:bg-zinc-600 transition-colors",
|
|
90
|
+
reviewButton: "rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-blue-700 transition-colors"
|
|
91
|
+
},
|
|
92
|
+
loading: {
|
|
93
|
+
container: "absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-black/50 z-10",
|
|
94
|
+
spinner: "animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
export function extendVerificationFlowPageTheme(overrides) {
|
|
98
|
+
return {
|
|
99
|
+
...verificationFlowPageTheme,
|
|
100
|
+
...overrides,
|
|
101
|
+
container: {
|
|
102
|
+
...verificationFlowPageTheme.container,
|
|
103
|
+
...overrides.container
|
|
104
|
+
},
|
|
105
|
+
header: {
|
|
106
|
+
...verificationFlowPageTheme.header,
|
|
107
|
+
...overrides.header
|
|
108
|
+
},
|
|
109
|
+
tabs: {
|
|
110
|
+
...verificationFlowPageTheme.tabs,
|
|
111
|
+
...overrides.tabs
|
|
112
|
+
},
|
|
113
|
+
canvas: {
|
|
114
|
+
...verificationFlowPageTheme.canvas,
|
|
115
|
+
...overrides.canvas
|
|
116
|
+
},
|
|
117
|
+
overlay: {
|
|
118
|
+
...verificationFlowPageTheme.overlay,
|
|
119
|
+
...overrides.overlay
|
|
120
|
+
},
|
|
121
|
+
legend: {
|
|
122
|
+
...verificationFlowPageTheme.legend,
|
|
123
|
+
...overrides.legend
|
|
124
|
+
},
|
|
125
|
+
node: {
|
|
126
|
+
...verificationFlowPageTheme.node,
|
|
127
|
+
...overrides.node
|
|
128
|
+
},
|
|
129
|
+
pending: {
|
|
130
|
+
...verificationFlowPageTheme.pending,
|
|
131
|
+
...overrides.pending
|
|
132
|
+
},
|
|
133
|
+
loading: {
|
|
134
|
+
...verificationFlowPageTheme.loading,
|
|
135
|
+
...overrides.loading
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { FlowListResponse, FlowDetailResponse, VerificationDecidePayload, VerificationDecideResponse, VerificationPendingResponse, VerificationStartPayload, VerificationStartResponse, FlowSavePayload, FlowSaveResponse, FlowPublishResponse, FlowDeleteResponse } from "../../../../src/Client/ApiCaller/types";
|
|
2
|
+
export type VerificationFlowPageVariant = "default" | "compact";
|
|
3
|
+
export type GenericAction<TPayload = unknown, TData = unknown, TError = unknown> = {
|
|
4
|
+
start: (config: {
|
|
5
|
+
payload: TPayload;
|
|
6
|
+
onAfterHandle?: (data: TData) => void;
|
|
7
|
+
onErrorHandle?: (error: TError, code?: number | null) => void;
|
|
8
|
+
}) => void;
|
|
9
|
+
state: {
|
|
10
|
+
isPending: boolean;
|
|
11
|
+
data: TData | null;
|
|
12
|
+
error: TError | null;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type FlowListAction = GenericAction<{
|
|
16
|
+
entity_name?: string;
|
|
17
|
+
}, FlowListResponse>;
|
|
18
|
+
export type FlowGetAction = GenericAction<{
|
|
19
|
+
flow_id: string;
|
|
20
|
+
}, FlowDetailResponse>;
|
|
21
|
+
export type FlowSaveAction = GenericAction<FlowSavePayload, FlowSaveResponse>;
|
|
22
|
+
export type FlowPublishAction = GenericAction<{
|
|
23
|
+
flow_id: string;
|
|
24
|
+
}, FlowPublishResponse>;
|
|
25
|
+
export type FlowDeleteAction = GenericAction<{
|
|
26
|
+
flow_id: string;
|
|
27
|
+
}, FlowDeleteResponse>;
|
|
28
|
+
export type VerificationDecideAction = GenericAction<VerificationDecidePayload & {
|
|
29
|
+
entity_name: string;
|
|
30
|
+
entity_id: string;
|
|
31
|
+
}, VerificationDecideResponse>;
|
|
32
|
+
export type VerificationPendingAction = GenericAction<undefined, VerificationPendingResponse>;
|
|
33
|
+
export type VerificationStartAction = GenericAction<VerificationStartPayload, VerificationStartResponse>;
|
|
34
|
+
export type FlowItemData = {
|
|
35
|
+
id: string;
|
|
36
|
+
entity_name: string;
|
|
37
|
+
name: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
trigger_on: string;
|
|
40
|
+
trigger_fields?: string[];
|
|
41
|
+
is_draft: boolean;
|
|
42
|
+
published_at?: string;
|
|
43
|
+
created_at: string;
|
|
44
|
+
updated_at: string;
|
|
45
|
+
};
|
|
46
|
+
export type StepNodeData = {
|
|
47
|
+
node_id: string;
|
|
48
|
+
node_type: "step" | "verifier" | "notification";
|
|
49
|
+
step_order: number;
|
|
50
|
+
name?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
position_x: number;
|
|
53
|
+
position_y: number;
|
|
54
|
+
width?: number;
|
|
55
|
+
height?: number;
|
|
56
|
+
data?: Record<string, unknown>;
|
|
57
|
+
};
|
|
58
|
+
export type FlowEdgeData = {
|
|
59
|
+
edge_id: string;
|
|
60
|
+
source_node_id: string;
|
|
61
|
+
target_node_id: string;
|
|
62
|
+
source_handle?: string;
|
|
63
|
+
target_handle?: string;
|
|
64
|
+
edge_type?: string;
|
|
65
|
+
label?: string;
|
|
66
|
+
animated?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type PendingItem = {
|
|
69
|
+
instance_id: string;
|
|
70
|
+
entity_name: string;
|
|
71
|
+
entity_id: string;
|
|
72
|
+
flow_name: string;
|
|
73
|
+
step_order: number;
|
|
74
|
+
step_name?: string;
|
|
75
|
+
require_signature: boolean;
|
|
76
|
+
created_at: string;
|
|
77
|
+
};
|
|
78
|
+
export type VerificationFlowPageConfig = {
|
|
79
|
+
variant?: VerificationFlowPageVariant;
|
|
80
|
+
entityName: string;
|
|
81
|
+
title?: string;
|
|
82
|
+
subtitle?: string;
|
|
83
|
+
flowListAction: FlowListAction;
|
|
84
|
+
flowGetAction: FlowGetAction;
|
|
85
|
+
flowSaveAction?: FlowSaveAction;
|
|
86
|
+
flowPublishAction?: FlowPublishAction;
|
|
87
|
+
flowDeleteAction?: FlowDeleteAction;
|
|
88
|
+
pendingAction: VerificationPendingAction;
|
|
89
|
+
decideAction: VerificationDecideAction;
|
|
90
|
+
startAction?: VerificationStartAction;
|
|
91
|
+
onFlowSelected?: (flowId: string) => void;
|
|
92
|
+
onDecisionMade?: (entityName: string, entityId: string) => void;
|
|
93
|
+
showPending?: boolean;
|
|
94
|
+
className?: string;
|
|
95
|
+
};
|
|
96
|
+
export type VerificationFlowPageProps = VerificationFlowPageConfig;
|
|
97
|
+
export type VerificationFlowPageState = {
|
|
98
|
+
flows: FlowItemData[];
|
|
99
|
+
selectedFlowId: string | null;
|
|
100
|
+
graphNodes: StepNodeData[];
|
|
101
|
+
graphEdges: FlowEdgeData[];
|
|
102
|
+
pendingItems: PendingItem[];
|
|
103
|
+
activeTab: "flow" | "pending";
|
|
104
|
+
isLoadingFlows: boolean;
|
|
105
|
+
isLoadingGraph: boolean;
|
|
106
|
+
isLoadingPending: boolean;
|
|
107
|
+
decidingId: string | null;
|
|
108
|
+
decisionReason: string;
|
|
109
|
+
error: string | null;
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/fe/index.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export type { NotificationBellConfig, NotificationBellProps, NotificationCenterC
|
|
|
38
38
|
export { NotificationBell, NotificationCenter, notificationCenterTheme, extendNotificationCenterTheme, useNotificationCenterStore, } from "./components/NotificationCenter";
|
|
39
39
|
export type { PendingItem, PendingRequirement, PendingVerificationsConfig, PendingVerificationsProps, PendingVerificationsState, VerificationDecideAction, VerificationFlow, VerificationInstance, VerificationPanelConfig, VerificationPanelProps, VerificationPanelState, VerificationPanelVariant, VerificationPendingAction, VerificationRecord, VerificationStartAction, VerificationStatusAction, } from "./components/VerificationPanel";
|
|
40
40
|
export { PendingVerifications, VerificationPanel, verificationPanelTheme, extendVerificationPanelTheme, useVerificationPanelStore, usePendingVerificationsStore, } from "./components/VerificationPanel";
|
|
41
|
+
export type { FlowDeleteAction, FlowEdgeData, FlowGetAction, FlowItemData, FlowListAction, FlowPublishAction, FlowSaveAction, StepNodeData, VerificationFlowDecideAction, VerificationFlowGenericAction, VerificationFlowPageConfig, VerificationFlowPageProps, VerificationFlowPageState, VerificationFlowPageVariant, VerificationFlowPendingAction, VerificationFlowPendingItem, VerificationFlowStartAction, } from "./components/VerificationFlowPage";
|
|
42
|
+
export { FlowNode, PendingTab, VerificationFlowPage, verificationFlowPageTheme, extendVerificationFlowPageTheme, useVerificationFlowStore, } from "./components/VerificationFlowPage";
|
|
41
43
|
export { useNucleusEntity } from "./hooks/useNucleusEntity";
|
|
42
44
|
export type { BulkDeleteResponse, ColumnConfig, ColumnEnum, ColumnReference, ColumnType, ColumnValidation, DeleteResponse, FieldConfig, FilterCondition, ListResponse, MutationResponse, NucleusColumn, NucleusEntity, NucleusEntityShowcaseProps, PaginationMeta, QueryParams, SingleResponse, SortCondition, SortDirection, UseNucleusEntityOptions, UseNucleusEntityReturn, } from "./types";
|
|
43
45
|
export { cn } from "./utils/cn";
|
package/dist/fe/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export { UsersPage, useUsersStore } from "./components/UsersPage";
|
|
|
24
24
|
export { useVerifyEmailStore, VerifyEmailPage } from "./components/VerifyEmailPage";
|
|
25
25
|
export { NotificationBell, NotificationCenter, notificationCenterTheme, extendNotificationCenterTheme, useNotificationCenterStore } from "./components/NotificationCenter";
|
|
26
26
|
export { PendingVerifications, VerificationPanel, verificationPanelTheme, extendVerificationPanelTheme, useVerificationPanelStore, usePendingVerificationsStore } from "./components/VerificationPanel";
|
|
27
|
+
export { FlowNode, PendingTab, VerificationFlowPage, verificationFlowPageTheme, extendVerificationFlowPageTheme, useVerificationFlowStore } from "./components/VerificationFlowPage";
|
|
27
28
|
export { useNucleusEntity } from "./hooks/useNucleusEntity";
|
|
28
29
|
export { cn } from "./utils/cn";
|
|
29
30
|
export { formatLabel, getColumnType, getDefaultValue, isArrayColumn, isJsonColumn, isReferenceColumn, shouldExcludeColumn, shouldExcludeFromForm } from "./utils/columnUtils";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nucleus-core-ts",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.108",
|
|
4
4
|
"description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
|
|
5
5
|
"author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "bun run scripts/build.ts",
|
|
45
45
|
"build:quick": "bun run build:js && bun run build:types",
|
|
46
|
-
"build:js": "bun build ./index.ts ./client.ts ./fe/index.ts ./src/Client/Proxy/index.ts --outdir=dist --target=bun --format=esm --splitting --minify --external react --external react-dom --external gsap --external @gsap/react --external h-state --external three --external @react-three/fiber --external elysia --external drizzle-orm --external drizzle-kit --external ioredis --external googleapis --external @dapr/dapr --external pg",
|
|
46
|
+
"build:js": "bun build ./index.ts ./client.ts ./fe/index.ts ./src/Client/Proxy/index.ts --outdir=dist --target=bun --format=esm --splitting --minify --external react --external react-dom --external gsap --external @gsap/react --external h-state --external three --external @react-three/fiber --external elysia --external drizzle-orm --external drizzle-kit --external ioredis --external googleapis --external @dapr/dapr --external pg --external @xyflow/react --external @xyflow/system",
|
|
47
47
|
"build:types": "tsc --declaration --emitDeclarationOnly --outDir dist --skipLibCheck",
|
|
48
48
|
"version:patch": "bun run scripts/version.ts patch",
|
|
49
49
|
"version:minor": "bun run scripts/version.ts minor",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"@elysiajs/static": "latest",
|
|
89
89
|
"@elysiajs/swagger": "latest",
|
|
90
90
|
"@gsap/react": "latest",
|
|
91
|
+
"@xyflow/react": "^12.10.1",
|
|
91
92
|
"drizzle-orm": "latest",
|
|
92
93
|
"googleapis": "latest",
|
|
93
94
|
"gsap": "latest",
|