@teamkeel/functions-runtime 0.414.0 → 0.414.1

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/index.cjs CHANGED
@@ -2460,7 +2460,7 @@ async function page(options, data, action) {
2460
2460
  if (options.actions) {
2461
2461
  const isValidAction = options.actions.some((a) => {
2462
2462
  if (typeof a === "string") return a === action;
2463
- return a && typeof a === "object" && "label" in a && a.label === action;
2463
+ return a && typeof a === "object" && "value" in a && a.value === action;
2464
2464
  });
2465
2465
  hasValidationErrors = !isValidAction;
2466
2466
  }
@@ -2488,7 +2488,14 @@ async function page(options, data, action) {
2488
2488
  title: options.title,
2489
2489
  description: options.description,
2490
2490
  content: contentUiConfig,
2491
- actions: options.actions
2491
+ actions: options.actions?.map((a) => {
2492
+ if (typeof a === "string") {
2493
+ return { label: a, value: a, mode: "primary" };
2494
+ } else if (typeof a === "object") {
2495
+ a.mode = a.mode || "primary";
2496
+ }
2497
+ return a;
2498
+ })
2492
2499
  },
2493
2500
  hasValidationErrors
2494
2501
  };