@oomol-lab/open-flow 0.1.0-beta.2 → 0.1.0-beta.3
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/{diagnostics-giPSzyMo.js → diagnostics-SDCyFuxm.js} +3789 -1501
- package/dist/browser/dist-CP0883sY.js +4 -0
- package/dist/browser/{esm-B_PbUobB.js → esm-C2UUqIUP.js} +1 -1
- package/dist/browser/{flowRunInputEditorStore-BeyUSWpO.js → flowRunInputEditorStore-CwvOiIiU.js} +719 -718
- package/dist/browser/{flowWorkspace-DAMLVMcF.js → flowWorkspace-BZ_eiQNR.js} +10596 -12787
- package/dist/browser/{markdownContent-DdlIRN3_.js → markdownContent-DUfLdnUt.js} +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +141 -141
- package/dist/common/flow-semantics.js +3356 -1082
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
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
3
|
import { At as s, It as c, Jn as l, Kn as u, Mt as d, Ot as f, Qn as p, Xn as m, Yn as h, Zn as g, er as _, jt as v } from "./getPseudoElementBounds-ESJExRFX.js";
|
|
4
|
-
import { A as y, At as b, B as x, C as S,
|
|
4
|
+
import { A as y, At as b, B as x, C as S, D as C, Dt as ee, E as te, Et as ne, Ft as w, G as re, H as ie, It as T, J as ae, K as E, L as D, M as O, Mt as oe, N as k, Nt as se, O as A, Ot as ce, P as j, Pt as le, Rt as ue, S as de, Tt as M, U as fe, V as N, W as pe, _ as me, a as P, b as he, c as ge, d as F, f as _e, g as ve, h as ye, i as be, j as I, jt as L, kt as R, l as xe, m as Se, n as Ce, p as we, q as Te, s as Ee, t as De, u as Oe, v as ke, w as Ae, wt as je, x as Me, y as Ne, z, zt as B } from "./diagnostics-SDCyFuxm.js";
|
|
5
5
|
import { t as Pe } from "./workbenchSelect-B2s1HV-Y.js";
|
|
6
6
|
import { a as V, i as Fe, n as Ie, r as Le } from "./languages-DgJehE1g.js";
|
|
7
7
|
import { Suspense as Re, lazy as ze, useEffect as H, useRef as Be, useState as U } from "react";
|
|
@@ -133,7 +133,7 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
133
133
|
e.preventDefault();
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
je(e, () => o(n));
|
|
137
137
|
},
|
|
138
138
|
render: /* @__PURE__ */ W("a", { href: n.status == "retiring" ? void 0 : a }),
|
|
139
139
|
tabIndex: n.status == "retiring" ? -1 : void 0,
|
|
@@ -149,7 +149,7 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
|
|
|
149
149
|
children: [/* @__PURE__ */ W("strong", {
|
|
150
150
|
className: "min-w-0 truncate",
|
|
151
151
|
children: n.name
|
|
152
|
-
}), e != null && /* @__PURE__ */ W(
|
|
152
|
+
}), e != null && /* @__PURE__ */ W(w, {
|
|
153
153
|
className: "min-w-0 shrink",
|
|
154
154
|
title: e,
|
|
155
155
|
variant: "secondary",
|
|
@@ -266,22 +266,22 @@ function Je() {
|
|
|
266
266
|
children: [
|
|
267
267
|
/* @__PURE__ */ G("span", {
|
|
268
268
|
className: "resource-primary-cell",
|
|
269
|
-
children: [/* @__PURE__ */ W(
|
|
269
|
+
children: [/* @__PURE__ */ W(M, { className: "size-8 shrink-0" }), /* @__PURE__ */ G("span", {
|
|
270
270
|
className: "resource-skeleton-copy",
|
|
271
|
-
children: [/* @__PURE__ */ W(
|
|
271
|
+
children: [/* @__PURE__ */ W(M, { className: "h-3.5 w-36" }), /* @__PURE__ */ W(M, { className: "h-2.5 w-48 max-w-full" })]
|
|
272
272
|
})]
|
|
273
273
|
}),
|
|
274
|
-
/* @__PURE__ */ W(
|
|
275
|
-
/* @__PURE__ */ W(
|
|
274
|
+
/* @__PURE__ */ W(M, { className: "h-3 w-28" }),
|
|
275
|
+
/* @__PURE__ */ W(M, { className: "h-3 w-16" })
|
|
276
276
|
]
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForFlow: i, hostAction: o, hostTitle: s, language: c, onCreateFlow: l, onHostAction: u, onLanguageChange: d, onSelectFlow: m, store: h }) {
|
|
280
|
-
let g = r(), _ = a(h.workspace.$.busy), y = a(h.workspace.$.flowLoadFailed), x = a(h.workspace.$.flowLoadMoreFailed), S = a(h.workspace.$.flowLoading), C = a(h.workspace.$.flowLoadingMore),
|
|
281
|
-
async function
|
|
280
|
+
let g = r(), _ = a(h.workspace.$.busy), y = a(h.workspace.$.flowLoadFailed), x = a(h.workspace.$.flowLoadMoreFailed), S = a(h.workspace.$.flowLoading), C = a(h.workspace.$.flowLoadingMore), te = a(h.workspace.$.flowNextCursor), w = a(h.workspace.$.flows), re = a(h.workspace.$.flowTotal), [ie, T] = U(!1), [E, D] = U(""), [O, k] = U(""), A = E.trim().toLocaleLowerCase(), j = w.filter((e) => e.name.toLocaleLowerCase().includes(A));
|
|
281
|
+
async function ue(e) {
|
|
282
282
|
e.preventDefault();
|
|
283
|
-
let t =
|
|
284
|
-
v(t) != null || !await l(t) || (
|
|
283
|
+
let t = O.trim();
|
|
284
|
+
v(t) != null || !await l(t) || (T(!1), k(""));
|
|
285
285
|
}
|
|
286
286
|
return /* @__PURE__ */ W("main", {
|
|
287
287
|
className: "resource-browser",
|
|
@@ -302,13 +302,13 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
|
|
|
302
302
|
}),
|
|
303
303
|
/* @__PURE__ */ G(p, {
|
|
304
304
|
disabled: _ != null,
|
|
305
|
-
onClick: () =>
|
|
305
|
+
onClick: () => T(!0),
|
|
306
306
|
children: [/* @__PURE__ */ W(f, {
|
|
307
307
|
"data-icon": "inline-start",
|
|
308
308
|
name: "plus"
|
|
309
309
|
}), g("resource.newFlow")]
|
|
310
310
|
}),
|
|
311
|
-
o != null && s != null && u != null && /* @__PURE__ */ W(
|
|
311
|
+
o != null && s != null && u != null && /* @__PURE__ */ W(ae, {
|
|
312
312
|
action: o,
|
|
313
313
|
onAction: u,
|
|
314
314
|
title: s
|
|
@@ -327,21 +327,21 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
|
|
|
327
327
|
children: [/* @__PURE__ */ W("h2", {
|
|
328
328
|
id: "flow-list-title",
|
|
329
329
|
children: g("resource.allFlows")
|
|
330
|
-
}), !S && /* @__PURE__ */ W("span", { children: g("resource.flowCount", { count:
|
|
330
|
+
}), !S && /* @__PURE__ */ W("span", { children: g("resource.flowCount", { count: re ?? w.length }) })]
|
|
331
331
|
}), /* @__PURE__ */ G("div", {
|
|
332
332
|
className: "resource-list-actions",
|
|
333
|
-
children: [/* @__PURE__ */ G(
|
|
333
|
+
children: [/* @__PURE__ */ G(ne, {
|
|
334
334
|
className: "w-full sm:w-56",
|
|
335
|
-
children: [/* @__PURE__ */ W(
|
|
335
|
+
children: [/* @__PURE__ */ W(ee, { children: /* @__PURE__ */ W(f, {
|
|
336
336
|
name: "search",
|
|
337
337
|
size: 17
|
|
338
|
-
}) }), /* @__PURE__ */ W(
|
|
338
|
+
}) }), /* @__PURE__ */ W(ce, {
|
|
339
339
|
autoComplete: "off",
|
|
340
340
|
"aria-label": g("resource.searchFlows"),
|
|
341
341
|
name: "flow-search",
|
|
342
|
-
onChange: (e) =>
|
|
342
|
+
onChange: (e) => D(e.target.value),
|
|
343
343
|
placeholder: g("resource.searchFlows"),
|
|
344
|
-
value:
|
|
344
|
+
value: E
|
|
345
345
|
})]
|
|
346
346
|
}), /* @__PURE__ */ W(p, {
|
|
347
347
|
"aria-label": g("common.refresh"),
|
|
@@ -365,45 +365,45 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
|
|
|
365
365
|
}),
|
|
366
366
|
/* @__PURE__ */ W("div", {
|
|
367
367
|
className: "resource-list",
|
|
368
|
-
children: S ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ W(Je, {}, t)) : y ? /* @__PURE__ */ G(
|
|
368
|
+
children: S ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ W(Je, {}, t)) : y ? /* @__PURE__ */ G(R, {
|
|
369
369
|
className: "min-h-64",
|
|
370
370
|
role: "alert",
|
|
371
|
-
children: [/* @__PURE__ */ G(
|
|
372
|
-
/* @__PURE__ */ W(
|
|
371
|
+
children: [/* @__PURE__ */ G(oe, { children: [
|
|
372
|
+
/* @__PURE__ */ W(se, {
|
|
373
373
|
variant: "icon",
|
|
374
374
|
children: /* @__PURE__ */ W(f, {
|
|
375
375
|
name: "alert",
|
|
376
376
|
size: 20
|
|
377
377
|
})
|
|
378
378
|
}),
|
|
379
|
-
/* @__PURE__ */ W(
|
|
380
|
-
/* @__PURE__ */ W(
|
|
381
|
-
] }), /* @__PURE__ */ W(
|
|
379
|
+
/* @__PURE__ */ W(le, { children: g("resource.flowsLoadFailed") }),
|
|
380
|
+
/* @__PURE__ */ W(L, { children: g("resource.flowsLoadFailedDescription") })
|
|
381
|
+
] }), /* @__PURE__ */ W(b, { children: /* @__PURE__ */ W(p, {
|
|
382
382
|
onClick: () => void h.retryFlows(),
|
|
383
383
|
variant: "outline",
|
|
384
384
|
children: g("empty.retry")
|
|
385
385
|
}) })]
|
|
386
|
-
}) :
|
|
386
|
+
}) : j.length == 0 ? /* @__PURE__ */ G(R, {
|
|
387
387
|
className: "min-h-64",
|
|
388
|
-
children: [/* @__PURE__ */ G(
|
|
389
|
-
/* @__PURE__ */ W(
|
|
388
|
+
children: [/* @__PURE__ */ G(oe, { children: [
|
|
389
|
+
/* @__PURE__ */ W(se, {
|
|
390
390
|
variant: "icon",
|
|
391
391
|
children: /* @__PURE__ */ W(f, {
|
|
392
392
|
name: "flow",
|
|
393
393
|
size: 20
|
|
394
394
|
})
|
|
395
395
|
}),
|
|
396
|
-
/* @__PURE__ */ W(
|
|
397
|
-
/* @__PURE__ */ W(
|
|
398
|
-
] }),
|
|
399
|
-
onClick: () =>
|
|
396
|
+
/* @__PURE__ */ W(le, { children: g(A.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
|
|
397
|
+
/* @__PURE__ */ W(L, { children: g(A.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
|
|
398
|
+
] }), A.length == 0 && /* @__PURE__ */ W(b, { children: /* @__PURE__ */ G(p, {
|
|
399
|
+
onClick: () => T(!0),
|
|
400
400
|
variant: "outline",
|
|
401
401
|
children: [/* @__PURE__ */ W(f, {
|
|
402
402
|
"data-icon": "inline-start",
|
|
403
403
|
name: "plus"
|
|
404
404
|
}), g("resource.newFlow")]
|
|
405
405
|
}) })]
|
|
406
|
-
}) :
|
|
406
|
+
}) : j.map((e) => /* @__PURE__ */ W(qe, {
|
|
407
407
|
badge: n?.[e.flowId],
|
|
408
408
|
busy: _,
|
|
409
409
|
flow: e,
|
|
@@ -412,7 +412,7 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
|
|
|
412
412
|
store: h
|
|
413
413
|
}, e.flowId))
|
|
414
414
|
}),
|
|
415
|
-
|
|
415
|
+
te != null && /* @__PURE__ */ W("div", {
|
|
416
416
|
className: "resource-list-footer",
|
|
417
417
|
children: /* @__PURE__ */ W(p, {
|
|
418
418
|
disabled: C,
|
|
@@ -423,18 +423,18 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
|
|
|
423
423
|
})
|
|
424
424
|
]
|
|
425
425
|
}),
|
|
426
|
-
|
|
426
|
+
ie && /* @__PURE__ */ W(Re, {
|
|
427
427
|
fallback: null,
|
|
428
428
|
children: /* @__PURE__ */ W(We, {
|
|
429
429
|
disabled: e,
|
|
430
430
|
field: t,
|
|
431
431
|
id: "flow-name",
|
|
432
|
-
issue: v(
|
|
432
|
+
issue: v(O),
|
|
433
433
|
label: g("resource.flowName"),
|
|
434
|
-
name:
|
|
435
|
-
onNameChange:
|
|
436
|
-
onOpenChange:
|
|
437
|
-
onSubmit: (e) => void
|
|
434
|
+
name: O,
|
|
435
|
+
onNameChange: k,
|
|
436
|
+
onOpenChange: T,
|
|
437
|
+
onSubmit: (e) => void ue(e),
|
|
438
438
|
pending: _ == "flow",
|
|
439
439
|
title: g("resource.newFlow")
|
|
440
440
|
})
|
|
@@ -477,7 +477,7 @@ function $e(e, t, n) {
|
|
|
477
477
|
target: n.target,
|
|
478
478
|
targetHandle: n.targetHandle
|
|
479
479
|
}, i = tt(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
|
|
480
|
-
return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] :
|
|
480
|
+
return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : ie(e, [{
|
|
481
481
|
edge: r,
|
|
482
482
|
kind: "graph.edge.connect",
|
|
483
483
|
target: t
|
|
@@ -546,16 +546,16 @@ var ct = class {
|
|
|
546
546
|
#e;
|
|
547
547
|
#t;
|
|
548
548
|
#n;
|
|
549
|
-
#r = new
|
|
550
|
-
#i = new
|
|
549
|
+
#r = new N();
|
|
550
|
+
#i = new N();
|
|
551
551
|
#a;
|
|
552
|
-
#o = new
|
|
553
|
-
#s = new
|
|
552
|
+
#o = new N();
|
|
553
|
+
#s = new N();
|
|
554
554
|
#c;
|
|
555
555
|
#l = t(K);
|
|
556
556
|
#u;
|
|
557
557
|
#d;
|
|
558
|
-
constructor(t, n, r, i, a = () => crypto.randomUUID(), o =
|
|
558
|
+
constructor(t, n, r, i, a = () => crypto.randomUUID(), o = T()) {
|
|
559
559
|
this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
|
|
560
560
|
activities: e(this.#l, (e) => e.activities),
|
|
561
561
|
activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
|
|
@@ -618,7 +618,7 @@ var ct = class {
|
|
|
618
618
|
this.#y({
|
|
619
619
|
loadFailed: !0,
|
|
620
620
|
loading: !1
|
|
621
|
-
}), this.#c(
|
|
621
|
+
}), this.#c(x(e, this.#n.t));
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
async loadMore() {
|
|
@@ -647,7 +647,7 @@ var ct = class {
|
|
|
647
647
|
this.#y({
|
|
648
648
|
loadMoreFailed: !0,
|
|
649
649
|
loadingMore: !1
|
|
650
|
-
}), this.#c(
|
|
650
|
+
}), this.#c(x(e, this.#n.t));
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
async publish() {
|
|
@@ -670,7 +670,7 @@ var ct = class {
|
|
|
670
670
|
publishing: i.status == "pending"
|
|
671
671
|
}), await this.#g(n, i, o, e.name)) : !1;
|
|
672
672
|
} catch (e) {
|
|
673
|
-
return o() ? (e instanceof
|
|
673
|
+
return o() ? (e instanceof B && e.code == "live.conflict" && await this.#p(n), this.#c(x(e, this.#n.t)), !1) : !1;
|
|
674
674
|
} finally {
|
|
675
675
|
o() && this.#y({ publishing: !1 });
|
|
676
676
|
}
|
|
@@ -694,7 +694,7 @@ var ct = class {
|
|
|
694
694
|
message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
|
|
695
695
|
}), !0);
|
|
696
696
|
} catch (e) {
|
|
697
|
-
return s() ? (e instanceof
|
|
697
|
+
return s() ? (e instanceof B && e.code == "live.conflict" && await this.#p(r), this.#c(x(e, this.#n.t)), !1) : !1;
|
|
698
698
|
} finally {
|
|
699
699
|
s() && this.#y({ rollingBackPublicationId: void 0 });
|
|
700
700
|
}
|
|
@@ -735,7 +735,7 @@ var ct = class {
|
|
|
735
735
|
this.#y({
|
|
736
736
|
activitiesLoading: !1,
|
|
737
737
|
detailLoading: !1
|
|
738
|
-
}), this.#c(
|
|
738
|
+
}), this.#c(x(r.reason, this.#n.t));
|
|
739
739
|
return;
|
|
740
740
|
}
|
|
741
741
|
this.#y({
|
|
@@ -749,7 +749,7 @@ var ct = class {
|
|
|
749
749
|
}) : (this.#y({
|
|
750
750
|
activitiesLoadFailed: !0,
|
|
751
751
|
activitiesLoading: !1
|
|
752
|
-
}), this.#c(
|
|
752
|
+
}), this.#c(x(i.reason, this.#n.t)));
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
async loadMoreTriggerActivities() {
|
|
@@ -778,7 +778,7 @@ var ct = class {
|
|
|
778
778
|
this.#y({
|
|
779
779
|
activitiesLoadFailed: !0,
|
|
780
780
|
activitiesLoadingMore: !1
|
|
781
|
-
}), this.#c(
|
|
781
|
+
}), this.#c(x(e, this.#n.t));
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
async testTrigger() {
|
|
@@ -793,7 +793,7 @@ var ct = class {
|
|
|
793
793
|
let e = await this.#e.testFlowPollTrigger(n.flowId, t);
|
|
794
794
|
return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#y({ testResult: e }), !0);
|
|
795
795
|
} catch (e) {
|
|
796
|
-
return i() && this.#l.value.selectedTriggerId == t && this.#c(
|
|
796
|
+
return i() && this.#l.value.selectedTriggerId == t && this.#c(x(e, this.#n.t)), !1;
|
|
797
797
|
} finally {
|
|
798
798
|
i() && this.#l.value.selectedTriggerId == t && this.#y({ testingTriggerId: void 0 });
|
|
799
799
|
}
|
|
@@ -811,7 +811,7 @@ var ct = class {
|
|
|
811
811
|
message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
|
|
812
812
|
}), !0) : !1;
|
|
813
813
|
} catch (e) {
|
|
814
|
-
return n() && this.#c(
|
|
814
|
+
return n() && this.#c(x(e, this.#n.t)), !1;
|
|
815
815
|
} finally {
|
|
816
816
|
n() && this.#y({ changingTriggerId: void 0 });
|
|
817
817
|
}
|
|
@@ -849,7 +849,7 @@ var ct = class {
|
|
|
849
849
|
if (t != null && t != "") try {
|
|
850
850
|
return await this.#e.getPublishOperation(e.flowId, t);
|
|
851
851
|
} catch (t) {
|
|
852
|
-
if (t instanceof
|
|
852
|
+
if (t instanceof B && t.code == "publication.operation-not-found") {
|
|
853
853
|
this.#a.setItem(this.#_(e.flowId), "");
|
|
854
854
|
return;
|
|
855
855
|
}
|
|
@@ -864,11 +864,11 @@ var ct = class {
|
|
|
864
864
|
i = await this.#e.getPublishOperation(e.flowId, i.operationId);
|
|
865
865
|
} catch (t) {
|
|
866
866
|
if (!n()) return !1;
|
|
867
|
-
if (t instanceof
|
|
867
|
+
if (t instanceof B && t.code == "publication.operation-not-found") return this.#a.setItem(this.#_(e.flowId), ""), this.#v(e, {
|
|
868
868
|
operation: void 0,
|
|
869
869
|
publishing: !1
|
|
870
|
-
}), this.#c(
|
|
871
|
-
this.#c(
|
|
870
|
+
}), this.#c(x(t, this.#n.t)), !1;
|
|
871
|
+
this.#c(x(t, this.#n.t));
|
|
872
872
|
continue;
|
|
873
873
|
}
|
|
874
874
|
if (!n()) return !1;
|
|
@@ -884,7 +884,7 @@ var ct = class {
|
|
|
884
884
|
try {
|
|
885
885
|
await this.#f(e);
|
|
886
886
|
} catch (e) {
|
|
887
|
-
return n() && this.#c(
|
|
887
|
+
return n() && this.#c(x(e, this.#n.t)), !0;
|
|
888
888
|
}
|
|
889
889
|
return n() ? (this.#c({
|
|
890
890
|
kind: "success",
|
|
@@ -920,7 +920,7 @@ function dt(e) {
|
|
|
920
920
|
return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
|
|
921
921
|
}
|
|
922
922
|
async function ft(e, t) {
|
|
923
|
-
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-
|
|
923
|
+
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-CwvOiIiU.js").then((e) => e.n), r = z(e), i = r.graph({ kind: "flow" });
|
|
924
924
|
return i == null ? [] : Object.entries(i.nodes).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, i]) => {
|
|
925
925
|
let a = r.resolveNode(e, i);
|
|
926
926
|
if (a.kind == "trigger") return [];
|
|
@@ -940,13 +940,13 @@ var pt = class {
|
|
|
940
940
|
#e;
|
|
941
941
|
#t;
|
|
942
942
|
#n;
|
|
943
|
-
#r = new
|
|
944
|
-
#i = new
|
|
943
|
+
#r = new N();
|
|
944
|
+
#i = new N();
|
|
945
945
|
#a;
|
|
946
946
|
#o;
|
|
947
947
|
#s = t(lt);
|
|
948
948
|
#c;
|
|
949
|
-
constructor(t, n, r, i =
|
|
949
|
+
constructor(t, n, r, i = T(), a = () => crypto.randomUUID()) {
|
|
950
950
|
this.#e = t, this.#a = n, this.#o = r, this.#n = i, this.#t = a, this.$ = {
|
|
951
951
|
inputRequest: e(this.#s, (e) => e.inputRequest),
|
|
952
952
|
starting: e(this.#s, (e) => e.starting),
|
|
@@ -976,7 +976,7 @@ var pt = class {
|
|
|
976
976
|
let r = await this.#e.getRevision(e.flowId, n.revisionId);
|
|
977
977
|
return t() ? await this.#l("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
|
|
978
978
|
} catch (e) {
|
|
979
|
-
return t() && this.#o(
|
|
979
|
+
return t() && this.#o(x(e, this.#n.t)), "unavailable";
|
|
980
980
|
} finally {
|
|
981
981
|
t() && this.#f({ starting: !1 });
|
|
982
982
|
}
|
|
@@ -1060,7 +1060,7 @@ var pt = class {
|
|
|
1060
1060
|
});
|
|
1061
1061
|
return !a() || !o() ? !1 : (this.#c = void 0, this.#a.follow(s, o));
|
|
1062
1062
|
} catch (e) {
|
|
1063
|
-
return a() && o() && this.#o(
|
|
1063
|
+
return a() && o() && this.#o(x(e, this.#n.t)), !1;
|
|
1064
1064
|
} finally {
|
|
1065
1065
|
a() && this.#f({
|
|
1066
1066
|
starting: !1,
|
|
@@ -1176,8 +1176,8 @@ var yt = class {
|
|
|
1176
1176
|
#f;
|
|
1177
1177
|
#p;
|
|
1178
1178
|
#m;
|
|
1179
|
-
constructor(r, i, a, o, s =
|
|
1180
|
-
this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new
|
|
1179
|
+
constructor(r, i, a, o, s = T()) {
|
|
1180
|
+
this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new N(), this.#u = t(mt), this.#m = !1, this.browseAddNodeOptions = async (e) => {
|
|
1181
1181
|
if (this.#m) return;
|
|
1182
1182
|
let t = this.#d.$.flowId.value;
|
|
1183
1183
|
if (t == null) return;
|
|
@@ -1270,7 +1270,7 @@ var yt = class {
|
|
|
1270
1270
|
} catch (e) {
|
|
1271
1271
|
this.#b(t, n) && this.#y({ actionError: {
|
|
1272
1272
|
actionId: r.actionId,
|
|
1273
|
-
message:
|
|
1273
|
+
message: x(e, this.#t.t).message
|
|
1274
1274
|
} });
|
|
1275
1275
|
} finally {
|
|
1276
1276
|
this.#b(t, n) && this.#u.value.actionLoading == r.actionId && this.#y({ actionLoading: void 0 });
|
|
@@ -1295,7 +1295,7 @@ var yt = class {
|
|
|
1295
1295
|
serviceId: e
|
|
1296
1296
|
}, this.#y({ authorizationServiceId: e });
|
|
1297
1297
|
} catch (e) {
|
|
1298
|
-
this.#m || this.#l(
|
|
1298
|
+
this.#m || this.#l(x(e, this.#t.t));
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
1301
|
async setConnection(e, t) {
|
|
@@ -1328,13 +1328,13 @@ var yt = class {
|
|
|
1328
1328
|
a = await this.#e.listConnectorConnections(t, void 0, e);
|
|
1329
1329
|
} catch (n) {
|
|
1330
1330
|
this.#b(r, e) && this.#y({ connectionError: {
|
|
1331
|
-
message:
|
|
1331
|
+
message: x(n, this.#t.t).message,
|
|
1332
1332
|
serviceId: t
|
|
1333
1333
|
} });
|
|
1334
1334
|
return;
|
|
1335
1335
|
}
|
|
1336
1336
|
if (!this.#b(r, e)) return;
|
|
1337
|
-
let o =
|
|
1337
|
+
let o = C(a);
|
|
1338
1338
|
return this.#y({ catalogs: {
|
|
1339
1339
|
...this.#u.value.catalogs,
|
|
1340
1340
|
[t]: o
|
|
@@ -1415,8 +1415,8 @@ var Ct = class {
|
|
|
1415
1415
|
#c;
|
|
1416
1416
|
#l;
|
|
1417
1417
|
#u;
|
|
1418
|
-
constructor(r, i, a, o, s =
|
|
1419
|
-
this.#t = new AbortController(), this.#a = new
|
|
1418
|
+
constructor(r, i, a, o, s = T()) {
|
|
1419
|
+
this.#t = new AbortController(), this.#a = new N(), this.#c = t(bt), this.#u = !1, this.browseAddNodeOptions = async (e) => {
|
|
1420
1420
|
let t = this.#l.$.flowId.value;
|
|
1421
1421
|
if (e.aborted || this.#u || t == null || this.#l.$.target.value?.kind != "flow") return [];
|
|
1422
1422
|
let n = await this.#d();
|
|
@@ -1478,7 +1478,7 @@ var Ct = class {
|
|
|
1478
1478
|
connectionLoading: r.provider
|
|
1479
1479
|
});
|
|
1480
1480
|
try {
|
|
1481
|
-
let e =
|
|
1481
|
+
let e = C(await this.#n.listConnectorConnections(r.provider, void 0, n));
|
|
1482
1482
|
if (!this.#p(t, n)) return;
|
|
1483
1483
|
this.#f({ catalogs: {
|
|
1484
1484
|
...this.#c.value.catalogs,
|
|
@@ -1486,7 +1486,7 @@ var Ct = class {
|
|
|
1486
1486
|
} });
|
|
1487
1487
|
} catch (e) {
|
|
1488
1488
|
this.#p(t, n) && this.#f({ connectionError: {
|
|
1489
|
-
message:
|
|
1489
|
+
message: x(e, this.#i.t).message,
|
|
1490
1490
|
provider: r.provider
|
|
1491
1491
|
} });
|
|
1492
1492
|
} finally {
|
|
@@ -1507,7 +1507,7 @@ var Ct = class {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
!this.#u && t == this.#l.$.flowId.value && this.#f({ authorizationProvider: e });
|
|
1509
1509
|
} catch (e) {
|
|
1510
|
-
this.#u || this.#s(
|
|
1510
|
+
this.#u || this.#s(x(e, this.#i.t));
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
async setConnection(e, t) {
|
|
@@ -1610,14 +1610,14 @@ var Dt = class {
|
|
|
1610
1610
|
this.#a = e;
|
|
1611
1611
|
}
|
|
1612
1612
|
project(e) {
|
|
1613
|
-
return this.#o.reduce((e, t) =>
|
|
1613
|
+
return this.#o.reduce((e, t) => P(e, t.changes), e);
|
|
1614
1614
|
}
|
|
1615
1615
|
enqueue(e) {
|
|
1616
1616
|
let t = this.#s.then(e);
|
|
1617
1617
|
return this.#s = t, t;
|
|
1618
1618
|
}
|
|
1619
1619
|
async change(e, t, n, r = !0) {
|
|
1620
|
-
this.#t.beforeChange(r), this.#t.apply(
|
|
1620
|
+
this.#t.beforeChange(r), this.#t.apply(P(t, n));
|
|
1621
1621
|
let i = Et(n), a = this.#o.at(-1), o = i != null && a != null && !a.started && Et(a.changes) == i ? a : void 0;
|
|
1622
1622
|
if (o != null) return o.changes = n, await o.result;
|
|
1623
1623
|
let s = {
|
|
@@ -1646,7 +1646,7 @@ var Dt = class {
|
|
|
1646
1646
|
let r = this.#l(e, n, t);
|
|
1647
1647
|
return this.#o.length == 0 && this.#t.check(), r;
|
|
1648
1648
|
} catch (n) {
|
|
1649
|
-
if (n instanceof
|
|
1649
|
+
if (n instanceof B && n.code == "flow.revision-conflict") {
|
|
1650
1650
|
if (!t && await this.#t.recover(e)) {
|
|
1651
1651
|
t = !0;
|
|
1652
1652
|
continue;
|
|
@@ -1655,7 +1655,7 @@ var Dt = class {
|
|
|
1655
1655
|
kind: "error",
|
|
1656
1656
|
message: this.#n.t("notice.draftConflict")
|
|
1657
1657
|
});
|
|
1658
|
-
} else this.#u(e), this.#t.current(e) && this.#r(
|
|
1658
|
+
} else this.#u(e), this.#t.current(e) && this.#r(x(n, this.#n.t));
|
|
1659
1659
|
return;
|
|
1660
1660
|
}
|
|
1661
1661
|
}
|
|
@@ -1663,7 +1663,7 @@ var Dt = class {
|
|
|
1663
1663
|
#l(e, t, n) {
|
|
1664
1664
|
let r = {
|
|
1665
1665
|
...n.revision,
|
|
1666
|
-
content:
|
|
1666
|
+
content: P(t, e.changes).content
|
|
1667
1667
|
};
|
|
1668
1668
|
this.#o = this.#o.filter((t) => t !== e), this.#a = r;
|
|
1669
1669
|
let i = this.#t.diagnostics(), a = this.#o.length == 0 && i?.revisionId == r.revisionId;
|
|
@@ -1682,7 +1682,7 @@ var Dt = class {
|
|
|
1682
1682
|
}, At = class {
|
|
1683
1683
|
#e;
|
|
1684
1684
|
#t;
|
|
1685
|
-
#n = new
|
|
1685
|
+
#n = new N();
|
|
1686
1686
|
#r;
|
|
1687
1687
|
#i = t(kt);
|
|
1688
1688
|
#a = !1;
|
|
@@ -1741,7 +1741,7 @@ var Dt = class {
|
|
|
1741
1741
|
this.#o({
|
|
1742
1742
|
failed: !0,
|
|
1743
1743
|
loading: !1
|
|
1744
|
-
}), this.#r(
|
|
1744
|
+
}), this.#r(x(t, this.#t.t));
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
1747
|
async loadMore() {
|
|
@@ -1769,7 +1769,7 @@ var Dt = class {
|
|
|
1769
1769
|
this.#o({
|
|
1770
1770
|
loadingMore: !1,
|
|
1771
1771
|
loadMoreFailed: !0
|
|
1772
|
-
}), this.#r(
|
|
1772
|
+
}), this.#r(x(e, this.#t.t));
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
1775
|
async create(e) {
|
|
@@ -1854,7 +1854,7 @@ var Dt = class {
|
|
|
1854
1854
|
this.#c(a, r);
|
|
1855
1855
|
} catch (r) {
|
|
1856
1856
|
if (this.#o || !n()) return;
|
|
1857
|
-
if (r instanceof
|
|
1857
|
+
if (r instanceof B && r.code == "flow.presentation-conflict") try {
|
|
1858
1858
|
let t = await this.#e.getPresentation(e);
|
|
1859
1859
|
if (this.#o || !n()) return;
|
|
1860
1860
|
this.#c(a, t), this.#n({
|
|
@@ -1862,9 +1862,9 @@ var Dt = class {
|
|
|
1862
1862
|
message: this.#t.t("notice.layoutConflict")
|
|
1863
1863
|
});
|
|
1864
1864
|
} catch (e) {
|
|
1865
|
-
!this.#o && n() && this.#n(
|
|
1865
|
+
!this.#o && n() && this.#n(x(e, this.#t.t));
|
|
1866
1866
|
}
|
|
1867
|
-
else this.#c(a, t), this.#n(
|
|
1867
|
+
else this.#c(a, t), this.#n(x(r, this.#t.t));
|
|
1868
1868
|
}
|
|
1869
1869
|
}), await this.#i;
|
|
1870
1870
|
}
|
|
@@ -1910,23 +1910,23 @@ var Pt = class {
|
|
|
1910
1910
|
...n,
|
|
1911
1911
|
status: Z(e.draft, e.moduleEditor)
|
|
1912
1912
|
};
|
|
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 :
|
|
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 : z(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
1914
|
this.#e = e(this.#t, (e) => ({
|
|
1915
|
-
revision: e.draft == null ? void 0 :
|
|
1915
|
+
revision: e.draft == null ? void 0 : z(e.draft),
|
|
1916
1916
|
target: e.target
|
|
1917
1917
|
}), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
|
|
1918
1918
|
let y = e(this.#t, (e) => {
|
|
1919
|
-
if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return
|
|
1919
|
+
if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return z(e.draft).selection(e.target, e.selectedNodeIds[0]);
|
|
1920
1920
|
});
|
|
1921
1921
|
this.$ = {
|
|
1922
1922
|
addNodeOptions: n((e) => {
|
|
1923
1923
|
let { revision: n, target: r } = e(this.#e);
|
|
1924
|
-
return
|
|
1924
|
+
return Ae(n?.revision, r, e(t.t$));
|
|
1925
1925
|
}),
|
|
1926
1926
|
busy: i,
|
|
1927
1927
|
checkLoading: a,
|
|
1928
1928
|
diagnosticFocus: o,
|
|
1929
|
-
diagnosticItems: e(this.#t, (e) =>
|
|
1929
|
+
diagnosticItems: e(this.#t, (e) => Ce(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics)),
|
|
1930
1930
|
diagnostics: s,
|
|
1931
1931
|
draft: c,
|
|
1932
1932
|
flow: n((e) => {
|
|
@@ -1941,7 +1941,7 @@ var Pt = class {
|
|
|
1941
1941
|
flowNextCursor: r.$.nextCursor,
|
|
1942
1942
|
flowTotal: r.$.total,
|
|
1943
1943
|
flows: r.$.flows,
|
|
1944
|
-
inspectorDiagnostics: e(this.#t, (e) =>
|
|
1944
|
+
inspectorDiagnostics: e(this.#t, (e) => De(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics, y.value)),
|
|
1945
1945
|
live: p,
|
|
1946
1946
|
moduleDiagnostics: e(this.#t, (e) => {
|
|
1947
1947
|
let t = e.moduleEditor?.moduleId;
|
|
@@ -1957,7 +1957,7 @@ var Pt = class {
|
|
|
1957
1957
|
target: g,
|
|
1958
1958
|
targetFlow: n((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
|
|
1959
1959
|
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 :
|
|
1960
|
+
if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : z(e.draft).subflow(e.target.id)?.name ?? e.target.id;
|
|
1961
1961
|
}),
|
|
1962
1962
|
workspaceLoadFailed: _,
|
|
1963
1963
|
workspaceLoading: v
|
|
@@ -1986,7 +1986,7 @@ function $(e, t) {
|
|
|
1986
1986
|
var Lt = class {
|
|
1987
1987
|
#e;
|
|
1988
1988
|
#t;
|
|
1989
|
-
#n = new
|
|
1989
|
+
#n = new N();
|
|
1990
1990
|
#r;
|
|
1991
1991
|
#i;
|
|
1992
1992
|
#a;
|
|
@@ -2006,7 +2006,7 @@ var Lt = class {
|
|
|
2006
2006
|
#y = 0;
|
|
2007
2007
|
#b;
|
|
2008
2008
|
#x;
|
|
2009
|
-
constructor(e, t, n = it, r =
|
|
2009
|
+
constructor(e, t, n = it, r = T(), i = () => {}) {
|
|
2010
2010
|
this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new At(e, t, r), this.#l = new Pt(r, this.#o), this.#t = new Dt(e, t, r, {
|
|
2011
2011
|
apply: (e, t) => this.#w(e, t),
|
|
2012
2012
|
beforeChange: (e) => {
|
|
@@ -2075,7 +2075,7 @@ var Lt = class {
|
|
|
2075
2075
|
return t() ? (this.#B({
|
|
2076
2076
|
workspaceLoadFailed: !0,
|
|
2077
2077
|
workspaceLoading: !1
|
|
2078
|
-
}), this.#c(
|
|
2078
|
+
}), this.#c(x(e, this.#r.t)), !1) : !1;
|
|
2079
2079
|
}
|
|
2080
2080
|
return !0;
|
|
2081
2081
|
}
|
|
@@ -2092,7 +2092,7 @@ var Lt = class {
|
|
|
2092
2092
|
selectNodes(e) {
|
|
2093
2093
|
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
2094
|
diagnosticFocus: void 0,
|
|
2095
|
-
moduleEditor: Q(this.#l.value.draft == null ? void 0 :
|
|
2095
|
+
moduleEditor: Q(this.#l.value.draft == null ? void 0 : z(this.#l.value.draft), this.#l.value.target, e),
|
|
2096
2096
|
nodeFocus: void 0,
|
|
2097
2097
|
selectedNodeIds: e
|
|
2098
2098
|
}), !0) : !1;
|
|
@@ -2105,7 +2105,7 @@ var Lt = class {
|
|
|
2105
2105
|
let n = await this.#e.getFlow(await t(e));
|
|
2106
2106
|
return this.#o.insert(n), n;
|
|
2107
2107
|
} catch (e) {
|
|
2108
|
-
this.#_ || this.#c(
|
|
2108
|
+
this.#_ || this.#c(x(e, this.#r.t));
|
|
2109
2109
|
} finally {
|
|
2110
2110
|
this.#B({ busy: void 0 });
|
|
2111
2111
|
}
|
|
@@ -2122,7 +2122,7 @@ var Lt = class {
|
|
|
2122
2122
|
message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
|
|
2123
2123
|
}), !0);
|
|
2124
2124
|
} catch (e) {
|
|
2125
|
-
return this.#_ || this.#c(
|
|
2125
|
+
return this.#_ || this.#c(x(e, this.#r.t)), !1;
|
|
2126
2126
|
} finally {
|
|
2127
2127
|
this.#B({ busy: void 0 });
|
|
2128
2128
|
}
|
|
@@ -2149,7 +2149,7 @@ var Lt = class {
|
|
|
2149
2149
|
try {
|
|
2150
2150
|
i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
|
|
2151
2151
|
} catch (e) {
|
|
2152
|
-
this.#_ || this.#c(
|
|
2152
|
+
this.#_ || this.#c(x(e, this.#r.t));
|
|
2153
2153
|
}
|
|
2154
2154
|
return this.#B({ busy: void 0 }), i != null && (this.#c({
|
|
2155
2155
|
kind: "success",
|
|
@@ -2162,11 +2162,11 @@ var Lt = class {
|
|
|
2162
2162
|
if (r == null || i == null) return;
|
|
2163
2163
|
let a = this.#i();
|
|
2164
2164
|
if (e.kind == "comment") return await this.#S(i, a, t);
|
|
2165
|
-
let o =
|
|
2165
|
+
let o = z(r), s = S(e, o, i, this.#r.t);
|
|
2166
2166
|
if (s == null) return;
|
|
2167
2167
|
let c = be(o, i, a, s, this.#i);
|
|
2168
2168
|
if (c == null) return;
|
|
2169
|
-
let l = n == null ? c : [...c, ...$e(
|
|
2169
|
+
let l = n == null ? c : [...c, ...$e(P(r, c).content, i, n(a))], u = this.#C(l);
|
|
2170
2170
|
this.selectNodes([a]);
|
|
2171
2171
|
let d = this.moveNodes({ [a]: t });
|
|
2172
2172
|
if (await u != null && (await d, !this.#_)) return this.#B({ nodeFocus: {
|
|
@@ -2190,7 +2190,7 @@ var Lt = class {
|
|
|
2190
2190
|
if (!this.#F()) return;
|
|
2191
2191
|
let e = this.$.revision.value, t = this.#l.value.target;
|
|
2192
2192
|
if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
|
|
2193
|
-
let n =
|
|
2193
|
+
let n = te(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = xe(e, t, this.#l.value.selectedNodeIds), a = i.length == 0 ? void 0 : this.#C(i), o = r.size == 0 ? void 0 : this.#T((e) => y(e, t, r));
|
|
2194
2194
|
this.selectNodes([]), (a == null || await a != null) && await o;
|
|
2195
2195
|
}
|
|
2196
2196
|
copySelectedNodes() {
|
|
@@ -2204,14 +2204,14 @@ var Lt = class {
|
|
|
2204
2204
|
sourceId: e.id,
|
|
2205
2205
|
title: e.title
|
|
2206
2206
|
}] : []),
|
|
2207
|
-
nodes:
|
|
2207
|
+
nodes: Ee(e, t, this.#l.value.selectedNodeIds)
|
|
2208
2208
|
};
|
|
2209
2209
|
}
|
|
2210
2210
|
async pasteNodes(e) {
|
|
2211
2211
|
if (!this.#F()) return;
|
|
2212
2212
|
let t = this.$.revision.value, n = this.#l.value.target;
|
|
2213
2213
|
if (t == null || n == null || this.#u == null) return;
|
|
2214
|
-
let r =
|
|
2214
|
+
let r = Oe(t, n, this.#u.nodes, this.#i), i = r.changes.length == 0 ? void 0 : this.#C(r.changes), a = this.#u.comments.map((e) => ({
|
|
2215
2215
|
...e,
|
|
2216
2216
|
nodeId: this.#i()
|
|
2217
2217
|
}));
|
|
@@ -2223,8 +2223,8 @@ var Lt = class {
|
|
|
2223
2223
|
y: (i?.y ?? 80) + 40
|
|
2224
2224
|
}];
|
|
2225
2225
|
})), c = this.#T((e) => {
|
|
2226
|
-
let t =
|
|
2227
|
-
for (let e of a) t =
|
|
2226
|
+
let t = k(e, n, s);
|
|
2227
|
+
for (let e of a) t = I(t, n, e.nodeId, {
|
|
2228
2228
|
content: e.content,
|
|
2229
2229
|
position: {
|
|
2230
2230
|
x: e.position.x + 40,
|
|
@@ -2242,7 +2242,7 @@ var Lt = class {
|
|
|
2242
2242
|
async saveNodeSettings(e, t) {
|
|
2243
2243
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2244
2244
|
if (n == null || r == null) return !1;
|
|
2245
|
-
let i =
|
|
2245
|
+
let i = ke(n, r, e, t);
|
|
2246
2246
|
return i != null && await this.#C(i) != null;
|
|
2247
2247
|
}
|
|
2248
2248
|
async saveNodeDescription(e, t) {
|
|
@@ -2266,19 +2266,19 @@ var Lt = class {
|
|
|
2266
2266
|
async setInputValue(e, t, n) {
|
|
2267
2267
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2268
2268
|
if (r == null || i == null) return !1;
|
|
2269
|
-
let a =
|
|
2269
|
+
let a = F(r, i, e, t, n);
|
|
2270
2270
|
return a != null && await this.#C(a) != null;
|
|
2271
2271
|
}
|
|
2272
2272
|
async setInputVariable(e, t, n) {
|
|
2273
2273
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2274
2274
|
if (r == null || i == null) return !1;
|
|
2275
|
-
let a = n == null ?
|
|
2275
|
+
let a = n == null ? F(r, i, e, t, void 0) : _e(r, i, e, t, n, this.#i());
|
|
2276
2276
|
return a != null && await this.#C(a) != null;
|
|
2277
2277
|
}
|
|
2278
2278
|
async saveCondition(e, t) {
|
|
2279
2279
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2280
2280
|
if (n == null || r == null) return !1;
|
|
2281
|
-
let i =
|
|
2281
|
+
let i = Se(n, r, e, t);
|
|
2282
2282
|
return i != null && await this.#C(i) != null;
|
|
2283
2283
|
}
|
|
2284
2284
|
async saveValue(e, t) {
|
|
@@ -2291,7 +2291,7 @@ var Lt = class {
|
|
|
2291
2291
|
let n = this.#l.value.target;
|
|
2292
2292
|
if (n == null) return;
|
|
2293
2293
|
let r = this.#P().nodes.find((t) => t.id == e)?.position;
|
|
2294
|
-
r != null && await this.#T((i) =>
|
|
2294
|
+
r != null && await this.#T((i) => I(i, n, e, {
|
|
2295
2295
|
...t,
|
|
2296
2296
|
position: r
|
|
2297
2297
|
}));
|
|
@@ -2305,43 +2305,43 @@ var Lt = class {
|
|
|
2305
2305
|
async saveCodeTaskPorts(e, t) {
|
|
2306
2306
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2307
2307
|
if (n == null || r == null) return !1;
|
|
2308
|
-
let i =
|
|
2308
|
+
let i = we(n, r, e, t);
|
|
2309
2309
|
return i != null && await this.#C(i) != null;
|
|
2310
2310
|
}
|
|
2311
2311
|
async setConnectorConnection(e, t) {
|
|
2312
2312
|
let n = this.$.revision.value;
|
|
2313
2313
|
if (n == null) return !1;
|
|
2314
|
-
let r =
|
|
2314
|
+
let r = fe(n.revision.content, e, t);
|
|
2315
2315
|
return r != null && await this.#C(r) != null;
|
|
2316
2316
|
}
|
|
2317
2317
|
async saveTriggerSettings(e, t) {
|
|
2318
2318
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2319
2319
|
if (n == null || r?.kind != "flow") return !1;
|
|
2320
|
-
let i =
|
|
2320
|
+
let i = re(n.revision.content, r, e, t);
|
|
2321
2321
|
return i != null && await this.#C(i) != null;
|
|
2322
2322
|
}
|
|
2323
2323
|
async saveTriggerConfig(e, t, n) {
|
|
2324
2324
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2325
2325
|
if (r == null || i?.kind != "flow") return !1;
|
|
2326
|
-
let a =
|
|
2326
|
+
let a = E(r.revision.content, i, e, t, n);
|
|
2327
2327
|
return a != null && await this.#C(a) != null;
|
|
2328
2328
|
}
|
|
2329
2329
|
async saveTriggerSchedule(e, t) {
|
|
2330
2330
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2331
2331
|
if (n == null || r?.kind != "flow") return !1;
|
|
2332
|
-
let i =
|
|
2332
|
+
let i = Te(n.revision.content, r, e, t);
|
|
2333
2333
|
return i != null && await this.#C(i) != null;
|
|
2334
2334
|
}
|
|
2335
2335
|
async saveWebhook(e, t) {
|
|
2336
2336
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2337
2337
|
if (n == null || r?.kind != "flow") return !1;
|
|
2338
|
-
let i =
|
|
2338
|
+
let i = de(n, r, e, t);
|
|
2339
2339
|
return i != null && await this.#C(i) != null;
|
|
2340
2340
|
}
|
|
2341
2341
|
async setTriggerConnection(e, t) {
|
|
2342
2342
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2343
2343
|
if (n == null || r?.kind != "flow") return !1;
|
|
2344
|
-
let i =
|
|
2344
|
+
let i = pe(n.revision.content, r, e, t);
|
|
2345
2345
|
return i != null && await this.#C(i) != null;
|
|
2346
2346
|
}
|
|
2347
2347
|
async saveSubflowSettings(e, t) {
|
|
@@ -2388,13 +2388,13 @@ var Lt = class {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
async moveNodes(e, t = "detail") {
|
|
2390
2390
|
let n = this.#l.value.target;
|
|
2391
|
-
n != null && await this.#T((r) =>
|
|
2391
|
+
n != null && await this.#T((r) => k(r, n, e, t));
|
|
2392
2392
|
}
|
|
2393
2393
|
async moveViewport(e, t = "detail") {
|
|
2394
2394
|
let n = this.#l.value.target;
|
|
2395
2395
|
if (n == null) return;
|
|
2396
2396
|
let r = this.#P().viewport;
|
|
2397
|
-
(r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) =>
|
|
2397
|
+
(r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) => O(r, n, e, t));
|
|
2398
2398
|
}
|
|
2399
2399
|
async check() {
|
|
2400
2400
|
await this.#E();
|
|
@@ -2424,7 +2424,7 @@ var Lt = class {
|
|
|
2424
2424
|
if (e.kind != "comment") return [];
|
|
2425
2425
|
let t = /#(\d+)$/.exec(e.title);
|
|
2426
2426
|
return t == null ? [] : [Number(t[1])];
|
|
2427
|
-
})), i = this.#T((i) =>
|
|
2427
|
+
})), i = this.#T((i) => I(i, e, t, {
|
|
2428
2428
|
content: "",
|
|
2429
2429
|
position: n,
|
|
2430
2430
|
title: this.#r.t("addNode.commentName", { number: r + 1 })
|
|
@@ -2480,7 +2480,7 @@ var Lt = class {
|
|
|
2480
2480
|
});
|
|
2481
2481
|
}
|
|
2482
2482
|
} catch (n) {
|
|
2483
|
-
!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(
|
|
2483
|
+
!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(x(n, this.#r.t));
|
|
2484
2484
|
} finally {
|
|
2485
2485
|
!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#B({ checkLoading: !1 });
|
|
2486
2486
|
}
|
|
@@ -2518,7 +2518,7 @@ var Lt = class {
|
|
|
2518
2518
|
s = this.#k(a, o);
|
|
2519
2519
|
}
|
|
2520
2520
|
if (s.revisionId == a.revisionId) return !0;
|
|
2521
|
-
let c = o.kind == "changes" && t != null ? Tt(
|
|
2521
|
+
let c = o.kind == "changes" && t != null ? Tt(z(a), z(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
|
|
2522
2522
|
o.kind == "snapshot" && this.#M();
|
|
2523
2523
|
let l = this.#L(s, !1);
|
|
2524
2524
|
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 +2526,7 @@ var Lt = class {
|
|
|
2526
2526
|
message: this.#r.t(l ? "notice.moduleUpdated" : "notice.draftUpdated")
|
|
2527
2527
|
}), this.#E()), !0;
|
|
2528
2528
|
} catch (n) {
|
|
2529
|
-
return t && this.#z(e) && this.#c(
|
|
2529
|
+
return t && this.#z(e) && this.#c(x(n, this.#r.t)), !1;
|
|
2530
2530
|
}
|
|
2531
2531
|
}
|
|
2532
2532
|
#k(e, t) {
|
|
@@ -2536,7 +2536,7 @@ var Lt = class {
|
|
|
2536
2536
|
if (e.revision.parentRevisionId != n.revisionId) throw Error("Invalid Draft revision chain.");
|
|
2537
2537
|
n = {
|
|
2538
2538
|
...e.revision,
|
|
2539
|
-
content:
|
|
2539
|
+
content: P(n, e.operations).content
|
|
2540
2540
|
};
|
|
2541
2541
|
}
|
|
2542
2542
|
return n;
|
|
@@ -2571,7 +2571,7 @@ var Lt = class {
|
|
|
2571
2571
|
if (t.flowId != e.flowId || !$(t.target, e.target) || t.selectedNodeIds.length > 0) return;
|
|
2572
2572
|
let n = this.#P().viewport;
|
|
2573
2573
|
if (n.x != e.viewport.x || n.y != e.viewport.y || n.zoom != e.viewport.zoom || t.draft == null) return;
|
|
2574
|
-
let r =
|
|
2574
|
+
let r = z(t.draft), i = [...e.targets].filter((t) => r.selection(e.target, t) != null);
|
|
2575
2575
|
i.length == 1 && this.#B({ nodeFocus: {
|
|
2576
2576
|
nodeId: i[0],
|
|
2577
2577
|
requestId: ++this.#y
|
|
@@ -2585,7 +2585,7 @@ var Lt = class {
|
|
|
2585
2585
|
}
|
|
2586
2586
|
#P() {
|
|
2587
2587
|
let e = this.#l.value;
|
|
2588
|
-
return
|
|
2588
|
+
return A(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
|
|
2589
2589
|
}
|
|
2590
2590
|
#F() {
|
|
2591
2591
|
let e = this.#l.value.moduleEditor;
|
|
@@ -2595,7 +2595,7 @@ var Lt = class {
|
|
|
2595
2595
|
}), !1);
|
|
2596
2596
|
}
|
|
2597
2597
|
#I(e) {
|
|
2598
|
-
let t =
|
|
2598
|
+
let t = z(e), n = It(t, this.#l.value.target);
|
|
2599
2599
|
return {
|
|
2600
2600
|
revision: t,
|
|
2601
2601
|
selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
|
|
@@ -2633,7 +2633,7 @@ function Rt(e) {
|
|
|
2633
2633
|
return new Map(e.nodes.map((e) => [e.id, e]));
|
|
2634
2634
|
}
|
|
2635
2635
|
function zt(e, t) {
|
|
2636
|
-
return e == null || t == null ? [] :
|
|
2636
|
+
return e == null || t == null ? [] : z(e).designerInputs(t);
|
|
2637
2637
|
}
|
|
2638
2638
|
function Bt(e, t, n, r, i) {
|
|
2639
2639
|
if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
|
|
@@ -2654,20 +2654,20 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2654
2654
|
#s;
|
|
2655
2655
|
#c;
|
|
2656
2656
|
#l;
|
|
2657
|
-
constructor(r, i, a = () => crypto.randomUUID(), o =
|
|
2658
|
-
this.#t = new
|
|
2657
|
+
constructor(r, i, a = () => crypto.randomUUID(), o = T(), s = Vt, c = !0) {
|
|
2658
|
+
this.#t = new N(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = new N(), 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
2659
|
if (!e.startsWith("trigger:")) return await this.connectors.provideAddNodeOptionChoices(e, t);
|
|
2660
2660
|
}, this.#e = r, this.#n = o, this.#i = c;
|
|
2661
2661
|
let l = (e) => {
|
|
2662
2662
|
this.#l || this.#r.set(e);
|
|
2663
2663
|
};
|
|
2664
|
-
this.runs = new
|
|
2664
|
+
this.runs = new D(r, l, o), this.workspace = new Lt(r, l, it, o, (e) => void this.#d(r, e)), this.connectors = new yt(r, this.workspace, l, s, o), this.triggers = new Ct(r, this.workspace, l, s, o), this.publications = new ct(r, this.workspace, l, i, a, o), this.runRequests = new pt(r, this.runs, l, o, a);
|
|
2665
2665
|
let u = /* @__PURE__ */ new Map(), d, f = n((e) => {
|
|
2666
2666
|
let t = e(this.workspace.$.draft);
|
|
2667
2667
|
d != t?.flowId && (u.clear(), d = t?.flowId);
|
|
2668
2668
|
let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(this.workspace.$.diagnostics)?.diagnostics, a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), f = e(this.runs.$.events), p = e(this.#a), m = e(this.#o), h = e(this.#s), g = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, _ = [
|
|
2669
2669
|
...zt(t, n),
|
|
2670
|
-
r == null || n == null ? void 0 :
|
|
2670
|
+
r == null || n == null ? void 0 : j(r, n),
|
|
2671
2671
|
i,
|
|
2672
2672
|
a,
|
|
2673
2673
|
s,
|
|
@@ -2680,7 +2680,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2680
2680
|
...l == null ? [] : [t?.revisionId]
|
|
2681
2681
|
], v = u.get(g);
|
|
2682
2682
|
if (v != null && v.inputs.length == _.length && v.inputs.every((e, t) => e === _[t])) return v.graph;
|
|
2683
|
-
let y =
|
|
2683
|
+
let y = A(t, n, r, i, a, s, c, l, f, p, m, h, this.#i);
|
|
2684
2684
|
return u.set(g, {
|
|
2685
2685
|
graph: y,
|
|
2686
2686
|
inputs: _
|
|
@@ -2732,7 +2732,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2732
2732
|
if (!e() || this.#l) return;
|
|
2733
2733
|
this.#a.set(t.map((e) => e.name)), this.#o.set(!0);
|
|
2734
2734
|
} catch (t) {
|
|
2735
|
-
e() && !this.#l && this.#r.set(
|
|
2735
|
+
e() && !this.#l && this.#r.set(x(t, this.#n.t));
|
|
2736
2736
|
} finally {
|
|
2737
2737
|
e() && !this.#l && this.#s.set(!1);
|
|
2738
2738
|
}
|
|
@@ -2771,7 +2771,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2771
2771
|
if (t.aborted || this.#l) return;
|
|
2772
2772
|
let r = n.filter((e) => e.status == "rejected");
|
|
2773
2773
|
if (r.length > 0 && r.length == n.length) throw r[0].reason;
|
|
2774
|
-
return r.length > 0 && this.#r.set(
|
|
2774
|
+
return r.length > 0 && this.#r.set(x(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
|
|
2775
2775
|
}
|
|
2776
2776
|
async refreshSelectedConnector(e = !1) {
|
|
2777
2777
|
await this.connectors.refresh(e);
|
|
@@ -2796,7 +2796,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
|
|
|
2796
2796
|
return;
|
|
2797
2797
|
}
|
|
2798
2798
|
}
|
|
2799
|
-
}, Ut = ze(() => import("./flowWorkspace-
|
|
2799
|
+
}, Ut = ze(() => import("./flowWorkspace-BZ_eiQNR.js").then((e) => e.t));
|
|
2800
2800
|
function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: f }) {
|
|
2801
2801
|
let g = s != null && f != null && i != null, _ = s ?? "", v = /* @__PURE__ */ G(Ve, { children: [
|
|
2802
2802
|
/* @__PURE__ */ W("div", {
|
|
@@ -2932,7 +2932,7 @@ function qt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadg
|
|
|
2932
2932
|
let v = Be(m);
|
|
2933
2933
|
v.current = m;
|
|
2934
2934
|
let [{ i18n: y, navigation: b, store: x }] = U(() => {
|
|
2935
|
-
let e =
|
|
2935
|
+
let e = T(l), t = new Ht(new ue((e, t) => i.request(e, t), (e, t) => i.subscribeFlow(e, t), (e) => i.subscribeFlowCatalog(e)), h, () => crypto.randomUUID(), e, i, _);
|
|
2936
2936
|
return {
|
|
2937
2937
|
i18n: e,
|
|
2938
2938
|
navigation: new He(t, u, (e, t) => v.current(e, t)),
|