@kong-ui-public/entities-keys 2.5.0 → 2.5.1
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.
- package/dist/entities-keys.es.js +700 -694
- package/dist/entities-keys.umd.js +25 -25
- package/package.json +2 -2
package/dist/entities-keys.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as X, ref as E, computed as x, watch as ge, renderSlot as ee, createCommentVNode as J, unref as
|
|
1
|
+
import { defineComponent as X, ref as E, computed as x, watch as ge, renderSlot as ee, createCommentVNode as J, unref as m, resolveComponent as B, openBlock as y, createElementBlock as O, createVNode as A, withCtx as k, createTextVNode as G, toDisplayString as N, useCssVars as Qt, useSlots as mt, createElementVNode as L, createSlots as $e, createBlock as V, resolveDynamicComponent as Oe, normalizeProps as ea, guardReactiveProps as ta, Fragment as ye, renderList as pe, mergeProps as na, normalizeClass as _e, onBeforeMount as Xe, withModifiers as ct, withDirectives as be, vShow as we, withKeys as aa, inject as ia, onMounted as ra, onUnmounted as oa, normalizeStyle as et, pushScopeId as tt, popScopeId as nt, reactive as At } from "vue";
|
|
2
2
|
import { useRouter as gt } from "vue-router";
|
|
3
3
|
import { createI18n as Xt, i18nTComponent as en } from "@kong-ui-public/i18n";
|
|
4
4
|
import jt from "axios";
|
|
@@ -339,7 +339,7 @@ const ma = {
|
|
|
339
339
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
340
340
|
confirmText: "Yes, disable"
|
|
341
341
|
}
|
|
342
|
-
},
|
|
342
|
+
}, _a = {
|
|
343
343
|
global: ma,
|
|
344
344
|
deleteModal: ga,
|
|
345
345
|
baseForm: ha,
|
|
@@ -351,7 +351,7 @@ const ma = {
|
|
|
351
351
|
toggleModal: Sa
|
|
352
352
|
};
|
|
353
353
|
function kt() {
|
|
354
|
-
const e = Xt("en-us",
|
|
354
|
+
const e = Xt("en-us", _a);
|
|
355
355
|
return {
|
|
356
356
|
i18n: e,
|
|
357
357
|
i18nT: en(e)
|
|
@@ -364,7 +364,7 @@ function nn() {
|
|
|
364
364
|
return !1;
|
|
365
365
|
const i = /* @__PURE__ */ new Set([...n, ...a]);
|
|
366
366
|
for (const r of i) {
|
|
367
|
-
const o = n.filter((
|
|
367
|
+
const o = n.filter((c) => c === r).length, l = a.filter((c) => c === r).length;
|
|
368
368
|
if (o !== l)
|
|
369
369
|
return !1;
|
|
370
370
|
}
|
|
@@ -402,7 +402,7 @@ function nn() {
|
|
|
402
402
|
isValidUuid: (n) => n ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(n) : !1
|
|
403
403
|
};
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Ia(e, t, n, a = {
|
|
406
406
|
fetchedItemsKey: "data",
|
|
407
407
|
searchKeys: ["id"]
|
|
408
408
|
}) {
|
|
@@ -411,32 +411,32 @@ function _a(e, t, n, a = {
|
|
|
411
411
|
headers: e.requestHeaders
|
|
412
412
|
}), { i18n: { t: r } } = kt(), { debounce: o } = pa(), l = o(async (v) => {
|
|
413
413
|
await D(v);
|
|
414
|
-
}, 200),
|
|
415
|
-
let C = `${e.apiBaseUrl}${
|
|
414
|
+
}, 200), c = E(!1), d = E(""), s = E(""), u = E([]), h = E([]), f = E(void 0), S = m(t);
|
|
415
|
+
let C = `${e.apiBaseUrl}${S}`;
|
|
416
416
|
e.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
417
|
-
const { isValidUuid:
|
|
417
|
+
const { isValidUuid: I } = nn(), U = async () => {
|
|
418
418
|
try {
|
|
419
|
-
|
|
419
|
+
c.value = !0;
|
|
420
420
|
const { data: v } = await i.get(`${C}?size=${n}`);
|
|
421
|
-
v != null && v.next || (
|
|
421
|
+
v != null && v.next || (f.value = a.fetchedItemsKey in v ? v[a.fetchedItemsKey] : []), h.value = a.fetchedItemsKey in v ? v[a.fetchedItemsKey] : [], u.value = h.value;
|
|
422
422
|
} catch {
|
|
423
|
-
|
|
423
|
+
u.value = [], d.value = r("debouncedFilter.errors.fetch");
|
|
424
424
|
} finally {
|
|
425
|
-
|
|
425
|
+
c.value = !1;
|
|
426
426
|
}
|
|
427
427
|
}, b = E(""), D = async (v) => {
|
|
428
|
-
var p,
|
|
428
|
+
var p, g, _;
|
|
429
429
|
if (b.value !== v)
|
|
430
|
-
if (b.value = v || "",
|
|
430
|
+
if (b.value = v || "", f.value === void 0)
|
|
431
431
|
try {
|
|
432
|
-
if (
|
|
432
|
+
if (c.value = !0, d.value = "", s.value = "", e.app === "konnect") {
|
|
433
433
|
let q = C + "";
|
|
434
434
|
v && (q += `/${v}`);
|
|
435
435
|
const { data: j } = await i.get(`${q}?size=${n}`);
|
|
436
|
-
a.fetchedItemsKey in j ?
|
|
436
|
+
a.fetchedItemsKey in j ? u.value = j[a.fetchedItemsKey] : j != null && j.id ? u.value = [j] : u.value = [];
|
|
437
437
|
} else if (v) {
|
|
438
438
|
const q = [];
|
|
439
|
-
|
|
439
|
+
I(v) && a.searchKeys.includes("id") ? q.push((async () => {
|
|
440
440
|
const { data: M } = await i.get(`${C}/${v}`);
|
|
441
441
|
return [M[a.fetchedItemsKey] ?? M];
|
|
442
442
|
})()) : q.push(
|
|
@@ -446,21 +446,21 @@ function _a(e, t, n, a = {
|
|
|
446
446
|
})
|
|
447
447
|
);
|
|
448
448
|
const j = await Promise.all(q), P = /* @__PURE__ */ new Set();
|
|
449
|
-
|
|
449
|
+
u.value = [], (p = j == null ? void 0 : j.forEach) == null || p.call(j, (M) => {
|
|
450
450
|
var K;
|
|
451
451
|
(K = M == null ? void 0 : M.forEach) == null || K.call(M, (z) => {
|
|
452
|
-
P.has(z.id) || (P.add(z.id),
|
|
452
|
+
P.has(z.id) || (P.add(z.id), u.value.push(z));
|
|
453
453
|
});
|
|
454
454
|
});
|
|
455
455
|
} else
|
|
456
|
-
|
|
456
|
+
u.value = h.value;
|
|
457
457
|
} catch (q) {
|
|
458
|
-
((
|
|
458
|
+
((g = q == null ? void 0 : q.response) == null ? void 0 : g.status) === 404 ? s.value = r("debouncedFilter.errors.invalid") : (u.value = [], d.value = r("debouncedFilter.errors.fetch"));
|
|
459
459
|
} finally {
|
|
460
|
-
|
|
460
|
+
c.value = !1;
|
|
461
461
|
}
|
|
462
462
|
else
|
|
463
|
-
|
|
463
|
+
c.value = !0, s.value = "", v ? (u.value = (_ = f.value) == null ? void 0 : _.filter((q) => {
|
|
464
464
|
var j;
|
|
465
465
|
let P = !1;
|
|
466
466
|
for (const M of a.searchKeys) {
|
|
@@ -468,20 +468,20 @@ function _a(e, t, n, a = {
|
|
|
468
468
|
K != null && K.includes(v.toLowerCase()) && (P = !0);
|
|
469
469
|
}
|
|
470
470
|
return P;
|
|
471
|
-
}), (!
|
|
471
|
+
}), (!u.value || !u.value.length) && (s.value = r("debouncedFilter.errors.invalid"))) : u.value = f.value, c.value = !1;
|
|
472
472
|
};
|
|
473
473
|
return {
|
|
474
|
-
loading:
|
|
475
|
-
error:
|
|
476
|
-
validationError:
|
|
477
|
-
results:
|
|
478
|
-
allRecords:
|
|
474
|
+
loading: c,
|
|
475
|
+
error: d,
|
|
476
|
+
validationError: s,
|
|
477
|
+
results: u,
|
|
478
|
+
allRecords: f,
|
|
479
479
|
loadItems: U,
|
|
480
480
|
debouncedQueryChange: l
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
function xa(e, t) {
|
|
484
|
-
const n =
|
|
484
|
+
const n = m(t), a = x(
|
|
485
485
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
486
486
|
);
|
|
487
487
|
return a.value.search = "", (i) => `${a.value.href}/${i}`;
|
|
@@ -528,66 +528,72 @@ function ja(e) {
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
function an(e, t) {
|
|
531
|
-
const n = E(
|
|
531
|
+
const n = E(m(e)), a = E(m(t)), i = x(
|
|
532
532
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
533
533
|
), r = x(
|
|
534
534
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
535
535
|
);
|
|
536
536
|
return (o) => {
|
|
537
|
-
const { page: l, pageSize:
|
|
537
|
+
const { page: l, pageSize: c, offset: d, sortColumnKey: s, sortColumnOrder: u, query: h } = o;
|
|
538
538
|
try {
|
|
539
|
-
let
|
|
540
|
-
return i.value && h ? (
|
|
541
|
-
|
|
542
|
-
}),
|
|
543
|
-
} catch (
|
|
544
|
-
return console.error("RouteList(fetcher)",
|
|
539
|
+
let f = new URL(r.value.href);
|
|
540
|
+
return i.value && h ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${h}/`) : new URL(`${f.href}?filter[name][contains]=${h}`)) : (i.value || new URLSearchParams(h).forEach((S, C) => {
|
|
541
|
+
f.searchParams.append(C, S);
|
|
542
|
+
}), s && f.searchParams.append("sort_by", s), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(c))), d && l !== 1 && f.searchParams.append("offset", String(d)), f.href;
|
|
543
|
+
} catch (f) {
|
|
544
|
+
return console.error("RouteList(fetcher)", f), a.value;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
function Ta(e, t, n = "data") {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
549
|
+
var a;
|
|
550
|
+
const i = m(t), { axiosInstance: r } = vt({
|
|
551
|
+
...e.axiosRequestConfig,
|
|
552
|
+
headers: { ...(a = e.axiosRequestConfig) == null ? void 0 : a.headers, ...e.requestHeaders }
|
|
553
|
+
}), o = an(e, i), l = E({
|
|
552
554
|
status: je.Idle
|
|
553
555
|
});
|
|
554
|
-
return { fetcher: async (
|
|
556
|
+
return { fetcher: async (c) => {
|
|
557
|
+
var d;
|
|
555
558
|
try {
|
|
556
|
-
|
|
557
|
-
let s =
|
|
558
|
-
s.includes("filter[name]") && (s = `${s}&page[size]=${
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
const h =
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
559
|
+
l.value = { status: je.Loading };
|
|
560
|
+
let s = o(c);
|
|
561
|
+
s.includes("filter[name]") && (s = `${s}&page[size]=${c.pageSize}&page[number]=${c.page}`);
|
|
562
|
+
const u = await r.get(s);
|
|
563
|
+
if (u.status >= 400)
|
|
564
|
+
throw u;
|
|
565
|
+
const h = u.data, f = n && n.replace(/[^\w-_]/gi, "");
|
|
566
|
+
let S;
|
|
567
|
+
h[f] && Array.isArray(h[f]) ? S = h[f] : Array.isArray(h) ? S = h : S = Object.keys(h).length ? [h] : [];
|
|
568
|
+
const C = {
|
|
569
|
+
data: S,
|
|
570
|
+
total: S.length,
|
|
571
|
+
...h.offset ? {
|
|
566
572
|
pagination: {
|
|
567
|
-
offset:
|
|
573
|
+
offset: h.offset
|
|
568
574
|
}
|
|
569
575
|
} : null
|
|
570
576
|
};
|
|
571
|
-
return
|
|
577
|
+
return l.value = {
|
|
572
578
|
status: je.Idle,
|
|
573
|
-
response:
|
|
574
|
-
},
|
|
579
|
+
response: C
|
|
580
|
+
}, C;
|
|
575
581
|
} catch (s) {
|
|
576
582
|
const u = {
|
|
577
583
|
data: [],
|
|
578
584
|
total: 0
|
|
579
585
|
};
|
|
580
|
-
return
|
|
586
|
+
return c.query && (((d = s.response) == null ? void 0 : d.status) === 404 || s.status === 404) ? (l.value = {
|
|
581
587
|
status: je.NoResults,
|
|
582
588
|
response: u,
|
|
583
|
-
error: s
|
|
584
|
-
}, u) : (
|
|
589
|
+
error: s.response ? s : { response: s }
|
|
590
|
+
}, u) : (l.value = {
|
|
585
591
|
status: je.Error,
|
|
586
592
|
response: u,
|
|
587
|
-
error: s
|
|
593
|
+
error: s.response ? s : { response: s }
|
|
588
594
|
}, u);
|
|
589
595
|
}
|
|
590
|
-
}, fetcherState:
|
|
596
|
+
}, fetcherState: l };
|
|
591
597
|
}
|
|
592
598
|
function $a() {
|
|
593
599
|
const e = (n, a = "_") => n ? n.split(a).map((i) => i.toLowerCase() === "id" ? i.toUpperCase() : i.charAt(0).toUpperCase() + i.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
@@ -661,7 +667,7 @@ function qa(e) {
|
|
|
661
667
|
}
|
|
662
668
|
const ie = {
|
|
663
669
|
useAxios: vt,
|
|
664
|
-
useDebouncedFilter:
|
|
670
|
+
useDebouncedFilter: Ia,
|
|
665
671
|
useDeleteUrlBuilder: xa,
|
|
666
672
|
useErrors: Aa,
|
|
667
673
|
useExternalLinkCreator: ja,
|
|
@@ -693,25 +699,25 @@ const ie = {
|
|
|
693
699
|
},
|
|
694
700
|
setup(e) {
|
|
695
701
|
const t = e, { i18n: { t: n } } = ie.useI18n(), { convertKeyToTitle: a } = ie.useStringHelpers(), i = x(() => t.item.key ?? "json-array-item"), r = x(() => t.item.value ?? t.item), o = x(() => {
|
|
696
|
-
const
|
|
697
|
-
return t.isArrayItem && delete
|
|
702
|
+
const c = JSON.parse(JSON.stringify(r.value));
|
|
703
|
+
return t.isArrayItem && delete c.name, c;
|
|
698
704
|
}), l = x(() => {
|
|
699
|
-
var
|
|
700
|
-
return t.isArrayItem ? (
|
|
705
|
+
var c;
|
|
706
|
+
return t.isArrayItem ? (c = r.value) != null && c.name ? a(r.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
701
707
|
});
|
|
702
|
-
return (
|
|
703
|
-
class:
|
|
708
|
+
return (c, d) => (y(), V(Oe(e.isArrayItem ? "fieldset" : "div"), {
|
|
709
|
+
class: _e(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
704
710
|
}, {
|
|
705
711
|
default: k(() => [
|
|
706
|
-
e.isArrayItem ? (
|
|
712
|
+
e.isArrayItem ? (y(), O("legend", La, [
|
|
707
713
|
L("b", null, N(l.value), 1)
|
|
708
714
|
])) : J("", !0),
|
|
709
|
-
(
|
|
710
|
-
key: `${i.value}-property-${
|
|
715
|
+
(y(!0), O(ye, null, pe(Object.keys(o.value), (s, u) => (y(), V(He, {
|
|
716
|
+
key: `${i.value}-property-${u}`,
|
|
711
717
|
item: {
|
|
712
|
-
key:
|
|
713
|
-
label:
|
|
714
|
-
value: o.value[
|
|
718
|
+
key: s,
|
|
719
|
+
label: m(a)(s),
|
|
720
|
+
value: o.value[s]
|
|
715
721
|
}
|
|
716
722
|
}, null, 8, ["item"]))), 128))
|
|
717
723
|
]),
|
|
@@ -736,14 +742,14 @@ const ie = {
|
|
|
736
742
|
const { i18n: { t } } = ie.useI18n();
|
|
737
743
|
return (n, a) => {
|
|
738
744
|
const i = B("KButton");
|
|
739
|
-
return
|
|
745
|
+
return y(), O("div", null, [
|
|
740
746
|
A(i, {
|
|
741
747
|
appearance: "tertiary",
|
|
742
748
|
class: "navigation-button",
|
|
743
749
|
onClick: a[0] || (a[0] = (r) => n.$emit("navigation-click", e.item))
|
|
744
750
|
}, {
|
|
745
751
|
default: k(() => [
|
|
746
|
-
G(N(e.item.value ||
|
|
752
|
+
G(N(e.item.value || m(t)("baseConfigCard.commonFields.link")), 1)
|
|
747
753
|
]),
|
|
748
754
|
_: 1
|
|
749
755
|
})
|
|
@@ -762,11 +768,11 @@ const ie = {
|
|
|
762
768
|
const { i18n: { t } } = ie.useI18n();
|
|
763
769
|
return (n, a) => {
|
|
764
770
|
const i = B("KBadge");
|
|
765
|
-
return
|
|
771
|
+
return y(), V(i, {
|
|
766
772
|
appearance: e.status ? "success" : "neutral"
|
|
767
773
|
}, {
|
|
768
774
|
default: k(() => [
|
|
769
|
-
G(N(e.status ?
|
|
775
|
+
G(N(e.status ? m(t)("baseConfigCard.statusBadge.enabledLabel") : m(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
770
776
|
]),
|
|
771
777
|
_: 1
|
|
772
778
|
}, 8, ["appearance"]);
|
|
@@ -795,13 +801,13 @@ const ie = {
|
|
|
795
801
|
},
|
|
796
802
|
emits: ["navigation-click"],
|
|
797
803
|
setup(e, { emit: t }) {
|
|
798
|
-
Qt((
|
|
799
|
-
"07753575":
|
|
800
|
-
"32d44ea8":
|
|
801
|
-
"5036b738":
|
|
802
|
-
"5038fd13":
|
|
804
|
+
Qt((S) => ({
|
|
805
|
+
"07753575": s.value ? "none" : `solid ${m(Ja)} ${m(Pa)}`,
|
|
806
|
+
"32d44ea8": d.value && l.value ? "block" : "flex",
|
|
807
|
+
"5036b738": d.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
808
|
+
"5038fd13": d.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
803
809
|
}));
|
|
804
|
-
const n = e, a = t, i = mt(), { i18n: { t: r, formatUnixTimeStamp: o } } = ie.useI18n(), l = x(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""),
|
|
810
|
+
const n = e, a = t, i = mt(), { i18n: { t: r, formatUnixTimeStamp: o } } = ie.useI18n(), l = x(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), c = x(() => !!(n.item.tooltip || i["label-tooltip"])), d = x(() => n.item.type === Z.Json || n.item.type === Z.JsonArray), s = x(() => n.item.type === Z.JsonArray), u = x(() => {
|
|
805
811
|
switch (n.item.type) {
|
|
806
812
|
case Z.ID:
|
|
807
813
|
return {
|
|
@@ -871,8 +877,8 @@ const ie = {
|
|
|
871
877
|
attrs: {
|
|
872
878
|
"data-testid": `${n.item.key}-internal-link`,
|
|
873
879
|
item: n.item,
|
|
874
|
-
onNavigationClick: (
|
|
875
|
-
a("navigation-click",
|
|
880
|
+
onNavigationClick: (S) => {
|
|
881
|
+
a("navigation-click", S);
|
|
876
882
|
}
|
|
877
883
|
}
|
|
878
884
|
};
|
|
@@ -911,28 +917,28 @@ const ie = {
|
|
|
911
917
|
text: n.item.value
|
|
912
918
|
};
|
|
913
919
|
}
|
|
914
|
-
}), h = E(), { isTruncated:
|
|
915
|
-
return (
|
|
916
|
-
const
|
|
917
|
-
return
|
|
920
|
+
}), h = E(), { isTruncated: f } = ie.useTruncationDetector(h);
|
|
921
|
+
return (S, C) => {
|
|
922
|
+
const I = B("KLabel"), U = B("KBadge"), b = B("KCopy"), D = B("KTooltip");
|
|
923
|
+
return y(), O("div", Wa, [
|
|
918
924
|
L("div", {
|
|
919
925
|
class: "config-card-details-label",
|
|
920
926
|
"data-testid": `${e.item.key}-label`
|
|
921
927
|
}, [
|
|
922
|
-
ee(
|
|
923
|
-
A(
|
|
928
|
+
ee(S.$slots, "label", { item: e.item }, () => [
|
|
929
|
+
A(I, { "tooltip-attributes": { maxWidth: "500px" } }, $e({
|
|
924
930
|
default: k(() => [
|
|
925
931
|
G(N(e.item.label) + " ", 1)
|
|
926
932
|
]),
|
|
927
933
|
_: 2
|
|
928
934
|
}, [
|
|
929
|
-
|
|
935
|
+
c.value ? {
|
|
930
936
|
name: "tooltip",
|
|
931
937
|
fn: k(() => [
|
|
932
938
|
L("div", {
|
|
933
939
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
934
940
|
}, [
|
|
935
|
-
ee(
|
|
941
|
+
ee(S.$slots, "label-tooltip", {}, () => [
|
|
936
942
|
G(N(e.item.tooltip), 1)
|
|
937
943
|
], !0)
|
|
938
944
|
], 8, Za)
|
|
@@ -946,17 +952,17 @@ const ie = {
|
|
|
946
952
|
class: "config-card-details-value",
|
|
947
953
|
"data-testid": `${e.item.key}-property-value`
|
|
948
954
|
}, [
|
|
949
|
-
ee(
|
|
955
|
+
ee(S.$slots, e.item.key, {
|
|
950
956
|
rowValue: e.item.value
|
|
951
957
|
}, () => [
|
|
952
|
-
l.value ? (
|
|
953
|
-
(
|
|
958
|
+
l.value ? (y(), O("div", Xa, [
|
|
959
|
+
(y(), V(Oe(u.value.tag), ea(ta(u.value.attrs)), {
|
|
954
960
|
default: k(() => [
|
|
955
|
-
|
|
961
|
+
u.value.additionalComponent === "KBadge" ? (y(), O("div", {
|
|
956
962
|
key: 0,
|
|
957
963
|
"data-testid": `${e.item.key}-badge-tags`
|
|
958
964
|
}, [
|
|
959
|
-
(
|
|
965
|
+
(y(!0), O(ye, null, pe(e.item.value, (v, p) => (y(), V(U, {
|
|
960
966
|
key: `${e.item.key}-badge-tag-${p}`,
|
|
961
967
|
class: "config-badge",
|
|
962
968
|
"data-testid": `${e.item.key}-badge-tag-${p}`,
|
|
@@ -969,24 +975,24 @@ const ie = {
|
|
|
969
975
|
_: 2
|
|
970
976
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
971
977
|
], 8, ei)) : J("", !0),
|
|
972
|
-
|
|
978
|
+
u.value.additionalComponent === "KCopy" ? (y(), O("div", {
|
|
973
979
|
key: 1,
|
|
974
980
|
class: "copy-uuid-array",
|
|
975
981
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
976
982
|
}, [
|
|
977
|
-
(
|
|
983
|
+
(y(!0), O(ye, null, pe(e.item.value, (v, p) => (y(), V(b, na(u.value.childAttrs, {
|
|
978
984
|
key: `${e.item.key}-copy-uuid-${p}`,
|
|
979
985
|
"data-testid": `${e.item.key}-copy-uuid-${p}`,
|
|
980
986
|
text: v
|
|
981
987
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
982
|
-
], 8, ti)) :
|
|
988
|
+
], 8, ti)) : u.value.additionalComponent === "KMethodBadge" ? (y(), O("div", {
|
|
983
989
|
key: 2,
|
|
984
990
|
class: "method-badge-array",
|
|
985
991
|
"data-testid": `${e.item.key}-badge-methods`
|
|
986
992
|
}, [
|
|
987
|
-
(
|
|
993
|
+
(y(!0), O(ye, null, pe(e.item.value, (v, p) => (y(), V(U, {
|
|
988
994
|
key: `${e.item.key}-badge-method-${p}`,
|
|
989
|
-
appearance: Object.values(
|
|
995
|
+
appearance: Object.values(m(la)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
990
996
|
class: "config-badge",
|
|
991
997
|
"data-testid": `${e.item.key}-badge-method-${p}`
|
|
992
998
|
}, {
|
|
@@ -996,33 +1002,33 @@ const ie = {
|
|
|
996
1002
|
_: 2
|
|
997
1003
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
998
1004
|
], 8, ni)) : J("", !0),
|
|
999
|
-
|
|
1005
|
+
u.value.additionalComponent === "JsonCardItem" ? (y(), O("div", {
|
|
1000
1006
|
key: 3,
|
|
1001
1007
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1002
1008
|
}, [
|
|
1003
|
-
(
|
|
1009
|
+
(y(!0), O(ye, null, pe(e.item.value, (v, p) => (y(), V(ln, {
|
|
1004
1010
|
key: `json-array-item-${p}`,
|
|
1005
1011
|
index: p,
|
|
1006
1012
|
"is-array-item": "",
|
|
1007
1013
|
item: v
|
|
1008
1014
|
}, null, 8, ["index", "item"]))), 128))
|
|
1009
|
-
], 8, ai)) : (
|
|
1015
|
+
], 8, ai)) : (y(), V(D, {
|
|
1010
1016
|
key: 4,
|
|
1011
|
-
text:
|
|
1017
|
+
text: m(f) ? e.item.value : ""
|
|
1012
1018
|
}, {
|
|
1013
1019
|
default: k(() => [
|
|
1014
1020
|
L("span", {
|
|
1015
1021
|
ref_key: "textContent",
|
|
1016
1022
|
ref: h,
|
|
1017
|
-
class:
|
|
1018
|
-
}, N(
|
|
1023
|
+
class: _e(["attrs-data-text", { truncated: e.truncated }])
|
|
1024
|
+
}, N(u.value.text), 3)
|
|
1019
1025
|
]),
|
|
1020
1026
|
_: 1
|
|
1021
1027
|
}, 8, ["text"]))
|
|
1022
1028
|
]),
|
|
1023
1029
|
_: 1
|
|
1024
1030
|
}, 16))
|
|
1025
|
-
])) : (
|
|
1031
|
+
])) : (y(), O("div", {
|
|
1026
1032
|
key: 0,
|
|
1027
1033
|
"data-testid": `${e.item.key}-no-value`
|
|
1028
1034
|
}, " – ", 8, Qa))
|
|
@@ -1074,8 +1080,8 @@ const ie = {
|
|
|
1074
1080
|
});
|
|
1075
1081
|
return (i, r) => {
|
|
1076
1082
|
const o = B("KBadge"), l = B("KCodeBlock");
|
|
1077
|
-
return
|
|
1078
|
-
t.fetcherUrl ? (
|
|
1083
|
+
return y(), O("div", oi, [
|
|
1084
|
+
t.fetcherUrl ? (y(), O("div", li, [
|
|
1079
1085
|
A(o, {
|
|
1080
1086
|
appearance: t.requestMethod
|
|
1081
1087
|
}, {
|
|
@@ -1092,10 +1098,10 @@ const ie = {
|
|
|
1092
1098
|
theme: "dark"
|
|
1093
1099
|
}, null, 8, ["code"])
|
|
1094
1100
|
])) : J("", !0),
|
|
1095
|
-
t.jsonRecord ? (
|
|
1101
|
+
t.jsonRecord ? (y(), V(l, {
|
|
1096
1102
|
key: 1,
|
|
1097
1103
|
id: "json-codeblock",
|
|
1098
|
-
class:
|
|
1104
|
+
class: _e({ "json-content": t.fetcherUrl }),
|
|
1099
1105
|
code: JSON.stringify(n.value, null, 2),
|
|
1100
1106
|
language: "json",
|
|
1101
1107
|
theme: "dark"
|
|
@@ -1171,26 +1177,26 @@ function ki(e, t) {
|
|
|
1171
1177
|
for (var n = /\r?\n|\r|\0/g, a = [0], i = [], r, o = -1; r = n.exec(e.buffer); )
|
|
1172
1178
|
i.push(r.index), a.push(r.index + r[0].length), e.position <= r.index && o < 0 && (o = a.length - 2);
|
|
1173
1179
|
o < 0 && (o = a.length - 1);
|
|
1174
|
-
var l = "",
|
|
1175
|
-
for (
|
|
1176
|
-
|
|
1180
|
+
var l = "", c, d, s = Math.min(e.line + t.linesAfter, i.length).toString().length, u = t.maxLength - (t.indent + s + 3);
|
|
1181
|
+
for (c = 1; c <= t.linesBefore && !(o - c < 0); c++)
|
|
1182
|
+
d = ot(
|
|
1177
1183
|
e.buffer,
|
|
1178
|
-
a[o -
|
|
1179
|
-
i[o -
|
|
1180
|
-
e.position - (a[o] - a[o -
|
|
1181
|
-
|
|
1182
|
-
), l = ae.repeat(" ", t.indent) + lt((e.line -
|
|
1184
|
+
a[o - c],
|
|
1185
|
+
i[o - c],
|
|
1186
|
+
e.position - (a[o] - a[o - c]),
|
|
1187
|
+
u
|
|
1188
|
+
), l = ae.repeat(" ", t.indent) + lt((e.line - c + 1).toString(), s) + " | " + d.str + `
|
|
1183
1189
|
` + l;
|
|
1184
|
-
for (
|
|
1185
|
-
`, l += ae.repeat("-", t.indent +
|
|
1186
|
-
`,
|
|
1187
|
-
|
|
1190
|
+
for (d = ot(e.buffer, a[o], i[o], e.position, u), l += ae.repeat(" ", t.indent) + lt((e.line + 1).toString(), s) + " | " + d.str + `
|
|
1191
|
+
`, l += ae.repeat("-", t.indent + s + 3 + d.pos) + `^
|
|
1192
|
+
`, c = 1; c <= t.linesAfter && !(o + c >= i.length); c++)
|
|
1193
|
+
d = ot(
|
|
1188
1194
|
e.buffer,
|
|
1189
|
-
a[o +
|
|
1190
|
-
i[o +
|
|
1191
|
-
e.position - (a[o] - a[o +
|
|
1192
|
-
|
|
1193
|
-
), l += ae.repeat(" ", t.indent) + lt((e.line +
|
|
1195
|
+
a[o + c],
|
|
1196
|
+
i[o + c],
|
|
1197
|
+
e.position - (a[o] - a[o + c]),
|
|
1198
|
+
u
|
|
1199
|
+
), l += ae.repeat(" ", t.indent) + lt((e.line + c + 1).toString(), s) + " | " + d.str + `
|
|
1194
1200
|
`;
|
|
1195
1201
|
return l.replace(/\n$/, "");
|
|
1196
1202
|
}
|
|
@@ -1218,7 +1224,7 @@ function Si(e) {
|
|
|
1218
1224
|
});
|
|
1219
1225
|
}), t;
|
|
1220
1226
|
}
|
|
1221
|
-
function
|
|
1227
|
+
function _i(e, t) {
|
|
1222
1228
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1223
1229
|
if (wi.indexOf(n) === -1)
|
|
1224
1230
|
throw new se('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
@@ -1229,7 +1235,7 @@ function Ii(e, t) {
|
|
|
1229
1235
|
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = Si(t.styleAliases || null), Ci.indexOf(this.kind) === -1)
|
|
1230
1236
|
throw new se('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1231
1237
|
}
|
|
1232
|
-
var re =
|
|
1238
|
+
var re = _i;
|
|
1233
1239
|
function Nt(e, t) {
|
|
1234
1240
|
var n = [];
|
|
1235
1241
|
return e[t].forEach(function(a) {
|
|
@@ -1239,7 +1245,7 @@ function Nt(e, t) {
|
|
|
1239
1245
|
}), n[i] = a;
|
|
1240
1246
|
}), n;
|
|
1241
1247
|
}
|
|
1242
|
-
function
|
|
1248
|
+
function Ii() {
|
|
1243
1249
|
var e = {
|
|
1244
1250
|
scalar: {},
|
|
1245
1251
|
sequence: {},
|
|
@@ -1284,7 +1290,7 @@ ut.prototype.extend = function(e) {
|
|
|
1284
1290
|
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1285
1291
|
});
|
|
1286
1292
|
var a = Object.create(ut.prototype);
|
|
1287
|
-
return a.implicit = (this.implicit || []).concat(t), a.explicit = (this.explicit || []).concat(n), a.compiledImplicit = Nt(a, "implicit"), a.compiledExplicit = Nt(a, "explicit"), a.compiledTypeMap =
|
|
1293
|
+
return a.implicit = (this.implicit || []).concat(t), a.explicit = (this.explicit || []).concat(n), a.compiledImplicit = Nt(a, "implicit"), a.compiledExplicit = Nt(a, "explicit"), a.compiledTypeMap = Ii(a.compiledImplicit, a.compiledExplicit), a;
|
|
1288
1294
|
};
|
|
1289
1295
|
var pn = ut, fn = new re("tag:yaml.org,2002:str", {
|
|
1290
1296
|
kind: "scalar",
|
|
@@ -1540,29 +1546,29 @@ var bn = new re("tag:yaml.org,2002:float", {
|
|
|
1540
1546
|
]
|
|
1541
1547
|
}), Cn = wn, Sn = new RegExp(
|
|
1542
1548
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1543
|
-
),
|
|
1549
|
+
), _n = new RegExp(
|
|
1544
1550
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1545
1551
|
);
|
|
1546
1552
|
function Di(e) {
|
|
1547
|
-
return e === null ? !1 : Sn.exec(e) !== null ||
|
|
1553
|
+
return e === null ? !1 : Sn.exec(e) !== null || _n.exec(e) !== null;
|
|
1548
1554
|
}
|
|
1549
1555
|
function zi(e) {
|
|
1550
|
-
var t, n, a, i, r, o, l,
|
|
1551
|
-
if (t = Sn.exec(e), t === null && (t =
|
|
1556
|
+
var t, n, a, i, r, o, l, c = 0, d = null, s, u, h;
|
|
1557
|
+
if (t = Sn.exec(e), t === null && (t = _n.exec(e)), t === null)
|
|
1552
1558
|
throw new Error("Date resolve error");
|
|
1553
1559
|
if (n = +t[1], a = +t[2] - 1, i = +t[3], !t[4])
|
|
1554
1560
|
return new Date(Date.UTC(n, a, i));
|
|
1555
1561
|
if (r = +t[4], o = +t[5], l = +t[6], t[7]) {
|
|
1556
|
-
for (
|
|
1557
|
-
|
|
1558
|
-
|
|
1562
|
+
for (c = t[7].slice(0, 3); c.length < 3; )
|
|
1563
|
+
c += "0";
|
|
1564
|
+
c = +c;
|
|
1559
1565
|
}
|
|
1560
|
-
return t[9] && (
|
|
1566
|
+
return t[9] && (s = +t[10], u = +(t[11] || 0), d = (s * 60 + u) * 6e4, t[9] === "-" && (d = -d)), h = new Date(Date.UTC(n, a, i, r, o, l, c)), d && h.setTime(h.getTime() - d), h;
|
|
1561
1567
|
}
|
|
1562
1568
|
function Ji(e) {
|
|
1563
1569
|
return e.toISOString();
|
|
1564
1570
|
}
|
|
1565
|
-
var
|
|
1571
|
+
var In = new re("tag:yaml.org,2002:timestamp", {
|
|
1566
1572
|
kind: "scalar",
|
|
1567
1573
|
resolve: Di,
|
|
1568
1574
|
construct: zi,
|
|
@@ -1683,7 +1689,7 @@ var $n = new re("tag:yaml.org,2002:set", {
|
|
|
1683
1689
|
construct: lr
|
|
1684
1690
|
}), wt = Cn.extend({
|
|
1685
1691
|
implicit: [
|
|
1686
|
-
|
|
1692
|
+
In,
|
|
1687
1693
|
xn
|
|
1688
1694
|
],
|
|
1689
1695
|
explicit: [
|
|
@@ -1692,7 +1698,7 @@ var $n = new re("tag:yaml.org,2002:set", {
|
|
|
1692
1698
|
Tn,
|
|
1693
1699
|
$n
|
|
1694
1700
|
]
|
|
1695
|
-
}),
|
|
1701
|
+
}), Ie = Object.prototype.hasOwnProperty, We = 1, On = 2, Kn = 3, Ye = 4, st = 1, sr = 2, Ft = 3, cr = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ur = /[\x85\u2028\u2029]/, dr = /[,\[\]\{\}]/, Mn = /^(?:!|!!|![a-z\-]+!)$/i, En = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1696
1702
|
function qt(e) {
|
|
1697
1703
|
return Object.prototype.toString.call(e);
|
|
1698
1704
|
}
|
|
@@ -1758,7 +1764,7 @@ var Bt = {
|
|
|
1758
1764
|
},
|
|
1759
1765
|
TAG: function(e, t, n) {
|
|
1760
1766
|
var a, i;
|
|
1761
|
-
n.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), a = n[0], i = n[1], Mn.test(a) || $(e, "ill-formed tag handle (first argument) of the TAG directive"),
|
|
1767
|
+
n.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), a = n[0], i = n[1], Mn.test(a) || $(e, "ill-formed tag handle (first argument) of the TAG directive"), Ie.call(e.tagMap, a) && $(e, 'there is a previously declared suffix for "' + a + '" tag handle'), En.test(i) || $(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1762
1768
|
try {
|
|
1763
1769
|
i = decodeURIComponent(i);
|
|
1764
1770
|
} catch {
|
|
@@ -1781,21 +1787,21 @@ function Se(e, t, n, a) {
|
|
|
1781
1787
|
function Ut(e, t, n, a) {
|
|
1782
1788
|
var i, r, o, l;
|
|
1783
1789
|
for (ae.isObject(n) || $(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, l = i.length; o < l; o += 1)
|
|
1784
|
-
r = i[o],
|
|
1790
|
+
r = i[o], Ie.call(t, r) || (t[r] = n[r], a[r] = !0);
|
|
1785
1791
|
}
|
|
1786
|
-
function qe(e, t, n, a, i, r, o, l,
|
|
1787
|
-
var
|
|
1792
|
+
function qe(e, t, n, a, i, r, o, l, c) {
|
|
1793
|
+
var d, s;
|
|
1788
1794
|
if (Array.isArray(i))
|
|
1789
|
-
for (i = Array.prototype.slice.call(i),
|
|
1790
|
-
Array.isArray(i[
|
|
1795
|
+
for (i = Array.prototype.slice.call(i), d = 0, s = i.length; d < s; d += 1)
|
|
1796
|
+
Array.isArray(i[d]) && $(e, "nested arrays are not supported inside keys"), typeof i == "object" && qt(i[d]) === "[object Object]" && (i[d] = "[object Object]");
|
|
1791
1797
|
if (typeof i == "object" && qt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), a === "tag:yaml.org,2002:merge")
|
|
1792
1798
|
if (Array.isArray(r))
|
|
1793
|
-
for (
|
|
1794
|
-
Ut(e, t, r[
|
|
1799
|
+
for (d = 0, s = r.length; d < s; d += 1)
|
|
1800
|
+
Ut(e, t, r[d], n);
|
|
1795
1801
|
else
|
|
1796
1802
|
Ut(e, t, r, n);
|
|
1797
1803
|
else
|
|
1798
|
-
!e.json && !
|
|
1804
|
+
!e.json && !Ie.call(n, i) && Ie.call(t, i) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = c || e.position, $(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1799
1805
|
configurable: !0,
|
|
1800
1806
|
enumerable: !0,
|
|
1801
1807
|
writable: !0,
|
|
@@ -1832,31 +1838,31 @@ function St(e, t) {
|
|
|
1832
1838
|
`, t - 1));
|
|
1833
1839
|
}
|
|
1834
1840
|
function hr(e, t, n) {
|
|
1835
|
-
var a, i, r, o, l,
|
|
1836
|
-
if (
|
|
1841
|
+
var a, i, r, o, l, c, d, s, u = e.kind, h = e.result, f;
|
|
1842
|
+
if (f = e.input.charCodeAt(e.position), de(f) || Fe(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), de(i) || n && Fe(i)))
|
|
1837
1843
|
return !1;
|
|
1838
|
-
for (e.kind = "scalar", e.result = "", r = o = e.position, l = !1;
|
|
1839
|
-
if (
|
|
1844
|
+
for (e.kind = "scalar", e.result = "", r = o = e.position, l = !1; f !== 0; ) {
|
|
1845
|
+
if (f === 58) {
|
|
1840
1846
|
if (i = e.input.charCodeAt(e.position + 1), de(i) || n && Fe(i))
|
|
1841
1847
|
break;
|
|
1842
|
-
} else if (
|
|
1848
|
+
} else if (f === 35) {
|
|
1843
1849
|
if (a = e.input.charCodeAt(e.position - 1), de(a))
|
|
1844
1850
|
break;
|
|
1845
1851
|
} else {
|
|
1846
|
-
if (e.position === e.lineStart && at(e) || n && Fe(
|
|
1852
|
+
if (e.position === e.lineStart && at(e) || n && Fe(f))
|
|
1847
1853
|
break;
|
|
1848
|
-
if (ve(
|
|
1849
|
-
if (
|
|
1850
|
-
l = !0,
|
|
1854
|
+
if (ve(f))
|
|
1855
|
+
if (c = e.line, d = e.lineStart, s = e.lineIndent, ne(e, !1, -1), e.lineIndent >= t) {
|
|
1856
|
+
l = !0, f = e.input.charCodeAt(e.position);
|
|
1851
1857
|
continue;
|
|
1852
1858
|
} else {
|
|
1853
|
-
e.position = o, e.line =
|
|
1859
|
+
e.position = o, e.line = c, e.lineStart = d, e.lineIndent = s;
|
|
1854
1860
|
break;
|
|
1855
1861
|
}
|
|
1856
1862
|
}
|
|
1857
|
-
l && (Se(e, r, o, !1), St(e, e.line -
|
|
1863
|
+
l && (Se(e, r, o, !1), St(e, e.line - c), r = o = e.position, l = !1), Te(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1858
1864
|
}
|
|
1859
|
-
return Se(e, r, o, !1), e.result ? !0 : (e.kind =
|
|
1865
|
+
return Se(e, r, o, !1), e.result ? !0 : (e.kind = u, e.result = h, !1);
|
|
1860
1866
|
}
|
|
1861
1867
|
function vr(e, t) {
|
|
1862
1868
|
var n, a, i;
|
|
@@ -1897,77 +1903,77 @@ function kr(e, t) {
|
|
|
1897
1903
|
$(e, "unexpected end of the stream within a double quoted scalar");
|
|
1898
1904
|
}
|
|
1899
1905
|
function br(e, t) {
|
|
1900
|
-
var n = !0, a, i, r, o = e.tag, l,
|
|
1906
|
+
var n = !0, a, i, r, o = e.tag, l, c = e.anchor, d, s, u, h, f, S = /* @__PURE__ */ Object.create(null), C, I, U, b;
|
|
1901
1907
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1902
|
-
|
|
1908
|
+
s = 93, f = !1, l = [];
|
|
1903
1909
|
else if (b === 123)
|
|
1904
|
-
|
|
1910
|
+
s = 125, f = !0, l = {};
|
|
1905
1911
|
else
|
|
1906
1912
|
return !1;
|
|
1907
1913
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1908
|
-
if (ne(e, !0, t), b = e.input.charCodeAt(e.position), b ===
|
|
1909
|
-
return e.position++, e.tag = o, e.anchor =
|
|
1910
|
-
n ? b === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"),
|
|
1914
|
+
if (ne(e, !0, t), b = e.input.charCodeAt(e.position), b === s)
|
|
1915
|
+
return e.position++, e.tag = o, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1916
|
+
n ? b === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), I = C = U = null, u = h = !1, b === 63 && (d = e.input.charCodeAt(e.position + 1), de(d) && (u = h = !0, e.position++, ne(e, !0, t))), a = e.line, i = e.lineStart, r = e.position, Le(e, t, We, !1, !0), I = e.tag, C = e.result, ne(e, !0, t), b = e.input.charCodeAt(e.position), (h || e.line === a) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), ne(e, !0, t), Le(e, t, We, !1, !0), U = e.result), f ? qe(e, l, S, I, C, U, a, i, r) : u ? l.push(qe(e, null, S, I, C, U, a, i, r)) : l.push(C), ne(e, !0, t), b = e.input.charCodeAt(e.position), b === 44 ? (n = !0, b = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1911
1917
|
}
|
|
1912
1918
|
$(e, "unexpected end of the stream within a flow collection");
|
|
1913
1919
|
}
|
|
1914
1920
|
function wr(e, t) {
|
|
1915
|
-
var n, a, i = st, r = !1, o = !1, l = t,
|
|
1916
|
-
if (
|
|
1921
|
+
var n, a, i = st, r = !1, o = !1, l = t, c = 0, d = !1, s, u;
|
|
1922
|
+
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1917
1923
|
a = !1;
|
|
1918
|
-
else if (
|
|
1924
|
+
else if (u === 62)
|
|
1919
1925
|
a = !0;
|
|
1920
1926
|
else
|
|
1921
1927
|
return !1;
|
|
1922
|
-
for (e.kind = "scalar", e.result = "";
|
|
1923
|
-
if (
|
|
1924
|
-
st === i ? i =
|
|
1925
|
-
else if ((
|
|
1926
|
-
|
|
1928
|
+
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1929
|
+
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1930
|
+
st === i ? i = u === 43 ? Ft : sr : $(e, "repeat of a chomping mode identifier");
|
|
1931
|
+
else if ((s = yr(u)) >= 0)
|
|
1932
|
+
s === 0 ? $(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? $(e, "repeat of an indentation width identifier") : (l = t + s - 1, o = !0);
|
|
1927
1933
|
else
|
|
1928
1934
|
break;
|
|
1929
|
-
if (Te(
|
|
1935
|
+
if (Te(u)) {
|
|
1930
1936
|
do
|
|
1931
|
-
|
|
1932
|
-
while (Te(
|
|
1933
|
-
if (
|
|
1937
|
+
u = e.input.charCodeAt(++e.position);
|
|
1938
|
+
while (Te(u));
|
|
1939
|
+
if (u === 35)
|
|
1934
1940
|
do
|
|
1935
|
-
|
|
1936
|
-
while (!ve(
|
|
1941
|
+
u = e.input.charCodeAt(++e.position);
|
|
1942
|
+
while (!ve(u) && u !== 0);
|
|
1937
1943
|
}
|
|
1938
|
-
for (;
|
|
1939
|
-
for (Ct(e), e.lineIndent = 0,
|
|
1940
|
-
e.lineIndent++,
|
|
1941
|
-
if (!o && e.lineIndent > l && (l = e.lineIndent), ve(
|
|
1942
|
-
|
|
1944
|
+
for (; u !== 0; ) {
|
|
1945
|
+
for (Ct(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && u === 32; )
|
|
1946
|
+
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
1947
|
+
if (!o && e.lineIndent > l && (l = e.lineIndent), ve(u)) {
|
|
1948
|
+
c++;
|
|
1943
1949
|
continue;
|
|
1944
1950
|
}
|
|
1945
1951
|
if (e.lineIndent < l) {
|
|
1946
1952
|
i === Ft ? e.result += ae.repeat(`
|
|
1947
|
-
`, r ? 1 +
|
|
1953
|
+
`, r ? 1 + c : c) : i === st && r && (e.result += `
|
|
1948
1954
|
`);
|
|
1949
1955
|
break;
|
|
1950
1956
|
}
|
|
1951
|
-
for (a ? Te(
|
|
1952
|
-
`, r ? 1 +
|
|
1953
|
-
`,
|
|
1954
|
-
`,
|
|
1955
|
-
`, r ? 1 +
|
|
1956
|
-
|
|
1957
|
+
for (a ? Te(u) ? (d = !0, e.result += ae.repeat(`
|
|
1958
|
+
`, r ? 1 + c : c)) : d ? (d = !1, e.result += ae.repeat(`
|
|
1959
|
+
`, c + 1)) : c === 0 ? r && (e.result += " ") : e.result += ae.repeat(`
|
|
1960
|
+
`, c) : e.result += ae.repeat(`
|
|
1961
|
+
`, r ? 1 + c : c), r = !0, o = !0, c = 0, n = e.position; !ve(u) && u !== 0; )
|
|
1962
|
+
u = e.input.charCodeAt(++e.position);
|
|
1957
1963
|
Se(e, n, e.position, !1);
|
|
1958
1964
|
}
|
|
1959
1965
|
return !0;
|
|
1960
1966
|
}
|
|
1961
1967
|
function Rt(e, t) {
|
|
1962
|
-
var n, a = e.tag, i = e.anchor, r = [], o, l = !1,
|
|
1968
|
+
var n, a = e.tag, i = e.anchor, r = [], o, l = !1, c;
|
|
1963
1969
|
if (e.firstTabInLine !== -1)
|
|
1964
1970
|
return !1;
|
|
1965
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = r),
|
|
1971
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = r), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !de(o)))); ) {
|
|
1966
1972
|
if (l = !0, e.position++, ne(e, !0, -1) && e.lineIndent <= t) {
|
|
1967
|
-
r.push(null),
|
|
1973
|
+
r.push(null), c = e.input.charCodeAt(e.position);
|
|
1968
1974
|
continue;
|
|
1969
1975
|
}
|
|
1970
|
-
if (n = e.line, Le(e, t, Kn, !1, !0), r.push(e.result), ne(e, !0, -1),
|
|
1976
|
+
if (n = e.line, Le(e, t, Kn, !1, !0), r.push(e.result), ne(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0)
|
|
1971
1977
|
$(e, "bad indentation of a sequence entry");
|
|
1972
1978
|
else if (e.lineIndent < t)
|
|
1973
1979
|
break;
|
|
@@ -1975,35 +1981,35 @@ function Rt(e, t) {
|
|
|
1975
1981
|
return l ? (e.tag = a, e.anchor = i, e.kind = "sequence", e.result = r, !0) : !1;
|
|
1976
1982
|
}
|
|
1977
1983
|
function Cr(e, t, n) {
|
|
1978
|
-
var a, i, r, o, l,
|
|
1984
|
+
var a, i, r, o, l, c, d = e.tag, s = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null), f = null, S = null, C = null, I = !1, U = !1, b;
|
|
1979
1985
|
if (e.firstTabInLine !== -1)
|
|
1980
1986
|
return !1;
|
|
1981
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1982
|
-
if (!
|
|
1983
|
-
b === 63 ? (
|
|
1987
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1988
|
+
if (!I && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), r = e.line, (b === 63 || b === 58) && de(a))
|
|
1989
|
+
b === 63 ? (I && (qe(e, u, h, f, S, null, o, l, c), f = S = C = null), U = !0, I = !0, i = !0) : I ? (I = !1, i = !0) : $(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = a;
|
|
1984
1990
|
else {
|
|
1985
|
-
if (o = e.line, l = e.lineStart,
|
|
1991
|
+
if (o = e.line, l = e.lineStart, c = e.position, !Le(e, n, On, !1, !0))
|
|
1986
1992
|
break;
|
|
1987
1993
|
if (e.line === r) {
|
|
1988
1994
|
for (b = e.input.charCodeAt(e.position); Te(b); )
|
|
1989
1995
|
b = e.input.charCodeAt(++e.position);
|
|
1990
1996
|
if (b === 58)
|
|
1991
|
-
b = e.input.charCodeAt(++e.position), de(b) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"),
|
|
1997
|
+
b = e.input.charCodeAt(++e.position), de(b) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), I && (qe(e, u, h, f, S, null, o, l, c), f = S = C = null), U = !0, I = !1, i = !1, f = e.tag, S = e.result;
|
|
1992
1998
|
else if (U)
|
|
1993
1999
|
$(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1994
2000
|
else
|
|
1995
|
-
return e.tag =
|
|
2001
|
+
return e.tag = d, e.anchor = s, !0;
|
|
1996
2002
|
} else if (U)
|
|
1997
2003
|
$(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1998
2004
|
else
|
|
1999
|
-
return e.tag =
|
|
2005
|
+
return e.tag = d, e.anchor = s, !0;
|
|
2000
2006
|
}
|
|
2001
|
-
if ((e.line === r || e.lineIndent > t) && (
|
|
2007
|
+
if ((e.line === r || e.lineIndent > t) && (I && (o = e.line, l = e.lineStart, c = e.position), Le(e, t, Ye, !0, i) && (I ? S = e.result : C = e.result), I || (qe(e, u, h, f, S, C, o, l, c), f = S = C = null), ne(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === r || e.lineIndent > t) && b !== 0)
|
|
2002
2008
|
$(e, "bad indentation of a mapping entry");
|
|
2003
2009
|
else if (e.lineIndent < t)
|
|
2004
2010
|
break;
|
|
2005
2011
|
}
|
|
2006
|
-
return
|
|
2012
|
+
return I && qe(e, u, h, f, S, null, o, l, c), U && (e.tag = d, e.anchor = s, e.kind = "mapping", e.result = u), U;
|
|
2007
2013
|
}
|
|
2008
2014
|
function Sr(e) {
|
|
2009
2015
|
var t, n = !1, a = !1, i, r, o;
|
|
@@ -2025,9 +2031,9 @@ function Sr(e) {
|
|
|
2025
2031
|
} catch {
|
|
2026
2032
|
$(e, "tag name is malformed: " + r);
|
|
2027
2033
|
}
|
|
2028
|
-
return n ? e.tag = r :
|
|
2034
|
+
return n ? e.tag = r : Ie.call(e.tagMap, i) ? e.tag = e.tagMap[i] + r : i === "!" ? e.tag = "!" + r : i === "!!" ? e.tag = "tag:yaml.org,2002:" + r : $(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
2029
2035
|
}
|
|
2030
|
-
function
|
|
2036
|
+
function _r(e) {
|
|
2031
2037
|
var t, n;
|
|
2032
2038
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
2033
2039
|
return !1;
|
|
@@ -2035,39 +2041,39 @@ function Ir(e) {
|
|
|
2035
2041
|
n = e.input.charCodeAt(++e.position);
|
|
2036
2042
|
return e.position === t && $(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2037
2043
|
}
|
|
2038
|
-
function
|
|
2044
|
+
function Ir(e) {
|
|
2039
2045
|
var t, n, a;
|
|
2040
2046
|
if (a = e.input.charCodeAt(e.position), a !== 42)
|
|
2041
2047
|
return !1;
|
|
2042
2048
|
for (a = e.input.charCodeAt(++e.position), t = e.position; a !== 0 && !de(a) && !Fe(a); )
|
|
2043
2049
|
a = e.input.charCodeAt(++e.position);
|
|
2044
|
-
return e.position === t && $(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position),
|
|
2050
|
+
return e.position === t && $(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), Ie.call(e.anchorMap, n) || $(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], ne(e, !0, -1), !0;
|
|
2045
2051
|
}
|
|
2046
2052
|
function Le(e, t, n, a, i) {
|
|
2047
|
-
var r, o, l,
|
|
2048
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = o = l = Ye === n || Kn === n, a && ne(e, !0, -1) && (
|
|
2049
|
-
for (; Sr(e) ||
|
|
2050
|
-
ne(e, !0, -1) ? (
|
|
2051
|
-
if (l && (l =
|
|
2053
|
+
var r, o, l, c = 1, d = !1, s = !1, u, h, f, S, C, I;
|
|
2054
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = o = l = Ye === n || Kn === n, a && ne(e, !0, -1) && (d = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
|
|
2055
|
+
for (; Sr(e) || _r(e); )
|
|
2056
|
+
ne(e, !0, -1) ? (d = !0, l = r, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : l = !1;
|
|
2057
|
+
if (l && (l = d || i), (c === 1 || Ye === n) && (We === n || On === n ? C = t : C = t + 1, I = e.position - e.lineStart, c === 1 ? l && (Rt(e, I) || Cr(e, I, C)) || br(e, C) ? s = !0 : (o && wr(e, C) || vr(e, C) || kr(e, C) ? s = !0 : Ir(e) ? (s = !0, (e.tag !== null || e.anchor !== null) && $(e, "alias node should not have any properties")) : hr(e, C, We === n) && (s = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (s = l && Rt(e, I))), e.tag === null)
|
|
2052
2058
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2053
2059
|
else if (e.tag === "?") {
|
|
2054
|
-
for (e.result !== null && e.kind !== "scalar" && $(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'),
|
|
2055
|
-
if (
|
|
2056
|
-
e.result =
|
|
2060
|
+
for (e.result !== null && e.kind !== "scalar" && $(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, h = e.implicitTypes.length; u < h; u += 1)
|
|
2061
|
+
if (S = e.implicitTypes[u], S.resolve(e.result)) {
|
|
2062
|
+
e.result = S.construct(e.result), e.tag = S.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2057
2063
|
break;
|
|
2058
2064
|
}
|
|
2059
2065
|
} else if (e.tag !== "!") {
|
|
2060
|
-
if (
|
|
2061
|
-
|
|
2066
|
+
if (Ie.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2067
|
+
S = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2062
2068
|
else
|
|
2063
|
-
for (
|
|
2064
|
-
if (e.tag.slice(0,
|
|
2065
|
-
|
|
2069
|
+
for (S = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, h = f.length; u < h; u += 1)
|
|
2070
|
+
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
2071
|
+
S = f[u];
|
|
2066
2072
|
break;
|
|
2067
2073
|
}
|
|
2068
|
-
|
|
2074
|
+
S || $(e, "unknown tag !<" + e.tag + ">"), e.result !== null && S.kind !== e.kind && $(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + S.kind + '", not "' + e.kind + '"'), S.resolve(e.result, e.tag) ? (e.result = S.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : $(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2069
2075
|
}
|
|
2070
|
-
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null ||
|
|
2076
|
+
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || s;
|
|
2071
2077
|
}
|
|
2072
2078
|
function xr(e) {
|
|
2073
2079
|
var t = e.position, n, a, i, r = !1, o;
|
|
@@ -2089,7 +2095,7 @@ function xr(e) {
|
|
|
2089
2095
|
o = e.input.charCodeAt(++e.position);
|
|
2090
2096
|
i.push(e.input.slice(n, e.position));
|
|
2091
2097
|
}
|
|
2092
|
-
o !== 0 && Ct(e),
|
|
2098
|
+
o !== 0 && Ct(e), Ie.call(Bt, a) ? Bt[a](e, a, i) : Ze(e, 'unknown document directive "' + a + '"');
|
|
2093
2099
|
}
|
|
2094
2100
|
if (ne(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, ne(e, !0, -1)) : r && $(e, "directives end mark is expected"), Le(e, e.lineIndent - 1, Ye, !1, !0), ne(e, !0, -1), e.checkLineBreaks && ur.test(e.input.slice(t, e.position)) && Ze(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && at(e)) {
|
|
2095
2101
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ne(e, !0, -1));
|
|
@@ -2129,7 +2135,7 @@ function jr(e, t) {
|
|
|
2129
2135
|
var Tr = Ar, $r = jr, Bn = {
|
|
2130
2136
|
loadAll: Tr,
|
|
2131
2137
|
load: $r
|
|
2132
|
-
}, Un = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty,
|
|
2138
|
+
}, Un = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, _t = 65279, Or = 9, Ve = 10, Kr = 13, Mr = 32, Er = 33, Nr = 34, dt = 35, Fr = 37, qr = 38, Lr = 39, Br = 42, Vn = 44, Ur = 45, Ge = 58, Rr = 61, Vr = 62, Pr = 63, Dr = 64, Pn = 91, Dn = 93, zr = 96, zn = 123, Jr = 124, Jn = 125, oe = {};
|
|
2133
2139
|
oe[0] = "\\0";
|
|
2134
2140
|
oe[7] = "\\a";
|
|
2135
2141
|
oe[8] = "\\b";
|
|
@@ -2164,11 +2170,11 @@ var Hr = [
|
|
|
2164
2170
|
"OFF"
|
|
2165
2171
|
], Wr = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2166
2172
|
function Yr(e, t) {
|
|
2167
|
-
var n, a, i, r, o, l,
|
|
2173
|
+
var n, a, i, r, o, l, c;
|
|
2168
2174
|
if (t === null)
|
|
2169
2175
|
return {};
|
|
2170
2176
|
for (n = {}, a = Object.keys(t), i = 0, r = a.length; i < r; i += 1)
|
|
2171
|
-
o = a[i], l = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)),
|
|
2177
|
+
o = a[i], l = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && Rn.call(c.styleAliases, l) && (l = c.styleAliases[l]), n[o] = l;
|
|
2172
2178
|
return n;
|
|
2173
2179
|
}
|
|
2174
2180
|
function Zr(e) {
|
|
@@ -2209,10 +2215,10 @@ function Qe(e) {
|
|
|
2209
2215
|
return e === Mr || e === Or;
|
|
2210
2216
|
}
|
|
2211
2217
|
function De(e) {
|
|
2212
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2218
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== _t || 65536 <= e && e <= 1114111;
|
|
2213
2219
|
}
|
|
2214
2220
|
function Pt(e) {
|
|
2215
|
-
return De(e) && e !==
|
|
2221
|
+
return De(e) && e !== _t && e !== Kr && e !== Ve;
|
|
2216
2222
|
}
|
|
2217
2223
|
function Dt(e, t, n) {
|
|
2218
2224
|
var a = Pt(e), i = a && !Qe(e);
|
|
@@ -2225,7 +2231,7 @@ function Dt(e, t, n) {
|
|
|
2225
2231
|
);
|
|
2226
2232
|
}
|
|
2227
2233
|
function eo(e) {
|
|
2228
|
-
return De(e) && e !==
|
|
2234
|
+
return De(e) && e !== _t && !Qe(e) && e !== Ur && e !== Pr && e !== Ge && e !== Vn && e !== Pn && e !== Dn && e !== zn && e !== Jn && e !== dt && e !== qr && e !== Br && e !== Er && e !== Jr && e !== Rr && e !== Vr && e !== Lr && e !== Nr && e !== Fr && e !== Dr && e !== zr;
|
|
2229
2235
|
}
|
|
2230
2236
|
function to(e) {
|
|
2231
2237
|
return !Qe(e) && e !== Ge;
|
|
@@ -2240,25 +2246,25 @@ function Hn(e) {
|
|
|
2240
2246
|
}
|
|
2241
2247
|
var Wn = 1, ft = 2, Yn = 3, Zn = 4, Ne = 5;
|
|
2242
2248
|
function no(e, t, n, a, i, r, o, l) {
|
|
2243
|
-
var
|
|
2249
|
+
var c, d = 0, s = null, u = !1, h = !1, f = a !== -1, S = -1, C = eo(Ue(e, 0)) && to(Ue(e, e.length - 1));
|
|
2244
2250
|
if (t || o)
|
|
2245
|
-
for (
|
|
2246
|
-
if (
|
|
2251
|
+
for (c = 0; c < e.length; d >= 65536 ? c += 2 : c++) {
|
|
2252
|
+
if (d = Ue(e, c), !De(d))
|
|
2247
2253
|
return Ne;
|
|
2248
|
-
C = C && Dt(
|
|
2254
|
+
C = C && Dt(d, s, l), s = d;
|
|
2249
2255
|
}
|
|
2250
2256
|
else {
|
|
2251
|
-
for (
|
|
2252
|
-
if (
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
else if (!De(
|
|
2257
|
+
for (c = 0; c < e.length; d >= 65536 ? c += 2 : c++) {
|
|
2258
|
+
if (d = Ue(e, c), d === Ve)
|
|
2259
|
+
u = !0, f && (h = h || // Foldable line = too long, and not more-indented.
|
|
2260
|
+
c - S - 1 > a && e[S + 1] !== " ", S = c);
|
|
2261
|
+
else if (!De(d))
|
|
2256
2262
|
return Ne;
|
|
2257
|
-
C = C && Dt(
|
|
2263
|
+
C = C && Dt(d, s, l), s = d;
|
|
2258
2264
|
}
|
|
2259
|
-
h = h ||
|
|
2265
|
+
h = h || f && c - S - 1 > a && e[S + 1] !== " ";
|
|
2260
2266
|
}
|
|
2261
|
-
return !
|
|
2267
|
+
return !u && !h ? C && !o && !i(e) ? Wn : r === Pe ? Ne : ft : n > 9 && Hn(e) ? Ne : o ? r === Pe ? Ne : ft : h ? Zn : Yn;
|
|
2262
2268
|
}
|
|
2263
2269
|
function ao(e, t, n, a, i) {
|
|
2264
2270
|
e.dump = function() {
|
|
@@ -2267,15 +2273,15 @@ function ao(e, t, n, a, i) {
|
|
|
2267
2273
|
if (!e.noCompatMode && (Hr.indexOf(t) !== -1 || Wr.test(t)))
|
|
2268
2274
|
return e.quotingType === Pe ? '"' + t + '"' : "'" + t + "'";
|
|
2269
2275
|
var r = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - r), l = a || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2270
|
-
function
|
|
2271
|
-
return Xr(e,
|
|
2276
|
+
function c(d) {
|
|
2277
|
+
return Xr(e, d);
|
|
2272
2278
|
}
|
|
2273
2279
|
switch (no(
|
|
2274
2280
|
t,
|
|
2275
2281
|
l,
|
|
2276
2282
|
e.indent,
|
|
2277
2283
|
o,
|
|
2278
|
-
|
|
2284
|
+
c,
|
|
2279
2285
|
e.quotingType,
|
|
2280
2286
|
e.forceQuotes && !a,
|
|
2281
2287
|
i
|
|
@@ -2309,26 +2315,26 @@ function Jt(e) {
|
|
|
2309
2315
|
}
|
|
2310
2316
|
function io(e, t) {
|
|
2311
2317
|
for (var n = /(\n+)([^\n]*)/g, a = function() {
|
|
2312
|
-
var
|
|
2318
|
+
var d = e.indexOf(`
|
|
2313
2319
|
`);
|
|
2314
|
-
return
|
|
2320
|
+
return d = d !== -1 ? d : e.length, n.lastIndex = d, Ht(e.slice(0, d), t);
|
|
2315
2321
|
}(), i = e[0] === `
|
|
2316
2322
|
` || e[0] === " ", r, o; o = n.exec(e); ) {
|
|
2317
|
-
var l = o[1],
|
|
2318
|
-
r =
|
|
2319
|
-
` : "") + Ht(
|
|
2323
|
+
var l = o[1], c = o[2];
|
|
2324
|
+
r = c[0] === " ", a += l + (!i && !r && c !== "" ? `
|
|
2325
|
+
` : "") + Ht(c, t), i = r;
|
|
2320
2326
|
}
|
|
2321
2327
|
return a;
|
|
2322
2328
|
}
|
|
2323
2329
|
function Ht(e, t) {
|
|
2324
2330
|
if (e === "" || e[0] === " ")
|
|
2325
2331
|
return e;
|
|
2326
|
-
for (var n = / [^ ]/g, a, i = 0, r, o = 0, l = 0,
|
|
2327
|
-
l = a.index, l - i > t && (r = o > i ? o : l,
|
|
2332
|
+
for (var n = / [^ ]/g, a, i = 0, r, o = 0, l = 0, c = ""; a = n.exec(e); )
|
|
2333
|
+
l = a.index, l - i > t && (r = o > i ? o : l, c += `
|
|
2328
2334
|
` + e.slice(i, r), i = r + 1), o = l;
|
|
2329
|
-
return
|
|
2330
|
-
`, e.length - i > t && o > i ?
|
|
2331
|
-
` + e.slice(o + 1) :
|
|
2335
|
+
return c += `
|
|
2336
|
+
`, e.length - i > t && o > i ? c += e.slice(i, o) + `
|
|
2337
|
+
` + e.slice(o + 1) : c += e.slice(i), c.slice(1);
|
|
2332
2338
|
}
|
|
2333
2339
|
function ro(e) {
|
|
2334
2340
|
for (var t = "", n = 0, a, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
@@ -2342,40 +2348,40 @@ function oo(e, t, n) {
|
|
|
2342
2348
|
e.tag = i, e.dump = "[" + a + "]";
|
|
2343
2349
|
}
|
|
2344
2350
|
function Wt(e, t, n, a) {
|
|
2345
|
-
var i = "", r = e.tag, o, l,
|
|
2351
|
+
var i = "", r = e.tag, o, l, c;
|
|
2346
2352
|
for (o = 0, l = n.length; o < l; o += 1)
|
|
2347
|
-
|
|
2353
|
+
c = n[o], e.replacer && (c = e.replacer.call(n, String(o), c)), (ke(e, t + 1, c, !0, !0, !1, !0) || typeof c > "u" && ke(e, t + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += pt(e, t)), e.dump && Ve === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2348
2354
|
e.tag = r, e.dump = i || "[]";
|
|
2349
2355
|
}
|
|
2350
2356
|
function lo(e, t, n) {
|
|
2351
|
-
var a = "", i = e.tag, r = Object.keys(n), o, l,
|
|
2357
|
+
var a = "", i = e.tag, r = Object.keys(n), o, l, c, d, s;
|
|
2352
2358
|
for (o = 0, l = r.length; o < l; o += 1)
|
|
2353
|
-
|
|
2359
|
+
s = "", a !== "" && (s += ", "), e.condenseFlow && (s += '"'), c = r[o], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), ke(e, t, c, !1, !1) && (e.dump.length > 1024 && (s += "? "), s += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ke(e, t, d, !1, !1) && (s += e.dump, a += s));
|
|
2354
2360
|
e.tag = i, e.dump = "{" + a + "}";
|
|
2355
2361
|
}
|
|
2356
2362
|
function so(e, t, n, a) {
|
|
2357
|
-
var i = "", r = e.tag, o = Object.keys(n), l,
|
|
2363
|
+
var i = "", r = e.tag, o = Object.keys(n), l, c, d, s, u, h;
|
|
2358
2364
|
if (e.sortKeys === !0)
|
|
2359
2365
|
o.sort();
|
|
2360
2366
|
else if (typeof e.sortKeys == "function")
|
|
2361
2367
|
o.sort(e.sortKeys);
|
|
2362
2368
|
else if (e.sortKeys)
|
|
2363
2369
|
throw new se("sortKeys must be a boolean or a function");
|
|
2364
|
-
for (l = 0,
|
|
2365
|
-
h = "", (!a || i !== "") && (h += pt(e, t)),
|
|
2370
|
+
for (l = 0, c = o.length; l < c; l += 1)
|
|
2371
|
+
h = "", (!a || i !== "") && (h += pt(e, t)), d = o[l], s = n[d], e.replacer && (s = e.replacer.call(n, d, s)), ke(e, t + 1, d, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ve === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, u && (h += pt(e, t)), ke(e, t + 1, s, !0, u) && (e.dump && Ve === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, i += h));
|
|
2366
2372
|
e.tag = r, e.dump = i || "{}";
|
|
2367
2373
|
}
|
|
2368
2374
|
function Yt(e, t, n) {
|
|
2369
|
-
var a, i, r, o, l,
|
|
2375
|
+
var a, i, r, o, l, c;
|
|
2370
2376
|
for (i = n ? e.explicitTypes : e.implicitTypes, r = 0, o = i.length; r < o; r += 1)
|
|
2371
2377
|
if (l = i[r], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
2372
2378
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2373
|
-
if (
|
|
2374
|
-
a = l.represent(t,
|
|
2375
|
-
else if (Rn.call(l.represent,
|
|
2376
|
-
a = l.represent[
|
|
2379
|
+
if (c = e.styleMap[l.tag] || l.defaultStyle, Un.call(l.represent) === "[object Function]")
|
|
2380
|
+
a = l.represent(t, c);
|
|
2381
|
+
else if (Rn.call(l.represent, c))
|
|
2382
|
+
a = l.represent[c](t, c);
|
|
2377
2383
|
else
|
|
2378
|
-
throw new se("!<" + l.tag + '> tag resolver accepts not "' +
|
|
2384
|
+
throw new se("!<" + l.tag + '> tag resolver accepts not "' + c + '" style');
|
|
2379
2385
|
e.dump = a;
|
|
2380
2386
|
}
|
|
2381
2387
|
return !0;
|
|
@@ -2384,26 +2390,26 @@ function Yt(e, t, n) {
|
|
|
2384
2390
|
}
|
|
2385
2391
|
function ke(e, t, n, a, i, r, o) {
|
|
2386
2392
|
e.tag = null, e.dump = n, Yt(e, n, !1) || Yt(e, n, !0);
|
|
2387
|
-
var l = Un.call(e.dump),
|
|
2393
|
+
var l = Un.call(e.dump), c = a, d;
|
|
2388
2394
|
a && (a = e.flowLevel < 0 || e.flowLevel > t);
|
|
2389
|
-
var
|
|
2390
|
-
if (
|
|
2391
|
-
e.dump = "*ref_" +
|
|
2395
|
+
var s = l === "[object Object]" || l === "[object Array]", u, h;
|
|
2396
|
+
if (s && (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])
|
|
2397
|
+
e.dump = "*ref_" + u;
|
|
2392
2398
|
else {
|
|
2393
|
-
if (
|
|
2394
|
-
a && Object.keys(e.dump).length !== 0 ? (so(e, t, e.dump, i), h && (e.dump = "&ref_" +
|
|
2399
|
+
if (s && h && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2400
|
+
a && Object.keys(e.dump).length !== 0 ? (so(e, t, e.dump, i), h && (e.dump = "&ref_" + u + e.dump)) : (lo(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2395
2401
|
else if (l === "[object Array]")
|
|
2396
|
-
a && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Wt(e, t - 1, e.dump, i) : Wt(e, t, e.dump, i), h && (e.dump = "&ref_" +
|
|
2402
|
+
a && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Wt(e, t - 1, e.dump, i) : Wt(e, t, e.dump, i), h && (e.dump = "&ref_" + u + e.dump)) : (oo(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2397
2403
|
else if (l === "[object String]")
|
|
2398
|
-
e.tag !== "?" && ao(e, e.dump, t, r,
|
|
2404
|
+
e.tag !== "?" && ao(e, e.dump, t, r, c);
|
|
2399
2405
|
else {
|
|
2400
2406
|
if (l === "[object Undefined]" || e.skipInvalid)
|
|
2401
2407
|
return !1;
|
|
2402
2408
|
throw new se("unacceptable kind of an object to dump " + l);
|
|
2403
2409
|
}
|
|
2404
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2410
|
+
e.tag !== null && e.tag !== "?" && (d = encodeURI(
|
|
2405
2411
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2406
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2412
|
+
).replace(/!/g, "%21"), e.tag[0] === "!" ? d = "!" + d : d.slice(0, 18) === "tag:yaml.org,2002:" ? d = "!!" + d.slice(18) : d = "!<" + d + ">", e.dump = d + " " + e.dump);
|
|
2407
2413
|
}
|
|
2408
2414
|
return !0;
|
|
2409
2415
|
}
|
|
@@ -2436,26 +2442,26 @@ function uo(e, t) {
|
|
|
2436
2442
|
var po = uo, fo = {
|
|
2437
2443
|
dump: po
|
|
2438
2444
|
};
|
|
2439
|
-
function
|
|
2445
|
+
function It(e, t) {
|
|
2440
2446
|
return function() {
|
|
2441
2447
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2442
2448
|
};
|
|
2443
2449
|
}
|
|
2444
|
-
var yo = re, mo = pn, go = gn, ho = wn, vo = Cn, ko = wt, bo = Bn.load, wo = Bn.loadAll, Co = fo.dump, So = se,
|
|
2450
|
+
var yo = re, mo = pn, go = gn, ho = wn, vo = Cn, ko = wt, bo = Bn.load, wo = Bn.loadAll, Co = fo.dump, So = se, _o = {
|
|
2445
2451
|
binary: An,
|
|
2446
2452
|
float: bn,
|
|
2447
2453
|
map: mn,
|
|
2448
2454
|
null: hn,
|
|
2449
2455
|
pairs: Tn,
|
|
2450
2456
|
set: $n,
|
|
2451
|
-
timestamp:
|
|
2457
|
+
timestamp: In,
|
|
2452
2458
|
bool: vn,
|
|
2453
2459
|
int: kn,
|
|
2454
2460
|
merge: xn,
|
|
2455
2461
|
omap: jn,
|
|
2456
2462
|
seq: yn,
|
|
2457
2463
|
str: fn
|
|
2458
|
-
},
|
|
2464
|
+
}, Io = It("safeLoad", "load"), xo = It("safeLoadAll", "loadAll"), Ao = It("safeDump", "dump"), jo = {
|
|
2459
2465
|
Type: yo,
|
|
2460
2466
|
Schema: mo,
|
|
2461
2467
|
FAILSAFE_SCHEMA: go,
|
|
@@ -2466,8 +2472,8 @@ var yo = re, mo = pn, go = gn, ho = wn, vo = Cn, ko = wt, bo = Bn.load, wo = Bn.
|
|
|
2466
2472
|
loadAll: wo,
|
|
2467
2473
|
dump: Co,
|
|
2468
2474
|
YAMLException: So,
|
|
2469
|
-
types:
|
|
2470
|
-
safeLoad:
|
|
2475
|
+
types: _o,
|
|
2476
|
+
safeLoad: Io,
|
|
2471
2477
|
safeLoadAll: xo,
|
|
2472
2478
|
safeDump: Ao
|
|
2473
2479
|
};
|
|
@@ -2487,8 +2493,8 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2487
2493
|
});
|
|
2488
2494
|
return (a, i) => {
|
|
2489
2495
|
const r = B("KCodeBlock");
|
|
2490
|
-
return
|
|
2491
|
-
t.yamlRecord ? (
|
|
2496
|
+
return y(), O("div", To, [
|
|
2497
|
+
t.yamlRecord ? (y(), V(r, {
|
|
2492
2498
|
key: 0,
|
|
2493
2499
|
id: "yaml-codeblock",
|
|
2494
2500
|
code: n.value,
|
|
@@ -2549,47 +2555,47 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2549
2555
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2550
2556
|
return delete o.created_at, delete o.updated_at, o;
|
|
2551
2557
|
});
|
|
2552
|
-
return (o, l) => (
|
|
2553
|
-
e.format === "structured" ? (
|
|
2554
|
-
(
|
|
2555
|
-
key: `config-card-details-${
|
|
2556
|
-
class:
|
|
2557
|
-
"data-testid": `config-card-details-${
|
|
2558
|
+
return (o, l) => (y(), O(ye, null, [
|
|
2559
|
+
e.format === "structured" ? (y(), O("div", $o, [
|
|
2560
|
+
(y(!0), O(ye, null, pe(e.propListTypes, (c) => (y(), O("div", {
|
|
2561
|
+
key: `config-card-details-${c}-props`,
|
|
2562
|
+
class: _e(`config-card-details-${c}-props`),
|
|
2563
|
+
"data-testid": `config-card-details-${c}-props`
|
|
2558
2564
|
}, [
|
|
2559
|
-
|
|
2560
|
-
(
|
|
2561
|
-
key:
|
|
2562
|
-
item:
|
|
2565
|
+
c !== "basic" ? (y(), O("div", Ko, N(c === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : J("", !0),
|
|
2566
|
+
(y(!0), O(ye, null, pe(e.propertyCollections[c], (d) => (y(), V(He, {
|
|
2567
|
+
key: d.key,
|
|
2568
|
+
item: d
|
|
2563
2569
|
}, $e({
|
|
2564
2570
|
label: k(() => [
|
|
2565
|
-
ee(o.$slots, `${
|
|
2571
|
+
ee(o.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2566
2572
|
]),
|
|
2567
|
-
[
|
|
2568
|
-
ee(o.$slots,
|
|
2569
|
-
row:
|
|
2570
|
-
rowValue:
|
|
2573
|
+
[d.key]: k(({ rowValue: s }) => [
|
|
2574
|
+
ee(o.$slots, d.key, {
|
|
2575
|
+
row: d,
|
|
2576
|
+
rowValue: s
|
|
2571
2577
|
}, void 0, !0)
|
|
2572
2578
|
]),
|
|
2573
2579
|
_: 2
|
|
2574
2580
|
}, [
|
|
2575
|
-
i(
|
|
2581
|
+
i(d) ? {
|
|
2576
2582
|
name: "label-tooltip",
|
|
2577
2583
|
fn: k(() => [
|
|
2578
|
-
ee(o.$slots, `${
|
|
2584
|
+
ee(o.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2579
2585
|
]),
|
|
2580
2586
|
key: "0"
|
|
2581
2587
|
} : void 0
|
|
2582
2588
|
]), 1032, ["item"]))), 128))
|
|
2583
2589
|
], 10, Oo))), 128))
|
|
2584
2590
|
])) : J("", !0),
|
|
2585
|
-
e.format === "json" && t.record ? (
|
|
2591
|
+
e.format === "json" && t.record ? (y(), V(cn, {
|
|
2586
2592
|
key: 1,
|
|
2587
2593
|
config: t.config,
|
|
2588
2594
|
"fetcher-url": t.fetcherUrl,
|
|
2589
2595
|
"json-record": r.value,
|
|
2590
2596
|
"request-method": "get"
|
|
2591
2597
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : J("", !0),
|
|
2592
|
-
e.format === "yaml" && t.record ? (
|
|
2598
|
+
e.format === "yaml" && t.record ? (y(), V(Gn, {
|
|
2593
2599
|
key: 2,
|
|
2594
2600
|
"yaml-record": r.value
|
|
2595
2601
|
}, null, 8, ["yaml-record"])) : J("", !0)
|
|
@@ -2675,14 +2681,14 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2675
2681
|
lineHeight: "0",
|
|
2676
2682
|
width: n.value
|
|
2677
2683
|
}));
|
|
2678
|
-
return (i, r) => (
|
|
2684
|
+
return (i, r) => (y(), V(Oe(e.as), {
|
|
2679
2685
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2680
2686
|
class: "kui-icon add-icon",
|
|
2681
2687
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2682
2688
|
style: et(a.value)
|
|
2683
2689
|
}, {
|
|
2684
2690
|
default: k(() => [
|
|
2685
|
-
(
|
|
2691
|
+
(y(), O("svg", {
|
|
2686
2692
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2687
2693
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2688
2694
|
fill: "none",
|
|
@@ -2692,7 +2698,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2692
2698
|
width: "100%",
|
|
2693
2699
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2694
2700
|
}, [
|
|
2695
|
-
e.title ? (
|
|
2701
|
+
e.title ? (y(), O("title", qo, N(e.title), 1)) : J("", !0),
|
|
2696
2702
|
Lo
|
|
2697
2703
|
], 8, Fo))
|
|
2698
2704
|
]),
|
|
@@ -2774,14 +2780,14 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2774
2780
|
lineHeight: "0",
|
|
2775
2781
|
width: n.value
|
|
2776
2782
|
}));
|
|
2777
|
-
return (i, r) => (
|
|
2783
|
+
return (i, r) => (y(), V(Oe(e.as), {
|
|
2778
2784
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2779
2785
|
class: "kui-icon book-icon",
|
|
2780
2786
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2781
2787
|
style: et(a.value)
|
|
2782
2788
|
}, {
|
|
2783
2789
|
default: k(() => [
|
|
2784
|
-
(
|
|
2790
|
+
(y(), O("svg", {
|
|
2785
2791
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2786
2792
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2787
2793
|
fill: "none",
|
|
@@ -2791,7 +2797,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2791
2797
|
width: "100%",
|
|
2792
2798
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2793
2799
|
}, [
|
|
2794
|
-
e.title ? (
|
|
2800
|
+
e.title ? (y(), O("title", Po, N(e.title), 1)) : J("", !0),
|
|
2795
2801
|
Do
|
|
2796
2802
|
], 8, Vo))
|
|
2797
2803
|
]),
|
|
@@ -2873,14 +2879,14 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2873
2879
|
lineHeight: "0",
|
|
2874
2880
|
width: n.value
|
|
2875
2881
|
}));
|
|
2876
|
-
return (i, r) => (
|
|
2882
|
+
return (i, r) => (y(), V(Oe(e.as), {
|
|
2877
2883
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2878
2884
|
class: "kui-icon chevron-down-icon",
|
|
2879
2885
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2880
2886
|
style: et(a.value)
|
|
2881
2887
|
}, {
|
|
2882
2888
|
default: k(() => [
|
|
2883
|
-
(
|
|
2889
|
+
(y(), O("svg", {
|
|
2884
2890
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2885
2891
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2886
2892
|
fill: "none",
|
|
@@ -2890,7 +2896,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2890
2896
|
width: "100%",
|
|
2891
2897
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2892
2898
|
}, [
|
|
2893
|
-
e.title ? (
|
|
2899
|
+
e.title ? (y(), O("title", Yo, N(e.title), 1)) : J("", !0),
|
|
2894
2900
|
Zo
|
|
2895
2901
|
], 8, Wo))
|
|
2896
2902
|
]),
|
|
@@ -2972,14 +2978,14 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2972
2978
|
lineHeight: "0",
|
|
2973
2979
|
width: n.value
|
|
2974
2980
|
}));
|
|
2975
|
-
return (i, r) => (
|
|
2981
|
+
return (i, r) => (y(), V(Oe(e.as), {
|
|
2976
2982
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2977
2983
|
class: "kui-icon close-icon",
|
|
2978
2984
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2979
2985
|
style: et(a.value)
|
|
2980
2986
|
}, {
|
|
2981
2987
|
default: k(() => [
|
|
2982
|
-
(
|
|
2988
|
+
(y(), O("svg", {
|
|
2983
2989
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2984
2990
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2985
2991
|
fill: "none",
|
|
@@ -2989,7 +2995,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
2989
2995
|
width: "100%",
|
|
2990
2996
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2991
2997
|
}, [
|
|
2992
|
-
e.title ? (
|
|
2998
|
+
e.title ? (y(), O("title", tl, N(e.title), 1)) : J("", !0),
|
|
2993
2999
|
nl
|
|
2994
3000
|
], 8, el))
|
|
2995
3001
|
]),
|
|
@@ -3071,9 +3077,9 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3071
3077
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
3072
3078
|
setup(e, { emit: t }) {
|
|
3073
3079
|
var n;
|
|
3074
|
-
const a = t, i = e, { i18n: { t: r } } = ie.useI18n(), { getMessageFromError: o } = ie.useErrors(), { convertKeyToTitle: l } = ie.useStringHelpers(), { axiosInstance:
|
|
3080
|
+
const a = t, i = e, { i18n: { t: r } } = ie.useI18n(), { getMessageFromError: o } = ie.useErrors(), { convertKeyToTitle: l } = ie.useStringHelpers(), { axiosInstance: c } = ie.useAxios({
|
|
3075
3081
|
headers: (n = i.config) == null ? void 0 : n.requestHeaders
|
|
3076
|
-
}),
|
|
3082
|
+
}), d = [
|
|
3077
3083
|
{
|
|
3078
3084
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
3079
3085
|
value: "structured",
|
|
@@ -3087,8 +3093,8 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3087
3093
|
label: "YAML",
|
|
3088
3094
|
value: "yaml"
|
|
3089
3095
|
}
|
|
3090
|
-
],
|
|
3091
|
-
|
|
3096
|
+
], s = E("structured"), u = (g) => {
|
|
3097
|
+
s.value = g == null ? void 0 : g.value;
|
|
3092
3098
|
}, h = {
|
|
3093
3099
|
id: {
|
|
3094
3100
|
type: Z.ID,
|
|
@@ -3123,13 +3129,13 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3123
3129
|
// the last property displayed
|
|
3124
3130
|
section: le.Basic
|
|
3125
3131
|
}
|
|
3126
|
-
},
|
|
3127
|
-
var
|
|
3128
|
-
if (!
|
|
3132
|
+
}, f = E(!1), S = E(!1), C = E(""), I = E({}), U = x(() => {
|
|
3133
|
+
var g, _, q;
|
|
3134
|
+
if (!I.value)
|
|
3129
3135
|
return [];
|
|
3130
|
-
const j = [], P = Object.keys(
|
|
3131
|
-
for (const M in
|
|
3132
|
-
const K = (
|
|
3136
|
+
const j = [], P = Object.keys(I.value).length;
|
|
3137
|
+
for (const M in I.value) {
|
|
3138
|
+
const K = (_ = (g = i.configSchema) == null ? void 0 : g[M]) == null ? void 0 : _.order, z = (q = h[M]) == null ? void 0 : q.order;
|
|
3133
3139
|
let W = P;
|
|
3134
3140
|
(z || z === 0) && (W = z === -1 ? P + 1 : z), K && (W = K === -1 ? P + 1 : K), j.push([M, W]);
|
|
3135
3141
|
}
|
|
@@ -3137,7 +3143,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3137
3143
|
return M[1] - K[1];
|
|
3138
3144
|
}), j.map((M) => {
|
|
3139
3145
|
var K, z;
|
|
3140
|
-
const W = M[0], ce = (K =
|
|
3146
|
+
const W = M[0], ce = (K = I.value) == null ? void 0 : K[W], ue = ((z = i.configSchema) == null ? void 0 : z[W]) || {}, fe = h[W];
|
|
3141
3147
|
return {
|
|
3142
3148
|
key: W,
|
|
3143
3149
|
value: ce,
|
|
@@ -3149,12 +3155,12 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3149
3155
|
};
|
|
3150
3156
|
}).filter((M) => !M.hidden && M.key !== i.pluginConfigKey);
|
|
3151
3157
|
}), b = x(() => {
|
|
3152
|
-
var
|
|
3153
|
-
if (!
|
|
3158
|
+
var g, _;
|
|
3159
|
+
if (!I.value || !i.pluginConfigKey)
|
|
3154
3160
|
return [];
|
|
3155
|
-
const q =
|
|
3161
|
+
const q = I.value[i.pluginConfigKey] || {}, j = Object.keys(q).length, P = [];
|
|
3156
3162
|
for (const M in q) {
|
|
3157
|
-
const K = (
|
|
3163
|
+
const K = (_ = (g = i.pluginConfigSchema) == null ? void 0 : g[M]) == null ? void 0 : _.order, z = q[M];
|
|
3158
3164
|
let W = z != null && z !== "" ? j - 1 : j;
|
|
3159
3165
|
K && (W = K === -1 ? j + 1 : K), P.push([M, W]);
|
|
3160
3166
|
}
|
|
@@ -3174,48 +3180,48 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3174
3180
|
};
|
|
3175
3181
|
}).filter((M) => !M.hidden);
|
|
3176
3182
|
}), D = x(() => {
|
|
3177
|
-
var
|
|
3183
|
+
var g, _, q, j;
|
|
3178
3184
|
return {
|
|
3179
|
-
basic: (
|
|
3180
|
-
advanced: (
|
|
3185
|
+
basic: (g = U.value) == null ? void 0 : g.filter((P) => P.section === le.Basic),
|
|
3186
|
+
advanced: (_ = U.value) == null ? void 0 : _.filter((P) => P.section === le.Advanced),
|
|
3181
3187
|
plugin: (j = b.value) == null ? void 0 : j.concat((q = U.value) == null ? void 0 : q.filter((P) => P.section === le.Plugin))
|
|
3182
3188
|
};
|
|
3183
3189
|
}), v = x(() => {
|
|
3184
|
-
const
|
|
3185
|
-
return D.value.basic.length &&
|
|
3190
|
+
const g = [];
|
|
3191
|
+
return D.value.basic.length && g.push("basic"), D.value.advanced.length && g.push("advanced"), D.value.plugin.length && g.push("plugin"), g;
|
|
3186
3192
|
}), p = x(() => {
|
|
3187
|
-
var
|
|
3193
|
+
var g, _;
|
|
3188
3194
|
let q = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3189
|
-
return i.config.app === "konnect" ? q = q.replace(/{controlPlaneId}/gi, ((
|
|
3195
|
+
return i.config.app === "konnect" ? q = q.replace(/{controlPlaneId}/gi, ((g = i.config) == null ? void 0 : g.controlPlaneId) || "") : i.config.app === "kongManager" && (q = q.replace(/\/{workspace}/gi, (_ = i.config) != null && _.workspace ? `/${i.config.workspace}` : "")), q = q.replace(/{id}/gi, i.config.entityId), q;
|
|
3190
3196
|
});
|
|
3191
|
-
return ge(
|
|
3192
|
-
a("loading",
|
|
3197
|
+
return ge(f, (g) => {
|
|
3198
|
+
a("loading", g);
|
|
3193
3199
|
}, { immediate: !0 }), Xe(async () => {
|
|
3194
|
-
|
|
3200
|
+
S.value = !1, f.value = !0;
|
|
3195
3201
|
try {
|
|
3196
|
-
const { data:
|
|
3202
|
+
const { data: g } = await c.get(p.value);
|
|
3197
3203
|
if (i.dataKey)
|
|
3198
|
-
if (typeof
|
|
3199
|
-
|
|
3204
|
+
if (typeof g[i.dataKey] < "u")
|
|
3205
|
+
I.value = { ...g[i.dataKey] };
|
|
3200
3206
|
else
|
|
3201
3207
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3202
3208
|
else
|
|
3203
|
-
|
|
3204
|
-
Object.keys(i.configSchema).filter((
|
|
3205
|
-
|
|
3206
|
-
}), a("fetch:success",
|
|
3207
|
-
} catch (
|
|
3208
|
-
const
|
|
3209
|
-
C.value =
|
|
3209
|
+
I.value = { ...g };
|
|
3210
|
+
Object.keys(i.configSchema).filter((_) => i.configSchema[_].forceShow).forEach((_) => {
|
|
3211
|
+
I.value && typeof I.value[_] > "u" && (I.value[_] = null);
|
|
3212
|
+
}), a("fetch:success", g);
|
|
3213
|
+
} catch (g) {
|
|
3214
|
+
const _ = o(g);
|
|
3215
|
+
C.value = _.startsWith("code") ? r("baseConfigCard.errors.load") : _, S.value = !0, a("fetch:error", g);
|
|
3210
3216
|
} finally {
|
|
3211
|
-
|
|
3217
|
+
f.value = !1;
|
|
3212
3218
|
}
|
|
3213
|
-
}), (
|
|
3219
|
+
}), (g, _) => {
|
|
3214
3220
|
const q = B("KLabel"), j = B("KSelect"), P = B("KButton"), M = B("KSkeleton"), K = B("KEmptyState"), z = B("KCard");
|
|
3215
|
-
return
|
|
3221
|
+
return y(), V(z, { class: "kong-ui-entity-base-config-card" }, $e({
|
|
3216
3222
|
actions: k(() => [
|
|
3217
3223
|
L("div", ol, [
|
|
3218
|
-
ee(
|
|
3224
|
+
ee(g.$slots, "actions", {}, void 0, !0),
|
|
3219
3225
|
A(q, {
|
|
3220
3226
|
class: "config-format-select-label",
|
|
3221
3227
|
"data-testid": "config-format-select-label"
|
|
@@ -3227,10 +3233,10 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3227
3233
|
}),
|
|
3228
3234
|
A(j, {
|
|
3229
3235
|
"data-testid": "select-config-format",
|
|
3230
|
-
items:
|
|
3231
|
-
onChange:
|
|
3236
|
+
items: d,
|
|
3237
|
+
onChange: u
|
|
3232
3238
|
}),
|
|
3233
|
-
e.configCardDoc ? (
|
|
3239
|
+
e.configCardDoc ? (y(), V(P, {
|
|
3234
3240
|
key: 0,
|
|
3235
3241
|
appearance: "tertiary",
|
|
3236
3242
|
class: "book-icon",
|
|
@@ -3242,7 +3248,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3242
3248
|
rel: "noopener",
|
|
3243
3249
|
target: "_blank"
|
|
3244
3250
|
}, [
|
|
3245
|
-
A(
|
|
3251
|
+
A(m(Jo), { size: m(Ha) }, null, 8, ["size"])
|
|
3246
3252
|
], 8, ll)
|
|
3247
3253
|
]),
|
|
3248
3254
|
_: 1
|
|
@@ -3250,12 +3256,12 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3250
3256
|
])
|
|
3251
3257
|
]),
|
|
3252
3258
|
default: k(() => [
|
|
3253
|
-
|
|
3259
|
+
f.value ? (y(), V(M, {
|
|
3254
3260
|
key: 0,
|
|
3255
3261
|
"data-testid": "config-card-loader",
|
|
3256
3262
|
"table-columns": 2,
|
|
3257
3263
|
type: "table"
|
|
3258
|
-
})) :
|
|
3264
|
+
})) : S.value ? (y(), V(K, {
|
|
3259
3265
|
key: 1,
|
|
3260
3266
|
"data-testid": "config-card-fetch-error",
|
|
3261
3267
|
"icon-variant": "error"
|
|
@@ -3269,15 +3275,15 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3269
3275
|
A(Eo, {
|
|
3270
3276
|
config: e.config,
|
|
3271
3277
|
"fetcher-url": p.value,
|
|
3272
|
-
format:
|
|
3278
|
+
format: s.value,
|
|
3273
3279
|
"prop-list-types": v.value,
|
|
3274
3280
|
"property-collections": D.value,
|
|
3275
|
-
record:
|
|
3281
|
+
record: I.value
|
|
3276
3282
|
}, $e({ _: 2 }, [
|
|
3277
|
-
pe(Object.keys(
|
|
3283
|
+
pe(Object.keys(g.$slots), (W) => ({
|
|
3278
3284
|
name: W,
|
|
3279
3285
|
fn: k(({ row: ce, rowValue: ue }) => [
|
|
3280
|
-
ee(
|
|
3286
|
+
ee(g.$slots, W, {
|
|
3281
3287
|
row: ce,
|
|
3282
3288
|
rowValue: ue
|
|
3283
3289
|
}, void 0, !0)
|
|
@@ -3292,8 +3298,8 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3292
3298
|
name: "title",
|
|
3293
3299
|
fn: k(() => [
|
|
3294
3300
|
L("div", rl, [
|
|
3295
|
-
ee(
|
|
3296
|
-
G(N(
|
|
3301
|
+
ee(g.$slots, "title", {}, () => [
|
|
3302
|
+
G(N(m(r)("baseConfigCard.title")), 1)
|
|
3297
3303
|
], !0)
|
|
3298
3304
|
])
|
|
3299
3305
|
]),
|
|
@@ -3360,15 +3366,15 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3360
3366
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3361
3367
|
setup(e, { emit: t }) {
|
|
3362
3368
|
var n;
|
|
3363
|
-
const a = t, i = e, r = gt(), { i18n: { t: o } } = ie.useI18n(), { getMessageFromError: l } = ie.useErrors(), { axiosInstance:
|
|
3369
|
+
const a = t, i = e, r = gt(), { i18n: { t: o } } = ie.useI18n(), { getMessageFromError: l } = ie.useErrors(), { axiosInstance: c } = ie.useAxios({
|
|
3364
3370
|
headers: (n = i.config) == null ? void 0 : n.requestHeaders
|
|
3365
|
-
}),
|
|
3371
|
+
}), d = E(!1), s = E(!1), u = E(""), h = x(() => i.canSubmit === !1 || i.isReadonly), f = E(!1), S = x(() => {
|
|
3366
3372
|
var v, p;
|
|
3367
|
-
let
|
|
3368
|
-
return i.config.app === "konnect" ?
|
|
3373
|
+
let g = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3374
|
+
return i.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((v = i.config) == null ? void 0 : v.controlPlaneId) || "") : i.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (p = i.config) != null && p.workspace ? `/${i.config.workspace}` : "")), i.editId ? (g = g.replace(/{id}/gi, i.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3369
3375
|
}), C = () => {
|
|
3370
|
-
|
|
3371
|
-
},
|
|
3376
|
+
f.value = !f.value;
|
|
3377
|
+
}, I = () => {
|
|
3372
3378
|
i.config.cancelRoute ? r.push(i.config.cancelRoute) : U();
|
|
3373
3379
|
}, U = () => {
|
|
3374
3380
|
a("cancel");
|
|
@@ -3384,46 +3390,46 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3384
3390
|
hash: "#json"
|
|
3385
3391
|
}
|
|
3386
3392
|
]);
|
|
3387
|
-
return ge(() =>
|
|
3393
|
+
return ge(() => d.value, (v) => {
|
|
3388
3394
|
a("loading", v);
|
|
3389
3395
|
}, { immediate: !0 }), Xe(async () => {
|
|
3390
3396
|
if (i.editId)
|
|
3391
3397
|
try {
|
|
3392
|
-
|
|
3393
|
-
const { data: v } = await
|
|
3398
|
+
s.value = !1, d.value = !0;
|
|
3399
|
+
const { data: v } = await c.get(S.value);
|
|
3394
3400
|
a("fetch:success", v);
|
|
3395
3401
|
} catch (v) {
|
|
3396
3402
|
const p = l(v);
|
|
3397
|
-
|
|
3403
|
+
u.value = p.startsWith("code") ? o("baseForm.errors.edit") : p, s.value = !0, a("fetch:error", v);
|
|
3398
3404
|
} finally {
|
|
3399
|
-
|
|
3405
|
+
d.value = !1;
|
|
3400
3406
|
}
|
|
3401
3407
|
}), (v, p) => {
|
|
3402
|
-
const
|
|
3403
|
-
return
|
|
3408
|
+
const g = B("KSkeleton"), _ = B("KEmptyState"), q = B("KAlert"), j = B("KButton"), P = B("KTabs"), M = B("KSlideout"), K = B("KCard");
|
|
3409
|
+
return y(), V(K, { class: "kong-ui-entity-base-form" }, {
|
|
3404
3410
|
default: k(() => [
|
|
3405
|
-
|
|
3411
|
+
d.value ? (y(), V(g, {
|
|
3406
3412
|
key: 0,
|
|
3407
3413
|
type: "form"
|
|
3408
|
-
})) :
|
|
3414
|
+
})) : s.value ? (y(), V(_, {
|
|
3409
3415
|
key: 1,
|
|
3410
|
-
"action-button-text":
|
|
3416
|
+
"action-button-text": m(o)("baseForm.actions.back"),
|
|
3411
3417
|
"data-testid": "form-fetch-error",
|
|
3412
3418
|
"icon-variant": "error",
|
|
3413
|
-
onClickAction:
|
|
3419
|
+
onClickAction: I
|
|
3414
3420
|
}, {
|
|
3415
3421
|
default: k(() => [
|
|
3416
|
-
L("h3", null, N(
|
|
3422
|
+
L("h3", null, N(u.value), 1)
|
|
3417
3423
|
]),
|
|
3418
3424
|
_: 1
|
|
3419
|
-
}, 8, ["action-button-text"])) : (
|
|
3425
|
+
}, 8, ["action-button-text"])) : (y(), O("form", {
|
|
3420
3426
|
key: 2,
|
|
3421
3427
|
"data-testid": "form-content",
|
|
3422
3428
|
onReset: ct(U, ["prevent"]),
|
|
3423
3429
|
onSubmit: ct(b, ["prevent"])
|
|
3424
3430
|
}, [
|
|
3425
3431
|
ee(v.$slots, "default", {}, void 0, !0),
|
|
3426
|
-
e.errorMessage ? (
|
|
3432
|
+
e.errorMessage ? (y(), V(q, {
|
|
3427
3433
|
key: 0,
|
|
3428
3434
|
appearance: "danger",
|
|
3429
3435
|
"data-testid": "form-error",
|
|
@@ -3437,7 +3443,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3437
3443
|
onClick: p[0] || (p[0] = (z) => C())
|
|
3438
3444
|
}, {
|
|
3439
3445
|
default: k(() => [
|
|
3440
|
-
G(N(
|
|
3446
|
+
G(N(m(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3441
3447
|
]),
|
|
3442
3448
|
_: 1
|
|
3443
3449
|
}),
|
|
@@ -3448,7 +3454,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3448
3454
|
type: "reset"
|
|
3449
3455
|
}, {
|
|
3450
3456
|
default: k(() => [
|
|
3451
|
-
G(N(
|
|
3457
|
+
G(N(m(o)("baseForm.actions.cancel")), 1)
|
|
3452
3458
|
]),
|
|
3453
3459
|
_: 1
|
|
3454
3460
|
}, 8, ["disabled"]),
|
|
@@ -3459,7 +3465,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3459
3465
|
type: "submit"
|
|
3460
3466
|
}, {
|
|
3461
3467
|
default: k(() => [
|
|
3462
|
-
G(N(
|
|
3468
|
+
G(N(m(o)("baseForm.actions.save")), 1)
|
|
3463
3469
|
]),
|
|
3464
3470
|
_: 1
|
|
3465
3471
|
}, 8, ["disabled"])
|
|
@@ -3471,12 +3477,12 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3471
3477
|
"data-testid": "form-view-configuration-slideout",
|
|
3472
3478
|
"has-overlay": !1,
|
|
3473
3479
|
"offset-top": 60,
|
|
3474
|
-
title:
|
|
3475
|
-
visible:
|
|
3480
|
+
title: m(o)("baseForm.configuration.title"),
|
|
3481
|
+
visible: f.value,
|
|
3476
3482
|
onClose: p[1] || (p[1] = (z) => C())
|
|
3477
3483
|
}, {
|
|
3478
3484
|
default: k(() => [
|
|
3479
|
-
L("div", null, N(
|
|
3485
|
+
L("div", null, N(m(o)("baseForm.configuration.message")), 1),
|
|
3480
3486
|
A(P, {
|
|
3481
3487
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3482
3488
|
tabs: D.value
|
|
@@ -3484,7 +3490,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3484
3490
|
json: k(() => [
|
|
3485
3491
|
A(cn, {
|
|
3486
3492
|
config: e.config,
|
|
3487
|
-
"fetcher-url":
|
|
3493
|
+
"fetcher-url": S.value,
|
|
3488
3494
|
"json-record": i.formFields,
|
|
3489
3495
|
"request-method": i.editId ? "put" : "post"
|
|
3490
3496
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
@@ -3527,47 +3533,47 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3527
3533
|
var C;
|
|
3528
3534
|
return ((C = n.value) == null ? void 0 : C.querySelector('[data-testid="first-col"]')) || null;
|
|
3529
3535
|
}), i = x(() => {
|
|
3530
|
-
var C,
|
|
3536
|
+
var C, I;
|
|
3531
3537
|
const U = (C = t.rowEl) == null ? void 0 : C.querySelectorAll("td");
|
|
3532
|
-
return U ? ((
|
|
3538
|
+
return U ? ((I = U[0]) == null ? void 0 : I.getAttribute("data-testid")) === t.keyName : !1;
|
|
3533
3539
|
});
|
|
3534
3540
|
let r;
|
|
3535
3541
|
const o = () => {
|
|
3536
3542
|
r && (r.disconnect(), r = void 0);
|
|
3537
3543
|
}, l = () => {
|
|
3538
|
-
var C,
|
|
3539
|
-
|
|
3540
|
-
},
|
|
3544
|
+
var C, I, U;
|
|
3545
|
+
d.value = ((C = a.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, s.value = ((I = n.value) == null ? void 0 : I.clientWidth) || 0, u.value = ((U = c.value) == null ? void 0 : U.innerText) || "";
|
|
3546
|
+
}, c = E({}), d = E(0), s = E(0), u = E(""), h = x(() => [a.value, n.value]), f = ge(
|
|
3541
3547
|
h,
|
|
3542
3548
|
(C) => {
|
|
3543
3549
|
if (i.value && (o(), "ResizeObserver" in window && window)) {
|
|
3544
|
-
r = new ResizeObserver((
|
|
3550
|
+
r = new ResizeObserver((I) => {
|
|
3545
3551
|
window.requestAnimationFrame(() => {
|
|
3546
|
-
!Array.isArray(
|
|
3552
|
+
!Array.isArray(I) || !I.length || l();
|
|
3547
3553
|
});
|
|
3548
3554
|
});
|
|
3549
|
-
for (const
|
|
3550
|
-
|
|
3555
|
+
for (const I of C)
|
|
3556
|
+
I && r.observe(I);
|
|
3551
3557
|
}
|
|
3552
3558
|
},
|
|
3553
3559
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3554
|
-
),
|
|
3560
|
+
), S = x(() => i.value ? d.value > s.value : !1);
|
|
3555
3561
|
return ra(() => {
|
|
3556
3562
|
l();
|
|
3557
3563
|
}), oa(() => {
|
|
3558
|
-
|
|
3559
|
-
}), (C,
|
|
3564
|
+
f();
|
|
3565
|
+
}), (C, I) => {
|
|
3560
3566
|
const U = B("KTooltip");
|
|
3561
|
-
return
|
|
3567
|
+
return y(), O("span", {
|
|
3562
3568
|
ref_key: "contentRef",
|
|
3563
|
-
ref:
|
|
3569
|
+
ref: c,
|
|
3564
3570
|
class: "content-wrapper"
|
|
3565
3571
|
}, [
|
|
3566
|
-
i.value ? (
|
|
3572
|
+
i.value ? (y(), O("span", yl, [
|
|
3567
3573
|
A(U, {
|
|
3568
3574
|
"max-width": "300",
|
|
3569
3575
|
placement: "bottomStart",
|
|
3570
|
-
text:
|
|
3576
|
+
text: S.value ? u.value : ""
|
|
3571
3577
|
}, {
|
|
3572
3578
|
default: k(() => [
|
|
3573
3579
|
ee(C.$slots, "default", {}, void 0, !0)
|
|
@@ -3692,7 +3698,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3692
3698
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3693
3699
|
setup(e, { emit: t }) {
|
|
3694
3700
|
const n = e, a = t, { i18n: { t: i } } = ie.useI18n(), r = x(() => {
|
|
3695
|
-
var p,
|
|
3701
|
+
var p, g;
|
|
3696
3702
|
return typeof n.errorMessage == "string" ? {
|
|
3697
3703
|
hasError: !!n.errorMessage,
|
|
3698
3704
|
title: n.errorMessage,
|
|
@@ -3700,45 +3706,45 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3700
3706
|
} : {
|
|
3701
3707
|
hasError: !!n.errorMessage,
|
|
3702
3708
|
title: (p = n.errorMessage) == null ? void 0 : p.title,
|
|
3703
|
-
message: (
|
|
3709
|
+
message: (g = n.errorMessage) == null ? void 0 : g.message
|
|
3704
3710
|
};
|
|
3705
|
-
}), o = x(() => n.cacheIdentifier || n.preferencesStorageKey), l = (p) => p.hasData || !!n.query,
|
|
3711
|
+
}), o = x(() => n.cacheIdentifier || n.preferencesStorageKey), l = (p) => p.hasData || !!n.query, c = x(() => {
|
|
3706
3712
|
const p = [];
|
|
3707
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3708
|
-
const
|
|
3713
|
+
return Object.keys(n.tableHeaders).forEach((g) => {
|
|
3714
|
+
const _ = n.tableHeaders[g];
|
|
3709
3715
|
p.push({
|
|
3710
|
-
label:
|
|
3711
|
-
key:
|
|
3712
|
-
sortable:
|
|
3716
|
+
label: _.label ?? g,
|
|
3717
|
+
key: g,
|
|
3718
|
+
sortable: _.sortable ?? !1
|
|
3713
3719
|
});
|
|
3714
3720
|
}), n.enableEntityActions && p.push({
|
|
3715
3721
|
key: "actions",
|
|
3716
3722
|
hideLabel: !0
|
|
3717
3723
|
}), p;
|
|
3718
|
-
}),
|
|
3724
|
+
}), d = (p) => ({
|
|
3719
3725
|
"data-rowid": p.id,
|
|
3720
3726
|
"data-testid": p.name,
|
|
3721
3727
|
...n.rowAttributes(p)
|
|
3722
|
-
}),
|
|
3723
|
-
var
|
|
3724
|
-
return (
|
|
3728
|
+
}), s = E({}), u = (p) => {
|
|
3729
|
+
var g;
|
|
3730
|
+
return (g = s.value) == null ? void 0 : g.$el.querySelector(`[data-rowid="${p.id}"]`);
|
|
3725
3731
|
}, h = (p) => {
|
|
3726
|
-
const
|
|
3732
|
+
const g = {
|
|
3727
3733
|
"data-testid": p.headerKey,
|
|
3728
3734
|
...n.cellAttributes(p)
|
|
3729
3735
|
};
|
|
3730
|
-
return p.colIndex === 0 && (
|
|
3736
|
+
return p.colIndex === 0 && (g.style = {
|
|
3731
3737
|
maxWidth: "250px",
|
|
3732
3738
|
overflowX: "hidden",
|
|
3733
3739
|
textOverflow: "ellipsis"
|
|
3734
|
-
}),
|
|
3735
|
-
},
|
|
3736
|
-
a("empty-state-cta-clicked"),
|
|
3737
|
-
},
|
|
3740
|
+
}), g;
|
|
3741
|
+
}, f = () => {
|
|
3742
|
+
a("empty-state-cta-clicked"), S();
|
|
3743
|
+
}, S = () => {
|
|
3738
3744
|
a("clear-search-input");
|
|
3739
|
-
}, C = x(() => n.disableRowClick ? void 0 : (p,
|
|
3740
|
-
a("click:row",
|
|
3741
|
-
}),
|
|
3745
|
+
}, C = x(() => n.disableRowClick ? void 0 : (p, g) => {
|
|
3746
|
+
a("click:row", g);
|
|
3747
|
+
}), I = (p) => {
|
|
3742
3748
|
a("sort", p);
|
|
3743
3749
|
}, { setTablePreferences: U, getTablePreferences: b } = ya(), D = x(() => {
|
|
3744
3750
|
const p = b(n.preferencesStorageKey);
|
|
@@ -3749,47 +3755,47 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3749
3755
|
}), v = (p) => {
|
|
3750
3756
|
n.preferencesStorageKey && U(n.preferencesStorageKey, p);
|
|
3751
3757
|
};
|
|
3752
|
-
return (p,
|
|
3753
|
-
const
|
|
3754
|
-
return
|
|
3758
|
+
return (p, g) => {
|
|
3759
|
+
const _ = B("KIcon"), q = B("KButton"), j = B("KDropdown"), P = B("KTable"), M = B("KCard");
|
|
3760
|
+
return y(), V(M, {
|
|
3755
3761
|
class: "kong-ui-entity-base-table",
|
|
3756
3762
|
title: e.title
|
|
3757
3763
|
}, {
|
|
3758
3764
|
default: k(() => [
|
|
3759
3765
|
A(P, {
|
|
3760
3766
|
ref_key: "tableRefs",
|
|
3761
|
-
ref:
|
|
3767
|
+
ref: s,
|
|
3762
3768
|
"cache-identifier": o.value,
|
|
3763
3769
|
"cell-attrs": h,
|
|
3764
3770
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3765
3771
|
"disable-sorting": e.disableSorting,
|
|
3766
|
-
"empty-state-action-message": e.query ?
|
|
3772
|
+
"empty-state-action-message": e.query ? m(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3767
3773
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3768
3774
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3769
|
-
"empty-state-message": e.query ?
|
|
3770
|
-
"empty-state-title": e.query ?
|
|
3775
|
+
"empty-state-message": e.query ? m(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3776
|
+
"empty-state-title": e.query ? m(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3771
3777
|
"enable-client-sort": e.enableClientSort,
|
|
3772
3778
|
"error-state-message": r.value.message,
|
|
3773
3779
|
"error-state-title": r.value.title,
|
|
3774
3780
|
fetcher: e.fetcher,
|
|
3775
3781
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3776
3782
|
"has-error": r.value.hasError,
|
|
3777
|
-
headers:
|
|
3783
|
+
headers: c.value,
|
|
3778
3784
|
"hide-pagination-when-optional": "",
|
|
3779
3785
|
"initial-fetcher-params": D.value,
|
|
3780
3786
|
"is-loading": e.isLoading,
|
|
3781
3787
|
"pagination-type": e.paginationType,
|
|
3782
|
-
"row-attrs":
|
|
3788
|
+
"row-attrs": d,
|
|
3783
3789
|
"search-input": e.query,
|
|
3784
|
-
onKtableEmptyStateCtaClicked:
|
|
3790
|
+
onKtableEmptyStateCtaClicked: f,
|
|
3785
3791
|
"onRow:click": C.value,
|
|
3786
|
-
onSort:
|
|
3792
|
+
onSort: g[0] || (g[0] = (K) => I(K)),
|
|
3787
3793
|
"onUpdate:tablePreferences": v
|
|
3788
3794
|
}, $e({
|
|
3789
3795
|
toolbar: k(({ state: K }) => [
|
|
3790
3796
|
be(L("div", hl, [
|
|
3791
3797
|
ee(p.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3792
|
-
p.$slots["toolbar-button"] ? (
|
|
3798
|
+
p.$slots["toolbar-button"] ? (y(), O("div", vl, [
|
|
3793
3799
|
ee(p.$slots, "toolbar-button", {}, void 0, !0)
|
|
3794
3800
|
])) : J("", !0)
|
|
3795
3801
|
], 512), [
|
|
@@ -3819,8 +3825,8 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3819
3825
|
size: "small"
|
|
3820
3826
|
}, {
|
|
3821
3827
|
icon: k(() => [
|
|
3822
|
-
A(
|
|
3823
|
-
color:
|
|
3828
|
+
A(_, {
|
|
3829
|
+
color: m(Da),
|
|
3824
3830
|
icon: "more",
|
|
3825
3831
|
size: "16"
|
|
3826
3832
|
}, null, 8, ["color"])
|
|
@@ -3839,7 +3845,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3839
3845
|
fn: k(({ row: W, rowKey: ce, rowValue: ue }) => [
|
|
3840
3846
|
A(gl, {
|
|
3841
3847
|
"key-name": String(z),
|
|
3842
|
-
"row-el":
|
|
3848
|
+
"row-el": u(W)
|
|
3843
3849
|
}, {
|
|
3844
3850
|
default: k(() => [
|
|
3845
3851
|
ee(p.$slots, z, {
|
|
@@ -3857,7 +3863,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3857
3863
|
e.query ? void 0 : {
|
|
3858
3864
|
name: "empty-state-action-icon",
|
|
3859
3865
|
fn: k(() => [
|
|
3860
|
-
A(
|
|
3866
|
+
A(m(Uo))
|
|
3861
3867
|
]),
|
|
3862
3868
|
key: "0"
|
|
3863
3869
|
}
|
|
@@ -3873,7 +3879,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3873
3879
|
}, Sl = {
|
|
3874
3880
|
key: 1,
|
|
3875
3881
|
class: "description"
|
|
3876
|
-
},
|
|
3882
|
+
}, _l = /* @__PURE__ */ X({
|
|
3877
3883
|
__name: "EntityDeleteModal",
|
|
3878
3884
|
props: {
|
|
3879
3885
|
visible: {
|
|
@@ -3917,9 +3923,9 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3917
3923
|
}, l = () => {
|
|
3918
3924
|
i("proceed");
|
|
3919
3925
|
};
|
|
3920
|
-
return (
|
|
3921
|
-
const
|
|
3922
|
-
return
|
|
3926
|
+
return (c, d) => {
|
|
3927
|
+
const s = B("KAlert"), u = B("KPrompt");
|
|
3928
|
+
return y(), V(u, {
|
|
3923
3929
|
"action-button-appearance": "danger",
|
|
3924
3930
|
"action-button-disabled": e.actionPending,
|
|
3925
3931
|
"action-button-text": "Yes, delete",
|
|
@@ -3931,15 +3937,15 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3931
3937
|
onProceed: l
|
|
3932
3938
|
}, {
|
|
3933
3939
|
default: k(() => [
|
|
3934
|
-
e.error ? (
|
|
3935
|
-
A(
|
|
3940
|
+
e.error ? (y(), O("div", Cl, [
|
|
3941
|
+
A(s, { appearance: "danger" }, {
|
|
3936
3942
|
default: k(() => [
|
|
3937
3943
|
G(N(e.error), 1)
|
|
3938
3944
|
]),
|
|
3939
3945
|
_: 1
|
|
3940
3946
|
})
|
|
3941
3947
|
])) : J("", !0),
|
|
3942
|
-
A(
|
|
3948
|
+
A(m(n), {
|
|
3943
3949
|
class: "message",
|
|
3944
3950
|
keypath: a.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3945
3951
|
tag: "p"
|
|
@@ -3957,8 +3963,8 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3957
3963
|
key: "0"
|
|
3958
3964
|
} : void 0
|
|
3959
3965
|
]), 1032, ["keypath"]),
|
|
3960
|
-
a.description ||
|
|
3961
|
-
ee(
|
|
3966
|
+
a.description || c.$slots.description ? (y(), O("div", Sl, [
|
|
3967
|
+
ee(c.$slots, "description", {}, () => [
|
|
3962
3968
|
L("p", null, N(a.description), 1)
|
|
3963
3969
|
], !0)
|
|
3964
3970
|
])) : J("", !0)
|
|
@@ -3967,7 +3973,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3967
3973
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3968
3974
|
};
|
|
3969
3975
|
}
|
|
3970
|
-
}),
|
|
3976
|
+
}), Il = /* @__PURE__ */ he(_l, [["__scopeId", "data-v-4361d622"]]), xl = {
|
|
3971
3977
|
fill: "none",
|
|
3972
3978
|
height: "20",
|
|
3973
3979
|
viewBox: "0 0 20 20",
|
|
@@ -3990,7 +3996,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
3990
3996
|
}
|
|
3991
3997
|
},
|
|
3992
3998
|
setup(e) {
|
|
3993
|
-
return (t, n) => (
|
|
3999
|
+
return (t, n) => (y(), O("svg", xl, [
|
|
3994
4000
|
L("mask", Al, [
|
|
3995
4001
|
L("rect", {
|
|
3996
4002
|
fill: e.color,
|
|
@@ -4029,12 +4035,12 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4029
4035
|
},
|
|
4030
4036
|
emits: ["update:modelValue"],
|
|
4031
4037
|
setup(e, { emit: t }) {
|
|
4032
|
-
const { i18n: { t: n } } = ie.useI18n(), a = e, i = t, r = E(!1), o = E({}), l = E(/* @__PURE__ */ new Set()),
|
|
4038
|
+
const { i18n: { t: n } } = ie.useI18n(), a = e, i = t, r = E(!1), o = E({}), l = E(/* @__PURE__ */ new Set()), c = x(() => {
|
|
4033
4039
|
const v = [];
|
|
4034
|
-
return new URLSearchParams(a.modelValue).forEach((p,
|
|
4035
|
-
p !== "" && v.push(
|
|
4040
|
+
return new URLSearchParams(a.modelValue).forEach((p, g) => {
|
|
4041
|
+
p !== "" && v.push(g);
|
|
4036
4042
|
}), v;
|
|
4037
|
-
}),
|
|
4043
|
+
}), d = x(() => {
|
|
4038
4044
|
const v = a.config.fields;
|
|
4039
4045
|
return Object.keys(v).filter((p) => v[p].searchable).map((p) => ({
|
|
4040
4046
|
label: v[p].label || p,
|
|
@@ -4043,27 +4049,27 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4043
4049
|
}));
|
|
4044
4050
|
});
|
|
4045
4051
|
ge(() => a.modelValue, (v) => {
|
|
4046
|
-
o.value = {}, new URLSearchParams(v).forEach((p,
|
|
4047
|
-
o.value[
|
|
4052
|
+
o.value = {}, new URLSearchParams(v).forEach((p, g) => {
|
|
4053
|
+
o.value[g] = p;
|
|
4048
4054
|
});
|
|
4049
4055
|
});
|
|
4050
|
-
const
|
|
4056
|
+
const s = () => {
|
|
4051
4057
|
r.value = !r.value;
|
|
4052
|
-
},
|
|
4058
|
+
}, u = (v) => {
|
|
4053
4059
|
l.value.has(v) ? l.value.delete(v) : l.value.add(v);
|
|
4054
4060
|
}, h = (v) => {
|
|
4055
4061
|
i("update:modelValue", v);
|
|
4056
|
-
},
|
|
4062
|
+
}, f = () => {
|
|
4057
4063
|
h("");
|
|
4058
|
-
},
|
|
4059
|
-
var p,
|
|
4060
|
-
return (((
|
|
4061
|
-
value:
|
|
4062
|
-
label:
|
|
4064
|
+
}, S = (v) => `filter-${v}`, C = (v) => {
|
|
4065
|
+
var p, g;
|
|
4066
|
+
return (((g = (p = a.config.schema) == null ? void 0 : p[v]) == null ? void 0 : g.values) ?? []).map((_) => ({
|
|
4067
|
+
value: _,
|
|
4068
|
+
label: _
|
|
4063
4069
|
}));
|
|
4064
|
-
},
|
|
4065
|
-
var p,
|
|
4066
|
-
return ((
|
|
4070
|
+
}, I = (v) => {
|
|
4071
|
+
var p, g;
|
|
4072
|
+
return ((g = (p = a.config.schema) == null ? void 0 : p[v]) == null ? void 0 : g.type) ?? "text";
|
|
4067
4073
|
}, U = (v) => {
|
|
4068
4074
|
o.value = {
|
|
4069
4075
|
...o.value,
|
|
@@ -4072,12 +4078,12 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4072
4078
|
}, b = () => {
|
|
4073
4079
|
o.value = {}, D(!0);
|
|
4074
4080
|
}, D = (v = !1) => {
|
|
4075
|
-
const p = Object.keys(o.value).reduce((
|
|
4081
|
+
const p = Object.keys(o.value).reduce((g, _) => (o.value[_] && (g[_] = `${o.value[_]}`), g), {});
|
|
4076
4082
|
v && (r.value = !1), i("update:modelValue", new URLSearchParams(p).toString());
|
|
4077
4083
|
};
|
|
4078
4084
|
return (v, p) => {
|
|
4079
|
-
const
|
|
4080
|
-
return e.config.isExactMatch ? (
|
|
4085
|
+
const g = B("KInput"), _ = B("KButton"), q = B("KSelect");
|
|
4086
|
+
return e.config.isExactMatch ? (y(), V(g, {
|
|
4081
4087
|
key: 0,
|
|
4082
4088
|
autocomplete: "off",
|
|
4083
4089
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4090,100 +4096,100 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4090
4096
|
A(Zt)
|
|
4091
4097
|
]),
|
|
4092
4098
|
after: k(() => [
|
|
4093
|
-
be(A(
|
|
4099
|
+
be(A(m(il), {
|
|
4094
4100
|
class: "kong-ui-entity-filter-clear",
|
|
4095
|
-
onClick:
|
|
4101
|
+
onClick: f
|
|
4096
4102
|
}, null, 512), [
|
|
4097
4103
|
[we, e.modelValue !== ""]
|
|
4098
4104
|
])
|
|
4099
4105
|
]),
|
|
4100
4106
|
_: 1
|
|
4101
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4102
|
-
A(
|
|
4107
|
+
}, 8, ["model-value", "placeholder"])) : (y(), O("div", Ol, [
|
|
4108
|
+
A(_, {
|
|
4103
4109
|
appearance: "tertiary",
|
|
4104
4110
|
"data-testid": "filter-button",
|
|
4105
|
-
onClick:
|
|
4111
|
+
onClick: s
|
|
4106
4112
|
}, {
|
|
4107
4113
|
default: k(() => [
|
|
4108
4114
|
A(Zt),
|
|
4109
|
-
G(" " + N(
|
|
4115
|
+
G(" " + N(m(n)("filter.filterButtonText")) + " " + N(c.value.length > 0 ? `(${c.value.length})` : ""), 1)
|
|
4110
4116
|
]),
|
|
4111
4117
|
_: 1
|
|
4112
4118
|
}),
|
|
4113
4119
|
be(L("div", {
|
|
4114
4120
|
class: "kong-ui-entity-filter-backdrop",
|
|
4115
|
-
onClick:
|
|
4121
|
+
onClick: s
|
|
4116
4122
|
}, null, 512), [
|
|
4117
4123
|
[we, r.value]
|
|
4118
4124
|
]),
|
|
4119
4125
|
be(L("div", Kl, [
|
|
4120
|
-
(
|
|
4126
|
+
(y(!0), O(ye, null, pe(d.value, (j) => {
|
|
4121
4127
|
var P, M;
|
|
4122
|
-
return
|
|
4128
|
+
return y(), O("div", {
|
|
4123
4129
|
key: j.value,
|
|
4124
4130
|
class: "kong-ui-entity-filter-menu-item",
|
|
4125
4131
|
"data-testid": j.value
|
|
4126
4132
|
}, [
|
|
4127
4133
|
L("span", {
|
|
4128
|
-
class:
|
|
4134
|
+
class: _e(["menu-item-title", { expanded: l.value.has(j.value) }]),
|
|
4129
4135
|
role: "button",
|
|
4130
4136
|
tabindex: "0",
|
|
4131
|
-
onClick: (K) =>
|
|
4132
|
-
onKeydown: aa((K) =>
|
|
4137
|
+
onClick: (K) => u(j.value),
|
|
4138
|
+
onKeydown: aa((K) => u(j.value), ["enter"])
|
|
4133
4139
|
}, [
|
|
4134
4140
|
G(N(j.label) + " ", 1),
|
|
4135
4141
|
be(L("span", Nl, null, 512), [
|
|
4136
|
-
[we,
|
|
4142
|
+
[we, c.value.includes(j.value)]
|
|
4137
4143
|
]),
|
|
4138
|
-
A(
|
|
4139
|
-
class:
|
|
4140
|
-
color:
|
|
4144
|
+
A(m(Qo), {
|
|
4145
|
+
class: _e(["menu-item-expand-icon", { expanded: l.value.has(j.value) }]),
|
|
4146
|
+
color: m(za)
|
|
4141
4147
|
}, null, 8, ["class", "color"])
|
|
4142
4148
|
], 42, El),
|
|
4143
4149
|
be(L("div", Fl, [
|
|
4144
4150
|
L("label", {
|
|
4145
4151
|
class: "menu-item-label",
|
|
4146
|
-
for:
|
|
4147
|
-
}, N(
|
|
4148
|
-
((M = (P = e.config.schema) == null ? void 0 : P[j.value]) == null ? void 0 : M.type) === "select" ? (
|
|
4152
|
+
for: S(j.value)
|
|
4153
|
+
}, N(m(n)("filter.fieldLabel")), 9, ql),
|
|
4154
|
+
((M = (P = e.config.schema) == null ? void 0 : P[j.value]) == null ? void 0 : M.type) === "select" ? (y(), V(q, {
|
|
4149
4155
|
key: 0,
|
|
4150
|
-
id:
|
|
4156
|
+
id: S(j.value),
|
|
4151
4157
|
modelValue: o.value[j.value],
|
|
4152
4158
|
"onUpdate:modelValue": (K) => o.value[j.value] = K,
|
|
4153
4159
|
items: C(j.value),
|
|
4154
|
-
placeholder:
|
|
4155
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4160
|
+
placeholder: m(n)("filter.selectPlaceholder")
|
|
4161
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (y(), V(g, {
|
|
4156
4162
|
key: 1,
|
|
4157
|
-
id:
|
|
4163
|
+
id: S(j.value),
|
|
4158
4164
|
modelValue: o.value[j.value],
|
|
4159
4165
|
"onUpdate:modelValue": (K) => o.value[j.value] = K,
|
|
4160
4166
|
autocomplete: "off",
|
|
4161
|
-
placeholder:
|
|
4162
|
-
type:
|
|
4167
|
+
placeholder: m(n)("filter.inputPlaceholder"),
|
|
4168
|
+
type: I(j.value)
|
|
4163
4169
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4164
4170
|
], 512), [
|
|
4165
4171
|
[we, l.value.has(j.value)]
|
|
4166
4172
|
]),
|
|
4167
4173
|
be(L("div", Ll, [
|
|
4168
|
-
A(
|
|
4174
|
+
A(_, {
|
|
4169
4175
|
appearance: "tertiary",
|
|
4170
4176
|
"data-testid": "apply-filter",
|
|
4171
4177
|
size: "small",
|
|
4172
4178
|
onClick: p[0] || (p[0] = (K) => D(!0))
|
|
4173
4179
|
}, {
|
|
4174
4180
|
default: k(() => [
|
|
4175
|
-
G(N(
|
|
4181
|
+
G(N(m(n)("filter.applyButtonText")), 1)
|
|
4176
4182
|
]),
|
|
4177
4183
|
_: 1
|
|
4178
4184
|
}),
|
|
4179
|
-
A(
|
|
4185
|
+
A(_, {
|
|
4180
4186
|
appearance: "tertiary",
|
|
4181
4187
|
"data-testid": "clear-filter",
|
|
4182
4188
|
size: "small",
|
|
4183
4189
|
onClick: (K) => U(j.value)
|
|
4184
4190
|
}, {
|
|
4185
4191
|
default: k(() => [
|
|
4186
|
-
G(N(
|
|
4192
|
+
G(N(m(n)("filter.clearButtonText")), 1)
|
|
4187
4193
|
]),
|
|
4188
4194
|
_: 2
|
|
4189
4195
|
}, 1032, ["onClick"])
|
|
@@ -4193,13 +4199,13 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4193
4199
|
], 8, Ml);
|
|
4194
4200
|
}), 128)),
|
|
4195
4201
|
L("div", Bl, [
|
|
4196
|
-
A(
|
|
4202
|
+
A(_, {
|
|
4197
4203
|
appearance: "tertiary",
|
|
4198
4204
|
size: "small",
|
|
4199
4205
|
onClick: b
|
|
4200
4206
|
}, {
|
|
4201
4207
|
default: k(() => [
|
|
4202
|
-
G(N(
|
|
4208
|
+
G(N(m(n)("filter.clearAllButtonText")), 1)
|
|
4203
4209
|
]),
|
|
4204
4210
|
_: 1
|
|
4205
4211
|
})
|
|
@@ -4275,21 +4281,21 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4275
4281
|
},
|
|
4276
4282
|
setup(e) {
|
|
4277
4283
|
const t = mt();
|
|
4278
|
-
return (n, a) => (
|
|
4279
|
-
class:
|
|
4284
|
+
return (n, a) => (y(), O("fieldset", {
|
|
4285
|
+
class: _e(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4280
4286
|
}, [
|
|
4281
4287
|
L("div", Vl, [
|
|
4282
|
-
e.hideInfoHeader ? J("", !0) : (
|
|
4288
|
+
e.hideInfoHeader ? J("", !0) : (y(), O("div", {
|
|
4283
4289
|
key: 0,
|
|
4284
|
-
class:
|
|
4290
|
+
class: _e(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4285
4291
|
}, [
|
|
4286
|
-
e.title ? (
|
|
4287
|
-
e.description ||
|
|
4292
|
+
e.title ? (y(), O("h4", Pl, N(e.title), 1)) : J("", !0),
|
|
4293
|
+
e.description || m(t).description ? (y(), O("div", Dl, [
|
|
4288
4294
|
ee(n.$slots, "description", {}, () => [
|
|
4289
4295
|
L("p", null, N(e.description), 1)
|
|
4290
4296
|
], !0)
|
|
4291
4297
|
])) : J("", !0),
|
|
4292
|
-
|
|
4298
|
+
m(t).footer ? (y(), O("div", zl, [
|
|
4293
4299
|
ee(n.$slots, "footer", {}, void 0, !0)
|
|
4294
4300
|
])) : J("", !0)
|
|
4295
4301
|
], 2)),
|
|
@@ -4348,36 +4354,36 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4348
4354
|
var ze;
|
|
4349
4355
|
const n = t, a = e, { i18n: { t: i } } = ht.useI18n(), r = gt(), { axiosInstance: o } = xt({
|
|
4350
4356
|
headers: (ze = a.config) == null ? void 0 : ze.requestHeaders
|
|
4351
|
-
}), l = E(1),
|
|
4357
|
+
}), l = E(1), c = x(() => a.config.app !== "kongManager" || !!a.config.disableSorting), d = {
|
|
4352
4358
|
name: { label: i("keys.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4353
4359
|
kid: { label: i("keys.list.table_headers.key_id"), sortable: !0 },
|
|
4354
4360
|
tags: { label: i("keys.list.table_headers.tags") },
|
|
4355
4361
|
id: { label: i("keys.list.table_headers.id"), sortable: !0 }
|
|
4356
|
-
},
|
|
4362
|
+
}, s = d, u = x(() => {
|
|
4357
4363
|
var w, T, H, te;
|
|
4358
4364
|
let F = `${a.config.apiBaseUrl}${Ce.list[a.config.app][a.config.keySetId ? "forKeySet" : "all"]}`;
|
|
4359
4365
|
return a.config.app === "konnect" ? F = F.replace(/{controlPlaneId}/gi, ((w = a.config) == null ? void 0 : w.controlPlaneId) || "").replace(/{keySetId}/gi, ((T = a.config) == null ? void 0 : T.keySetId) || "") : a.config.app === "kongManager" && (F = F.replace(/\/{workspace}/gi, (H = a.config) != null && H.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, ((te = a.config) == null ? void 0 : te.keySetId) || "")), F;
|
|
4360
|
-
}), h = E(""),
|
|
4366
|
+
}), h = E(""), f = x(() => {
|
|
4361
4367
|
const F = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4362
4368
|
if (F)
|
|
4363
4369
|
return {
|
|
4364
4370
|
isExactMatch: F,
|
|
4365
4371
|
placeholder: i("keys.search.placeholder")
|
|
4366
4372
|
};
|
|
4367
|
-
const w = { name:
|
|
4373
|
+
const w = { name: d.name };
|
|
4368
4374
|
return {
|
|
4369
4375
|
isExactMatch: F,
|
|
4370
4376
|
fields: w,
|
|
4371
4377
|
schema: a.config.filterSchema
|
|
4372
4378
|
};
|
|
4373
|
-
}), { fetcher:
|
|
4379
|
+
}), { fetcher: S, fetcherState: C } = Zl(a.config, u.value), I = () => {
|
|
4374
4380
|
h.value = "";
|
|
4375
4381
|
}, U = () => {
|
|
4376
4382
|
l.value++;
|
|
4377
4383
|
}, b = E(null), D = (F, w) => {
|
|
4378
4384
|
const T = F.id;
|
|
4379
4385
|
if (!w(T)) {
|
|
4380
|
-
|
|
4386
|
+
g(F, "id");
|
|
4381
4387
|
return;
|
|
4382
4388
|
}
|
|
4383
4389
|
p(F, "id");
|
|
@@ -4400,13 +4406,13 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4400
4406
|
field: w,
|
|
4401
4407
|
message: i("keys.copy.success", { val: F[w] })
|
|
4402
4408
|
});
|
|
4403
|
-
},
|
|
4409
|
+
}, g = (F, w) => {
|
|
4404
4410
|
n("copy:error", {
|
|
4405
4411
|
entity: F,
|
|
4406
4412
|
field: w,
|
|
4407
4413
|
message: i("keys.errors.copy")
|
|
4408
4414
|
});
|
|
4409
|
-
},
|
|
4415
|
+
}, _ = async (F) => {
|
|
4410
4416
|
var T;
|
|
4411
4417
|
await ((T = a.canRetrieve) == null ? void 0 : T.call(a, F)) && r.push(a.config.getViewRoute(F.id));
|
|
4412
4418
|
}, q = (F) => ({
|
|
@@ -4415,7 +4421,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4415
4421
|
}), j = (F) => ({
|
|
4416
4422
|
label: i("keys.actions.edit"),
|
|
4417
4423
|
to: a.config.getEditRoute(F)
|
|
4418
|
-
}), P = E(void 0), M = E(!1), K = E(!1), z = E(""), W = Wl(a.config,
|
|
4424
|
+
}), P = E(void 0), M = E(!1), K = E(!1), z = E(""), W = Wl(a.config, u.value), ce = (F) => {
|
|
4419
4425
|
P.value = F, M.value = !0;
|
|
4420
4426
|
}, ue = () => {
|
|
4421
4427
|
M.value = !1;
|
|
@@ -4452,38 +4458,38 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4452
4458
|
await a.canCreate() && (Me.value.title = i("keys.list.empty_state.title"), Me.value.ctaText = i("keys.actions.create"));
|
|
4453
4459
|
}), (F, w) => {
|
|
4454
4460
|
const T = B("KButton"), H = B("KCopy"), te = B("KBadge"), me = B("KTruncate"), R = B("KDropdownItem"), Y = B("KClipboardProvider");
|
|
4455
|
-
return
|
|
4456
|
-
A(
|
|
4461
|
+
return y(), O("div", Xl, [
|
|
4462
|
+
A(m(wl), {
|
|
4457
4463
|
"cache-identifier": e.cacheIdentifier,
|
|
4458
4464
|
"disable-pagination-page-jump": "",
|
|
4459
|
-
"disable-sorting":
|
|
4465
|
+
"disable-sorting": c.value,
|
|
4460
4466
|
"empty-state-options": Me.value,
|
|
4461
4467
|
"enable-entity-actions": "",
|
|
4462
4468
|
"error-message": b.value,
|
|
4463
|
-
fetcher:
|
|
4469
|
+
fetcher: m(S),
|
|
4464
4470
|
"fetcher-cache-key": l.value,
|
|
4465
4471
|
"pagination-type": "offset",
|
|
4466
4472
|
"preferences-storage-key": "kong-ui-entities-keys-list",
|
|
4467
4473
|
query: h.value,
|
|
4468
|
-
"table-headers":
|
|
4474
|
+
"table-headers": m(s),
|
|
4469
4475
|
"use-action-outside": e.useActionOutside,
|
|
4470
|
-
onClearSearchInput:
|
|
4471
|
-
"onClick:row": w[2] || (w[2] = (Q) =>
|
|
4476
|
+
onClearSearchInput: I,
|
|
4477
|
+
"onClick:row": w[2] || (w[2] = (Q) => _(Q)),
|
|
4472
4478
|
onSort: U
|
|
4473
4479
|
}, {
|
|
4474
4480
|
"toolbar-filter": k(() => [
|
|
4475
|
-
A(
|
|
4481
|
+
A(m(Rl), {
|
|
4476
4482
|
modelValue: h.value,
|
|
4477
4483
|
"onUpdate:modelValue": w[0] || (w[0] = (Q) => h.value = Q),
|
|
4478
|
-
config:
|
|
4484
|
+
config: f.value
|
|
4479
4485
|
}, null, 8, ["modelValue", "config"])
|
|
4480
4486
|
]),
|
|
4481
4487
|
"toolbar-button": k(() => [
|
|
4482
|
-
(
|
|
4488
|
+
(y(), V(Oe(e.useActionOutside ? "Teleport" : "div"), {
|
|
4483
4489
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4484
4490
|
}, {
|
|
4485
4491
|
default: k(() => [
|
|
4486
|
-
A(
|
|
4492
|
+
A(m(Je), {
|
|
4487
4493
|
"auth-function": () => e.canCreate()
|
|
4488
4494
|
}, {
|
|
4489
4495
|
default: k(() => [
|
|
@@ -4495,7 +4501,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4495
4501
|
to: e.config.createRoute
|
|
4496
4502
|
}, {
|
|
4497
4503
|
default: k(() => [
|
|
4498
|
-
G(N(
|
|
4504
|
+
G(N(m(i)("keys.list.toolbar_actions.new_key")), 1)
|
|
4499
4505
|
]),
|
|
4500
4506
|
_: 1
|
|
4501
4507
|
}, 8, ["to"]), [
|
|
@@ -4515,9 +4521,9 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4515
4521
|
A(H, { text: Q }, null, 8, ["text"])
|
|
4516
4522
|
]),
|
|
4517
4523
|
tags: k(({ rowValue: Q }) => [
|
|
4518
|
-
(Q == null ? void 0 : Q.length) > 0 ? (
|
|
4524
|
+
(Q == null ? void 0 : Q.length) > 0 ? (y(), V(me, { key: 0 }, {
|
|
4519
4525
|
default: k(() => [
|
|
4520
|
-
(
|
|
4526
|
+
(y(!0), O(ye, null, pe(Q, (Ae) => (y(), V(te, {
|
|
4521
4527
|
key: Ae,
|
|
4522
4528
|
onClick: w[1] || (w[1] = ct(() => {
|
|
4523
4529
|
}, ["stop"]))
|
|
@@ -4529,7 +4535,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4529
4535
|
}, 1024))), 128))
|
|
4530
4536
|
]),
|
|
4531
4537
|
_: 2
|
|
4532
|
-
}, 1024)) : (
|
|
4538
|
+
}, 1024)) : (y(), O("span", es, "-"))
|
|
4533
4539
|
]),
|
|
4534
4540
|
id: k(({ rowValue: Q }) => [
|
|
4535
4541
|
A(H, {
|
|
@@ -4545,7 +4551,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4545
4551
|
onClick: (Xn) => D(Q, Ae)
|
|
4546
4552
|
}, {
|
|
4547
4553
|
default: k(() => [
|
|
4548
|
-
G(N(
|
|
4554
|
+
G(N(m(i)("keys.actions.copy_id")), 1)
|
|
4549
4555
|
]),
|
|
4550
4556
|
_: 2
|
|
4551
4557
|
}, 1032, ["onClick"])
|
|
@@ -4559,14 +4565,14 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4559
4565
|
onClick: (Xn) => v(Q, Ae)
|
|
4560
4566
|
}, {
|
|
4561
4567
|
default: k(() => [
|
|
4562
|
-
G(N(
|
|
4568
|
+
G(N(m(i)("keys.actions.copy_json")), 1)
|
|
4563
4569
|
]),
|
|
4564
4570
|
_: 2
|
|
4565
4571
|
}, 1032, ["onClick"])
|
|
4566
4572
|
]),
|
|
4567
4573
|
_: 2
|
|
4568
4574
|
}, 1024),
|
|
4569
|
-
A(
|
|
4575
|
+
A(m(Je), {
|
|
4570
4576
|
"auth-function": () => e.canRetrieve(Q)
|
|
4571
4577
|
}, {
|
|
4572
4578
|
default: k(() => [
|
|
@@ -4578,7 +4584,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4578
4584
|
]),
|
|
4579
4585
|
_: 2
|
|
4580
4586
|
}, 1032, ["auth-function"]),
|
|
4581
|
-
A(
|
|
4587
|
+
A(m(Je), {
|
|
4582
4588
|
"auth-function": () => e.canEdit(Q)
|
|
4583
4589
|
}, {
|
|
4584
4590
|
default: k(() => [
|
|
@@ -4589,7 +4595,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4589
4595
|
]),
|
|
4590
4596
|
_: 2
|
|
4591
4597
|
}, 1032, ["auth-function"]),
|
|
4592
|
-
A(
|
|
4598
|
+
A(m(Je), {
|
|
4593
4599
|
"auth-function": () => e.canDelete(Q)
|
|
4594
4600
|
}, {
|
|
4595
4601
|
default: k(() => [
|
|
@@ -4600,7 +4606,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4600
4606
|
onClick: (Ae) => ce(Q)
|
|
4601
4607
|
}, {
|
|
4602
4608
|
default: k(() => [
|
|
4603
|
-
G(N(
|
|
4609
|
+
G(N(m(i)("keys.actions.delete")), 1)
|
|
4604
4610
|
]),
|
|
4605
4611
|
_: 2
|
|
4606
4612
|
}, 1032, ["onClick"])
|
|
@@ -4610,14 +4616,14 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4610
4616
|
]),
|
|
4611
4617
|
_: 1
|
|
4612
4618
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4613
|
-
A(
|
|
4619
|
+
A(m(Il), {
|
|
4614
4620
|
"action-pending": K.value,
|
|
4615
|
-
description:
|
|
4621
|
+
description: m(i)("keys.delete.description"),
|
|
4616
4622
|
"entity-name": P.value && (P.value.name || P.value.id),
|
|
4617
|
-
"entity-type":
|
|
4623
|
+
"entity-type": m(tn).Key,
|
|
4618
4624
|
error: z.value,
|
|
4619
4625
|
"need-confirm": !1,
|
|
4620
|
-
title:
|
|
4626
|
+
title: m(i)("keys.delete.title"),
|
|
4621
4627
|
visible: M.value,
|
|
4622
4628
|
onCancel: ue,
|
|
4623
4629
|
onProceed: fe
|
|
@@ -4667,7 +4673,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4667
4673
|
var F;
|
|
4668
4674
|
const n = t, a = e, i = gt(), { i18n: { t: r } } = ht.useI18n(), { getMessageFromError: o } = Yl(), { axiosInstance: l } = xt({
|
|
4669
4675
|
headers: (F = a.config) == null ? void 0 : F.requestHeaders
|
|
4670
|
-
}),
|
|
4676
|
+
}), c = x(() => a.keySetId ? Ce.form[a.config.app].edit.forKeySet.replace(/{keySetId}/gi, a.keySetId) : Ce.form[a.config.app].edit.all), d = x(() => a.keyId ? Be.Edit : Be.Create), s = At({
|
|
4671
4677
|
fields: {
|
|
4672
4678
|
name: "",
|
|
4673
4679
|
tags: "",
|
|
@@ -4680,7 +4686,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4680
4686
|
},
|
|
4681
4687
|
isReadonly: !1,
|
|
4682
4688
|
errorMessage: ""
|
|
4683
|
-
}),
|
|
4689
|
+
}), u = At({
|
|
4684
4690
|
name: "",
|
|
4685
4691
|
tags: "",
|
|
4686
4692
|
key_id: "",
|
|
@@ -4698,47 +4704,47 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4698
4704
|
label: r("keys.form.fields.key_format.options.pem"),
|
|
4699
4705
|
value: "pem"
|
|
4700
4706
|
}
|
|
4701
|
-
],
|
|
4707
|
+
], f = x(() => s.isReadonly || d.value === Be.Create && !!a.fixedKeySetId), S = x(() => !f.value);
|
|
4702
4708
|
ge(() => a.fixedKeySetId, (w) => {
|
|
4703
|
-
|
|
4709
|
+
d.value === Be.Create && (s.fields.key_set = w);
|
|
4704
4710
|
}, { immediate: !0 });
|
|
4705
|
-
const C = x(() => JSON.stringify(
|
|
4711
|
+
const C = x(() => JSON.stringify(s.fields) !== JSON.stringify(u) && !!s.fields.key_id && !!s.fields.key_format && (s.fields.key_format === "jwk" && !!s.fields.jwk || s.fields.key_format === "pem" && !!s.fields.private_key && !!s.fields.public_key)), I = (w) => {
|
|
4706
4712
|
var T, H, te, me;
|
|
4707
|
-
|
|
4713
|
+
s.fields.key_id = (w == null ? void 0 : w.kid) || "", s.fields.name = (w == null ? void 0 : w.name) || "", s.fields.tags = ((T = w == null ? void 0 : w.tags) == null ? void 0 : T.join(", ")) || "", s.fields.key_set = ((H = w == null ? void 0 : w.set) == null ? void 0 : H.id) || "", s.fields.key_format = w != null && w.pem ? "pem" : "jwk", s.fields.jwk = (w == null ? void 0 : w.jwk) || "", s.fields.private_key = ((te = w == null ? void 0 : w.pem) == null ? void 0 : te.private_key) || "", s.fields.public_key = ((me = w == null ? void 0 : w.pem) == null ? void 0 : me.public_key) || "", Object.assign(u, s.fields);
|
|
4708
4714
|
}, U = () => {
|
|
4709
4715
|
i.push(a.config.cancelRoute);
|
|
4710
4716
|
}, b = x(() => {
|
|
4711
4717
|
var T, H;
|
|
4712
|
-
let w = `${a.config.apiBaseUrl}${Ce.form[a.config.app][
|
|
4718
|
+
let w = `${a.config.apiBaseUrl}${Ce.form[a.config.app][d.value][a.keySetId ? "forKeySet" : "all"]}`;
|
|
4713
4719
|
return a.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((T = a.config) == null ? void 0 : T.controlPlaneId) || "") : a.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (H = a.config) != null && H.workspace ? `/${a.config.workspace}` : "")), w = w.replace(/{id}/gi, a.keyId).replace(/{keySetId}/gi, a.keySetId || ""), w;
|
|
4714
4720
|
}), D = x(() => {
|
|
4715
4721
|
var w, T, H;
|
|
4716
4722
|
return {
|
|
4717
|
-
kid:
|
|
4718
|
-
name:
|
|
4719
|
-
tags: ((H = (T = (w =
|
|
4720
|
-
set:
|
|
4721
|
-
jwk:
|
|
4722
|
-
pem:
|
|
4723
|
+
kid: s.fields.key_id,
|
|
4724
|
+
name: s.fields.name || null,
|
|
4725
|
+
tags: ((H = (T = (w = s.fields.tags) == null ? void 0 : w.split(",")) == null ? void 0 : T.map((te) => String(te || "").trim())) == null ? void 0 : H.filter((te) => te !== "")) || [],
|
|
4726
|
+
set: s.fields.key_set ? { id: s.fields.key_set } : null,
|
|
4727
|
+
jwk: s.fields.key_format === "jwk" ? s.fields.jwk : null,
|
|
4728
|
+
pem: s.fields.key_format === "pem" ? { private_key: s.fields.private_key, public_key: s.fields.public_key } : null
|
|
4723
4729
|
};
|
|
4724
4730
|
}), v = async () => {
|
|
4725
4731
|
var w, T, H, te, me;
|
|
4726
4732
|
try {
|
|
4727
|
-
|
|
4733
|
+
s.isReadonly = !0;
|
|
4728
4734
|
let R;
|
|
4729
|
-
if (
|
|
4735
|
+
if (d.value === "create" ? R = await l.post(b.value, D.value) : d.value === "edit" && (R = ((w = a.config) == null ? void 0 : w.app) === "konnect" ? await l.put(b.value, D.value) : await l.patch(b.value, D.value)), R) {
|
|
4730
4736
|
const { data: Y } = R;
|
|
4731
|
-
|
|
4737
|
+
s.fields.key_id = (Y == null ? void 0 : Y.kid) || "", s.fields.name = (Y == null ? void 0 : Y.name) || "", s.fields.tags = ((T = Y == null ? void 0 : Y.tags) == null ? void 0 : T.join(", ")) || "", s.fields.key_set = ((H = Y == null ? void 0 : Y.set) == null ? void 0 : H.id) || "", s.fields.key_format = Y != null && Y.pem ? "pem" : "jwk", s.fields.jwk = (Y == null ? void 0 : Y.jwk) || "", s.fields.private_key = ((te = Y == null ? void 0 : Y.pem) == null ? void 0 : te.private_key) || "", s.fields.public_key = ((me = Y == null ? void 0 : Y.pem) == null ? void 0 : me.public_key) || "", Object.assign(u, s.fields), n("update", R == null ? void 0 : R.data);
|
|
4732
4738
|
}
|
|
4733
4739
|
} catch (R) {
|
|
4734
|
-
|
|
4740
|
+
s.errorMessage = o(R), n("error", R);
|
|
4735
4741
|
} finally {
|
|
4736
|
-
|
|
4742
|
+
s.isReadonly = !1;
|
|
4737
4743
|
}
|
|
4738
4744
|
}, {
|
|
4739
4745
|
debouncedQueryChange: p,
|
|
4740
|
-
loading:
|
|
4741
|
-
allRecords:
|
|
4746
|
+
loading: g,
|
|
4747
|
+
allRecords: _,
|
|
4742
4748
|
error: q,
|
|
4743
4749
|
validationError: j,
|
|
4744
4750
|
loadItems: P,
|
|
@@ -4747,8 +4753,8 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4747
4753
|
fetchedItemsKey: "data",
|
|
4748
4754
|
searchKeys: ["id", "name"]
|
|
4749
4755
|
}), K = (w) => {
|
|
4750
|
-
(!w || w !==
|
|
4751
|
-
}, z = x(() => q.value ? r("keys.errors.key_sets.fetch") : ""), W = x(() => j.value ? r("keys.errors.key_sets.invalid") : ""), ce = E(0), ue = x(() =>
|
|
4756
|
+
(!w || w !== s.fields.key_set && w !== u.key_set) && p(w);
|
|
4757
|
+
}, z = x(() => q.value ? r("keys.errors.key_sets.fetch") : ""), W = x(() => j.value ? r("keys.errors.key_sets.invalid") : ""), ce = E(0), ue = x(() => _.value === void 0), fe = x(() => {
|
|
4752
4758
|
if (ue.value)
|
|
4753
4759
|
return a.config.app === "konnect" ? r("keys.form.fields.key_set.footer") : void 0;
|
|
4754
4760
|
}), Ke = E(/* @__PURE__ */ new Set()), Me = x(() => Array.from(Ke.value).map((T) => ({
|
|
@@ -4757,7 +4763,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4757
4763
|
label: "",
|
|
4758
4764
|
// leave it blank so no flicker when used with selected-item-template
|
|
4759
4765
|
value: T.id,
|
|
4760
|
-
selected:
|
|
4766
|
+
selected: s.fields.key_set === T.id
|
|
4761
4767
|
}))), ze = (w) => {
|
|
4762
4768
|
Ke.value.clear();
|
|
4763
4769
|
let T;
|
|
@@ -4772,73 +4778,73 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4772
4778
|
await P();
|
|
4773
4779
|
}), (w, T) => {
|
|
4774
4780
|
const H = B("KInput"), te = B("KSelect"), me = B("KTextArea");
|
|
4775
|
-
return
|
|
4776
|
-
A(
|
|
4781
|
+
return y(), O("div", ns, [
|
|
4782
|
+
A(m(fl), {
|
|
4777
4783
|
"can-submit": C.value,
|
|
4778
4784
|
config: e.config,
|
|
4779
4785
|
"edit-id": e.keyId,
|
|
4780
|
-
"error-message":
|
|
4781
|
-
"fetch-url":
|
|
4786
|
+
"error-message": s.errorMessage || z.value,
|
|
4787
|
+
"fetch-url": c.value,
|
|
4782
4788
|
"form-fields": D.value,
|
|
4783
|
-
"is-readonly":
|
|
4789
|
+
"is-readonly": s.isReadonly,
|
|
4784
4790
|
onCancel: U,
|
|
4785
4791
|
"onFetch:error": T[8] || (T[8] = (R) => w.$emit("error", R)),
|
|
4786
|
-
"onFetch:success":
|
|
4792
|
+
"onFetch:success": I,
|
|
4787
4793
|
onLoading: T[9] || (T[9] = (R) => w.$emit("loading", R)),
|
|
4788
4794
|
onSubmit: v
|
|
4789
4795
|
}, {
|
|
4790
4796
|
default: k(() => [
|
|
4791
|
-
A(
|
|
4792
|
-
description:
|
|
4793
|
-
title:
|
|
4797
|
+
A(m(Gt), {
|
|
4798
|
+
description: m(r)("keys.form.sections.general.description"),
|
|
4799
|
+
title: m(r)("keys.form.sections.general.title")
|
|
4794
4800
|
}, {
|
|
4795
4801
|
default: k(() => [
|
|
4796
4802
|
A(H, {
|
|
4797
|
-
modelValue:
|
|
4798
|
-
"onUpdate:modelValue": T[0] || (T[0] = (R) =>
|
|
4803
|
+
modelValue: s.fields.key_id,
|
|
4804
|
+
"onUpdate:modelValue": T[0] || (T[0] = (R) => s.fields.key_id = R),
|
|
4799
4805
|
modelModifiers: { trim: !0 },
|
|
4800
4806
|
autocomplete: "off",
|
|
4801
4807
|
"data-testid": "key-form-id",
|
|
4802
|
-
help:
|
|
4803
|
-
label:
|
|
4804
|
-
"label-attributes": { info:
|
|
4805
|
-
placeholder:
|
|
4806
|
-
readonly:
|
|
4808
|
+
help: m(r)("keys.form.fields.id.help"),
|
|
4809
|
+
label: m(r)("keys.form.fields.id.label"),
|
|
4810
|
+
"label-attributes": { info: m(r)("keys.form.fields.id.tooltip") },
|
|
4811
|
+
placeholder: m(r)("keys.form.fields.id.placeholder"),
|
|
4812
|
+
readonly: s.isReadonly,
|
|
4807
4813
|
required: "",
|
|
4808
4814
|
type: "text"
|
|
4809
4815
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
4810
4816
|
A(H, {
|
|
4811
|
-
modelValue:
|
|
4812
|
-
"onUpdate:modelValue": T[1] || (T[1] = (R) =>
|
|
4817
|
+
modelValue: s.fields.name,
|
|
4818
|
+
"onUpdate:modelValue": T[1] || (T[1] = (R) => s.fields.name = R),
|
|
4813
4819
|
modelModifiers: { trim: !0 },
|
|
4814
4820
|
autocomplete: "off",
|
|
4815
4821
|
"data-testid": "key-form-name",
|
|
4816
|
-
label:
|
|
4817
|
-
placeholder:
|
|
4818
|
-
readonly:
|
|
4822
|
+
label: m(r)("keys.form.fields.name.label"),
|
|
4823
|
+
placeholder: m(r)("keys.form.fields.name.placeholder"),
|
|
4824
|
+
readonly: s.isReadonly,
|
|
4819
4825
|
type: "text"
|
|
4820
4826
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4821
4827
|
A(te, {
|
|
4822
|
-
modelValue:
|
|
4823
|
-
"onUpdate:modelValue": T[2] || (T[2] = (R) =>
|
|
4824
|
-
clearable:
|
|
4828
|
+
modelValue: s.fields.key_set,
|
|
4829
|
+
"onUpdate:modelValue": T[2] || (T[2] = (R) => s.fields.key_set = R),
|
|
4830
|
+
clearable: S.value,
|
|
4825
4831
|
"data-testid": "key-form-key-set",
|
|
4826
4832
|
"dropdown-footer-text": fe.value,
|
|
4827
4833
|
"enable-filtering": "",
|
|
4828
4834
|
"filter-function": () => !0,
|
|
4829
4835
|
items: Me.value,
|
|
4830
|
-
label:
|
|
4831
|
-
loading:
|
|
4832
|
-
placeholder:
|
|
4833
|
-
readonly:
|
|
4836
|
+
label: m(r)("keys.form.fields.key_set.label"),
|
|
4837
|
+
loading: m(g),
|
|
4838
|
+
placeholder: m(r)("keys.form.fields.key_set.placeholder"),
|
|
4839
|
+
readonly: f.value,
|
|
4834
4840
|
width: "100%",
|
|
4835
4841
|
onQueryChange: K
|
|
4836
4842
|
}, {
|
|
4837
4843
|
loading: k(() => [
|
|
4838
|
-
L("div", null, N(
|
|
4844
|
+
L("div", null, N(m(r)("keys.actions.loading")), 1)
|
|
4839
4845
|
]),
|
|
4840
4846
|
empty: k(() => [
|
|
4841
|
-
L("div", as, N(
|
|
4847
|
+
L("div", as, N(m(r)("keys.search.no_results")), 1)
|
|
4842
4848
|
]),
|
|
4843
4849
|
"selected-item-template": k(({ item: R }) => [
|
|
4844
4850
|
L("div", null, N(R.name), 1)
|
|
@@ -4851,76 +4857,76 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4851
4857
|
]),
|
|
4852
4858
|
_: 1
|
|
4853
4859
|
}, 8, ["modelValue", "clearable", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"]),
|
|
4854
|
-
W.value ? (
|
|
4860
|
+
W.value ? (y(), O("p", ls, N(W.value), 1)) : J("", !0),
|
|
4855
4861
|
A(H, {
|
|
4856
|
-
modelValue:
|
|
4857
|
-
"onUpdate:modelValue": T[3] || (T[3] = (R) =>
|
|
4862
|
+
modelValue: s.fields.tags,
|
|
4863
|
+
"onUpdate:modelValue": T[3] || (T[3] = (R) => s.fields.tags = R),
|
|
4858
4864
|
modelModifiers: { trim: !0 },
|
|
4859
4865
|
autocomplete: "off",
|
|
4860
4866
|
"data-testid": "key-form-tags",
|
|
4861
|
-
help:
|
|
4862
|
-
label:
|
|
4863
|
-
"label-attributes": { info:
|
|
4864
|
-
placeholder:
|
|
4865
|
-
readonly:
|
|
4867
|
+
help: m(r)("keys.form.fields.tags.help"),
|
|
4868
|
+
label: m(r)("keys.form.fields.tags.label"),
|
|
4869
|
+
"label-attributes": { info: m(r)("keys.form.fields.tags.tooltip") },
|
|
4870
|
+
placeholder: m(r)("keys.form.fields.tags.placeholder"),
|
|
4871
|
+
readonly: s.isReadonly,
|
|
4866
4872
|
type: "text"
|
|
4867
4873
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
4868
4874
|
]),
|
|
4869
4875
|
_: 1
|
|
4870
4876
|
}, 8, ["description", "title"]),
|
|
4871
|
-
A(
|
|
4872
|
-
description:
|
|
4877
|
+
A(m(Gt), {
|
|
4878
|
+
description: m(r)("keys.form.sections.keys.description"),
|
|
4873
4879
|
"has-divider": "",
|
|
4874
|
-
title:
|
|
4880
|
+
title: m(r)("keys.form.sections.keys.title")
|
|
4875
4881
|
}, {
|
|
4876
4882
|
default: k(() => [
|
|
4877
4883
|
L("div", ss, [
|
|
4878
4884
|
A(te, {
|
|
4879
|
-
modelValue:
|
|
4880
|
-
"onUpdate:modelValue": T[4] || (T[4] = (R) =>
|
|
4885
|
+
modelValue: s.fields.key_format,
|
|
4886
|
+
"onUpdate:modelValue": T[4] || (T[4] = (R) => s.fields.key_format = R),
|
|
4881
4887
|
"data-testid": "key-form-key-format",
|
|
4882
4888
|
items: h,
|
|
4883
|
-
label:
|
|
4884
|
-
readonly:
|
|
4889
|
+
label: m(r)("keys.form.fields.key_format.label"),
|
|
4890
|
+
readonly: s.isReadonly,
|
|
4885
4891
|
required: "",
|
|
4886
4892
|
width: "100%"
|
|
4887
4893
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
4888
4894
|
]),
|
|
4889
|
-
|
|
4895
|
+
s.fields.key_format === "jwk" ? (y(), V(me, {
|
|
4890
4896
|
key: 0,
|
|
4891
|
-
modelValue:
|
|
4892
|
-
"onUpdate:modelValue": T[5] || (T[5] = (R) =>
|
|
4897
|
+
modelValue: s.fields.jwk,
|
|
4898
|
+
"onUpdate:modelValue": T[5] || (T[5] = (R) => s.fields.jwk = R),
|
|
4893
4899
|
modelModifiers: { trim: !0 },
|
|
4894
4900
|
class: "key-form-textarea",
|
|
4895
4901
|
"data-testid": "key-form-jwk",
|
|
4896
|
-
label:
|
|
4897
|
-
"label-attributes": { info:
|
|
4898
|
-
placeholder:
|
|
4899
|
-
readonly:
|
|
4902
|
+
label: m(r)("keys.form.fields.jwk.label"),
|
|
4903
|
+
"label-attributes": { info: m(r)("keys.form.fields.jwk.tooltip") },
|
|
4904
|
+
placeholder: m(r)("keys.form.fields.jwk.placeholder"),
|
|
4905
|
+
readonly: s.isReadonly,
|
|
4900
4906
|
required: ""
|
|
4901
4907
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])) : J("", !0),
|
|
4902
|
-
|
|
4908
|
+
s.fields.key_format === "pem" ? (y(), V(me, {
|
|
4903
4909
|
key: 1,
|
|
4904
|
-
modelValue:
|
|
4905
|
-
"onUpdate:modelValue": T[6] || (T[6] = (R) =>
|
|
4910
|
+
modelValue: s.fields.private_key,
|
|
4911
|
+
"onUpdate:modelValue": T[6] || (T[6] = (R) => s.fields.private_key = R),
|
|
4906
4912
|
modelModifiers: { trim: !0 },
|
|
4907
4913
|
class: "key-form-textarea",
|
|
4908
4914
|
"data-testid": "key-form-private-key",
|
|
4909
|
-
label:
|
|
4910
|
-
placeholder:
|
|
4911
|
-
readonly:
|
|
4915
|
+
label: m(r)("keys.form.fields.private_key.label"),
|
|
4916
|
+
placeholder: m(r)("keys.form.fields.private_key.placeholder"),
|
|
4917
|
+
readonly: s.isReadonly,
|
|
4912
4918
|
required: ""
|
|
4913
4919
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : J("", !0),
|
|
4914
|
-
|
|
4920
|
+
s.fields.key_format === "pem" ? (y(), V(me, {
|
|
4915
4921
|
key: 2,
|
|
4916
|
-
modelValue:
|
|
4917
|
-
"onUpdate:modelValue": T[7] || (T[7] = (R) =>
|
|
4922
|
+
modelValue: s.fields.public_key,
|
|
4923
|
+
"onUpdate:modelValue": T[7] || (T[7] = (R) => s.fields.public_key = R),
|
|
4918
4924
|
modelModifiers: { trim: !0 },
|
|
4919
4925
|
class: "key-form-textarea",
|
|
4920
4926
|
"data-testid": "key-form-public-key",
|
|
4921
|
-
label:
|
|
4922
|
-
placeholder:
|
|
4923
|
-
readonly:
|
|
4927
|
+
label: m(r)("keys.form.fields.public_key.label"),
|
|
4928
|
+
placeholder: m(r)("keys.form.fields.public_key.placeholder"),
|
|
4929
|
+
readonly: s.isReadonly,
|
|
4924
4930
|
required: ""
|
|
4925
4931
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : J("", !0)
|
|
4926
4932
|
]),
|
|
@@ -4932,7 +4938,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4932
4938
|
]);
|
|
4933
4939
|
};
|
|
4934
4940
|
}
|
|
4935
|
-
}), Ss = /* @__PURE__ */ Qn(cs, [["__scopeId", "data-v-c9c325df"]]), us = { class: "kong-ui-entities-keys-entity-config-card" }, ds = { key: 2 },
|
|
4941
|
+
}), Ss = /* @__PURE__ */ Qn(cs, [["__scopeId", "data-v-c9c325df"]]), us = { class: "kong-ui-entities-keys-entity-config-card" }, ds = { key: 2 }, _s = /* @__PURE__ */ X({
|
|
4936
4942
|
__name: "KeyConfigCard",
|
|
4937
4943
|
props: {
|
|
4938
4944
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4969,27 +4975,27 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4969
4975
|
var U;
|
|
4970
4976
|
const n = t, a = e, { axiosInstance: i } = xt({
|
|
4971
4977
|
headers: (U = a.config) == null ? void 0 : U.requestHeaders
|
|
4972
|
-
}), { convertKeyToTitle: r } = Ql(), { i18n: { t: o } } = ht.useI18n(), l = x(() => a.keySetId ? `${Ce.form[a.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, a.keySetId) : Ce.form[a.config.app].edit.all),
|
|
4978
|
+
}), { convertKeyToTitle: r } = Ql(), { i18n: { t: o } } = ht.useI18n(), l = x(() => a.keySetId ? `${Ce.form[a.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, a.keySetId) : Ce.form[a.config.app].edit.all), c = x(() => {
|
|
4973
4979
|
var b;
|
|
4974
4980
|
return (b = Ce.form[a.config.app]) == null ? void 0 : b.getKeySet;
|
|
4975
|
-
}),
|
|
4981
|
+
}), d = E(), s = E({}), u = E(a.keySetId || ""), h = E(""), f = E(!1), S = async (b) => {
|
|
4976
4982
|
var D;
|
|
4977
|
-
|
|
4983
|
+
d.value = b, u.value = (D = b == null ? void 0 : b.set) == null ? void 0 : D.id, n("fetch:success", b), C(b);
|
|
4978
4984
|
};
|
|
4979
|
-
ge(
|
|
4985
|
+
ge(u, async () => {
|
|
4980
4986
|
var D, v;
|
|
4981
|
-
if (!
|
|
4987
|
+
if (!u.value)
|
|
4982
4988
|
return;
|
|
4983
|
-
let b = `${a.config.apiBaseUrl}${
|
|
4984
|
-
a.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((D = a.config) == null ? void 0 : D.controlPlaneId) || "").replace(/{keySetId}/gi,
|
|
4989
|
+
let b = `${a.config.apiBaseUrl}${c.value}`;
|
|
4990
|
+
a.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((D = a.config) == null ? void 0 : D.controlPlaneId) || "").replace(/{keySetId}/gi, u.value || "") : a.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (v = a.config) != null && v.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, u.value || ""));
|
|
4985
4991
|
try {
|
|
4986
|
-
|
|
4992
|
+
f.value = !0;
|
|
4987
4993
|
const { data: p } = await i.get(b);
|
|
4988
4994
|
h.value = (p == null ? void 0 : p.name) || (p == null ? void 0 : p.id);
|
|
4989
4995
|
} catch (p) {
|
|
4990
4996
|
n("fetch:error", p);
|
|
4991
4997
|
} finally {
|
|
4992
|
-
|
|
4998
|
+
f.value = !1;
|
|
4993
4999
|
}
|
|
4994
5000
|
}, { immediate: !0 });
|
|
4995
5001
|
const C = (b) => {
|
|
@@ -4997,22 +5003,22 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
4997
5003
|
try {
|
|
4998
5004
|
if (b.jwk) {
|
|
4999
5005
|
const p = JSON.parse(b.jwk);
|
|
5000
|
-
Object.keys(p).forEach((
|
|
5001
|
-
|
|
5002
|
-
...
|
|
5003
|
-
[`jwk.${
|
|
5006
|
+
Object.keys(p).forEach((g) => {
|
|
5007
|
+
s.value = {
|
|
5008
|
+
...s.value,
|
|
5009
|
+
[`jwk.${g}`]: p[g]
|
|
5004
5010
|
};
|
|
5005
5011
|
});
|
|
5006
5012
|
} else
|
|
5007
|
-
|
|
5013
|
+
s.value = {
|
|
5008
5014
|
"pem.public_key": (D = b == null ? void 0 : b.pem) == null ? void 0 : D.public_key,
|
|
5009
5015
|
"pem.private_key": (v = b == null ? void 0 : b.pem) == null ? void 0 : v.private_key
|
|
5010
5016
|
};
|
|
5011
5017
|
} catch (p) {
|
|
5012
5018
|
n("fetch:error", p);
|
|
5013
5019
|
}
|
|
5014
|
-
return
|
|
5015
|
-
},
|
|
5020
|
+
return s;
|
|
5021
|
+
}, I = E({
|
|
5016
5022
|
id: {},
|
|
5017
5023
|
name: {
|
|
5018
5024
|
tooltip: o("keys.form.fields.name.tooltip")
|
|
@@ -5045,61 +5051,61 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
5045
5051
|
}
|
|
5046
5052
|
});
|
|
5047
5053
|
return (b, D) => {
|
|
5048
|
-
var p,
|
|
5054
|
+
var p, g;
|
|
5049
5055
|
const v = B("KSkeleton");
|
|
5050
|
-
return
|
|
5051
|
-
A(
|
|
5056
|
+
return y(), O("div", us, [
|
|
5057
|
+
A(m(ul), {
|
|
5052
5058
|
config: e.config,
|
|
5053
5059
|
"config-card-doc": e.configCardDoc,
|
|
5054
|
-
"config-schema":
|
|
5060
|
+
"config-schema": I.value,
|
|
5055
5061
|
"fetch-url": l.value,
|
|
5056
5062
|
"hide-title": e.hideTitle,
|
|
5057
|
-
"onFetch:error": D[0] || (D[0] = (
|
|
5058
|
-
"onFetch:success":
|
|
5059
|
-
onLoading: D[1] || (D[1] = (
|
|
5063
|
+
"onFetch:error": D[0] || (D[0] = (_) => b.$emit("fetch:error", _)),
|
|
5064
|
+
"onFetch:success": S,
|
|
5065
|
+
onLoading: D[1] || (D[1] = (_) => b.$emit("loading", _))
|
|
5060
5066
|
}, $e({
|
|
5061
|
-
set: k(({ row:
|
|
5062
|
-
|
|
5067
|
+
set: k(({ row: _ }) => [
|
|
5068
|
+
f.value ? (y(), V(v, {
|
|
5063
5069
|
key: 0,
|
|
5064
5070
|
"data-testid": "key-set-name-loader",
|
|
5065
5071
|
type: "spinner"
|
|
5066
|
-
})) :
|
|
5072
|
+
})) : _.value && _.value.id === u.value && h.value ? (y(), V(m(sn), {
|
|
5067
5073
|
key: 1,
|
|
5068
5074
|
item: {
|
|
5069
|
-
key:
|
|
5075
|
+
key: _.value.id,
|
|
5070
5076
|
value: h.value,
|
|
5071
|
-
type:
|
|
5077
|
+
type: m(Z).LinkInternal
|
|
5072
5078
|
},
|
|
5073
|
-
onClick: (q) => b.$emit("navigation-click",
|
|
5074
|
-
}, null, 8, ["item", "onClick"])) : (
|
|
5079
|
+
onClick: (q) => b.$emit("navigation-click", _.value.id, "key-sets")
|
|
5080
|
+
}, null, 8, ["item", "onClick"])) : (y(), O("div", ds, N("–")))
|
|
5075
5081
|
]),
|
|
5076
5082
|
_: 2
|
|
5077
5083
|
}, [
|
|
5078
|
-
(p =
|
|
5084
|
+
(p = d.value) != null && p.jwk ? {
|
|
5079
5085
|
name: "jwk",
|
|
5080
5086
|
fn: k(() => [
|
|
5081
|
-
(
|
|
5082
|
-
key:
|
|
5083
|
-
"data-testid": `${
|
|
5087
|
+
(y(!0), O(ye, null, pe(Object.keys(s.value), (_) => (y(), V(m(He), {
|
|
5088
|
+
key: _,
|
|
5089
|
+
"data-testid": `${_}`,
|
|
5084
5090
|
item: {
|
|
5085
|
-
key:
|
|
5086
|
-
label:
|
|
5087
|
-
value:
|
|
5091
|
+
key: _,
|
|
5092
|
+
label: m(r)(_),
|
|
5093
|
+
value: s.value[_]
|
|
5088
5094
|
}
|
|
5089
5095
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
5090
5096
|
]),
|
|
5091
5097
|
key: "0"
|
|
5092
5098
|
} : void 0,
|
|
5093
|
-
(
|
|
5099
|
+
(g = d.value) != null && g.pem ? {
|
|
5094
5100
|
name: "pem",
|
|
5095
5101
|
fn: k(() => [
|
|
5096
|
-
(
|
|
5097
|
-
key:
|
|
5098
|
-
"data-testid": `${
|
|
5102
|
+
(y(!0), O(ye, null, pe(Object.keys(s.value), (_) => (y(), V(m(He), {
|
|
5103
|
+
key: _,
|
|
5104
|
+
"data-testid": `${_}`,
|
|
5099
5105
|
item: {
|
|
5100
|
-
key:
|
|
5101
|
-
label:
|
|
5102
|
-
value:
|
|
5106
|
+
key: _,
|
|
5107
|
+
label: m(r)(_),
|
|
5108
|
+
value: s.value[_]
|
|
5103
5109
|
}
|
|
5104
5110
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
5105
5111
|
]),
|
|
@@ -5111,7 +5117,7 @@ const To = { class: "yaml-config" }, Gn = /* @__PURE__ */ X({
|
|
|
5111
5117
|
}
|
|
5112
5118
|
});
|
|
5113
5119
|
export {
|
|
5114
|
-
|
|
5120
|
+
_s as KeyConfigCard,
|
|
5115
5121
|
Ss as KeyForm,
|
|
5116
5122
|
Cs as KeyList
|
|
5117
5123
|
};
|