@kong-ui-public/entities-consumers 3.3.8 → 3.3.9-pr.1503.09a0b2fc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumers.es.js +892 -886
- package/dist/entities-consumers.umd.js +11 -11
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as W, computed as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as W, computed as x, openBlock as f, createBlock as D, resolveDynamicComponent as be, normalizeStyle as Ue, withCtx as h, createElementBlock as O, toDisplayString as j, createCommentVNode as z, pushScopeId as Re, popScopeId as Ve, createElementVNode as F, ref as B, watch as ke, renderSlot as Q, unref as m, onBeforeMount as wt, resolveComponent as V, createSlots as Ne, createVNode as N, createTextVNode as J, renderList as pe, withModifiers as gt, withDirectives as Ie, vShow as xe, Fragment as fe, normalizeClass as Se, withKeys as xr, useSlots as It, useCssVars as yn, inject as _r, onMounted as Sr, onUnmounted as Ar, normalizeProps as Tr, guardReactiveProps as $r, mergeProps as Nr, Teleport as jr, reactive as Vt } from "vue";
|
|
2
|
+
import { useRouter as xt } from "vue-router";
|
|
3
3
|
import { createI18n as hn, i18nTComponent as vn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Dt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Or } from "@kong/kongponents";
|
|
@@ -8,10 +8,10 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
8
8
|
for (const [r, a] of t)
|
|
9
9
|
n[r] = a;
|
|
10
10
|
return n;
|
|
11
|
-
}, qr = (e) => (Re("data-v-29e33a24"), e = e(), Ve(), e), Fr = ["aria-hidden"],
|
|
11
|
+
}, qr = (e) => (Re("data-v-29e33a24"), e = e(), Ve(), e), Fr = ["aria-hidden"], Br = {
|
|
12
12
|
key: 0,
|
|
13
13
|
"data-testid": "kui-icon-svg-title"
|
|
14
|
-
},
|
|
14
|
+
}, Er = /* @__PURE__ */ qr(() => /* @__PURE__ */ F("path", {
|
|
15
15
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
16
16
|
fill: "currentColor"
|
|
17
17
|
}, null, -1)), Kr = /* @__PURE__ */ W({
|
|
@@ -66,7 +66,7 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
setup(e) {
|
|
69
|
-
const t = e, n =
|
|
69
|
+
const t = e, n = x(() => {
|
|
70
70
|
if (typeof t.size == "number" && t.size > 0)
|
|
71
71
|
return `${t.size}px`;
|
|
72
72
|
if (typeof t.size == "string") {
|
|
@@ -75,7 +75,7 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
75
75
|
return `${i}px`;
|
|
76
76
|
}
|
|
77
77
|
return Pt;
|
|
78
|
-
}), r =
|
|
78
|
+
}), r = x(() => ({
|
|
79
79
|
boxSizing: "border-box",
|
|
80
80
|
color: t.color,
|
|
81
81
|
display: t.display,
|
|
@@ -83,7 +83,7 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
83
83
|
lineHeight: "0",
|
|
84
84
|
width: n.value
|
|
85
85
|
}));
|
|
86
|
-
return (a, i) => (f(),
|
|
86
|
+
return (a, i) => (f(), D(be(e.as), {
|
|
87
87
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
88
88
|
class: "kui-icon add-icon",
|
|
89
89
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
@@ -100,8 +100,8 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
100
100
|
width: "100%",
|
|
101
101
|
xmlns: "http://www.w3.org/2000/svg"
|
|
102
102
|
}, [
|
|
103
|
-
e.title ? (f(), O("title",
|
|
104
|
-
|
|
103
|
+
e.title ? (f(), O("title", Br, j(e.title), 1)) : z("", !0),
|
|
104
|
+
Er
|
|
105
105
|
], 8, Fr))
|
|
106
106
|
]),
|
|
107
107
|
_: 1
|
|
@@ -241,7 +241,7 @@ const at = {
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
var bn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e))(bn || {}), yt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(yt || {}),
|
|
244
|
+
var bn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e))(bn || {}), yt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(yt || {}), Te = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Te || {}), Z = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(Z || {}), ce = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ce || {});
|
|
245
245
|
function Dr() {
|
|
246
246
|
return {
|
|
247
247
|
getAxiosInstance: (e = {}) => {
|
|
@@ -485,79 +485,85 @@ function aa(e, t, n, r = {
|
|
|
485
485
|
searchKeys: ["id"]
|
|
486
486
|
}) {
|
|
487
487
|
n || (n = "1000");
|
|
488
|
-
const { axiosInstance: a } = _t(e.axiosRequestConfig), { i18n: { t: i } } = it(), { debounce: o } = Pr(), l = o(async (
|
|
489
|
-
await
|
|
490
|
-
}, 200), s = B(!1), u = B(""), d = B(""), c = B([]),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
488
|
+
const { axiosInstance: a } = _t(e.axiosRequestConfig), { i18n: { t: i } } = it(), { debounce: o } = Pr(), l = o(async (E) => {
|
|
489
|
+
await T(E);
|
|
490
|
+
}, 200), s = B(!1), u = B(""), d = B(""), c = B([]), b = B([]), g = B(void 0), I = x(() => {
|
|
491
|
+
const E = `${e.apiBaseUrl}${m(t)}`;
|
|
492
|
+
return e.app === "konnect" ? E.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? E.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : E;
|
|
493
|
+
}), { isValidUuid: L } = Cn(), k = async () => {
|
|
494
494
|
try {
|
|
495
495
|
s.value = !0;
|
|
496
|
-
const { data:
|
|
497
|
-
|
|
496
|
+
const { data: E } = await a.get(`${I.value}?size=${n}`);
|
|
497
|
+
E != null && E.next || (g.value = r.fetchedItemsKey in E ? E[r.fetchedItemsKey] : []), b.value = r.fetchedItemsKey in E ? E[r.fetchedItemsKey] : [], c.value = b.value;
|
|
498
498
|
} catch {
|
|
499
499
|
c.value = [], u.value = i("debouncedFilter.errors.fetch");
|
|
500
500
|
} finally {
|
|
501
501
|
s.value = !1;
|
|
502
502
|
}
|
|
503
|
-
},
|
|
504
|
-
var
|
|
505
|
-
if (
|
|
506
|
-
if (
|
|
503
|
+
}, U = B(""), T = async (E) => {
|
|
504
|
+
var w, _, p;
|
|
505
|
+
if (U.value !== E) {
|
|
506
|
+
if (E === "") {
|
|
507
|
+
c.value = b.value;
|
|
508
|
+
return;
|
|
509
|
+
} else
|
|
510
|
+
U.value = E || "";
|
|
511
|
+
if (g.value === void 0)
|
|
507
512
|
try {
|
|
508
513
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
509
|
-
let
|
|
510
|
-
|
|
511
|
-
const { data:
|
|
512
|
-
r.fetchedItemsKey in
|
|
513
|
-
} else if (
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
const { data:
|
|
517
|
-
return [
|
|
518
|
-
})()) :
|
|
519
|
-
...r.searchKeys.filter((
|
|
520
|
-
const { data:
|
|
521
|
-
return
|
|
514
|
+
let C = I.value + "";
|
|
515
|
+
E && (C += `/${E}`);
|
|
516
|
+
const { data: v } = await a.get(`${C}?size=${n}`);
|
|
517
|
+
r.fetchedItemsKey in v ? c.value = v[r.fetchedItemsKey] : v != null && v[r.exactMatchKey ?? "id"] ? c.value = [v] : c.value = [];
|
|
518
|
+
} else if (E) {
|
|
519
|
+
const C = [];
|
|
520
|
+
L(E) && r.searchKeys.includes("id") ? C.push((async () => {
|
|
521
|
+
const { data: A } = await a.get(`${I.value}/${E}`);
|
|
522
|
+
return [A[r.fetchedItemsKey] ?? A];
|
|
523
|
+
})()) : C.push(
|
|
524
|
+
...r.searchKeys.filter((A) => A !== "id").map(async (A) => {
|
|
525
|
+
const { data: R } = await a.get(`${I.value}?${A}=${E}`);
|
|
526
|
+
return R[r.fetchedItemsKey];
|
|
522
527
|
})
|
|
523
528
|
);
|
|
524
|
-
const
|
|
525
|
-
c.value = [], (
|
|
526
|
-
var
|
|
527
|
-
(
|
|
528
|
-
|
|
529
|
+
const v = await Promise.all(C), y = /* @__PURE__ */ new Set();
|
|
530
|
+
c.value = [], (w = v == null ? void 0 : v.forEach) == null || w.call(v, (A) => {
|
|
531
|
+
var R;
|
|
532
|
+
(R = A == null ? void 0 : A.forEach) == null || R.call(A, (S) => {
|
|
533
|
+
y.has(S.id) || (y.add(S.id), c.value.push(S));
|
|
529
534
|
});
|
|
530
535
|
});
|
|
531
536
|
} else
|
|
532
|
-
c.value =
|
|
533
|
-
} catch (
|
|
534
|
-
((
|
|
537
|
+
c.value = b.value;
|
|
538
|
+
} catch (C) {
|
|
539
|
+
((_ = C == null ? void 0 : C.response) == null ? void 0 : _.status) === 404 ? d.value = i("debouncedFilter.errors.invalid") : (c.value = [], u.value = i("debouncedFilter.errors.fetch"));
|
|
535
540
|
} finally {
|
|
536
541
|
s.value = !1;
|
|
537
542
|
}
|
|
538
543
|
else
|
|
539
|
-
s.value = !0, d.value = "",
|
|
540
|
-
var
|
|
541
|
-
let
|
|
542
|
-
for (const
|
|
543
|
-
const
|
|
544
|
-
|
|
544
|
+
s.value = !0, d.value = "", E ? (c.value = (p = g.value) == null ? void 0 : p.filter((C) => {
|
|
545
|
+
var v;
|
|
546
|
+
let y = !1;
|
|
547
|
+
for (const A of r.searchKeys) {
|
|
548
|
+
const R = typeof C[A] == "string" ? (v = C[A]) == null ? void 0 : v.toLowerCase() : C[A];
|
|
549
|
+
R != null && R.includes(E.toLowerCase()) && (y = !0);
|
|
545
550
|
}
|
|
546
|
-
return
|
|
547
|
-
}), (!c.value || !c.value.length) && (d.value = i("debouncedFilter.errors.invalid"))) : c.value =
|
|
551
|
+
return y;
|
|
552
|
+
}), (!c.value || !c.value.length) && (d.value = i("debouncedFilter.errors.invalid"))) : c.value = g.value, s.value = !1;
|
|
553
|
+
}
|
|
548
554
|
};
|
|
549
555
|
return {
|
|
550
556
|
loading: s,
|
|
551
557
|
error: u,
|
|
552
558
|
validationError: d,
|
|
553
559
|
results: c,
|
|
554
|
-
allRecords:
|
|
555
|
-
loadItems:
|
|
560
|
+
allRecords: g,
|
|
561
|
+
loadItems: k,
|
|
556
562
|
debouncedQueryChange: l
|
|
557
563
|
};
|
|
558
564
|
}
|
|
559
565
|
function ia(e, t) {
|
|
560
|
-
const n = m(t), r =
|
|
566
|
+
const n = m(t), r = x(
|
|
561
567
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
562
568
|
);
|
|
563
569
|
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
@@ -604,42 +610,42 @@ function la(e) {
|
|
|
604
610
|
}
|
|
605
611
|
}
|
|
606
612
|
function kn(e, t) {
|
|
607
|
-
const n = B(m(e)), r = B(m(t)), a =
|
|
613
|
+
const n = B(m(e)), r = B(m(t)), a = x(
|
|
608
614
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
609
|
-
), i =
|
|
615
|
+
), i = x(
|
|
610
616
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
611
617
|
);
|
|
612
618
|
return (o) => {
|
|
613
|
-
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query:
|
|
619
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: b } = o;
|
|
614
620
|
try {
|
|
615
|
-
let
|
|
616
|
-
return a.value &&
|
|
617
|
-
|
|
618
|
-
}), d &&
|
|
619
|
-
} catch (
|
|
620
|
-
return console.error("RouteList(fetcher)",
|
|
621
|
+
let g = new URL(i.value.href);
|
|
622
|
+
return a.value && b ? (g.search = "", g = n.value.isExactMatch ? new URL(`${g.href}/${b}/`) : new URL(`${g.href}?filter[name][contains]=${b}`)) : (a.value || new URLSearchParams(b).forEach((I, L) => {
|
|
623
|
+
g.searchParams.append(L, I);
|
|
624
|
+
}), d && g.searchParams.append("sort_by", d), c === "desc" && g.searchParams.append("sort_desc", "1"), g.searchParams.append("size", String(s))), u && l !== 1 && g.searchParams.append("offset", String(u)), g.href;
|
|
625
|
+
} catch (g) {
|
|
626
|
+
return console.error("RouteList(fetcher)", g), r.value;
|
|
621
627
|
}
|
|
622
628
|
};
|
|
623
629
|
}
|
|
624
630
|
function sa(e, t, n = "data") {
|
|
625
631
|
const r = m(t), { axiosInstance: a } = _t(e.axiosRequestConfig), i = kn(e, r), o = B({
|
|
626
|
-
status:
|
|
632
|
+
status: Te.Idle
|
|
627
633
|
});
|
|
628
634
|
return { fetcher: async (l) => {
|
|
629
635
|
var s;
|
|
630
636
|
try {
|
|
631
|
-
o.value = { status:
|
|
637
|
+
o.value = { status: Te.Loading };
|
|
632
638
|
let u = i(l);
|
|
633
639
|
u.includes("filter[name]") && (u = `${u}&page[size]=${l.pageSize}&page[number]=${l.page}`);
|
|
634
640
|
const d = await a.get(u);
|
|
635
641
|
if (d.status >= 400)
|
|
636
642
|
throw d;
|
|
637
|
-
const c = d.data,
|
|
638
|
-
let
|
|
639
|
-
c[
|
|
643
|
+
const c = d.data, b = n && n.replace(/[^\w-_]/gi, "");
|
|
644
|
+
let g;
|
|
645
|
+
c[b] && Array.isArray(c[b]) ? g = c[b] : Array.isArray(c) ? g = c : g = Object.keys(c).length ? [c] : [];
|
|
640
646
|
const I = {
|
|
641
|
-
data:
|
|
642
|
-
total:
|
|
647
|
+
data: g,
|
|
648
|
+
total: g.length,
|
|
643
649
|
...c.offset ? {
|
|
644
650
|
pagination: {
|
|
645
651
|
offset: c.offset
|
|
@@ -647,7 +653,7 @@ function sa(e, t, n = "data") {
|
|
|
647
653
|
} : null
|
|
648
654
|
};
|
|
649
655
|
return o.value = {
|
|
650
|
-
status:
|
|
656
|
+
status: Te.Idle,
|
|
651
657
|
response: I
|
|
652
658
|
}, I;
|
|
653
659
|
} catch (u) {
|
|
@@ -656,11 +662,11 @@ function sa(e, t, n = "data") {
|
|
|
656
662
|
total: 0
|
|
657
663
|
};
|
|
658
664
|
return l.query && (((s = u.response) == null ? void 0 : s.status) === 404 || u.status === 404) ? (o.value = {
|
|
659
|
-
status:
|
|
665
|
+
status: Te.NoResults,
|
|
660
666
|
response: d,
|
|
661
667
|
error: u.response ? u : { response: u }
|
|
662
668
|
}, d) : (o.value = {
|
|
663
|
-
status:
|
|
669
|
+
status: Te.Error,
|
|
664
670
|
response: d,
|
|
665
671
|
error: u.response ? u : { response: u }
|
|
666
672
|
}, d);
|
|
@@ -734,7 +740,7 @@ function ya(e) {
|
|
|
734
740
|
return ke(e, (a) => {
|
|
735
741
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
736
742
|
}), {
|
|
737
|
-
isTruncated:
|
|
743
|
+
isTruncated: x(() => t.value < n.value)
|
|
738
744
|
};
|
|
739
745
|
}
|
|
740
746
|
function ha() {
|
|
@@ -777,21 +783,21 @@ const ne = {
|
|
|
777
783
|
}
|
|
778
784
|
},
|
|
779
785
|
setup(e) {
|
|
780
|
-
const t = e, { i18n: { t: n } } = ne.useI18n(), { convertKeyToTitle: r } = ne.useStringHelpers(), a =
|
|
786
|
+
const t = e, { i18n: { t: n } } = ne.useI18n(), { convertKeyToTitle: r } = ne.useStringHelpers(), a = x(() => t.item.key ?? "json-array-item"), i = x(() => t.item.value ?? t.item), o = x(() => {
|
|
781
787
|
const s = JSON.parse(JSON.stringify(i.value));
|
|
782
788
|
return t.isArrayItem && delete s.name, s;
|
|
783
|
-
}), l =
|
|
789
|
+
}), l = x(() => {
|
|
784
790
|
var s;
|
|
785
791
|
return t.isArrayItem ? (s = i.value) != null && s.name ? r(i.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
786
792
|
});
|
|
787
|
-
return (s, u) => (f(),
|
|
788
|
-
class:
|
|
793
|
+
return (s, u) => (f(), D(be(e.isArrayItem ? "fieldset" : "div"), {
|
|
794
|
+
class: Se(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
789
795
|
}, {
|
|
790
796
|
default: h(() => [
|
|
791
797
|
e.isArrayItem ? (f(), O("legend", va, [
|
|
792
|
-
|
|
793
|
-
])) :
|
|
794
|
-
(f(!0), O(fe, null, pe(Object.keys(o.value), (d, c) => (f(),
|
|
798
|
+
F("b", null, j(l.value), 1)
|
|
799
|
+
])) : z("", !0),
|
|
800
|
+
(f(!0), O(fe, null, pe(Object.keys(o.value), (d, c) => (f(), D(_n, {
|
|
795
801
|
key: `${a.value}-property-${c}`,
|
|
796
802
|
item: {
|
|
797
803
|
key: d,
|
|
@@ -808,7 +814,7 @@ const ne = {
|
|
|
808
814
|
for (const [r, a] of t)
|
|
809
815
|
n[r] = a;
|
|
810
816
|
return n;
|
|
811
|
-
},
|
|
817
|
+
}, xn = /* @__PURE__ */ me(ba, [["__scopeId", "data-v-68ca83ec"]]), Ca = /* @__PURE__ */ W({
|
|
812
818
|
__name: "InternalLinkItem",
|
|
813
819
|
props: {
|
|
814
820
|
item: {
|
|
@@ -820,9 +826,9 @@ const ne = {
|
|
|
820
826
|
setup(e) {
|
|
821
827
|
const { i18n: { t } } = ne.useI18n();
|
|
822
828
|
return (n, r) => {
|
|
823
|
-
const a =
|
|
829
|
+
const a = V("KButton");
|
|
824
830
|
return f(), O("div", null, [
|
|
825
|
-
|
|
831
|
+
N(a, {
|
|
826
832
|
appearance: "tertiary",
|
|
827
833
|
class: "navigation-button",
|
|
828
834
|
onClick: r[0] || (r[0] = (i) => n.$emit("navigation-click", e.item))
|
|
@@ -846,8 +852,8 @@ const ne = {
|
|
|
846
852
|
setup(e) {
|
|
847
853
|
const { i18n: { t } } = ne.useI18n();
|
|
848
854
|
return (n, r) => {
|
|
849
|
-
const a =
|
|
850
|
-
return f(),
|
|
855
|
+
const a = V("KBadge");
|
|
856
|
+
return f(), D(a, {
|
|
851
857
|
appearance: e.status ? "success" : "neutral"
|
|
852
858
|
}, {
|
|
853
859
|
default: h(() => [
|
|
@@ -857,9 +863,9 @@ const ne = {
|
|
|
857
863
|
}, 8, ["appearance"]);
|
|
858
864
|
};
|
|
859
865
|
}
|
|
860
|
-
}), Ia = "#0044f4",
|
|
866
|
+
}), Ia = "#0044f4", xa = "#e0e4ea", _a = "#afb7c5", Sa = "1px", Aa = "20px", Ta = { class: "config-card-details-row" }, $a = ["data-testid"], Na = ["data-testid"], ja = ["data-testid"], Oa = ["data-testid"], Ma = { key: 1 }, qa = ["data-testid"], Fa = ["data-testid"], Ba = ["data-testid"], Ea = ["data-testid"], Ka = {
|
|
861
867
|
name: "ConfigCardItem",
|
|
862
|
-
components: { JsonCardItem:
|
|
868
|
+
components: { JsonCardItem: xn, StatusBadge: wa, InternalLinkItem: ka }
|
|
863
869
|
}, La = /* @__PURE__ */ W({
|
|
864
870
|
...Ka,
|
|
865
871
|
props: {
|
|
@@ -881,12 +887,12 @@ const ne = {
|
|
|
881
887
|
emits: ["navigation-click"],
|
|
882
888
|
setup(e, { emit: t }) {
|
|
883
889
|
yn((I) => ({
|
|
884
|
-
dc1d91a8: d.value ? "none" : `solid ${m(
|
|
890
|
+
dc1d91a8: d.value ? "none" : `solid ${m(Sa)} ${m(xa)}`,
|
|
885
891
|
"59ccec5f": u.value && l.value ? "block" : "flex",
|
|
886
892
|
"29318fbe": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
887
893
|
"292d0408": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
888
894
|
}));
|
|
889
|
-
const n = e, r = t, a = It(), { i18n: { t: i, formatUnixTimeStamp: o } } = ne.useI18n(), l =
|
|
895
|
+
const n = e, r = t, a = It(), { i18n: { t: i, formatUnixTimeStamp: o } } = ne.useI18n(), l = x(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = x(() => !!(n.item.tooltip || a["label-tooltip"])), u = x(() => n.item.type === Z.Json || n.item.type === Z.JsonArray), d = x(() => n.item.type === Z.JsonArray), c = x(() => {
|
|
890
896
|
switch (n.item.type) {
|
|
891
897
|
case Z.ID:
|
|
892
898
|
return {
|
|
@@ -996,16 +1002,16 @@ const ne = {
|
|
|
996
1002
|
text: n.item.value
|
|
997
1003
|
};
|
|
998
1004
|
}
|
|
999
|
-
}),
|
|
1000
|
-
return (I,
|
|
1001
|
-
const k =
|
|
1002
|
-
return f(), O("div",
|
|
1003
|
-
|
|
1005
|
+
}), b = B(), { isTruncated: g } = ne.useTruncationDetector(b);
|
|
1006
|
+
return (I, L) => {
|
|
1007
|
+
const k = V("KLabel"), U = V("KBadge"), T = V("KCopy"), E = V("KTooltip");
|
|
1008
|
+
return f(), O("div", Ta, [
|
|
1009
|
+
F("div", {
|
|
1004
1010
|
class: "config-card-details-label",
|
|
1005
1011
|
"data-testid": `${e.item.key}-label`
|
|
1006
1012
|
}, [
|
|
1007
1013
|
Q(I.$slots, "label", { item: e.item }, () => [
|
|
1008
|
-
|
|
1014
|
+
N(k, { "tooltip-attributes": { maxWidth: "500px" } }, Ne({
|
|
1009
1015
|
default: h(() => [
|
|
1010
1016
|
J(j(e.item.label) + " ", 1)
|
|
1011
1017
|
]),
|
|
@@ -1014,20 +1020,20 @@ const ne = {
|
|
|
1014
1020
|
s.value ? {
|
|
1015
1021
|
name: "tooltip",
|
|
1016
1022
|
fn: h(() => [
|
|
1017
|
-
|
|
1023
|
+
F("div", {
|
|
1018
1024
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1019
1025
|
}, [
|
|
1020
1026
|
Q(I.$slots, "label-tooltip", {}, () => [
|
|
1021
1027
|
J(j(e.item.tooltip), 1)
|
|
1022
1028
|
], !0)
|
|
1023
|
-
], 8,
|
|
1029
|
+
], 8, Na)
|
|
1024
1030
|
]),
|
|
1025
1031
|
key: "0"
|
|
1026
1032
|
} : void 0
|
|
1027
1033
|
]), 1024)
|
|
1028
1034
|
], !0)
|
|
1029
|
-
], 8,
|
|
1030
|
-
|
|
1035
|
+
], 8, $a),
|
|
1036
|
+
F("div", {
|
|
1031
1037
|
class: "config-card-details-value",
|
|
1032
1038
|
"data-testid": `${e.item.key}-property-value`
|
|
1033
1039
|
}, [
|
|
@@ -1035,71 +1041,71 @@ const ne = {
|
|
|
1035
1041
|
rowValue: e.item.value
|
|
1036
1042
|
}, () => [
|
|
1037
1043
|
l.value ? (f(), O("div", Ma, [
|
|
1038
|
-
(f(),
|
|
1044
|
+
(f(), D(be(c.value.tag), Tr($r(c.value.attrs)), {
|
|
1039
1045
|
default: h(() => [
|
|
1040
1046
|
c.value.additionalComponent === "KBadge" ? (f(), O("div", {
|
|
1041
1047
|
key: 0,
|
|
1042
1048
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1043
1049
|
}, [
|
|
1044
|
-
(f(!0), O(fe, null, pe(e.item.value, (
|
|
1045
|
-
key: `${e.item.key}-badge-tag-${
|
|
1050
|
+
(f(!0), O(fe, null, pe(e.item.value, (w, _) => (f(), D(U, {
|
|
1051
|
+
key: `${e.item.key}-badge-tag-${_}`,
|
|
1046
1052
|
class: "config-badge",
|
|
1047
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1048
|
-
tooltip:
|
|
1053
|
+
"data-testid": `${e.item.key}-badge-tag-${_}`,
|
|
1054
|
+
tooltip: w,
|
|
1049
1055
|
"truncation-tooltip": ""
|
|
1050
1056
|
}, {
|
|
1051
1057
|
default: h(() => [
|
|
1052
|
-
J(j(
|
|
1058
|
+
J(j(w), 1)
|
|
1053
1059
|
]),
|
|
1054
1060
|
_: 2
|
|
1055
1061
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1056
|
-
], 8, qa)) :
|
|
1062
|
+
], 8, qa)) : z("", !0),
|
|
1057
1063
|
c.value.additionalComponent === "KCopy" ? (f(), O("div", {
|
|
1058
1064
|
key: 1,
|
|
1059
1065
|
class: "copy-uuid-array",
|
|
1060
1066
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1061
1067
|
}, [
|
|
1062
|
-
(f(!0), O(fe, null, pe(e.item.value, (
|
|
1063
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1064
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1065
|
-
text:
|
|
1068
|
+
(f(!0), O(fe, null, pe(e.item.value, (w, _) => (f(), D(T, Nr({ ref_for: !0 }, c.value.childAttrs, {
|
|
1069
|
+
key: `${e.item.key}-copy-uuid-${_}`,
|
|
1070
|
+
"data-testid": `${e.item.key}-copy-uuid-${_}`,
|
|
1071
|
+
text: w
|
|
1066
1072
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
1067
1073
|
], 8, Fa)) : c.value.additionalComponent === "KMethodBadge" ? (f(), O("div", {
|
|
1068
1074
|
key: 2,
|
|
1069
1075
|
class: "method-badge-array",
|
|
1070
1076
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1071
1077
|
}, [
|
|
1072
|
-
(f(!0), O(fe, null, pe(e.item.value, (
|
|
1073
|
-
key: `${e.item.key}-badge-method-${
|
|
1074
|
-
appearance: Object.values(m(Or)).includes(
|
|
1078
|
+
(f(!0), O(fe, null, pe(e.item.value, (w, _) => (f(), D(U, {
|
|
1079
|
+
key: `${e.item.key}-badge-method-${_}`,
|
|
1080
|
+
appearance: Object.values(m(Or)).includes(w.toLowerCase()) ? w.toLowerCase() : "custom",
|
|
1075
1081
|
class: "config-badge",
|
|
1076
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1082
|
+
"data-testid": `${e.item.key}-badge-method-${_}`
|
|
1077
1083
|
}, {
|
|
1078
1084
|
default: h(() => [
|
|
1079
|
-
J(j(
|
|
1085
|
+
J(j(w), 1)
|
|
1080
1086
|
]),
|
|
1081
1087
|
_: 2
|
|
1082
1088
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1083
|
-
], 8,
|
|
1089
|
+
], 8, Ba)) : z("", !0),
|
|
1084
1090
|
c.value.additionalComponent === "JsonCardItem" ? (f(), O("div", {
|
|
1085
1091
|
key: 3,
|
|
1086
1092
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1087
1093
|
}, [
|
|
1088
|
-
(f(!0), O(fe, null, pe(e.item.value, (
|
|
1089
|
-
key: `json-array-item-${
|
|
1090
|
-
index:
|
|
1094
|
+
(f(!0), O(fe, null, pe(e.item.value, (w, _) => (f(), D(xn, {
|
|
1095
|
+
key: `json-array-item-${_}`,
|
|
1096
|
+
index: _,
|
|
1091
1097
|
"is-array-item": "",
|
|
1092
|
-
item:
|
|
1098
|
+
item: w
|
|
1093
1099
|
}, null, 8, ["index", "item"]))), 128))
|
|
1094
|
-
], 8,
|
|
1100
|
+
], 8, Ea)) : (f(), D(E, {
|
|
1095
1101
|
key: 4,
|
|
1096
|
-
text: m(
|
|
1102
|
+
text: m(g) ? e.item.value : ""
|
|
1097
1103
|
}, {
|
|
1098
1104
|
default: h(() => [
|
|
1099
|
-
|
|
1105
|
+
F("span", {
|
|
1100
1106
|
ref_key: "textContent",
|
|
1101
|
-
ref:
|
|
1102
|
-
class:
|
|
1107
|
+
ref: b,
|
|
1108
|
+
class: Se(["attrs-data-text", { truncated: e.truncated }])
|
|
1103
1109
|
}, j(c.value.text), 3)
|
|
1104
1110
|
]),
|
|
1105
1111
|
_: 1
|
|
@@ -1119,7 +1125,7 @@ const ne = {
|
|
|
1119
1125
|
}), _n = /* @__PURE__ */ me(La, [["__scopeId", "data-v-d268261c"]]), Ua = { class: "json-config" }, Ra = {
|
|
1120
1126
|
key: 0,
|
|
1121
1127
|
class: "json-endpoint"
|
|
1122
|
-
},
|
|
1128
|
+
}, Sn = /* @__PURE__ */ W({
|
|
1123
1129
|
__name: "JsonCodeBlock",
|
|
1124
1130
|
props: {
|
|
1125
1131
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1150,7 +1156,7 @@ const ne = {
|
|
|
1150
1156
|
yn((a) => ({
|
|
1151
1157
|
"090794fe": `${r.value}ch`
|
|
1152
1158
|
}));
|
|
1153
|
-
const t = e, n =
|
|
1159
|
+
const t = e, n = x(() => t.jsonRecord), r = x(() => {
|
|
1154
1160
|
var a;
|
|
1155
1161
|
if (!t.fetcherUrl)
|
|
1156
1162
|
return 0;
|
|
@@ -1158,10 +1164,10 @@ const ne = {
|
|
|
1158
1164
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
1159
1165
|
});
|
|
1160
1166
|
return (a, i) => {
|
|
1161
|
-
const o =
|
|
1167
|
+
const o = V("KBadge"), l = V("KCodeBlock");
|
|
1162
1168
|
return f(), O("div", Ua, [
|
|
1163
1169
|
t.fetcherUrl ? (f(), O("div", Ra, [
|
|
1164
|
-
|
|
1170
|
+
N(o, {
|
|
1165
1171
|
appearance: t.requestMethod
|
|
1166
1172
|
}, {
|
|
1167
1173
|
default: h(() => [
|
|
@@ -1169,22 +1175,22 @@ const ne = {
|
|
|
1169
1175
|
]),
|
|
1170
1176
|
_: 1
|
|
1171
1177
|
}, 8, ["appearance"]),
|
|
1172
|
-
|
|
1178
|
+
N(l, {
|
|
1173
1179
|
id: "json-endpoint-codeblock",
|
|
1174
1180
|
code: t.fetcherUrl,
|
|
1175
1181
|
language: "json",
|
|
1176
1182
|
"single-line": "",
|
|
1177
1183
|
theme: "dark"
|
|
1178
1184
|
}, null, 8, ["code"])
|
|
1179
|
-
])) :
|
|
1180
|
-
t.jsonRecord ? (f(),
|
|
1185
|
+
])) : z("", !0),
|
|
1186
|
+
t.jsonRecord ? (f(), D(l, {
|
|
1181
1187
|
key: 1,
|
|
1182
1188
|
id: "json-codeblock",
|
|
1183
|
-
class:
|
|
1189
|
+
class: Se({ "json-content": t.fetcherUrl }),
|
|
1184
1190
|
code: JSON.stringify(n.value, null, 2),
|
|
1185
1191
|
language: "json",
|
|
1186
1192
|
theme: "dark"
|
|
1187
|
-
}, null, 8, ["class", "code"])) :
|
|
1193
|
+
}, null, 8, ["class", "code"])) : z("", !0)
|
|
1188
1194
|
]);
|
|
1189
1195
|
};
|
|
1190
1196
|
}
|
|
@@ -1223,19 +1229,19 @@ var Ha = An, Ja = Va, Wa = Da, Ya = za, Za = Ga, Qa = Pa, te = {
|
|
|
1223
1229
|
isNegativeZero: Za,
|
|
1224
1230
|
extend: Qa
|
|
1225
1231
|
};
|
|
1226
|
-
function
|
|
1232
|
+
function Tn(e, t) {
|
|
1227
1233
|
var n = "", r = e.reason || "(unknown reason)";
|
|
1228
1234
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1229
1235
|
|
|
1230
1236
|
` + e.mark.snippet), r + " " + n) : r;
|
|
1231
1237
|
}
|
|
1232
1238
|
function ze(e, t) {
|
|
1233
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1239
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Tn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1234
1240
|
}
|
|
1235
1241
|
ze.prototype = Object.create(Error.prototype);
|
|
1236
1242
|
ze.prototype.constructor = ze;
|
|
1237
1243
|
ze.prototype.toString = function(e) {
|
|
1238
|
-
return this.name + ": " +
|
|
1244
|
+
return this.name + ": " + Tn(this, e);
|
|
1239
1245
|
};
|
|
1240
1246
|
var se = ze;
|
|
1241
1247
|
function pt(e, t, n, r, a) {
|
|
@@ -1370,7 +1376,7 @@ ht.prototype.extend = function(e) {
|
|
|
1370
1376
|
var r = Object.create(ht.prototype);
|
|
1371
1377
|
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = Zt(r, "implicit"), r.compiledExplicit = Zt(r, "explicit"), r.compiledTypeMap = ii(r.compiledImplicit, r.compiledExplicit), r;
|
|
1372
1378
|
};
|
|
1373
|
-
var
|
|
1379
|
+
var $n = ht, Nn = new ie("tag:yaml.org,2002:str", {
|
|
1374
1380
|
kind: "scalar",
|
|
1375
1381
|
construct: function(e) {
|
|
1376
1382
|
return e !== null ? e : "";
|
|
@@ -1385,9 +1391,9 @@ var Nn = ht, Tn = new ie("tag:yaml.org,2002:str", {
|
|
|
1385
1391
|
construct: function(e) {
|
|
1386
1392
|
return e !== null ? e : {};
|
|
1387
1393
|
}
|
|
1388
|
-
}), Mn = new
|
|
1394
|
+
}), Mn = new $n({
|
|
1389
1395
|
explicit: [
|
|
1390
|
-
|
|
1396
|
+
Nn,
|
|
1391
1397
|
jn,
|
|
1392
1398
|
On
|
|
1393
1399
|
]
|
|
@@ -1518,7 +1524,7 @@ function yi(e) {
|
|
|
1518
1524
|
function hi(e) {
|
|
1519
1525
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !te.isNegativeZero(e);
|
|
1520
1526
|
}
|
|
1521
|
-
var
|
|
1527
|
+
var Bn = new ie("tag:yaml.org,2002:int", {
|
|
1522
1528
|
kind: "scalar",
|
|
1523
1529
|
resolve: gi,
|
|
1524
1530
|
construct: yi,
|
|
@@ -1595,7 +1601,7 @@ function wi(e, t) {
|
|
|
1595
1601
|
function Ii(e) {
|
|
1596
1602
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || te.isNegativeZero(e));
|
|
1597
1603
|
}
|
|
1598
|
-
var
|
|
1604
|
+
var En = new ie("tag:yaml.org,2002:float", {
|
|
1599
1605
|
kind: "scalar",
|
|
1600
1606
|
resolve: bi,
|
|
1601
1607
|
construct: Ci,
|
|
@@ -1606,19 +1612,19 @@ var Bn = new ie("tag:yaml.org,2002:float", {
|
|
|
1606
1612
|
implicit: [
|
|
1607
1613
|
qn,
|
|
1608
1614
|
Fn,
|
|
1609
|
-
|
|
1610
|
-
|
|
1615
|
+
Bn,
|
|
1616
|
+
En
|
|
1611
1617
|
]
|
|
1612
1618
|
}), Ln = Kn, Un = new RegExp(
|
|
1613
1619
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1614
1620
|
), Rn = new RegExp(
|
|
1615
1621
|
"^([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]))?))?$"
|
|
1616
1622
|
);
|
|
1617
|
-
function
|
|
1623
|
+
function xi(e) {
|
|
1618
1624
|
return e === null ? !1 : Un.exec(e) !== null || Rn.exec(e) !== null;
|
|
1619
1625
|
}
|
|
1620
1626
|
function _i(e) {
|
|
1621
|
-
var t, n, r, a, i, o, l, s = 0, u = null, d, c,
|
|
1627
|
+
var t, n, r, a, i, o, l, s = 0, u = null, d, c, b;
|
|
1622
1628
|
if (t = Un.exec(e), t === null && (t = Rn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1623
1629
|
if (n = +t[1], r = +t[2] - 1, a = +t[3], !t[4])
|
|
1624
1630
|
return new Date(Date.UTC(n, r, a));
|
|
@@ -1627,17 +1633,17 @@ function _i(e) {
|
|
|
1627
1633
|
s += "0";
|
|
1628
1634
|
s = +s;
|
|
1629
1635
|
}
|
|
1630
|
-
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)),
|
|
1636
|
+
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)), b = new Date(Date.UTC(n, r, a, i, o, l, s)), u && b.setTime(b.getTime() - u), b;
|
|
1631
1637
|
}
|
|
1632
|
-
function
|
|
1638
|
+
function Si(e) {
|
|
1633
1639
|
return e.toISOString();
|
|
1634
1640
|
}
|
|
1635
1641
|
var Vn = new ie("tag:yaml.org,2002:timestamp", {
|
|
1636
1642
|
kind: "scalar",
|
|
1637
|
-
resolve:
|
|
1643
|
+
resolve: xi,
|
|
1638
1644
|
construct: _i,
|
|
1639
1645
|
instanceOf: Date,
|
|
1640
|
-
represent:
|
|
1646
|
+
represent: Si
|
|
1641
1647
|
});
|
|
1642
1648
|
function Ai(e) {
|
|
1643
1649
|
return e === "<<" || e === null;
|
|
@@ -1645,11 +1651,11 @@ function Ai(e) {
|
|
|
1645
1651
|
var Dn = new ie("tag:yaml.org,2002:merge", {
|
|
1646
1652
|
kind: "scalar",
|
|
1647
1653
|
resolve: Ai
|
|
1648
|
-
}),
|
|
1654
|
+
}), St = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1649
1655
|
\r`;
|
|
1650
|
-
function
|
|
1656
|
+
function Ti(e) {
|
|
1651
1657
|
if (e === null) return !1;
|
|
1652
|
-
var t, n, r = 0, a = e.length, i =
|
|
1658
|
+
var t, n, r = 0, a = e.length, i = St;
|
|
1653
1659
|
for (n = 0; n < a; n++)
|
|
1654
1660
|
if (t = i.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1655
1661
|
if (t < 0) return !1;
|
|
@@ -1657,14 +1663,14 @@ function $i(e) {
|
|
|
1657
1663
|
}
|
|
1658
1664
|
return r % 8 === 0;
|
|
1659
1665
|
}
|
|
1660
|
-
function
|
|
1661
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i =
|
|
1666
|
+
function $i(e) {
|
|
1667
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i = St, o = 0, l = [];
|
|
1662
1668
|
for (t = 0; t < a; t++)
|
|
1663
1669
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | i.indexOf(r.charAt(t));
|
|
1664
1670
|
return n = a % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1665
1671
|
}
|
|
1666
|
-
function
|
|
1667
|
-
var t = "", n = 0, r, a, i = e.length, o =
|
|
1672
|
+
function Ni(e) {
|
|
1673
|
+
var t = "", n = 0, r, a, i = e.length, o = St;
|
|
1668
1674
|
for (r = 0; r < i; r++)
|
|
1669
1675
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1670
1676
|
return a = i % 3, a === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : a === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : a === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
@@ -1674,10 +1680,10 @@ function ji(e) {
|
|
|
1674
1680
|
}
|
|
1675
1681
|
var Pn = new ie("tag:yaml.org,2002:binary", {
|
|
1676
1682
|
kind: "scalar",
|
|
1677
|
-
resolve:
|
|
1678
|
-
construct:
|
|
1683
|
+
resolve: Ti,
|
|
1684
|
+
construct: $i,
|
|
1679
1685
|
predicate: ji,
|
|
1680
|
-
represent:
|
|
1686
|
+
represent: Ni
|
|
1681
1687
|
}), Oi = Object.prototype.hasOwnProperty, Mi = Object.prototype.toString;
|
|
1682
1688
|
function qi(e) {
|
|
1683
1689
|
if (e === null) return !0;
|
|
@@ -1701,12 +1707,12 @@ var zn = new ie("tag:yaml.org,2002:omap", {
|
|
|
1701
1707
|
kind: "sequence",
|
|
1702
1708
|
resolve: qi,
|
|
1703
1709
|
construct: Fi
|
|
1704
|
-
}),
|
|
1705
|
-
function
|
|
1710
|
+
}), Bi = Object.prototype.toString;
|
|
1711
|
+
function Ei(e) {
|
|
1706
1712
|
if (e === null) return !0;
|
|
1707
1713
|
var t, n, r, a, i, o = e;
|
|
1708
1714
|
for (i = new Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1709
|
-
if (r = o[t],
|
|
1715
|
+
if (r = o[t], Bi.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1)) return !1;
|
|
1710
1716
|
i[t] = [a[0], r[a[0]]];
|
|
1711
1717
|
}
|
|
1712
1718
|
return !0;
|
|
@@ -1720,7 +1726,7 @@ function Ki(e) {
|
|
|
1720
1726
|
}
|
|
1721
1727
|
var Gn = new ie("tag:yaml.org,2002:pairs", {
|
|
1722
1728
|
kind: "sequence",
|
|
1723
|
-
resolve:
|
|
1729
|
+
resolve: Ei,
|
|
1724
1730
|
construct: Ki
|
|
1725
1731
|
}), Li = Object.prototype.hasOwnProperty;
|
|
1726
1732
|
function Ui(e) {
|
|
@@ -1756,13 +1762,13 @@ function Xt(e) {
|
|
|
1756
1762
|
function he(e) {
|
|
1757
1763
|
return e === 10 || e === 13;
|
|
1758
1764
|
}
|
|
1759
|
-
function
|
|
1765
|
+
function $e(e) {
|
|
1760
1766
|
return e === 9 || e === 32;
|
|
1761
1767
|
}
|
|
1762
1768
|
function de(e) {
|
|
1763
1769
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1764
1770
|
}
|
|
1765
|
-
function
|
|
1771
|
+
function Ee(e) {
|
|
1766
1772
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1767
1773
|
}
|
|
1768
1774
|
function Gi(e) {
|
|
@@ -1802,7 +1808,7 @@ function er(e, t) {
|
|
|
1802
1808
|
};
|
|
1803
1809
|
return n.snippet = ei(n), new se(t, n);
|
|
1804
1810
|
}
|
|
1805
|
-
function
|
|
1811
|
+
function q(e, t) {
|
|
1806
1812
|
throw er(e, t);
|
|
1807
1813
|
}
|
|
1808
1814
|
function tt(e, t) {
|
|
@@ -1811,15 +1817,15 @@ function tt(e, t) {
|
|
|
1811
1817
|
var tn = {
|
|
1812
1818
|
YAML: function(e, t, n) {
|
|
1813
1819
|
var r, a, i;
|
|
1814
|
-
e.version !== null &&
|
|
1820
|
+
e.version !== null && q(e, "duplication of %YAML directive"), n.length !== 1 && q(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && q(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && q(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && tt(e, "unsupported YAML version of the document");
|
|
1815
1821
|
},
|
|
1816
1822
|
TAG: function(e, t, n) {
|
|
1817
1823
|
var r, a;
|
|
1818
|
-
n.length !== 2 &&
|
|
1824
|
+
n.length !== 2 && q(e, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], Yn.test(r) || q(e, "ill-formed tag handle (first argument) of the TAG directive"), Ae.call(e.tagMap, r) && q(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Zn.test(a) || q(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1819
1825
|
try {
|
|
1820
1826
|
a = decodeURIComponent(a);
|
|
1821
1827
|
} catch {
|
|
1822
|
-
|
|
1828
|
+
q(e, "tag prefix is malformed: " + a);
|
|
1823
1829
|
}
|
|
1824
1830
|
e.tagMap[r] = a;
|
|
1825
1831
|
}
|
|
@@ -1829,21 +1835,21 @@ function _e(e, t, n, r) {
|
|
|
1829
1835
|
if (t < n) {
|
|
1830
1836
|
if (l = e.input.slice(t, n), r)
|
|
1831
1837
|
for (a = 0, i = l.length; a < i; a += 1)
|
|
1832
|
-
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1833
|
-
else Di.test(l) &&
|
|
1838
|
+
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || q(e, "expected valid JSON character");
|
|
1839
|
+
else Di.test(l) && q(e, "the stream contains non-printable characters");
|
|
1834
1840
|
e.result += l;
|
|
1835
1841
|
}
|
|
1836
1842
|
}
|
|
1837
1843
|
function nn(e, t, n, r) {
|
|
1838
1844
|
var a, i, o, l;
|
|
1839
|
-
for (te.isObject(n) ||
|
|
1845
|
+
for (te.isObject(n) || q(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), o = 0, l = a.length; o < l; o += 1)
|
|
1840
1846
|
i = a[o], Ae.call(t, i) || (t[i] = n[i], r[i] = !0);
|
|
1841
1847
|
}
|
|
1842
1848
|
function Ke(e, t, n, r, a, i, o, l, s) {
|
|
1843
1849
|
var u, d;
|
|
1844
1850
|
if (Array.isArray(a))
|
|
1845
1851
|
for (a = Array.prototype.slice.call(a), u = 0, d = a.length; u < d; u += 1)
|
|
1846
|
-
Array.isArray(a[u]) &&
|
|
1852
|
+
Array.isArray(a[u]) && q(e, "nested arrays are not supported inside keys"), typeof a == "object" && Xt(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1847
1853
|
if (typeof a == "object" && Xt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1848
1854
|
if (Array.isArray(i))
|
|
1849
1855
|
for (u = 0, d = i.length; u < d; u += 1)
|
|
@@ -1851,7 +1857,7 @@ function Ke(e, t, n, r, a, i, o, l, s) {
|
|
|
1851
1857
|
else
|
|
1852
1858
|
nn(e, t, i, n);
|
|
1853
1859
|
else
|
|
1854
|
-
!e.json && !Ae.call(n, a) && Ae.call(t, a) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
1860
|
+
!e.json && !Ae.call(n, a) && Ae.call(t, a) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, q(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(t, a, {
|
|
1855
1861
|
configurable: !0,
|
|
1856
1862
|
enumerable: !0,
|
|
1857
1863
|
writable: !0,
|
|
@@ -1859,20 +1865,20 @@ function Ke(e, t, n, r, a, i, o, l, s) {
|
|
|
1859
1865
|
}) : t[a] = i, delete n[a];
|
|
1860
1866
|
return t;
|
|
1861
1867
|
}
|
|
1862
|
-
function
|
|
1868
|
+
function Tt(e) {
|
|
1863
1869
|
var t;
|
|
1864
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1870
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : q(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1865
1871
|
}
|
|
1866
1872
|
function ee(e, t, n) {
|
|
1867
1873
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
1868
|
-
for (;
|
|
1874
|
+
for (; $e(a); )
|
|
1869
1875
|
a === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), a = e.input.charCodeAt(++e.position);
|
|
1870
1876
|
if (t && a === 35)
|
|
1871
1877
|
do
|
|
1872
1878
|
a = e.input.charCodeAt(++e.position);
|
|
1873
1879
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
1874
1880
|
if (he(a))
|
|
1875
|
-
for (
|
|
1881
|
+
for (Tt(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
1876
1882
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
1877
1883
|
else
|
|
1878
1884
|
break;
|
|
@@ -1883,36 +1889,36 @@ function ot(e) {
|
|
|
1883
1889
|
var t = e.position, n;
|
|
1884
1890
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || de(n)));
|
|
1885
1891
|
}
|
|
1886
|
-
function
|
|
1892
|
+
function $t(e, t) {
|
|
1887
1893
|
t === 1 ? e.result += " " : t > 1 && (e.result += te.repeat(`
|
|
1888
1894
|
`, t - 1));
|
|
1889
1895
|
}
|
|
1890
1896
|
function Zi(e, t, n) {
|
|
1891
|
-
var r, a, i, o, l, s, u, d, c = e.kind,
|
|
1892
|
-
if (
|
|
1897
|
+
var r, a, i, o, l, s, u, d, c = e.kind, b = e.result, g;
|
|
1898
|
+
if (g = e.input.charCodeAt(e.position), de(g) || Ee(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (a = e.input.charCodeAt(e.position + 1), de(a) || n && Ee(a)))
|
|
1893
1899
|
return !1;
|
|
1894
|
-
for (e.kind = "scalar", e.result = "", i = o = e.position, l = !1;
|
|
1895
|
-
if (
|
|
1896
|
-
if (a = e.input.charCodeAt(e.position + 1), de(a) || n &&
|
|
1900
|
+
for (e.kind = "scalar", e.result = "", i = o = e.position, l = !1; g !== 0; ) {
|
|
1901
|
+
if (g === 58) {
|
|
1902
|
+
if (a = e.input.charCodeAt(e.position + 1), de(a) || n && Ee(a))
|
|
1897
1903
|
break;
|
|
1898
|
-
} else if (
|
|
1904
|
+
} else if (g === 35) {
|
|
1899
1905
|
if (r = e.input.charCodeAt(e.position - 1), de(r))
|
|
1900
1906
|
break;
|
|
1901
1907
|
} else {
|
|
1902
|
-
if (e.position === e.lineStart && ot(e) || n &&
|
|
1908
|
+
if (e.position === e.lineStart && ot(e) || n && Ee(g))
|
|
1903
1909
|
break;
|
|
1904
|
-
if (he(
|
|
1910
|
+
if (he(g))
|
|
1905
1911
|
if (s = e.line, u = e.lineStart, d = e.lineIndent, ee(e, !1, -1), e.lineIndent >= t) {
|
|
1906
|
-
l = !0,
|
|
1912
|
+
l = !0, g = e.input.charCodeAt(e.position);
|
|
1907
1913
|
continue;
|
|
1908
1914
|
} else {
|
|
1909
1915
|
e.position = o, e.line = s, e.lineStart = u, e.lineIndent = d;
|
|
1910
1916
|
break;
|
|
1911
1917
|
}
|
|
1912
1918
|
}
|
|
1913
|
-
l && (_e(e, i, o, !1),
|
|
1919
|
+
l && (_e(e, i, o, !1), $t(e, e.line - s), i = o = e.position, l = !1), $e(g) || (o = e.position + 1), g = e.input.charCodeAt(++e.position);
|
|
1914
1920
|
}
|
|
1915
|
-
return _e(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result =
|
|
1921
|
+
return _e(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = b, !1);
|
|
1916
1922
|
}
|
|
1917
1923
|
function Qi(e, t) {
|
|
1918
1924
|
var n, r, a;
|
|
@@ -1924,8 +1930,8 @@ function Qi(e, t) {
|
|
|
1924
1930
|
r = e.position, e.position++, a = e.position;
|
|
1925
1931
|
else
|
|
1926
1932
|
return !0;
|
|
1927
|
-
else he(n) ? (_e(e, r, a, !0),
|
|
1928
|
-
|
|
1933
|
+
else he(n) ? (_e(e, r, a, !0), $t(e, ee(e, !1, t)), r = a = e.position) : e.position === e.lineStart && ot(e) ? q(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1934
|
+
q(e, "unexpected end of the stream within a single quoted scalar");
|
|
1929
1935
|
}
|
|
1930
1936
|
function Xi(e, t) {
|
|
1931
1937
|
var n, r, a, i, o, l;
|
|
@@ -1941,29 +1947,29 @@ function Xi(e, t) {
|
|
|
1941
1947
|
e.result += Xn[l], e.position++;
|
|
1942
1948
|
else if ((o = Hi(l)) > 0) {
|
|
1943
1949
|
for (a = o, i = 0; a > 0; a--)
|
|
1944
|
-
l = e.input.charCodeAt(++e.position), (o = Gi(l)) >= 0 ? i = (i << 4) + o :
|
|
1950
|
+
l = e.input.charCodeAt(++e.position), (o = Gi(l)) >= 0 ? i = (i << 4) + o : q(e, "expected hexadecimal character");
|
|
1945
1951
|
e.result += Wi(i), e.position++;
|
|
1946
1952
|
} else
|
|
1947
|
-
|
|
1953
|
+
q(e, "unknown escape sequence");
|
|
1948
1954
|
n = r = e.position;
|
|
1949
|
-
} else he(l) ? (_e(e, n, r, !0),
|
|
1955
|
+
} else he(l) ? (_e(e, n, r, !0), $t(e, ee(e, !1, t)), n = r = e.position) : e.position === e.lineStart && ot(e) ? q(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1950
1956
|
}
|
|
1951
|
-
|
|
1957
|
+
q(e, "unexpected end of the stream within a double quoted scalar");
|
|
1952
1958
|
}
|
|
1953
1959
|
function eo(e, t) {
|
|
1954
|
-
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, d, c,
|
|
1955
|
-
if (
|
|
1956
|
-
d = 93,
|
|
1957
|
-
else if (
|
|
1958
|
-
d = 125,
|
|
1960
|
+
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, d, c, b, g, I = /* @__PURE__ */ Object.create(null), L, k, U, T;
|
|
1961
|
+
if (T = e.input.charCodeAt(e.position), T === 91)
|
|
1962
|
+
d = 93, g = !1, l = [];
|
|
1963
|
+
else if (T === 123)
|
|
1964
|
+
d = 125, g = !0, l = {};
|
|
1959
1965
|
else
|
|
1960
1966
|
return !1;
|
|
1961
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1962
|
-
if (ee(e, !0, t),
|
|
1963
|
-
return e.position++, e.tag = o, e.anchor = s, e.kind =
|
|
1964
|
-
n ?
|
|
1967
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), T = e.input.charCodeAt(++e.position); T !== 0; ) {
|
|
1968
|
+
if (ee(e, !0, t), T = e.input.charCodeAt(e.position), T === d)
|
|
1969
|
+
return e.position++, e.tag = o, e.anchor = s, e.kind = g ? "mapping" : "sequence", e.result = l, !0;
|
|
1970
|
+
n ? T === 44 && q(e, "expected the node content, but found ','") : q(e, "missed comma between flow collection entries"), k = L = U = null, c = b = !1, T === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = b = !0, e.position++, ee(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, Le(e, t, Xe, !1, !0), k = e.tag, L = e.result, ee(e, !0, t), T = e.input.charCodeAt(e.position), (b || e.line === r) && T === 58 && (c = !0, T = e.input.charCodeAt(++e.position), ee(e, !0, t), Le(e, t, Xe, !1, !0), U = e.result), g ? Ke(e, l, I, k, L, U, r, a, i) : c ? l.push(Ke(e, null, I, k, L, U, r, a, i)) : l.push(L), ee(e, !0, t), T = e.input.charCodeAt(e.position), T === 44 ? (n = !0, T = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1965
1971
|
}
|
|
1966
|
-
|
|
1972
|
+
q(e, "unexpected end of the stream within a flow collection");
|
|
1967
1973
|
}
|
|
1968
1974
|
function to(e, t) {
|
|
1969
1975
|
var n, r, a = mt, i = !1, o = !1, l = t, s = 0, u = !1, d, c;
|
|
@@ -1975,22 +1981,22 @@ function to(e, t) {
|
|
|
1975
1981
|
return !1;
|
|
1976
1982
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1977
1983
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1978
|
-
mt === a ? a = c === 43 ? Qt : Vi :
|
|
1984
|
+
mt === a ? a = c === 43 ? Qt : Vi : q(e, "repeat of a chomping mode identifier");
|
|
1979
1985
|
else if ((d = Ji(c)) >= 0)
|
|
1980
|
-
d === 0 ?
|
|
1986
|
+
d === 0 ? q(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? q(e, "repeat of an indentation width identifier") : (l = t + d - 1, o = !0);
|
|
1981
1987
|
else
|
|
1982
1988
|
break;
|
|
1983
|
-
if (
|
|
1989
|
+
if ($e(c)) {
|
|
1984
1990
|
do
|
|
1985
1991
|
c = e.input.charCodeAt(++e.position);
|
|
1986
|
-
while (
|
|
1992
|
+
while ($e(c));
|
|
1987
1993
|
if (c === 35)
|
|
1988
1994
|
do
|
|
1989
1995
|
c = e.input.charCodeAt(++e.position);
|
|
1990
1996
|
while (!he(c) && c !== 0);
|
|
1991
1997
|
}
|
|
1992
1998
|
for (; c !== 0; ) {
|
|
1993
|
-
for (
|
|
1999
|
+
for (Tt(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && c === 32; )
|
|
1994
2000
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
1995
2001
|
if (!o && e.lineIndent > l && (l = e.lineIndent), he(c)) {
|
|
1996
2002
|
s++;
|
|
@@ -2002,7 +2008,7 @@ function to(e, t) {
|
|
|
2002
2008
|
`);
|
|
2003
2009
|
break;
|
|
2004
2010
|
}
|
|
2005
|
-
for (r ?
|
|
2011
|
+
for (r ? $e(c) ? (u = !0, e.result += te.repeat(`
|
|
2006
2012
|
`, i ? 1 + s : s)) : u ? (u = !1, e.result += te.repeat(`
|
|
2007
2013
|
`, s + 1)) : s === 0 ? i && (e.result += " ") : e.result += te.repeat(`
|
|
2008
2014
|
`, s) : e.result += te.repeat(`
|
|
@@ -2015,92 +2021,92 @@ function to(e, t) {
|
|
|
2015
2021
|
function rn(e, t) {
|
|
2016
2022
|
var n, r = e.tag, a = e.anchor, i = [], o, l = !1, s;
|
|
2017
2023
|
if (e.firstTabInLine !== -1) return !1;
|
|
2018
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2024
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, q(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !de(o)))); ) {
|
|
2019
2025
|
if (l = !0, e.position++, ee(e, !0, -1) && e.lineIndent <= t) {
|
|
2020
2026
|
i.push(null), s = e.input.charCodeAt(e.position);
|
|
2021
2027
|
continue;
|
|
2022
2028
|
}
|
|
2023
2029
|
if (n = e.line, Le(e, t, Wn, !1, !0), i.push(e.result), ee(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
2024
|
-
|
|
2030
|
+
q(e, "bad indentation of a sequence entry");
|
|
2025
2031
|
else if (e.lineIndent < t)
|
|
2026
2032
|
break;
|
|
2027
2033
|
}
|
|
2028
2034
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2029
2035
|
}
|
|
2030
2036
|
function no(e, t, n) {
|
|
2031
|
-
var r, a, i, o, l, s, u = e.tag, d = e.anchor, c = {},
|
|
2037
|
+
var r, a, i, o, l, s, u = e.tag, d = e.anchor, c = {}, b = /* @__PURE__ */ Object.create(null), g = null, I = null, L = null, k = !1, U = !1, T;
|
|
2032
2038
|
if (e.firstTabInLine !== -1) return !1;
|
|
2033
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
2034
|
-
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2035
|
-
|
|
2039
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), T = e.input.charCodeAt(e.position); T !== 0; ) {
|
|
2040
|
+
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, q(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (T === 63 || T === 58) && de(r))
|
|
2041
|
+
T === 63 ? (k && (Ke(e, c, b, g, I, null, o, l, s), g = I = L = null), U = !0, k = !0, a = !0) : k ? (k = !1, a = !0) : q(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, T = r;
|
|
2036
2042
|
else {
|
|
2037
2043
|
if (o = e.line, l = e.lineStart, s = e.position, !Le(e, n, Jn, !1, !0))
|
|
2038
2044
|
break;
|
|
2039
2045
|
if (e.line === i) {
|
|
2040
|
-
for (
|
|
2041
|
-
|
|
2042
|
-
if (
|
|
2043
|
-
|
|
2046
|
+
for (T = e.input.charCodeAt(e.position); $e(T); )
|
|
2047
|
+
T = e.input.charCodeAt(++e.position);
|
|
2048
|
+
if (T === 58)
|
|
2049
|
+
T = e.input.charCodeAt(++e.position), de(T) || q(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (Ke(e, c, b, g, I, null, o, l, s), g = I = L = null), U = !0, k = !1, a = !1, g = e.tag, I = e.result;
|
|
2044
2050
|
else if (U)
|
|
2045
|
-
|
|
2051
|
+
q(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2046
2052
|
else
|
|
2047
2053
|
return e.tag = u, e.anchor = d, !0;
|
|
2048
2054
|
} else if (U)
|
|
2049
|
-
|
|
2055
|
+
q(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2050
2056
|
else
|
|
2051
2057
|
return e.tag = u, e.anchor = d, !0;
|
|
2052
2058
|
}
|
|
2053
|
-
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Le(e, t, et, !0, a) && (k ? I = e.result :
|
|
2054
|
-
|
|
2059
|
+
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Le(e, t, et, !0, a) && (k ? I = e.result : L = e.result), k || (Ke(e, c, b, g, I, L, o, l, s), g = I = L = null), ee(e, !0, -1), T = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > t) && T !== 0)
|
|
2060
|
+
q(e, "bad indentation of a mapping entry");
|
|
2055
2061
|
else if (e.lineIndent < t)
|
|
2056
2062
|
break;
|
|
2057
2063
|
}
|
|
2058
|
-
return k && Ke(e, c,
|
|
2064
|
+
return k && Ke(e, c, b, g, I, null, o, l, s), U && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), U;
|
|
2059
2065
|
}
|
|
2060
2066
|
function ro(e) {
|
|
2061
2067
|
var t, n = !1, r = !1, a, i, o;
|
|
2062
2068
|
if (o = e.input.charCodeAt(e.position), o !== 33) return !1;
|
|
2063
|
-
if (e.tag !== null &&
|
|
2069
|
+
if (e.tag !== null && q(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, a = "!!", o = e.input.charCodeAt(++e.position)) : a = "!", t = e.position, n) {
|
|
2064
2070
|
do
|
|
2065
2071
|
o = e.input.charCodeAt(++e.position);
|
|
2066
2072
|
while (o !== 0 && o !== 62);
|
|
2067
|
-
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2073
|
+
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : q(e, "unexpected end of the stream within a verbatim tag");
|
|
2068
2074
|
} else {
|
|
2069
2075
|
for (; o !== 0 && !de(o); )
|
|
2070
|
-
o === 33 && (r ?
|
|
2071
|
-
i = e.input.slice(t, e.position), zi.test(i) &&
|
|
2076
|
+
o === 33 && (r ? q(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(t - 1, e.position + 1), Yn.test(a) || q(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2077
|
+
i = e.input.slice(t, e.position), zi.test(i) && q(e, "tag suffix cannot contain flow indicator characters");
|
|
2072
2078
|
}
|
|
2073
|
-
i && !Zn.test(i) &&
|
|
2079
|
+
i && !Zn.test(i) && q(e, "tag name cannot contain such characters: " + i);
|
|
2074
2080
|
try {
|
|
2075
2081
|
i = decodeURIComponent(i);
|
|
2076
2082
|
} catch {
|
|
2077
|
-
|
|
2083
|
+
q(e, "tag name is malformed: " + i);
|
|
2078
2084
|
}
|
|
2079
|
-
return n ? e.tag = i : Ae.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i :
|
|
2085
|
+
return n ? e.tag = i : Ae.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : q(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2080
2086
|
}
|
|
2081
2087
|
function ao(e) {
|
|
2082
2088
|
var t, n;
|
|
2083
2089
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
2084
|
-
for (e.anchor !== null &&
|
|
2090
|
+
for (e.anchor !== null && q(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !de(n) && !Ee(n); )
|
|
2085
2091
|
n = e.input.charCodeAt(++e.position);
|
|
2086
|
-
return e.position === t &&
|
|
2092
|
+
return e.position === t && q(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2087
2093
|
}
|
|
2088
2094
|
function io(e) {
|
|
2089
2095
|
var t, n, r;
|
|
2090
2096
|
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
2091
|
-
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !de(r) && !
|
|
2097
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !de(r) && !Ee(r); )
|
|
2092
2098
|
r = e.input.charCodeAt(++e.position);
|
|
2093
|
-
return e.position === t &&
|
|
2099
|
+
return e.position === t && q(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), Ae.call(e.anchorMap, n) || q(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], ee(e, !0, -1), !0;
|
|
2094
2100
|
}
|
|
2095
2101
|
function Le(e, t, n, r, a) {
|
|
2096
|
-
var i, o, l, s = 1, u = !1, d = !1, c,
|
|
2102
|
+
var i, o, l, s = 1, u = !1, d = !1, c, b, g, I, L, k;
|
|
2097
2103
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = l = et === n || Wn === n, r && ee(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2098
2104
|
for (; ro(e) || ao(e); )
|
|
2099
2105
|
ee(e, !0, -1) ? (u = !0, l = i, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2100
|
-
if (l && (l = u || a), (s === 1 || et === n) && (Xe === n || Jn === n ?
|
|
2106
|
+
if (l && (l = u || a), (s === 1 || et === n) && (Xe === n || Jn === n ? L = t : L = t + 1, k = e.position - e.lineStart, s === 1 ? l && (rn(e, k) || no(e, k, L)) || eo(e, L) ? d = !0 : (o && to(e, L) || Qi(e, L) || Xi(e, L) ? d = !0 : io(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && q(e, "alias node should not have any properties")) : Zi(e, L, Xe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && rn(e, k))), e.tag === null)
|
|
2101
2107
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2102
2108
|
else if (e.tag === "?") {
|
|
2103
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2109
|
+
for (e.result !== null && e.kind !== "scalar" && q(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, b = e.implicitTypes.length; c < b; c += 1)
|
|
2104
2110
|
if (I = e.implicitTypes[c], I.resolve(e.result)) {
|
|
2105
2111
|
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2106
2112
|
break;
|
|
@@ -2109,12 +2115,12 @@ function Le(e, t, n, r, a) {
|
|
|
2109
2115
|
if (Ae.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2110
2116
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2111
2117
|
else
|
|
2112
|
-
for (I = null,
|
|
2113
|
-
if (e.tag.slice(0,
|
|
2114
|
-
I =
|
|
2118
|
+
for (I = null, g = e.typeMap.multi[e.kind || "fallback"], c = 0, b = g.length; c < b; c += 1)
|
|
2119
|
+
if (e.tag.slice(0, g[c].tag.length) === g[c].tag) {
|
|
2120
|
+
I = g[c];
|
|
2115
2121
|
break;
|
|
2116
2122
|
}
|
|
2117
|
-
I ||
|
|
2123
|
+
I || q(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && q(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : q(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2118
2124
|
}
|
|
2119
2125
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2120
2126
|
}
|
|
@@ -2123,8 +2129,8 @@ function oo(e) {
|
|
|
2123
2129
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (ee(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2124
2130
|
for (i = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !de(o); )
|
|
2125
2131
|
o = e.input.charCodeAt(++e.position);
|
|
2126
|
-
for (r = e.input.slice(n, e.position), a = [], r.length < 1 &&
|
|
2127
|
-
for (;
|
|
2132
|
+
for (r = e.input.slice(n, e.position), a = [], r.length < 1 && q(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2133
|
+
for (; $e(o); )
|
|
2128
2134
|
o = e.input.charCodeAt(++e.position);
|
|
2129
2135
|
if (o === 35) {
|
|
2130
2136
|
do
|
|
@@ -2137,14 +2143,14 @@ function oo(e) {
|
|
|
2137
2143
|
o = e.input.charCodeAt(++e.position);
|
|
2138
2144
|
a.push(e.input.slice(n, e.position));
|
|
2139
2145
|
}
|
|
2140
|
-
o !== 0 &&
|
|
2146
|
+
o !== 0 && Tt(e), Ae.call(tn, r) ? tn[r](e, r, a) : tt(e, 'unknown document directive "' + r + '"');
|
|
2141
2147
|
}
|
|
2142
|
-
if (ee(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, ee(e, !0, -1)) : i &&
|
|
2148
|
+
if (ee(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, ee(e, !0, -1)) : i && q(e, "directives end mark is expected"), Le(e, e.lineIndent - 1, et, !1, !0), ee(e, !0, -1), e.checkLineBreaks && Pi.test(e.input.slice(t, e.position)) && tt(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && ot(e)) {
|
|
2143
2149
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ee(e, !0, -1));
|
|
2144
2150
|
return;
|
|
2145
2151
|
}
|
|
2146
2152
|
if (e.position < e.length - 1)
|
|
2147
|
-
|
|
2153
|
+
q(e, "end of the stream or a document separator is expected");
|
|
2148
2154
|
else
|
|
2149
2155
|
return;
|
|
2150
2156
|
}
|
|
@@ -2152,7 +2158,7 @@ function tr(e, t) {
|
|
|
2152
2158
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2153
2159
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2154
2160
|
var n = new Yi(e, t), r = e.indexOf("\0");
|
|
2155
|
-
for (r !== -1 && (n.position = r,
|
|
2161
|
+
for (r !== -1 && (n.position = r, q(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2156
2162
|
n.lineIndent += 1, n.position += 1;
|
|
2157
2163
|
for (; n.position < n.length - 1; )
|
|
2158
2164
|
oo(n);
|
|
@@ -2177,7 +2183,7 @@ function so(e, t) {
|
|
|
2177
2183
|
var uo = lo, co = so, nr = {
|
|
2178
2184
|
loadAll: uo,
|
|
2179
2185
|
load: co
|
|
2180
|
-
}, rr = Object.prototype.toString, ar = Object.prototype.hasOwnProperty,
|
|
2186
|
+
}, rr = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, Nt = 65279, po = 9, Ge = 10, fo = 13, mo = 32, go = 33, yo = 34, vt = 35, ho = 37, vo = 38, bo = 39, Co = 42, ir = 44, ko = 45, nt = 58, wo = 61, Io = 62, xo = 63, _o = 64, or = 91, lr = 93, So = 96, sr = 123, Ao = 124, ur = 125, le = {};
|
|
2181
2187
|
le[0] = "\\0";
|
|
2182
2188
|
le[7] = "\\a";
|
|
2183
2189
|
le[8] = "\\b";
|
|
@@ -2193,7 +2199,7 @@ le[133] = "\\N";
|
|
|
2193
2199
|
le[160] = "\\_";
|
|
2194
2200
|
le[8232] = "\\L";
|
|
2195
2201
|
le[8233] = "\\P";
|
|
2196
|
-
var
|
|
2202
|
+
var To = [
|
|
2197
2203
|
"y",
|
|
2198
2204
|
"Y",
|
|
2199
2205
|
"yes",
|
|
@@ -2210,8 +2216,8 @@ var $o = [
|
|
|
2210
2216
|
"off",
|
|
2211
2217
|
"Off",
|
|
2212
2218
|
"OFF"
|
|
2213
|
-
],
|
|
2214
|
-
function
|
|
2219
|
+
], $o = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2220
|
+
function No(e, t) {
|
|
2215
2221
|
var n, r, a, i, o, l, s;
|
|
2216
2222
|
if (t === null) return {};
|
|
2217
2223
|
for (n = {}, r = Object.keys(t), a = 0, i = r.length; a < i; a += 1)
|
|
@@ -2232,7 +2238,7 @@ function jo(e) {
|
|
|
2232
2238
|
}
|
|
2233
2239
|
var Oo = 1, He = 2;
|
|
2234
2240
|
function Mo(e) {
|
|
2235
|
-
this.schema = e.schema || At, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = te.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2241
|
+
this.schema = e.schema || At, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = te.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = No(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? He : Oo, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2236
2242
|
}
|
|
2237
2243
|
function an(e, t) {
|
|
2238
2244
|
for (var n = te.repeat(" ", t), r = 0, a = -1, i = "", o, l = e.length; r < l; )
|
|
@@ -2256,10 +2262,10 @@ function rt(e) {
|
|
|
2256
2262
|
return e === mo || e === po;
|
|
2257
2263
|
}
|
|
2258
2264
|
function Je(e) {
|
|
2259
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2265
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Nt || 65536 <= e && e <= 1114111;
|
|
2260
2266
|
}
|
|
2261
2267
|
function on(e) {
|
|
2262
|
-
return Je(e) && e !==
|
|
2268
|
+
return Je(e) && e !== Nt && e !== fo && e !== Ge;
|
|
2263
2269
|
}
|
|
2264
2270
|
function ln(e, t, n) {
|
|
2265
2271
|
var r = on(e), a = r && !rt(e);
|
|
@@ -2272,9 +2278,9 @@ function ln(e, t, n) {
|
|
|
2272
2278
|
);
|
|
2273
2279
|
}
|
|
2274
2280
|
function Fo(e) {
|
|
2275
|
-
return Je(e) && e !==
|
|
2281
|
+
return Je(e) && e !== Nt && !rt(e) && e !== ko && e !== xo && e !== nt && e !== ir && e !== or && e !== lr && e !== sr && e !== ur && e !== vt && e !== vo && e !== Co && e !== go && e !== Ao && e !== wo && e !== Io && e !== bo && e !== yo && e !== ho && e !== _o && e !== So;
|
|
2276
2282
|
}
|
|
2277
|
-
function
|
|
2283
|
+
function Bo(e) {
|
|
2278
2284
|
return !rt(e) && e !== nt;
|
|
2279
2285
|
}
|
|
2280
2286
|
function Pe(e, t) {
|
|
@@ -2285,39 +2291,39 @@ function cr(e) {
|
|
|
2285
2291
|
var t = /^\n* /;
|
|
2286
2292
|
return t.test(e);
|
|
2287
2293
|
}
|
|
2288
|
-
var dr = 1, Ct = 2, pr = 3, fr = 4,
|
|
2289
|
-
function
|
|
2290
|
-
var s, u = 0, d = null, c = !1,
|
|
2294
|
+
var dr = 1, Ct = 2, pr = 3, fr = 4, Be = 5;
|
|
2295
|
+
function Eo(e, t, n, r, a, i, o, l) {
|
|
2296
|
+
var s, u = 0, d = null, c = !1, b = !1, g = r !== -1, I = -1, L = Fo(Pe(e, 0)) && Bo(Pe(e, e.length - 1));
|
|
2291
2297
|
if (t || o)
|
|
2292
2298
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2293
2299
|
if (u = Pe(e, s), !Je(u))
|
|
2294
|
-
return
|
|
2295
|
-
|
|
2300
|
+
return Be;
|
|
2301
|
+
L = L && ln(u, d, l), d = u;
|
|
2296
2302
|
}
|
|
2297
2303
|
else {
|
|
2298
2304
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2299
2305
|
if (u = Pe(e, s), u === Ge)
|
|
2300
|
-
c = !0,
|
|
2306
|
+
c = !0, g && (b = b || // Foldable line = too long, and not more-indented.
|
|
2301
2307
|
s - I - 1 > r && e[I + 1] !== " ", I = s);
|
|
2302
2308
|
else if (!Je(u))
|
|
2303
|
-
return
|
|
2304
|
-
|
|
2309
|
+
return Be;
|
|
2310
|
+
L = L && ln(u, d, l), d = u;
|
|
2305
2311
|
}
|
|
2306
|
-
|
|
2312
|
+
b = b || g && s - I - 1 > r && e[I + 1] !== " ";
|
|
2307
2313
|
}
|
|
2308
|
-
return !c && !
|
|
2314
|
+
return !c && !b ? L && !o && !a(e) ? dr : i === He ? Be : Ct : n > 9 && cr(e) ? Be : o ? i === He ? Be : Ct : b ? fr : pr;
|
|
2309
2315
|
}
|
|
2310
2316
|
function Ko(e, t, n, r, a) {
|
|
2311
2317
|
e.dump = function() {
|
|
2312
2318
|
if (t.length === 0)
|
|
2313
2319
|
return e.quotingType === He ? '""' : "''";
|
|
2314
|
-
if (!e.noCompatMode && (
|
|
2320
|
+
if (!e.noCompatMode && (To.indexOf(t) !== -1 || $o.test(t)))
|
|
2315
2321
|
return e.quotingType === He ? '"' + t + '"' : "'" + t + "'";
|
|
2316
2322
|
var i = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - i), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2317
2323
|
function s(u) {
|
|
2318
2324
|
return qo(e, u);
|
|
2319
2325
|
}
|
|
2320
|
-
switch (
|
|
2326
|
+
switch (Eo(
|
|
2321
2327
|
t,
|
|
2322
2328
|
l,
|
|
2323
2329
|
e.indent,
|
|
@@ -2335,7 +2341,7 @@ function Ko(e, t, n, r, a) {
|
|
|
2335
2341
|
return "|" + sn(t, e.indent) + un(an(t, i));
|
|
2336
2342
|
case fr:
|
|
2337
2343
|
return ">" + sn(t, e.indent) + un(an(Lo(t, o), i));
|
|
2338
|
-
case
|
|
2344
|
+
case Be:
|
|
2339
2345
|
return '"' + Uo(t) + '"';
|
|
2340
2346
|
default:
|
|
2341
2347
|
throw new se("impossible error: invalid scalar style");
|
|
@@ -2400,7 +2406,7 @@ function Vo(e, t, n) {
|
|
|
2400
2406
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2401
2407
|
}
|
|
2402
2408
|
function Do(e, t, n, r) {
|
|
2403
|
-
var a = "", i = e.tag, o = Object.keys(n), l, s, u, d, c,
|
|
2409
|
+
var a = "", i = e.tag, o = Object.keys(n), l, s, u, d, c, b;
|
|
2404
2410
|
if (e.sortKeys === !0)
|
|
2405
2411
|
o.sort();
|
|
2406
2412
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2408,7 +2414,7 @@ function Do(e, t, n, r) {
|
|
|
2408
2414
|
else if (e.sortKeys)
|
|
2409
2415
|
throw new se("sortKeys must be a boolean or a function");
|
|
2410
2416
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2411
|
-
|
|
2417
|
+
b = "", (!r || a !== "") && (b += bt(e, t)), u = o[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), we(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Ge === e.dump.charCodeAt(0) ? b += "?" : b += "? "), b += e.dump, c && (b += bt(e, t)), we(e, t + 1, d, !0, c) && (e.dump && Ge === e.dump.charCodeAt(0) ? b += ":" : b += ": ", b += e.dump, a += b));
|
|
2412
2418
|
e.tag = i, e.dump = a || "{}";
|
|
2413
2419
|
}
|
|
2414
2420
|
function pn(e, t, n) {
|
|
@@ -2432,14 +2438,14 @@ function we(e, t, n, r, a, i, o) {
|
|
|
2432
2438
|
e.tag = null, e.dump = n, pn(e, n, !1) || pn(e, n, !0);
|
|
2433
2439
|
var l = rr.call(e.dump), s = r, u;
|
|
2434
2440
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2435
|
-
var d = l === "[object Object]" || l === "[object Array]", c,
|
|
2436
|
-
if (d && (c = e.duplicates.indexOf(n),
|
|
2441
|
+
var d = l === "[object Object]" || l === "[object Array]", c, b;
|
|
2442
|
+
if (d && (c = e.duplicates.indexOf(n), b = c !== -1), (e.tag !== null && e.tag !== "?" || b || e.indent !== 2 && t > 0) && (a = !1), b && e.usedDuplicates[c])
|
|
2437
2443
|
e.dump = "*ref_" + c;
|
|
2438
2444
|
else {
|
|
2439
|
-
if (d &&
|
|
2440
|
-
r && Object.keys(e.dump).length !== 0 ? (Do(e, t, e.dump, a),
|
|
2445
|
+
if (d && b && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2446
|
+
r && Object.keys(e.dump).length !== 0 ? (Do(e, t, e.dump, a), b && (e.dump = "&ref_" + c + e.dump)) : (Vo(e, t, e.dump), b && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2441
2447
|
else if (l === "[object Array]")
|
|
2442
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? dn(e, t - 1, e.dump, a) : dn(e, t, e.dump, a),
|
|
2448
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? dn(e, t - 1, e.dump, a) : dn(e, t, e.dump, a), b && (e.dump = "&ref_" + c + e.dump)) : (Ro(e, t, e.dump), b && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2443
2449
|
else if (l === "[object String]")
|
|
2444
2450
|
e.tag !== "?" && Ko(e, e.dump, t, i, s);
|
|
2445
2451
|
else {
|
|
@@ -2486,20 +2492,20 @@ function jt(e, t) {
|
|
|
2486
2492
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2487
2493
|
};
|
|
2488
2494
|
}
|
|
2489
|
-
var Jo = ie, Wo =
|
|
2495
|
+
var Jo = ie, Wo = $n, Yo = Mn, Zo = Kn, Qo = Ln, Xo = At, el = nr.load, tl = nr.loadAll, nl = Ho.dump, rl = se, al = {
|
|
2490
2496
|
binary: Pn,
|
|
2491
|
-
float:
|
|
2497
|
+
float: En,
|
|
2492
2498
|
map: On,
|
|
2493
2499
|
null: qn,
|
|
2494
2500
|
pairs: Gn,
|
|
2495
2501
|
set: Hn,
|
|
2496
2502
|
timestamp: Vn,
|
|
2497
2503
|
bool: Fn,
|
|
2498
|
-
int:
|
|
2504
|
+
int: Bn,
|
|
2499
2505
|
merge: Dn,
|
|
2500
2506
|
omap: zn,
|
|
2501
2507
|
seq: jn,
|
|
2502
|
-
str:
|
|
2508
|
+
str: Nn
|
|
2503
2509
|
}, il = jt("safeLoad", "load"), ol = jt("safeLoadAll", "loadAll"), ll = jt("safeDump", "dump"), sl = {
|
|
2504
2510
|
Type: Jo,
|
|
2505
2511
|
Schema: Wo,
|
|
@@ -2526,20 +2532,20 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2526
2532
|
}
|
|
2527
2533
|
},
|
|
2528
2534
|
setup(e) {
|
|
2529
|
-
const t = e, n =
|
|
2535
|
+
const t = e, n = x(() => {
|
|
2530
2536
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, a]) => a !== null && a !== "" && (Array.isArray(a) ? a.length !== 0 : !0)));
|
|
2531
2537
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : sl.dump(r).trim();
|
|
2532
2538
|
});
|
|
2533
2539
|
return (r, a) => {
|
|
2534
|
-
const i =
|
|
2540
|
+
const i = V("KCodeBlock");
|
|
2535
2541
|
return f(), O("div", ul, [
|
|
2536
|
-
t.yamlRecord ? (f(),
|
|
2542
|
+
t.yamlRecord ? (f(), D(i, {
|
|
2537
2543
|
key: 0,
|
|
2538
2544
|
id: "yaml-codeblock",
|
|
2539
2545
|
code: n.value,
|
|
2540
2546
|
language: "yaml",
|
|
2541
2547
|
theme: "dark"
|
|
2542
|
-
}, null, 8, ["code"])) :
|
|
2548
|
+
}, null, 8, ["code"])) : z("", !0)
|
|
2543
2549
|
]);
|
|
2544
2550
|
};
|
|
2545
2551
|
}
|
|
@@ -2588,7 +2594,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2588
2594
|
}
|
|
2589
2595
|
},
|
|
2590
2596
|
setup(e) {
|
|
2591
|
-
const t = e, n = It(), { i18n: { t: r } } = ne.useI18n(), a = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), i =
|
|
2597
|
+
const t = e, n = It(), { i18n: { t: r } } = ne.useI18n(), a = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), i = x(() => {
|
|
2592
2598
|
if (!t.record)
|
|
2593
2599
|
return t.record;
|
|
2594
2600
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2598,14 +2604,14 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2598
2604
|
e.format === "structured" ? (f(), O("div", cl, [
|
|
2599
2605
|
(f(!0), O(fe, null, pe(e.propListTypes, (s) => (f(), O("div", {
|
|
2600
2606
|
key: `config-card-details-${s}-props`,
|
|
2601
|
-
class:
|
|
2607
|
+
class: Se(`config-card-details-${s}-props`),
|
|
2602
2608
|
"data-testid": `config-card-details-${s}-props`
|
|
2603
2609
|
}, [
|
|
2604
|
-
s !== "basic" ? (f(), O("div", pl, j(s === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) :
|
|
2605
|
-
(f(!0), O(fe, null, pe(e.propertyCollections[s], (u) => (f(),
|
|
2610
|
+
s !== "basic" ? (f(), O("div", pl, j(s === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
2611
|
+
(f(!0), O(fe, null, pe(e.propertyCollections[s], (u) => (f(), D(_n, {
|
|
2606
2612
|
key: u.key,
|
|
2607
2613
|
item: u
|
|
2608
|
-
},
|
|
2614
|
+
}, Ne({
|
|
2609
2615
|
label: h(() => [
|
|
2610
2616
|
Q(o.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2611
2617
|
]),
|
|
@@ -2626,18 +2632,18 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2626
2632
|
} : void 0
|
|
2627
2633
|
]), 1032, ["item"]))), 128))
|
|
2628
2634
|
], 10, dl))), 128))
|
|
2629
|
-
])) :
|
|
2630
|
-
e.format === "json" && t.record ? (f(),
|
|
2635
|
+
])) : z("", !0),
|
|
2636
|
+
e.format === "json" && t.record ? (f(), D(Sn, {
|
|
2631
2637
|
key: 1,
|
|
2632
2638
|
config: t.config,
|
|
2633
2639
|
"fetcher-url": t.fetcherUrl,
|
|
2634
2640
|
"json-record": i.value,
|
|
2635
2641
|
"request-method": "get"
|
|
2636
|
-
}, null, 8, ["config", "fetcher-url", "json-record"])) :
|
|
2637
|
-
e.format === "yaml" && t.record ? (f(),
|
|
2642
|
+
}, null, 8, ["config", "fetcher-url", "json-record"])) : z("", !0),
|
|
2643
|
+
e.format === "yaml" && t.record ? (f(), D(mr, {
|
|
2638
2644
|
key: 2,
|
|
2639
2645
|
"yaml-record": i.value
|
|
2640
|
-
}, null, 8, ["yaml-record"])) :
|
|
2646
|
+
}, null, 8, ["yaml-record"])) : z("", !0)
|
|
2641
2647
|
], 64));
|
|
2642
2648
|
}
|
|
2643
2649
|
}), ml = /* @__PURE__ */ me(fl, [["__scopeId", "data-v-2052238b"]]), ve = "24px", We = (e, t) => {
|
|
@@ -2648,7 +2654,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2648
2654
|
}, gl = (e) => (Re("data-v-29e33a24"), e = e(), Ve(), e), yl = ["aria-hidden"], hl = {
|
|
2649
2655
|
key: 0,
|
|
2650
2656
|
"data-testid": "kui-icon-svg-title"
|
|
2651
|
-
}, vl = /* @__PURE__ */ gl(() => /* @__PURE__ */
|
|
2657
|
+
}, vl = /* @__PURE__ */ gl(() => /* @__PURE__ */ F("path", {
|
|
2652
2658
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
2653
2659
|
fill: "currentColor"
|
|
2654
2660
|
}, null, -1)), bl = /* @__PURE__ */ W({
|
|
@@ -2703,7 +2709,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2703
2709
|
}
|
|
2704
2710
|
},
|
|
2705
2711
|
setup(e) {
|
|
2706
|
-
const t = e, n =
|
|
2712
|
+
const t = e, n = x(() => {
|
|
2707
2713
|
if (typeof t.size == "number" && t.size > 0)
|
|
2708
2714
|
return `${t.size}px`;
|
|
2709
2715
|
if (typeof t.size == "string") {
|
|
@@ -2712,7 +2718,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2712
2718
|
return `${i}px`;
|
|
2713
2719
|
}
|
|
2714
2720
|
return ve;
|
|
2715
|
-
}), r =
|
|
2721
|
+
}), r = x(() => ({
|
|
2716
2722
|
boxSizing: "border-box",
|
|
2717
2723
|
color: t.color,
|
|
2718
2724
|
display: t.display,
|
|
@@ -2720,7 +2726,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2720
2726
|
lineHeight: "0",
|
|
2721
2727
|
width: n.value
|
|
2722
2728
|
}));
|
|
2723
|
-
return (a, i) => (f(),
|
|
2729
|
+
return (a, i) => (f(), D(be(e.as), {
|
|
2724
2730
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2725
2731
|
class: "kui-icon add-icon",
|
|
2726
2732
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
@@ -2737,7 +2743,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2737
2743
|
width: "100%",
|
|
2738
2744
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2739
2745
|
}, [
|
|
2740
|
-
e.title ? (f(), O("title", hl, j(e.title), 1)) :
|
|
2746
|
+
e.title ? (f(), O("title", hl, j(e.title), 1)) : z("", !0),
|
|
2741
2747
|
vl
|
|
2742
2748
|
], 8, yl))
|
|
2743
2749
|
]),
|
|
@@ -2747,7 +2753,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2747
2753
|
}), Cl = /* @__PURE__ */ We(bl, [["__scopeId", "data-v-29e33a24"]]), kl = (e) => (Re("data-v-908424dd"), e = e(), Ve(), e), wl = ["aria-hidden"], Il = {
|
|
2748
2754
|
key: 0,
|
|
2749
2755
|
"data-testid": "kui-icon-svg-title"
|
|
2750
|
-
},
|
|
2756
|
+
}, xl = /* @__PURE__ */ kl(() => /* @__PURE__ */ F("path", {
|
|
2751
2757
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2752
2758
|
fill: "currentColor"
|
|
2753
2759
|
}, null, -1)), _l = /* @__PURE__ */ W({
|
|
@@ -2802,7 +2808,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2802
2808
|
}
|
|
2803
2809
|
},
|
|
2804
2810
|
setup(e) {
|
|
2805
|
-
const t = e, n =
|
|
2811
|
+
const t = e, n = x(() => {
|
|
2806
2812
|
if (typeof t.size == "number" && t.size > 0)
|
|
2807
2813
|
return `${t.size}px`;
|
|
2808
2814
|
if (typeof t.size == "string") {
|
|
@@ -2811,7 +2817,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2811
2817
|
return `${i}px`;
|
|
2812
2818
|
}
|
|
2813
2819
|
return ve;
|
|
2814
|
-
}), r =
|
|
2820
|
+
}), r = x(() => ({
|
|
2815
2821
|
boxSizing: "border-box",
|
|
2816
2822
|
color: t.color,
|
|
2817
2823
|
display: t.display,
|
|
@@ -2819,7 +2825,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2819
2825
|
lineHeight: "0",
|
|
2820
2826
|
width: n.value
|
|
2821
2827
|
}));
|
|
2822
|
-
return (a, i) => (f(),
|
|
2828
|
+
return (a, i) => (f(), D(be(e.as), {
|
|
2823
2829
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2824
2830
|
class: "kui-icon book-icon",
|
|
2825
2831
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
@@ -2836,17 +2842,17 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2836
2842
|
width: "100%",
|
|
2837
2843
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2838
2844
|
}, [
|
|
2839
|
-
e.title ? (f(), O("title", Il, j(e.title), 1)) :
|
|
2840
|
-
|
|
2845
|
+
e.title ? (f(), O("title", Il, j(e.title), 1)) : z("", !0),
|
|
2846
|
+
xl
|
|
2841
2847
|
], 8, wl))
|
|
2842
2848
|
]),
|
|
2843
2849
|
_: 1
|
|
2844
2850
|
}, 8, ["aria-hidden", "style"]));
|
|
2845
2851
|
}
|
|
2846
|
-
}),
|
|
2852
|
+
}), Sl = /* @__PURE__ */ We(_l, [["__scopeId", "data-v-908424dd"]]), Al = (e) => (Re("data-v-45e3fd13"), e = e(), Ve(), e), Tl = ["aria-hidden"], $l = {
|
|
2847
2853
|
key: 0,
|
|
2848
2854
|
"data-testid": "kui-icon-svg-title"
|
|
2849
|
-
},
|
|
2855
|
+
}, Nl = /* @__PURE__ */ Al(() => /* @__PURE__ */ F("path", {
|
|
2850
2856
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2851
2857
|
fill: "currentColor"
|
|
2852
2858
|
}, null, -1)), jl = /* @__PURE__ */ W({
|
|
@@ -2901,7 +2907,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2901
2907
|
}
|
|
2902
2908
|
},
|
|
2903
2909
|
setup(e) {
|
|
2904
|
-
const t = e, n =
|
|
2910
|
+
const t = e, n = x(() => {
|
|
2905
2911
|
if (typeof t.size == "number" && t.size > 0)
|
|
2906
2912
|
return `${t.size}px`;
|
|
2907
2913
|
if (typeof t.size == "string") {
|
|
@@ -2910,7 +2916,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2910
2916
|
return `${i}px`;
|
|
2911
2917
|
}
|
|
2912
2918
|
return ve;
|
|
2913
|
-
}), r =
|
|
2919
|
+
}), r = x(() => ({
|
|
2914
2920
|
boxSizing: "border-box",
|
|
2915
2921
|
color: t.color,
|
|
2916
2922
|
display: t.display,
|
|
@@ -2918,7 +2924,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2918
2924
|
lineHeight: "0",
|
|
2919
2925
|
width: n.value
|
|
2920
2926
|
}));
|
|
2921
|
-
return (a, i) => (f(),
|
|
2927
|
+
return (a, i) => (f(), D(be(e.as), {
|
|
2922
2928
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2923
2929
|
class: "kui-icon chevron-down-icon",
|
|
2924
2930
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
@@ -2935,9 +2941,9 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2935
2941
|
width: "100%",
|
|
2936
2942
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2937
2943
|
}, [
|
|
2938
|
-
e.title ? (f(), O("title",
|
|
2939
|
-
|
|
2940
|
-
], 8,
|
|
2944
|
+
e.title ? (f(), O("title", $l, j(e.title), 1)) : z("", !0),
|
|
2945
|
+
Nl
|
|
2946
|
+
], 8, Tl))
|
|
2941
2947
|
]),
|
|
2942
2948
|
_: 1
|
|
2943
2949
|
}, 8, ["aria-hidden", "style"]));
|
|
@@ -2945,10 +2951,10 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2945
2951
|
}), Ol = /* @__PURE__ */ We(jl, [["__scopeId", "data-v-45e3fd13"]]), Ml = (e) => (Re("data-v-dfc3b92b"), e = e(), Ve(), e), ql = ["aria-hidden"], Fl = {
|
|
2946
2952
|
key: 0,
|
|
2947
2953
|
"data-testid": "kui-icon-svg-title"
|
|
2948
|
-
},
|
|
2954
|
+
}, Bl = /* @__PURE__ */ Ml(() => /* @__PURE__ */ F("path", {
|
|
2949
2955
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2950
2956
|
fill: "currentColor"
|
|
2951
|
-
}, null, -1)),
|
|
2957
|
+
}, null, -1)), El = /* @__PURE__ */ W({
|
|
2952
2958
|
__name: "CloseIcon",
|
|
2953
2959
|
props: {
|
|
2954
2960
|
/** The accessibility text provided to screen readers */
|
|
@@ -3000,7 +3006,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3000
3006
|
}
|
|
3001
3007
|
},
|
|
3002
3008
|
setup(e) {
|
|
3003
|
-
const t = e, n =
|
|
3009
|
+
const t = e, n = x(() => {
|
|
3004
3010
|
if (typeof t.size == "number" && t.size > 0)
|
|
3005
3011
|
return `${t.size}px`;
|
|
3006
3012
|
if (typeof t.size == "string") {
|
|
@@ -3009,7 +3015,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3009
3015
|
return `${i}px`;
|
|
3010
3016
|
}
|
|
3011
3017
|
return ve;
|
|
3012
|
-
}), r =
|
|
3018
|
+
}), r = x(() => ({
|
|
3013
3019
|
boxSizing: "border-box",
|
|
3014
3020
|
color: t.color,
|
|
3015
3021
|
display: t.display,
|
|
@@ -3017,7 +3023,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3017
3023
|
lineHeight: "0",
|
|
3018
3024
|
width: n.value
|
|
3019
3025
|
}));
|
|
3020
|
-
return (a, i) => (f(),
|
|
3026
|
+
return (a, i) => (f(), D(be(e.as), {
|
|
3021
3027
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3022
3028
|
class: "kui-icon close-icon",
|
|
3023
3029
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
@@ -3034,17 +3040,17 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3034
3040
|
width: "100%",
|
|
3035
3041
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3036
3042
|
}, [
|
|
3037
|
-
e.title ? (f(), O("title", Fl, j(e.title), 1)) :
|
|
3038
|
-
|
|
3043
|
+
e.title ? (f(), O("title", Fl, j(e.title), 1)) : z("", !0),
|
|
3044
|
+
Bl
|
|
3039
3045
|
], 8, ql))
|
|
3040
3046
|
]),
|
|
3041
3047
|
_: 1
|
|
3042
3048
|
}, 8, ["aria-hidden", "style"]));
|
|
3043
3049
|
}
|
|
3044
|
-
}), Kl = /* @__PURE__ */ We(
|
|
3050
|
+
}), Kl = /* @__PURE__ */ We(El, [["__scopeId", "data-v-dfc3b92b"]]), Ll = (e) => (Re("data-v-df363764"), e = e(), Ve(), e), Ul = ["aria-hidden"], Rl = {
|
|
3045
3051
|
key: 0,
|
|
3046
3052
|
"data-testid": "kui-icon-svg-title"
|
|
3047
|
-
}, Vl = /* @__PURE__ */ Ll(() => /* @__PURE__ */
|
|
3053
|
+
}, Vl = /* @__PURE__ */ Ll(() => /* @__PURE__ */ F("path", {
|
|
3048
3054
|
d: "M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z",
|
|
3049
3055
|
fill: "currentColor"
|
|
3050
3056
|
}, null, -1)), Dl = /* @__PURE__ */ W({
|
|
@@ -3099,7 +3105,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3099
3105
|
}
|
|
3100
3106
|
},
|
|
3101
3107
|
setup(e) {
|
|
3102
|
-
const t = e, n =
|
|
3108
|
+
const t = e, n = x(() => {
|
|
3103
3109
|
if (typeof t.size == "number" && t.size > 0)
|
|
3104
3110
|
return `${t.size}px`;
|
|
3105
3111
|
if (typeof t.size == "string") {
|
|
@@ -3108,7 +3114,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3108
3114
|
return `${i}px`;
|
|
3109
3115
|
}
|
|
3110
3116
|
return ve;
|
|
3111
|
-
}), r =
|
|
3117
|
+
}), r = x(() => ({
|
|
3112
3118
|
boxSizing: "border-box",
|
|
3113
3119
|
color: t.color,
|
|
3114
3120
|
display: t.display,
|
|
@@ -3116,7 +3122,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3116
3122
|
lineHeight: "0",
|
|
3117
3123
|
width: n.value
|
|
3118
3124
|
}));
|
|
3119
|
-
return (a, i) => (f(),
|
|
3125
|
+
return (a, i) => (f(), D(be(e.as), {
|
|
3120
3126
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3121
3127
|
class: "kui-icon more-icon",
|
|
3122
3128
|
"data-testid": "kui-icon-wrapper-more-icon",
|
|
@@ -3133,7 +3139,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3133
3139
|
width: "100%",
|
|
3134
3140
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3135
3141
|
}, [
|
|
3136
|
-
e.title ? (f(), O("title", Rl, j(e.title), 1)) :
|
|
3142
|
+
e.title ? (f(), O("title", Rl, j(e.title), 1)) : z("", !0),
|
|
3137
3143
|
Vl
|
|
3138
3144
|
], 8, Ul))
|
|
3139
3145
|
]),
|
|
@@ -3238,7 +3244,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3238
3244
|
}
|
|
3239
3245
|
], d = B("structured"), c = (p) => {
|
|
3240
3246
|
d.value = p == null ? void 0 : p.value;
|
|
3241
|
-
},
|
|
3247
|
+
}, b = {
|
|
3242
3248
|
id: {
|
|
3243
3249
|
type: Z.ID,
|
|
3244
3250
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
@@ -3272,77 +3278,77 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3272
3278
|
// the last property displayed
|
|
3273
3279
|
section: ce.Basic
|
|
3274
3280
|
}
|
|
3275
|
-
},
|
|
3276
|
-
var p,
|
|
3281
|
+
}, g = B(!1), I = B(!1), L = B(""), k = B({}), U = x(() => {
|
|
3282
|
+
var p, C, v;
|
|
3277
3283
|
if (!k.value)
|
|
3278
3284
|
return [];
|
|
3279
|
-
const
|
|
3280
|
-
for (const
|
|
3281
|
-
const
|
|
3282
|
-
let
|
|
3283
|
-
(
|
|
3285
|
+
const y = [], A = Object.keys(k.value).length;
|
|
3286
|
+
for (const R in k.value) {
|
|
3287
|
+
const S = (C = (p = a.configSchema) == null ? void 0 : p[R]) == null ? void 0 : C.order, M = (v = b[R]) == null ? void 0 : v.order;
|
|
3288
|
+
let K = A;
|
|
3289
|
+
(M || M === 0) && (K = M === -1 ? A + 1 : M), S && (K = S === -1 ? A + 1 : S), y.push([R, K]);
|
|
3284
3290
|
}
|
|
3285
|
-
return
|
|
3286
|
-
return
|
|
3287
|
-
}),
|
|
3288
|
-
var
|
|
3289
|
-
const
|
|
3291
|
+
return y.sort(function(R, S) {
|
|
3292
|
+
return R[1] - S[1];
|
|
3293
|
+
}), y.map((R) => {
|
|
3294
|
+
var S, M;
|
|
3295
|
+
const K = R[0], P = (S = k.value) == null ? void 0 : S[K], G = ((M = a.configSchema) == null ? void 0 : M[K]) || {}, oe = b[K];
|
|
3290
3296
|
return {
|
|
3291
|
-
key:
|
|
3292
|
-
value:
|
|
3293
|
-
hidden:
|
|
3294
|
-
type:
|
|
3295
|
-
label:
|
|
3296
|
-
tooltip:
|
|
3297
|
-
section:
|
|
3297
|
+
key: K,
|
|
3298
|
+
value: P,
|
|
3299
|
+
hidden: G.hidden || !1,
|
|
3300
|
+
type: G.type ?? ((oe == null ? void 0 : oe.type) || Z.Text),
|
|
3301
|
+
label: G.label ?? ((oe == null ? void 0 : oe.label) || l(K)),
|
|
3302
|
+
tooltip: G.tooltip ?? ((oe == null ? void 0 : oe.tooltip) || void 0),
|
|
3303
|
+
section: G.section ?? ((oe == null ? void 0 : oe.section) || ce.Advanced)
|
|
3298
3304
|
};
|
|
3299
|
-
}).filter((
|
|
3300
|
-
}),
|
|
3301
|
-
var p,
|
|
3305
|
+
}).filter((R) => !R.hidden && R.key !== a.pluginConfigKey);
|
|
3306
|
+
}), T = x(() => {
|
|
3307
|
+
var p, C;
|
|
3302
3308
|
if (!k.value || !a.pluginConfigKey)
|
|
3303
3309
|
return [];
|
|
3304
|
-
const v = k.value[a.pluginConfigKey] || {},
|
|
3305
|
-
for (const
|
|
3306
|
-
const
|
|
3307
|
-
let
|
|
3308
|
-
|
|
3310
|
+
const v = k.value[a.pluginConfigKey] || {}, y = Object.keys(v).length, A = [];
|
|
3311
|
+
for (const R in v) {
|
|
3312
|
+
const S = (C = (p = a.pluginConfigSchema) == null ? void 0 : p[R]) == null ? void 0 : C.order, M = v[R];
|
|
3313
|
+
let K = M != null && M !== "" ? y - 1 : y;
|
|
3314
|
+
S && (K = S === -1 ? y + 1 : S), A.push([R, K]);
|
|
3309
3315
|
}
|
|
3310
|
-
return
|
|
3311
|
-
return
|
|
3312
|
-
}),
|
|
3313
|
-
var
|
|
3314
|
-
const
|
|
3316
|
+
return A.sort(function(R, S) {
|
|
3317
|
+
return R[1] - S[1];
|
|
3318
|
+
}), A.map((R) => {
|
|
3319
|
+
var S;
|
|
3320
|
+
const M = R[0], K = v[M], P = ((S = a.pluginConfigSchema) == null ? void 0 : S[M]) || {};
|
|
3315
3321
|
return {
|
|
3316
|
-
key:
|
|
3317
|
-
value:
|
|
3318
|
-
hidden:
|
|
3319
|
-
type:
|
|
3320
|
-
label:
|
|
3321
|
-
tooltip:
|
|
3322
|
+
key: M,
|
|
3323
|
+
value: K,
|
|
3324
|
+
hidden: P.hidden || !1,
|
|
3325
|
+
type: P.type ?? Z.Text,
|
|
3326
|
+
label: P.label ?? l(M),
|
|
3327
|
+
tooltip: P.tooltip ?? void 0,
|
|
3322
3328
|
section: ce.Plugin
|
|
3323
3329
|
};
|
|
3324
|
-
}).filter((
|
|
3325
|
-
}),
|
|
3326
|
-
var p,
|
|
3330
|
+
}).filter((R) => !R.hidden);
|
|
3331
|
+
}), E = x(() => {
|
|
3332
|
+
var p, C, v, y;
|
|
3327
3333
|
return {
|
|
3328
|
-
basic: (p = U.value) == null ? void 0 : p.filter((
|
|
3329
|
-
advanced: (
|
|
3330
|
-
plugin: (
|
|
3334
|
+
basic: (p = U.value) == null ? void 0 : p.filter((A) => A.section === ce.Basic),
|
|
3335
|
+
advanced: (C = U.value) == null ? void 0 : C.filter((A) => A.section === ce.Advanced),
|
|
3336
|
+
plugin: (y = T.value) == null ? void 0 : y.concat((v = U.value) == null ? void 0 : v.filter((A) => A.section === ce.Plugin))
|
|
3331
3337
|
};
|
|
3332
|
-
}),
|
|
3338
|
+
}), w = x(() => {
|
|
3333
3339
|
const p = [];
|
|
3334
|
-
return
|
|
3335
|
-
}),
|
|
3336
|
-
var p,
|
|
3340
|
+
return E.value.basic.length && p.push("basic"), E.value.advanced.length && p.push("advanced"), E.value.plugin.length && p.push("plugin"), p;
|
|
3341
|
+
}), _ = x(() => {
|
|
3342
|
+
var p, C;
|
|
3337
3343
|
let v = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3338
|
-
return a.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((p = a.config) == null ? void 0 : p.controlPlaneId) || "") : a.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (
|
|
3344
|
+
return a.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((p = a.config) == null ? void 0 : p.controlPlaneId) || "") : a.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (C = a.config) != null && C.workspace ? `/${a.config.workspace}` : "")), v = v.replace(/{id}/gi, a.config.entityId), v;
|
|
3339
3345
|
});
|
|
3340
|
-
return ke(
|
|
3346
|
+
return ke(g, (p) => {
|
|
3341
3347
|
r("loading", p);
|
|
3342
3348
|
}, { immediate: !0 }), wt(async () => {
|
|
3343
|
-
I.value = !1,
|
|
3349
|
+
I.value = !1, g.value = !0;
|
|
3344
3350
|
try {
|
|
3345
|
-
const { data: p } = await s.get(
|
|
3351
|
+
const { data: p } = await s.get(_.value);
|
|
3346
3352
|
if (a.dataKey)
|
|
3347
3353
|
if (typeof p[a.dataKey] < "u")
|
|
3348
3354
|
k.value = { ...p[a.dataKey] };
|
|
@@ -3350,25 +3356,25 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3350
3356
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3351
3357
|
else
|
|
3352
3358
|
k.value = { ...p };
|
|
3353
|
-
Object.keys(a.configSchema).filter((
|
|
3354
|
-
k.value && typeof k.value[
|
|
3359
|
+
Object.keys(a.configSchema).filter((C) => a.configSchema[C].forceShow).forEach((C) => {
|
|
3360
|
+
k.value && typeof k.value[C] > "u" && (k.value[C] = null);
|
|
3355
3361
|
}), r("fetch:success", p);
|
|
3356
3362
|
} catch (p) {
|
|
3357
|
-
const
|
|
3358
|
-
|
|
3363
|
+
const C = o(p);
|
|
3364
|
+
L.value = C.startsWith("code") ? i("baseConfigCard.errors.load") : C, I.value = !0, r("fetch:error", p);
|
|
3359
3365
|
} finally {
|
|
3360
|
-
|
|
3366
|
+
g.value = !1;
|
|
3361
3367
|
}
|
|
3362
|
-
}), (p,
|
|
3363
|
-
const v =
|
|
3364
|
-
return f(),
|
|
3368
|
+
}), (p, C) => {
|
|
3369
|
+
const v = V("KLabel"), y = V("KSelect"), A = V("KButton"), R = V("KSkeleton"), S = V("KEmptyState"), M = V("KCard");
|
|
3370
|
+
return f(), D(M, {
|
|
3365
3371
|
class: "kong-ui-entity-base-config-card",
|
|
3366
3372
|
"title-tag": e.titleTag
|
|
3367
|
-
},
|
|
3373
|
+
}, Ne({
|
|
3368
3374
|
actions: h(() => [
|
|
3369
|
-
|
|
3375
|
+
F("div", Gl, [
|
|
3370
3376
|
Q(p.$slots, "actions", {}, void 0, !0),
|
|
3371
|
-
|
|
3377
|
+
N(v, {
|
|
3372
3378
|
class: "config-format-select-label",
|
|
3373
3379
|
"data-testid": "config-format-select-label"
|
|
3374
3380
|
}, {
|
|
@@ -3377,61 +3383,61 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3377
3383
|
]),
|
|
3378
3384
|
_: 1
|
|
3379
3385
|
}),
|
|
3380
|
-
|
|
3386
|
+
N(y, {
|
|
3381
3387
|
"data-testid": "select-config-format",
|
|
3382
3388
|
items: u,
|
|
3383
3389
|
onChange: c
|
|
3384
3390
|
}),
|
|
3385
|
-
e.configCardDoc ? (f(),
|
|
3391
|
+
e.configCardDoc ? (f(), D(A, {
|
|
3386
3392
|
key: 0,
|
|
3387
3393
|
appearance: "tertiary",
|
|
3388
3394
|
class: "book-icon",
|
|
3389
3395
|
"data-testid": "book-icon"
|
|
3390
3396
|
}, {
|
|
3391
3397
|
default: h(() => [
|
|
3392
|
-
|
|
3398
|
+
F("a", {
|
|
3393
3399
|
href: e.configCardDoc,
|
|
3394
3400
|
rel: "noopener",
|
|
3395
3401
|
target: "_blank"
|
|
3396
3402
|
}, [
|
|
3397
|
-
|
|
3403
|
+
N(m(Sl), { size: m(Aa) }, null, 8, ["size"])
|
|
3398
3404
|
], 8, Hl)
|
|
3399
3405
|
]),
|
|
3400
3406
|
_: 1
|
|
3401
|
-
})) :
|
|
3407
|
+
})) : z("", !0)
|
|
3402
3408
|
])
|
|
3403
3409
|
]),
|
|
3404
3410
|
default: h(() => [
|
|
3405
|
-
|
|
3411
|
+
g.value ? (f(), D(R, {
|
|
3406
3412
|
key: 0,
|
|
3407
3413
|
"data-testid": "config-card-loader",
|
|
3408
3414
|
"table-columns": 2,
|
|
3409
3415
|
type: "table"
|
|
3410
|
-
})) : I.value ? (f(),
|
|
3416
|
+
})) : I.value ? (f(), D(S, {
|
|
3411
3417
|
key: 1,
|
|
3412
3418
|
"data-testid": "config-card-fetch-error",
|
|
3413
3419
|
"icon-variant": "error"
|
|
3414
3420
|
}, {
|
|
3415
3421
|
default: h(() => [
|
|
3416
|
-
|
|
3422
|
+
F("h3", null, j(L.value), 1)
|
|
3417
3423
|
]),
|
|
3418
3424
|
_: 1
|
|
3419
|
-
})) :
|
|
3420
|
-
|
|
3421
|
-
|
|
3425
|
+
})) : z("", !0),
|
|
3426
|
+
F("div", Jl, [
|
|
3427
|
+
N(ml, {
|
|
3422
3428
|
config: e.config,
|
|
3423
|
-
"fetcher-url":
|
|
3429
|
+
"fetcher-url": _.value,
|
|
3424
3430
|
format: d.value,
|
|
3425
|
-
"prop-list-types":
|
|
3426
|
-
"property-collections":
|
|
3431
|
+
"prop-list-types": w.value,
|
|
3432
|
+
"property-collections": E.value,
|
|
3427
3433
|
record: k.value
|
|
3428
|
-
},
|
|
3429
|
-
pe(Object.keys(p.$slots), (
|
|
3430
|
-
name:
|
|
3431
|
-
fn: h(({ row:
|
|
3432
|
-
Q(p.$slots,
|
|
3433
|
-
row:
|
|
3434
|
-
rowValue:
|
|
3434
|
+
}, Ne({ _: 2 }, [
|
|
3435
|
+
pe(Object.keys(p.$slots), (K) => ({
|
|
3436
|
+
name: K,
|
|
3437
|
+
fn: h(({ row: P, rowValue: G }) => [
|
|
3438
|
+
Q(p.$slots, K, {
|
|
3439
|
+
row: P,
|
|
3440
|
+
rowValue: G
|
|
3435
3441
|
}, void 0, !0)
|
|
3436
3442
|
])
|
|
3437
3443
|
}))
|
|
@@ -3443,7 +3449,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3443
3449
|
e.hideTitle ? void 0 : {
|
|
3444
3450
|
name: "title",
|
|
3445
3451
|
fn: h(() => [
|
|
3446
|
-
|
|
3452
|
+
F("span", zl, [
|
|
3447
3453
|
Q(p.$slots, "title", {}, () => [
|
|
3448
3454
|
J(j(m(i)("baseConfigCard.title")), 1)
|
|
3449
3455
|
], !0)
|
|
@@ -3526,19 +3532,19 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3526
3532
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3527
3533
|
setup(e, { emit: t }) {
|
|
3528
3534
|
var n;
|
|
3529
|
-
const r = t, a = e, i =
|
|
3530
|
-
var
|
|
3535
|
+
const r = t, a = e, i = xt(), { i18n: { t: o } } = ne.useI18n(), { getMessageFromError: l } = ne.useErrors(), { axiosInstance: s } = ne.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = B(!1), d = B(!1), c = B(""), b = x(() => a.canSubmit === !1 || a.isReadonly), g = B(!1), I = x(() => {
|
|
3536
|
+
var w, _;
|
|
3531
3537
|
let p = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3532
|
-
return a.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((
|
|
3533
|
-
}),
|
|
3534
|
-
|
|
3538
|
+
return a.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((w = a.config) == null ? void 0 : w.controlPlaneId) || "") : a.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, (_ = a.config) != null && _.workspace ? `/${a.config.workspace}` : "")), a.editId ? (p = p.replace(/{id}/gi, a.editId), p) : (p = p.replace(/\/{id}/gi, ""), p);
|
|
3539
|
+
}), L = () => {
|
|
3540
|
+
g.value = !g.value;
|
|
3535
3541
|
}, k = () => {
|
|
3536
3542
|
a.config.cancelRoute ? i.push(a.config.cancelRoute) : U();
|
|
3537
3543
|
}, U = () => {
|
|
3538
3544
|
r("cancel");
|
|
3539
|
-
},
|
|
3540
|
-
|
|
3541
|
-
},
|
|
3545
|
+
}, T = () => {
|
|
3546
|
+
b.value || r("submit");
|
|
3547
|
+
}, E = B([
|
|
3542
3548
|
{
|
|
3543
3549
|
title: o("baseForm.configuration.yaml"),
|
|
3544
3550
|
hash: "#yaml"
|
|
@@ -3548,28 +3554,28 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3548
3554
|
hash: "#json"
|
|
3549
3555
|
}
|
|
3550
3556
|
]);
|
|
3551
|
-
return ke(() => u.value, (
|
|
3552
|
-
r("loading",
|
|
3557
|
+
return ke(() => u.value, (w) => {
|
|
3558
|
+
r("loading", w);
|
|
3553
3559
|
}, { immediate: !0 }), wt(async () => {
|
|
3554
3560
|
if (a.editId)
|
|
3555
3561
|
try {
|
|
3556
3562
|
d.value = !1, u.value = !0;
|
|
3557
|
-
const { data:
|
|
3558
|
-
r("fetch:success",
|
|
3559
|
-
} catch (
|
|
3560
|
-
const
|
|
3561
|
-
c.value =
|
|
3563
|
+
const { data: w } = await s.get(I.value);
|
|
3564
|
+
r("fetch:success", w);
|
|
3565
|
+
} catch (w) {
|
|
3566
|
+
const _ = l(w);
|
|
3567
|
+
c.value = _.startsWith("code") ? o("baseForm.errors.edit") : _, d.value = !0, r("fetch:error", w);
|
|
3562
3568
|
} finally {
|
|
3563
3569
|
u.value = !1;
|
|
3564
3570
|
}
|
|
3565
|
-
}), (
|
|
3566
|
-
const p =
|
|
3567
|
-
return f(),
|
|
3571
|
+
}), (w, _) => {
|
|
3572
|
+
const p = V("KSkeleton"), C = V("KEmptyState"), v = V("KAlert"), y = V("KButton"), A = V("KTabs"), R = V("KSlideout");
|
|
3573
|
+
return f(), D(be(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3568
3574
|
default: h(() => [
|
|
3569
|
-
u.value ? (f(),
|
|
3575
|
+
u.value ? (f(), D(p, {
|
|
3570
3576
|
key: 0,
|
|
3571
3577
|
type: "form"
|
|
3572
|
-
})) : d.value ? (f(),
|
|
3578
|
+
})) : d.value ? (f(), D(C, {
|
|
3573
3579
|
key: 1,
|
|
3574
3580
|
"action-button-text": m(o)("baseForm.actions.back"),
|
|
3575
3581
|
"data-testid": "form-fetch-error",
|
|
@@ -3577,7 +3583,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3577
3583
|
onClickAction: k
|
|
3578
3584
|
}, {
|
|
3579
3585
|
default: h(() => [
|
|
3580
|
-
|
|
3586
|
+
F("h3", null, j(c.value), 1)
|
|
3581
3587
|
]),
|
|
3582
3588
|
_: 1
|
|
3583
3589
|
}, 8, ["action-button-text"])) : (f(), O("form", {
|
|
@@ -3585,28 +3591,28 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3585
3591
|
"data-testid": "form-content",
|
|
3586
3592
|
novalidate: a.noValidate,
|
|
3587
3593
|
onReset: gt(U, ["prevent"]),
|
|
3588
|
-
onSubmit: gt(
|
|
3594
|
+
onSubmit: gt(T, ["prevent"])
|
|
3589
3595
|
}, [
|
|
3590
|
-
Q(
|
|
3591
|
-
e.errorMessage ? (f(),
|
|
3596
|
+
Q(w.$slots, "default", {}, void 0, !0),
|
|
3597
|
+
e.errorMessage ? (f(), D(v, {
|
|
3592
3598
|
key: 0,
|
|
3593
3599
|
appearance: "danger",
|
|
3594
3600
|
"data-testid": "form-error",
|
|
3595
3601
|
message: e.errorMessage
|
|
3596
|
-
}, null, 8, ["message"])) :
|
|
3597
|
-
|
|
3598
|
-
Q(
|
|
3599
|
-
|
|
3602
|
+
}, null, 8, ["message"])) : z("", !0),
|
|
3603
|
+
F("div", Ql, [
|
|
3604
|
+
Q(w.$slots, "form-actions", {}, () => [
|
|
3605
|
+
N(y, {
|
|
3600
3606
|
appearance: "tertiary",
|
|
3601
3607
|
"data-testid": "form-view-configuration",
|
|
3602
|
-
onClick:
|
|
3608
|
+
onClick: _[0] || (_[0] = (S) => L())
|
|
3603
3609
|
}, {
|
|
3604
3610
|
default: h(() => [
|
|
3605
3611
|
J(j(m(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3606
3612
|
]),
|
|
3607
3613
|
_: 1
|
|
3608
3614
|
}),
|
|
3609
|
-
|
|
3615
|
+
N(y, {
|
|
3610
3616
|
appearance: "secondary",
|
|
3611
3617
|
"data-testid": "form-cancel",
|
|
3612
3618
|
disabled: e.isReadonly,
|
|
@@ -3617,10 +3623,10 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3617
3623
|
]),
|
|
3618
3624
|
_: 1
|
|
3619
3625
|
}, 8, ["disabled"]),
|
|
3620
|
-
|
|
3626
|
+
N(y, {
|
|
3621
3627
|
appearance: "primary",
|
|
3622
3628
|
"data-testid": "form-submit",
|
|
3623
|
-
disabled:
|
|
3629
|
+
disabled: b.value,
|
|
3624
3630
|
type: "submit"
|
|
3625
3631
|
}, {
|
|
3626
3632
|
default: h(() => [
|
|
@@ -3631,23 +3637,23 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3631
3637
|
], !0)
|
|
3632
3638
|
])
|
|
3633
3639
|
], 40, Zl)),
|
|
3634
|
-
|
|
3640
|
+
N(R, {
|
|
3635
3641
|
"close-on-blur": !1,
|
|
3636
3642
|
"data-testid": "form-view-configuration-slideout",
|
|
3637
3643
|
"has-overlay": !1,
|
|
3638
3644
|
"offset-top": 60,
|
|
3639
3645
|
title: m(o)("baseForm.configuration.title"),
|
|
3640
|
-
visible:
|
|
3641
|
-
onClose:
|
|
3646
|
+
visible: g.value,
|
|
3647
|
+
onClose: _[1] || (_[1] = (S) => L())
|
|
3642
3648
|
}, {
|
|
3643
3649
|
default: h(() => [
|
|
3644
|
-
|
|
3645
|
-
|
|
3650
|
+
F("div", null, j(m(o)("baseForm.configuration.message")), 1),
|
|
3651
|
+
N(A, {
|
|
3646
3652
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3647
|
-
tabs:
|
|
3653
|
+
tabs: E.value
|
|
3648
3654
|
}, {
|
|
3649
3655
|
json: h(() => [
|
|
3650
|
-
|
|
3656
|
+
N(Sn, {
|
|
3651
3657
|
config: e.config,
|
|
3652
3658
|
"fetcher-url": I.value,
|
|
3653
3659
|
"json-record": a.formFields,
|
|
@@ -3655,7 +3661,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3655
3661
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3656
3662
|
]),
|
|
3657
3663
|
yaml: h(() => [
|
|
3658
|
-
|
|
3664
|
+
N(mr, {
|
|
3659
3665
|
"yaml-record": a.formFields
|
|
3660
3666
|
}, null, 8, ["yaml-record"])
|
|
3661
3667
|
]),
|
|
@@ -3686,30 +3692,30 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3686
3692
|
}
|
|
3687
3693
|
},
|
|
3688
3694
|
setup(e) {
|
|
3689
|
-
const t = e, n =
|
|
3695
|
+
const t = e, n = x(() => {
|
|
3690
3696
|
var k;
|
|
3691
3697
|
return ((k = t.rowEl) == null ? void 0 : k.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3692
|
-
}), r =
|
|
3698
|
+
}), r = x(() => {
|
|
3693
3699
|
var k;
|
|
3694
3700
|
return ((k = n.value) == null ? void 0 : k.querySelector('[data-truncate="true"]')) || null;
|
|
3695
|
-
}), a =
|
|
3701
|
+
}), a = x(() => {
|
|
3696
3702
|
var k, U;
|
|
3697
|
-
const
|
|
3698
|
-
return
|
|
3699
|
-
}), i =
|
|
3703
|
+
const T = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3704
|
+
return T ? ((U = T[0]) == null ? void 0 : U.getAttribute("data-testid")) === t.keyName : !0;
|
|
3705
|
+
}), i = x(() => a.value || t.tooltip);
|
|
3700
3706
|
let o;
|
|
3701
3707
|
const l = () => {
|
|
3702
3708
|
o && (o.disconnect(), o = void 0);
|
|
3703
3709
|
}, s = () => {
|
|
3704
|
-
var k, U,
|
|
3705
|
-
let
|
|
3710
|
+
var k, U, T;
|
|
3711
|
+
let E = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3706
3712
|
if (n.value && "getComputedStyle" in window) {
|
|
3707
|
-
const
|
|
3708
|
-
|
|
3713
|
+
const w = window.getComputedStyle(n.value);
|
|
3714
|
+
E -= (parseFloat(w.paddingLeft) || 0) + (parseFloat(w.paddingRight) || 0);
|
|
3709
3715
|
}
|
|
3710
|
-
d.value = ((U = r.value) == null ? void 0 : U.getBoundingClientRect().width) || 0, c.value =
|
|
3711
|
-
}, u = B({}), d = B(0), c = B(0),
|
|
3712
|
-
|
|
3716
|
+
d.value = ((U = r.value) == null ? void 0 : U.getBoundingClientRect().width) || 0, c.value = E, b.value = ((T = u.value) == null ? void 0 : T.innerText) || "";
|
|
3717
|
+
}, u = B({}), d = B(0), c = B(0), b = B(""), g = x(() => [r.value, n.value]), I = ke(
|
|
3718
|
+
g,
|
|
3713
3719
|
(k) => {
|
|
3714
3720
|
if (i.value && (l(), "ResizeObserver" in window && window)) {
|
|
3715
3721
|
o = new ResizeObserver((U) => {
|
|
@@ -3722,13 +3728,13 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3722
3728
|
}
|
|
3723
3729
|
},
|
|
3724
3730
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3725
|
-
),
|
|
3726
|
-
return
|
|
3731
|
+
), L = x(() => i.value ? d.value > c.value : !1);
|
|
3732
|
+
return Sr(() => {
|
|
3727
3733
|
s();
|
|
3728
3734
|
}), Ar(() => {
|
|
3729
3735
|
I();
|
|
3730
3736
|
}), (k, U) => {
|
|
3731
|
-
const
|
|
3737
|
+
const T = V("KTooltip");
|
|
3732
3738
|
return f(), O("span", {
|
|
3733
3739
|
ref_key: "contentRef",
|
|
3734
3740
|
ref: u,
|
|
@@ -3738,10 +3744,10 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3738
3744
|
key: 0,
|
|
3739
3745
|
"data-truncate": i.value || void 0
|
|
3740
3746
|
}, [
|
|
3741
|
-
T
|
|
3747
|
+
N(T, {
|
|
3742
3748
|
"max-width": "300",
|
|
3743
3749
|
placement: "bottom-start",
|
|
3744
|
-
text:
|
|
3750
|
+
text: L.value ? b.value : ""
|
|
3745
3751
|
}, {
|
|
3746
3752
|
default: h(() => [
|
|
3747
3753
|
Q(k.$slots, "default", {}, void 0, !0)
|
|
@@ -3873,8 +3879,8 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3873
3879
|
},
|
|
3874
3880
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3875
3881
|
setup(e, { emit: t }) {
|
|
3876
|
-
const n = e, r = t, { i18n: { t: a } } = ne.useI18n(), i =
|
|
3877
|
-
var p,
|
|
3882
|
+
const n = e, r = t, { i18n: { t: a } } = ne.useI18n(), i = x(() => {
|
|
3883
|
+
var p, C;
|
|
3878
3884
|
return typeof n.errorMessage == "string" ? {
|
|
3879
3885
|
hasError: !!n.errorMessage,
|
|
3880
3886
|
title: n.errorMessage,
|
|
@@ -3882,15 +3888,15 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3882
3888
|
} : {
|
|
3883
3889
|
hasError: !!n.errorMessage,
|
|
3884
3890
|
title: (p = n.errorMessage) == null ? void 0 : p.title,
|
|
3885
|
-
message: (
|
|
3891
|
+
message: (C = n.errorMessage) == null ? void 0 : C.message
|
|
3886
3892
|
};
|
|
3887
|
-
}), o =
|
|
3893
|
+
}), o = x(() => n.cacheIdentifier || n.preferencesStorageKey), l = (p) => p.hasData || !!n.query, s = x(() => {
|
|
3888
3894
|
const p = [];
|
|
3889
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3890
|
-
const v = n.tableHeaders[
|
|
3895
|
+
return Object.keys(n.tableHeaders).forEach((C) => {
|
|
3896
|
+
const v = n.tableHeaders[C];
|
|
3891
3897
|
p.push({
|
|
3892
|
-
label: v.label ??
|
|
3893
|
-
key:
|
|
3898
|
+
label: v.label ?? C,
|
|
3899
|
+
key: C,
|
|
3894
3900
|
sortable: v.sortable ?? !1,
|
|
3895
3901
|
hidable: v.hidable ?? !0
|
|
3896
3902
|
});
|
|
@@ -3903,50 +3909,50 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3903
3909
|
"data-testid": p.name,
|
|
3904
3910
|
...n.rowAttributes(p)
|
|
3905
3911
|
}), d = B({}), c = (p) => {
|
|
3906
|
-
var
|
|
3907
|
-
return (
|
|
3908
|
-
},
|
|
3909
|
-
const
|
|
3912
|
+
var C;
|
|
3913
|
+
return (C = d.value) == null ? void 0 : C.$el.querySelector(`[data-rowid="${p.id}"]`);
|
|
3914
|
+
}, b = (p) => {
|
|
3915
|
+
const C = {
|
|
3910
3916
|
"data-testid": p.headerKey,
|
|
3911
3917
|
...n.cellAttributes(p)
|
|
3912
3918
|
};
|
|
3913
|
-
return p.colIndex === 0 && (
|
|
3919
|
+
return p.colIndex === 0 && (C.style = {
|
|
3914
3920
|
maxWidth: "250px",
|
|
3915
3921
|
overflowX: "hidden",
|
|
3916
3922
|
textOverflow: "ellipsis"
|
|
3917
|
-
}),
|
|
3918
|
-
},
|
|
3923
|
+
}), C;
|
|
3924
|
+
}, g = () => {
|
|
3919
3925
|
r("empty-state-cta-clicked"), I();
|
|
3920
3926
|
}, I = () => {
|
|
3921
3927
|
r("clear-search-input");
|
|
3922
|
-
},
|
|
3923
|
-
r("click:row",
|
|
3928
|
+
}, L = x(() => n.disableRowClick ? void 0 : (p, C) => {
|
|
3929
|
+
r("click:row", C);
|
|
3924
3930
|
}), k = (p) => {
|
|
3925
3931
|
r("sort", p);
|
|
3926
|
-
}, { setTablePreferences: U, getTablePreferences:
|
|
3927
|
-
const p =
|
|
3932
|
+
}, { setTablePreferences: U, getTablePreferences: T } = Gr(), E = B(T(o.value)), w = x(() => {
|
|
3933
|
+
const p = T(o.value);
|
|
3928
3934
|
return {
|
|
3929
3935
|
...n.initialFetcherParams,
|
|
3930
3936
|
...p
|
|
3931
3937
|
};
|
|
3932
|
-
}),
|
|
3933
|
-
|
|
3934
|
-
!("hidable" in
|
|
3938
|
+
}), _ = (p) => {
|
|
3939
|
+
E.value = p, s.value.forEach((C) => {
|
|
3940
|
+
!("hidable" in C) || !E.value.columnVisibility || C.hidable === !1 && (E.value.columnVisibility[C.key] = !0);
|
|
3935
3941
|
}), o.value && U(o.value, p);
|
|
3936
3942
|
};
|
|
3937
|
-
return (p,
|
|
3938
|
-
const v =
|
|
3939
|
-
return f(),
|
|
3943
|
+
return (p, C) => {
|
|
3944
|
+
const v = V("KButton"), y = V("KDropdown"), A = V("KTable"), R = V("KCard");
|
|
3945
|
+
return f(), D(R, {
|
|
3940
3946
|
class: "kong-ui-entity-base-table",
|
|
3941
3947
|
title: e.title,
|
|
3942
3948
|
"title-tag": e.titleTag
|
|
3943
3949
|
}, {
|
|
3944
3950
|
default: h(() => [
|
|
3945
|
-
|
|
3951
|
+
N(A, {
|
|
3946
3952
|
ref_key: "tableRefs",
|
|
3947
3953
|
ref: d,
|
|
3948
3954
|
"cache-identifier": o.value,
|
|
3949
|
-
"cell-attrs":
|
|
3955
|
+
"cell-attrs": b,
|
|
3950
3956
|
"client-sort": e.enableClientSort,
|
|
3951
3957
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3952
3958
|
"empty-state-action-message": e.query ? m(a)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
@@ -3961,7 +3967,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3961
3967
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3962
3968
|
headers: s.value,
|
|
3963
3969
|
"hide-pagination-when-optional": "",
|
|
3964
|
-
"initial-fetcher-params":
|
|
3970
|
+
"initial-fetcher-params": w.value,
|
|
3965
3971
|
loading: e.isLoading,
|
|
3966
3972
|
"pagination-offset": e.paginationType === "offset",
|
|
3967
3973
|
"resize-columns": "",
|
|
@@ -3969,40 +3975,40 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3969
3975
|
"search-input": e.query,
|
|
3970
3976
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3971
3977
|
sortable: !e.disableSorting,
|
|
3972
|
-
"table-preferences":
|
|
3973
|
-
onEmptyStateActionClick:
|
|
3974
|
-
"onRow:click":
|
|
3975
|
-
onSort:
|
|
3976
|
-
"onUpdate:tablePreferences":
|
|
3977
|
-
},
|
|
3978
|
-
toolbar: h(({ state:
|
|
3979
|
-
Ie(
|
|
3978
|
+
"table-preferences": E.value,
|
|
3979
|
+
onEmptyStateActionClick: g,
|
|
3980
|
+
"onRow:click": L.value,
|
|
3981
|
+
onSort: C[0] || (C[0] = (S) => k(S)),
|
|
3982
|
+
"onUpdate:tablePreferences": _
|
|
3983
|
+
}, Ne({
|
|
3984
|
+
toolbar: h(({ state: S }) => [
|
|
3985
|
+
Ie(F("div", as, [
|
|
3980
3986
|
Q(p.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3981
3987
|
p.$slots["toolbar-button"] ? (f(), O("div", is, [
|
|
3982
3988
|
Q(p.$slots, "toolbar-button", {}, void 0, !0)
|
|
3983
|
-
])) :
|
|
3989
|
+
])) : z("", !0)
|
|
3984
3990
|
], 512), [
|
|
3985
|
-
[
|
|
3991
|
+
[xe, l(S)]
|
|
3986
3992
|
])
|
|
3987
3993
|
]),
|
|
3988
|
-
actions: h(({ row:
|
|
3989
|
-
|
|
3994
|
+
actions: h(({ row: S, rowKey: M, rowValue: K }) => [
|
|
3995
|
+
F("div", {
|
|
3990
3996
|
class: "actions-container",
|
|
3991
|
-
"data-testid":
|
|
3997
|
+
"data-testid": S.name
|
|
3992
3998
|
}, [
|
|
3993
|
-
|
|
3999
|
+
N(y, {
|
|
3994
4000
|
"kpop-attributes": { placement: "bottom-end" },
|
|
3995
4001
|
width: e.dropdownMenuWidth
|
|
3996
4002
|
}, {
|
|
3997
4003
|
items: h(() => [
|
|
3998
4004
|
Q(p.$slots, "actions", {
|
|
3999
|
-
row:
|
|
4000
|
-
rowKey:
|
|
4001
|
-
rowValue:
|
|
4005
|
+
row: S,
|
|
4006
|
+
rowKey: M,
|
|
4007
|
+
rowValue: K
|
|
4002
4008
|
}, void 0, !0)
|
|
4003
4009
|
]),
|
|
4004
4010
|
default: h(() => [
|
|
4005
|
-
|
|
4011
|
+
N(v, {
|
|
4006
4012
|
appearance: "tertiary",
|
|
4007
4013
|
class: "actions-trigger",
|
|
4008
4014
|
"data-testid": "overflow-actions-button",
|
|
@@ -4010,7 +4016,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4010
4016
|
size: "small"
|
|
4011
4017
|
}, {
|
|
4012
4018
|
default: h(() => [
|
|
4013
|
-
|
|
4019
|
+
N(m(Pl))
|
|
4014
4020
|
]),
|
|
4015
4021
|
_: 1
|
|
4016
4022
|
})
|
|
@@ -4021,21 +4027,21 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4021
4027
|
]),
|
|
4022
4028
|
_: 2
|
|
4023
4029
|
}, [
|
|
4024
|
-
pe(e.tableHeaders, (
|
|
4025
|
-
name:
|
|
4026
|
-
fn: h(({ row:
|
|
4027
|
-
|
|
4028
|
-
"key-name": String(
|
|
4029
|
-
"row-el": c(
|
|
4030
|
-
tooltip:
|
|
4030
|
+
pe(e.tableHeaders, (S, M) => ({
|
|
4031
|
+
name: M,
|
|
4032
|
+
fn: h(({ row: K, rowKey: P, rowValue: G }) => [
|
|
4033
|
+
N(rs, {
|
|
4034
|
+
"key-name": String(M),
|
|
4035
|
+
"row-el": c(K),
|
|
4036
|
+
tooltip: S.tooltip
|
|
4031
4037
|
}, {
|
|
4032
4038
|
default: h(() => [
|
|
4033
|
-
Q(p.$slots,
|
|
4034
|
-
row:
|
|
4035
|
-
rowKey:
|
|
4036
|
-
rowValue:
|
|
4039
|
+
Q(p.$slots, M, {
|
|
4040
|
+
row: K,
|
|
4041
|
+
rowKey: P,
|
|
4042
|
+
rowValue: G
|
|
4037
4043
|
}, () => [
|
|
4038
|
-
J(j(
|
|
4044
|
+
J(j(G), 1)
|
|
4039
4045
|
], !0)
|
|
4040
4046
|
]),
|
|
4041
4047
|
_: 2
|
|
@@ -4045,7 +4051,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4045
4051
|
e.query ? void 0 : {
|
|
4046
4052
|
name: "empty-state-action-icon",
|
|
4047
4053
|
fn: h(() => [
|
|
4048
|
-
|
|
4054
|
+
N(m(Cl))
|
|
4049
4055
|
]),
|
|
4050
4056
|
key: "0"
|
|
4051
4057
|
}
|
|
@@ -4100,14 +4106,14 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4100
4106
|
},
|
|
4101
4107
|
emits: ["cancel", "proceed"],
|
|
4102
4108
|
setup(e, { emit: t }) {
|
|
4103
|
-
const { i18nT: n } = ne.useI18n(), r = e, a = t, i =
|
|
4109
|
+
const { i18nT: n } = ne.useI18n(), r = e, a = t, i = x(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
4104
4110
|
a("cancel");
|
|
4105
4111
|
}, l = () => {
|
|
4106
4112
|
a("proceed");
|
|
4107
4113
|
};
|
|
4108
4114
|
return (s, u) => {
|
|
4109
|
-
const d =
|
|
4110
|
-
return f(),
|
|
4115
|
+
const d = V("KAlert"), c = V("KPrompt");
|
|
4116
|
+
return f(), D(c, {
|
|
4111
4117
|
"action-button-appearance": "danger",
|
|
4112
4118
|
"action-button-disabled": e.actionPending,
|
|
4113
4119
|
"action-button-text": "Yes, delete",
|
|
@@ -4120,18 +4126,18 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4120
4126
|
}, {
|
|
4121
4127
|
default: h(() => [
|
|
4122
4128
|
e.error ? (f(), O("div", us, [
|
|
4123
|
-
|
|
4129
|
+
N(d, { appearance: "danger" }, {
|
|
4124
4130
|
default: h(() => [
|
|
4125
4131
|
J(j(e.error), 1)
|
|
4126
4132
|
]),
|
|
4127
4133
|
_: 1
|
|
4128
4134
|
})
|
|
4129
|
-
])) :
|
|
4130
|
-
|
|
4135
|
+
])) : z("", !0),
|
|
4136
|
+
N(m(n), {
|
|
4131
4137
|
class: "message",
|
|
4132
4138
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4133
4139
|
tag: "p"
|
|
4134
|
-
},
|
|
4140
|
+
}, Ne({
|
|
4135
4141
|
entityType: h(() => [
|
|
4136
4142
|
J(j(r.entityType), 1)
|
|
4137
4143
|
]),
|
|
@@ -4140,16 +4146,16 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4140
4146
|
r.entityName ? {
|
|
4141
4147
|
name: "entityName",
|
|
4142
4148
|
fn: h(() => [
|
|
4143
|
-
|
|
4149
|
+
F("strong", null, j(r.entityName), 1)
|
|
4144
4150
|
]),
|
|
4145
4151
|
key: "0"
|
|
4146
4152
|
} : void 0
|
|
4147
4153
|
]), 1032, ["keypath"]),
|
|
4148
4154
|
r.description || s.$slots.description ? (f(), O("div", cs, [
|
|
4149
4155
|
Q(s.$slots, "description", {}, () => [
|
|
4150
|
-
|
|
4156
|
+
F("p", null, j(r.description), 1)
|
|
4151
4157
|
], !0)
|
|
4152
|
-
])) :
|
|
4158
|
+
])) : z("", !0)
|
|
4153
4159
|
]),
|
|
4154
4160
|
_: 3
|
|
4155
4161
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
@@ -4179,15 +4185,15 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4179
4185
|
},
|
|
4180
4186
|
setup(e) {
|
|
4181
4187
|
return (t, n) => (f(), O("svg", fs, [
|
|
4182
|
-
|
|
4183
|
-
|
|
4188
|
+
F("mask", ms, [
|
|
4189
|
+
F("rect", {
|
|
4184
4190
|
fill: e.color,
|
|
4185
4191
|
height: "20",
|
|
4186
4192
|
width: "20"
|
|
4187
4193
|
}, null, 8, gs)
|
|
4188
4194
|
]),
|
|
4189
|
-
|
|
4190
|
-
|
|
4195
|
+
F("g", ys, [
|
|
4196
|
+
F("path", {
|
|
4191
4197
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4192
4198
|
fill: e.color
|
|
4193
4199
|
}, null, 8, hs)
|
|
@@ -4197,7 +4203,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4197
4203
|
}), vs = {
|
|
4198
4204
|
key: 1,
|
|
4199
4205
|
class: "kong-ui-entity-filter"
|
|
4200
|
-
}, bs = { class: "kong-ui-entity-filter-menu" }, Cs = ["data-testid"], ks = ["onClick", "onKeydown"], ws = { class: "menu-item-indicator" }, Is = { class: "menu-item-body" },
|
|
4206
|
+
}, bs = { class: "kong-ui-entity-filter-menu" }, Cs = ["data-testid"], ks = ["onClick", "onKeydown"], ws = { class: "menu-item-indicator" }, Is = { class: "menu-item-body" }, xs = ["for"], _s = { class: "menu-item-buttons" }, Ss = { class: "filter-clear-button-container" }, As = /* @__PURE__ */ W({
|
|
4201
4207
|
__name: "EntityFilter",
|
|
4202
4208
|
props: {
|
|
4203
4209
|
// filter config, either exact match or fuzzy match
|
|
@@ -4217,161 +4223,161 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4217
4223
|
},
|
|
4218
4224
|
emits: ["update:modelValue"],
|
|
4219
4225
|
setup(e, { emit: t }) {
|
|
4220
|
-
const { i18n: { t: n } } = ne.useI18n(), r = e, a = t, i = B(!1), o = B({}), l = B(/* @__PURE__ */ new Set()), s =
|
|
4221
|
-
const
|
|
4222
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4223
|
-
|
|
4224
|
-
}),
|
|
4225
|
-
}), u =
|
|
4226
|
-
const
|
|
4227
|
-
return Object.keys(
|
|
4226
|
+
const { i18n: { t: n } } = ne.useI18n(), r = e, a = t, i = B(!1), o = B({}), l = B(/* @__PURE__ */ new Set()), s = x(() => {
|
|
4227
|
+
const w = [];
|
|
4228
|
+
return new URLSearchParams(r.modelValue).forEach((_, p) => {
|
|
4229
|
+
_ !== "" && w.push(p);
|
|
4230
|
+
}), w;
|
|
4231
|
+
}), u = x(() => {
|
|
4232
|
+
const w = r.config.fields;
|
|
4233
|
+
return Object.keys(w).filter((_) => {
|
|
4228
4234
|
var p;
|
|
4229
|
-
return (p =
|
|
4230
|
-
}).map((
|
|
4231
|
-
label:
|
|
4232
|
-
value:
|
|
4235
|
+
return (p = w == null ? void 0 : w[_]) == null ? void 0 : p.searchable;
|
|
4236
|
+
}).map((_) => ({
|
|
4237
|
+
label: w[_].label || _,
|
|
4238
|
+
value: _,
|
|
4233
4239
|
expanded: !1
|
|
4234
4240
|
}));
|
|
4235
4241
|
});
|
|
4236
|
-
ke(() => r.modelValue, (
|
|
4237
|
-
o.value = {}, new URLSearchParams(
|
|
4238
|
-
o.value[p] =
|
|
4242
|
+
ke(() => r.modelValue, (w) => {
|
|
4243
|
+
o.value = {}, new URLSearchParams(w).forEach((_, p) => {
|
|
4244
|
+
o.value[p] = _;
|
|
4239
4245
|
});
|
|
4240
4246
|
});
|
|
4241
4247
|
const d = () => {
|
|
4242
4248
|
i.value = !i.value;
|
|
4243
|
-
}, c = (
|
|
4244
|
-
l.value.has(
|
|
4245
|
-
},
|
|
4246
|
-
a("update:modelValue",
|
|
4247
|
-
},
|
|
4248
|
-
|
|
4249
|
-
}, I = (
|
|
4250
|
-
var
|
|
4251
|
-
return (((p = (
|
|
4252
|
-
value:
|
|
4253
|
-
label:
|
|
4249
|
+
}, c = (w) => {
|
|
4250
|
+
l.value.has(w) ? l.value.delete(w) : l.value.add(w);
|
|
4251
|
+
}, b = (w) => {
|
|
4252
|
+
a("update:modelValue", w);
|
|
4253
|
+
}, g = () => {
|
|
4254
|
+
b("");
|
|
4255
|
+
}, I = (w) => `filter-${w}`, L = (w) => {
|
|
4256
|
+
var _, p;
|
|
4257
|
+
return (((p = (_ = r.config.schema) == null ? void 0 : _[w]) == null ? void 0 : p.values) ?? []).map((C) => ({
|
|
4258
|
+
value: C,
|
|
4259
|
+
label: C
|
|
4254
4260
|
}));
|
|
4255
|
-
}, k = (
|
|
4256
|
-
var
|
|
4257
|
-
return ((p = (
|
|
4258
|
-
}, U = (
|
|
4261
|
+
}, k = (w) => {
|
|
4262
|
+
var _, p;
|
|
4263
|
+
return ((p = (_ = r.config.schema) == null ? void 0 : _[w]) == null ? void 0 : p.type) ?? "text";
|
|
4264
|
+
}, U = (w) => {
|
|
4259
4265
|
o.value = {
|
|
4260
4266
|
...o.value,
|
|
4261
|
-
[
|
|
4262
|
-
},
|
|
4263
|
-
},
|
|
4264
|
-
o.value = {},
|
|
4265
|
-
},
|
|
4266
|
-
const
|
|
4267
|
-
|
|
4267
|
+
[w]: ""
|
|
4268
|
+
}, E();
|
|
4269
|
+
}, T = () => {
|
|
4270
|
+
o.value = {}, E(!0);
|
|
4271
|
+
}, E = (w = !1) => {
|
|
4272
|
+
const _ = Object.keys(o.value).reduce((p, C) => (o.value[C] && (p[C] = `${o.value[C]}`), p), {});
|
|
4273
|
+
w && (i.value = !1), a("update:modelValue", new URLSearchParams(_).toString());
|
|
4268
4274
|
};
|
|
4269
|
-
return (
|
|
4270
|
-
const p =
|
|
4271
|
-
return e.config.isExactMatch ? (f(),
|
|
4275
|
+
return (w, _) => {
|
|
4276
|
+
const p = V("KInput"), C = V("KButton"), v = V("KSelect");
|
|
4277
|
+
return e.config.isExactMatch ? (f(), D(p, {
|
|
4272
4278
|
key: 0,
|
|
4273
4279
|
autocomplete: "off",
|
|
4274
4280
|
class: "kong-ui-entity-filter-input",
|
|
4275
4281
|
"data-testid": "search-input",
|
|
4276
4282
|
"model-value": e.modelValue,
|
|
4277
4283
|
placeholder: e.config.placeholder,
|
|
4278
|
-
"onUpdate:modelValue":
|
|
4284
|
+
"onUpdate:modelValue": b
|
|
4279
4285
|
}, {
|
|
4280
4286
|
before: h(() => [
|
|
4281
|
-
|
|
4287
|
+
N(fn)
|
|
4282
4288
|
]),
|
|
4283
4289
|
after: h(() => [
|
|
4284
|
-
Ie(
|
|
4290
|
+
Ie(N(m(Kl), {
|
|
4285
4291
|
class: "kong-ui-entity-filter-clear",
|
|
4286
|
-
onClick:
|
|
4292
|
+
onClick: g
|
|
4287
4293
|
}, null, 512), [
|
|
4288
|
-
[
|
|
4294
|
+
[xe, e.modelValue !== ""]
|
|
4289
4295
|
])
|
|
4290
4296
|
]),
|
|
4291
4297
|
_: 1
|
|
4292
4298
|
}, 8, ["model-value", "placeholder"])) : (f(), O("div", vs, [
|
|
4293
|
-
|
|
4299
|
+
N(C, {
|
|
4294
4300
|
appearance: "tertiary",
|
|
4295
4301
|
"data-testid": "filter-button",
|
|
4296
4302
|
onClick: d
|
|
4297
4303
|
}, {
|
|
4298
4304
|
default: h(() => [
|
|
4299
|
-
|
|
4305
|
+
N(fn),
|
|
4300
4306
|
J(" " + j(m(n)("filter.filterButtonText")) + " " + j(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4301
4307
|
]),
|
|
4302
4308
|
_: 1
|
|
4303
4309
|
}),
|
|
4304
|
-
Ie(
|
|
4310
|
+
Ie(F("div", {
|
|
4305
4311
|
class: "kong-ui-entity-filter-backdrop",
|
|
4306
4312
|
onClick: d
|
|
4307
4313
|
}, null, 512), [
|
|
4308
|
-
[
|
|
4314
|
+
[xe, i.value]
|
|
4309
4315
|
]),
|
|
4310
|
-
Ie(
|
|
4311
|
-
(f(!0), O(fe, null, pe(u.value, (
|
|
4312
|
-
var
|
|
4316
|
+
Ie(F("div", bs, [
|
|
4317
|
+
(f(!0), O(fe, null, pe(u.value, (y) => {
|
|
4318
|
+
var A, R;
|
|
4313
4319
|
return f(), O("div", {
|
|
4314
|
-
key:
|
|
4320
|
+
key: y.value,
|
|
4315
4321
|
class: "kong-ui-entity-filter-menu-item",
|
|
4316
|
-
"data-testid":
|
|
4322
|
+
"data-testid": y.value
|
|
4317
4323
|
}, [
|
|
4318
|
-
|
|
4319
|
-
class:
|
|
4324
|
+
F("span", {
|
|
4325
|
+
class: Se(["menu-item-title", { expanded: l.value.has(y.value) }]),
|
|
4320
4326
|
role: "button",
|
|
4321
4327
|
tabindex: "0",
|
|
4322
|
-
onClick: (
|
|
4323
|
-
onKeydown:
|
|
4328
|
+
onClick: (S) => c(y.value),
|
|
4329
|
+
onKeydown: xr((S) => c(y.value), ["enter"])
|
|
4324
4330
|
}, [
|
|
4325
|
-
J(j(
|
|
4326
|
-
Ie(
|
|
4327
|
-
[
|
|
4331
|
+
J(j(y.label) + " ", 1),
|
|
4332
|
+
Ie(F("span", ws, null, 512), [
|
|
4333
|
+
[xe, s.value.includes(y.value)]
|
|
4328
4334
|
]),
|
|
4329
|
-
|
|
4330
|
-
class:
|
|
4335
|
+
N(m(Ol), {
|
|
4336
|
+
class: Se(["menu-item-expand-icon", { expanded: l.value.has(y.value) }]),
|
|
4331
4337
|
color: m(_a)
|
|
4332
4338
|
}, null, 8, ["class", "color"])
|
|
4333
4339
|
], 42, ks),
|
|
4334
|
-
Ie(
|
|
4335
|
-
|
|
4340
|
+
Ie(F("div", Is, [
|
|
4341
|
+
F("label", {
|
|
4336
4342
|
class: "menu-item-label",
|
|
4337
|
-
for: I(
|
|
4338
|
-
}, j(m(n)("filter.fieldLabel")), 9,
|
|
4339
|
-
((
|
|
4343
|
+
for: I(y.value)
|
|
4344
|
+
}, j(m(n)("filter.fieldLabel")), 9, xs),
|
|
4345
|
+
((R = (A = e.config.schema) == null ? void 0 : A[y.value]) == null ? void 0 : R.type) === "select" ? (f(), D(v, {
|
|
4340
4346
|
key: 0,
|
|
4341
|
-
id: I(
|
|
4342
|
-
modelValue: o.value[
|
|
4343
|
-
"onUpdate:modelValue": (
|
|
4344
|
-
items:
|
|
4347
|
+
id: I(y.value),
|
|
4348
|
+
modelValue: o.value[y.value],
|
|
4349
|
+
"onUpdate:modelValue": (S) => o.value[y.value] = S,
|
|
4350
|
+
items: L(y.value),
|
|
4345
4351
|
placeholder: m(n)("filter.selectPlaceholder")
|
|
4346
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(),
|
|
4352
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(), D(p, {
|
|
4347
4353
|
key: 1,
|
|
4348
|
-
id: I(
|
|
4349
|
-
modelValue: o.value[
|
|
4350
|
-
"onUpdate:modelValue": (
|
|
4354
|
+
id: I(y.value),
|
|
4355
|
+
modelValue: o.value[y.value],
|
|
4356
|
+
"onUpdate:modelValue": (S) => o.value[y.value] = S,
|
|
4351
4357
|
autocomplete: "off",
|
|
4352
4358
|
placeholder: m(n)("filter.inputPlaceholder"),
|
|
4353
|
-
type: k(
|
|
4359
|
+
type: k(y.value)
|
|
4354
4360
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4355
4361
|
], 512), [
|
|
4356
|
-
[
|
|
4362
|
+
[xe, l.value.has(y.value)]
|
|
4357
4363
|
]),
|
|
4358
|
-
Ie(
|
|
4359
|
-
|
|
4364
|
+
Ie(F("div", _s, [
|
|
4365
|
+
N(C, {
|
|
4360
4366
|
appearance: "tertiary",
|
|
4361
4367
|
"data-testid": "apply-filter",
|
|
4362
4368
|
size: "small",
|
|
4363
|
-
onClick:
|
|
4369
|
+
onClick: _[0] || (_[0] = (S) => E(!0))
|
|
4364
4370
|
}, {
|
|
4365
4371
|
default: h(() => [
|
|
4366
4372
|
J(j(m(n)("filter.applyButtonText")), 1)
|
|
4367
4373
|
]),
|
|
4368
4374
|
_: 1
|
|
4369
4375
|
}),
|
|
4370
|
-
|
|
4376
|
+
N(C, {
|
|
4371
4377
|
appearance: "tertiary",
|
|
4372
4378
|
"data-testid": "clear-filter",
|
|
4373
4379
|
size: "small",
|
|
4374
|
-
onClick: (
|
|
4380
|
+
onClick: (S) => U(y.value)
|
|
4375
4381
|
}, {
|
|
4376
4382
|
default: h(() => [
|
|
4377
4383
|
J(j(m(n)("filter.clearButtonText")), 1)
|
|
@@ -4379,15 +4385,15 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4379
4385
|
_: 2
|
|
4380
4386
|
}, 1032, ["onClick"])
|
|
4381
4387
|
], 512), [
|
|
4382
|
-
[
|
|
4388
|
+
[xe, l.value.has(y.value)]
|
|
4383
4389
|
])
|
|
4384
4390
|
], 8, Cs);
|
|
4385
4391
|
}), 128)),
|
|
4386
|
-
|
|
4387
|
-
|
|
4392
|
+
F("div", Ss, [
|
|
4393
|
+
N(C, {
|
|
4388
4394
|
appearance: "tertiary",
|
|
4389
4395
|
size: "small",
|
|
4390
|
-
onClick:
|
|
4396
|
+
onClick: T
|
|
4391
4397
|
}, {
|
|
4392
4398
|
default: h(() => [
|
|
4393
4399
|
J(j(m(n)("filter.clearAllButtonText")), 1)
|
|
@@ -4396,12 +4402,12 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4396
4402
|
})
|
|
4397
4403
|
])
|
|
4398
4404
|
], 512), [
|
|
4399
|
-
[
|
|
4405
|
+
[xe, i.value]
|
|
4400
4406
|
])
|
|
4401
4407
|
]));
|
|
4402
4408
|
};
|
|
4403
4409
|
}
|
|
4404
|
-
}),
|
|
4410
|
+
}), Ts = /* @__PURE__ */ me(As, [["__scopeId", "data-v-94990087"]]), Ye = /* @__PURE__ */ W({
|
|
4405
4411
|
__name: "PermissionsWrapper",
|
|
4406
4412
|
props: {
|
|
4407
4413
|
/**
|
|
@@ -4423,21 +4429,21 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4423
4429
|
}
|
|
4424
4430
|
},
|
|
4425
4431
|
setup(e) {
|
|
4426
|
-
const t = e, n = B(void 0), r =
|
|
4432
|
+
const t = e, n = B(void 0), r = x(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4427
4433
|
return ke(() => t.authFunction, async () => {
|
|
4428
4434
|
n.value = await t.authFunction();
|
|
4429
4435
|
}, { immediate: !0 }), (a, i) => r.value ? Q(a.$slots, "default", {
|
|
4430
4436
|
key: 0,
|
|
4431
4437
|
isAllowed: n.value
|
|
4432
|
-
}) :
|
|
4438
|
+
}) : z("", !0);
|
|
4433
4439
|
}
|
|
4434
4440
|
});
|
|
4435
4441
|
let Ze;
|
|
4436
|
-
const
|
|
4437
|
-
function
|
|
4442
|
+
const $s = new Uint8Array(16);
|
|
4443
|
+
function Ns() {
|
|
4438
4444
|
if (!Ze && (Ze = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ze))
|
|
4439
4445
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4440
|
-
return Ze(
|
|
4446
|
+
return Ze($s);
|
|
4441
4447
|
}
|
|
4442
4448
|
const re = [];
|
|
4443
4449
|
for (let e = 0; e < 256; ++e)
|
|
@@ -4452,7 +4458,7 @@ function Ms(e, t, n) {
|
|
|
4452
4458
|
if (mn.randomUUID && !t && !e)
|
|
4453
4459
|
return mn.randomUUID();
|
|
4454
4460
|
e = e || {};
|
|
4455
|
-
const r = e.random || (e.rng ||
|
|
4461
|
+
const r = e.random || (e.rng || Ns)();
|
|
4456
4462
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
4457
4463
|
n = n || 0;
|
|
4458
4464
|
for (let a = 0; a < 16; ++a)
|
|
@@ -4461,10 +4467,10 @@ function Ms(e, t, n) {
|
|
|
4461
4467
|
}
|
|
4462
4468
|
return js(r);
|
|
4463
4469
|
}
|
|
4464
|
-
const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" },
|
|
4470
|
+
const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Bs = {
|
|
4465
4471
|
key: 1,
|
|
4466
4472
|
class: "form-section-description"
|
|
4467
|
-
},
|
|
4473
|
+
}, Es = {
|
|
4468
4474
|
key: 2,
|
|
4469
4475
|
class: "form-section-footer"
|
|
4470
4476
|
}, Ks = { class: "form-section-content" }, Ls = /* @__PURE__ */ W({
|
|
@@ -4499,15 +4505,15 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4499
4505
|
const t = It(), n = Ms();
|
|
4500
4506
|
return (r, a) => (f(), O("div", {
|
|
4501
4507
|
"aria-labelledby": e.title ? m(n) : void 0,
|
|
4502
|
-
class:
|
|
4508
|
+
class: Se(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4503
4509
|
role: "group"
|
|
4504
4510
|
}, [
|
|
4505
|
-
|
|
4506
|
-
e.hideInfoHeader ?
|
|
4511
|
+
F("div", Fs, [
|
|
4512
|
+
e.hideInfoHeader ? z("", !0) : (f(), O("div", {
|
|
4507
4513
|
key: 0,
|
|
4508
|
-
class:
|
|
4514
|
+
class: Se(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4509
4515
|
}, [
|
|
4510
|
-
e.title ? (f(),
|
|
4516
|
+
e.title ? (f(), D(be(e.titleTag), {
|
|
4511
4517
|
key: 0,
|
|
4512
4518
|
id: m(n),
|
|
4513
4519
|
class: "form-section-title"
|
|
@@ -4516,23 +4522,23 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4516
4522
|
J(j(e.title), 1)
|
|
4517
4523
|
]),
|
|
4518
4524
|
_: 1
|
|
4519
|
-
}, 8, ["id"])) :
|
|
4520
|
-
e.description || m(t).description ? (f(), O("div",
|
|
4525
|
+
}, 8, ["id"])) : z("", !0),
|
|
4526
|
+
e.description || m(t).description ? (f(), O("div", Bs, [
|
|
4521
4527
|
Q(r.$slots, "description", {}, () => [
|
|
4522
|
-
|
|
4528
|
+
F("p", null, j(e.description), 1)
|
|
4523
4529
|
], !0)
|
|
4524
|
-
])) :
|
|
4525
|
-
m(t).footer ? (f(), O("div",
|
|
4530
|
+
])) : z("", !0),
|
|
4531
|
+
m(t).footer ? (f(), O("div", Es, [
|
|
4526
4532
|
Q(r.$slots, "footer", {}, void 0, !0)
|
|
4527
|
-
])) :
|
|
4533
|
+
])) : z("", !0)
|
|
4528
4534
|
], 2)),
|
|
4529
|
-
|
|
4535
|
+
F("div", Ks, [
|
|
4530
4536
|
Q(r.$slots, "default", {}, void 0, !0)
|
|
4531
4537
|
])
|
|
4532
4538
|
])
|
|
4533
4539
|
], 10, qs));
|
|
4534
4540
|
}
|
|
4535
|
-
}), Us = /* @__PURE__ */ me(Ls, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ot, useDeleteUrlBuilder: Rs, useErrors: Vs, useExternalLinkCreator: vu, useFetchUrlBuilder: bu, useFetcher: Ds, useDebouncedFilter: Ps, useStringHelpers: Cu, useHelpers: ku, useGatewayFeatureSupported: wu, useTruncationDetector: Iu, useValidators:
|
|
4541
|
+
}), Us = /* @__PURE__ */ me(Ls, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ot, useDeleteUrlBuilder: Rs, useErrors: Vs, useExternalLinkCreator: vu, useFetchUrlBuilder: bu, useFetcher: Ds, useDebouncedFilter: Ps, useStringHelpers: Cu, useHelpers: ku, useGatewayFeatureSupported: wu, useTruncationDetector: Iu, useValidators: xu } = ne, zs = { class: "add-consumer-form-container" }, Gs = { class: "add-consumer-form-cta" }, Hs = { class: "select-item-label" }, Js = {
|
|
4536
4542
|
key: 0,
|
|
4537
4543
|
class: "select-item-desc"
|
|
4538
4544
|
}, Ws = {
|
|
@@ -4555,14 +4561,14 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4555
4561
|
},
|
|
4556
4562
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4557
4563
|
setup(e, { emit: t }) {
|
|
4558
|
-
var
|
|
4559
|
-
const { i18n: { t: n } } = at.useI18n(), r = e, a = t, { axiosInstance: i } = Ot((
|
|
4564
|
+
var S;
|
|
4565
|
+
const { i18n: { t: n } } = at.useI18n(), r = e, a = t, { axiosInstance: i } = Ot((S = r.config) == null ? void 0 : S.axiosRequestConfig), o = B([]), {
|
|
4560
4566
|
debouncedQueryChange: l,
|
|
4561
4567
|
loading: s,
|
|
4562
4568
|
allRecords: u,
|
|
4563
4569
|
error: d,
|
|
4564
4570
|
loadItems: c,
|
|
4565
|
-
results:
|
|
4571
|
+
results: b
|
|
4566
4572
|
} = Ps(
|
|
4567
4573
|
r.config,
|
|
4568
4574
|
je.list[r.config.app].all,
|
|
@@ -4571,77 +4577,77 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4571
4577
|
fetchedItemsKey: "data",
|
|
4572
4578
|
searchKeys: ["username", "id"]
|
|
4573
4579
|
}
|
|
4574
|
-
),
|
|
4575
|
-
label:
|
|
4576
|
-
value:
|
|
4577
|
-
selected: o.value.includes(
|
|
4578
|
-
data:
|
|
4580
|
+
), g = (M) => M, I = x(() => d.value ? n("consumers.errors.general") : ""), L = B(0), k = x(() => u.value === void 0), U = x(() => b.value.map((M) => ({
|
|
4581
|
+
label: M.username || M.customId,
|
|
4582
|
+
value: M.id,
|
|
4583
|
+
selected: o.value.includes(M.id),
|
|
4584
|
+
data: M
|
|
4579
4585
|
// we need this to determine whether or not to show the description text
|
|
4580
|
-
}))),
|
|
4581
|
-
var
|
|
4582
|
-
const
|
|
4583
|
-
return
|
|
4584
|
-
},
|
|
4585
|
-
p.value = "",
|
|
4586
|
-
},
|
|
4586
|
+
}))), T = (M) => {
|
|
4587
|
+
var P;
|
|
4588
|
+
const K = k.value ? b.value.find((G) => G.id === M) : (P = u.value) == null ? void 0 : P.find((G) => G.id === M);
|
|
4589
|
+
return K ? K.username || K.custom_id : M;
|
|
4590
|
+
}, E = () => {
|
|
4591
|
+
p.value = "", w.value = [], A.value = [], a("cancel");
|
|
4592
|
+
}, w = B([]), _ = B(!1), p = B(""), C = async () => {
|
|
4587
4593
|
if (!o.value.length) {
|
|
4588
|
-
p.value = "",
|
|
4594
|
+
p.value = "", A.value = [], a("cancel");
|
|
4589
4595
|
return;
|
|
4590
4596
|
}
|
|
4591
|
-
|
|
4597
|
+
_.value = !0, p.value = "", w.value = [], A.value = [];
|
|
4592
4598
|
try {
|
|
4593
|
-
const
|
|
4594
|
-
let
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
}),
|
|
4599
|
+
const M = o.value.map((G) => y(G)), K = await Promise.allSettled(M);
|
|
4600
|
+
let P = !0;
|
|
4601
|
+
K.forEach((G) => {
|
|
4602
|
+
G.status !== "fulfilled" && (P = !1);
|
|
4603
|
+
}), P ? (w.value = [], A.value = [], a("add:success", o.value), o.value = []) : (w.value.length && a("add:partial-success", w.value), o.value = [], R(K));
|
|
4598
4604
|
} catch {
|
|
4599
4605
|
p.value = n("consumers.errors.add"), a("error", p.value);
|
|
4600
4606
|
} finally {
|
|
4601
|
-
|
|
4607
|
+
_.value = !1;
|
|
4602
4608
|
}
|
|
4603
|
-
}, v =
|
|
4604
|
-
var
|
|
4605
|
-
let
|
|
4606
|
-
return r.config.app === "konnect" ?
|
|
4607
|
-
}),
|
|
4608
|
-
const
|
|
4609
|
-
consumer:
|
|
4609
|
+
}, v = x(() => {
|
|
4610
|
+
var K, P, G, oe;
|
|
4611
|
+
let M = `${r.config.apiBaseUrl}${je.list[r.config.app].forConsumerGroup}`;
|
|
4612
|
+
return r.config.app === "konnect" ? M = M.replace(/{controlPlaneId}/gi, ((K = r.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((P = r.config) == null ? void 0 : P.consumerGroupId) || "") : r.config.app === "kongManager" && (M = M.replace(/\/{workspace}/gi, (G = r.config) != null && G.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((oe = r.config) == null ? void 0 : oe.consumerGroupId) || "")), M;
|
|
4613
|
+
}), y = async (M) => {
|
|
4614
|
+
const K = {
|
|
4615
|
+
consumer: M
|
|
4610
4616
|
};
|
|
4611
4617
|
try {
|
|
4612
|
-
const
|
|
4613
|
-
return
|
|
4614
|
-
} catch (
|
|
4615
|
-
let
|
|
4616
|
-
return
|
|
4618
|
+
const P = await i.post(v.value, K);
|
|
4619
|
+
return w.value.push(M), P;
|
|
4620
|
+
} catch (P) {
|
|
4621
|
+
let G = `${T(M)} - ${P.message}`;
|
|
4622
|
+
return P.response.status === 409 && (G = `${T(M)} - ${n("consumers.errors.already_added")}`), Promise.reject(Error(G));
|
|
4617
4623
|
}
|
|
4618
|
-
},
|
|
4619
|
-
|
|
4620
|
-
var
|
|
4621
|
-
return (
|
|
4624
|
+
}, A = B([]), R = (M) => {
|
|
4625
|
+
A.value = M.map((K) => {
|
|
4626
|
+
var P;
|
|
4627
|
+
return (P = K.reason) == null ? void 0 : P.message;
|
|
4622
4628
|
}).filter(Boolean);
|
|
4623
4629
|
};
|
|
4624
4630
|
return ke(U, () => {
|
|
4625
|
-
|
|
4631
|
+
L.value++;
|
|
4626
4632
|
}, { immediate: !0, deep: !0 }), ke(() => r.visible, () => {
|
|
4627
4633
|
r.visible && c();
|
|
4628
|
-
}, { immediate: !0 }), (
|
|
4629
|
-
const
|
|
4630
|
-
return f(),
|
|
4631
|
-
"action-button-disabled":
|
|
4634
|
+
}, { immediate: !0 }), (M, K) => {
|
|
4635
|
+
const P = V("KMultiselect"), G = V("KAlert"), oe = V("KPrompt");
|
|
4636
|
+
return f(), D(oe, {
|
|
4637
|
+
"action-button-disabled": _.value,
|
|
4632
4638
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4633
4639
|
"data-testid": "add-consumer-modal",
|
|
4634
4640
|
title: m(n)("consumers.consumer_groups.add.title"),
|
|
4635
4641
|
visible: e.visible,
|
|
4636
|
-
onCancel:
|
|
4637
|
-
onProceed:
|
|
4642
|
+
onCancel: E,
|
|
4643
|
+
onProceed: C
|
|
4638
4644
|
}, {
|
|
4639
4645
|
default: h(() => [
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4646
|
+
F("div", zs, [
|
|
4647
|
+
F("p", Gs, j(m(n)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4648
|
+
N(P, {
|
|
4643
4649
|
modelValue: o.value,
|
|
4644
|
-
"onUpdate:modelValue":
|
|
4650
|
+
"onUpdate:modelValue": K[0] || (K[0] = (ge) => o.value = ge),
|
|
4645
4651
|
autosuggest: "",
|
|
4646
4652
|
"data-testid": "add-consumers-multiselect",
|
|
4647
4653
|
"dropdown-footer-text": k.value ? m(n)("consumers.consumer_groups.add.footer") : void 0,
|
|
@@ -4649,29 +4655,29 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4649
4655
|
label: m(n)("consumers.consumer_groups.add.consumers_label"),
|
|
4650
4656
|
loading: m(s),
|
|
4651
4657
|
placeholder: m(n)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4652
|
-
readonly:
|
|
4658
|
+
readonly: _.value,
|
|
4653
4659
|
required: "",
|
|
4654
4660
|
width: "100%",
|
|
4655
4661
|
onQueryChange: m(l)
|
|
4656
4662
|
}, {
|
|
4657
4663
|
"item-template": h(({ item: ge }) => [
|
|
4658
|
-
|
|
4659
|
-
|
|
4664
|
+
F("div", Hs, j(ge.label), 1),
|
|
4665
|
+
g(ge).data.username && g(ge).data.custom_id ? (f(), O("div", Js, j(g(ge).data.custom_id), 1)) : z("", !0)
|
|
4660
4666
|
]),
|
|
4661
4667
|
_: 1
|
|
4662
4668
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4663
|
-
p.value || I.value ||
|
|
4664
|
-
|
|
4669
|
+
p.value || I.value || A.value.length ? (f(), O("div", Ws, [
|
|
4670
|
+
N(G, { appearance: "danger" }, {
|
|
4665
4671
|
default: h(() => [
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
(f(!0), O(fe, null, pe(
|
|
4669
|
-
])) :
|
|
4670
|
-
|
|
4672
|
+
F("p", null, j(m(n)("consumers.errors.add")), 1),
|
|
4673
|
+
A.value.length ? (f(), O("ul", Ys, [
|
|
4674
|
+
(f(!0), O(fe, null, pe(A.value, (ge, lt) => (f(), O("li", { key: lt }, j(ge), 1))), 128))
|
|
4675
|
+
])) : z("", !0),
|
|
4676
|
+
F("div", null, j(p.value || I.value), 1)
|
|
4671
4677
|
]),
|
|
4672
4678
|
_: 1
|
|
4673
4679
|
})
|
|
4674
|
-
])) :
|
|
4680
|
+
])) : z("", !0)
|
|
4675
4681
|
])
|
|
4676
4682
|
]),
|
|
4677
4683
|
_: 1
|
|
@@ -4730,124 +4736,124 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4730
4736
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4731
4737
|
setup(e, { emit: t }) {
|
|
4732
4738
|
var Ut;
|
|
4733
|
-
const n = t, r = e, { i18nT: a, i18n: { t: i } } = at.useI18n(), o =
|
|
4739
|
+
const n = t, r = e, { i18nT: a, i18n: { t: i } } = at.useI18n(), o = xt(), { axiosInstance: l } = Ot((Ut = r.config) == null ? void 0 : Ut.axiosRequestConfig), s = B(1), u = x(() => !!r.config.consumerGroupId), d = x(
|
|
4734
4740
|
() => u.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
|
|
4735
|
-
), c =
|
|
4741
|
+
), c = x(() => r.config.app !== "kongManager" || !!r.config.disableSorting), b = {
|
|
4736
4742
|
// the Username column is non-hidable
|
|
4737
4743
|
username: { label: i("consumers.list.table_headers.username"), searchable: !0, sortable: !0, hidable: !1 },
|
|
4738
4744
|
custom_id: { label: i("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4739
4745
|
tags: { label: i("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4740
|
-
},
|
|
4741
|
-
"data-testid":
|
|
4742
|
-
}),
|
|
4743
|
-
var
|
|
4744
|
-
let
|
|
4745
|
-
return r.config.app === "konnect" ?
|
|
4746
|
-
}), k = B(""), U =
|
|
4747
|
-
const
|
|
4748
|
-
return
|
|
4749
|
-
isExactMatch:
|
|
4746
|
+
}, g = b, I = ($) => ({
|
|
4747
|
+
"data-testid": $.username ?? $.custom_id ?? $.id
|
|
4748
|
+
}), L = x(() => {
|
|
4749
|
+
var H, X, ue, ye;
|
|
4750
|
+
let $ = `${r.config.apiBaseUrl}${je.list[r.config.app][u.value ? "forConsumerGroup" : "all"]}`;
|
|
4751
|
+
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((H = r.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), $;
|
|
4752
|
+
}), k = B(""), U = x(() => {
|
|
4753
|
+
const $ = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4754
|
+
return $ ? {
|
|
4755
|
+
isExactMatch: $,
|
|
4750
4756
|
placeholder: i(`consumers.search.placeholder.${r.config.app}`)
|
|
4751
4757
|
} : {
|
|
4752
|
-
isExactMatch:
|
|
4758
|
+
isExactMatch: $,
|
|
4753
4759
|
fields: {
|
|
4754
|
-
username:
|
|
4755
|
-
custom_id:
|
|
4760
|
+
username: b.username,
|
|
4761
|
+
custom_id: b.custom_id
|
|
4756
4762
|
},
|
|
4757
4763
|
schema: r.config.filterSchema
|
|
4758
4764
|
};
|
|
4759
|
-
}),
|
|
4765
|
+
}), T = x(() => u.value && !r.config.paginatedEndpoint ? "consumers" : void 0), { fetcher: E, fetcherState: w } = Ds(r.config, L.value, T.value), _ = () => {
|
|
4760
4766
|
k.value = "";
|
|
4761
4767
|
}, p = () => {
|
|
4762
4768
|
s.value++;
|
|
4763
|
-
},
|
|
4764
|
-
const X =
|
|
4765
|
-
if (!
|
|
4769
|
+
}, C = ($) => $ ?? "-", v = B(null), y = ($, H) => {
|
|
4770
|
+
const X = $.id;
|
|
4771
|
+
if (!H(X)) {
|
|
4766
4772
|
n("copy:error", {
|
|
4767
|
-
entity:
|
|
4773
|
+
entity: $,
|
|
4768
4774
|
field: "id",
|
|
4769
4775
|
message: i("consumers.errors.copy")
|
|
4770
4776
|
});
|
|
4771
4777
|
return;
|
|
4772
4778
|
}
|
|
4773
4779
|
n("copy:success", {
|
|
4774
|
-
entity:
|
|
4780
|
+
entity: $,
|
|
4775
4781
|
field: "id",
|
|
4776
4782
|
message: i("consumers.copy.success", { val: X })
|
|
4777
4783
|
});
|
|
4778
|
-
},
|
|
4779
|
-
const X = JSON.stringify(
|
|
4780
|
-
if (!
|
|
4784
|
+
}, A = ($, H) => {
|
|
4785
|
+
const X = JSON.stringify($);
|
|
4786
|
+
if (!H(X)) {
|
|
4781
4787
|
n("copy:error", {
|
|
4782
|
-
entity:
|
|
4788
|
+
entity: $,
|
|
4783
4789
|
message: i("consumers.errors.copy")
|
|
4784
4790
|
});
|
|
4785
4791
|
return;
|
|
4786
4792
|
}
|
|
4787
4793
|
n("copy:success", {
|
|
4788
|
-
entity:
|
|
4794
|
+
entity: $,
|
|
4789
4795
|
message: i("consumers.copy.success_brief")
|
|
4790
4796
|
});
|
|
4791
|
-
},
|
|
4797
|
+
}, R = async ($) => {
|
|
4792
4798
|
var X;
|
|
4793
|
-
await ((X = r.canRetrieve) == null ? void 0 : X.call(r,
|
|
4794
|
-
},
|
|
4799
|
+
await ((X = r.canRetrieve) == null ? void 0 : X.call(r, $)) && o.push(r.config.getViewRoute($.id));
|
|
4800
|
+
}, S = ($) => ({
|
|
4795
4801
|
label: i("consumers.actions.view"),
|
|
4796
|
-
to: r.config.getViewRoute(
|
|
4797
|
-
}),
|
|
4802
|
+
to: r.config.getViewRoute($)
|
|
4803
|
+
}), M = ($) => ({
|
|
4798
4804
|
label: i("consumers.actions.edit"),
|
|
4799
|
-
to: r.config.getEditRoute(
|
|
4800
|
-
}),
|
|
4801
|
-
|
|
4805
|
+
to: r.config.getEditRoute($)
|
|
4806
|
+
}), K = B(void 0), P = B(!1), G = B(!1), oe = B(""), ge = Rs(r.config, L.value), lt = ($) => {
|
|
4807
|
+
K.value = $, P.value = !0;
|
|
4802
4808
|
}, gr = () => {
|
|
4803
|
-
|
|
4809
|
+
P.value = !1;
|
|
4804
4810
|
}, yr = async () => {
|
|
4805
|
-
var
|
|
4806
|
-
if ((
|
|
4807
|
-
|
|
4811
|
+
var $, H, X;
|
|
4812
|
+
if (($ = K.value) != null && $.id) {
|
|
4813
|
+
G.value = !0;
|
|
4808
4814
|
try {
|
|
4809
|
-
await l.delete(ge(
|
|
4815
|
+
await l.delete(ge(K.value.id)), G.value = !1, P.value = !1, s.value++, n("delete:success", K.value);
|
|
4810
4816
|
} catch (ue) {
|
|
4811
|
-
oe.value = ((X = (
|
|
4817
|
+
oe.value = ((X = (H = ue.response) == null ? void 0 : H.data) == null ? void 0 : X.message) || ue.message || i("consumers.errors.delete"), n("error", ue);
|
|
4812
4818
|
} finally {
|
|
4813
|
-
|
|
4819
|
+
G.value = !1;
|
|
4814
4820
|
}
|
|
4815
4821
|
}
|
|
4816
4822
|
}, st = B(!1), qt = () => {
|
|
4817
4823
|
st.value = !0;
|
|
4818
4824
|
}, Ft = () => {
|
|
4819
4825
|
st.value = !1;
|
|
4820
|
-
},
|
|
4821
|
-
|
|
4826
|
+
}, Bt = ($, H) => {
|
|
4827
|
+
H || Ft(), s.value++, n("add:success", $);
|
|
4822
4828
|
}, hr = () => {
|
|
4823
4829
|
u.value && qt();
|
|
4824
|
-
}, Ce = B(void 0), ut = B(!1), vr = B(""), br = (
|
|
4825
|
-
Ce.value =
|
|
4826
|
-
},
|
|
4830
|
+
}, Ce = B(void 0), ut = B(!1), vr = B(""), br = ($) => {
|
|
4831
|
+
Ce.value = $, ut.value = !0;
|
|
4832
|
+
}, Et = () => {
|
|
4827
4833
|
ut.value = !1, Ce.value = void 0;
|
|
4828
|
-
}, Cr =
|
|
4829
|
-
var
|
|
4830
|
-
let
|
|
4831
|
-
return r.config.app === "konnect" ?
|
|
4834
|
+
}, Cr = x(() => {
|
|
4835
|
+
var H, X, ue, ye;
|
|
4836
|
+
let $ = `${r.config.apiBaseUrl}${je.list[r.config.app].oneForConsumerGroup}`;
|
|
4837
|
+
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((H = r.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), $;
|
|
4832
4838
|
}), Kt = B(!1), kr = async () => {
|
|
4833
4839
|
if (Ce.value) {
|
|
4834
4840
|
Kt.value = !0;
|
|
4835
4841
|
try {
|
|
4836
|
-
const
|
|
4837
|
-
await l.delete(
|
|
4838
|
-
} catch (
|
|
4839
|
-
vr.value =
|
|
4842
|
+
const $ = Cr.value.replace(/{consumerId}/gi, Ce.value.id);
|
|
4843
|
+
await l.delete($), n("remove:success", Ce.value), Et(), s.value++;
|
|
4844
|
+
} catch ($) {
|
|
4845
|
+
vr.value = $.message || i("consumers.errors.delete"), n("error", $);
|
|
4840
4846
|
} finally {
|
|
4841
4847
|
Kt.value = !1;
|
|
4842
4848
|
}
|
|
4843
4849
|
}
|
|
4844
4850
|
}, Lt = B(!0);
|
|
4845
|
-
ke(
|
|
4846
|
-
var
|
|
4847
|
-
if (Array.isArray((
|
|
4851
|
+
ke(w, ($) => {
|
|
4852
|
+
var H, X, ue, ye;
|
|
4853
|
+
if (Array.isArray((H = $ == null ? void 0 : $.response) == null ? void 0 : H.data) && (Lt.value = $.response.data.length > 0), $.status === Te.Error) {
|
|
4848
4854
|
v.value = {
|
|
4849
4855
|
title: i("consumers.errors.general")
|
|
4850
|
-
}, (ye = (ue = (X =
|
|
4856
|
+
}, (ye = (ue = (X = $.error) == null ? void 0 : X.response) == null ? void 0 : ue.data) != null && ye.message && (v.value.message = $.error.response.data.message), n("error", $.error);
|
|
4851
4857
|
return;
|
|
4852
4858
|
}
|
|
4853
4859
|
v.value = null;
|
|
@@ -4860,10 +4866,10 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4860
4866
|
});
|
|
4861
4867
|
return wt(async () => {
|
|
4862
4868
|
await r.canCreate() && (ct.value.title = u.value ? i("consumers.list.empty_state.title_for_consumer_group") : i("consumers.list.empty_state.title"), ct.value.ctaText = u.value ? i("consumers.actions.add_consumer") : i("consumers.actions.create"));
|
|
4863
|
-
}), (
|
|
4864
|
-
const X =
|
|
4869
|
+
}), ($, H) => {
|
|
4870
|
+
const X = V("KButton"), ue = V("KBadge"), ye = V("KTruncate"), De = V("KDropdownItem"), Rt = V("KClipboardProvider"), wr = V("KPrompt");
|
|
4865
4871
|
return f(), O("div", Xs, [
|
|
4866
|
-
|
|
4872
|
+
N(m(ss), {
|
|
4867
4873
|
"cache-identifier": e.cacheIdentifier,
|
|
4868
4874
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4869
4875
|
"disable-pagination-page-jump": "",
|
|
@@ -4871,50 +4877,50 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4871
4877
|
"empty-state-options": ct.value,
|
|
4872
4878
|
"enable-entity-actions": "",
|
|
4873
4879
|
"error-message": v.value,
|
|
4874
|
-
fetcher: m(
|
|
4880
|
+
fetcher: m(E),
|
|
4875
4881
|
"fetcher-cache-key": s.value,
|
|
4876
4882
|
"pagination-type": "offset",
|
|
4877
4883
|
"preferences-storage-key": d.value,
|
|
4878
4884
|
query: k.value,
|
|
4879
4885
|
"row-attributes": I,
|
|
4880
|
-
"table-headers": m(
|
|
4886
|
+
"table-headers": m(g),
|
|
4881
4887
|
"use-action-outside": e.useActionOutside,
|
|
4882
|
-
onClearSearchInput:
|
|
4883
|
-
"onClick:row":
|
|
4888
|
+
onClearSearchInput: _,
|
|
4889
|
+
"onClick:row": H[3] || (H[3] = (Y) => R(Y)),
|
|
4884
4890
|
onEmptyStateCtaClicked: hr,
|
|
4885
4891
|
onSort: p
|
|
4886
4892
|
}, {
|
|
4887
4893
|
"toolbar-filter": h(() => [
|
|
4888
|
-
u.value ?
|
|
4894
|
+
u.value ? z("", !0) : (f(), D(m(Ts), {
|
|
4889
4895
|
key: 0,
|
|
4890
4896
|
modelValue: k.value,
|
|
4891
|
-
"onUpdate:modelValue":
|
|
4897
|
+
"onUpdate:modelValue": H[0] || (H[0] = (Y) => k.value = Y),
|
|
4892
4898
|
config: U.value
|
|
4893
4899
|
}, null, 8, ["modelValue", "config"]))
|
|
4894
4900
|
]),
|
|
4895
4901
|
"toolbar-button": h(() => [
|
|
4896
|
-
(f(),
|
|
4902
|
+
(f(), D(jr, {
|
|
4897
4903
|
disabled: !e.useActionOutside,
|
|
4898
4904
|
to: "#kong-ui-app-page-header-action-button"
|
|
4899
4905
|
}, [
|
|
4900
|
-
|
|
4906
|
+
N(m(Ye), {
|
|
4901
4907
|
"auth-function": () => e.canCreate()
|
|
4902
4908
|
}, {
|
|
4903
4909
|
default: h(() => [
|
|
4904
|
-
Ie(
|
|
4910
|
+
Ie(N(X, {
|
|
4905
4911
|
appearance: "primary",
|
|
4906
4912
|
"data-testid": "toolbar-add-consumer",
|
|
4907
4913
|
size: "large",
|
|
4908
4914
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4909
|
-
onClick:
|
|
4915
|
+
onClick: H[1] || (H[1] = () => e.config.consumerGroupId ? qt() : void 0)
|
|
4910
4916
|
}, {
|
|
4911
4917
|
default: h(() => [
|
|
4912
|
-
|
|
4918
|
+
N(m(Lr)),
|
|
4913
4919
|
J(" " + j(e.config.consumerGroupId ? m(i)("consumers.actions.add_consumer") : m(i)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
4914
4920
|
]),
|
|
4915
4921
|
_: 1
|
|
4916
4922
|
}, 8, ["to"]), [
|
|
4917
|
-
[
|
|
4923
|
+
[xe, Lt.value]
|
|
4918
4924
|
])
|
|
4919
4925
|
]),
|
|
4920
4926
|
_: 1
|
|
@@ -4922,17 +4928,17 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4922
4928
|
], 8, ["disabled"]))
|
|
4923
4929
|
]),
|
|
4924
4930
|
username: h(({ rowValue: Y }) => [
|
|
4925
|
-
|
|
4931
|
+
F("b", null, j(C(Y)), 1)
|
|
4926
4932
|
]),
|
|
4927
4933
|
custom_id: h(({ rowValue: Y }) => [
|
|
4928
|
-
J(j(
|
|
4934
|
+
J(j(C(Y)), 1)
|
|
4929
4935
|
]),
|
|
4930
4936
|
tags: h(({ rowValue: Y }) => [
|
|
4931
|
-
Y && Y.length > 0 ? (f(),
|
|
4937
|
+
Y && Y.length > 0 ? (f(), D(ye, { key: 0 }, {
|
|
4932
4938
|
default: h(() => [
|
|
4933
|
-
(f(!0), O(fe, null, pe(Y, (Oe) => (f(),
|
|
4939
|
+
(f(!0), O(fe, null, pe(Y, (Oe) => (f(), D(ue, {
|
|
4934
4940
|
key: Oe,
|
|
4935
|
-
onClick:
|
|
4941
|
+
onClick: H[2] || (H[2] = gt(() => {
|
|
4936
4942
|
}, ["stop"]))
|
|
4937
4943
|
}, {
|
|
4938
4944
|
default: h(() => [
|
|
@@ -4945,11 +4951,11 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4945
4951
|
}, 1024)) : (f(), O("span", eu, "-"))
|
|
4946
4952
|
]),
|
|
4947
4953
|
actions: h(({ row: Y }) => [
|
|
4948
|
-
|
|
4954
|
+
N(Rt, null, {
|
|
4949
4955
|
default: h(({ copyToClipboard: Oe }) => [
|
|
4950
|
-
|
|
4956
|
+
N(De, {
|
|
4951
4957
|
"data-testid": "action-entity-copy-id",
|
|
4952
|
-
onClick: (Ir) =>
|
|
4958
|
+
onClick: (Ir) => y(Y, Oe)
|
|
4953
4959
|
}, {
|
|
4954
4960
|
default: h(() => [
|
|
4955
4961
|
J(j(m(i)("consumers.actions.copy_id")), 1)
|
|
@@ -4959,11 +4965,11 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4959
4965
|
]),
|
|
4960
4966
|
_: 2
|
|
4961
4967
|
}, 1024),
|
|
4962
|
-
|
|
4968
|
+
N(Rt, null, {
|
|
4963
4969
|
default: h(({ copyToClipboard: Oe }) => [
|
|
4964
|
-
|
|
4970
|
+
N(De, {
|
|
4965
4971
|
"data-testid": "action-entity-copy-json",
|
|
4966
|
-
onClick: (Ir) =>
|
|
4972
|
+
onClick: (Ir) => A(Y, Oe)
|
|
4967
4973
|
}, {
|
|
4968
4974
|
default: h(() => [
|
|
4969
4975
|
J(j(m(i)("consumers.actions.copy_json")), 1)
|
|
@@ -4973,34 +4979,34 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
4973
4979
|
]),
|
|
4974
4980
|
_: 2
|
|
4975
4981
|
}, 1024),
|
|
4976
|
-
|
|
4982
|
+
N(m(Ye), {
|
|
4977
4983
|
"auth-function": () => e.canRetrieve(Y)
|
|
4978
4984
|
}, {
|
|
4979
4985
|
default: h(() => [
|
|
4980
|
-
|
|
4986
|
+
N(De, {
|
|
4981
4987
|
"data-testid": "action-entity-view",
|
|
4982
4988
|
"has-divider": "",
|
|
4983
|
-
item:
|
|
4989
|
+
item: S(Y.id)
|
|
4984
4990
|
}, null, 8, ["item"])
|
|
4985
4991
|
]),
|
|
4986
4992
|
_: 2
|
|
4987
4993
|
}, 1032, ["auth-function"]),
|
|
4988
|
-
|
|
4994
|
+
N(m(Ye), {
|
|
4989
4995
|
"auth-function": () => e.canEdit(Y)
|
|
4990
4996
|
}, {
|
|
4991
4997
|
default: h(() => [
|
|
4992
|
-
|
|
4998
|
+
N(De, {
|
|
4993
4999
|
"data-testid": "action-entity-edit",
|
|
4994
|
-
item:
|
|
5000
|
+
item: M(Y.id)
|
|
4995
5001
|
}, null, 8, ["item"])
|
|
4996
5002
|
]),
|
|
4997
5003
|
_: 2
|
|
4998
5004
|
}, 1032, ["auth-function"]),
|
|
4999
|
-
|
|
5005
|
+
N(m(Ye), {
|
|
5000
5006
|
"auth-function": () => e.canDelete(Y)
|
|
5001
5007
|
}, {
|
|
5002
5008
|
default: h(() => [
|
|
5003
|
-
|
|
5009
|
+
N(De, {
|
|
5004
5010
|
danger: "",
|
|
5005
5011
|
"data-testid": "action-entity-delete",
|
|
5006
5012
|
"has-divider": "",
|
|
@@ -5017,59 +5023,59 @@ const qs = ["aria-labelledby"], Fs = { class: "form-section-wrapper" }, Es = {
|
|
|
5017
5023
|
]),
|
|
5018
5024
|
_: 1
|
|
5019
5025
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "preferences-storage-key", "query", "table-headers", "use-action-outside"]),
|
|
5020
|
-
|
|
5021
|
-
"action-button-disabled":
|
|
5026
|
+
N(m(ps), {
|
|
5027
|
+
"action-button-disabled": G.value,
|
|
5022
5028
|
"data-testid": "delete-consumer-modal",
|
|
5023
5029
|
description: m(i)("consumers.delete.description"),
|
|
5024
|
-
"entity-name":
|
|
5030
|
+
"entity-name": K.value && (K.value.username || K.value.custom_id || K.value.id),
|
|
5025
5031
|
"entity-type": m(bn).Consumer,
|
|
5026
5032
|
error: oe.value,
|
|
5027
5033
|
title: m(i)("consumers.delete.title"),
|
|
5028
|
-
visible:
|
|
5034
|
+
visible: P.value,
|
|
5029
5035
|
onCancel: gr,
|
|
5030
5036
|
onProceed: yr
|
|
5031
5037
|
}, null, 8, ["action-button-disabled", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
5032
|
-
e.config.consumerGroupId ? (f(),
|
|
5038
|
+
e.config.consumerGroupId ? (f(), D(Qs, {
|
|
5033
5039
|
key: 0,
|
|
5034
5040
|
config: e.config,
|
|
5035
5041
|
"data-testid": "add-consumer-modal",
|
|
5036
5042
|
visible: st.value,
|
|
5037
|
-
"onAdd:partialSuccess":
|
|
5038
|
-
"onAdd:success":
|
|
5043
|
+
"onAdd:partialSuccess": H[4] || (H[4] = (Y) => Bt(Y, !0)),
|
|
5044
|
+
"onAdd:success": H[5] || (H[5] = (Y) => Bt(Y)),
|
|
5039
5045
|
onCancel: Ft
|
|
5040
|
-
}, null, 8, ["config", "visible"])) :
|
|
5041
|
-
e.config.consumerGroupId && Ce.value ? (f(),
|
|
5046
|
+
}, null, 8, ["config", "visible"])) : z("", !0),
|
|
5047
|
+
e.config.consumerGroupId && Ce.value ? (f(), D(wr, {
|
|
5042
5048
|
key: 1,
|
|
5043
5049
|
"action-button-appearance": "danger",
|
|
5044
5050
|
"data-testid": "remove-consumer-modal",
|
|
5045
5051
|
title: m(i)("consumers.consumer_groups.remove.title"),
|
|
5046
5052
|
visible: ut.value,
|
|
5047
|
-
onCancel:
|
|
5053
|
+
onCancel: Et,
|
|
5048
5054
|
onProceed: kr
|
|
5049
5055
|
}, {
|
|
5050
5056
|
default: h(() => [
|
|
5051
|
-
|
|
5057
|
+
N(m(a), {
|
|
5052
5058
|
class: "message",
|
|
5053
5059
|
keypath: e.config.consumerGroupName ? "consumers.consumer_groups.remove.confirmation" : "consumers.consumer_groups.remove.confirmationNoCG",
|
|
5054
5060
|
tag: "p"
|
|
5055
|
-
},
|
|
5061
|
+
}, Ne({
|
|
5056
5062
|
consumer: h(() => [
|
|
5057
|
-
|
|
5063
|
+
F("strong", null, j(Ce.value.username || Ce.value.custom_id || Ce.value.id), 1)
|
|
5058
5064
|
]),
|
|
5059
5065
|
_: 2
|
|
5060
5066
|
}, [
|
|
5061
5067
|
e.config.consumerGroupName ? {
|
|
5062
5068
|
name: "consumerGroup",
|
|
5063
5069
|
fn: h(() => [
|
|
5064
|
-
|
|
5070
|
+
F("strong", null, j(e.config.consumerGroupName), 1)
|
|
5065
5071
|
]),
|
|
5066
5072
|
key: "0"
|
|
5067
5073
|
} : void 0
|
|
5068
5074
|
]), 1032, ["keypath"]),
|
|
5069
|
-
|
|
5075
|
+
F("p", null, j(m(i)("consumers.consumer_groups.remove.description")), 1)
|
|
5070
5076
|
]),
|
|
5071
5077
|
_: 1
|
|
5072
|
-
}, 8, ["title", "visible"])) :
|
|
5078
|
+
}, 8, ["title", "visible"])) : z("", !0)
|
|
5073
5079
|
]);
|
|
5074
5080
|
};
|
|
5075
5081
|
}
|
|
@@ -5121,8 +5127,8 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5121
5127
|
},
|
|
5122
5128
|
emits: ["update", "error", "loading"],
|
|
5123
5129
|
setup(e, { emit: t }) {
|
|
5124
|
-
var
|
|
5125
|
-
const n = e, r = t, { i18nT: a, i18n: { t: i } } = at.useI18n(), o =
|
|
5130
|
+
var C;
|
|
5131
|
+
const n = e, r = t, { i18nT: a, i18n: { t: i } } = at.useI18n(), o = xt(), { axiosInstance: l } = Ot((C = n.config) == null ? void 0 : C.axiosRequestConfig), { getMessageFromError: s } = Vs(), u = ou(), d = Vt({
|
|
5126
5132
|
fields: {
|
|
5127
5133
|
username: "",
|
|
5128
5134
|
customId: "",
|
|
@@ -5134,84 +5140,84 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5134
5140
|
username: "",
|
|
5135
5141
|
customId: "",
|
|
5136
5142
|
tags: ""
|
|
5137
|
-
}),
|
|
5138
|
-
var v,
|
|
5139
|
-
return (
|
|
5140
|
-
}),
|
|
5143
|
+
}), b = x(() => {
|
|
5144
|
+
var v, y;
|
|
5145
|
+
return (y = je.form[(v = n.config) == null ? void 0 : v.app]) == null ? void 0 : y.edit;
|
|
5146
|
+
}), g = () => {
|
|
5141
5147
|
var v;
|
|
5142
5148
|
o.push(((v = n.config) == null ? void 0 : v.cancelRoute) || { name: "consumer-list" });
|
|
5143
5149
|
}, I = (v) => {
|
|
5144
5150
|
r("loading", v);
|
|
5145
|
-
},
|
|
5151
|
+
}, L = (v) => {
|
|
5146
5152
|
r("error", v);
|
|
5147
5153
|
}, k = (v) => {
|
|
5148
|
-
var
|
|
5149
|
-
d.fields.username = ((
|
|
5150
|
-
const
|
|
5151
|
-
d.fields.tags = (
|
|
5152
|
-
}, U =
|
|
5153
|
-
var
|
|
5154
|
-
let
|
|
5155
|
-
return ((
|
|
5156
|
-
},
|
|
5157
|
-
var v,
|
|
5154
|
+
var A, R, S;
|
|
5155
|
+
d.fields.username = ((A = v == null ? void 0 : v.item) == null ? void 0 : A.username) || (v == null ? void 0 : v.username) || "", d.fields.customId = ((R = v == null ? void 0 : v.item) == null ? void 0 : R.custom_id) || (v == null ? void 0 : v.custom_id) || "";
|
|
5156
|
+
const y = ((S = v == null ? void 0 : v.item) == null ? void 0 : S.tags) || (v == null ? void 0 : v.tags) || [];
|
|
5157
|
+
d.fields.tags = (y == null ? void 0 : y.join(", ")) || "", Object.assign(c, d.fields);
|
|
5158
|
+
}, U = x(() => n.consumerId ? yt.Edit : yt.Create), T = (v) => {
|
|
5159
|
+
var A, R, S, M, K, P;
|
|
5160
|
+
let y = `${(A = n.config) == null ? void 0 : A.apiBaseUrl}${je.form[(R = n.config) == null ? void 0 : R.app][v]}`;
|
|
5161
|
+
return ((S = n.config) == null ? void 0 : S.app) === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((M = n.config) == null ? void 0 : M.controlPlaneId) || "") : ((K = n.config) == null ? void 0 : K.app) === "kongManager" && (y = y.replace(/\/{workspace}/gi, (P = n.config) != null && P.workspace ? `/${n.config.workspace}` : "")), y = y.replace(/{id}/gi, n.consumerId), y;
|
|
5162
|
+
}, E = x(() => !!d.fields.username || !!d.fields.customId), w = x(() => JSON.stringify(d.fields) !== JSON.stringify(c)), _ = x(() => {
|
|
5163
|
+
var v, y;
|
|
5158
5164
|
return {
|
|
5159
5165
|
username: d.fields.username || null,
|
|
5160
5166
|
custom_id: d.fields.customId || null,
|
|
5161
|
-
tags: (
|
|
5167
|
+
tags: (y = (v = d.fields.tags.split(",")) == null ? void 0 : v.map((A) => String(A || "").trim())) == null ? void 0 : y.filter((A) => A !== "")
|
|
5162
5168
|
};
|
|
5163
5169
|
}), p = async () => {
|
|
5164
5170
|
var v;
|
|
5165
5171
|
try {
|
|
5166
5172
|
d.readonly = !0;
|
|
5167
|
-
let
|
|
5168
|
-
await l.post(
|
|
5169
|
-
} catch (
|
|
5170
|
-
d.errorMessage = s(
|
|
5173
|
+
let y;
|
|
5174
|
+
await l.post(T("validate"), _.value), U.value === "create" ? y = await l.post(T("create"), _.value) : U.value === "edit" && (y = ((v = n.config) == null ? void 0 : v.app) === "konnect" ? await l.put(T("edit"), _.value) : await l.patch(T("edit"), _.value)), k(y == null ? void 0 : y.data), r("update", y == null ? void 0 : y.data);
|
|
5175
|
+
} catch (y) {
|
|
5176
|
+
d.errorMessage = s(y), r("error", y);
|
|
5171
5177
|
} finally {
|
|
5172
5178
|
d.readonly = !1;
|
|
5173
5179
|
}
|
|
5174
5180
|
};
|
|
5175
|
-
return (v,
|
|
5176
|
-
const
|
|
5181
|
+
return (v, y) => {
|
|
5182
|
+
const A = V("KInput"), R = V("KCard");
|
|
5177
5183
|
return f(), O("div", lu, [
|
|
5178
|
-
|
|
5179
|
-
"can-submit":
|
|
5184
|
+
N(m(es), {
|
|
5185
|
+
"can-submit": E.value && w.value,
|
|
5180
5186
|
config: e.config,
|
|
5181
5187
|
"edit-id": e.consumerId,
|
|
5182
5188
|
"error-message": d.errorMessage,
|
|
5183
|
-
"fetch-url":
|
|
5184
|
-
"form-fields":
|
|
5189
|
+
"fetch-url": b.value,
|
|
5190
|
+
"form-fields": _.value,
|
|
5185
5191
|
"is-readonly": d.readonly,
|
|
5186
|
-
onCancel:
|
|
5187
|
-
"onFetch:error":
|
|
5192
|
+
onCancel: g,
|
|
5193
|
+
"onFetch:error": y[3] || (y[3] = (S) => L(S)),
|
|
5188
5194
|
"onFetch:success": k,
|
|
5189
|
-
onLoading:
|
|
5195
|
+
onLoading: y[4] || (y[4] = (S) => I(S)),
|
|
5190
5196
|
onSubmit: p
|
|
5191
5197
|
}, {
|
|
5192
5198
|
default: h(() => [
|
|
5193
|
-
|
|
5194
|
-
|
|
5199
|
+
F("div", null, [
|
|
5200
|
+
N(m(Us), {
|
|
5195
5201
|
description: m(i)("consumers.form.info.description"),
|
|
5196
5202
|
"has-divider": "",
|
|
5197
5203
|
title: m(i)("consumers.form.info.title")
|
|
5198
5204
|
}, {
|
|
5199
5205
|
default: h(() => [
|
|
5200
|
-
|
|
5201
|
-
|
|
5206
|
+
F("div", null, [
|
|
5207
|
+
F("h3", {
|
|
5202
5208
|
id: `fields-group-title-${m(u)}`,
|
|
5203
5209
|
class: "fields-group-title"
|
|
5204
5210
|
}, j(m(i)("consumers.form.consumer_identification.title")) + "* ", 9, su),
|
|
5205
|
-
|
|
5211
|
+
F("p", uu, j(m(i)("consumers.form.consumer_identification.description")), 1)
|
|
5206
5212
|
]),
|
|
5207
|
-
|
|
5213
|
+
N(R, null, {
|
|
5208
5214
|
default: h(() => [
|
|
5209
|
-
|
|
5215
|
+
F("fieldset", {
|
|
5210
5216
|
"aria-labelledby": `fields-group-title-${m(u)}`
|
|
5211
5217
|
}, [
|
|
5212
|
-
|
|
5218
|
+
N(A, {
|
|
5213
5219
|
modelValue: d.fields.username,
|
|
5214
|
-
"onUpdate:modelValue":
|
|
5220
|
+
"onUpdate:modelValue": y[0] || (y[0] = (S) => d.fields.username = S),
|
|
5215
5221
|
modelModifiers: { trim: !0 },
|
|
5216
5222
|
autocomplete: "off",
|
|
5217
5223
|
class: "username-field",
|
|
@@ -5225,21 +5231,21 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5225
5231
|
type: "text"
|
|
5226
5232
|
}, {
|
|
5227
5233
|
"label-tooltip": h(() => [
|
|
5228
|
-
|
|
5234
|
+
N(m(a), {
|
|
5229
5235
|
keypath: "consumers.fields.username.tooltip",
|
|
5230
5236
|
scope: "global"
|
|
5231
5237
|
}, {
|
|
5232
5238
|
custom_id: h(() => [
|
|
5233
|
-
|
|
5239
|
+
F("code", null, j(m(i)("consumers.fields.username.custom_id")), 1)
|
|
5234
5240
|
]),
|
|
5235
5241
|
_: 1
|
|
5236
5242
|
})
|
|
5237
5243
|
]),
|
|
5238
5244
|
_: 1
|
|
5239
5245
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
5240
|
-
|
|
5246
|
+
N(A, {
|
|
5241
5247
|
modelValue: d.fields.customId,
|
|
5242
|
-
"onUpdate:modelValue":
|
|
5248
|
+
"onUpdate:modelValue": y[1] || (y[1] = (S) => d.fields.customId = S),
|
|
5243
5249
|
modelModifiers: { trim: !0 },
|
|
5244
5250
|
autocomplete: "off",
|
|
5245
5251
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -5252,12 +5258,12 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5252
5258
|
type: "text"
|
|
5253
5259
|
}, {
|
|
5254
5260
|
"label-tooltip": h(() => [
|
|
5255
|
-
|
|
5261
|
+
N(m(a), {
|
|
5256
5262
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
5257
5263
|
scope: "global"
|
|
5258
5264
|
}, {
|
|
5259
5265
|
username: h(() => [
|
|
5260
|
-
|
|
5266
|
+
F("code", null, j(m(i)("consumers.fields.custom_id.username")), 1)
|
|
5261
5267
|
]),
|
|
5262
5268
|
_: 1
|
|
5263
5269
|
})
|
|
@@ -5268,9 +5274,9 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5268
5274
|
]),
|
|
5269
5275
|
_: 1
|
|
5270
5276
|
}),
|
|
5271
|
-
|
|
5277
|
+
N(A, {
|
|
5272
5278
|
modelValue: d.fields.tags,
|
|
5273
|
-
"onUpdate:modelValue":
|
|
5279
|
+
"onUpdate:modelValue": y[2] || (y[2] = (S) => d.fields.tags = S),
|
|
5274
5280
|
modelModifiers: { trim: !0 },
|
|
5275
5281
|
autocomplete: "off",
|
|
5276
5282
|
"data-testid": "consumer-form-tags",
|
|
@@ -5294,7 +5300,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5294
5300
|
]);
|
|
5295
5301
|
};
|
|
5296
5302
|
}
|
|
5297
|
-
}),
|
|
5303
|
+
}), Su = /* @__PURE__ */ Mt(du, [["__scopeId", "data-v-d3813a74"]]), pu = { class: "kong-ui-consumer-entity-config-card" }, Au = /* @__PURE__ */ W({
|
|
5298
5304
|
__name: "ConsumerConfigCard",
|
|
5299
5305
|
props: {
|
|
5300
5306
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5321,7 +5327,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5321
5327
|
},
|
|
5322
5328
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5323
5329
|
setup(e) {
|
|
5324
|
-
const t = e, { i18n: { t: n }, i18nT: r } = at.useI18n(), a =
|
|
5330
|
+
const t = e, { i18n: { t: n }, i18nT: r } = at.useI18n(), a = x(() => je.form[t.config.app].edit), i = B({
|
|
5325
5331
|
id: {},
|
|
5326
5332
|
username: {
|
|
5327
5333
|
section: ce.Basic,
|
|
@@ -5347,7 +5353,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5347
5353
|
}
|
|
5348
5354
|
});
|
|
5349
5355
|
return (o, l) => (f(), O("div", pu, [
|
|
5350
|
-
|
|
5356
|
+
N(m(Yl), {
|
|
5351
5357
|
config: e.config,
|
|
5352
5358
|
"config-card-doc": e.configCardDoc,
|
|
5353
5359
|
"config-schema": i.value,
|
|
@@ -5358,23 +5364,23 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5358
5364
|
onLoading: l[2] || (l[2] = (s) => o.$emit("loading", s))
|
|
5359
5365
|
}, {
|
|
5360
5366
|
"username-label-tooltip": h(() => [
|
|
5361
|
-
|
|
5367
|
+
N(m(r), {
|
|
5362
5368
|
keypath: "consumers.fields.username.tooltip",
|
|
5363
5369
|
scope: "global"
|
|
5364
5370
|
}, {
|
|
5365
5371
|
custom_id: h(() => [
|
|
5366
|
-
|
|
5372
|
+
F("code", null, j(m(n)("consumers.fields.username.custom_id")), 1)
|
|
5367
5373
|
]),
|
|
5368
5374
|
_: 1
|
|
5369
5375
|
})
|
|
5370
5376
|
]),
|
|
5371
5377
|
"custom_id-label-tooltip": h(() => [
|
|
5372
|
-
|
|
5378
|
+
N(m(r), {
|
|
5373
5379
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
5374
5380
|
scope: "global"
|
|
5375
5381
|
}, {
|
|
5376
5382
|
username: h(() => [
|
|
5377
|
-
|
|
5383
|
+
F("code", null, j(m(n)("consumers.fields.custom_id.username")), 1)
|
|
5378
5384
|
]),
|
|
5379
5385
|
_: 1
|
|
5380
5386
|
})
|
|
@@ -5386,6 +5392,6 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5386
5392
|
});
|
|
5387
5393
|
export {
|
|
5388
5394
|
Au as ConsumerConfigCard,
|
|
5389
|
-
|
|
5395
|
+
Su as ConsumerForm,
|
|
5390
5396
|
_u as ConsumerList
|
|
5391
5397
|
};
|