@blueking/bkflow-canvas-editor 1.1.0-beta.13 → 1.1.0-beta.15

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.
@@ -0,0 +1,574 @@
1
+ import { defineComponent as I, ref as T, computed as p, watch as Y, nextTick as X, resolveComponent as P, openBlock as g, createElementBlock as k, createVNode as v, Fragment as Z, renderList as ee, withKeys as te, withModifiers as oe, normalizeClass as N, createElementVNode as a, createCommentVNode as H, toDisplayString as B, createSlots as K, withCtx as y, createTextVNode as D, onBeforeUnmount as se, resolveDirective as ne, normalizeStyle as ae, withDirectives as le, createBlock as q } from "vue";
2
+ import { L as ie, S as ue, E as re, _ as j, b as de, c as ce, t as pe, n as me, D as J, C as ve, d as fe, s as be } from "./index-BLvbMgcK.js";
3
+ import { a as U } from "./composable-C5enWl9b.js";
4
+ const ge = { class: "debug-result-node-list" }, _e = ["data-node-id", "aria-selected", "onClick", "onKeydown"], ye = ["title"], ke = {
5
+ key: 0,
6
+ class: "debug-result-node-list__mock",
7
+ "data-test": "node-mock-flag"
8
+ }, we = {
9
+ key: 1,
10
+ class: "debug-result-node-list__empty"
11
+ }, xe = /* @__PURE__ */ I({
12
+ __name: "node-list",
13
+ props: {
14
+ nodes: {},
15
+ modelValue: { default: "" }
16
+ },
17
+ emits: ["update:modelValue"],
18
+ setup(t, { emit: d }) {
19
+ const e = t, l = d, o = T(""), i = T("all"), _ = T(null), c = {
20
+ not_run: "未执行",
21
+ finished: "成功",
22
+ failed: "失败",
23
+ running: "正在调试",
24
+ suspended: "挂起",
25
+ skipped: "跳过"
26
+ }, C = [
27
+ { value: "all", label: "全部" },
28
+ {
29
+ value: "finished",
30
+ icon: "bkflow-canvas-dark-circle-checkbox",
31
+ iconColor: "#5fb8ac",
32
+ tooltip: c.finished
33
+ },
34
+ {
35
+ value: "failed",
36
+ icon: "bkflow-canvas-dark-circle-close",
37
+ iconColor: "#fa4e41",
38
+ tooltip: c.failed
39
+ },
40
+ {
41
+ value: "running",
42
+ iconComponent: ie,
43
+ iconColor: "#3a84ff",
44
+ tooltip: c.running
45
+ },
46
+ {
47
+ value: "not_run",
48
+ icon: "bkflow-canvas-weizhixing2",
49
+ iconColor: "#b8bbc4",
50
+ tooltip: c.not_run
51
+ },
52
+ {
53
+ value: "suspended",
54
+ icon: "bkflow-canvas-zanting",
55
+ iconColor: "#f59500",
56
+ tooltip: c.suspended
57
+ },
58
+ {
59
+ value: "skipped",
60
+ icon: "bkflow-canvas-tiaoguo2",
61
+ iconColor: "#6e89af",
62
+ tooltip: c.skipped
63
+ }
64
+ ], h = p(
65
+ () => C.map((u) => ({
66
+ ...u,
67
+ count: u.value === "all" ? e.nodes.length : e.nodes.filter((r) => r.status === u.value).length
68
+ }))
69
+ ), E = p(() => {
70
+ const u = o.value.trim().toLowerCase();
71
+ return e.nodes.filter((r) => i.value !== "all" && r.status !== i.value ? !1 : u ? r.name.toLowerCase().includes(u) || r.type.toLowerCase().includes(u) || (r.typeName ?? "").toLowerCase().includes(u) : !0);
72
+ }), L = p(() => o.value.trim() ? "搜索结果为空" : i.value !== "all" ? `暂无${c[i.value]}状态节点` : "暂无节点"), $ = () => {
73
+ o.value = "", i.value = "all";
74
+ }, V = (u) => {
75
+ const r = _.value, b = r?.querySelector(`[data-node-id="${CSS.escape(u)}"]`);
76
+ if (!r || !b) return;
77
+ const n = r.getBoundingClientRect(), w = b.getBoundingClientRect();
78
+ w.top < n.top ? r.scrollTop -= n.top - w.top : w.bottom > n.bottom && (r.scrollTop += w.bottom - n.bottom);
79
+ };
80
+ return Y(
81
+ () => e.modelValue,
82
+ async (u) => {
83
+ if (!u) return;
84
+ !E.value.some((b) => b.id === u) && e.nodes.some((b) => b.id === u) && (o.value = "", i.value = "all"), await X(), V(u);
85
+ },
86
+ { flush: "post" }
87
+ ), (u, r) => {
88
+ const b = P("bk-input");
89
+ return g(), k("aside", ge, [
90
+ v(b, {
91
+ modelValue: o.value,
92
+ "onUpdate:modelValue": r[0] || (r[0] = (n) => o.value = n),
93
+ class: "debug-result-node-list__search",
94
+ placeholder: "搜索节点名称 / 类型",
95
+ type: "search",
96
+ clearable: "",
97
+ "data-test": "node-search"
98
+ }, null, 8, ["modelValue"]),
99
+ v(ue, {
100
+ modelValue: i.value,
101
+ "onUpdate:modelValue": r[1] || (r[1] = (n) => i.value = n),
102
+ class: "debug-result-node-list__filters",
103
+ "data-test": "status-filters",
104
+ items: h.value
105
+ }, null, 8, ["modelValue", "items"]),
106
+ E.value.length > 0 ? (g(), k("div", {
107
+ key: 0,
108
+ ref_key: "itemsRef",
109
+ ref: _,
110
+ class: "debug-result-node-list__items",
111
+ role: "listbox"
112
+ }, [
113
+ (g(!0), k(Z, null, ee(E.value, (n) => (g(), k("div", {
114
+ key: n.id,
115
+ class: N([
116
+ "debug-result-node-list__item",
117
+ `is-${n.status}`,
118
+ {
119
+ "is-active": n.id === e.modelValue,
120
+ "is-unconfigured": !n.isConfigured
121
+ }
122
+ ]),
123
+ role: "option",
124
+ "data-test": "node-item",
125
+ "data-node-id": n.id,
126
+ "aria-selected": n.id === e.modelValue,
127
+ tabindex: "0",
128
+ onClick: (w) => l("update:modelValue", n.id),
129
+ onKeydown: te(oe((w) => l("update:modelValue", n.id), ["prevent"]), ["enter", "space"])
130
+ }, [
131
+ a("span", {
132
+ class: N([
133
+ "debug-result-node-list__status",
134
+ `is-${n.status}`,
135
+ { "is-placeholder": !n.isConfigured }
136
+ ])
137
+ }, [
138
+ n.icon ? (g(), k("i", {
139
+ key: 0,
140
+ class: N(n.icon),
141
+ "data-test": "node-icon"
142
+ }, null, 2)) : H("", !0)
143
+ ], 2),
144
+ a("span", {
145
+ class: "debug-result-node-list__name",
146
+ title: n.isConfigured ? `${n.name} ${n.typeName || n.type}` : n.name
147
+ }, B(n.name), 9, ye),
148
+ n.isMock ? (g(), k("span", ke, "MOCK")) : H("", !0)
149
+ ], 42, _e))), 128))
150
+ ], 512)) : (g(), k("div", we, [
151
+ v(re, {
152
+ "is-search": !1,
153
+ title: L.value,
154
+ onClear: $
155
+ }, null, 8, ["title"])
156
+ ]))
157
+ ]);
158
+ };
159
+ }
160
+ }), Ce = /* @__PURE__ */ j(xe, [["__scopeId", "data-v-f706a5cb"]]);
161
+ function Ee(t) {
162
+ if (t == null) return "";
163
+ if (typeof t == "string") return t;
164
+ if (typeof t == "object") {
165
+ const d = t, e = d.message;
166
+ if (typeof e == "string" && e) {
167
+ const l = d.type;
168
+ return typeof l == "string" && l ? `${l}: ${e}` : e;
169
+ }
170
+ try {
171
+ return JSON.stringify(t);
172
+ } catch {
173
+ return String(t);
174
+ }
175
+ }
176
+ return String(t);
177
+ }
178
+ const he = { class: "debug-result-tabs" }, Ve = {
179
+ class: "debug-result-tabs__failed-actions",
180
+ "data-test": "output-error-actions"
181
+ }, Me = {
182
+ class: "debug-result-tabs__execution",
183
+ "data-test": "tab-execution"
184
+ }, Re = { class: "debug-result-tabs__row" }, Se = { class: "value" }, Te = { class: "debug-result-tabs__row" }, Ne = { class: "value" }, Le = {
185
+ key: 0,
186
+ class: "debug-result-tabs__row is-error"
187
+ }, $e = { class: "value" }, Ae = {
188
+ class: "debug-result-tabs__mock-hint",
189
+ "data-test": "mock-banner"
190
+ }, Pe = {
191
+ class: "debug-result-tabs__logs",
192
+ "data-test": "tab-logs"
193
+ }, Be = /* @__PURE__ */ I({
194
+ __name: "result-tabs",
195
+ props: {
196
+ result: {},
197
+ component: {},
198
+ isMock: { type: Boolean, default: !1 },
199
+ canRunNodeDebug: { type: Boolean, default: !1 }
200
+ },
201
+ emits: ["reEditMock", "runReal", "runMock", "logsTabActive"],
202
+ setup(t, { emit: d }) {
203
+ const e = t, l = d, o = T("execution");
204
+ Y(
205
+ o,
206
+ (x) => l("logsTabActive", x === "logs"),
207
+ { immediate: !0 }
208
+ );
209
+ const i = {
210
+ not_run: "未调试",
211
+ running: "正在调试",
212
+ finished: "成功",
213
+ failed: "失败",
214
+ suspended: "挂起",
215
+ skipped: "跳过"
216
+ }, _ = p(() => i[e.result.execution.status] ?? e.result.execution.status), c = p(() => de(e.result.execution.durationMs)), C = p(() => Ee(e.result.error || e.result.execution.errorDetail)), h = p(() => e.result.execution.status === "failed"), {
217
+ loading: E,
218
+ error: L,
219
+ visibleInputs: $,
220
+ outputNameMap: V
221
+ } = ce({ component: () => e.component }), u = p(() => e.result.loading || E.value), r = p(() => e.result.detailError || L.value), b = p(
222
+ () => $.value.filter(({ key: x }) => Object.prototype.hasOwnProperty.call(e.result.inputs, x)).map(({ key: x, name: s }) => ({ key: x, name: s, value: e.result.inputs[x] }))
223
+ ), n = p(
224
+ () => pe(e.result.outputs, V.value)
225
+ ), w = p(() => e.result.logs == null ? "" : me(e.result.logs));
226
+ return (x, s) => {
227
+ const A = P("bk-button"), M = P("bk-tab-panel"), G = P("bk-tab");
228
+ return g(), k("div", he, [
229
+ v(G, {
230
+ active: o.value,
231
+ "onUpdate:active": s[3] || (s[3] = (R) => o.value = R),
232
+ type: "card-grid"
233
+ }, K({
234
+ default: y(() => [
235
+ v(M, {
236
+ name: "execution",
237
+ label: "执行信息"
238
+ }, {
239
+ default: y(() => [
240
+ a("div", Me, [
241
+ a("div", Re, [
242
+ s[9] || (s[9] = a("span", { class: "label" }, "执行状态", -1)),
243
+ a("span", Se, B(_.value), 1)
244
+ ]),
245
+ a("div", Te, [
246
+ s[10] || (s[10] = a("span", { class: "label" }, "调试用时", -1)),
247
+ a("span", Ne, B(c.value), 1)
248
+ ]),
249
+ C.value ? (g(), k("div", Le, [
250
+ s[11] || (s[11] = a("span", { class: "label" }, "错误信息", -1)),
251
+ a("span", $e, B(C.value), 1)
252
+ ])) : H("", !0)
253
+ ])
254
+ ]),
255
+ _: 1
256
+ }),
257
+ v(M, {
258
+ name: "inputs",
259
+ label: "输入参数"
260
+ }, {
261
+ default: y(() => [
262
+ v(J, {
263
+ rows: b.value,
264
+ loading: u.value,
265
+ error: r.value,
266
+ "empty-text": "暂无输入参数"
267
+ }, null, 8, ["rows", "loading", "error"])
268
+ ]),
269
+ _: 1
270
+ }),
271
+ v(M, {
272
+ name: "outputs",
273
+ label: "输出结果"
274
+ }, {
275
+ default: y(() => [
276
+ v(J, {
277
+ rows: n.value,
278
+ loading: u.value,
279
+ error: r.value,
280
+ "empty-text": "暂无输出结果"
281
+ }, K({ _: 2 }, [
282
+ e.isMock ? {
283
+ name: "toolbar",
284
+ fn: y(() => [
285
+ a("div", Ae, [
286
+ s[13] || (s[13] = a("i", {
287
+ class: "bkflow-canvas-icon bkflow-canvas-info debug-result-tabs__mock-info",
288
+ "aria-hidden": "true"
289
+ }, null, -1)),
290
+ s[14] || (s[14] = a("span", null, "当前为 Mock 数据", -1)),
291
+ v(A, {
292
+ text: "",
293
+ theme: "primary",
294
+ size: "small",
295
+ "data-test": "re-edit-mock",
296
+ onClick: s[2] || (s[2] = (R) => l("reEditMock"))
297
+ }, {
298
+ default: y(() => [...s[12] || (s[12] = [
299
+ D(" 重新编辑 ", -1)
300
+ ])]),
301
+ _: 1
302
+ })
303
+ ])
304
+ ]),
305
+ key: "0"
306
+ } : void 0
307
+ ]), 1032, ["rows", "loading", "error"])
308
+ ]),
309
+ _: 1
310
+ }),
311
+ v(M, {
312
+ name: "logs",
313
+ label: "调用日志"
314
+ }, {
315
+ default: y(() => [
316
+ a("div", Pe, [
317
+ v(ve, {
318
+ "log-text": w.value,
319
+ loading: e.result.logLoading,
320
+ error: e.result.logError
321
+ }, null, 8, ["log-text", "loading", "error"])
322
+ ])
323
+ ]),
324
+ _: 1
325
+ })
326
+ ]),
327
+ _: 2
328
+ }, [
329
+ h.value && e.canRunNodeDebug ? {
330
+ name: "setting",
331
+ fn: y(() => [
332
+ a("div", Ve, [
333
+ s[6] || (s[6] = a("i", { class: "bkflow-canvas-icon bkflow-canvas-alert" }, null, -1)),
334
+ s[7] || (s[7] = a("span", null, "该节点执行失败,可", -1)),
335
+ v(A, {
336
+ text: "",
337
+ theme: "primary",
338
+ "data-test": "rerun-real",
339
+ onClick: s[0] || (s[0] = (R) => l("runReal"))
340
+ }, {
341
+ default: y(() => [...s[4] || (s[4] = [
342
+ D("重新调试", -1)
343
+ ])]),
344
+ _: 1
345
+ }),
346
+ s[8] || (s[8] = a("span", null, "或直接", -1)),
347
+ v(A, {
348
+ text: "",
349
+ theme: "primary",
350
+ "data-test": "run-mock",
351
+ onClick: s[1] || (s[1] = (R) => l("runMock"))
352
+ }, {
353
+ default: y(() => [...s[5] || (s[5] = [
354
+ D("Mock 输出", -1)
355
+ ])]),
356
+ _: 1
357
+ })
358
+ ])
359
+ ]),
360
+ key: "0"
361
+ } : void 0
362
+ ]), 1032, ["active"])
363
+ ]);
364
+ };
365
+ }
366
+ }), De = /* @__PURE__ */ j(Be, [["__scopeId", "data-v-2e1ad466"]]), Ge = {
367
+ ExclusiveGateway: "bkflow-canvas-icon bkflow-canvas-fenzhiwangguan",
368
+ ParallelGateway: "bkflow-canvas-icon bkflow-canvas-bingxingwangguan",
369
+ ConditionalParallelGateway: "bkflow-canvas-icon bkflow-canvas-tiaojianbingxingwangguan",
370
+ ConvergeGateway: "bkflow-canvas-icon bkflow-canvas-huijuwangguan"
371
+ }, O = {
372
+ ServiceActivity: "任务节点",
373
+ EmptyStartEvent: "开始节点",
374
+ EmptyEndEvent: "结束节点",
375
+ ExclusiveGateway: "分支网关",
376
+ ParallelGateway: "并行网关",
377
+ ConditionalParallelGateway: "条件并行网关",
378
+ ConvergeGateway: "汇聚网关"
379
+ }, ze = (t) => !t || t.includes("bkflow-canvas-icon") ? t : `bkflow-canvas-icon ${t}`;
380
+ function Ue(t) {
381
+ if (!t.component?.code) return "";
382
+ if (t.component.code === "uniform_api") {
383
+ const d = t.component.api_meta?.category?.name ?? "";
384
+ return U[d] ?? U.bkflow;
385
+ }
386
+ return U.bkflow;
387
+ }
388
+ function Oe(t, d) {
389
+ const e = t?.location?.find((_) => _.id === d), l = ze(e?.icon ?? ""), o = t?.activities?.[d];
390
+ if (o)
391
+ return {
392
+ name: !!o.component?.code ? o.name || e?.name || d : "节点未配置",
393
+ type: o.type || "ServiceActivity",
394
+ typeName: O[o.type] ?? "任务节点",
395
+ icon: Ue(o)
396
+ };
397
+ const i = t?.gateways?.[d];
398
+ return i ? {
399
+ name: i.name || e?.name || O[i.type] || d,
400
+ type: i.type,
401
+ typeName: O[i.type] ?? "网关",
402
+ icon: l || Ge[i.type] || ""
403
+ } : t?.start_event?.id === d ? {
404
+ name: t.start_event.name || "开始",
405
+ type: "EmptyStartEvent",
406
+ typeName: "开始节点",
407
+ icon: l || "bkflow-canvas-icon bkflow-canvas-kaishi"
408
+ } : t?.end_event?.id === d ? {
409
+ name: t.end_event.name || "结束",
410
+ type: "EmptyEndEvent",
411
+ typeName: "结束节点",
412
+ icon: l || "bkflow-canvas-icon bkflow-canvas-stop"
413
+ } : e ? {
414
+ name: e.name || d,
415
+ type: e.type || "",
416
+ typeName: "",
417
+ icon: l
418
+ } : { name: d, type: "", typeName: "", icon: "" };
419
+ }
420
+ function Fe(t, d, e = /* @__PURE__ */ new Set()) {
421
+ if (!t) return [];
422
+ const l = new Map(
423
+ (d ?? []).map((o) => [o.node_id, fe(o.status)])
424
+ );
425
+ return be(t).map((o) => {
426
+ const i = t.activities?.[o], _ = i ? !!i.component?.code : !0, c = Oe(t, o);
427
+ return {
428
+ id: o,
429
+ name: c.name,
430
+ type: c.type || i?.type || "",
431
+ typeName: c.typeName,
432
+ icon: c.icon,
433
+ status: l.get(o) ?? "not_run",
434
+ isMock: !!(i && e.has(o)),
435
+ isConfigured: _
436
+ };
437
+ });
438
+ }
439
+ const He = { class: "debug-result-drawer__header" }, Ie = { class: "debug-result-drawer__header-left" }, Ye = { class: "debug-result-drawer__body" }, je = { class: "debug-result-drawer__content" }, Ke = { class: "debug-result-drawer__result" }, qe = {
440
+ key: 1,
441
+ class: "debug-result-drawer__unselected",
442
+ "data-test": "node-unselected"
443
+ }, S = 44, F = 420, Je = /* @__PURE__ */ I({
444
+ __name: "index",
445
+ props: {
446
+ open: { type: Boolean },
447
+ context: {},
448
+ pipelineTree: {},
449
+ mockNodeIds: {},
450
+ modelValue: { default: "" },
451
+ result: {},
452
+ hasGlobalRun: { type: Boolean, default: !1 },
453
+ viewParamsPending: { type: Boolean, default: !1 },
454
+ offsetLeft: { default: 0 }
455
+ },
456
+ emits: ["update:open", "update:modelValue", "reEditMock", "runReal", "runMock", "viewParams", "logsTabActive"],
457
+ setup(t, { emit: d }) {
458
+ const e = t, l = d, o = T(F), i = T(!1);
459
+ let _ = 0, c = 0, C = "", h = "";
460
+ const E = p(() => ({
461
+ left: `${e.offsetLeft}px`,
462
+ height: `${e.open ? o.value : S}px`
463
+ })), L = () => {
464
+ e.open || (o.value = F), l("update:open", !e.open);
465
+ }, $ = (f) => {
466
+ const m = f > S;
467
+ m !== e.open && l("update:open", m);
468
+ }, V = (f) => {
469
+ const m = c - (f.clientY - _);
470
+ o.value = Math.max(S, Math.min(window.innerHeight * 0.8, m)), $(o.value);
471
+ }, u = () => {
472
+ document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", u), document.body.style.cursor = C, document.body.style.userSelect = h, i.value = !1, o.value <= S && (o.value = F, l("update:open", !1));
473
+ }, r = (f) => {
474
+ f.preventDefault(), i.value = !0, _ = f.clientY, e.open ? c = o.value : (l("update:open", !0), o.value = S, c = S), C = document.body.style.cursor, h = document.body.style.userSelect, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", V), document.addEventListener("mouseup", u);
475
+ };
476
+ se(u);
477
+ const b = p({
478
+ get: () => e.modelValue,
479
+ set: (f) => l("update:modelValue", f)
480
+ });
481
+ Y(
482
+ () => e.modelValue,
483
+ (f) => {
484
+ f || l("logsTabActive", !1);
485
+ },
486
+ { immediate: !0 }
487
+ );
488
+ const n = p(
489
+ () => Fe(e.pipelineTree, e.context?.nodes, e.mockNodeIds)
490
+ ), w = p(() => e.mockNodeIds.has(e.modelValue)), x = p(() => e.pipelineTree?.activities?.[e.modelValue]?.component), s = p(() => {
491
+ const f = n.value.find((m) => m.id === e.modelValue);
492
+ return f?.type === "ServiceActivity" && f.isConfigured;
493
+ }), A = () => {
494
+ !e.hasGlobalRun || e.viewParamsPending || l("viewParams");
495
+ }, M = () => {
496
+ e.modelValue && l("reEditMock", e.modelValue);
497
+ }, G = () => {
498
+ e.modelValue && l("runReal", e.modelValue);
499
+ }, R = () => {
500
+ e.modelValue && l("runMock", e.modelValue);
501
+ };
502
+ return (f, m) => {
503
+ const W = P("bk-button"), Q = ne("bk-tooltips");
504
+ return g(), k("div", {
505
+ class: N(["debug-result-drawer-wrapper", { "is-resizing": i.value }]),
506
+ style: ae(E.value)
507
+ }, [
508
+ a("div", {
509
+ class: "debug-result-drawer__resize",
510
+ onMousedown: r
511
+ }, null, 32),
512
+ a("section", {
513
+ class: N(["debug-result-drawer", { "is-collapsed": !e.open }])
514
+ }, [
515
+ a("header", He, [
516
+ a("div", Ie, [
517
+ m[3] || (m[3] = a("span", { class: "debug-result-drawer__title" }, "调试结果", -1)),
518
+ m[4] || (m[4] = a("span", { class: "debug-result-drawer__divider" }, null, -1)),
519
+ le((g(), q(W, {
520
+ text: "",
521
+ theme: "primary",
522
+ disabled: !e.hasGlobalRun,
523
+ loading: e.viewParamsPending,
524
+ onClick: A
525
+ }, {
526
+ default: y(() => [...m[2] || (m[2] = [
527
+ a("i", { class: "bkflow-canvas-icon bkflow-canvas-audit view-params-icon" }, null, -1),
528
+ D(" 查看参数 ", -1)
529
+ ])]),
530
+ _: 1
531
+ }, 8, ["disabled", "loading"])), [
532
+ [Q, { content: "请先进行调试", disabled: e.hasGlobalRun }]
533
+ ])
534
+ ]),
535
+ a("span", {
536
+ class: "debug-result-drawer__collapse",
537
+ onClick: L
538
+ }, [
539
+ a("span", null, B(e.open ? "收起" : "展开"), 1),
540
+ a("i", {
541
+ class: N(["bkflow-canvas-icon bkflow-canvas-arrows-down debug-result-drawer__collapse-icon", { "is-expanded": e.open }])
542
+ }, null, 2)
543
+ ])
544
+ ]),
545
+ a("div", Ye, [
546
+ a("div", je, [
547
+ v(Ce, {
548
+ modelValue: b.value,
549
+ "onUpdate:modelValue": m[0] || (m[0] = (z) => b.value = z),
550
+ nodes: n.value
551
+ }, null, 8, ["modelValue", "nodes"]),
552
+ a("div", Ke, [
553
+ e.modelValue ? (g(), q(De, {
554
+ key: 0,
555
+ result: e.result,
556
+ component: x.value,
557
+ "is-mock": w.value,
558
+ "can-run-node-debug": s.value,
559
+ onReEditMock: M,
560
+ onRunReal: G,
561
+ onRunMock: R,
562
+ onLogsTabActive: m[1] || (m[1] = (z) => l("logsTabActive", z))
563
+ }, null, 8, ["result", "component", "is-mock", "can-run-node-debug"])) : (g(), k("div", qe, " 请先选择节点查看调试详情 "))
564
+ ])
565
+ ])
566
+ ])
567
+ ], 2)
568
+ ], 6);
569
+ };
570
+ }
571
+ }), Ze = /* @__PURE__ */ j(Je, [["__scopeId", "data-v-cf73f47a"]]);
572
+ export {
573
+ Ze as default
574
+ };
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BtDOlbGL.cjs"),o=require("./composable-DTQ9yfye.cjs");require("lodash");exports.BkFlowCanvas=e.BkFlowCanvas;exports.BkFlowModelAccessor=e.BkFlowModelAccessor;exports.BkFlowNodeAccessor=e.BkFlowNodeAccessor;exports.FlowCreateTask=e.FlowCreateTask;exports.FlowDebug=e.FlowDebug;exports.FlowDetail=e.index;exports.FlowEdit=e.edit;exports.FlowExecute=e.execute;exports.FlowMockDebug=e.mock;exports.FlowView=e.view;exports.bkflowConnectionValidator=e.bkflowConnectionValidator;exports.createBkflowPlugin=e.createBkflowPlugin;exports.createBkflowSchema=e.createBkflowSchema;exports.createExecutionStatusPlugin=e.createExecutionStatusPlugin;exports.default=e.index$1;exports.exportToPipelineTree=e.exportToPipelineTree;exports.getUniformApiPluginFormValue=e.getUniformApiPluginFormValue;exports.getVariableDefaultConfig=e.getVariableDefaultConfig;exports.importFromPipelineTree=e.importFromPipelineTree;exports.isMockableNode=e.isMockableNode;exports.mergeOutputs=e.mergeOutputs;exports.normalizePluginOutputItems=e.normalizePluginOutputItems;exports.provideFlowApiConfig=e.provideFlowApiConfig;exports.provideMemberSelectorConfig=e.provideMemberSelectorConfig;exports.provideSelectPanelConfig=e.provideSelectPanelConfig;exports.resolveExecutionActions=e.resolveExecutionActions;exports.resolveMockFormControl=e.resolveMockFormControl;exports.useFlowApiConfig=e.useFlowApiConfig;exports.useFlowEditApiConfig=e.useFlowEditApiConfig;exports.useFlowViewApiConfig=e.useFlowViewApiConfig;exports.useMemberSelectorConfig=e.useMemberSelectorConfig;exports.useSelectPanelConfig=e.useSelectPanelConfig;exports.validatePipelineTree=e.validatePipelineTree;exports.generateId=o.generateId;exports.random4=o.random4;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BNXiAeo5.cjs"),o=require("./composable-DTQ9yfye.cjs");require("lodash");exports.BkFlowCanvas=e.BkFlowCanvas;exports.BkFlowModelAccessor=e.BkFlowModelAccessor;exports.BkFlowNodeAccessor=e.BkFlowNodeAccessor;exports.FlowCreateTask=e.FlowCreateTask;exports.FlowDebug=e.FlowDebug;exports.FlowDetail=e.index;exports.FlowEdit=e.edit;exports.FlowExecute=e.execute;exports.FlowMockDebug=e.mock;exports.FlowView=e.view;exports.bkflowConnectionValidator=e.bkflowConnectionValidator;exports.createBkflowPlugin=e.createBkflowPlugin;exports.createBkflowSchema=e.createBkflowSchema;exports.createExecutionStatusPlugin=e.createExecutionStatusPlugin;exports.default=e.index$1;exports.exportToPipelineTree=e.exportToPipelineTree;exports.getUniformApiPluginFormValue=e.getUniformApiPluginFormValue;exports.getVariableDefaultConfig=e.getVariableDefaultConfig;exports.importFromPipelineTree=e.importFromPipelineTree;exports.isMockableNode=e.isMockableNode;exports.mergeOutputs=e.mergeOutputs;exports.normalizePluginOutputItems=e.normalizePluginOutputItems;exports.provideFlowApiConfig=e.provideFlowApiConfig;exports.provideMemberSelectorConfig=e.provideMemberSelectorConfig;exports.provideSelectPanelConfig=e.provideSelectPanelConfig;exports.resolveExecutionActions=e.resolveExecutionActions;exports.resolveMockFormControl=e.resolveMockFormControl;exports.useFlowApiConfig=e.useFlowApiConfig;exports.useFlowEditApiConfig=e.useFlowEditApiConfig;exports.useFlowViewApiConfig=e.useFlowViewApiConfig;exports.useMemberSelectorConfig=e.useMemberSelectorConfig;exports.useSelectPanelConfig=e.useSelectPanelConfig;exports.validatePipelineTree=e.validatePipelineTree;exports.generateId=o.generateId;exports.random4=o.random4;
package/dist/index.d.ts CHANGED
@@ -926,6 +926,8 @@ interface FlowTaskDetail {
926
926
  id: number | string;
927
927
  template_id: number;
928
928
  pipeline_tree: PipelineTree;
929
+ /** 任务已耗时(秒),调试摘要弹层刷新恢复用。 */
930
+ elapsed_time?: number;
929
931
  [key: string]: unknown;
930
932
  }
