@oomol-lab/open-flow 0.1.0-beta.25 → 0.1.0-beta.27
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/{createResourceDialog-DNgEsFmG.js → createResourceDialog-BwI2JmPE.js} +1 -1
- package/dist/browser/flow-change.d.ts +14 -0
- package/dist/browser/flow-change.js +38 -17
- package/dist/browser/{flowChanges-CfvUDu1U.js → flowChanges-DhEjA0n5.js} +2210 -2302
- package/dist/browser/{flowWorkspace-BsMrs6KT.js → flowWorkspace-zcweMsLS.js} +31856 -31817
- package/dist/browser/{inputValues-BXC9GGGa.js → inputValues-C5ExCCf0.js} +1 -1
- package/dist/browser/{switch-Db5aHXHa.js → switch-CyZ96-UF.js} +835 -512
- package/dist/browser/theme.css +22 -0
- package/dist/browser/ui.css +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +340 -340
- package/dist/browser/{workbenchSelect-CXeaZhuN.js → workbenchSelect-BUu7CjUA.js} +127 -104
- package/dist/common/control-api-conformance.js +1 -1
- package/dist/common/control-api.d.ts +2 -0
- package/dist/common/control-api.js +1780 -1750
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/flow-graph.d.ts +25 -3
- package/dist/common/flow-schema.d.ts +11 -1
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +1460 -1374
- package/dist/common/mcp.js +285 -256
- package/dist/common/runtime-contract.d.ts +2 -0
- package/dist/common/runtime-contract.js +96 -32
- package/dist/common/scheduler.js +98 -128
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as e, i as t, l as n } from "./dist-Dz6Nglsd.js";
|
|
2
2
|
import { a as r, i, r as a, t as o } from "./main-BDnNHhkU.js";
|
|
3
3
|
import { Bn as s, Hn as c, kt as l, t as u } from "./lite-BuKZ8joP.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { i as d, n as f, o as p, r as m, t as h } from "./switch-CyZ96-UF.js";
|
|
5
|
+
import { At as g, B as _, C as v, Ct as y, D as b, Dt as x, E as S, Et as C, F as w, Ft as ee, G as te, H as T, I as E, J as ne, K as D, L as re, M as ie, Nt as ae, O, Ot as oe, P as k, R as se, S as ce, St as le, Tt as ue, U as de, Ut as A, W as j, Y as M, _ as fe, _n as pe, _t as me, a as he, an as ge, b as _e, bn as ve, bt as N, c as ye, d as be, dn as xe, dt as Se, f as Ce, fn as P, g as we, gn as Te, gt as Ee, h as De, hn as F, ht as Oe, in as ke, it as Ae, j as I, jt as je, k as Me, kt as Ne, l as Pe, lt as L, m as Fe, mn as Ie, o as Le, p as Re, pn as ze, q as Be, r as R, rt as z, s as Ve, st as He, t as Ue, tt as We, u as Ge, un as B, ut as Ke, v as qe, vn as V, vt as Je, w as Ye, wt as H, x as Xe, xt as Ze, y as Qe, yn as U, yt as $e, z as et } from "./flowChanges-DhEjA0n5.js";
|
|
6
|
+
import { C as tt, V as nt, _ as rt, a as it, c as at, d as ot, f as st, g as ct, h as lt, i as ut, l as dt, m as ft, n as W, o as pt, r as mt, s as ht, t as gt, v as _t, w as vt } from "./workbenchSelect-BUu7CjUA.js";
|
|
7
7
|
import { i as yt, n as bt, r as xt, t as St } from "./languages-C0zQ4GSo.js";
|
|
8
8
|
import { o as G } from "./dist-B_T-OpQp.js";
|
|
9
9
|
import { Fragment as Ct, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
@@ -96,7 +96,7 @@ function jt(e, t) {
|
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
|
|
99
|
-
var Mt = Tt(() => import("./createResourceDialog-
|
|
99
|
+
var Mt = Tt(() => import("./createResourceDialog-BwI2JmPE.js")), Nt = yt.map((e) => ({
|
|
100
100
|
label: xt[e],
|
|
101
101
|
value: e
|
|
102
102
|
}));
|
|
@@ -108,7 +108,7 @@ function Pt({ language: e, onLanguageChange: t }) {
|
|
|
108
108
|
children: [/* @__PURE__ */ K("span", {
|
|
109
109
|
className: "sr-only",
|
|
110
110
|
children: n("language.label")
|
|
111
|
-
}), /* @__PURE__ */ K(
|
|
111
|
+
}), /* @__PURE__ */ K(gt, {
|
|
112
112
|
ariaLabel: n("language.label"),
|
|
113
113
|
onValueChange: (e) => t(e),
|
|
114
114
|
options: Nt,
|
|
@@ -118,8 +118,8 @@ function Pt({ language: e, onLanguageChange: t }) {
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
|
|
121
|
-
let [u,
|
|
122
|
-
async function
|
|
121
|
+
let [u, d] = Y(null), f = Et(null), p = Et(null), m = Et(null), g = a(), _ = i(), [v, b] = Y("idle"), [x, S] = Y(n.name), [C, w] = Y(), te = n.live != null && n.live.revisionId != n.draftRevisionId;
|
|
122
|
+
async function T(e) {
|
|
123
123
|
w(e == "publish" ? "publish" : "enabled");
|
|
124
124
|
try {
|
|
125
125
|
e == "publish" ? await c.workspace.publishFlow(n) : await c.workspace.setFlowEnabled(n, e);
|
|
@@ -127,18 +127,18 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
|
|
|
127
127
|
w(void 0);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
let
|
|
131
|
-
async function
|
|
130
|
+
let E = vt(x);
|
|
131
|
+
async function ne(e) {
|
|
132
132
|
e.preventDefault();
|
|
133
|
-
let t =
|
|
134
|
-
|
|
133
|
+
let t = x.trim();
|
|
134
|
+
vt(t) == null && await c.workspace.renameFlow(n.flowId, t) && b("idle");
|
|
135
135
|
}
|
|
136
|
-
async function
|
|
137
|
-
await c.workspace.deleteFlow(n.flowId) &&
|
|
136
|
+
async function D() {
|
|
137
|
+
await c.workspace.deleteFlow(n.flowId) && b("idle");
|
|
138
138
|
}
|
|
139
139
|
return /* @__PURE__ */ q("div", {
|
|
140
140
|
className: "resource-item-row",
|
|
141
|
-
ref:
|
|
141
|
+
ref: d,
|
|
142
142
|
children: [
|
|
143
143
|
/* @__PURE__ */ q(s, {
|
|
144
144
|
"aria-disabled": n.status == "retiring",
|
|
@@ -149,7 +149,7 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
|
|
|
149
149
|
e.preventDefault();
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
y(e, () => o(n));
|
|
153
153
|
},
|
|
154
154
|
render: /* @__PURE__ */ K("a", { href: n.status == "retiring" ? void 0 : r }),
|
|
155
155
|
tabIndex: n.status == "retiring" ? -1 : void 0,
|
|
@@ -165,7 +165,7 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
|
|
|
165
165
|
children: [/* @__PURE__ */ K("strong", {
|
|
166
166
|
className: "min-w-0 truncate",
|
|
167
167
|
children: n.name
|
|
168
|
-
}), e != null && /* @__PURE__ */ K(
|
|
168
|
+
}), e != null && /* @__PURE__ */ K(ke, {
|
|
169
169
|
className: "min-w-0 shrink",
|
|
170
170
|
title: e,
|
|
171
171
|
variant: "secondary",
|
|
@@ -185,7 +185,7 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
|
|
|
185
185
|
}),
|
|
186
186
|
/* @__PURE__ */ K("span", {
|
|
187
187
|
className: "resource-status",
|
|
188
|
-
children: _(n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" :
|
|
188
|
+
children: _(n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : te ? "resource.unpublishedChanges" : "resource.isPublished")
|
|
189
189
|
})
|
|
190
190
|
]
|
|
191
191
|
}),
|
|
@@ -196,95 +196,95 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
|
|
|
196
196
|
className: "resource-status",
|
|
197
197
|
title: _("resource.publishFirst"),
|
|
198
198
|
children: "—"
|
|
199
|
-
}) : /* @__PURE__ */ q(
|
|
199
|
+
}) : /* @__PURE__ */ q(nt, {
|
|
200
200
|
className: "resource-enable",
|
|
201
201
|
title: _("resource.enabledHint"),
|
|
202
|
-
children: [/* @__PURE__ */ K(
|
|
202
|
+
children: [/* @__PURE__ */ K(h, {
|
|
203
203
|
"aria-label": _("resource.enableFlow", { name: n.name }),
|
|
204
204
|
checked: n.live?.enabled ?? !1,
|
|
205
205
|
disabled: n.status != "active" || n.live == null || t != null || C != null,
|
|
206
|
-
onCheckedChange: (e) => void
|
|
206
|
+
onCheckedChange: (e) => void T(e),
|
|
207
207
|
size: "sm"
|
|
208
208
|
}), /* @__PURE__ */ K("span", { children: _(n.live?.enabled ? "resource.enabled" : "resource.disabled") })]
|
|
209
209
|
}), /* @__PURE__ */ K(s, {
|
|
210
|
-
disabled: n.status != "active" || t != null || C != null || n.live != null && !
|
|
211
|
-
onClick: () => void
|
|
210
|
+
disabled: n.status != "active" || t != null || C != null || n.live != null && !te,
|
|
211
|
+
onClick: () => void T("publish"),
|
|
212
212
|
size: "sm",
|
|
213
213
|
variant: "outline",
|
|
214
214
|
children: _(C == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
|
|
215
215
|
})]
|
|
216
216
|
}),
|
|
217
|
-
n.status == "active" && /* @__PURE__ */ q(
|
|
217
|
+
n.status == "active" && /* @__PURE__ */ q(je, { children: [/* @__PURE__ */ K(A, {
|
|
218
218
|
"aria-label": _("sidebar.flowActions", { name: n.name }),
|
|
219
219
|
disabled: t != null || C != null,
|
|
220
220
|
render: /* @__PURE__ */ K(s, {
|
|
221
221
|
className: "resource-row-more",
|
|
222
|
-
ref:
|
|
222
|
+
ref: f,
|
|
223
223
|
size: "icon-sm",
|
|
224
224
|
variant: "ghost",
|
|
225
225
|
children: /* @__PURE__ */ K(W, { name: "more" })
|
|
226
226
|
})
|
|
227
|
-
}), /* @__PURE__ */ q(
|
|
227
|
+
}), /* @__PURE__ */ q(ae, {
|
|
228
228
|
align: "end",
|
|
229
229
|
className: "min-w-36",
|
|
230
230
|
container: u,
|
|
231
231
|
finalFocus: v == "idle",
|
|
232
|
-
children: [/* @__PURE__ */ K(
|
|
232
|
+
children: [/* @__PURE__ */ K(ee, {
|
|
233
233
|
onClick: () => {
|
|
234
|
-
|
|
234
|
+
S(n.name), b("rename");
|
|
235
235
|
},
|
|
236
236
|
children: _("common.rename")
|
|
237
|
-
}), /* @__PURE__ */ K(
|
|
238
|
-
onClick: () =>
|
|
237
|
+
}), /* @__PURE__ */ K(ee, {
|
|
238
|
+
onClick: () => b("delete"),
|
|
239
239
|
variant: "destructive",
|
|
240
240
|
children: _("common.delete")
|
|
241
241
|
})]
|
|
242
242
|
})] }),
|
|
243
|
-
/* @__PURE__ */ K(
|
|
243
|
+
/* @__PURE__ */ K(mt, {
|
|
244
244
|
open: v == "rename",
|
|
245
245
|
onOpenChange: (e) => {
|
|
246
|
-
e ||
|
|
246
|
+
e || b("idle");
|
|
247
247
|
},
|
|
248
|
-
children: /* @__PURE__ */ K(
|
|
248
|
+
children: /* @__PURE__ */ K(it, {
|
|
249
249
|
container: u,
|
|
250
|
-
initialFocus:
|
|
251
|
-
finalFocus:
|
|
250
|
+
initialFocus: p,
|
|
251
|
+
finalFocus: f,
|
|
252
252
|
closeLabel: _("common.cancel"),
|
|
253
253
|
children: /* @__PURE__ */ q("form", {
|
|
254
254
|
className: "flex flex-col gap-4",
|
|
255
|
-
onSubmit: (e) => void
|
|
255
|
+
onSubmit: (e) => void ne(e),
|
|
256
256
|
children: [
|
|
257
|
-
/* @__PURE__ */ K(
|
|
258
|
-
/* @__PURE__ */ q(
|
|
259
|
-
"data-invalid":
|
|
257
|
+
/* @__PURE__ */ K(at, { children: /* @__PURE__ */ K(dt, { children: _("sidebar.renameFlow", { name: n.name }) }) }),
|
|
258
|
+
/* @__PURE__ */ q(st, {
|
|
259
|
+
"data-invalid": x.length > 0 && E != null,
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */ K(
|
|
261
|
+
/* @__PURE__ */ K(ct, {
|
|
262
262
|
htmlFor: `rename-flow-${n.flowId}`,
|
|
263
263
|
children: _("resource.flowName")
|
|
264
264
|
}),
|
|
265
265
|
/* @__PURE__ */ K(l, {
|
|
266
266
|
autoComplete: "off",
|
|
267
|
-
"aria-invalid":
|
|
268
|
-
"aria-describedby":
|
|
267
|
+
"aria-invalid": x.length > 0 && E != null,
|
|
268
|
+
"aria-describedby": x.length > 0 && E != null ? `rename-error-${n.flowId}` : void 0,
|
|
269
269
|
id: `rename-flow-${n.flowId}`,
|
|
270
270
|
name: "flow-name",
|
|
271
|
-
onChange: (e) =>
|
|
272
|
-
ref:
|
|
271
|
+
onChange: (e) => S(e.target.value),
|
|
272
|
+
ref: p,
|
|
273
273
|
required: !0,
|
|
274
|
-
value:
|
|
274
|
+
value: x
|
|
275
275
|
}),
|
|
276
|
-
|
|
276
|
+
x.length > 0 && E != null && /* @__PURE__ */ K(ft, {
|
|
277
277
|
id: `rename-error-${n.flowId}`,
|
|
278
|
-
children: _(`resource.nameIssue.${
|
|
278
|
+
children: _(`resource.nameIssue.${E}`, { max: 80 })
|
|
279
279
|
})
|
|
280
280
|
]
|
|
281
281
|
}),
|
|
282
|
-
/* @__PURE__ */ q(
|
|
282
|
+
/* @__PURE__ */ q(ht, { children: [/* @__PURE__ */ K(ut, {
|
|
283
283
|
render: /* @__PURE__ */ K(s, { variant: "outline" }),
|
|
284
284
|
type: "button",
|
|
285
285
|
children: _("common.cancel")
|
|
286
286
|
}), /* @__PURE__ */ K(s, {
|
|
287
|
-
disabled: t != null ||
|
|
287
|
+
disabled: t != null || E != null,
|
|
288
288
|
type: "submit",
|
|
289
289
|
children: _("common.save")
|
|
290
290
|
})] })
|
|
@@ -292,25 +292,25 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
|
|
|
292
292
|
})
|
|
293
293
|
})
|
|
294
294
|
}),
|
|
295
|
-
/* @__PURE__ */ K(
|
|
295
|
+
/* @__PURE__ */ K(mt, {
|
|
296
296
|
open: v == "delete",
|
|
297
297
|
onOpenChange: (e) => {
|
|
298
|
-
e ||
|
|
298
|
+
e || b("idle");
|
|
299
299
|
},
|
|
300
|
-
children: /* @__PURE__ */ q(
|
|
300
|
+
children: /* @__PURE__ */ q(it, {
|
|
301
301
|
container: u,
|
|
302
|
-
initialFocus:
|
|
303
|
-
finalFocus:
|
|
302
|
+
initialFocus: m,
|
|
303
|
+
finalFocus: f,
|
|
304
304
|
showCloseButton: !1,
|
|
305
|
-
children: [/* @__PURE__ */ q(
|
|
305
|
+
children: [/* @__PURE__ */ q(at, { children: [/* @__PURE__ */ K(dt, { children: _("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ K(pt, { children: _("resource.deleteDescription") })] }), /* @__PURE__ */ q(ht, { children: [/* @__PURE__ */ K(ut, {
|
|
306
306
|
render: /* @__PURE__ */ K(s, {
|
|
307
|
-
ref:
|
|
307
|
+
ref: m,
|
|
308
308
|
variant: "outline"
|
|
309
309
|
}),
|
|
310
310
|
children: _("common.cancel")
|
|
311
311
|
}), /* @__PURE__ */ K(s, {
|
|
312
312
|
disabled: t != null,
|
|
313
|
-
onClick: () => void
|
|
313
|
+
onClick: () => void D(),
|
|
314
314
|
variant: "destructive",
|
|
315
315
|
children: _(t == "flow" ? "common.deleting" : "common.delete")
|
|
316
316
|
})] })]
|
|
@@ -326,22 +326,22 @@ function It() {
|
|
|
326
326
|
children: [
|
|
327
327
|
/* @__PURE__ */ q("span", {
|
|
328
328
|
className: "resource-primary-cell",
|
|
329
|
-
children: [/* @__PURE__ */ K(
|
|
329
|
+
children: [/* @__PURE__ */ K(H, { className: "size-8 shrink-0" }), /* @__PURE__ */ q("span", {
|
|
330
330
|
className: "resource-skeleton-copy",
|
|
331
|
-
children: [/* @__PURE__ */ K(
|
|
331
|
+
children: [/* @__PURE__ */ K(H, { className: "h-3.5 w-36" }), /* @__PURE__ */ K(H, { className: "h-2.5 w-48 max-w-full" })]
|
|
332
332
|
})]
|
|
333
333
|
}),
|
|
334
|
-
/* @__PURE__ */ K(
|
|
335
|
-
/* @__PURE__ */ K(
|
|
334
|
+
/* @__PURE__ */ K(H, { className: "h-3 w-28" }),
|
|
335
|
+
/* @__PURE__ */ K(H, { className: "h-3 w-16" })
|
|
336
336
|
]
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language:
|
|
340
|
-
let
|
|
339
|
+
function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language: p, onCreateFlow: h, onHostAction: _, onLanguageChange: v, onSelectFlow: y, store: b }) {
|
|
340
|
+
let S = i(), w = r(b.workspace.$.busy), ee = r(b.workspace.$.flowLoadFailed), te = r(b.workspace.$.flowLoadMoreFailed), T = r(b.workspace.$.flowLoading), E = r(b.workspace.$.flowLoadingMore), ne = r(b.workspace.$.flowNextCursor), D = r(b.workspace.$.flowRefreshing), re = r(b.workspace.$.flows), ie = r(b.workspace.$.flowTotal), [ae, O] = Y(!1), [k, se] = Y(""), [ce, de] = Y(""), A = k.trim().toLocaleLowerCase(), j = re.filter((e) => e.name.toLocaleLowerCase().includes(A));
|
|
341
341
|
async function M(e) {
|
|
342
342
|
e.preventDefault();
|
|
343
|
-
let t =
|
|
344
|
-
|
|
343
|
+
let t = ce.trim();
|
|
344
|
+
vt(t) != null || !await h(t) || (O(!1), de(""));
|
|
345
345
|
}
|
|
346
346
|
return /* @__PURE__ */ K("main", {
|
|
347
347
|
className: "resource-browser",
|
|
@@ -350,7 +350,7 @@ function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
|
|
|
350
350
|
children: [
|
|
351
351
|
/* @__PURE__ */ K("h1", {
|
|
352
352
|
className: "sr-only",
|
|
353
|
-
children:
|
|
353
|
+
children: S("resource.flows")
|
|
354
354
|
}),
|
|
355
355
|
/* @__PURE__ */ q("section", {
|
|
356
356
|
"aria-labelledby": "flow-list-title",
|
|
@@ -362,53 +362,53 @@ function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
|
|
|
362
362
|
className: "resource-list-heading",
|
|
363
363
|
children: [/* @__PURE__ */ K("h2", {
|
|
364
364
|
id: "flow-list-title",
|
|
365
|
-
children:
|
|
366
|
-
}), !
|
|
365
|
+
children: S("resource.allFlows")
|
|
366
|
+
}), !T && /* @__PURE__ */ K("span", { children: S("resource.flowCount", { count: ie ?? re.length }) })]
|
|
367
367
|
}), /* @__PURE__ */ q("div", {
|
|
368
368
|
className: "resource-list-actions",
|
|
369
369
|
children: [
|
|
370
370
|
/* @__PURE__ */ K(Pt, {
|
|
371
|
-
language:
|
|
372
|
-
onLanguageChange:
|
|
371
|
+
language: p,
|
|
372
|
+
onLanguageChange: v
|
|
373
373
|
}),
|
|
374
|
-
/* @__PURE__ */ q(
|
|
374
|
+
/* @__PURE__ */ q(f, {
|
|
375
375
|
className: "w-full sm:w-56",
|
|
376
|
-
children: [/* @__PURE__ */ K(
|
|
376
|
+
children: [/* @__PURE__ */ K(m, { children: /* @__PURE__ */ K(W, {
|
|
377
377
|
name: "search",
|
|
378
378
|
size: 17
|
|
379
|
-
}) }), /* @__PURE__ */ K(
|
|
379
|
+
}) }), /* @__PURE__ */ K(d, {
|
|
380
380
|
autoComplete: "off",
|
|
381
|
-
"aria-label":
|
|
381
|
+
"aria-label": S("resource.searchFlows"),
|
|
382
382
|
name: "flow-search",
|
|
383
|
-
onChange: (e) =>
|
|
384
|
-
placeholder:
|
|
383
|
+
onChange: (e) => se(e.target.value),
|
|
384
|
+
placeholder: S("resource.searchFlows"),
|
|
385
385
|
value: k
|
|
386
386
|
})]
|
|
387
387
|
}),
|
|
388
388
|
/* @__PURE__ */ K(s, {
|
|
389
|
-
"aria-label":
|
|
390
|
-
disabled:
|
|
391
|
-
onClick: () => void
|
|
389
|
+
"aria-label": S("common.refresh"),
|
|
390
|
+
disabled: T || D || w != null,
|
|
391
|
+
onClick: () => void b.workspace.reloadFlows(),
|
|
392
392
|
size: "icon",
|
|
393
|
-
title:
|
|
393
|
+
title: S("common.refresh"),
|
|
394
394
|
variant: "outline",
|
|
395
395
|
children: /* @__PURE__ */ K(W, {
|
|
396
|
-
className:
|
|
396
|
+
className: D ? "animate-spin" : void 0,
|
|
397
397
|
name: "refresh"
|
|
398
398
|
})
|
|
399
399
|
}),
|
|
400
400
|
/* @__PURE__ */ q(s, {
|
|
401
401
|
className: "resource-page-primary-action",
|
|
402
|
-
disabled:
|
|
402
|
+
disabled: w != null,
|
|
403
403
|
onClick: () => O(!0),
|
|
404
404
|
children: [/* @__PURE__ */ K(W, {
|
|
405
405
|
"data-icon": "inline-start",
|
|
406
406
|
name: "plus"
|
|
407
|
-
}),
|
|
407
|
+
}), S("resource.newFlow")]
|
|
408
408
|
}),
|
|
409
|
-
l != null && u != null &&
|
|
409
|
+
l != null && u != null && _ != null && /* @__PURE__ */ K(le, {
|
|
410
410
|
action: l,
|
|
411
|
-
onAction:
|
|
411
|
+
onAction: _,
|
|
412
412
|
title: u
|
|
413
413
|
})
|
|
414
414
|
]
|
|
@@ -418,86 +418,86 @@ function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
|
|
|
418
418
|
"aria-hidden": "true",
|
|
419
419
|
className: "resource-list-columns flow-columns",
|
|
420
420
|
children: [
|
|
421
|
-
/* @__PURE__ */ K("span", { children:
|
|
422
|
-
/* @__PURE__ */ K("span", { children:
|
|
423
|
-
/* @__PURE__ */ K("span", { children:
|
|
424
|
-
/* @__PURE__ */ K("span", { children:
|
|
421
|
+
/* @__PURE__ */ K("span", { children: S("resource.name") }),
|
|
422
|
+
/* @__PURE__ */ K("span", { children: S("resource.updated") }),
|
|
423
|
+
/* @__PURE__ */ K("span", { children: S("resource.publication") }),
|
|
424
|
+
/* @__PURE__ */ K("span", { children: S("resource.enabledColumn") })
|
|
425
425
|
]
|
|
426
426
|
}),
|
|
427
427
|
/* @__PURE__ */ K("div", {
|
|
428
428
|
className: "resource-list",
|
|
429
|
-
children:
|
|
429
|
+
children: T ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ K(It, {}, t)) : ee ? /* @__PURE__ */ q(ue, {
|
|
430
430
|
className: "min-h-64",
|
|
431
431
|
role: "alert",
|
|
432
|
-
children: [/* @__PURE__ */ q(
|
|
433
|
-
/* @__PURE__ */ K(
|
|
432
|
+
children: [/* @__PURE__ */ q(oe, { children: [
|
|
433
|
+
/* @__PURE__ */ K(Ne, {
|
|
434
434
|
variant: "icon",
|
|
435
435
|
children: /* @__PURE__ */ K(W, {
|
|
436
436
|
name: "alert",
|
|
437
437
|
size: 20
|
|
438
438
|
})
|
|
439
439
|
}),
|
|
440
|
-
/* @__PURE__ */ K(
|
|
441
|
-
/* @__PURE__ */ K(
|
|
442
|
-
] }), /* @__PURE__ */ K(
|
|
443
|
-
onClick: () => void
|
|
440
|
+
/* @__PURE__ */ K(g, { children: S("resource.flowsLoadFailed") }),
|
|
441
|
+
/* @__PURE__ */ K(x, { children: S("resource.flowsLoadFailedDescription") })
|
|
442
|
+
] }), /* @__PURE__ */ K(C, { children: /* @__PURE__ */ K(s, {
|
|
443
|
+
onClick: () => void b.retryFlows(),
|
|
444
444
|
variant: "outline",
|
|
445
|
-
children:
|
|
445
|
+
children: S("empty.retry")
|
|
446
446
|
}) })]
|
|
447
|
-
}) : j.length == 0 ? /* @__PURE__ */ q(
|
|
447
|
+
}) : j.length == 0 ? /* @__PURE__ */ q(ue, {
|
|
448
448
|
className: "min-h-64",
|
|
449
|
-
children: [/* @__PURE__ */ q(
|
|
450
|
-
/* @__PURE__ */ K(
|
|
449
|
+
children: [/* @__PURE__ */ q(oe, { children: [
|
|
450
|
+
/* @__PURE__ */ K(Ne, {
|
|
451
451
|
variant: "icon",
|
|
452
452
|
children: /* @__PURE__ */ K(W, {
|
|
453
453
|
name: "flow",
|
|
454
454
|
size: 20
|
|
455
455
|
})
|
|
456
456
|
}),
|
|
457
|
-
/* @__PURE__ */ K(
|
|
458
|
-
/* @__PURE__ */ K(
|
|
459
|
-
] }), A.length == 0 && /* @__PURE__ */ K(
|
|
457
|
+
/* @__PURE__ */ K(g, { children: S(A.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
|
|
458
|
+
/* @__PURE__ */ K(x, { children: S(A.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
|
|
459
|
+
] }), A.length == 0 && /* @__PURE__ */ K(C, { children: /* @__PURE__ */ q(s, {
|
|
460
460
|
onClick: () => O(!0),
|
|
461
461
|
variant: "outline",
|
|
462
462
|
children: [/* @__PURE__ */ K(W, {
|
|
463
463
|
"data-icon": "inline-start",
|
|
464
464
|
name: "plus"
|
|
465
|
-
}),
|
|
465
|
+
}), S("resource.newFlow")]
|
|
466
466
|
}) })]
|
|
467
467
|
}) : j.map((e) => /* @__PURE__ */ K(Ft, {
|
|
468
468
|
badge: a?.[e.flowId],
|
|
469
|
-
busy:
|
|
469
|
+
busy: w,
|
|
470
470
|
flow: e,
|
|
471
471
|
href: o(e),
|
|
472
|
-
onSelect:
|
|
473
|
-
store:
|
|
472
|
+
onSelect: y,
|
|
473
|
+
store: b
|
|
474
474
|
}, e.flowId))
|
|
475
475
|
}),
|
|
476
|
-
|
|
476
|
+
ne != null && /* @__PURE__ */ K("div", {
|
|
477
477
|
className: "resource-list-footer",
|
|
478
478
|
children: /* @__PURE__ */ K(s, {
|
|
479
|
-
disabled:
|
|
480
|
-
onClick: () => void
|
|
479
|
+
disabled: E || D,
|
|
480
|
+
onClick: () => void b.workspace.loadMoreFlows(),
|
|
481
481
|
variant: "outline",
|
|
482
|
-
children:
|
|
482
|
+
children: S(E ? "resource.loadingMore" : te ? "resource.retryLoadMore" : "resource.loadMore")
|
|
483
483
|
})
|
|
484
484
|
})
|
|
485
485
|
]
|
|
486
486
|
}),
|
|
487
|
-
|
|
487
|
+
ae && /* @__PURE__ */ K(wt, {
|
|
488
488
|
fallback: null,
|
|
489
489
|
children: /* @__PURE__ */ K(Mt, {
|
|
490
490
|
disabled: t,
|
|
491
491
|
field: n,
|
|
492
492
|
id: "flow-name",
|
|
493
|
-
issue:
|
|
494
|
-
label:
|
|
495
|
-
name:
|
|
496
|
-
onNameChange:
|
|
493
|
+
issue: vt(ce),
|
|
494
|
+
label: S("resource.flowName"),
|
|
495
|
+
name: ce,
|
|
496
|
+
onNameChange: de,
|
|
497
497
|
onOpenChange: O,
|
|
498
498
|
onSubmit: (e) => void M(e),
|
|
499
|
-
pending:
|
|
500
|
-
title:
|
|
499
|
+
pending: w == "flow",
|
|
500
|
+
title: S("resource.newFlow")
|
|
501
501
|
})
|
|
502
502
|
})
|
|
503
503
|
]
|
|
@@ -651,7 +651,7 @@ var $t = class {
|
|
|
651
651
|
#u;
|
|
652
652
|
#d;
|
|
653
653
|
#f;
|
|
654
|
-
constructor(t, n, r, i, a = P, o =
|
|
654
|
+
constructor(t, n, r, i, a = P, o = p()) {
|
|
655
655
|
this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
|
|
656
656
|
activities: e(this.#l, (e) => e.activities),
|
|
657
657
|
activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
|
|
@@ -725,7 +725,7 @@ var $t = class {
|
|
|
725
725
|
loadFailed: !r,
|
|
726
726
|
loading: !1,
|
|
727
727
|
refreshing: !1
|
|
728
|
-
}), this.#c(
|
|
728
|
+
}), this.#c(B(e, this.#n.t));
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
async loadMore() {
|
|
@@ -754,7 +754,7 @@ var $t = class {
|
|
|
754
754
|
this.#S({
|
|
755
755
|
loadMoreFailed: !0,
|
|
756
756
|
loadingMore: !1
|
|
757
|
-
}), this.#c(
|
|
757
|
+
}), this.#c(B(e, this.#n.t));
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
async publish() {
|
|
@@ -781,7 +781,7 @@ var $t = class {
|
|
|
781
781
|
publishing: e.status == "pending"
|
|
782
782
|
}), await this.#_(r, e, s, t.name)) : !1;
|
|
783
783
|
} catch (e) {
|
|
784
|
-
return s() ? (e instanceof
|
|
784
|
+
return s() ? (e instanceof U && e.code == "live.conflict" && await this.#m(r), this.#c(B(e, this.#n.t)), !1) : !1;
|
|
785
785
|
} finally {
|
|
786
786
|
s() && this.#S({ publishing: !1 });
|
|
787
787
|
}
|
|
@@ -807,7 +807,7 @@ var $t = class {
|
|
|
807
807
|
message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
|
|
808
808
|
}), !0);
|
|
809
809
|
} catch (e) {
|
|
810
|
-
return s() ? (e instanceof
|
|
810
|
+
return s() ? (e instanceof U && e.code == "live.conflict" && await this.#m(r), this.#c(B(e, this.#n.t)), !1) : !1;
|
|
811
811
|
} finally {
|
|
812
812
|
s() && this.#S({ rollingBackPublicationId: void 0 });
|
|
813
813
|
}
|
|
@@ -848,7 +848,7 @@ var $t = class {
|
|
|
848
848
|
this.#S({
|
|
849
849
|
activitiesLoading: !1,
|
|
850
850
|
detailLoading: !1
|
|
851
|
-
}), this.#c(
|
|
851
|
+
}), this.#c(B(r.reason, this.#n.t));
|
|
852
852
|
return;
|
|
853
853
|
}
|
|
854
854
|
this.#S({
|
|
@@ -862,7 +862,7 @@ var $t = class {
|
|
|
862
862
|
}) : (this.#S({
|
|
863
863
|
activitiesLoadFailed: !0,
|
|
864
864
|
activitiesLoading: !1
|
|
865
|
-
}), this.#c(
|
|
865
|
+
}), this.#c(B(i.reason, this.#n.t)));
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
async loadMoreTriggerActivities() {
|
|
@@ -891,7 +891,7 @@ var $t = class {
|
|
|
891
891
|
this.#S({
|
|
892
892
|
activitiesLoadFailed: !0,
|
|
893
893
|
activitiesLoadingMore: !1
|
|
894
|
-
}), this.#c(
|
|
894
|
+
}), this.#c(B(e, this.#n.t));
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
async testTrigger() {
|
|
@@ -906,7 +906,7 @@ var $t = class {
|
|
|
906
906
|
let e = await this.#e.testFlowPollTrigger(n.flowId, t);
|
|
907
907
|
return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#S({ testResult: e }), !0);
|
|
908
908
|
} catch (e) {
|
|
909
|
-
return i() && this.#l.value.selectedTriggerId == t && this.#c(
|
|
909
|
+
return i() && this.#l.value.selectedTriggerId == t && this.#c(B(e, this.#n.t)), !1;
|
|
910
910
|
} finally {
|
|
911
911
|
i() && this.#l.value.selectedTriggerId == t && this.#S({ testingTriggerId: void 0 });
|
|
912
912
|
}
|
|
@@ -925,7 +925,7 @@ var $t = class {
|
|
|
925
925
|
message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
|
|
926
926
|
}), !0) : !1;
|
|
927
927
|
} catch (e) {
|
|
928
|
-
return n() && this.#c(
|
|
928
|
+
return n() && this.#c(B(e, this.#n.t)), !1;
|
|
929
929
|
} finally {
|
|
930
930
|
n() && this.#S({ changingTriggerId: void 0 });
|
|
931
931
|
}
|
|
@@ -968,7 +968,7 @@ var $t = class {
|
|
|
968
968
|
if (t != null && t != "") try {
|
|
969
969
|
return await this.#e.getPublishOperation(e.flowId, t);
|
|
970
970
|
} catch (t) {
|
|
971
|
-
if (t instanceof
|
|
971
|
+
if (t instanceof U && t.code == "publication.operation-not-found") {
|
|
972
972
|
this.#a.setItem(this.#b(e.flowId), "");
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
@@ -991,7 +991,7 @@ var $t = class {
|
|
|
991
991
|
try: (t) => this.#p(e, t),
|
|
992
992
|
catch: (e) => e
|
|
993
993
|
}).pipe(X.match({
|
|
994
|
-
onFailure: (e) => (n() && this.#c(
|
|
994
|
+
onFailure: (e) => (n() && this.#c(B(e, this.#n.t)), !1),
|
|
995
995
|
onSuccess: () => !0
|
|
996
996
|
}));
|
|
997
997
|
return n() ? (a && this.#c({
|
|
@@ -1020,14 +1020,14 @@ var $t = class {
|
|
|
1020
1020
|
if (!n()) return;
|
|
1021
1021
|
if ("error" in t) {
|
|
1022
1022
|
let n = t.error;
|
|
1023
|
-
if (n instanceof
|
|
1023
|
+
if (n instanceof U && n.code == "publication.operation-not-found") {
|
|
1024
1024
|
this.#a.setItem(this.#b(e.flowId), ""), this.#x(e, {
|
|
1025
1025
|
operation: void 0,
|
|
1026
1026
|
publishing: !1
|
|
1027
|
-
}), this.#c(
|
|
1027
|
+
}), this.#c(B(n, this.#n.t));
|
|
1028
1028
|
return;
|
|
1029
1029
|
}
|
|
1030
|
-
this.#c(
|
|
1030
|
+
this.#c(B(n, this.#n.t));
|
|
1031
1031
|
continue;
|
|
1032
1032
|
}
|
|
1033
1033
|
r = t.value, this.#x(e, { operation: r });
|
|
@@ -1058,8 +1058,8 @@ var $t = class {
|
|
|
1058
1058
|
function tn(e) {
|
|
1059
1059
|
switch (e.kind) {
|
|
1060
1060
|
case "condition": return { [e.node.input.handle]: e.node.input };
|
|
1061
|
-
case "subflow": return
|
|
1062
|
-
case "task": return
|
|
1061
|
+
case "subflow": return tt(e.definition?.inputs ?? []);
|
|
1062
|
+
case "task": return tt(e.definition?.inputs ?? []);
|
|
1063
1063
|
case "value": return {};
|
|
1064
1064
|
case "wait": return { [e.node.input.handle]: e.node.input };
|
|
1065
1065
|
}
|
|
@@ -1068,7 +1068,7 @@ function nn(e) {
|
|
|
1068
1068
|
return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
|
|
1069
1069
|
}
|
|
1070
1070
|
function rn(e, t) {
|
|
1071
|
-
let n =
|
|
1071
|
+
let n = z(e), r = n.graph({ kind: "flow" });
|
|
1072
1072
|
if (r == null) return [];
|
|
1073
1073
|
let i = /* @__PURE__ */ new Set([t]), a = [t];
|
|
1074
1074
|
for (; a.length > 0;) {
|
|
@@ -1080,7 +1080,7 @@ function rn(e, t) {
|
|
|
1080
1080
|
if (r.kind == "trigger") return r.trigger.kind == "manual" || r.trigger.kind == "cron" ? [] : [{
|
|
1081
1081
|
definitions: [{
|
|
1082
1082
|
handle: "payload",
|
|
1083
|
-
jsonSchema:
|
|
1083
|
+
jsonSchema: He(r.trigger),
|
|
1084
1084
|
nullable: !1
|
|
1085
1085
|
}],
|
|
1086
1086
|
nodeId: e,
|
|
@@ -1137,7 +1137,7 @@ var ln = class {
|
|
|
1137
1137
|
#c;
|
|
1138
1138
|
#l = n(en);
|
|
1139
1139
|
#u;
|
|
1140
|
-
constructor(t, n, r, i, a =
|
|
1140
|
+
constructor(t, n, r, i, a = p(), o = P) {
|
|
1141
1141
|
this.#e = i, this.#t = t, this.#o = n, this.#c = r, this.#r = a, this.#n = o, this.$ = {
|
|
1142
1142
|
inputRequest: e(this.#l, (e) => e.inputRequest),
|
|
1143
1143
|
starting: e(this.#l, (e) => e.starting),
|
|
@@ -1159,7 +1159,7 @@ var ln = class {
|
|
|
1159
1159
|
try {
|
|
1160
1160
|
return await this.#d("draft", e, t, t.revisionId, r, void 0, n);
|
|
1161
1161
|
} catch (e) {
|
|
1162
|
-
return r() && this.#c(
|
|
1162
|
+
return r() && this.#c(B(e, this.#r.t)), "unavailable";
|
|
1163
1163
|
} finally {
|
|
1164
1164
|
r() && this.#g({ starting: !1 });
|
|
1165
1165
|
}
|
|
@@ -1169,7 +1169,7 @@ var ln = class {
|
|
|
1169
1169
|
try {
|
|
1170
1170
|
return await this.#d("draft", e, t, t.revisionId, r, void 0, n, !0);
|
|
1171
1171
|
} catch (e) {
|
|
1172
|
-
return r() && this.#c(
|
|
1172
|
+
return r() && this.#c(B(e, this.#r.t)), "unavailable";
|
|
1173
1173
|
} finally {
|
|
1174
1174
|
r() && this.#g({ starting: !1 });
|
|
1175
1175
|
}
|
|
@@ -1189,7 +1189,7 @@ var ln = class {
|
|
|
1189
1189
|
let r = await this.#t.getRevision(e.flowId, n.revisionId);
|
|
1190
1190
|
return t() ? await this.#d("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
|
|
1191
1191
|
} catch (e) {
|
|
1192
|
-
return t() && this.#c(
|
|
1192
|
+
return t() && this.#c(B(e, this.#r.t)), "unavailable";
|
|
1193
1193
|
} finally {
|
|
1194
1194
|
t() && this.#g({ starting: !1 });
|
|
1195
1195
|
}
|
|
@@ -1232,7 +1232,7 @@ var ln = class {
|
|
|
1232
1232
|
valid: s
|
|
1233
1233
|
} }), this.#p(n);
|
|
1234
1234
|
} catch (e) {
|
|
1235
|
-
r() && this.#c(
|
|
1235
|
+
r() && this.#c(B(e, this.#r.t));
|
|
1236
1236
|
} finally {
|
|
1237
1237
|
r() && this.#g({ starting: !1 });
|
|
1238
1238
|
}
|
|
@@ -1244,7 +1244,7 @@ var ln = class {
|
|
|
1244
1244
|
starting: !c,
|
|
1245
1245
|
submitting: void 0
|
|
1246
1246
|
}), this.#p(l);
|
|
1247
|
-
let u =
|
|
1247
|
+
let u = z(r).graph({ kind: "flow" }), d = Object.entries(u?.nodes ?? {}).flatMap(([e, t]) => "inputs" in t ? [] : [{
|
|
1248
1248
|
nodeId: e,
|
|
1249
1249
|
title: t.name
|
|
1250
1250
|
}]);
|
|
@@ -1329,7 +1329,7 @@ var ln = class {
|
|
|
1329
1329
|
});
|
|
1330
1330
|
return !o() || !s() ? !1 : (this.#u = void 0, this.#o.follow(d, s));
|
|
1331
1331
|
} catch (e) {
|
|
1332
|
-
return o() && s() && this.#c(
|
|
1332
|
+
return o() && s() && this.#c(B(e, this.#r.t)), !1;
|
|
1333
1333
|
} finally {
|
|
1334
1334
|
o() && this.#g({
|
|
1335
1335
|
starting: !1,
|
|
@@ -1465,19 +1465,19 @@ function vn(e, t) {
|
|
|
1465
1465
|
//#endregion
|
|
1466
1466
|
//#region src/workbench/browser/runtime/stores/proxyCatalog.ts
|
|
1467
1467
|
function yn(e, t) {
|
|
1468
|
-
let n =
|
|
1469
|
-
if (n.success === !1) throw new
|
|
1470
|
-
if (n.success !== !0 || !Array.isArray(n.data)) return
|
|
1471
|
-
for (let e of n.data) t(
|
|
1468
|
+
let n = pe(e);
|
|
1469
|
+
if (n.success === !1) throw new U(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
|
|
1470
|
+
if (n.success !== !0 || !Array.isArray(n.data)) return F();
|
|
1471
|
+
for (let e of n.data) t(pe(e));
|
|
1472
1472
|
return n;
|
|
1473
1473
|
}
|
|
1474
1474
|
function bn(e) {
|
|
1475
|
-
return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ?
|
|
1476
|
-
serviceId:
|
|
1477
|
-
serviceName:
|
|
1475
|
+
return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ? F() : {
|
|
1476
|
+
serviceId: V(e.service),
|
|
1477
|
+
serviceName: V(e.displayName),
|
|
1478
1478
|
noSetup: e.authTypes.length == 1 && e.authTypes[0] == "no_auth",
|
|
1479
|
-
...e.iconUrl == null || e.iconUrl === "" ? {} : { icon:
|
|
1480
|
-
...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl:
|
|
1479
|
+
...e.iconUrl == null || e.iconUrl === "" ? {} : { icon: V(e.iconUrl) },
|
|
1480
|
+
...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl: V(e.homepageUrl) }
|
|
1481
1481
|
};
|
|
1482
1482
|
}
|
|
1483
1483
|
function xn(e) {
|
|
@@ -1486,44 +1486,44 @@ function xn(e) {
|
|
|
1486
1486
|
"disconnected",
|
|
1487
1487
|
"error",
|
|
1488
1488
|
"reauth_required"
|
|
1489
|
-
].includes(e.status) ?
|
|
1490
|
-
connectionId:
|
|
1491
|
-
serviceId:
|
|
1492
|
-
displayName:
|
|
1489
|
+
].includes(e.status) ? F() : {
|
|
1490
|
+
connectionId: V(e.id),
|
|
1491
|
+
serviceId: V(e.service),
|
|
1492
|
+
displayName: V(e.displayName),
|
|
1493
1493
|
isDefault: e.isDefault,
|
|
1494
1494
|
status: e.status,
|
|
1495
|
-
...e.alias == null ? {} : { alias:
|
|
1495
|
+
...e.alias == null ? {} : { alias: V(e.alias) },
|
|
1496
1496
|
...e.marketplace == null ? {} : { builtInAccount: !0 }
|
|
1497
1497
|
};
|
|
1498
1498
|
}
|
|
1499
1499
|
function Sn(e) {
|
|
1500
|
-
if (
|
|
1500
|
+
if (V(e.id), V(e.service), V(e.name), typeof e.description != "string") return F();
|
|
1501
1501
|
un(e.inputSchema, e.outputSchema);
|
|
1502
1502
|
}
|
|
1503
1503
|
function Cn(e) {
|
|
1504
1504
|
return {
|
|
1505
1505
|
nullable: e.nullable,
|
|
1506
|
-
jsonSchema:
|
|
1506
|
+
jsonSchema: Te(e.json_schema),
|
|
1507
1507
|
...e.description == null ? {} : { description: e.description },
|
|
1508
|
-
...e.value === void 0 ? {} : { value:
|
|
1508
|
+
...e.value === void 0 ? {} : { value: Te(e.value) }
|
|
1509
1509
|
};
|
|
1510
1510
|
}
|
|
1511
1511
|
function wn(e, t) {
|
|
1512
1512
|
let n = t.data.find((t) => t.service == e.service);
|
|
1513
|
-
if (n == null) return
|
|
1513
|
+
if (n == null) return F();
|
|
1514
1514
|
let r = bn(n), i = un(e.inputSchema, e.outputSchema);
|
|
1515
1515
|
return {
|
|
1516
1516
|
serviceId: r.serviceId,
|
|
1517
1517
|
serviceName: r.serviceName,
|
|
1518
1518
|
...r.icon == null ? {} : { icon: r.icon },
|
|
1519
1519
|
...r.homepageUrl == null ? {} : { homepageUrl: r.homepageUrl },
|
|
1520
|
-
actionId:
|
|
1521
|
-
...e.operationType == null ? {} : { operationType:
|
|
1522
|
-
name:
|
|
1520
|
+
actionId: V(e.id),
|
|
1521
|
+
...e.operationType == null ? {} : { operationType: V(e.operationType) },
|
|
1522
|
+
name: V(e.name),
|
|
1523
1523
|
description: e.description,
|
|
1524
1524
|
authenticated: !n.authTypes.includes("no_auth"),
|
|
1525
|
-
inputSchema:
|
|
1526
|
-
outputSchema:
|
|
1525
|
+
inputSchema: Te(e.inputSchema),
|
|
1526
|
+
outputSchema: Te(e.outputSchema),
|
|
1527
1527
|
inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, Cn(e)])),
|
|
1528
1528
|
outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, Cn(e)]))
|
|
1529
1529
|
};
|
|
@@ -1531,8 +1531,8 @@ function wn(e, t) {
|
|
|
1531
1531
|
//#endregion
|
|
1532
1532
|
//#region src/workbench/browser/runtime/stores/catalogStores.ts
|
|
1533
1533
|
function Tn(e) {
|
|
1534
|
-
let t =
|
|
1535
|
-
return t.version != 1 || !Array.isArray(t.actions) ?
|
|
1534
|
+
let t = pe(e);
|
|
1535
|
+
return t.version != 1 || !Array.isArray(t.actions) ? F() : t.actions.map(ze);
|
|
1536
1536
|
}
|
|
1537
1537
|
var En = (...e) => JSON.stringify(e), Dn = class {
|
|
1538
1538
|
constructor(e, t, n) {
|
|
@@ -1546,9 +1546,9 @@ var En = (...e) => JSON.stringify(e), Dn = class {
|
|
|
1546
1546
|
}), a = `/v1/connector/proxy/${this.kind}${i.size ? `?${i}` : ""}`, o = this.entries.get(a);
|
|
1547
1547
|
if (o == null) {
|
|
1548
1548
|
let e = (e) => yn(e, this.kind == "providers" ? bn : this.kind == "apps" ? xn : (e) => {
|
|
1549
|
-
if (Sn(e), e.service != n) return
|
|
1549
|
+
if (Sn(e), e.service != n) return F();
|
|
1550
1550
|
});
|
|
1551
|
-
o = new
|
|
1551
|
+
o = new ie((t, n) => this.client.readProxyCatalog({
|
|
1552
1552
|
path: a,
|
|
1553
1553
|
decode: e
|
|
1554
1554
|
}, t, n), this.kind == "providers" ? 3e5 : 3e4, this.options == null ? void 0 : {
|
|
@@ -1672,7 +1672,7 @@ var En = (...e) => JSON.stringify(e), Dn = class {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
let s = o.get(a);
|
|
1674
1674
|
if (s != null) return s.refresh(), s;
|
|
1675
|
-
let c = new
|
|
1675
|
+
let c = new ie((e, t) => this.client.readCatalog({
|
|
1676
1676
|
path: `/v1/connector/action-metadata?${i}`,
|
|
1677
1677
|
decode: Tn
|
|
1678
1678
|
}, null, t), 3e4);
|
|
@@ -1777,7 +1777,7 @@ function Rn(e, t) {
|
|
|
1777
1777
|
function zn(e, t, n) {
|
|
1778
1778
|
if (e == null) return [];
|
|
1779
1779
|
let r = [];
|
|
1780
|
-
for (let i of [...
|
|
1780
|
+
for (let i of [...Ae(e.revision.content).tasks].toSorted()) {
|
|
1781
1781
|
let a = e.task(i);
|
|
1782
1782
|
if (a?.executor.kind != "connector") continue;
|
|
1783
1783
|
let o = t[a.executor.action];
|
|
@@ -1812,13 +1812,13 @@ var Bn = class {
|
|
|
1812
1812
|
#m;
|
|
1813
1813
|
#h;
|
|
1814
1814
|
#g;
|
|
1815
|
-
constructor(r, i, a, o, s =
|
|
1815
|
+
constructor(r, i, a, o, s = p(), c = i.catalogs) {
|
|
1816
1816
|
this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new L(), this.#o = new L(), this.#d = n(Nn), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
|
|
1817
1817
|
let t = this.#m.$.flowId.value;
|
|
1818
|
-
this.#g || t == null || await
|
|
1818
|
+
this.#g || t == null || await w(this.data.connections.get(void 0, t), e);
|
|
1819
1819
|
}, this.browseAddNodeOptions = (e) => {
|
|
1820
1820
|
let t = this.data.providers.get(this.#m.$.flowId.value, this.#n);
|
|
1821
|
-
return
|
|
1821
|
+
return I(e, (e) => {
|
|
1822
1822
|
let n = e(t), r = e(this.#t.t$);
|
|
1823
1823
|
return {
|
|
1824
1824
|
...n,
|
|
@@ -1827,11 +1827,11 @@ var Bn = class {
|
|
|
1827
1827
|
});
|
|
1828
1828
|
}, this.provideAddNodeOptionChoices = (e, t) => {
|
|
1829
1829
|
let n = e.slice(19), r = this.#m.$.flowId.value, i = this.data.actions.get(n, r, this.#n), a = this.data.providers.get(r, this.#n), o = this.data.connections.get(n, r);
|
|
1830
|
-
return
|
|
1830
|
+
return I(t, (e) => {
|
|
1831
1831
|
let t = e(i), r = e(a).data?.find((e) => e.serviceId == n), s = e(o).data, c = e(this.#t.t$);
|
|
1832
1832
|
return {
|
|
1833
1833
|
...t,
|
|
1834
|
-
data: t.data?.map((e) => Fn(
|
|
1834
|
+
data: t.data?.map((e) => Fn(E({
|
|
1835
1835
|
...e,
|
|
1836
1836
|
...r == null ? {} : {
|
|
1837
1837
|
serviceName: r.serviceName,
|
|
@@ -1842,17 +1842,17 @@ var Bn = class {
|
|
|
1842
1842
|
});
|
|
1843
1843
|
}, this.provideAddNodeOptions = (e, t, n = t) => {
|
|
1844
1844
|
let r = this.#m.$.flowId.value, i = e.trim();
|
|
1845
|
-
if (i.length == 0) return
|
|
1845
|
+
if (i.length == 0) return I(t, (e) => ({
|
|
1846
1846
|
data: In(Object.values(e(this.$.actions)), e(this.#t.t$)),
|
|
1847
1847
|
refreshing: !1,
|
|
1848
1848
|
error: void 0
|
|
1849
1849
|
}));
|
|
1850
1850
|
let a = this.data.actions.search(i, r, this.#n, n).get();
|
|
1851
|
-
return
|
|
1851
|
+
return I(t, (e) => {
|
|
1852
1852
|
let t = e(a), n = e(this.#t.t$);
|
|
1853
1853
|
return {
|
|
1854
1854
|
...t,
|
|
1855
|
-
data: t.data?.map((t) => Fn(
|
|
1855
|
+
data: t.data?.map((t) => Fn(E(t, e(k(this.data.connections.get(t.serviceId, r)))), n))
|
|
1856
1856
|
};
|
|
1857
1857
|
});
|
|
1858
1858
|
}, this.retryCatalog = () => {
|
|
@@ -1861,14 +1861,14 @@ var Bn = class {
|
|
|
1861
1861
|
let l = t((e) => {
|
|
1862
1862
|
let t = e(i.$.flowId);
|
|
1863
1863
|
return Object.fromEntries(e(this.#f).flatMap((n) => {
|
|
1864
|
-
let r = e(
|
|
1865
|
-
return r == null ? [] : [[n,
|
|
1864
|
+
let r = e(k(this.data.actions.detail(n, t, this.#n)));
|
|
1865
|
+
return r == null ? [] : [[n, E(r, e(k(this.data.connections.get(r.serviceId, t))))]];
|
|
1866
1866
|
}));
|
|
1867
1867
|
}), u = t((e) => {
|
|
1868
1868
|
let t = e(i.$.flowId);
|
|
1869
1869
|
return Object.fromEntries(e(this.#p).flatMap((n) => {
|
|
1870
|
-
let r = e(
|
|
1871
|
-
return r == null ? [] : [[n,
|
|
1870
|
+
let r = e(k(this.data.connections.get(n, t)));
|
|
1871
|
+
return r == null ? [] : [[n, et(r)]];
|
|
1872
1872
|
}));
|
|
1873
1873
|
});
|
|
1874
1874
|
this.#l = t((e) => {
|
|
@@ -1877,16 +1877,16 @@ var Bn = class {
|
|
|
1877
1877
|
let r = e(l)[t.actionId], a = r == null ? void 0 : e(u)[r.serviceId], o = e(this.data.actions.detail(t.actionId, e(i.$.flowId), this.#n)).error, s = r == null ? void 0 : e(this.data.connections.get(r.serviceId, e(i.$.flowId))).error, c = t.connectionId == null ? void 0 : a?.byId.get(t.connectionId);
|
|
1878
1878
|
return {
|
|
1879
1879
|
action: r,
|
|
1880
|
-
actionError: o == null ? void 0 :
|
|
1880
|
+
actionError: o == null ? void 0 : B(o, this.#t.t).message,
|
|
1881
1881
|
activeConnections: a?.active,
|
|
1882
1882
|
authorizationPending: r != null && n.authorizationServiceId == r.serviceId,
|
|
1883
1883
|
connection: c,
|
|
1884
|
-
connectionError: s == null ? void 0 :
|
|
1884
|
+
connectionError: s == null ? void 0 : B(s, this.#t.t).message
|
|
1885
1885
|
};
|
|
1886
1886
|
}), this.$ = {
|
|
1887
1887
|
connections: t((e) => {
|
|
1888
1888
|
let t = e(i.$.flowId);
|
|
1889
|
-
return t == null ? [] : e(
|
|
1889
|
+
return t == null ? [] : e(k(this.data.connections.get(void 0, t))) ?? [];
|
|
1890
1890
|
}),
|
|
1891
1891
|
actionLoading: e(this.#d, (e) => e.actionLoading),
|
|
1892
1892
|
actions: l,
|
|
@@ -1930,13 +1930,13 @@ var Bn = class {
|
|
|
1930
1930
|
connectionLoading: void 0
|
|
1931
1931
|
});
|
|
1932
1932
|
try {
|
|
1933
|
-
let a = await
|
|
1933
|
+
let a = await w(i);
|
|
1934
1934
|
if (!this.#S(t, n)) return;
|
|
1935
1935
|
this.#b(this.#f, [a.actionId]), a.authenticated && await this.#_(n, r, a.serviceId, e, t);
|
|
1936
1936
|
} catch (e) {
|
|
1937
1937
|
this.#S(t, n) && this.#x({ actionError: {
|
|
1938
1938
|
actionId: r.actionId,
|
|
1939
|
-
message:
|
|
1939
|
+
message: B(e, this.#t.t).message
|
|
1940
1940
|
} });
|
|
1941
1941
|
} finally {
|
|
1942
1942
|
this.#S(t, n) && this.#d.value.actionLoading == r.actionId && this.#x({ actionLoading: void 0 });
|
|
@@ -1944,11 +1944,11 @@ var Bn = class {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
async loadCodeConnections(e, t) {
|
|
1946
1946
|
let n = this.#m.$.flowId.value;
|
|
1947
|
-
n == null || this.#g || (await
|
|
1947
|
+
n == null || this.#g || (await w(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
|
|
1948
1948
|
}
|
|
1949
1949
|
async loadCodeAction(e, t) {
|
|
1950
1950
|
let n = this.#n, r = this.#m.$.flowId.value;
|
|
1951
|
-
r == null || this.#g || (await
|
|
1951
|
+
r == null || this.#g || (await w(this.data.actions.detail(e, r, n), t), !(t.aborted || this.#g || n != this.#n || r != this.#m.$.flowId.value) && this.#b(this.#f, [e]));
|
|
1952
1952
|
}
|
|
1953
1953
|
async connect(e) {
|
|
1954
1954
|
if (this.#g) return;
|
|
@@ -1969,7 +1969,7 @@ var Bn = class {
|
|
|
1969
1969
|
serviceId: e
|
|
1970
1970
|
}, this.#x({ authorizationServiceId: e });
|
|
1971
1971
|
} catch (e) {
|
|
1972
|
-
this.#g || this.#u(
|
|
1972
|
+
this.#g || this.#u(B(e, this.#t.t));
|
|
1973
1973
|
}
|
|
1974
1974
|
}
|
|
1975
1975
|
async setConnection(e, t) {
|
|
@@ -1995,16 +1995,16 @@ var Bn = class {
|
|
|
1995
1995
|
let i;
|
|
1996
1996
|
try {
|
|
1997
1997
|
let r = this.data.connections.get(t, e, n);
|
|
1998
|
-
await Promise.resolve(), i = await
|
|
1998
|
+
await Promise.resolve(), i = await w(r, void 0, n);
|
|
1999
1999
|
} catch (n) {
|
|
2000
2000
|
this.#S(r, e) && this.#x({ connectionError: {
|
|
2001
|
-
message:
|
|
2001
|
+
message: B(n, this.#t.t).message,
|
|
2002
2002
|
serviceId: t
|
|
2003
2003
|
} });
|
|
2004
2004
|
return;
|
|
2005
2005
|
}
|
|
2006
2006
|
if (!this.#S(r, e)) return;
|
|
2007
|
-
let a =
|
|
2007
|
+
let a = et(i);
|
|
2008
2008
|
return this.#b(this.#p, [t]), a;
|
|
2009
2009
|
}
|
|
2010
2010
|
async #y(e, t, n) {
|
|
@@ -2032,7 +2032,7 @@ var Bn = class {
|
|
|
2032
2032
|
if (r.length > 0) {
|
|
2033
2033
|
for (let e of r) this.#i.add(e);
|
|
2034
2034
|
try {
|
|
2035
|
-
let n = await Promise.all(r.map((e) =>
|
|
2035
|
+
let n = await Promise.all(r.map((e) => w(this.data.actions.detail(e, t, this.#n))));
|
|
2036
2036
|
if (!this.#S(e, t)) return;
|
|
2037
2037
|
this.#b(this.#f, n.map((e) => e.actionId));
|
|
2038
2038
|
} catch {
|
|
@@ -2043,7 +2043,7 @@ var Bn = class {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
if (!this.#S(e, t)) return;
|
|
2045
2045
|
let i = /* @__PURE__ */ new Set();
|
|
2046
|
-
for (let e of
|
|
2046
|
+
for (let e of Ae(n.revision.content).tasks) {
|
|
2047
2047
|
let t = n.task(e);
|
|
2048
2048
|
if (t?.executor.kind != "connector") continue;
|
|
2049
2049
|
let r = this.$.actions.value[t.executor.action];
|
|
@@ -2073,11 +2073,11 @@ var Hn = class {
|
|
|
2073
2073
|
let t = this.#t.get(e);
|
|
2074
2074
|
if (t == null) {
|
|
2075
2075
|
let n = (t) => {
|
|
2076
|
-
let n =
|
|
2076
|
+
let n = Ie(t);
|
|
2077
2077
|
if (n.locale != e) throw Error("Unexpected Trigger catalog language.");
|
|
2078
2078
|
return n;
|
|
2079
2079
|
}, r = this.host.triggerCatalogCache;
|
|
2080
|
-
t = new
|
|
2080
|
+
t = new ie((t, r) => this.client.readCatalog({
|
|
2081
2081
|
path: `/v1/trigger-keys/catalog?locale=${encodeURIComponent(e)}`,
|
|
2082
2082
|
decode: n
|
|
2083
2083
|
}, t, r), 3e5, r == null ? void 0 : {
|
|
@@ -2147,18 +2147,18 @@ var qn = class {
|
|
|
2147
2147
|
#s;
|
|
2148
2148
|
#c;
|
|
2149
2149
|
#l;
|
|
2150
|
-
constructor(r, i, a, o, s =
|
|
2150
|
+
constructor(r, i, a, o, s = p()) {
|
|
2151
2151
|
this.#r = new L(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Un), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new Hn(r, bt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
|
|
2152
2152
|
let t = e(i.$.selection), n = Gn(t, i), r = e(this.#s);
|
|
2153
2153
|
if (t?.kind != "trigger") return { authorizationPending: !1 };
|
|
2154
2154
|
let a = t.trigger;
|
|
2155
2155
|
if (a.kind != "poll" && a.kind != "integration") return { authorizationPending: !1 };
|
|
2156
|
-
let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 :
|
|
2156
|
+
let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 : et(o), c = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).error;
|
|
2157
2157
|
return {
|
|
2158
2158
|
activeConnections: s?.active,
|
|
2159
2159
|
authorizationPending: r.authorizationProvider == n?.provider,
|
|
2160
2160
|
connection: n?.connectionId == null ? void 0 : s?.byId.get(n.connectionId),
|
|
2161
|
-
connectionError: c == null ? void 0 :
|
|
2161
|
+
connectionError: c == null ? void 0 : B(c, this.#n.t).message,
|
|
2162
2162
|
definition: a.definition
|
|
2163
2163
|
};
|
|
2164
2164
|
}), this.$ = {
|
|
@@ -2180,7 +2180,7 @@ var qn = class {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
#u(e, t) {
|
|
2182
2182
|
let n = this.catalog.get(), r = e.trim().toLowerCase();
|
|
2183
|
-
return
|
|
2183
|
+
return I(t, (e) => {
|
|
2184
2184
|
let t = e(n);
|
|
2185
2185
|
e(this.#n.t$);
|
|
2186
2186
|
let i = e(this.#c.$.flowId) != null && e(this.#c.$.target)?.kind == "flow", a = t.data, o = a?.definitions.filter((e) => !r || [
|
|
@@ -2212,11 +2212,11 @@ var qn = class {
|
|
|
2212
2212
|
});
|
|
2213
2213
|
try {
|
|
2214
2214
|
let i = this.#c.catalogs.connections.get(r.provider, n, e || this.#i.has(r.provider));
|
|
2215
|
-
if (await Promise.resolve(), await
|
|
2215
|
+
if (await Promise.resolve(), await w(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
|
|
2216
2216
|
this.#i.delete(r.provider);
|
|
2217
2217
|
} catch (e) {
|
|
2218
2218
|
this.#f(t, n) && this.#d({ connectionError: {
|
|
2219
|
-
message:
|
|
2219
|
+
message: B(e, this.#n.t).message,
|
|
2220
2220
|
provider: r.provider
|
|
2221
2221
|
} });
|
|
2222
2222
|
} finally {
|
|
@@ -2235,7 +2235,7 @@ var qn = class {
|
|
|
2235
2235
|
}
|
|
2236
2236
|
!this.#l && t == this.#c.$.flowId.value && this.#d({ authorizationProvider: e });
|
|
2237
2237
|
} catch (e) {
|
|
2238
|
-
this.#l || this.#o(
|
|
2238
|
+
this.#l || this.#o(B(e, this.#n.t));
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
2241
|
async setConnection(e, t) {
|
|
@@ -2261,7 +2261,7 @@ var qn = class {
|
|
|
2261
2261
|
function Jn(e, t) {
|
|
2262
2262
|
let n = e, r = [];
|
|
2263
2263
|
for (let e of t) {
|
|
2264
|
-
let t =
|
|
2264
|
+
let t = _t(n, [e]), i = [];
|
|
2265
2265
|
switch (e.kind) {
|
|
2266
2266
|
case "graph.node.create":
|
|
2267
2267
|
i.push({
|
|
@@ -2474,15 +2474,15 @@ var Zn = class {
|
|
|
2474
2474
|
this.#a = e;
|
|
2475
2475
|
let t = e, n = [];
|
|
2476
2476
|
for (let e of this.#o) try {
|
|
2477
|
-
t =
|
|
2477
|
+
t = R(t, e.changes), n.push(e);
|
|
2478
2478
|
} catch (t) {
|
|
2479
|
-
if (!(t instanceof
|
|
2479
|
+
if (!(t instanceof rt)) throw t;
|
|
2480
2480
|
e.active = !1;
|
|
2481
2481
|
}
|
|
2482
2482
|
return this.#o = n, t;
|
|
2483
2483
|
}
|
|
2484
2484
|
project(e) {
|
|
2485
|
-
return this.#o.reduce((e, t) =>
|
|
2485
|
+
return this.#o.reduce((e, t) => R(e, t.changes), e);
|
|
2486
2486
|
}
|
|
2487
2487
|
async settled() {
|
|
2488
2488
|
await this.#s;
|
|
@@ -2527,21 +2527,21 @@ var Zn = class {
|
|
|
2527
2527
|
let r = this.#l(e, n, t);
|
|
2528
2528
|
return this.#o.length == 0 && this.#t.check(), r;
|
|
2529
2529
|
} catch (n) {
|
|
2530
|
-
if (n instanceof
|
|
2530
|
+
if (n instanceof U && n.code == "flow.revision-conflict") {
|
|
2531
2531
|
if (!t && await this.#t.recover(e)) {
|
|
2532
2532
|
t = !0, e.changeId = P();
|
|
2533
2533
|
continue;
|
|
2534
2534
|
}
|
|
2535
2535
|
t && await this.#t.recover(e), this.#u(e);
|
|
2536
2536
|
} else {
|
|
2537
|
-
if (!(n instanceof
|
|
2537
|
+
if (!(n instanceof U) && !t) {
|
|
2538
2538
|
let n = this.#a?.revisionId;
|
|
2539
2539
|
if (await this.#t.recover(e)) {
|
|
2540
2540
|
t = !0, e.active && this.#a?.revisionId != n && (e.changeId = P());
|
|
2541
2541
|
continue;
|
|
2542
2542
|
}
|
|
2543
2543
|
}
|
|
2544
|
-
this.#u(e), this.#t.current(e) && this.#r(
|
|
2544
|
+
this.#u(e), this.#t.current(e) && this.#r(B(n, this.#n.t));
|
|
2545
2545
|
}
|
|
2546
2546
|
return;
|
|
2547
2547
|
}
|
|
@@ -2550,7 +2550,7 @@ var Zn = class {
|
|
|
2550
2550
|
#l(e, t, n) {
|
|
2551
2551
|
let r = {
|
|
2552
2552
|
...n.revision,
|
|
2553
|
-
content:
|
|
2553
|
+
content: R(t, e.changes).content
|
|
2554
2554
|
};
|
|
2555
2555
|
return this.#o = this.#o.filter((t) => t !== e), this.#a = r, this.#t.apply(this.project(r)), this.#t.headChanged(e.flowId, r.revisionId), r;
|
|
2556
2556
|
}
|
|
@@ -2634,7 +2634,7 @@ var Zn = class {
|
|
|
2634
2634
|
failed: !t,
|
|
2635
2635
|
loading: !1,
|
|
2636
2636
|
refreshing: !1
|
|
2637
|
-
}), this.#r(
|
|
2637
|
+
}), this.#r(B(n, this.#t.t));
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
2640
|
async loadMore() {
|
|
@@ -2662,7 +2662,7 @@ var Zn = class {
|
|
|
2662
2662
|
this.#c({
|
|
2663
2663
|
loadingMore: !1,
|
|
2664
2664
|
loadMoreFailed: !0
|
|
2665
|
-
}), this.#r(
|
|
2665
|
+
}), this.#r(B(e, this.#t.t));
|
|
2666
2666
|
}
|
|
2667
2667
|
}
|
|
2668
2668
|
async setEnabled(e, t) {
|
|
@@ -2672,7 +2672,7 @@ var Zn = class {
|
|
|
2672
2672
|
let n = await this.#e.setFlowEnabled(e.flowId, e.live.publicationId, t);
|
|
2673
2673
|
this.#s || this.include(n);
|
|
2674
2674
|
} catch (e) {
|
|
2675
|
-
this.#s || (this.#r(
|
|
2675
|
+
this.#s || (this.#r(B(e, this.#t.t)), await this.reload());
|
|
2676
2676
|
} finally {
|
|
2677
2677
|
this.#o.delete(e.flowId);
|
|
2678
2678
|
}
|
|
@@ -2698,7 +2698,7 @@ var Zn = class {
|
|
|
2698
2698
|
message: this.#t.t("notice.published", { name: e.name })
|
|
2699
2699
|
}), this.include(await this.#e.getFlow(e.flowId));
|
|
2700
2700
|
} catch (e) {
|
|
2701
|
-
this.#s || this.#r(
|
|
2701
|
+
this.#s || this.#r(B(e, this.#t.t));
|
|
2702
2702
|
} finally {
|
|
2703
2703
|
this.#o.delete(e.flowId);
|
|
2704
2704
|
}
|
|
@@ -2788,7 +2788,7 @@ var Zn = class {
|
|
|
2788
2788
|
this.#c(a, r), o = !0;
|
|
2789
2789
|
} catch (r) {
|
|
2790
2790
|
if (this.#o || !n()) return;
|
|
2791
|
-
if (r instanceof
|
|
2791
|
+
if (r instanceof U && r.code == "flow.presentation-conflict") try {
|
|
2792
2792
|
let t = await this.#e.getPresentation(e);
|
|
2793
2793
|
if (this.#o || !n()) return;
|
|
2794
2794
|
this.#c(a, t), this.#n({
|
|
@@ -2796,9 +2796,9 @@ var Zn = class {
|
|
|
2796
2796
|
message: this.#t.t("notice.layoutConflict")
|
|
2797
2797
|
});
|
|
2798
2798
|
} catch (e) {
|
|
2799
|
-
!this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(
|
|
2799
|
+
!this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(B(e, this.#t.t));
|
|
2800
2800
|
}
|
|
2801
|
-
else this.#c(a, t), this.#n(
|
|
2801
|
+
else this.#c(a, t), this.#n(B(r, this.#t.t));
|
|
2802
2802
|
}
|
|
2803
2803
|
}), await this.#i, o;
|
|
2804
2804
|
}
|
|
@@ -2844,23 +2844,23 @@ var or = class {
|
|
|
2844
2844
|
...n,
|
|
2845
2845
|
status: ir(e.draft, e.moduleEditor)
|
|
2846
2846
|
};
|
|
2847
|
-
}), 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 :
|
|
2847
|
+
}), 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);
|
|
2848
2848
|
this.#e = e(this.#t, (e) => ({
|
|
2849
|
-
revision: e.draft == null ? void 0 :
|
|
2849
|
+
revision: e.draft == null ? void 0 : z(e.draft),
|
|
2850
2850
|
target: e.target
|
|
2851
2851
|
}), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
|
|
2852
2852
|
let y = e(this.#t, (e) => {
|
|
2853
|
-
if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return
|
|
2853
|
+
if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return z(e.draft).selection(e.target, e.selectedNodeIds[0]);
|
|
2854
2854
|
});
|
|
2855
2855
|
this.$ = {
|
|
2856
2856
|
addNodeOptions: t((e) => {
|
|
2857
2857
|
let { revision: t, target: r } = e(this.#e);
|
|
2858
|
-
return
|
|
2858
|
+
return Ye(t?.revision, r, e(n.t$));
|
|
2859
2859
|
}),
|
|
2860
2860
|
busy: i,
|
|
2861
2861
|
checkLoading: a,
|
|
2862
2862
|
diagnosticFocus: o,
|
|
2863
|
-
diagnosticItems: e(this.#t, (e) =>
|
|
2863
|
+
diagnosticItems: e(this.#t, (e) => Se(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics)),
|
|
2864
2864
|
diagnostics: s,
|
|
2865
2865
|
draft: c,
|
|
2866
2866
|
flow: t((e) => {
|
|
@@ -2876,7 +2876,7 @@ var or = class {
|
|
|
2876
2876
|
flowRefreshing: r.$.refreshing,
|
|
2877
2877
|
flowTotal: r.$.total,
|
|
2878
2878
|
flows: r.$.flows,
|
|
2879
|
-
inspectorDiagnostics: e(this.#t, (e) =>
|
|
2879
|
+
inspectorDiagnostics: e(this.#t, (e) => Ke(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics, y.value)),
|
|
2880
2880
|
live: p,
|
|
2881
2881
|
moduleEditor: l,
|
|
2882
2882
|
nodeFocus: u,
|
|
@@ -2888,7 +2888,7 @@ var or = class {
|
|
|
2888
2888
|
target: g,
|
|
2889
2889
|
targetFlow: t((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
|
|
2890
2890
|
targetName: e(this.#t, (e) => {
|
|
2891
|
-
if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id :
|
|
2891
|
+
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;
|
|
2892
2892
|
}),
|
|
2893
2893
|
workspaceLoadFailed: _,
|
|
2894
2894
|
workspaceLoading: v
|
|
@@ -2938,7 +2938,7 @@ var lr = class {
|
|
|
2938
2938
|
#b;
|
|
2939
2939
|
#x;
|
|
2940
2940
|
#S;
|
|
2941
|
-
constructor(e, t, n = Jt, r =
|
|
2941
|
+
constructor(e, t, n = Jt, r = p(), i = () => {}, a = new Mn(e)) {
|
|
2942
2942
|
this.catalogs = a, this.#n = new L(), this.#u = /* @__PURE__ */ new Map(), this.#d = new Yn(), this.history$ = this.#d.state$, this.#h = 0, this.#g = 0, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new er(e, t, r), this.#l = new or(r, this.#o), this.#t = new Zn(e, t, r, {
|
|
2943
2943
|
apply: (e) => this.#O(e, "local"),
|
|
2944
2944
|
beforeChange: (e) => {
|
|
@@ -3014,7 +3014,7 @@ var lr = class {
|
|
|
3014
3014
|
} catch (e) {
|
|
3015
3015
|
if (!t()) return !1;
|
|
3016
3016
|
this.#S?.(), this.#S = void 0;
|
|
3017
|
-
let n = e instanceof
|
|
3017
|
+
let n = e instanceof U && e.code == ve.flowNotFound;
|
|
3018
3018
|
return this.#V(n ? {
|
|
3019
3019
|
flowId: void 0,
|
|
3020
3020
|
target: void 0,
|
|
@@ -3026,7 +3026,7 @@ var lr = class {
|
|
|
3026
3026
|
}), this.#c(n ? {
|
|
3027
3027
|
kind: "error",
|
|
3028
3028
|
message: this.#r.t("notice.flowMissing")
|
|
3029
|
-
} :
|
|
3029
|
+
} : B(e, this.#r.t)), !1;
|
|
3030
3030
|
}
|
|
3031
3031
|
return !0;
|
|
3032
3032
|
}
|
|
@@ -3043,7 +3043,7 @@ var lr = class {
|
|
|
3043
3043
|
selectNodes(e) {
|
|
3044
3044
|
return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : (this.#C(), this.#V({
|
|
3045
3045
|
diagnosticFocus: void 0,
|
|
3046
|
-
moduleEditor: ar(this.#l.value.draft == null ? void 0 :
|
|
3046
|
+
moduleEditor: ar(this.#l.value.draft == null ? void 0 : z(this.#l.value.draft), this.#l.value.target, e),
|
|
3047
3047
|
nodeFocus: void 0,
|
|
3048
3048
|
selectedNodeIds: e
|
|
3049
3049
|
}), !0);
|
|
@@ -3056,7 +3056,7 @@ var lr = class {
|
|
|
3056
3056
|
let n = await this.#e.getFlow(await t(e));
|
|
3057
3057
|
return this.#o.insert(n), n;
|
|
3058
3058
|
} catch (e) {
|
|
3059
|
-
this.#v || this.#c(
|
|
3059
|
+
this.#v || this.#c(B(e, this.#r.t));
|
|
3060
3060
|
} finally {
|
|
3061
3061
|
this.#V({ busy: void 0 });
|
|
3062
3062
|
}
|
|
@@ -3073,7 +3073,7 @@ var lr = class {
|
|
|
3073
3073
|
message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
|
|
3074
3074
|
}), !0);
|
|
3075
3075
|
} catch (e) {
|
|
3076
|
-
return this.#v || this.#c(
|
|
3076
|
+
return this.#v || this.#c(B(e, this.#r.t)), !1;
|
|
3077
3077
|
} finally {
|
|
3078
3078
|
this.#V({ busy: void 0 });
|
|
3079
3079
|
}
|
|
@@ -3082,7 +3082,7 @@ var lr = class {
|
|
|
3082
3082
|
if (!await this.saveModuleEditor() || this.#l.value.draft == null) return !1;
|
|
3083
3083
|
let t = this.#i();
|
|
3084
3084
|
this.#V({ busy: "resource" });
|
|
3085
|
-
let n = await this.#E(
|
|
3085
|
+
let n = await this.#E(Le(t, e), !1);
|
|
3086
3086
|
return this.#V({ busy: void 0 }), n != null && (this.selectTarget({
|
|
3087
3087
|
id: t,
|
|
3088
3088
|
kind: "subflow"
|
|
@@ -3100,7 +3100,7 @@ var lr = class {
|
|
|
3100
3100
|
try {
|
|
3101
3101
|
i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
|
|
3102
3102
|
} catch (e) {
|
|
3103
|
-
this.#v || this.#c(
|
|
3103
|
+
this.#v || this.#c(B(e, this.#r.t));
|
|
3104
3104
|
}
|
|
3105
3105
|
return this.#V({ busy: void 0 }), i != null && (this.#c({
|
|
3106
3106
|
kind: "success",
|
|
@@ -3113,28 +3113,28 @@ var lr = class {
|
|
|
3113
3113
|
if (r == null || i == null) return;
|
|
3114
3114
|
let a = this.#i();
|
|
3115
3115
|
if (e.kind == "comment") return await this.#T(i, a, t);
|
|
3116
|
-
let o =
|
|
3116
|
+
let o = z(r), s = v(e, o, i, this.#r.t);
|
|
3117
3117
|
if (s == null) return;
|
|
3118
3118
|
if (s.kind == "provider-trigger" && s.connectionId == null && s.definition.key != "feishu_app_bot.on_event") {
|
|
3119
3119
|
try {
|
|
3120
|
-
let e = await
|
|
3120
|
+
let e = await w(this.catalogs.connections.get(s.definition.provider, r.flowId));
|
|
3121
3121
|
s = {
|
|
3122
3122
|
...s,
|
|
3123
|
-
connectionId:
|
|
3123
|
+
connectionId: et(e).preferred?.connectionId
|
|
3124
3124
|
};
|
|
3125
3125
|
} catch (e) {
|
|
3126
|
-
!this.#v && this.#l.value.draft == r && this.#c(
|
|
3126
|
+
!this.#v && this.#l.value.draft == r && this.#c(B(e, this.#r.t));
|
|
3127
3127
|
}
|
|
3128
3128
|
if (this.#v || this.#l.value.draft != r || this.#l.value.target != i) return;
|
|
3129
3129
|
}
|
|
3130
|
-
let c = n?.(a), l =
|
|
3130
|
+
let c = n?.(a), l = Ue(o, i, a, s, this.#i);
|
|
3131
3131
|
if (l == null) return;
|
|
3132
|
-
let u = c == null ? l : [...l, ...Ut(
|
|
3132
|
+
let u = c == null ? l : [...l, ...Ut(R(r, l).content, i, {
|
|
3133
3133
|
source: c.source,
|
|
3134
3134
|
target: c.target,
|
|
3135
3135
|
...c.sourceHandle.startsWith("$branch:") ? { sourceHandle: c.sourceHandle.slice(8) } : {}
|
|
3136
3136
|
})];
|
|
3137
|
-
if (await this.#j("add", 1, u, (e) =>
|
|
3137
|
+
if (await this.#j("add", 1, u, (e) => Be(e, i, { [a]: t }), [a]) && !this.#v) return this.#V({ nodeFocus: {
|
|
3138
3138
|
nodeId: a,
|
|
3139
3139
|
requestId: ++this.#b
|
|
3140
3140
|
} }), a;
|
|
@@ -3163,10 +3163,10 @@ var lr = class {
|
|
|
3163
3163
|
if (!await this.saveModuleEditor()) return;
|
|
3164
3164
|
let e = this.$.revision.value, t = this.#l.value.target;
|
|
3165
3165
|
if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
|
|
3166
|
-
let n = [...this.#l.value.selectedNodeIds], r =
|
|
3166
|
+
let n = [...this.#l.value.selectedNodeIds], r = se(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = Ve(e, t, this.#l.value.selectedNodeIds);
|
|
3167
3167
|
await this.#j("delete", this.#l.value.selectedNodeIds.length, a, (e) => {
|
|
3168
|
-
let r = i.size == 0 ? e :
|
|
3169
|
-
for (let e of n) r =
|
|
3168
|
+
let r = i.size == 0 ? e : T(e, t, i);
|
|
3169
|
+
for (let e of n) r = D(r, t, e, !1);
|
|
3170
3170
|
return r;
|
|
3171
3171
|
}, []);
|
|
3172
3172
|
}
|
|
@@ -3182,14 +3182,14 @@ var lr = class {
|
|
|
3182
3182
|
sourceId: e.id,
|
|
3183
3183
|
title: e.title
|
|
3184
3184
|
}] : []),
|
|
3185
|
-
nodes:
|
|
3185
|
+
nodes: he(e, t, this.#l.value.selectedNodeIds)
|
|
3186
3186
|
};
|
|
3187
3187
|
}
|
|
3188
3188
|
async pasteNodes(e, t = sr) {
|
|
3189
3189
|
if (!await this.saveModuleEditor()) return;
|
|
3190
3190
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3191
3191
|
if (n == null || r == null || this.#m == null) return;
|
|
3192
|
-
let i = new Set(this.#m.hiddenNodeIds), a =
|
|
3192
|
+
let i = new Set(this.#m.hiddenNodeIds), a = ye(n, r, this.#m.nodes, this.#i), o = this.#m.comments.map((e) => ({
|
|
3193
3193
|
...e,
|
|
3194
3194
|
nodeId: this.#i()
|
|
3195
3195
|
}));
|
|
@@ -3207,9 +3207,9 @@ var lr = class {
|
|
|
3207
3207
|
}];
|
|
3208
3208
|
}));
|
|
3209
3209
|
await this.#j("paste", c.size, a.changes, (e) => {
|
|
3210
|
-
let n =
|
|
3211
|
-
for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n =
|
|
3212
|
-
for (let e of o) i.has(e.sourceId) && (n =
|
|
3210
|
+
let n = Be(e, r, f);
|
|
3211
|
+
for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n = D(n, r, a.nodeIds[e], !0));
|
|
3212
|
+
for (let e of o) i.has(e.sourceId) && (n = D(n, r, e.nodeId, !0)), n = j(n, r, e.nodeId, {
|
|
3213
3213
|
content: e.content,
|
|
3214
3214
|
position: {
|
|
3215
3215
|
x: e.position.x + t.x * d,
|
|
@@ -3226,36 +3226,36 @@ var lr = class {
|
|
|
3226
3226
|
async saveNodeSettings(e, t) {
|
|
3227
3227
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3228
3228
|
if (n == null || r == null) return !1;
|
|
3229
|
-
let i =
|
|
3229
|
+
let i = De(n, r, e, t);
|
|
3230
3230
|
return i != null && await this.#E(i) != null;
|
|
3231
3231
|
}
|
|
3232
3232
|
async saveNodeDescription(e, t) {
|
|
3233
3233
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3234
3234
|
if (n == null || r == null) return !1;
|
|
3235
|
-
let i =
|
|
3235
|
+
let i = Ce(n, r, e, t);
|
|
3236
3236
|
return i != null && await this.#E(i) != null;
|
|
3237
3237
|
}
|
|
3238
3238
|
async saveNodeIcon(e, t) {
|
|
3239
3239
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3240
3240
|
if (n == null || r == null) return !1;
|
|
3241
|
-
let i =
|
|
3241
|
+
let i = Re(n, r, e, t);
|
|
3242
3242
|
return i != null && await this.#E(i) != null;
|
|
3243
3243
|
}
|
|
3244
3244
|
async saveNodeTitle(e, t) {
|
|
3245
3245
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3246
3246
|
if (n == null || r == null) return !1;
|
|
3247
|
-
let i =
|
|
3247
|
+
let i = Fe(n, r, e, t);
|
|
3248
3248
|
return i != null && await this.#E(i) != null;
|
|
3249
3249
|
}
|
|
3250
3250
|
async setInputValue(e, t, n) {
|
|
3251
3251
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
3252
3252
|
if (r == null || i == null) return !1;
|
|
3253
|
-
let a =
|
|
3253
|
+
let a = Pe(r, i, e, t, n);
|
|
3254
3254
|
return a != null && await this.#E(a) != null;
|
|
3255
3255
|
}
|
|
3256
3256
|
async setInputSource(e, t, n) {
|
|
3257
3257
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
3258
|
-
return r == null || i == null ? !1 : await this.#E(
|
|
3258
|
+
return r == null || i == null ? !1 : await this.#E(Je(r.revision.content, i, e, t, [{
|
|
3259
3259
|
kind: "node",
|
|
3260
3260
|
...n
|
|
3261
3261
|
}])) != null;
|
|
@@ -3263,30 +3263,30 @@ var lr = class {
|
|
|
3263
3263
|
async setInputVariable(e, t, n) {
|
|
3264
3264
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
3265
3265
|
if (r == null || i == null) return !1;
|
|
3266
|
-
let a = n == null ?
|
|
3266
|
+
let a = n == null ? Pe(r, i, e, t, void 0) : Ge(r, i, e, t, n, this.#i());
|
|
3267
3267
|
return a != null && await this.#E(a) != null;
|
|
3268
3268
|
}
|
|
3269
3269
|
async saveCondition(e, t) {
|
|
3270
3270
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3271
3271
|
if (n == null || r == null) return !1;
|
|
3272
|
-
let i =
|
|
3272
|
+
let i = be(n, r, e, t);
|
|
3273
3273
|
return i != null && await this.#E(i) != null;
|
|
3274
3274
|
}
|
|
3275
3275
|
async saveValue(e, t) {
|
|
3276
3276
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3277
3277
|
if (n == null || r == null) return !1;
|
|
3278
|
-
let i =
|
|
3278
|
+
let i = _e(n, r, e, t);
|
|
3279
3279
|
return i != null && await this.#E(i) != null;
|
|
3280
3280
|
}
|
|
3281
3281
|
async saveWait(e, t) {
|
|
3282
3282
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3283
3283
|
if (n == null || r?.kind != "flow") return !1;
|
|
3284
|
-
let i =
|
|
3284
|
+
let i = Xe(n, r, e, t);
|
|
3285
3285
|
return i != null && await this.#E(i) != null;
|
|
3286
3286
|
}
|
|
3287
3287
|
async saveNodeContentHidden(e, t) {
|
|
3288
3288
|
let n = this.#l.value.target, r = this.#I().nodes.find((t) => t.id == e);
|
|
3289
|
-
n != null && r != null && r.kind != "condition" && await this.#k((r) =>
|
|
3289
|
+
n != null && r != null && r.kind != "condition" && await this.#k((r) => D(r, n, e, t));
|
|
3290
3290
|
}
|
|
3291
3291
|
async saveComment(e, t) {
|
|
3292
3292
|
let n = this.#l.value.target;
|
|
@@ -3300,31 +3300,31 @@ var lr = class {
|
|
|
3300
3300
|
async saveTaskSettings(e, t) {
|
|
3301
3301
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3302
3302
|
if (n == null || r == null) return !1;
|
|
3303
|
-
let i =
|
|
3303
|
+
let i = fe(n, r, e, t);
|
|
3304
3304
|
return i != null && await this.#E(i) != null;
|
|
3305
3305
|
}
|
|
3306
3306
|
async saveCodeActions(e, t) {
|
|
3307
3307
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3308
3308
|
if (n == null || r == null) return !1;
|
|
3309
|
-
let i =
|
|
3309
|
+
let i = Ee(n.revision.content, r, e, t);
|
|
3310
3310
|
return i == null || await this.#E(i) != null;
|
|
3311
3311
|
}
|
|
3312
3312
|
async saveTaskPorts(e, t) {
|
|
3313
3313
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3314
3314
|
if (n == null || r == null) return !1;
|
|
3315
|
-
let i =
|
|
3315
|
+
let i = Qe(n, r, e, t);
|
|
3316
3316
|
return i != null && await this.#E(i) != null;
|
|
3317
3317
|
}
|
|
3318
3318
|
async saveTaskAdditionalInputs(e, t) {
|
|
3319
3319
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3320
3320
|
if (n == null || r == null) return !1;
|
|
3321
|
-
let i =
|
|
3321
|
+
let i = qe(n, r, e, t);
|
|
3322
3322
|
return i != null && await this.#E(i) != null;
|
|
3323
3323
|
}
|
|
3324
3324
|
async setConnectorConnection(e, t) {
|
|
3325
3325
|
let n = this.$.revision.value;
|
|
3326
3326
|
if (n == null) return !1;
|
|
3327
|
-
let r =
|
|
3327
|
+
let r = me(n.revision.content, e, t);
|
|
3328
3328
|
return r != null && await this.#E(r) != null;
|
|
3329
3329
|
}
|
|
3330
3330
|
get eventSourceClient() {
|
|
@@ -3340,15 +3340,15 @@ var lr = class {
|
|
|
3340
3340
|
if (n == null || r?.kind != "flow") return !1;
|
|
3341
3341
|
let i = n.graph(r)?.nodes[e];
|
|
3342
3342
|
if (i?.kind != "integration" || i.definition.key != "feishu_app_bot.on_event" || t.provider != i.definition.provider) return !1;
|
|
3343
|
-
let a =
|
|
3343
|
+
let a = $e(n.revision.content, r, e, t.connectionId);
|
|
3344
3344
|
if (a == null) return !1;
|
|
3345
3345
|
let o = i.config.sourceId != t.sourceId;
|
|
3346
3346
|
return await this.#E([
|
|
3347
3347
|
...a,
|
|
3348
|
-
...
|
|
3349
|
-
...o ?
|
|
3350
|
-
...o ?
|
|
3351
|
-
...o ?
|
|
3348
|
+
...N(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
|
|
3349
|
+
...o ? N(n.revision.content, r, e, "eventTypes", []) ?? [] : [],
|
|
3350
|
+
...o ? N(n.revision.content, r, e, "resource", void 0) ?? [] : [],
|
|
3351
|
+
...o ? N(n.revision.content, r, e, "chatIds", void 0) ?? [] : []
|
|
3352
3352
|
]) != null;
|
|
3353
3353
|
}
|
|
3354
3354
|
async loadTriggerConfigOptions(e, t, n) {
|
|
@@ -3359,39 +3359,39 @@ var lr = class {
|
|
|
3359
3359
|
async saveTriggerConfig(e, t, n) {
|
|
3360
3360
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
3361
3361
|
if (r == null || i?.kind != "flow") return !1;
|
|
3362
|
-
let a =
|
|
3362
|
+
let a = N(r.revision.content, i, e, t, n);
|
|
3363
3363
|
if (a == null) return !1;
|
|
3364
3364
|
let o = r.graph(i)?.nodes[e];
|
|
3365
3365
|
if (a.length > 0 && o?.kind == "integration" && o.definition.key == "feishu_app_bot.on_event" && t == "eventTypes") {
|
|
3366
3366
|
let t = Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
|
|
3367
|
-
|
|
3367
|
+
b(t) || (a = [...a, ...N(r.revision.content, i, e, "chatIds", void 0) ?? []]), O(o.config.resource) && o.config.resource.kind != S(t) && (a = [...a, ...N(r.revision.content, i, e, "resource", void 0) ?? []]);
|
|
3368
3368
|
}
|
|
3369
|
-
return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...
|
|
3369
|
+
return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...N(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#E(a) != null;
|
|
3370
3370
|
}
|
|
3371
3371
|
async saveTriggerSchedule(e, t) {
|
|
3372
3372
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3373
3373
|
if (n == null || r?.kind != "flow") return !1;
|
|
3374
|
-
let i =
|
|
3374
|
+
let i = Ze(n.revision.content, r, e, t);
|
|
3375
3375
|
return i != null && await this.#E(i) != null;
|
|
3376
3376
|
}
|
|
3377
3377
|
async saveWebhook(e, t) {
|
|
3378
3378
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3379
3379
|
if (n == null || r?.kind != "flow") return !1;
|
|
3380
|
-
let i =
|
|
3380
|
+
let i = ce(n, r, e, t);
|
|
3381
3381
|
return i != null && await this.#E(i) != null;
|
|
3382
3382
|
}
|
|
3383
3383
|
async setTriggerConnection(e, t) {
|
|
3384
3384
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
3385
3385
|
if (n == null || r?.kind != "flow") return !1;
|
|
3386
|
-
let i =
|
|
3386
|
+
let i = $e(n.revision.content, r, e, t);
|
|
3387
3387
|
if (i == null) return !1;
|
|
3388
3388
|
let a = n.graph(r)?.nodes[e];
|
|
3389
|
-
return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) =>
|
|
3389
|
+
return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) => N(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#E(i) != null;
|
|
3390
3390
|
}
|
|
3391
3391
|
async saveSubflowSettings(e, t) {
|
|
3392
3392
|
let n = this.$.revision.value;
|
|
3393
3393
|
if (n == null) return !1;
|
|
3394
|
-
let r =
|
|
3394
|
+
let r = we(n, e, t);
|
|
3395
3395
|
return r != null && await this.#E(r) != null;
|
|
3396
3396
|
}
|
|
3397
3397
|
updateModuleSource(e) {
|
|
@@ -3480,7 +3480,7 @@ var lr = class {
|
|
|
3480
3480
|
r != null && (r.editor = {
|
|
3481
3481
|
...r.editor,
|
|
3482
3482
|
phase: "failed"
|
|
3483
|
-
}), this.#c(
|
|
3483
|
+
}), this.#c(B(t, this.#r.t));
|
|
3484
3484
|
}
|
|
3485
3485
|
this.#B();
|
|
3486
3486
|
}
|
|
@@ -3488,11 +3488,11 @@ var lr = class {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
async moveNodes(e) {
|
|
3490
3490
|
let t = this.#l.value.target;
|
|
3491
|
-
t != null && await this.#j("move", Object.keys(e).length, [], (n) =>
|
|
3491
|
+
t != null && await this.#j("move", Object.keys(e).length, [], (n) => Be(n, t, e));
|
|
3492
3492
|
}
|
|
3493
3493
|
async moveViewport(e) {
|
|
3494
3494
|
let t = this.#l.value.target;
|
|
3495
|
-
t != null && await this.#k((n) =>
|
|
3495
|
+
t != null && await this.#k((n) => te(n, t, e), !0);
|
|
3496
3496
|
}
|
|
3497
3497
|
async check() {
|
|
3498
3498
|
await this.#N();
|
|
@@ -3533,7 +3533,7 @@ var lr = class {
|
|
|
3533
3533
|
if (this.#v || (this.#d.applying || this.#d.failed) && !n) return;
|
|
3534
3534
|
let r = this.#l.value.flowId, i = this.#l.value.draft;
|
|
3535
3535
|
if (r == null || i == null) return;
|
|
3536
|
-
if (e.length == 0 || u(
|
|
3536
|
+
if (e.length == 0 || u(R(i, e).content, i.content)) return i;
|
|
3537
3537
|
let a = !n && this.#d.clear(), o = this.#n.capture();
|
|
3538
3538
|
this.#d.pending++, this.#d.publish();
|
|
3539
3539
|
try {
|
|
@@ -3555,7 +3555,7 @@ var lr = class {
|
|
|
3555
3555
|
for (let t = 0; t < 2 && e(); t += 1) {
|
|
3556
3556
|
let t = this.#l.value.draft;
|
|
3557
3557
|
if (t == null) return;
|
|
3558
|
-
let n =
|
|
3558
|
+
let n = Oe(t.content);
|
|
3559
3559
|
if (n.length == 0) {
|
|
3560
3560
|
this.#N();
|
|
3561
3561
|
return;
|
|
@@ -3602,8 +3602,8 @@ var lr = class {
|
|
|
3602
3602
|
if (this.#v || this.#d.applying || this.#d.failed) return !1;
|
|
3603
3603
|
let { draft: a, target: o, presentation: s, selectedNodeIds: c } = this.#l.value;
|
|
3604
3604
|
if (a == null || o == null || s == null) return !1;
|
|
3605
|
-
let l = r?.(s.value) ?? s.value, d =
|
|
3606
|
-
if (u(
|
|
3605
|
+
let l = r?.(s.value) ?? s.value, d = re(s.value, l, o);
|
|
3606
|
+
if (u(R(a, n).content, a.content) && d.nodeIds.length == 0) return !0;
|
|
3607
3607
|
let f = this.#d.generation, p = Jn(a.content, n);
|
|
3608
3608
|
this.#d.pending++;
|
|
3609
3609
|
let m = this.#d.record({
|
|
@@ -3625,7 +3625,7 @@ var lr = class {
|
|
|
3625
3625
|
let [o, s] = await Promise.all([e, t]);
|
|
3626
3626
|
return o != null && s && (!m || f == this.#d.generation);
|
|
3627
3627
|
} catch (e) {
|
|
3628
|
-
return this.#c(
|
|
3628
|
+
return this.#c(B(e, this.#r.t)), this.retryHistorySync(), !1;
|
|
3629
3629
|
} finally {
|
|
3630
3630
|
this.#d.pending--, this.#v || this.#d.publish();
|
|
3631
3631
|
}
|
|
@@ -3644,10 +3644,10 @@ var lr = class {
|
|
|
3644
3644
|
let r = this.#d.generation;
|
|
3645
3645
|
this.#d.applying = !0, this.#d.publish();
|
|
3646
3646
|
try {
|
|
3647
|
-
let [t, i] = await Promise.all([this.#E(e ? n.forward : n.inverse, !0, !0), this.#k((t) =>
|
|
3647
|
+
let [t, i] = await Promise.all([this.#E(e ? n.forward : n.inverse, !0, !0), this.#k((t) => de(t, n.target, n.presentation, e), !0)]);
|
|
3648
3648
|
t != null && i && r == this.#d.generation && (this.selectNodes(e ? n.afterSelection : n.beforeSelection), this.#d.complete(e));
|
|
3649
3649
|
} catch (e) {
|
|
3650
|
-
this.#c(
|
|
3650
|
+
this.#c(B(e, this.#r.t)), this.retryHistorySync();
|
|
3651
3651
|
} finally {
|
|
3652
3652
|
this.#d.applying = !1, this.#v || this.#d.publish();
|
|
3653
3653
|
}
|
|
@@ -3704,7 +3704,7 @@ var lr = class {
|
|
|
3704
3704
|
});
|
|
3705
3705
|
}
|
|
3706
3706
|
} catch (n) {
|
|
3707
|
-
!this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(
|
|
3707
|
+
!this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(B(n, this.#r.t));
|
|
3708
3708
|
} finally {
|
|
3709
3709
|
!this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#V({ checkLoading: !1 });
|
|
3710
3710
|
}
|
|
@@ -3745,15 +3745,15 @@ var lr = class {
|
|
|
3745
3745
|
message: this.#r.t(o ? "notice.moduleUpdated" : "notice.draftUpdated")
|
|
3746
3746
|
}), this.#N(), !0;
|
|
3747
3747
|
} catch (n) {
|
|
3748
|
-
return t && this.#R(e) && this.#c(
|
|
3748
|
+
return t && this.#R(e) && this.#c(B(n, this.#r.t)), !1;
|
|
3749
3749
|
}
|
|
3750
3750
|
}
|
|
3751
3751
|
#I() {
|
|
3752
3752
|
let e = this.#l.value;
|
|
3753
|
-
return
|
|
3753
|
+
return _(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
|
|
3754
3754
|
}
|
|
3755
3755
|
#L(e) {
|
|
3756
|
-
let t =
|
|
3756
|
+
let t = z(e), n = cr(t, this.#l.value.target);
|
|
3757
3757
|
return {
|
|
3758
3758
|
revision: t,
|
|
3759
3759
|
selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
|
|
@@ -3788,7 +3788,7 @@ function ur(e) {
|
|
|
3788
3788
|
return new Map(e.nodes.map((e) => [e.id, e]));
|
|
3789
3789
|
}
|
|
3790
3790
|
function dr(e, t) {
|
|
3791
|
-
return e == null || t == null ? [] :
|
|
3791
|
+
return e == null || t == null ? [] : z(e).designerInputs(t);
|
|
3792
3792
|
}
|
|
3793
3793
|
function fr(e, t, n, r, i) {
|
|
3794
3794
|
if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
|
|
@@ -3813,14 +3813,14 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
|
|
|
3813
3813
|
#c;
|
|
3814
3814
|
#l;
|
|
3815
3815
|
#u;
|
|
3816
|
-
constructor(r, i, a = P, o =
|
|
3816
|
+
constructor(r, i, a = P, o = p(), s = pr, c = !0) {
|
|
3817
3817
|
this.#t = new L(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = !1, this.retryCatalog = () => {
|
|
3818
3818
|
this.connectors.retryCatalog(), this.triggers.catalog.retry();
|
|
3819
|
-
}, this.provideAddNodeOptions = (e, t, n = t) =>
|
|
3819
|
+
}, this.provideAddNodeOptions = (e, t, n = t) => Me(t, [this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t, n)]), this.browseAddNodeOptions = (e) => Me(e, [this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)]), this.provideAddNodeOptionChoices = (e, t) => this.connectors.provideAddNodeOptionChoices(e, t), this.#e = r, this.results = r, this.#n = o, this.#i = c;
|
|
3820
3820
|
let l = (e) => {
|
|
3821
3821
|
this.#u || this.#r.set(e);
|
|
3822
3822
|
};
|
|
3823
|
-
this.runs = new
|
|
3823
|
+
this.runs = new We(r, l, o), this.workspace = new lr(r, l, Jt, o, (e) => {
|
|
3824
3824
|
e.kind == "run.created" ? this.#d(r, e) : this.runs.changed(e.runId);
|
|
3825
3825
|
}, new Mn(r, s.connectorCache)), this.connectors = new Bn(r, this.workspace, l, s, o), this.triggers = new qn(r, this.workspace, l, s, o), this.publications = new $t(r, this.workspace, l, i, a, o), this.runRequests = new ln(r, this.runs, l, async (e) => {
|
|
3826
3826
|
if (!(e != this.workspace.$.flowId.value || !await this.workspace.saveModuleEditor() || this.#u || e != this.workspace.$.flowId.value)) return this.workspace.$.draft.value?.revisionId;
|
|
@@ -3834,24 +3834,24 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
|
|
|
3834
3834
|
diagnostics: [...t.diagnostics, ...n],
|
|
3835
3835
|
valid: !1
|
|
3836
3836
|
};
|
|
3837
|
-
}), d = /* @__PURE__ */ new Map(),
|
|
3837
|
+
}), d = /* @__PURE__ */ new Map(), f, m = t((e) => {
|
|
3838
3838
|
let t = e(this.workspace.$.draft);
|
|
3839
|
-
|
|
3840
|
-
let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = t == null ? void 0 : e(
|
|
3839
|
+
f != t?.flowId && (d.clear(), f = t?.flowId);
|
|
3840
|
+
let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = t == null ? void 0 : e(k(this.workspace.catalogs.providers.get(t.flowId, o.lang))), s = Object.fromEntries((a ?? []).map((e) => [e.serviceId, e])), c = e(this.connectors.$.actions), l = e(this.connectors.$.catalogs), p = e(o.t$), m = e(this.runs.$.run), h = e(this.runs.$.events), g = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, v = [
|
|
3841
3841
|
...dr(t, n),
|
|
3842
|
-
r == null || n == null ? void 0 :
|
|
3842
|
+
r == null || n == null ? void 0 : ne(r, n),
|
|
3843
3843
|
i,
|
|
3844
3844
|
c,
|
|
3845
3845
|
a,
|
|
3846
3846
|
l,
|
|
3847
|
+
p,
|
|
3847
3848
|
m,
|
|
3848
3849
|
h,
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
], y = d.get(_);
|
|
3850
|
+
...m == null ? [] : [t?.revisionId]
|
|
3851
|
+
], y = d.get(g);
|
|
3852
3852
|
if (y != null && y.inputs.length == v.length && y.inputs.every((e, t) => e === v[t])) return y.graph;
|
|
3853
|
-
let b =
|
|
3854
|
-
return d.set(
|
|
3853
|
+
let b = _(t, n, r, i, c, l, p, m, h, s);
|
|
3854
|
+
return d.set(g, {
|
|
3855
3855
|
graph: b,
|
|
3856
3856
|
inputs: v
|
|
3857
3857
|
}), b;
|
|
@@ -3866,7 +3866,7 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
|
|
|
3866
3866
|
if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
|
|
3867
3867
|
if (e(this.publications.$.changingTriggerId) != null) return "trigger";
|
|
3868
3868
|
}),
|
|
3869
|
-
diagnosticItems: t((e) =>
|
|
3869
|
+
diagnosticItems: t((e) => Se(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
|
|
3870
3870
|
diagnostics: u,
|
|
3871
3871
|
designer: m,
|
|
3872
3872
|
designerNodeById: h,
|
|
@@ -3908,7 +3908,7 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
|
|
|
3908
3908
|
if (this.#u) return;
|
|
3909
3909
|
this.#a.set(e.map((e) => e.name)), this.#o.set(!0);
|
|
3910
3910
|
} catch (e) {
|
|
3911
|
-
this.#c = !0, this.#u || this.#r.set(
|
|
3911
|
+
this.#c = !0, this.#u || this.#r.set(B(e, this.#n.t));
|
|
3912
3912
|
} finally {
|
|
3913
3913
|
this.#l = void 0, this.#u || this.#s.set(!1);
|
|
3914
3914
|
}
|
|
@@ -3952,7 +3952,7 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
|
|
|
3952
3952
|
let r = await this.workspace.addNode(e, t, n);
|
|
3953
3953
|
return r != null && e.kind == "connector" && this.connectors.refresh(), r != null && e.kind == "trigger" && this.triggers.refresh(), r;
|
|
3954
3954
|
} catch (e) {
|
|
3955
|
-
this.#u || this.#r.set(
|
|
3955
|
+
this.#u || this.#r.set(B(e, this.#n.t));
|
|
3956
3956
|
return;
|
|
3957
3957
|
}
|
|
3958
3958
|
}
|
|
@@ -3987,7 +3987,7 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
|
|
|
3987
3987
|
return;
|
|
3988
3988
|
}
|
|
3989
3989
|
}
|
|
3990
|
-
}, hr = Tt(() => import("./flowWorkspace-
|
|
3990
|
+
}, hr = Tt(() => import("./flowWorkspace-zcweMsLS.js").then((e) => e.t));
|
|
3991
3991
|
function gr({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: c, tokenLabel: u }) {
|
|
3992
3992
|
let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ q(Ct, { children: [
|
|
3993
3993
|
/* @__PURE__ */ K("div", {
|
|
@@ -4020,10 +4020,10 @@ function gr({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
4020
4020
|
children: t
|
|
4021
4021
|
})]
|
|
4022
4022
|
}),
|
|
4023
|
-
d && /* @__PURE__ */ K(
|
|
4023
|
+
d && /* @__PURE__ */ K(lt, { children: /* @__PURE__ */ q(st, {
|
|
4024
4024
|
"data-invalid": n != null,
|
|
4025
4025
|
children: [
|
|
4026
|
-
/* @__PURE__ */ K(
|
|
4026
|
+
/* @__PURE__ */ K(ct, {
|
|
4027
4027
|
htmlFor: "session-token",
|
|
4028
4028
|
children: u
|
|
4029
4029
|
}),
|
|
@@ -4046,19 +4046,19 @@ function gr({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
4046
4046
|
type: "password",
|
|
4047
4047
|
value: f
|
|
4048
4048
|
}),
|
|
4049
|
-
n != null && /* @__PURE__ */ K(
|
|
4049
|
+
n != null && /* @__PURE__ */ K(ft, { children: n })
|
|
4050
4050
|
]
|
|
4051
4051
|
}) }),
|
|
4052
4052
|
e != null && r != null && /* @__PURE__ */ q(s, {
|
|
4053
4053
|
disabled: a || d && f.length == 0,
|
|
4054
4054
|
size: "lg",
|
|
4055
4055
|
type: "submit",
|
|
4056
|
-
children: [a && /* @__PURE__ */ K(
|
|
4056
|
+
children: [a && /* @__PURE__ */ K(ot, {
|
|
4057
4057
|
"aria-label": e,
|
|
4058
4058
|
"data-icon": "inline-start"
|
|
4059
4059
|
}), e]
|
|
4060
4060
|
}),
|
|
4061
|
-
a && e == null && /* @__PURE__ */ K(
|
|
4061
|
+
a && e == null && /* @__PURE__ */ K(ot, { "aria-label": t })
|
|
4062
4062
|
] }), m = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
|
|
4063
4063
|
return /* @__PURE__ */ K("main", {
|
|
4064
4064
|
className: "open-flow-workbench",
|
|
@@ -4120,43 +4120,43 @@ function vr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
4120
4120
|
})
|
|
4121
4121
|
});
|
|
4122
4122
|
}
|
|
4123
|
-
function yr({ 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:
|
|
4124
|
-
let
|
|
4125
|
-
|
|
4126
|
-
let [{ i18n:
|
|
4127
|
-
let e =
|
|
4123
|
+
function yr({ 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: m, onLanguageChange: h, onNavigate: g, preferences: _, theme: v, variables: y = !0 }) {
|
|
4124
|
+
let b = Et(g);
|
|
4125
|
+
b.current = g;
|
|
4126
|
+
let [{ i18n: x, navigation: S, store: C }] = Y(() => {
|
|
4127
|
+
let e = p(u), t = new mr(new xe((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), _, P, e, a, y);
|
|
4128
4128
|
return {
|
|
4129
4129
|
i18n: e,
|
|
4130
|
-
navigation: new At(t, d, (e, t) =>
|
|
4130
|
+
navigation: new At(t, d, (e, t) => b.current(e, t)),
|
|
4131
4131
|
store: t
|
|
4132
4132
|
};
|
|
4133
4133
|
});
|
|
4134
4134
|
return J(() => {
|
|
4135
|
-
|
|
4135
|
+
S.start();
|
|
4136
4136
|
let e = () => {
|
|
4137
|
-
|
|
4137
|
+
C.connectors.refreshAfterAuthorization(), C.triggers.refreshAfterAuthorization(), C.invalidateVariableNames();
|
|
4138
4138
|
};
|
|
4139
4139
|
return globalThis.addEventListener("focus", e), () => {
|
|
4140
|
-
globalThis.removeEventListener("focus", e),
|
|
4140
|
+
globalThis.removeEventListener("focus", e), S.dispose(), C.dispose(), x.dispose();
|
|
4141
4141
|
};
|
|
4142
4142
|
}, [
|
|
4143
|
-
b,
|
|
4144
4143
|
x,
|
|
4145
|
-
S
|
|
4146
|
-
|
|
4147
|
-
|
|
4144
|
+
S,
|
|
4145
|
+
C
|
|
4146
|
+
]), J(() => void S.apply(d), [d, S]), J(() => {
|
|
4147
|
+
C.triggers.catalog.setLanguage(u), C.connectors.setLanguage(u), x.lang != u && x.switchLang(u);
|
|
4148
4148
|
}, [
|
|
4149
|
-
|
|
4149
|
+
x,
|
|
4150
4150
|
u,
|
|
4151
|
-
|
|
4151
|
+
C
|
|
4152
4152
|
]), /* @__PURE__ */ K(o, {
|
|
4153
|
-
i18n:
|
|
4153
|
+
i18n: x,
|
|
4154
4154
|
children: /* @__PURE__ */ q("div", {
|
|
4155
4155
|
className: "open-flow-theme open-flow-workbench",
|
|
4156
|
-
"data-theme":
|
|
4156
|
+
"data-theme": v,
|
|
4157
4157
|
children: [/* @__PURE__ */ K(_r, {
|
|
4158
4158
|
host: a,
|
|
4159
|
-
store:
|
|
4159
|
+
store: C
|
|
4160
4160
|
}), /* @__PURE__ */ K(vr, {
|
|
4161
4161
|
catalogWidth: e,
|
|
4162
4162
|
createFlow: t,
|
|
@@ -4167,12 +4167,12 @@ function yr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
4167
4167
|
hostTitle: c,
|
|
4168
4168
|
hrefFor: l,
|
|
4169
4169
|
language: u,
|
|
4170
|
-
navigation:
|
|
4170
|
+
navigation: S,
|
|
4171
4171
|
onConfigureConnector: f,
|
|
4172
|
-
onHostAction:
|
|
4173
|
-
onLanguageChange:
|
|
4174
|
-
store:
|
|
4175
|
-
theme:
|
|
4172
|
+
onHostAction: m,
|
|
4173
|
+
onLanguageChange: h,
|
|
4174
|
+
store: C,
|
|
4175
|
+
theme: v
|
|
4176
4176
|
})]
|
|
4177
4177
|
})
|
|
4178
4178
|
});
|
|
@@ -4181,4 +4181,4 @@ function br({ sessionKey: e, ...t }) {
|
|
|
4181
4181
|
return /* @__PURE__ */ K(yr, { ...t }, e);
|
|
4182
4182
|
}
|
|
4183
4183
|
//#endregion
|
|
4184
|
-
export {
|
|
4184
|
+
export { ge as EventSourcesPage, gr as OpenFlowSessionGate, br as OpenFlowWorkbench, St as isWorkbenchLanguage, bt as resolveWorkbenchLanguage, xt as workbenchLanguageNames, yt as workbenchLanguages };
|