@oomol-lab/open-flow 0.1.0-beta.2 → 0.1.0-beta.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.
- package/dist/browser/DesignerIcon-DdfuH2jW.js +2066 -0
- package/dist/browser/createResourceDialog-4YQKl8lG.js +505 -0
- package/dist/browser/dist-CP0883sY.js +4 -0
- package/dist/browser/{esm-B_PbUobB.js → esm-C9jQK70n.js} +1 -1
- package/dist/browser/flow-authoring-node.d.ts +3 -0
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +66 -46
- package/dist/browser/flow-change.d.ts +14 -1
- package/dist/browser/flow-notifications.d.ts +5 -0
- package/dist/browser/{diagnostics-giPSzyMo.js → flowChanges-Bs-ZcJV8.js} +6027 -3367
- package/dist/browser/{flowRunInputEditorStore-BeyUSWpO.js → flowRunInputEditorStore-BYa8zFLC.js} +719 -718
- package/dist/browser/{flowWorkspace-DAMLVMcF.js → flowWorkspace-BewofPeU.js} +40337 -42346
- package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-qDxSDwzN.js} +1813 -2328
- package/dist/browser/icons-DRoMXL5h.js +521 -0
- package/dist/browser/{markdownContent-DdlIRN3_.js → markdownContent-DUfLdnUt.js} +1 -1
- package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-CwMPjseS.js} +1 -1
- package/dist/browser/waitNotificationInputs-DtrPBwA1.js +26 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -0
- package/dist/browser/workbench.js +612 -537
- package/dist/browser/{workbenchSelect-B2s1HV-Y.js → workbenchSelect-CX8KtT7L.js} +483 -482
- package/dist/common/control-api-conformance.d.ts +1 -0
- package/dist/common/control-api-conformance.js +59 -0
- package/dist/common/control-api-errors.d.ts +4 -0
- package/dist/common/control-api.d.ts +22 -3
- package/dist/common/control-api.js +134 -73
- package/dist/common/flow-encoding.js +20 -8
- package/dist/common/flow-notifications.d.ts +5 -0
- package/dist/common/flow-semantics.d.ts +1 -0
- package/dist/common/flow-semantics.js +3464 -1104
- package/dist/common/run-events.js +2 -1
- package/dist/common/run-lifecycle.d.ts +17 -2
- package/dist/common/run-lifecycle.js +53 -2
- package/dist/common/scheduler.d.ts +64 -3
- package/dist/common/scheduler.js +417 -142
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/browser/createResourceDialog-BkZns-oZ.js +0 -504
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { a as e, f as t, i as n } from "./dist-C46JByB-.js";
|
|
2
2
|
import { a as r, i, s as a, t as o } from "./main-DmjVyuWr.js";
|
|
3
|
-
import { At as s,
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { At as s, Bn as c, Hn as l } from "./getPseudoElementBounds-qDxSDwzN.js";
|
|
4
|
+
import { a as u, d, f, i as p, l as m, r as h, s as g, t as _, u as v } from "./icons-DRoMXL5h.js";
|
|
5
|
+
import { t as y } from "./workbenchSelect-CX8KtT7L.js";
|
|
6
|
+
import { $ as b, A as x, C as S, D as C, E as w, F as T, G as E, H as D, I as O, J as ee, M as k, N as A, O as j, P as M, Q as N, S as P, U as F, V as I, W as te, X as ne, Y as re, Z as ie, _ as ae, a as oe, at as se, b as ce, c as le, ct as ue, d as de, dt as fe, et as pe, f as me, ft as L, g as he, h as ge, i as _e, it as ve, j as R, l as ye, lt as be, m as xe, mt as z, n as B, nt as Se, o as Ce, ot as we, p as Te, pt as Ee, q as De, rt as Oe, s as ke, st as Ae, t as je, tt as V, u as Me, ut as Ne, v as Pe, w as Fe, x as Ie, y as Le, z as Re } from "./flowChanges-Bs-ZcJV8.js";
|
|
7
|
+
import { a as ze, i as Be, n as Ve, r as He } from "./languages-DgJehE1g.js";
|
|
8
|
+
import { Suspense as Ue, lazy as We, useEffect as H, useRef as Ge, useState as U } from "react";
|
|
9
|
+
import { Fragment as Ke, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
9
10
|
//#region src/workbench/browser/runtime/navigation.ts
|
|
10
|
-
var
|
|
11
|
+
var qe = class {
|
|
11
12
|
#e;
|
|
12
13
|
#t;
|
|
13
14
|
#n;
|
|
@@ -66,7 +67,7 @@ var He = class {
|
|
|
66
67
|
this.#s = !0, await this.#n.selectFlow(void 0), e == this.#i && (this.#u("design", !1), this.#s = !1);
|
|
67
68
|
}
|
|
68
69
|
async apply(e) {
|
|
69
|
-
if (
|
|
70
|
+
if (Je(e, this.#t)) return;
|
|
70
71
|
this.#t = e;
|
|
71
72
|
let t = ++this.#i;
|
|
72
73
|
this.#s = !0;
|
|
@@ -82,19 +83,19 @@ var He = class {
|
|
|
82
83
|
flowId: this.#n.workspace.$.flowId.value,
|
|
83
84
|
view: e
|
|
84
85
|
};
|
|
85
|
-
|
|
86
|
+
Je(n, this.#t) || (this.#t = n, this.#e(n, { replace: t })), this.#r.set(e);
|
|
86
87
|
}
|
|
87
88
|
};
|
|
88
|
-
function
|
|
89
|
+
function Je(e, t) {
|
|
89
90
|
return e.flowId == t.flowId && e.view == t.view;
|
|
90
91
|
}
|
|
91
92
|
//#endregion
|
|
92
93
|
//#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
|
|
93
|
-
var
|
|
94
|
-
label:
|
|
94
|
+
var Ye = We(() => import("./createResourceDialog-4YQKl8lG.js")), Xe = ze.map((e) => ({
|
|
95
|
+
label: Be[e],
|
|
95
96
|
value: e
|
|
96
97
|
}));
|
|
97
|
-
function
|
|
98
|
+
function Ze({ language: e, onLanguageChange: t }) {
|
|
98
99
|
let n = r(), [i, a] = U(null);
|
|
99
100
|
return t == null ? null : /* @__PURE__ */ G("div", {
|
|
100
101
|
className: "resource-language",
|
|
@@ -102,29 +103,29 @@ function Ke({ language: e, onLanguageChange: t }) {
|
|
|
102
103
|
children: [/* @__PURE__ */ W("span", {
|
|
103
104
|
className: "sr-only",
|
|
104
105
|
children: n("language.label")
|
|
105
|
-
}), /* @__PURE__ */ W(
|
|
106
|
+
}), /* @__PURE__ */ W(y, {
|
|
106
107
|
ariaLabel: n("language.label"),
|
|
107
108
|
onValueChange: (e) => t(e),
|
|
108
|
-
options:
|
|
109
|
+
options: Xe,
|
|
109
110
|
portalRoot: i,
|
|
110
111
|
value: e
|
|
111
112
|
})]
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
-
let
|
|
115
|
+
function Qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: u }) {
|
|
116
|
+
let d = i(), m = r(), [h, g] = U("idle"), [v, y] = U(n.name), b = p(v);
|
|
116
117
|
async function x(e) {
|
|
117
118
|
e.preventDefault();
|
|
118
|
-
let t =
|
|
119
|
-
|
|
119
|
+
let t = v.trim();
|
|
120
|
+
p(t) == null && await u.workspace.renameFlow(n.flowId, t) && g("idle");
|
|
120
121
|
}
|
|
121
122
|
async function S() {
|
|
122
|
-
await
|
|
123
|
+
await u.workspace.deleteFlow(n.flowId) && g("idle");
|
|
123
124
|
}
|
|
124
125
|
return /* @__PURE__ */ G("div", {
|
|
125
126
|
className: "resource-item-row",
|
|
126
127
|
children: [
|
|
127
|
-
/* @__PURE__ */ G(
|
|
128
|
+
/* @__PURE__ */ G(c, {
|
|
128
129
|
"aria-disabled": n.status == "retiring",
|
|
129
130
|
className: "resource-list-row flow-columns",
|
|
130
131
|
nativeButton: !1,
|
|
@@ -133,7 +134,7 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
133
134
|
e.preventDefault();
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
|
-
|
|
137
|
+
pe(e, () => o(n));
|
|
137
138
|
},
|
|
138
139
|
render: /* @__PURE__ */ W("a", { href: n.status == "retiring" ? void 0 : a }),
|
|
139
140
|
tabIndex: n.status == "retiring" ? -1 : void 0,
|
|
@@ -143,13 +144,13 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
143
144
|
className: "resource-primary-cell",
|
|
144
145
|
children: [/* @__PURE__ */ W("span", {
|
|
145
146
|
className: "resource-icon",
|
|
146
|
-
children: /* @__PURE__ */ W(
|
|
147
|
+
children: /* @__PURE__ */ W(_, { name: "flow" })
|
|
147
148
|
}), /* @__PURE__ */ G("span", { children: [/* @__PURE__ */ G("span", {
|
|
148
149
|
className: "flex min-w-0 items-center gap-2",
|
|
149
150
|
children: [/* @__PURE__ */ W("strong", {
|
|
150
151
|
className: "min-w-0 truncate",
|
|
151
152
|
children: n.name
|
|
152
|
-
}), e != null && /* @__PURE__ */ W(
|
|
153
|
+
}), e != null && /* @__PURE__ */ W(fe, {
|
|
153
154
|
className: "min-w-0 shrink",
|
|
154
155
|
title: e,
|
|
155
156
|
variant: "secondary",
|
|
@@ -165,156 +166,132 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
165
166
|
}),
|
|
166
167
|
/* @__PURE__ */ W("time", {
|
|
167
168
|
dateTime: n.updatedAt,
|
|
168
|
-
children: new Date(n.updatedAt).toLocaleString(
|
|
169
|
+
children: new Date(n.updatedAt).toLocaleString(d)
|
|
169
170
|
}),
|
|
170
171
|
/* @__PURE__ */ G("span", {
|
|
171
172
|
className: `resource-status ${n.status == "active" ? "active" : "warning"}`,
|
|
172
173
|
children: [/* @__PURE__ */ W("span", {
|
|
173
174
|
"aria-hidden": "true",
|
|
174
175
|
className: `status-dot ${n.status == "active" ? "success" : "running"}`
|
|
175
|
-
}),
|
|
176
|
+
}), m(n.status == "active" ? "resource.active" : "resource.retiring")]
|
|
176
177
|
})
|
|
177
178
|
]
|
|
178
179
|
}),
|
|
179
|
-
n.status == "active" && /* @__PURE__ */ W(
|
|
180
|
-
"aria-expanded":
|
|
181
|
-
"aria-label":
|
|
182
|
-
className:
|
|
180
|
+
n.status == "active" && /* @__PURE__ */ W(c, {
|
|
181
|
+
"aria-expanded": h != "idle",
|
|
182
|
+
"aria-label": m("sidebar.flowActions", { name: n.name }),
|
|
183
|
+
className: l("resource-row-more", h != "idle" && "active"),
|
|
183
184
|
disabled: t != null,
|
|
184
|
-
onClick: () =>
|
|
185
|
+
onClick: () => g(h == "idle" ? "actions" : "idle"),
|
|
185
186
|
size: "icon-sm",
|
|
186
187
|
variant: "ghost",
|
|
187
|
-
children: /* @__PURE__ */ W(
|
|
188
|
+
children: /* @__PURE__ */ W(_, { name: "more" })
|
|
188
189
|
}),
|
|
189
|
-
|
|
190
|
+
h == "actions" && /* @__PURE__ */ G("div", {
|
|
190
191
|
className: "resource-row-actions",
|
|
191
|
-
children: [/* @__PURE__ */ W(
|
|
192
|
+
children: [/* @__PURE__ */ W(c, {
|
|
192
193
|
onClick: () => {
|
|
193
|
-
y(n.name),
|
|
194
|
+
y(n.name), g("rename");
|
|
194
195
|
},
|
|
195
196
|
size: "sm",
|
|
196
197
|
variant: "outline",
|
|
197
|
-
children:
|
|
198
|
-
}), /* @__PURE__ */ W(
|
|
199
|
-
onClick: () =>
|
|
198
|
+
children: m("common.rename")
|
|
199
|
+
}), /* @__PURE__ */ W(c, {
|
|
200
|
+
onClick: () => g("delete"),
|
|
200
201
|
size: "sm",
|
|
201
202
|
variant: "destructive",
|
|
202
|
-
children:
|
|
203
|
+
children: m("common.delete")
|
|
203
204
|
})]
|
|
204
205
|
}),
|
|
205
|
-
|
|
206
|
+
h == "rename" && /* @__PURE__ */ G("form", {
|
|
206
207
|
className: "resource-row-form",
|
|
207
208
|
onSubmit: (e) => void x(e),
|
|
208
209
|
children: [
|
|
209
|
-
/* @__PURE__ */ W(
|
|
210
|
+
/* @__PURE__ */ W(f, {
|
|
210
211
|
htmlFor: `rename-flow-${n.flowId}`,
|
|
211
|
-
children:
|
|
212
|
+
children: m("sidebar.renameFlow", { name: n.name })
|
|
212
213
|
}),
|
|
213
214
|
/* @__PURE__ */ G("span", {
|
|
214
215
|
className: "resource-row-field",
|
|
215
|
-
children: [/* @__PURE__ */ W(
|
|
216
|
+
children: [/* @__PURE__ */ W(s, {
|
|
216
217
|
autoComplete: "off",
|
|
217
|
-
"aria-invalid":
|
|
218
|
+
"aria-invalid": v.length > 0 && b != null,
|
|
218
219
|
autoFocus: !0,
|
|
219
220
|
id: `rename-flow-${n.flowId}`,
|
|
220
221
|
name: "flow-name",
|
|
221
222
|
onChange: (e) => y(e.target.value),
|
|
222
223
|
required: !0,
|
|
223
|
-
value:
|
|
224
|
-
}),
|
|
224
|
+
value: v
|
|
225
|
+
}), v.length > 0 && b != null && /* @__PURE__ */ W("small", {
|
|
225
226
|
className: "resource-name-message error",
|
|
226
|
-
children:
|
|
227
|
+
children: m(`resource.nameIssue.${b}`, { max: 80 })
|
|
227
228
|
})]
|
|
228
229
|
}),
|
|
229
|
-
/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(
|
|
230
|
-
onClick: () =>
|
|
230
|
+
/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(c, {
|
|
231
|
+
onClick: () => g("idle"),
|
|
231
232
|
size: "sm",
|
|
232
233
|
variant: "outline",
|
|
233
|
-
children:
|
|
234
|
-
}), /* @__PURE__ */ W(
|
|
234
|
+
children: m("common.cancel")
|
|
235
|
+
}), /* @__PURE__ */ W(c, {
|
|
235
236
|
disabled: t != null || b != null,
|
|
236
237
|
size: "sm",
|
|
237
238
|
type: "submit",
|
|
238
|
-
children:
|
|
239
|
+
children: m("common.save")
|
|
239
240
|
})] })
|
|
240
241
|
]
|
|
241
242
|
}),
|
|
242
|
-
|
|
243
|
+
h == "delete" && /* @__PURE__ */ G("div", {
|
|
243
244
|
className: "resource-row-confirm",
|
|
244
245
|
role: "group",
|
|
245
|
-
"aria-label":
|
|
246
|
-
children: [/* @__PURE__ */ W("span", { children: /* @__PURE__ */ W("strong", { children:
|
|
247
|
-
onClick: () =>
|
|
246
|
+
"aria-label": m("sidebar.deleteFlow", { name: n.name }),
|
|
247
|
+
children: [/* @__PURE__ */ W("span", { children: /* @__PURE__ */ W("strong", { children: m("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(c, {
|
|
248
|
+
onClick: () => g("idle"),
|
|
248
249
|
size: "sm",
|
|
249
250
|
variant: "outline",
|
|
250
|
-
children:
|
|
251
|
-
}), /* @__PURE__ */ W(
|
|
251
|
+
children: m("common.cancel")
|
|
252
|
+
}), /* @__PURE__ */ W(c, {
|
|
252
253
|
disabled: t != null,
|
|
253
254
|
onClick: () => void S(),
|
|
254
255
|
size: "sm",
|
|
255
256
|
variant: "destructive",
|
|
256
|
-
children:
|
|
257
|
+
children: m(t == "flow" ? "common.deleting" : "common.delete")
|
|
257
258
|
})] })]
|
|
258
259
|
})
|
|
259
260
|
]
|
|
260
261
|
});
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
+
function $e() {
|
|
263
264
|
return /* @__PURE__ */ G("div", {
|
|
264
265
|
"aria-hidden": "true",
|
|
265
266
|
className: "resource-list-row resource-skeleton-row flow-columns",
|
|
266
267
|
children: [
|
|
267
268
|
/* @__PURE__ */ G("span", {
|
|
268
269
|
className: "resource-primary-cell",
|
|
269
|
-
children: [/* @__PURE__ */ W(
|
|
270
|
+
children: [/* @__PURE__ */ W(V, { className: "size-8 shrink-0" }), /* @__PURE__ */ G("span", {
|
|
270
271
|
className: "resource-skeleton-copy",
|
|
271
|
-
children: [/* @__PURE__ */ W(
|
|
272
|
+
children: [/* @__PURE__ */ W(V, { className: "h-3.5 w-36" }), /* @__PURE__ */ W(V, { className: "h-2.5 w-48 max-w-full" })]
|
|
272
273
|
})]
|
|
273
274
|
}),
|
|
274
|
-
/* @__PURE__ */ W(
|
|
275
|
-
/* @__PURE__ */ W(
|
|
275
|
+
/* @__PURE__ */ W(V, { className: "h-3 w-28" }),
|
|
276
|
+
/* @__PURE__ */ W(V, { className: "h-3 w-16" })
|
|
276
277
|
]
|
|
277
278
|
});
|
|
278
279
|
}
|
|
279
|
-
function
|
|
280
|
-
let
|
|
281
|
-
async function
|
|
280
|
+
function et({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: i, hrefForFlow: o, hostAction: s, hostTitle: u, language: d, onCreateFlow: f, onHostAction: m, onLanguageChange: h, onSelectFlow: g, store: v }) {
|
|
281
|
+
let y = r(), x = a(v.workspace.$.busy), S = a(v.workspace.$.flowLoadFailed), C = a(v.workspace.$.flowLoadMoreFailed), w = a(v.workspace.$.flowLoading), T = a(v.workspace.$.flowLoadingMore), E = a(v.workspace.$.flowNextCursor), D = a(v.workspace.$.flows), O = a(v.workspace.$.flowTotal), [ee, k] = U(!1), [A, j] = U(""), [M, N] = U(""), P = A.trim().toLocaleLowerCase(), F = D.filter((e) => e.name.toLocaleLowerCase().includes(P));
|
|
282
|
+
async function I(e) {
|
|
282
283
|
e.preventDefault();
|
|
283
|
-
let t =
|
|
284
|
-
|
|
284
|
+
let t = M.trim();
|
|
285
|
+
p(t) != null || !await f(t) || (k(!1), N(""));
|
|
285
286
|
}
|
|
286
287
|
return /* @__PURE__ */ W("main", {
|
|
287
288
|
className: "resource-browser",
|
|
288
289
|
children: /* @__PURE__ */ G("div", {
|
|
289
|
-
className: "resource-page",
|
|
290
|
+
className: l("resource-page", e != "default" && "resource-page-full"),
|
|
290
291
|
children: [
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
className: "
|
|
293
|
-
children:
|
|
294
|
-
className: "resource-heading",
|
|
295
|
-
children: /* @__PURE__ */ W("h1", { children: g("resource.flows") })
|
|
296
|
-
}), /* @__PURE__ */ G("div", {
|
|
297
|
-
className: "resource-page-actions",
|
|
298
|
-
children: [
|
|
299
|
-
/* @__PURE__ */ W(Ke, {
|
|
300
|
-
language: c,
|
|
301
|
-
onLanguageChange: d
|
|
302
|
-
}),
|
|
303
|
-
/* @__PURE__ */ G(p, {
|
|
304
|
-
disabled: _ != null,
|
|
305
|
-
onClick: () => D(!0),
|
|
306
|
-
children: [/* @__PURE__ */ W(f, {
|
|
307
|
-
"data-icon": "inline-start",
|
|
308
|
-
name: "plus"
|
|
309
|
-
}), g("resource.newFlow")]
|
|
310
|
-
}),
|
|
311
|
-
o != null && s != null && u != null && /* @__PURE__ */ W(Ee, {
|
|
312
|
-
action: o,
|
|
313
|
-
onAction: u,
|
|
314
|
-
title: s
|
|
315
|
-
})
|
|
316
|
-
]
|
|
317
|
-
})]
|
|
292
|
+
/* @__PURE__ */ W("h1", {
|
|
293
|
+
className: "sr-only",
|
|
294
|
+
children: y("resource.flows")
|
|
318
295
|
}),
|
|
319
296
|
/* @__PURE__ */ G("section", {
|
|
320
297
|
"aria-labelledby": "flow-list-title",
|
|
@@ -326,117 +303,138 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
|
|
|
326
303
|
className: "resource-list-heading",
|
|
327
304
|
children: [/* @__PURE__ */ W("h2", {
|
|
328
305
|
id: "flow-list-title",
|
|
329
|
-
children:
|
|
330
|
-
}), !
|
|
306
|
+
children: y("resource.allFlows")
|
|
307
|
+
}), !w && /* @__PURE__ */ W("span", { children: y("resource.flowCount", { count: O ?? D.length }) })]
|
|
331
308
|
}), /* @__PURE__ */ G("div", {
|
|
332
309
|
className: "resource-list-actions",
|
|
333
|
-
children: [
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
310
|
+
children: [
|
|
311
|
+
/* @__PURE__ */ W(Ze, {
|
|
312
|
+
language: d,
|
|
313
|
+
onLanguageChange: h
|
|
314
|
+
}),
|
|
315
|
+
/* @__PURE__ */ G(Se, {
|
|
316
|
+
className: "w-full sm:w-56",
|
|
317
|
+
children: [/* @__PURE__ */ W(Oe, { children: /* @__PURE__ */ W(_, {
|
|
318
|
+
name: "search",
|
|
319
|
+
size: 17
|
|
320
|
+
}) }), /* @__PURE__ */ W(ve, {
|
|
321
|
+
autoComplete: "off",
|
|
322
|
+
"aria-label": y("resource.searchFlows"),
|
|
323
|
+
name: "flow-search",
|
|
324
|
+
onChange: (e) => j(e.target.value),
|
|
325
|
+
placeholder: y("resource.searchFlows"),
|
|
326
|
+
value: A
|
|
327
|
+
})]
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ W(c, {
|
|
330
|
+
"aria-label": y("common.refresh"),
|
|
331
|
+
disabled: w || x != null,
|
|
332
|
+
onClick: () => void v.workspace.reloadFlows(),
|
|
333
|
+
size: "icon",
|
|
334
|
+
title: y("common.refresh"),
|
|
335
|
+
variant: "outline",
|
|
336
|
+
children: /* @__PURE__ */ W(_, { name: "refresh" })
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ G(c, {
|
|
339
|
+
className: "resource-page-primary-action",
|
|
340
|
+
disabled: x != null,
|
|
341
|
+
onClick: () => k(!0),
|
|
342
|
+
children: [/* @__PURE__ */ W(_, {
|
|
343
|
+
"data-icon": "inline-start",
|
|
344
|
+
name: "plus"
|
|
345
|
+
}), y("resource.newFlow")]
|
|
346
|
+
}),
|
|
347
|
+
s != null && u != null && m != null && /* @__PURE__ */ W(b, {
|
|
348
|
+
action: s,
|
|
349
|
+
onAction: m,
|
|
350
|
+
title: u
|
|
351
|
+
})
|
|
352
|
+
]
|
|
355
353
|
})]
|
|
356
354
|
}),
|
|
357
355
|
/* @__PURE__ */ G("div", {
|
|
358
356
|
"aria-hidden": "true",
|
|
359
357
|
className: "resource-list-columns flow-columns",
|
|
360
358
|
children: [
|
|
361
|
-
/* @__PURE__ */ W("span", { children:
|
|
362
|
-
/* @__PURE__ */ W("span", { children:
|
|
363
|
-
/* @__PURE__ */ W("span", { children:
|
|
359
|
+
/* @__PURE__ */ W("span", { children: y("resource.name") }),
|
|
360
|
+
/* @__PURE__ */ W("span", { children: y("resource.updated") }),
|
|
361
|
+
/* @__PURE__ */ W("span", { children: y("resource.status") })
|
|
364
362
|
]
|
|
365
363
|
}),
|
|
366
364
|
/* @__PURE__ */ W("div", {
|
|
367
365
|
className: "resource-list",
|
|
368
|
-
children:
|
|
366
|
+
children: w ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ W($e, {}, t)) : S ? /* @__PURE__ */ G(se, {
|
|
369
367
|
className: "min-h-64",
|
|
370
368
|
role: "alert",
|
|
371
|
-
children: [/* @__PURE__ */ G(
|
|
372
|
-
/* @__PURE__ */ W(
|
|
369
|
+
children: [/* @__PURE__ */ G(ue, { children: [
|
|
370
|
+
/* @__PURE__ */ W(be, {
|
|
373
371
|
variant: "icon",
|
|
374
|
-
children: /* @__PURE__ */ W(
|
|
372
|
+
children: /* @__PURE__ */ W(_, {
|
|
375
373
|
name: "alert",
|
|
376
374
|
size: 20
|
|
377
375
|
})
|
|
378
376
|
}),
|
|
379
|
-
/* @__PURE__ */ W(
|
|
380
|
-
/* @__PURE__ */ W(
|
|
381
|
-
] }), /* @__PURE__ */ W(
|
|
382
|
-
onClick: () => void
|
|
377
|
+
/* @__PURE__ */ W(Ne, { children: y("resource.flowsLoadFailed") }),
|
|
378
|
+
/* @__PURE__ */ W(Ae, { children: y("resource.flowsLoadFailedDescription") })
|
|
379
|
+
] }), /* @__PURE__ */ W(we, { children: /* @__PURE__ */ W(c, {
|
|
380
|
+
onClick: () => void v.retryFlows(),
|
|
383
381
|
variant: "outline",
|
|
384
|
-
children:
|
|
382
|
+
children: y("empty.retry")
|
|
385
383
|
}) })]
|
|
386
|
-
}) :
|
|
384
|
+
}) : F.length == 0 ? /* @__PURE__ */ G(se, {
|
|
387
385
|
className: "min-h-64",
|
|
388
|
-
children: [/* @__PURE__ */ G(
|
|
389
|
-
/* @__PURE__ */ W(
|
|
386
|
+
children: [/* @__PURE__ */ G(ue, { children: [
|
|
387
|
+
/* @__PURE__ */ W(be, {
|
|
390
388
|
variant: "icon",
|
|
391
|
-
children: /* @__PURE__ */ W(
|
|
389
|
+
children: /* @__PURE__ */ W(_, {
|
|
392
390
|
name: "flow",
|
|
393
391
|
size: 20
|
|
394
392
|
})
|
|
395
393
|
}),
|
|
396
|
-
/* @__PURE__ */ W(
|
|
397
|
-
/* @__PURE__ */ W(
|
|
398
|
-
] }),
|
|
399
|
-
onClick: () =>
|
|
394
|
+
/* @__PURE__ */ W(Ne, { children: y(P.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
|
|
395
|
+
/* @__PURE__ */ W(Ae, { children: y(P.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
|
|
396
|
+
] }), P.length == 0 && /* @__PURE__ */ W(we, { children: /* @__PURE__ */ G(c, {
|
|
397
|
+
onClick: () => k(!0),
|
|
400
398
|
variant: "outline",
|
|
401
|
-
children: [/* @__PURE__ */ W(
|
|
399
|
+
children: [/* @__PURE__ */ W(_, {
|
|
402
400
|
"data-icon": "inline-start",
|
|
403
401
|
name: "plus"
|
|
404
|
-
}),
|
|
402
|
+
}), y("resource.newFlow")]
|
|
405
403
|
}) })]
|
|
406
|
-
}) :
|
|
407
|
-
badge:
|
|
408
|
-
busy:
|
|
404
|
+
}) : F.map((e) => /* @__PURE__ */ W(Qe, {
|
|
405
|
+
badge: i?.[e.flowId],
|
|
406
|
+
busy: x,
|
|
409
407
|
flow: e,
|
|
410
|
-
href:
|
|
411
|
-
onSelect:
|
|
412
|
-
store:
|
|
408
|
+
href: o(e),
|
|
409
|
+
onSelect: g,
|
|
410
|
+
store: v
|
|
413
411
|
}, e.flowId))
|
|
414
412
|
}),
|
|
415
|
-
|
|
413
|
+
E != null && /* @__PURE__ */ W("div", {
|
|
416
414
|
className: "resource-list-footer",
|
|
417
|
-
children: /* @__PURE__ */ W(
|
|
418
|
-
disabled:
|
|
419
|
-
onClick: () => void
|
|
415
|
+
children: /* @__PURE__ */ W(c, {
|
|
416
|
+
disabled: T,
|
|
417
|
+
onClick: () => void v.workspace.loadMoreFlows(),
|
|
420
418
|
variant: "outline",
|
|
421
|
-
children:
|
|
419
|
+
children: y(T ? "resource.loadingMore" : C ? "resource.retryLoadMore" : "resource.loadMore")
|
|
422
420
|
})
|
|
423
421
|
})
|
|
424
422
|
]
|
|
425
423
|
}),
|
|
426
|
-
|
|
424
|
+
ee && /* @__PURE__ */ W(Ue, {
|
|
427
425
|
fallback: null,
|
|
428
|
-
children: /* @__PURE__ */ W(
|
|
429
|
-
disabled:
|
|
430
|
-
field:
|
|
426
|
+
children: /* @__PURE__ */ W(Ye, {
|
|
427
|
+
disabled: t,
|
|
428
|
+
field: n,
|
|
431
429
|
id: "flow-name",
|
|
432
|
-
issue:
|
|
433
|
-
label:
|
|
434
|
-
name:
|
|
435
|
-
onNameChange:
|
|
436
|
-
onOpenChange:
|
|
437
|
-
onSubmit: (e) => void
|
|
438
|
-
pending:
|
|
439
|
-
title:
|
|
430
|
+
issue: p(M),
|
|
431
|
+
label: y("resource.flowName"),
|
|
432
|
+
name: M,
|
|
433
|
+
onNameChange: N,
|
|
434
|
+
onOpenChange: k,
|
|
435
|
+
onSubmit: (e) => void I(e),
|
|
436
|
+
pending: x == "flow",
|
|
437
|
+
title: y("resource.newFlow")
|
|
440
438
|
})
|
|
441
439
|
})
|
|
442
440
|
]
|
|
@@ -445,7 +443,7 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
|
|
|
445
443
|
}
|
|
446
444
|
//#endregion
|
|
447
445
|
//#region ../../node_modules/.bun/nanoid@6.0.1/node_modules/nanoid/index.browser.js
|
|
448
|
-
var
|
|
446
|
+
var tt = (e) => crypto.getRandomValues(new Uint8Array(e)), nt = (e, t, n) => {
|
|
449
447
|
let r = 256 - 256 % e.length;
|
|
450
448
|
if (r === 256) {
|
|
451
449
|
let r = e.length - 1;
|
|
@@ -467,41 +465,41 @@ var Xe = (e) => crypto.getRandomValues(new Uint8Array(e)), Ze = (e, t, n) => {
|
|
|
467
465
|
for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
|
|
468
466
|
}
|
|
469
467
|
};
|
|
470
|
-
},
|
|
468
|
+
}, rt = (e, t = 21) => nt(e, t | 0, tt);
|
|
471
469
|
//#endregion
|
|
472
470
|
//#region src/flow/common/edgeChanges.ts
|
|
473
|
-
function
|
|
471
|
+
function it(e, t, n) {
|
|
474
472
|
let r = {
|
|
475
473
|
source: n.source,
|
|
476
474
|
sourceHandle: n.sourceHandle,
|
|
477
475
|
target: n.target,
|
|
478
476
|
targetHandle: n.targetHandle
|
|
479
|
-
}, i =
|
|
480
|
-
return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] :
|
|
477
|
+
}, i = ot(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
|
|
478
|
+
return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : De(e, [{
|
|
481
479
|
edge: r,
|
|
482
480
|
kind: "graph.edge.connect",
|
|
483
481
|
target: t
|
|
484
482
|
}]);
|
|
485
483
|
}
|
|
486
|
-
function
|
|
484
|
+
function at(e, t, n) {
|
|
487
485
|
let r = {
|
|
488
486
|
source: n.source,
|
|
489
487
|
sourceHandle: n.sourceHandle,
|
|
490
488
|
target: n.target,
|
|
491
489
|
targetHandle: n.targetHandle
|
|
492
|
-
}, i =
|
|
490
|
+
}, i = ot(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
|
|
493
491
|
return a?.kind != "sources" || !a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : [{
|
|
494
492
|
edge: r,
|
|
495
493
|
kind: "graph.edge.disconnect",
|
|
496
494
|
target: t
|
|
497
495
|
}];
|
|
498
496
|
}
|
|
499
|
-
function
|
|
497
|
+
function ot(e, t) {
|
|
500
498
|
return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
|
|
501
499
|
}
|
|
502
500
|
//#endregion
|
|
503
501
|
//#region src/flow/common/moduleChanges.ts
|
|
504
|
-
async function
|
|
502
|
+
async function st(e) {
|
|
505
503
|
try {
|
|
506
504
|
let { parse: t } = await import("./lib-C5Ipyfps.js").then((e) => e.t), n = t(e, {
|
|
507
505
|
errorRecovery: !0,
|
|
@@ -517,7 +515,7 @@ async function nt(e) {
|
|
|
517
515
|
return [];
|
|
518
516
|
}
|
|
519
517
|
}
|
|
520
|
-
function
|
|
518
|
+
function ct(e, t, n) {
|
|
521
519
|
return [{
|
|
522
520
|
imports: n,
|
|
523
521
|
kind: "module.source.replace",
|
|
@@ -525,7 +523,7 @@ function rt(e, t, n) {
|
|
|
525
523
|
source: t
|
|
526
524
|
}];
|
|
527
525
|
}
|
|
528
|
-
var
|
|
526
|
+
var lt = rt("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
|
|
529
527
|
activities: [],
|
|
530
528
|
activitiesLoadFailed: !1,
|
|
531
529
|
activitiesLoading: !1,
|
|
@@ -538,24 +536,24 @@ var it = Qe("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
|
|
|
538
536
|
loadingMore: !1,
|
|
539
537
|
publications: [],
|
|
540
538
|
publishing: !1
|
|
541
|
-
},
|
|
539
|
+
}, ut = 20, dt = 50, ft = 750;
|
|
542
540
|
function q(e, t) {
|
|
543
541
|
return e?.flowId == t.flowId;
|
|
544
542
|
}
|
|
545
|
-
var
|
|
543
|
+
var pt = class {
|
|
546
544
|
#e;
|
|
547
545
|
#t;
|
|
548
546
|
#n;
|
|
549
|
-
#r = new
|
|
550
|
-
#i = new
|
|
547
|
+
#r = new F();
|
|
548
|
+
#i = new F();
|
|
551
549
|
#a;
|
|
552
|
-
#o = new
|
|
553
|
-
#s = new
|
|
550
|
+
#o = new F();
|
|
551
|
+
#s = new F();
|
|
554
552
|
#c;
|
|
555
553
|
#l = t(K);
|
|
556
554
|
#u;
|
|
557
555
|
#d;
|
|
558
|
-
constructor(t, n, r, i, a = () => crypto.randomUUID(), o =
|
|
556
|
+
constructor(t, n, r, i, a = () => crypto.randomUUID(), o = L()) {
|
|
559
557
|
this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
|
|
560
558
|
activities: e(this.#l, (e) => e.activities),
|
|
561
559
|
activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
|
|
@@ -618,7 +616,7 @@ var ct = class {
|
|
|
618
616
|
this.#y({
|
|
619
617
|
loadFailed: !0,
|
|
620
618
|
loading: !1
|
|
621
|
-
}), this.#c(
|
|
619
|
+
}), this.#c(D(e, this.#n.t));
|
|
622
620
|
}
|
|
623
621
|
}
|
|
624
622
|
async loadMore() {
|
|
@@ -632,7 +630,7 @@ var ct = class {
|
|
|
632
630
|
try {
|
|
633
631
|
let e = await this.#e.listPublications(n.flowId, {
|
|
634
632
|
cursor: t,
|
|
635
|
-
limit:
|
|
633
|
+
limit: dt
|
|
636
634
|
});
|
|
637
635
|
if (!r()) return;
|
|
638
636
|
let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
|
|
@@ -647,7 +645,7 @@ var ct = class {
|
|
|
647
645
|
this.#y({
|
|
648
646
|
loadMoreFailed: !0,
|
|
649
647
|
loadingMore: !1
|
|
650
|
-
}), this.#c(
|
|
648
|
+
}), this.#c(D(e, this.#n.t));
|
|
651
649
|
}
|
|
652
650
|
}
|
|
653
651
|
async publish() {
|
|
@@ -670,7 +668,7 @@ var ct = class {
|
|
|
670
668
|
publishing: i.status == "pending"
|
|
671
669
|
}), await this.#g(n, i, o, e.name)) : !1;
|
|
672
670
|
} catch (e) {
|
|
673
|
-
return o() ? (e instanceof
|
|
671
|
+
return o() ? (e instanceof z && e.code == "live.conflict" && await this.#p(n), this.#c(D(e, this.#n.t)), !1) : !1;
|
|
674
672
|
} finally {
|
|
675
673
|
o() && this.#y({ publishing: !1 });
|
|
676
674
|
}
|
|
@@ -694,7 +692,7 @@ var ct = class {
|
|
|
694
692
|
message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
|
|
695
693
|
}), !0);
|
|
696
694
|
} catch (e) {
|
|
697
|
-
return s() ? (e instanceof
|
|
695
|
+
return s() ? (e instanceof z && e.code == "live.conflict" && await this.#p(r), this.#c(D(e, this.#n.t)), !1) : !1;
|
|
698
696
|
} finally {
|
|
699
697
|
s() && this.#y({ rollingBackPublicationId: void 0 });
|
|
700
698
|
}
|
|
@@ -729,13 +727,13 @@ var ct = class {
|
|
|
729
727
|
testingTriggerId: void 0,
|
|
730
728
|
testResult: void 0
|
|
731
729
|
});
|
|
732
|
-
let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit:
|
|
730
|
+
let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: ut })]);
|
|
733
731
|
if (n()) {
|
|
734
732
|
if (r.status == "rejected") {
|
|
735
733
|
this.#y({
|
|
736
734
|
activitiesLoading: !1,
|
|
737
735
|
detailLoading: !1
|
|
738
|
-
}), this.#c(
|
|
736
|
+
}), this.#c(D(r.reason, this.#n.t));
|
|
739
737
|
return;
|
|
740
738
|
}
|
|
741
739
|
this.#y({
|
|
@@ -749,7 +747,7 @@ var ct = class {
|
|
|
749
747
|
}) : (this.#y({
|
|
750
748
|
activitiesLoadFailed: !0,
|
|
751
749
|
activitiesLoading: !1
|
|
752
|
-
}), this.#c(
|
|
750
|
+
}), this.#c(D(i.reason, this.#n.t)));
|
|
753
751
|
}
|
|
754
752
|
}
|
|
755
753
|
async loadMoreTriggerActivities() {
|
|
@@ -763,7 +761,7 @@ var ct = class {
|
|
|
763
761
|
try {
|
|
764
762
|
let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
|
|
765
763
|
cursor: t,
|
|
766
|
-
limit:
|
|
764
|
+
limit: ut
|
|
767
765
|
});
|
|
768
766
|
if (!i() || this.#l.value.selectedTriggerId != n) return;
|
|
769
767
|
let a = new Set(this.#l.value.activities.map((e) => e.activityId));
|
|
@@ -778,7 +776,7 @@ var ct = class {
|
|
|
778
776
|
this.#y({
|
|
779
777
|
activitiesLoadFailed: !0,
|
|
780
778
|
activitiesLoadingMore: !1
|
|
781
|
-
}), this.#c(
|
|
779
|
+
}), this.#c(D(e, this.#n.t));
|
|
782
780
|
}
|
|
783
781
|
}
|
|
784
782
|
async testTrigger() {
|
|
@@ -793,7 +791,7 @@ var ct = class {
|
|
|
793
791
|
let e = await this.#e.testFlowPollTrigger(n.flowId, t);
|
|
794
792
|
return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#y({ testResult: e }), !0);
|
|
795
793
|
} catch (e) {
|
|
796
|
-
return i() && this.#l.value.selectedTriggerId == t && this.#c(
|
|
794
|
+
return i() && this.#l.value.selectedTriggerId == t && this.#c(D(e, this.#n.t)), !1;
|
|
797
795
|
} finally {
|
|
798
796
|
i() && this.#l.value.selectedTriggerId == t && this.#y({ testingTriggerId: void 0 });
|
|
799
797
|
}
|
|
@@ -811,7 +809,7 @@ var ct = class {
|
|
|
811
809
|
message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
|
|
812
810
|
}), !0) : !1;
|
|
813
811
|
} catch (e) {
|
|
814
|
-
return n() && this.#c(
|
|
812
|
+
return n() && this.#c(D(e, this.#n.t)), !1;
|
|
815
813
|
} finally {
|
|
816
814
|
n() && this.#y({ changingTriggerId: void 0 });
|
|
817
815
|
}
|
|
@@ -839,7 +837,7 @@ var ct = class {
|
|
|
839
837
|
this.#e.getLive(e.flowId),
|
|
840
838
|
this.#e.listPublications(e.flowId, {
|
|
841
839
|
includeTotal: !0,
|
|
842
|
-
limit:
|
|
840
|
+
limit: dt
|
|
843
841
|
}),
|
|
844
842
|
this.#e.listFlowTriggerBindings(e.flowId)
|
|
845
843
|
]);
|
|
@@ -849,7 +847,7 @@ var ct = class {
|
|
|
849
847
|
if (t != null && t != "") try {
|
|
850
848
|
return await this.#e.getPublishOperation(e.flowId, t);
|
|
851
849
|
} catch (t) {
|
|
852
|
-
if (t instanceof
|
|
850
|
+
if (t instanceof z && t.code == "publication.operation-not-found") {
|
|
853
851
|
this.#a.setItem(this.#_(e.flowId), "");
|
|
854
852
|
return;
|
|
855
853
|
}
|
|
@@ -859,16 +857,16 @@ var ct = class {
|
|
|
859
857
|
async #g(e, t, n, r) {
|
|
860
858
|
let i = t;
|
|
861
859
|
for (; i.status == "pending";) {
|
|
862
|
-
if (await new Promise((e) => setTimeout(e,
|
|
860
|
+
if (await new Promise((e) => setTimeout(e, ft)), !n()) return !1;
|
|
863
861
|
try {
|
|
864
862
|
i = await this.#e.getPublishOperation(e.flowId, i.operationId);
|
|
865
863
|
} catch (t) {
|
|
866
864
|
if (!n()) return !1;
|
|
867
|
-
if (t instanceof
|
|
865
|
+
if (t instanceof z && t.code == "publication.operation-not-found") return this.#a.setItem(this.#_(e.flowId), ""), this.#v(e, {
|
|
868
866
|
operation: void 0,
|
|
869
867
|
publishing: !1
|
|
870
|
-
}), this.#c(
|
|
871
|
-
this.#c(
|
|
868
|
+
}), this.#c(D(t, this.#n.t)), !1;
|
|
869
|
+
this.#c(D(t, this.#n.t));
|
|
872
870
|
continue;
|
|
873
871
|
}
|
|
874
872
|
if (!n()) return !1;
|
|
@@ -884,7 +882,7 @@ var ct = class {
|
|
|
884
882
|
try {
|
|
885
883
|
await this.#f(e);
|
|
886
884
|
} catch (e) {
|
|
887
|
-
return n() && this.#c(
|
|
885
|
+
return n() && this.#c(D(e, this.#n.t)), !0;
|
|
888
886
|
}
|
|
889
887
|
return n() ? (this.#c({
|
|
890
888
|
kind: "success",
|
|
@@ -907,24 +905,29 @@ var ct = class {
|
|
|
907
905
|
...e
|
|
908
906
|
});
|
|
909
907
|
}
|
|
910
|
-
},
|
|
911
|
-
function
|
|
908
|
+
}, mt = { starting: !1 };
|
|
909
|
+
function ht(e) {
|
|
912
910
|
switch (e.kind) {
|
|
913
911
|
case "condition": return { [e.node.input.handle]: e.node.input };
|
|
914
|
-
case "subflow": return
|
|
915
|
-
case "task": return
|
|
912
|
+
case "subflow": return h(e.definition?.inputs ?? []);
|
|
913
|
+
case "task": return h(e.definition?.inputs ?? []);
|
|
916
914
|
case "value": return {};
|
|
915
|
+
case "wait": return { value: {
|
|
916
|
+
jsonSchema: {},
|
|
917
|
+
nullable: !0,
|
|
918
|
+
value: null
|
|
919
|
+
} };
|
|
917
920
|
}
|
|
918
921
|
}
|
|
919
|
-
function
|
|
922
|
+
function gt(e) {
|
|
920
923
|
return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
|
|
921
924
|
}
|
|
922
|
-
async function
|
|
923
|
-
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-
|
|
925
|
+
async function _t(e, t) {
|
|
926
|
+
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-BYa8zFLC.js").then((e) => e.r), r = I(e), i = r.graph({ kind: "flow" });
|
|
924
927
|
return i == null ? [] : Object.entries(i.nodes).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, i]) => {
|
|
925
928
|
let a = r.resolveNode(e, i);
|
|
926
929
|
if (a.kind == "trigger") return [];
|
|
927
|
-
let o = Object.entries(
|
|
930
|
+
let o = Object.entries(ht(a)).filter(([e, t]) => a.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
|
|
928
931
|
handle: e,
|
|
929
932
|
jsonSchema: t.jsonSchema,
|
|
930
933
|
nullable: t.nullable
|
|
@@ -932,21 +935,21 @@ async function ft(e, t) {
|
|
|
932
935
|
return o.length == 0 ? [] : [{
|
|
933
936
|
editor: new n(o, t),
|
|
934
937
|
nodeId: e,
|
|
935
|
-
title:
|
|
938
|
+
title: gt(a)
|
|
936
939
|
}];
|
|
937
940
|
});
|
|
938
941
|
}
|
|
939
|
-
var
|
|
942
|
+
var vt = class {
|
|
940
943
|
#e;
|
|
941
944
|
#t;
|
|
942
945
|
#n;
|
|
943
|
-
#r = new
|
|
944
|
-
#i = new
|
|
946
|
+
#r = new F();
|
|
947
|
+
#i = new F();
|
|
945
948
|
#a;
|
|
946
949
|
#o;
|
|
947
|
-
#s = t(
|
|
950
|
+
#s = t(mt);
|
|
948
951
|
#c;
|
|
949
|
-
constructor(t, n, r, i =
|
|
952
|
+
constructor(t, n, r, i = L(), a = () => crypto.randomUUID()) {
|
|
950
953
|
this.#e = t, this.#a = n, this.#o = r, this.#n = i, this.#t = a, this.$ = {
|
|
951
954
|
inputRequest: e(this.#s, (e) => e.inputRequest),
|
|
952
955
|
starting: e(this.#s, (e) => e.starting),
|
|
@@ -961,7 +964,7 @@ var pt = class {
|
|
|
961
964
|
reset() {
|
|
962
965
|
this.#r.invalidate(), this.#i.invalidate(), this.#c = void 0;
|
|
963
966
|
let e = this.#s.value.inputRequest;
|
|
964
|
-
this.#s.set(
|
|
967
|
+
this.#s.set(mt), this.#d(e);
|
|
965
968
|
}
|
|
966
969
|
async requestDraft(e, t) {
|
|
967
970
|
let n = this.#i.begin();
|
|
@@ -976,7 +979,7 @@ var pt = class {
|
|
|
976
979
|
let r = await this.#e.getRevision(e.flowId, n.revisionId);
|
|
977
980
|
return t() ? await this.#l("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
|
|
978
981
|
} catch (e) {
|
|
979
|
-
return t() && this.#o(
|
|
982
|
+
return t() && this.#o(D(e, this.#n.t)), "unavailable";
|
|
980
983
|
} finally {
|
|
981
984
|
t() && this.#f({ starting: !1 });
|
|
982
985
|
}
|
|
@@ -1004,7 +1007,7 @@ var pt = class {
|
|
|
1004
1007
|
}), this.#d(s);
|
|
1005
1008
|
let c;
|
|
1006
1009
|
try {
|
|
1007
|
-
c = await
|
|
1010
|
+
c = await _t(r, this.#n.lang$);
|
|
1008
1011
|
} catch (e) {
|
|
1009
1012
|
throw a() && this.#f({
|
|
1010
1013
|
starting: !1,
|
|
@@ -1060,7 +1063,7 @@ var pt = class {
|
|
|
1060
1063
|
});
|
|
1061
1064
|
return !a() || !o() ? !1 : (this.#c = void 0, this.#a.follow(s, o));
|
|
1062
1065
|
} catch (e) {
|
|
1063
|
-
return a() && o() && this.#o(
|
|
1066
|
+
return a() && o() && this.#o(D(e, this.#n.t)), !1;
|
|
1064
1067
|
} finally {
|
|
1065
1068
|
a() && this.#f({
|
|
1066
1069
|
starting: !1,
|
|
@@ -1080,11 +1083,11 @@ var pt = class {
|
|
|
1080
1083
|
...e
|
|
1081
1084
|
});
|
|
1082
1085
|
}
|
|
1083
|
-
},
|
|
1086
|
+
}, yt = {
|
|
1084
1087
|
actions: {},
|
|
1085
1088
|
catalogs: {}
|
|
1086
1089
|
};
|
|
1087
|
-
function
|
|
1090
|
+
function bt(e) {
|
|
1088
1091
|
return Object.entries(e).map(([e, t]) => ({
|
|
1089
1092
|
description: t.description,
|
|
1090
1093
|
handle: e,
|
|
@@ -1099,15 +1102,15 @@ function J(e, t) {
|
|
|
1099
1102
|
service: e.serviceName
|
|
1100
1103
|
}) : e.description,
|
|
1101
1104
|
group: t("addNode.connectorActions"),
|
|
1102
|
-
icon: e
|
|
1105
|
+
icon: T(e),
|
|
1103
1106
|
id: `connector:${e.actionId}`,
|
|
1104
|
-
inputs:
|
|
1107
|
+
inputs: bt(e.inputs),
|
|
1105
1108
|
kind: "connector",
|
|
1106
1109
|
label: e.name,
|
|
1107
|
-
outputs:
|
|
1110
|
+
outputs: bt(e.outputs)
|
|
1108
1111
|
};
|
|
1109
1112
|
}
|
|
1110
|
-
function
|
|
1113
|
+
function xt(e, t) {
|
|
1111
1114
|
let n = /* @__PURE__ */ new Map();
|
|
1112
1115
|
for (let t of e) {
|
|
1113
1116
|
let e = n.get(t.serviceId) ?? [];
|
|
@@ -1126,7 +1129,7 @@ function gt(e, t) {
|
|
|
1126
1129
|
choices: r,
|
|
1127
1130
|
description: t(r.length == 1 ? "addNode.connectorActionCountOne" : "addNode.connectorActionCount", { count: r.length }),
|
|
1128
1131
|
group: t("addNode.connectorActions"),
|
|
1129
|
-
icon: n
|
|
1132
|
+
icon: T(n),
|
|
1130
1133
|
id: `connector-provider:${n.serviceId}`,
|
|
1131
1134
|
inputs: [],
|
|
1132
1135
|
kind: "connector-group",
|
|
@@ -1136,12 +1139,12 @@ function gt(e, t) {
|
|
|
1136
1139
|
};
|
|
1137
1140
|
});
|
|
1138
1141
|
}
|
|
1139
|
-
function
|
|
1142
|
+
function St(e, t) {
|
|
1140
1143
|
return {
|
|
1141
1144
|
choices: [],
|
|
1142
1145
|
description: t("addNode.connectorBrowseActions"),
|
|
1143
1146
|
group: t("addNode.connectorActions"),
|
|
1144
|
-
icon: e
|
|
1147
|
+
icon: T(e),
|
|
1145
1148
|
id: `connector-provider:${e.serviceId}`,
|
|
1146
1149
|
inputs: [],
|
|
1147
1150
|
kind: "connector-group",
|
|
@@ -1150,17 +1153,39 @@ function _t(e, t) {
|
|
|
1150
1153
|
serviceId: e.serviceId
|
|
1151
1154
|
};
|
|
1152
1155
|
}
|
|
1153
|
-
function
|
|
1154
|
-
if (e
|
|
1155
|
-
let
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1158
|
-
|
|
1156
|
+
function Ct(e, t) {
|
|
1157
|
+
if (e == null) return;
|
|
1158
|
+
let n = e.kind == "wait" ? e.node.notification?.taskId : e.kind == "task" && e.node.task == null ? e.node.taskId : void 0;
|
|
1159
|
+
if (n == null) return;
|
|
1160
|
+
let r = e.kind == "task" ? e.definition : t?.task(n);
|
|
1161
|
+
if (!(r == null || !("executor" in r) || r.executor.kind != "connector")) return {
|
|
1162
|
+
actionId: r.executor.action,
|
|
1163
|
+
connectionId: r.executor.connectionId,
|
|
1159
1164
|
nodeId: e.id,
|
|
1160
|
-
taskId:
|
|
1165
|
+
taskId: n
|
|
1161
1166
|
};
|
|
1162
1167
|
}
|
|
1163
|
-
|
|
1168
|
+
function wt(e, t, n) {
|
|
1169
|
+
if (e == null) return [];
|
|
1170
|
+
let r = [];
|
|
1171
|
+
for (let i of [...O(e.revision.content).tasks].toSorted()) {
|
|
1172
|
+
let a = e.task(i);
|
|
1173
|
+
if (a?.executor.kind != "connector") continue;
|
|
1174
|
+
let o = t[a.executor.action];
|
|
1175
|
+
if (o?.authenticated != 1) continue;
|
|
1176
|
+
let s = a.executor.connectionId == null ? void 0 : n[o.serviceId]?.byId.get(a.executor.connectionId);
|
|
1177
|
+
s == null && o.defaultConnection?.connectionId == a.executor.connectionId && (s = o.defaultConnection), (a.executor.connectionId == null || n[o.serviceId] != null && s?.status != "active") && r.push({
|
|
1178
|
+
code: "task.connector-connection-required",
|
|
1179
|
+
column: 0,
|
|
1180
|
+
line: 1,
|
|
1181
|
+
message: `Connector Task "${i}" requires an active Connection.`,
|
|
1182
|
+
path: `/document/tasks/${i}/executor/connectionId`,
|
|
1183
|
+
values: { taskId: i }
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
return r;
|
|
1187
|
+
}
|
|
1188
|
+
var Tt = class {
|
|
1164
1189
|
#e;
|
|
1165
1190
|
#t;
|
|
1166
1191
|
#n;
|
|
@@ -1176,43 +1201,44 @@ var yt = class {
|
|
|
1176
1201
|
#f;
|
|
1177
1202
|
#p;
|
|
1178
1203
|
#m;
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1204
|
+
#h;
|
|
1205
|
+
constructor(r, i, a, o, s = L()) {
|
|
1206
|
+
this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new F(), this.#o = new F(), this.#d = t(yt), this.#h = !1, this.browseAddNodeOptions = async (e) => {
|
|
1207
|
+
if (this.#h) return;
|
|
1208
|
+
let t = this.#f.$.flowId.value;
|
|
1183
1209
|
if (t == null) return;
|
|
1184
|
-
let n = this.#
|
|
1185
|
-
if (!(e.aborted || this.#
|
|
1210
|
+
let n = this.#m ?? await this.#e.listConnectorProviders(e, t);
|
|
1211
|
+
if (!(e.aborted || this.#h || t != this.#f.$.flowId.value)) return this.#m = n, n.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => St(e, this.#t.t));
|
|
1186
1212
|
}, this.provideAddNodeOptionChoices = async (e, t) => {
|
|
1187
|
-
if (this.#
|
|
1188
|
-
let n = this.#
|
|
1213
|
+
if (this.#h) return;
|
|
1214
|
+
let n = this.#f.$.flowId.value, r = this.#m?.find((t) => `connector-provider:${t.serviceId}` == e);
|
|
1189
1215
|
if (n == null || r == null) return;
|
|
1190
1216
|
let i = this.#r.get(r.serviceId) ?? await this.#e.listConnectorActions(r.serviceId, t, n);
|
|
1191
|
-
if (t.aborted || this.#
|
|
1217
|
+
if (t.aborted || this.#h || n != this.#f.$.flowId.value) return;
|
|
1192
1218
|
let a = i.map((e) => Object.assign({}, e, e.icon == null && r.icon != null ? { icon: r.icon } : {}, { serviceName: r.serviceName }));
|
|
1193
|
-
return this.#r.set(r.serviceId, a), this.#
|
|
1194
|
-
...this.#
|
|
1219
|
+
return this.#r.set(r.serviceId, a), this.#b({ actions: {
|
|
1220
|
+
...this.#d.value.actions,
|
|
1195
1221
|
...Object.fromEntries(a.map((e) => [e.actionId, e]))
|
|
1196
1222
|
} }), a.map((e) => J(e, this.#t.t));
|
|
1197
1223
|
}, this.provideAddNodeOptions = async (e, t) => {
|
|
1198
|
-
if (this.#
|
|
1199
|
-
let n = this.#
|
|
1224
|
+
if (this.#h) return;
|
|
1225
|
+
let n = this.#f.$.flowId.value;
|
|
1200
1226
|
if (n == null) return;
|
|
1201
|
-
let r = e.trim(), i = r.length == 0 ? Object.values(this.#
|
|
1202
|
-
if (t.aborted || this.#
|
|
1203
|
-
let a = { ...this.#
|
|
1227
|
+
let r = e.trim(), i = r.length == 0 ? Object.values(this.#d.value.actions) : await this.#e.searchConnectorActions(r, t, n);
|
|
1228
|
+
if (t.aborted || this.#h || n != this.#f.$.flowId.value) return;
|
|
1229
|
+
let a = { ...this.#d.value.actions };
|
|
1204
1230
|
for (let e of i) a[e.actionId] = e;
|
|
1205
|
-
if (this.#
|
|
1231
|
+
if (this.#b({ actions: a }), r.length != 0) return i.map((e) => J(e, this.#t.t));
|
|
1206
1232
|
let o = new Map(i.map((e) => [e.actionId, e]));
|
|
1207
|
-
for (let e of this.#
|
|
1233
|
+
for (let e of this.#f.$.revision.value?.connectorActionIds ?? []) {
|
|
1208
1234
|
let t = a[e];
|
|
1209
1235
|
t != null && o.set(e, t);
|
|
1210
1236
|
}
|
|
1211
|
-
return
|
|
1212
|
-
}, this.#e = r, this.#n = o, this.#
|
|
1213
|
-
let c = e(this.#
|
|
1214
|
-
this.#
|
|
1215
|
-
let t =
|
|
1237
|
+
return xt([...o.values()], this.#t.t);
|
|
1238
|
+
}, this.#e = r, this.#n = o, this.#f = i, this.#u = a, this.#t = s;
|
|
1239
|
+
let c = e(this.#d, (e) => e.actions), l = e(this.#d, (e) => e.catalogs);
|
|
1240
|
+
this.#l = n((e) => {
|
|
1241
|
+
let t = Ct(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
|
|
1216
1242
|
if (t == null) return { authorizationPending: !1 };
|
|
1217
1243
|
let r = n.actions[t.actionId], a = r == null ? void 0 : n.catalogs[r.serviceId], o = t.connectionId == null ? void 0 : a?.byId.get(t.connectionId);
|
|
1218
1244
|
return o == null && r?.defaultConnection?.connectionId == t.connectionId && (o = r.defaultConnection), {
|
|
@@ -1224,156 +1250,166 @@ var yt = class {
|
|
|
1224
1250
|
connectionError: r != null && n.connectionError?.serviceId == r.serviceId ? n.connectionError.message : void 0
|
|
1225
1251
|
};
|
|
1226
1252
|
}), this.$ = {
|
|
1227
|
-
actionLoading: e(this.#
|
|
1253
|
+
actionLoading: e(this.#d, (e) => e.actionLoading),
|
|
1228
1254
|
actions: c,
|
|
1229
1255
|
catalogs: l,
|
|
1230
|
-
connectionLoading: e(this.#
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1256
|
+
connectionLoading: e(this.#d, (e) => e.connectionLoading),
|
|
1257
|
+
diagnostics: n((e) => wt(e(i.$.revision), e(c), e(l))),
|
|
1258
|
+
selectedAction: e(this.#l, (e) => e.action),
|
|
1259
|
+
selectedActionError: e(this.#l, (e) => e.actionError),
|
|
1260
|
+
selectedActiveConnections: e(this.#l, (e) => e.activeConnections),
|
|
1261
|
+
selectedAuthorizationPending: e(this.#l, (e) => e.authorizationPending),
|
|
1262
|
+
selectedConnection: e(this.#l, (e) => e.connection),
|
|
1263
|
+
selectedConnectionError: e(this.#l, (e) => e.connectionError)
|
|
1264
|
+
}, this.#s = i.$.flowId.reaction(() => this.reset()), this.#c = i.$.revision.reaction(() => void this.#S());
|
|
1238
1265
|
}
|
|
1239
1266
|
dispose() {
|
|
1240
|
-
this.#
|
|
1267
|
+
this.#h = !0, this.#a.invalidate(), this.#o.invalidate(), this.#s(), this.#c();
|
|
1241
1268
|
for (let e of Object.values(this.$)) e.dispose();
|
|
1242
|
-
this.#
|
|
1269
|
+
this.#l.dispose(), this.#d.dispose();
|
|
1243
1270
|
}
|
|
1244
1271
|
reset() {
|
|
1245
|
-
this.#
|
|
1272
|
+
this.#h || (this.#a.invalidate(), this.#o.invalidate(), this.#p = void 0, this.#r.clear(), this.#m = void 0, this.#i.clear(), this.#d.set(yt));
|
|
1246
1273
|
}
|
|
1247
1274
|
async refresh(e = !1) {
|
|
1248
|
-
if (this.#
|
|
1249
|
-
let t = this.#
|
|
1275
|
+
if (this.#h) return;
|
|
1276
|
+
let t = this.#o.begin(), n = this.#f.$.flowId.value, r = Ct(this.#f.$.selection.value, this.#f.$.revision.value);
|
|
1250
1277
|
if (n == null || r == null) {
|
|
1251
|
-
(this.#
|
|
1278
|
+
(this.#d.value.actionLoading != null || this.#d.value.connectionLoading != null) && this.#b({
|
|
1252
1279
|
actionLoading: void 0,
|
|
1253
1280
|
connectionLoading: void 0
|
|
1254
1281
|
});
|
|
1255
1282
|
return;
|
|
1256
1283
|
}
|
|
1257
|
-
this.#
|
|
1284
|
+
this.#b({
|
|
1258
1285
|
actionError: void 0,
|
|
1259
1286
|
actionLoading: r.actionId,
|
|
1260
1287
|
connectionError: void 0,
|
|
1261
1288
|
connectionLoading: void 0
|
|
1262
1289
|
});
|
|
1263
1290
|
try {
|
|
1264
|
-
let i = await this.#
|
|
1265
|
-
if (!this.#
|
|
1266
|
-
this.#
|
|
1267
|
-
...this.#
|
|
1291
|
+
let i = await this.#g(r.actionId, e);
|
|
1292
|
+
if (!this.#x(t, n)) return;
|
|
1293
|
+
this.#b({ actions: {
|
|
1294
|
+
...this.#d.value.actions,
|
|
1268
1295
|
[i.actionId]: i
|
|
1269
|
-
} }), i.authenticated && await this.#
|
|
1296
|
+
} }), i.authenticated && await this.#_(n, r, i.serviceId, e, t);
|
|
1270
1297
|
} catch (e) {
|
|
1271
|
-
this.#
|
|
1298
|
+
this.#x(t, n) && this.#b({ actionError: {
|
|
1272
1299
|
actionId: r.actionId,
|
|
1273
|
-
message:
|
|
1300
|
+
message: D(e, this.#t.t).message
|
|
1274
1301
|
} });
|
|
1275
1302
|
} finally {
|
|
1276
|
-
this.#
|
|
1303
|
+
this.#x(t, n) && this.#d.value.actionLoading == r.actionId && this.#b({ actionLoading: void 0 });
|
|
1277
1304
|
}
|
|
1278
1305
|
}
|
|
1279
1306
|
async connect(e) {
|
|
1280
|
-
if (this.#
|
|
1281
|
-
let t = this.#
|
|
1307
|
+
if (this.#h) return;
|
|
1308
|
+
let t = this.#f.$.flowId.value;
|
|
1282
1309
|
if (t == null) return;
|
|
1283
|
-
let n = this.#
|
|
1310
|
+
let n = this.#d.value.catalogs[e];
|
|
1284
1311
|
try {
|
|
1285
1312
|
if (!await this.#n.openExternalPage(() => this.#e.createConnectorConnectionPage(e, t))) {
|
|
1286
|
-
this.#
|
|
1313
|
+
this.#u({
|
|
1287
1314
|
kind: "error",
|
|
1288
1315
|
message: this.#t.t("notice.connectionPopupBlocked")
|
|
1289
1316
|
});
|
|
1290
1317
|
return;
|
|
1291
1318
|
}
|
|
1292
|
-
if (this.#
|
|
1293
|
-
this.#
|
|
1319
|
+
if (this.#h || t != this.#f.$.flowId.value) return;
|
|
1320
|
+
this.#p = {
|
|
1294
1321
|
connectionIds: new Set(n?.all.map((e) => e.connectionId)),
|
|
1295
1322
|
serviceId: e
|
|
1296
|
-
}, this.#
|
|
1323
|
+
}, this.#b({ authorizationServiceId: e });
|
|
1297
1324
|
} catch (e) {
|
|
1298
|
-
this.#
|
|
1325
|
+
this.#h || this.#u(D(e, this.#t.t));
|
|
1299
1326
|
}
|
|
1300
1327
|
}
|
|
1301
1328
|
async setConnection(e, t) {
|
|
1302
|
-
return await this.#
|
|
1329
|
+
return await this.#f.setConnectorConnection(e, t);
|
|
1303
1330
|
}
|
|
1304
1331
|
async refreshAfterAuthorization() {
|
|
1305
|
-
if (this.#
|
|
1306
|
-
let e = this.#
|
|
1307
|
-
this.#r.delete(e), this.#
|
|
1332
|
+
if (this.#h || this.#p == null) return;
|
|
1333
|
+
let e = this.#p.serviceId;
|
|
1334
|
+
this.#r.delete(e), this.#b({ authorizationServiceId: void 0 }), this.$.selectedAction.value?.serviceId == e && await this.refresh(!0), !this.#h && this.#p?.serviceId == e && (this.#p = void 0);
|
|
1308
1335
|
}
|
|
1309
|
-
async #
|
|
1310
|
-
let n = this.#
|
|
1311
|
-
return !t && n != null ? n : await this.#e.getConnectorAction(e, void 0, this.#
|
|
1336
|
+
async #g(e, t) {
|
|
1337
|
+
let n = this.#d.value.actions[e];
|
|
1338
|
+
return !t && n != null ? n : await this.#e.getConnectorAction(e, void 0, this.#f.$.flowId.value);
|
|
1312
1339
|
}
|
|
1313
|
-
async #
|
|
1314
|
-
this.#
|
|
1340
|
+
async #_(e, t, n, r, i) {
|
|
1341
|
+
this.#b({ connectionLoading: n });
|
|
1315
1342
|
try {
|
|
1316
|
-
let a = await this.#
|
|
1317
|
-
if (a == null || !this.#
|
|
1318
|
-
await this.#
|
|
1343
|
+
let a = await this.#v(e, n, r, i);
|
|
1344
|
+
if (a == null || !this.#x(i, e)) return;
|
|
1345
|
+
await this.#y(t, n, a);
|
|
1319
1346
|
} finally {
|
|
1320
|
-
this.#
|
|
1347
|
+
this.#x(i, e) && this.#d.value.connectionLoading == n && this.#b({ connectionLoading: void 0 });
|
|
1321
1348
|
}
|
|
1322
1349
|
}
|
|
1323
|
-
async #
|
|
1324
|
-
let i = this.#
|
|
1350
|
+
async #v(e, t, n, r) {
|
|
1351
|
+
let i = this.#d.value.catalogs[t];
|
|
1325
1352
|
if (!n && i != null) return i;
|
|
1326
1353
|
let a;
|
|
1327
1354
|
try {
|
|
1328
1355
|
a = await this.#e.listConnectorConnections(t, void 0, e);
|
|
1329
1356
|
} catch (n) {
|
|
1330
|
-
this.#
|
|
1331
|
-
message:
|
|
1357
|
+
this.#x(r, e) && this.#b({ connectionError: {
|
|
1358
|
+
message: D(n, this.#t.t).message,
|
|
1332
1359
|
serviceId: t
|
|
1333
1360
|
} });
|
|
1334
1361
|
return;
|
|
1335
1362
|
}
|
|
1336
|
-
if (!this.#
|
|
1337
|
-
let o =
|
|
1338
|
-
return this.#
|
|
1339
|
-
...this.#
|
|
1363
|
+
if (!this.#x(r, e)) return;
|
|
1364
|
+
let o = C(a);
|
|
1365
|
+
return this.#b({ catalogs: {
|
|
1366
|
+
...this.#d.value.catalogs,
|
|
1340
1367
|
[t]: o
|
|
1341
1368
|
} }), o;
|
|
1342
1369
|
}
|
|
1343
|
-
async #
|
|
1344
|
-
let r = this.#
|
|
1345
|
-
a != null && this.#
|
|
1370
|
+
async #y(e, t, n) {
|
|
1371
|
+
let r = this.#p?.serviceId == t ? this.#p : void 0, i = r == null ? [] : n.active.filter((e) => !r.connectionIds.has(e.connectionId)), a = i.length == 1 ? i[0] : n.preferred, o = this.#f.$.revision.value?.task(e.taskId);
|
|
1372
|
+
a != null && this.#f.$.selectedNodeIds.value.includes(e.nodeId) && o != null && "executor" in o && o.executor.kind == "connector" && o.executor.connectionId == null && await this.#f.setConnectorConnection(e.taskId, a.connectionId);
|
|
1346
1373
|
}
|
|
1347
|
-
#
|
|
1348
|
-
this.#
|
|
1349
|
-
...this.#
|
|
1374
|
+
#b(e) {
|
|
1375
|
+
this.#h || this.#d.set({
|
|
1376
|
+
...this.#d.value,
|
|
1350
1377
|
...e
|
|
1351
1378
|
});
|
|
1352
1379
|
}
|
|
1353
|
-
#
|
|
1354
|
-
return !this.#
|
|
1380
|
+
#x(e, t) {
|
|
1381
|
+
return !this.#h && e() && t == this.#f.$.flowId.value;
|
|
1355
1382
|
}
|
|
1356
|
-
async #
|
|
1357
|
-
if (this.#
|
|
1358
|
-
let e = this.#a.
|
|
1383
|
+
async #S() {
|
|
1384
|
+
if (this.#h) return;
|
|
1385
|
+
let e = this.#a.begin(), t = this.#f.$.flowId.value, n = this.#f.$.revision.value;
|
|
1359
1386
|
if (t == null || n == null) return;
|
|
1360
|
-
let r = [...n.connectorActionIds].filter((e) => this.#
|
|
1361
|
-
if (r.length
|
|
1387
|
+
let r = [...n.connectorActionIds].filter((e) => this.#d.value.actions[e] == null && !this.#i.has(e));
|
|
1388
|
+
if (r.length > 0) {
|
|
1362
1389
|
for (let e of r) this.#i.add(e);
|
|
1363
1390
|
try {
|
|
1364
1391
|
let n = await Promise.all(r.map((e) => this.#e.getConnectorAction(e, void 0, t)));
|
|
1365
|
-
if (!this.#
|
|
1366
|
-
let i = { ...this.#
|
|
1392
|
+
if (!this.#x(e, t)) return;
|
|
1393
|
+
let i = { ...this.#d.value.actions };
|
|
1367
1394
|
for (let e of n) i[e.actionId] = e;
|
|
1368
|
-
this.#
|
|
1395
|
+
this.#b({ actions: i });
|
|
1369
1396
|
} catch {
|
|
1370
1397
|
return;
|
|
1371
1398
|
} finally {
|
|
1372
1399
|
for (let e of r) this.#i.delete(e);
|
|
1373
1400
|
}
|
|
1374
1401
|
}
|
|
1402
|
+
if (!this.#x(e, t)) return;
|
|
1403
|
+
let i = /* @__PURE__ */ new Set();
|
|
1404
|
+
for (let e of O(n.revision.content).tasks) {
|
|
1405
|
+
let t = n.task(e);
|
|
1406
|
+
if (t?.executor.kind != "connector") continue;
|
|
1407
|
+
let r = this.#d.value.actions[t.executor.action];
|
|
1408
|
+
r?.authenticated == 1 && i.add(r.serviceId);
|
|
1409
|
+
}
|
|
1410
|
+
await Promise.all([...i].map((n) => this.#v(t, n, !1, e)));
|
|
1375
1411
|
}
|
|
1376
|
-
},
|
|
1412
|
+
}, Et = { catalogs: {} }, Dt = "trigger:";
|
|
1377
1413
|
function Y(e, t) {
|
|
1378
1414
|
if (e?.kind != "trigger") return;
|
|
1379
1415
|
let n = e.trigger;
|
|
@@ -1385,11 +1421,15 @@ function Y(e, t) {
|
|
|
1385
1421
|
triggerId: e.id
|
|
1386
1422
|
};
|
|
1387
1423
|
}
|
|
1388
|
-
function
|
|
1424
|
+
function Ot(e, t) {
|
|
1389
1425
|
return {
|
|
1390
1426
|
description: t.t("addNode.triggerNeedsConnection", { provider: e.provider }),
|
|
1391
1427
|
group: t.t("addNode.triggers"),
|
|
1392
|
-
|
|
1428
|
+
icon: T({
|
|
1429
|
+
serviceId: e.provider,
|
|
1430
|
+
serviceName: e.provider
|
|
1431
|
+
}),
|
|
1432
|
+
id: `${Dt}${e.key}`,
|
|
1393
1433
|
inputs: [],
|
|
1394
1434
|
kind: "trigger",
|
|
1395
1435
|
label: e.displayName,
|
|
@@ -1403,7 +1443,7 @@ function St(e, t) {
|
|
|
1403
1443
|
}
|
|
1404
1444
|
};
|
|
1405
1445
|
}
|
|
1406
|
-
var
|
|
1446
|
+
var kt = class {
|
|
1407
1447
|
#e;
|
|
1408
1448
|
#t;
|
|
1409
1449
|
#n;
|
|
@@ -1415,12 +1455,12 @@ var Ct = class {
|
|
|
1415
1455
|
#c;
|
|
1416
1456
|
#l;
|
|
1417
1457
|
#u;
|
|
1418
|
-
constructor(r, i, a, o, s =
|
|
1419
|
-
this.#t = new AbortController(), this.#a = new
|
|
1458
|
+
constructor(r, i, a, o, s = L()) {
|
|
1459
|
+
this.#t = new AbortController(), this.#a = new F(), this.#c = t(Et), this.#u = !1, this.browseAddNodeOptions = async (e) => {
|
|
1420
1460
|
let t = this.#l.$.flowId.value;
|
|
1421
1461
|
if (e.aborted || this.#u || t == null || this.#l.$.target.value?.kind != "flow") return [];
|
|
1422
1462
|
let n = await this.#d();
|
|
1423
|
-
if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) =>
|
|
1463
|
+
if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => Ot(e, this.#i));
|
|
1424
1464
|
}, this.provideAddNodeOptions = async (e, t) => {
|
|
1425
1465
|
let n = this.#l.$.flowId.value;
|
|
1426
1466
|
if (t.aborted || this.#u || n == null || this.#l.$.target.value?.kind != "flow") return [];
|
|
@@ -1434,7 +1474,7 @@ var Ct = class {
|
|
|
1434
1474
|
e.name,
|
|
1435
1475
|
e.provider,
|
|
1436
1476
|
e.type
|
|
1437
|
-
].some((e) => e.toLowerCase().includes(r))).map((e) =>
|
|
1477
|
+
].some((e) => e.toLowerCase().includes(r))).map((e) => Ot(e, this.#i));
|
|
1438
1478
|
}, this.#n = r, this.#r = o, this.#i = s, this.#s = a, this.#l = i, this.#o = n((e) => {
|
|
1439
1479
|
let t = e(i.$.selection), n = Y(t, i), r = e(this.#c);
|
|
1440
1480
|
if (t?.kind != "trigger") return { authorizationPending: !1 };
|
|
@@ -1463,7 +1503,7 @@ var Ct = class {
|
|
|
1463
1503
|
this.#o.dispose(), this.#c.dispose();
|
|
1464
1504
|
}
|
|
1465
1505
|
reset() {
|
|
1466
|
-
this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(
|
|
1506
|
+
this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(Et));
|
|
1467
1507
|
}
|
|
1468
1508
|
async refresh(e = !1) {
|
|
1469
1509
|
let t = this.#a.begin(), n = this.#l.$.flowId.value, r = Y(this.#l.$.selection.value, this.#l);
|
|
@@ -1478,7 +1518,7 @@ var Ct = class {
|
|
|
1478
1518
|
connectionLoading: r.provider
|
|
1479
1519
|
});
|
|
1480
1520
|
try {
|
|
1481
|
-
let e =
|
|
1521
|
+
let e = C(await this.#n.listConnectorConnections(r.provider, void 0, n));
|
|
1482
1522
|
if (!this.#p(t, n)) return;
|
|
1483
1523
|
this.#f({ catalogs: {
|
|
1484
1524
|
...this.#c.value.catalogs,
|
|
@@ -1486,7 +1526,7 @@ var Ct = class {
|
|
|
1486
1526
|
} });
|
|
1487
1527
|
} catch (e) {
|
|
1488
1528
|
this.#p(t, n) && this.#f({ connectionError: {
|
|
1489
|
-
message:
|
|
1529
|
+
message: D(e, this.#i.t).message,
|
|
1490
1530
|
provider: r.provider
|
|
1491
1531
|
} });
|
|
1492
1532
|
} finally {
|
|
@@ -1507,7 +1547,7 @@ var Ct = class {
|
|
|
1507
1547
|
}
|
|
1508
1548
|
!this.#u && t == this.#l.$.flowId.value && this.#f({ authorizationProvider: e });
|
|
1509
1549
|
} catch (e) {
|
|
1510
|
-
this.#u || this.#s(
|
|
1550
|
+
this.#u || this.#s(D(e, this.#i.t));
|
|
1511
1551
|
}
|
|
1512
1552
|
}
|
|
1513
1553
|
async setConnection(e, t) {
|
|
@@ -1544,18 +1584,18 @@ var Ct = class {
|
|
|
1544
1584
|
};
|
|
1545
1585
|
//#endregion
|
|
1546
1586
|
//#region src/workbench/browser/runtime/designer/remoteChangeTargets.ts
|
|
1547
|
-
function
|
|
1587
|
+
function At(e, t) {
|
|
1548
1588
|
return e.kind == t.kind && (e.kind != "subflow" || t.kind == "subflow" && e.id == t.id);
|
|
1549
1589
|
}
|
|
1550
1590
|
function X(e, t, n, r) {
|
|
1551
1591
|
for (let [i, a] of Object.entries(t.graph(n)?.nodes ?? {})) r(a) && e.add(i);
|
|
1552
1592
|
}
|
|
1553
|
-
function
|
|
1593
|
+
function jt(e, t, n, r) {
|
|
1554
1594
|
let i = /* @__PURE__ */ new Set();
|
|
1555
1595
|
for (let a of r) switch (a.kind) {
|
|
1556
1596
|
case "graph.node.create":
|
|
1557
1597
|
case "graph.node.replace":
|
|
1558
|
-
|
|
1598
|
+
At(a.target, n) && i.add(a.nodeId);
|
|
1559
1599
|
break;
|
|
1560
1600
|
case "task.replace":
|
|
1561
1601
|
X(i, e, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId), X(i, t, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId);
|
|
@@ -1569,7 +1609,7 @@ function Tt(e, t, n, r) {
|
|
|
1569
1609
|
}
|
|
1570
1610
|
//#endregion
|
|
1571
1611
|
//#region src/workbench/browser/runtime/stores/draftChanges.ts
|
|
1572
|
-
function
|
|
1612
|
+
function Mt(e) {
|
|
1573
1613
|
if (e.length != 1) return;
|
|
1574
1614
|
let t = e[0];
|
|
1575
1615
|
switch (t.kind) {
|
|
@@ -1582,7 +1622,7 @@ function Et(e) {
|
|
|
1582
1622
|
default: return;
|
|
1583
1623
|
}
|
|
1584
1624
|
}
|
|
1585
|
-
var
|
|
1625
|
+
var Nt = class {
|
|
1586
1626
|
#e;
|
|
1587
1627
|
#t;
|
|
1588
1628
|
#n;
|
|
@@ -1610,15 +1650,15 @@ var Dt = class {
|
|
|
1610
1650
|
this.#a = e;
|
|
1611
1651
|
}
|
|
1612
1652
|
project(e) {
|
|
1613
|
-
return this.#o.reduce((e, t) =>
|
|
1653
|
+
return this.#o.reduce((e, t) => B(e, t.changes), e);
|
|
1614
1654
|
}
|
|
1615
1655
|
enqueue(e) {
|
|
1616
1656
|
let t = this.#s.then(e);
|
|
1617
1657
|
return this.#s = t, t;
|
|
1618
1658
|
}
|
|
1619
1659
|
async change(e, t, n, r = !0) {
|
|
1620
|
-
this.#t.beforeChange(r), this.#t.apply(
|
|
1621
|
-
let i =
|
|
1660
|
+
this.#t.beforeChange(r), this.#t.apply(B(t, n));
|
|
1661
|
+
let i = Mt(n), a = this.#o.at(-1), o = i != null && a != null && !a.started && Mt(a.changes) == i ? a : void 0;
|
|
1622
1662
|
if (o != null) return o.changes = n, await o.result;
|
|
1623
1663
|
let s = {
|
|
1624
1664
|
...e,
|
|
@@ -1646,7 +1686,7 @@ var Dt = class {
|
|
|
1646
1686
|
let r = this.#l(e, n, t);
|
|
1647
1687
|
return this.#o.length == 0 && this.#t.check(), r;
|
|
1648
1688
|
} catch (n) {
|
|
1649
|
-
if (n instanceof
|
|
1689
|
+
if (n instanceof z && n.code == "flow.revision-conflict") {
|
|
1650
1690
|
if (!t && await this.#t.recover(e)) {
|
|
1651
1691
|
t = !0;
|
|
1652
1692
|
continue;
|
|
@@ -1655,7 +1695,7 @@ var Dt = class {
|
|
|
1655
1695
|
kind: "error",
|
|
1656
1696
|
message: this.#n.t("notice.draftConflict")
|
|
1657
1697
|
});
|
|
1658
|
-
} else this.#u(e), this.#t.current(e) && this.#r(
|
|
1698
|
+
} else this.#u(e), this.#t.current(e) && this.#r(D(n, this.#n.t));
|
|
1659
1699
|
return;
|
|
1660
1700
|
}
|
|
1661
1701
|
}
|
|
@@ -1663,7 +1703,7 @@ var Dt = class {
|
|
|
1663
1703
|
#l(e, t, n) {
|
|
1664
1704
|
let r = {
|
|
1665
1705
|
...n.revision,
|
|
1666
|
-
content:
|
|
1706
|
+
content: B(t, e.changes).content
|
|
1667
1707
|
};
|
|
1668
1708
|
this.#o = this.#o.filter((t) => t !== e), this.#a = r;
|
|
1669
1709
|
let i = this.#t.diagnostics(), a = this.#o.length == 0 && i?.revisionId == r.revisionId;
|
|
@@ -1672,19 +1712,19 @@ var Dt = class {
|
|
|
1672
1712
|
#u(e) {
|
|
1673
1713
|
this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
|
|
1674
1714
|
}
|
|
1675
|
-
},
|
|
1715
|
+
}, Pt = 50, Ft = {
|
|
1676
1716
|
failed: !1,
|
|
1677
1717
|
loaded: !1,
|
|
1678
1718
|
loading: !0,
|
|
1679
1719
|
loadingMore: !1,
|
|
1680
1720
|
loadMoreFailed: !1,
|
|
1681
1721
|
flows: []
|
|
1682
|
-
},
|
|
1722
|
+
}, It = class {
|
|
1683
1723
|
#e;
|
|
1684
1724
|
#t;
|
|
1685
|
-
#n = new
|
|
1725
|
+
#n = new F();
|
|
1686
1726
|
#r;
|
|
1687
|
-
#i = t(
|
|
1727
|
+
#i = t(Ft);
|
|
1688
1728
|
#a = !1;
|
|
1689
1729
|
constructor(t, n, r) {
|
|
1690
1730
|
this.#e = t, this.#t = r, this.#r = n, this.$ = {
|
|
@@ -1726,7 +1766,7 @@ var Dt = class {
|
|
|
1726
1766
|
try {
|
|
1727
1767
|
let t = await this.#e.listFlows({
|
|
1728
1768
|
includeTotal: !0,
|
|
1729
|
-
limit:
|
|
1769
|
+
limit: Pt
|
|
1730
1770
|
});
|
|
1731
1771
|
if (!e()) return;
|
|
1732
1772
|
this.#o({
|
|
@@ -1741,7 +1781,7 @@ var Dt = class {
|
|
|
1741
1781
|
this.#o({
|
|
1742
1782
|
failed: !0,
|
|
1743
1783
|
loading: !1
|
|
1744
|
-
}), this.#r(
|
|
1784
|
+
}), this.#r(D(t, this.#t.t));
|
|
1745
1785
|
}
|
|
1746
1786
|
}
|
|
1747
1787
|
async loadMore() {
|
|
@@ -1755,7 +1795,7 @@ var Dt = class {
|
|
|
1755
1795
|
try {
|
|
1756
1796
|
let e = await this.#e.listFlows({
|
|
1757
1797
|
cursor: t,
|
|
1758
|
-
limit:
|
|
1798
|
+
limit: Pt
|
|
1759
1799
|
});
|
|
1760
1800
|
if (!n()) return;
|
|
1761
1801
|
let r = new Set(this.#i.value.flows.map((e) => e.flowId));
|
|
@@ -1769,7 +1809,7 @@ var Dt = class {
|
|
|
1769
1809
|
this.#o({
|
|
1770
1810
|
loadingMore: !1,
|
|
1771
1811
|
loadMoreFailed: !0
|
|
1772
|
-
}), this.#r(
|
|
1812
|
+
}), this.#r(D(e, this.#t.t));
|
|
1773
1813
|
}
|
|
1774
1814
|
}
|
|
1775
1815
|
async create(e) {
|
|
@@ -1811,7 +1851,7 @@ var Dt = class {
|
|
|
1811
1851
|
...e
|
|
1812
1852
|
});
|
|
1813
1853
|
}
|
|
1814
|
-
},
|
|
1854
|
+
}, Lt = class {
|
|
1815
1855
|
#e;
|
|
1816
1856
|
#t;
|
|
1817
1857
|
#n;
|
|
@@ -1854,7 +1894,7 @@ var Dt = class {
|
|
|
1854
1894
|
this.#c(a, r);
|
|
1855
1895
|
} catch (r) {
|
|
1856
1896
|
if (this.#o || !n()) return;
|
|
1857
|
-
if (r instanceof
|
|
1897
|
+
if (r instanceof z && r.code == "flow.presentation-conflict") try {
|
|
1858
1898
|
let t = await this.#e.getPresentation(e);
|
|
1859
1899
|
if (this.#o || !n()) return;
|
|
1860
1900
|
this.#c(a, t), this.#n({
|
|
@@ -1862,9 +1902,9 @@ var Dt = class {
|
|
|
1862
1902
|
message: this.#t.t("notice.layoutConflict")
|
|
1863
1903
|
});
|
|
1864
1904
|
} catch (e) {
|
|
1865
|
-
!this.#o && n() && this.#n(
|
|
1905
|
+
!this.#o && n() && this.#n(D(e, this.#t.t));
|
|
1866
1906
|
}
|
|
1867
|
-
else this.#c(a, t), this.#n(
|
|
1907
|
+
else this.#c(a, t), this.#n(D(r, this.#t.t));
|
|
1868
1908
|
}
|
|
1869
1909
|
}), await this.#i;
|
|
1870
1910
|
}
|
|
@@ -1876,13 +1916,13 @@ var Dt = class {
|
|
|
1876
1916
|
value: n
|
|
1877
1917
|
});
|
|
1878
1918
|
}
|
|
1879
|
-
},
|
|
1919
|
+
}, Rt = {
|
|
1880
1920
|
checkLoading: !1,
|
|
1881
1921
|
selectedNodeIds: [],
|
|
1882
1922
|
workspaceLoadFailed: !1,
|
|
1883
1923
|
workspaceLoading: !1
|
|
1884
1924
|
};
|
|
1885
|
-
function
|
|
1925
|
+
function zt(e) {
|
|
1886
1926
|
return e.workspaceLoading ? "loading" : e.busy == "designer" ? "saving" : e.draft == null ? "noDraft" : "saved";
|
|
1887
1927
|
}
|
|
1888
1928
|
function Z(e, t) {
|
|
@@ -1898,9 +1938,9 @@ function Q(e, t, n) {
|
|
|
1898
1938
|
source: r.module.source
|
|
1899
1939
|
};
|
|
1900
1940
|
}
|
|
1901
|
-
var
|
|
1941
|
+
var Bt = class {
|
|
1902
1942
|
#e;
|
|
1903
|
-
#t = t(
|
|
1943
|
+
#t = t(Rt);
|
|
1904
1944
|
#n;
|
|
1905
1945
|
constructor(t, r) {
|
|
1906
1946
|
let i = e(this.#t, (e) => e.busy), a = e(this.#t, (e) => e.checkLoading), o = e(this.#t, (e) => e.diagnosticFocus), s = e(this.#t, (e) => e.diagnostics), c = e(this.#t, (e) => e.draft), l = e(this.#t, (e) => {
|
|
@@ -1910,23 +1950,23 @@ var Pt = class {
|
|
|
1910
1950
|
...n,
|
|
1911
1951
|
status: Z(e.draft, e.moduleEditor)
|
|
1912
1952
|
};
|
|
1913
|
-
}), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 :
|
|
1953
|
+
}), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : I(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoading);
|
|
1914
1954
|
this.#e = e(this.#t, (e) => ({
|
|
1915
|
-
revision: e.draft == null ? void 0 :
|
|
1955
|
+
revision: e.draft == null ? void 0 : I(e.draft),
|
|
1916
1956
|
target: e.target
|
|
1917
1957
|
}), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
|
|
1918
1958
|
let y = e(this.#t, (e) => {
|
|
1919
|
-
if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return
|
|
1959
|
+
if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return I(e.draft).selection(e.target, e.selectedNodeIds[0]);
|
|
1920
1960
|
});
|
|
1921
1961
|
this.$ = {
|
|
1922
1962
|
addNodeOptions: n((e) => {
|
|
1923
1963
|
let { revision: n, target: r } = e(this.#e);
|
|
1924
|
-
return
|
|
1964
|
+
return Fe(n?.revision, r, e(t.t$));
|
|
1925
1965
|
}),
|
|
1926
1966
|
busy: i,
|
|
1927
1967
|
checkLoading: a,
|
|
1928
1968
|
diagnosticFocus: o,
|
|
1929
|
-
diagnosticItems: e(this.#t, (e) =>
|
|
1969
|
+
diagnosticItems: e(this.#t, (e) => E(e.draft == null ? void 0 : I(e.draft), e.target, e.diagnostics)),
|
|
1930
1970
|
diagnostics: s,
|
|
1931
1971
|
draft: c,
|
|
1932
1972
|
flow: n((e) => {
|
|
@@ -1941,7 +1981,7 @@ var Pt = class {
|
|
|
1941
1981
|
flowNextCursor: r.$.nextCursor,
|
|
1942
1982
|
flowTotal: r.$.total,
|
|
1943
1983
|
flows: r.$.flows,
|
|
1944
|
-
inspectorDiagnostics: e(this.#t, (e) =>
|
|
1984
|
+
inspectorDiagnostics: e(this.#t, (e) => te(e.draft == null ? void 0 : I(e.draft), e.target, e.diagnostics, y.value)),
|
|
1945
1985
|
live: p,
|
|
1946
1986
|
moduleDiagnostics: e(this.#t, (e) => {
|
|
1947
1987
|
let t = e.moduleEditor?.moduleId;
|
|
@@ -1953,11 +1993,11 @@ var Pt = class {
|
|
|
1953
1993
|
revision: m,
|
|
1954
1994
|
selection: y,
|
|
1955
1995
|
selectedNodeIds: h,
|
|
1956
|
-
status: e(this.#t,
|
|
1996
|
+
status: e(this.#t, zt),
|
|
1957
1997
|
target: g,
|
|
1958
1998
|
targetFlow: n((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
|
|
1959
1999
|
targetName: e(this.#t, (e) => {
|
|
1960
|
-
if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id :
|
|
2000
|
+
if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : I(e.draft).subflow(e.target.id)?.name ?? e.target.id;
|
|
1961
2001
|
}),
|
|
1962
2002
|
workspaceLoadFailed: _,
|
|
1963
2003
|
workspaceLoading: v
|
|
@@ -1976,17 +2016,17 @@ var Pt = class {
|
|
|
1976
2016
|
for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
|
|
1977
2017
|
this.#e.dispose(), this.#t.dispose();
|
|
1978
2018
|
}
|
|
1979
|
-
},
|
|
1980
|
-
function
|
|
2019
|
+
}, Vt = 250;
|
|
2020
|
+
function Ht(e, t) {
|
|
1981
2021
|
if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
|
|
1982
2022
|
}
|
|
1983
2023
|
function $(e, t) {
|
|
1984
2024
|
return e?.kind == t?.kind ? e?.kind != "subflow" || t?.kind == "subflow" && e.id == t.id : !1;
|
|
1985
2025
|
}
|
|
1986
|
-
var
|
|
2026
|
+
var Ut = class {
|
|
1987
2027
|
#e;
|
|
1988
2028
|
#t;
|
|
1989
|
-
#n = new
|
|
2029
|
+
#n = new F();
|
|
1990
2030
|
#r;
|
|
1991
2031
|
#i;
|
|
1992
2032
|
#a;
|
|
@@ -2006,8 +2046,8 @@ var Lt = class {
|
|
|
2006
2046
|
#y = 0;
|
|
2007
2047
|
#b;
|
|
2008
2048
|
#x;
|
|
2009
|
-
constructor(e, t, n =
|
|
2010
|
-
this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new
|
|
2049
|
+
constructor(e, t, n = lt, r = L(), i = () => {}) {
|
|
2050
|
+
this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new It(e, t, r), this.#l = new Bt(r, this.#o), this.#t = new Nt(e, t, r, {
|
|
2011
2051
|
apply: (e, t) => this.#w(e, t),
|
|
2012
2052
|
beforeChange: (e) => {
|
|
2013
2053
|
this.#M(), this.#h = !1, e && (this.#B({ busy: "designer" }), this.#c(void 0));
|
|
@@ -2020,7 +2060,7 @@ var Lt = class {
|
|
|
2020
2060
|
},
|
|
2021
2061
|
headChanged: (e, t) => this.#N(e, t),
|
|
2022
2062
|
recover: (e) => this.#O(e, !0)
|
|
2023
|
-
}), this.#a = new
|
|
2063
|
+
}), this.#a = new Lt(e, t, (e) => this.#B({ presentation: e }), r), this.$ = this.#l.$;
|
|
2024
2064
|
}
|
|
2025
2065
|
dispose() {
|
|
2026
2066
|
this.#M(), this.#_ = !0, this.#n.invalidate(), this.#a.dispose(), this.#b?.(), this.#x?.(), this.#l.dispose(), this.#o.dispose();
|
|
@@ -2075,7 +2115,7 @@ var Lt = class {
|
|
|
2075
2115
|
return t() ? (this.#B({
|
|
2076
2116
|
workspaceLoadFailed: !0,
|
|
2077
2117
|
workspaceLoading: !1
|
|
2078
|
-
}), this.#c(
|
|
2118
|
+
}), this.#c(D(e, this.#r.t)), !1) : !1;
|
|
2079
2119
|
}
|
|
2080
2120
|
return !0;
|
|
2081
2121
|
}
|
|
@@ -2092,7 +2132,7 @@ var Lt = class {
|
|
|
2092
2132
|
selectNodes(e) {
|
|
2093
2133
|
return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : this.#F() ? (this.#M(), this.#B({
|
|
2094
2134
|
diagnosticFocus: void 0,
|
|
2095
|
-
moduleEditor: Q(this.#l.value.draft == null ? void 0 :
|
|
2135
|
+
moduleEditor: Q(this.#l.value.draft == null ? void 0 : I(this.#l.value.draft), this.#l.value.target, e),
|
|
2096
2136
|
nodeFocus: void 0,
|
|
2097
2137
|
selectedNodeIds: e
|
|
2098
2138
|
}), !0) : !1;
|
|
@@ -2105,7 +2145,7 @@ var Lt = class {
|
|
|
2105
2145
|
let n = await this.#e.getFlow(await t(e));
|
|
2106
2146
|
return this.#o.insert(n), n;
|
|
2107
2147
|
} catch (e) {
|
|
2108
|
-
this.#_ || this.#c(
|
|
2148
|
+
this.#_ || this.#c(D(e, this.#r.t));
|
|
2109
2149
|
} finally {
|
|
2110
2150
|
this.#B({ busy: void 0 });
|
|
2111
2151
|
}
|
|
@@ -2122,7 +2162,7 @@ var Lt = class {
|
|
|
2122
2162
|
message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
|
|
2123
2163
|
}), !0);
|
|
2124
2164
|
} catch (e) {
|
|
2125
|
-
return this.#_ || this.#c(
|
|
2165
|
+
return this.#_ || this.#c(D(e, this.#r.t)), !1;
|
|
2126
2166
|
} finally {
|
|
2127
2167
|
this.#B({ busy: void 0 });
|
|
2128
2168
|
}
|
|
@@ -2131,7 +2171,7 @@ var Lt = class {
|
|
|
2131
2171
|
if (!this.#F() || this.#l.value.draft == null) return !1;
|
|
2132
2172
|
let t = this.#i();
|
|
2133
2173
|
this.#B({ busy: "resource" }), this.#c(void 0);
|
|
2134
|
-
let n = await this.#C(
|
|
2174
|
+
let n = await this.#C(oe(t, e), !1);
|
|
2135
2175
|
return this.#B({ busy: void 0 }), n != null && (this.selectTarget({
|
|
2136
2176
|
id: t,
|
|
2137
2177
|
kind: "subflow"
|
|
@@ -2149,7 +2189,7 @@ var Lt = class {
|
|
|
2149
2189
|
try {
|
|
2150
2190
|
i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
|
|
2151
2191
|
} catch (e) {
|
|
2152
|
-
this.#_ || this.#c(
|
|
2192
|
+
this.#_ || this.#c(D(e, this.#r.t));
|
|
2153
2193
|
}
|
|
2154
2194
|
return this.#B({ busy: void 0 }), i != null && (this.#c({
|
|
2155
2195
|
kind: "success",
|
|
@@ -2162,11 +2202,11 @@ var Lt = class {
|
|
|
2162
2202
|
if (r == null || i == null) return;
|
|
2163
2203
|
let a = this.#i();
|
|
2164
2204
|
if (e.kind == "comment") return await this.#S(i, a, t);
|
|
2165
|
-
let o =
|
|
2205
|
+
let o = I(r), s = S(e, o, i, this.#r.t);
|
|
2166
2206
|
if (s == null) return;
|
|
2167
|
-
let c =
|
|
2207
|
+
let c = je(o, i, a, s, this.#i);
|
|
2168
2208
|
if (c == null) return;
|
|
2169
|
-
let l = n == null ? c : [...c,
|
|
2209
|
+
let l = n == null ? c : [...c, ...it(B(r, c).content, i, n(a))], u = this.#C(l);
|
|
2170
2210
|
this.selectNodes([a]);
|
|
2171
2211
|
let d = this.moveNodes({ [a]: t });
|
|
2172
2212
|
if (await u != null && (await d, !this.#_)) return this.#B({ nodeFocus: {
|
|
@@ -2177,20 +2217,20 @@ var Lt = class {
|
|
|
2177
2217
|
async connect(e) {
|
|
2178
2218
|
let t = this.$.revision.value, n = this.#l.value.target;
|
|
2179
2219
|
if (t == null || n == null) return;
|
|
2180
|
-
let r =
|
|
2220
|
+
let r = it(t.revision.content, n, e);
|
|
2181
2221
|
r.length > 0 && await this.#C(r);
|
|
2182
2222
|
}
|
|
2183
2223
|
async disconnect(e) {
|
|
2184
2224
|
let t = this.$.revision.value, n = this.#l.value.target;
|
|
2185
2225
|
if (t == null || n == null) return;
|
|
2186
|
-
let r =
|
|
2226
|
+
let r = at(t.revision.content, n, e);
|
|
2187
2227
|
r.length > 0 && await this.#C(r);
|
|
2188
2228
|
}
|
|
2189
2229
|
async deleteSelectedNodes() {
|
|
2190
2230
|
if (!this.#F()) return;
|
|
2191
2231
|
let e = this.$.revision.value, t = this.#l.value.target;
|
|
2192
2232
|
if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
|
|
2193
|
-
let n =
|
|
2233
|
+
let n = w(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = Ce(e, t, this.#l.value.selectedNodeIds), a = i.length == 0 ? void 0 : this.#C(i), o = r.size == 0 ? void 0 : this.#T((e) => x(e, t, r));
|
|
2194
2234
|
this.selectNodes([]), (a == null || await a != null) && await o;
|
|
2195
2235
|
}
|
|
2196
2236
|
copySelectedNodes() {
|
|
@@ -2204,7 +2244,7 @@ var Lt = class {
|
|
|
2204
2244
|
sourceId: e.id,
|
|
2205
2245
|
title: e.title
|
|
2206
2246
|
}] : []),
|
|
2207
|
-
nodes:
|
|
2247
|
+
nodes: _e(e, t, this.#l.value.selectedNodeIds)
|
|
2208
2248
|
};
|
|
2209
2249
|
}
|
|
2210
2250
|
async pasteNodes(e) {
|
|
@@ -2223,8 +2263,8 @@ var Lt = class {
|
|
|
2223
2263
|
y: (i?.y ?? 80) + 40
|
|
2224
2264
|
}];
|
|
2225
2265
|
})), c = this.#T((e) => {
|
|
2226
|
-
let t =
|
|
2227
|
-
for (let e of a) t =
|
|
2266
|
+
let t = A(e, n, s);
|
|
2267
|
+
for (let e of a) t = R(t, n, e.nodeId, {
|
|
2228
2268
|
content: e.content,
|
|
2229
2269
|
position: {
|
|
2230
2270
|
x: e.position.x + 40,
|
|
@@ -2242,56 +2282,66 @@ var Lt = class {
|
|
|
2242
2282
|
async saveNodeSettings(e, t) {
|
|
2243
2283
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2244
2284
|
if (n == null || r == null) return !1;
|
|
2245
|
-
let i =
|
|
2285
|
+
let i = he(n, r, e, t);
|
|
2246
2286
|
return i != null && await this.#C(i) != null;
|
|
2247
2287
|
}
|
|
2248
2288
|
async saveNodeDescription(e, t) {
|
|
2249
2289
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2250
2290
|
if (n == null || r == null) return !1;
|
|
2251
|
-
let i =
|
|
2291
|
+
let i = Te(n, r, e, t);
|
|
2252
2292
|
return i != null && await this.#C(i) != null;
|
|
2253
2293
|
}
|
|
2254
2294
|
async saveNodeIcon(e, t) {
|
|
2255
2295
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2256
2296
|
if (n == null || r == null) return !1;
|
|
2257
|
-
let i =
|
|
2297
|
+
let i = xe(n, r, e, t);
|
|
2258
2298
|
return i != null && await this.#C(i) != null;
|
|
2259
2299
|
}
|
|
2260
2300
|
async saveNodeTitle(e, t) {
|
|
2261
2301
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2262
2302
|
if (n == null || r == null) return !1;
|
|
2263
|
-
let i =
|
|
2303
|
+
let i = ge(n, r, e, t);
|
|
2264
2304
|
return i != null && await this.#C(i) != null;
|
|
2265
2305
|
}
|
|
2266
2306
|
async setInputValue(e, t, n) {
|
|
2267
2307
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2268
2308
|
if (r == null || i == null) return !1;
|
|
2269
|
-
let a =
|
|
2309
|
+
let a = le(r, i, e, t, n);
|
|
2270
2310
|
return a != null && await this.#C(a) != null;
|
|
2271
2311
|
}
|
|
2272
2312
|
async setInputVariable(e, t, n) {
|
|
2273
2313
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2274
2314
|
if (r == null || i == null) return !1;
|
|
2275
|
-
let a = n == null ?
|
|
2315
|
+
let a = n == null ? le(r, i, e, t, void 0) : ye(r, i, e, t, n, this.#i());
|
|
2276
2316
|
return a != null && await this.#C(a) != null;
|
|
2277
2317
|
}
|
|
2278
2318
|
async saveCondition(e, t) {
|
|
2279
2319
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2280
2320
|
if (n == null || r == null) return !1;
|
|
2281
|
-
let i =
|
|
2321
|
+
let i = me(n, r, e, t);
|
|
2282
2322
|
return i != null && await this.#C(i) != null;
|
|
2283
2323
|
}
|
|
2284
2324
|
async saveValue(e, t) {
|
|
2285
2325
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2286
2326
|
if (n == null || r == null) return !1;
|
|
2287
|
-
let i =
|
|
2327
|
+
let i = ce(n, r, e, t);
|
|
2328
|
+
return i != null && await this.#C(i) != null;
|
|
2329
|
+
}
|
|
2330
|
+
async saveWait(e, t) {
|
|
2331
|
+
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2332
|
+
if (n == null || r?.kind != "flow") return !1;
|
|
2333
|
+
let i = Ie(n, r, e, t);
|
|
2288
2334
|
return i != null && await this.#C(i) != null;
|
|
2289
2335
|
}
|
|
2336
|
+
async setWaitNotification(e, t) {
|
|
2337
|
+
let n = this.$.revision.value, r = n == null ? void 0 : Me(n, e, t, this.#i());
|
|
2338
|
+
return r != null && await this.#C(r) != null;
|
|
2339
|
+
}
|
|
2290
2340
|
async saveComment(e, t) {
|
|
2291
2341
|
let n = this.#l.value.target;
|
|
2292
2342
|
if (n == null) return;
|
|
2293
2343
|
let r = this.#P().nodes.find((t) => t.id == e)?.position;
|
|
2294
|
-
r != null && await this.#T((i) =>
|
|
2344
|
+
r != null && await this.#T((i) => R(i, n, e, {
|
|
2295
2345
|
...t,
|
|
2296
2346
|
position: r
|
|
2297
2347
|
}));
|
|
@@ -2299,55 +2349,61 @@ var Lt = class {
|
|
|
2299
2349
|
async saveTaskSettings(e, t) {
|
|
2300
2350
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2301
2351
|
if (n == null || r == null) return !1;
|
|
2302
|
-
let i =
|
|
2352
|
+
let i = Pe(n, r, e, t);
|
|
2303
2353
|
return i != null && await this.#C(i) != null;
|
|
2304
2354
|
}
|
|
2305
2355
|
async saveCodeTaskPorts(e, t) {
|
|
2306
2356
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2307
2357
|
if (n == null || r == null) return !1;
|
|
2308
|
-
let i =
|
|
2358
|
+
let i = de(n, r, e, t);
|
|
2359
|
+
return i != null && await this.#C(i) != null;
|
|
2360
|
+
}
|
|
2361
|
+
async saveTaskAdditionalInputs(e, t) {
|
|
2362
|
+
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2363
|
+
if (n == null || r == null) return !1;
|
|
2364
|
+
let i = Le(n, r, e, t);
|
|
2309
2365
|
return i != null && await this.#C(i) != null;
|
|
2310
2366
|
}
|
|
2311
2367
|
async setConnectorConnection(e, t) {
|
|
2312
2368
|
let n = this.$.revision.value;
|
|
2313
2369
|
if (n == null) return !1;
|
|
2314
|
-
let r =
|
|
2370
|
+
let r = ee(n.revision.content, e, t);
|
|
2315
2371
|
return r != null && await this.#C(r) != null;
|
|
2316
2372
|
}
|
|
2317
2373
|
async saveTriggerSettings(e, t) {
|
|
2318
2374
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2319
2375
|
if (n == null || r?.kind != "flow") return !1;
|
|
2320
|
-
let i =
|
|
2376
|
+
let i = ne(n.revision.content, r, e, t);
|
|
2321
2377
|
return i != null && await this.#C(i) != null;
|
|
2322
2378
|
}
|
|
2323
2379
|
async saveTriggerConfig(e, t, n) {
|
|
2324
2380
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2325
2381
|
if (r == null || i?.kind != "flow") return !1;
|
|
2326
|
-
let a =
|
|
2382
|
+
let a = ie(r.revision.content, i, e, t, n);
|
|
2327
2383
|
return a != null && await this.#C(a) != null;
|
|
2328
2384
|
}
|
|
2329
2385
|
async saveTriggerSchedule(e, t) {
|
|
2330
2386
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2331
2387
|
if (n == null || r?.kind != "flow") return !1;
|
|
2332
|
-
let i =
|
|
2388
|
+
let i = N(n.revision.content, r, e, t);
|
|
2333
2389
|
return i != null && await this.#C(i) != null;
|
|
2334
2390
|
}
|
|
2335
2391
|
async saveWebhook(e, t) {
|
|
2336
2392
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2337
2393
|
if (n == null || r?.kind != "flow") return !1;
|
|
2338
|
-
let i =
|
|
2394
|
+
let i = P(n, r, e, t);
|
|
2339
2395
|
return i != null && await this.#C(i) != null;
|
|
2340
2396
|
}
|
|
2341
2397
|
async setTriggerConnection(e, t) {
|
|
2342
2398
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2343
2399
|
if (n == null || r?.kind != "flow") return !1;
|
|
2344
|
-
let i =
|
|
2400
|
+
let i = re(n.revision.content, r, e, t);
|
|
2345
2401
|
return i != null && await this.#C(i) != null;
|
|
2346
2402
|
}
|
|
2347
2403
|
async saveSubflowSettings(e, t) {
|
|
2348
2404
|
let n = this.$.revision.value;
|
|
2349
2405
|
if (n == null) return !1;
|
|
2350
|
-
let r =
|
|
2406
|
+
let r = ae(n, e, t);
|
|
2351
2407
|
return r != null && await this.#C(r) != null;
|
|
2352
2408
|
}
|
|
2353
2409
|
updateModuleSource(e) {
|
|
@@ -2378,9 +2434,9 @@ var Lt = class {
|
|
|
2378
2434
|
...e,
|
|
2379
2435
|
phase: "saving"
|
|
2380
2436
|
} });
|
|
2381
|
-
let t = await
|
|
2437
|
+
let t = await st(e.source);
|
|
2382
2438
|
if (this.#_) return !1;
|
|
2383
|
-
let n = await this.#C(
|
|
2439
|
+
let n = await this.#C(ct(e.moduleId, e.source, t));
|
|
2384
2440
|
return !this.#_ && this.#l.value.moduleEditor?.moduleId == e.moduleId && this.#B({ moduleEditor: {
|
|
2385
2441
|
...this.#l.value.moduleEditor,
|
|
2386
2442
|
phase: n == null ? "failed" : void 0
|
|
@@ -2388,13 +2444,13 @@ var Lt = class {
|
|
|
2388
2444
|
}
|
|
2389
2445
|
async moveNodes(e, t = "detail") {
|
|
2390
2446
|
let n = this.#l.value.target;
|
|
2391
|
-
n != null && await this.#T((r) =>
|
|
2447
|
+
n != null && await this.#T((r) => A(r, n, e, t));
|
|
2392
2448
|
}
|
|
2393
2449
|
async moveViewport(e, t = "detail") {
|
|
2394
2450
|
let n = this.#l.value.target;
|
|
2395
2451
|
if (n == null) return;
|
|
2396
2452
|
let r = this.#P().viewport;
|
|
2397
|
-
(r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) =>
|
|
2453
|
+
(r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) => k(r, n, e, t));
|
|
2398
2454
|
}
|
|
2399
2455
|
async check() {
|
|
2400
2456
|
await this.#E();
|
|
@@ -2424,7 +2480,7 @@ var Lt = class {
|
|
|
2424
2480
|
if (e.kind != "comment") return [];
|
|
2425
2481
|
let t = /#(\d+)$/.exec(e.title);
|
|
2426
2482
|
return t == null ? [] : [Number(t[1])];
|
|
2427
|
-
})), i = this.#T((i) =>
|
|
2483
|
+
})), i = this.#T((i) => R(i, e, t, {
|
|
2428
2484
|
content: "",
|
|
2429
2485
|
position: n,
|
|
2430
2486
|
title: this.#r.t("addNode.commentName", { number: r + 1 })
|
|
@@ -2480,7 +2536,7 @@ var Lt = class {
|
|
|
2480
2536
|
});
|
|
2481
2537
|
}
|
|
2482
2538
|
} catch (n) {
|
|
2483
|
-
!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(
|
|
2539
|
+
!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(D(n, this.#r.t));
|
|
2484
2540
|
} finally {
|
|
2485
2541
|
!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#B({ checkLoading: !1 });
|
|
2486
2542
|
}
|
|
@@ -2518,7 +2574,7 @@ var Lt = class {
|
|
|
2518
2574
|
s = this.#k(a, o);
|
|
2519
2575
|
}
|
|
2520
2576
|
if (s.revisionId == a.revisionId) return !0;
|
|
2521
|
-
let c = o.kind == "changes" && t != null ?
|
|
2577
|
+
let c = o.kind == "changes" && t != null ? jt(I(a), I(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
|
|
2522
2578
|
o.kind == "snapshot" && this.#M();
|
|
2523
2579
|
let l = this.#L(s, !1);
|
|
2524
2580
|
return this.#N(e.flowId, s.revisionId), o.kind == "changes" && o.revisions.length > 0 && t != null && c != null && i == this.#m && this.#A(e, t, c, i), n && (this.#c({
|
|
@@ -2526,7 +2582,7 @@ var Lt = class {
|
|
|
2526
2582
|
message: this.#r.t(l ? "notice.moduleUpdated" : "notice.draftUpdated")
|
|
2527
2583
|
}), this.#E()), !0;
|
|
2528
2584
|
} catch (n) {
|
|
2529
|
-
return t && this.#z(e) && this.#c(
|
|
2585
|
+
return t && this.#z(e) && this.#c(D(n, this.#r.t)), !1;
|
|
2530
2586
|
}
|
|
2531
2587
|
}
|
|
2532
2588
|
#k(e, t) {
|
|
@@ -2536,7 +2592,7 @@ var Lt = class {
|
|
|
2536
2592
|
if (e.revision.parentRevisionId != n.revisionId) throw Error("Invalid Draft revision chain.");
|
|
2537
2593
|
n = {
|
|
2538
2594
|
...e.revision,
|
|
2539
|
-
content:
|
|
2595
|
+
content: B(n, e.operations).content
|
|
2540
2596
|
};
|
|
2541
2597
|
}
|
|
2542
2598
|
return n;
|
|
@@ -2551,7 +2607,7 @@ var Lt = class {
|
|
|
2551
2607
|
return;
|
|
2552
2608
|
}
|
|
2553
2609
|
for (let e of n) a.targets.add(e);
|
|
2554
|
-
globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(),
|
|
2610
|
+
globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(), Vt);
|
|
2555
2611
|
return;
|
|
2556
2612
|
}
|
|
2557
2613
|
n.size == 0 || i.selectedNodeIds.length > 0 || (this.#p = {
|
|
@@ -2560,7 +2616,7 @@ var Lt = class {
|
|
|
2560
2616
|
flowId: e.flowId,
|
|
2561
2617
|
target: t,
|
|
2562
2618
|
targets: new Set(n),
|
|
2563
|
-
timer: globalThis.setTimeout(() => this.#j(),
|
|
2619
|
+
timer: globalThis.setTimeout(() => this.#j(), Vt),
|
|
2564
2620
|
viewport: this.#P().viewport
|
|
2565
2621
|
});
|
|
2566
2622
|
}
|
|
@@ -2571,7 +2627,7 @@ var Lt = class {
|
|
|
2571
2627
|
if (t.flowId != e.flowId || !$(t.target, e.target) || t.selectedNodeIds.length > 0) return;
|
|
2572
2628
|
let n = this.#P().viewport;
|
|
2573
2629
|
if (n.x != e.viewport.x || n.y != e.viewport.y || n.zoom != e.viewport.zoom || t.draft == null) return;
|
|
2574
|
-
let r =
|
|
2630
|
+
let r = I(t.draft), i = [...e.targets].filter((t) => r.selection(e.target, t) != null);
|
|
2575
2631
|
i.length == 1 && this.#B({ nodeFocus: {
|
|
2576
2632
|
nodeId: i[0],
|
|
2577
2633
|
requestId: ++this.#y
|
|
@@ -2585,7 +2641,7 @@ var Lt = class {
|
|
|
2585
2641
|
}
|
|
2586
2642
|
#P() {
|
|
2587
2643
|
let e = this.#l.value;
|
|
2588
|
-
return
|
|
2644
|
+
return j(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
|
|
2589
2645
|
}
|
|
2590
2646
|
#F() {
|
|
2591
2647
|
let e = this.#l.value.moduleEditor;
|
|
@@ -2595,7 +2651,7 @@ var Lt = class {
|
|
|
2595
2651
|
}), !1);
|
|
2596
2652
|
}
|
|
2597
2653
|
#I(e) {
|
|
2598
|
-
let t =
|
|
2654
|
+
let t = I(e), n = Ht(t, this.#l.value.target);
|
|
2599
2655
|
return {
|
|
2600
2656
|
revision: t,
|
|
2601
2657
|
selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
|
|
@@ -2629,13 +2685,13 @@ var Lt = class {
|
|
|
2629
2685
|
};
|
|
2630
2686
|
//#endregion
|
|
2631
2687
|
//#region src/workbench/browser/runtime/stores/workbenchStore.ts
|
|
2632
|
-
function
|
|
2688
|
+
function Wt(e) {
|
|
2633
2689
|
return new Map(e.nodes.map((e) => [e.id, e]));
|
|
2634
2690
|
}
|
|
2635
|
-
function
|
|
2636
|
-
return e == null || t == null ? [] :
|
|
2691
|
+
function Gt(e, t) {
|
|
2692
|
+
return e == null || t == null ? [] : I(e).designerInputs(t);
|
|
2637
2693
|
}
|
|
2638
|
-
function
|
|
2694
|
+
function Kt(e, t, n, r, i) {
|
|
2639
2695
|
if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
|
|
2640
2696
|
let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
|
|
2641
2697
|
return typeof a == "string" ? new Map(r.flatMap((t) => {
|
|
@@ -2643,7 +2699,7 @@ function Bt(e, t, n, r, i) {
|
|
|
2643
2699
|
return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
|
|
2644
2700
|
})) : /* @__PURE__ */ new Map();
|
|
2645
2701
|
}
|
|
2646
|
-
var
|
|
2702
|
+
var qt = { openExternalPage: async () => !1 }, Jt = class {
|
|
2647
2703
|
#e;
|
|
2648
2704
|
#t;
|
|
2649
2705
|
#n;
|
|
@@ -2654,38 +2710,49 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2654
2710
|
#s;
|
|
2655
2711
|
#c;
|
|
2656
2712
|
#l;
|
|
2657
|
-
constructor(r, i, a = () => crypto.randomUUID(), o =
|
|
2658
|
-
this.#t = new
|
|
2713
|
+
constructor(r, i, a = () => crypto.randomUUID(), o = L(), s = qt, c = !0) {
|
|
2714
|
+
this.#t = new F(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = new F(), this.#l = !1, this.provideAddNodeOptions = async (e, t) => await this.#u([this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t)], t), this.browseAddNodeOptions = async (e) => await this.#u([this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)], e), this.provideAddNodeOptionChoices = async (e, t) => {
|
|
2659
2715
|
if (!e.startsWith("trigger:")) return await this.connectors.provideAddNodeOptionChoices(e, t);
|
|
2660
2716
|
}, this.#e = r, this.#n = o, this.#i = c;
|
|
2661
2717
|
let l = (e) => {
|
|
2662
2718
|
this.#l || this.#r.set(e);
|
|
2663
2719
|
};
|
|
2664
|
-
this.runs = new
|
|
2665
|
-
|
|
2720
|
+
this.runs = new Re(r, l, o), this.workspace = new Ut(r, l, lt, o, (e) => {
|
|
2721
|
+
e.kind == "run.created" ? this.#d(r, e) : this.runs.changed(e.runId);
|
|
2722
|
+
}), this.connectors = new Tt(r, this.workspace, l, s, o), this.triggers = new kt(r, this.workspace, l, s, o), this.publications = new pt(r, this.workspace, l, i, a, o), this.runRequests = new vt(r, this.runs, l, o, a);
|
|
2723
|
+
let u = n((e) => {
|
|
2724
|
+
let t = e(this.workspace.$.diagnostics);
|
|
2725
|
+
if (t == null) return;
|
|
2726
|
+
let n = e(this.connectors.$.diagnostics);
|
|
2727
|
+
return n.length == 0 ? t : {
|
|
2728
|
+
...t,
|
|
2729
|
+
diagnostics: [...t.diagnostics, ...n],
|
|
2730
|
+
valid: !1
|
|
2731
|
+
};
|
|
2732
|
+
}), d = /* @__PURE__ */ new Map(), f, p = n((e) => {
|
|
2666
2733
|
let t = e(this.workspace.$.draft);
|
|
2667
|
-
|
|
2668
|
-
let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(this.
|
|
2669
|
-
...
|
|
2670
|
-
r == null || n == null ? void 0 :
|
|
2734
|
+
f != t?.flowId && (d.clear(), f = t?.flowId);
|
|
2735
|
+
let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), p = e(this.runs.$.events), m = e(this.#a), h = e(this.#o), g = e(this.#s), _ = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, v = [
|
|
2736
|
+
...Gt(t, n),
|
|
2737
|
+
r == null || n == null ? void 0 : M(r, n),
|
|
2671
2738
|
i,
|
|
2672
2739
|
a,
|
|
2673
2740
|
s,
|
|
2674
2741
|
c,
|
|
2675
2742
|
l,
|
|
2676
|
-
f,
|
|
2677
2743
|
p,
|
|
2678
2744
|
m,
|
|
2679
2745
|
h,
|
|
2746
|
+
g,
|
|
2680
2747
|
...l == null ? [] : [t?.revisionId]
|
|
2681
|
-
],
|
|
2682
|
-
if (
|
|
2683
|
-
let
|
|
2684
|
-
return
|
|
2685
|
-
graph:
|
|
2686
|
-
inputs:
|
|
2687
|
-
}),
|
|
2688
|
-
}),
|
|
2748
|
+
], y = d.get(_);
|
|
2749
|
+
if (y != null && y.inputs.length == v.length && y.inputs.every((e, t) => e === v[t])) return y.graph;
|
|
2750
|
+
let b = j(t, n, r, i, a, s, c, l, p, m, h, g, this.#i);
|
|
2751
|
+
return d.set(_, {
|
|
2752
|
+
graph: b,
|
|
2753
|
+
inputs: v
|
|
2754
|
+
}), b;
|
|
2755
|
+
}), m = e(p, Wt);
|
|
2689
2756
|
this.$ = {
|
|
2690
2757
|
busy: n((e) => {
|
|
2691
2758
|
let t = e(this.workspace.$.busy);
|
|
@@ -2696,13 +2763,15 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2696
2763
|
if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
|
|
2697
2764
|
if (e(this.publications.$.changingTriggerId) != null) return "trigger";
|
|
2698
2765
|
}),
|
|
2699
|
-
|
|
2700
|
-
|
|
2766
|
+
diagnosticItems: n((e) => E(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
|
|
2767
|
+
diagnostics: u,
|
|
2768
|
+
designer: p,
|
|
2769
|
+
designerNodeById: m,
|
|
2701
2770
|
notice: this.#r,
|
|
2702
|
-
runEventNodes: n((e) =>
|
|
2771
|
+
runEventNodes: n((e) => Kt(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(m))),
|
|
2703
2772
|
selectedDesignerNode: n((e) => {
|
|
2704
2773
|
let t = e(this.workspace.$.selectedNodeIds);
|
|
2705
|
-
return t.length == 1 ? e(
|
|
2774
|
+
return t.length == 1 ? e(m).get(t[0]) : void 0;
|
|
2706
2775
|
}),
|
|
2707
2776
|
variableNames: this.#a,
|
|
2708
2777
|
variableNamesLoaded: this.#o,
|
|
@@ -2732,7 +2801,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2732
2801
|
if (!e() || this.#l) return;
|
|
2733
2802
|
this.#a.set(t.map((e) => e.name)), this.#o.set(!0);
|
|
2734
2803
|
} catch (t) {
|
|
2735
|
-
e() && !this.#l && this.#r.set(
|
|
2804
|
+
e() && !this.#l && this.#r.set(D(t, this.#n.t));
|
|
2736
2805
|
} finally {
|
|
2737
2806
|
e() && !this.#l && this.#s.set(!1);
|
|
2738
2807
|
}
|
|
@@ -2758,6 +2827,10 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2758
2827
|
let t = this.$.runEventNodes.value.get(e);
|
|
2759
2828
|
return t != null && this.workspace.locateNode(t);
|
|
2760
2829
|
}
|
|
2830
|
+
locateRunWait() {
|
|
2831
|
+
let e = this.runs.$.run.value;
|
|
2832
|
+
return e?.status == "waiting" && "waiting" in e && e.waiting != null && this.workspace.locateNode(e.waiting.nodeId);
|
|
2833
|
+
}
|
|
2761
2834
|
async addNode(e, t, n) {
|
|
2762
2835
|
if (e.kind == "trigger" && "trigger" in e && e.trigger.kind == "connect") {
|
|
2763
2836
|
await this.triggers.connect(e.trigger.provider);
|
|
@@ -2771,7 +2844,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2771
2844
|
if (t.aborted || this.#l) return;
|
|
2772
2845
|
let r = n.filter((e) => e.status == "rejected");
|
|
2773
2846
|
if (r.length > 0 && r.length == n.length) throw r[0].reason;
|
|
2774
|
-
return r.length > 0 && this.#r.set(
|
|
2847
|
+
return r.length > 0 && this.#r.set(D(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
|
|
2775
2848
|
}
|
|
2776
2849
|
async refreshSelectedConnector(e = !1) {
|
|
2777
2850
|
await this.connectors.refresh(e);
|
|
@@ -2796,9 +2869,9 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2796
2869
|
return;
|
|
2797
2870
|
}
|
|
2798
2871
|
}
|
|
2799
|
-
},
|
|
2800
|
-
function
|
|
2801
|
-
let
|
|
2872
|
+
}, Yt = We(() => import("./flowWorkspace-BewofPeU.js").then((e) => e.t));
|
|
2873
|
+
function Xt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: l, tokenLabel: f }) {
|
|
2874
|
+
let p = l != null && f != null && i != null, h = l ?? "", _ = /* @__PURE__ */ G(Ke, { children: [
|
|
2802
2875
|
/* @__PURE__ */ W("div", {
|
|
2803
2876
|
"aria-hidden": "true",
|
|
2804
2877
|
className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
|
|
@@ -2829,21 +2902,21 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
2829
2902
|
children: t
|
|
2830
2903
|
})]
|
|
2831
2904
|
}),
|
|
2832
|
-
|
|
2905
|
+
p && /* @__PURE__ */ W(v, { children: /* @__PURE__ */ G(g, {
|
|
2833
2906
|
"data-invalid": n != null,
|
|
2834
2907
|
children: [
|
|
2835
|
-
/* @__PURE__ */ W(
|
|
2908
|
+
/* @__PURE__ */ W(d, {
|
|
2836
2909
|
htmlFor: "session-token",
|
|
2837
2910
|
children: f
|
|
2838
2911
|
}),
|
|
2839
|
-
/* @__PURE__ */ W(
|
|
2912
|
+
/* @__PURE__ */ W(s, {
|
|
2840
2913
|
autoComplete: "username",
|
|
2841
2914
|
name: "username",
|
|
2842
2915
|
type: "hidden",
|
|
2843
2916
|
value: "open-flow",
|
|
2844
2917
|
readOnly: !0
|
|
2845
2918
|
}),
|
|
2846
|
-
/* @__PURE__ */ W(
|
|
2919
|
+
/* @__PURE__ */ W(s, {
|
|
2847
2920
|
autoComplete: "current-password",
|
|
2848
2921
|
"aria-invalid": n != null,
|
|
2849
2922
|
autoFocus: !0,
|
|
@@ -2853,21 +2926,21 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
2853
2926
|
onChange: (e) => i?.(e.target.value),
|
|
2854
2927
|
spellCheck: !1,
|
|
2855
2928
|
type: "password",
|
|
2856
|
-
value:
|
|
2929
|
+
value: h
|
|
2857
2930
|
}),
|
|
2858
|
-
n != null && /* @__PURE__ */ W(
|
|
2931
|
+
n != null && /* @__PURE__ */ W(m, { children: n })
|
|
2859
2932
|
]
|
|
2860
2933
|
}) }),
|
|
2861
|
-
e != null && r != null && /* @__PURE__ */ G(
|
|
2862
|
-
disabled: a ||
|
|
2934
|
+
e != null && r != null && /* @__PURE__ */ G(c, {
|
|
2935
|
+
disabled: a || p && h.length == 0,
|
|
2863
2936
|
size: "lg",
|
|
2864
2937
|
type: "submit",
|
|
2865
|
-
children: [a && /* @__PURE__ */ W(
|
|
2938
|
+
children: [a && /* @__PURE__ */ W(u, {
|
|
2866
2939
|
"aria-label": e,
|
|
2867
2940
|
"data-icon": "inline-start"
|
|
2868
2941
|
}), e]
|
|
2869
2942
|
}),
|
|
2870
|
-
a && e == null && /* @__PURE__ */ W(
|
|
2943
|
+
a && e == null && /* @__PURE__ */ W(u, { "aria-label": t })
|
|
2871
2944
|
] }), y = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
|
|
2872
2945
|
return /* @__PURE__ */ W("main", {
|
|
2873
2946
|
className: "open-flow-workbench",
|
|
@@ -2876,112 +2949,114 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
2876
2949
|
children: r == null ? /* @__PURE__ */ W("section", {
|
|
2877
2950
|
"aria-busy": a,
|
|
2878
2951
|
className: y,
|
|
2879
|
-
children:
|
|
2952
|
+
children: _
|
|
2880
2953
|
}) : /* @__PURE__ */ W("form", {
|
|
2881
2954
|
"aria-busy": a,
|
|
2882
2955
|
className: y,
|
|
2883
2956
|
onSubmit: r,
|
|
2884
|
-
children:
|
|
2957
|
+
children: _
|
|
2885
2958
|
})
|
|
2886
2959
|
})
|
|
2887
2960
|
});
|
|
2888
2961
|
}
|
|
2889
|
-
function
|
|
2962
|
+
function Zt({ host: e, store: t }) {
|
|
2890
2963
|
let n = a(t.$.notice);
|
|
2891
2964
|
return H(() => e.notify(n), [e, n]), H(() => () => e.notify(void 0), [e]), null;
|
|
2892
2965
|
}
|
|
2893
|
-
function
|
|
2894
|
-
let
|
|
2966
|
+
function Qt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, store: m, theme: h }) {
|
|
2967
|
+
let g = a(m.workspace.$.flowId);
|
|
2895
2968
|
return /* @__PURE__ */ W("div", {
|
|
2896
2969
|
className: "app-shell",
|
|
2897
|
-
children:
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2970
|
+
children: g == null ? /* @__PURE__ */ W(et, {
|
|
2971
|
+
catalogWidth: e,
|
|
2972
|
+
createFlowDisabled: n,
|
|
2973
|
+
createFlowField: r,
|
|
2974
|
+
flowBadges: i,
|
|
2975
|
+
hrefForFlow: (e) => o({
|
|
2902
2976
|
flowId: e.flowId,
|
|
2903
2977
|
view: "design"
|
|
2904
2978
|
}),
|
|
2905
|
-
hostAction:
|
|
2906
|
-
hostTitle:
|
|
2907
|
-
language:
|
|
2908
|
-
onCreateFlow: (
|
|
2909
|
-
onHostAction:
|
|
2910
|
-
onLanguageChange:
|
|
2911
|
-
onSelectFlow: (e) => void
|
|
2912
|
-
store:
|
|
2913
|
-
}) : /* @__PURE__ */ W(
|
|
2979
|
+
hostAction: s,
|
|
2980
|
+
hostTitle: c,
|
|
2981
|
+
language: l,
|
|
2982
|
+
onCreateFlow: (e) => u.createFlow(e, t),
|
|
2983
|
+
onHostAction: f,
|
|
2984
|
+
onLanguageChange: p,
|
|
2985
|
+
onSelectFlow: (e) => void u.selectFlow(e),
|
|
2986
|
+
store: m
|
|
2987
|
+
}) : /* @__PURE__ */ W(Ue, {
|
|
2914
2988
|
fallback: /* @__PURE__ */ W("main", {
|
|
2915
2989
|
"aria-busy": "true",
|
|
2916
2990
|
className: "workspace"
|
|
2917
2991
|
}),
|
|
2918
|
-
children: /* @__PURE__ */ W(
|
|
2919
|
-
hostAction:
|
|
2920
|
-
hostTitle:
|
|
2921
|
-
hrefFor:
|
|
2922
|
-
navigation:
|
|
2923
|
-
onConfigureConnector:
|
|
2924
|
-
onHostAction:
|
|
2925
|
-
store:
|
|
2926
|
-
theme:
|
|
2992
|
+
children: /* @__PURE__ */ W(Yt, {
|
|
2993
|
+
hostAction: s,
|
|
2994
|
+
hostTitle: c,
|
|
2995
|
+
hrefFor: o,
|
|
2996
|
+
navigation: u,
|
|
2997
|
+
onConfigureConnector: d,
|
|
2998
|
+
onHostAction: f,
|
|
2999
|
+
store: m,
|
|
3000
|
+
theme: h
|
|
2927
3001
|
})
|
|
2928
3002
|
})
|
|
2929
3003
|
});
|
|
2930
3004
|
}
|
|
2931
|
-
function
|
|
2932
|
-
let
|
|
2933
|
-
|
|
2934
|
-
let [{ i18n:
|
|
2935
|
-
let e =
|
|
3005
|
+
function $t({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onHostAction: p, onLanguageChange: m, onNavigate: h, preferences: g, theme: _, variables: v = !0 }) {
|
|
3006
|
+
let y = Ge(h);
|
|
3007
|
+
y.current = h;
|
|
3008
|
+
let [{ i18n: b, navigation: x, store: S }] = U(() => {
|
|
3009
|
+
let e = L(u), t = new Jt(new Ee((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), g, () => crypto.randomUUID(), e, a, v);
|
|
2936
3010
|
return {
|
|
2937
3011
|
i18n: e,
|
|
2938
|
-
navigation: new
|
|
3012
|
+
navigation: new qe(t, d, (e, t) => y.current(e, t)),
|
|
2939
3013
|
store: t
|
|
2940
3014
|
};
|
|
2941
3015
|
});
|
|
2942
3016
|
return H(() => {
|
|
2943
|
-
|
|
3017
|
+
x.start();
|
|
2944
3018
|
let e = () => {
|
|
2945
|
-
|
|
3019
|
+
S.connectors.refreshAfterAuthorization(), S.triggers.refreshAfterAuthorization(), S.refreshVariableNames();
|
|
2946
3020
|
};
|
|
2947
3021
|
return globalThis.addEventListener("focus", e), () => {
|
|
2948
|
-
globalThis.removeEventListener("focus", e),
|
|
3022
|
+
globalThis.removeEventListener("focus", e), x.dispose(), S.dispose(), b.dispose();
|
|
2949
3023
|
};
|
|
2950
3024
|
}, [
|
|
2951
|
-
y,
|
|
2952
3025
|
b,
|
|
2953
|
-
x
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
3026
|
+
x,
|
|
3027
|
+
S
|
|
3028
|
+
]), H(() => void x.apply(d), [d, x]), H(() => {
|
|
3029
|
+
b.lang != u && b.switchLang(u);
|
|
3030
|
+
}, [b, u]), /* @__PURE__ */ W(o, {
|
|
3031
|
+
i18n: b,
|
|
2958
3032
|
children: /* @__PURE__ */ G("div", {
|
|
2959
3033
|
className: "open-flow-theme open-flow-workbench",
|
|
2960
|
-
"data-theme":
|
|
2961
|
-
children: [/* @__PURE__ */ W(
|
|
2962
|
-
host:
|
|
2963
|
-
store:
|
|
2964
|
-
}), /* @__PURE__ */ W(
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
3034
|
+
"data-theme": _,
|
|
3035
|
+
children: [/* @__PURE__ */ W(Zt, {
|
|
3036
|
+
host: a,
|
|
3037
|
+
store: S
|
|
3038
|
+
}), /* @__PURE__ */ W(Qt, {
|
|
3039
|
+
catalogWidth: e,
|
|
3040
|
+
createFlow: t,
|
|
3041
|
+
createFlowDisabled: n,
|
|
3042
|
+
createFlowField: r,
|
|
3043
|
+
flowBadges: i,
|
|
3044
|
+
hostAction: s,
|
|
3045
|
+
hostTitle: c,
|
|
3046
|
+
hrefFor: l,
|
|
3047
|
+
language: u,
|
|
3048
|
+
navigation: x,
|
|
3049
|
+
onConfigureConnector: f,
|
|
3050
|
+
onHostAction: p,
|
|
3051
|
+
onLanguageChange: m,
|
|
3052
|
+
store: S,
|
|
3053
|
+
theme: _
|
|
2979
3054
|
})]
|
|
2980
3055
|
})
|
|
2981
3056
|
});
|
|
2982
3057
|
}
|
|
2983
|
-
function
|
|
2984
|
-
return /* @__PURE__ */ W(
|
|
3058
|
+
function en({ sessionKey: e, ...t }) {
|
|
3059
|
+
return /* @__PURE__ */ W($t, { ...t }, e);
|
|
2985
3060
|
}
|
|
2986
3061
|
//#endregion
|
|
2987
|
-
export {
|
|
3062
|
+
export { Xt as OpenFlowSessionGate, en as OpenFlowWorkbench, Ve as isWorkbenchLanguage, He as resolveWorkbenchLanguage, Be as workbenchLanguageNames, ze as workbenchLanguages };
|