@kong-ui-public/entities-shared 2.11.1-pr.1261.c31c7657.0 → 2.12.0
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,4 +1,4 @@
|
|
|
1
|
-
import { inject as In, ref as R, unref as I, computed as
|
|
1
|
+
import { inject as In, ref as R, unref as I, computed as A, watch as Ae, defineComponent as H, openBlock as h, createBlock as K, resolveDynamicComponent as ge, normalizeClass as ue, withCtx as x, createElementBlock as S, createElementVNode as L, toDisplayString as O, createCommentVNode as D, Fragment as le, renderList as ie, resolveComponent as B, createVNode as N, createTextVNode as Y, useCssVars as Tt, useSlots as Ge, renderSlot as V, createSlots as _e, normalizeProps as En, guardReactiveProps as Tn, mergeProps as Fn, normalizeStyle as Fe, pushScopeId as Oe, popScopeId as $e, onBeforeMount as Ft, withModifiers as He, onMounted as On, onUnmounted as $n, withDirectives as pe, vShow as he, withKeys as Ln, Teleport as Nn } from "vue";
|
|
2
2
|
import ot from "axios";
|
|
3
3
|
import { createI18n as Bn, i18nTComponent as Rn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Kn } from "@kong/kongponents";
|
|
@@ -201,8 +201,8 @@ function Ot() {
|
|
|
201
201
|
return !1;
|
|
202
202
|
const l = /* @__PURE__ */ new Set([...a, ...o]);
|
|
203
203
|
for (const s of l) {
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
204
|
+
const u = a.filter((c) => c === s).length, d = o.filter((c) => c === s).length;
|
|
205
|
+
if (u !== d)
|
|
206
206
|
return !1;
|
|
207
207
|
}
|
|
208
208
|
return !0;
|
|
@@ -233,8 +233,8 @@ function Ot() {
|
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
235
|
sortAlpha: (a) => (o, l) => {
|
|
236
|
-
let s = o[a] === void 0 || o[a] === null ? "" : o[a],
|
|
237
|
-
return Array.isArray(o[a]) && (s = o[a][0]), Array.isArray(l[a]) && (
|
|
236
|
+
let s = o[a] === void 0 || o[a] === null ? "" : o[a], u = l[a] === void 0 || l[a] === null ? "" : l[a];
|
|
237
|
+
return Array.isArray(o[a]) && (s = o[a][0]), Array.isArray(l[a]) && (u = l[a][0]), s.localeCompare(u);
|
|
238
238
|
},
|
|
239
239
|
isValidUuid: (a) => a ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(a) : !1
|
|
240
240
|
};
|
|
@@ -243,82 +243,82 @@ function tr(e, t, n, r = {
|
|
|
243
243
|
fetchedItemsKey: "data",
|
|
244
244
|
searchKeys: ["id"]
|
|
245
245
|
}) {
|
|
246
|
-
n || (n = "
|
|
246
|
+
n || (n = "100");
|
|
247
247
|
const { axiosInstance: i } = Ze({
|
|
248
248
|
headers: e.requestHeaders
|
|
249
|
-
}), { i18n: { t: a } } = Qe(), { debounce: o } = qn(), l = o(async (
|
|
250
|
-
await ee(
|
|
251
|
-
}, 200), s = R(!1),
|
|
252
|
-
let
|
|
253
|
-
e.app === "konnect" ?
|
|
254
|
-
const { isValidUuid:
|
|
249
|
+
}), { i18n: { t: a } } = Qe(), { debounce: o } = qn(), l = o(async (m) => {
|
|
250
|
+
await ee(m);
|
|
251
|
+
}, 200), s = R(!1), u = R(""), d = R(""), c = R([]), p = R([]), f = R(void 0), b = I(t);
|
|
252
|
+
let g = `${e.apiBaseUrl}${b}`;
|
|
253
|
+
e.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
254
|
+
const { isValidUuid: _ } = Ot(), M = async () => {
|
|
255
255
|
try {
|
|
256
256
|
s.value = !0;
|
|
257
|
-
const { data:
|
|
258
|
-
|
|
257
|
+
const { data: m } = await i.get(`${g}?size=${n}`);
|
|
258
|
+
m != null && m.next || (f.value = r.fetchedItemsKey in m ? m[r.fetchedItemsKey] : []), p.value = r.fetchedItemsKey in m ? m[r.fetchedItemsKey] : [], c.value = p.value;
|
|
259
259
|
} catch {
|
|
260
|
-
|
|
260
|
+
c.value = [], u.value = a("debouncedFilter.errors.fetch");
|
|
261
261
|
} finally {
|
|
262
262
|
s.value = !1;
|
|
263
263
|
}
|
|
264
|
-
}, E = R(""), ee = async (
|
|
265
|
-
var
|
|
266
|
-
if (E.value !==
|
|
267
|
-
if (E.value =
|
|
264
|
+
}, E = R(""), ee = async (m) => {
|
|
265
|
+
var v, y, $;
|
|
266
|
+
if (E.value !== m)
|
|
267
|
+
if (E.value = m || "", f.value === void 0)
|
|
268
268
|
try {
|
|
269
|
-
if (s.value = !0,
|
|
270
|
-
let F =
|
|
271
|
-
|
|
272
|
-
const { data:
|
|
273
|
-
r.fetchedItemsKey in
|
|
274
|
-
} else if (
|
|
269
|
+
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
270
|
+
let F = g + "";
|
|
271
|
+
m && (F += `/${m}`);
|
|
272
|
+
const { data: k } = await i.get(`${F}?size=${n}`);
|
|
273
|
+
r.fetchedItemsKey in k ? c.value = k[r.fetchedItemsKey] : k != null && k.id ? c.value = [k] : c.value = [];
|
|
274
|
+
} else if (m) {
|
|
275
275
|
const F = [];
|
|
276
|
-
|
|
277
|
-
const { data: T } = await i.get(`${
|
|
276
|
+
_(m) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
277
|
+
const { data: T } = await i.get(`${g}/${m}`);
|
|
278
278
|
return [T[r.fetchedItemsKey] ?? T];
|
|
279
279
|
})()) : F.push(
|
|
280
280
|
...r.searchKeys.filter((T) => T !== "id").map(async (T) => {
|
|
281
|
-
const { data: w } = await i.get(`${
|
|
281
|
+
const { data: w } = await i.get(`${g}?${T}=${m}`);
|
|
282
282
|
return w[r.fetchedItemsKey];
|
|
283
283
|
})
|
|
284
284
|
);
|
|
285
|
-
const
|
|
286
|
-
|
|
285
|
+
const k = await Promise.all(F), j = /* @__PURE__ */ new Set();
|
|
286
|
+
c.value = [], (v = k == null ? void 0 : k.forEach) == null || v.call(k, (T) => {
|
|
287
287
|
var w;
|
|
288
288
|
(w = T == null ? void 0 : T.forEach) == null || w.call(T, (U) => {
|
|
289
|
-
j.has(U.id) || (j.add(U.id),
|
|
289
|
+
j.has(U.id) || (j.add(U.id), c.value.push(U));
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
292
|
} else
|
|
293
|
-
|
|
293
|
+
c.value = p.value;
|
|
294
294
|
} catch (F) {
|
|
295
|
-
((
|
|
295
|
+
((y = F == null ? void 0 : F.response) == null ? void 0 : y.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (c.value = [], u.value = a("debouncedFilter.errors.fetch"));
|
|
296
296
|
} finally {
|
|
297
297
|
s.value = !1;
|
|
298
298
|
}
|
|
299
299
|
else
|
|
300
|
-
s.value = !0, d.value = "",
|
|
300
|
+
s.value = !0, d.value = "", m ? (c.value = ($ = f.value) == null ? void 0 : $.filter((F) => {
|
|
301
301
|
var j;
|
|
302
|
-
let
|
|
302
|
+
let k = !1;
|
|
303
303
|
for (const T of r.searchKeys) {
|
|
304
304
|
const w = typeof F[T] == "string" ? (j = F[T]) == null ? void 0 : j.toLowerCase() : F[T];
|
|
305
|
-
w != null && w.includes(
|
|
305
|
+
w != null && w.includes(m.toLowerCase()) && (k = !0);
|
|
306
306
|
}
|
|
307
|
-
return
|
|
308
|
-
}), (!
|
|
307
|
+
return k;
|
|
308
|
+
}), (!c.value || !c.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : c.value = f.value, s.value = !1;
|
|
309
309
|
};
|
|
310
310
|
return {
|
|
311
311
|
loading: s,
|
|
312
|
-
error:
|
|
312
|
+
error: u,
|
|
313
313
|
validationError: d,
|
|
314
|
-
results:
|
|
314
|
+
results: c,
|
|
315
315
|
allRecords: f,
|
|
316
316
|
loadItems: M,
|
|
317
317
|
debouncedQueryChange: l
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
320
|
function nr(e, t) {
|
|
321
|
-
const n = I(t), r =
|
|
321
|
+
const n = I(t), r = A(
|
|
322
322
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
323
323
|
);
|
|
324
324
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
@@ -365,64 +365,70 @@ function ir(e) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
function $t(e, t) {
|
|
368
|
-
const n = R(I(e)), r = R(I(t)), i =
|
|
368
|
+
const n = R(I(e)), r = R(I(t)), i = A(
|
|
369
369
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
370
|
-
), a =
|
|
370
|
+
), a = A(
|
|
371
371
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
372
372
|
);
|
|
373
373
|
return (o) => {
|
|
374
|
-
const { page: l, pageSize: s, offset:
|
|
374
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: p } = o;
|
|
375
375
|
try {
|
|
376
376
|
let f = new URL(a.value.href);
|
|
377
|
-
return i.value &&
|
|
378
|
-
f.searchParams.append(
|
|
379
|
-
}), d && f.searchParams.append("sort_by", d),
|
|
377
|
+
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}/`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((b, g) => {
|
|
378
|
+
f.searchParams.append(g, b);
|
|
379
|
+
}), d && f.searchParams.append("sort_by", d), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
380
380
|
} catch (f) {
|
|
381
381
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
385
|
function ar(e, t, n = "data") {
|
|
386
|
+
var s;
|
|
386
387
|
const r = I(t), { axiosInstance: i } = Ze({
|
|
387
|
-
|
|
388
|
+
...e.axiosRequestConfig,
|
|
389
|
+
headers: { ...(s = e.axiosRequestConfig) == null ? void 0 : s.headers, ...e.requestHeaders }
|
|
388
390
|
}), a = $t(e, r), o = R({
|
|
389
391
|
status: ve.Idle
|
|
390
392
|
});
|
|
391
|
-
return { fetcher: async (
|
|
393
|
+
return { fetcher: async (u) => {
|
|
394
|
+
var d;
|
|
392
395
|
try {
|
|
393
396
|
o.value = { status: ve.Loading };
|
|
394
|
-
let c = a(
|
|
395
|
-
c.includes("filter[name]") && (c = `${c}&page[size]=${
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
const f =
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
397
|
+
let c = a(u);
|
|
398
|
+
c.includes("filter[name]") && (c = `${c}&page[size]=${u.pageSize}&page[number]=${u.page}`);
|
|
399
|
+
const p = await i.get(c);
|
|
400
|
+
if (p.status >= 400)
|
|
401
|
+
throw p;
|
|
402
|
+
const f = p.data, b = n && n.replace(/[^\w-_]/gi, "");
|
|
403
|
+
let g;
|
|
404
|
+
f[b] && Array.isArray(f[b]) ? g = f[b] : Array.isArray(f) ? g = f : g = Object.keys(f).length ? [f] : [];
|
|
405
|
+
const _ = {
|
|
406
|
+
data: g,
|
|
407
|
+
total: g.length,
|
|
408
|
+
...f.offset ? {
|
|
403
409
|
pagination: {
|
|
404
|
-
offset:
|
|
410
|
+
offset: f.offset
|
|
405
411
|
}
|
|
406
412
|
} : null
|
|
407
413
|
};
|
|
408
414
|
return o.value = {
|
|
409
415
|
status: ve.Idle,
|
|
410
|
-
response:
|
|
411
|
-
},
|
|
416
|
+
response: _
|
|
417
|
+
}, _;
|
|
412
418
|
} catch (c) {
|
|
413
|
-
const
|
|
419
|
+
const p = {
|
|
414
420
|
data: [],
|
|
415
421
|
total: 0
|
|
416
422
|
};
|
|
417
|
-
return
|
|
423
|
+
return u.query && (((d = c.response) == null ? void 0 : d.status) === 404 || c.status === 404) ? (o.value = {
|
|
418
424
|
status: ve.NoResults,
|
|
419
|
-
response:
|
|
420
|
-
error: c
|
|
421
|
-
},
|
|
425
|
+
response: p,
|
|
426
|
+
error: c.response ? c : { response: c }
|
|
427
|
+
}, p) : (o.value = {
|
|
422
428
|
status: ve.Error,
|
|
423
|
-
response:
|
|
424
|
-
error: c
|
|
425
|
-
},
|
|
429
|
+
response: p,
|
|
430
|
+
error: c.response ? c : { response: c }
|
|
431
|
+
}, p);
|
|
426
432
|
}
|
|
427
433
|
}, fetcherState: o };
|
|
428
434
|
}
|
|
@@ -493,7 +499,7 @@ function pr(e) {
|
|
|
493
499
|
return Ae(e, (a) => {
|
|
494
500
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
495
501
|
}), {
|
|
496
|
-
isTruncated:
|
|
502
|
+
isTruncated: A(() => t.value < n.value)
|
|
497
503
|
};
|
|
498
504
|
}
|
|
499
505
|
const z = {
|
|
@@ -529,22 +535,22 @@ const z = {
|
|
|
529
535
|
}
|
|
530
536
|
},
|
|
531
537
|
setup(e) {
|
|
532
|
-
const t = e, { i18n: { t: n } } = z.useI18n(), { convertKeyToTitle: r } = z.useStringHelpers(), i =
|
|
538
|
+
const t = e, { i18n: { t: n } } = z.useI18n(), { convertKeyToTitle: r } = z.useStringHelpers(), i = A(() => t.item.key ?? "json-array-item"), a = A(() => t.item.value ?? t.item), o = A(() => {
|
|
533
539
|
const s = JSON.parse(JSON.stringify(a.value));
|
|
534
540
|
return t.isArrayItem && delete s.name, s;
|
|
535
|
-
}), l =
|
|
541
|
+
}), l = A(() => {
|
|
536
542
|
var s;
|
|
537
543
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
538
544
|
});
|
|
539
|
-
return (s,
|
|
545
|
+
return (s, u) => (h(), K(ge(e.isArrayItem ? "fieldset" : "div"), {
|
|
540
546
|
class: ue(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
541
547
|
}, {
|
|
542
|
-
default:
|
|
543
|
-
e.isArrayItem ? (
|
|
548
|
+
default: x(() => [
|
|
549
|
+
e.isArrayItem ? (h(), S("legend", hr, [
|
|
544
550
|
L("b", null, O(l.value), 1)
|
|
545
551
|
])) : D("", !0),
|
|
546
|
-
(
|
|
547
|
-
key: `${i.value}-property-${
|
|
552
|
+
(h(!0), S(le, null, ie(Object.keys(o.value), (d, c) => (h(), K(Rt, {
|
|
553
|
+
key: `${i.value}-property-${c}`,
|
|
548
554
|
item: {
|
|
549
555
|
key: d,
|
|
550
556
|
label: I(r)(d),
|
|
@@ -573,13 +579,13 @@ const z = {
|
|
|
573
579
|
const { i18n: { t } } = z.useI18n();
|
|
574
580
|
return (n, r) => {
|
|
575
581
|
const i = B("KButton");
|
|
576
|
-
return
|
|
582
|
+
return h(), S("div", null, [
|
|
577
583
|
N(i, {
|
|
578
584
|
appearance: "tertiary",
|
|
579
585
|
class: "navigation-button",
|
|
580
586
|
onClick: r[0] || (r[0] = (a) => n.$emit("navigation-click", e.item))
|
|
581
587
|
}, {
|
|
582
|
-
default:
|
|
588
|
+
default: x(() => [
|
|
583
589
|
Y(O(e.item.value || I(t)("baseConfigCard.commonFields.link")), 1)
|
|
584
590
|
]),
|
|
585
591
|
_: 1
|
|
@@ -599,10 +605,10 @@ const z = {
|
|
|
599
605
|
const { i18n: { t } } = z.useI18n();
|
|
600
606
|
return (n, r) => {
|
|
601
607
|
const i = B("KBadge");
|
|
602
|
-
return
|
|
608
|
+
return h(), K(i, {
|
|
603
609
|
appearance: e.status ? "success" : "neutral"
|
|
604
610
|
}, {
|
|
605
|
-
default:
|
|
611
|
+
default: x(() => [
|
|
606
612
|
Y(O(e.status ? I(t)("baseConfigCard.statusBadge.enabledLabel") : I(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
607
613
|
]),
|
|
608
614
|
_: 1
|
|
@@ -632,13 +638,13 @@ const z = {
|
|
|
632
638
|
},
|
|
633
639
|
emits: ["navigation-click"],
|
|
634
640
|
setup(e, { emit: t }) {
|
|
635
|
-
Tt((
|
|
641
|
+
Tt((b) => ({
|
|
636
642
|
"07753575": d.value ? "none" : `solid ${I(Ar)} ${I(xr)}`,
|
|
637
|
-
"32d44ea8":
|
|
638
|
-
"5036b738":
|
|
639
|
-
"5038fd13":
|
|
643
|
+
"32d44ea8": u.value && l.value ? "block" : "flex",
|
|
644
|
+
"5036b738": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
645
|
+
"5038fd13": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
640
646
|
}));
|
|
641
|
-
const n = e, r = t, i = Ge(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l =
|
|
647
|
+
const n = e, r = t, i = Ge(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l = A(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = A(() => !!(n.item.tooltip || i["label-tooltip"])), u = A(() => n.item.type === P.Json || n.item.type === P.JsonArray), d = A(() => n.item.type === P.JsonArray), c = A(() => {
|
|
642
648
|
switch (n.item.type) {
|
|
643
649
|
case P.ID:
|
|
644
650
|
return {
|
|
@@ -708,8 +714,8 @@ const z = {
|
|
|
708
714
|
attrs: {
|
|
709
715
|
"data-testid": `${n.item.key}-internal-link`,
|
|
710
716
|
item: n.item,
|
|
711
|
-
onNavigationClick: (
|
|
712
|
-
r("navigation-click",
|
|
717
|
+
onNavigationClick: (b) => {
|
|
718
|
+
r("navigation-click", b);
|
|
713
719
|
}
|
|
714
720
|
}
|
|
715
721
|
};
|
|
@@ -748,28 +754,28 @@ const z = {
|
|
|
748
754
|
text: n.item.value
|
|
749
755
|
};
|
|
750
756
|
}
|
|
751
|
-
}),
|
|
752
|
-
return (
|
|
753
|
-
const
|
|
754
|
-
return
|
|
757
|
+
}), p = R(), { isTruncated: f } = z.useTruncationDetector(p);
|
|
758
|
+
return (b, g) => {
|
|
759
|
+
const _ = B("KLabel"), M = B("KBadge"), E = B("KCopy"), ee = B("KTooltip");
|
|
760
|
+
return h(), S("div", Ir, [
|
|
755
761
|
L("div", {
|
|
756
762
|
class: "config-card-details-label",
|
|
757
763
|
"data-testid": `${e.item.key}-label`
|
|
758
764
|
}, [
|
|
759
|
-
V(
|
|
760
|
-
N(
|
|
761
|
-
default:
|
|
765
|
+
V(b.$slots, "label", { item: e.item }, () => [
|
|
766
|
+
N(_, { "tooltip-attributes": { maxWidth: "500px" } }, _e({
|
|
767
|
+
default: x(() => [
|
|
762
768
|
Y(O(e.item.label) + " ", 1)
|
|
763
769
|
]),
|
|
764
770
|
_: 2
|
|
765
771
|
}, [
|
|
766
772
|
s.value ? {
|
|
767
773
|
name: "tooltip",
|
|
768
|
-
fn:
|
|
774
|
+
fn: x(() => [
|
|
769
775
|
L("div", {
|
|
770
776
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
771
777
|
}, [
|
|
772
|
-
V(
|
|
778
|
+
V(b.$slots, "label-tooltip", {}, () => [
|
|
773
779
|
Y(O(e.item.tooltip), 1)
|
|
774
780
|
], !0)
|
|
775
781
|
], 8, Tr)
|
|
@@ -783,83 +789,83 @@ const z = {
|
|
|
783
789
|
class: "config-card-details-value",
|
|
784
790
|
"data-testid": `${e.item.key}-property-value`
|
|
785
791
|
}, [
|
|
786
|
-
V(
|
|
792
|
+
V(b.$slots, e.item.key, {
|
|
787
793
|
rowValue: e.item.value
|
|
788
794
|
}, () => [
|
|
789
|
-
l.value ? (
|
|
790
|
-
(
|
|
791
|
-
default:
|
|
792
|
-
|
|
795
|
+
l.value ? (h(), S("div", $r, [
|
|
796
|
+
(h(), K(ge(c.value.tag), En(Tn(c.value.attrs)), {
|
|
797
|
+
default: x(() => [
|
|
798
|
+
c.value.additionalComponent === "KBadge" ? (h(), S("div", {
|
|
793
799
|
key: 0,
|
|
794
800
|
"data-testid": `${e.item.key}-badge-tags`
|
|
795
801
|
}, [
|
|
796
|
-
(
|
|
797
|
-
key: `${e.item.key}-badge-tag-${
|
|
802
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(M, {
|
|
803
|
+
key: `${e.item.key}-badge-tag-${v}`,
|
|
798
804
|
class: "config-badge",
|
|
799
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
800
|
-
tooltip:
|
|
805
|
+
"data-testid": `${e.item.key}-badge-tag-${v}`,
|
|
806
|
+
tooltip: m,
|
|
801
807
|
"truncation-tooltip": ""
|
|
802
808
|
}, {
|
|
803
|
-
default:
|
|
804
|
-
Y(O(
|
|
809
|
+
default: x(() => [
|
|
810
|
+
Y(O(m), 1)
|
|
805
811
|
]),
|
|
806
812
|
_: 2
|
|
807
813
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
808
814
|
], 8, Lr)) : D("", !0),
|
|
809
|
-
|
|
815
|
+
c.value.additionalComponent === "KCopy" ? (h(), S("div", {
|
|
810
816
|
key: 1,
|
|
811
817
|
class: "copy-uuid-array",
|
|
812
818
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
813
819
|
}, [
|
|
814
|
-
(
|
|
815
|
-
key: `${e.item.key}-copy-uuid-${
|
|
816
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
817
|
-
text:
|
|
820
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(E, Fn(c.value.childAttrs, {
|
|
821
|
+
key: `${e.item.key}-copy-uuid-${v}`,
|
|
822
|
+
"data-testid": `${e.item.key}-copy-uuid-${v}`,
|
|
823
|
+
text: m
|
|
818
824
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
819
|
-
], 8, Nr)) :
|
|
825
|
+
], 8, Nr)) : c.value.additionalComponent === "KMethodBadge" ? (h(), S("div", {
|
|
820
826
|
key: 2,
|
|
821
827
|
class: "method-badge-array",
|
|
822
828
|
"data-testid": `${e.item.key}-badge-methods`
|
|
823
829
|
}, [
|
|
824
|
-
(
|
|
825
|
-
key: `${e.item.key}-badge-method-${
|
|
826
|
-
appearance: Object.values(I(Kn)).includes(
|
|
830
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(M, {
|
|
831
|
+
key: `${e.item.key}-badge-method-${v}`,
|
|
832
|
+
appearance: Object.values(I(Kn)).includes(m.toLowerCase()) ? m.toLowerCase() : "custom",
|
|
827
833
|
class: "config-badge",
|
|
828
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
834
|
+
"data-testid": `${e.item.key}-badge-method-${v}`
|
|
829
835
|
}, {
|
|
830
|
-
default:
|
|
831
|
-
Y(O(
|
|
836
|
+
default: x(() => [
|
|
837
|
+
Y(O(m), 1)
|
|
832
838
|
]),
|
|
833
839
|
_: 2
|
|
834
840
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
835
841
|
], 8, Br)) : D("", !0),
|
|
836
|
-
|
|
842
|
+
c.value.additionalComponent === "JsonCardItem" ? (h(), S("div", {
|
|
837
843
|
key: 3,
|
|
838
844
|
"data-testid": `${n.item.key}-json-array-content`
|
|
839
845
|
}, [
|
|
840
|
-
(
|
|
841
|
-
key: `json-array-item-${
|
|
842
|
-
index:
|
|
846
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(Bt, {
|
|
847
|
+
key: `json-array-item-${v}`,
|
|
848
|
+
index: v,
|
|
843
849
|
"is-array-item": "",
|
|
844
|
-
item:
|
|
850
|
+
item: m
|
|
845
851
|
}, null, 8, ["index", "item"]))), 128))
|
|
846
|
-
], 8, Rr)) : (
|
|
852
|
+
], 8, Rr)) : (h(), K(ee, {
|
|
847
853
|
key: 4,
|
|
848
854
|
text: I(f) ? e.item.value : ""
|
|
849
855
|
}, {
|
|
850
|
-
default:
|
|
856
|
+
default: x(() => [
|
|
851
857
|
L("span", {
|
|
852
858
|
ref_key: "textContent",
|
|
853
|
-
ref:
|
|
859
|
+
ref: p,
|
|
854
860
|
class: ue(["attrs-data-text", { truncated: e.truncated }])
|
|
855
|
-
}, O(
|
|
861
|
+
}, O(c.value.text), 3)
|
|
856
862
|
]),
|
|
857
863
|
_: 1
|
|
858
864
|
}, 8, ["text"]))
|
|
859
865
|
]),
|
|
860
866
|
_: 1
|
|
861
867
|
}, 16))
|
|
862
|
-
])) : (
|
|
868
|
+
])) : (h(), S("div", {
|
|
863
869
|
key: 0,
|
|
864
870
|
"data-testid": `${e.item.key}-no-value`
|
|
865
871
|
}, " – ", 8, Or))
|
|
@@ -902,7 +908,7 @@ const z = {
|
|
|
902
908
|
Tt((i) => ({
|
|
903
909
|
"954d3eca": `${r.value}ch`
|
|
904
910
|
}));
|
|
905
|
-
const t = e, n =
|
|
911
|
+
const t = e, n = A(() => t.jsonRecord), r = A(() => {
|
|
906
912
|
var o;
|
|
907
913
|
if (!t.fetcherUrl)
|
|
908
914
|
return 0;
|
|
@@ -911,12 +917,12 @@ const z = {
|
|
|
911
917
|
});
|
|
912
918
|
return (i, a) => {
|
|
913
919
|
const o = B("KBadge"), l = B("KCodeBlock");
|
|
914
|
-
return
|
|
915
|
-
t.fetcherUrl ? (
|
|
920
|
+
return h(), S("div", Dr, [
|
|
921
|
+
t.fetcherUrl ? (h(), S("div", jr, [
|
|
916
922
|
N(o, {
|
|
917
923
|
appearance: t.requestMethod
|
|
918
924
|
}, {
|
|
919
|
-
default:
|
|
925
|
+
default: x(() => [
|
|
920
926
|
Y(O(t.requestMethod), 1)
|
|
921
927
|
]),
|
|
922
928
|
_: 1
|
|
@@ -929,7 +935,7 @@ const z = {
|
|
|
929
935
|
theme: "dark"
|
|
930
936
|
}, null, 8, ["code"])
|
|
931
937
|
])) : D("", !0),
|
|
932
|
-
t.jsonRecord ? (
|
|
938
|
+
t.jsonRecord ? (h(), K(l, {
|
|
933
939
|
key: 1,
|
|
934
940
|
id: "json-codeblock",
|
|
935
941
|
class: ue({ "json-content": t.fetcherUrl }),
|
|
@@ -1008,26 +1014,26 @@ function Qr(e, t) {
|
|
|
1008
1014
|
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], a, o = -1; a = n.exec(e.buffer); )
|
|
1009
1015
|
i.push(a.index), r.push(a.index + a[0].length), e.position <= a.index && o < 0 && (o = r.length - 2);
|
|
1010
1016
|
o < 0 && (o = r.length - 1);
|
|
1011
|
-
var l = "", s,
|
|
1017
|
+
var l = "", s, u, d = Math.min(e.line + t.linesAfter, i.length).toString().length, c = t.maxLength - (t.indent + d + 3);
|
|
1012
1018
|
for (s = 1; s <= t.linesBefore && !(o - s < 0); s++)
|
|
1013
|
-
|
|
1019
|
+
u = Ue(
|
|
1014
1020
|
e.buffer,
|
|
1015
1021
|
r[o - s],
|
|
1016
1022
|
i[o - s],
|
|
1017
1023
|
e.position - (r[o] - r[o - s]),
|
|
1018
|
-
|
|
1019
|
-
), l = G.repeat(" ", t.indent) + qe((e.line - s + 1).toString(), d) + " | " +
|
|
1024
|
+
c
|
|
1025
|
+
), l = G.repeat(" ", t.indent) + qe((e.line - s + 1).toString(), d) + " | " + u.str + `
|
|
1020
1026
|
` + l;
|
|
1021
|
-
for (
|
|
1022
|
-
`, l += G.repeat("-", t.indent + d + 3 +
|
|
1027
|
+
for (u = Ue(e.buffer, r[o], i[o], e.position, c), l += G.repeat(" ", t.indent) + qe((e.line + 1).toString(), d) + " | " + u.str + `
|
|
1028
|
+
`, l += G.repeat("-", t.indent + d + 3 + u.pos) + `^
|
|
1023
1029
|
`, s = 1; s <= t.linesAfter && !(o + s >= i.length); s++)
|
|
1024
|
-
|
|
1030
|
+
u = Ue(
|
|
1025
1031
|
e.buffer,
|
|
1026
1032
|
r[o + s],
|
|
1027
1033
|
i[o + s],
|
|
1028
1034
|
e.position - (r[o] - r[o + s]),
|
|
1029
|
-
|
|
1030
|
-
), l += G.repeat(" ", t.indent) + qe((e.line + s + 1).toString(), d) + " | " +
|
|
1035
|
+
c
|
|
1036
|
+
), l += G.repeat(" ", t.indent) + qe((e.line + s + 1).toString(), d) + " | " + u.str + `
|
|
1031
1037
|
`;
|
|
1032
1038
|
return l.replace(/\n$/, "");
|
|
1033
1039
|
}
|
|
@@ -1384,7 +1390,7 @@ function ki(e) {
|
|
|
1384
1390
|
return e === null ? !1 : Zt.exec(e) !== null || Qt.exec(e) !== null;
|
|
1385
1391
|
}
|
|
1386
1392
|
function Ai(e) {
|
|
1387
|
-
var t, n, r, i, a, o, l, s = 0,
|
|
1393
|
+
var t, n, r, i, a, o, l, s = 0, u = null, d, c, p;
|
|
1388
1394
|
if (t = Zt.exec(e), t === null && (t = Qt.exec(e)), t === null)
|
|
1389
1395
|
throw new Error("Date resolve error");
|
|
1390
1396
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
@@ -1394,7 +1400,7 @@ function Ai(e) {
|
|
|
1394
1400
|
s += "0";
|
|
1395
1401
|
s = +s;
|
|
1396
1402
|
}
|
|
1397
|
-
return t[9] && (d = +t[10],
|
|
1403
|
+
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)), p = new Date(Date.UTC(n, r, i, a, o, l, s)), u && p.setTime(p.getTime() - u), p;
|
|
1398
1404
|
}
|
|
1399
1405
|
function wi(e) {
|
|
1400
1406
|
return e.toISOString();
|
|
@@ -1621,14 +1627,14 @@ function vt(e, t, n, r) {
|
|
|
1621
1627
|
a = i[o], de.call(t, a) || (t[a] = n[a], r[a] = !0);
|
|
1622
1628
|
}
|
|
1623
1629
|
function Ce(e, t, n, r, i, a, o, l, s) {
|
|
1624
|
-
var
|
|
1630
|
+
var u, d;
|
|
1625
1631
|
if (Array.isArray(i))
|
|
1626
|
-
for (i = Array.prototype.slice.call(i),
|
|
1627
|
-
Array.isArray(i[
|
|
1632
|
+
for (i = Array.prototype.slice.call(i), u = 0, d = i.length; u < d; u += 1)
|
|
1633
|
+
Array.isArray(i[u]) && C(e, "nested arrays are not supported inside keys"), typeof i == "object" && mt(i[u]) === "[object Object]" && (i[u] = "[object Object]");
|
|
1628
1634
|
if (typeof i == "object" && mt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1629
1635
|
if (Array.isArray(a))
|
|
1630
|
-
for (
|
|
1631
|
-
vt(e, t, a[
|
|
1636
|
+
for (u = 0, d = a.length; u < d; u += 1)
|
|
1637
|
+
vt(e, t, a[u], n);
|
|
1632
1638
|
else
|
|
1633
1639
|
vt(e, t, a, n);
|
|
1634
1640
|
else
|
|
@@ -1669,7 +1675,7 @@ function nt(e, t) {
|
|
|
1669
1675
|
`, t - 1));
|
|
1670
1676
|
}
|
|
1671
1677
|
function Gi(e, t, n) {
|
|
1672
|
-
var r, i, a, o, l, s,
|
|
1678
|
+
var r, i, a, o, l, s, u, d, c = e.kind, p = e.result, f;
|
|
1673
1679
|
if (f = e.input.charCodeAt(e.position), te(f) || xe(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), te(i) || n && xe(i)))
|
|
1674
1680
|
return !1;
|
|
1675
1681
|
for (e.kind = "scalar", e.result = "", a = o = e.position, l = !1; f !== 0; ) {
|
|
@@ -1683,17 +1689,17 @@ function Gi(e, t, n) {
|
|
|
1683
1689
|
if (e.position === e.lineStart && De(e) || n && xe(f))
|
|
1684
1690
|
break;
|
|
1685
1691
|
if (ae(f))
|
|
1686
|
-
if (s = e.line,
|
|
1692
|
+
if (s = e.line, u = e.lineStart, d = e.lineIndent, W(e, !1, -1), e.lineIndent >= t) {
|
|
1687
1693
|
l = !0, f = e.input.charCodeAt(e.position);
|
|
1688
1694
|
continue;
|
|
1689
1695
|
} else {
|
|
1690
|
-
e.position = o, e.line = s, e.lineStart =
|
|
1696
|
+
e.position = o, e.line = s, e.lineStart = u, e.lineIndent = d;
|
|
1691
1697
|
break;
|
|
1692
1698
|
}
|
|
1693
1699
|
}
|
|
1694
1700
|
l && (ce(e, a, o, !1), nt(e, e.line - s), a = o = e.position, l = !1), me(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1695
1701
|
}
|
|
1696
|
-
return ce(e, a, o, !1), e.result ? !0 : (e.kind =
|
|
1702
|
+
return ce(e, a, o, !1), e.result ? !0 : (e.kind = c, e.result = p, !1);
|
|
1697
1703
|
}
|
|
1698
1704
|
function Zi(e, t) {
|
|
1699
1705
|
var n, r, i;
|
|
@@ -1734,7 +1740,7 @@ function Qi(e, t) {
|
|
|
1734
1740
|
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
1735
1741
|
}
|
|
1736
1742
|
function Xi(e, t) {
|
|
1737
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor,
|
|
1743
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c, p, f, b = /* @__PURE__ */ Object.create(null), g, _, M, E;
|
|
1738
1744
|
if (E = e.input.charCodeAt(e.position), E === 91)
|
|
1739
1745
|
d = 93, f = !1, l = [];
|
|
1740
1746
|
else if (E === 123)
|
|
@@ -1744,38 +1750,38 @@ function Xi(e, t) {
|
|
|
1744
1750
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), E = e.input.charCodeAt(++e.position); E !== 0; ) {
|
|
1745
1751
|
if (W(e, !0, t), E = e.input.charCodeAt(e.position), E === d)
|
|
1746
1752
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1747
|
-
n ? E === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"),
|
|
1753
|
+
n ? E === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"), _ = g = M = null, c = p = !1, E === 63 && (u = e.input.charCodeAt(e.position + 1), te(u) && (c = p = !0, e.position++, W(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, ke(e, t, Ne, !1, !0), _ = e.tag, g = e.result, W(e, !0, t), E = e.input.charCodeAt(e.position), (p || e.line === r) && E === 58 && (c = !0, E = e.input.charCodeAt(++e.position), W(e, !0, t), ke(e, t, Ne, !1, !0), M = e.result), f ? Ce(e, l, b, _, g, M, r, i, a) : c ? l.push(Ce(e, null, b, _, g, M, r, i, a)) : l.push(g), W(e, !0, t), E = e.input.charCodeAt(e.position), E === 44 ? (n = !0, E = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1748
1754
|
}
|
|
1749
1755
|
C(e, "unexpected end of the stream within a flow collection");
|
|
1750
1756
|
}
|
|
1751
1757
|
function ea(e, t) {
|
|
1752
|
-
var n, r, i = Pe, a = !1, o = !1, l = t, s = 0,
|
|
1753
|
-
if (
|
|
1758
|
+
var n, r, i = Pe, a = !1, o = !1, l = t, s = 0, u = !1, d, c;
|
|
1759
|
+
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1754
1760
|
r = !1;
|
|
1755
|
-
else if (
|
|
1761
|
+
else if (c === 62)
|
|
1756
1762
|
r = !0;
|
|
1757
1763
|
else
|
|
1758
1764
|
return !1;
|
|
1759
|
-
for (e.kind = "scalar", e.result = "";
|
|
1760
|
-
if (
|
|
1761
|
-
Pe === i ? i =
|
|
1762
|
-
else if ((d = zi(
|
|
1765
|
+
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1766
|
+
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1767
|
+
Pe === i ? i = c === 43 ? ht : Ui : C(e, "repeat of a chomping mode identifier");
|
|
1768
|
+
else if ((d = zi(c)) >= 0)
|
|
1763
1769
|
d === 0 ? C(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? C(e, "repeat of an indentation width identifier") : (l = t + d - 1, o = !0);
|
|
1764
1770
|
else
|
|
1765
1771
|
break;
|
|
1766
|
-
if (me(
|
|
1772
|
+
if (me(c)) {
|
|
1767
1773
|
do
|
|
1768
|
-
|
|
1769
|
-
while (me(
|
|
1770
|
-
if (
|
|
1774
|
+
c = e.input.charCodeAt(++e.position);
|
|
1775
|
+
while (me(c));
|
|
1776
|
+
if (c === 35)
|
|
1771
1777
|
do
|
|
1772
|
-
|
|
1773
|
-
while (!ae(
|
|
1778
|
+
c = e.input.charCodeAt(++e.position);
|
|
1779
|
+
while (!ae(c) && c !== 0);
|
|
1774
1780
|
}
|
|
1775
|
-
for (;
|
|
1776
|
-
for (tt(e), e.lineIndent = 0,
|
|
1777
|
-
e.lineIndent++,
|
|
1778
|
-
if (!o && e.lineIndent > l && (l = e.lineIndent), ae(
|
|
1781
|
+
for (; c !== 0; ) {
|
|
1782
|
+
for (tt(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && c === 32; )
|
|
1783
|
+
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
1784
|
+
if (!o && e.lineIndent > l && (l = e.lineIndent), ae(c)) {
|
|
1779
1785
|
s++;
|
|
1780
1786
|
continue;
|
|
1781
1787
|
}
|
|
@@ -1785,12 +1791,12 @@ function ea(e, t) {
|
|
|
1785
1791
|
`);
|
|
1786
1792
|
break;
|
|
1787
1793
|
}
|
|
1788
|
-
for (r ? me(
|
|
1789
|
-
`, a ? 1 + s : s)) :
|
|
1794
|
+
for (r ? me(c) ? (u = !0, e.result += G.repeat(`
|
|
1795
|
+
`, a ? 1 + s : s)) : u ? (u = !1, e.result += G.repeat(`
|
|
1790
1796
|
`, s + 1)) : s === 0 ? a && (e.result += " ") : e.result += G.repeat(`
|
|
1791
1797
|
`, s) : e.result += G.repeat(`
|
|
1792
|
-
`, a ? 1 + s : s), a = !0, o = !0, s = 0, n = e.position; !ae(
|
|
1793
|
-
|
|
1798
|
+
`, a ? 1 + s : s), a = !0, o = !0, s = 0, n = e.position; !ae(c) && c !== 0; )
|
|
1799
|
+
c = e.input.charCodeAt(++e.position);
|
|
1794
1800
|
ce(e, n, e.position, !1);
|
|
1795
1801
|
}
|
|
1796
1802
|
return !0;
|
|
@@ -1812,12 +1818,12 @@ function bt(e, t) {
|
|
|
1812
1818
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1813
1819
|
}
|
|
1814
1820
|
function ta(e, t, n) {
|
|
1815
|
-
var r, i, a, o, l, s,
|
|
1821
|
+
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {}, p = /* @__PURE__ */ Object.create(null), f = null, b = null, g = null, _ = !1, M = !1, E;
|
|
1816
1822
|
if (e.firstTabInLine !== -1)
|
|
1817
1823
|
return !1;
|
|
1818
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1819
|
-
if (!
|
|
1820
|
-
E === 63 ? (
|
|
1824
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), E = e.input.charCodeAt(e.position); E !== 0; ) {
|
|
1825
|
+
if (!_ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, C(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (E === 63 || E === 58) && te(r))
|
|
1826
|
+
E === 63 ? (_ && (Ce(e, c, p, f, b, null, o, l, s), f = b = g = null), M = !0, _ = !0, i = !0) : _ ? (_ = !1, i = !0) : C(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, E = r;
|
|
1821
1827
|
else {
|
|
1822
1828
|
if (o = e.line, l = e.lineStart, s = e.position, !ke(e, n, on, !1, !0))
|
|
1823
1829
|
break;
|
|
@@ -1825,22 +1831,22 @@ function ta(e, t, n) {
|
|
|
1825
1831
|
for (E = e.input.charCodeAt(e.position); me(E); )
|
|
1826
1832
|
E = e.input.charCodeAt(++e.position);
|
|
1827
1833
|
if (E === 58)
|
|
1828
|
-
E = e.input.charCodeAt(++e.position), te(E) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"),
|
|
1834
|
+
E = e.input.charCodeAt(++e.position), te(E) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"), _ && (Ce(e, c, p, f, b, null, o, l, s), f = b = g = null), M = !0, _ = !1, i = !1, f = e.tag, b = e.result;
|
|
1829
1835
|
else if (M)
|
|
1830
1836
|
C(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1831
1837
|
else
|
|
1832
|
-
return e.tag =
|
|
1838
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1833
1839
|
} else if (M)
|
|
1834
1840
|
C(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1835
1841
|
else
|
|
1836
|
-
return e.tag =
|
|
1842
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1837
1843
|
}
|
|
1838
|
-
if ((e.line === a || e.lineIndent > t) && (
|
|
1844
|
+
if ((e.line === a || e.lineIndent > t) && (_ && (o = e.line, l = e.lineStart, s = e.position), ke(e, t, Be, !0, i) && (_ ? b = e.result : g = e.result), _ || (Ce(e, c, p, f, b, g, o, l, s), f = b = g = null), W(e, !0, -1), E = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && E !== 0)
|
|
1839
1845
|
C(e, "bad indentation of a mapping entry");
|
|
1840
1846
|
else if (e.lineIndent < t)
|
|
1841
1847
|
break;
|
|
1842
1848
|
}
|
|
1843
|
-
return
|
|
1849
|
+
return _ && Ce(e, c, p, f, b, null, o, l, s), M && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), M;
|
|
1844
1850
|
}
|
|
1845
1851
|
function na(e) {
|
|
1846
1852
|
var t, n = !1, r = !1, i, a, o;
|
|
@@ -1881,28 +1887,28 @@ function ia(e) {
|
|
|
1881
1887
|
return e.position === t && C(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), de.call(e.anchorMap, n) || C(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], W(e, !0, -1), !0;
|
|
1882
1888
|
}
|
|
1883
1889
|
function ke(e, t, n, r, i) {
|
|
1884
|
-
var a, o, l, s = 1,
|
|
1885
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Be === n || ln === n, r && W(e, !0, -1) && (
|
|
1890
|
+
var a, o, l, s = 1, u = !1, d = !1, c, p, f, b, g, _;
|
|
1891
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Be === n || ln === n, r && W(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1886
1892
|
for (; na(e) || ra(e); )
|
|
1887
|
-
W(e, !0, -1) ? (
|
|
1888
|
-
if (l && (l =
|
|
1893
|
+
W(e, !0, -1) ? (u = !0, l = a, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1894
|
+
if (l && (l = u || i), (s === 1 || Be === n) && (Ne === n || on === n ? g = t : g = t + 1, _ = e.position - e.lineStart, s === 1 ? l && (bt(e, _) || ta(e, _, g)) || Xi(e, g) ? d = !0 : (o && ea(e, g) || Zi(e, g) || Qi(e, g) ? d = !0 : ia(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : Gi(e, g, Ne === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && bt(e, _))), e.tag === null)
|
|
1889
1895
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1890
1896
|
else if (e.tag === "?") {
|
|
1891
|
-
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'),
|
|
1892
|
-
if (
|
|
1893
|
-
e.result =
|
|
1897
|
+
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, p = e.implicitTypes.length; c < p; c += 1)
|
|
1898
|
+
if (b = e.implicitTypes[c], b.resolve(e.result)) {
|
|
1899
|
+
e.result = b.construct(e.result), e.tag = b.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1894
1900
|
break;
|
|
1895
1901
|
}
|
|
1896
1902
|
} else if (e.tag !== "!") {
|
|
1897
1903
|
if (de.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1898
|
-
|
|
1904
|
+
b = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1899
1905
|
else
|
|
1900
|
-
for (
|
|
1901
|
-
if (e.tag.slice(0, f[
|
|
1902
|
-
|
|
1906
|
+
for (b = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, p = f.length; c < p; c += 1)
|
|
1907
|
+
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
1908
|
+
b = f[c];
|
|
1903
1909
|
break;
|
|
1904
1910
|
}
|
|
1905
|
-
|
|
1911
|
+
b || C(e, "unknown tag !<" + e.tag + ">"), e.result !== null && b.kind !== e.kind && C(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + b.kind + '", not "' + e.kind + '"'), b.resolve(e.result, e.tag) ? (e.result = b.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : C(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1906
1912
|
}
|
|
1907
1913
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1908
1914
|
}
|
|
@@ -2077,25 +2083,25 @@ function _n(e) {
|
|
|
2077
2083
|
}
|
|
2078
2084
|
var kn = 1, We = 2, An = 3, wn = 4, be = 5;
|
|
2079
2085
|
function Ba(e, t, n, r, i, a, o, l) {
|
|
2080
|
-
var s,
|
|
2086
|
+
var s, u = 0, d = null, c = !1, p = !1, f = r !== -1, b = -1, g = La(we(e, 0)) && Na(we(e, e.length - 1));
|
|
2081
2087
|
if (t || o)
|
|
2082
|
-
for (s = 0; s < e.length;
|
|
2083
|
-
if (
|
|
2088
|
+
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2089
|
+
if (u = we(e, s), !Te(u))
|
|
2084
2090
|
return be;
|
|
2085
|
-
|
|
2091
|
+
g = g && _t(u, d, l), d = u;
|
|
2086
2092
|
}
|
|
2087
2093
|
else {
|
|
2088
|
-
for (s = 0; s < e.length;
|
|
2089
|
-
if (
|
|
2090
|
-
|
|
2091
|
-
s -
|
|
2092
|
-
else if (!Te(
|
|
2094
|
+
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2095
|
+
if (u = we(e, s), u === Ie)
|
|
2096
|
+
c = !0, f && (p = p || // Foldable line = too long, and not more-indented.
|
|
2097
|
+
s - b - 1 > r && e[b + 1] !== " ", b = s);
|
|
2098
|
+
else if (!Te(u))
|
|
2093
2099
|
return be;
|
|
2094
|
-
|
|
2100
|
+
g = g && _t(u, d, l), d = u;
|
|
2095
2101
|
}
|
|
2096
|
-
|
|
2102
|
+
p = p || f && s - b - 1 > r && e[b + 1] !== " ";
|
|
2097
2103
|
}
|
|
2098
|
-
return !
|
|
2104
|
+
return !c && !p ? g && !o && !i(e) ? kn : a === Ee ? be : We : n > 9 && _n(e) ? be : o ? a === Ee ? be : We : p ? wn : An;
|
|
2099
2105
|
}
|
|
2100
2106
|
function Ra(e, t, n, r, i) {
|
|
2101
2107
|
e.dump = function() {
|
|
@@ -2104,8 +2110,8 @@ function Ra(e, t, n, r, i) {
|
|
|
2104
2110
|
if (!e.noCompatMode && (Sa.indexOf(t) !== -1 || Ia.test(t)))
|
|
2105
2111
|
return e.quotingType === Ee ? '"' + t + '"' : "'" + t + "'";
|
|
2106
2112
|
var a = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2107
|
-
function s(
|
|
2108
|
-
return $a(e,
|
|
2113
|
+
function s(u) {
|
|
2114
|
+
return $a(e, u);
|
|
2109
2115
|
}
|
|
2110
2116
|
switch (Ba(
|
|
2111
2117
|
t,
|
|
@@ -2146,9 +2152,9 @@ function At(e) {
|
|
|
2146
2152
|
}
|
|
2147
2153
|
function Ka(e, t) {
|
|
2148
2154
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2149
|
-
var
|
|
2155
|
+
var u = e.indexOf(`
|
|
2150
2156
|
`);
|
|
2151
|
-
return
|
|
2157
|
+
return u = u !== -1 ? u : e.length, n.lastIndex = u, wt(e.slice(0, u), t);
|
|
2152
2158
|
}(), i = e[0] === `
|
|
2153
2159
|
` || e[0] === " ", a, o; o = n.exec(e); ) {
|
|
2154
2160
|
var l = o[1], s = o[2];
|
|
@@ -2185,13 +2191,13 @@ function St(e, t, n, r) {
|
|
|
2185
2191
|
e.tag = a, e.dump = i || "[]";
|
|
2186
2192
|
}
|
|
2187
2193
|
function ja(e, t, n) {
|
|
2188
|
-
var r = "", i = e.tag, a = Object.keys(n), o, l, s,
|
|
2194
|
+
var r = "", i = e.tag, a = Object.keys(n), o, l, s, u, d;
|
|
2189
2195
|
for (o = 0, l = a.length; o < l; o += 1)
|
|
2190
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o],
|
|
2196
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o], u = n[s], e.replacer && (u = e.replacer.call(n, s, u)), se(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), se(e, t, u, !1, !1) && (d += e.dump, r += d));
|
|
2191
2197
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2192
2198
|
}
|
|
2193
2199
|
function Ua(e, t, n, r) {
|
|
2194
|
-
var i = "", a = e.tag, o = Object.keys(n), l, s,
|
|
2200
|
+
var i = "", a = e.tag, o = Object.keys(n), l, s, u, d, c, p;
|
|
2195
2201
|
if (e.sortKeys === !0)
|
|
2196
2202
|
o.sort();
|
|
2197
2203
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2199,7 +2205,7 @@ function Ua(e, t, n, r) {
|
|
|
2199
2205
|
else if (e.sortKeys)
|
|
2200
2206
|
throw new X("sortKeys must be a boolean or a function");
|
|
2201
2207
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2202
|
-
|
|
2208
|
+
p = "", (!r || i !== "") && (p += ze(e, t)), u = o[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), se(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Ie === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, c && (p += ze(e, t)), se(e, t + 1, d, !0, c) && (e.dump && Ie === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, i += p));
|
|
2203
2209
|
e.tag = a, e.dump = i || "{}";
|
|
2204
2210
|
}
|
|
2205
2211
|
function It(e, t, n) {
|
|
@@ -2221,16 +2227,16 @@ function It(e, t, n) {
|
|
|
2221
2227
|
}
|
|
2222
2228
|
function se(e, t, n, r, i, a, o) {
|
|
2223
2229
|
e.tag = null, e.dump = n, It(e, n, !1) || It(e, n, !0);
|
|
2224
|
-
var l = mn.call(e.dump), s = r,
|
|
2230
|
+
var l = mn.call(e.dump), s = r, u;
|
|
2225
2231
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2226
|
-
var d = l === "[object Object]" || l === "[object Array]",
|
|
2227
|
-
if (d && (
|
|
2228
|
-
e.dump = "*ref_" +
|
|
2232
|
+
var d = l === "[object Object]" || l === "[object Array]", c, p;
|
|
2233
|
+
if (d && (c = e.duplicates.indexOf(n), p = c !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (i = !1), p && e.usedDuplicates[c])
|
|
2234
|
+
e.dump = "*ref_" + c;
|
|
2229
2235
|
else {
|
|
2230
|
-
if (d &&
|
|
2231
|
-
r && Object.keys(e.dump).length !== 0 ? (Ua(e, t, e.dump, i),
|
|
2236
|
+
if (d && p && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2237
|
+
r && Object.keys(e.dump).length !== 0 ? (Ua(e, t, e.dump, i), p && (e.dump = "&ref_" + c + e.dump)) : (ja(e, t, e.dump), p && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2232
2238
|
else if (l === "[object Array]")
|
|
2233
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? St(e, t - 1, e.dump, i) : St(e, t, e.dump, i),
|
|
2239
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? St(e, t - 1, e.dump, i) : St(e, t, e.dump, i), p && (e.dump = "&ref_" + c + e.dump)) : (Da(e, t, e.dump), p && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2234
2240
|
else if (l === "[object String]")
|
|
2235
2241
|
e.tag !== "?" && Ra(e, e.dump, t, a, s);
|
|
2236
2242
|
else {
|
|
@@ -2240,9 +2246,9 @@ function se(e, t, n, r, i, a, o) {
|
|
|
2240
2246
|
return !1;
|
|
2241
2247
|
throw new X("unacceptable kind of an object to dump " + l);
|
|
2242
2248
|
}
|
|
2243
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2249
|
+
e.tag !== null && e.tag !== "?" && (u = encodeURI(
|
|
2244
2250
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2245
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2251
|
+
).replace(/!/g, "%21"), e.tag[0] === "!" ? u = "!" + u : u.slice(0, 18) === "tag:yaml.org,2002:" ? u = "!!" + u.slice(18) : u = "!<" + u + ">", e.dump = u + " " + e.dump);
|
|
2246
2252
|
}
|
|
2247
2253
|
return !0;
|
|
2248
2254
|
}
|
|
@@ -2320,14 +2326,14 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2320
2326
|
}
|
|
2321
2327
|
},
|
|
2322
2328
|
setup(e) {
|
|
2323
|
-
const t = e, n =
|
|
2329
|
+
const t = e, n = A(() => {
|
|
2324
2330
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2325
2331
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : oo.dump(r).trim();
|
|
2326
2332
|
});
|
|
2327
2333
|
return (r, i) => {
|
|
2328
2334
|
const a = B("KCodeBlock");
|
|
2329
|
-
return
|
|
2330
|
-
t.yamlRecord ? (
|
|
2335
|
+
return h(), S("div", lo, [
|
|
2336
|
+
t.yamlRecord ? (h(), K(a, {
|
|
2331
2337
|
key: 0,
|
|
2332
2338
|
id: "yaml-codeblock",
|
|
2333
2339
|
code: n.value,
|
|
@@ -2382,53 +2388,53 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2382
2388
|
}
|
|
2383
2389
|
},
|
|
2384
2390
|
setup(e) {
|
|
2385
|
-
const t = e, n = Ge(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a =
|
|
2391
|
+
const t = e, n = Ge(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a = A(() => {
|
|
2386
2392
|
if (!t.record)
|
|
2387
2393
|
return t.record;
|
|
2388
2394
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2389
2395
|
return delete o.created_at, delete o.updated_at, o;
|
|
2390
2396
|
});
|
|
2391
|
-
return (o, l) => (
|
|
2392
|
-
e.format === "structured" ? (
|
|
2393
|
-
(
|
|
2397
|
+
return (o, l) => (h(), S(le, null, [
|
|
2398
|
+
e.format === "structured" ? (h(), S("div", so, [
|
|
2399
|
+
(h(!0), S(le, null, ie(e.propListTypes, (s) => (h(), S("div", {
|
|
2394
2400
|
key: `config-card-details-${s}-props`,
|
|
2395
2401
|
class: ue(`config-card-details-${s}-props`),
|
|
2396
2402
|
"data-testid": `config-card-details-${s}-props`
|
|
2397
2403
|
}, [
|
|
2398
|
-
s !== "basic" ? (
|
|
2399
|
-
(
|
|
2400
|
-
key:
|
|
2401
|
-
item:
|
|
2404
|
+
s !== "basic" ? (h(), S("div", uo, O(s === "advanced" ? I(r)("baseConfigCard.sections.advanced") : I(r)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2405
|
+
(h(!0), S(le, null, ie(e.propertyCollections[s], (u) => (h(), K(Rt, {
|
|
2406
|
+
key: u.key,
|
|
2407
|
+
item: u
|
|
2402
2408
|
}, _e({
|
|
2403
|
-
label:
|
|
2404
|
-
V(o.$slots, `${
|
|
2409
|
+
label: x(() => [
|
|
2410
|
+
V(o.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2405
2411
|
]),
|
|
2406
|
-
[
|
|
2407
|
-
V(o.$slots,
|
|
2408
|
-
row:
|
|
2412
|
+
[u.key]: x(({ rowValue: d }) => [
|
|
2413
|
+
V(o.$slots, u.key, {
|
|
2414
|
+
row: u,
|
|
2409
2415
|
rowValue: d
|
|
2410
2416
|
}, void 0, !0)
|
|
2411
2417
|
]),
|
|
2412
2418
|
_: 2
|
|
2413
2419
|
}, [
|
|
2414
|
-
i(
|
|
2420
|
+
i(u) ? {
|
|
2415
2421
|
name: "label-tooltip",
|
|
2416
|
-
fn:
|
|
2417
|
-
V(o.$slots, `${
|
|
2422
|
+
fn: x(() => [
|
|
2423
|
+
V(o.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2418
2424
|
]),
|
|
2419
2425
|
key: "0"
|
|
2420
2426
|
} : void 0
|
|
2421
2427
|
]), 1032, ["item"]))), 128))
|
|
2422
2428
|
], 10, co))), 128))
|
|
2423
2429
|
])) : D("", !0),
|
|
2424
|
-
e.format === "json" && t.record ? (
|
|
2430
|
+
e.format === "json" && t.record ? (h(), K(Kt, {
|
|
2425
2431
|
key: 1,
|
|
2426
2432
|
config: t.config,
|
|
2427
2433
|
"fetcher-url": t.fetcherUrl,
|
|
2428
2434
|
"json-record": a.value,
|
|
2429
2435
|
"request-method": "get"
|
|
2430
2436
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : D("", !0),
|
|
2431
|
-
e.format === "yaml" && t.record ? (
|
|
2437
|
+
e.format === "yaml" && t.record ? (h(), K(Sn, {
|
|
2432
2438
|
key: 2,
|
|
2433
2439
|
"yaml-record": a.value
|
|
2434
2440
|
}, null, 8, ["yaml-record"])) : D("", !0)
|
|
@@ -2497,7 +2503,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2497
2503
|
}
|
|
2498
2504
|
},
|
|
2499
2505
|
setup(e) {
|
|
2500
|
-
const t = e, n =
|
|
2506
|
+
const t = e, n = A(() => {
|
|
2501
2507
|
if (typeof t.size == "number" && t.size > 0)
|
|
2502
2508
|
return `${t.size}px`;
|
|
2503
2509
|
if (typeof t.size == "string") {
|
|
@@ -2506,7 +2512,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2506
2512
|
return `${a}px`;
|
|
2507
2513
|
}
|
|
2508
2514
|
return oe;
|
|
2509
|
-
}), r =
|
|
2515
|
+
}), r = A(() => ({
|
|
2510
2516
|
boxSizing: "border-box",
|
|
2511
2517
|
color: t.color,
|
|
2512
2518
|
display: t.display,
|
|
@@ -2514,14 +2520,14 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2514
2520
|
lineHeight: "0",
|
|
2515
2521
|
width: n.value
|
|
2516
2522
|
}));
|
|
2517
|
-
return (i, a) => (
|
|
2523
|
+
return (i, a) => (h(), K(ge(e.as), {
|
|
2518
2524
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2519
2525
|
class: "kui-icon add-icon",
|
|
2520
2526
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2521
2527
|
style: Fe(r.value)
|
|
2522
2528
|
}, {
|
|
2523
|
-
default:
|
|
2524
|
-
(
|
|
2529
|
+
default: x(() => [
|
|
2530
|
+
(h(), S("svg", {
|
|
2525
2531
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2526
2532
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2527
2533
|
fill: "none",
|
|
@@ -2531,7 +2537,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2531
2537
|
width: "100%",
|
|
2532
2538
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2533
2539
|
}, [
|
|
2534
|
-
e.title ? (
|
|
2540
|
+
e.title ? (h(), S("title", go, O(e.title), 1)) : D("", !0),
|
|
2535
2541
|
yo
|
|
2536
2542
|
], 8, mo))
|
|
2537
2543
|
]),
|
|
@@ -2596,7 +2602,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2596
2602
|
}
|
|
2597
2603
|
},
|
|
2598
2604
|
setup(e) {
|
|
2599
|
-
const t = e, n =
|
|
2605
|
+
const t = e, n = A(() => {
|
|
2600
2606
|
if (typeof t.size == "number" && t.size > 0)
|
|
2601
2607
|
return `${t.size}px`;
|
|
2602
2608
|
if (typeof t.size == "string") {
|
|
@@ -2605,7 +2611,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2605
2611
|
return `${a}px`;
|
|
2606
2612
|
}
|
|
2607
2613
|
return oe;
|
|
2608
|
-
}), r =
|
|
2614
|
+
}), r = A(() => ({
|
|
2609
2615
|
boxSizing: "border-box",
|
|
2610
2616
|
color: t.color,
|
|
2611
2617
|
display: t.display,
|
|
@@ -2613,14 +2619,14 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2613
2619
|
lineHeight: "0",
|
|
2614
2620
|
width: n.value
|
|
2615
2621
|
}));
|
|
2616
|
-
return (i, a) => (
|
|
2622
|
+
return (i, a) => (h(), K(ge(e.as), {
|
|
2617
2623
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2618
2624
|
class: "kui-icon book-icon",
|
|
2619
2625
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2620
2626
|
style: Fe(r.value)
|
|
2621
2627
|
}, {
|
|
2622
|
-
default:
|
|
2623
|
-
(
|
|
2628
|
+
default: x(() => [
|
|
2629
|
+
(h(), S("svg", {
|
|
2624
2630
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2625
2631
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2626
2632
|
fill: "none",
|
|
@@ -2630,7 +2636,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2630
2636
|
width: "100%",
|
|
2631
2637
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2632
2638
|
}, [
|
|
2633
|
-
e.title ? (
|
|
2639
|
+
e.title ? (h(), S("title", _o, O(e.title), 1)) : D("", !0),
|
|
2634
2640
|
ko
|
|
2635
2641
|
], 8, Co))
|
|
2636
2642
|
]),
|
|
@@ -2695,7 +2701,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2695
2701
|
}
|
|
2696
2702
|
},
|
|
2697
2703
|
setup(e) {
|
|
2698
|
-
const t = e, n =
|
|
2704
|
+
const t = e, n = A(() => {
|
|
2699
2705
|
if (typeof t.size == "number" && t.size > 0)
|
|
2700
2706
|
return `${t.size}px`;
|
|
2701
2707
|
if (typeof t.size == "string") {
|
|
@@ -2704,7 +2710,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2704
2710
|
return `${a}px`;
|
|
2705
2711
|
}
|
|
2706
2712
|
return oe;
|
|
2707
|
-
}), r =
|
|
2713
|
+
}), r = A(() => ({
|
|
2708
2714
|
boxSizing: "border-box",
|
|
2709
2715
|
color: t.color,
|
|
2710
2716
|
display: t.display,
|
|
@@ -2712,14 +2718,14 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2712
2718
|
lineHeight: "0",
|
|
2713
2719
|
width: n.value
|
|
2714
2720
|
}));
|
|
2715
|
-
return (i, a) => (
|
|
2721
|
+
return (i, a) => (h(), K(ge(e.as), {
|
|
2716
2722
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2717
2723
|
class: "kui-icon chevron-down-icon",
|
|
2718
2724
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2719
2725
|
style: Fe(r.value)
|
|
2720
2726
|
}, {
|
|
2721
|
-
default:
|
|
2722
|
-
(
|
|
2727
|
+
default: x(() => [
|
|
2728
|
+
(h(), S("svg", {
|
|
2723
2729
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2724
2730
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2725
2731
|
fill: "none",
|
|
@@ -2729,7 +2735,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2729
2735
|
width: "100%",
|
|
2730
2736
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2731
2737
|
}, [
|
|
2732
|
-
e.title ? (
|
|
2738
|
+
e.title ? (h(), S("title", Eo, O(e.title), 1)) : D("", !0),
|
|
2733
2739
|
To
|
|
2734
2740
|
], 8, Io))
|
|
2735
2741
|
]),
|
|
@@ -2794,7 +2800,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2794
2800
|
}
|
|
2795
2801
|
},
|
|
2796
2802
|
setup(e) {
|
|
2797
|
-
const t = e, n =
|
|
2803
|
+
const t = e, n = A(() => {
|
|
2798
2804
|
if (typeof t.size == "number" && t.size > 0)
|
|
2799
2805
|
return `${t.size}px`;
|
|
2800
2806
|
if (typeof t.size == "string") {
|
|
@@ -2803,7 +2809,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2803
2809
|
return `${a}px`;
|
|
2804
2810
|
}
|
|
2805
2811
|
return oe;
|
|
2806
|
-
}), r =
|
|
2812
|
+
}), r = A(() => ({
|
|
2807
2813
|
boxSizing: "border-box",
|
|
2808
2814
|
color: t.color,
|
|
2809
2815
|
display: t.display,
|
|
@@ -2811,14 +2817,14 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2811
2817
|
lineHeight: "0",
|
|
2812
2818
|
width: n.value
|
|
2813
2819
|
}));
|
|
2814
|
-
return (i, a) => (
|
|
2820
|
+
return (i, a) => (h(), K(ge(e.as), {
|
|
2815
2821
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2816
2822
|
class: "kui-icon close-icon",
|
|
2817
2823
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2818
2824
|
style: Fe(r.value)
|
|
2819
2825
|
}, {
|
|
2820
|
-
default:
|
|
2821
|
-
(
|
|
2826
|
+
default: x(() => [
|
|
2827
|
+
(h(), S("svg", {
|
|
2822
2828
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2823
2829
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2824
2830
|
fill: "none",
|
|
@@ -2828,7 +2834,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2828
2834
|
width: "100%",
|
|
2829
2835
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2830
2836
|
}, [
|
|
2831
|
-
e.title ? (
|
|
2837
|
+
e.title ? (h(), S("title", No, O(e.title), 1)) : D("", !0),
|
|
2832
2838
|
Bo
|
|
2833
2839
|
], 8, Lo))
|
|
2834
2840
|
]),
|
|
@@ -2893,7 +2899,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2893
2899
|
}
|
|
2894
2900
|
},
|
|
2895
2901
|
setup(e) {
|
|
2896
|
-
const t = e, n =
|
|
2902
|
+
const t = e, n = A(() => {
|
|
2897
2903
|
if (typeof t.size == "number" && t.size > 0)
|
|
2898
2904
|
return `${t.size}px`;
|
|
2899
2905
|
if (typeof t.size == "string") {
|
|
@@ -2902,7 +2908,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2902
2908
|
return `${a}px`;
|
|
2903
2909
|
}
|
|
2904
2910
|
return oe;
|
|
2905
|
-
}), r =
|
|
2911
|
+
}), r = A(() => ({
|
|
2906
2912
|
boxSizing: "border-box",
|
|
2907
2913
|
color: t.color,
|
|
2908
2914
|
display: t.display,
|
|
@@ -2910,14 +2916,14 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2910
2916
|
lineHeight: "0",
|
|
2911
2917
|
width: n.value
|
|
2912
2918
|
}));
|
|
2913
|
-
return (i, a) => (
|
|
2919
|
+
return (i, a) => (h(), K(ge(e.as), {
|
|
2914
2920
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2915
2921
|
class: "kui-icon copy-icon",
|
|
2916
2922
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2917
2923
|
style: Fe(r.value)
|
|
2918
2924
|
}, {
|
|
2919
|
-
default:
|
|
2920
|
-
(
|
|
2925
|
+
default: x(() => [
|
|
2926
|
+
(h(), S("svg", {
|
|
2921
2927
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2922
2928
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
2923
2929
|
fill: "none",
|
|
@@ -2927,7 +2933,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2927
2933
|
width: "100%",
|
|
2928
2934
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2929
2935
|
}, [
|
|
2930
|
-
e.title ? (
|
|
2936
|
+
e.title ? (h(), S("title", jo, O(e.title), 1)) : D("", !0),
|
|
2931
2937
|
Uo
|
|
2932
2938
|
], 8, Do))
|
|
2933
2939
|
]),
|
|
@@ -3008,9 +3014,9 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3008
3014
|
},
|
|
3009
3015
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
3010
3016
|
setup(e, { emit: t }) {
|
|
3011
|
-
var
|
|
3017
|
+
var v;
|
|
3012
3018
|
const n = t, r = e, { i18n: { t: i } } = z.useI18n(), { getMessageFromError: a } = z.useErrors(), { convertKeyToTitle: o } = z.useStringHelpers(), { axiosInstance: l } = z.useAxios({
|
|
3013
|
-
headers: (
|
|
3019
|
+
headers: (v = r.config) == null ? void 0 : v.requestHeaders
|
|
3014
3020
|
}), s = [
|
|
3015
3021
|
{
|
|
3016
3022
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
@@ -3025,9 +3031,9 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3025
3031
|
label: "YAML",
|
|
3026
3032
|
value: "yaml"
|
|
3027
3033
|
}
|
|
3028
|
-
],
|
|
3029
|
-
|
|
3030
|
-
},
|
|
3034
|
+
], u = R("structured"), d = (y) => {
|
|
3035
|
+
u.value = y == null ? void 0 : y.value;
|
|
3036
|
+
}, c = {
|
|
3031
3037
|
id: {
|
|
3032
3038
|
type: P.ID,
|
|
3033
3039
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
@@ -3061,21 +3067,21 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3061
3067
|
// the last property displayed
|
|
3062
3068
|
section: ne.Basic
|
|
3063
3069
|
}
|
|
3064
|
-
},
|
|
3065
|
-
var F,
|
|
3066
|
-
if (!
|
|
3070
|
+
}, p = R(!1), f = R(!1), b = R(""), g = R({}), _ = A(() => {
|
|
3071
|
+
var F, k, j;
|
|
3072
|
+
if (!g.value)
|
|
3067
3073
|
return [];
|
|
3068
|
-
const
|
|
3069
|
-
for (const T in
|
|
3070
|
-
const w = (
|
|
3074
|
+
const y = [], $ = Object.keys(g.value).length;
|
|
3075
|
+
for (const T in g.value) {
|
|
3076
|
+
const w = (k = (F = r.configSchema) == null ? void 0 : F[T]) == null ? void 0 : k.order, U = (j = c[T]) == null ? void 0 : j.order;
|
|
3071
3077
|
let q = $;
|
|
3072
|
-
(U || U === 0) && (q = U === -1 ? $ + 1 : U), w && (q = w === -1 ? $ + 1 : w),
|
|
3078
|
+
(U || U === 0) && (q = U === -1 ? $ + 1 : U), w && (q = w === -1 ? $ + 1 : w), y.push([T, q]);
|
|
3073
3079
|
}
|
|
3074
|
-
return
|
|
3080
|
+
return y.sort(function(T, w) {
|
|
3075
3081
|
return T[1] - w[1];
|
|
3076
|
-
}),
|
|
3082
|
+
}), y.map((T) => {
|
|
3077
3083
|
var fe, at;
|
|
3078
|
-
const w = T[0], U = (fe =
|
|
3084
|
+
const w = T[0], U = (fe = g.value) == null ? void 0 : fe[w], q = ((at = r.configSchema) == null ? void 0 : at[w]) || {}, J = c[w];
|
|
3079
3085
|
return {
|
|
3080
3086
|
key: w,
|
|
3081
3087
|
value: U,
|
|
@@ -3086,13 +3092,13 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3086
3092
|
section: q.section ?? ((J == null ? void 0 : J.section) || ne.Advanced)
|
|
3087
3093
|
};
|
|
3088
3094
|
}).filter((T) => !T.hidden && T.key !== r.pluginConfigKey);
|
|
3089
|
-
}), M =
|
|
3090
|
-
var
|
|
3091
|
-
if (!
|
|
3095
|
+
}), M = A(() => {
|
|
3096
|
+
var k, j;
|
|
3097
|
+
if (!g.value || !r.pluginConfigKey)
|
|
3092
3098
|
return [];
|
|
3093
|
-
const
|
|
3094
|
-
for (const T in
|
|
3095
|
-
const w = (j = (
|
|
3099
|
+
const y = g.value[r.pluginConfigKey] || {}, $ = Object.keys(y).length, F = [];
|
|
3100
|
+
for (const T in y) {
|
|
3101
|
+
const w = (j = (k = r.pluginConfigSchema) == null ? void 0 : k[T]) == null ? void 0 : j.order, U = y[T];
|
|
3096
3102
|
let q = U != null && U !== "" ? $ - 1 : $;
|
|
3097
3103
|
w && (q = w === -1 ? $ + 1 : w), F.push([T, q]);
|
|
3098
3104
|
}
|
|
@@ -3100,7 +3106,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3100
3106
|
return T[1] - w[1];
|
|
3101
3107
|
}), F.map((T) => {
|
|
3102
3108
|
var J;
|
|
3103
|
-
const w = T[0], U =
|
|
3109
|
+
const w = T[0], U = y[w], q = ((J = r.pluginConfigSchema) == null ? void 0 : J[w]) || {};
|
|
3104
3110
|
return {
|
|
3105
3111
|
key: w,
|
|
3106
3112
|
value: U,
|
|
@@ -3111,70 +3117,70 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3111
3117
|
section: ne.Plugin
|
|
3112
3118
|
};
|
|
3113
3119
|
}).filter((T) => !T.hidden);
|
|
3114
|
-
}), E =
|
|
3115
|
-
var
|
|
3120
|
+
}), E = A(() => {
|
|
3121
|
+
var y, $, F, k;
|
|
3116
3122
|
return {
|
|
3117
|
-
basic: (
|
|
3118
|
-
advanced: ($ =
|
|
3119
|
-
plugin: (
|
|
3123
|
+
basic: (y = _.value) == null ? void 0 : y.filter((j) => j.section === ne.Basic),
|
|
3124
|
+
advanced: ($ = _.value) == null ? void 0 : $.filter((j) => j.section === ne.Advanced),
|
|
3125
|
+
plugin: (k = M.value) == null ? void 0 : k.concat((F = _.value) == null ? void 0 : F.filter((j) => j.section === ne.Plugin))
|
|
3120
3126
|
};
|
|
3121
|
-
}), ee =
|
|
3122
|
-
const
|
|
3123
|
-
return E.value.basic.length &&
|
|
3124
|
-
}),
|
|
3127
|
+
}), ee = A(() => {
|
|
3128
|
+
const y = [];
|
|
3129
|
+
return E.value.basic.length && y.push("basic"), E.value.advanced.length && y.push("advanced"), E.value.plugin.length && y.push("plugin"), y;
|
|
3130
|
+
}), m = A(() => {
|
|
3125
3131
|
var $, F;
|
|
3126
|
-
let
|
|
3127
|
-
return r.config.app === "konnect" ?
|
|
3132
|
+
let y = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3133
|
+
return r.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, (($ = r.config) == null ? void 0 : $.controlPlaneId) || "") : r.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), y = y.replace(/{id}/gi, r.config.entityId), y;
|
|
3128
3134
|
});
|
|
3129
|
-
return Ae(
|
|
3130
|
-
n("loading",
|
|
3135
|
+
return Ae(p, (y) => {
|
|
3136
|
+
n("loading", y);
|
|
3131
3137
|
}, { immediate: !0 }), Ft(async () => {
|
|
3132
|
-
f.value = !1,
|
|
3138
|
+
f.value = !1, p.value = !0;
|
|
3133
3139
|
try {
|
|
3134
|
-
const { data:
|
|
3140
|
+
const { data: y } = await l.get(m.value);
|
|
3135
3141
|
if (r.dataKey)
|
|
3136
|
-
if (typeof
|
|
3137
|
-
|
|
3142
|
+
if (typeof y[r.dataKey] < "u")
|
|
3143
|
+
g.value = { ...y[r.dataKey] };
|
|
3138
3144
|
else
|
|
3139
3145
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3140
3146
|
else
|
|
3141
|
-
|
|
3147
|
+
g.value = { ...y };
|
|
3142
3148
|
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3143
|
-
|
|
3144
|
-
}), n("fetch:success",
|
|
3145
|
-
} catch (
|
|
3146
|
-
const $ = a(
|
|
3147
|
-
|
|
3149
|
+
g.value && typeof g.value[F] > "u" && (g.value[F] = null);
|
|
3150
|
+
}), n("fetch:success", y);
|
|
3151
|
+
} catch (y) {
|
|
3152
|
+
const $ = a(y);
|
|
3153
|
+
b.value = $.startsWith("code") ? i("baseConfigCard.errors.load") : $, f.value = !0, n("fetch:error", y);
|
|
3148
3154
|
} finally {
|
|
3149
|
-
|
|
3155
|
+
p.value = !1;
|
|
3150
3156
|
}
|
|
3151
|
-
}), (
|
|
3152
|
-
const F = B("KLabel"),
|
|
3153
|
-
return
|
|
3154
|
-
actions:
|
|
3157
|
+
}), (y, $) => {
|
|
3158
|
+
const F = B("KLabel"), k = B("KSelect"), j = B("KButton"), T = B("KSkeleton"), w = B("KEmptyState"), U = B("KCard");
|
|
3159
|
+
return h(), K(U, { class: "kong-ui-entity-base-config-card" }, _e({
|
|
3160
|
+
actions: x(() => [
|
|
3155
3161
|
L("div", Vo, [
|
|
3156
|
-
V(
|
|
3162
|
+
V(y.$slots, "actions", {}, void 0, !0),
|
|
3157
3163
|
N(F, {
|
|
3158
3164
|
class: "config-format-select-label",
|
|
3159
3165
|
"data-testid": "config-format-select-label"
|
|
3160
3166
|
}, {
|
|
3161
|
-
default:
|
|
3167
|
+
default: x(() => [
|
|
3162
3168
|
Y(O(e.label), 1)
|
|
3163
3169
|
]),
|
|
3164
3170
|
_: 1
|
|
3165
3171
|
}),
|
|
3166
|
-
N(
|
|
3172
|
+
N(k, {
|
|
3167
3173
|
"data-testid": "select-config-format",
|
|
3168
3174
|
items: s,
|
|
3169
3175
|
onChange: d
|
|
3170
3176
|
}),
|
|
3171
|
-
e.configCardDoc ? (
|
|
3177
|
+
e.configCardDoc ? (h(), K(j, {
|
|
3172
3178
|
key: 0,
|
|
3173
3179
|
appearance: "tertiary",
|
|
3174
3180
|
class: "book-icon",
|
|
3175
3181
|
"data-testid": "book-icon"
|
|
3176
3182
|
}, {
|
|
3177
|
-
default:
|
|
3183
|
+
default: x(() => [
|
|
3178
3184
|
L("a", {
|
|
3179
3185
|
href: e.configCardDoc,
|
|
3180
3186
|
rel: "noopener",
|
|
@@ -3187,35 +3193,35 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3187
3193
|
})) : D("", !0)
|
|
3188
3194
|
])
|
|
3189
3195
|
]),
|
|
3190
|
-
default:
|
|
3191
|
-
|
|
3196
|
+
default: x(() => [
|
|
3197
|
+
p.value ? (h(), K(T, {
|
|
3192
3198
|
key: 0,
|
|
3193
3199
|
"data-testid": "config-card-loader",
|
|
3194
3200
|
"table-columns": 2,
|
|
3195
3201
|
type: "table"
|
|
3196
|
-
})) : f.value ? (
|
|
3202
|
+
})) : f.value ? (h(), K(w, {
|
|
3197
3203
|
key: 1,
|
|
3198
3204
|
"data-testid": "config-card-fetch-error",
|
|
3199
3205
|
"icon-variant": "error"
|
|
3200
3206
|
}, {
|
|
3201
|
-
default:
|
|
3202
|
-
L("h3", null, O(
|
|
3207
|
+
default: x(() => [
|
|
3208
|
+
L("h3", null, O(b.value), 1)
|
|
3203
3209
|
]),
|
|
3204
3210
|
_: 1
|
|
3205
3211
|
})) : D("", !0),
|
|
3206
3212
|
L("div", zo, [
|
|
3207
3213
|
N(po, {
|
|
3208
3214
|
config: e.config,
|
|
3209
|
-
"fetcher-url":
|
|
3210
|
-
format:
|
|
3215
|
+
"fetcher-url": m.value,
|
|
3216
|
+
format: u.value,
|
|
3211
3217
|
"prop-list-types": ee.value,
|
|
3212
3218
|
"property-collections": E.value,
|
|
3213
|
-
record:
|
|
3219
|
+
record: g.value
|
|
3214
3220
|
}, _e({ _: 2 }, [
|
|
3215
|
-
ie(Object.keys(
|
|
3221
|
+
ie(Object.keys(y.$slots), (q) => ({
|
|
3216
3222
|
name: q,
|
|
3217
|
-
fn:
|
|
3218
|
-
V(
|
|
3223
|
+
fn: x(({ row: J, rowValue: fe }) => [
|
|
3224
|
+
V(y.$slots, q, {
|
|
3219
3225
|
row: J,
|
|
3220
3226
|
rowValue: fe
|
|
3221
3227
|
}, void 0, !0)
|
|
@@ -3228,9 +3234,9 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3228
3234
|
}, [
|
|
3229
3235
|
e.hideTitle ? void 0 : {
|
|
3230
3236
|
name: "title",
|
|
3231
|
-
fn:
|
|
3237
|
+
fn: x(() => [
|
|
3232
3238
|
L("div", Ho, [
|
|
3233
|
-
V(
|
|
3239
|
+
V(y.$slots, "title", {}, () => [
|
|
3234
3240
|
Y(O(I(i)("baseConfigCard.title")), 1)
|
|
3235
3241
|
], !0)
|
|
3236
3242
|
])
|
|
@@ -3300,18 +3306,18 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3300
3306
|
var ee;
|
|
3301
3307
|
const n = t, r = e, i = Mn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios({
|
|
3302
3308
|
headers: (ee = r.config) == null ? void 0 : ee.requestHeaders
|
|
3303
|
-
}), s = R(!1),
|
|
3304
|
-
var
|
|
3305
|
-
let
|
|
3306
|
-
return r.config.app === "konnect" ?
|
|
3307
|
-
}),
|
|
3308
|
-
|
|
3309
|
-
},
|
|
3310
|
-
r.config.cancelRoute ? i.push(r.config.cancelRoute) :
|
|
3311
|
-
},
|
|
3309
|
+
}), s = R(!1), u = R(!1), d = R(""), c = A(() => r.canSubmit === !1 || r.isReadonly), p = R(!1), f = A(() => {
|
|
3310
|
+
var v, y;
|
|
3311
|
+
let m = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3312
|
+
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((v = r.config) == null ? void 0 : v.controlPlaneId) || "") : r.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (y = r.config) != null && y.workspace ? `/${r.config.workspace}` : "")), r.editId ? (m = m.replace(/{id}/gi, r.editId), m) : (m = m.replace(/\/{id}/gi, ""), m);
|
|
3313
|
+
}), b = () => {
|
|
3314
|
+
p.value = !p.value;
|
|
3315
|
+
}, g = () => {
|
|
3316
|
+
r.config.cancelRoute ? i.push(r.config.cancelRoute) : _();
|
|
3317
|
+
}, _ = () => {
|
|
3312
3318
|
n("cancel");
|
|
3313
3319
|
}, M = () => {
|
|
3314
|
-
|
|
3320
|
+
c.value || n("submit");
|
|
3315
3321
|
}, E = R([
|
|
3316
3322
|
{
|
|
3317
3323
|
title: a("baseForm.configuration.yaml"),
|
|
@@ -3322,81 +3328,81 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3322
3328
|
hash: "#json"
|
|
3323
3329
|
}
|
|
3324
3330
|
]);
|
|
3325
|
-
return Ae(() => s.value, (
|
|
3326
|
-
n("loading",
|
|
3331
|
+
return Ae(() => s.value, (m) => {
|
|
3332
|
+
n("loading", m);
|
|
3327
3333
|
}, { immediate: !0 }), Ft(async () => {
|
|
3328
3334
|
if (r.editId)
|
|
3329
3335
|
try {
|
|
3330
|
-
|
|
3331
|
-
const { data:
|
|
3332
|
-
n("fetch:success",
|
|
3333
|
-
} catch (
|
|
3334
|
-
const
|
|
3335
|
-
d.value =
|
|
3336
|
+
u.value = !1, s.value = !0;
|
|
3337
|
+
const { data: m } = await l.get(f.value);
|
|
3338
|
+
n("fetch:success", m);
|
|
3339
|
+
} catch (m) {
|
|
3340
|
+
const v = o(m);
|
|
3341
|
+
d.value = v.startsWith("code") ? a("baseForm.errors.edit") : v, u.value = !0, n("fetch:error", m);
|
|
3336
3342
|
} finally {
|
|
3337
3343
|
s.value = !1;
|
|
3338
3344
|
}
|
|
3339
|
-
}), (
|
|
3340
|
-
const
|
|
3341
|
-
return
|
|
3342
|
-
default:
|
|
3343
|
-
s.value ? (
|
|
3345
|
+
}), (m, v) => {
|
|
3346
|
+
const y = B("KSkeleton"), $ = B("KEmptyState"), F = B("KAlert"), k = B("KButton"), j = B("KTabs"), T = B("KSlideout"), w = B("KCard");
|
|
3347
|
+
return h(), K(w, { class: "kong-ui-entity-base-form" }, {
|
|
3348
|
+
default: x(() => [
|
|
3349
|
+
s.value ? (h(), K(y, {
|
|
3344
3350
|
key: 0,
|
|
3345
3351
|
type: "form"
|
|
3346
|
-
})) :
|
|
3352
|
+
})) : u.value ? (h(), K($, {
|
|
3347
3353
|
key: 1,
|
|
3348
3354
|
"action-button-text": I(a)("baseForm.actions.back"),
|
|
3349
3355
|
"data-testid": "form-fetch-error",
|
|
3350
3356
|
"icon-variant": "error",
|
|
3351
|
-
onClickAction:
|
|
3357
|
+
onClickAction: g
|
|
3352
3358
|
}, {
|
|
3353
|
-
default:
|
|
3359
|
+
default: x(() => [
|
|
3354
3360
|
L("h3", null, O(d.value), 1)
|
|
3355
3361
|
]),
|
|
3356
3362
|
_: 1
|
|
3357
|
-
}, 8, ["action-button-text"])) : (
|
|
3363
|
+
}, 8, ["action-button-text"])) : (h(), S("form", {
|
|
3358
3364
|
key: 2,
|
|
3359
3365
|
"data-testid": "form-content",
|
|
3360
|
-
onReset: He(
|
|
3366
|
+
onReset: He(_, ["prevent"]),
|
|
3361
3367
|
onSubmit: He(M, ["prevent"])
|
|
3362
3368
|
}, [
|
|
3363
|
-
V(
|
|
3364
|
-
e.errorMessage ? (
|
|
3369
|
+
V(m.$slots, "default", {}, void 0, !0),
|
|
3370
|
+
e.errorMessage ? (h(), K(F, {
|
|
3365
3371
|
key: 0,
|
|
3366
3372
|
appearance: "danger",
|
|
3367
3373
|
"data-testid": "form-error",
|
|
3368
3374
|
message: e.errorMessage
|
|
3369
3375
|
}, null, 8, ["message"])) : D("", !0),
|
|
3370
3376
|
L("div", Jo, [
|
|
3371
|
-
V(
|
|
3372
|
-
N(
|
|
3377
|
+
V(m.$slots, "form-actions", {}, () => [
|
|
3378
|
+
N(k, {
|
|
3373
3379
|
appearance: "tertiary",
|
|
3374
3380
|
"data-testid": "form-view-configuration",
|
|
3375
|
-
onClick:
|
|
3381
|
+
onClick: v[0] || (v[0] = (U) => b())
|
|
3376
3382
|
}, {
|
|
3377
|
-
default:
|
|
3383
|
+
default: x(() => [
|
|
3378
3384
|
Y(O(I(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3379
3385
|
]),
|
|
3380
3386
|
_: 1
|
|
3381
3387
|
}),
|
|
3382
|
-
N(
|
|
3388
|
+
N(k, {
|
|
3383
3389
|
appearance: "secondary",
|
|
3384
3390
|
"data-testid": "form-cancel",
|
|
3385
3391
|
disabled: e.isReadonly,
|
|
3386
3392
|
type: "reset"
|
|
3387
3393
|
}, {
|
|
3388
|
-
default:
|
|
3394
|
+
default: x(() => [
|
|
3389
3395
|
Y(O(I(a)("baseForm.actions.cancel")), 1)
|
|
3390
3396
|
]),
|
|
3391
3397
|
_: 1
|
|
3392
3398
|
}, 8, ["disabled"]),
|
|
3393
|
-
N(
|
|
3399
|
+
N(k, {
|
|
3394
3400
|
appearance: "primary",
|
|
3395
3401
|
"data-testid": "form-submit",
|
|
3396
|
-
disabled:
|
|
3402
|
+
disabled: c.value,
|
|
3397
3403
|
type: "submit"
|
|
3398
3404
|
}, {
|
|
3399
|
-
default:
|
|
3405
|
+
default: x(() => [
|
|
3400
3406
|
Y(O(I(a)("baseForm.actions.save")), 1)
|
|
3401
3407
|
]),
|
|
3402
3408
|
_: 1
|
|
@@ -3410,16 +3416,16 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3410
3416
|
"has-overlay": !1,
|
|
3411
3417
|
"offset-top": 60,
|
|
3412
3418
|
title: I(a)("baseForm.configuration.title"),
|
|
3413
|
-
visible:
|
|
3414
|
-
onClose:
|
|
3419
|
+
visible: p.value,
|
|
3420
|
+
onClose: v[1] || (v[1] = (U) => b())
|
|
3415
3421
|
}, {
|
|
3416
|
-
default:
|
|
3422
|
+
default: x(() => [
|
|
3417
3423
|
L("div", null, O(I(a)("baseForm.configuration.message")), 1),
|
|
3418
3424
|
N(j, {
|
|
3419
3425
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3420
3426
|
tabs: E.value
|
|
3421
3427
|
}, {
|
|
3422
|
-
json:
|
|
3428
|
+
json: x(() => [
|
|
3423
3429
|
N(Kt, {
|
|
3424
3430
|
config: e.config,
|
|
3425
3431
|
"fetcher-url": f.value,
|
|
@@ -3427,7 +3433,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3427
3433
|
"request-method": r.editId ? "put" : "post"
|
|
3428
3434
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3429
3435
|
]),
|
|
3430
|
-
yaml:
|
|
3436
|
+
yaml: x(() => [
|
|
3431
3437
|
N(Sn, {
|
|
3432
3438
|
"yaml-record": r.formFields
|
|
3433
3439
|
}, null, 8, ["yaml-record"])
|
|
@@ -3458,61 +3464,61 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3458
3464
|
}
|
|
3459
3465
|
},
|
|
3460
3466
|
setup(e) {
|
|
3461
|
-
const t = e, n =
|
|
3462
|
-
var
|
|
3463
|
-
return ((
|
|
3464
|
-
}), r =
|
|
3465
|
-
var
|
|
3466
|
-
return ((
|
|
3467
|
-
}), i =
|
|
3468
|
-
var
|
|
3469
|
-
const
|
|
3470
|
-
return
|
|
3467
|
+
const t = e, n = A(() => {
|
|
3468
|
+
var g;
|
|
3469
|
+
return ((g = t.rowEl) == null ? void 0 : g.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3470
|
+
}), r = A(() => {
|
|
3471
|
+
var g;
|
|
3472
|
+
return ((g = n.value) == null ? void 0 : g.querySelector('[data-testid="first-col"]')) || null;
|
|
3473
|
+
}), i = A(() => {
|
|
3474
|
+
var _, M;
|
|
3475
|
+
const g = (_ = t.rowEl) == null ? void 0 : _.querySelectorAll("td");
|
|
3476
|
+
return g ? ((M = g[0]) == null ? void 0 : M.getAttribute("data-testid")) === t.keyName : !1;
|
|
3471
3477
|
});
|
|
3472
3478
|
let a;
|
|
3473
3479
|
const o = () => {
|
|
3474
3480
|
a && (a.disconnect(), a = void 0);
|
|
3475
3481
|
}, l = () => {
|
|
3476
|
-
var
|
|
3477
|
-
|
|
3478
|
-
}, s = R({}),
|
|
3479
|
-
|
|
3480
|
-
(
|
|
3482
|
+
var g, _, M;
|
|
3483
|
+
u.value = ((g = r.value) == null ? void 0 : g.getBoundingClientRect().width) || 0, d.value = ((_ = n.value) == null ? void 0 : _.clientWidth) || 0, c.value = ((M = s.value) == null ? void 0 : M.innerText) || "";
|
|
3484
|
+
}, s = R({}), u = R(0), d = R(0), c = R(""), p = A(() => [r.value, n.value]), f = Ae(
|
|
3485
|
+
p,
|
|
3486
|
+
(g) => {
|
|
3481
3487
|
if (i.value && (o(), "ResizeObserver" in window && window)) {
|
|
3482
|
-
a = new ResizeObserver((
|
|
3488
|
+
a = new ResizeObserver((_) => {
|
|
3483
3489
|
window.requestAnimationFrame(() => {
|
|
3484
|
-
!Array.isArray(
|
|
3490
|
+
!Array.isArray(_) || !_.length || l();
|
|
3485
3491
|
});
|
|
3486
3492
|
});
|
|
3487
|
-
for (const
|
|
3488
|
-
|
|
3493
|
+
for (const _ of g)
|
|
3494
|
+
_ && a.observe(_);
|
|
3489
3495
|
}
|
|
3490
3496
|
},
|
|
3491
3497
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3492
|
-
),
|
|
3498
|
+
), b = A(() => i.value ? u.value > d.value : !1);
|
|
3493
3499
|
return On(() => {
|
|
3494
3500
|
l();
|
|
3495
3501
|
}), $n(() => {
|
|
3496
3502
|
f();
|
|
3497
|
-
}), (
|
|
3503
|
+
}), (g, _) => {
|
|
3498
3504
|
const M = B("KTooltip");
|
|
3499
|
-
return
|
|
3505
|
+
return h(), S("span", {
|
|
3500
3506
|
ref_key: "contentRef",
|
|
3501
3507
|
ref: s,
|
|
3502
3508
|
class: "content-wrapper"
|
|
3503
3509
|
}, [
|
|
3504
|
-
i.value ? (
|
|
3510
|
+
i.value ? (h(), S("span", Zo, [
|
|
3505
3511
|
N(M, {
|
|
3506
3512
|
"max-width": "300",
|
|
3507
3513
|
placement: "bottomStart",
|
|
3508
|
-
text:
|
|
3514
|
+
text: b.value ? c.value : ""
|
|
3509
3515
|
}, {
|
|
3510
|
-
default:
|
|
3511
|
-
V(
|
|
3516
|
+
default: x(() => [
|
|
3517
|
+
V(g.$slots, "default", {}, void 0, !0)
|
|
3512
3518
|
]),
|
|
3513
3519
|
_: 3
|
|
3514
3520
|
}, 8, ["text"])
|
|
3515
|
-
])) : V(
|
|
3521
|
+
])) : V(g.$slots, "default", { key: 1 }, void 0, !0)
|
|
3516
3522
|
], 512);
|
|
3517
3523
|
};
|
|
3518
3524
|
}
|
|
@@ -3629,76 +3635,76 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3629
3635
|
},
|
|
3630
3636
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3631
3637
|
setup(e, { emit: t }) {
|
|
3632
|
-
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a =
|
|
3633
|
-
var
|
|
3638
|
+
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a = A(() => {
|
|
3639
|
+
var v, y;
|
|
3634
3640
|
return typeof n.errorMessage == "string" ? {
|
|
3635
3641
|
hasError: !!n.errorMessage,
|
|
3636
3642
|
title: n.errorMessage,
|
|
3637
3643
|
message: void 0
|
|
3638
3644
|
} : {
|
|
3639
3645
|
hasError: !!n.errorMessage,
|
|
3640
|
-
title: (
|
|
3641
|
-
message: (
|
|
3646
|
+
title: (v = n.errorMessage) == null ? void 0 : v.title,
|
|
3647
|
+
message: (y = n.errorMessage) == null ? void 0 : y.message
|
|
3642
3648
|
};
|
|
3643
|
-
}), o =
|
|
3644
|
-
const
|
|
3649
|
+
}), o = A(() => n.cacheIdentifier || n.preferencesStorageKey), l = (v) => v.hasData || !!n.query, s = A(() => {
|
|
3650
|
+
const v = [];
|
|
3645
3651
|
return Object.keys(n.tableHeaders).forEach(($) => {
|
|
3646
3652
|
const F = n.tableHeaders[$];
|
|
3647
|
-
|
|
3653
|
+
v.push({
|
|
3648
3654
|
label: F.label ?? $,
|
|
3649
3655
|
key: $,
|
|
3650
3656
|
sortable: F.sortable ?? !1
|
|
3651
3657
|
});
|
|
3652
|
-
}), n.enableEntityActions &&
|
|
3658
|
+
}), n.enableEntityActions && v.push({
|
|
3653
3659
|
key: "actions",
|
|
3654
3660
|
hideLabel: !0
|
|
3655
|
-
}),
|
|
3656
|
-
}),
|
|
3657
|
-
"data-rowid":
|
|
3658
|
-
"data-testid":
|
|
3659
|
-
...n.rowAttributes(
|
|
3660
|
-
}), d = R({}),
|
|
3661
|
-
var
|
|
3662
|
-
return (
|
|
3663
|
-
},
|
|
3664
|
-
const
|
|
3665
|
-
"data-testid":
|
|
3666
|
-
...n.cellAttributes(
|
|
3661
|
+
}), v;
|
|
3662
|
+
}), u = (v) => ({
|
|
3663
|
+
"data-rowid": v.id,
|
|
3664
|
+
"data-testid": v.name,
|
|
3665
|
+
...n.rowAttributes(v)
|
|
3666
|
+
}), d = R({}), c = (v) => {
|
|
3667
|
+
var y;
|
|
3668
|
+
return (y = d.value) == null ? void 0 : y.$el.querySelector(`[data-rowid="${v.id}"]`);
|
|
3669
|
+
}, p = (v) => {
|
|
3670
|
+
const y = {
|
|
3671
|
+
"data-testid": v.headerKey,
|
|
3672
|
+
...n.cellAttributes(v)
|
|
3667
3673
|
};
|
|
3668
|
-
return
|
|
3674
|
+
return v.colIndex === 0 && (y.style = {
|
|
3669
3675
|
maxWidth: "250px",
|
|
3670
3676
|
overflowX: "hidden",
|
|
3671
3677
|
textOverflow: "ellipsis"
|
|
3672
|
-
}),
|
|
3678
|
+
}), y;
|
|
3673
3679
|
}, f = () => {
|
|
3674
|
-
r("empty-state-cta-clicked"),
|
|
3675
|
-
},
|
|
3680
|
+
r("empty-state-cta-clicked"), b();
|
|
3681
|
+
}, b = () => {
|
|
3676
3682
|
r("clear-search-input");
|
|
3677
|
-
},
|
|
3678
|
-
r("click:row",
|
|
3679
|
-
}),
|
|
3680
|
-
r("sort",
|
|
3681
|
-
}, { setTablePreferences: M, getTablePreferences: E } = Hn(), ee =
|
|
3682
|
-
const
|
|
3683
|
+
}, g = A(() => n.disableRowClick ? void 0 : (v, y) => {
|
|
3684
|
+
r("click:row", y);
|
|
3685
|
+
}), _ = (v) => {
|
|
3686
|
+
r("sort", v);
|
|
3687
|
+
}, { setTablePreferences: M, getTablePreferences: E } = Hn(), ee = A(() => {
|
|
3688
|
+
const v = E(n.preferencesStorageKey);
|
|
3683
3689
|
return {
|
|
3684
3690
|
...n.initialFetcherParams,
|
|
3685
|
-
...
|
|
3691
|
+
...v
|
|
3686
3692
|
};
|
|
3687
|
-
}),
|
|
3688
|
-
n.preferencesStorageKey && M(n.preferencesStorageKey,
|
|
3693
|
+
}), m = (v) => {
|
|
3694
|
+
n.preferencesStorageKey && M(n.preferencesStorageKey, v);
|
|
3689
3695
|
};
|
|
3690
|
-
return (
|
|
3691
|
-
const $ = B("KIcon"), F = B("KButton"),
|
|
3692
|
-
return
|
|
3696
|
+
return (v, y) => {
|
|
3697
|
+
const $ = B("KIcon"), F = B("KButton"), k = B("KDropdown"), j = B("KTable"), T = B("KCard");
|
|
3698
|
+
return h(), K(T, {
|
|
3693
3699
|
class: "kong-ui-entity-base-table",
|
|
3694
3700
|
title: e.title
|
|
3695
3701
|
}, {
|
|
3696
|
-
default:
|
|
3702
|
+
default: x(() => [
|
|
3697
3703
|
N(j, {
|
|
3698
3704
|
ref_key: "tableRefs",
|
|
3699
3705
|
ref: d,
|
|
3700
3706
|
"cache-identifier": o.value,
|
|
3701
|
-
"cell-attrs":
|
|
3707
|
+
"cell-attrs": p,
|
|
3702
3708
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3703
3709
|
"disable-sorting": e.disableSorting,
|
|
3704
3710
|
"empty-state-action-message": e.query ? I(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
@@ -3717,46 +3723,46 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3717
3723
|
"initial-fetcher-params": ee.value,
|
|
3718
3724
|
"is-loading": e.isLoading,
|
|
3719
3725
|
"pagination-type": e.paginationType,
|
|
3720
|
-
"row-attrs":
|
|
3726
|
+
"row-attrs": u,
|
|
3721
3727
|
"search-input": e.query,
|
|
3722
3728
|
onKtableEmptyStateCtaClicked: f,
|
|
3723
|
-
"onRow:click":
|
|
3724
|
-
onSort:
|
|
3725
|
-
"onUpdate:tablePreferences":
|
|
3729
|
+
"onRow:click": g.value,
|
|
3730
|
+
onSort: y[0] || (y[0] = (w) => _(w)),
|
|
3731
|
+
"onUpdate:tablePreferences": m
|
|
3726
3732
|
}, _e({
|
|
3727
|
-
toolbar:
|
|
3733
|
+
toolbar: x(({ state: w }) => [
|
|
3728
3734
|
pe(L("div", el, [
|
|
3729
|
-
V(
|
|
3730
|
-
|
|
3731
|
-
V(
|
|
3735
|
+
V(v.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3736
|
+
v.$slots["toolbar-button"] ? (h(), S("div", tl, [
|
|
3737
|
+
V(v.$slots, "toolbar-button", {}, void 0, !0)
|
|
3732
3738
|
])) : D("", !0)
|
|
3733
3739
|
], 512), [
|
|
3734
3740
|
[he, l(w)]
|
|
3735
3741
|
])
|
|
3736
3742
|
]),
|
|
3737
|
-
actions:
|
|
3743
|
+
actions: x(({ row: w, rowKey: U, rowValue: q }) => [
|
|
3738
3744
|
L("div", {
|
|
3739
3745
|
class: "actions-container",
|
|
3740
3746
|
"data-testid": w.name
|
|
3741
3747
|
}, [
|
|
3742
|
-
N(
|
|
3748
|
+
N(k, {
|
|
3743
3749
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3744
3750
|
width: e.dropdownMenuWidth
|
|
3745
3751
|
}, {
|
|
3746
|
-
items:
|
|
3747
|
-
V(
|
|
3752
|
+
items: x(() => [
|
|
3753
|
+
V(v.$slots, "actions", {
|
|
3748
3754
|
row: w,
|
|
3749
3755
|
rowKey: U,
|
|
3750
3756
|
rowValue: q
|
|
3751
3757
|
}, void 0, !0)
|
|
3752
3758
|
]),
|
|
3753
|
-
default:
|
|
3759
|
+
default: x(() => [
|
|
3754
3760
|
N(F, {
|
|
3755
3761
|
class: "actions-trigger",
|
|
3756
3762
|
"data-testid": "overflow-actions-button",
|
|
3757
3763
|
size: "small"
|
|
3758
3764
|
}, {
|
|
3759
|
-
icon:
|
|
3765
|
+
icon: x(() => [
|
|
3760
3766
|
N($, {
|
|
3761
3767
|
color: I(Cr),
|
|
3762
3768
|
icon: "more",
|
|
@@ -3774,13 +3780,13 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3774
3780
|
}, [
|
|
3775
3781
|
ie(e.tableHeaders, (w, U) => ({
|
|
3776
3782
|
name: U,
|
|
3777
|
-
fn:
|
|
3783
|
+
fn: x(({ row: q, rowKey: J, rowValue: fe }) => [
|
|
3778
3784
|
N(Xo, {
|
|
3779
3785
|
"key-name": String(U),
|
|
3780
|
-
"row-el":
|
|
3786
|
+
"row-el": c(q)
|
|
3781
3787
|
}, {
|
|
3782
|
-
default:
|
|
3783
|
-
V(
|
|
3788
|
+
default: x(() => [
|
|
3789
|
+
V(v.$slots, U, {
|
|
3784
3790
|
row: q,
|
|
3785
3791
|
rowKey: J,
|
|
3786
3792
|
rowValue: fe
|
|
@@ -3794,7 +3800,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3794
3800
|
})),
|
|
3795
3801
|
e.query ? void 0 : {
|
|
3796
3802
|
name: "empty-state-action-icon",
|
|
3797
|
-
fn:
|
|
3803
|
+
fn: x(() => [
|
|
3798
3804
|
N(I(bo))
|
|
3799
3805
|
]),
|
|
3800
3806
|
key: "0"
|
|
@@ -3850,14 +3856,14 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3850
3856
|
},
|
|
3851
3857
|
emits: ["cancel", "proceed"],
|
|
3852
3858
|
setup(e, { emit: t }) {
|
|
3853
|
-
const { i18nT: n } = z.useI18n(), r = e, i = t, a =
|
|
3859
|
+
const { i18nT: n } = z.useI18n(), r = e, i = t, a = A(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
3854
3860
|
i("cancel");
|
|
3855
3861
|
}, l = () => {
|
|
3856
3862
|
i("proceed");
|
|
3857
3863
|
};
|
|
3858
|
-
return (s,
|
|
3859
|
-
const d = B("KAlert"),
|
|
3860
|
-
return
|
|
3864
|
+
return (s, u) => {
|
|
3865
|
+
const d = B("KAlert"), c = B("KPrompt");
|
|
3866
|
+
return h(), K(c, {
|
|
3861
3867
|
"action-button-appearance": "danger",
|
|
3862
3868
|
"action-button-disabled": e.actionPending,
|
|
3863
3869
|
"action-button-text": "Yes, delete",
|
|
@@ -3868,10 +3874,10 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3868
3874
|
onCancel: o,
|
|
3869
3875
|
onProceed: l
|
|
3870
3876
|
}, {
|
|
3871
|
-
default:
|
|
3872
|
-
e.error ? (
|
|
3877
|
+
default: x(() => [
|
|
3878
|
+
e.error ? (h(), S("div", il, [
|
|
3873
3879
|
N(d, { appearance: "danger" }, {
|
|
3874
|
-
default:
|
|
3880
|
+
default: x(() => [
|
|
3875
3881
|
Y(O(e.error), 1)
|
|
3876
3882
|
]),
|
|
3877
3883
|
_: 1
|
|
@@ -3882,20 +3888,20 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3882
3888
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3883
3889
|
tag: "p"
|
|
3884
3890
|
}, _e({
|
|
3885
|
-
entityType:
|
|
3891
|
+
entityType: x(() => [
|
|
3886
3892
|
Y(O(r.entityType), 1)
|
|
3887
3893
|
]),
|
|
3888
3894
|
_: 2
|
|
3889
3895
|
}, [
|
|
3890
3896
|
r.entityName ? {
|
|
3891
3897
|
name: "entityName",
|
|
3892
|
-
fn:
|
|
3898
|
+
fn: x(() => [
|
|
3893
3899
|
L("strong", null, O(r.entityName), 1)
|
|
3894
3900
|
]),
|
|
3895
3901
|
key: "0"
|
|
3896
3902
|
} : void 0
|
|
3897
3903
|
]), 1032, ["keypath"]),
|
|
3898
|
-
r.description || s.$slots.description ? (
|
|
3904
|
+
r.description || s.$slots.description ? (h(), S("div", al, [
|
|
3899
3905
|
V(s.$slots, "description", {}, () => [
|
|
3900
3906
|
L("p", null, O(r.description), 1)
|
|
3901
3907
|
], !0)
|
|
@@ -3928,7 +3934,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3928
3934
|
}
|
|
3929
3935
|
},
|
|
3930
3936
|
setup(e) {
|
|
3931
|
-
return (t, n) => (
|
|
3937
|
+
return (t, n) => (h(), S("svg", ll, [
|
|
3932
3938
|
L("mask", sl, [
|
|
3933
3939
|
L("rect", {
|
|
3934
3940
|
fill: e.color,
|
|
@@ -3967,67 +3973,67 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3967
3973
|
},
|
|
3968
3974
|
emits: ["update:modelValue"],
|
|
3969
3975
|
setup(e, { emit: t }) {
|
|
3970
|
-
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = R(/* @__PURE__ */ new Set()), s =
|
|
3971
|
-
const
|
|
3972
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
3973
|
-
|
|
3974
|
-
}),
|
|
3975
|
-
}),
|
|
3976
|
-
const
|
|
3977
|
-
return Object.keys(
|
|
3978
|
-
label:
|
|
3979
|
-
value:
|
|
3976
|
+
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = R(/* @__PURE__ */ new Set()), s = A(() => {
|
|
3977
|
+
const m = [];
|
|
3978
|
+
return new URLSearchParams(r.modelValue).forEach((v, y) => {
|
|
3979
|
+
v !== "" && m.push(y);
|
|
3980
|
+
}), m;
|
|
3981
|
+
}), u = A(() => {
|
|
3982
|
+
const m = r.config.fields;
|
|
3983
|
+
return Object.keys(m).filter((v) => m[v].searchable).map((v) => ({
|
|
3984
|
+
label: m[v].label || v,
|
|
3985
|
+
value: v,
|
|
3980
3986
|
expanded: !1
|
|
3981
3987
|
}));
|
|
3982
3988
|
});
|
|
3983
|
-
Ae(() => r.modelValue, (
|
|
3984
|
-
o.value = {}, new URLSearchParams(
|
|
3985
|
-
o.value[
|
|
3989
|
+
Ae(() => r.modelValue, (m) => {
|
|
3990
|
+
o.value = {}, new URLSearchParams(m).forEach((v, y) => {
|
|
3991
|
+
o.value[y] = v;
|
|
3986
3992
|
});
|
|
3987
3993
|
});
|
|
3988
3994
|
const d = () => {
|
|
3989
3995
|
a.value = !a.value;
|
|
3990
|
-
},
|
|
3991
|
-
l.value.has(
|
|
3992
|
-
},
|
|
3993
|
-
i("update:modelValue",
|
|
3996
|
+
}, c = (m) => {
|
|
3997
|
+
l.value.has(m) ? l.value.delete(m) : l.value.add(m);
|
|
3998
|
+
}, p = (m) => {
|
|
3999
|
+
i("update:modelValue", m);
|
|
3994
4000
|
}, f = () => {
|
|
3995
|
-
|
|
3996
|
-
},
|
|
3997
|
-
var
|
|
3998
|
-
return (((
|
|
4001
|
+
p("");
|
|
4002
|
+
}, b = (m) => `filter-${m}`, g = (m) => {
|
|
4003
|
+
var v, y;
|
|
4004
|
+
return (((y = (v = r.config.schema) == null ? void 0 : v[m]) == null ? void 0 : y.values) ?? []).map(($) => ({
|
|
3999
4005
|
value: $,
|
|
4000
4006
|
label: $
|
|
4001
4007
|
}));
|
|
4002
|
-
},
|
|
4003
|
-
var
|
|
4004
|
-
return ((
|
|
4005
|
-
}, M = (
|
|
4008
|
+
}, _ = (m) => {
|
|
4009
|
+
var v, y;
|
|
4010
|
+
return ((y = (v = r.config.schema) == null ? void 0 : v[m]) == null ? void 0 : y.type) ?? "text";
|
|
4011
|
+
}, M = (m) => {
|
|
4006
4012
|
o.value = {
|
|
4007
4013
|
...o.value,
|
|
4008
|
-
[
|
|
4014
|
+
[m]: ""
|
|
4009
4015
|
}, ee();
|
|
4010
4016
|
}, E = () => {
|
|
4011
4017
|
o.value = {}, ee(!0);
|
|
4012
|
-
}, ee = (
|
|
4013
|
-
const
|
|
4014
|
-
|
|
4018
|
+
}, ee = (m = !1) => {
|
|
4019
|
+
const v = Object.keys(o.value).reduce((y, $) => (o.value[$] && (y[$] = `${o.value[$]}`), y), {});
|
|
4020
|
+
m && (a.value = !1), i("update:modelValue", new URLSearchParams(v).toString());
|
|
4015
4021
|
};
|
|
4016
|
-
return (
|
|
4017
|
-
const
|
|
4018
|
-
return e.config.isExactMatch ? (
|
|
4022
|
+
return (m, v) => {
|
|
4023
|
+
const y = B("KInput"), $ = B("KButton"), F = B("KSelect");
|
|
4024
|
+
return e.config.isExactMatch ? (h(), K(y, {
|
|
4019
4025
|
key: 0,
|
|
4020
4026
|
autocomplete: "off",
|
|
4021
4027
|
class: "kong-ui-entity-filter-input",
|
|
4022
4028
|
"data-testid": "search-input",
|
|
4023
4029
|
"model-value": e.modelValue,
|
|
4024
4030
|
placeholder: e.config.placeholder,
|
|
4025
|
-
"onUpdate:modelValue":
|
|
4031
|
+
"onUpdate:modelValue": p
|
|
4026
4032
|
}, {
|
|
4027
|
-
before:
|
|
4033
|
+
before: x(() => [
|
|
4028
4034
|
N(Et)
|
|
4029
4035
|
]),
|
|
4030
|
-
after:
|
|
4036
|
+
after: x(() => [
|
|
4031
4037
|
pe(N(I(Ko), {
|
|
4032
4038
|
class: "kong-ui-entity-filter-clear",
|
|
4033
4039
|
onClick: f
|
|
@@ -4036,13 +4042,13 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4036
4042
|
])
|
|
4037
4043
|
]),
|
|
4038
4044
|
_: 1
|
|
4039
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4045
|
+
}, 8, ["model-value", "placeholder"])) : (h(), S("div", fl, [
|
|
4040
4046
|
N($, {
|
|
4041
4047
|
appearance: "tertiary",
|
|
4042
4048
|
"data-testid": "filter-button",
|
|
4043
4049
|
onClick: d
|
|
4044
4050
|
}, {
|
|
4045
|
-
default:
|
|
4051
|
+
default: x(() => [
|
|
4046
4052
|
N(Et),
|
|
4047
4053
|
Y(" " + O(I(n)("filter.filterButtonText")) + " " + O(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4048
4054
|
]),
|
|
@@ -4055,61 +4061,61 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4055
4061
|
[he, a.value]
|
|
4056
4062
|
]),
|
|
4057
4063
|
pe(L("div", pl, [
|
|
4058
|
-
(
|
|
4064
|
+
(h(!0), S(le, null, ie(u.value, (k) => {
|
|
4059
4065
|
var j, T;
|
|
4060
|
-
return
|
|
4061
|
-
key:
|
|
4066
|
+
return h(), S("div", {
|
|
4067
|
+
key: k.value,
|
|
4062
4068
|
class: "kong-ui-entity-filter-menu-item",
|
|
4063
|
-
"data-testid":
|
|
4069
|
+
"data-testid": k.value
|
|
4064
4070
|
}, [
|
|
4065
4071
|
L("span", {
|
|
4066
|
-
class: ue(["menu-item-title", { expanded: l.value.has(
|
|
4072
|
+
class: ue(["menu-item-title", { expanded: l.value.has(k.value) }]),
|
|
4067
4073
|
role: "button",
|
|
4068
4074
|
tabindex: "0",
|
|
4069
|
-
onClick: (w) =>
|
|
4070
|
-
onKeydown: Ln((w) =>
|
|
4075
|
+
onClick: (w) => c(k.value),
|
|
4076
|
+
onKeydown: Ln((w) => c(k.value), ["enter"])
|
|
4071
4077
|
}, [
|
|
4072
|
-
Y(O(
|
|
4078
|
+
Y(O(k.label) + " ", 1),
|
|
4073
4079
|
pe(L("span", gl, null, 512), [
|
|
4074
|
-
[he, s.value.includes(
|
|
4080
|
+
[he, s.value.includes(k.value)]
|
|
4075
4081
|
]),
|
|
4076
4082
|
N(I(Oo), {
|
|
4077
|
-
class: ue(["menu-item-expand-icon", { expanded: l.value.has(
|
|
4083
|
+
class: ue(["menu-item-expand-icon", { expanded: l.value.has(k.value) }]),
|
|
4078
4084
|
color: I(_r)
|
|
4079
4085
|
}, null, 8, ["class", "color"])
|
|
4080
4086
|
], 42, ml),
|
|
4081
4087
|
pe(L("div", yl, [
|
|
4082
4088
|
L("label", {
|
|
4083
4089
|
class: "menu-item-label",
|
|
4084
|
-
for:
|
|
4090
|
+
for: b(k.value)
|
|
4085
4091
|
}, O(I(n)("filter.fieldLabel")), 9, vl),
|
|
4086
|
-
((T = (j = e.config.schema) == null ? void 0 : j[
|
|
4092
|
+
((T = (j = e.config.schema) == null ? void 0 : j[k.value]) == null ? void 0 : T.type) === "select" ? (h(), K(F, {
|
|
4087
4093
|
key: 0,
|
|
4088
|
-
id:
|
|
4089
|
-
modelValue: o.value[
|
|
4090
|
-
"onUpdate:modelValue": (w) => o.value[
|
|
4091
|
-
items:
|
|
4094
|
+
id: b(k.value),
|
|
4095
|
+
modelValue: o.value[k.value],
|
|
4096
|
+
"onUpdate:modelValue": (w) => o.value[k.value] = w,
|
|
4097
|
+
items: g(k.value),
|
|
4092
4098
|
placeholder: I(n)("filter.selectPlaceholder")
|
|
4093
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4099
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), K(y, {
|
|
4094
4100
|
key: 1,
|
|
4095
|
-
id:
|
|
4096
|
-
modelValue: o.value[
|
|
4097
|
-
"onUpdate:modelValue": (w) => o.value[
|
|
4101
|
+
id: b(k.value),
|
|
4102
|
+
modelValue: o.value[k.value],
|
|
4103
|
+
"onUpdate:modelValue": (w) => o.value[k.value] = w,
|
|
4098
4104
|
autocomplete: "off",
|
|
4099
4105
|
placeholder: I(n)("filter.inputPlaceholder"),
|
|
4100
|
-
type:
|
|
4106
|
+
type: _(k.value)
|
|
4101
4107
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4102
4108
|
], 512), [
|
|
4103
|
-
[he, l.value.has(
|
|
4109
|
+
[he, l.value.has(k.value)]
|
|
4104
4110
|
]),
|
|
4105
4111
|
pe(L("div", bl, [
|
|
4106
4112
|
N($, {
|
|
4107
4113
|
appearance: "tertiary",
|
|
4108
4114
|
"data-testid": "apply-filter",
|
|
4109
4115
|
size: "small",
|
|
4110
|
-
onClick:
|
|
4116
|
+
onClick: v[0] || (v[0] = (w) => ee(!0))
|
|
4111
4117
|
}, {
|
|
4112
|
-
default:
|
|
4118
|
+
default: x(() => [
|
|
4113
4119
|
Y(O(I(n)("filter.applyButtonText")), 1)
|
|
4114
4120
|
]),
|
|
4115
4121
|
_: 1
|
|
@@ -4118,15 +4124,15 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4118
4124
|
appearance: "tertiary",
|
|
4119
4125
|
"data-testid": "clear-filter",
|
|
4120
4126
|
size: "small",
|
|
4121
|
-
onClick: (w) => M(
|
|
4127
|
+
onClick: (w) => M(k.value)
|
|
4122
4128
|
}, {
|
|
4123
|
-
default:
|
|
4129
|
+
default: x(() => [
|
|
4124
4130
|
Y(O(I(n)("filter.clearButtonText")), 1)
|
|
4125
4131
|
]),
|
|
4126
4132
|
_: 2
|
|
4127
4133
|
}, 1032, ["onClick"])
|
|
4128
4134
|
], 512), [
|
|
4129
|
-
[he, l.value.has(
|
|
4135
|
+
[he, l.value.has(k.value)]
|
|
4130
4136
|
])
|
|
4131
4137
|
], 8, hl);
|
|
4132
4138
|
}), 128)),
|
|
@@ -4136,7 +4142,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4136
4142
|
size: "small",
|
|
4137
4143
|
onClick: E
|
|
4138
4144
|
}, {
|
|
4139
|
-
default:
|
|
4145
|
+
default: x(() => [
|
|
4140
4146
|
Y(O(I(n)("filter.clearAllButtonText")), 1)
|
|
4141
4147
|
]),
|
|
4142
4148
|
_: 1
|
|
@@ -4180,43 +4186,43 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4180
4186
|
},
|
|
4181
4187
|
emits: ["cancel", "proceed"],
|
|
4182
4188
|
setup(e, { emit: t }) {
|
|
4183
|
-
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o = R(!1), l =
|
|
4189
|
+
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o = R(!1), l = A(
|
|
4184
4190
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
4185
|
-
), s =
|
|
4191
|
+
), s = A(
|
|
4186
4192
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4187
|
-
),
|
|
4193
|
+
), u = () => a("cancel"), d = async () => {
|
|
4188
4194
|
if (i.onConfirm) {
|
|
4189
4195
|
o.value = !0;
|
|
4190
4196
|
try {
|
|
4191
4197
|
await i.onConfirm(), a("proceed");
|
|
4192
|
-
} catch (
|
|
4193
|
-
console.error(
|
|
4198
|
+
} catch (c) {
|
|
4199
|
+
console.error(c);
|
|
4194
4200
|
} finally {
|
|
4195
4201
|
o.value = !1;
|
|
4196
4202
|
}
|
|
4197
4203
|
}
|
|
4198
4204
|
};
|
|
4199
|
-
return (
|
|
4205
|
+
return (c, p) => {
|
|
4200
4206
|
const f = B("KPrompt");
|
|
4201
|
-
return
|
|
4207
|
+
return h(), K(Nn, { to: "body" }, [
|
|
4202
4208
|
N(f, {
|
|
4203
4209
|
"action-button-disabled": o.value,
|
|
4204
4210
|
"action-button-text": s.value,
|
|
4205
4211
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
4206
4212
|
title: l.value,
|
|
4207
4213
|
visible: e.visible,
|
|
4208
|
-
onCancel:
|
|
4214
|
+
onCancel: u,
|
|
4209
4215
|
onProceed: d
|
|
4210
4216
|
}, {
|
|
4211
|
-
default:
|
|
4217
|
+
default: x(() => [
|
|
4212
4218
|
N(I(r), {
|
|
4213
4219
|
keypath: `toggleModal.${i.action}.message`,
|
|
4214
4220
|
scope: "global"
|
|
4215
4221
|
}, {
|
|
4216
|
-
entityType:
|
|
4222
|
+
entityType: x(() => [
|
|
4217
4223
|
Y(O(e.entityType), 1)
|
|
4218
4224
|
]),
|
|
4219
|
-
entityName:
|
|
4225
|
+
entityName: x(() => [
|
|
4220
4226
|
L("strong", null, O(e.entityName), 1)
|
|
4221
4227
|
]),
|
|
4222
4228
|
_: 1
|
|
@@ -4249,7 +4255,7 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4249
4255
|
}
|
|
4250
4256
|
},
|
|
4251
4257
|
setup(e) {
|
|
4252
|
-
const t = e, n = R(void 0), r =
|
|
4258
|
+
const t = e, n = R(void 0), r = A(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4253
4259
|
return Ae(() => t.authFunction, async () => {
|
|
4254
4260
|
n.value = await t.authFunction();
|
|
4255
4261
|
}, { immediate: !0 }), (i, a) => r.value ? V(i.$slots, "default", {
|
|
@@ -4292,21 +4298,21 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4292
4298
|
},
|
|
4293
4299
|
setup(e) {
|
|
4294
4300
|
const t = Ge();
|
|
4295
|
-
return (n, r) => (
|
|
4301
|
+
return (n, r) => (h(), S("fieldset", {
|
|
4296
4302
|
class: ue(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4297
4303
|
}, [
|
|
4298
4304
|
L("div", _l, [
|
|
4299
|
-
e.hideInfoHeader ? D("", !0) : (
|
|
4305
|
+
e.hideInfoHeader ? D("", !0) : (h(), S("div", {
|
|
4300
4306
|
key: 0,
|
|
4301
4307
|
class: ue(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4302
4308
|
}, [
|
|
4303
|
-
e.title ? (
|
|
4304
|
-
e.description || I(t).description ? (
|
|
4309
|
+
e.title ? (h(), S("h4", kl, O(e.title), 1)) : D("", !0),
|
|
4310
|
+
e.description || I(t).description ? (h(), S("div", Al, [
|
|
4305
4311
|
V(n.$slots, "description", {}, () => [
|
|
4306
4312
|
L("p", null, O(e.description), 1)
|
|
4307
4313
|
], !0)
|
|
4308
4314
|
])) : D("", !0),
|
|
4309
|
-
I(t).footer ? (
|
|
4315
|
+
I(t).footer ? (h(), S("div", wl, [
|
|
4310
4316
|
V(n.$slots, "footer", {}, void 0, !0)
|
|
4311
4317
|
])) : D("", !0)
|
|
4312
4318
|
], 2)),
|
|
@@ -4346,26 +4352,26 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4346
4352
|
}
|
|
4347
4353
|
},
|
|
4348
4354
|
setup(e) {
|
|
4349
|
-
const t = e, n = R(), { isTruncated: r } = z.useTruncationDetector(n), { i18n: { t: i } } = z.useI18n(), a = i("global.actions.copyId"), o = R(a), l =
|
|
4350
|
-
await
|
|
4355
|
+
const t = e, n = R(), { isTruncated: r } = z.useTruncationDetector(n), { i18n: { t: i } } = z.useI18n(), a = i("global.actions.copyId"), o = R(a), l = A(() => t.entityLinkData.deleted ?? !1), s = A(() => t.entityLinkData.id.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id), u = A(() => `${s.value.toString().slice(0, 5)} (deleted)`), d = async (c) => {
|
|
4356
|
+
await c(s.value || "") && (o.value = i("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4351
4357
|
o.value = a;
|
|
4352
4358
|
}, 1800));
|
|
4353
4359
|
};
|
|
4354
|
-
return (
|
|
4355
|
-
const f = B("KTooltip"),
|
|
4356
|
-
return
|
|
4357
|
-
l.value ? (
|
|
4360
|
+
return (c, p) => {
|
|
4361
|
+
const f = B("KTooltip"), b = B("KExternalLink"), g = B("KClipboardProvider");
|
|
4362
|
+
return h(), S("div", El, [
|
|
4363
|
+
l.value ? (h(), S("div", Tl, O(u.value), 1)) : s.value ? s.value ? (h(), K(b, {
|
|
4358
4364
|
key: 2,
|
|
4359
4365
|
class: "entity-link",
|
|
4360
4366
|
"hide-icon": !e.newWindow,
|
|
4361
4367
|
href: e.externalLink,
|
|
4362
4368
|
target: e.newWindow ? "_blank" : "_self"
|
|
4363
4369
|
}, {
|
|
4364
|
-
default:
|
|
4370
|
+
default: x(() => [
|
|
4365
4371
|
N(f, {
|
|
4366
4372
|
text: I(r) && e.entityLinkData.label || ""
|
|
4367
4373
|
}, {
|
|
4368
|
-
default:
|
|
4374
|
+
default: x(() => [
|
|
4369
4375
|
L("span", {
|
|
4370
4376
|
ref_key: "textContent",
|
|
4371
4377
|
ref: n,
|
|
@@ -4376,20 +4382,20 @@ const lo = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4376
4382
|
}, 8, ["text"])
|
|
4377
4383
|
]),
|
|
4378
4384
|
_: 1
|
|
4379
|
-
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (
|
|
4380
|
-
s.value && e.allowCopy ? (
|
|
4385
|
+
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (h(), S("div", Fl, O(" – "))),
|
|
4386
|
+
s.value && e.allowCopy ? (h(), K(f, {
|
|
4381
4387
|
key: o.value,
|
|
4382
4388
|
class: "copy-uuid-tooltip",
|
|
4383
4389
|
"max-width": "160",
|
|
4384
4390
|
placement: "bottomEnd",
|
|
4385
4391
|
text: o.value
|
|
4386
4392
|
}, {
|
|
4387
|
-
default:
|
|
4388
|
-
N(
|
|
4389
|
-
default:
|
|
4393
|
+
default: x(() => [
|
|
4394
|
+
N(g, null, {
|
|
4395
|
+
default: x(({ copyToClipboard: _ }) => [
|
|
4390
4396
|
L("span", {
|
|
4391
4397
|
class: "entity-link-copy-id",
|
|
4392
|
-
onClick: He((M) => d(
|
|
4398
|
+
onClick: He((M) => d(_), ["stop"])
|
|
4393
4399
|
}, [
|
|
4394
4400
|
N(I(Po), {
|
|
4395
4401
|
class: "copy-icon",
|