@blueking/bkflow-canvas-editor 1.1.0-beta.10 → 1.1.0-beta.11

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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as G, ref as S, computed as p, watch as U, nextTick as Y, resolveComponent as $, openBlock as c, createElementBlock as v, createVNode as m, Fragment as K, renderList as q, withKeys as J, withModifiers as W, normalizeClass as M, createElementVNode as a, createCommentVNode as T, toDisplayString as R, withCtx as k, createTextVNode as L, createBlock as F, onBeforeUnmount as Q, resolveDirective as X, normalizeStyle as Z, withDirectives as ee } from "vue";
2
- import { L as te, S as se, E as oe, _ as z, n as ne, D, C as ae, b as le } from "./index-C16qU3Yx.js";
3
- import { a as P } from "./composable-Cf47ka9M.js";
4
- const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-selected", "onClick", "onKeydown"], re = ["title"], de = {
1
+ import { defineComponent as z, ref as R, computed as v, watch as D, nextTick as Y, resolveComponent as $, openBlock as d, createElementBlock as m, createVNode as p, Fragment as K, renderList as q, withKeys as J, withModifiers as W, normalizeClass as S, createElementVNode as l, createCommentVNode as T, toDisplayString as V, withCtx as w, createTextVNode as L, createBlock as G, onBeforeUnmount as Q, resolveDirective as X, normalizeStyle as Z, withDirectives as ee } from "vue";
2
+ import { L as te, S as se, E as oe, _ as U, t as ne, n as ae, D as F, C as le, b as ie } from "./index-CCwVVpg5.js";
3
+ import { a as P } from "./composable-kbjnTzFy.js";
4
+ const ue = { class: "debug-result-node-list" }, re = ["data-node-id", "aria-selected", "onClick", "onKeydown"], de = ["title"], ce = {
5
5
  key: 0,
6
6
  class: "debug-result-node-list__mock",
7
7
  "data-test": "node-mock-flag"
8
- }, ce = {
8
+ }, me = {
9
9
  key: 1,
10
10
  class: "debug-result-node-list__empty"
11
- }, me = /* @__PURE__ */ G({
11
+ }, pe = /* @__PURE__ */ z({
12
12
  __name: "node-list",
13
13
  props: {
14
14
  nodes: {},
@@ -16,7 +16,7 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
16
16
  },
17
17
  emits: ["update:modelValue"],
18
18
  setup(n, { emit: r }) {
19
- const e = n, l = r, u = S(""), o = S("all"), b = S(null), g = [
19
+ const e = n, a = r, u = R(""), o = R("all"), b = R(null), g = [
20
20
  { value: "all", label: "全部" },
21
21
  { value: "finished", icon: "bkflow-canvas-dark-circle-checkbox", iconColor: "#5fb8ac" },
22
22
  { value: "failed", icon: "bkflow-canvas-dark-circle-close", iconColor: "#fa4e41" },
@@ -24,40 +24,40 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
24
24
  { value: "not_run", icon: "bkflow-canvas-weizhixing2", iconColor: "#b8bbc4" },
25
25
  { value: "suspended", icon: "bkflow-canvas-zanting", iconColor: "#f59500" },
26
26
  { value: "skipped", icon: "bkflow-canvas-tiaoguo2", iconColor: "#6e89af" }
27
- ], y = p(
27
+ ], y = v(
28
28
  () => g.map((i) => ({
29
29
  ...i,
30
30
  count: i.value === "all" ? e.nodes.length : e.nodes.filter((t) => t.status === i.value).length
31
31
  }))
32
- ), w = p(() => {
32
+ ), x = v(() => {
33
33
  const i = u.value.trim().toLowerCase();
34
34
  return e.nodes.filter((t) => o.value !== "all" && t.status !== o.value ? !1 : i ? t.name.toLowerCase().includes(i) || t.type.toLowerCase().includes(i) || (t.typeName ?? "").toLowerCase().includes(i) : !0);
35
- }), E = {
35
+ }), M = {
36
36
  not_run: "未执行",
37
37
  finished: "成功",
38
38
  failed: "失败",
39
39
  running: "正在调试",
40
40
  suspended: "挂起",
41
41
  skipped: "跳过"
42
- }, N = p(() => u.value.trim() ? "搜索结果为空" : o.value !== "all" ? `暂无${E[o.value]}状态节点` : "暂无节点"), h = () => {
42
+ }, N = v(() => u.value.trim() ? "搜索结果为空" : o.value !== "all" ? `暂无${M[o.value]}状态节点` : "暂无节点"), E = () => {
43
43
  u.value = "", o.value = "all";
44
- }, x = (i) => {
45
- const t = b.value, d = t?.querySelector(`[data-node-id="${CSS.escape(i)}"]`);
46
- if (!t || !d) return;
47
- const s = t.getBoundingClientRect(), f = d.getBoundingClientRect();
44
+ }, C = (i) => {
45
+ const t = b.value, c = t?.querySelector(`[data-node-id="${CSS.escape(i)}"]`);
46
+ if (!t || !c) return;
47
+ const s = t.getBoundingClientRect(), f = c.getBoundingClientRect();
48
48
  f.top < s.top ? t.scrollTop -= s.top - f.top : f.bottom > s.bottom && (t.scrollTop += f.bottom - s.bottom);
49
49
  };
50
- return U(
50
+ return D(
51
51
  () => e.modelValue,
52
52
  async (i) => {
53
53
  if (!i) return;
54
- !w.value.some((d) => d.id === i) && e.nodes.some((d) => d.id === i) && (u.value = "", o.value = "all"), await Y(), x(i);
54
+ !x.value.some((c) => c.id === i) && e.nodes.some((c) => c.id === i) && (u.value = "", o.value = "all"), await Y(), C(i);
55
55
  },
56
56
  { flush: "post" }
57
57
  ), (i, t) => {
58
- const d = $("bk-input");
59
- return c(), v("aside", ie, [
60
- m(d, {
58
+ const c = $("bk-input");
59
+ return d(), m("aside", ue, [
60
+ p(c, {
61
61
  modelValue: u.value,
62
62
  "onUpdate:modelValue": t[0] || (t[0] = (s) => u.value = s),
63
63
  class: "debug-result-node-list__search",
@@ -66,23 +66,23 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
66
66
  clearable: "",
67
67
  "data-test": "node-search"
68
68
  }, null, 8, ["modelValue"]),
69
- m(se, {
69
+ p(se, {
70
70
  modelValue: o.value,
71
71
  "onUpdate:modelValue": t[1] || (t[1] = (s) => o.value = s),
72
72
  class: "debug-result-node-list__filters",
73
73
  "data-test": "status-filters",
74
74
  items: y.value
75
75
  }, null, 8, ["modelValue", "items"]),
76
- w.value.length > 0 ? (c(), v("div", {
76
+ x.value.length > 0 ? (d(), m("div", {
77
77
  key: 0,
78
78
  ref_key: "itemsRef",
79
79
  ref: b,
80
80
  class: "debug-result-node-list__items",
81
81
  role: "listbox"
82
82
  }, [
83
- (c(!0), v(K, null, q(w.value, (s) => (c(), v("div", {
83
+ (d(!0), m(K, null, q(x.value, (s) => (d(), m("div", {
84
84
  key: s.id,
85
- class: M([
85
+ class: S([
86
86
  "debug-result-node-list__item",
87
87
  `is-${s.status}`,
88
88
  {
@@ -95,47 +95,47 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
95
95
  "data-node-id": s.id,
96
96
  "aria-selected": s.id === e.modelValue,
97
97
  tabindex: "0",
98
- onClick: (f) => l("update:modelValue", s.id),
99
- onKeydown: J(W((f) => l("update:modelValue", s.id), ["prevent"]), ["enter", "space"])
98
+ onClick: (f) => a("update:modelValue", s.id),
99
+ onKeydown: J(W((f) => a("update:modelValue", s.id), ["prevent"]), ["enter", "space"])
100
100
  }, [
101
- a("span", {
102
- class: M([
101
+ l("span", {
102
+ class: S([
103
103
  "debug-result-node-list__status",
104
104
  `is-${s.status}`,
105
105
  { "is-placeholder": !s.isConfigured }
106
106
  ])
107
107
  }, [
108
- s.icon ? (c(), v("i", {
108
+ s.icon ? (d(), m("i", {
109
109
  key: 0,
110
- class: M(s.icon),
110
+ class: S(s.icon),
111
111
  "data-test": "node-icon"
112
112
  }, null, 2)) : T("", !0)
113
113
  ], 2),
114
- a("span", {
114
+ l("span", {
115
115
  class: "debug-result-node-list__name",
116
116
  title: s.isConfigured ? `${s.name} ${s.typeName || s.type}` : s.name
117
- }, R(s.name), 9, re),
118
- s.isMock ? (c(), v("span", de, "MOCK")) : T("", !0)
119
- ], 42, ue))), 128))
120
- ], 512)) : (c(), v("div", ce, [
121
- m(oe, {
117
+ }, V(s.name), 9, de),
118
+ s.isMock ? (d(), m("span", ce, "MOCK")) : T("", !0)
119
+ ], 42, re))), 128))
120
+ ], 512)) : (d(), m("div", me, [
121
+ p(oe, {
122
122
  "is-search": !1,
123
123
  title: N.value,
124
- onClear: h
124
+ onClear: E
125
125
  }, null, 8, ["title"])
126
126
  ]))
127
127
  ]);
128
128
  };
129
129
  }
130
- }), pe = /* @__PURE__ */ z(me, [["__scopeId", "data-v-5f1b1514"]]);
131
- function ve(n) {
130
+ }), ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-5f1b1514"]]);
131
+ function be(n) {
132
132
  if (n == null) return "";
133
133
  if (typeof n == "string") return n;
134
134
  if (typeof n == "object") {
135
135
  const r = n, e = r.message;
136
136
  if (typeof e == "string" && e) {
137
- const l = r.type;
138
- return typeof l == "string" && l ? `${l}: ${e}` : e;
137
+ const a = r.type;
138
+ return typeof a == "string" && a ? `${a}: ${e}` : e;
139
139
  }
140
140
  try {
141
141
  return JSON.stringify(n);
@@ -145,27 +145,27 @@ function ve(n) {
145
145
  }
146
146
  return String(n);
147
147
  }
148
- const be = { class: "debug-result-tabs" }, _e = {
148
+ const _e = { class: "debug-result-tabs" }, ge = {
149
149
  class: "debug-result-tabs__execution",
150
150
  "data-test": "tab-execution"
151
- }, ge = { class: "debug-result-tabs__row" }, fe = { class: "value" }, ye = { class: "debug-result-tabs__row" }, ke = { class: "value" }, we = {
151
+ }, fe = { class: "debug-result-tabs__row" }, ye = { class: "value" }, ke = { class: "debug-result-tabs__row" }, we = { class: "value" }, xe = {
152
152
  key: 0,
153
153
  class: "debug-result-tabs__row is-error"
154
- }, xe = { class: "value" }, Ce = {
154
+ }, Ce = { class: "value" }, Ee = {
155
155
  key: 0,
156
156
  class: "debug-result-tabs__mock-banner",
157
157
  "data-test": "mock-banner"
158
- }, Ee = {
158
+ }, he = {
159
159
  key: 1,
160
160
  class: "debug-result-tabs__error-banner",
161
161
  "data-test": "output-error"
162
- }, he = {
162
+ }, Ve = {
163
163
  key: 0,
164
164
  class: "debug-result-tabs__error-text"
165
- }, Ve = { class: "debug-result-tabs__error-guide" }, Re = {
165
+ }, Re = { class: "debug-result-tabs__error-guide" }, Se = {
166
166
  class: "debug-result-tabs__logs",
167
167
  "data-test": "tab-logs"
168
- }, Se = /* @__PURE__ */ G({
168
+ }, Te = /* @__PURE__ */ z({
169
169
  __name: "result-tabs",
170
170
  props: {
171
171
  result: {},
@@ -173,10 +173,10 @@ const be = { class: "debug-result-tabs" }, _e = {
173
173
  },
174
174
  emits: ["reEditMock", "runReal", "runMock", "logsTabActive"],
175
175
  setup(n, { emit: r }) {
176
- const e = n, l = r, u = S("execution");
177
- U(
176
+ const e = n, a = r, u = R("execution");
177
+ D(
178
178
  u,
179
- (i) => l("logsTabActive", i === "logs"),
179
+ (i) => a("logsTabActive", i === "logs"),
180
180
  { immediate: !0 }
181
181
  );
182
182
  const o = {
@@ -186,47 +186,47 @@ const be = { class: "debug-result-tabs" }, _e = {
186
186
  failed: "失败",
187
187
  suspended: "挂起",
188
188
  skipped: "跳过"
189
- }, b = p(() => o[e.result.execution.status] ?? e.result.execution.status), g = p(() => {
189
+ }, b = v(() => o[e.result.execution.status] ?? e.result.execution.status), g = v(() => {
190
190
  const i = e.result.execution.durationMs;
191
191
  return i == null ? "--" : `${(i / 1e3).toFixed(1)}s`;
192
- }), y = p(() => ve(e.result.error || e.result.execution.errorDetail)), w = p(() => e.result.execution.status === "failed"), E = (i) => Object.entries(i ?? {}).map(([t, d]) => ({ key: t, name: t, value: d })), N = p(() => E(e.result.inputs)), h = p(() => E(e.result.outputs)), x = p(() => e.result.logs == null ? "" : ne(e.result.logs));
192
+ }), y = v(() => be(e.result.error || e.result.execution.errorDetail)), x = v(() => e.result.execution.status === "failed"), M = (i) => Object.entries(i ?? {}).map(([t, c]) => ({ key: t, name: t, value: c })), N = v(() => M(e.result.inputs)), E = v(() => ne(e.result.outputs)), C = v(() => e.result.logs == null ? "" : ae(e.result.logs));
193
193
  return (i, t) => {
194
- const d = $("bk-tab-panel"), s = $("bk-button"), f = $("bk-tab");
195
- return c(), v("div", be, [
196
- m(f, {
194
+ const c = $("bk-tab-panel"), s = $("bk-button"), f = $("bk-tab");
195
+ return d(), m("div", _e, [
196
+ p(f, {
197
197
  active: u.value,
198
- "onUpdate:active": t[3] || (t[3] = (V) => u.value = V),
198
+ "onUpdate:active": t[3] || (t[3] = (h) => u.value = h),
199
199
  type: "card-grid"
200
200
  }, {
201
- default: k(() => [
202
- m(d, {
201
+ default: w(() => [
202
+ p(c, {
203
203
  name: "execution",
204
204
  label: "执行信息"
205
205
  }, {
206
- default: k(() => [
207
- a("div", _e, [
208
- a("div", ge, [
209
- t[4] || (t[4] = a("span", { class: "label" }, "执行状态", -1)),
210
- a("span", fe, R(b.value), 1)
206
+ default: w(() => [
207
+ l("div", ge, [
208
+ l("div", fe, [
209
+ t[4] || (t[4] = l("span", { class: "label" }, "执行状态", -1)),
210
+ l("span", ye, V(b.value), 1)
211
211
  ]),
212
- a("div", ye, [
213
- t[5] || (t[5] = a("span", { class: "label" }, "调试用时", -1)),
214
- a("span", ke, R(g.value), 1)
212
+ l("div", ke, [
213
+ t[5] || (t[5] = l("span", { class: "label" }, "调试用时", -1)),
214
+ l("span", we, V(g.value), 1)
215
215
  ]),
216
- y.value ? (c(), v("div", we, [
217
- t[6] || (t[6] = a("span", { class: "label" }, "错误信息", -1)),
218
- a("span", xe, R(y.value), 1)
216
+ y.value ? (d(), m("div", xe, [
217
+ t[6] || (t[6] = l("span", { class: "label" }, "错误信息", -1)),
218
+ l("span", Ce, V(y.value), 1)
219
219
  ])) : T("", !0)
220
220
  ])
221
221
  ]),
222
222
  _: 1
223
223
  }),
224
- m(d, {
224
+ p(c, {
225
225
  name: "inputs",
226
226
  label: "输入参数"
227
227
  }, {
228
- default: k(() => [
229
- m(D, {
228
+ default: w(() => [
229
+ p(F, {
230
230
  rows: N.value,
231
231
  loading: e.result.loading,
232
232
  error: e.result.detailError,
@@ -235,57 +235,57 @@ const be = { class: "debug-result-tabs" }, _e = {
235
235
  ]),
236
236
  _: 1
237
237
  }),
238
- m(d, {
238
+ p(c, {
239
239
  name: "outputs",
240
240
  label: "输出结果"
241
241
  }, {
242
- default: k(() => [
243
- e.isMock ? (c(), v("div", Ce, [
244
- t[8] || (t[8] = a("span", null, "当前为 Mock 数据", -1)),
245
- m(s, {
242
+ default: w(() => [
243
+ e.isMock ? (d(), m("div", Ee, [
244
+ t[8] || (t[8] = l("span", null, "当前为 Mock 数据", -1)),
245
+ p(s, {
246
246
  text: "",
247
247
  theme: "primary",
248
248
  size: "small",
249
249
  "data-test": "re-edit-mock",
250
- onClick: t[0] || (t[0] = (V) => l("reEditMock"))
250
+ onClick: t[0] || (t[0] = (h) => a("reEditMock"))
251
251
  }, {
252
- default: k(() => [...t[7] || (t[7] = [
252
+ default: w(() => [...t[7] || (t[7] = [
253
253
  L(" 重新编辑 ", -1)
254
254
  ])]),
255
255
  _: 1
256
256
  })
257
257
  ])) : T("", !0),
258
- w.value ? (c(), v("div", Ee, [
259
- y.value ? (c(), v("p", he, R(y.value), 1)) : T("", !0),
260
- a("p", Ve, [
261
- t[11] || (t[11] = a("span", null, "该节点调试失败,可", -1)),
262
- m(s, {
258
+ x.value ? (d(), m("div", he, [
259
+ y.value ? (d(), m("p", Ve, V(y.value), 1)) : T("", !0),
260
+ l("p", Re, [
261
+ t[11] || (t[11] = l("span", null, "该节点调试失败,可", -1)),
262
+ p(s, {
263
263
  text: "",
264
264
  theme: "primary",
265
265
  "data-test": "rerun-real",
266
- onClick: t[1] || (t[1] = (V) => l("runReal"))
266
+ onClick: t[1] || (t[1] = (h) => a("runReal"))
267
267
  }, {
268
- default: k(() => [...t[9] || (t[9] = [
268
+ default: w(() => [...t[9] || (t[9] = [
269
269
  L("重新调试", -1)
270
270
  ])]),
271
271
  _: 1
272
272
  }),
273
- t[12] || (t[12] = a("span", null, "或直接", -1)),
274
- m(s, {
273
+ t[12] || (t[12] = l("span", null, "或直接", -1)),
274
+ p(s, {
275
275
  text: "",
276
276
  theme: "primary",
277
277
  "data-test": "run-mock",
278
- onClick: t[2] || (t[2] = (V) => l("runMock"))
278
+ onClick: t[2] || (t[2] = (h) => a("runMock"))
279
279
  }, {
280
- default: k(() => [...t[10] || (t[10] = [
280
+ default: w(() => [...t[10] || (t[10] = [
281
281
  L("Mock输出", -1)
282
282
  ])]),
283
283
  _: 1
284
284
  })
285
285
  ])
286
- ])) : (c(), F(D, {
286
+ ])) : (d(), G(F, {
287
287
  key: 2,
288
- rows: h.value,
288
+ rows: E.value,
289
289
  loading: e.result.loading,
290
290
  error: e.result.detailError,
291
291
  "empty-text": "暂无输出结果"
@@ -293,14 +293,14 @@ const be = { class: "debug-result-tabs" }, _e = {
293
293
  ]),
294
294
  _: 1
295
295
  }),
296
- m(d, {
296
+ p(c, {
297
297
  name: "logs",
298
298
  label: "调用日志"
299
299
  }, {
300
- default: k(() => [
301
- a("div", Re, [
302
- m(ae, {
303
- "log-text": x.value,
300
+ default: w(() => [
301
+ l("div", Se, [
302
+ p(le, {
303
+ "log-text": C.value,
304
304
  loading: e.result.logLoading,
305
305
  error: e.result.logError
306
306
  }, null, 8, ["log-text", "loading", "error"])
@@ -314,7 +314,7 @@ const be = { class: "debug-result-tabs" }, _e = {
314
314
  ]);
315
315
  };
316
316
  }
317
- }), Me = /* @__PURE__ */ z(Se, [["__scopeId", "data-v-5eca6f4b"]]), Te = {
317
+ }), Me = /* @__PURE__ */ U(Te, [["__scopeId", "data-v-dfee6bc2"]]), Ne = {
318
318
  ExclusiveGateway: "bkflow-canvas-fenzhiwangguan",
319
319
  ParallelGateway: "bkflow-canvas-bingxingwangguan",
320
320
  ConditionalParallelGateway: "bkflow-canvas-tiaojianbingxingwangguan",
@@ -328,7 +328,7 @@ const be = { class: "debug-result-tabs" }, _e = {
328
328
  ConditionalParallelGateway: "条件并行网关",
329
329
  ConvergeGateway: "汇聚网关"
330
330
  };
331
- function Ne(n) {
331
+ function $e(n) {
332
332
  if (!n.component?.code) return "";
333
333
  if (n.component.code === "uniform_api") {
334
334
  const r = n.component.api_meta?.category?.name ?? "";
@@ -336,46 +336,46 @@ function Ne(n) {
336
336
  }
337
337
  return P.bkflow;
338
338
  }
339
- function $e(n, r) {
340
- const e = n?.location?.find((b) => b.id === r), l = e?.icon ?? "", u = n?.activities?.[r];
339
+ function Le(n, r) {
340
+ const e = n?.location?.find((b) => b.id === r), a = e?.icon ?? "", u = n?.activities?.[r];
341
341
  if (u)
342
342
  return {
343
343
  name: !!u.component?.code ? u.name || e?.name || r : "节点未配置",
344
344
  type: u.type || "ServiceActivity",
345
345
  typeName: B[u.type] ?? "任务节点",
346
- icon: Ne(u)
346
+ icon: $e(u)
347
347
  };
348
348
  const o = n?.gateways?.[r];
349
349
  return o ? {
350
350
  name: o.name || e?.name || B[o.type] || r,
351
351
  type: o.type,
352
352
  typeName: B[o.type] ?? "网关",
353
- icon: l || Te[o.type] || ""
353
+ icon: a || Ne[o.type] || ""
354
354
  } : n?.start_event?.id === r ? {
355
355
  name: n.start_event.name || "开始",
356
356
  type: "EmptyStartEvent",
357
357
  typeName: "开始节点",
358
- icon: l || "bkflow-canvas-kaishi"
358
+ icon: a || "bkflow-canvas-kaishi"
359
359
  } : n?.end_event?.id === r ? {
360
360
  name: n.end_event.name || "结束",
361
361
  type: "EmptyEndEvent",
362
362
  typeName: "结束节点",
363
- icon: l || "bkflow-canvas-stop"
363
+ icon: a || "bkflow-canvas-stop"
364
364
  } : e ? {
365
365
  name: e.name || r,
366
366
  type: e.type || "",
367
367
  typeName: "",
368
- icon: l
368
+ icon: a
369
369
  } : { name: r, type: "", typeName: "", icon: "" };
370
370
  }
371
- function Le(n, r, e = /* @__PURE__ */ new Set()) {
372
- const l = n?.activities;
373
- if (!l) return [];
371
+ function Ae(n, r, e = /* @__PURE__ */ new Set()) {
372
+ const a = n?.activities;
373
+ if (!a) return [];
374
374
  const u = new Map(
375
- (r ?? []).map((o) => [o.node_id, le(o.status)])
375
+ (r ?? []).map((o) => [o.node_id, ie(o.status)])
376
376
  );
377
- return Object.values(l).map((o) => {
378
- const b = !!o.component?.code, g = $e(n, o.id);
377
+ return Object.values(a).map((o) => {
378
+ const b = !!o.component?.code, g = Le(n, o.id);
379
379
  return {
380
380
  id: o.id,
381
381
  name: g.name,
@@ -388,7 +388,11 @@ function Le(n, r, e = /* @__PURE__ */ new Set()) {
388
388
  };
389
389
  });
390
390
  }
391
- const Ae = { class: "debug-result-drawer__header" }, Pe = { class: "debug-result-drawer__header-left" }, Be = { class: "debug-result-drawer__body" }, Ge = { class: "debug-result-drawer__content" }, ze = { class: "debug-result-drawer__result" }, De = 44, Ue = /* @__PURE__ */ G({
391
+ const Pe = { class: "debug-result-drawer__header" }, Be = { class: "debug-result-drawer__header-left" }, Ge = { class: "debug-result-drawer__body" }, ze = { class: "debug-result-drawer__content" }, De = { class: "debug-result-drawer__result" }, Ue = {
392
+ key: 1,
393
+ class: "debug-result-drawer__unselected",
394
+ "data-test": "node-unselected"
395
+ }, Fe = 44, Ie = /* @__PURE__ */ z({
392
396
  __name: "index",
393
397
  props: {
394
398
  open: { type: Boolean },
@@ -402,62 +406,70 @@ const Ae = { class: "debug-result-drawer__header" }, Pe = { class: "debug-result
402
406
  },
403
407
  emits: ["update:open", "update:modelValue", "reEditMock", "runReal", "runMock", "viewParams", "logsTabActive"],
404
408
  setup(n, { emit: r }) {
405
- const e = n, l = r, u = S(420), o = S(!1);
406
- let b = 0, g = 0, y = "", w = "";
407
- const E = p(() => ({
408
- height: `${e.open ? u.value : De}px`
409
+ const e = n, a = r, u = R(420), o = R(!1);
410
+ let b = 0, g = 0, y = "", x = "";
411
+ const M = v(() => ({
412
+ height: `${e.open ? u.value : Fe}px`
409
413
  })), N = () => {
410
- l("update:open", !e.open);
411
- }, h = (C) => {
412
- const _ = g - (C.clientY - b);
414
+ a("update:open", !e.open);
415
+ }, E = (k) => {
416
+ const _ = g - (k.clientY - b);
413
417
  u.value = Math.max(200, Math.min(window.innerHeight * 0.8, _));
414
- }, x = () => {
415
- document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", x), document.body.style.cursor = y, document.body.style.userSelect = w, o.value = !1;
416
- }, i = (C) => {
417
- C.preventDefault(), o.value = !0, b = C.clientY, g = u.value, y = document.body.style.cursor, w = document.body.style.userSelect, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", h), document.addEventListener("mouseup", x);
418
+ }, C = () => {
419
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", C), document.body.style.cursor = y, document.body.style.userSelect = x, o.value = !1;
420
+ }, i = (k) => {
421
+ k.preventDefault(), o.value = !0, b = k.clientY, g = u.value, y = document.body.style.cursor, x = document.body.style.userSelect, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", E), document.addEventListener("mouseup", C);
418
422
  };
419
- Q(x);
420
- const t = p({
423
+ Q(C);
424
+ const t = v({
421
425
  get: () => e.modelValue,
422
- set: (C) => l("update:modelValue", C)
423
- }), d = p(
424
- () => Le(e.pipelineTree, e.context?.nodes, e.mockNodeIds)
425
- ), s = p(() => e.mockNodeIds.has(e.modelValue)), f = () => {
426
- !e.hasGlobalRun || e.viewParamsPending || l("viewParams");
427
- }, V = () => {
428
- e.modelValue && l("reEditMock", e.modelValue);
426
+ set: (k) => a("update:modelValue", k)
427
+ });
428
+ D(
429
+ () => e.modelValue,
430
+ (k) => {
431
+ k || a("logsTabActive", !1);
432
+ },
433
+ { immediate: !0 }
434
+ );
435
+ const c = v(
436
+ () => Ae(e.pipelineTree, e.context?.nodes, e.mockNodeIds)
437
+ ), s = v(() => e.mockNodeIds.has(e.modelValue)), f = () => {
438
+ !e.hasGlobalRun || e.viewParamsPending || a("viewParams");
439
+ }, h = () => {
440
+ e.modelValue && a("reEditMock", e.modelValue);
429
441
  }, I = () => {
430
- e.modelValue && l("runReal", e.modelValue);
442
+ e.modelValue && a("runReal", e.modelValue);
431
443
  }, O = () => {
432
- e.modelValue && l("runMock", e.modelValue);
444
+ e.modelValue && a("runMock", e.modelValue);
433
445
  };
434
- return (C, _) => {
446
+ return (k, _) => {
435
447
  const j = $("bk-button"), H = X("bk-tooltips");
436
- return c(), v("div", {
437
- class: M(["debug-result-drawer-wrapper", { "is-resizing": o.value }]),
438
- style: Z(E.value)
448
+ return d(), m("div", {
449
+ class: S(["debug-result-drawer-wrapper", { "is-resizing": o.value }]),
450
+ style: Z(M.value)
439
451
  }, [
440
- e.open ? (c(), v("div", {
452
+ e.open ? (d(), m("div", {
441
453
  key: 0,
442
454
  class: "debug-result-drawer__resize",
443
455
  onMousedown: i
444
456
  }, null, 32)) : T("", !0),
445
- a("section", {
446
- class: M(["debug-result-drawer", { "is-collapsed": !e.open }])
457
+ l("section", {
458
+ class: S(["debug-result-drawer", { "is-collapsed": !e.open }])
447
459
  }, [
448
- a("header", Ae, [
449
- a("div", Pe, [
450
- _[3] || (_[3] = a("span", { class: "debug-result-drawer__title" }, "调试结果", -1)),
451
- _[4] || (_[4] = a("span", { class: "debug-result-drawer__divider" }, null, -1)),
452
- ee((c(), F(j, {
460
+ l("header", Pe, [
461
+ l("div", Be, [
462
+ _[3] || (_[3] = l("span", { class: "debug-result-drawer__title" }, "调试结果", -1)),
463
+ _[4] || (_[4] = l("span", { class: "debug-result-drawer__divider" }, null, -1)),
464
+ ee((d(), G(j, {
453
465
  text: "",
454
466
  theme: "primary",
455
467
  disabled: !e.hasGlobalRun,
456
468
  loading: e.viewParamsPending,
457
469
  onClick: f
458
470
  }, {
459
- default: k(() => [..._[2] || (_[2] = [
460
- a("i", { class: "bkflow-canvas-icon bkflow-canvas-audit view-params-icon" }, null, -1),
471
+ default: w(() => [..._[2] || (_[2] = [
472
+ l("i", { class: "bkflow-canvas-icon bkflow-canvas-audit view-params-icon" }, null, -1),
461
473
  L(" 查看参数 ", -1)
462
474
  ])]),
463
475
  _: 1
@@ -465,32 +477,33 @@ const Ae = { class: "debug-result-drawer__header" }, Pe = { class: "debug-result
465
477
  [H, { content: "请先进行调试", disabled: e.hasGlobalRun }]
466
478
  ])
467
479
  ]),
468
- a("span", {
480
+ l("span", {
469
481
  class: "debug-result-drawer__collapse",
470
482
  onClick: N
471
483
  }, [
472
- a("span", null, R(e.open ? "收起" : "展开"), 1),
473
- a("i", {
474
- class: M(["bkflow-canvas-icon bkflow-canvas-arrows-down debug-result-drawer__collapse-icon", { "is-expanded": e.open }])
484
+ l("span", null, V(e.open ? "收起" : "展开"), 1),
485
+ l("i", {
486
+ class: S(["bkflow-canvas-icon bkflow-canvas-arrows-down debug-result-drawer__collapse-icon", { "is-expanded": e.open }])
475
487
  }, null, 2)
476
488
  ])
477
489
  ]),
478
- a("div", Be, [
479
- a("div", Ge, [
480
- m(pe, {
490
+ l("div", Ge, [
491
+ l("div", ze, [
492
+ p(ve, {
481
493
  modelValue: t.value,
482
494
  "onUpdate:modelValue": _[0] || (_[0] = (A) => t.value = A),
483
- nodes: d.value
495
+ nodes: c.value
484
496
  }, null, 8, ["modelValue", "nodes"]),
485
- a("div", ze, [
486
- m(Me, {
497
+ l("div", De, [
498
+ e.modelValue ? (d(), G(Me, {
499
+ key: 0,
487
500
  result: e.result,
488
501
  "is-mock": s.value,
489
- onReEditMock: V,
502
+ onReEditMock: h,
490
503
  onRunReal: I,
491
504
  onRunMock: O,
492
- onLogsTabActive: _[1] || (_[1] = (A) => l("logsTabActive", A))
493
- }, null, 8, ["result", "is-mock"])
505
+ onLogsTabActive: _[1] || (_[1] = (A) => a("logsTabActive", A))
506
+ }, null, 8, ["result", "is-mock"])) : (d(), m("div", Ue, " 请先选择节点查看执行详情 "))
494
507
  ])
495
508
  ])
496
509
  ])
@@ -498,7 +511,7 @@ const Ae = { class: "debug-result-drawer__header" }, Pe = { class: "debug-result
498
511
  ], 6);
499
512
  };
500
513
  }
501
- }), je = /* @__PURE__ */ z(Ue, [["__scopeId", "data-v-d1a8cf95"]]);
514
+ }), Ye = /* @__PURE__ */ U(Ie, [["__scopeId", "data-v-dcc6149f"]]);
502
515
  export {
503
- je as default
516
+ Ye as default
504
517
  };