@kong-ui-public/entities-shared 3.5.0 → 3.5.1-pr.1503.022703e2.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 $n, ref as
|
|
1
|
+
import { inject as $n, ref as K, computed as C, unref as I, watch as Ae, defineComponent as P, openBlock as m, createBlock as D, resolveDynamicComponent as se, normalizeClass as fe, withCtx as b, createElementBlock as A, createElementVNode as L, toDisplayString as O, createCommentVNode as j, Fragment as ue, renderList as oe, resolveComponent as U, createVNode as M, createTextVNode as V, useCssVars as Ot, useSlots as Xe, renderSlot as z, createSlots as _e, normalizeProps as Fn, guardReactiveProps as On, mergeProps as Ln, normalizeStyle as Se, pushScopeId as Ie, popScopeId as Ee, onBeforeMount as Lt, withModifiers as Ye, onMounted as Nn, onUnmounted as Bn, withDirectives as me, vShow as ge, withKeys as Rn, Teleport as Mn } from "vue";
|
|
2
2
|
import st from "axios";
|
|
3
3
|
import { createI18n as Kn, i18nTComponent as Dn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Un } from "@kong/kongponents";
|
|
@@ -247,66 +247,72 @@ function ar(e, t, n, r = {
|
|
|
247
247
|
searchKeys: ["id"]
|
|
248
248
|
}) {
|
|
249
249
|
n || (n = "1000");
|
|
250
|
-
const { axiosInstance: i } = et(e.axiosRequestConfig), { i18n: { t: a } } = je(), { debounce: o } = Vn(), l = o(async (
|
|
251
|
-
await
|
|
252
|
-
}, 200), s =
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
250
|
+
const { axiosInstance: i } = et(e.axiosRequestConfig), { i18n: { t: a } } = je(), { debounce: o } = Vn(), l = o(async ($) => {
|
|
251
|
+
await w($);
|
|
252
|
+
}, 200), s = K(!1), c = K(""), d = K(""), u = K([]), h = K([]), p = K(void 0), y = C(() => {
|
|
253
|
+
const $ = `${e.apiBaseUrl}${I(t)}`;
|
|
254
|
+
return e.app === "konnect" ? $.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? $.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : $;
|
|
255
|
+
}), { isValidUuid: x } = Nt(), _ = async () => {
|
|
256
256
|
try {
|
|
257
257
|
s.value = !0;
|
|
258
|
-
const { data:
|
|
259
|
-
|
|
258
|
+
const { data: $ } = await i.get(`${y.value}?size=${n}`);
|
|
259
|
+
$ != null && $.next || (p.value = r.fetchedItemsKey in $ ? $[r.fetchedItemsKey] : []), h.value = r.fetchedItemsKey in $ ? $[r.fetchedItemsKey] : [], u.value = h.value;
|
|
260
260
|
} catch {
|
|
261
261
|
u.value = [], c.value = a("debouncedFilter.errors.fetch");
|
|
262
262
|
} finally {
|
|
263
263
|
s.value = !1;
|
|
264
264
|
}
|
|
265
|
-
},
|
|
266
|
-
var
|
|
267
|
-
if (
|
|
268
|
-
if (
|
|
265
|
+
}, N = K(""), w = async ($) => {
|
|
266
|
+
var g, S, f;
|
|
267
|
+
if (N.value !== $) {
|
|
268
|
+
if ($ === "") {
|
|
269
|
+
u.value = h.value;
|
|
270
|
+
return;
|
|
271
|
+
} else
|
|
272
|
+
N.value = $ || "";
|
|
273
|
+
if (p.value === void 0)
|
|
269
274
|
try {
|
|
270
275
|
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
271
|
-
let
|
|
272
|
-
|
|
273
|
-
const { data:
|
|
274
|
-
r.fetchedItemsKey in
|
|
275
|
-
} else if (
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
const { data:
|
|
279
|
-
return [
|
|
280
|
-
})()) :
|
|
281
|
-
...r.searchKeys.filter((
|
|
282
|
-
const { data:
|
|
283
|
-
return
|
|
276
|
+
let v = y.value + "";
|
|
277
|
+
$ && (v += `/${$}`);
|
|
278
|
+
const { data: F } = await i.get(`${v}?size=${n}`);
|
|
279
|
+
r.fetchedItemsKey in F ? u.value = F[r.fetchedItemsKey] : F != null && F[r.exactMatchKey ?? "id"] ? u.value = [F] : u.value = [];
|
|
280
|
+
} else if ($) {
|
|
281
|
+
const v = [];
|
|
282
|
+
x($) && r.searchKeys.includes("id") ? v.push((async () => {
|
|
283
|
+
const { data: R } = await i.get(`${y.value}/${$}`);
|
|
284
|
+
return [R[r.fetchedItemsKey] ?? R];
|
|
285
|
+
})()) : v.push(
|
|
286
|
+
...r.searchKeys.filter((R) => R !== "id").map(async (R) => {
|
|
287
|
+
const { data: B } = await i.get(`${y.value}?${R}=${$}`);
|
|
288
|
+
return B[r.fetchedItemsKey];
|
|
284
289
|
})
|
|
285
290
|
);
|
|
286
|
-
const
|
|
287
|
-
u.value = [], (
|
|
288
|
-
var
|
|
289
|
-
(
|
|
290
|
-
|
|
291
|
+
const F = await Promise.all(v), E = /* @__PURE__ */ new Set();
|
|
292
|
+
u.value = [], (g = F == null ? void 0 : F.forEach) == null || g.call(F, (R) => {
|
|
293
|
+
var B;
|
|
294
|
+
(B = R == null ? void 0 : R.forEach) == null || B.call(R, (T) => {
|
|
295
|
+
E.has(T.id) || (E.add(T.id), u.value.push(T));
|
|
291
296
|
});
|
|
292
297
|
});
|
|
293
298
|
} else
|
|
294
|
-
u.value =
|
|
295
|
-
} catch (
|
|
296
|
-
((
|
|
299
|
+
u.value = h.value;
|
|
300
|
+
} catch (v) {
|
|
301
|
+
((S = v == null ? void 0 : v.response) == null ? void 0 : S.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (u.value = [], c.value = a("debouncedFilter.errors.fetch"));
|
|
297
302
|
} finally {
|
|
298
303
|
s.value = !1;
|
|
299
304
|
}
|
|
300
305
|
else
|
|
301
|
-
s.value = !0, d.value = "",
|
|
302
|
-
var
|
|
303
|
-
let
|
|
304
|
-
for (const
|
|
305
|
-
const
|
|
306
|
-
|
|
306
|
+
s.value = !0, d.value = "", $ ? (u.value = (f = p.value) == null ? void 0 : f.filter((v) => {
|
|
307
|
+
var E;
|
|
308
|
+
let F = !1;
|
|
309
|
+
for (const R of r.searchKeys) {
|
|
310
|
+
const B = typeof v[R] == "string" ? (E = v[R]) == null ? void 0 : E.toLowerCase() : v[R];
|
|
311
|
+
B != null && B.includes($.toLowerCase()) && (F = !0);
|
|
307
312
|
}
|
|
308
|
-
return
|
|
313
|
+
return F;
|
|
309
314
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = p.value, s.value = !1;
|
|
315
|
+
}
|
|
310
316
|
};
|
|
311
317
|
return {
|
|
312
318
|
loading: s,
|
|
@@ -314,12 +320,12 @@ function ar(e, t, n, r = {
|
|
|
314
320
|
validationError: d,
|
|
315
321
|
results: u,
|
|
316
322
|
allRecords: p,
|
|
317
|
-
loadItems:
|
|
323
|
+
loadItems: _,
|
|
318
324
|
debouncedQueryChange: l
|
|
319
325
|
};
|
|
320
326
|
}
|
|
321
327
|
function or(e, t) {
|
|
322
|
-
const n =
|
|
328
|
+
const n = I(t), r = C(
|
|
323
329
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
324
330
|
);
|
|
325
331
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
@@ -366,17 +372,17 @@ function sr(e) {
|
|
|
366
372
|
}
|
|
367
373
|
}
|
|
368
374
|
function Bt(e, t) {
|
|
369
|
-
const n =
|
|
375
|
+
const n = K(I(e)), r = K(I(t)), i = C(
|
|
370
376
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
371
|
-
), a =
|
|
377
|
+
), a = C(
|
|
372
378
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
373
379
|
);
|
|
374
380
|
return (o) => {
|
|
375
|
-
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query:
|
|
381
|
+
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query: h } = o;
|
|
376
382
|
try {
|
|
377
383
|
let p = new URL(a.value.href);
|
|
378
|
-
return i.value &&
|
|
379
|
-
p.searchParams.append(
|
|
384
|
+
return i.value && h ? (p.search = "", p = n.value.isExactMatch ? new URL(`${p.href}/${h}/`) : new URL(`${p.href}?filter[name][contains]=${h}`)) : (i.value || new URLSearchParams(h).forEach((y, x) => {
|
|
385
|
+
p.searchParams.append(x, y);
|
|
380
386
|
}), d && p.searchParams.append("sort_by", d), u === "desc" && p.searchParams.append("sort_desc", "1"), p.searchParams.append("size", String(s))), c && l !== 1 && p.searchParams.append("offset", String(c)), p.href;
|
|
381
387
|
} catch (p) {
|
|
382
388
|
return console.error("RouteList(fetcher)", p), r.value;
|
|
@@ -384,7 +390,7 @@ function Bt(e, t) {
|
|
|
384
390
|
};
|
|
385
391
|
}
|
|
386
392
|
function ur(e, t, n = "data") {
|
|
387
|
-
const r =
|
|
393
|
+
const r = I(t), { axiosInstance: i } = et(e.axiosRequestConfig), a = Bt(e, r), o = K({
|
|
388
394
|
status: be.Idle
|
|
389
395
|
});
|
|
390
396
|
return { fetcher: async (s) => {
|
|
@@ -396,22 +402,22 @@ function ur(e, t, n = "data") {
|
|
|
396
402
|
const u = await i.get(d);
|
|
397
403
|
if (u.status >= 400)
|
|
398
404
|
throw u;
|
|
399
|
-
const
|
|
405
|
+
const h = u.data, p = n && n.replace(/[^\w-_]/gi, "");
|
|
400
406
|
let y;
|
|
401
|
-
|
|
402
|
-
const
|
|
407
|
+
h[p] && Array.isArray(h[p]) ? y = h[p] : Array.isArray(h) ? y = h : y = Object.keys(h).length ? [h] : [];
|
|
408
|
+
const x = {
|
|
403
409
|
data: y,
|
|
404
410
|
total: y.length,
|
|
405
|
-
...
|
|
411
|
+
...h.offset ? {
|
|
406
412
|
pagination: {
|
|
407
|
-
offset:
|
|
413
|
+
offset: h.offset
|
|
408
414
|
}
|
|
409
415
|
} : null
|
|
410
416
|
};
|
|
411
417
|
return o.value = {
|
|
412
418
|
status: be.Idle,
|
|
413
|
-
response:
|
|
414
|
-
},
|
|
419
|
+
response: x
|
|
420
|
+
}, x;
|
|
415
421
|
} catch (d) {
|
|
416
422
|
const u = {
|
|
417
423
|
data: [],
|
|
@@ -492,11 +498,11 @@ function gr(e) {
|
|
|
492
498
|
return !(o && pt(i, o, "<") || l && pt(i, l, ">"));
|
|
493
499
|
}
|
|
494
500
|
function yr(e) {
|
|
495
|
-
const t =
|
|
501
|
+
const t = K(0), n = K(0), r = K(!1);
|
|
496
502
|
return Ae(e, (a) => {
|
|
497
503
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
498
504
|
}), {
|
|
499
|
-
isTruncated:
|
|
505
|
+
isTruncated: C(() => t.value < n.value)
|
|
500
506
|
};
|
|
501
507
|
}
|
|
502
508
|
function vr() {
|
|
@@ -539,25 +545,25 @@ const Y = {
|
|
|
539
545
|
}
|
|
540
546
|
},
|
|
541
547
|
setup(e) {
|
|
542
|
-
const t = e, { i18n: { t: n } } = Y.useI18n(), { convertKeyToTitle: r } = Y.useStringHelpers(), i =
|
|
548
|
+
const t = e, { i18n: { t: n } } = Y.useI18n(), { convertKeyToTitle: r } = Y.useStringHelpers(), i = C(() => t.item.key ?? "json-array-item"), a = C(() => t.item.value ?? t.item), o = C(() => {
|
|
543
549
|
const s = JSON.parse(JSON.stringify(a.value));
|
|
544
550
|
return t.isArrayItem && delete s.name, s;
|
|
545
|
-
}), l =
|
|
551
|
+
}), l = C(() => {
|
|
546
552
|
var s;
|
|
547
553
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
548
554
|
});
|
|
549
|
-
return (s, c) => (m(),
|
|
555
|
+
return (s, c) => (m(), D(se(e.isArrayItem ? "fieldset" : "div"), {
|
|
550
556
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
551
557
|
}, {
|
|
552
558
|
default: b(() => [
|
|
553
|
-
e.isArrayItem ? (m(),
|
|
559
|
+
e.isArrayItem ? (m(), A("legend", br, [
|
|
554
560
|
L("b", null, O(l.value), 1)
|
|
555
|
-
])) :
|
|
556
|
-
(m(!0),
|
|
561
|
+
])) : j("", !0),
|
|
562
|
+
(m(!0), A(ue, null, oe(Object.keys(o.value), (d, u) => (m(), D(Dt, {
|
|
557
563
|
key: `${i.value}-property-${u}`,
|
|
558
564
|
item: {
|
|
559
565
|
key: d,
|
|
560
|
-
label:
|
|
566
|
+
label: I(r)(d),
|
|
561
567
|
value: o.value[d]
|
|
562
568
|
}
|
|
563
569
|
}, null, 8, ["item"]))), 128))
|
|
@@ -582,15 +588,15 @@ const Y = {
|
|
|
582
588
|
setup(e) {
|
|
583
589
|
const { i18n: { t } } = Y.useI18n();
|
|
584
590
|
return (n, r) => {
|
|
585
|
-
const i =
|
|
586
|
-
return m(),
|
|
587
|
-
|
|
591
|
+
const i = U("KButton");
|
|
592
|
+
return m(), A("div", null, [
|
|
593
|
+
M(i, {
|
|
588
594
|
appearance: "tertiary",
|
|
589
595
|
class: "navigation-button",
|
|
590
596
|
onClick: r[0] || (r[0] = (a) => n.$emit("navigation-click", e.item))
|
|
591
597
|
}, {
|
|
592
598
|
default: b(() => [
|
|
593
|
-
V(O(e.item.value ||
|
|
599
|
+
V(O(e.item.value || I(t)("baseConfigCard.commonFields.link")), 1)
|
|
594
600
|
]),
|
|
595
601
|
_: 1
|
|
596
602
|
})
|
|
@@ -608,12 +614,12 @@ const Y = {
|
|
|
608
614
|
setup(e) {
|
|
609
615
|
const { i18n: { t } } = Y.useI18n();
|
|
610
616
|
return (n, r) => {
|
|
611
|
-
const i =
|
|
612
|
-
return m(),
|
|
617
|
+
const i = U("KBadge");
|
|
618
|
+
return m(), D(i, {
|
|
613
619
|
appearance: e.status ? "success" : "neutral"
|
|
614
620
|
}, {
|
|
615
621
|
default: b(() => [
|
|
616
|
-
V(O(e.status ?
|
|
622
|
+
V(O(e.status ? I(t)("baseConfigCard.statusBadge.enabledLabel") : I(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
617
623
|
]),
|
|
618
624
|
_: 1
|
|
619
625
|
}, 8, ["appearance"]);
|
|
@@ -643,12 +649,12 @@ const Y = {
|
|
|
643
649
|
emits: ["navigation-click"],
|
|
644
650
|
setup(e, { emit: t }) {
|
|
645
651
|
Ot((y) => ({
|
|
646
|
-
dc1d91a8: d.value ? "none" : `solid ${
|
|
652
|
+
dc1d91a8: d.value ? "none" : `solid ${I(Er)} ${I(Ar)}`,
|
|
647
653
|
"59ccec5f": c.value && l.value ? "block" : "flex",
|
|
648
654
|
"29318fbe": c.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
649
655
|
"292d0408": c.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
650
656
|
}));
|
|
651
|
-
const n = e, r = t, i = Xe(), { i18n: { t: a, formatUnixTimeStamp: o } } = Y.useI18n(), l =
|
|
657
|
+
const n = e, r = t, i = Xe(), { i18n: { t: a, formatUnixTimeStamp: o } } = Y.useI18n(), l = C(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = C(() => !!(n.item.tooltip || i["label-tooltip"])), c = C(() => n.item.type === H.Json || n.item.type === H.JsonArray), d = C(() => n.item.type === H.JsonArray), u = C(() => {
|
|
652
658
|
switch (n.item.type) {
|
|
653
659
|
case H.ID:
|
|
654
660
|
return {
|
|
@@ -758,16 +764,16 @@ const Y = {
|
|
|
758
764
|
text: n.item.value
|
|
759
765
|
};
|
|
760
766
|
}
|
|
761
|
-
}),
|
|
762
|
-
return (y,
|
|
763
|
-
const _ =
|
|
764
|
-
return m(),
|
|
767
|
+
}), h = K(), { isTruncated: p } = Y.useTruncationDetector(h);
|
|
768
|
+
return (y, x) => {
|
|
769
|
+
const _ = U("KLabel"), N = U("KBadge"), w = U("KCopy"), $ = U("KTooltip");
|
|
770
|
+
return m(), A("div", Fr, [
|
|
765
771
|
L("div", {
|
|
766
772
|
class: "config-card-details-label",
|
|
767
773
|
"data-testid": `${e.item.key}-label`
|
|
768
774
|
}, [
|
|
769
775
|
z(y.$slots, "label", { item: e.item }, () => [
|
|
770
|
-
|
|
776
|
+
M(_, { "tooltip-attributes": { maxWidth: "500px" } }, _e({
|
|
771
777
|
default: b(() => [
|
|
772
778
|
V(O(e.item.label) + " ", 1)
|
|
773
779
|
]),
|
|
@@ -796,71 +802,71 @@ const Y = {
|
|
|
796
802
|
z(y.$slots, e.item.key, {
|
|
797
803
|
rowValue: e.item.value
|
|
798
804
|
}, () => [
|
|
799
|
-
l.value ? (m(),
|
|
800
|
-
(m(),
|
|
805
|
+
l.value ? (m(), A("div", Rr, [
|
|
806
|
+
(m(), D(se(u.value.tag), Fn(On(u.value.attrs)), {
|
|
801
807
|
default: b(() => [
|
|
802
|
-
u.value.additionalComponent === "KBadge" ? (m(),
|
|
808
|
+
u.value.additionalComponent === "KBadge" ? (m(), A("div", {
|
|
803
809
|
key: 0,
|
|
804
810
|
"data-testid": `${e.item.key}-badge-tags`
|
|
805
811
|
}, [
|
|
806
|
-
(m(!0),
|
|
807
|
-
key: `${e.item.key}-badge-tag-${
|
|
812
|
+
(m(!0), A(ue, null, oe(e.item.value, (g, S) => (m(), D(N, {
|
|
813
|
+
key: `${e.item.key}-badge-tag-${S}`,
|
|
808
814
|
class: "config-badge",
|
|
809
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
810
|
-
tooltip:
|
|
815
|
+
"data-testid": `${e.item.key}-badge-tag-${S}`,
|
|
816
|
+
tooltip: g,
|
|
811
817
|
"truncation-tooltip": ""
|
|
812
818
|
}, {
|
|
813
819
|
default: b(() => [
|
|
814
|
-
V(O(
|
|
820
|
+
V(O(g), 1)
|
|
815
821
|
]),
|
|
816
822
|
_: 2
|
|
817
823
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
818
|
-
], 8, Mr)) :
|
|
819
|
-
u.value.additionalComponent === "KCopy" ? (m(),
|
|
824
|
+
], 8, Mr)) : j("", !0),
|
|
825
|
+
u.value.additionalComponent === "KCopy" ? (m(), A("div", {
|
|
820
826
|
key: 1,
|
|
821
827
|
class: "copy-uuid-array",
|
|
822
828
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
823
829
|
}, [
|
|
824
|
-
(m(!0),
|
|
825
|
-
key: `${e.item.key}-copy-uuid-${
|
|
826
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
827
|
-
text:
|
|
830
|
+
(m(!0), A(ue, null, oe(e.item.value, (g, S) => (m(), D(w, Ln({ ref_for: !0 }, u.value.childAttrs, {
|
|
831
|
+
key: `${e.item.key}-copy-uuid-${S}`,
|
|
832
|
+
"data-testid": `${e.item.key}-copy-uuid-${S}`,
|
|
833
|
+
text: g
|
|
828
834
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
829
|
-
], 8, Kr)) : u.value.additionalComponent === "KMethodBadge" ? (m(),
|
|
835
|
+
], 8, Kr)) : u.value.additionalComponent === "KMethodBadge" ? (m(), A("div", {
|
|
830
836
|
key: 2,
|
|
831
837
|
class: "method-badge-array",
|
|
832
838
|
"data-testid": `${e.item.key}-badge-methods`
|
|
833
839
|
}, [
|
|
834
|
-
(m(!0),
|
|
835
|
-
key: `${e.item.key}-badge-method-${
|
|
836
|
-
appearance: Object.values(
|
|
840
|
+
(m(!0), A(ue, null, oe(e.item.value, (g, S) => (m(), D(N, {
|
|
841
|
+
key: `${e.item.key}-badge-method-${S}`,
|
|
842
|
+
appearance: Object.values(I(Un)).includes(g.toLowerCase()) ? g.toLowerCase() : "custom",
|
|
837
843
|
class: "config-badge",
|
|
838
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
844
|
+
"data-testid": `${e.item.key}-badge-method-${S}`
|
|
839
845
|
}, {
|
|
840
846
|
default: b(() => [
|
|
841
|
-
V(O(
|
|
847
|
+
V(O(g), 1)
|
|
842
848
|
]),
|
|
843
849
|
_: 2
|
|
844
850
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
845
|
-
], 8, Dr)) :
|
|
846
|
-
u.value.additionalComponent === "JsonCardItem" ? (m(),
|
|
851
|
+
], 8, Dr)) : j("", !0),
|
|
852
|
+
u.value.additionalComponent === "JsonCardItem" ? (m(), A("div", {
|
|
847
853
|
key: 3,
|
|
848
854
|
"data-testid": `${n.item.key}-json-array-content`
|
|
849
855
|
}, [
|
|
850
|
-
(m(!0),
|
|
851
|
-
key: `json-array-item-${
|
|
852
|
-
index:
|
|
856
|
+
(m(!0), A(ue, null, oe(e.item.value, (g, S) => (m(), D(Kt, {
|
|
857
|
+
key: `json-array-item-${S}`,
|
|
858
|
+
index: S,
|
|
853
859
|
"is-array-item": "",
|
|
854
|
-
item:
|
|
860
|
+
item: g
|
|
855
861
|
}, null, 8, ["index", "item"]))), 128))
|
|
856
|
-
], 8, Ur)) : (m(),
|
|
862
|
+
], 8, Ur)) : (m(), D($, {
|
|
857
863
|
key: 4,
|
|
858
|
-
text:
|
|
864
|
+
text: I(p) ? e.item.value : ""
|
|
859
865
|
}, {
|
|
860
866
|
default: b(() => [
|
|
861
867
|
L("span", {
|
|
862
868
|
ref_key: "textContent",
|
|
863
|
-
ref:
|
|
869
|
+
ref: h,
|
|
864
870
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
865
871
|
}, O(u.value.text), 3)
|
|
866
872
|
]),
|
|
@@ -869,7 +875,7 @@ const Y = {
|
|
|
869
875
|
]),
|
|
870
876
|
_: 1
|
|
871
877
|
}, 16))
|
|
872
|
-
])) : (m(),
|
|
878
|
+
])) : (m(), A("div", {
|
|
873
879
|
key: 0,
|
|
874
880
|
"data-testid": `${e.item.key}-no-value`
|
|
875
881
|
}, " – ", 8, Br))
|
|
@@ -912,7 +918,7 @@ const Y = {
|
|
|
912
918
|
Ot((i) => ({
|
|
913
919
|
"090794fe": `${r.value}ch`
|
|
914
920
|
}));
|
|
915
|
-
const t = e, n =
|
|
921
|
+
const t = e, n = C(() => t.jsonRecord), r = C(() => {
|
|
916
922
|
var o;
|
|
917
923
|
if (!t.fetcherUrl)
|
|
918
924
|
return 0;
|
|
@@ -920,10 +926,10 @@ const Y = {
|
|
|
920
926
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
921
927
|
});
|
|
922
928
|
return (i, a) => {
|
|
923
|
-
const o =
|
|
924
|
-
return m(),
|
|
925
|
-
t.fetcherUrl ? (m(),
|
|
926
|
-
|
|
929
|
+
const o = U("KBadge"), l = U("KCodeBlock");
|
|
930
|
+
return m(), A("div", Pr, [
|
|
931
|
+
t.fetcherUrl ? (m(), A("div", Hr, [
|
|
932
|
+
M(o, {
|
|
927
933
|
appearance: t.requestMethod
|
|
928
934
|
}, {
|
|
929
935
|
default: b(() => [
|
|
@@ -931,22 +937,22 @@ const Y = {
|
|
|
931
937
|
]),
|
|
932
938
|
_: 1
|
|
933
939
|
}, 8, ["appearance"]),
|
|
934
|
-
|
|
940
|
+
M(l, {
|
|
935
941
|
id: "json-endpoint-codeblock",
|
|
936
942
|
code: t.fetcherUrl,
|
|
937
943
|
language: "json",
|
|
938
944
|
"single-line": "",
|
|
939
945
|
theme: "dark"
|
|
940
946
|
}, null, 8, ["code"])
|
|
941
|
-
])) :
|
|
942
|
-
t.jsonRecord ? (m(),
|
|
947
|
+
])) : j("", !0),
|
|
948
|
+
t.jsonRecord ? (m(), D(l, {
|
|
943
949
|
key: 1,
|
|
944
950
|
id: "json-codeblock",
|
|
945
951
|
class: fe({ "json-content": t.fetcherUrl }),
|
|
946
952
|
code: JSON.stringify(n.value, null, 2),
|
|
947
953
|
language: "json",
|
|
948
954
|
theme: "dark"
|
|
949
|
-
}, null, 8, ["class", "code"])) :
|
|
955
|
+
}, null, 8, ["class", "code"])) : j("", !0)
|
|
950
956
|
]);
|
|
951
957
|
};
|
|
952
958
|
}
|
|
@@ -1380,7 +1386,7 @@ function Ii(e) {
|
|
|
1380
1386
|
return e === null ? !1 : en.exec(e) !== null || tn.exec(e) !== null;
|
|
1381
1387
|
}
|
|
1382
1388
|
function Ei(e) {
|
|
1383
|
-
var t, n, r, i, a, o, l, s = 0, c = null, d, u,
|
|
1389
|
+
var t, n, r, i, a, o, l, s = 0, c = null, d, u, h;
|
|
1384
1390
|
if (t = en.exec(e), t === null && (t = tn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1385
1391
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
1386
1392
|
return new Date(Date.UTC(n, r, i));
|
|
@@ -1389,7 +1395,7 @@ function Ei(e) {
|
|
|
1389
1395
|
s += "0";
|
|
1390
1396
|
s = +s;
|
|
1391
1397
|
}
|
|
1392
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)),
|
|
1398
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), h = new Date(Date.UTC(n, r, i, a, o, l, s)), c && h.setTime(h.getTime() - c), h;
|
|
1393
1399
|
}
|
|
1394
1400
|
function Ti(e) {
|
|
1395
1401
|
return e.toISOString();
|
|
@@ -1564,7 +1570,7 @@ function mn(e, t) {
|
|
|
1564
1570
|
};
|
|
1565
1571
|
return n.snippet = ri(n), new te(t, n);
|
|
1566
1572
|
}
|
|
1567
|
-
function
|
|
1573
|
+
function k(e, t) {
|
|
1568
1574
|
throw mn(e, t);
|
|
1569
1575
|
}
|
|
1570
1576
|
function Ke(e, t) {
|
|
@@ -1573,15 +1579,15 @@ function Ke(e, t) {
|
|
|
1573
1579
|
var bt = {
|
|
1574
1580
|
YAML: function(t, n, r) {
|
|
1575
1581
|
var i, a, o;
|
|
1576
|
-
t.version !== null &&
|
|
1582
|
+
t.version !== null && k(t, "duplication of %YAML directive"), r.length !== 1 && k(t, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), i === null && k(t, "ill-formed argument of the YAML directive"), a = parseInt(i[1], 10), o = parseInt(i[2], 10), a !== 1 && k(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Ke(t, "unsupported YAML version of the document");
|
|
1577
1583
|
},
|
|
1578
1584
|
TAG: function(t, n, r) {
|
|
1579
1585
|
var i, a;
|
|
1580
|
-
r.length !== 2 &&
|
|
1586
|
+
r.length !== 2 && k(t, "TAG directive accepts exactly two arguments"), i = r[0], a = r[1], dn.test(i) || k(t, "ill-formed tag handle (first argument) of the TAG directive"), pe.call(t.tagMap, i) && k(t, 'there is a previously declared suffix for "' + i + '" tag handle'), fn.test(a) || k(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1581
1587
|
try {
|
|
1582
1588
|
a = decodeURIComponent(a);
|
|
1583
1589
|
} catch {
|
|
1584
|
-
|
|
1590
|
+
k(t, "tag prefix is malformed: " + a);
|
|
1585
1591
|
}
|
|
1586
1592
|
t.tagMap[i] = a;
|
|
1587
1593
|
}
|
|
@@ -1591,21 +1597,21 @@ function de(e, t, n, r) {
|
|
|
1591
1597
|
if (t < n) {
|
|
1592
1598
|
if (l = e.input.slice(t, n), r)
|
|
1593
1599
|
for (i = 0, a = l.length; i < a; i += 1)
|
|
1594
|
-
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1595
|
-
else zi.test(l) &&
|
|
1600
|
+
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || k(e, "expected valid JSON character");
|
|
1601
|
+
else zi.test(l) && k(e, "the stream contains non-printable characters");
|
|
1596
1602
|
e.result += l;
|
|
1597
1603
|
}
|
|
1598
1604
|
}
|
|
1599
1605
|
function xt(e, t, n, r) {
|
|
1600
1606
|
var i, a, o, l;
|
|
1601
|
-
for (Z.isObject(n) ||
|
|
1607
|
+
for (Z.isObject(n) || k(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, l = i.length; o < l; o += 1)
|
|
1602
1608
|
a = i[o], pe.call(t, a) || (t[a] = n[a], r[a] = !0);
|
|
1603
1609
|
}
|
|
1604
1610
|
function ke(e, t, n, r, i, a, o, l, s) {
|
|
1605
1611
|
var c, d;
|
|
1606
1612
|
if (Array.isArray(i))
|
|
1607
1613
|
for (i = Array.prototype.slice.call(i), c = 0, d = i.length; c < d; c += 1)
|
|
1608
|
-
Array.isArray(i[c]) &&
|
|
1614
|
+
Array.isArray(i[c]) && k(e, "nested arrays are not supported inside keys"), typeof i == "object" && yt(i[c]) === "[object Object]" && (i[c] = "[object Object]");
|
|
1609
1615
|
if (typeof i == "object" && yt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1610
1616
|
if (Array.isArray(a))
|
|
1611
1617
|
for (c = 0, d = a.length; c < d; c += 1)
|
|
@@ -1613,7 +1619,7 @@ function ke(e, t, n, r, i, a, o, l, s) {
|
|
|
1613
1619
|
else
|
|
1614
1620
|
xt(e, t, a, n);
|
|
1615
1621
|
else
|
|
1616
|
-
!e.json && !pe.call(n, i) && pe.call(t, i) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
1622
|
+
!e.json && !pe.call(n, i) && pe.call(t, i) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, k(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1617
1623
|
configurable: !0,
|
|
1618
1624
|
enumerable: !0,
|
|
1619
1625
|
writable: !0,
|
|
@@ -1623,7 +1629,7 @@ function ke(e, t, n, r, i, a, o, l, s) {
|
|
|
1623
1629
|
}
|
|
1624
1630
|
function rt(e) {
|
|
1625
1631
|
var t;
|
|
1626
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1632
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : k(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1627
1633
|
}
|
|
1628
1634
|
function J(e, t, n) {
|
|
1629
1635
|
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
@@ -1650,7 +1656,7 @@ function it(e, t) {
|
|
|
1650
1656
|
`, t - 1));
|
|
1651
1657
|
}
|
|
1652
1658
|
function ea(e, t, n) {
|
|
1653
|
-
var r, i, a, o, l, s, c, d, u = e.kind,
|
|
1659
|
+
var r, i, a, o, l, s, c, d, u = e.kind, h = e.result, p;
|
|
1654
1660
|
if (p = e.input.charCodeAt(e.position), ne(p) || Ce(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = e.input.charCodeAt(e.position + 1), ne(i) || n && Ce(i)))
|
|
1655
1661
|
return !1;
|
|
1656
1662
|
for (e.kind = "scalar", e.result = "", a = o = e.position, l = !1; p !== 0; ) {
|
|
@@ -1674,7 +1680,7 @@ function ea(e, t, n) {
|
|
|
1674
1680
|
}
|
|
1675
1681
|
l && (de(e, a, o, !1), it(e, e.line - s), a = o = e.position, l = !1), ye(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1676
1682
|
}
|
|
1677
|
-
return de(e, a, o, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1683
|
+
return de(e, a, o, !1), e.result ? !0 : (e.kind = u, e.result = h, !1);
|
|
1678
1684
|
}
|
|
1679
1685
|
function ta(e, t) {
|
|
1680
1686
|
var n, r, i;
|
|
@@ -1686,8 +1692,8 @@ function ta(e, t) {
|
|
|
1686
1692
|
r = e.position, e.position++, i = e.position;
|
|
1687
1693
|
else
|
|
1688
1694
|
return !0;
|
|
1689
|
-
else le(n) ? (de(e, r, i, !0), it(e, J(e, !1, t)), r = i = e.position) : e.position === e.lineStart && qe(e) ?
|
|
1690
|
-
|
|
1695
|
+
else le(n) ? (de(e, r, i, !0), it(e, J(e, !1, t)), r = i = e.position) : e.position === e.lineStart && qe(e) ? k(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1696
|
+
k(e, "unexpected end of the stream within a single quoted scalar");
|
|
1691
1697
|
}
|
|
1692
1698
|
function na(e, t) {
|
|
1693
1699
|
var n, r, i, a, o, l;
|
|
@@ -1703,17 +1709,17 @@ function na(e, t) {
|
|
|
1703
1709
|
e.result += hn[l], e.position++;
|
|
1704
1710
|
else if ((o = Gi(l)) > 0) {
|
|
1705
1711
|
for (i = o, a = 0; i > 0; i--)
|
|
1706
|
-
l = e.input.charCodeAt(++e.position), (o = Ji(l)) >= 0 ? a = (a << 4) + o :
|
|
1712
|
+
l = e.input.charCodeAt(++e.position), (o = Ji(l)) >= 0 ? a = (a << 4) + o : k(e, "expected hexadecimal character");
|
|
1707
1713
|
e.result += Qi(a), e.position++;
|
|
1708
1714
|
} else
|
|
1709
|
-
|
|
1715
|
+
k(e, "unknown escape sequence");
|
|
1710
1716
|
n = r = e.position;
|
|
1711
|
-
} else le(l) ? (de(e, n, r, !0), it(e, J(e, !1, t)), n = r = e.position) : e.position === e.lineStart && qe(e) ?
|
|
1717
|
+
} else le(l) ? (de(e, n, r, !0), it(e, J(e, !1, t)), n = r = e.position) : e.position === e.lineStart && qe(e) ? k(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1712
1718
|
}
|
|
1713
|
-
|
|
1719
|
+
k(e, "unexpected end of the stream within a double quoted scalar");
|
|
1714
1720
|
}
|
|
1715
1721
|
function ra(e, t) {
|
|
1716
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, c, d, u,
|
|
1722
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, c, d, u, h, p, y = /* @__PURE__ */ Object.create(null), x, _, N, w;
|
|
1717
1723
|
if (w = e.input.charCodeAt(e.position), w === 91)
|
|
1718
1724
|
d = 93, p = !1, l = [];
|
|
1719
1725
|
else if (w === 123)
|
|
@@ -1723,9 +1729,9 @@ function ra(e, t) {
|
|
|
1723
1729
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), w = e.input.charCodeAt(++e.position); w !== 0; ) {
|
|
1724
1730
|
if (J(e, !0, t), w = e.input.charCodeAt(e.position), w === d)
|
|
1725
1731
|
return e.position++, e.tag = o, e.anchor = s, e.kind = p ? "mapping" : "sequence", e.result = l, !0;
|
|
1726
|
-
n ? w === 44 &&
|
|
1732
|
+
n ? w === 44 && k(e, "expected the node content, but found ','") : k(e, "missed comma between flow collection entries"), _ = x = N = null, u = h = !1, w === 63 && (c = e.input.charCodeAt(e.position + 1), ne(c) && (u = h = !0, e.position++, J(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, we(e, t, Re, !1, !0), _ = e.tag, x = e.result, J(e, !0, t), w = e.input.charCodeAt(e.position), (h || e.line === r) && w === 58 && (u = !0, w = e.input.charCodeAt(++e.position), J(e, !0, t), we(e, t, Re, !1, !0), N = e.result), p ? ke(e, l, y, _, x, N, r, i, a) : u ? l.push(ke(e, null, y, _, x, N, r, i, a)) : l.push(x), J(e, !0, t), w = e.input.charCodeAt(e.position), w === 44 ? (n = !0, w = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1727
1733
|
}
|
|
1728
|
-
|
|
1734
|
+
k(e, "unexpected end of the stream within a flow collection");
|
|
1729
1735
|
}
|
|
1730
1736
|
function ia(e, t) {
|
|
1731
1737
|
var n, r, i = ze, a = !1, o = !1, l = t, s = 0, c = !1, d, u;
|
|
@@ -1737,9 +1743,9 @@ function ia(e, t) {
|
|
|
1737
1743
|
return !1;
|
|
1738
1744
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1739
1745
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1740
|
-
ze === i ? i = u === 43 ? gt : Vi :
|
|
1746
|
+
ze === i ? i = u === 43 ? gt : Vi : k(e, "repeat of a chomping mode identifier");
|
|
1741
1747
|
else if ((d = Zi(u)) >= 0)
|
|
1742
|
-
d === 0 ?
|
|
1748
|
+
d === 0 ? k(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? k(e, "repeat of an indentation width identifier") : (l = t + d - 1, o = !0);
|
|
1743
1749
|
else
|
|
1744
1750
|
break;
|
|
1745
1751
|
if (ye(u)) {
|
|
@@ -1777,24 +1783,24 @@ function ia(e, t) {
|
|
|
1777
1783
|
function Ct(e, t) {
|
|
1778
1784
|
var n, r = e.tag, i = e.anchor, a = [], o, l = !1, s;
|
|
1779
1785
|
if (e.firstTabInLine !== -1) return !1;
|
|
1780
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1786
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !ne(o)))); ) {
|
|
1781
1787
|
if (l = !0, e.position++, J(e, !0, -1) && e.lineIndent <= t) {
|
|
1782
1788
|
a.push(null), s = e.input.charCodeAt(e.position);
|
|
1783
1789
|
continue;
|
|
1784
1790
|
}
|
|
1785
1791
|
if (n = e.line, we(e, t, cn, !1, !0), a.push(e.result), J(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1786
|
-
|
|
1792
|
+
k(e, "bad indentation of a sequence entry");
|
|
1787
1793
|
else if (e.lineIndent < t)
|
|
1788
1794
|
break;
|
|
1789
1795
|
}
|
|
1790
1796
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1791
1797
|
}
|
|
1792
1798
|
function aa(e, t, n) {
|
|
1793
|
-
var r, i, a, o, l, s, c = e.tag, d = e.anchor, u = {},
|
|
1799
|
+
var r, i, a, o, l, s, c = e.tag, d = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null), p = null, y = null, x = null, _ = !1, N = !1, w;
|
|
1794
1800
|
if (e.firstTabInLine !== -1) return !1;
|
|
1795
1801
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), w = e.input.charCodeAt(e.position); w !== 0; ) {
|
|
1796
|
-
if (!_ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1797
|
-
w === 63 ? (_ && (ke(e, u,
|
|
1802
|
+
if (!_ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (w === 63 || w === 58) && ne(r))
|
|
1803
|
+
w === 63 ? (_ && (ke(e, u, h, p, y, null, o, l, s), p = y = x = null), N = !0, _ = !0, i = !0) : _ ? (_ = !1, i = !0) : k(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = r;
|
|
1798
1804
|
else {
|
|
1799
1805
|
if (o = e.line, l = e.lineStart, s = e.position, !we(e, n, un, !1, !0))
|
|
1800
1806
|
break;
|
|
@@ -1802,67 +1808,67 @@ function aa(e, t, n) {
|
|
|
1802
1808
|
for (w = e.input.charCodeAt(e.position); ye(w); )
|
|
1803
1809
|
w = e.input.charCodeAt(++e.position);
|
|
1804
1810
|
if (w === 58)
|
|
1805
|
-
w = e.input.charCodeAt(++e.position), ne(w) ||
|
|
1811
|
+
w = e.input.charCodeAt(++e.position), ne(w) || k(e, "a whitespace character is expected after the key-value separator within a block mapping"), _ && (ke(e, u, h, p, y, null, o, l, s), p = y = x = null), N = !0, _ = !1, i = !1, p = e.tag, y = e.result;
|
|
1806
1812
|
else if (N)
|
|
1807
|
-
|
|
1813
|
+
k(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1808
1814
|
else
|
|
1809
1815
|
return e.tag = c, e.anchor = d, !0;
|
|
1810
1816
|
} else if (N)
|
|
1811
|
-
|
|
1817
|
+
k(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1812
1818
|
else
|
|
1813
1819
|
return e.tag = c, e.anchor = d, !0;
|
|
1814
1820
|
}
|
|
1815
|
-
if ((e.line === a || e.lineIndent > t) && (_ && (o = e.line, l = e.lineStart, s = e.position), we(e, t, Me, !0, i) && (_ ? y = e.result :
|
|
1816
|
-
|
|
1821
|
+
if ((e.line === a || e.lineIndent > t) && (_ && (o = e.line, l = e.lineStart, s = e.position), we(e, t, Me, !0, i) && (_ ? y = e.result : x = e.result), _ || (ke(e, u, h, p, y, x, o, l, s), p = y = x = null), J(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && w !== 0)
|
|
1822
|
+
k(e, "bad indentation of a mapping entry");
|
|
1817
1823
|
else if (e.lineIndent < t)
|
|
1818
1824
|
break;
|
|
1819
1825
|
}
|
|
1820
|
-
return _ && ke(e, u,
|
|
1826
|
+
return _ && ke(e, u, h, p, y, null, o, l, s), N && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), N;
|
|
1821
1827
|
}
|
|
1822
1828
|
function oa(e) {
|
|
1823
1829
|
var t, n = !1, r = !1, i, a, o;
|
|
1824
1830
|
if (o = e.input.charCodeAt(e.position), o !== 33) return !1;
|
|
1825
|
-
if (e.tag !== null &&
|
|
1831
|
+
if (e.tag !== null && k(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
1826
1832
|
do
|
|
1827
1833
|
o = e.input.charCodeAt(++e.position);
|
|
1828
1834
|
while (o !== 0 && o !== 62);
|
|
1829
|
-
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
1835
|
+
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : k(e, "unexpected end of the stream within a verbatim tag");
|
|
1830
1836
|
} else {
|
|
1831
1837
|
for (; o !== 0 && !ne(o); )
|
|
1832
|
-
o === 33 && (r ?
|
|
1833
|
-
a = e.input.slice(t, e.position), Wi.test(a) &&
|
|
1838
|
+
o === 33 && (r ? k(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), dn.test(i) || k(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
1839
|
+
a = e.input.slice(t, e.position), Wi.test(a) && k(e, "tag suffix cannot contain flow indicator characters");
|
|
1834
1840
|
}
|
|
1835
|
-
a && !fn.test(a) &&
|
|
1841
|
+
a && !fn.test(a) && k(e, "tag name cannot contain such characters: " + a);
|
|
1836
1842
|
try {
|
|
1837
1843
|
a = decodeURIComponent(a);
|
|
1838
1844
|
} catch {
|
|
1839
|
-
|
|
1845
|
+
k(e, "tag name is malformed: " + a);
|
|
1840
1846
|
}
|
|
1841
|
-
return n ? e.tag = a : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a :
|
|
1847
|
+
return n ? e.tag = a : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a : k(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
1842
1848
|
}
|
|
1843
1849
|
function la(e) {
|
|
1844
1850
|
var t, n;
|
|
1845
1851
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1846
|
-
for (e.anchor !== null &&
|
|
1852
|
+
for (e.anchor !== null && k(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !ne(n) && !Ce(n); )
|
|
1847
1853
|
n = e.input.charCodeAt(++e.position);
|
|
1848
|
-
return e.position === t &&
|
|
1854
|
+
return e.position === t && k(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1849
1855
|
}
|
|
1850
1856
|
function sa(e) {
|
|
1851
1857
|
var t, n, r;
|
|
1852
1858
|
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
1853
1859
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !ne(r) && !Ce(r); )
|
|
1854
1860
|
r = e.input.charCodeAt(++e.position);
|
|
1855
|
-
return e.position === t &&
|
|
1861
|
+
return e.position === t && k(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), pe.call(e.anchorMap, n) || k(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], J(e, !0, -1), !0;
|
|
1856
1862
|
}
|
|
1857
1863
|
function we(e, t, n, r, i) {
|
|
1858
|
-
var a, o, l, s = 1, c = !1, d = !1, u,
|
|
1864
|
+
var a, o, l, s = 1, c = !1, d = !1, u, h, p, y, x, _;
|
|
1859
1865
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Me === n || cn === n, r && J(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1860
1866
|
for (; oa(e) || la(e); )
|
|
1861
1867
|
J(e, !0, -1) ? (c = !0, l = a, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1862
|
-
if (l && (l = c || i), (s === 1 || Me === n) && (Re === n || un === n ?
|
|
1868
|
+
if (l && (l = c || i), (s === 1 || Me === n) && (Re === n || un === n ? x = t : x = t + 1, _ = e.position - e.lineStart, s === 1 ? l && (Ct(e, _) || aa(e, _, x)) || ra(e, x) ? d = !0 : (o && ia(e, x) || ta(e, x) || na(e, x) ? d = !0 : sa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && k(e, "alias node should not have any properties")) : ea(e, x, Re === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Ct(e, _))), e.tag === null)
|
|
1863
1869
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1864
1870
|
else if (e.tag === "?") {
|
|
1865
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1871
|
+
for (e.result !== null && e.kind !== "scalar" && k(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, h = e.implicitTypes.length; u < h; u += 1)
|
|
1866
1872
|
if (y = e.implicitTypes[u], y.resolve(e.result)) {
|
|
1867
1873
|
e.result = y.construct(e.result), e.tag = y.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1868
1874
|
break;
|
|
@@ -1871,12 +1877,12 @@ function we(e, t, n, r, i) {
|
|
|
1871
1877
|
if (pe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1872
1878
|
y = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1873
1879
|
else
|
|
1874
|
-
for (y = null, p = e.typeMap.multi[e.kind || "fallback"], u = 0,
|
|
1880
|
+
for (y = null, p = e.typeMap.multi[e.kind || "fallback"], u = 0, h = p.length; u < h; u += 1)
|
|
1875
1881
|
if (e.tag.slice(0, p[u].tag.length) === p[u].tag) {
|
|
1876
1882
|
y = p[u];
|
|
1877
1883
|
break;
|
|
1878
1884
|
}
|
|
1879
|
-
y ||
|
|
1885
|
+
y || k(e, "unknown tag !<" + e.tag + ">"), e.result !== null && y.kind !== e.kind && k(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + y.kind + '", not "' + e.kind + '"'), y.resolve(e.result, e.tag) ? (e.result = y.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : k(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1880
1886
|
}
|
|
1881
1887
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1882
1888
|
}
|
|
@@ -1885,7 +1891,7 @@ function ua(e) {
|
|
|
1885
1891
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (J(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
1886
1892
|
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !ne(o); )
|
|
1887
1893
|
o = e.input.charCodeAt(++e.position);
|
|
1888
|
-
for (r = e.input.slice(n, e.position), i = [], r.length < 1 &&
|
|
1894
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && k(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
1889
1895
|
for (; ye(o); )
|
|
1890
1896
|
o = e.input.charCodeAt(++e.position);
|
|
1891
1897
|
if (o === 35) {
|
|
@@ -1901,12 +1907,12 @@ function ua(e) {
|
|
|
1901
1907
|
}
|
|
1902
1908
|
o !== 0 && rt(e), pe.call(bt, r) ? bt[r](e, r, i) : Ke(e, 'unknown document directive "' + r + '"');
|
|
1903
1909
|
}
|
|
1904
|
-
if (J(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, J(e, !0, -1)) : a &&
|
|
1910
|
+
if (J(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, J(e, !0, -1)) : a && k(e, "directives end mark is expected"), we(e, e.lineIndent - 1, Me, !1, !0), J(e, !0, -1), e.checkLineBreaks && Yi.test(e.input.slice(t, e.position)) && Ke(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && qe(e)) {
|
|
1905
1911
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, J(e, !0, -1));
|
|
1906
1912
|
return;
|
|
1907
1913
|
}
|
|
1908
1914
|
if (e.position < e.length - 1)
|
|
1909
|
-
|
|
1915
|
+
k(e, "end of the stream or a document separator is expected");
|
|
1910
1916
|
else
|
|
1911
1917
|
return;
|
|
1912
1918
|
}
|
|
@@ -1914,7 +1920,7 @@ function gn(e, t) {
|
|
|
1914
1920
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1915
1921
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1916
1922
|
var n = new Xi(e, t), r = e.indexOf("\0");
|
|
1917
|
-
for (r !== -1 && (n.position = r,
|
|
1923
|
+
for (r !== -1 && (n.position = r, k(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1918
1924
|
n.lineIndent += 1, n.position += 1;
|
|
1919
1925
|
for (; n.position < n.length - 1; )
|
|
1920
1926
|
ua(n);
|
|
@@ -2049,25 +2055,25 @@ function An(e) {
|
|
|
2049
2055
|
}
|
|
2050
2056
|
var Sn = 1, Ze = 2, In = 3, En = 4, xe = 5;
|
|
2051
2057
|
function Da(e, t, n, r, i, a, o, l) {
|
|
2052
|
-
var s, c = 0, d = null, u = !1,
|
|
2058
|
+
var s, c = 0, d = null, u = !1, h = !1, p = r !== -1, y = -1, x = Ma($e(e, 0)) && Ka($e(e, e.length - 1));
|
|
2053
2059
|
if (t || o)
|
|
2054
2060
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2055
2061
|
if (c = $e(e, s), !Ne(c))
|
|
2056
2062
|
return xe;
|
|
2057
|
-
|
|
2063
|
+
x = x && wt(c, d, l), d = c;
|
|
2058
2064
|
}
|
|
2059
2065
|
else {
|
|
2060
2066
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2061
2067
|
if (c = $e(e, s), c === Oe)
|
|
2062
|
-
u = !0, p && (
|
|
2068
|
+
u = !0, p && (h = h || // Foldable line = too long, and not more-indented.
|
|
2063
2069
|
s - y - 1 > r && e[y + 1] !== " ", y = s);
|
|
2064
2070
|
else if (!Ne(c))
|
|
2065
2071
|
return xe;
|
|
2066
|
-
|
|
2072
|
+
x = x && wt(c, d, l), d = c;
|
|
2067
2073
|
}
|
|
2068
|
-
|
|
2074
|
+
h = h || p && s - y - 1 > r && e[y + 1] !== " ";
|
|
2069
2075
|
}
|
|
2070
|
-
return !u && !
|
|
2076
|
+
return !u && !h ? x && !o && !i(e) ? Sn : a === Le ? xe : Ze : n > 9 && An(e) ? xe : o ? a === Le ? xe : Ze : h ? En : In;
|
|
2071
2077
|
}
|
|
2072
2078
|
function Ua(e, t, n, r, i) {
|
|
2073
2079
|
e.dump = function() {
|
|
@@ -2162,7 +2168,7 @@ function Ha(e, t, n) {
|
|
|
2162
2168
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2163
2169
|
}
|
|
2164
2170
|
function Va(e, t, n, r) {
|
|
2165
|
-
var i = "", a = e.tag, o = Object.keys(n), l, s, c, d, u,
|
|
2171
|
+
var i = "", a = e.tag, o = Object.keys(n), l, s, c, d, u, h;
|
|
2166
2172
|
if (e.sortKeys === !0)
|
|
2167
2173
|
o.sort();
|
|
2168
2174
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2170,7 +2176,7 @@ function Va(e, t, n, r) {
|
|
|
2170
2176
|
else if (e.sortKeys)
|
|
2171
2177
|
throw new te("sortKeys must be a boolean or a function");
|
|
2172
2178
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2173
|
-
|
|
2179
|
+
h = "", (!r || i !== "") && (h += Ge(e, t)), c = o[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), ce(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Oe === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, u && (h += Ge(e, t)), ce(e, t + 1, d, !0, u) && (e.dump && Oe === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, i += h));
|
|
2174
2180
|
e.tag = a, e.dump = i || "{}";
|
|
2175
2181
|
}
|
|
2176
2182
|
function Tt(e, t, n) {
|
|
@@ -2194,14 +2200,14 @@ function ce(e, t, n, r, i, a, o) {
|
|
|
2194
2200
|
e.tag = null, e.dump = n, Tt(e, n, !1) || Tt(e, n, !0);
|
|
2195
2201
|
var l = vn.call(e.dump), s = r, c;
|
|
2196
2202
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2197
|
-
var d = l === "[object Object]" || l === "[object Array]", u,
|
|
2198
|
-
if (d && (u = e.duplicates.indexOf(n),
|
|
2203
|
+
var d = l === "[object Object]" || l === "[object Array]", u, h;
|
|
2204
|
+
if (d && (u = e.duplicates.indexOf(n), h = u !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && t > 0) && (i = !1), h && e.usedDuplicates[u])
|
|
2199
2205
|
e.dump = "*ref_" + u;
|
|
2200
2206
|
else {
|
|
2201
|
-
if (d &&
|
|
2202
|
-
r && Object.keys(e.dump).length !== 0 ? (Va(e, t, e.dump, i),
|
|
2207
|
+
if (d && h && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2208
|
+
r && Object.keys(e.dump).length !== 0 ? (Va(e, t, e.dump, i), h && (e.dump = "&ref_" + u + e.dump)) : (Ha(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2203
2209
|
else if (l === "[object Array]")
|
|
2204
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Et(e, t - 1, e.dump, i) : Et(e, t, e.dump, i),
|
|
2210
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Et(e, t - 1, e.dump, i) : Et(e, t, e.dump, i), h && (e.dump = "&ref_" + u + e.dump)) : (Pa(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2205
2211
|
else if (l === "[object String]")
|
|
2206
2212
|
e.tag !== "?" && Ua(e, e.dump, t, a, s);
|
|
2207
2213
|
else {
|
|
@@ -2290,20 +2296,20 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2290
2296
|
}
|
|
2291
2297
|
},
|
|
2292
2298
|
setup(e) {
|
|
2293
|
-
const t = e, n =
|
|
2299
|
+
const t = e, n = C(() => {
|
|
2294
2300
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i !== null && i !== "" && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2295
2301
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : co.dump(r).trim();
|
|
2296
2302
|
});
|
|
2297
2303
|
return (r, i) => {
|
|
2298
|
-
const a =
|
|
2299
|
-
return m(),
|
|
2300
|
-
t.yamlRecord ? (m(),
|
|
2304
|
+
const a = U("KCodeBlock");
|
|
2305
|
+
return m(), A("div", fo, [
|
|
2306
|
+
t.yamlRecord ? (m(), D(a, {
|
|
2301
2307
|
key: 0,
|
|
2302
2308
|
id: "yaml-codeblock",
|
|
2303
2309
|
code: n.value,
|
|
2304
2310
|
language: "yaml",
|
|
2305
2311
|
theme: "dark"
|
|
2306
|
-
}, null, 8, ["code"])) :
|
|
2312
|
+
}, null, 8, ["code"])) : j("", !0)
|
|
2307
2313
|
]);
|
|
2308
2314
|
};
|
|
2309
2315
|
}
|
|
@@ -2352,21 +2358,21 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2352
2358
|
}
|
|
2353
2359
|
},
|
|
2354
2360
|
setup(e) {
|
|
2355
|
-
const t = e, n = Xe(), { i18n: { t: r } } = Y.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a =
|
|
2361
|
+
const t = e, n = Xe(), { i18n: { t: r } } = Y.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a = C(() => {
|
|
2356
2362
|
if (!t.record)
|
|
2357
2363
|
return t.record;
|
|
2358
2364
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2359
2365
|
return delete o.created_at, delete o.updated_at, o;
|
|
2360
2366
|
});
|
|
2361
|
-
return (o, l) => (m(),
|
|
2362
|
-
e.format === "structured" ? (m(),
|
|
2363
|
-
(m(!0),
|
|
2367
|
+
return (o, l) => (m(), A(ue, null, [
|
|
2368
|
+
e.format === "structured" ? (m(), A("div", po, [
|
|
2369
|
+
(m(!0), A(ue, null, oe(e.propListTypes, (s) => (m(), A("div", {
|
|
2364
2370
|
key: `config-card-details-${s}-props`,
|
|
2365
2371
|
class: fe(`config-card-details-${s}-props`),
|
|
2366
2372
|
"data-testid": `config-card-details-${s}-props`
|
|
2367
2373
|
}, [
|
|
2368
|
-
s !== "basic" ? (m(),
|
|
2369
|
-
(m(!0),
|
|
2374
|
+
s !== "basic" ? (m(), A("div", mo, O(s === "advanced" ? I(r)("baseConfigCard.sections.advanced") : I(r)("baseConfigCard.sections.plugin")), 1)) : j("", !0),
|
|
2375
|
+
(m(!0), A(ue, null, oe(e.propertyCollections[s], (c) => (m(), D(Dt, {
|
|
2370
2376
|
key: c.key,
|
|
2371
2377
|
item: c
|
|
2372
2378
|
}, _e({
|
|
@@ -2390,18 +2396,18 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2390
2396
|
} : void 0
|
|
2391
2397
|
]), 1032, ["item"]))), 128))
|
|
2392
2398
|
], 10, ho))), 128))
|
|
2393
|
-
])) :
|
|
2394
|
-
e.format === "json" && t.record ? (m(),
|
|
2399
|
+
])) : j("", !0),
|
|
2400
|
+
e.format === "json" && t.record ? (m(), D(Ut, {
|
|
2395
2401
|
key: 1,
|
|
2396
2402
|
config: t.config,
|
|
2397
2403
|
"fetcher-url": t.fetcherUrl,
|
|
2398
2404
|
"json-record": a.value,
|
|
2399
2405
|
"request-method": "get"
|
|
2400
|
-
}, null, 8, ["config", "fetcher-url", "json-record"])) :
|
|
2401
|
-
e.format === "yaml" && t.record ? (m(),
|
|
2406
|
+
}, null, 8, ["config", "fetcher-url", "json-record"])) : j("", !0),
|
|
2407
|
+
e.format === "yaml" && t.record ? (m(), D(Tn, {
|
|
2402
2408
|
key: 2,
|
|
2403
2409
|
"yaml-record": a.value
|
|
2404
|
-
}, null, 8, ["yaml-record"])) :
|
|
2410
|
+
}, null, 8, ["yaml-record"])) : j("", !0)
|
|
2405
2411
|
], 64));
|
|
2406
2412
|
}
|
|
2407
2413
|
}), yo = /* @__PURE__ */ ae(go, [["__scopeId", "data-v-2052238b"]]), ie = "24px", Te = (e, t) => {
|
|
@@ -2467,7 +2473,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2467
2473
|
}
|
|
2468
2474
|
},
|
|
2469
2475
|
setup(e) {
|
|
2470
|
-
const t = e, n =
|
|
2476
|
+
const t = e, n = C(() => {
|
|
2471
2477
|
if (typeof t.size == "number" && t.size > 0)
|
|
2472
2478
|
return `${t.size}px`;
|
|
2473
2479
|
if (typeof t.size == "string") {
|
|
@@ -2476,7 +2482,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2476
2482
|
return `${a}px`;
|
|
2477
2483
|
}
|
|
2478
2484
|
return ie;
|
|
2479
|
-
}), r =
|
|
2485
|
+
}), r = C(() => ({
|
|
2480
2486
|
boxSizing: "border-box",
|
|
2481
2487
|
color: t.color,
|
|
2482
2488
|
display: t.display,
|
|
@@ -2484,14 +2490,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2484
2490
|
lineHeight: "0",
|
|
2485
2491
|
width: n.value
|
|
2486
2492
|
}));
|
|
2487
|
-
return (i, a) => (m(),
|
|
2493
|
+
return (i, a) => (m(), D(se(e.as), {
|
|
2488
2494
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2489
2495
|
class: "kui-icon add-icon",
|
|
2490
2496
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2491
2497
|
style: Se(r.value)
|
|
2492
2498
|
}, {
|
|
2493
2499
|
default: b(() => [
|
|
2494
|
-
(m(),
|
|
2500
|
+
(m(), A("svg", {
|
|
2495
2501
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2496
2502
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2497
2503
|
fill: "none",
|
|
@@ -2501,7 +2507,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2501
2507
|
width: "100%",
|
|
2502
2508
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2503
2509
|
}, [
|
|
2504
|
-
e.title ? (m(),
|
|
2510
|
+
e.title ? (m(), A("title", xo, O(e.title), 1)) : j("", !0),
|
|
2505
2511
|
Co
|
|
2506
2512
|
], 8, bo))
|
|
2507
2513
|
]),
|
|
@@ -2566,7 +2572,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2566
2572
|
}
|
|
2567
2573
|
},
|
|
2568
2574
|
setup(e) {
|
|
2569
|
-
const t = e, n =
|
|
2575
|
+
const t = e, n = C(() => {
|
|
2570
2576
|
if (typeof t.size == "number" && t.size > 0)
|
|
2571
2577
|
return `${t.size}px`;
|
|
2572
2578
|
if (typeof t.size == "string") {
|
|
@@ -2575,7 +2581,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2575
2581
|
return `${a}px`;
|
|
2576
2582
|
}
|
|
2577
2583
|
return ie;
|
|
2578
|
-
}), r =
|
|
2584
|
+
}), r = C(() => ({
|
|
2579
2585
|
boxSizing: "border-box",
|
|
2580
2586
|
color: t.color,
|
|
2581
2587
|
display: t.display,
|
|
@@ -2583,14 +2589,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2583
2589
|
lineHeight: "0",
|
|
2584
2590
|
width: n.value
|
|
2585
2591
|
}));
|
|
2586
|
-
return (i, a) => (m(),
|
|
2592
|
+
return (i, a) => (m(), D(se(e.as), {
|
|
2587
2593
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2588
2594
|
class: "kui-icon book-icon",
|
|
2589
2595
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2590
2596
|
style: Se(r.value)
|
|
2591
2597
|
}, {
|
|
2592
2598
|
default: b(() => [
|
|
2593
|
-
(m(),
|
|
2599
|
+
(m(), A("svg", {
|
|
2594
2600
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2595
2601
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2596
2602
|
fill: "none",
|
|
@@ -2600,7 +2606,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2600
2606
|
width: "100%",
|
|
2601
2607
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2602
2608
|
}, [
|
|
2603
|
-
e.title ? (m(),
|
|
2609
|
+
e.title ? (m(), A("title", So, O(e.title), 1)) : j("", !0),
|
|
2604
2610
|
Io
|
|
2605
2611
|
], 8, Ao))
|
|
2606
2612
|
]),
|
|
@@ -2665,7 +2671,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2665
2671
|
}
|
|
2666
2672
|
},
|
|
2667
2673
|
setup(e) {
|
|
2668
|
-
const t = e, n =
|
|
2674
|
+
const t = e, n = C(() => {
|
|
2669
2675
|
if (typeof t.size == "number" && t.size > 0)
|
|
2670
2676
|
return `${t.size}px`;
|
|
2671
2677
|
if (typeof t.size == "string") {
|
|
@@ -2674,7 +2680,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2674
2680
|
return `${a}px`;
|
|
2675
2681
|
}
|
|
2676
2682
|
return ie;
|
|
2677
|
-
}), r =
|
|
2683
|
+
}), r = C(() => ({
|
|
2678
2684
|
boxSizing: "border-box",
|
|
2679
2685
|
color: t.color,
|
|
2680
2686
|
display: t.display,
|
|
@@ -2682,14 +2688,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2682
2688
|
lineHeight: "0",
|
|
2683
2689
|
width: n.value
|
|
2684
2690
|
}));
|
|
2685
|
-
return (i, a) => (m(),
|
|
2691
|
+
return (i, a) => (m(), D(se(e.as), {
|
|
2686
2692
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2687
2693
|
class: "kui-icon chevron-down-icon",
|
|
2688
2694
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2689
2695
|
style: Se(r.value)
|
|
2690
2696
|
}, {
|
|
2691
2697
|
default: b(() => [
|
|
2692
|
-
(m(),
|
|
2698
|
+
(m(), A("svg", {
|
|
2693
2699
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2694
2700
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2695
2701
|
fill: "none",
|
|
@@ -2699,7 +2705,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2699
2705
|
width: "100%",
|
|
2700
2706
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2701
2707
|
}, [
|
|
2702
|
-
e.title ? (m(),
|
|
2708
|
+
e.title ? (m(), A("title", Oo, O(e.title), 1)) : j("", !0),
|
|
2703
2709
|
Lo
|
|
2704
2710
|
], 8, Fo))
|
|
2705
2711
|
]),
|
|
@@ -2764,7 +2770,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2764
2770
|
}
|
|
2765
2771
|
},
|
|
2766
2772
|
setup(e) {
|
|
2767
|
-
const t = e, n =
|
|
2773
|
+
const t = e, n = C(() => {
|
|
2768
2774
|
if (typeof t.size == "number" && t.size > 0)
|
|
2769
2775
|
return `${t.size}px`;
|
|
2770
2776
|
if (typeof t.size == "string") {
|
|
@@ -2773,7 +2779,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2773
2779
|
return `${a}px`;
|
|
2774
2780
|
}
|
|
2775
2781
|
return ie;
|
|
2776
|
-
}), r =
|
|
2782
|
+
}), r = C(() => ({
|
|
2777
2783
|
boxSizing: "border-box",
|
|
2778
2784
|
color: t.color,
|
|
2779
2785
|
display: t.display,
|
|
@@ -2781,14 +2787,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2781
2787
|
lineHeight: "0",
|
|
2782
2788
|
width: n.value
|
|
2783
2789
|
}));
|
|
2784
|
-
return (i, a) => (m(),
|
|
2790
|
+
return (i, a) => (m(), D(se(e.as), {
|
|
2785
2791
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2786
2792
|
class: "kui-icon close-icon",
|
|
2787
2793
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2788
2794
|
style: Se(r.value)
|
|
2789
2795
|
}, {
|
|
2790
2796
|
default: b(() => [
|
|
2791
|
-
(m(),
|
|
2797
|
+
(m(), A("svg", {
|
|
2792
2798
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2793
2799
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2794
2800
|
fill: "none",
|
|
@@ -2798,7 +2804,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2798
2804
|
width: "100%",
|
|
2799
2805
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2800
2806
|
}, [
|
|
2801
|
-
e.title ? (m(),
|
|
2807
|
+
e.title ? (m(), A("title", Ko, O(e.title), 1)) : j("", !0),
|
|
2802
2808
|
Do
|
|
2803
2809
|
], 8, Mo))
|
|
2804
2810
|
]),
|
|
@@ -2863,7 +2869,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2863
2869
|
}
|
|
2864
2870
|
},
|
|
2865
2871
|
setup(e) {
|
|
2866
|
-
const t = e, n =
|
|
2872
|
+
const t = e, n = C(() => {
|
|
2867
2873
|
if (typeof t.size == "number" && t.size > 0)
|
|
2868
2874
|
return `${t.size}px`;
|
|
2869
2875
|
if (typeof t.size == "string") {
|
|
@@ -2872,7 +2878,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2872
2878
|
return `${a}px`;
|
|
2873
2879
|
}
|
|
2874
2880
|
return ie;
|
|
2875
|
-
}), r =
|
|
2881
|
+
}), r = C(() => ({
|
|
2876
2882
|
boxSizing: "border-box",
|
|
2877
2883
|
color: t.color,
|
|
2878
2884
|
display: t.display,
|
|
@@ -2880,14 +2886,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2880
2886
|
lineHeight: "0",
|
|
2881
2887
|
width: n.value
|
|
2882
2888
|
}));
|
|
2883
|
-
return (i, a) => (m(),
|
|
2889
|
+
return (i, a) => (m(), D(se(e.as), {
|
|
2884
2890
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2885
2891
|
class: "kui-icon copy-icon",
|
|
2886
2892
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2887
2893
|
style: Se(r.value)
|
|
2888
2894
|
}, {
|
|
2889
2895
|
default: b(() => [
|
|
2890
|
-
(m(),
|
|
2896
|
+
(m(), A("svg", {
|
|
2891
2897
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2892
2898
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
2893
2899
|
fill: "none",
|
|
@@ -2897,7 +2903,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2897
2903
|
width: "100%",
|
|
2898
2904
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2899
2905
|
}, [
|
|
2900
|
-
e.title ? (m(),
|
|
2906
|
+
e.title ? (m(), A("title", Ho, O(e.title), 1)) : j("", !0),
|
|
2901
2907
|
Vo
|
|
2902
2908
|
], 8, Po))
|
|
2903
2909
|
]),
|
|
@@ -2962,7 +2968,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2962
2968
|
}
|
|
2963
2969
|
},
|
|
2964
2970
|
setup(e) {
|
|
2965
|
-
const t = e, n =
|
|
2971
|
+
const t = e, n = C(() => {
|
|
2966
2972
|
if (typeof t.size == "number" && t.size > 0)
|
|
2967
2973
|
return `${t.size}px`;
|
|
2968
2974
|
if (typeof t.size == "string") {
|
|
@@ -2971,7 +2977,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2971
2977
|
return `${a}px`;
|
|
2972
2978
|
}
|
|
2973
2979
|
return ie;
|
|
2974
|
-
}), r =
|
|
2980
|
+
}), r = C(() => ({
|
|
2975
2981
|
boxSizing: "border-box",
|
|
2976
2982
|
color: t.color,
|
|
2977
2983
|
display: t.display,
|
|
@@ -2979,14 +2985,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2979
2985
|
lineHeight: "0",
|
|
2980
2986
|
width: n.value
|
|
2981
2987
|
}));
|
|
2982
|
-
return (i, a) => (m(),
|
|
2988
|
+
return (i, a) => (m(), D(se(e.as), {
|
|
2983
2989
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2984
2990
|
class: "kui-icon more-icon",
|
|
2985
2991
|
"data-testid": "kui-icon-wrapper-more-icon",
|
|
2986
2992
|
style: Se(r.value)
|
|
2987
2993
|
}, {
|
|
2988
2994
|
default: b(() => [
|
|
2989
|
-
(m(),
|
|
2995
|
+
(m(), A("svg", {
|
|
2990
2996
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2991
2997
|
"data-testid": "kui-icon-svg-more-icon",
|
|
2992
2998
|
fill: "none",
|
|
@@ -2996,7 +3002,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2996
3002
|
width: "100%",
|
|
2997
3003
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2998
3004
|
}, [
|
|
2999
|
-
e.title ? (m(),
|
|
3005
|
+
e.title ? (m(), A("title", Go, O(e.title), 1)) : j("", !0),
|
|
3000
3006
|
Zo
|
|
3001
3007
|
], 8, Jo))
|
|
3002
3008
|
]),
|
|
@@ -3084,8 +3090,8 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3084
3090
|
},
|
|
3085
3091
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
3086
3092
|
setup(e, { emit: t }) {
|
|
3087
|
-
var
|
|
3088
|
-
const n = t, r = e, { i18n: { t: i } } = Y.useI18n(), { getMessageFromError: a } = Y.useErrors(), { convertKeyToTitle: o } = Y.useStringHelpers(), { axiosInstance: l } = Y.useAxios((
|
|
3093
|
+
var S;
|
|
3094
|
+
const n = t, r = e, { i18n: { t: i } } = Y.useI18n(), { getMessageFromError: a } = Y.useErrors(), { convertKeyToTitle: o } = Y.useStringHelpers(), { axiosInstance: l } = Y.useAxios((S = r.config) == null ? void 0 : S.axiosRequestConfig), s = [
|
|
3089
3095
|
{
|
|
3090
3096
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
3091
3097
|
value: "structured",
|
|
@@ -3099,7 +3105,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3099
3105
|
label: "YAML",
|
|
3100
3106
|
value: "yaml"
|
|
3101
3107
|
}
|
|
3102
|
-
], c =
|
|
3108
|
+
], c = K("structured"), d = (f) => {
|
|
3103
3109
|
c.value = f == null ? void 0 : f.value;
|
|
3104
3110
|
}, u = {
|
|
3105
3111
|
id: {
|
|
@@ -3135,103 +3141,103 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3135
3141
|
// the last property displayed
|
|
3136
3142
|
section: re.Basic
|
|
3137
3143
|
}
|
|
3138
|
-
},
|
|
3139
|
-
var F,
|
|
3140
|
-
if (!
|
|
3144
|
+
}, h = K(!1), p = K(!1), y = K(""), x = K({}), _ = C(() => {
|
|
3145
|
+
var F, E, R;
|
|
3146
|
+
if (!x.value)
|
|
3141
3147
|
return [];
|
|
3142
|
-
const f = [],
|
|
3143
|
-
for (const
|
|
3144
|
-
const
|
|
3145
|
-
let
|
|
3146
|
-
(
|
|
3148
|
+
const f = [], v = Object.keys(x.value).length;
|
|
3149
|
+
for (const B in x.value) {
|
|
3150
|
+
const T = (E = (F = r.configSchema) == null ? void 0 : F[B]) == null ? void 0 : E.order, W = (R = u[B]) == null ? void 0 : R.order;
|
|
3151
|
+
let q = v;
|
|
3152
|
+
(W || W === 0) && (q = W === -1 ? v + 1 : W), T && (q = T === -1 ? v + 1 : T), f.push([B, q]);
|
|
3147
3153
|
}
|
|
3148
|
-
return f.sort(function(
|
|
3149
|
-
return
|
|
3150
|
-
}), f.map((
|
|
3154
|
+
return f.sort(function(B, T) {
|
|
3155
|
+
return B[1] - T[1];
|
|
3156
|
+
}), f.map((B) => {
|
|
3151
3157
|
var he, lt;
|
|
3152
|
-
const
|
|
3158
|
+
const T = B[0], W = (he = x.value) == null ? void 0 : he[T], q = ((lt = r.configSchema) == null ? void 0 : lt[T]) || {}, G = u[T];
|
|
3153
3159
|
return {
|
|
3154
|
-
key:
|
|
3155
|
-
value:
|
|
3156
|
-
hidden:
|
|
3157
|
-
type:
|
|
3158
|
-
label:
|
|
3159
|
-
tooltip:
|
|
3160
|
-
section:
|
|
3160
|
+
key: T,
|
|
3161
|
+
value: W,
|
|
3162
|
+
hidden: q.hidden || !1,
|
|
3163
|
+
type: q.type ?? ((G == null ? void 0 : G.type) || H.Text),
|
|
3164
|
+
label: q.label ?? ((G == null ? void 0 : G.label) || o(T)),
|
|
3165
|
+
tooltip: q.tooltip ?? ((G == null ? void 0 : G.tooltip) || void 0),
|
|
3166
|
+
section: q.section ?? ((G == null ? void 0 : G.section) || re.Advanced)
|
|
3161
3167
|
};
|
|
3162
|
-
}).filter((
|
|
3163
|
-
}), N =
|
|
3164
|
-
var
|
|
3165
|
-
if (!
|
|
3168
|
+
}).filter((B) => !B.hidden && B.key !== r.pluginConfigKey);
|
|
3169
|
+
}), N = C(() => {
|
|
3170
|
+
var E, R;
|
|
3171
|
+
if (!x.value || !r.pluginConfigKey)
|
|
3166
3172
|
return [];
|
|
3167
|
-
const f =
|
|
3168
|
-
for (const
|
|
3169
|
-
const
|
|
3170
|
-
let
|
|
3171
|
-
|
|
3173
|
+
const f = x.value[r.pluginConfigKey] || {}, v = Object.keys(f).length, F = [];
|
|
3174
|
+
for (const B in f) {
|
|
3175
|
+
const T = (R = (E = r.pluginConfigSchema) == null ? void 0 : E[B]) == null ? void 0 : R.order, W = f[B];
|
|
3176
|
+
let q = W != null && W !== "" ? v - 1 : v;
|
|
3177
|
+
T && (q = T === -1 ? v + 1 : T), F.push([B, q]);
|
|
3172
3178
|
}
|
|
3173
|
-
return F.sort(function(
|
|
3174
|
-
return
|
|
3175
|
-
}), F.map((
|
|
3179
|
+
return F.sort(function(B, T) {
|
|
3180
|
+
return B[1] - T[1];
|
|
3181
|
+
}), F.map((B) => {
|
|
3176
3182
|
var G;
|
|
3177
|
-
const
|
|
3183
|
+
const T = B[0], W = f[T], q = ((G = r.pluginConfigSchema) == null ? void 0 : G[T]) || {};
|
|
3178
3184
|
return {
|
|
3179
|
-
key:
|
|
3180
|
-
value:
|
|
3181
|
-
hidden:
|
|
3182
|
-
type:
|
|
3183
|
-
label:
|
|
3184
|
-
tooltip:
|
|
3185
|
+
key: T,
|
|
3186
|
+
value: W,
|
|
3187
|
+
hidden: q.hidden || !1,
|
|
3188
|
+
type: q.type ?? H.Text,
|
|
3189
|
+
label: q.label ?? o(T),
|
|
3190
|
+
tooltip: q.tooltip ?? void 0,
|
|
3185
3191
|
section: re.Plugin
|
|
3186
3192
|
};
|
|
3187
|
-
}).filter((
|
|
3188
|
-
}), w =
|
|
3189
|
-
var f,
|
|
3193
|
+
}).filter((B) => !B.hidden);
|
|
3194
|
+
}), w = C(() => {
|
|
3195
|
+
var f, v, F, E;
|
|
3190
3196
|
return {
|
|
3191
|
-
basic: (f = _.value) == null ? void 0 : f.filter((
|
|
3192
|
-
advanced: (
|
|
3193
|
-
plugin: (
|
|
3197
|
+
basic: (f = _.value) == null ? void 0 : f.filter((R) => R.section === re.Basic),
|
|
3198
|
+
advanced: (v = _.value) == null ? void 0 : v.filter((R) => R.section === re.Advanced),
|
|
3199
|
+
plugin: (E = N.value) == null ? void 0 : E.concat((F = _.value) == null ? void 0 : F.filter((R) => R.section === re.Plugin))
|
|
3194
3200
|
};
|
|
3195
|
-
}),
|
|
3201
|
+
}), $ = C(() => {
|
|
3196
3202
|
const f = [];
|
|
3197
3203
|
return w.value.basic.length && f.push("basic"), w.value.advanced.length && f.push("advanced"), w.value.plugin.length && f.push("plugin"), f;
|
|
3198
|
-
}),
|
|
3199
|
-
var
|
|
3204
|
+
}), g = C(() => {
|
|
3205
|
+
var v, F;
|
|
3200
3206
|
let f = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3201
|
-
return r.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((
|
|
3207
|
+
return r.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = r.config) == null ? void 0 : v.controlPlaneId) || "") : r.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), f = f.replace(/{id}/gi, r.config.entityId), f;
|
|
3202
3208
|
});
|
|
3203
|
-
return Ae(
|
|
3209
|
+
return Ae(h, (f) => {
|
|
3204
3210
|
n("loading", f);
|
|
3205
3211
|
}, { immediate: !0 }), Lt(async () => {
|
|
3206
|
-
p.value = !1,
|
|
3212
|
+
p.value = !1, h.value = !0;
|
|
3207
3213
|
try {
|
|
3208
|
-
const { data: f } = await l.get(
|
|
3214
|
+
const { data: f } = await l.get(g.value);
|
|
3209
3215
|
if (r.dataKey)
|
|
3210
3216
|
if (typeof f[r.dataKey] < "u")
|
|
3211
|
-
|
|
3217
|
+
x.value = { ...f[r.dataKey] };
|
|
3212
3218
|
else
|
|
3213
3219
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3214
3220
|
else
|
|
3215
|
-
|
|
3221
|
+
x.value = { ...f };
|
|
3216
3222
|
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3217
|
-
|
|
3223
|
+
x.value && typeof x.value[F] > "u" && (x.value[F] = null);
|
|
3218
3224
|
}), n("fetch:success", f);
|
|
3219
3225
|
} catch (f) {
|
|
3220
|
-
const
|
|
3221
|
-
y.value =
|
|
3226
|
+
const v = a(f);
|
|
3227
|
+
y.value = v.startsWith("code") ? i("baseConfigCard.errors.load") : v, p.value = !0, n("fetch:error", f);
|
|
3222
3228
|
} finally {
|
|
3223
|
-
|
|
3229
|
+
h.value = !1;
|
|
3224
3230
|
}
|
|
3225
|
-
}), (f,
|
|
3226
|
-
const F =
|
|
3227
|
-
return m(),
|
|
3231
|
+
}), (f, v) => {
|
|
3232
|
+
const F = U("KLabel"), E = U("KSelect"), R = U("KButton"), B = U("KSkeleton"), T = U("KEmptyState"), W = U("KCard");
|
|
3233
|
+
return m(), D(W, {
|
|
3228
3234
|
class: "kong-ui-entity-base-config-card",
|
|
3229
3235
|
"title-tag": e.titleTag
|
|
3230
3236
|
}, _e({
|
|
3231
3237
|
actions: b(() => [
|
|
3232
3238
|
L("div", tl, [
|
|
3233
3239
|
z(f.$slots, "actions", {}, void 0, !0),
|
|
3234
|
-
|
|
3240
|
+
M(F, {
|
|
3235
3241
|
class: "config-format-select-label",
|
|
3236
3242
|
"data-testid": "config-format-select-label"
|
|
3237
3243
|
}, {
|
|
@@ -3240,12 +3246,12 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3240
3246
|
]),
|
|
3241
3247
|
_: 1
|
|
3242
3248
|
}),
|
|
3243
|
-
|
|
3249
|
+
M(E, {
|
|
3244
3250
|
"data-testid": "select-config-format",
|
|
3245
3251
|
items: s,
|
|
3246
3252
|
onChange: d
|
|
3247
3253
|
}),
|
|
3248
|
-
e.configCardDoc ? (m(),
|
|
3254
|
+
e.configCardDoc ? (m(), D(R, {
|
|
3249
3255
|
key: 0,
|
|
3250
3256
|
appearance: "tertiary",
|
|
3251
3257
|
class: "book-icon",
|
|
@@ -3257,20 +3263,20 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3257
3263
|
rel: "noopener",
|
|
3258
3264
|
target: "_blank"
|
|
3259
3265
|
}, [
|
|
3260
|
-
|
|
3266
|
+
M(I(To), { size: I($r) }, null, 8, ["size"])
|
|
3261
3267
|
], 8, nl)
|
|
3262
3268
|
]),
|
|
3263
3269
|
_: 1
|
|
3264
|
-
})) :
|
|
3270
|
+
})) : j("", !0)
|
|
3265
3271
|
])
|
|
3266
3272
|
]),
|
|
3267
3273
|
default: b(() => [
|
|
3268
|
-
|
|
3274
|
+
h.value ? (m(), D(B, {
|
|
3269
3275
|
key: 0,
|
|
3270
3276
|
"data-testid": "config-card-loader",
|
|
3271
3277
|
"table-columns": 2,
|
|
3272
3278
|
type: "table"
|
|
3273
|
-
})) : p.value ? (m(),
|
|
3279
|
+
})) : p.value ? (m(), D(T, {
|
|
3274
3280
|
key: 1,
|
|
3275
3281
|
"data-testid": "config-card-fetch-error",
|
|
3276
3282
|
"icon-variant": "error"
|
|
@@ -3279,20 +3285,20 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3279
3285
|
L("h3", null, O(y.value), 1)
|
|
3280
3286
|
]),
|
|
3281
3287
|
_: 1
|
|
3282
|
-
})) :
|
|
3288
|
+
})) : j("", !0),
|
|
3283
3289
|
L("div", rl, [
|
|
3284
|
-
|
|
3290
|
+
M(yo, {
|
|
3285
3291
|
config: e.config,
|
|
3286
|
-
"fetcher-url":
|
|
3292
|
+
"fetcher-url": g.value,
|
|
3287
3293
|
format: c.value,
|
|
3288
|
-
"prop-list-types":
|
|
3294
|
+
"prop-list-types": $.value,
|
|
3289
3295
|
"property-collections": w.value,
|
|
3290
|
-
record:
|
|
3296
|
+
record: x.value
|
|
3291
3297
|
}, _e({ _: 2 }, [
|
|
3292
|
-
oe(Object.keys(f.$slots), (
|
|
3293
|
-
name:
|
|
3298
|
+
oe(Object.keys(f.$slots), (q) => ({
|
|
3299
|
+
name: q,
|
|
3294
3300
|
fn: b(({ row: G, rowValue: he }) => [
|
|
3295
|
-
z(f.$slots,
|
|
3301
|
+
z(f.$slots, q, {
|
|
3296
3302
|
row: G,
|
|
3297
3303
|
rowValue: he
|
|
3298
3304
|
}, void 0, !0)
|
|
@@ -3308,7 +3314,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3308
3314
|
fn: b(() => [
|
|
3309
3315
|
L("span", el, [
|
|
3310
3316
|
z(f.$slots, "title", {}, () => [
|
|
3311
|
-
V(O(
|
|
3317
|
+
V(O(I(i)("baseConfigCard.title")), 1)
|
|
3312
3318
|
], !0)
|
|
3313
3319
|
])
|
|
3314
3320
|
]),
|
|
@@ -3388,20 +3394,20 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3388
3394
|
},
|
|
3389
3395
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3390
3396
|
setup(e, { emit: t }) {
|
|
3391
|
-
var
|
|
3392
|
-
const n = t, r = e, i = jn(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: o } = Y.useErrors(), { axiosInstance: l } = Y.useAxios((
|
|
3393
|
-
var
|
|
3394
|
-
let
|
|
3395
|
-
return r.config.app === "konnect" ?
|
|
3397
|
+
var $;
|
|
3398
|
+
const n = t, r = e, i = jn(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: o } = Y.useErrors(), { axiosInstance: l } = Y.useAxios(($ = r.config) == null ? void 0 : $.axiosRequestConfig), s = K(!1), c = K(!1), d = K(""), u = C(() => r.canSubmit === !1 || r.isReadonly), h = K(!1), p = C(() => {
|
|
3399
|
+
var S, f;
|
|
3400
|
+
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3401
|
+
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((S = r.config) == null ? void 0 : S.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (f = r.config) != null && f.workspace ? `/${r.config.workspace}` : "")), r.editId ? (g = g.replace(/{id}/gi, r.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3396
3402
|
}), y = () => {
|
|
3397
|
-
|
|
3398
|
-
},
|
|
3403
|
+
h.value = !h.value;
|
|
3404
|
+
}, x = () => {
|
|
3399
3405
|
r.config.cancelRoute ? i.push(r.config.cancelRoute) : _();
|
|
3400
3406
|
}, _ = () => {
|
|
3401
3407
|
n("cancel");
|
|
3402
3408
|
}, N = () => {
|
|
3403
3409
|
u.value || n("submit");
|
|
3404
|
-
}, w =
|
|
3410
|
+
}, w = K([
|
|
3405
3411
|
{
|
|
3406
3412
|
title: a("baseForm.configuration.yaml"),
|
|
3407
3413
|
hash: "#yaml"
|
|
@@ -3411,106 +3417,106 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3411
3417
|
hash: "#json"
|
|
3412
3418
|
}
|
|
3413
3419
|
]);
|
|
3414
|
-
return Ae(() => s.value, (
|
|
3415
|
-
n("loading",
|
|
3420
|
+
return Ae(() => s.value, (g) => {
|
|
3421
|
+
n("loading", g);
|
|
3416
3422
|
}, { immediate: !0 }), Lt(async () => {
|
|
3417
3423
|
if (r.editId)
|
|
3418
3424
|
try {
|
|
3419
3425
|
c.value = !1, s.value = !0;
|
|
3420
|
-
const { data:
|
|
3421
|
-
n("fetch:success",
|
|
3422
|
-
} catch (
|
|
3423
|
-
const
|
|
3424
|
-
d.value =
|
|
3426
|
+
const { data: g } = await l.get(p.value);
|
|
3427
|
+
n("fetch:success", g);
|
|
3428
|
+
} catch (g) {
|
|
3429
|
+
const S = o(g);
|
|
3430
|
+
d.value = S.startsWith("code") ? a("baseForm.errors.edit") : S, c.value = !0, n("fetch:error", g);
|
|
3425
3431
|
} finally {
|
|
3426
3432
|
s.value = !1;
|
|
3427
3433
|
}
|
|
3428
|
-
}), (
|
|
3429
|
-
const f =
|
|
3430
|
-
return m(),
|
|
3434
|
+
}), (g, S) => {
|
|
3435
|
+
const f = U("KSkeleton"), v = U("KEmptyState"), F = U("KAlert"), E = U("KButton"), R = U("KTabs"), B = U("KSlideout");
|
|
3436
|
+
return m(), D(se(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3431
3437
|
default: b(() => [
|
|
3432
|
-
s.value ? (m(),
|
|
3438
|
+
s.value ? (m(), D(f, {
|
|
3433
3439
|
key: 0,
|
|
3434
3440
|
type: "form"
|
|
3435
|
-
})) : c.value ? (m(),
|
|
3441
|
+
})) : c.value ? (m(), D(v, {
|
|
3436
3442
|
key: 1,
|
|
3437
|
-
"action-button-text":
|
|
3443
|
+
"action-button-text": I(a)("baseForm.actions.back"),
|
|
3438
3444
|
"data-testid": "form-fetch-error",
|
|
3439
3445
|
"icon-variant": "error",
|
|
3440
|
-
onClickAction:
|
|
3446
|
+
onClickAction: x
|
|
3441
3447
|
}, {
|
|
3442
3448
|
default: b(() => [
|
|
3443
3449
|
L("h3", null, O(d.value), 1)
|
|
3444
3450
|
]),
|
|
3445
3451
|
_: 1
|
|
3446
|
-
}, 8, ["action-button-text"])) : (m(),
|
|
3452
|
+
}, 8, ["action-button-text"])) : (m(), A("form", {
|
|
3447
3453
|
key: 2,
|
|
3448
3454
|
"data-testid": "form-content",
|
|
3449
3455
|
novalidate: r.noValidate,
|
|
3450
3456
|
onReset: Ye(_, ["prevent"]),
|
|
3451
3457
|
onSubmit: Ye(N, ["prevent"])
|
|
3452
3458
|
}, [
|
|
3453
|
-
z(
|
|
3454
|
-
e.errorMessage ? (m(),
|
|
3459
|
+
z(g.$slots, "default", {}, void 0, !0),
|
|
3460
|
+
e.errorMessage ? (m(), D(F, {
|
|
3455
3461
|
key: 0,
|
|
3456
3462
|
appearance: "danger",
|
|
3457
3463
|
"data-testid": "form-error",
|
|
3458
3464
|
message: e.errorMessage
|
|
3459
|
-
}, null, 8, ["message"])) :
|
|
3465
|
+
}, null, 8, ["message"])) : j("", !0),
|
|
3460
3466
|
L("div", ol, [
|
|
3461
|
-
z(
|
|
3462
|
-
|
|
3467
|
+
z(g.$slots, "form-actions", {}, () => [
|
|
3468
|
+
M(E, {
|
|
3463
3469
|
appearance: "tertiary",
|
|
3464
3470
|
"data-testid": "form-view-configuration",
|
|
3465
|
-
onClick:
|
|
3471
|
+
onClick: S[0] || (S[0] = (T) => y())
|
|
3466
3472
|
}, {
|
|
3467
3473
|
default: b(() => [
|
|
3468
|
-
V(O(
|
|
3474
|
+
V(O(I(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3469
3475
|
]),
|
|
3470
3476
|
_: 1
|
|
3471
3477
|
}),
|
|
3472
|
-
|
|
3478
|
+
M(E, {
|
|
3473
3479
|
appearance: "secondary",
|
|
3474
3480
|
"data-testid": "form-cancel",
|
|
3475
3481
|
disabled: e.isReadonly,
|
|
3476
3482
|
type: "reset"
|
|
3477
3483
|
}, {
|
|
3478
3484
|
default: b(() => [
|
|
3479
|
-
V(O(
|
|
3485
|
+
V(O(I(a)("baseForm.actions.cancel")), 1)
|
|
3480
3486
|
]),
|
|
3481
3487
|
_: 1
|
|
3482
3488
|
}, 8, ["disabled"]),
|
|
3483
|
-
|
|
3489
|
+
M(E, {
|
|
3484
3490
|
appearance: "primary",
|
|
3485
3491
|
"data-testid": "form-submit",
|
|
3486
3492
|
disabled: u.value,
|
|
3487
3493
|
type: "submit"
|
|
3488
3494
|
}, {
|
|
3489
3495
|
default: b(() => [
|
|
3490
|
-
V(O(
|
|
3496
|
+
V(O(I(a)("baseForm.actions.save")), 1)
|
|
3491
3497
|
]),
|
|
3492
3498
|
_: 1
|
|
3493
3499
|
}, 8, ["disabled"])
|
|
3494
3500
|
], !0)
|
|
3495
3501
|
])
|
|
3496
3502
|
], 40, al)),
|
|
3497
|
-
B
|
|
3503
|
+
M(B, {
|
|
3498
3504
|
"close-on-blur": !1,
|
|
3499
3505
|
"data-testid": "form-view-configuration-slideout",
|
|
3500
3506
|
"has-overlay": !1,
|
|
3501
3507
|
"offset-top": 60,
|
|
3502
|
-
title:
|
|
3503
|
-
visible:
|
|
3504
|
-
onClose:
|
|
3508
|
+
title: I(a)("baseForm.configuration.title"),
|
|
3509
|
+
visible: h.value,
|
|
3510
|
+
onClose: S[1] || (S[1] = (T) => y())
|
|
3505
3511
|
}, {
|
|
3506
3512
|
default: b(() => [
|
|
3507
|
-
L("div", null, O(
|
|
3508
|
-
|
|
3513
|
+
L("div", null, O(I(a)("baseForm.configuration.message")), 1),
|
|
3514
|
+
M(R, {
|
|
3509
3515
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3510
3516
|
tabs: w.value
|
|
3511
3517
|
}, {
|
|
3512
3518
|
json: b(() => [
|
|
3513
|
-
|
|
3519
|
+
M(Ut, {
|
|
3514
3520
|
config: e.config,
|
|
3515
3521
|
"fetcher-url": p.value,
|
|
3516
3522
|
"json-record": r.formFields,
|
|
@@ -3518,7 +3524,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3518
3524
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3519
3525
|
]),
|
|
3520
3526
|
yaml: b(() => [
|
|
3521
|
-
|
|
3527
|
+
M(Tn, {
|
|
3522
3528
|
"yaml-record": r.formFields
|
|
3523
3529
|
}, null, 8, ["yaml-record"])
|
|
3524
3530
|
]),
|
|
@@ -3549,29 +3555,29 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3549
3555
|
}
|
|
3550
3556
|
},
|
|
3551
3557
|
setup(e) {
|
|
3552
|
-
const t = e, n =
|
|
3558
|
+
const t = e, n = C(() => {
|
|
3553
3559
|
var _;
|
|
3554
3560
|
return ((_ = t.rowEl) == null ? void 0 : _.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3555
|
-
}), r =
|
|
3561
|
+
}), r = C(() => {
|
|
3556
3562
|
var _;
|
|
3557
3563
|
return ((_ = n.value) == null ? void 0 : _.querySelector('[data-truncate="true"]')) || null;
|
|
3558
|
-
}), i =
|
|
3564
|
+
}), i = C(() => {
|
|
3559
3565
|
var N, w;
|
|
3560
3566
|
const _ = (N = t.rowEl) == null ? void 0 : N.querySelectorAll("td");
|
|
3561
3567
|
return _ ? ((w = _[0]) == null ? void 0 : w.getAttribute("data-testid")) === t.keyName : !0;
|
|
3562
|
-
}), a =
|
|
3568
|
+
}), a = C(() => i.value || t.tooltip);
|
|
3563
3569
|
let o;
|
|
3564
3570
|
const l = () => {
|
|
3565
3571
|
o && (o.disconnect(), o = void 0);
|
|
3566
3572
|
}, s = () => {
|
|
3567
|
-
var N, w,
|
|
3573
|
+
var N, w, $;
|
|
3568
3574
|
let _ = ((N = n.value) == null ? void 0 : N.clientWidth) || 0;
|
|
3569
3575
|
if (n.value && "getComputedStyle" in window) {
|
|
3570
|
-
const
|
|
3571
|
-
_ -= (parseFloat(
|
|
3576
|
+
const g = window.getComputedStyle(n.value);
|
|
3577
|
+
_ -= (parseFloat(g.paddingLeft) || 0) + (parseFloat(g.paddingRight) || 0);
|
|
3572
3578
|
}
|
|
3573
|
-
d.value = ((w = r.value) == null ? void 0 : w.getBoundingClientRect().width) || 0, u.value = _,
|
|
3574
|
-
}, c =
|
|
3579
|
+
d.value = ((w = r.value) == null ? void 0 : w.getBoundingClientRect().width) || 0, u.value = _, h.value = (($ = c.value) == null ? void 0 : $.innerText) || "";
|
|
3580
|
+
}, c = K({}), d = K(0), u = K(0), h = K(""), p = C(() => [r.value, n.value]), y = Ae(
|
|
3575
3581
|
p,
|
|
3576
3582
|
(_) => {
|
|
3577
3583
|
if (a.value && (l(), "ResizeObserver" in window && window)) {
|
|
@@ -3585,26 +3591,26 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3585
3591
|
}
|
|
3586
3592
|
},
|
|
3587
3593
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3588
|
-
),
|
|
3594
|
+
), x = C(() => a.value ? d.value > u.value : !1);
|
|
3589
3595
|
return Nn(() => {
|
|
3590
3596
|
s();
|
|
3591
3597
|
}), Bn(() => {
|
|
3592
3598
|
y();
|
|
3593
3599
|
}), (_, N) => {
|
|
3594
|
-
const w =
|
|
3595
|
-
return m(),
|
|
3600
|
+
const w = U("KTooltip");
|
|
3601
|
+
return m(), A("span", {
|
|
3596
3602
|
ref_key: "contentRef",
|
|
3597
3603
|
ref: c,
|
|
3598
3604
|
class: "content-wrapper"
|
|
3599
3605
|
}, [
|
|
3600
|
-
a.value ? (m(),
|
|
3606
|
+
a.value ? (m(), A("span", {
|
|
3601
3607
|
key: 0,
|
|
3602
3608
|
"data-truncate": a.value || void 0
|
|
3603
3609
|
}, [
|
|
3604
|
-
|
|
3610
|
+
M(w, {
|
|
3605
3611
|
"max-width": "300",
|
|
3606
3612
|
placement: "bottom-start",
|
|
3607
|
-
text:
|
|
3613
|
+
text: x.value ? h.value : ""
|
|
3608
3614
|
}, {
|
|
3609
3615
|
default: b(() => [
|
|
3610
3616
|
z(_.$slots, "default", {}, void 0, !0)
|
|
@@ -3736,8 +3742,8 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3736
3742
|
},
|
|
3737
3743
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3738
3744
|
setup(e, { emit: t }) {
|
|
3739
|
-
const n = e, r = t, { i18n: { t: i } } = Y.useI18n(), a =
|
|
3740
|
-
var f,
|
|
3745
|
+
const n = e, r = t, { i18n: { t: i } } = Y.useI18n(), a = C(() => {
|
|
3746
|
+
var f, v;
|
|
3741
3747
|
return typeof n.errorMessage == "string" ? {
|
|
3742
3748
|
hasError: !!n.errorMessage,
|
|
3743
3749
|
title: n.errorMessage,
|
|
@@ -3745,17 +3751,17 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3745
3751
|
} : {
|
|
3746
3752
|
hasError: !!n.errorMessage,
|
|
3747
3753
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3748
|
-
message: (
|
|
3754
|
+
message: (v = n.errorMessage) == null ? void 0 : v.message
|
|
3749
3755
|
};
|
|
3750
|
-
}), o =
|
|
3756
|
+
}), o = C(() => n.cacheIdentifier || n.preferencesStorageKey), l = (f) => f.hasData || !!n.query, s = C(() => {
|
|
3751
3757
|
const f = [];
|
|
3752
3758
|
return Object.keys(n.tableHeaders).forEach((F) => {
|
|
3753
|
-
const
|
|
3759
|
+
const E = n.tableHeaders[F];
|
|
3754
3760
|
f.push({
|
|
3755
|
-
label:
|
|
3761
|
+
label: E.label ?? F,
|
|
3756
3762
|
key: F,
|
|
3757
|
-
sortable:
|
|
3758
|
-
hidable:
|
|
3763
|
+
sortable: E.sortable ?? !1,
|
|
3764
|
+
hidable: E.hidable ?? !0
|
|
3759
3765
|
});
|
|
3760
3766
|
}), n.enableEntityActions && f.push({
|
|
3761
3767
|
key: "actions",
|
|
@@ -3765,58 +3771,58 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3765
3771
|
"data-rowid": f.id,
|
|
3766
3772
|
"data-testid": f.name,
|
|
3767
3773
|
...n.rowAttributes(f)
|
|
3768
|
-
}), d =
|
|
3769
|
-
var
|
|
3770
|
-
return (
|
|
3771
|
-
},
|
|
3772
|
-
const
|
|
3774
|
+
}), d = K({}), u = (f) => {
|
|
3775
|
+
var v;
|
|
3776
|
+
return (v = d.value) == null ? void 0 : v.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3777
|
+
}, h = (f) => {
|
|
3778
|
+
const v = {
|
|
3773
3779
|
"data-testid": f.headerKey,
|
|
3774
3780
|
...n.cellAttributes(f)
|
|
3775
3781
|
};
|
|
3776
|
-
return f.colIndex === 0 && (
|
|
3782
|
+
return f.colIndex === 0 && (v.style = {
|
|
3777
3783
|
maxWidth: "250px",
|
|
3778
3784
|
overflowX: "hidden",
|
|
3779
3785
|
textOverflow: "ellipsis"
|
|
3780
|
-
}),
|
|
3786
|
+
}), v;
|
|
3781
3787
|
}, p = () => {
|
|
3782
3788
|
r("empty-state-cta-clicked"), y();
|
|
3783
3789
|
}, y = () => {
|
|
3784
3790
|
r("clear-search-input");
|
|
3785
|
-
},
|
|
3786
|
-
r("click:row",
|
|
3791
|
+
}, x = C(() => n.disableRowClick ? void 0 : (f, v) => {
|
|
3792
|
+
r("click:row", v);
|
|
3787
3793
|
}), _ = (f) => {
|
|
3788
3794
|
r("sort", f);
|
|
3789
|
-
}, { setTablePreferences: N, getTablePreferences: w } = Yn(),
|
|
3795
|
+
}, { setTablePreferences: N, getTablePreferences: w } = Yn(), $ = K(w(o.value)), g = C(() => {
|
|
3790
3796
|
const f = w(o.value);
|
|
3791
3797
|
return {
|
|
3792
3798
|
...n.initialFetcherParams,
|
|
3793
3799
|
...f
|
|
3794
3800
|
};
|
|
3795
|
-
}),
|
|
3796
|
-
|
|
3797
|
-
!("hidable" in
|
|
3801
|
+
}), S = (f) => {
|
|
3802
|
+
$.value = f, s.value.forEach((v) => {
|
|
3803
|
+
!("hidable" in v) || !$.value.columnVisibility || v.hidable === !1 && ($.value.columnVisibility[v.key] = !0);
|
|
3798
3804
|
}), o.value && N(o.value, f);
|
|
3799
3805
|
};
|
|
3800
|
-
return (f,
|
|
3801
|
-
const F =
|
|
3802
|
-
return m(),
|
|
3806
|
+
return (f, v) => {
|
|
3807
|
+
const F = U("KButton"), E = U("KDropdown"), R = U("KTable"), B = U("KCard");
|
|
3808
|
+
return m(), D(B, {
|
|
3803
3809
|
class: "kong-ui-entity-base-table",
|
|
3804
3810
|
title: e.title,
|
|
3805
3811
|
"title-tag": e.titleTag
|
|
3806
3812
|
}, {
|
|
3807
3813
|
default: b(() => [
|
|
3808
|
-
|
|
3814
|
+
M(R, {
|
|
3809
3815
|
ref_key: "tableRefs",
|
|
3810
3816
|
ref: d,
|
|
3811
3817
|
"cache-identifier": o.value,
|
|
3812
|
-
"cell-attrs":
|
|
3818
|
+
"cell-attrs": h,
|
|
3813
3819
|
"client-sort": e.enableClientSort,
|
|
3814
3820
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3815
|
-
"empty-state-action-message": e.query ?
|
|
3821
|
+
"empty-state-action-message": e.query ? I(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3816
3822
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3817
3823
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3818
|
-
"empty-state-message": e.query ?
|
|
3819
|
-
"empty-state-title": e.query ?
|
|
3824
|
+
"empty-state-message": e.query ? I(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3825
|
+
"empty-state-title": e.query ? I(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3820
3826
|
error: a.value.hasError,
|
|
3821
3827
|
"error-state-message": a.value.message,
|
|
3822
3828
|
"error-state-title": a.value.title,
|
|
@@ -3824,7 +3830,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3824
3830
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3825
3831
|
headers: s.value,
|
|
3826
3832
|
"hide-pagination-when-optional": "",
|
|
3827
|
-
"initial-fetcher-params":
|
|
3833
|
+
"initial-fetcher-params": g.value,
|
|
3828
3834
|
loading: e.isLoading,
|
|
3829
3835
|
"pagination-offset": e.paginationType === "offset",
|
|
3830
3836
|
"resize-columns": "",
|
|
@@ -3832,40 +3838,40 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3832
3838
|
"search-input": e.query,
|
|
3833
3839
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3834
3840
|
sortable: !e.disableSorting,
|
|
3835
|
-
"table-preferences":
|
|
3841
|
+
"table-preferences": $.value,
|
|
3836
3842
|
onEmptyStateActionClick: p,
|
|
3837
|
-
"onRow:click":
|
|
3838
|
-
onSort:
|
|
3839
|
-
"onUpdate:tablePreferences":
|
|
3843
|
+
"onRow:click": x.value,
|
|
3844
|
+
onSort: v[0] || (v[0] = (T) => _(T)),
|
|
3845
|
+
"onUpdate:tablePreferences": S
|
|
3840
3846
|
}, _e({
|
|
3841
|
-
toolbar: b(({ state:
|
|
3847
|
+
toolbar: b(({ state: T }) => [
|
|
3842
3848
|
me(L("div", dl, [
|
|
3843
3849
|
z(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3844
|
-
f.$slots["toolbar-button"] ? (m(),
|
|
3850
|
+
f.$slots["toolbar-button"] ? (m(), A("div", fl, [
|
|
3845
3851
|
z(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3846
|
-
])) :
|
|
3852
|
+
])) : j("", !0)
|
|
3847
3853
|
], 512), [
|
|
3848
|
-
[ge, l(
|
|
3854
|
+
[ge, l(T)]
|
|
3849
3855
|
])
|
|
3850
3856
|
]),
|
|
3851
|
-
actions: b(({ row:
|
|
3857
|
+
actions: b(({ row: T, rowKey: W, rowValue: q }) => [
|
|
3852
3858
|
L("div", {
|
|
3853
3859
|
class: "actions-container",
|
|
3854
|
-
"data-testid":
|
|
3860
|
+
"data-testid": T.name
|
|
3855
3861
|
}, [
|
|
3856
|
-
|
|
3862
|
+
M(E, {
|
|
3857
3863
|
"kpop-attributes": { placement: "bottom-end" },
|
|
3858
3864
|
width: e.dropdownMenuWidth
|
|
3859
3865
|
}, {
|
|
3860
3866
|
items: b(() => [
|
|
3861
3867
|
z(f.$slots, "actions", {
|
|
3862
|
-
row:
|
|
3863
|
-
rowKey:
|
|
3864
|
-
rowValue:
|
|
3868
|
+
row: T,
|
|
3869
|
+
rowKey: W,
|
|
3870
|
+
rowValue: q
|
|
3865
3871
|
}, void 0, !0)
|
|
3866
3872
|
]),
|
|
3867
3873
|
default: b(() => [
|
|
3868
|
-
|
|
3874
|
+
M(F, {
|
|
3869
3875
|
appearance: "tertiary",
|
|
3870
3876
|
class: "actions-trigger",
|
|
3871
3877
|
"data-testid": "overflow-actions-button",
|
|
@@ -3873,7 +3879,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3873
3879
|
size: "small"
|
|
3874
3880
|
}, {
|
|
3875
3881
|
default: b(() => [
|
|
3876
|
-
|
|
3882
|
+
M(I(Xo))
|
|
3877
3883
|
]),
|
|
3878
3884
|
_: 1
|
|
3879
3885
|
})
|
|
@@ -3884,17 +3890,17 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3884
3890
|
]),
|
|
3885
3891
|
_: 2
|
|
3886
3892
|
}, [
|
|
3887
|
-
oe(e.tableHeaders, (
|
|
3888
|
-
name:
|
|
3889
|
-
fn: b(({ row:
|
|
3890
|
-
|
|
3891
|
-
"key-name": String(
|
|
3892
|
-
"row-el": u(
|
|
3893
|
-
tooltip:
|
|
3893
|
+
oe(e.tableHeaders, (T, W) => ({
|
|
3894
|
+
name: W,
|
|
3895
|
+
fn: b(({ row: q, rowKey: G, rowValue: he }) => [
|
|
3896
|
+
M(cl, {
|
|
3897
|
+
"key-name": String(W),
|
|
3898
|
+
"row-el": u(q),
|
|
3899
|
+
tooltip: T.tooltip
|
|
3894
3900
|
}, {
|
|
3895
3901
|
default: b(() => [
|
|
3896
|
-
z(f.$slots,
|
|
3897
|
-
row:
|
|
3902
|
+
z(f.$slots, W, {
|
|
3903
|
+
row: q,
|
|
3898
3904
|
rowKey: G,
|
|
3899
3905
|
rowValue: he
|
|
3900
3906
|
}, () => [
|
|
@@ -3908,7 +3914,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3908
3914
|
e.query ? void 0 : {
|
|
3909
3915
|
name: "empty-state-action-icon",
|
|
3910
3916
|
fn: b(() => [
|
|
3911
|
-
|
|
3917
|
+
M(I(_o))
|
|
3912
3918
|
]),
|
|
3913
3919
|
key: "0"
|
|
3914
3920
|
}
|
|
@@ -3963,14 +3969,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3963
3969
|
},
|
|
3964
3970
|
emits: ["cancel", "proceed"],
|
|
3965
3971
|
setup(e, { emit: t }) {
|
|
3966
|
-
const { i18nT: n } = Y.useI18n(), r = e, i = t, a =
|
|
3972
|
+
const { i18nT: n } = Y.useI18n(), r = e, i = t, a = C(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
3967
3973
|
i("cancel");
|
|
3968
3974
|
}, l = () => {
|
|
3969
3975
|
i("proceed");
|
|
3970
3976
|
};
|
|
3971
3977
|
return (s, c) => {
|
|
3972
|
-
const d =
|
|
3973
|
-
return m(),
|
|
3978
|
+
const d = U("KAlert"), u = U("KPrompt");
|
|
3979
|
+
return m(), D(u, {
|
|
3974
3980
|
"action-button-appearance": "danger",
|
|
3975
3981
|
"action-button-disabled": e.actionPending,
|
|
3976
3982
|
"action-button-text": "Yes, delete",
|
|
@@ -3982,15 +3988,15 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3982
3988
|
onProceed: l
|
|
3983
3989
|
}, {
|
|
3984
3990
|
default: b(() => [
|
|
3985
|
-
e.error ? (m(),
|
|
3986
|
-
|
|
3991
|
+
e.error ? (m(), A("div", ml, [
|
|
3992
|
+
M(d, { appearance: "danger" }, {
|
|
3987
3993
|
default: b(() => [
|
|
3988
3994
|
V(O(e.error), 1)
|
|
3989
3995
|
]),
|
|
3990
3996
|
_: 1
|
|
3991
3997
|
})
|
|
3992
|
-
])) :
|
|
3993
|
-
|
|
3998
|
+
])) : j("", !0),
|
|
3999
|
+
M(I(n), {
|
|
3994
4000
|
class: "message",
|
|
3995
4001
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3996
4002
|
tag: "p"
|
|
@@ -4008,11 +4014,11 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4008
4014
|
key: "0"
|
|
4009
4015
|
} : void 0
|
|
4010
4016
|
]), 1032, ["keypath"]),
|
|
4011
|
-
r.description || s.$slots.description ? (m(),
|
|
4017
|
+
r.description || s.$slots.description ? (m(), A("div", gl, [
|
|
4012
4018
|
z(s.$slots, "description", {}, () => [
|
|
4013
4019
|
L("p", null, O(r.description), 1)
|
|
4014
4020
|
], !0)
|
|
4015
|
-
])) :
|
|
4021
|
+
])) : j("", !0)
|
|
4016
4022
|
]),
|
|
4017
4023
|
_: 3
|
|
4018
4024
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
@@ -4041,7 +4047,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4041
4047
|
}
|
|
4042
4048
|
},
|
|
4043
4049
|
setup(e) {
|
|
4044
|
-
return (t, n) => (m(),
|
|
4050
|
+
return (t, n) => (m(), A("svg", vl, [
|
|
4045
4051
|
L("mask", bl, [
|
|
4046
4052
|
L("rect", {
|
|
4047
4053
|
fill: e.color,
|
|
@@ -4080,71 +4086,71 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4080
4086
|
},
|
|
4081
4087
|
emits: ["update:modelValue"],
|
|
4082
4088
|
setup(e, { emit: t }) {
|
|
4083
|
-
const { i18n: { t: n } } = Y.useI18n(), r = e, i = t, a =
|
|
4084
|
-
const
|
|
4085
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4086
|
-
|
|
4087
|
-
}),
|
|
4088
|
-
}), c =
|
|
4089
|
-
const
|
|
4090
|
-
return Object.keys(
|
|
4089
|
+
const { i18n: { t: n } } = Y.useI18n(), r = e, i = t, a = K(!1), o = K({}), l = K(/* @__PURE__ */ new Set()), s = C(() => {
|
|
4090
|
+
const g = [];
|
|
4091
|
+
return new URLSearchParams(r.modelValue).forEach((S, f) => {
|
|
4092
|
+
S !== "" && g.push(f);
|
|
4093
|
+
}), g;
|
|
4094
|
+
}), c = C(() => {
|
|
4095
|
+
const g = r.config.fields;
|
|
4096
|
+
return Object.keys(g).filter((S) => {
|
|
4091
4097
|
var f;
|
|
4092
|
-
return (f =
|
|
4093
|
-
}).map((
|
|
4094
|
-
label:
|
|
4095
|
-
value:
|
|
4098
|
+
return (f = g == null ? void 0 : g[S]) == null ? void 0 : f.searchable;
|
|
4099
|
+
}).map((S) => ({
|
|
4100
|
+
label: g[S].label || S,
|
|
4101
|
+
value: S,
|
|
4096
4102
|
expanded: !1
|
|
4097
4103
|
}));
|
|
4098
4104
|
});
|
|
4099
|
-
Ae(() => r.modelValue, (
|
|
4100
|
-
o.value = {}, new URLSearchParams(
|
|
4101
|
-
o.value[f] =
|
|
4105
|
+
Ae(() => r.modelValue, (g) => {
|
|
4106
|
+
o.value = {}, new URLSearchParams(g).forEach((S, f) => {
|
|
4107
|
+
o.value[f] = S;
|
|
4102
4108
|
});
|
|
4103
4109
|
});
|
|
4104
4110
|
const d = () => {
|
|
4105
4111
|
a.value = !a.value;
|
|
4106
|
-
}, u = (
|
|
4107
|
-
l.value.has(
|
|
4108
|
-
},
|
|
4109
|
-
i("update:modelValue",
|
|
4112
|
+
}, u = (g) => {
|
|
4113
|
+
l.value.has(g) ? l.value.delete(g) : l.value.add(g);
|
|
4114
|
+
}, h = (g) => {
|
|
4115
|
+
i("update:modelValue", g);
|
|
4110
4116
|
}, p = () => {
|
|
4111
|
-
|
|
4112
|
-
}, y = (
|
|
4113
|
-
var
|
|
4114
|
-
return (((f = (
|
|
4115
|
-
value:
|
|
4116
|
-
label:
|
|
4117
|
+
h("");
|
|
4118
|
+
}, y = (g) => `filter-${g}`, x = (g) => {
|
|
4119
|
+
var S, f;
|
|
4120
|
+
return (((f = (S = r.config.schema) == null ? void 0 : S[g]) == null ? void 0 : f.values) ?? []).map((v) => ({
|
|
4121
|
+
value: v,
|
|
4122
|
+
label: v
|
|
4117
4123
|
}));
|
|
4118
|
-
}, _ = (
|
|
4119
|
-
var
|
|
4120
|
-
return ((f = (
|
|
4121
|
-
}, N = (
|
|
4124
|
+
}, _ = (g) => {
|
|
4125
|
+
var S, f;
|
|
4126
|
+
return ((f = (S = r.config.schema) == null ? void 0 : S[g]) == null ? void 0 : f.type) ?? "text";
|
|
4127
|
+
}, N = (g) => {
|
|
4122
4128
|
o.value = {
|
|
4123
4129
|
...o.value,
|
|
4124
|
-
[
|
|
4125
|
-
},
|
|
4130
|
+
[g]: ""
|
|
4131
|
+
}, $();
|
|
4126
4132
|
}, w = () => {
|
|
4127
|
-
o.value = {},
|
|
4128
|
-
},
|
|
4129
|
-
const
|
|
4130
|
-
|
|
4133
|
+
o.value = {}, $(!0);
|
|
4134
|
+
}, $ = (g = !1) => {
|
|
4135
|
+
const S = Object.keys(o.value).reduce((f, v) => (o.value[v] && (f[v] = `${o.value[v]}`), f), {});
|
|
4136
|
+
g && (a.value = !1), i("update:modelValue", new URLSearchParams(S).toString());
|
|
4131
4137
|
};
|
|
4132
|
-
return (
|
|
4133
|
-
const f =
|
|
4134
|
-
return e.config.isExactMatch ? (m(),
|
|
4138
|
+
return (g, S) => {
|
|
4139
|
+
const f = U("KInput"), v = U("KButton"), F = U("KSelect");
|
|
4140
|
+
return e.config.isExactMatch ? (m(), D(f, {
|
|
4135
4141
|
key: 0,
|
|
4136
4142
|
autocomplete: "off",
|
|
4137
4143
|
class: "kong-ui-entity-filter-input",
|
|
4138
4144
|
"data-testid": "search-input",
|
|
4139
4145
|
"model-value": e.modelValue,
|
|
4140
4146
|
placeholder: e.config.placeholder,
|
|
4141
|
-
"onUpdate:modelValue":
|
|
4147
|
+
"onUpdate:modelValue": h
|
|
4142
4148
|
}, {
|
|
4143
4149
|
before: b(() => [
|
|
4144
|
-
|
|
4150
|
+
M($t)
|
|
4145
4151
|
]),
|
|
4146
4152
|
after: b(() => [
|
|
4147
|
-
me(
|
|
4153
|
+
me(M(I(jo), {
|
|
4148
4154
|
class: "kong-ui-entity-filter-clear",
|
|
4149
4155
|
onClick: p
|
|
4150
4156
|
}, null, 512), [
|
|
@@ -4152,15 +4158,15 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4152
4158
|
])
|
|
4153
4159
|
]),
|
|
4154
4160
|
_: 1
|
|
4155
|
-
}, 8, ["model-value", "placeholder"])) : (m(),
|
|
4156
|
-
|
|
4161
|
+
}, 8, ["model-value", "placeholder"])) : (m(), A("div", _l, [
|
|
4162
|
+
M(v, {
|
|
4157
4163
|
appearance: "tertiary",
|
|
4158
4164
|
"data-testid": "filter-button",
|
|
4159
4165
|
onClick: d
|
|
4160
4166
|
}, {
|
|
4161
4167
|
default: b(() => [
|
|
4162
|
-
|
|
4163
|
-
V(" " + O(
|
|
4168
|
+
M($t),
|
|
4169
|
+
V(" " + O(I(n)("filter.filterButtonText")) + " " + O(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4164
4170
|
]),
|
|
4165
4171
|
_: 1
|
|
4166
4172
|
}),
|
|
@@ -4171,89 +4177,89 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4171
4177
|
[ge, a.value]
|
|
4172
4178
|
]),
|
|
4173
4179
|
me(L("div", wl, [
|
|
4174
|
-
(m(!0),
|
|
4175
|
-
var
|
|
4176
|
-
return m(),
|
|
4177
|
-
key:
|
|
4180
|
+
(m(!0), A(ue, null, oe(c.value, (E) => {
|
|
4181
|
+
var R, B;
|
|
4182
|
+
return m(), A("div", {
|
|
4183
|
+
key: E.value,
|
|
4178
4184
|
class: "kong-ui-entity-filter-menu-item",
|
|
4179
|
-
"data-testid":
|
|
4185
|
+
"data-testid": E.value
|
|
4180
4186
|
}, [
|
|
4181
4187
|
L("span", {
|
|
4182
|
-
class: fe(["menu-item-title", { expanded: l.value.has(
|
|
4188
|
+
class: fe(["menu-item-title", { expanded: l.value.has(E.value) }]),
|
|
4183
4189
|
role: "button",
|
|
4184
4190
|
tabindex: "0",
|
|
4185
|
-
onClick: (
|
|
4186
|
-
onKeydown: Rn((
|
|
4191
|
+
onClick: (T) => u(E.value),
|
|
4192
|
+
onKeydown: Rn((T) => u(E.value), ["enter"])
|
|
4187
4193
|
}, [
|
|
4188
|
-
V(O(
|
|
4194
|
+
V(O(E.label) + " ", 1),
|
|
4189
4195
|
me(L("span", Il, null, 512), [
|
|
4190
|
-
[ge, s.value.includes(
|
|
4196
|
+
[ge, s.value.includes(E.value)]
|
|
4191
4197
|
]),
|
|
4192
|
-
|
|
4193
|
-
class: fe(["menu-item-expand-icon", { expanded: l.value.has(
|
|
4194
|
-
color:
|
|
4198
|
+
M(I(Bo), {
|
|
4199
|
+
class: fe(["menu-item-expand-icon", { expanded: l.value.has(E.value) }]),
|
|
4200
|
+
color: I(Sr)
|
|
4195
4201
|
}, null, 8, ["class", "color"])
|
|
4196
4202
|
], 42, Sl),
|
|
4197
4203
|
me(L("div", El, [
|
|
4198
4204
|
L("label", {
|
|
4199
4205
|
class: "menu-item-label",
|
|
4200
|
-
for: y(
|
|
4201
|
-
}, O(
|
|
4202
|
-
((
|
|
4206
|
+
for: y(E.value)
|
|
4207
|
+
}, O(I(n)("filter.fieldLabel")), 9, Tl),
|
|
4208
|
+
((B = (R = e.config.schema) == null ? void 0 : R[E.value]) == null ? void 0 : B.type) === "select" ? (m(), D(F, {
|
|
4203
4209
|
key: 0,
|
|
4204
|
-
id: y(
|
|
4205
|
-
modelValue: o.value[
|
|
4206
|
-
"onUpdate:modelValue": (
|
|
4207
|
-
items:
|
|
4208
|
-
placeholder:
|
|
4209
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(),
|
|
4210
|
+
id: y(E.value),
|
|
4211
|
+
modelValue: o.value[E.value],
|
|
4212
|
+
"onUpdate:modelValue": (T) => o.value[E.value] = T,
|
|
4213
|
+
items: x(E.value),
|
|
4214
|
+
placeholder: I(n)("filter.selectPlaceholder")
|
|
4215
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), D(f, {
|
|
4210
4216
|
key: 1,
|
|
4211
|
-
id: y(
|
|
4212
|
-
modelValue: o.value[
|
|
4213
|
-
"onUpdate:modelValue": (
|
|
4217
|
+
id: y(E.value),
|
|
4218
|
+
modelValue: o.value[E.value],
|
|
4219
|
+
"onUpdate:modelValue": (T) => o.value[E.value] = T,
|
|
4214
4220
|
autocomplete: "off",
|
|
4215
|
-
placeholder:
|
|
4216
|
-
type: _(
|
|
4221
|
+
placeholder: I(n)("filter.inputPlaceholder"),
|
|
4222
|
+
type: _(E.value)
|
|
4217
4223
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4218
4224
|
], 512), [
|
|
4219
|
-
[ge, l.value.has(
|
|
4225
|
+
[ge, l.value.has(E.value)]
|
|
4220
4226
|
]),
|
|
4221
4227
|
me(L("div", $l, [
|
|
4222
|
-
|
|
4228
|
+
M(v, {
|
|
4223
4229
|
appearance: "tertiary",
|
|
4224
4230
|
"data-testid": "apply-filter",
|
|
4225
4231
|
size: "small",
|
|
4226
|
-
onClick:
|
|
4232
|
+
onClick: S[0] || (S[0] = (T) => $(!0))
|
|
4227
4233
|
}, {
|
|
4228
4234
|
default: b(() => [
|
|
4229
|
-
V(O(
|
|
4235
|
+
V(O(I(n)("filter.applyButtonText")), 1)
|
|
4230
4236
|
]),
|
|
4231
4237
|
_: 1
|
|
4232
4238
|
}),
|
|
4233
|
-
|
|
4239
|
+
M(v, {
|
|
4234
4240
|
appearance: "tertiary",
|
|
4235
4241
|
"data-testid": "clear-filter",
|
|
4236
4242
|
size: "small",
|
|
4237
|
-
onClick: (
|
|
4243
|
+
onClick: (T) => N(E.value)
|
|
4238
4244
|
}, {
|
|
4239
4245
|
default: b(() => [
|
|
4240
|
-
V(O(
|
|
4246
|
+
V(O(I(n)("filter.clearButtonText")), 1)
|
|
4241
4247
|
]),
|
|
4242
4248
|
_: 2
|
|
4243
4249
|
}, 1032, ["onClick"])
|
|
4244
4250
|
], 512), [
|
|
4245
|
-
[ge, l.value.has(
|
|
4251
|
+
[ge, l.value.has(E.value)]
|
|
4246
4252
|
])
|
|
4247
4253
|
], 8, Al);
|
|
4248
4254
|
}), 128)),
|
|
4249
4255
|
L("div", Fl, [
|
|
4250
|
-
|
|
4256
|
+
M(v, {
|
|
4251
4257
|
appearance: "tertiary",
|
|
4252
4258
|
size: "small",
|
|
4253
4259
|
onClick: w
|
|
4254
4260
|
}, {
|
|
4255
4261
|
default: b(() => [
|
|
4256
|
-
V(O(
|
|
4262
|
+
V(O(I(n)("filter.clearAllButtonText")), 1)
|
|
4257
4263
|
]),
|
|
4258
4264
|
_: 1
|
|
4259
4265
|
})
|
|
@@ -4296,9 +4302,9 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4296
4302
|
},
|
|
4297
4303
|
emits: ["cancel", "proceed"],
|
|
4298
4304
|
setup(e, { emit: t }) {
|
|
4299
|
-
const { i18n: { t: n }, i18nT: r } = Y.useI18n(), i = e, a = t, o =
|
|
4305
|
+
const { i18n: { t: n }, i18nT: r } = Y.useI18n(), i = e, a = t, o = K(!1), l = C(
|
|
4300
4306
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
4301
|
-
), s =
|
|
4307
|
+
), s = C(
|
|
4302
4308
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4303
4309
|
), c = () => a("cancel"), d = async () => {
|
|
4304
4310
|
if (i.onConfirm) {
|
|
@@ -4312,10 +4318,10 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4312
4318
|
}
|
|
4313
4319
|
}
|
|
4314
4320
|
};
|
|
4315
|
-
return (u,
|
|
4316
|
-
const p =
|
|
4317
|
-
return m(),
|
|
4318
|
-
|
|
4321
|
+
return (u, h) => {
|
|
4322
|
+
const p = U("KPrompt");
|
|
4323
|
+
return m(), D(Mn, { to: "body" }, [
|
|
4324
|
+
M(p, {
|
|
4319
4325
|
"action-button-disabled": o.value,
|
|
4320
4326
|
"action-button-text": s.value,
|
|
4321
4327
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4325,7 +4331,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4325
4331
|
onProceed: d
|
|
4326
4332
|
}, {
|
|
4327
4333
|
default: b(() => [
|
|
4328
|
-
|
|
4334
|
+
M(I(r), {
|
|
4329
4335
|
keypath: `toggleModal.${i.action}.message`,
|
|
4330
4336
|
scope: "global"
|
|
4331
4337
|
}, {
|
|
@@ -4365,13 +4371,13 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4365
4371
|
}
|
|
4366
4372
|
},
|
|
4367
4373
|
setup(e) {
|
|
4368
|
-
const t = e, n =
|
|
4374
|
+
const t = e, n = K(void 0), r = C(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4369
4375
|
return Ae(() => t.authFunction, async () => {
|
|
4370
4376
|
n.value = await t.authFunction();
|
|
4371
4377
|
}, { immediate: !0 }), (i, a) => r.value ? z(i.$slots, "default", {
|
|
4372
4378
|
key: 0,
|
|
4373
4379
|
isAllowed: n.value
|
|
4374
|
-
}) :
|
|
4380
|
+
}) : j("", !0);
|
|
4375
4381
|
}
|
|
4376
4382
|
});
|
|
4377
4383
|
let Be;
|
|
@@ -4439,34 +4445,34 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4439
4445
|
},
|
|
4440
4446
|
setup(e) {
|
|
4441
4447
|
const t = Xe(), n = Ml();
|
|
4442
|
-
return (r, i) => (m(),
|
|
4443
|
-
"aria-labelledby": e.title ?
|
|
4448
|
+
return (r, i) => (m(), A("div", {
|
|
4449
|
+
"aria-labelledby": e.title ? I(n) : void 0,
|
|
4444
4450
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4445
4451
|
role: "group"
|
|
4446
4452
|
}, [
|
|
4447
4453
|
L("div", Dl, [
|
|
4448
|
-
e.hideInfoHeader ?
|
|
4454
|
+
e.hideInfoHeader ? j("", !0) : (m(), A("div", {
|
|
4449
4455
|
key: 0,
|
|
4450
4456
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4451
4457
|
}, [
|
|
4452
|
-
e.title ? (m(),
|
|
4458
|
+
e.title ? (m(), D(se(e.titleTag), {
|
|
4453
4459
|
key: 0,
|
|
4454
|
-
id:
|
|
4460
|
+
id: I(n),
|
|
4455
4461
|
class: "form-section-title"
|
|
4456
4462
|
}, {
|
|
4457
4463
|
default: b(() => [
|
|
4458
4464
|
V(O(e.title), 1)
|
|
4459
4465
|
]),
|
|
4460
4466
|
_: 1
|
|
4461
|
-
}, 8, ["id"])) :
|
|
4462
|
-
e.description ||
|
|
4467
|
+
}, 8, ["id"])) : j("", !0),
|
|
4468
|
+
e.description || I(t).description ? (m(), A("div", Ul, [
|
|
4463
4469
|
z(r.$slots, "description", {}, () => [
|
|
4464
4470
|
L("p", null, O(e.description), 1)
|
|
4465
4471
|
], !0)
|
|
4466
|
-
])) :
|
|
4467
|
-
|
|
4472
|
+
])) : j("", !0),
|
|
4473
|
+
I(t).footer ? (m(), A("div", jl, [
|
|
4468
4474
|
z(r.$slots, "footer", {}, void 0, !0)
|
|
4469
|
-
])) :
|
|
4475
|
+
])) : j("", !0)
|
|
4470
4476
|
], 2)),
|
|
4471
4477
|
L("div", ql, [
|
|
4472
4478
|
z(r.$slots, "default", {}, void 0, !0)
|
|
@@ -4504,10 +4510,10 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4504
4510
|
}
|
|
4505
4511
|
},
|
|
4506
4512
|
setup(e) {
|
|
4507
|
-
const t = e, n =
|
|
4513
|
+
const t = e, n = K(), { isTruncated: r } = Y.useTruncationDetector(n), { i18n: { t: i } } = Y.useI18n(), a = i("global.actions.copyId"), o = K(a), l = C(() => t.entityLinkData.deleted ?? !1), s = C(() => {
|
|
4508
4514
|
var u;
|
|
4509
4515
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4510
|
-
}), c =
|
|
4516
|
+
}), c = C(() => {
|
|
4511
4517
|
var u;
|
|
4512
4518
|
return `${(u = s.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4513
4519
|
}), d = async (u) => {
|
|
@@ -4515,10 +4521,10 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4515
4521
|
o.value = a;
|
|
4516
4522
|
}, 1800));
|
|
4517
4523
|
};
|
|
4518
|
-
return (u,
|
|
4519
|
-
const p =
|
|
4520
|
-
return m(),
|
|
4521
|
-
l.value ? (m(),
|
|
4524
|
+
return (u, h) => {
|
|
4525
|
+
const p = U("KTooltip"), y = U("KExternalLink"), x = U("KClipboardProvider");
|
|
4526
|
+
return m(), A("div", Hl, [
|
|
4527
|
+
l.value ? (m(), A("div", Vl, O(c.value), 1)) : s.value ? s.value ? (m(), D(y, {
|
|
4522
4528
|
key: 2,
|
|
4523
4529
|
class: "entity-link",
|
|
4524
4530
|
"hide-icon": !e.newWindow,
|
|
@@ -4526,8 +4532,8 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4526
4532
|
target: e.newWindow ? "_blank" : "_self"
|
|
4527
4533
|
}, {
|
|
4528
4534
|
default: b(() => [
|
|
4529
|
-
|
|
4530
|
-
text:
|
|
4535
|
+
M(p, {
|
|
4536
|
+
text: I(r) && e.entityLinkData.label || ""
|
|
4531
4537
|
}, {
|
|
4532
4538
|
default: b(() => [
|
|
4533
4539
|
L("span", {
|
|
@@ -4540,8 +4546,8 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4540
4546
|
}, 8, ["text"])
|
|
4541
4547
|
]),
|
|
4542
4548
|
_: 1
|
|
4543
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4544
|
-
s.value && e.allowCopy ? (m(),
|
|
4549
|
+
}, 8, ["hide-icon", "href", "target"])) : j("", !0) : (m(), A("div", zl, O(" – "))),
|
|
4550
|
+
s.value && e.allowCopy ? (m(), D(p, {
|
|
4545
4551
|
key: o.value,
|
|
4546
4552
|
class: "copy-uuid-tooltip",
|
|
4547
4553
|
"max-width": "160",
|
|
@@ -4549,17 +4555,17 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4549
4555
|
text: o.value
|
|
4550
4556
|
}, {
|
|
4551
4557
|
default: b(() => [
|
|
4552
|
-
|
|
4558
|
+
M(x, null, {
|
|
4553
4559
|
default: b(({ copyToClipboard: _ }) => [
|
|
4554
4560
|
L("span", {
|
|
4555
4561
|
class: "entity-link-copy-id",
|
|
4556
4562
|
onClick: Ye((N) => d(_), ["stop"])
|
|
4557
4563
|
}, [
|
|
4558
|
-
|
|
4564
|
+
M(I(Yo), {
|
|
4559
4565
|
class: "copy-icon",
|
|
4560
|
-
color:
|
|
4566
|
+
color: I(Ir),
|
|
4561
4567
|
"data-testid": "copy-id",
|
|
4562
|
-
size:
|
|
4568
|
+
size: I(Tr)
|
|
4563
4569
|
}, null, 8, ["color", "size"])
|
|
4564
4570
|
], 8, Yl)
|
|
4565
4571
|
]),
|
|
@@ -4567,7 +4573,7 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4567
4573
|
})
|
|
4568
4574
|
]),
|
|
4569
4575
|
_: 1
|
|
4570
|
-
}, 8, ["text"])) :
|
|
4576
|
+
}, 8, ["text"])) : j("", !0)
|
|
4571
4577
|
]);
|
|
4572
4578
|
};
|
|
4573
4579
|
}
|