@w6w/embed 0.2.30 → 0.2.31
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/{CreateFunctionModal-CCYi9deY.js → CreateFunctionModal-glk2zg1r.js} +28 -27
- package/dist/{CreateFunctionModal-CCYi9deY.js.map → CreateFunctionModal-glk2zg1r.js.map} +1 -1
- package/dist/{DocumentFormModal-B3VudaLb.js → DocumentFormModal-Cw85R4wk.js} +2 -2
- package/dist/{DocumentFormModal-B3VudaLb.js.map → DocumentFormModal-Cw85R4wk.js.map} +1 -1
- package/dist/{ImportSpecModal-C-B8Jwxk.js → ImportSpecModal-fU5RsVTa.js} +2 -2
- package/dist/{ImportSpecModal-C-B8Jwxk.js.map → ImportSpecModal-fU5RsVTa.js.map} +1 -1
- package/dist/{WorkflowEditor-8NAcpjO_.js → WorkflowEditor-B-Wc_r4X.js} +5 -5
- package/dist/{WorkflowEditor-8NAcpjO_.js.map → WorkflowEditor-B-Wc_r4X.js.map} +1 -1
- package/dist/callable-record-Bhxim8C1.js +14 -0
- package/dist/callable-record-Bhxim8C1.js.map +1 -0
- package/dist/callables-B49tS2vv.js +297 -0
- package/dist/callables-B49tS2vv.js.map +1 -0
- package/dist/{document-sources-DNmBojx6.js → document-sources-Khcw2zB5.js} +16 -16
- package/dist/document-sources-Khcw2zB5.js.map +1 -0
- package/dist/draft.mjs +1 -1
- package/dist/editor/WorkflowInputsModal.d.ts +12 -0
- package/dist/editor/WorkflowVariablesEditor.d.ts +1 -1
- package/dist/{editor-tools-BIAW-wzt.js → editor-tools-Ch1cAE4F.js} +423 -366
- package/dist/editor-tools-Ch1cAE4F.js.map +1 -0
- package/dist/editor.mjs +1 -1
- package/dist/editors.mjs +81 -80
- package/dist/editors.mjs.map +1 -1
- package/dist/endpoints-zOuwci2U.js +136 -0
- package/dist/endpoints-zOuwci2U.js.map +1 -0
- package/dist/fields-CXHRR5eK.js +28 -0
- package/dist/fields-CXHRR5eK.js.map +1 -0
- package/dist/forms.mjs +1 -1
- package/dist/index.mjs +91 -91
- package/dist/index.mjs.map +1 -1
- package/dist/lib/callable-duplicate.d.ts +26 -0
- package/dist/lib/variable-preview.d.ts +6 -0
- package/dist/lib.mjs +41 -40
- package/dist/lib.mjs.map +1 -1
- package/dist/lists/CallableKindList.d.ts +4 -1
- package/dist/lists/CallableRowParts.d.ts +5 -0
- package/dist/lists/CredentialDetail.d.ts +2 -0
- package/dist/lists/CredentialFields.d.ts +1 -1
- package/dist/lists/EndpointList.d.ts +2 -1
- package/dist/lists/WorkflowList.d.ts +2 -1
- package/dist/lists.mjs +1509 -1421
- package/dist/lists.mjs.map +1 -1
- package/dist/rail.mjs +1 -1
- package/dist/repos/callables.d.ts +23 -0
- package/dist/repos/fields.d.ts +4 -1
- package/dist/repos.mjs +242 -239
- package/dist/settings-rail-BjsTjg2u.js +22 -0
- package/dist/settings-rail-BjsTjg2u.js.map +1 -0
- package/dist/{spec-import-FygyV8sy.js → spec-import-CGPqUUjN.js} +2 -2
- package/dist/{spec-import-FygyV8sy.js.map → spec-import-CGPqUUjN.js.map} +1 -1
- package/dist/{use-callable-draft-DCauHt5o.js → use-callable-draft-DjW7_9qb.js} +8 -7
- package/dist/{use-callable-draft-DCauHt5o.js.map → use-callable-draft-DjW7_9qb.js.map} +1 -1
- package/package.json +3 -3
- package/src/styles.css +165 -10
- package/dist/callables-tOlflvbl.js +0 -151
- package/dist/callables-tOlflvbl.js.map +0 -1
- package/dist/document-sources-DNmBojx6.js.map +0 -1
- package/dist/editor-tools-BIAW-wzt.js.map +0 -1
- package/dist/endpoints-DArAqoLT.js +0 -233
- package/dist/endpoints-DArAqoLT.js.map +0 -1
- package/dist/fields-DvS8XZFc.js +0 -21
- package/dist/fields-DvS8XZFc.js.map +0 -1
- package/dist/settings-rail--GdRMusb.js +0 -33
- package/dist/settings-rail--GdRMusb.js.map +0 -1
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import { jsx as n, jsxs as r, Fragment as V } from "react/jsx-runtime";
|
|
2
|
-
import { r as En, l as We, m as
|
|
3
|
-
import { useContext as ve, useState as u, useMemo as
|
|
4
|
-
import { ExpressionOptionsProvider as
|
|
5
|
-
import { d as Qn, p as Wn, i as
|
|
6
|
-
import { u as
|
|
2
|
+
import { r as En, l as We, m as $e, d as Me, e as An, h as je, c as Pn } from "./import-bindings-EUtxZ9Ti.js";
|
|
3
|
+
import { useContext as ve, useState as u, useMemo as Fe, useEffect as be, createContext as He, useRef as qe } from "react";
|
|
4
|
+
import { ExpressionOptionsProvider as Je, Icon as K, RetryPolicyFields as In, StepBuilderModal as Tn, IconButton as Se, useEnterSubmit as Dn, CodeBlock as pe, DeleteButton as On, EditButton as Rn, ConfirmModal as Le, JsonEditor as Mn, useExpressionOptions as jn, ExpressionInput as Ln, ResultViewer as Vn } from "@w6w/ui";
|
|
5
|
+
import { d as Qn, p as Wn, i as $n, t as Fn, e as Ve, a as Hn, h as qn, s as Jn } from "./document-sources-Khcw2zB5.js";
|
|
6
|
+
import { u as Bn, a as Be } from "./spec-export-BtnoV0ex.js";
|
|
7
7
|
import { i as Kn, f as Un, e as _n, b as zn, u as Gn } from "./vault-BSEWhMYC.js";
|
|
8
|
-
import { k as Yn, q as Zn, n as Xn, l as xn, r as Ke, m as Ue, o as _e } from "./spec-import-
|
|
9
|
-
import { s as et, M as
|
|
8
|
+
import { k as Yn, q as Zn, n as Xn, l as xn, r as Ke, m as Ue, o as _e } from "./spec-import-CGPqUUjN.js";
|
|
9
|
+
import { s as et, M as B, c as nt, C as tt } from "./ConfirmModal-WqBfWftD.js";
|
|
10
10
|
import { u as it, i as st, f as at } from "./slug-BVdgiP_L.js";
|
|
11
11
|
import { WorkflowConnectionsPanel as rt } from "@w6w/ui/flow";
|
|
12
|
-
import { ApiError as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { I as
|
|
12
|
+
import { ApiError as j } from "@w6w/sdk";
|
|
13
|
+
import { c as ze } from "./callable-record-Bhxim8C1.js";
|
|
14
|
+
import { i as ot, p as Ge, d as lt } from "./settings-rail-BjsTjg2u.js";
|
|
15
|
+
import { s as Ye, r as Ze, v as Xe, t as xe, b as en, d as dt, g as ct, u as ut, q as ht, p as ft, o as mt, n as gt } from "./endpoints-zOuwci2U.js";
|
|
16
|
+
import { a1 as nn, a0 as pt, _ as vt, P as bt, U as yt, a3 as kt, Z as wt, V as Nt, X as St, K as Ct, I as Et } from "./workflows-Dz8LMjnt.js";
|
|
17
|
+
import { j as At } from "./callables-B49tS2vv.js";
|
|
18
|
+
import { I as tn } from "./ImportSpecModal-fU5RsVTa.js";
|
|
17
19
|
import { useQueryClient as Pt } from "@tanstack/react-query";
|
|
18
|
-
import { foldStateLog as
|
|
19
|
-
const ye =
|
|
20
|
-
function
|
|
20
|
+
import { foldStateLog as It } from "@w6w/expr";
|
|
21
|
+
const ye = He(null);
|
|
22
|
+
function Fi({
|
|
21
23
|
children: e,
|
|
22
24
|
base: t = null
|
|
23
25
|
}) {
|
|
24
|
-
const [i, s] = u(null), a = i ?? t,
|
|
25
|
-
return /* @__PURE__ */ n(ye.Provider, { value:
|
|
26
|
+
const [i, s] = u(null), a = i ?? t, o = Fe(() => ({ resource: a, setCallable: s }), [a]);
|
|
27
|
+
return /* @__PURE__ */ n(ye.Provider, { value: o, children: e });
|
|
26
28
|
}
|
|
27
|
-
function
|
|
29
|
+
function Hi() {
|
|
28
30
|
return ve(ye) !== null;
|
|
29
31
|
}
|
|
30
|
-
function
|
|
32
|
+
function qi(e) {
|
|
31
33
|
const t = ve(ye);
|
|
32
34
|
if (!t) throw new Error("useWorkspace must be used within <WorkspaceProvider>");
|
|
33
35
|
const { setCallable: i } = t, s = e ? JSON.stringify(e) : "";
|
|
34
36
|
be(() => (i(e), () => i(null)), [s, i]);
|
|
35
37
|
}
|
|
36
|
-
function
|
|
38
|
+
function Tt() {
|
|
37
39
|
const e = ve(ye);
|
|
38
40
|
if (!e) throw new Error("useWorkspaceCallable must be used within <WorkspaceProvider>");
|
|
39
41
|
return e.resource;
|
|
@@ -50,38 +52,38 @@ function an({
|
|
|
50
52
|
state: i,
|
|
51
53
|
onToggle: s
|
|
52
54
|
}) {
|
|
53
|
-
const a = i.open ? e.find((
|
|
55
|
+
const a = i.open ? e.find((l) => l.id === i.activeTool && l.Panel) ?? null : null, o = a == null ? void 0 : a.Panel;
|
|
54
56
|
return /* @__PURE__ */ r("aside", { className: "right-rail", children: [
|
|
55
|
-
/* @__PURE__ */ n("div", { className: "right-rail-strip", children: e.map((
|
|
56
|
-
var
|
|
57
|
+
/* @__PURE__ */ n("div", { className: "right-rail-strip", children: e.map((l) => {
|
|
58
|
+
var d;
|
|
57
59
|
return /* @__PURE__ */ r(
|
|
58
60
|
"button",
|
|
59
61
|
{
|
|
60
62
|
type: "button",
|
|
61
|
-
"data-testid": `rail-tool-${
|
|
62
|
-
className: `right-rail-tool-btn${(a == null ? void 0 : a.id) ===
|
|
63
|
-
title:
|
|
64
|
-
"aria-label":
|
|
65
|
-
"aria-pressed":
|
|
66
|
-
onClick: () =>
|
|
63
|
+
"data-testid": `rail-tool-${l.id}`,
|
|
64
|
+
className: `right-rail-tool-btn${(a == null ? void 0 : a.id) === l.id ? " active" : ""}`,
|
|
65
|
+
title: l.title,
|
|
66
|
+
"aria-label": l.title,
|
|
67
|
+
"aria-pressed": l.onActivate ? void 0 : (a == null ? void 0 : a.id) === l.id,
|
|
68
|
+
onClick: () => l.onActivate ? l.onActivate(t) : s(l.id),
|
|
67
69
|
children: [
|
|
68
|
-
/* @__PURE__ */ n(
|
|
69
|
-
((
|
|
70
|
+
/* @__PURE__ */ n(l.Icon, {}),
|
|
71
|
+
((d = l.hasIndicator) == null ? void 0 : d.call(l, t)) && /* @__PURE__ */ n(
|
|
70
72
|
"span",
|
|
71
73
|
{
|
|
72
74
|
className: "right-rail-tool-dot",
|
|
73
|
-
"data-testid": `rail-tool-${
|
|
75
|
+
"data-testid": `rail-tool-${l.id}-dot`,
|
|
74
76
|
"aria-hidden": "true"
|
|
75
77
|
}
|
|
76
78
|
)
|
|
77
79
|
]
|
|
78
80
|
},
|
|
79
|
-
|
|
81
|
+
l.id
|
|
80
82
|
);
|
|
81
83
|
}) }),
|
|
82
|
-
a &&
|
|
84
|
+
a && o && /* @__PURE__ */ r("div", { className: "right-rail-panel", "data-testid": `rail-panel-${a.id}`, children: [
|
|
83
85
|
!a.rendersHeading && /* @__PURE__ */ n("div", { className: "right-rail-panel-head", children: /* @__PURE__ */ n("h3", { children: a.title }) }),
|
|
84
|
-
/* @__PURE__ */ n(
|
|
86
|
+
/* @__PURE__ */ n(o, { ctx: t })
|
|
85
87
|
] })
|
|
86
88
|
] });
|
|
87
89
|
}
|
|
@@ -94,52 +96,52 @@ function Ot({
|
|
|
94
96
|
be(() => {
|
|
95
97
|
typeof localStorage > "u" || localStorage.setItem(e, JSON.stringify({ activeTool: s.activeTool }));
|
|
96
98
|
}, [e, s.activeTool]);
|
|
97
|
-
function l
|
|
99
|
+
function o(l) {
|
|
98
100
|
a(
|
|
99
|
-
(
|
|
101
|
+
(d) => d.open && d.activeTool === l ? { open: !1, activeTool: l } : { open: !0, activeTool: l }
|
|
100
102
|
);
|
|
101
103
|
}
|
|
102
|
-
return /* @__PURE__ */ n(an, { tools: t, ctx: i, state: s, onToggle:
|
|
104
|
+
return /* @__PURE__ */ n(an, { tools: t, ctx: i, state: s, onToggle: o });
|
|
103
105
|
}
|
|
104
|
-
function
|
|
106
|
+
function Ji({
|
|
105
107
|
tools: e,
|
|
106
108
|
storageKey: t
|
|
107
109
|
}) {
|
|
108
|
-
const i =
|
|
110
|
+
const i = Tt(), s = e.filter((a) => a.isAvailable(i));
|
|
109
111
|
return s.length === 0 ? null : t === null ? /* @__PURE__ */ n(an, { tools: s, ctx: i, state: sn, onToggle: () => {
|
|
110
112
|
} }) : /* @__PURE__ */ n(Ot, { storageKey: t, tools: s, ctx: i }, t);
|
|
111
113
|
}
|
|
112
114
|
function Rt(e) {
|
|
113
|
-
const t = e, i = Kn(t ?? void 0, t != null), s = Un(), a =
|
|
114
|
-
return
|
|
115
|
+
const t = e, i = Kn(t ?? void 0, t != null), s = Un(), a = Bn(), o = Yn(t ?? void 0, t != null), l = _n(), d = zn(), h = Gn();
|
|
116
|
+
return Fe(
|
|
115
117
|
() => ({
|
|
116
|
-
vars: (i.data ?? []).map((
|
|
117
|
-
constants: (a.data ?? []).map((
|
|
118
|
-
secrets: (s.data ?? []).map((
|
|
118
|
+
vars: (i.data ?? []).map((c) => c.name),
|
|
119
|
+
constants: (a.data ?? []).map((c) => c.name),
|
|
120
|
+
secrets: (s.data ?? []).map((c) => c.name),
|
|
119
121
|
// `document-sources.ts` owns the `format === "json"` gate and the raw
|
|
120
122
|
// field enumeration — no parsing, no gate logic, and no filtering here
|
|
121
123
|
// (A5c); `isRefSafeKey` filtering happens once, downstream, at the
|
|
122
124
|
// modal's render site.
|
|
123
|
-
documents: Wn(
|
|
125
|
+
documents: Wn(o.data ?? []),
|
|
124
126
|
// Real project values so the ƒx Result preview substitutes them for
|
|
125
127
|
// `var.<name>` / `const.<name>` / `documents.<key>` / `documents.<key>.<field>` refs
|
|
126
128
|
// instead of the raw template.
|
|
127
129
|
sampleValues: {
|
|
128
|
-
...Object.fromEntries((i.data ?? []).map((
|
|
129
|
-
...Object.fromEntries((a.data ?? []).map((
|
|
130
|
-
...Qn(
|
|
130
|
+
...Object.fromEntries((i.data ?? []).map((c) => [`var.${c.name}`, c.value])),
|
|
131
|
+
...Object.fromEntries((a.data ?? []).map((c) => [`const.${c.name}`, c.value])),
|
|
132
|
+
...Qn(o.data ?? [])
|
|
131
133
|
},
|
|
132
|
-
sealSecret:
|
|
134
|
+
sealSecret: l,
|
|
133
135
|
// A created var carries the SAME project the read above carried (B3) —
|
|
134
136
|
// it must land in the project whose rail asked for it. `type: "string"`
|
|
135
137
|
// is pinned (a string type's `raw` passes through untouched) — the modal
|
|
136
138
|
// has no type field.
|
|
137
|
-
createVar: (
|
|
139
|
+
createVar: (c) => d.mutateAsync({
|
|
138
140
|
input: {
|
|
139
|
-
name:
|
|
141
|
+
name: c.name,
|
|
140
142
|
type: "string",
|
|
141
|
-
value:
|
|
142
|
-
description:
|
|
143
|
+
value: c.value,
|
|
144
|
+
description: c.description
|
|
143
145
|
},
|
|
144
146
|
project: t ?? void 0
|
|
145
147
|
}).then(() => {
|
|
@@ -147,61 +149,61 @@ function Rt(e) {
|
|
|
147
149
|
// Secrets carry NO project (B4) — `vault_secrets` has no `project`
|
|
148
150
|
// column and the routes read no `?project=`. Plaintext in, the server
|
|
149
151
|
// encrypts; the resolved value is referenced nowhere (B5).
|
|
150
|
-
createSecret: (
|
|
152
|
+
createSecret: (c) => h.mutateAsync({ name: c.name, value: c.value, description: c.description }).then(() => {
|
|
151
153
|
})
|
|
152
154
|
}),
|
|
153
155
|
[
|
|
154
156
|
i.data,
|
|
155
157
|
a.data,
|
|
156
158
|
s.data,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
o.data,
|
|
160
|
+
l,
|
|
161
|
+
d.mutateAsync,
|
|
160
162
|
h.mutateAsync,
|
|
161
163
|
t
|
|
162
164
|
]
|
|
163
165
|
);
|
|
164
166
|
}
|
|
165
|
-
function
|
|
167
|
+
function Bi({
|
|
166
168
|
project: e,
|
|
167
169
|
children: t
|
|
168
170
|
}) {
|
|
169
171
|
const i = Rt(e);
|
|
170
|
-
return /* @__PURE__ */ n(
|
|
172
|
+
return /* @__PURE__ */ n(Je, { value: i, children: t });
|
|
171
173
|
}
|
|
172
174
|
function Mt({ ctx: e }) {
|
|
173
|
-
const [t, i] = u(null), s =
|
|
175
|
+
const [t, i] = u(null), s = Fn(e);
|
|
174
176
|
if (!s) return null;
|
|
175
|
-
const a = (e == null ? void 0 : e.kind) === "workflow" ? e.triggers : void 0,
|
|
176
|
-
return
|
|
177
|
+
const a = (e == null ? void 0 : e.kind) === "workflow" ? e.triggers : void 0, o = et(s);
|
|
178
|
+
return o.length === 0 ? /* @__PURE__ */ n("p", { className: "muted", children: it(s) }) : /* @__PURE__ */ r("div", { children: [
|
|
177
179
|
/* @__PURE__ */ n("p", { className: "muted small", style: { marginTop: 0 }, children: "Call this from:" }),
|
|
178
|
-
/* @__PURE__ */ n("div", { className: "rail-code-langs", children:
|
|
180
|
+
/* @__PURE__ */ n("div", { className: "rail-code-langs", children: o.map(({ id: l, label: d, icon: h }) => /* @__PURE__ */ r(
|
|
179
181
|
"button",
|
|
180
182
|
{
|
|
181
183
|
type: "button",
|
|
182
184
|
className: "rail-code-lang",
|
|
183
|
-
"data-testid": `rail-code-lang-${
|
|
184
|
-
title: `Show the ${
|
|
185
|
-
"aria-label": `Show the ${
|
|
186
|
-
onClick: () => i(
|
|
185
|
+
"data-testid": `rail-code-lang-${l}`,
|
|
186
|
+
title: `Show the ${d} snippet`,
|
|
187
|
+
"aria-label": `Show the ${d} snippet`,
|
|
188
|
+
onClick: () => i(l),
|
|
187
189
|
children: [
|
|
188
190
|
/* @__PURE__ */ n(K, { name: h, size: 20 }),
|
|
189
|
-
/* @__PURE__ */ n("span", { children:
|
|
191
|
+
/* @__PURE__ */ n("span", { children: d })
|
|
190
192
|
]
|
|
191
193
|
},
|
|
192
|
-
|
|
194
|
+
l
|
|
193
195
|
)) }),
|
|
194
|
-
t !== null && /* @__PURE__ */ n(
|
|
196
|
+
t !== null && /* @__PURE__ */ n(B, { title: "Call from code", wide: !0, onClose: () => i(null), children: /* @__PURE__ */ n("div", { style: { height: 450 }, children: /* @__PURE__ */ n(nt, { resource: s, triggers: a, initialTab: t }) }) })
|
|
195
197
|
] });
|
|
196
198
|
}
|
|
197
|
-
function
|
|
199
|
+
function jt() {
|
|
198
200
|
return /* @__PURE__ */ n(K, { name: "code" });
|
|
199
201
|
}
|
|
200
|
-
const
|
|
202
|
+
const Lt = {
|
|
201
203
|
id: "code",
|
|
202
204
|
title: "Code",
|
|
203
|
-
Icon:
|
|
204
|
-
isAvailable: (e) =>
|
|
205
|
+
Icon: jt,
|
|
206
|
+
isAvailable: (e) => $n(e),
|
|
205
207
|
Panel: Mt
|
|
206
208
|
}, Vt = {
|
|
207
209
|
id: "connections",
|
|
@@ -215,8 +217,8 @@ const jt = {
|
|
|
215
217
|
},
|
|
216
218
|
Panel: ({ ctx: e }) => (e == null ? void 0 : e.kind) === "workflow" && e.connectionResources ? /* @__PURE__ */ n(rt, { resources: e.connectionResources }, e.id) : null
|
|
217
219
|
}, Qt = { project: null, onNavigate: () => {
|
|
218
|
-
} }, rn =
|
|
219
|
-
function
|
|
220
|
+
} }, rn = He(Qt);
|
|
221
|
+
function Ki({
|
|
220
222
|
project: e,
|
|
221
223
|
onNavigate: t,
|
|
222
224
|
children: i
|
|
@@ -230,7 +232,7 @@ const Wt = "@w6w/call";
|
|
|
230
232
|
function Qe(e) {
|
|
231
233
|
return e ? e.kind === "workflow" ? e.workflow : e.kind === "function" ? e.function : `${e.uses.app}/${e.uses.action}` : "";
|
|
232
234
|
}
|
|
233
|
-
function
|
|
235
|
+
function $t(e) {
|
|
234
236
|
return (e == null ? void 0 : e.kind) === "workflow" ? "Workflow (asynchronous)" : (e == null ? void 0 : e.kind) === "function" ? "Function (synchronous)" : "App action (synchronous)";
|
|
235
237
|
}
|
|
236
238
|
function ln({
|
|
@@ -239,31 +241,31 @@ function ln({
|
|
|
239
241
|
policy: i,
|
|
240
242
|
ready: s,
|
|
241
243
|
saving: a,
|
|
242
|
-
onPersist:
|
|
244
|
+
onPersist: o
|
|
243
245
|
}) {
|
|
244
246
|
var y, M, Q, N;
|
|
245
|
-
const
|
|
247
|
+
const l = en(!0), { project: d } = on(), h = nn(d ?? void 0, !0), [c, v] = u(!1), [b, m] = u(null), C = (y = i.reroute) == null ? void 0 : y.target, k = Qe(C), D = C ? Ve({
|
|
246
248
|
resource: { kind: e, id: t },
|
|
247
249
|
target: { kind: C.kind, id: k },
|
|
248
250
|
hasAdapter: ((M = i.reroute) == null ? void 0 : M.with) !== void 0
|
|
249
251
|
}) : "allow", O = (C == null ? void 0 : C.kind) === "workflow" ? ((N = (Q = h.data) == null ? void 0 : Q.find((p) => p.id === k)) == null ? void 0 : N.displayName) ?? void 0 : (() => {
|
|
250
252
|
var P;
|
|
251
|
-
const p = (P =
|
|
253
|
+
const p = (P = l.data) == null ? void 0 : P.find((q) => q.id === k);
|
|
252
254
|
return p ? p.displayName || p.key : void 0;
|
|
253
255
|
})();
|
|
254
256
|
be(() => {
|
|
255
257
|
t && e && m(null);
|
|
256
258
|
}, [t, e]);
|
|
257
259
|
function E(p) {
|
|
258
|
-
m(null),
|
|
260
|
+
m(null), o(p, m);
|
|
259
261
|
}
|
|
260
262
|
function R(p) {
|
|
261
263
|
var U;
|
|
262
264
|
let P;
|
|
263
265
|
if (p.uses.app === Wt) {
|
|
264
|
-
const W = p.with ?? {},
|
|
265
|
-
if (
|
|
266
|
-
P = W.targetKind === "workflow" ? { kind: "workflow", workflow:
|
|
266
|
+
const W = p.with ?? {}, $ = typeof W.targetId == "string" ? W.targetId : "";
|
|
267
|
+
if (!$) return;
|
|
268
|
+
P = W.targetKind === "workflow" ? { kind: "workflow", workflow: $ } : { kind: "function", function: $ };
|
|
267
269
|
} else if (!p.uses.app.startsWith("@w6w/"))
|
|
268
270
|
P = {
|
|
269
271
|
kind: "action",
|
|
@@ -291,7 +293,7 @@ function ln({
|
|
|
291
293
|
return !s && !a ? /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }) : /* @__PURE__ */ r("div", { className: "w6w-stack", "data-testid": "rail-errorhandling-body", children: [
|
|
292
294
|
/* @__PURE__ */ r("section", { "data-testid": "rail-retry-section", children: [
|
|
293
295
|
/* @__PURE__ */ n(
|
|
294
|
-
|
|
296
|
+
In,
|
|
295
297
|
{
|
|
296
298
|
value: i.retry,
|
|
297
299
|
onChange: (p) => E({ ...i, retry: p }),
|
|
@@ -307,7 +309,7 @@ function ln({
|
|
|
307
309
|
/* @__PURE__ */ n("strong", { children: O ?? k }),
|
|
308
310
|
" ",
|
|
309
311
|
/* @__PURE__ */ n("code", { className: "muted", children: k }),
|
|
310
|
-
/* @__PURE__ */ n("span", { className: "muted small block", children:
|
|
312
|
+
/* @__PURE__ */ n("span", { className: "muted small block", children: $t(C) })
|
|
311
313
|
] }),
|
|
312
314
|
/* @__PURE__ */ n(
|
|
313
315
|
"button",
|
|
@@ -344,8 +346,8 @@ function ln({
|
|
|
344
346
|
),
|
|
345
347
|
D === "warn" && /* @__PURE__ */ n("div", { className: "result error", "data-testid": "rail-errorhandling-self-caution", children: "This handler targets itself. Its imported input adapter is preserved; the server will refuse it if it resolves to the failed call's same inputs." }),
|
|
346
348
|
b && /* @__PURE__ */ n("div", { className: "error", "data-testid": "rail-errorhandling-error", children: b }),
|
|
347
|
-
|
|
348
|
-
|
|
349
|
+
c && /* @__PURE__ */ n(
|
|
350
|
+
Tn,
|
|
349
351
|
{
|
|
350
352
|
appsOnly: !0,
|
|
351
353
|
callables: ["function", "workflow"],
|
|
@@ -356,53 +358,53 @@ function ln({
|
|
|
356
358
|
)
|
|
357
359
|
] });
|
|
358
360
|
}
|
|
359
|
-
function
|
|
361
|
+
function Ft({ ctx: e }) {
|
|
360
362
|
const t = "policy" in e ? e.policy : void 0, i = "onPolicyChange" in e ? e.onPolicyChange : void 0;
|
|
361
363
|
return /* @__PURE__ */ n(
|
|
362
364
|
ln,
|
|
363
365
|
{
|
|
364
366
|
kind: e.kind,
|
|
365
367
|
id: e.id,
|
|
366
|
-
policy: t ?
|
|
368
|
+
policy: t ? Ge(t) : {},
|
|
367
369
|
ready: !!i,
|
|
368
370
|
saving: !1,
|
|
369
371
|
onPersist: (s) => i == null ? void 0 : i(s)
|
|
370
372
|
}
|
|
371
373
|
);
|
|
372
374
|
}
|
|
373
|
-
function
|
|
374
|
-
const i = Ye(e, t === "function"), s = Ze(e, t === "endpoint"), a = Xe(),
|
|
375
|
+
function Ht({ id: e, kind: t }) {
|
|
376
|
+
const i = Ye(e, t === "function"), s = Ze(e, t === "endpoint"), a = Xe(), o = xe(), l = ze(t, t === "function" ? i.data : s.data), d = t === "function" ? a.isPending : o.isPending;
|
|
375
377
|
return /* @__PURE__ */ n(
|
|
376
378
|
ln,
|
|
377
379
|
{
|
|
378
380
|
kind: t,
|
|
379
381
|
id: e,
|
|
380
|
-
policy:
|
|
381
|
-
ready: !!
|
|
382
|
-
saving:
|
|
383
|
-
onPersist: (h,
|
|
384
|
-
if (!
|
|
382
|
+
policy: l ? Ge(l.definition) : {},
|
|
383
|
+
ready: !!l,
|
|
384
|
+
saving: d,
|
|
385
|
+
onPersist: (h, c) => {
|
|
386
|
+
if (!l) return;
|
|
385
387
|
const v = {
|
|
386
|
-
definition: lt(
|
|
387
|
-
ifUnmodifiedSince:
|
|
388
|
+
definition: lt(l.definition, h),
|
|
389
|
+
ifUnmodifiedSince: l.updatedAt
|
|
388
390
|
}, b = {
|
|
389
|
-
onError: (m) =>
|
|
391
|
+
onError: (m) => c(m instanceof j ? m.message : String(m))
|
|
390
392
|
};
|
|
391
|
-
t === "function" ? a.mutate(v, b) :
|
|
393
|
+
t === "function" ? a.mutate(v, b) : o.mutate(v, b);
|
|
392
394
|
}
|
|
393
395
|
}
|
|
394
396
|
);
|
|
395
397
|
}
|
|
396
398
|
function qt({ ctx: e }) {
|
|
397
|
-
return (e == null ? void 0 : e.kind) !== "workflow" && (e == null ? void 0 : e.kind) !== "function" && (e == null ? void 0 : e.kind) !== "endpoint" ? null : e.kind === "workflow" || typeof e.onPolicyChange == "function" ? /* @__PURE__ */ n(
|
|
399
|
+
return (e == null ? void 0 : e.kind) !== "workflow" && (e == null ? void 0 : e.kind) !== "function" && (e == null ? void 0 : e.kind) !== "endpoint" ? null : e.kind === "workflow" || typeof e.onPolicyChange == "function" ? /* @__PURE__ */ n(Ft, { ctx: e }) : /* @__PURE__ */ n(Ht, { id: e.id, kind: e.kind });
|
|
398
400
|
}
|
|
399
|
-
function
|
|
401
|
+
function Jt() {
|
|
400
402
|
return /* @__PURE__ */ n(K, { name: "warning" });
|
|
401
403
|
}
|
|
402
|
-
const
|
|
404
|
+
const Bt = {
|
|
403
405
|
id: "error-handling",
|
|
404
406
|
title: "Error handling",
|
|
405
|
-
Icon:
|
|
407
|
+
Icon: Jt,
|
|
406
408
|
isAvailable: (e) => ot(e),
|
|
407
409
|
Panel: qt
|
|
408
410
|
}, Kt = {
|
|
@@ -429,24 +431,24 @@ function _t(e, t) {
|
|
|
429
431
|
}
|
|
430
432
|
function zt({ tags: e, onChange: t }) {
|
|
431
433
|
const [i, s] = u("");
|
|
432
|
-
function a(
|
|
433
|
-
const
|
|
434
|
-
s(
|
|
434
|
+
function a(o) {
|
|
435
|
+
const l = Ut(e, o);
|
|
436
|
+
s(l.typed), l.tags !== e && t(l.tags);
|
|
435
437
|
}
|
|
436
438
|
return /* @__PURE__ */ r("div", { className: "tag-list", "data-testid": "tag-editor", children: [
|
|
437
|
-
e.map((
|
|
438
|
-
|
|
439
|
+
e.map((o) => /* @__PURE__ */ r("span", { className: "tag removable", children: [
|
|
440
|
+
o,
|
|
439
441
|
/* @__PURE__ */ n(
|
|
440
442
|
Se,
|
|
441
443
|
{
|
|
442
444
|
danger: !0,
|
|
443
445
|
icon: "close",
|
|
444
|
-
label: `Remove tag ${
|
|
445
|
-
title: `Remove ${
|
|
446
|
-
onClick: () => t(_t(e,
|
|
446
|
+
label: `Remove tag ${o}`,
|
|
447
|
+
title: `Remove ${o}`,
|
|
448
|
+
onClick: () => t(_t(e, o))
|
|
447
449
|
}
|
|
448
450
|
)
|
|
449
|
-
] },
|
|
451
|
+
] }, o)),
|
|
450
452
|
/* @__PURE__ */ n(
|
|
451
453
|
"input",
|
|
452
454
|
{
|
|
@@ -454,31 +456,31 @@ function zt({ tags: e, onChange: t }) {
|
|
|
454
456
|
value: i,
|
|
455
457
|
placeholder: "Add a tag…",
|
|
456
458
|
"aria-label": "New tag",
|
|
457
|
-
onChange: (
|
|
459
|
+
onChange: (o) => a(o.target.value)
|
|
458
460
|
}
|
|
459
461
|
)
|
|
460
462
|
] });
|
|
461
463
|
}
|
|
462
464
|
function dn(e) {
|
|
463
|
-
const t =
|
|
465
|
+
const t = At(e.kind).settings, { initial: i } = e, [s, a] = u(i.displayName), [o, l] = u(i.key ?? ""), [d, h] = u(i.tags ?? []), [c, v] = u(!1), [b, m] = u(null), C = s !== i.displayName, k = o !== (i.key ?? ""), D = t.hasTags && JSON.stringify(d) !== JSON.stringify(i.tags ?? []), O = C || k || D, E = t.canEditKey, R = o === "" || st(o), y = O && R && !c;
|
|
464
466
|
async function M() {
|
|
465
467
|
if (y) {
|
|
466
468
|
m(null), v(!0);
|
|
467
469
|
try {
|
|
468
470
|
await e.onSave({
|
|
469
471
|
displayName: s.trim(),
|
|
470
|
-
key: E && k ?
|
|
471
|
-
tags: t.hasTags ?
|
|
472
|
+
key: E && k ? o : i.key,
|
|
473
|
+
tags: t.hasTags ? d : void 0
|
|
472
474
|
}), e.onClose();
|
|
473
475
|
} catch (N) {
|
|
474
|
-
m(N instanceof
|
|
476
|
+
m(N instanceof j ? N.message : String(N));
|
|
475
477
|
} finally {
|
|
476
478
|
v(!1);
|
|
477
479
|
}
|
|
478
480
|
}
|
|
479
481
|
}
|
|
480
482
|
const Q = Dn(M, { enabled: y });
|
|
481
|
-
return /* @__PURE__ */ r(
|
|
483
|
+
return /* @__PURE__ */ r(B, { title: "Edit settings", onClose: e.onClose, children: [
|
|
482
484
|
/* @__PURE__ */ r("div", { className: "modal-body", children: [
|
|
483
485
|
/* @__PURE__ */ r("label", { className: "field", children: [
|
|
484
486
|
/* @__PURE__ */ n("span", { children: "Name" }),
|
|
@@ -500,8 +502,8 @@ function dn(e) {
|
|
|
500
502
|
"input",
|
|
501
503
|
{
|
|
502
504
|
type: "text",
|
|
503
|
-
value:
|
|
504
|
-
onChange: (N) =>
|
|
505
|
+
value: o,
|
|
506
|
+
onChange: (N) => l(at(N.target.value)),
|
|
505
507
|
placeholder: t.keyPlaceholder,
|
|
506
508
|
...Q
|
|
507
509
|
}
|
|
@@ -513,13 +515,13 @@ function dn(e) {
|
|
|
513
515
|
] }),
|
|
514
516
|
t.hasTags && /* @__PURE__ */ r("div", { children: [
|
|
515
517
|
/* @__PURE__ */ n("p", { className: "muted small", style: { marginBottom: "8px" }, children: "Tags" }),
|
|
516
|
-
/* @__PURE__ */ n(zt, { tags:
|
|
518
|
+
/* @__PURE__ */ n(zt, { tags: d, onChange: h })
|
|
517
519
|
] }),
|
|
518
520
|
b && /* @__PURE__ */ n("div", { className: "error", children: b })
|
|
519
521
|
] }),
|
|
520
522
|
/* @__PURE__ */ r("div", { className: "modal-actions", children: [
|
|
521
523
|
/* @__PURE__ */ n("button", { type: "button", className: "btn ghost", onClick: e.onClose, children: "Cancel" }),
|
|
522
|
-
/* @__PURE__ */ n("button", { type: "button", className: "btn", disabled: !y, onClick: M, children:
|
|
524
|
+
/* @__PURE__ */ n("button", { type: "button", className: "btn", disabled: !y, onClick: M, children: c ? "Saving…" : "Save" })
|
|
523
525
|
] })
|
|
524
526
|
] });
|
|
525
527
|
}
|
|
@@ -550,30 +552,30 @@ const Gt = {
|
|
|
550
552
|
}
|
|
551
553
|
};
|
|
552
554
|
function cn(e) {
|
|
553
|
-
const { kind: t, id: i, versionNumber: s } = e, a = Gt[t],
|
|
555
|
+
const { kind: t, id: i, versionNumber: s } = e, a = Gt[t], o = Zn(t, i, s, !0), l = Xn(t), d = xn(t), [h, c] = u(!1), [v, b] = u(null);
|
|
554
556
|
return /* @__PURE__ */ r(V, { children: [
|
|
555
|
-
/* @__PURE__ */ r(
|
|
557
|
+
/* @__PURE__ */ r(B, { title: `Version ${s}`, onClose: e.onClose, wide: !0, children: [
|
|
556
558
|
/* @__PURE__ */ r("div", { className: "modal-body", children: [
|
|
557
|
-
|
|
559
|
+
o.isLoading ? /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }) : o.isError ? /* @__PURE__ */ n("div", { className: "error", "data-testid": a.error, children: o.error instanceof Error ? o.error.message : String(o.error) }) : o.data ? /* @__PURE__ */ n("div", { "data-testid": a.json, children: /* @__PURE__ */ n(
|
|
558
560
|
pe,
|
|
559
561
|
{
|
|
560
|
-
code: JSON.stringify(
|
|
562
|
+
code: JSON.stringify(o.data.definition, null, 2),
|
|
561
563
|
language: "json",
|
|
562
564
|
maxHeight: "420px",
|
|
563
565
|
copyable: !0
|
|
564
566
|
}
|
|
565
567
|
) }) : null,
|
|
566
|
-
(v ||
|
|
567
|
-
|
|
568
|
+
(v || l.isError) && /* @__PURE__ */ n("div", { className: "error", children: v ?? String(l.error) }),
|
|
569
|
+
d.data !== void 0 && /* @__PURE__ */ n("div", { "data-testid": a.invokeJson, children: /* @__PURE__ */ n(
|
|
568
570
|
pe,
|
|
569
571
|
{
|
|
570
|
-
code: JSON.stringify(
|
|
572
|
+
code: JSON.stringify(d.data, null, 2),
|
|
571
573
|
language: "json",
|
|
572
574
|
maxHeight: "240px",
|
|
573
575
|
copyable: !0
|
|
574
576
|
}
|
|
575
577
|
) }),
|
|
576
|
-
|
|
578
|
+
d.isError && /* @__PURE__ */ n("div", { className: "error", "data-testid": a.invokeError, children: d.error instanceof j ? d.error.message : String(d.error) })
|
|
577
579
|
] }),
|
|
578
580
|
/* @__PURE__ */ r("div", { className: "modal-actions", children: [
|
|
579
581
|
/* @__PURE__ */ n(
|
|
@@ -582,9 +584,9 @@ function cn(e) {
|
|
|
582
584
|
type: "button",
|
|
583
585
|
className: "btn ghost",
|
|
584
586
|
"data-testid": a.invokeButton,
|
|
585
|
-
disabled:
|
|
586
|
-
onClick: () =>
|
|
587
|
-
children:
|
|
587
|
+
disabled: d.isPending,
|
|
588
|
+
onClick: () => d.mutate({ id: i, versionNumber: s }),
|
|
589
|
+
children: d.isPending ? "Invoking…" : "Invoke this version"
|
|
588
590
|
}
|
|
589
591
|
),
|
|
590
592
|
/* @__PURE__ */ n(
|
|
@@ -593,9 +595,9 @@ function cn(e) {
|
|
|
593
595
|
type: "button",
|
|
594
596
|
className: "btn danger",
|
|
595
597
|
"data-testid": a.revertButton,
|
|
596
|
-
disabled:
|
|
597
|
-
onClick: () =>
|
|
598
|
-
children:
|
|
598
|
+
disabled: l.isPending,
|
|
599
|
+
onClick: () => c(!0),
|
|
600
|
+
children: l.isPending ? "Reverting…" : "Revert to this version"
|
|
599
601
|
}
|
|
600
602
|
),
|
|
601
603
|
/* @__PURE__ */ n("button", { type: "button", className: "btn ghost", onClick: e.onClose, children: "Close" })
|
|
@@ -609,9 +611,9 @@ function cn(e) {
|
|
|
609
611
|
confirmLabel: "Revert",
|
|
610
612
|
destructive: !0,
|
|
611
613
|
onConfirm: () => {
|
|
612
|
-
|
|
614
|
+
c(!1), e.onRestore ? (b(null), e.onRestore(s).then(e.onClose, (m) => b(String(m)))) : l.mutate({ id: i, versionNumber: s });
|
|
613
615
|
},
|
|
614
|
-
onClose: () =>
|
|
616
|
+
onClose: () => c(!1)
|
|
615
617
|
}
|
|
616
618
|
)
|
|
617
619
|
] });
|
|
@@ -622,9 +624,9 @@ function Yt(e) {
|
|
|
622
624
|
deleteLabel: i,
|
|
623
625
|
deleteTestId: s,
|
|
624
626
|
archiveTestId: a,
|
|
625
|
-
onRequestDelete:
|
|
626
|
-
onRequestArchive:
|
|
627
|
-
deleteError:
|
|
627
|
+
onRequestDelete: o,
|
|
628
|
+
onRequestArchive: l,
|
|
629
|
+
deleteError: d,
|
|
628
630
|
archiveError: h
|
|
629
631
|
} = e;
|
|
630
632
|
return /* @__PURE__ */ r("div", { className: "rail-danger-zone rail-danger-zone--panel", "data-testid": "rail-danger-zone-panel", children: [
|
|
@@ -635,7 +637,7 @@ function Yt(e) {
|
|
|
635
637
|
type: "button",
|
|
636
638
|
className: "btn danger",
|
|
637
639
|
"data-testid": a,
|
|
638
|
-
onClick:
|
|
640
|
+
onClick: l,
|
|
639
641
|
disabled: e.pending,
|
|
640
642
|
children: "Archive"
|
|
641
643
|
}
|
|
@@ -647,7 +649,7 @@ function Yt(e) {
|
|
|
647
649
|
className: "btn danger",
|
|
648
650
|
"aria-label": i,
|
|
649
651
|
"data-testid": s,
|
|
650
|
-
onClick:
|
|
652
|
+
onClick: o,
|
|
651
653
|
disabled: e.pending,
|
|
652
654
|
children: "Delete"
|
|
653
655
|
}
|
|
@@ -657,14 +659,14 @@ function Yt(e) {
|
|
|
657
659
|
{
|
|
658
660
|
label: i,
|
|
659
661
|
"data-testid": s,
|
|
660
|
-
onClick:
|
|
662
|
+
onClick: o,
|
|
661
663
|
disabled: e.pending
|
|
662
664
|
}
|
|
663
665
|
),
|
|
664
666
|
/* @__PURE__ */ n("span", { children: "Delete" })
|
|
665
667
|
] }) : null
|
|
666
668
|
] }),
|
|
667
|
-
|
|
669
|
+
d && /* @__PURE__ */ n("div", { className: "error", "data-testid": "rail-delete-error", children: d }),
|
|
668
670
|
h && /* @__PURE__ */ n("div", { className: "error", "data-testid": "rail-archive-error", children: h })
|
|
669
671
|
] });
|
|
670
672
|
}
|
|
@@ -675,7 +677,7 @@ function un(e) {
|
|
|
675
677
|
] });
|
|
676
678
|
}
|
|
677
679
|
function hn(e) {
|
|
678
|
-
const { id: t, displayName: i, fields: s, row: a, tags:
|
|
680
|
+
const { id: t, displayName: i, fields: s, row: a, tags: o } = e;
|
|
679
681
|
return /* @__PURE__ */ n("div", { className: "rail-meta", children: /* @__PURE__ */ n(
|
|
680
682
|
"div",
|
|
681
683
|
{
|
|
@@ -700,9 +702,9 @@ function hn(e) {
|
|
|
700
702
|
/* @__PURE__ */ n("dt", { children: "Updated" }),
|
|
701
703
|
/* @__PURE__ */ n("dd", { "data-testid": "rail-meta-updated", "data-value": a.updatedAt, children: new Date(a.updatedAt).toLocaleString() })
|
|
702
704
|
] }),
|
|
703
|
-
|
|
705
|
+
o !== void 0 && a && /* @__PURE__ */ r(V, { children: [
|
|
704
706
|
/* @__PURE__ */ n("dt", { children: "Tags" }),
|
|
705
|
-
/* @__PURE__ */ n("dd", { "data-testid": "rail-meta-tags", children:
|
|
707
|
+
/* @__PURE__ */ n("dd", { "data-testid": "rail-meta-tags", children: o.length > 0 ? o.map((l) => /* @__PURE__ */ n("span", { className: "tag", children: l }, l)) : "No tags" })
|
|
706
708
|
] })
|
|
707
709
|
] })
|
|
708
710
|
}
|
|
@@ -721,7 +723,7 @@ function fn(e) {
|
|
|
721
723
|
}
|
|
722
724
|
function mn(e) {
|
|
723
725
|
const { kind: t, children: i, onImport: s, onClose: a } = e;
|
|
724
|
-
return /* @__PURE__ */ r(
|
|
726
|
+
return /* @__PURE__ */ r(B, { title: "Definition", onClose: a, children: [
|
|
725
727
|
/* @__PURE__ */ r("div", { className: "modal-body", children: [
|
|
726
728
|
i,
|
|
727
729
|
/* @__PURE__ */ r("p", { className: "muted small", children: [
|
|
@@ -801,7 +803,7 @@ function gn(e) {
|
|
|
801
803
|
}
|
|
802
804
|
function pn(e) {
|
|
803
805
|
const { loading: t, versions: i } = e;
|
|
804
|
-
return /* @__PURE__ */ r(
|
|
806
|
+
return /* @__PURE__ */ r(B, { title: "All versions", onClose: e.onClose, wide: !0, children: [
|
|
805
807
|
/* @__PURE__ */ r("div", { className: "modal-body", children: [
|
|
806
808
|
t && /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }),
|
|
807
809
|
(i == null ? void 0 : i.length) === 0 && /* @__PURE__ */ n("p", { className: "muted small", children: "No versions yet." }),
|
|
@@ -875,7 +877,7 @@ function vn(e) {
|
|
|
875
877
|
}
|
|
876
878
|
),
|
|
877
879
|
e.deleteConfirming && /* @__PURE__ */ n(
|
|
878
|
-
|
|
880
|
+
Le,
|
|
879
881
|
{
|
|
880
882
|
title: t.deleteTitle,
|
|
881
883
|
message: t.deleteMessage,
|
|
@@ -886,7 +888,7 @@ function vn(e) {
|
|
|
886
888
|
}
|
|
887
889
|
),
|
|
888
890
|
e.archiveConfirming && /* @__PURE__ */ n(
|
|
889
|
-
|
|
891
|
+
Le,
|
|
890
892
|
{
|
|
891
893
|
title: t.archiveTitle,
|
|
892
894
|
message: t.archiveMessage,
|
|
@@ -898,7 +900,7 @@ function vn(e) {
|
|
|
898
900
|
)
|
|
899
901
|
] });
|
|
900
902
|
}
|
|
901
|
-
const bn = { functionsKey:
|
|
903
|
+
const bn = { functionsKey: ct, endpointsKey: dt, workflowsKey: kt };
|
|
902
904
|
function Xt({
|
|
903
905
|
ctx: e,
|
|
904
906
|
project: t,
|
|
@@ -908,24 +910,24 @@ function Xt({
|
|
|
908
910
|
var ae, me;
|
|
909
911
|
const {
|
|
910
912
|
editingSettings: a,
|
|
911
|
-
setEditingSettings:
|
|
912
|
-
historyOpen:
|
|
913
|
-
setHistoryOpen:
|
|
913
|
+
setEditingSettings: o,
|
|
914
|
+
historyOpen: l,
|
|
915
|
+
setHistoryOpen: d,
|
|
914
916
|
versionListOpen: h,
|
|
915
|
-
setVersionListOpen:
|
|
916
|
-
} = s, v = nn(t ?? void 0), b = (e == null ? void 0 : e.kind) === "workflow", m = (e == null ? void 0 : e.id) ?? "", C =
|
|
917
|
+
setVersionListOpen: c
|
|
918
|
+
} = s, v = nn(t ?? void 0), b = (e == null ? void 0 : e.kind) === "workflow", m = (e == null ? void 0 : e.id) ?? "", C = pt(m, b), k = vt(t ?? void 0), D = bt(), O = yt(), E = qe(!1), [R, y] = u(!1), [M, Q] = u(!1), [N, p] = u(!1), [P, q] = u(!1), [U, W] = u(!1), [$, oe] = u(null), [_, le] = u(null), F = Be(We("workflow"), m, N), z = Ke("workflow", m, l && b), te = Ue("workflow"), de = _e("workflow"), [ke, G] = u(null), [ie, ce] = u(null), [se, ue] = u(
|
|
917
919
|
null
|
|
918
920
|
);
|
|
919
921
|
if (!e || e.kind !== "workflow")
|
|
920
922
|
return /* @__PURE__ */ n("p", { className: "muted small", children: "Open a workflow to see its settings." });
|
|
921
|
-
const
|
|
923
|
+
const I = (ae = v.data) == null ? void 0 : ae.find((f) => f.id === e.id), he = I && typeof I.displayName == "string" ? I.displayName : "", H = (I == null ? void 0 : I.tags) ?? [], Y = (I == null ? void 0 : I.status) === "archived";
|
|
922
924
|
async function Z() {
|
|
923
925
|
if (!E.current) {
|
|
924
926
|
E.current = !0, oe(null);
|
|
925
927
|
try {
|
|
926
928
|
Y || await D.mutateAsync(m), await O.mutateAsync(m), q(!1), i({ type: "list" });
|
|
927
929
|
} catch (f) {
|
|
928
|
-
q(!1), oe(f instanceof
|
|
930
|
+
q(!1), oe(f instanceof j ? f.message : String(f));
|
|
929
931
|
} finally {
|
|
930
932
|
E.current = !1;
|
|
931
933
|
}
|
|
@@ -937,12 +939,12 @@ function Xt({
|
|
|
937
939
|
W(!1), i({ type: "list" });
|
|
938
940
|
},
|
|
939
941
|
onError: (f) => {
|
|
940
|
-
W(!1), le(f instanceof
|
|
942
|
+
W(!1), le(f instanceof j ? f.message : String(f));
|
|
941
943
|
}
|
|
942
944
|
});
|
|
943
945
|
}
|
|
944
946
|
return /* @__PURE__ */ r("div", { className: "rail-settings-panel", children: [
|
|
945
|
-
/* @__PURE__ */ n(un, { onEdit: () =>
|
|
947
|
+
/* @__PURE__ */ n(un, { onEdit: () => o(!0) }),
|
|
946
948
|
e.authoringSettings && e.onAuthoringSettingChange && /* @__PURE__ */ r("section", { className: "w6w-stack", "data-testid": "rail-workflow-authoring", children: [
|
|
947
949
|
/* @__PURE__ */ r("label", { children: [
|
|
948
950
|
/* @__PURE__ */ n(
|
|
@@ -978,9 +980,9 @@ function Xt({
|
|
|
978
980
|
{
|
|
979
981
|
id: e.id,
|
|
980
982
|
displayName: he,
|
|
981
|
-
fields:
|
|
982
|
-
row:
|
|
983
|
-
tags:
|
|
983
|
+
fields: $e("workflow"),
|
|
984
|
+
row: I,
|
|
985
|
+
tags: H
|
|
984
986
|
}
|
|
985
987
|
),
|
|
986
988
|
/* @__PURE__ */ n(fn, { onOpen: () => y(!0) }),
|
|
@@ -989,14 +991,14 @@ function Xt({
|
|
|
989
991
|
{
|
|
990
992
|
definitionStatus: e.definitionStatus,
|
|
991
993
|
publishDisabled: e.publishDisabled,
|
|
992
|
-
open:
|
|
994
|
+
open: l,
|
|
993
995
|
versions: z.data,
|
|
994
996
|
publishing: te.isPending,
|
|
995
997
|
togglingEnabled: de.isPending,
|
|
996
998
|
publishError: ke,
|
|
997
999
|
enableError: ie,
|
|
998
1000
|
onShow: () => {
|
|
999
|
-
|
|
1001
|
+
d(!0), c(!0);
|
|
1000
1002
|
},
|
|
1001
1003
|
onPublish: () => {
|
|
1002
1004
|
if (e.onPublish) {
|
|
@@ -1004,14 +1006,14 @@ function Xt({
|
|
|
1004
1006
|
return;
|
|
1005
1007
|
}
|
|
1006
1008
|
G(null), te.mutate(m, {
|
|
1007
|
-
onError: (f) => G(f instanceof
|
|
1009
|
+
onError: (f) => G(f instanceof j ? f.message : String(f))
|
|
1008
1010
|
});
|
|
1009
1011
|
},
|
|
1010
1012
|
onToggleEnabled: () => {
|
|
1011
1013
|
var f;
|
|
1012
1014
|
ce(null), de.mutate(
|
|
1013
1015
|
{ id: m, enabled: !((f = z.data) != null && f.enabled) },
|
|
1014
|
-
{ onError: (A) => ce(A instanceof
|
|
1016
|
+
{ onError: (A) => ce(A instanceof j ? A.message : String(A)) }
|
|
1015
1017
|
);
|
|
1016
1018
|
}
|
|
1017
1019
|
}
|
|
@@ -1022,7 +1024,7 @@ function Xt({
|
|
|
1022
1024
|
loading: z.isLoading,
|
|
1023
1025
|
versions: (me = z.data) == null ? void 0 : me.versions,
|
|
1024
1026
|
onSelect: (f) => ue({ id: m, versionNumber: f }),
|
|
1025
|
-
onClose: () =>
|
|
1027
|
+
onClose: () => c(!1)
|
|
1026
1028
|
}
|
|
1027
1029
|
),
|
|
1028
1030
|
se && se.id === m && /* @__PURE__ */ n(
|
|
@@ -1060,11 +1062,11 @@ function Xt({
|
|
|
1060
1062
|
]
|
|
1061
1063
|
}
|
|
1062
1064
|
),
|
|
1063
|
-
N && /* @__PURE__ */ r(
|
|
1064
|
-
/* @__PURE__ */ n("div", { className: "modal-body", children:
|
|
1065
|
+
N && /* @__PURE__ */ r(B, { title: "Export spec document", onClose: () => p(!1), wide: !0, children: [
|
|
1066
|
+
/* @__PURE__ */ n("div", { className: "modal-body", children: F.isLoading ? /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }) : F.isError ? /* @__PURE__ */ n("div", { className: "error", "data-testid": "rail-spec-error", children: F.error instanceof Error ? F.error.message : String(F.error) }) : F.data ? /* @__PURE__ */ n("div", { "data-testid": "rail-spec-json", children: /* @__PURE__ */ n(
|
|
1065
1067
|
pe,
|
|
1066
1068
|
{
|
|
1067
|
-
code: JSON.stringify(
|
|
1069
|
+
code: JSON.stringify(F.data, null, 2),
|
|
1068
1070
|
language: "json",
|
|
1069
1071
|
maxHeight: "420px",
|
|
1070
1072
|
copyable: !0
|
|
@@ -1072,15 +1074,15 @@ function Xt({
|
|
|
1072
1074
|
) }) : null }),
|
|
1073
1075
|
/* @__PURE__ */ n("div", { className: "modal-actions", children: /* @__PURE__ */ n("button", { type: "button", className: "btn ghost", onClick: () => p(!1), children: "Close" }) })
|
|
1074
1076
|
] }),
|
|
1075
|
-
a &&
|
|
1077
|
+
a && I && /* @__PURE__ */ n(
|
|
1076
1078
|
dn,
|
|
1077
1079
|
{
|
|
1078
1080
|
kind: "workflow",
|
|
1079
1081
|
id: m,
|
|
1080
1082
|
initial: {
|
|
1081
1083
|
displayName: he,
|
|
1082
|
-
key:
|
|
1083
|
-
tags:
|
|
1084
|
+
key: I.key ?? null,
|
|
1085
|
+
tags: H
|
|
1084
1086
|
},
|
|
1085
1087
|
onSave: async (f) => {
|
|
1086
1088
|
if (!C.data) throw new Error("Unable to save settings");
|
|
@@ -1096,7 +1098,7 @@ function Xt({
|
|
|
1096
1098
|
);
|
|
1097
1099
|
});
|
|
1098
1100
|
},
|
|
1099
|
-
onClose: () =>
|
|
1101
|
+
onClose: () => o(!1)
|
|
1100
1102
|
},
|
|
1101
1103
|
m
|
|
1102
1104
|
),
|
|
@@ -1108,7 +1110,7 @@ function Xt({
|
|
|
1108
1110
|
pending: D.isPending || O.isPending,
|
|
1109
1111
|
deleteConfirming: P,
|
|
1110
1112
|
archiveConfirming: U,
|
|
1111
|
-
deleteError:
|
|
1113
|
+
deleteError: $,
|
|
1112
1114
|
archiveError: _,
|
|
1113
1115
|
onRequestDelete: () => q(!0),
|
|
1114
1116
|
onRequestArchive: () => W(!0),
|
|
@@ -1131,15 +1133,15 @@ function Xt({
|
|
|
1131
1133
|
] });
|
|
1132
1134
|
}
|
|
1133
1135
|
function xt({ ctx: e }) {
|
|
1134
|
-
const { project: t, onNavigate: i } = on(), [s, a] = u(!1), [
|
|
1136
|
+
const { project: t, onNavigate: i } = on(), [s, a] = u(!1), [o, l] = u(!1), [d, h] = u(!1), c = {
|
|
1135
1137
|
editingSettings: s,
|
|
1136
1138
|
setEditingSettings: a,
|
|
1137
|
-
historyOpen:
|
|
1138
|
-
setHistoryOpen:
|
|
1139
|
-
versionListOpen:
|
|
1139
|
+
historyOpen: o,
|
|
1140
|
+
setHistoryOpen: l,
|
|
1141
|
+
versionListOpen: d,
|
|
1140
1142
|
setVersionListOpen: h
|
|
1141
1143
|
};
|
|
1142
|
-
return (e == null ? void 0 : e.kind) === "workflow" ? /* @__PURE__ */ n(Xt, { ctx: e, project: t, onNavigate: i, open:
|
|
1144
|
+
return (e == null ? void 0 : e.kind) === "workflow" ? /* @__PURE__ */ n(Xt, { ctx: e, project: t, onNavigate: i, open: c }) : /* @__PURE__ */ n(ei, { ctx: e, project: t, onNavigate: i, open: c });
|
|
1143
1145
|
}
|
|
1144
1146
|
function ei({
|
|
1145
1147
|
ctx: e,
|
|
@@ -1147,22 +1149,22 @@ function ei({
|
|
|
1147
1149
|
onNavigate: i,
|
|
1148
1150
|
open: s
|
|
1149
1151
|
}) {
|
|
1150
|
-
var Pe,
|
|
1152
|
+
var Pe, Ie, Te;
|
|
1151
1153
|
const {
|
|
1152
1154
|
editingSettings: a,
|
|
1153
|
-
setEditingSettings:
|
|
1154
|
-
historyOpen:
|
|
1155
|
-
setHistoryOpen:
|
|
1155
|
+
setEditingSettings: o,
|
|
1156
|
+
historyOpen: l,
|
|
1157
|
+
setHistoryOpen: d,
|
|
1156
1158
|
versionListOpen: h,
|
|
1157
|
-
setVersionListOpen:
|
|
1158
|
-
} = s, v = e == null ? void 0 : e.kind, b =
|
|
1159
|
+
setVersionListOpen: c
|
|
1160
|
+
} = s, v = e == null ? void 0 : e.kind, b = ut(v === "endpoint"), m = en(v === "function"), [C, k] = u(!1), [D, O] = u(""), [E, R] = u(null), [y, M] = u(null), [Q, N] = u(!1), [p, P] = u(!1), [q, U] = u(!1), [W, $] = u(!1), [oe, _] = u(!1), [le, F] = u(null), [z, te] = u(null), de = Ye((e == null ? void 0 : e.id) ?? "", (e == null ? void 0 : e.kind) === "function"), ke = Ze((e == null ? void 0 : e.id) ?? "", (e == null ? void 0 : e.kind) === "endpoint"), G = Xe(), ie = xe(), ce = ht(), se = ft(), ue = mt(), I = gt(), he = e ? We(e.kind) : null, H = Be(he, (e == null ? void 0 : e.id) ?? "", p), Y = e && Me(e.kind) ? e.kind : null, Z = Ke(Y, (e == null ? void 0 : e.id) ?? "", l), fe = Ue(Y ?? "function"), ae = _e(Y ?? "function"), [me, f] = u(null), [A, ge] = u(null), [re, X] = u(
|
|
1159
1161
|
null
|
|
1160
1162
|
);
|
|
1161
1163
|
if (!e || e.kind !== "function" && e.kind !== "endpoint")
|
|
1162
1164
|
return /* @__PURE__ */ n("p", { className: "muted small", children: "Open a workflow, function, or endpoint to see its settings." });
|
|
1163
|
-
const S = e.kind,
|
|
1165
|
+
const S = e.kind, T = e.id, L = S === "function" ? (Pe = m.data) == null ? void 0 : Pe.find((g) => g.id === T) : (Ie = b.data) == null ? void 0 : Ie.find((g) => g.id === T), J = ze(S, S === "function" ? de.data : ke.data), x = (J == null ? void 0 : J.definition) ?? null, Ee = L && typeof L.displayName == "string" ? L.displayName : "", yn = x ? JSON.stringify(x, null, 2) : "";
|
|
1164
1166
|
function kn() {
|
|
1165
|
-
R(null), O(yn), M((
|
|
1167
|
+
R(null), O(yn), M((J == null ? void 0 : J.updatedAt) ?? null), k(!0);
|
|
1166
1168
|
}
|
|
1167
1169
|
const ee = x ? An(D, { id: String(x.id), key: String(x.key) }) : { parsed: null, blockedReason: "No definition loaded yet." }, Ae = S === "function" ? G.isPending : ie.isPending;
|
|
1168
1170
|
function wn() {
|
|
@@ -1170,22 +1172,22 @@ function ei({
|
|
|
1170
1172
|
R(null);
|
|
1171
1173
|
const g = {
|
|
1172
1174
|
onSuccess: () => k(!1),
|
|
1173
|
-
onError: (ne) => R(ne instanceof
|
|
1175
|
+
onError: (ne) => R(ne instanceof j ? ne.message : String(ne))
|
|
1174
1176
|
}, w = { definition: ee.parsed, ifUnmodifiedSince: y };
|
|
1175
1177
|
S === "function" ? G.mutate(w, g) : ie.mutate(w, g);
|
|
1176
1178
|
}
|
|
1177
|
-
const Nn = (
|
|
1179
|
+
const Nn = (L == null ? void 0 : L.archivedAt) != null;
|
|
1178
1180
|
function Sn() {
|
|
1179
|
-
|
|
1181
|
+
F(null);
|
|
1180
1182
|
const g = {
|
|
1181
1183
|
onSuccess: () => {
|
|
1182
|
-
|
|
1184
|
+
$(!1), i({ type: "list" });
|
|
1183
1185
|
},
|
|
1184
1186
|
onError: (w) => {
|
|
1185
|
-
|
|
1187
|
+
$(!1), F(w instanceof j ? w.message : String(w));
|
|
1186
1188
|
}
|
|
1187
1189
|
};
|
|
1188
|
-
S === "function" ? ce.mutate(
|
|
1190
|
+
S === "function" ? ce.mutate(T, g) : se.mutate(T, g);
|
|
1189
1191
|
}
|
|
1190
1192
|
function Cn() {
|
|
1191
1193
|
te(null);
|
|
@@ -1194,45 +1196,45 @@ function ei({
|
|
|
1194
1196
|
_(!1), i({ type: "list" });
|
|
1195
1197
|
},
|
|
1196
1198
|
onError: (w) => {
|
|
1197
|
-
_(!1), te(w instanceof
|
|
1199
|
+
_(!1), te(w instanceof j ? w.message : String(w));
|
|
1198
1200
|
}
|
|
1199
1201
|
};
|
|
1200
|
-
S === "function" ? ue.mutate(
|
|
1202
|
+
S === "function" ? ue.mutate(T, g) : I.mutate(T, g);
|
|
1201
1203
|
}
|
|
1202
1204
|
return /* @__PURE__ */ r("div", { className: "rail-settings-panel", children: [
|
|
1203
|
-
/* @__PURE__ */ n(un, { onEdit: () =>
|
|
1205
|
+
/* @__PURE__ */ n(un, { onEdit: () => o(!0) }),
|
|
1204
1206
|
/* @__PURE__ */ n(
|
|
1205
1207
|
hn,
|
|
1206
1208
|
{
|
|
1207
|
-
id:
|
|
1209
|
+
id: T,
|
|
1208
1210
|
displayName: Ee,
|
|
1209
|
-
fields:
|
|
1210
|
-
row:
|
|
1211
|
+
fields: $e(S),
|
|
1212
|
+
row: L
|
|
1211
1213
|
}
|
|
1212
1214
|
),
|
|
1213
|
-
|
|
1215
|
+
je(S) && /* @__PURE__ */ n(fn, { onOpen: () => N(!0) }),
|
|
1214
1216
|
Me(S) && /* @__PURE__ */ n(
|
|
1215
1217
|
gn,
|
|
1216
1218
|
{
|
|
1217
|
-
open:
|
|
1219
|
+
open: l,
|
|
1218
1220
|
versions: Z.data,
|
|
1219
1221
|
publishing: fe.isPending,
|
|
1220
1222
|
togglingEnabled: ae.isPending,
|
|
1221
1223
|
publishError: me,
|
|
1222
1224
|
enableError: A,
|
|
1223
1225
|
onShow: () => {
|
|
1224
|
-
|
|
1226
|
+
d(!0), c(!0);
|
|
1225
1227
|
},
|
|
1226
1228
|
onPublish: () => {
|
|
1227
|
-
f(null), fe.mutate(
|
|
1228
|
-
onError: (g) => f(g instanceof
|
|
1229
|
+
f(null), fe.mutate(T, {
|
|
1230
|
+
onError: (g) => f(g instanceof j ? g.message : String(g))
|
|
1229
1231
|
});
|
|
1230
1232
|
},
|
|
1231
1233
|
onToggleEnabled: () => {
|
|
1232
1234
|
var g;
|
|
1233
1235
|
ge(null), ae.mutate(
|
|
1234
|
-
{ id:
|
|
1235
|
-
{ onError: (w) => ge(w instanceof
|
|
1236
|
+
{ id: T, enabled: !((g = Z.data) != null && g.enabled) },
|
|
1237
|
+
{ onError: (w) => ge(w instanceof j ? w.message : String(w)) }
|
|
1236
1238
|
);
|
|
1237
1239
|
}
|
|
1238
1240
|
}
|
|
@@ -1241,16 +1243,16 @@ function ei({
|
|
|
1241
1243
|
pn,
|
|
1242
1244
|
{
|
|
1243
1245
|
loading: Z.isLoading,
|
|
1244
|
-
versions: (
|
|
1245
|
-
onSelect: (g) => X({ id:
|
|
1246
|
-
onClose: () =>
|
|
1246
|
+
versions: (Te = Z.data) == null ? void 0 : Te.versions,
|
|
1247
|
+
onSelect: (g) => X({ id: T, versionNumber: g }),
|
|
1248
|
+
onClose: () => c(!1)
|
|
1247
1249
|
}
|
|
1248
1250
|
),
|
|
1249
|
-
re && re.id ===
|
|
1251
|
+
re && re.id === T && /* @__PURE__ */ n(
|
|
1250
1252
|
cn,
|
|
1251
1253
|
{
|
|
1252
1254
|
kind: S,
|
|
1253
|
-
id:
|
|
1255
|
+
id: T,
|
|
1254
1256
|
versionNumber: re.versionNumber,
|
|
1255
1257
|
onClose: () => X(null)
|
|
1256
1258
|
}
|
|
@@ -1263,7 +1265,7 @@ function ei({
|
|
|
1263
1265
|
onImport: () => {
|
|
1264
1266
|
N(!1), U(!0);
|
|
1265
1267
|
},
|
|
1266
|
-
children:
|
|
1268
|
+
children: je(S) && /* @__PURE__ */ r(V, { children: [
|
|
1267
1269
|
/* @__PURE__ */ n("p", { className: "muted small", children: "Export a portable definition — the same shape Import accepts — or Edit JSON to change what's stored directly." }),
|
|
1268
1270
|
/* @__PURE__ */ r("div", { className: "rail-spec-menu-row", children: [
|
|
1269
1271
|
/* @__PURE__ */ n(
|
|
@@ -1296,11 +1298,11 @@ function ei({
|
|
|
1296
1298
|
] })
|
|
1297
1299
|
}
|
|
1298
1300
|
),
|
|
1299
|
-
p && /* @__PURE__ */ r(
|
|
1300
|
-
/* @__PURE__ */ n("div", { className: "modal-body", children:
|
|
1301
|
+
p && /* @__PURE__ */ r(B, { title: "Export spec document", onClose: () => P(!1), wide: !0, children: [
|
|
1302
|
+
/* @__PURE__ */ n("div", { className: "modal-body", children: H.isLoading ? /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }) : H.isError ? /* @__PURE__ */ n("div", { className: "error", "data-testid": "rail-spec-error", children: H.error instanceof Error ? H.error.message : String(H.error) }) : H.data ? /* @__PURE__ */ n("div", { "data-testid": "rail-spec-json", children: /* @__PURE__ */ n(
|
|
1301
1303
|
pe,
|
|
1302
1304
|
{
|
|
1303
|
-
code: JSON.stringify(
|
|
1305
|
+
code: JSON.stringify(H.data, null, 2),
|
|
1304
1306
|
language: "json",
|
|
1305
1307
|
maxHeight: "420px",
|
|
1306
1308
|
copyable: !0
|
|
@@ -1308,7 +1310,7 @@ function ei({
|
|
|
1308
1310
|
) }) : null }),
|
|
1309
1311
|
/* @__PURE__ */ n("div", { className: "modal-actions", children: /* @__PURE__ */ n("button", { type: "button", className: "btn ghost", onClick: () => P(!1), children: "Close" }) })
|
|
1310
1312
|
] }),
|
|
1311
|
-
C && /* @__PURE__ */ r(
|
|
1313
|
+
C && /* @__PURE__ */ r(B, { title: "Edit definition", onClose: () => k(!1), wide: !0, children: [
|
|
1312
1314
|
/* @__PURE__ */ r("div", { className: "modal-body", children: [
|
|
1313
1315
|
/* @__PURE__ */ n(
|
|
1314
1316
|
Mn,
|
|
@@ -1337,31 +1339,31 @@ function ei({
|
|
|
1337
1339
|
)
|
|
1338
1340
|
] })
|
|
1339
1341
|
] }),
|
|
1340
|
-
a &&
|
|
1342
|
+
a && L && /* @__PURE__ */ n(
|
|
1341
1343
|
dn,
|
|
1342
1344
|
{
|
|
1343
1345
|
kind: S,
|
|
1344
|
-
id:
|
|
1346
|
+
id: T,
|
|
1345
1347
|
initial: {
|
|
1346
1348
|
displayName: Ee,
|
|
1347
|
-
key:
|
|
1348
|
-
tags:
|
|
1349
|
+
key: L.key ?? null,
|
|
1350
|
+
tags: L.tags ?? []
|
|
1349
1351
|
},
|
|
1350
1352
|
onSave: async (g) => {
|
|
1351
|
-
if (!
|
|
1352
|
-
const w =
|
|
1353
|
+
if (!J) throw new Error("Unable to save settings");
|
|
1354
|
+
const w = J.definition, ne = L.tags ?? [], De = g.tags !== void 0 && (g.tags.length !== ne.length || g.tags.some((we, Ne) => we !== ne[Ne])) ? { tags: g.tags } : {}, Oe = { definition: S === "function" ? (
|
|
1353
1355
|
// `canEditKey: true` for function (`callable-descriptors.ts`): `data.key` must
|
|
1354
1356
|
// reach the server (the modal falls back to `initial.key` when unchanged).
|
|
1355
1357
|
{ ...w, displayName: g.displayName, key: g.key ?? w.key, ...De }
|
|
1356
|
-
) : { ...w, displayName: g.displayName, ...De }, ifUnmodifiedSince:
|
|
1358
|
+
) : { ...w, displayName: g.displayName, ...De }, ifUnmodifiedSince: J.updatedAt };
|
|
1357
1359
|
return new Promise((we, Ne) => {
|
|
1358
1360
|
const Re = { onSuccess: () => we(), onError: Ne };
|
|
1359
1361
|
S === "function" ? G.mutate(Oe, Re) : ie.mutate(Oe, Re);
|
|
1360
1362
|
});
|
|
1361
1363
|
},
|
|
1362
|
-
onClose: () =>
|
|
1364
|
+
onClose: () => o(!1)
|
|
1363
1365
|
},
|
|
1364
|
-
|
|
1366
|
+
T
|
|
1365
1367
|
),
|
|
1366
1368
|
Pn(S) && /* @__PURE__ */ n(
|
|
1367
1369
|
vn,
|
|
@@ -1372,11 +1374,11 @@ function ei({
|
|
|
1372
1374
|
archiveConfirming: oe,
|
|
1373
1375
|
deleteError: le,
|
|
1374
1376
|
archiveError: z,
|
|
1375
|
-
onRequestDelete: () =>
|
|
1377
|
+
onRequestDelete: () => $(!0),
|
|
1376
1378
|
onRequestArchive: () => _(!0),
|
|
1377
1379
|
onConfirmDelete: Sn,
|
|
1378
1380
|
onConfirmArchive: Cn,
|
|
1379
|
-
onCloseDelete: () =>
|
|
1381
|
+
onCloseDelete: () => $(!1),
|
|
1380
1382
|
onCloseArchive: () => _(!1)
|
|
1381
1383
|
}
|
|
1382
1384
|
),
|
|
@@ -1407,17 +1409,17 @@ function si({
|
|
|
1407
1409
|
variables: e,
|
|
1408
1410
|
onVariablesChange: t
|
|
1409
1411
|
}) {
|
|
1410
|
-
const i =
|
|
1412
|
+
const i = jn().vars ?? [];
|
|
1411
1413
|
function s() {
|
|
1412
1414
|
t([...e, { key: "" }]);
|
|
1413
1415
|
}
|
|
1414
|
-
function a(
|
|
1415
|
-
t(e.map((
|
|
1416
|
+
function a(d, h) {
|
|
1417
|
+
t(e.map((c, v) => v === d ? { ...c, ...h } : c));
|
|
1416
1418
|
}
|
|
1417
|
-
function
|
|
1418
|
-
t(e.filter((h,
|
|
1419
|
+
function o(d) {
|
|
1420
|
+
t(e.filter((h, c) => c !== d));
|
|
1419
1421
|
}
|
|
1420
|
-
const
|
|
1422
|
+
const l = Hn(e);
|
|
1421
1423
|
return /* @__PURE__ */ r("div", { className: "workflow-variable-fields", children: [
|
|
1422
1424
|
/* @__PURE__ */ r("p", { className: "muted small", children: [
|
|
1423
1425
|
"Declaring variables here defines this workflow's ",
|
|
@@ -1431,119 +1433,120 @@ function si({
|
|
|
1431
1433
|
e.length > 0 && /* @__PURE__ */ r("div", { className: "workflow-variable-head", "aria-hidden": "true", children: [
|
|
1432
1434
|
/* @__PURE__ */ n("span", { children: "Key" }),
|
|
1433
1435
|
/* @__PURE__ */ n("span", { children: "Type" }),
|
|
1434
|
-
/* @__PURE__ */ n("span", {}),
|
|
1436
|
+
/* @__PURE__ */ n("span", { children: "Default" }),
|
|
1437
|
+
/* @__PURE__ */ n("span", { children: "Required" }),
|
|
1435
1438
|
/* @__PURE__ */ n("span", {})
|
|
1436
1439
|
] }),
|
|
1437
|
-
e.length > 0 && /* @__PURE__ */ n("ul", { className: "list", "data-testid": "workflow-variables-list", children: e.map((
|
|
1438
|
-
|
|
1439
|
-
{
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
"
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
"input",
|
|
1440
|
+
e.length > 0 && /* @__PURE__ */ n("ul", { className: "workflow-variable-list", "data-testid": "workflow-variables-list", children: e.map((d, h) => (
|
|
1441
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and reorderable
|
|
1442
|
+
/* @__PURE__ */ r("li", { children: [
|
|
1443
|
+
/* @__PURE__ */ r("div", { className: "workflow-variable-row", children: [
|
|
1444
|
+
/* @__PURE__ */ n(
|
|
1445
|
+
"input",
|
|
1446
|
+
{
|
|
1447
|
+
type: "text",
|
|
1448
|
+
className: "workflow-variable-key",
|
|
1449
|
+
value: d.key,
|
|
1450
|
+
placeholder: "key",
|
|
1451
|
+
"aria-label": "Variable key",
|
|
1452
|
+
spellCheck: !1,
|
|
1453
|
+
onChange: (c) => a(h, { key: c.target.value })
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
/* @__PURE__ */ r(
|
|
1457
|
+
"select",
|
|
1458
|
+
{
|
|
1459
|
+
value: d.type ?? "",
|
|
1460
|
+
"aria-label": "Variable type",
|
|
1461
|
+
onChange: (c) => a(h, {
|
|
1462
|
+
type: c.target.value || void 0
|
|
1463
|
+
}),
|
|
1464
|
+
children: [
|
|
1465
|
+
/* @__PURE__ */ n("option", { value: "", children: "(any)" }),
|
|
1466
|
+
ii.map((c) => /* @__PURE__ */ n("option", { value: c, children: c }, c))
|
|
1467
|
+
]
|
|
1468
|
+
}
|
|
1469
|
+
),
|
|
1470
|
+
/* @__PURE__ */ n(
|
|
1471
|
+
Je,
|
|
1472
|
+
{
|
|
1473
|
+
value: { vars: qn(e, h, i) },
|
|
1474
|
+
children: /* @__PURE__ */ n(
|
|
1475
|
+
Ln,
|
|
1474
1476
|
{
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
`${e.length}:${h}`
|
|
1507
|
-
)
|
|
1508
|
-
}
|
|
1509
|
-
)
|
|
1510
|
-
] }),
|
|
1511
|
-
o.includes(h) && /* @__PURE__ */ n("span", { className: "muted small", "data-testid": "variable-duplicate", children: "Duplicate key — a later row with the same name wins." })
|
|
1512
|
-
]
|
|
1513
|
-
},
|
|
1514
|
-
h
|
|
1477
|
+
value: d.default,
|
|
1478
|
+
onChange: (c) => a(h, { default: c }),
|
|
1479
|
+
placeholder: "no default",
|
|
1480
|
+
"aria-label": "Variable default"
|
|
1481
|
+
},
|
|
1482
|
+
`${e.length}:${h}`
|
|
1483
|
+
)
|
|
1484
|
+
}
|
|
1485
|
+
),
|
|
1486
|
+
/* @__PURE__ */ n(
|
|
1487
|
+
"input",
|
|
1488
|
+
{
|
|
1489
|
+
type: "checkbox",
|
|
1490
|
+
className: "workflow-variable-required",
|
|
1491
|
+
checked: d.required ?? !1,
|
|
1492
|
+
"aria-label": `${d.key || "Variable"} is required`,
|
|
1493
|
+
onChange: (c) => a(h, { required: c.target.checked })
|
|
1494
|
+
}
|
|
1495
|
+
),
|
|
1496
|
+
/* @__PURE__ */ n(
|
|
1497
|
+
Se,
|
|
1498
|
+
{
|
|
1499
|
+
danger: !0,
|
|
1500
|
+
icon: "close",
|
|
1501
|
+
label: `Remove variable ${d.key || h + 1}`,
|
|
1502
|
+
onClick: () => o(h)
|
|
1503
|
+
}
|
|
1504
|
+
)
|
|
1505
|
+
] }),
|
|
1506
|
+
l.includes(h) && /* @__PURE__ */ n("span", { className: "muted small", "data-testid": "variable-duplicate", children: "Duplicate key — a later row with the same name wins." })
|
|
1507
|
+
] }, h)
|
|
1515
1508
|
)) })
|
|
1516
1509
|
] });
|
|
1517
1510
|
}
|
|
1511
|
+
function ai({
|
|
1512
|
+
variables: e,
|
|
1513
|
+
onVariablesChange: t,
|
|
1514
|
+
onClose: i
|
|
1515
|
+
}) {
|
|
1516
|
+
return /* @__PURE__ */ r(B, { title: "Workflow inputs", onClose: i, wide: !0, children: [
|
|
1517
|
+
/* @__PURE__ */ n("div", { className: "modal-body", "data-testid": "workflow-inputs-modal", children: /* @__PURE__ */ n(si, { variables: e, onVariablesChange: t }) }),
|
|
1518
|
+
/* @__PURE__ */ n("div", { className: "modal-actions", children: /* @__PURE__ */ n("button", { type: "button", className: "btn", onClick: i, children: "Done" }) })
|
|
1519
|
+
] });
|
|
1520
|
+
}
|
|
1518
1521
|
function Ce(e) {
|
|
1519
1522
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
1520
1523
|
}
|
|
1521
|
-
function
|
|
1524
|
+
function ri(e, t) {
|
|
1522
1525
|
if (Ce(e)) return e;
|
|
1523
|
-
if (t && t.length > 0) return
|
|
1526
|
+
if (t && t.length > 0) return It(t);
|
|
1524
1527
|
}
|
|
1525
|
-
function
|
|
1528
|
+
function oi(e) {
|
|
1526
1529
|
const t = /* @__PURE__ */ new Map(), i = [...e].sort((s, a) => s.seq - a.seq);
|
|
1527
1530
|
for (const s of i) {
|
|
1528
1531
|
if (s.warning !== void 0 || !Array.isArray(s.path)) continue;
|
|
1529
|
-
const a = s.nodeId ?? null,
|
|
1532
|
+
const a = s.nodeId ?? null, o = s.new !== void 0 && s.new !== null;
|
|
1530
1533
|
if (s.path.length === 0) {
|
|
1531
|
-
if (t.clear(),
|
|
1534
|
+
if (t.clear(), o && Ce(s.new)) for (const d of Object.keys(s.new)) t.set(d, a);
|
|
1532
1535
|
continue;
|
|
1533
1536
|
}
|
|
1534
|
-
const
|
|
1535
|
-
s.path.length === 1 && !
|
|
1537
|
+
const l = s.path[0];
|
|
1538
|
+
s.path.length === 1 && !o ? t.delete(l) : t.set(l, a);
|
|
1536
1539
|
}
|
|
1537
1540
|
return t;
|
|
1538
1541
|
}
|
|
1539
|
-
const
|
|
1540
|
-
function
|
|
1542
|
+
const li = /\{\{[\s\S]*?\}\}/;
|
|
1543
|
+
function di(e) {
|
|
1541
1544
|
const t = [], i = (s, a) => {
|
|
1542
1545
|
if (Ce(s) && Object.keys(s).length > 0) {
|
|
1543
|
-
for (const [
|
|
1546
|
+
for (const [o, l] of Object.entries(s)) i(l, a ? `${a}.${o}` : o);
|
|
1544
1547
|
return;
|
|
1545
1548
|
}
|
|
1546
|
-
if (typeof s == "string" &&
|
|
1549
|
+
if (typeof s == "string" && li.test(s)) {
|
|
1547
1550
|
t.push({ path: a, kind: "reference", text: s });
|
|
1548
1551
|
return;
|
|
1549
1552
|
}
|
|
@@ -1552,21 +1555,35 @@ function li(e) {
|
|
|
1552
1555
|
if (e) for (const [s, a] of Object.entries(e)) i(a, s);
|
|
1553
1556
|
return t;
|
|
1554
1557
|
}
|
|
1555
|
-
function
|
|
1558
|
+
function ci(e) {
|
|
1559
|
+
if (e == null || e === "") return null;
|
|
1560
|
+
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
|
|
1561
|
+
return String(e);
|
|
1562
|
+
if (typeof e == "object" && !Array.isArray(e)) {
|
|
1563
|
+
const t = e;
|
|
1564
|
+
if (t.type === "secret") return "•••";
|
|
1565
|
+
if (t.type === "expr" && Array.isArray(t.parts)) {
|
|
1566
|
+
const i = t.parts.map((s) => s.kind === "text" ? s.value ?? "" : s.kind === "secret" ? "•••" : (s.kind === "var" || s.kind === "render") && s.ref ? `{{${s.ref}}}` : "{{…}}").join("");
|
|
1567
|
+
return i === "" ? null : i;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
return JSON.stringify(e);
|
|
1571
|
+
}
|
|
1572
|
+
function ui(e) {
|
|
1556
1573
|
return (e == null ? void 0 : e.kind) === "workflow" ? e.onOpenStartingState : void 0;
|
|
1557
1574
|
}
|
|
1558
|
-
function
|
|
1575
|
+
function hi() {
|
|
1559
1576
|
return /* @__PURE__ */ n(K, { name: "database" });
|
|
1560
1577
|
}
|
|
1561
|
-
function
|
|
1578
|
+
function fi({ ctx: e }) {
|
|
1562
1579
|
var k, D, O, E, R;
|
|
1563
|
-
const t = Pt(), i =
|
|
1580
|
+
const t = Pt(), i = wt(e.id), s = (k = i.data) == null ? void 0 : k[0], a = Nt((s == null ? void 0 : s.runId) ?? null), o = ((D = a.data) == null ? void 0 : D.status) ?? (s == null ? void 0 : s.status), l = St((s == null ? void 0 : s.runId) ?? null, o), d = o !== void 0 && !Ct(o), h = qe(null);
|
|
1564
1581
|
if (be(() => {
|
|
1565
|
-
!
|
|
1566
|
-
}, [
|
|
1582
|
+
!d || !s || s.finishedAt !== null || h.current !== s.runId && (h.current = s.runId, t.invalidateQueries({ queryKey: Et(e.id) }));
|
|
1583
|
+
}, [d, s, t, e.id]), i.isLoading) return /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" });
|
|
1567
1584
|
if (!s)
|
|
1568
1585
|
return /* @__PURE__ */ n("p", { className: "muted small", "data-testid": "rail-state-current-empty", children: "No run yet. Run the workflow and the state it ends with shows here." });
|
|
1569
|
-
const
|
|
1586
|
+
const c = ((O = l.data) == null ? void 0 : O.writes) ?? [], v = (E = a.data) == null ? void 0 : E.state, b = ri(v, c), m = oi(c), C = b ? Object.keys(b) : [];
|
|
1570
1587
|
return /* @__PURE__ */ r("div", { className: "w6w-stack", "data-testid": "rail-state-current", children: [
|
|
1571
1588
|
/* @__PURE__ */ r("dl", { className: "rail-meta-list", children: [
|
|
1572
1589
|
/* @__PURE__ */ n("dt", { children: "Run" }),
|
|
@@ -1574,7 +1591,7 @@ function ui({ ctx: e }) {
|
|
|
1574
1591
|
/* @__PURE__ */ n("dt", { children: "Started" }),
|
|
1575
1592
|
/* @__PURE__ */ n("dd", { children: new Date(s.startedAt).toLocaleString() }),
|
|
1576
1593
|
/* @__PURE__ */ n("dt", { children: "Status" }),
|
|
1577
|
-
/* @__PURE__ */ n("dd", { "data-testid": "rail-state-run-status", children:
|
|
1594
|
+
/* @__PURE__ */ n("dd", { "data-testid": "rail-state-run-status", children: o })
|
|
1578
1595
|
] }),
|
|
1579
1596
|
e.onOpenRun && /* @__PURE__ */ n(
|
|
1580
1597
|
"button",
|
|
@@ -1601,12 +1618,12 @@ function ui({ ctx: e }) {
|
|
|
1601
1618
|
] }) : m.has(y) ? "From the starting state" : "No step wrote it" })
|
|
1602
1619
|
] }) }, y);
|
|
1603
1620
|
}) }),
|
|
1604
|
-
((R =
|
|
1621
|
+
((R = l.data) == null ? void 0 : R.truncated) && /* @__PURE__ */ n("p", { className: "muted small", children: "The run's state log reached its limit, so later writers aren't shown." })
|
|
1605
1622
|
] })
|
|
1606
1623
|
] });
|
|
1607
1624
|
}
|
|
1608
|
-
function
|
|
1609
|
-
const t =
|
|
1625
|
+
function mi({ ctx: e }) {
|
|
1626
|
+
const t = di(e.startingState), i = Jn(e.startingState, e.variables ?? []);
|
|
1610
1627
|
return /* @__PURE__ */ r("div", { className: "w6w-stack", "data-testid": "rail-state-starting", children: [
|
|
1611
1628
|
/* @__PURE__ */ n("p", { className: "muted small", children: "Workflow inputs override starting state; starting state overrides project variables with the same name." }),
|
|
1612
1629
|
i.length > 0 && /* @__PURE__ */ r("p", { className: "muted small", "data-testid": "starting-data-collision", children: [
|
|
@@ -1637,56 +1654,96 @@ function hi({ ctx: e }) {
|
|
|
1637
1654
|
] }) }, s.path)) })
|
|
1638
1655
|
] });
|
|
1639
1656
|
}
|
|
1640
|
-
function
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1657
|
+
function gi({
|
|
1658
|
+
variables: e,
|
|
1659
|
+
onVariablesChange: t
|
|
1660
|
+
}) {
|
|
1661
|
+
const [i, s] = u(!1), a = e.filter((o) => o.key !== "");
|
|
1662
|
+
return /* @__PURE__ */ r("section", { "data-testid": "rail-workflow-variables", children: [
|
|
1663
|
+
/* @__PURE__ */ r("div", { className: "rail-section-head", children: [
|
|
1644
1664
|
/* @__PURE__ */ n("h4", { children: "Workflow inputs" }),
|
|
1645
1665
|
/* @__PURE__ */ n(
|
|
1646
|
-
|
|
1666
|
+
"button",
|
|
1647
1667
|
{
|
|
1648
|
-
|
|
1649
|
-
|
|
1668
|
+
type: "button",
|
|
1669
|
+
className: "btn ghost",
|
|
1670
|
+
"data-testid": "rail-workflow-variables-edit",
|
|
1671
|
+
onClick: () => s(!0),
|
|
1672
|
+
children: a.length === 0 ? "+ Add inputs" : "Edit inputs"
|
|
1650
1673
|
}
|
|
1651
1674
|
)
|
|
1652
1675
|
] }),
|
|
1676
|
+
a.length === 0 ? /* @__PURE__ */ n("p", { className: "muted small", "data-testid": "rail-workflow-variables-empty", children: "None declared, so API and AI (MCP) callers may send anything." }) : /* @__PURE__ */ n("ul", { className: "rail-input-list", "data-testid": "rail-workflow-variables-list", children: a.map((o, l) => {
|
|
1677
|
+
const d = ci(o.default);
|
|
1678
|
+
return /* @__PURE__ */ r("li", { "data-testid": "rail-workflow-variable", children: [
|
|
1679
|
+
/* @__PURE__ */ r("span", { className: "rail-input-line", children: [
|
|
1680
|
+
/* @__PURE__ */ n("code", { className: "rail-input-key", title: o.key, children: o.key }),
|
|
1681
|
+
/* @__PURE__ */ n("span", { className: "muted small", children: o.type ?? "any" }),
|
|
1682
|
+
o.required && /* @__PURE__ */ n("span", { className: "rail-input-req", children: "required" })
|
|
1683
|
+
] }),
|
|
1684
|
+
d !== null && /* @__PURE__ */ r("span", { className: "muted small rail-input-default", title: d, children: [
|
|
1685
|
+
"= ",
|
|
1686
|
+
d
|
|
1687
|
+
] })
|
|
1688
|
+
] }, `${o.key}:${l}`);
|
|
1689
|
+
}) }),
|
|
1690
|
+
i && /* @__PURE__ */ n(
|
|
1691
|
+
ai,
|
|
1692
|
+
{
|
|
1693
|
+
variables: e,
|
|
1694
|
+
onVariablesChange: t,
|
|
1695
|
+
onClose: () => s(!1)
|
|
1696
|
+
}
|
|
1697
|
+
)
|
|
1698
|
+
] });
|
|
1699
|
+
}
|
|
1700
|
+
function pi({ ctx: e }) {
|
|
1701
|
+
return (e == null ? void 0 : e.kind) !== "workflow" || !e.onOpenStartingState ? null : /* @__PURE__ */ r("div", { className: "w6w-stack", "data-testid": "rail-state-body", children: [
|
|
1702
|
+
/* @__PURE__ */ n("div", { className: "right-rail-panel-head", children: /* @__PURE__ */ n("h3", { children: "Data" }) }),
|
|
1703
|
+
e.onVariablesChange && /* @__PURE__ */ n(
|
|
1704
|
+
gi,
|
|
1705
|
+
{
|
|
1706
|
+
variables: e.variables ?? [],
|
|
1707
|
+
onVariablesChange: e.onVariablesChange
|
|
1708
|
+
}
|
|
1709
|
+
),
|
|
1653
1710
|
/* @__PURE__ */ r("section", { "data-testid": "rail-state-current-section", children: [
|
|
1654
1711
|
/* @__PURE__ */ n("h4", { children: "Current state" }),
|
|
1655
|
-
/* @__PURE__ */ n(
|
|
1712
|
+
/* @__PURE__ */ n(fi, { ctx: e })
|
|
1656
1713
|
] }),
|
|
1657
1714
|
/* @__PURE__ */ n("hr", {}),
|
|
1658
1715
|
/* @__PURE__ */ r("section", { "data-testid": "rail-state-starting-section", children: [
|
|
1659
1716
|
/* @__PURE__ */ n("h4", { children: "Starting state" }),
|
|
1660
|
-
/* @__PURE__ */ n(
|
|
1717
|
+
/* @__PURE__ */ n(mi, { ctx: e })
|
|
1661
1718
|
] })
|
|
1662
1719
|
] });
|
|
1663
1720
|
}
|
|
1664
|
-
const
|
|
1721
|
+
const vi = {
|
|
1665
1722
|
id: "starting-state",
|
|
1666
1723
|
title: "Data",
|
|
1667
1724
|
rendersHeading: !0,
|
|
1668
|
-
Icon:
|
|
1669
|
-
isAvailable: (e) =>
|
|
1670
|
-
Panel:
|
|
1725
|
+
Icon: hi,
|
|
1726
|
+
isAvailable: (e) => ui(e) !== void 0,
|
|
1727
|
+
Panel: pi,
|
|
1671
1728
|
hasIndicator: (e) => (e == null ? void 0 : e.kind) === "workflow" && e.hasStartingState === !0
|
|
1672
|
-
},
|
|
1729
|
+
}, Ui = [
|
|
1673
1730
|
ti,
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1731
|
+
Lt,
|
|
1732
|
+
Bt,
|
|
1733
|
+
vi,
|
|
1677
1734
|
Vt,
|
|
1678
1735
|
Kt
|
|
1679
1736
|
];
|
|
1680
1737
|
export {
|
|
1681
1738
|
Wt as C,
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1739
|
+
Bi as P,
|
|
1740
|
+
Ki as R,
|
|
1741
|
+
Fi as W,
|
|
1685
1742
|
on as a,
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1743
|
+
Ji as b,
|
|
1744
|
+
qi as c,
|
|
1745
|
+
Hi as d,
|
|
1746
|
+
Ui as e,
|
|
1747
|
+
Tt as u
|
|
1691
1748
|
};
|
|
1692
|
-
//# sourceMappingURL=editor-tools-
|
|
1749
|
+
//# sourceMappingURL=editor-tools-Ch1cAE4F.js.map
|