@notmrabhi/flowforge 0.1.42 → 0.1.44
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/{SchemaBuilderDrawer-CUzYWGCN.js → SchemaBuilderDrawer-DlmInnSC.js} +33 -33
- package/dist/{SchemaBuilderDrawer-CUzYWGCN.js.map → SchemaBuilderDrawer-DlmInnSC.js.map} +1 -1
- package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js → SchemaBuilderDrawer-KUOXc7K_.js} +2 -2
- package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js.map → SchemaBuilderDrawer-KUOXc7K_.js.map} +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.d.ts +131 -1
- package/dist/canvas.js +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +39 -0
- package/dist/core.js +22 -23
- package/dist/core.js.map +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +121 -0
- package/dist/form.js +36 -33
- package/dist/{index-B8-KKaH_.js → index-AISQhG1t.js} +2 -2
- package/dist/{index-B8-KKaH_.js.map → index-AISQhG1t.js.map} +1 -1
- package/dist/index-BDDJrQn0.js +10 -0
- package/dist/index-BDDJrQn0.js.map +1 -0
- package/dist/{index-Buv1ylwP.js → index-CBJiDDQc.js} +2 -2
- package/dist/{index-Buv1ylwP.js.map → index-CBJiDDQc.js.map} +1 -1
- package/dist/{index-DjKhaaWf.js → index-CbdFoSw3.js} +2 -2
- package/dist/{index-DjKhaaWf.js.map → index-CbdFoSw3.js.map} +1 -1
- package/dist/{index-CiU9_8f1.js → index-DU-niBi3.js} +2 -2
- package/dist/{index-CiU9_8f1.js.map → index-DU-niBi3.js.map} +1 -1
- package/dist/{index-B74jTc2b.js → index-y_v8Qog1.js} +3124 -3005
- package/dist/index-y_v8Qog1.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +143 -1
- package/dist/index.js +81 -79
- package/dist/index.js.map +1 -1
- package/dist/nodeRegistry.cjs +1 -1
- package/dist/nodeRegistry.cjs.map +1 -1
- package/dist/nodeRegistry.d.ts +39 -0
- package/dist/nodeRegistry.js +543 -23
- package/dist/nodeRegistry.js.map +1 -1
- package/dist/{templateSkeletons-CFMb6KIK.js → templateSkeletons-CHrd4Z5h.js} +375 -373
- package/dist/templateSkeletons-CHrd4Z5h.js.map +1 -0
- package/dist/templateSkeletons-CtknKiGO.js +2 -0
- package/dist/templateSkeletons-CtknKiGO.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-B6xrei80.js +0 -87
- package/dist/index-B6xrei80.js.map +0 -1
- package/dist/index-B74jTc2b.js.map +0 -1
- package/dist/index-BrJBVztu.js +0 -2
- package/dist/index-BrJBVztu.js.map +0 -1
- package/dist/index-CXmgrKoe.js +0 -2
- package/dist/index-CXmgrKoe.js.map +0 -1
- package/dist/index-CqMPyOkL.js +0 -10
- package/dist/index-CqMPyOkL.js.map +0 -1
- package/dist/index-Dcur-XJ9.js +0 -36
- package/dist/index-Dcur-XJ9.js.map +0 -1
- package/dist/subWorkflowDescriptor-DYOYgBzX.js +0 -535
- package/dist/subWorkflowDescriptor-DYOYgBzX.js.map +0 -1
- package/dist/subWorkflowDescriptor-JDKi2INh.js +0 -2
- package/dist/subWorkflowDescriptor-JDKi2INh.js.map +0 -1
- package/dist/templateSkeletons-CFMb6KIK.js.map +0 -1
- package/dist/templateSkeletons-DKBMuT6K.js +0 -2
- package/dist/templateSkeletons-DKBMuT6K.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo as P, useState as T, useRef as M, useEffect as de, useCallback as te } from "react";
|
|
2
2
|
import { useFormik as ke } from "formik";
|
|
3
|
-
import { k as pe,
|
|
3
|
+
import { k as pe, G as Ne, g as oe, a as ue, b as ie, v as se, H as ze, d as Te, V as we } from "./index-y_v8Qog1.js";
|
|
4
4
|
import { jsxs as t, Fragment as q, jsx as e } from "react/jsx-runtime";
|
|
5
|
-
import { Box as n, Collapse as Ie, Tooltip as
|
|
6
|
-
import { MdCheck as G, MdClose as _, MdAdd as J, MdArrowBack as fe, MdEdit as
|
|
5
|
+
import { Box as n, Collapse as Ie, Tooltip as D, Dialog as he, Typography as S, IconButton as Y, Stepper as Fe, Step as Oe, StepLabel as Re, Drawer as We, Chip as Ae, Divider as De } from "@mui/material";
|
|
6
|
+
import { MdCheck as G, MdClose as _, MdAdd as J, MdArrowBack as fe, MdEdit as Ee, MdDeleteOutline as Pe, MdSettings as be, MdArrowForward as Me } from "react-icons/md";
|
|
7
7
|
import { FaWpforms as _e } from "react-icons/fa6";
|
|
8
8
|
function sl({
|
|
9
9
|
schema: l,
|
|
@@ -89,7 +89,7 @@ function $e({ value: l, onChange: o }) {
|
|
|
89
89
|
const p = l ?? 12;
|
|
90
90
|
return /* @__PURE__ */ t(n, { children: [
|
|
91
91
|
/* @__PURE__ */ e("span", { className: m, children: "Column width" }),
|
|
92
|
-
/* @__PURE__ */ e(n, { sx: { display: "flex", gap: 0.5 }, children: Ve.map((c) => /* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ e(n, { sx: { display: "flex", gap: 0.5 }, children: Ve.map((c) => /* @__PURE__ */ e(D, { title: `colSpan: ${c.value}`, placement: "top", children: /* @__PURE__ */ e(
|
|
93
93
|
n,
|
|
94
94
|
{
|
|
95
95
|
component: "button",
|
|
@@ -221,7 +221,7 @@ function He({ condition: l, onChange: o }) {
|
|
|
221
221
|
] })
|
|
222
222
|
] });
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function E({ id: l, label: o, checked: p, onChange: c }) {
|
|
225
225
|
return /* @__PURE__ */ t(n, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
226
226
|
/* @__PURE__ */ e("input", { type: "checkbox", id: l, checked: p, onChange: (a) => c(a.target.checked), style: { cursor: "pointer", width: 14, height: 14, flexShrink: 0 } }),
|
|
227
227
|
/* @__PURE__ */ e("label", { htmlFor: l, className: m, style: { margin: 0, cursor: "pointer" }, children: o })
|
|
@@ -480,12 +480,12 @@ function ge({ field: l, onChange: o, onSave: p, onCancel: c, noFooter: a }) {
|
|
|
480
480
|
/* @__PURE__ */ e("input", { className: v, value: l.info ?? "", onChange: (r) => u("info", r.target.value || void 0), placeholder: "Shown in ℹ tooltip" })
|
|
481
481
|
] }),
|
|
482
482
|
/* @__PURE__ */ t(n, { sx: { display: "flex", flexWrap: "wrap", gap: 1.5 }, children: [
|
|
483
|
-
/* @__PURE__ */ e(
|
|
484
|
-
/* @__PURE__ */ e(
|
|
485
|
-
/* @__PURE__ */ e(
|
|
486
|
-
/* @__PURE__ */ e(
|
|
487
|
-
/* @__PURE__ */ e(
|
|
488
|
-
/* @__PURE__ */ e(
|
|
483
|
+
/* @__PURE__ */ e(E, { id: `${s}-req`, label: "Required", checked: !!l.required, onChange: (r) => u("required", r || void 0) }),
|
|
484
|
+
/* @__PURE__ */ e(E, { id: `${s}-dis`, label: "Disabled", checked: !!l.disabled, onChange: (r) => u("disabled", r || void 0) }),
|
|
485
|
+
/* @__PURE__ */ e(E, { id: `${s}-hid`, label: "Hidden", checked: !!l.hidden, onChange: (r) => u("hidden", r || void 0) }),
|
|
486
|
+
/* @__PURE__ */ e(E, { id: `${s}-opt`, label: "Show optional", checked: !!l.showOptional, onChange: (r) => u("showOptional", r || void 0) }),
|
|
487
|
+
/* @__PURE__ */ e(E, { id: `${s}-div`, label: "Divider after", checked: !!l.dividerAfter, onChange: (r) => u("dividerAfter", r || void 0) }),
|
|
488
|
+
/* @__PURE__ */ e(E, { id: `${s}-frm`, label: "Formula input", checked: !!l.formula, onChange: (r) => u("formula", r || void 0) })
|
|
489
489
|
] })
|
|
490
490
|
] }) })
|
|
491
491
|
] })
|
|
@@ -720,7 +720,7 @@ function re({ open: l, initial: o, onSave: p, onClose: c, editMode: a = !1 }) {
|
|
|
720
720
|
/* @__PURE__ */ e(S, { sx: { fontSize: 14, fontWeight: 700, color: "#0f172a", flex: 1 }, children: a ? "Edit Field" : "Add Field" }),
|
|
721
721
|
/* @__PURE__ */ e(Y, { size: "small", onClick: c, sx: { color: "#94a3b8" }, children: /* @__PURE__ */ e(_, { size: 17 }) })
|
|
722
722
|
] }),
|
|
723
|
-
/* @__PURE__ */ e(Fe, { activeStep: g, sx: { pb: 1.5 }, children: u.map((z,
|
|
723
|
+
/* @__PURE__ */ e(Fe, { activeStep: g, sx: { pb: 1.5 }, children: u.map((z, W) => /* @__PURE__ */ e(Oe, { completed: g > W, children: /* @__PURE__ */ e(Re, { children: z }) }, z)) })
|
|
724
724
|
] }),
|
|
725
725
|
/* @__PURE__ */ t(n, { sx: { flex: 1, overflowY: "auto" }, children: [
|
|
726
726
|
i === 1 && /* @__PURE__ */ e(ge, { field: s, onChange: d, onSave: b, onCancel: c, noFooter: !0 }),
|
|
@@ -759,8 +759,8 @@ function Xe({ field: l, index: o, total: p, onEdit: c, onDelete: a, onMoveUp: i,
|
|
|
759
759
|
] }),
|
|
760
760
|
/* @__PURE__ */ e(S, { sx: { fontSize: 11, color: "#94a3b8", fontFamily: "monospace" }, children: d })
|
|
761
761
|
] }),
|
|
762
|
-
/* @__PURE__ */ e(
|
|
763
|
-
/* @__PURE__ */ e(
|
|
762
|
+
/* @__PURE__ */ e(D, { title: "Edit field", placement: "top", children: /* @__PURE__ */ e(n, { component: "button", onClick: c, sx: { background: "none", border: "none", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", width: 28, height: 28, borderRadius: "6px", p: 0, color: "#94a3b8", "&:hover": { bgcolor: "#f1f5f9", color: "#475569" } }, children: /* @__PURE__ */ e(Ee, { size: 14 }) }) }),
|
|
763
|
+
/* @__PURE__ */ e(D, { title: "Remove field", placement: "top", children: /* @__PURE__ */ e(n, { component: "button", onClick: a, sx: { background: "none", border: "none", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", width: 28, height: 28, borderRadius: "6px", p: 0, color: "#94a3b8", "&:hover": { bgcolor: "#fee2e2", color: "#dc2626" } }, children: /* @__PURE__ */ e(Pe, { size: 16 }) }) })
|
|
764
764
|
] });
|
|
765
765
|
}
|
|
766
766
|
function Ze({ open: l, value: o, onSave: p, onClose: c }) {
|
|
@@ -867,7 +867,7 @@ function U({
|
|
|
867
867
|
initialFormulaConfig: x,
|
|
868
868
|
initialConditionConfig: y
|
|
869
869
|
}) {
|
|
870
|
-
const [N, u] = T(!1), [r, b] = T(!1), [f, C] = T(null), [g, I] = T(x ?? {}), [w, z] = T(y ?? {}),
|
|
870
|
+
const [N, u] = T(!1), [r, b] = T(!1), [f, C] = T(null), [g, I] = T(x ?? {}), [w, z] = T(y ?? {}), W = M(d ?? {}), j = P(() => ye(l), [l]), K = P(
|
|
871
871
|
() => d && Object.keys(d).length > 0 ? { ...j, ...d } : j,
|
|
872
872
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
873
873
|
[j, d]
|
|
@@ -881,12 +881,12 @@ function U({
|
|
|
881
881
|
formulaConfig: g,
|
|
882
882
|
conditionConfig: w,
|
|
883
883
|
conditionExpressions: se(w),
|
|
884
|
-
values:
|
|
885
|
-
evaluationPayload: oe({ values:
|
|
884
|
+
values: W.current,
|
|
885
|
+
evaluationPayload: oe({ values: W.current, conditionConfig: w })
|
|
886
886
|
});
|
|
887
887
|
}, [w, g, l]);
|
|
888
888
|
const X = te((F) => {
|
|
889
|
-
|
|
889
|
+
W.current = F, a && a({
|
|
890
890
|
schema: l,
|
|
891
891
|
formulaConfig: g,
|
|
892
892
|
conditionConfig: w,
|
|
@@ -906,7 +906,7 @@ function U({
|
|
|
906
906
|
return {
|
|
907
907
|
...O,
|
|
908
908
|
tabs: le.map(
|
|
909
|
-
(
|
|
909
|
+
(A) => A.id === Q ? { ...A, fields: [...A.fields ?? [], F] } : A
|
|
910
910
|
)
|
|
911
911
|
};
|
|
912
912
|
});
|
|
@@ -919,7 +919,7 @@ function U({
|
|
|
919
919
|
return {
|
|
920
920
|
...O,
|
|
921
921
|
tabs: le.map(
|
|
922
|
-
(
|
|
922
|
+
(A) => A.id === V ? { ...A, fields: (A.fields ?? []).filter((el, Se) => Se !== Q) } : A
|
|
923
923
|
)
|
|
924
924
|
};
|
|
925
925
|
});
|
|
@@ -931,7 +931,7 @@ function U({
|
|
|
931
931
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
932
932
|
}), [l, o]), ae = /* @__PURE__ */ t("div", { className: "schema-builder-root", children: [
|
|
933
933
|
l.length > 0 && /* @__PURE__ */ e("div", { className: "schema-builder-header", children: /* @__PURE__ */ t("div", { className: "schema-builder-actions", children: [
|
|
934
|
-
/* @__PURE__ */ e(
|
|
934
|
+
/* @__PURE__ */ e(D, { title: "Edit schema", placement: "top", children: /* @__PURE__ */ t(
|
|
935
935
|
"button",
|
|
936
936
|
{
|
|
937
937
|
className: "sb-btn sb-btn-outline",
|
|
@@ -942,7 +942,7 @@ function U({
|
|
|
942
942
|
]
|
|
943
943
|
}
|
|
944
944
|
) }),
|
|
945
|
-
/* @__PURE__ */ e(
|
|
945
|
+
/* @__PURE__ */ e(D, { title: "Add a new field", placement: "top", children: /* @__PURE__ */ t(
|
|
946
946
|
"button",
|
|
947
947
|
{
|
|
948
948
|
className: "sb-btn sb-btn-primary",
|
|
@@ -1016,8 +1016,8 @@ function Qe({ fields: l, onOpen: o }) {
|
|
|
1016
1016
|
return /* @__PURE__ */ t(n, { sx: { border: "1px solid #e2e8f0", borderRadius: "8px", bgcolor: "#fff", overflow: "hidden" }, children: [
|
|
1017
1017
|
l.length > 0 ? /* @__PURE__ */ e(n, { sx: { px: 1.5, py: 1.25, display: "flex", flexWrap: "wrap", gap: 0.5 }, children: l.map((p, c) => {
|
|
1018
1018
|
const a = p.id ?? p.name ?? "";
|
|
1019
|
-
return /* @__PURE__ */ e(
|
|
1020
|
-
|
|
1019
|
+
return /* @__PURE__ */ e(D, { title: `${p.type} · ${a}`, placement: "top", children: /* @__PURE__ */ e(
|
|
1020
|
+
Ae,
|
|
1021
1021
|
{
|
|
1022
1022
|
label: p.label || a,
|
|
1023
1023
|
size: "small",
|
|
@@ -1025,7 +1025,7 @@ function Qe({ fields: l, onOpen: o }) {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
) }, c);
|
|
1027
1027
|
}) }) : /* @__PURE__ */ e(n, { sx: { px: 1.5, py: 1.5 }, children: /* @__PURE__ */ e(S, { sx: { fontSize: 12, color: "#94a3b8" }, children: "No fields defined yet" }) }),
|
|
1028
|
-
/* @__PURE__ */ e(
|
|
1028
|
+
/* @__PURE__ */ e(De, { sx: { borderColor: "#f1f5f9" } }),
|
|
1029
1029
|
/* @__PURE__ */ t(n, { onClick: o, sx: { display: "flex", alignItems: "center", gap: 0.75, px: 1.5, py: 1, cursor: "pointer", "&:hover": { bgcolor: "#f8fafc" }, transition: "background 0.12s" }, children: [
|
|
1030
1030
|
l.length === 0 ? /* @__PURE__ */ e(J, { size: 14, color: "#6366f1" }) : /* @__PURE__ */ e(be, { size: 13, color: "#6366f1" }),
|
|
1031
1031
|
/* @__PURE__ */ e(S, { sx: { fontSize: 12, fontWeight: 600, color: "#6366f1", flex: 1 }, children: l.length === 0 ? "Add fields" : "Configure fields" }),
|
|
@@ -1045,7 +1045,7 @@ function cl({
|
|
|
1045
1045
|
drawerTitle: d = "Configure Fields",
|
|
1046
1046
|
drawerWidth: x = 580
|
|
1047
1047
|
}) {
|
|
1048
|
-
const [y, N] = T(!1), [u, r] = T({ type: "list" }), [b, f] = T(l), C = M(null), g = M(void 0), I = M(void 0), w = M(void 0), [z,
|
|
1048
|
+
const [y, N] = T(!1), [u, r] = T({ type: "list" }), [b, f] = T(l), C = M(null), g = M(void 0), I = M(void 0), w = M(void 0), [z, W] = T(null);
|
|
1049
1049
|
function j() {
|
|
1050
1050
|
f(l), r({ type: "list" }), N(!0);
|
|
1051
1051
|
}
|
|
@@ -1060,10 +1060,10 @@ function cl({
|
|
|
1060
1060
|
function X() {
|
|
1061
1061
|
if (u.type !== "edit" || !z) return;
|
|
1062
1062
|
const k = [...b];
|
|
1063
|
-
k[u.index] = z, f(k), r({ type: "list" }),
|
|
1063
|
+
k[u.index] = z, f(k), r({ type: "list" }), W(null);
|
|
1064
1064
|
}
|
|
1065
1065
|
function $() {
|
|
1066
|
-
r({ type: "list" }),
|
|
1066
|
+
r({ type: "list" }), W(null);
|
|
1067
1067
|
}
|
|
1068
1068
|
const Z = JSON.stringify(b) !== JSON.stringify(l);
|
|
1069
1069
|
return u.type === "edit" && b[u.index], /* @__PURE__ */ t(q, { children: [
|
|
@@ -1072,7 +1072,7 @@ function cl({
|
|
|
1072
1072
|
/* @__PURE__ */ e(Qe, { fields: l, onOpen: j })
|
|
1073
1073
|
] }),
|
|
1074
1074
|
/* @__PURE__ */ t(
|
|
1075
|
-
|
|
1075
|
+
We,
|
|
1076
1076
|
{
|
|
1077
1077
|
anchor: "right",
|
|
1078
1078
|
open: y,
|
|
@@ -1080,12 +1080,12 @@ function cl({
|
|
|
1080
1080
|
PaperProps: { sx: { width: x, display: "flex", flexDirection: "column", boxShadow: "-4px 0 24px rgba(0,0,0,0.12)", overflow: "hidden" } },
|
|
1081
1081
|
children: [
|
|
1082
1082
|
/* @__PURE__ */ t(n, { sx: { display: "flex", alignItems: "center", px: 2, py: 1.5, borderBottom: "1px solid #e2e8f0", flexShrink: 0, gap: 1 }, children: [
|
|
1083
|
-
u.type === "edit" && /* @__PURE__ */ e(
|
|
1083
|
+
u.type === "edit" && /* @__PURE__ */ e(D, { title: "Back to fields", placement: "bottom", children: /* @__PURE__ */ e(Y, { size: "small", onClick: $, sx: { color: "#64748b" }, children: /* @__PURE__ */ e(fe, { size: 17 }) }) }),
|
|
1084
1084
|
/* @__PURE__ */ t(n, { sx: { flex: 1 }, children: [
|
|
1085
1085
|
/* @__PURE__ */ e(S, { sx: { fontSize: 14, fontWeight: 700, color: "#0f172a" }, children: u.type === "edit" ? (z == null ? void 0 : z.label) || (z == null ? void 0 : z.id) || "Edit field" : d }),
|
|
1086
1086
|
/* @__PURE__ */ e(S, { sx: { fontSize: 11, color: "#94a3b8" }, children: u.type === "edit" ? "Configure field properties" : `${b.length} field${b.length !== 1 ? "s" : ""} defined` })
|
|
1087
1087
|
] }),
|
|
1088
|
-
u.type === "list" && /* @__PURE__ */ e(
|
|
1088
|
+
u.type === "list" && /* @__PURE__ */ e(D, { title: "Close", placement: "bottom", children: /* @__PURE__ */ e(Y, { size: "small", onClick: L, sx: { color: "#94a3b8" }, children: /* @__PURE__ */ e(_, { size: 17 }) }) })
|
|
1089
1089
|
] }),
|
|
1090
1090
|
u.type === "list" && /* @__PURE__ */ t(q, { children: [
|
|
1091
1091
|
/* @__PURE__ */ e(n, { sx: { flex: 1, overflowY: "auto", p: 2.5 }, children: /* @__PURE__ */ e(
|
|
@@ -1118,7 +1118,7 @@ function cl({
|
|
|
1118
1118
|
ge,
|
|
1119
1119
|
{
|
|
1120
1120
|
field: z,
|
|
1121
|
-
onChange:
|
|
1121
|
+
onChange: W,
|
|
1122
1122
|
onSave: X,
|
|
1123
1123
|
onCancel: $
|
|
1124
1124
|
}
|
|
@@ -1134,4 +1134,4 @@ export {
|
|
|
1134
1134
|
cl as a,
|
|
1135
1135
|
sl as u
|
|
1136
1136
|
};
|
|
1137
|
-
//# sourceMappingURL=SchemaBuilderDrawer-
|
|
1137
|
+
//# sourceMappingURL=SchemaBuilderDrawer-DlmInnSC.js.map
|