931
933
  interface CreateFlowTaskParams {
@@ -1809,6 +1811,8 @@ interface DebugCanvasContext {
1809
1811
  focusedNodeId?(): string;
1810
1812
  /** 打开该节点详情侧滑的“调试配置”Tab */
1811
1813
  openNodeDebugPanel?(nodeId: string): void;
1814
+ /** 调试锁定期(running/terminating);节点配置据此展示只读说明 Alert */
1815
+ isLocked?(): boolean;
1812
1816
  }
1813
1817
 
1814
1818
  type __VLS_Props = {
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e as s, h as i, j as l, F as r, k as t, l as n, o as u, q as c, v as g, w, x as p, y as F, z as f, A as m, G as d, H as C, I as k, J as P, K as A, N as v, m as b, O as x, P as M, Q as S, T, U as V, r as B, u as E, V as D, W as I, X as N, Y as O, Z as h } from "./index-TlWjZWTn.js";
1
+ import { e as s, h as i, j as l, F as r, k as t, l as n, o as u, q as c, v as g, w, x as p, y as F, z as f, A as m, G as d, H as C, I as k, J as P, K as A, N as v, m as b, O as x, P as M, Q as S, T, U as V, r as B, u as E, V as D, W as I, X as N, Y as O, Z as h } from "./index-BLvbMgcK.js";
2
2
  import { g as U, r as j } from "./composable-C5enWl9b.js";
3
3
  import "lodash";
4
4
  export {