next-workflow-builder 0.4.2 → 0.4.4

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.
@@ -7505,6 +7505,10 @@ var PanelInner = () => {
7505
7505
  }
7506
7506
  ) }),
7507
7507
  !(selectedNode.data.type === "action" && !selectedNode.data.config?.actionType && isOwner) && /* @__PURE__ */ jsxs29("div", { className: "flex-1 space-y-4 overflow-y-auto p-4", children: [
7508
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-2", children: [
7509
+ /* @__PURE__ */ jsx41(Label, { className: "ml-1", htmlFor: "node-id", children: "Node ID" }),
7510
+ /* @__PURE__ */ jsx41(Input, { readOnly: true, id: "node-id", value: selectedNode?.id || "" })
7511
+ ] }),
7508
7512
  selectedNode.data.type === "trigger" && /* @__PURE__ */ jsx41(
7509
7513
  TriggerConfig,
7510
7514
  {
@@ -1,3 +1,12 @@
1
+ import "./chunk-KZNRU3LB.js";
2
+ import "./chunk-TFNZVQEH.js";
3
+ import "./chunk-F6HAK4HT.js";
4
+ import "./chunk-5YYA34YV.js";
5
+ import "./chunk-OQHML4II.js";
6
+ import "./chunk-2IJUDWUK.js";
7
+ import "./chunk-BL6QJDNB.js";
8
+ import "./chunk-Z3BJJYHM.js";
9
+ import "./chunk-O3I2INCD.js";
1
10
  import {
2
11
  withStepLogging
3
12
  } from "./chunk-PGG52OSJ.js";
@@ -5,7 +14,8 @@ import {
5
14
  // src/plugins/loop/loop.ts
6
15
  import "server-only";
7
16
  function evaluateLoop(input) {
8
- const items = Array.isArray(input.items) ? input.items : [];
17
+ const rawItems = typeof input.items === "string" ? JSON.parse(input.items) : input.items;
18
+ const items = Array.isArray(rawItems) ? rawItems : [];
9
19
  const batchSize = Math.max(1, input.batchSize || 1);
10
20
  const currentBatchIndex = input.currentBatchIndex ?? 0;
11
21
  const totalItems = items.length;
@@ -431,7 +431,7 @@ var SYSTEM_ACTIONS = {
431
431
  },
432
432
  Loop: {
433
433
  // biome-ignore lint/suspicious/noExplicitAny: Dynamic module import
434
- importer: () => import("../../loop-EIU3JQIY.js"),
434
+ importer: () => import("../../loop-37IXIL3L.js"),
435
435
  stepFunction: "loopStep"
436
436
  },
437
437
  Switch: {
@@ -463,7 +463,7 @@ function replaceTemplateVariable(match, nodeId, rest, outputs, evalContext, varC
463
463
  const fields = fieldPath.split(".");
464
464
  let current = output.data;
465
465
  const firstField = fields[0];
466
- if (current && typeof current === "object" && "success" in current && "data" in current && firstField !== "success" && firstField !== "data" && firstField !== "error") {
466
+ if (current && typeof current === "object" && "success" in current && "data" in current && firstField !== "success" && firstField !== "data" && firstField !== "error" && !(firstField in current)) {
467
467
  current = current.data;
468
468
  }
469
469
  for (const field of fields) {
@@ -620,7 +620,7 @@ function processTemplates(config, outputs) {
620
620
  const fields = fieldPath.split(".");
621
621
  let current = output.data;
622
622
  const firstField = fields[0];
623
- if (current && typeof current === "object" && "success" in current && "data" in current && firstField !== "success" && firstField !== "data" && firstField !== "error") {
623
+ if (current && typeof current === "object" && "success" in current && "data" in current && firstField !== "success" && firstField !== "data" && firstField !== "error" && !(firstField in current)) {
624
624
  current = current.data;
625
625
  }
626
626
  for (const field of fields) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-workflow-builder",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "description": "Next.js plugin for Workflow Builder",
6
6
  "repository": "https://github.com/emulienfou/next-workflow-builder",