next-workflow-builder 0.4.6 → 0.5.0
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/{chunk-X5GOM4L4.js → chunk-5H76TY4T.js} +1 -1
- package/dist/{chunk-BL6QJDNB.js → chunk-CKE7ETZL.js} +1 -1
- package/dist/{chunk-MIBRBQIJ.js → chunk-EMCA7GLF.js} +145 -2
- package/dist/{chunk-KZNRU3LB.js → chunk-J72T2LRL.js} +1 -1
- package/dist/{chunk-F6HAK4HT.js → chunk-JUV5RBYM.js} +2 -2
- package/dist/{chunk-PGG52OSJ.js → chunk-PEVVELQ6.js} +1 -1
- package/dist/client/index.js +247 -190
- package/dist/{condition-IWTKYMBN.js → condition-VHC4KYLI.js} +5 -5
- package/dist/{database-query-C4GDVVDK.js → database-query-BYPF5CDB.js} +3 -3
- package/dist/{http-request-T2UP7JLH.js → http-request-4OT32ZXA.js} +1 -1
- package/dist/{loop-2237QQBO.js → loop-S5H7DSCB.js} +5 -5
- package/dist/{merge-Q5YUAT6F.js → merge-X5JAIZSZ.js} +5 -5
- package/dist/next/index.js +15 -2
- package/dist/server/api/index.js +55 -343
- package/dist/server/index.js +5 -5
- package/dist/{switch-H2N4F2YX.js → switch-WZBVDWWR.js} +5 -5
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
+
DATA_TYPE_OPTIONS,
|
|
4
|
+
OPERATORS,
|
|
3
5
|
conditionAction,
|
|
4
6
|
databaseQueryAction,
|
|
5
7
|
generateWorkflowCode,
|
|
6
8
|
httpRequestAction
|
|
7
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-EMCA7GLF.js";
|
|
8
10
|
import {
|
|
9
11
|
cn
|
|
10
12
|
} from "../chunk-5YYA34YV.js";
|
|
@@ -1176,6 +1178,166 @@ import { useAtomValue as useAtomValue5, useSetAtom as useSetAtom5 } from "jotai"
|
|
|
1176
1178
|
import { HelpCircle as HelpCircle2, Plus as Plus3, Settings as Settings2 } from "lucide-react";
|
|
1177
1179
|
import { useEffect as useEffect8, useMemo as useMemo4, useState as useState11 } from "react";
|
|
1178
1180
|
|
|
1181
|
+
// src/client/components/ui/select.tsx
|
|
1182
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
1183
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
1184
|
+
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1185
|
+
function Select({
|
|
1186
|
+
...props
|
|
1187
|
+
}) {
|
|
1188
|
+
return /* @__PURE__ */ jsx7(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
1189
|
+
}
|
|
1190
|
+
function SelectGroup({
|
|
1191
|
+
...props
|
|
1192
|
+
}) {
|
|
1193
|
+
return /* @__PURE__ */ jsx7(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
1194
|
+
}
|
|
1195
|
+
function SelectValue({
|
|
1196
|
+
...props
|
|
1197
|
+
}) {
|
|
1198
|
+
return /* @__PURE__ */ jsx7(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
1199
|
+
}
|
|
1200
|
+
function SelectTrigger({
|
|
1201
|
+
className,
|
|
1202
|
+
size = "default",
|
|
1203
|
+
children,
|
|
1204
|
+
...props
|
|
1205
|
+
}) {
|
|
1206
|
+
return /* @__PURE__ */ jsxs2(
|
|
1207
|
+
SelectPrimitive.Trigger,
|
|
1208
|
+
{
|
|
1209
|
+
"data-slot": "select-trigger",
|
|
1210
|
+
"data-size": size,
|
|
1211
|
+
className: cn(
|
|
1212
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive bg-transparent hover:bg-accent/50 flex w-fit items-center justify-between gap-2 rounded-md border px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1213
|
+
className
|
|
1214
|
+
),
|
|
1215
|
+
...props,
|
|
1216
|
+
children: [
|
|
1217
|
+
children,
|
|
1218
|
+
/* @__PURE__ */ jsx7(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx7(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
1219
|
+
]
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
function SelectContent({
|
|
1224
|
+
className,
|
|
1225
|
+
children,
|
|
1226
|
+
position = "popper",
|
|
1227
|
+
align = "center",
|
|
1228
|
+
...props
|
|
1229
|
+
}) {
|
|
1230
|
+
return /* @__PURE__ */ jsx7(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs2(
|
|
1231
|
+
SelectPrimitive.Content,
|
|
1232
|
+
{
|
|
1233
|
+
"data-slot": "select-content",
|
|
1234
|
+
className: cn(
|
|
1235
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
1236
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1237
|
+
className
|
|
1238
|
+
),
|
|
1239
|
+
position,
|
|
1240
|
+
align,
|
|
1241
|
+
...props,
|
|
1242
|
+
children: [
|
|
1243
|
+
/* @__PURE__ */ jsx7(SelectScrollUpButton, {}),
|
|
1244
|
+
/* @__PURE__ */ jsx7(
|
|
1245
|
+
SelectPrimitive.Viewport,
|
|
1246
|
+
{
|
|
1247
|
+
className: cn(
|
|
1248
|
+
"p-1",
|
|
1249
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
1250
|
+
),
|
|
1251
|
+
children
|
|
1252
|
+
}
|
|
1253
|
+
),
|
|
1254
|
+
/* @__PURE__ */ jsx7(SelectScrollDownButton, {})
|
|
1255
|
+
]
|
|
1256
|
+
}
|
|
1257
|
+
) });
|
|
1258
|
+
}
|
|
1259
|
+
function SelectLabel({
|
|
1260
|
+
className,
|
|
1261
|
+
...props
|
|
1262
|
+
}) {
|
|
1263
|
+
return /* @__PURE__ */ jsx7(
|
|
1264
|
+
SelectPrimitive.Label,
|
|
1265
|
+
{
|
|
1266
|
+
"data-slot": "select-label",
|
|
1267
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
1268
|
+
...props
|
|
1269
|
+
}
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
function SelectItem({
|
|
1273
|
+
className,
|
|
1274
|
+
children,
|
|
1275
|
+
...props
|
|
1276
|
+
}) {
|
|
1277
|
+
return /* @__PURE__ */ jsxs2(
|
|
1278
|
+
SelectPrimitive.Item,
|
|
1279
|
+
{
|
|
1280
|
+
"data-slot": "select-item",
|
|
1281
|
+
className: cn(
|
|
1282
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1283
|
+
className
|
|
1284
|
+
),
|
|
1285
|
+
...props,
|
|
1286
|
+
children: [
|
|
1287
|
+
/* @__PURE__ */ jsx7("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx7(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx7(CheckIcon, { className: "size-4" }) }) }),
|
|
1288
|
+
/* @__PURE__ */ jsx7(SelectPrimitive.ItemText, { children })
|
|
1289
|
+
]
|
|
1290
|
+
}
|
|
1291
|
+
);
|
|
1292
|
+
}
|
|
1293
|
+
function SelectSeparator({
|
|
1294
|
+
className,
|
|
1295
|
+
...props
|
|
1296
|
+
}) {
|
|
1297
|
+
return /* @__PURE__ */ jsx7(
|
|
1298
|
+
SelectPrimitive.Separator,
|
|
1299
|
+
{
|
|
1300
|
+
"data-slot": "select-separator",
|
|
1301
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
1302
|
+
...props
|
|
1303
|
+
}
|
|
1304
|
+
);
|
|
1305
|
+
}
|
|
1306
|
+
function SelectScrollUpButton({
|
|
1307
|
+
className,
|
|
1308
|
+
...props
|
|
1309
|
+
}) {
|
|
1310
|
+
return /* @__PURE__ */ jsx7(
|
|
1311
|
+
SelectPrimitive.ScrollUpButton,
|
|
1312
|
+
{
|
|
1313
|
+
"data-slot": "select-scroll-up-button",
|
|
1314
|
+
className: cn(
|
|
1315
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1316
|
+
className
|
|
1317
|
+
),
|
|
1318
|
+
...props,
|
|
1319
|
+
children: /* @__PURE__ */ jsx7(ChevronUpIcon, { className: "size-4" })
|
|
1320
|
+
}
|
|
1321
|
+
);
|
|
1322
|
+
}
|
|
1323
|
+
function SelectScrollDownButton({
|
|
1324
|
+
className,
|
|
1325
|
+
...props
|
|
1326
|
+
}) {
|
|
1327
|
+
return /* @__PURE__ */ jsx7(
|
|
1328
|
+
SelectPrimitive.ScrollDownButton,
|
|
1329
|
+
{
|
|
1330
|
+
"data-slot": "select-scroll-down-button",
|
|
1331
|
+
className: cn(
|
|
1332
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1333
|
+
className
|
|
1334
|
+
),
|
|
1335
|
+
...props,
|
|
1336
|
+
children: /* @__PURE__ */ jsx7(ChevronDownIcon, { className: "size-4" })
|
|
1337
|
+
}
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1179
1341
|
// src/client/components/ui/template-badge-input.tsx
|
|
1180
1342
|
import { useAtom as useAtom2 } from "jotai";
|
|
1181
1343
|
import { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
|
|
@@ -1185,7 +1347,7 @@ import { useAtom } from "jotai";
|
|
|
1185
1347
|
import { Check } from "lucide-react";
|
|
1186
1348
|
import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
1187
1349
|
import { createPortal } from "react-dom";
|
|
1188
|
-
import { Fragment, jsx as
|
|
1350
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1189
1351
|
var getNodeDisplayName = (node) => {
|
|
1190
1352
|
if (node.data.label) {
|
|
1191
1353
|
return node.data.label;
|
|
@@ -1404,7 +1566,7 @@ function TemplateAutocomplete({
|
|
|
1404
1566
|
left: Math.min(position.left, window.innerWidth - 320)
|
|
1405
1567
|
// Keep menu (320px wide) within viewport
|
|
1406
1568
|
};
|
|
1407
|
-
const menuContent = /* @__PURE__ */
|
|
1569
|
+
const menuContent = /* @__PURE__ */ jsx8(
|
|
1408
1570
|
"div",
|
|
1409
1571
|
{
|
|
1410
1572
|
className: "fixed z-[9999] w-80 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md",
|
|
@@ -1413,7 +1575,7 @@ function TemplateAutocomplete({
|
|
|
1413
1575
|
top: `${adjustedPosition.top}px`,
|
|
1414
1576
|
left: `${adjustedPosition.left}px`
|
|
1415
1577
|
},
|
|
1416
|
-
children: /* @__PURE__ */
|
|
1578
|
+
children: /* @__PURE__ */ jsx8("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.map((option, index) => /* @__PURE__ */ jsxs3(
|
|
1417
1579
|
"div",
|
|
1418
1580
|
{
|
|
1419
1581
|
className: cn(
|
|
@@ -1423,17 +1585,17 @@ function TemplateAutocomplete({
|
|
|
1423
1585
|
onClick: () => onSelect(option.template),
|
|
1424
1586
|
onMouseEnter: () => setSelectedIndex(index),
|
|
1425
1587
|
children: [
|
|
1426
|
-
/* @__PURE__ */
|
|
1427
|
-
/* @__PURE__ */
|
|
1428
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex-1", children: [
|
|
1589
|
+
/* @__PURE__ */ jsx8("div", { className: "font-medium", children: option.type === "node" ? option.nodeName : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
1590
|
+
/* @__PURE__ */ jsxs3("span", { className: "text-muted-foreground", children: [
|
|
1429
1591
|
option.nodeName,
|
|
1430
1592
|
"."
|
|
1431
1593
|
] }),
|
|
1432
1594
|
option.field
|
|
1433
1595
|
] }) }),
|
|
1434
|
-
option.description && /* @__PURE__ */
|
|
1596
|
+
option.description && /* @__PURE__ */ jsx8("div", { className: "text-muted-foreground text-xs", children: option.description })
|
|
1435
1597
|
] }),
|
|
1436
|
-
index === selectedIndex && /* @__PURE__ */
|
|
1598
|
+
index === selectedIndex && /* @__PURE__ */ jsx8(Check, { className: "h-4 w-4" })
|
|
1437
1599
|
]
|
|
1438
1600
|
},
|
|
1439
1601
|
`${option.nodeId}-${option.field || "root"}`
|
|
@@ -1444,7 +1606,7 @@ function TemplateAutocomplete({
|
|
|
1444
1606
|
}
|
|
1445
1607
|
|
|
1446
1608
|
// src/client/components/ui/template-badge-input.tsx
|
|
1447
|
-
import { Fragment as Fragment2, jsx as
|
|
1609
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1448
1610
|
function doesNodeExist(template, nodes) {
|
|
1449
1611
|
const match = template.match(/\{\{@([^:]+):([^}]+)\}\}/);
|
|
1450
1612
|
if (!match) return false;
|
|
@@ -1795,8 +1957,8 @@ function TemplateBadgeInput({
|
|
|
1795
1957
|
updateDisplay();
|
|
1796
1958
|
}
|
|
1797
1959
|
}, [internalValue, isFocused]);
|
|
1798
|
-
return /* @__PURE__ */
|
|
1799
|
-
/* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
1961
|
+
/* @__PURE__ */ jsx9(
|
|
1800
1962
|
"div",
|
|
1801
1963
|
{
|
|
1802
1964
|
className: cn(
|
|
@@ -1804,7 +1966,7 @@ function TemplateBadgeInput({
|
|
|
1804
1966
|
disabled && "cursor-not-allowed opacity-50",
|
|
1805
1967
|
className
|
|
1806
1968
|
),
|
|
1807
|
-
children: /* @__PURE__ */
|
|
1969
|
+
children: /* @__PURE__ */ jsx9(
|
|
1808
1970
|
"div",
|
|
1809
1971
|
{
|
|
1810
1972
|
className: "w-full outline-none",
|
|
@@ -1821,7 +1983,7 @@ function TemplateBadgeInput({
|
|
|
1821
1983
|
)
|
|
1822
1984
|
}
|
|
1823
1985
|
),
|
|
1824
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ jsx9(
|
|
1825
1987
|
TemplateAutocomplete,
|
|
1826
1988
|
{
|
|
1827
1989
|
currentNodeId: selectedNodeId || void 0,
|
|
@@ -1836,193 +1998,88 @@ function TemplateBadgeInput({
|
|
|
1836
1998
|
}
|
|
1837
1999
|
|
|
1838
2000
|
// src/plugins/condition/fields.tsx
|
|
1839
|
-
import { jsx as
|
|
2001
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1840
2002
|
function ConditionFields({
|
|
1841
2003
|
config,
|
|
1842
2004
|
onUpdateConfig,
|
|
1843
2005
|
disabled
|
|
1844
2006
|
}) {
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
2007
|
+
const dataType = config?.dataType || "string";
|
|
2008
|
+
const operator = config?.operator || OPERATORS[dataType][0].value;
|
|
2009
|
+
const operatorDefs = OPERATORS[dataType];
|
|
2010
|
+
const selectedOp = operatorDefs.find((op) => op.value === operator);
|
|
2011
|
+
const isUnary = selectedOp?.unary ?? false;
|
|
2012
|
+
function handleDataTypeChange(value) {
|
|
2013
|
+
onUpdateConfig("dataType", value);
|
|
2014
|
+
const newOps = OPERATORS[value];
|
|
2015
|
+
if (newOps?.[0]) {
|
|
2016
|
+
onUpdateConfig("operator", newOps[0].value);
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
return /* @__PURE__ */ jsxs5("div", { className: "space-y-4", children: [
|
|
2020
|
+
/* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
|
|
2021
|
+
/* @__PURE__ */ jsx10(Label, { htmlFor: "leftValue", children: "Value to Test" }),
|
|
2022
|
+
/* @__PURE__ */ jsx10(
|
|
2023
|
+
TemplateBadgeInput,
|
|
2024
|
+
{
|
|
2025
|
+
disabled,
|
|
2026
|
+
id: "leftValue",
|
|
2027
|
+
onChange: (value) => onUpdateConfig("leftValue", value),
|
|
2028
|
+
placeholder: "e.g., {{PreviousNode.status}}",
|
|
2029
|
+
value: config?.leftValue || ""
|
|
2030
|
+
}
|
|
2031
|
+
),
|
|
2032
|
+
/* @__PURE__ */ jsx10("p", { className: "text-muted-foreground text-xs", children: "Use @ to reference previous node outputs." })
|
|
2033
|
+
] }),
|
|
2034
|
+
/* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
|
|
2035
|
+
/* @__PURE__ */ jsx10(Label, { htmlFor: "dataType", children: "Data Type" }),
|
|
2036
|
+
/* @__PURE__ */ jsxs5(
|
|
2037
|
+
Select,
|
|
2038
|
+
{
|
|
2039
|
+
disabled,
|
|
2040
|
+
onValueChange: handleDataTypeChange,
|
|
2041
|
+
value: dataType,
|
|
2042
|
+
children: [
|
|
2043
|
+
/* @__PURE__ */ jsx10(SelectTrigger, { id: "dataType", children: /* @__PURE__ */ jsx10(SelectValue, { placeholder: "Select data type" }) }),
|
|
2044
|
+
/* @__PURE__ */ jsx10(SelectContent, { children: DATA_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ jsx10(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
2045
|
+
]
|
|
2046
|
+
}
|
|
2047
|
+
)
|
|
2048
|
+
] }),
|
|
2049
|
+
/* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
|
|
2050
|
+
/* @__PURE__ */ jsx10(Label, { htmlFor: "operator", children: "Operator" }),
|
|
2051
|
+
/* @__PURE__ */ jsxs5(
|
|
2052
|
+
Select,
|
|
2053
|
+
{
|
|
2054
|
+
disabled,
|
|
2055
|
+
onValueChange: (value) => onUpdateConfig("operator", value),
|
|
2056
|
+
value: operator,
|
|
2057
|
+
children: [
|
|
2058
|
+
/* @__PURE__ */ jsx10(SelectTrigger, { id: "operator", children: /* @__PURE__ */ jsx10(SelectValue, { placeholder: "Select operator" }) }),
|
|
2059
|
+
/* @__PURE__ */ jsx10(SelectContent, { children: operatorDefs.map((op) => /* @__PURE__ */ jsx10(SelectItem, { value: op.value, children: op.label }, op.value)) })
|
|
2060
|
+
]
|
|
2061
|
+
}
|
|
2062
|
+
)
|
|
2063
|
+
] }),
|
|
2064
|
+
!isUnary && /* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
|
|
2065
|
+
/* @__PURE__ */ jsx10(Label, { htmlFor: "rightValue", children: "Compare Value" }),
|
|
2066
|
+
/* @__PURE__ */ jsx10(
|
|
2067
|
+
TemplateBadgeInput,
|
|
2068
|
+
{
|
|
2069
|
+
disabled,
|
|
2070
|
+
id: "rightValue",
|
|
2071
|
+
onChange: (value) => onUpdateConfig("rightValue", value),
|
|
2072
|
+
placeholder: "e.g., 200 or {{OtherNode.field}}",
|
|
2073
|
+
value: config?.rightValue || ""
|
|
2074
|
+
}
|
|
2075
|
+
)
|
|
2076
|
+
] })
|
|
1858
2077
|
] });
|
|
1859
2078
|
}
|
|
1860
2079
|
|
|
1861
2080
|
// src/client/components/workflow/config/schema-builder.tsx
|
|
1862
2081
|
import { Plus, Trash2 } from "lucide-react";
|
|
1863
2082
|
import { nanoid } from "nanoid";
|
|
1864
|
-
|
|
1865
|
-
// src/client/components/ui/select.tsx
|
|
1866
|
-
import { Select as SelectPrimitive } from "radix-ui";
|
|
1867
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
1868
|
-
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1869
|
-
function Select({
|
|
1870
|
-
...props
|
|
1871
|
-
}) {
|
|
1872
|
-
return /* @__PURE__ */ jsx10(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
1873
|
-
}
|
|
1874
|
-
function SelectGroup({
|
|
1875
|
-
...props
|
|
1876
|
-
}) {
|
|
1877
|
-
return /* @__PURE__ */ jsx10(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
1878
|
-
}
|
|
1879
|
-
function SelectValue({
|
|
1880
|
-
...props
|
|
1881
|
-
}) {
|
|
1882
|
-
return /* @__PURE__ */ jsx10(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
1883
|
-
}
|
|
1884
|
-
function SelectTrigger({
|
|
1885
|
-
className,
|
|
1886
|
-
size = "default",
|
|
1887
|
-
children,
|
|
1888
|
-
...props
|
|
1889
|
-
}) {
|
|
1890
|
-
return /* @__PURE__ */ jsxs5(
|
|
1891
|
-
SelectPrimitive.Trigger,
|
|
1892
|
-
{
|
|
1893
|
-
"data-slot": "select-trigger",
|
|
1894
|
-
"data-size": size,
|
|
1895
|
-
className: cn(
|
|
1896
|
-
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive bg-transparent hover:bg-accent/50 flex w-fit items-center justify-between gap-2 rounded-md border px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1897
|
-
className
|
|
1898
|
-
),
|
|
1899
|
-
...props,
|
|
1900
|
-
children: [
|
|
1901
|
-
children,
|
|
1902
|
-
/* @__PURE__ */ jsx10(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx10(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
1903
|
-
]
|
|
1904
|
-
}
|
|
1905
|
-
);
|
|
1906
|
-
}
|
|
1907
|
-
function SelectContent({
|
|
1908
|
-
className,
|
|
1909
|
-
children,
|
|
1910
|
-
position = "popper",
|
|
1911
|
-
align = "center",
|
|
1912
|
-
...props
|
|
1913
|
-
}) {
|
|
1914
|
-
return /* @__PURE__ */ jsx10(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs5(
|
|
1915
|
-
SelectPrimitive.Content,
|
|
1916
|
-
{
|
|
1917
|
-
"data-slot": "select-content",
|
|
1918
|
-
className: cn(
|
|
1919
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
1920
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1921
|
-
className
|
|
1922
|
-
),
|
|
1923
|
-
position,
|
|
1924
|
-
align,
|
|
1925
|
-
...props,
|
|
1926
|
-
children: [
|
|
1927
|
-
/* @__PURE__ */ jsx10(SelectScrollUpButton, {}),
|
|
1928
|
-
/* @__PURE__ */ jsx10(
|
|
1929
|
-
SelectPrimitive.Viewport,
|
|
1930
|
-
{
|
|
1931
|
-
className: cn(
|
|
1932
|
-
"p-1",
|
|
1933
|
-
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
1934
|
-
),
|
|
1935
|
-
children
|
|
1936
|
-
}
|
|
1937
|
-
),
|
|
1938
|
-
/* @__PURE__ */ jsx10(SelectScrollDownButton, {})
|
|
1939
|
-
]
|
|
1940
|
-
}
|
|
1941
|
-
) });
|
|
1942
|
-
}
|
|
1943
|
-
function SelectLabel({
|
|
1944
|
-
className,
|
|
1945
|
-
...props
|
|
1946
|
-
}) {
|
|
1947
|
-
return /* @__PURE__ */ jsx10(
|
|
1948
|
-
SelectPrimitive.Label,
|
|
1949
|
-
{
|
|
1950
|
-
"data-slot": "select-label",
|
|
1951
|
-
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
1952
|
-
...props
|
|
1953
|
-
}
|
|
1954
|
-
);
|
|
1955
|
-
}
|
|
1956
|
-
function SelectItem({
|
|
1957
|
-
className,
|
|
1958
|
-
children,
|
|
1959
|
-
...props
|
|
1960
|
-
}) {
|
|
1961
|
-
return /* @__PURE__ */ jsxs5(
|
|
1962
|
-
SelectPrimitive.Item,
|
|
1963
|
-
{
|
|
1964
|
-
"data-slot": "select-item",
|
|
1965
|
-
className: cn(
|
|
1966
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1967
|
-
className
|
|
1968
|
-
),
|
|
1969
|
-
...props,
|
|
1970
|
-
children: [
|
|
1971
|
-
/* @__PURE__ */ jsx10("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx10(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx10(CheckIcon, { className: "size-4" }) }) }),
|
|
1972
|
-
/* @__PURE__ */ jsx10(SelectPrimitive.ItemText, { children })
|
|
1973
|
-
]
|
|
1974
|
-
}
|
|
1975
|
-
);
|
|
1976
|
-
}
|
|
1977
|
-
function SelectSeparator({
|
|
1978
|
-
className,
|
|
1979
|
-
...props
|
|
1980
|
-
}) {
|
|
1981
|
-
return /* @__PURE__ */ jsx10(
|
|
1982
|
-
SelectPrimitive.Separator,
|
|
1983
|
-
{
|
|
1984
|
-
"data-slot": "select-separator",
|
|
1985
|
-
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
1986
|
-
...props
|
|
1987
|
-
}
|
|
1988
|
-
);
|
|
1989
|
-
}
|
|
1990
|
-
function SelectScrollUpButton({
|
|
1991
|
-
className,
|
|
1992
|
-
...props
|
|
1993
|
-
}) {
|
|
1994
|
-
return /* @__PURE__ */ jsx10(
|
|
1995
|
-
SelectPrimitive.ScrollUpButton,
|
|
1996
|
-
{
|
|
1997
|
-
"data-slot": "select-scroll-up-button",
|
|
1998
|
-
className: cn(
|
|
1999
|
-
"flex cursor-default items-center justify-center py-1",
|
|
2000
|
-
className
|
|
2001
|
-
),
|
|
2002
|
-
...props,
|
|
2003
|
-
children: /* @__PURE__ */ jsx10(ChevronUpIcon, { className: "size-4" })
|
|
2004
|
-
}
|
|
2005
|
-
);
|
|
2006
|
-
}
|
|
2007
|
-
function SelectScrollDownButton({
|
|
2008
|
-
className,
|
|
2009
|
-
...props
|
|
2010
|
-
}) {
|
|
2011
|
-
return /* @__PURE__ */ jsx10(
|
|
2012
|
-
SelectPrimitive.ScrollDownButton,
|
|
2013
|
-
{
|
|
2014
|
-
"data-slot": "select-scroll-down-button",
|
|
2015
|
-
className: cn(
|
|
2016
|
-
"flex cursor-default items-center justify-center py-1",
|
|
2017
|
-
className
|
|
2018
|
-
),
|
|
2019
|
-
...props,
|
|
2020
|
-
children: /* @__PURE__ */ jsx10(ChevronDownIcon, { className: "size-4" })
|
|
2021
|
-
}
|
|
2022
|
-
);
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
// src/client/components/workflow/config/schema-builder.tsx
|
|
2026
2083
|
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2027
2084
|
function SchemaBuilder({
|
|
2028
2085
|
schema,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-J72T2LRL.js";
|
|
2
2
|
import "./chunk-C7GDB4KC.js";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-JUV5RBYM.js";
|
|
4
4
|
import "./chunk-5YYA34YV.js";
|
|
5
5
|
import "./chunk-OQHML4II.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-5H76TY4T.js";
|
|
7
|
+
import "./chunk-CKE7ETZL.js";
|
|
8
8
|
import "./chunk-3XFDIK7H.js";
|
|
9
9
|
import "./chunk-O3I2INCD.js";
|
|
10
10
|
import {
|
|
11
11
|
withStepLogging
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PEVVELQ6.js";
|
|
13
13
|
|
|
14
14
|
// src/plugins/condition/condition.ts
|
|
15
15
|
import "server-only";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchCredentials
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5H76TY4T.js";
|
|
4
|
+
import "./chunk-CKE7ETZL.js";
|
|
5
5
|
import "./chunk-3XFDIK7H.js";
|
|
6
6
|
import {
|
|
7
7
|
withStepLogging
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PEVVELQ6.js";
|
|
9
9
|
|
|
10
10
|
// src/plugins/database-query/database-query.ts
|
|
11
11
|
import "server-only";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-J72T2LRL.js";
|
|
2
2
|
import "./chunk-C7GDB4KC.js";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-JUV5RBYM.js";
|
|
4
4
|
import "./chunk-5YYA34YV.js";
|
|
5
5
|
import "./chunk-OQHML4II.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-5H76TY4T.js";
|
|
7
|
+
import "./chunk-CKE7ETZL.js";
|
|
8
8
|
import "./chunk-3XFDIK7H.js";
|
|
9
9
|
import "./chunk-O3I2INCD.js";
|
|
10
10
|
import {
|
|
11
11
|
withStepLogging
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PEVVELQ6.js";
|
|
13
13
|
|
|
14
14
|
// src/plugins/loop/loop.ts
|
|
15
15
|
import "server-only";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-J72T2LRL.js";
|
|
2
2
|
import "./chunk-C7GDB4KC.js";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-JUV5RBYM.js";
|
|
4
4
|
import "./chunk-5YYA34YV.js";
|
|
5
5
|
import "./chunk-OQHML4II.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-5H76TY4T.js";
|
|
7
|
+
import "./chunk-CKE7ETZL.js";
|
|
8
8
|
import "./chunk-3XFDIK7H.js";
|
|
9
9
|
import "./chunk-O3I2INCD.js";
|
|
10
10
|
import {
|
|
11
11
|
withStepLogging
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PEVVELQ6.js";
|
|
13
13
|
|
|
14
14
|
// src/plugins/merge/merge.ts
|
|
15
15
|
import "server-only";
|
package/dist/next/index.js
CHANGED
|
@@ -29,10 +29,10 @@ var nextWorkflowBuilder = (config = {}) => {
|
|
|
29
29
|
throw z2.prettifyError(error);
|
|
30
30
|
}
|
|
31
31
|
if (loaderOptions.authOptions) {
|
|
32
|
-
process.env.
|
|
32
|
+
process.env.NWB_AUTH_OPTIONS = JSON.stringify(loaderOptions.authOptions);
|
|
33
33
|
}
|
|
34
34
|
if (loaderOptions.databaseUrl) {
|
|
35
|
-
process.env.
|
|
35
|
+
process.env.NWB_DATABASE_URL = loaderOptions.databaseUrl;
|
|
36
36
|
}
|
|
37
37
|
discoverPlugins();
|
|
38
38
|
return function withNextWorkflowBuilder(nextConfig = {}) {
|
|
@@ -40,8 +40,21 @@ var nextWorkflowBuilder = (config = {}) => {
|
|
|
40
40
|
const consumerPluginsAbsolute = join(process.cwd(), "plugins", "index.ts");
|
|
41
41
|
const consumerStepRegistryRelative = "./lib/step-registry.ts";
|
|
42
42
|
const consumerStepRegistryAbsolute = join(process.cwd(), "lib", "step-registry.ts");
|
|
43
|
+
const inlinedEnv = {};
|
|
44
|
+
if (loaderOptions.authOptions) {
|
|
45
|
+
inlinedEnv.NWB_AUTH_OPTIONS = JSON.stringify(loaderOptions.authOptions);
|
|
46
|
+
}
|
|
47
|
+
if (loaderOptions.databaseUrl) {
|
|
48
|
+
inlinedEnv.NWB_DATABASE_URL = loaderOptions.databaseUrl;
|
|
49
|
+
}
|
|
43
50
|
return {
|
|
44
51
|
...nextConfig,
|
|
52
|
+
...Object.keys(inlinedEnv).length > 0 ? {
|
|
53
|
+
env: {
|
|
54
|
+
...nextConfig.env,
|
|
55
|
+
...inlinedEnv
|
|
56
|
+
}
|
|
57
|
+
} : {},
|
|
45
58
|
// Turbopack alias (used by `next dev` in Next.js 15+)
|
|
46
59
|
turbopack: {
|
|
47
60
|
...nextConfig.turbopack,
|