@oomol-lab/open-flow 0.1.0-beta.4 → 0.1.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{DesignerIcon-DdfuH2jW.js → DesignerIcon-XKBRy_0Q.js} +640 -640
- package/dist/browser/createResourceDialog-Cf7QpXp6.js +505 -0
- package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
- package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
- package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
- package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
- package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
- package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
- package/dist/browser/dist-DxahK_I8.js +2688 -0
- package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
- package/dist/browser/{esm-C9jQK70n.js → esm-CTcBY7hh.js} +5 -6
- package/dist/browser/flow-authoring-module.d.ts +2 -2
- package/dist/browser/flow-authoring-node.d.ts +2 -2
- package/dist/browser/flow-authoring.js +475 -209
- package/dist/browser/flow-change.d.ts +98 -8
- package/dist/browser/flow-change.js +319 -96
- package/dist/browser/{flowChanges-Bs-ZcJV8.js → flowChanges-BDqD_Q4G.js} +1628 -1555
- package/dist/browser/{flowRunInputEditorStore-BYa8zFLC.js → flowRunInputEditorStore-DDidwd8h.js} +9 -1
- package/dist/browser/{flowWorkspace-BewofPeU.js → flowWorkspace-CPBHm14t.js} +9803 -9769
- package/dist/browser/{getPseudoElementBounds-qDxSDwzN.js → getPseudoElementBounds-5LArT6Xc.js} +494 -474
- package/dist/browser/icons-CRxvozBE.js +726 -0
- package/dist/browser/{typeScriptSession-CwMPjseS.js → typeScriptSession-_TgJ_7Oq.js} +256 -257
- package/dist/browser/{waitNotificationInputs-DtrPBwA1.js → waitNotificationInputs-lPrLDTOd.js} +2 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +573 -578
- package/dist/browser/{workbenchSelect-CX8KtT7L.js → workbenchSelect-Cf1zlVm9.js} +398 -398
- package/dist/common/control-api-conformance.js +27 -19
- package/dist/common/control-api.d.ts +4 -11
- package/dist/common/control-api.js +6 -18
- package/dist/common/flow-encoding.js +4 -0
- package/dist/common/flow-semantics.js +8 -10
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/runtime-contract.js +27 -0
- package/dist/common/scheduler.d.ts +1 -1
- package/dist/common/scheduler.js +17 -18
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/browser/createResourceDialog-4YQKl8lG.js +0 -505
- package/dist/browser/dist-BpopSHwP.js +0 -1543
- package/dist/browser/dist-CUSrALSX.js +0 -1620
- package/dist/browser/icons-DRoMXL5h.js +0 -521
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as e, f as t, i as n } from "./dist-C46JByB-.js";
|
|
2
2
|
import { a as r, i, s as a, t as o } from "./main-DmjVyuWr.js";
|
|
3
|
-
import {
|
|
4
|
-
import { a as u, d, f,
|
|
5
|
-
import { t as
|
|
6
|
-
import { $ as
|
|
7
|
-
import { a as
|
|
8
|
-
import { Suspense as
|
|
9
|
-
import { Fragment as Ke, jsx as
|
|
3
|
+
import { Un as s, Vn as c, jt as l } from "./getPseudoElementBounds-5LArT6Xc.js";
|
|
4
|
+
import { a as u, c as d, d as f, f as p, i as m, n as h, o as g, p as _, t as v, u as y } from "./icons-CRxvozBE.js";
|
|
5
|
+
import { t as b } from "./workbenchSelect-Cf1zlVm9.js";
|
|
6
|
+
import { $ as x, A as S, C as ee, D as C, E as w, F as T, G as E, H as D, I as O, J as te, M as k, N as A, O as j, P as M, Q as N, S as P, U as F, V as I, W as ne, X as re, Y as ie, Z as ae, _ as oe, a as se, at as ce, b as le, c as ue, ct as de, d as fe, dt as pe, et as me, f as he, ft as L, g as ge, h as _e, i as ve, it as ye, j as R, l as be, lt as xe, m as Se, mt as z, n as B, nt as Ce, o as we, ot as Te, p as Ee, pt as De, q as Oe, rt as ke, s as Ae, st as je, t as Me, tt as V, u as Ne, ut as Pe, v as Fe, w as Ie, x as Le, y as Re, z as ze } from "./flowChanges-BDqD_Q4G.js";
|
|
7
|
+
import { a as Be, i as Ve, n as He, r as Ue } from "./languages-DgJehE1g.js";
|
|
8
|
+
import { Suspense as We, lazy as H, useEffect as U, useRef as Ge, useState as W } from "react";
|
|
9
|
+
import { Fragment as Ke, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
10
10
|
//#region src/workbench/browser/runtime/navigation.ts
|
|
11
11
|
var qe = class {
|
|
12
12
|
#e;
|
|
@@ -91,19 +91,19 @@ function Je(e, t) {
|
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
|
|
94
|
-
var Ye =
|
|
95
|
-
label:
|
|
94
|
+
var Ye = H(() => import("./createResourceDialog-Cf7QpXp6.js")), Xe = Be.map((e) => ({
|
|
95
|
+
label: Ve[e],
|
|
96
96
|
value: e
|
|
97
97
|
}));
|
|
98
98
|
function Ze({ language: e, onLanguageChange: t }) {
|
|
99
|
-
let n = r(), [i, a] =
|
|
100
|
-
return t == null ? null : /* @__PURE__ */
|
|
99
|
+
let n = r(), [i, a] = W(null);
|
|
100
|
+
return t == null ? null : /* @__PURE__ */ K("div", {
|
|
101
101
|
className: "resource-language",
|
|
102
102
|
ref: a,
|
|
103
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ G("span", {
|
|
104
104
|
className: "sr-only",
|
|
105
105
|
children: n("language.label")
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ G(b, {
|
|
107
107
|
ariaLabel: n("language.label"),
|
|
108
108
|
onValueChange: (e) => t(e),
|
|
109
109
|
options: Xe,
|
|
@@ -112,20 +112,20 @@ function Ze({ language: e, onLanguageChange: t }) {
|
|
|
112
112
|
})]
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
function Qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store:
|
|
116
|
-
let
|
|
115
|
+
function Qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: d }) {
|
|
116
|
+
let f = i(), p = r(), [m, h] = W("idle"), [g, y] = W(n.name), b = u(g);
|
|
117
117
|
async function x(e) {
|
|
118
118
|
e.preventDefault();
|
|
119
|
-
let t =
|
|
120
|
-
|
|
119
|
+
let t = g.trim();
|
|
120
|
+
u(t) == null && await d.workspace.renameFlow(n.flowId, t) && h("idle");
|
|
121
121
|
}
|
|
122
122
|
async function S() {
|
|
123
|
-
await
|
|
123
|
+
await d.workspace.deleteFlow(n.flowId) && h("idle");
|
|
124
124
|
}
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ K("div", {
|
|
126
126
|
className: "resource-item-row",
|
|
127
127
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ K(c, {
|
|
129
129
|
"aria-disabled": n.status == "retiring",
|
|
130
130
|
className: "resource-list-row flow-columns",
|
|
131
131
|
nativeButton: !1,
|
|
@@ -134,190 +134,190 @@ function Qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: u }) {
|
|
|
134
134
|
e.preventDefault();
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
me(e, () => o(n));
|
|
138
138
|
},
|
|
139
|
-
render: /* @__PURE__ */
|
|
139
|
+
render: /* @__PURE__ */ G("a", { href: n.status == "retiring" ? void 0 : a }),
|
|
140
140
|
tabIndex: n.status == "retiring" ? -1 : void 0,
|
|
141
141
|
variant: "ghost",
|
|
142
142
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ K("span", {
|
|
144
144
|
className: "resource-primary-cell",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ G("span", {
|
|
146
146
|
className: "resource-icon",
|
|
147
|
-
children: /* @__PURE__ */
|
|
148
|
-
}), /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ G(v, { name: "flow" })
|
|
148
|
+
}), /* @__PURE__ */ K("span", { children: [/* @__PURE__ */ K("span", {
|
|
149
149
|
className: "flex min-w-0 items-center gap-2",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ G("strong", {
|
|
151
151
|
className: "min-w-0 truncate",
|
|
152
152
|
children: n.name
|
|
153
|
-
}), e != null && /* @__PURE__ */
|
|
153
|
+
}), e != null && /* @__PURE__ */ G(pe, {
|
|
154
154
|
className: "min-w-0 shrink",
|
|
155
155
|
title: e,
|
|
156
156
|
variant: "secondary",
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ G("span", {
|
|
158
158
|
className: "truncate",
|
|
159
159
|
children: e
|
|
160
160
|
})
|
|
161
161
|
})]
|
|
162
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ G("code", {
|
|
163
163
|
translate: "no",
|
|
164
164
|
children: n.flowId
|
|
165
165
|
})] })]
|
|
166
166
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ G("time", {
|
|
168
168
|
dateTime: n.updatedAt,
|
|
169
|
-
children: new Date(n.updatedAt).toLocaleString(
|
|
169
|
+
children: new Date(n.updatedAt).toLocaleString(f)
|
|
170
170
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ K("span", {
|
|
172
172
|
className: `resource-status ${n.status == "active" ? "active" : "warning"}`,
|
|
173
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ G("span", {
|
|
174
174
|
"aria-hidden": "true",
|
|
175
175
|
className: `status-dot ${n.status == "active" ? "success" : "running"}`
|
|
176
|
-
}),
|
|
176
|
+
}), p(n.status == "active" ? "resource.active" : "resource.retiring")]
|
|
177
177
|
})
|
|
178
178
|
]
|
|
179
179
|
}),
|
|
180
|
-
n.status == "active" && /* @__PURE__ */
|
|
181
|
-
"aria-expanded":
|
|
182
|
-
"aria-label":
|
|
183
|
-
className:
|
|
180
|
+
n.status == "active" && /* @__PURE__ */ G(c, {
|
|
181
|
+
"aria-expanded": m != "idle",
|
|
182
|
+
"aria-label": p("sidebar.flowActions", { name: n.name }),
|
|
183
|
+
className: s("resource-row-more", m != "idle" && "active"),
|
|
184
184
|
disabled: t != null,
|
|
185
|
-
onClick: () =>
|
|
185
|
+
onClick: () => h(m == "idle" ? "actions" : "idle"),
|
|
186
186
|
size: "icon-sm",
|
|
187
187
|
variant: "ghost",
|
|
188
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ G(v, { name: "more" })
|
|
189
189
|
}),
|
|
190
|
-
|
|
190
|
+
m == "actions" && /* @__PURE__ */ K("div", {
|
|
191
191
|
className: "resource-row-actions",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ G(c, {
|
|
193
193
|
onClick: () => {
|
|
194
|
-
y(n.name),
|
|
194
|
+
y(n.name), h("rename");
|
|
195
195
|
},
|
|
196
196
|
size: "sm",
|
|
197
197
|
variant: "outline",
|
|
198
|
-
children:
|
|
199
|
-
}), /* @__PURE__ */
|
|
200
|
-
onClick: () =>
|
|
198
|
+
children: p("common.rename")
|
|
199
|
+
}), /* @__PURE__ */ G(c, {
|
|
200
|
+
onClick: () => h("delete"),
|
|
201
201
|
size: "sm",
|
|
202
202
|
variant: "destructive",
|
|
203
|
-
children:
|
|
203
|
+
children: p("common.delete")
|
|
204
204
|
})]
|
|
205
205
|
}),
|
|
206
|
-
|
|
206
|
+
m == "rename" && /* @__PURE__ */ K("form", {
|
|
207
207
|
className: "resource-row-form",
|
|
208
208
|
onSubmit: (e) => void x(e),
|
|
209
209
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ G(_, {
|
|
211
211
|
htmlFor: `rename-flow-${n.flowId}`,
|
|
212
|
-
children:
|
|
212
|
+
children: p("sidebar.renameFlow", { name: n.name })
|
|
213
213
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ K("span", {
|
|
215
215
|
className: "resource-row-field",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ G(l, {
|
|
217
217
|
autoComplete: "off",
|
|
218
|
-
"aria-invalid":
|
|
218
|
+
"aria-invalid": g.length > 0 && b != null,
|
|
219
219
|
autoFocus: !0,
|
|
220
220
|
id: `rename-flow-${n.flowId}`,
|
|
221
221
|
name: "flow-name",
|
|
222
222
|
onChange: (e) => y(e.target.value),
|
|
223
223
|
required: !0,
|
|
224
|
-
value:
|
|
225
|
-
}),
|
|
224
|
+
value: g
|
|
225
|
+
}), g.length > 0 && b != null && /* @__PURE__ */ G("small", {
|
|
226
226
|
className: "resource-name-message error",
|
|
227
|
-
children:
|
|
227
|
+
children: p(`resource.nameIssue.${b}`, { max: 80 })
|
|
228
228
|
})]
|
|
229
229
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
onClick: () =>
|
|
230
|
+
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(c, {
|
|
231
|
+
onClick: () => h("idle"),
|
|
232
232
|
size: "sm",
|
|
233
233
|
variant: "outline",
|
|
234
|
-
children:
|
|
235
|
-
}), /* @__PURE__ */
|
|
234
|
+
children: p("common.cancel")
|
|
235
|
+
}), /* @__PURE__ */ G(c, {
|
|
236
236
|
disabled: t != null || b != null,
|
|
237
237
|
size: "sm",
|
|
238
238
|
type: "submit",
|
|
239
|
-
children:
|
|
239
|
+
children: p("common.save")
|
|
240
240
|
})] })
|
|
241
241
|
]
|
|
242
242
|
}),
|
|
243
|
-
|
|
243
|
+
m == "delete" && /* @__PURE__ */ K("div", {
|
|
244
244
|
className: "resource-row-confirm",
|
|
245
245
|
role: "group",
|
|
246
|
-
"aria-label":
|
|
247
|
-
children: [/* @__PURE__ */
|
|
248
|
-
onClick: () =>
|
|
246
|
+
"aria-label": p("sidebar.deleteFlow", { name: n.name }),
|
|
247
|
+
children: [/* @__PURE__ */ G("span", { children: /* @__PURE__ */ G("strong", { children: p("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(c, {
|
|
248
|
+
onClick: () => h("idle"),
|
|
249
249
|
size: "sm",
|
|
250
250
|
variant: "outline",
|
|
251
|
-
children:
|
|
252
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: p("common.cancel")
|
|
252
|
+
}), /* @__PURE__ */ G(c, {
|
|
253
253
|
disabled: t != null,
|
|
254
254
|
onClick: () => void S(),
|
|
255
255
|
size: "sm",
|
|
256
256
|
variant: "destructive",
|
|
257
|
-
children:
|
|
257
|
+
children: p(t == "flow" ? "common.deleting" : "common.delete")
|
|
258
258
|
})] })]
|
|
259
259
|
})
|
|
260
260
|
]
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
function $e() {
|
|
264
|
-
return /* @__PURE__ */
|
|
264
|
+
return /* @__PURE__ */ K("div", {
|
|
265
265
|
"aria-hidden": "true",
|
|
266
266
|
className: "resource-list-row resource-skeleton-row flow-columns",
|
|
267
267
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ K("span", {
|
|
269
269
|
className: "resource-primary-cell",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ G(V, { className: "size-8 shrink-0" }), /* @__PURE__ */ K("span", {
|
|
271
271
|
className: "resource-skeleton-copy",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ G(V, { className: "h-3.5 w-36" }), /* @__PURE__ */ G(V, { className: "h-2.5 w-48 max-w-full" })]
|
|
273
273
|
})]
|
|
274
274
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ G(V, { className: "h-3 w-28" }),
|
|
276
|
+
/* @__PURE__ */ G(V, { className: "h-3 w-16" })
|
|
277
277
|
]
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
-
function et({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: i, hrefForFlow: o, hostAction:
|
|
281
|
-
let y = r(),
|
|
280
|
+
function et({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: i, hrefForFlow: o, hostAction: l, hostTitle: d, language: f, onCreateFlow: p, onHostAction: m, onLanguageChange: h, onSelectFlow: g, store: _ }) {
|
|
281
|
+
let y = r(), b = a(_.workspace.$.busy), S = a(_.workspace.$.flowLoadFailed), ee = a(_.workspace.$.flowLoadMoreFailed), C = a(_.workspace.$.flowLoading), w = a(_.workspace.$.flowLoadingMore), T = a(_.workspace.$.flowNextCursor), E = a(_.workspace.$.flowRefreshing), D = a(_.workspace.$.flows), O = a(_.workspace.$.flowTotal), [te, k] = W(!1), [A, j] = W(""), [M, N] = W(""), P = A.trim().toLocaleLowerCase(), F = D.filter((e) => e.name.toLocaleLowerCase().includes(P));
|
|
282
282
|
async function I(e) {
|
|
283
283
|
e.preventDefault();
|
|
284
284
|
let t = M.trim();
|
|
285
|
-
|
|
285
|
+
u(t) != null || !await p(t) || (k(!1), N(""));
|
|
286
286
|
}
|
|
287
|
-
return /* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ G("main", {
|
|
288
288
|
className: "resource-browser",
|
|
289
|
-
children: /* @__PURE__ */
|
|
290
|
-
className:
|
|
289
|
+
children: /* @__PURE__ */ K("div", {
|
|
290
|
+
className: s("resource-page", e != "default" && "resource-page-full"),
|
|
291
291
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ G("h1", {
|
|
293
293
|
className: "sr-only",
|
|
294
294
|
children: y("resource.flows")
|
|
295
295
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ K("section", {
|
|
297
297
|
"aria-labelledby": "flow-list-title",
|
|
298
298
|
className: "resource-list-section",
|
|
299
299
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ K("div", {
|
|
301
301
|
className: "resource-list-title",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ K("div", {
|
|
303
303
|
className: "resource-list-heading",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
305
305
|
id: "flow-list-title",
|
|
306
306
|
children: y("resource.allFlows")
|
|
307
|
-
}), !
|
|
308
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), !C && /* @__PURE__ */ G("span", { children: y("resource.flowCount", { count: O ?? D.length }) })]
|
|
308
|
+
}), /* @__PURE__ */ K("div", {
|
|
309
309
|
className: "resource-list-actions",
|
|
310
310
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
language:
|
|
311
|
+
/* @__PURE__ */ G(Ze, {
|
|
312
|
+
language: f,
|
|
313
313
|
onLanguageChange: h
|
|
314
314
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ K(Ce, {
|
|
316
316
|
className: "w-full sm:w-56",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ G(ke, { children: /* @__PURE__ */ G(v, {
|
|
318
318
|
name: "search",
|
|
319
319
|
size: 17
|
|
320
|
-
}) }), /* @__PURE__ */
|
|
320
|
+
}) }), /* @__PURE__ */ G(ye, {
|
|
321
321
|
autoComplete: "off",
|
|
322
322
|
"aria-label": y("resource.searchFlows"),
|
|
323
323
|
name: "flow-search",
|
|
@@ -326,114 +326,117 @@ function et({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
|
|
|
326
326
|
value: A
|
|
327
327
|
})]
|
|
328
328
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ G(c, {
|
|
330
330
|
"aria-label": y("common.refresh"),
|
|
331
|
-
disabled:
|
|
332
|
-
onClick: () => void
|
|
331
|
+
disabled: C || E || b != null,
|
|
332
|
+
onClick: () => void _.workspace.reloadFlows(),
|
|
333
333
|
size: "icon",
|
|
334
334
|
title: y("common.refresh"),
|
|
335
335
|
variant: "outline",
|
|
336
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ G(v, {
|
|
337
|
+
className: E ? "animate-spin" : void 0,
|
|
338
|
+
name: "refresh"
|
|
339
|
+
})
|
|
337
340
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ K(c, {
|
|
339
342
|
className: "resource-page-primary-action",
|
|
340
|
-
disabled:
|
|
343
|
+
disabled: b != null,
|
|
341
344
|
onClick: () => k(!0),
|
|
342
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ G(v, {
|
|
343
346
|
"data-icon": "inline-start",
|
|
344
347
|
name: "plus"
|
|
345
348
|
}), y("resource.newFlow")]
|
|
346
349
|
}),
|
|
347
|
-
|
|
348
|
-
action:
|
|
350
|
+
l != null && d != null && m != null && /* @__PURE__ */ G(x, {
|
|
351
|
+
action: l,
|
|
349
352
|
onAction: m,
|
|
350
|
-
title:
|
|
353
|
+
title: d
|
|
351
354
|
})
|
|
352
355
|
]
|
|
353
356
|
})]
|
|
354
357
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ K("div", {
|
|
356
359
|
"aria-hidden": "true",
|
|
357
360
|
className: "resource-list-columns flow-columns",
|
|
358
361
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ G("span", { children: y("resource.name") }),
|
|
363
|
+
/* @__PURE__ */ G("span", { children: y("resource.updated") }),
|
|
364
|
+
/* @__PURE__ */ G("span", { children: y("resource.status") })
|
|
362
365
|
]
|
|
363
366
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ G("div", {
|
|
365
368
|
className: "resource-list",
|
|
366
|
-
children:
|
|
369
|
+
children: C ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ G($e, {}, t)) : S ? /* @__PURE__ */ K(ce, {
|
|
367
370
|
className: "min-h-64",
|
|
368
371
|
role: "alert",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ K(de, { children: [
|
|
373
|
+
/* @__PURE__ */ G(xe, {
|
|
371
374
|
variant: "icon",
|
|
372
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ G(v, {
|
|
373
376
|
name: "alert",
|
|
374
377
|
size: 20
|
|
375
378
|
})
|
|
376
379
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
] }), /* @__PURE__ */
|
|
380
|
-
onClick: () => void
|
|
380
|
+
/* @__PURE__ */ G(Pe, { children: y("resource.flowsLoadFailed") }),
|
|
381
|
+
/* @__PURE__ */ G(je, { children: y("resource.flowsLoadFailedDescription") })
|
|
382
|
+
] }), /* @__PURE__ */ G(Te, { children: /* @__PURE__ */ G(c, {
|
|
383
|
+
onClick: () => void _.retryFlows(),
|
|
381
384
|
variant: "outline",
|
|
382
385
|
children: y("empty.retry")
|
|
383
386
|
}) })]
|
|
384
|
-
}) : F.length == 0 ? /* @__PURE__ */
|
|
387
|
+
}) : F.length == 0 ? /* @__PURE__ */ K(ce, {
|
|
385
388
|
className: "min-h-64",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ K(de, { children: [
|
|
390
|
+
/* @__PURE__ */ G(xe, {
|
|
388
391
|
variant: "icon",
|
|
389
|
-
children: /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ G(v, {
|
|
390
393
|
name: "flow",
|
|
391
394
|
size: 20
|
|
392
395
|
})
|
|
393
396
|
}),
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
] }), P.length == 0 && /* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ G(Pe, { children: y(P.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
|
|
398
|
+
/* @__PURE__ */ G(je, { children: y(P.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
|
|
399
|
+
] }), P.length == 0 && /* @__PURE__ */ G(Te, { children: /* @__PURE__ */ K(c, {
|
|
397
400
|
onClick: () => k(!0),
|
|
398
401
|
variant: "outline",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ G(v, {
|
|
400
403
|
"data-icon": "inline-start",
|
|
401
404
|
name: "plus"
|
|
402
405
|
}), y("resource.newFlow")]
|
|
403
406
|
}) })]
|
|
404
|
-
}) : F.map((e) => /* @__PURE__ */
|
|
407
|
+
}) : F.map((e) => /* @__PURE__ */ G(Qe, {
|
|
405
408
|
badge: i?.[e.flowId],
|
|
406
|
-
busy:
|
|
409
|
+
busy: b,
|
|
407
410
|
flow: e,
|
|
408
411
|
href: o(e),
|
|
409
412
|
onSelect: g,
|
|
410
|
-
store:
|
|
413
|
+
store: _
|
|
411
414
|
}, e.flowId))
|
|
412
415
|
}),
|
|
413
|
-
|
|
416
|
+
T != null && /* @__PURE__ */ G("div", {
|
|
414
417
|
className: "resource-list-footer",
|
|
415
|
-
children: /* @__PURE__ */
|
|
416
|
-
disabled:
|
|
417
|
-
onClick: () => void
|
|
418
|
+
children: /* @__PURE__ */ G(c, {
|
|
419
|
+
disabled: w || E,
|
|
420
|
+
onClick: () => void _.workspace.loadMoreFlows(),
|
|
418
421
|
variant: "outline",
|
|
419
|
-
children: y(
|
|
422
|
+
children: y(w ? "resource.loadingMore" : ee ? "resource.retryLoadMore" : "resource.loadMore")
|
|
420
423
|
})
|
|
421
424
|
})
|
|
422
425
|
]
|
|
423
426
|
}),
|
|
424
|
-
|
|
427
|
+
te && /* @__PURE__ */ G(We, {
|
|
425
428
|
fallback: null,
|
|
426
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ G(Ye, {
|
|
427
430
|
disabled: t,
|
|
428
431
|
field: n,
|
|
429
432
|
id: "flow-name",
|
|
430
|
-
issue:
|
|
433
|
+
issue: u(M),
|
|
431
434
|
label: y("resource.flowName"),
|
|
432
435
|
name: M,
|
|
433
436
|
onNameChange: N,
|
|
434
437
|
onOpenChange: k,
|
|
435
438
|
onSubmit: (e) => void I(e),
|
|
436
|
-
pending:
|
|
439
|
+
pending: b == "flow",
|
|
437
440
|
title: y("resource.newFlow")
|
|
438
441
|
})
|
|
439
442
|
})
|
|
@@ -475,7 +478,8 @@ function it(e, t, n) {
|
|
|
475
478
|
target: n.target,
|
|
476
479
|
targetHandle: n.targetHandle
|
|
477
480
|
}, i = ot(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
|
|
478
|
-
return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] :
|
|
481
|
+
return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : Oe(e, [{
|
|
482
|
+
before: a,
|
|
479
483
|
edge: r,
|
|
480
484
|
kind: "graph.edge.connect",
|
|
481
485
|
target: t
|
|
@@ -489,6 +493,7 @@ function at(e, t, n) {
|
|
|
489
493
|
targetHandle: n.targetHandle
|
|
490
494
|
}, i = ot(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
|
|
491
495
|
return a?.kind != "sources" || !a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : [{
|
|
496
|
+
before: a,
|
|
492
497
|
edge: r,
|
|
493
498
|
kind: "graph.edge.disconnect",
|
|
494
499
|
target: t
|
|
@@ -515,15 +520,17 @@ async function st(e) {
|
|
|
515
520
|
return [];
|
|
516
521
|
}
|
|
517
522
|
}
|
|
518
|
-
function ct(e, t, n) {
|
|
523
|
+
function ct(e, t, n, r, i) {
|
|
519
524
|
return [{
|
|
520
|
-
|
|
525
|
+
beforeImports: n,
|
|
526
|
+
beforeSource: t,
|
|
527
|
+
imports: i,
|
|
521
528
|
kind: "module.source.replace",
|
|
522
529
|
moduleId: e,
|
|
523
|
-
source:
|
|
530
|
+
source: r
|
|
524
531
|
}];
|
|
525
532
|
}
|
|
526
|
-
var lt = rt("23456789abcdefghjkmnpqrstuvwxyz", 10),
|
|
533
|
+
var lt = rt("23456789abcdefghjkmnpqrstuvwxyz", 10), q = {
|
|
527
534
|
activities: [],
|
|
528
535
|
activitiesLoadFailed: !1,
|
|
529
536
|
activitiesLoading: !1,
|
|
@@ -537,7 +544,7 @@ var lt = rt("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
|
|
|
537
544
|
publications: [],
|
|
538
545
|
publishing: !1
|
|
539
546
|
}, ut = 20, dt = 50, ft = 750;
|
|
540
|
-
function
|
|
547
|
+
function J(e, t) {
|
|
541
548
|
return e?.flowId == t.flowId;
|
|
542
549
|
}
|
|
543
550
|
var pt = class {
|
|
@@ -550,7 +557,7 @@ var pt = class {
|
|
|
550
557
|
#o = new F();
|
|
551
558
|
#s = new F();
|
|
552
559
|
#c;
|
|
553
|
-
#l = t(
|
|
560
|
+
#l = t(q);
|
|
554
561
|
#u;
|
|
555
562
|
#d;
|
|
556
563
|
constructor(t, n, r, i, a = () => crypto.randomUUID(), o = L()) {
|
|
@@ -586,12 +593,12 @@ var pt = class {
|
|
|
586
593
|
this.#l.dispose();
|
|
587
594
|
}
|
|
588
595
|
reset() {
|
|
589
|
-
this.#r.invalidate(), this.#i.invalidate(), this.#o.invalidate(), this.#s.invalidate(), this.#d = void 0, this.#l.set(
|
|
596
|
+
this.#r.invalidate(), this.#i.invalidate(), this.#o.invalidate(), this.#s.invalidate(), this.#d = void 0, this.#l.set(q);
|
|
590
597
|
}
|
|
591
598
|
async load(e) {
|
|
592
599
|
let t = { flowId: e }, n = this.#r.begin();
|
|
593
|
-
|
|
594
|
-
...
|
|
600
|
+
J(this.#l.value.target, t) || (this.#i.invalidate(), this.#d = void 0), this.#c(void 0), this.#l.set({
|
|
601
|
+
...q,
|
|
595
602
|
loading: !0,
|
|
596
603
|
target: t
|
|
597
604
|
});
|
|
@@ -816,7 +823,7 @@ var pt = class {
|
|
|
816
823
|
}
|
|
817
824
|
async #f(e) {
|
|
818
825
|
let [t, n, r] = await this.#m(e);
|
|
819
|
-
this.#u.updateLive(t), await this.#u.refreshFlows(),
|
|
826
|
+
this.#u.updateLive(t), await this.#u.refreshFlows(), J(this.#l.value.target, e) && this.#y({
|
|
820
827
|
bindings: r,
|
|
821
828
|
live: t,
|
|
822
829
|
loadFailed: !1,
|
|
@@ -893,8 +900,8 @@ var pt = class {
|
|
|
893
900
|
return `publish-operation:${e}`;
|
|
894
901
|
}
|
|
895
902
|
#v(e, t) {
|
|
896
|
-
|
|
897
|
-
...
|
|
903
|
+
J(this.#l.value.target, e) ? this.#y(t) : this.#l.set({
|
|
904
|
+
...q,
|
|
898
905
|
...t,
|
|
899
906
|
target: e
|
|
900
907
|
});
|
|
@@ -909,21 +916,17 @@ var pt = class {
|
|
|
909
916
|
function ht(e) {
|
|
910
917
|
switch (e.kind) {
|
|
911
918
|
case "condition": return { [e.node.input.handle]: e.node.input };
|
|
912
|
-
case "subflow": return
|
|
913
|
-
case "task": return
|
|
919
|
+
case "subflow": return m(e.definition?.inputs ?? []);
|
|
920
|
+
case "task": return m(e.definition?.inputs ?? []);
|
|
914
921
|
case "value": return {};
|
|
915
|
-
case "wait": return {
|
|
916
|
-
jsonSchema: {},
|
|
917
|
-
nullable: !0,
|
|
918
|
-
value: null
|
|
919
|
-
} };
|
|
922
|
+
case "wait": return { [e.node.input.handle]: e.node.input };
|
|
920
923
|
}
|
|
921
924
|
}
|
|
922
925
|
function gt(e) {
|
|
923
926
|
return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
|
|
924
927
|
}
|
|
925
928
|
async function _t(e, t) {
|
|
926
|
-
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-
|
|
929
|
+
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-DDidwd8h.js").then((e) => e.r), r = I(e), i = r.graph({ kind: "flow" });
|
|
927
930
|
return i == null ? [] : Object.entries(i.nodes).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, i]) => {
|
|
928
931
|
let a = r.resolveNode(e, i);
|
|
929
932
|
if (a.kind == "trigger") return [];
|
|
@@ -1083,18 +1086,18 @@ var vt = class {
|
|
|
1083
1086
|
...e
|
|
1084
1087
|
});
|
|
1085
1088
|
}
|
|
1086
|
-
},
|
|
1089
|
+
}, Y = {
|
|
1087
1090
|
actions: {},
|
|
1088
1091
|
catalogs: {}
|
|
1089
1092
|
};
|
|
1090
|
-
function
|
|
1093
|
+
function yt(e) {
|
|
1091
1094
|
return Object.entries(e).map(([e, t]) => ({
|
|
1092
1095
|
description: t.description,
|
|
1093
1096
|
handle: e,
|
|
1094
1097
|
jsonSchema: t.jsonSchema
|
|
1095
1098
|
}));
|
|
1096
1099
|
}
|
|
1097
|
-
function
|
|
1100
|
+
function X(e, t) {
|
|
1098
1101
|
return {
|
|
1099
1102
|
connector: e,
|
|
1100
1103
|
description: e.authenticated && e.defaultConnection == null ? t("addNode.connectorNeedsConnection", {
|
|
@@ -1104,13 +1107,13 @@ function J(e, t) {
|
|
|
1104
1107
|
group: t("addNode.connectorActions"),
|
|
1105
1108
|
icon: T(e),
|
|
1106
1109
|
id: `connector:${e.actionId}`,
|
|
1107
|
-
inputs:
|
|
1110
|
+
inputs: yt(e.inputs),
|
|
1108
1111
|
kind: "connector",
|
|
1109
1112
|
label: e.name,
|
|
1110
|
-
outputs:
|
|
1113
|
+
outputs: yt(e.outputs)
|
|
1111
1114
|
};
|
|
1112
1115
|
}
|
|
1113
|
-
function
|
|
1116
|
+
function bt(e, t) {
|
|
1114
1117
|
let n = /* @__PURE__ */ new Map();
|
|
1115
1118
|
for (let t of e) {
|
|
1116
1119
|
let e = n.get(t.serviceId) ?? [];
|
|
@@ -1118,7 +1121,7 @@ function xt(e, t) {
|
|
|
1118
1121
|
}
|
|
1119
1122
|
return [...n.values()].toSorted((e, t) => e[0].serviceName.localeCompare(t[0].serviceName)).map((e) => {
|
|
1120
1123
|
let n = e[0], r = e.map((e) => {
|
|
1121
|
-
let n =
|
|
1124
|
+
let n = X(e, t);
|
|
1122
1125
|
return {
|
|
1123
1126
|
description: n.description,
|
|
1124
1127
|
label: n.label,
|
|
@@ -1139,7 +1142,7 @@ function xt(e, t) {
|
|
|
1139
1142
|
};
|
|
1140
1143
|
});
|
|
1141
1144
|
}
|
|
1142
|
-
function
|
|
1145
|
+
function xt(e, t) {
|
|
1143
1146
|
return {
|
|
1144
1147
|
choices: [],
|
|
1145
1148
|
description: t("addNode.connectorBrowseActions"),
|
|
@@ -1153,7 +1156,7 @@ function St(e, t) {
|
|
|
1153
1156
|
serviceId: e.serviceId
|
|
1154
1157
|
};
|
|
1155
1158
|
}
|
|
1156
|
-
function
|
|
1159
|
+
function St(e, t) {
|
|
1157
1160
|
if (e == null) return;
|
|
1158
1161
|
let n = e.kind == "wait" ? e.node.notification?.taskId : e.kind == "task" && e.node.task == null ? e.node.taskId : void 0;
|
|
1159
1162
|
if (n == null) return;
|
|
@@ -1165,7 +1168,7 @@ function Ct(e, t) {
|
|
|
1165
1168
|
taskId: n
|
|
1166
1169
|
};
|
|
1167
1170
|
}
|
|
1168
|
-
function
|
|
1171
|
+
function Ct(e, t, n) {
|
|
1169
1172
|
if (e == null) return [];
|
|
1170
1173
|
let r = [];
|
|
1171
1174
|
for (let i of [...O(e.revision.content).tasks].toSorted()) {
|
|
@@ -1185,7 +1188,7 @@ function wt(e, t, n) {
|
|
|
1185
1188
|
}
|
|
1186
1189
|
return r;
|
|
1187
1190
|
}
|
|
1188
|
-
var
|
|
1191
|
+
var wt = class {
|
|
1189
1192
|
#e;
|
|
1190
1193
|
#t;
|
|
1191
1194
|
#n;
|
|
@@ -1203,12 +1206,12 @@ var Tt = class {
|
|
|
1203
1206
|
#m;
|
|
1204
1207
|
#h;
|
|
1205
1208
|
constructor(r, i, a, o, s = L()) {
|
|
1206
|
-
this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new F(), this.#o = new F(), this.#d = t(
|
|
1209
|
+
this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new F(), this.#o = new F(), this.#d = t(Y), this.#h = !1, this.browseAddNodeOptions = async (e) => {
|
|
1207
1210
|
if (this.#h) return;
|
|
1208
1211
|
let t = this.#f.$.flowId.value;
|
|
1209
1212
|
if (t == null) return;
|
|
1210
1213
|
let n = this.#m ?? await this.#e.listConnectorProviders(e, t);
|
|
1211
|
-
if (!(e.aborted || this.#h || t != this.#f.$.flowId.value)) return this.#m = n, n.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) =>
|
|
1214
|
+
if (!(e.aborted || this.#h || t != this.#f.$.flowId.value)) return this.#m = n, n.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => xt(e, this.#t.t));
|
|
1212
1215
|
}, this.provideAddNodeOptionChoices = async (e, t) => {
|
|
1213
1216
|
if (this.#h) return;
|
|
1214
1217
|
let n = this.#f.$.flowId.value, r = this.#m?.find((t) => `connector-provider:${t.serviceId}` == e);
|
|
@@ -1219,7 +1222,7 @@ var Tt = class {
|
|
|
1219
1222
|
return this.#r.set(r.serviceId, a), this.#b({ actions: {
|
|
1220
1223
|
...this.#d.value.actions,
|
|
1221
1224
|
...Object.fromEntries(a.map((e) => [e.actionId, e]))
|
|
1222
|
-
} }), a.map((e) =>
|
|
1225
|
+
} }), a.map((e) => X(e, this.#t.t));
|
|
1223
1226
|
}, this.provideAddNodeOptions = async (e, t) => {
|
|
1224
1227
|
if (this.#h) return;
|
|
1225
1228
|
let n = this.#f.$.flowId.value;
|
|
@@ -1228,17 +1231,17 @@ var Tt = class {
|
|
|
1228
1231
|
if (t.aborted || this.#h || n != this.#f.$.flowId.value) return;
|
|
1229
1232
|
let a = { ...this.#d.value.actions };
|
|
1230
1233
|
for (let e of i) a[e.actionId] = e;
|
|
1231
|
-
if (this.#b({ actions: a }), r.length != 0) return i.map((e) =>
|
|
1234
|
+
if (this.#b({ actions: a }), r.length != 0) return i.map((e) => X(e, this.#t.t));
|
|
1232
1235
|
let o = new Map(i.map((e) => [e.actionId, e]));
|
|
1233
1236
|
for (let e of this.#f.$.revision.value?.connectorActionIds ?? []) {
|
|
1234
1237
|
let t = a[e];
|
|
1235
1238
|
t != null && o.set(e, t);
|
|
1236
1239
|
}
|
|
1237
|
-
return
|
|
1240
|
+
return bt([...o.values()], this.#t.t);
|
|
1238
1241
|
}, this.#e = r, this.#n = o, this.#f = i, this.#u = a, this.#t = s;
|
|
1239
1242
|
let c = e(this.#d, (e) => e.actions), l = e(this.#d, (e) => e.catalogs);
|
|
1240
1243
|
this.#l = n((e) => {
|
|
1241
|
-
let t =
|
|
1244
|
+
let t = St(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
|
|
1242
1245
|
if (t == null) return { authorizationPending: !1 };
|
|
1243
1246
|
let r = n.actions[t.actionId], a = r == null ? void 0 : n.catalogs[r.serviceId], o = t.connectionId == null ? void 0 : a?.byId.get(t.connectionId);
|
|
1244
1247
|
return o == null && r?.defaultConnection?.connectionId == t.connectionId && (o = r.defaultConnection), {
|
|
@@ -1254,7 +1257,7 @@ var Tt = class {
|
|
|
1254
1257
|
actions: c,
|
|
1255
1258
|
catalogs: l,
|
|
1256
1259
|
connectionLoading: e(this.#d, (e) => e.connectionLoading),
|
|
1257
|
-
diagnostics: n((e) =>
|
|
1260
|
+
diagnostics: n((e) => Ct(e(i.$.revision), e(c), e(l))),
|
|
1258
1261
|
selectedAction: e(this.#l, (e) => e.action),
|
|
1259
1262
|
selectedActionError: e(this.#l, (e) => e.actionError),
|
|
1260
1263
|
selectedActiveConnections: e(this.#l, (e) => e.activeConnections),
|
|
@@ -1269,11 +1272,11 @@ var Tt = class {
|
|
|
1269
1272
|
this.#l.dispose(), this.#d.dispose();
|
|
1270
1273
|
}
|
|
1271
1274
|
reset() {
|
|
1272
|
-
this.#h || (this.#a.invalidate(), this.#o.invalidate(), this.#p = void 0, this.#r.clear(), this.#m = void 0, this.#i.clear(), this.#d.set(
|
|
1275
|
+
this.#h || (this.#a.invalidate(), this.#o.invalidate(), this.#p = void 0, this.#r.clear(), this.#m = void 0, this.#i.clear(), this.#d.set(Y));
|
|
1273
1276
|
}
|
|
1274
1277
|
async refresh(e = !1) {
|
|
1275
1278
|
if (this.#h) return;
|
|
1276
|
-
let t = this.#o.begin(), n = this.#f.$.flowId.value, r =
|
|
1279
|
+
let t = this.#o.begin(), n = this.#f.$.flowId.value, r = St(this.#f.$.selection.value, this.#f.$.revision.value);
|
|
1277
1280
|
if (n == null || r == null) {
|
|
1278
1281
|
(this.#d.value.actionLoading != null || this.#d.value.connectionLoading != null) && this.#b({
|
|
1279
1282
|
actionLoading: void 0,
|
|
@@ -1409,8 +1412,8 @@ var Tt = class {
|
|
|
1409
1412
|
}
|
|
1410
1413
|
await Promise.all([...i].map((n) => this.#v(t, n, !1, e)));
|
|
1411
1414
|
}
|
|
1412
|
-
},
|
|
1413
|
-
function
|
|
1415
|
+
}, Tt = { catalogs: {} }, Et = "trigger:";
|
|
1416
|
+
function Z(e, t) {
|
|
1414
1417
|
if (e?.kind != "trigger") return;
|
|
1415
1418
|
let n = e.trigger;
|
|
1416
1419
|
if (n.kind != "poll" && n.kind != "integration") return;
|
|
@@ -1421,7 +1424,7 @@ function Y(e, t) {
|
|
|
1421
1424
|
triggerId: e.id
|
|
1422
1425
|
};
|
|
1423
1426
|
}
|
|
1424
|
-
function
|
|
1427
|
+
function Dt(e, t) {
|
|
1425
1428
|
return {
|
|
1426
1429
|
description: t.t("addNode.triggerNeedsConnection", { provider: e.provider }),
|
|
1427
1430
|
group: t.t("addNode.triggers"),
|
|
@@ -1429,7 +1432,7 @@ function Ot(e, t) {
|
|
|
1429
1432
|
serviceId: e.provider,
|
|
1430
1433
|
serviceName: e.provider
|
|
1431
1434
|
}),
|
|
1432
|
-
id: `${
|
|
1435
|
+
id: `${Et}${e.key}`,
|
|
1433
1436
|
inputs: [],
|
|
1434
1437
|
kind: "trigger",
|
|
1435
1438
|
label: e.displayName,
|
|
@@ -1443,7 +1446,7 @@ function Ot(e, t) {
|
|
|
1443
1446
|
}
|
|
1444
1447
|
};
|
|
1445
1448
|
}
|
|
1446
|
-
var
|
|
1449
|
+
var Ot = class {
|
|
1447
1450
|
#e;
|
|
1448
1451
|
#t;
|
|
1449
1452
|
#n;
|
|
@@ -1456,11 +1459,11 @@ var kt = class {
|
|
|
1456
1459
|
#l;
|
|
1457
1460
|
#u;
|
|
1458
1461
|
constructor(r, i, a, o, s = L()) {
|
|
1459
|
-
this.#t = new AbortController(), this.#a = new F(), this.#c = t(
|
|
1462
|
+
this.#t = new AbortController(), this.#a = new F(), this.#c = t(Tt), this.#u = !1, this.browseAddNodeOptions = async (e) => {
|
|
1460
1463
|
let t = this.#l.$.flowId.value;
|
|
1461
1464
|
if (e.aborted || this.#u || t == null || this.#l.$.target.value?.kind != "flow") return [];
|
|
1462
1465
|
let n = await this.#d();
|
|
1463
|
-
if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) =>
|
|
1466
|
+
if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => Dt(e, this.#i));
|
|
1464
1467
|
}, this.provideAddNodeOptions = async (e, t) => {
|
|
1465
1468
|
let n = this.#l.$.flowId.value;
|
|
1466
1469
|
if (t.aborted || this.#u || n == null || this.#l.$.target.value?.kind != "flow") return [];
|
|
@@ -1474,9 +1477,9 @@ var kt = class {
|
|
|
1474
1477
|
e.name,
|
|
1475
1478
|
e.provider,
|
|
1476
1479
|
e.type
|
|
1477
|
-
].some((e) => e.toLowerCase().includes(r))).map((e) =>
|
|
1480
|
+
].some((e) => e.toLowerCase().includes(r))).map((e) => Dt(e, this.#i));
|
|
1478
1481
|
}, this.#n = r, this.#r = o, this.#i = s, this.#s = a, this.#l = i, this.#o = n((e) => {
|
|
1479
|
-
let t = e(i.$.selection), n =
|
|
1482
|
+
let t = e(i.$.selection), n = Z(t, i), r = e(this.#c);
|
|
1480
1483
|
if (t?.kind != "trigger") return { authorizationPending: !1 };
|
|
1481
1484
|
let a = t.trigger;
|
|
1482
1485
|
if (a.kind != "poll" && a.kind != "integration") return { authorizationPending: !1 };
|
|
@@ -1503,10 +1506,10 @@ var kt = class {
|
|
|
1503
1506
|
this.#o.dispose(), this.#c.dispose();
|
|
1504
1507
|
}
|
|
1505
1508
|
reset() {
|
|
1506
|
-
this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(
|
|
1509
|
+
this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(Tt));
|
|
1507
1510
|
}
|
|
1508
1511
|
async refresh(e = !1) {
|
|
1509
|
-
let t = this.#a.begin(), n = this.#l.$.flowId.value, r =
|
|
1512
|
+
let t = this.#a.begin(), n = this.#l.$.flowId.value, r = Z(this.#l.$.selection.value, this.#l);
|
|
1510
1513
|
if (!this.#u) {
|
|
1511
1514
|
if (n == null || r == null) {
|
|
1512
1515
|
this.#c.value.connectionLoading != null && this.#f({ connectionLoading: void 0 });
|
|
@@ -1563,7 +1566,7 @@ var kt = class {
|
|
|
1563
1566
|
delete t[e], this.#f({
|
|
1564
1567
|
authorizationProvider: void 0,
|
|
1565
1568
|
catalogs: t
|
|
1566
|
-
}),
|
|
1569
|
+
}), Z(this.#l.$.selection.value, this.#l)?.provider == e && await this.refresh(!0);
|
|
1567
1570
|
}
|
|
1568
1571
|
#d() {
|
|
1569
1572
|
if (this.#e != null) return this.#e;
|
|
@@ -1583,46 +1586,28 @@ var kt = class {
|
|
|
1583
1586
|
}
|
|
1584
1587
|
};
|
|
1585
1588
|
//#endregion
|
|
1586
|
-
//#region src/workbench/browser/runtime/designer/remoteChangeTargets.ts
|
|
1587
|
-
function At(e, t) {
|
|
1588
|
-
return e.kind == t.kind && (e.kind != "subflow" || t.kind == "subflow" && e.id == t.id);
|
|
1589
|
-
}
|
|
1590
|
-
function X(e, t, n, r) {
|
|
1591
|
-
for (let [i, a] of Object.entries(t.graph(n)?.nodes ?? {})) r(a) && e.add(i);
|
|
1592
|
-
}
|
|
1593
|
-
function jt(e, t, n, r) {
|
|
1594
|
-
let i = /* @__PURE__ */ new Set();
|
|
1595
|
-
for (let a of r) switch (a.kind) {
|
|
1596
|
-
case "graph.node.create":
|
|
1597
|
-
case "graph.node.replace":
|
|
1598
|
-
At(a.target, n) && i.add(a.nodeId);
|
|
1599
|
-
break;
|
|
1600
|
-
case "task.replace":
|
|
1601
|
-
X(i, e, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId), X(i, t, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId);
|
|
1602
|
-
break;
|
|
1603
|
-
case "module.source.replace":
|
|
1604
|
-
X(i, e, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId), X(i, t, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId);
|
|
1605
|
-
break;
|
|
1606
|
-
case "subflow.definition.replace": X(i, e, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId), X(i, t, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId);
|
|
1607
|
-
}
|
|
1608
|
-
return new Set([...i].filter((e) => t.selection(n, e) != null));
|
|
1609
|
-
}
|
|
1610
|
-
//#endregion
|
|
1611
1589
|
//#region src/workbench/browser/runtime/stores/draftChanges.ts
|
|
1612
|
-
function
|
|
1613
|
-
if (e.length != 1) return;
|
|
1614
|
-
let
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1590
|
+
function kt(e, t) {
|
|
1591
|
+
if (e.length != 1 || t.length != 1) return;
|
|
1592
|
+
let n = e[0], r = t[0];
|
|
1593
|
+
if (n?.kind == "graph.node.field.set" && r?.kind == "graph.node.field.set") return n.nodeId != r.nodeId || n.field != r.field || n.target.kind != r.target.kind || n.target.kind == "subflow" && (r.target.kind != "subflow" || n.target.id != r.target.id) ? void 0 : [{
|
|
1594
|
+
before: n.before,
|
|
1595
|
+
field: r.field,
|
|
1596
|
+
kind: r.kind,
|
|
1597
|
+
nodeId: r.nodeId,
|
|
1598
|
+
target: r.target,
|
|
1599
|
+
value: r.value
|
|
1600
|
+
}];
|
|
1601
|
+
if (n?.kind == "graph.node.input.set" && r?.kind == "graph.node.input.set") return n.nodeId != r.nodeId || n.handle != r.handle || n.target.kind != r.target.kind || n.target.kind == "subflow" && (r.target.kind != "subflow" || n.target.id != r.target.id) ? void 0 : [{
|
|
1602
|
+
before: n.before,
|
|
1603
|
+
handle: r.handle,
|
|
1604
|
+
kind: r.kind,
|
|
1605
|
+
nodeId: r.nodeId,
|
|
1606
|
+
target: r.target,
|
|
1607
|
+
value: r.value
|
|
1608
|
+
}];
|
|
1624
1609
|
}
|
|
1625
|
-
var
|
|
1610
|
+
var At = class {
|
|
1626
1611
|
#e;
|
|
1627
1612
|
#t;
|
|
1628
1613
|
#n;
|
|
@@ -1648,6 +1633,14 @@ var Nt = class {
|
|
|
1648
1633
|
}
|
|
1649
1634
|
replaceCommitted(e) {
|
|
1650
1635
|
this.#a = e;
|
|
1636
|
+
let t = e, n = [];
|
|
1637
|
+
for (let e of this.#o) try {
|
|
1638
|
+
t = B(t, e.changes), n.push(e);
|
|
1639
|
+
} catch (t) {
|
|
1640
|
+
if (!(t instanceof h)) throw t;
|
|
1641
|
+
e.active = !1;
|
|
1642
|
+
}
|
|
1643
|
+
return this.#o = n, t;
|
|
1651
1644
|
}
|
|
1652
1645
|
project(e) {
|
|
1653
1646
|
return this.#o.reduce((e, t) => B(e, t.changes), e);
|
|
@@ -1657,30 +1650,32 @@ var Nt = class {
|
|
|
1657
1650
|
return this.#s = t, t;
|
|
1658
1651
|
}
|
|
1659
1652
|
async change(e, t, n, r = !0) {
|
|
1660
|
-
this.#
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
let
|
|
1653
|
+
let i = this.#o.at(-1), a = i == null || i.started || !i.active ? void 0 : kt(i.changes, n);
|
|
1654
|
+
if (i != null && a != null) return i.changes = a, this.#a != null && this.#t.apply(this.project(this.#a)), i.result;
|
|
1655
|
+
this.#t.beforeChange(r);
|
|
1656
|
+
let o = {
|
|
1664
1657
|
...e,
|
|
1658
|
+
active: !0,
|
|
1659
|
+
changeId: crypto.randomUUID(),
|
|
1665
1660
|
changes: n,
|
|
1666
1661
|
started: !1
|
|
1667
1662
|
};
|
|
1668
|
-
this.#a ??= t, this.#o.push(
|
|
1669
|
-
let
|
|
1670
|
-
|
|
1663
|
+
this.#a ??= t, this.#o.push(o), this.#t.apply(this.project(this.#a)), this.#i += 1;
|
|
1664
|
+
let s = this.#s.then(() => (o.started = !0, this.#c(o)));
|
|
1665
|
+
o.result = s, this.#s = s.then(() => void 0);
|
|
1671
1666
|
try {
|
|
1672
|
-
return await
|
|
1667
|
+
return await s;
|
|
1673
1668
|
} finally {
|
|
1674
1669
|
--this.#i, this.#i == 0 && this.#t.finishChanges();
|
|
1675
1670
|
}
|
|
1676
1671
|
}
|
|
1677
1672
|
async #c(e) {
|
|
1678
1673
|
let t = !1;
|
|
1679
|
-
for (; this.#t.current(e);) {
|
|
1674
|
+
for (; e.active && this.#t.current(e);) {
|
|
1680
1675
|
let n = this.#a;
|
|
1681
1676
|
if (n == null) return;
|
|
1682
1677
|
try {
|
|
1683
|
-
let t = await this.#e.changeDraft(e.flowId, n.revisionId, e.changes);
|
|
1678
|
+
let t = await this.#e.changeDraft(e.flowId, n.revisionId, e.changes, e.changeId);
|
|
1684
1679
|
if (!this.#t.current(e)) return;
|
|
1685
1680
|
if (t.revision.parentRevisionId != n.revisionId) throw Error("Invalid Draft change response.");
|
|
1686
1681
|
let r = this.#l(e, n, t);
|
|
@@ -1688,14 +1683,20 @@ var Nt = class {
|
|
|
1688
1683
|
} catch (n) {
|
|
1689
1684
|
if (n instanceof z && n.code == "flow.revision-conflict") {
|
|
1690
1685
|
if (!t && await this.#t.recover(e)) {
|
|
1691
|
-
t = !0;
|
|
1686
|
+
t = !0, e.changeId = crypto.randomUUID();
|
|
1692
1687
|
continue;
|
|
1693
1688
|
}
|
|
1694
|
-
t && await this.#t.recover(e), this.#u(e)
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1689
|
+
t && await this.#t.recover(e), this.#u(e);
|
|
1690
|
+
} else {
|
|
1691
|
+
if (!(n instanceof z) && !t) {
|
|
1692
|
+
let n = this.#a?.revisionId;
|
|
1693
|
+
if (await this.#t.recover(e)) {
|
|
1694
|
+
t = !0, e.active && this.#a?.revisionId != n && (e.changeId = crypto.randomUUID());
|
|
1695
|
+
continue;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
this.#u(e), this.#t.current(e) && this.#r(D(n, this.#n.t));
|
|
1699
|
+
}
|
|
1699
1700
|
return;
|
|
1700
1701
|
}
|
|
1701
1702
|
}
|
|
@@ -1710,21 +1711,22 @@ var Nt = class {
|
|
|
1710
1711
|
return this.#t.apply(this.project(r), a), this.#t.headChanged(e.flowId, r.revisionId), r;
|
|
1711
1712
|
}
|
|
1712
1713
|
#u(e) {
|
|
1713
|
-
this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
|
|
1714
|
+
e.active = !1, this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
|
|
1714
1715
|
}
|
|
1715
|
-
},
|
|
1716
|
+
}, jt = 50, Mt = {
|
|
1716
1717
|
failed: !1,
|
|
1717
1718
|
loaded: !1,
|
|
1718
1719
|
loading: !0,
|
|
1719
1720
|
loadingMore: !1,
|
|
1720
1721
|
loadMoreFailed: !1,
|
|
1722
|
+
refreshing: !1,
|
|
1721
1723
|
flows: []
|
|
1722
|
-
},
|
|
1724
|
+
}, Nt = class {
|
|
1723
1725
|
#e;
|
|
1724
1726
|
#t;
|
|
1725
1727
|
#n = new F();
|
|
1726
1728
|
#r;
|
|
1727
|
-
#i = t(
|
|
1729
|
+
#i = t(Mt);
|
|
1728
1730
|
#a = !1;
|
|
1729
1731
|
constructor(t, n, r) {
|
|
1730
1732
|
this.#e = t, this.#t = r, this.#r = n, this.$ = {
|
|
@@ -1732,6 +1734,7 @@ var Nt = class {
|
|
|
1732
1734
|
loading: e(this.#i, (e) => e.loading),
|
|
1733
1735
|
loadingMore: e(this.#i, (e) => e.loadingMore),
|
|
1734
1736
|
loadMoreFailed: e(this.#i, (e) => e.loadMoreFailed),
|
|
1737
|
+
refreshing: e(this.#i, (e) => e.refreshing),
|
|
1735
1738
|
nextCursor: e(this.#i, (e) => e.nextCursor),
|
|
1736
1739
|
flows: e(this.#i, (e) => e.flows),
|
|
1737
1740
|
total: e(this.#i, (e) => e.total)
|
|
@@ -1752,13 +1755,18 @@ var Nt = class {
|
|
|
1752
1755
|
return this.#i.value.flows.find((t) => t.flowId == e);
|
|
1753
1756
|
}
|
|
1754
1757
|
async reload() {
|
|
1755
|
-
let e = this.#n.begin();
|
|
1756
|
-
this.#o({
|
|
1758
|
+
let e = this.#n.begin(), t = this.#i.value.loaded;
|
|
1759
|
+
t ? this.#o({
|
|
1760
|
+
failed: !1,
|
|
1761
|
+
loadingMore: !1,
|
|
1762
|
+
loadMoreFailed: !1,
|
|
1763
|
+
refreshing: !0
|
|
1764
|
+
}) : this.#o({
|
|
1757
1765
|
failed: !1,
|
|
1758
|
-
loaded: !1,
|
|
1759
1766
|
loading: !0,
|
|
1760
1767
|
loadingMore: !1,
|
|
1761
1768
|
loadMoreFailed: !1,
|
|
1769
|
+
refreshing: !1,
|
|
1762
1770
|
nextCursor: void 0,
|
|
1763
1771
|
flows: [],
|
|
1764
1772
|
total: void 0
|
|
@@ -1766,28 +1774,30 @@ var Nt = class {
|
|
|
1766
1774
|
try {
|
|
1767
1775
|
let t = await this.#e.listFlows({
|
|
1768
1776
|
includeTotal: !0,
|
|
1769
|
-
limit:
|
|
1777
|
+
limit: jt
|
|
1770
1778
|
});
|
|
1771
1779
|
if (!e()) return;
|
|
1772
1780
|
this.#o({
|
|
1773
1781
|
loaded: !0,
|
|
1774
1782
|
loading: !1,
|
|
1783
|
+
refreshing: !1,
|
|
1775
1784
|
nextCursor: t.nextCursor,
|
|
1776
1785
|
flows: t.flows,
|
|
1777
1786
|
total: t.total
|
|
1778
1787
|
});
|
|
1779
|
-
} catch (
|
|
1788
|
+
} catch (n) {
|
|
1780
1789
|
if (!e()) return;
|
|
1781
1790
|
this.#o({
|
|
1782
|
-
failed: !
|
|
1783
|
-
loading: !1
|
|
1784
|
-
|
|
1791
|
+
failed: !t,
|
|
1792
|
+
loading: !1,
|
|
1793
|
+
refreshing: !1
|
|
1794
|
+
}), this.#r(D(n, this.#t.t));
|
|
1785
1795
|
}
|
|
1786
1796
|
}
|
|
1787
1797
|
async loadMore() {
|
|
1788
|
-
let { loadingMore: e, nextCursor: t } = this.#i.value;
|
|
1789
|
-
if (e || t == null) return;
|
|
1790
|
-
let
|
|
1798
|
+
let { loadingMore: e, nextCursor: t, refreshing: n } = this.#i.value;
|
|
1799
|
+
if (e || n || t == null) return;
|
|
1800
|
+
let r = this.#n.capture();
|
|
1791
1801
|
this.#o({
|
|
1792
1802
|
loadingMore: !0,
|
|
1793
1803
|
loadMoreFailed: !1
|
|
@@ -1795,17 +1805,17 @@ var Nt = class {
|
|
|
1795
1805
|
try {
|
|
1796
1806
|
let e = await this.#e.listFlows({
|
|
1797
1807
|
cursor: t,
|
|
1798
|
-
limit:
|
|
1808
|
+
limit: jt
|
|
1799
1809
|
});
|
|
1800
|
-
if (!
|
|
1801
|
-
let
|
|
1810
|
+
if (!r()) return;
|
|
1811
|
+
let n = new Set(this.#i.value.flows.map((e) => e.flowId));
|
|
1802
1812
|
this.#o({
|
|
1803
1813
|
loadingMore: !1,
|
|
1804
1814
|
nextCursor: e.nextCursor,
|
|
1805
|
-
flows: [...this.#i.value.flows, ...e.flows.filter((e) => !
|
|
1815
|
+
flows: [...this.#i.value.flows, ...e.flows.filter((e) => !n.has(e.flowId))]
|
|
1806
1816
|
});
|
|
1807
1817
|
} catch (e) {
|
|
1808
|
-
if (!
|
|
1818
|
+
if (!r()) return;
|
|
1809
1819
|
this.#o({
|
|
1810
1820
|
loadingMore: !1,
|
|
1811
1821
|
loadMoreFailed: !0
|
|
@@ -1851,7 +1861,7 @@ var Nt = class {
|
|
|
1851
1861
|
...e
|
|
1852
1862
|
});
|
|
1853
1863
|
}
|
|
1854
|
-
},
|
|
1864
|
+
}, Pt = class {
|
|
1855
1865
|
#e;
|
|
1856
1866
|
#t;
|
|
1857
1867
|
#n;
|
|
@@ -1916,21 +1926,21 @@ var Nt = class {
|
|
|
1916
1926
|
value: n
|
|
1917
1927
|
});
|
|
1918
1928
|
}
|
|
1919
|
-
},
|
|
1929
|
+
}, Ft = {
|
|
1920
1930
|
checkLoading: !1,
|
|
1921
1931
|
selectedNodeIds: [],
|
|
1922
1932
|
workspaceLoadFailed: !1,
|
|
1923
1933
|
workspaceLoading: !1
|
|
1924
1934
|
};
|
|
1925
|
-
function
|
|
1935
|
+
function It(e) {
|
|
1926
1936
|
return e.workspaceLoading ? "loading" : e.busy == "designer" ? "saving" : e.draft == null ? "noDraft" : "saved";
|
|
1927
1937
|
}
|
|
1928
|
-
function
|
|
1938
|
+
function Q(e, t) {
|
|
1929
1939
|
if (t.phase != null) return t.phase;
|
|
1930
1940
|
let n = e?.content.modules[t.moduleId];
|
|
1931
1941
|
return n == null ? "failed" : t.source == n.source ? "saved" : "dirty";
|
|
1932
1942
|
}
|
|
1933
|
-
function
|
|
1943
|
+
function $(e, t, n) {
|
|
1934
1944
|
if (e == null || t == null || n.length != 1) return;
|
|
1935
1945
|
let r = e.node(t, n[0]);
|
|
1936
1946
|
if (!(r?.kind != "task" || r.definition == null || !("moduleId" in r.definition) || r.module == null)) return {
|
|
@@ -1938,9 +1948,9 @@ function Q(e, t, n) {
|
|
|
1938
1948
|
source: r.module.source
|
|
1939
1949
|
};
|
|
1940
1950
|
}
|
|
1941
|
-
var
|
|
1951
|
+
var Lt = class {
|
|
1942
1952
|
#e;
|
|
1943
|
-
#t = t(
|
|
1953
|
+
#t = t(Ft);
|
|
1944
1954
|
#n;
|
|
1945
1955
|
constructor(t, r) {
|
|
1946
1956
|
let i = e(this.#t, (e) => e.busy), a = e(this.#t, (e) => e.checkLoading), o = e(this.#t, (e) => e.diagnosticFocus), s = e(this.#t, (e) => e.diagnostics), c = e(this.#t, (e) => e.draft), l = e(this.#t, (e) => {
|
|
@@ -1948,7 +1958,7 @@ var Bt = class {
|
|
|
1948
1958
|
let { phase: t, ...n } = e.moduleEditor;
|
|
1949
1959
|
return {
|
|
1950
1960
|
...n,
|
|
1951
|
-
status:
|
|
1961
|
+
status: Q(e.draft, e.moduleEditor)
|
|
1952
1962
|
};
|
|
1953
1963
|
}), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : I(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoading);
|
|
1954
1964
|
this.#e = e(this.#t, (e) => ({
|
|
@@ -1961,7 +1971,7 @@ var Bt = class {
|
|
|
1961
1971
|
this.$ = {
|
|
1962
1972
|
addNodeOptions: n((e) => {
|
|
1963
1973
|
let { revision: n, target: r } = e(this.#e);
|
|
1964
|
-
return
|
|
1974
|
+
return Ie(n?.revision, r, e(t.t$));
|
|
1965
1975
|
}),
|
|
1966
1976
|
busy: i,
|
|
1967
1977
|
checkLoading: a,
|
|
@@ -1979,9 +1989,10 @@ var Bt = class {
|
|
|
1979
1989
|
flowLoading: r.$.loading,
|
|
1980
1990
|
flowLoadingMore: r.$.loadingMore,
|
|
1981
1991
|
flowNextCursor: r.$.nextCursor,
|
|
1992
|
+
flowRefreshing: r.$.refreshing,
|
|
1982
1993
|
flowTotal: r.$.total,
|
|
1983
1994
|
flows: r.$.flows,
|
|
1984
|
-
inspectorDiagnostics: e(this.#t, (e) =>
|
|
1995
|
+
inspectorDiagnostics: e(this.#t, (e) => ne(e.draft == null ? void 0 : I(e.draft), e.target, e.diagnostics, y.value)),
|
|
1985
1996
|
live: p,
|
|
1986
1997
|
moduleDiagnostics: e(this.#t, (e) => {
|
|
1987
1998
|
let t = e.moduleEditor?.moduleId;
|
|
@@ -1993,7 +2004,7 @@ var Bt = class {
|
|
|
1993
2004
|
revision: m,
|
|
1994
2005
|
selection: y,
|
|
1995
2006
|
selectedNodeIds: h,
|
|
1996
|
-
status: e(this.#t,
|
|
2007
|
+
status: e(this.#t, It),
|
|
1997
2008
|
target: g,
|
|
1998
2009
|
targetFlow: n((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
|
|
1999
2010
|
targetName: e(this.#t, (e) => {
|
|
@@ -2016,14 +2027,54 @@ var Bt = class {
|
|
|
2016
2027
|
for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
|
|
2017
2028
|
this.#e.dispose(), this.#t.dispose();
|
|
2018
2029
|
}
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2030
|
+
};
|
|
2031
|
+
//#endregion
|
|
2032
|
+
//#region src/workbench/browser/runtime/stores/workspaceStore.ts
|
|
2033
|
+
function Rt(e, t) {
|
|
2021
2034
|
if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
|
|
2022
2035
|
}
|
|
2023
|
-
function
|
|
2024
|
-
|
|
2036
|
+
function zt(e, t, n, r) {
|
|
2037
|
+
let i = j(e, t).nodes;
|
|
2038
|
+
if (r.target == n) {
|
|
2039
|
+
let e = i.find((e) => e.id == r.source);
|
|
2040
|
+
if (e == null || e.kind == "comment") return;
|
|
2041
|
+
let t = e.outputs.find((e) => "handle" in e && e.handle == r.sourceHandle);
|
|
2042
|
+
return t == null || !("handle" in t) ? void 0 : {
|
|
2043
|
+
inputs: [{
|
|
2044
|
+
description: t.description,
|
|
2045
|
+
handle: r.targetHandle,
|
|
2046
|
+
jsonSchema: t.jsonSchema ?? {},
|
|
2047
|
+
nullable: t.nullable ?? !1,
|
|
2048
|
+
value: null
|
|
2049
|
+
}],
|
|
2050
|
+
outputs: [{
|
|
2051
|
+
handle: "result",
|
|
2052
|
+
jsonSchema: {},
|
|
2053
|
+
nullable: !0
|
|
2054
|
+
}]
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
if (r.source == n) {
|
|
2058
|
+
let e = i.find((e) => e.id == r.target);
|
|
2059
|
+
if (e == null || e.kind == "comment") return;
|
|
2060
|
+
let t = e.inputs.find((e) => "handle" in e && e.handle == r.targetHandle);
|
|
2061
|
+
return t == null || !("handle" in t) ? void 0 : {
|
|
2062
|
+
inputs: [{
|
|
2063
|
+
handle: "value",
|
|
2064
|
+
jsonSchema: {},
|
|
2065
|
+
nullable: !0,
|
|
2066
|
+
value: null
|
|
2067
|
+
}],
|
|
2068
|
+
outputs: [{
|
|
2069
|
+
description: t.description,
|
|
2070
|
+
handle: r.sourceHandle,
|
|
2071
|
+
jsonSchema: t.jsonSchema ?? {},
|
|
2072
|
+
nullable: t.nullable ?? !1
|
|
2073
|
+
}]
|
|
2074
|
+
};
|
|
2075
|
+
}
|
|
2025
2076
|
}
|
|
2026
|
-
var
|
|
2077
|
+
var Bt = class {
|
|
2027
2078
|
#e;
|
|
2028
2079
|
#t;
|
|
2029
2080
|
#n = new F();
|
|
@@ -2037,36 +2088,33 @@ var Ut = class {
|
|
|
2037
2088
|
#u;
|
|
2038
2089
|
#d = 0;
|
|
2039
2090
|
#f = 0;
|
|
2040
|
-
#p;
|
|
2041
|
-
#m =
|
|
2091
|
+
#p = !1;
|
|
2092
|
+
#m = !1;
|
|
2042
2093
|
#h = !1;
|
|
2043
|
-
#g =
|
|
2044
|
-
#_
|
|
2045
|
-
#v
|
|
2046
|
-
#y = 0;
|
|
2047
|
-
#b;
|
|
2048
|
-
#x;
|
|
2094
|
+
#g = 0;
|
|
2095
|
+
#_;
|
|
2096
|
+
#v;
|
|
2049
2097
|
constructor(e, t, n = lt, r = L(), i = () => {}) {
|
|
2050
|
-
this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new
|
|
2051
|
-
apply: (e, t) => this.#
|
|
2098
|
+
this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new Nt(e, t, r), this.#l = new Lt(r, this.#o), this.#t = new At(e, t, r, {
|
|
2099
|
+
apply: (e, t) => this.#x(e, t),
|
|
2052
2100
|
beforeChange: (e) => {
|
|
2053
|
-
|
|
2101
|
+
e && (this.#N({ busy: "designer" }), this.#c(void 0));
|
|
2054
2102
|
},
|
|
2055
|
-
check: () => void this.#
|
|
2056
|
-
current: (e) => this.#
|
|
2103
|
+
check: () => void this.#C(),
|
|
2104
|
+
current: (e) => this.#M(e),
|
|
2057
2105
|
diagnostics: () => this.#l.value.diagnostics,
|
|
2058
2106
|
finishChanges: () => {
|
|
2059
|
-
!this.#
|
|
2107
|
+
!this.#m && this.#l.value.busy == "designer" && this.#N({ busy: void 0 });
|
|
2060
2108
|
},
|
|
2061
|
-
headChanged: (e, t) => this.#
|
|
2062
|
-
recover: (e) => this.#
|
|
2063
|
-
}), this.#a = new
|
|
2109
|
+
headChanged: (e, t) => this.#E(e, t),
|
|
2110
|
+
recover: (e) => this.#T(e, !0)
|
|
2111
|
+
}), this.#a = new Pt(e, t, (e) => this.#N({ presentation: e }), r), this.$ = this.#l.$;
|
|
2064
2112
|
}
|
|
2065
2113
|
dispose() {
|
|
2066
|
-
this.#
|
|
2114
|
+
this.#m = !0, this.#n.invalidate(), this.#a.dispose(), this.#_?.(), this.#v?.(), this.#l.dispose(), this.#o.dispose();
|
|
2067
2115
|
}
|
|
2068
2116
|
async start(e) {
|
|
2069
|
-
this.#
|
|
2117
|
+
this.#_ ??= this.#e.watchFlowCatalog(() => void this.reloadFlows()), await this.reloadFlows(), await this.selectFlow(e);
|
|
2070
2118
|
}
|
|
2071
2119
|
async reloadFlows() {
|
|
2072
2120
|
await this.#o.reload();
|
|
@@ -2075,10 +2123,9 @@ var Ut = class {
|
|
|
2075
2123
|
await this.#o.loadMore();
|
|
2076
2124
|
}
|
|
2077
2125
|
async selectFlow(e) {
|
|
2078
|
-
if (!this.#
|
|
2079
|
-
this.#M();
|
|
2126
|
+
if (!this.#O()) return !1;
|
|
2080
2127
|
let t = this.#n.begin();
|
|
2081
|
-
if (this.#t.reset(), this.#a.reset(), this.#f = 0, this.#
|
|
2128
|
+
if (this.#t.reset(), this.#a.reset(), this.#f = 0, this.#p = !1, this.#h = !1, this.#v?.(), this.#v = void 0, this.#N({
|
|
2082
2129
|
checkLoading: !1,
|
|
2083
2130
|
diagnosticFocus: void 0,
|
|
2084
2131
|
diagnostics: void 0,
|
|
@@ -2101,18 +2148,18 @@ var Ut = class {
|
|
|
2101
2148
|
this.#e.getPresentation(e)
|
|
2102
2149
|
]);
|
|
2103
2150
|
if (!t()) return !1;
|
|
2104
|
-
this.#t.reset(i), this.#a.reset(o), this.#o.include(r), this.#
|
|
2151
|
+
this.#t.reset(i), this.#a.reset(o), this.#o.include(r), this.#N({
|
|
2105
2152
|
draft: i,
|
|
2106
2153
|
live: a,
|
|
2107
2154
|
presentation: o,
|
|
2108
2155
|
target: { kind: "flow" },
|
|
2109
2156
|
workspaceLoadFailed: !1,
|
|
2110
2157
|
workspaceLoading: !1
|
|
2111
|
-
}), this.#
|
|
2112
|
-
!this.#
|
|
2158
|
+
}), this.#C(), this.#v = this.#e.watchFlow(e, (e) => {
|
|
2159
|
+
!this.#m && e != this.#t.committed?.revisionId && this.#w(e);
|
|
2113
2160
|
}, this.#s);
|
|
2114
2161
|
} catch (e) {
|
|
2115
|
-
return t() ? (this.#
|
|
2162
|
+
return t() ? (this.#N({
|
|
2116
2163
|
workspaceLoadFailed: !0,
|
|
2117
2164
|
workspaceLoading: !1
|
|
2118
2165
|
}), this.#c(D(e, this.#r.t)), !1) : !1;
|
|
@@ -2120,59 +2167,59 @@ var Ut = class {
|
|
|
2120
2167
|
return !0;
|
|
2121
2168
|
}
|
|
2122
2169
|
selectTarget(e) {
|
|
2123
|
-
return this.#
|
|
2170
|
+
return this.#O() ? (this.#N({
|
|
2124
2171
|
diagnosticFocus: void 0,
|
|
2125
2172
|
diagnostics: void 0,
|
|
2126
2173
|
moduleEditor: void 0,
|
|
2127
2174
|
nodeFocus: void 0,
|
|
2128
2175
|
selectedNodeIds: [],
|
|
2129
2176
|
target: e
|
|
2130
|
-
}), this.#
|
|
2177
|
+
}), this.#C(), !0) : !1;
|
|
2131
2178
|
}
|
|
2132
2179
|
selectNodes(e) {
|
|
2133
|
-
return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : this.#
|
|
2180
|
+
return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : this.#O() ? (this.#N({
|
|
2134
2181
|
diagnosticFocus: void 0,
|
|
2135
|
-
moduleEditor:
|
|
2182
|
+
moduleEditor: $(this.#l.value.draft == null ? void 0 : I(this.#l.value.draft), this.#l.value.target, e),
|
|
2136
2183
|
nodeFocus: void 0,
|
|
2137
2184
|
selectedNodeIds: e
|
|
2138
2185
|
}), !0) : !1;
|
|
2139
2186
|
}
|
|
2140
2187
|
async createFlow(e, t) {
|
|
2141
|
-
if (this.#
|
|
2142
|
-
this.#
|
|
2188
|
+
if (this.#O()) {
|
|
2189
|
+
this.#N({ busy: "flow" }), this.#c(void 0);
|
|
2143
2190
|
try {
|
|
2144
2191
|
if (t == null) return await this.#o.create(e);
|
|
2145
2192
|
let n = await this.#e.getFlow(await t(e));
|
|
2146
2193
|
return this.#o.insert(n), n;
|
|
2147
2194
|
} catch (e) {
|
|
2148
|
-
this.#
|
|
2195
|
+
this.#m || this.#c(D(e, this.#r.t));
|
|
2149
2196
|
} finally {
|
|
2150
|
-
this.#
|
|
2197
|
+
this.#N({ busy: void 0 });
|
|
2151
2198
|
}
|
|
2152
2199
|
}
|
|
2153
2200
|
}
|
|
2154
2201
|
async deleteFlow(e) {
|
|
2155
|
-
if (!this.#
|
|
2202
|
+
if (!this.#O()) return !1;
|
|
2156
2203
|
let t = this.#o.flow(e);
|
|
2157
2204
|
if (t == null || t.status == "retiring") return !1;
|
|
2158
|
-
this.#
|
|
2205
|
+
this.#N({ busy: "flow" }), this.#c(void 0);
|
|
2159
2206
|
try {
|
|
2160
|
-
return await this.#e.deleteFlow(e), !this.#
|
|
2207
|
+
return await this.#e.deleteFlow(e), !this.#m && (this.#o.remove(e), this.#c({
|
|
2161
2208
|
kind: "success",
|
|
2162
2209
|
message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
|
|
2163
2210
|
}), !0);
|
|
2164
2211
|
} catch (e) {
|
|
2165
|
-
return this.#
|
|
2212
|
+
return this.#m || this.#c(D(e, this.#r.t)), !1;
|
|
2166
2213
|
} finally {
|
|
2167
|
-
this.#
|
|
2214
|
+
this.#N({ busy: void 0 });
|
|
2168
2215
|
}
|
|
2169
2216
|
}
|
|
2170
2217
|
async createResource(e) {
|
|
2171
|
-
if (!this.#
|
|
2218
|
+
if (!this.#O() || this.#l.value.draft == null) return !1;
|
|
2172
2219
|
let t = this.#i();
|
|
2173
|
-
this.#
|
|
2174
|
-
let n = await this.#
|
|
2175
|
-
return this.#
|
|
2220
|
+
this.#N({ busy: "resource" }), this.#c(void 0);
|
|
2221
|
+
let n = await this.#b(se(t, e), !1);
|
|
2222
|
+
return this.#N({ busy: void 0 }), n != null && (this.selectTarget({
|
|
2176
2223
|
id: t,
|
|
2177
2224
|
kind: "subflow"
|
|
2178
2225
|
}), this.#c({
|
|
@@ -2184,53 +2231,62 @@ var Ut = class {
|
|
|
2184
2231
|
let n = this.#o.flow(e), r = t.trim();
|
|
2185
2232
|
if (n == null || r.length == 0) return !1;
|
|
2186
2233
|
if (n.name == r) return !0;
|
|
2187
|
-
this.#
|
|
2234
|
+
this.#N({ busy: "flow" }), this.#c(void 0);
|
|
2188
2235
|
let i;
|
|
2189
2236
|
try {
|
|
2190
2237
|
i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
|
|
2191
2238
|
} catch (e) {
|
|
2192
|
-
this.#
|
|
2239
|
+
this.#m || this.#c(D(e, this.#r.t));
|
|
2193
2240
|
}
|
|
2194
|
-
return this.#
|
|
2241
|
+
return this.#N({ busy: void 0 }), i != null && (this.#c({
|
|
2195
2242
|
kind: "success",
|
|
2196
2243
|
message: this.#r.t("notice.flowRenamed", { name: r })
|
|
2197
2244
|
}), !0);
|
|
2198
2245
|
}
|
|
2199
2246
|
async addNode(e, t, n) {
|
|
2200
|
-
if (!this.#
|
|
2247
|
+
if (!this.#O()) return;
|
|
2201
2248
|
let r = this.#l.value.draft, i = this.#l.value.target;
|
|
2202
2249
|
if (r == null || i == null) return;
|
|
2203
2250
|
let a = this.#i();
|
|
2204
|
-
if (e.kind == "comment") return await this.#
|
|
2205
|
-
let o = I(r), s =
|
|
2251
|
+
if (e.kind == "comment") return await this.#y(i, a, t);
|
|
2252
|
+
let o = I(r), s = ee(e, o, i, this.#r.t);
|
|
2206
2253
|
if (s == null) return;
|
|
2207
|
-
let c =
|
|
2208
|
-
if (
|
|
2209
|
-
|
|
2254
|
+
let c = n?.(a);
|
|
2255
|
+
if (s.kind == "code" && c != null) {
|
|
2256
|
+
let e = zt(r, i, a, c);
|
|
2257
|
+
if (e == null) return;
|
|
2258
|
+
s = {
|
|
2259
|
+
...s,
|
|
2260
|
+
ports: e
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
let l = Me(o, i, a, s, this.#i);
|
|
2264
|
+
if (l == null) return;
|
|
2265
|
+
let u = c == null ? l : [...l, ...it(B(r, l).content, i, c)], d = this.#b(u);
|
|
2210
2266
|
this.selectNodes([a]);
|
|
2211
|
-
let
|
|
2212
|
-
if (await
|
|
2267
|
+
let f = this.moveNodes({ [a]: t });
|
|
2268
|
+
if (await d != null && (await f, !this.#m)) return this.#N({ nodeFocus: {
|
|
2213
2269
|
nodeId: a,
|
|
2214
|
-
requestId: ++this.#
|
|
2270
|
+
requestId: ++this.#g
|
|
2215
2271
|
} }), a;
|
|
2216
2272
|
}
|
|
2217
2273
|
async connect(e) {
|
|
2218
2274
|
let t = this.$.revision.value, n = this.#l.value.target;
|
|
2219
2275
|
if (t == null || n == null) return;
|
|
2220
2276
|
let r = it(t.revision.content, n, e);
|
|
2221
|
-
r.length > 0 && await this.#
|
|
2277
|
+
r.length > 0 && await this.#b(r);
|
|
2222
2278
|
}
|
|
2223
2279
|
async disconnect(e) {
|
|
2224
2280
|
let t = this.$.revision.value, n = this.#l.value.target;
|
|
2225
2281
|
if (t == null || n == null) return;
|
|
2226
2282
|
let r = at(t.revision.content, n, e);
|
|
2227
|
-
r.length > 0 && await this.#
|
|
2283
|
+
r.length > 0 && await this.#b(r);
|
|
2228
2284
|
}
|
|
2229
2285
|
async deleteSelectedNodes() {
|
|
2230
|
-
if (!this.#
|
|
2286
|
+
if (!this.#O()) return;
|
|
2231
2287
|
let e = this.$.revision.value, t = this.#l.value.target;
|
|
2232
2288
|
if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
|
|
2233
|
-
let n = w(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i =
|
|
2289
|
+
let n = w(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = we(e, t, this.#l.value.selectedNodeIds), a = i.length == 0 ? void 0 : this.#b(i), o = r.size == 0 ? void 0 : this.#S((e) => S(e, t, r));
|
|
2234
2290
|
this.selectNodes([]), (a == null || await a != null) && await o;
|
|
2235
2291
|
}
|
|
2236
2292
|
copySelectedNodes() {
|
|
@@ -2238,31 +2294,31 @@ var Ut = class {
|
|
|
2238
2294
|
if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
|
|
2239
2295
|
let n = new Set(this.#l.value.selectedNodeIds);
|
|
2240
2296
|
this.#u = {
|
|
2241
|
-
comments: this.#
|
|
2297
|
+
comments: this.#D().nodes.flatMap((e) => e.kind == "comment" && n.has(e.id) ? [{
|
|
2242
2298
|
content: e.content,
|
|
2243
2299
|
position: e.position,
|
|
2244
2300
|
sourceId: e.id,
|
|
2245
2301
|
title: e.title
|
|
2246
2302
|
}] : []),
|
|
2247
|
-
nodes:
|
|
2303
|
+
nodes: ve(e, t, this.#l.value.selectedNodeIds)
|
|
2248
2304
|
};
|
|
2249
2305
|
}
|
|
2250
2306
|
async pasteNodes(e) {
|
|
2251
|
-
if (!this.#
|
|
2307
|
+
if (!this.#O()) return;
|
|
2252
2308
|
let t = this.$.revision.value, n = this.#l.value.target;
|
|
2253
2309
|
if (t == null || n == null || this.#u == null) return;
|
|
2254
|
-
let r =
|
|
2310
|
+
let r = Ae(t, n, this.#u.nodes, this.#i), i = r.changes.length == 0 ? void 0 : this.#b(r.changes), a = this.#u.comments.map((e) => ({
|
|
2255
2311
|
...e,
|
|
2256
2312
|
nodeId: this.#i()
|
|
2257
2313
|
}));
|
|
2258
2314
|
if (r.nodeIds.length == 0 && a.length == 0) return;
|
|
2259
|
-
let o = new Map(this.#
|
|
2315
|
+
let o = new Map(this.#D().nodes.map((e) => [e.id, e])), s = Object.fromEntries(r.sourceIds.map((t, n) => {
|
|
2260
2316
|
let i = e?.[t] ?? o.get(t)?.position;
|
|
2261
2317
|
return [r.nodeIds[n], {
|
|
2262
2318
|
x: (i?.x ?? 80) + 40,
|
|
2263
2319
|
y: (i?.y ?? 80) + 40
|
|
2264
2320
|
}];
|
|
2265
|
-
})), c = this.#
|
|
2321
|
+
})), c = this.#S((e) => {
|
|
2266
2322
|
let t = A(e, n, s);
|
|
2267
2323
|
for (let e of a) t = R(t, n, e.nodeId, {
|
|
2268
2324
|
content: e.content,
|
|
@@ -2282,66 +2338,66 @@ var Ut = class {
|
|
|
2282
2338
|
async saveNodeSettings(e, t) {
|
|
2283
2339
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2284
2340
|
if (n == null || r == null) return !1;
|
|
2285
|
-
let i =
|
|
2286
|
-
return i != null && await this.#
|
|
2341
|
+
let i = ge(n, r, e, t);
|
|
2342
|
+
return i != null && await this.#b(i) != null;
|
|
2287
2343
|
}
|
|
2288
2344
|
async saveNodeDescription(e, t) {
|
|
2289
2345
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2290
2346
|
if (n == null || r == null) return !1;
|
|
2291
|
-
let i =
|
|
2292
|
-
return i != null && await this.#
|
|
2347
|
+
let i = Ee(n, r, e, t);
|
|
2348
|
+
return i != null && await this.#b(i) != null;
|
|
2293
2349
|
}
|
|
2294
2350
|
async saveNodeIcon(e, t) {
|
|
2295
2351
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2296
2352
|
if (n == null || r == null) return !1;
|
|
2297
|
-
let i =
|
|
2298
|
-
return i != null && await this.#
|
|
2353
|
+
let i = Se(n, r, e, t);
|
|
2354
|
+
return i != null && await this.#b(i) != null;
|
|
2299
2355
|
}
|
|
2300
2356
|
async saveNodeTitle(e, t) {
|
|
2301
2357
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2302
2358
|
if (n == null || r == null) return !1;
|
|
2303
|
-
let i =
|
|
2304
|
-
return i != null && await this.#
|
|
2359
|
+
let i = _e(n, r, e, t);
|
|
2360
|
+
return i != null && await this.#b(i) != null;
|
|
2305
2361
|
}
|
|
2306
2362
|
async setInputValue(e, t, n) {
|
|
2307
2363
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2308
2364
|
if (r == null || i == null) return !1;
|
|
2309
|
-
let a =
|
|
2310
|
-
return a != null && await this.#
|
|
2365
|
+
let a = ue(r, i, e, t, n);
|
|
2366
|
+
return a != null && await this.#b(a) != null;
|
|
2311
2367
|
}
|
|
2312
2368
|
async setInputVariable(e, t, n) {
|
|
2313
2369
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2314
2370
|
if (r == null || i == null) return !1;
|
|
2315
|
-
let a = n == null ?
|
|
2316
|
-
return a != null && await this.#
|
|
2371
|
+
let a = n == null ? ue(r, i, e, t, void 0) : be(r, i, e, t, n, this.#i());
|
|
2372
|
+
return a != null && await this.#b(a) != null;
|
|
2317
2373
|
}
|
|
2318
2374
|
async saveCondition(e, t) {
|
|
2319
2375
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2320
2376
|
if (n == null || r == null) return !1;
|
|
2321
|
-
let i =
|
|
2322
|
-
return i != null && await this.#
|
|
2377
|
+
let i = he(n, r, e, t);
|
|
2378
|
+
return i != null && await this.#b(i) != null;
|
|
2323
2379
|
}
|
|
2324
2380
|
async saveValue(e, t) {
|
|
2325
2381
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2326
2382
|
if (n == null || r == null) return !1;
|
|
2327
|
-
let i =
|
|
2328
|
-
return i != null && await this.#
|
|
2383
|
+
let i = le(n, r, e, t);
|
|
2384
|
+
return i != null && await this.#b(i) != null;
|
|
2329
2385
|
}
|
|
2330
2386
|
async saveWait(e, t) {
|
|
2331
2387
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2332
2388
|
if (n == null || r?.kind != "flow") return !1;
|
|
2333
|
-
let i =
|
|
2334
|
-
return i != null && await this.#
|
|
2389
|
+
let i = Le(n, r, e, t);
|
|
2390
|
+
return i != null && await this.#b(i) != null;
|
|
2335
2391
|
}
|
|
2336
2392
|
async setWaitNotification(e, t) {
|
|
2337
|
-
let n = this.$.revision.value, r = n == null ? void 0 :
|
|
2338
|
-
return r != null && await this.#
|
|
2393
|
+
let n = this.$.revision.value, r = n == null ? void 0 : Ne(n, e, t, this.#i());
|
|
2394
|
+
return r != null && await this.#b(r) != null;
|
|
2339
2395
|
}
|
|
2340
2396
|
async saveComment(e, t) {
|
|
2341
2397
|
let n = this.#l.value.target;
|
|
2342
2398
|
if (n == null) return;
|
|
2343
|
-
let r = this.#
|
|
2344
|
-
r != null && await this.#
|
|
2399
|
+
let r = this.#D().nodes.find((t) => t.id == e)?.position;
|
|
2400
|
+
r != null && await this.#S((i) => R(i, n, e, {
|
|
2345
2401
|
...t,
|
|
2346
2402
|
position: r
|
|
2347
2403
|
}));
|
|
@@ -2349,66 +2405,66 @@ var Ut = class {
|
|
|
2349
2405
|
async saveTaskSettings(e, t) {
|
|
2350
2406
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2351
2407
|
if (n == null || r == null) return !1;
|
|
2352
|
-
let i =
|
|
2353
|
-
return i != null && await this.#
|
|
2408
|
+
let i = Fe(n, r, e, t);
|
|
2409
|
+
return i != null && await this.#b(i) != null;
|
|
2354
2410
|
}
|
|
2355
2411
|
async saveCodeTaskPorts(e, t) {
|
|
2356
2412
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2357
2413
|
if (n == null || r == null) return !1;
|
|
2358
|
-
let i =
|
|
2359
|
-
return i != null && await this.#
|
|
2414
|
+
let i = fe(n, r, e, t);
|
|
2415
|
+
return i != null && await this.#b(i) != null;
|
|
2360
2416
|
}
|
|
2361
2417
|
async saveTaskAdditionalInputs(e, t) {
|
|
2362
2418
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2363
2419
|
if (n == null || r == null) return !1;
|
|
2364
|
-
let i =
|
|
2365
|
-
return i != null && await this.#
|
|
2420
|
+
let i = Re(n, r, e, t);
|
|
2421
|
+
return i != null && await this.#b(i) != null;
|
|
2366
2422
|
}
|
|
2367
2423
|
async setConnectorConnection(e, t) {
|
|
2368
2424
|
let n = this.$.revision.value;
|
|
2369
2425
|
if (n == null) return !1;
|
|
2370
|
-
let r =
|
|
2371
|
-
return r != null && await this.#
|
|
2426
|
+
let r = te(n.revision.content, e, t);
|
|
2427
|
+
return r != null && await this.#b(r) != null;
|
|
2372
2428
|
}
|
|
2373
2429
|
async saveTriggerSettings(e, t) {
|
|
2374
2430
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2375
2431
|
if (n == null || r?.kind != "flow") return !1;
|
|
2376
|
-
let i =
|
|
2377
|
-
return i != null && await this.#
|
|
2432
|
+
let i = re(n.revision.content, r, e, t);
|
|
2433
|
+
return i != null && await this.#b(i) != null;
|
|
2378
2434
|
}
|
|
2379
2435
|
async saveTriggerConfig(e, t, n) {
|
|
2380
2436
|
let r = this.$.revision.value, i = this.#l.value.target;
|
|
2381
2437
|
if (r == null || i?.kind != "flow") return !1;
|
|
2382
|
-
let a =
|
|
2383
|
-
return a != null && await this.#
|
|
2438
|
+
let a = ae(r.revision.content, i, e, t, n);
|
|
2439
|
+
return a != null && await this.#b(a) != null;
|
|
2384
2440
|
}
|
|
2385
2441
|
async saveTriggerSchedule(e, t) {
|
|
2386
2442
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2387
2443
|
if (n == null || r?.kind != "flow") return !1;
|
|
2388
2444
|
let i = N(n.revision.content, r, e, t);
|
|
2389
|
-
return i != null && await this.#
|
|
2445
|
+
return i != null && await this.#b(i) != null;
|
|
2390
2446
|
}
|
|
2391
2447
|
async saveWebhook(e, t) {
|
|
2392
2448
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2393
2449
|
if (n == null || r?.kind != "flow") return !1;
|
|
2394
2450
|
let i = P(n, r, e, t);
|
|
2395
|
-
return i != null && await this.#
|
|
2451
|
+
return i != null && await this.#b(i) != null;
|
|
2396
2452
|
}
|
|
2397
2453
|
async setTriggerConnection(e, t) {
|
|
2398
2454
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
2399
2455
|
if (n == null || r?.kind != "flow") return !1;
|
|
2400
|
-
let i =
|
|
2401
|
-
return i != null && await this.#
|
|
2456
|
+
let i = ie(n.revision.content, r, e, t);
|
|
2457
|
+
return i != null && await this.#b(i) != null;
|
|
2402
2458
|
}
|
|
2403
2459
|
async saveSubflowSettings(e, t) {
|
|
2404
2460
|
let n = this.$.revision.value;
|
|
2405
2461
|
if (n == null) return !1;
|
|
2406
|
-
let r =
|
|
2407
|
-
return r != null && await this.#
|
|
2462
|
+
let r = oe(n, e, t);
|
|
2463
|
+
return r != null && await this.#b(r) != null;
|
|
2408
2464
|
}
|
|
2409
2465
|
updateModuleSource(e) {
|
|
2410
2466
|
let t = this.#l.value.moduleEditor;
|
|
2411
|
-
t != null && t.source != e && this.#
|
|
2467
|
+
t != null && t.source != e && this.#N({ moduleEditor: {
|
|
2412
2468
|
...t,
|
|
2413
2469
|
phase: void 0,
|
|
2414
2470
|
source: e
|
|
@@ -2419,10 +2475,10 @@ var Ut = class {
|
|
|
2419
2475
|
if (e == null) return;
|
|
2420
2476
|
let t = this.#l.value.draft?.content.modules[e.moduleId];
|
|
2421
2477
|
if (t == null) {
|
|
2422
|
-
this.#
|
|
2478
|
+
this.#N({ moduleEditor: void 0 });
|
|
2423
2479
|
return;
|
|
2424
2480
|
}
|
|
2425
|
-
this.#
|
|
2481
|
+
this.#N({ moduleEditor: {
|
|
2426
2482
|
moduleId: e.moduleId,
|
|
2427
2483
|
source: t.source
|
|
2428
2484
|
} });
|
|
@@ -2430,104 +2486,104 @@ var Ut = class {
|
|
|
2430
2486
|
async saveModuleEditor() {
|
|
2431
2487
|
let e = this.#l.value.moduleEditor;
|
|
2432
2488
|
if (e == null || e.phase == "saving") return !1;
|
|
2433
|
-
this.#
|
|
2489
|
+
this.#N({ moduleEditor: {
|
|
2434
2490
|
...e,
|
|
2435
2491
|
phase: "saving"
|
|
2436
2492
|
} });
|
|
2437
2493
|
let t = await st(e.source);
|
|
2438
|
-
if (this.#
|
|
2439
|
-
let n =
|
|
2440
|
-
|
|
2494
|
+
if (this.#m) return !1;
|
|
2495
|
+
let n = this.#l.value.draft?.content.modules[e.moduleId];
|
|
2496
|
+
if (n == null) return !1;
|
|
2497
|
+
let r = await this.#b(ct(e.moduleId, n.source, n.imports, e.source, t));
|
|
2498
|
+
return !this.#m && this.#l.value.moduleEditor?.moduleId == e.moduleId && this.#N({ moduleEditor: {
|
|
2441
2499
|
...this.#l.value.moduleEditor,
|
|
2442
|
-
phase:
|
|
2443
|
-
} }),
|
|
2500
|
+
phase: r == null ? "failed" : void 0
|
|
2501
|
+
} }), r != null;
|
|
2444
2502
|
}
|
|
2445
2503
|
async moveNodes(e, t = "detail") {
|
|
2446
2504
|
let n = this.#l.value.target;
|
|
2447
|
-
n != null && await this.#
|
|
2505
|
+
n != null && await this.#S((r) => A(r, n, e, t));
|
|
2448
2506
|
}
|
|
2449
2507
|
async moveViewport(e, t = "detail") {
|
|
2450
2508
|
let n = this.#l.value.target;
|
|
2451
|
-
|
|
2452
|
-
let r = this.#P().viewport;
|
|
2453
|
-
(r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) => k(r, n, e, t));
|
|
2509
|
+
n != null && await this.#S((r) => k(r, n, e, t));
|
|
2454
2510
|
}
|
|
2455
2511
|
async check() {
|
|
2456
|
-
await this.#
|
|
2512
|
+
await this.#C();
|
|
2457
2513
|
}
|
|
2458
2514
|
async refreshFlows() {
|
|
2459
2515
|
await this.reloadFlows();
|
|
2460
2516
|
}
|
|
2461
2517
|
updateLive(e) {
|
|
2462
|
-
e.flowId == this.#l.value.flowId && this.#
|
|
2518
|
+
e.flowId == this.#l.value.flowId && this.#N({ live: e });
|
|
2463
2519
|
}
|
|
2464
2520
|
locateNode(e) {
|
|
2465
2521
|
let t = this.$.revision.value, n = this.#l.value.target;
|
|
2466
|
-
return t == null || n == null || t.node(n, e) == null || !this.selectNodes([e]) ? !1 : (this.#
|
|
2522
|
+
return t == null || n == null || t.node(n, e) == null || !this.selectNodes([e]) ? !1 : (this.#N({ nodeFocus: {
|
|
2467
2523
|
nodeId: e,
|
|
2468
|
-
requestId: ++this.#
|
|
2524
|
+
requestId: ++this.#g
|
|
2469
2525
|
} }), !0);
|
|
2470
2526
|
}
|
|
2471
2527
|
locateDiagnostic(e) {
|
|
2472
|
-
return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#
|
|
2528
|
+
return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#N({ diagnosticFocus: {
|
|
2473
2529
|
...e.location,
|
|
2474
2530
|
diagnostic: e.diagnostic,
|
|
2475
2531
|
requestId: ++this.#d
|
|
2476
2532
|
} }), !0);
|
|
2477
2533
|
}
|
|
2478
|
-
async #
|
|
2479
|
-
let r = Math.max(0, ...this.#
|
|
2534
|
+
async #y(e, t, n) {
|
|
2535
|
+
let r = Math.max(0, ...this.#D().nodes.flatMap((e) => {
|
|
2480
2536
|
if (e.kind != "comment") return [];
|
|
2481
2537
|
let t = /#(\d+)$/.exec(e.title);
|
|
2482
2538
|
return t == null ? [] : [Number(t[1])];
|
|
2483
|
-
})), i = this.#
|
|
2539
|
+
})), i = this.#S((i) => R(i, e, t, {
|
|
2484
2540
|
content: "",
|
|
2485
2541
|
position: n,
|
|
2486
2542
|
title: this.#r.t("addNode.commentName", { number: r + 1 })
|
|
2487
2543
|
}));
|
|
2488
|
-
if (this.selectNodes([t]), await i, !this.#
|
|
2544
|
+
if (this.selectNodes([t]), await i, !this.#m) return t;
|
|
2489
2545
|
}
|
|
2490
|
-
async #
|
|
2546
|
+
async #b(e, t = !0) {
|
|
2491
2547
|
let n = this.#l.value.flowId, r = this.#l.value.draft;
|
|
2492
|
-
if (n != null && r != null) return await this.#t.change({
|
|
2548
|
+
if (n != null && r != null) return e.length == 0 ? r : await this.#t.change({
|
|
2493
2549
|
current: this.#n.capture(),
|
|
2494
2550
|
flowId: n
|
|
2495
2551
|
}, r, e, t);
|
|
2496
2552
|
}
|
|
2497
|
-
#
|
|
2498
|
-
let n = this.#l.value.draft, { revision: r, selectedNodeIds: i, target: a } = this.#
|
|
2499
|
-
return this.#
|
|
2553
|
+
#x(e, t = !1) {
|
|
2554
|
+
let n = this.#l.value.draft, { revision: r, selectedNodeIds: i, target: a } = this.#k(e), o = this.#l.value.moduleEditor;
|
|
2555
|
+
return this.#N({
|
|
2500
2556
|
diagnostics: t ? this.#l.value.diagnostics : void 0,
|
|
2501
2557
|
draft: e,
|
|
2502
|
-
moduleEditor: o != null && n != null &&
|
|
2558
|
+
moduleEditor: o != null && n != null && Q(n, o) != "saved" ? o : $(r, a, i),
|
|
2503
2559
|
selectedNodeIds: i,
|
|
2504
2560
|
target: a
|
|
2505
2561
|
}), r;
|
|
2506
2562
|
}
|
|
2507
|
-
async #
|
|
2508
|
-
if (this.#
|
|
2563
|
+
async #S(e) {
|
|
2564
|
+
if (this.#m) return;
|
|
2509
2565
|
let t = this.#l.value.flowId, n = this.#l.value.presentation;
|
|
2510
2566
|
t != null && n != null && await this.#a.change(t, n, this.#o.capture(), e);
|
|
2511
2567
|
}
|
|
2512
|
-
async #
|
|
2513
|
-
if (this.#
|
|
2568
|
+
async #C() {
|
|
2569
|
+
if (this.#m) return;
|
|
2514
2570
|
let e = this.#l.value.flowId, t = this.#l.value.draft, n = this.#l.value.target;
|
|
2515
2571
|
if (e == null || t == null || n == null) {
|
|
2516
|
-
n ?? this.#
|
|
2572
|
+
n ?? this.#N({
|
|
2517
2573
|
checkLoading: !1,
|
|
2518
2574
|
diagnostics: void 0
|
|
2519
2575
|
});
|
|
2520
2576
|
return;
|
|
2521
2577
|
}
|
|
2522
|
-
this.#
|
|
2578
|
+
this.#N({
|
|
2523
2579
|
checkLoading: !0,
|
|
2524
2580
|
diagnosticFocus: void 0
|
|
2525
2581
|
});
|
|
2526
2582
|
try {
|
|
2527
2583
|
let n = await this.#e.checkFlow(e, t.revisionId);
|
|
2528
|
-
if (!this.#
|
|
2584
|
+
if (!this.#m && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId) {
|
|
2529
2585
|
let e = this.#l.value.live;
|
|
2530
|
-
this.#
|
|
2586
|
+
this.#N({
|
|
2531
2587
|
diagnostics: n,
|
|
2532
2588
|
live: e == null ? void 0 : {
|
|
2533
2589
|
...e,
|
|
@@ -2536,16 +2592,16 @@ var Ut = class {
|
|
|
2536
2592
|
});
|
|
2537
2593
|
}
|
|
2538
2594
|
} catch (n) {
|
|
2539
|
-
!this.#
|
|
2595
|
+
!this.#m && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(D(n, this.#r.t));
|
|
2540
2596
|
} finally {
|
|
2541
|
-
!this.#
|
|
2597
|
+
!this.#m && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#N({ checkLoading: !1 });
|
|
2542
2598
|
}
|
|
2543
2599
|
}
|
|
2544
|
-
async #
|
|
2545
|
-
if (this.#
|
|
2600
|
+
async #w(e) {
|
|
2601
|
+
if (this.#m) return;
|
|
2546
2602
|
let t = this.#l.value.flowId;
|
|
2547
|
-
if (t == null || (this.#f += 1, e != null && (this.#
|
|
2548
|
-
this.#
|
|
2603
|
+
if (t == null || (this.#f += 1, e != null && (this.#p = !0), this.#h)) return;
|
|
2604
|
+
this.#h = !0;
|
|
2549
2605
|
let n = {
|
|
2550
2606
|
current: this.#n.capture(),
|
|
2551
2607
|
flowId: t
|
|
@@ -2554,144 +2610,83 @@ var Ut = class {
|
|
|
2554
2610
|
let e;
|
|
2555
2611
|
do {
|
|
2556
2612
|
e = this.#f;
|
|
2557
|
-
let t = this.#
|
|
2558
|
-
this.#
|
|
2559
|
-
} while (this.#
|
|
2560
|
-
}), this.#
|
|
2613
|
+
let t = this.#p;
|
|
2614
|
+
this.#p = !1, await this.#T(n, !1, t);
|
|
2615
|
+
} while (this.#M(n) && e != this.#f);
|
|
2616
|
+
}), this.#M(n) && (this.#h = !1);
|
|
2561
2617
|
}
|
|
2562
|
-
async #
|
|
2618
|
+
async #T(e, t, n = !1) {
|
|
2563
2619
|
try {
|
|
2564
|
-
let t =
|
|
2565
|
-
if (
|
|
2566
|
-
let
|
|
2567
|
-
if (!this.#
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
}
|
|
2576
|
-
if (s.revisionId == a.revisionId) return !0;
|
|
2577
|
-
let c = o.kind == "changes" && t != null ? jt(I(a), I(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
|
|
2578
|
-
o.kind == "snapshot" && this.#M();
|
|
2579
|
-
let l = this.#L(s, !1);
|
|
2580
|
-
return this.#N(e.flowId, s.revisionId), o.kind == "changes" && o.revisions.length > 0 && t != null && c != null && i == this.#m && this.#A(e, t, c, i), n && (this.#c({
|
|
2581
|
-
kind: l ? "error" : "success",
|
|
2582
|
-
message: this.#r.t(l ? "notice.moduleUpdated" : "notice.draftUpdated")
|
|
2583
|
-
}), this.#E()), !0;
|
|
2620
|
+
let t = this.#t.committed;
|
|
2621
|
+
if (t == null) return !1;
|
|
2622
|
+
let r = await this.#e.syncDraft(e.flowId);
|
|
2623
|
+
if (!this.#M(e)) return !1;
|
|
2624
|
+
let i = r.draft;
|
|
2625
|
+
if (i.revisionId == t.revisionId) return !0;
|
|
2626
|
+
let a = this.#A(i, !1);
|
|
2627
|
+
return this.#E(e.flowId, i.revisionId), n && (this.#c({
|
|
2628
|
+
kind: a ? "error" : "success",
|
|
2629
|
+
message: this.#r.t(a ? "notice.moduleUpdated" : "notice.draftUpdated")
|
|
2630
|
+
}), this.#C()), !0;
|
|
2584
2631
|
} catch (n) {
|
|
2585
|
-
return t && this.#
|
|
2632
|
+
return t && this.#M(e) && this.#c(D(n, this.#r.t)), !1;
|
|
2586
2633
|
}
|
|
2587
2634
|
}
|
|
2588
|
-
#
|
|
2589
|
-
if (t.kind == "snapshot") return t.draft;
|
|
2590
|
-
let n = e;
|
|
2591
|
-
for (let e of t.revisions) {
|
|
2592
|
-
if (e.revision.parentRevisionId != n.revisionId) throw Error("Invalid Draft revision chain.");
|
|
2593
|
-
n = {
|
|
2594
|
-
...e.revision,
|
|
2595
|
-
content: B(n, e.operations).content
|
|
2596
|
-
};
|
|
2597
|
-
}
|
|
2598
|
-
return n;
|
|
2599
|
-
}
|
|
2600
|
-
#A(e, t, n, r) {
|
|
2601
|
-
let i = this.#l.value;
|
|
2602
|
-
if (!this.#z(e) || r != this.#m || !$(i.target, t)) return;
|
|
2603
|
-
let a = this.#p;
|
|
2604
|
-
if (a != null) {
|
|
2605
|
-
if (a.flowId != e.flowId || !$(a.target, t)) {
|
|
2606
|
-
this.#M();
|
|
2607
|
-
return;
|
|
2608
|
-
}
|
|
2609
|
-
for (let e of n) a.targets.add(e);
|
|
2610
|
-
globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(), Vt);
|
|
2611
|
-
return;
|
|
2612
|
-
}
|
|
2613
|
-
n.size == 0 || i.selectedNodeIds.length > 0 || (this.#p = {
|
|
2614
|
-
current: e.current,
|
|
2615
|
-
generation: r,
|
|
2616
|
-
flowId: e.flowId,
|
|
2617
|
-
target: t,
|
|
2618
|
-
targets: new Set(n),
|
|
2619
|
-
timer: globalThis.setTimeout(() => this.#j(), Vt),
|
|
2620
|
-
viewport: this.#P().viewport
|
|
2621
|
-
});
|
|
2622
|
-
}
|
|
2623
|
-
#j() {
|
|
2624
|
-
let e = this.#p;
|
|
2625
|
-
if (this.#p = void 0, e == null || !e.current() || e.generation != this.#m) return;
|
|
2626
|
-
let t = this.#l.value;
|
|
2627
|
-
if (t.flowId != e.flowId || !$(t.target, e.target) || t.selectedNodeIds.length > 0) return;
|
|
2628
|
-
let n = this.#P().viewport;
|
|
2629
|
-
if (n.x != e.viewport.x || n.y != e.viewport.y || n.zoom != e.viewport.zoom || t.draft == null) return;
|
|
2630
|
-
let r = I(t.draft), i = [...e.targets].filter((t) => r.selection(e.target, t) != null);
|
|
2631
|
-
i.length == 1 && this.#B({ nodeFocus: {
|
|
2632
|
-
nodeId: i[0],
|
|
2633
|
-
requestId: ++this.#y
|
|
2634
|
-
} });
|
|
2635
|
-
}
|
|
2636
|
-
#M() {
|
|
2637
|
-
this.#m += 1, this.#p != null && globalThis.clearTimeout(this.#p.timer), this.#p = void 0;
|
|
2638
|
-
}
|
|
2639
|
-
#N(e, t) {
|
|
2635
|
+
#E(e, t) {
|
|
2640
2636
|
this.#o.advanceHead(e, t);
|
|
2641
2637
|
}
|
|
2642
|
-
#
|
|
2638
|
+
#D() {
|
|
2643
2639
|
let e = this.#l.value;
|
|
2644
2640
|
return j(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
|
|
2645
2641
|
}
|
|
2646
|
-
#
|
|
2642
|
+
#O() {
|
|
2647
2643
|
let e = this.#l.value.moduleEditor;
|
|
2648
|
-
return e == null ||
|
|
2644
|
+
return e == null || Q(this.#l.value.draft, e) == "saved" || (this.#c({
|
|
2649
2645
|
kind: "error",
|
|
2650
2646
|
message: this.#r.t("notice.unsavedCode")
|
|
2651
2647
|
}), !1);
|
|
2652
2648
|
}
|
|
2653
|
-
#
|
|
2654
|
-
let t = I(e), n =
|
|
2649
|
+
#k(e) {
|
|
2650
|
+
let t = I(e), n = Rt(t, this.#l.value.target);
|
|
2655
2651
|
return {
|
|
2656
2652
|
revision: t,
|
|
2657
2653
|
selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
|
|
2658
2654
|
target: n
|
|
2659
2655
|
};
|
|
2660
2656
|
}
|
|
2661
|
-
#
|
|
2662
|
-
this.#t.replaceCommitted(e);
|
|
2663
|
-
|
|
2664
|
-
return this.#B({
|
|
2657
|
+
#A(e, t) {
|
|
2658
|
+
let n = this.#t.replaceCommitted(e), r = this.#l.value.moduleEditor, i = r != null && Q(this.#l.value.draft, r) != "saved", a = this.#k(n), o = a.target;
|
|
2659
|
+
return this.#N({
|
|
2665
2660
|
diagnostics: t ? this.#l.value.diagnostics : void 0,
|
|
2666
2661
|
draft: n,
|
|
2667
|
-
moduleEditor: this.#
|
|
2662
|
+
moduleEditor: this.#j(a.revision, o, a.selectedNodeIds),
|
|
2668
2663
|
selectedNodeIds: a.selectedNodeIds,
|
|
2669
2664
|
target: o
|
|
2670
2665
|
}), i;
|
|
2671
2666
|
}
|
|
2672
|
-
#
|
|
2667
|
+
#j(e, t, n) {
|
|
2673
2668
|
let r = this.#l.value.moduleEditor;
|
|
2674
|
-
return r == null ||
|
|
2669
|
+
return r == null || Q(this.#l.value.draft, r) == "saved" ? $(e, t, n) : {
|
|
2675
2670
|
...r,
|
|
2676
2671
|
phase: "failed"
|
|
2677
2672
|
};
|
|
2678
2673
|
}
|
|
2679
|
-
#
|
|
2680
|
-
return !this.#
|
|
2674
|
+
#M(e) {
|
|
2675
|
+
return !this.#m && e.flowId == this.#l.value.flowId && e.current();
|
|
2681
2676
|
}
|
|
2682
|
-
#
|
|
2683
|
-
this.#
|
|
2677
|
+
#N(e) {
|
|
2678
|
+
this.#m || this.#l.set(e);
|
|
2684
2679
|
}
|
|
2685
2680
|
};
|
|
2686
2681
|
//#endregion
|
|
2687
2682
|
//#region src/workbench/browser/runtime/stores/workbenchStore.ts
|
|
2688
|
-
function
|
|
2683
|
+
function Vt(e) {
|
|
2689
2684
|
return new Map(e.nodes.map((e) => [e.id, e]));
|
|
2690
2685
|
}
|
|
2691
|
-
function
|
|
2686
|
+
function Ht(e, t) {
|
|
2692
2687
|
return e == null || t == null ? [] : I(e).designerInputs(t);
|
|
2693
2688
|
}
|
|
2694
|
-
function
|
|
2689
|
+
function Ut(e, t, n, r, i) {
|
|
2695
2690
|
if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
|
|
2696
2691
|
let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
|
|
2697
2692
|
return typeof a == "string" ? new Map(r.flatMap((t) => {
|
|
@@ -2699,7 +2694,7 @@ function Kt(e, t, n, r, i) {
|
|
|
2699
2694
|
return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
|
|
2700
2695
|
})) : /* @__PURE__ */ new Map();
|
|
2701
2696
|
}
|
|
2702
|
-
var
|
|
2697
|
+
var Wt = { openExternalPage: async () => !1 }, Gt = class {
|
|
2703
2698
|
#e;
|
|
2704
2699
|
#t;
|
|
2705
2700
|
#n;
|
|
@@ -2710,16 +2705,16 @@ var qt = { openExternalPage: async () => !1 }, Jt = class {
|
|
|
2710
2705
|
#s;
|
|
2711
2706
|
#c;
|
|
2712
2707
|
#l;
|
|
2713
|
-
constructor(r, i, a = () => crypto.randomUUID(), o = L(), s =
|
|
2708
|
+
constructor(r, i, a = () => crypto.randomUUID(), o = L(), s = Wt, c = !0) {
|
|
2714
2709
|
this.#t = new F(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = new F(), this.#l = !1, this.provideAddNodeOptions = async (e, t) => await this.#u([this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t)], t), this.browseAddNodeOptions = async (e) => await this.#u([this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)], e), this.provideAddNodeOptionChoices = async (e, t) => {
|
|
2715
2710
|
if (!e.startsWith("trigger:")) return await this.connectors.provideAddNodeOptionChoices(e, t);
|
|
2716
2711
|
}, this.#e = r, this.#n = o, this.#i = c;
|
|
2717
2712
|
let l = (e) => {
|
|
2718
2713
|
this.#l || this.#r.set(e);
|
|
2719
2714
|
};
|
|
2720
|
-
this.runs = new
|
|
2715
|
+
this.runs = new ze(r, l, o), this.workspace = new Bt(r, l, lt, o, (e) => {
|
|
2721
2716
|
e.kind == "run.created" ? this.#d(r, e) : this.runs.changed(e.runId);
|
|
2722
|
-
}), this.connectors = new
|
|
2717
|
+
}), this.connectors = new wt(r, this.workspace, l, s, o), this.triggers = new Ot(r, this.workspace, l, s, o), this.publications = new pt(r, this.workspace, l, i, a, o), this.runRequests = new vt(r, this.runs, l, o, a);
|
|
2723
2718
|
let u = n((e) => {
|
|
2724
2719
|
let t = e(this.workspace.$.diagnostics);
|
|
2725
2720
|
if (t == null) return;
|
|
@@ -2733,7 +2728,7 @@ var qt = { openExternalPage: async () => !1 }, Jt = class {
|
|
|
2733
2728
|
let t = e(this.workspace.$.draft);
|
|
2734
2729
|
f != t?.flowId && (d.clear(), f = t?.flowId);
|
|
2735
2730
|
let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), p = e(this.runs.$.events), m = e(this.#a), h = e(this.#o), g = e(this.#s), _ = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, v = [
|
|
2736
|
-
...
|
|
2731
|
+
...Ht(t, n),
|
|
2737
2732
|
r == null || n == null ? void 0 : M(r, n),
|
|
2738
2733
|
i,
|
|
2739
2734
|
a,
|
|
@@ -2752,7 +2747,7 @@ var qt = { openExternalPage: async () => !1 }, Jt = class {
|
|
|
2752
2747
|
graph: b,
|
|
2753
2748
|
inputs: v
|
|
2754
2749
|
}), b;
|
|
2755
|
-
}), m = e(p,
|
|
2750
|
+
}), m = e(p, Vt);
|
|
2756
2751
|
this.$ = {
|
|
2757
2752
|
busy: n((e) => {
|
|
2758
2753
|
let t = e(this.workspace.$.busy);
|
|
@@ -2768,7 +2763,7 @@ var qt = { openExternalPage: async () => !1 }, Jt = class {
|
|
|
2768
2763
|
designer: p,
|
|
2769
2764
|
designerNodeById: m,
|
|
2770
2765
|
notice: this.#r,
|
|
2771
|
-
runEventNodes: n((e) =>
|
|
2766
|
+
runEventNodes: n((e) => Ut(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(m))),
|
|
2772
2767
|
selectedDesignerNode: n((e) => {
|
|
2773
2768
|
let t = e(this.workspace.$.selectedNodeIds);
|
|
2774
2769
|
return t.length == 1 ? e(m).get(t[0]) : void 0;
|
|
@@ -2829,7 +2824,7 @@ var qt = { openExternalPage: async () => !1 }, Jt = class {
|
|
|
2829
2824
|
}
|
|
2830
2825
|
locateRunWait() {
|
|
2831
2826
|
let e = this.runs.$.run.value;
|
|
2832
|
-
return e?.status
|
|
2827
|
+
return e?.status != "waiting" || !("waiting" in e) || e.waiting == null || !this.workspace.selectTarget({ kind: "flow" }) ? !1 : this.workspace.locateNode(e.waiting.nodeId);
|
|
2833
2828
|
}
|
|
2834
2829
|
async addNode(e, t, n) {
|
|
2835
2830
|
if (e.kind == "trigger" && "trigger" in e && e.trigger.kind == "connect") {
|
|
@@ -2869,13 +2864,13 @@ var qt = { openExternalPage: async () => !1 }, Jt = class {
|
|
|
2869
2864
|
return;
|
|
2870
2865
|
}
|
|
2871
2866
|
}
|
|
2872
|
-
},
|
|
2873
|
-
function
|
|
2874
|
-
let
|
|
2875
|
-
/* @__PURE__ */
|
|
2867
|
+
}, Kt = H(() => import("./flowWorkspace-CPBHm14t.js").then((e) => e.t));
|
|
2868
|
+
function qt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: u }) {
|
|
2869
|
+
let m = s != null && u != null && i != null, h = s ?? "", _ = /* @__PURE__ */ K(Ke, { children: [
|
|
2870
|
+
/* @__PURE__ */ G("div", {
|
|
2876
2871
|
"aria-hidden": "true",
|
|
2877
2872
|
className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
|
|
2878
|
-
children: /* @__PURE__ */
|
|
2873
|
+
children: /* @__PURE__ */ K("svg", {
|
|
2879
2874
|
className: "size-5",
|
|
2880
2875
|
fill: "none",
|
|
2881
2876
|
stroke: "currentColor",
|
|
@@ -2883,40 +2878,40 @@ function Xt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
2883
2878
|
strokeLinejoin: "round",
|
|
2884
2879
|
strokeWidth: "1.8",
|
|
2885
2880
|
viewBox: "0 0 24 24",
|
|
2886
|
-
children: [/* @__PURE__ */
|
|
2881
|
+
children: [/* @__PURE__ */ G("rect", {
|
|
2887
2882
|
height: "9",
|
|
2888
2883
|
rx: "2",
|
|
2889
2884
|
width: "14",
|
|
2890
2885
|
x: "5",
|
|
2891
2886
|
y: "11"
|
|
2892
|
-
}), /* @__PURE__ */
|
|
2887
|
+
}), /* @__PURE__ */ G("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
|
|
2893
2888
|
})
|
|
2894
2889
|
}),
|
|
2895
|
-
/* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ K("header", {
|
|
2896
2891
|
className: "flex flex-col gap-2",
|
|
2897
|
-
children: [/* @__PURE__ */
|
|
2892
|
+
children: [/* @__PURE__ */ G("h1", {
|
|
2898
2893
|
className: "text-xl font-semibold tracking-tight text-balance",
|
|
2899
2894
|
children: o
|
|
2900
|
-
}), /* @__PURE__ */
|
|
2895
|
+
}), /* @__PURE__ */ G("p", {
|
|
2901
2896
|
className: "text-sm/relaxed text-muted-foreground text-pretty",
|
|
2902
2897
|
children: t
|
|
2903
2898
|
})]
|
|
2904
2899
|
}),
|
|
2905
|
-
|
|
2900
|
+
m && /* @__PURE__ */ G(f, { children: /* @__PURE__ */ K(d, {
|
|
2906
2901
|
"data-invalid": n != null,
|
|
2907
2902
|
children: [
|
|
2908
|
-
/* @__PURE__ */
|
|
2903
|
+
/* @__PURE__ */ G(p, {
|
|
2909
2904
|
htmlFor: "session-token",
|
|
2910
|
-
children:
|
|
2905
|
+
children: u
|
|
2911
2906
|
}),
|
|
2912
|
-
/* @__PURE__ */
|
|
2907
|
+
/* @__PURE__ */ G(l, {
|
|
2913
2908
|
autoComplete: "username",
|
|
2914
2909
|
name: "username",
|
|
2915
2910
|
type: "hidden",
|
|
2916
2911
|
value: "open-flow",
|
|
2917
2912
|
readOnly: !0
|
|
2918
2913
|
}),
|
|
2919
|
-
/* @__PURE__ */
|
|
2914
|
+
/* @__PURE__ */ G(l, {
|
|
2920
2915
|
autoComplete: "current-password",
|
|
2921
2916
|
"aria-invalid": n != null,
|
|
2922
2917
|
autoFocus: !0,
|
|
@@ -2928,46 +2923,46 @@ function Xt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
|
|
|
2928
2923
|
type: "password",
|
|
2929
2924
|
value: h
|
|
2930
2925
|
}),
|
|
2931
|
-
n != null && /* @__PURE__ */
|
|
2926
|
+
n != null && /* @__PURE__ */ G(y, { children: n })
|
|
2932
2927
|
]
|
|
2933
2928
|
}) }),
|
|
2934
|
-
e != null && r != null && /* @__PURE__ */
|
|
2935
|
-
disabled: a ||
|
|
2929
|
+
e != null && r != null && /* @__PURE__ */ K(c, {
|
|
2930
|
+
disabled: a || m && h.length == 0,
|
|
2936
2931
|
size: "lg",
|
|
2937
2932
|
type: "submit",
|
|
2938
|
-
children: [a && /* @__PURE__ */
|
|
2933
|
+
children: [a && /* @__PURE__ */ G(g, {
|
|
2939
2934
|
"aria-label": e,
|
|
2940
2935
|
"data-icon": "inline-start"
|
|
2941
2936
|
}), e]
|
|
2942
2937
|
}),
|
|
2943
|
-
a && e == null && /* @__PURE__ */
|
|
2944
|
-
] }),
|
|
2945
|
-
return /* @__PURE__ */
|
|
2938
|
+
a && e == null && /* @__PURE__ */ G(g, { "aria-label": t })
|
|
2939
|
+
] }), v = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
|
|
2940
|
+
return /* @__PURE__ */ G("main", {
|
|
2946
2941
|
className: "open-flow-workbench",
|
|
2947
|
-
children: /* @__PURE__ */
|
|
2942
|
+
children: /* @__PURE__ */ G("div", {
|
|
2948
2943
|
className: "grid h-full overflow-auto bg-muted/20 p-4",
|
|
2949
|
-
children: r == null ? /* @__PURE__ */
|
|
2944
|
+
children: r == null ? /* @__PURE__ */ G("section", {
|
|
2950
2945
|
"aria-busy": a,
|
|
2951
|
-
className:
|
|
2946
|
+
className: v,
|
|
2952
2947
|
children: _
|
|
2953
|
-
}) : /* @__PURE__ */
|
|
2948
|
+
}) : /* @__PURE__ */ G("form", {
|
|
2954
2949
|
"aria-busy": a,
|
|
2955
|
-
className:
|
|
2950
|
+
className: v,
|
|
2956
2951
|
onSubmit: r,
|
|
2957
2952
|
children: _
|
|
2958
2953
|
})
|
|
2959
2954
|
})
|
|
2960
2955
|
});
|
|
2961
2956
|
}
|
|
2962
|
-
function
|
|
2957
|
+
function Jt({ host: e, store: t }) {
|
|
2963
2958
|
let n = a(t.$.notice);
|
|
2964
|
-
return
|
|
2959
|
+
return U(() => e.notify(n), [e, n]), U(() => () => e.notify(void 0), [e]), null;
|
|
2965
2960
|
}
|
|
2966
|
-
function
|
|
2961
|
+
function Yt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, store: m, theme: h }) {
|
|
2967
2962
|
let g = a(m.workspace.$.flowId);
|
|
2968
|
-
return /* @__PURE__ */
|
|
2963
|
+
return /* @__PURE__ */ G("div", {
|
|
2969
2964
|
className: "app-shell",
|
|
2970
|
-
children: g == null ? /* @__PURE__ */
|
|
2965
|
+
children: g == null ? /* @__PURE__ */ G(et, {
|
|
2971
2966
|
catalogWidth: e,
|
|
2972
2967
|
createFlowDisabled: n,
|
|
2973
2968
|
createFlowField: r,
|
|
@@ -2984,12 +2979,12 @@ function Qt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
2984
2979
|
onLanguageChange: p,
|
|
2985
2980
|
onSelectFlow: (e) => void u.selectFlow(e),
|
|
2986
2981
|
store: m
|
|
2987
|
-
}) : /* @__PURE__ */
|
|
2988
|
-
fallback: /* @__PURE__ */
|
|
2982
|
+
}) : /* @__PURE__ */ G(We, {
|
|
2983
|
+
fallback: /* @__PURE__ */ G("main", {
|
|
2989
2984
|
"aria-busy": "true",
|
|
2990
2985
|
className: "workspace"
|
|
2991
2986
|
}),
|
|
2992
|
-
children: /* @__PURE__ */
|
|
2987
|
+
children: /* @__PURE__ */ G(Kt, {
|
|
2993
2988
|
hostAction: s,
|
|
2994
2989
|
hostTitle: c,
|
|
2995
2990
|
hrefFor: o,
|
|
@@ -3002,18 +2997,18 @@ function Qt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
3002
2997
|
})
|
|
3003
2998
|
});
|
|
3004
2999
|
}
|
|
3005
|
-
function
|
|
3000
|
+
function Xt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onHostAction: p, onLanguageChange: m, onNavigate: h, preferences: g, theme: _, variables: v = !0 }) {
|
|
3006
3001
|
let y = Ge(h);
|
|
3007
3002
|
y.current = h;
|
|
3008
|
-
let [{ i18n: b, navigation: x, store: S }] =
|
|
3009
|
-
let e = L(u), t = new
|
|
3003
|
+
let [{ i18n: b, navigation: x, store: S }] = W(() => {
|
|
3004
|
+
let e = L(u), t = new Gt(new De((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), g, () => crypto.randomUUID(), e, a, v);
|
|
3010
3005
|
return {
|
|
3011
3006
|
i18n: e,
|
|
3012
3007
|
navigation: new qe(t, d, (e, t) => y.current(e, t)),
|
|
3013
3008
|
store: t
|
|
3014
3009
|
};
|
|
3015
3010
|
});
|
|
3016
|
-
return
|
|
3011
|
+
return U(() => {
|
|
3017
3012
|
x.start();
|
|
3018
3013
|
let e = () => {
|
|
3019
3014
|
S.connectors.refreshAfterAuthorization(), S.triggers.refreshAfterAuthorization(), S.refreshVariableNames();
|
|
@@ -3025,17 +3020,17 @@ function $t({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
3025
3020
|
b,
|
|
3026
3021
|
x,
|
|
3027
3022
|
S
|
|
3028
|
-
]),
|
|
3023
|
+
]), U(() => void x.apply(d), [d, x]), U(() => {
|
|
3029
3024
|
b.lang != u && b.switchLang(u);
|
|
3030
|
-
}, [b, u]), /* @__PURE__ */
|
|
3025
|
+
}, [b, u]), /* @__PURE__ */ G(o, {
|
|
3031
3026
|
i18n: b,
|
|
3032
|
-
children: /* @__PURE__ */
|
|
3027
|
+
children: /* @__PURE__ */ K("div", {
|
|
3033
3028
|
className: "open-flow-theme open-flow-workbench",
|
|
3034
3029
|
"data-theme": _,
|
|
3035
|
-
children: [/* @__PURE__ */
|
|
3030
|
+
children: [/* @__PURE__ */ G(Jt, {
|
|
3036
3031
|
host: a,
|
|
3037
3032
|
store: S
|
|
3038
|
-
}), /* @__PURE__ */
|
|
3033
|
+
}), /* @__PURE__ */ G(Yt, {
|
|
3039
3034
|
catalogWidth: e,
|
|
3040
3035
|
createFlow: t,
|
|
3041
3036
|
createFlowDisabled: n,
|
|
@@ -3055,8 +3050,8 @@ function $t({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
|
|
|
3055
3050
|
})
|
|
3056
3051
|
});
|
|
3057
3052
|
}
|
|
3058
|
-
function
|
|
3059
|
-
return /* @__PURE__ */
|
|
3053
|
+
function Zt({ sessionKey: e, ...t }) {
|
|
3054
|
+
return /* @__PURE__ */ G(Xt, { ...t }, e);
|
|
3060
3055
|
}
|
|
3061
3056
|
//#endregion
|
|
3062
|
-
export {
|
|
3057
|
+
export { qt as OpenFlowSessionGate, Zt as OpenFlowWorkbench, He as isWorkbenchLanguage, Ue as resolveWorkbenchLanguage, Ve as workbenchLanguageNames, Be as workbenchLanguages };
|