@blueking/bkflow-canvas-editor 1.1.0-beta.18 → 1.1.0-beta.19

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