@kong-ui-public/entities-keys 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-keys.es.js +982 -966
- package/dist/entities-keys.umd.js +11 -11
- package/dist/style.css +1 -1
- package/dist/types/components/KeyList.vue.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/entities-keys.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as re, ref as
|
|
1
|
+
import { defineComponent as re, ref as $, computed as I, watch as ke, renderSlot as X, createCommentVNode as J, unref as g, resolveComponent as N, openBlock as f, createElementBlock as x, createVNode as j, withCtx as b, createTextVNode as ae, toDisplayString as O, useCssVars as Qa, useSlots as et, createElementVNode as V, createSlots as Ie, createBlock as q, resolveDynamicComponent as Fe, normalizeProps as Xa, guardReactiveProps as ei, Fragment as me, renderList as ye, mergeProps as lt, normalizeClass as xe, onBeforeMount as tt, withModifiers as We, withDirectives as He, vShow as ze, onMounted as ti, onUnmounted as ai, inject as ii, normalizeStyle as Qt, pushScopeId as Xt, popScopeId as ea, reactive as It } from "vue";
|
|
2
2
|
import { useRouter as ft } from "vue-router";
|
|
3
3
|
import { createI18n as yt, i18nTComponent as ta } from "@kong-ui-public/i18n";
|
|
4
4
|
import ni from "axios";
|
|
@@ -166,7 +166,7 @@ const mt = {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
|
-
var aa = /* @__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))(aa || {}),
|
|
169
|
+
var aa = /* @__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))(aa || {}), qe = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(qe || {}), je = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(je || {}), G = /* @__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))(G || {}), pe = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(pe || {});
|
|
170
170
|
function gt(e = {}) {
|
|
171
171
|
return {
|
|
172
172
|
axiosInstance: ni.create({
|
|
@@ -381,65 +381,65 @@ function wi(e, a, t, i = {
|
|
|
381
381
|
t || (t = "100");
|
|
382
382
|
const { axiosInstance: n } = gt({
|
|
383
383
|
headers: e.requestHeaders
|
|
384
|
-
}), { i18n: { t: r } } = ht(), { debounce: o } = ci(), s = o(async (
|
|
385
|
-
await
|
|
386
|
-
}, 200), c =
|
|
387
|
-
let
|
|
388
|
-
e.app === "konnect" ?
|
|
384
|
+
}), { i18n: { t: r } } = ht(), { debounce: o } = ci(), s = o(async (h) => {
|
|
385
|
+
await M(h);
|
|
386
|
+
}, 200), c = $(!1), l = $(""), d = $(""), u = $([]), v = $([]), y = $(void 0), _ = g(a);
|
|
387
|
+
let w = `${e.apiBaseUrl}${_}`;
|
|
388
|
+
e.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
389
389
|
const { isValidUuid: p } = ia(), m = async () => {
|
|
390
390
|
try {
|
|
391
391
|
c.value = !0;
|
|
392
|
-
const { data:
|
|
393
|
-
|
|
392
|
+
const { data: h } = await n.get(`${w}?size=${t}`);
|
|
393
|
+
h != null && h.next || (y.value = i.fetchedItemsKey in h ? h[i.fetchedItemsKey] : []), v.value = i.fetchedItemsKey in h ? h[i.fetchedItemsKey] : [], u.value = v.value;
|
|
394
394
|
} catch {
|
|
395
395
|
u.value = [], l.value = r("debouncedFilter.errors.fetch");
|
|
396
396
|
} finally {
|
|
397
397
|
c.value = !1;
|
|
398
398
|
}
|
|
399
|
-
},
|
|
400
|
-
var
|
|
401
|
-
if (
|
|
402
|
-
if (
|
|
399
|
+
}, k = $(""), M = async (h) => {
|
|
400
|
+
var P, L, z;
|
|
401
|
+
if (k.value !== h)
|
|
402
|
+
if (k.value = h || "", y.value === void 0)
|
|
403
403
|
try {
|
|
404
404
|
if (c.value = !0, l.value = "", d.value = "", e.app === "konnect") {
|
|
405
|
-
let
|
|
406
|
-
|
|
407
|
-
const { data: B } = await n.get(`${
|
|
405
|
+
let S = w + "";
|
|
406
|
+
h && (S += `/${h}`);
|
|
407
|
+
const { data: B } = await n.get(`${S}?size=${t}`);
|
|
408
408
|
i.fetchedItemsKey in B ? u.value = B[i.fetchedItemsKey] : B != null && B.id ? u.value = [B] : u.value = [];
|
|
409
|
-
} else if (
|
|
410
|
-
const
|
|
411
|
-
p(
|
|
412
|
-
const { data:
|
|
413
|
-
return [
|
|
414
|
-
})()) :
|
|
415
|
-
...i.searchKeys.filter((
|
|
416
|
-
const { data:
|
|
417
|
-
return
|
|
409
|
+
} else if (h) {
|
|
410
|
+
const S = [];
|
|
411
|
+
p(h) && i.searchKeys.includes("id") ? S.push((async () => {
|
|
412
|
+
const { data: K } = await n.get(`${w}/${h}`);
|
|
413
|
+
return [K[i.fetchedItemsKey] ?? K];
|
|
414
|
+
})()) : S.push(
|
|
415
|
+
...i.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
416
|
+
const { data: R } = await n.get(`${w}?${K}=${h}`);
|
|
417
|
+
return R[i.fetchedItemsKey];
|
|
418
418
|
})
|
|
419
419
|
);
|
|
420
|
-
const B = await Promise.all(
|
|
421
|
-
u.value = [], (
|
|
422
|
-
var
|
|
423
|
-
(
|
|
424
|
-
|
|
420
|
+
const B = await Promise.all(S), F = /* @__PURE__ */ new Set();
|
|
421
|
+
u.value = [], (P = B == null ? void 0 : B.forEach) == null || P.call(B, (K) => {
|
|
422
|
+
var R;
|
|
423
|
+
(R = K == null ? void 0 : K.forEach) == null || R.call(K, (U) => {
|
|
424
|
+
F.has(U.id) || (F.add(U.id), u.value.push(U));
|
|
425
425
|
});
|
|
426
426
|
});
|
|
427
427
|
} else
|
|
428
|
-
u.value =
|
|
429
|
-
} catch (
|
|
430
|
-
((
|
|
428
|
+
u.value = v.value;
|
|
429
|
+
} catch (S) {
|
|
430
|
+
((L = S == null ? void 0 : S.response) == null ? void 0 : L.status) === 404 ? d.value = r("debouncedFilter.errors.invalid") : (u.value = [], l.value = r("debouncedFilter.errors.fetch"));
|
|
431
431
|
} finally {
|
|
432
432
|
c.value = !1;
|
|
433
433
|
}
|
|
434
434
|
else
|
|
435
|
-
c.value = !0, d.value = "",
|
|
435
|
+
c.value = !0, d.value = "", h ? (u.value = (z = y.value) == null ? void 0 : z.filter((S) => {
|
|
436
436
|
var B;
|
|
437
|
-
let
|
|
438
|
-
for (const
|
|
439
|
-
const
|
|
440
|
-
|
|
437
|
+
let F = !1;
|
|
438
|
+
for (const K of i.searchKeys) {
|
|
439
|
+
const R = typeof S[K] == "string" ? (B = S[K]) == null ? void 0 : B.toLowerCase() : S[K];
|
|
440
|
+
R != null && R.includes(h.toLowerCase()) && (F = !0);
|
|
441
441
|
}
|
|
442
|
-
return
|
|
442
|
+
return F;
|
|
443
443
|
}), (!u.value || !u.value.length) && (d.value = r("debouncedFilter.errors.invalid"))) : u.value = y.value, c.value = !1;
|
|
444
444
|
};
|
|
445
445
|
return {
|
|
@@ -453,7 +453,7 @@ function wi(e, a, t, i = {
|
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
455
|
function Si(e, a) {
|
|
456
|
-
const t = g(a), i =
|
|
456
|
+
const t = g(a), i = I(
|
|
457
457
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
458
458
|
);
|
|
459
459
|
return i.value.search = "", (n) => `${i.value.href}/${n}`;
|
|
@@ -498,17 +498,17 @@ function Ii(e) {
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
function na(e, a) {
|
|
501
|
-
const t =
|
|
501
|
+
const t = $(g(e)), i = $(g(a)), n = I(
|
|
502
502
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
503
|
-
), r =
|
|
503
|
+
), r = I(
|
|
504
504
|
() => i.value.startsWith("/") ? new URL(`${window.location.origin}${i.value}`) : new URL(i.value)
|
|
505
505
|
);
|
|
506
506
|
return (o) => {
|
|
507
|
-
const { page: s, pageSize: c, offset: l, sortColumnKey: d, sortColumnOrder: u, query:
|
|
507
|
+
const { page: s, pageSize: c, offset: l, sortColumnKey: d, sortColumnOrder: u, query: v } = o;
|
|
508
508
|
try {
|
|
509
509
|
let y = new URL(r.value.href);
|
|
510
|
-
return n.value &&
|
|
511
|
-
y.searchParams.append(
|
|
510
|
+
return n.value && v ? (y.search = "", y = new URL(`${y.href}/${v}/`)) : (n.value || new URLSearchParams(v).forEach((_, w) => {
|
|
511
|
+
y.searchParams.append(w, _);
|
|
512
512
|
}), d && y.searchParams.append("sort_by", d), u === "desc" && y.searchParams.append("sort_desc", "1"), y.searchParams.append("size", String(c))), l && s !== 1 && y.searchParams.append("offset", String(l)), y.href;
|
|
513
513
|
} catch (y) {
|
|
514
514
|
return console.error("RouteList(fetcher)", y), i.value;
|
|
@@ -518,7 +518,7 @@ function na(e, a) {
|
|
|
518
518
|
function Ai(e, a, t = "data") {
|
|
519
519
|
const i = g(a), { axiosInstance: n } = gt({
|
|
520
520
|
headers: e.requestHeaders
|
|
521
|
-
}), r = na(e, i), o =
|
|
521
|
+
}), r = na(e, i), o = $({
|
|
522
522
|
status: je.Idle
|
|
523
523
|
});
|
|
524
524
|
return { fetcher: async (s) => {
|
|
@@ -527,7 +527,7 @@ function Ai(e, a, t = "data") {
|
|
|
527
527
|
const c = r(s), { data: l } = await n.get(c), d = t && t.replace(/[^\w-_]/gi, "");
|
|
528
528
|
let u;
|
|
529
529
|
l[d] && Array.isArray(l[d]) ? u = l[d] : u = Object.keys(l).length ? [l] : [];
|
|
530
|
-
const
|
|
530
|
+
const v = {
|
|
531
531
|
data: u,
|
|
532
532
|
total: u.length,
|
|
533
533
|
...l.offset ? {
|
|
@@ -538,8 +538,8 @@ function Ai(e, a, t = "data") {
|
|
|
538
538
|
};
|
|
539
539
|
return o.value = {
|
|
540
540
|
status: je.Idle,
|
|
541
|
-
response:
|
|
542
|
-
},
|
|
541
|
+
response: v
|
|
542
|
+
}, v;
|
|
543
543
|
} catch (c) {
|
|
544
544
|
const l = {
|
|
545
545
|
data: [],
|
|
@@ -605,13 +605,13 @@ const ra = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
605
605
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
606
606
|
if (Kt.indexOf(e) === -1)
|
|
607
607
|
throw new Error(`Invalid operator, expected one of ${Kt.join("|")}`);
|
|
608
|
-
},
|
|
609
|
-
function
|
|
608
|
+
}, Mi = (e) => typeof e == "string" && /^[v\d]/.test(e) && ra.test(e);
|
|
609
|
+
function Oi(e) {
|
|
610
610
|
const { gatewayInfo: a, supportedRange: t } = e;
|
|
611
611
|
if (!a)
|
|
612
612
|
return !0;
|
|
613
613
|
const { edition: i, version: n } = a;
|
|
614
|
-
if (!
|
|
614
|
+
if (!Mi(n))
|
|
615
615
|
return console.error("Invalid version"), !1;
|
|
616
616
|
const r = t[i];
|
|
617
617
|
if (!r)
|
|
@@ -620,11 +620,11 @@ function Mi(e) {
|
|
|
620
620
|
return !(o && $t(n, o, "<") || s && $t(n, s, ">"));
|
|
621
621
|
}
|
|
622
622
|
function Ei(e) {
|
|
623
|
-
const a =
|
|
623
|
+
const a = $(0), t = $(0), i = $(!1);
|
|
624
624
|
return ke(e, (n) => {
|
|
625
625
|
n && !i.value && (a.value = n.offsetWidth, t.value = n.scrollWidth, i.value = !0);
|
|
626
626
|
}), {
|
|
627
|
-
isTruncated:
|
|
627
|
+
isTruncated: I(() => a.value < t.value)
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
630
|
const se = {
|
|
@@ -638,7 +638,7 @@ const se = {
|
|
|
638
638
|
useHelpers: ia,
|
|
639
639
|
useStringHelpers: xi,
|
|
640
640
|
useI18n: ht,
|
|
641
|
-
useGatewayFeatureSupported:
|
|
641
|
+
useGatewayFeatureSupported: Oi,
|
|
642
642
|
useTruncationDetector: Ei
|
|
643
643
|
}, Fi = {
|
|
644
644
|
fail: "Failed to copy id to clipboard",
|
|
@@ -649,15 +649,15 @@ const se = {
|
|
|
649
649
|
}, Ni = "Copy to clipboard", Bi = {
|
|
650
650
|
message: Fi,
|
|
651
651
|
iconTitle: Ni
|
|
652
|
-
},
|
|
652
|
+
}, qi = "kong-ui-copy-uuid-notify", Mt = "24px", Li = (e, a) => {
|
|
653
653
|
const t = e.__vccOpts || e;
|
|
654
654
|
for (const [i, n] of a)
|
|
655
655
|
t[i] = n;
|
|
656
656
|
return t;
|
|
657
|
-
},
|
|
657
|
+
}, Vi = (e) => (Xt("data-v-9971cc79"), e = e(), ea(), e), Pi = ["aria-hidden"], Ri = {
|
|
658
658
|
key: 0,
|
|
659
659
|
"data-testid": "kui-icon-svg-title"
|
|
660
|
-
}, Ui = /* @__PURE__ */
|
|
660
|
+
}, Ui = /* @__PURE__ */ Vi(() => /* @__PURE__ */ V("path", {
|
|
661
661
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
662
662
|
fill: "currentColor"
|
|
663
663
|
}, null, -1)), Di = /* @__PURE__ */ re({
|
|
@@ -691,7 +691,7 @@ const se = {
|
|
|
691
691
|
size: {
|
|
692
692
|
type: [Number, String],
|
|
693
693
|
required: !1,
|
|
694
|
-
default:
|
|
694
|
+
default: Mt,
|
|
695
695
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
696
696
|
validator: (e) => {
|
|
697
697
|
if (typeof e == "number" && e > 0)
|
|
@@ -712,7 +712,7 @@ const se = {
|
|
|
712
712
|
}
|
|
713
713
|
},
|
|
714
714
|
setup(e) {
|
|
715
|
-
const a = e, t =
|
|
715
|
+
const a = e, t = I(() => {
|
|
716
716
|
if (typeof a.size == "number" && a.size > 0)
|
|
717
717
|
return `${a.size}px`;
|
|
718
718
|
if (typeof a.size == "string") {
|
|
@@ -720,8 +720,8 @@ const se = {
|
|
|
720
720
|
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
721
721
|
return `${r}px`;
|
|
722
722
|
}
|
|
723
|
-
return
|
|
724
|
-
}), i =
|
|
723
|
+
return Mt;
|
|
724
|
+
}), i = I(() => ({
|
|
725
725
|
boxSizing: "border-box",
|
|
726
726
|
color: a.color,
|
|
727
727
|
display: a.display,
|
|
@@ -729,13 +729,13 @@ const se = {
|
|
|
729
729
|
lineHeight: "0",
|
|
730
730
|
width: t.value
|
|
731
731
|
}));
|
|
732
|
-
return (n, r) => (f(),
|
|
732
|
+
return (n, r) => (f(), q(Fe(e.as), {
|
|
733
733
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
734
734
|
class: "kui-icon copy-icon",
|
|
735
735
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
736
|
-
style:
|
|
736
|
+
style: Qt(i.value)
|
|
737
737
|
}, {
|
|
738
|
-
default:
|
|
738
|
+
default: b(() => [
|
|
739
739
|
(f(), x("svg", {
|
|
740
740
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
741
741
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
@@ -746,14 +746,14 @@ const se = {
|
|
|
746
746
|
width: "100%",
|
|
747
747
|
xmlns: "http://www.w3.org/2000/svg"
|
|
748
748
|
}, [
|
|
749
|
-
e.title ? (f(), x("title", Ri,
|
|
749
|
+
e.title ? (f(), x("title", Ri, O(e.title), 1)) : J("", !0),
|
|
750
750
|
Ui
|
|
751
|
-
], 8,
|
|
751
|
+
], 8, Pi))
|
|
752
752
|
]),
|
|
753
753
|
_: 1
|
|
754
754
|
}, 8, ["aria-hidden", "style"]));
|
|
755
755
|
}
|
|
756
|
-
}),
|
|
756
|
+
}), Ji = /* @__PURE__ */ Li(Di, [["__scopeId", "data-v-9971cc79"]]), Hi = "16px", zi = { class: "kong-ui-copy-uuid" }, Wi = ["onClick"], Ot = 15, Yi = /* @__PURE__ */ re({
|
|
757
757
|
__name: "CopyUuid",
|
|
758
758
|
props: {
|
|
759
759
|
uuid: {
|
|
@@ -797,70 +797,70 @@ const se = {
|
|
|
797
797
|
},
|
|
798
798
|
emits: ["success", "error"],
|
|
799
799
|
setup(e, { emit: a }) {
|
|
800
|
-
const t = e, { t: i } = yt("en-us", Bi), n = t.notify || ii(
|
|
801
|
-
}), r =
|
|
800
|
+
const t = e, { t: i } = yt("en-us", Bi), n = t.notify || ii(qi, () => {
|
|
801
|
+
}), r = I(() => t.idTooltip ? {
|
|
802
802
|
label: t.idTooltip,
|
|
803
803
|
positionFixed: !0,
|
|
804
804
|
placement: "bottomStart"
|
|
805
805
|
} : {
|
|
806
806
|
title: t.uuid
|
|
807
|
-
}), o =
|
|
807
|
+
}), o = I(() => !!(t.tooltip && t.successTooltip)), s = $(t.tooltip), c = I(() => t.tooltip ? {
|
|
808
808
|
label: s.value,
|
|
809
809
|
positionFixed: !0,
|
|
810
810
|
maxWidth: "500px",
|
|
811
811
|
placement: "bottomStart"
|
|
812
|
-
} : {}), l =
|
|
813
|
-
var
|
|
814
|
-
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(
|
|
815
|
-
}), d = (
|
|
816
|
-
s.value =
|
|
812
|
+
} : {}), l = I(() => {
|
|
813
|
+
var v;
|
|
814
|
+
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(v = t.uuid) == null ? void 0 : v.substring(0, 5)}` : t.uuid;
|
|
815
|
+
}), d = (v) => {
|
|
816
|
+
s.value = v, setTimeout(() => {
|
|
817
817
|
s.value = t.tooltip;
|
|
818
818
|
}, 1800);
|
|
819
|
-
}, u = (
|
|
820
|
-
var y,
|
|
821
|
-
if (!
|
|
819
|
+
}, u = (v) => {
|
|
820
|
+
var y, _;
|
|
821
|
+
if (!v(t.uuid)) {
|
|
822
822
|
typeof n == "function" && n({
|
|
823
823
|
type: "error",
|
|
824
824
|
message: i("message.fail")
|
|
825
825
|
}), o.value ? d(i("message.fail")) : a("error", t.uuid);
|
|
826
826
|
return;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const w = ((y = t.uuid) == null ? void 0 : y.length) > Ot, p = t.format === "hidden" || t.format === "redacted" ? i("message.success.prefix") : `"${((_ = t.uuid) == null ? void 0 : _.substring(0, Ot)) + (w ? "..." : "")}"`;
|
|
829
829
|
typeof n == "function" && n({
|
|
830
830
|
type: "success",
|
|
831
831
|
message: `${p}${i("message.success.content")}`
|
|
832
832
|
}), o.value ? d(t.successTooltip) : a("success", t.uuid);
|
|
833
833
|
};
|
|
834
|
-
return (
|
|
835
|
-
const
|
|
836
|
-
return f(), x("div",
|
|
837
|
-
e.format !== "hidden" ? (f(),
|
|
838
|
-
default:
|
|
839
|
-
|
|
834
|
+
return (v, y) => {
|
|
835
|
+
const _ = N("KClipboardProvider");
|
|
836
|
+
return f(), x("div", zi, [
|
|
837
|
+
e.format !== "hidden" ? (f(), q(Fe(e.idTooltip ? "KTooltip" : "div"), lt({ key: 0 }, r.value, { "data-testid": "copy-id" }), {
|
|
838
|
+
default: b(() => [
|
|
839
|
+
V("div", {
|
|
840
840
|
class: xe([
|
|
841
841
|
"uuid-container",
|
|
842
842
|
e.truncated ? "truncated-uuid" : null,
|
|
843
843
|
e.useMono ? "mono" : null
|
|
844
844
|
])
|
|
845
|
-
},
|
|
845
|
+
}, O(l.value), 3)
|
|
846
846
|
]),
|
|
847
847
|
_: 1
|
|
848
|
-
}, 16)) :
|
|
849
|
-
(f(),
|
|
850
|
-
default:
|
|
851
|
-
|
|
852
|
-
default:
|
|
853
|
-
|
|
848
|
+
}, 16)) : J("", !0),
|
|
849
|
+
(f(), q(Fe(e.tooltip ? "KTooltip" : "div"), lt(c.value, { class: "uuid-icon-wrapper" }), {
|
|
850
|
+
default: b(() => [
|
|
851
|
+
j(_, null, {
|
|
852
|
+
default: b(({ copyToClipboard: w }) => [
|
|
853
|
+
V("span", {
|
|
854
854
|
"data-testid": "copy-to-clipboard",
|
|
855
855
|
role: "button",
|
|
856
856
|
tabindex: "0",
|
|
857
|
-
onClick: We((p) => u(
|
|
857
|
+
onClick: We((p) => u(w), ["stop"])
|
|
858
858
|
}, [
|
|
859
|
-
|
|
859
|
+
j(g(Ji), {
|
|
860
860
|
class: "uuid-icon",
|
|
861
861
|
color: e.iconColor,
|
|
862
862
|
decorative: !!e.tooltip,
|
|
863
|
-
size: g(
|
|
863
|
+
size: g(Hi),
|
|
864
864
|
title: g(i)("iconTitle")
|
|
865
865
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
866
866
|
], 8, Wi)
|
|
@@ -873,15 +873,15 @@ const se = {
|
|
|
873
873
|
]);
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
|
-
}),
|
|
876
|
+
}), Zi = (e, a) => {
|
|
877
877
|
const t = e.__vccOpts || e;
|
|
878
878
|
for (const [i, n] of a)
|
|
879
879
|
t[i] = n;
|
|
880
880
|
return t;
|
|
881
|
-
}, la = /* @__PURE__ */
|
|
881
|
+
}, la = /* @__PURE__ */ Zi(Yi, [["__scopeId", "data-v-0c07874b"]]), Gi = {
|
|
882
882
|
key: 0,
|
|
883
883
|
class: "config-card-fieldset-title"
|
|
884
|
-
},
|
|
884
|
+
}, Qi = /* @__PURE__ */ re({
|
|
885
885
|
__name: "JsonCardItem",
|
|
886
886
|
props: {
|
|
887
887
|
item: {
|
|
@@ -898,21 +898,21 @@ const se = {
|
|
|
898
898
|
}
|
|
899
899
|
},
|
|
900
900
|
setup(e) {
|
|
901
|
-
const a = e, { i18n: { t } } = se.useI18n(), { convertKeyToTitle: i } = se.useStringHelpers(), n =
|
|
901
|
+
const a = e, { i18n: { t } } = se.useI18n(), { convertKeyToTitle: i } = se.useStringHelpers(), n = I(() => a.item.key ?? "json-array-item"), r = I(() => a.item.value ?? a.item), o = I(() => {
|
|
902
902
|
const c = JSON.parse(JSON.stringify(r.value));
|
|
903
903
|
return a.isArrayItem && delete c.name, c;
|
|
904
|
-
}), s =
|
|
904
|
+
}), s = I(() => {
|
|
905
905
|
var c;
|
|
906
906
|
return a.isArrayItem ? (c = r.value) != null && c.name ? i(r.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: a.index }) : "";
|
|
907
907
|
});
|
|
908
|
-
return (c, l) => (f(),
|
|
908
|
+
return (c, l) => (f(), q(Fe(e.isArrayItem ? "fieldset" : "div"), {
|
|
909
909
|
class: xe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
910
910
|
}, {
|
|
911
|
-
default:
|
|
912
|
-
e.isArrayItem ? (f(), x("legend",
|
|
913
|
-
|
|
914
|
-
])) :
|
|
915
|
-
(f(!0), x(me, null, ye(Object.keys(o.value), (d, u) => (f(),
|
|
911
|
+
default: b(() => [
|
|
912
|
+
e.isArrayItem ? (f(), x("legend", Gi, [
|
|
913
|
+
V("b", null, O(s.value), 1)
|
|
914
|
+
])) : J("", !0),
|
|
915
|
+
(f(!0), x(me, null, ye(Object.keys(o.value), (d, u) => (f(), q(Ve, {
|
|
916
916
|
key: `${n.value}-property-${u}`,
|
|
917
917
|
item: {
|
|
918
918
|
key: d,
|
|
@@ -929,7 +929,7 @@ const se = {
|
|
|
929
929
|
for (const [i, n] of a)
|
|
930
930
|
t[i] = n;
|
|
931
931
|
return t;
|
|
932
|
-
}, sa = /* @__PURE__ */ Ce(
|
|
932
|
+
}, sa = /* @__PURE__ */ Ce(Qi, [["__scopeId", "data-v-68ca83ec"]]), Xi = /* @__PURE__ */ re({
|
|
933
933
|
__name: "InternalLinkItem",
|
|
934
934
|
props: {
|
|
935
935
|
item: {
|
|
@@ -943,20 +943,20 @@ const se = {
|
|
|
943
943
|
return (t, i) => {
|
|
944
944
|
const n = N("KButton");
|
|
945
945
|
return f(), x("div", null, [
|
|
946
|
-
|
|
946
|
+
j(n, {
|
|
947
947
|
appearance: "tertiary",
|
|
948
948
|
class: "navigation-button",
|
|
949
949
|
onClick: i[0] || (i[0] = (r) => t.$emit("navigation-click", e.item))
|
|
950
950
|
}, {
|
|
951
|
-
default:
|
|
952
|
-
|
|
951
|
+
default: b(() => [
|
|
952
|
+
ae(O(e.item.value || g(a)("baseConfigCard.commonFields.link")), 1)
|
|
953
953
|
]),
|
|
954
954
|
_: 1
|
|
955
955
|
})
|
|
956
956
|
]);
|
|
957
957
|
};
|
|
958
958
|
}
|
|
959
|
-
}), ca = /* @__PURE__ */ Ce(
|
|
959
|
+
}), ca = /* @__PURE__ */ Ce(Xi, [["__scopeId", "data-v-c96811e5"]]), en = /* @__PURE__ */ re({
|
|
960
960
|
__name: "StatusBadge",
|
|
961
961
|
props: {
|
|
962
962
|
status: {
|
|
@@ -968,11 +968,11 @@ const se = {
|
|
|
968
968
|
const { i18n: { t: a } } = se.useI18n();
|
|
969
969
|
return (t, i) => {
|
|
970
970
|
const n = N("KBadge");
|
|
971
|
-
return f(),
|
|
971
|
+
return f(), q(n, {
|
|
972
972
|
appearance: e.status ? "success" : "neutral"
|
|
973
973
|
}, {
|
|
974
|
-
default:
|
|
975
|
-
|
|
974
|
+
default: b(() => [
|
|
975
|
+
ae(O(e.status ? g(a)("baseConfigCard.statusBadge.enabledLabel") : g(a)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
976
976
|
]),
|
|
977
977
|
_: 1
|
|
978
978
|
}, 8, ["appearance"]);
|
|
@@ -1002,13 +1002,13 @@ const se = {
|
|
|
1002
1002
|
emits: ["navigation-click"],
|
|
1003
1003
|
setup(e, { emit: a }) {
|
|
1004
1004
|
const t = e;
|
|
1005
|
-
|
|
1005
|
+
Qa((y) => ({
|
|
1006
1006
|
"1df60db4": l.value ? "none" : `solid ${g(rn)} ${g(an)}`,
|
|
1007
1007
|
"21d1d34e": c.value && o.value ? "block" : "flex",
|
|
1008
1008
|
"4d3dc7e7": c.value && o.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1009
1009
|
"4d400dc2": c.value && o.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1010
1010
|
}));
|
|
1011
|
-
const i = et(), { i18n: { t: n, formatUnixTimeStamp: r } } = se.useI18n(), o =
|
|
1011
|
+
const i = et(), { i18n: { t: n, formatUnixTimeStamp: r } } = se.useI18n(), o = I(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = I(() => !!(t.item.tooltip || i["label-tooltip"])), c = I(() => t.item.type === G.Json || t.item.type === G.JsonArray), l = I(() => t.item.type === G.JsonArray), d = I(() => {
|
|
1012
1012
|
switch (t.item.type) {
|
|
1013
1013
|
case G.ID:
|
|
1014
1014
|
return {
|
|
@@ -1134,29 +1134,29 @@ const se = {
|
|
|
1134
1134
|
text: t.item.value
|
|
1135
1135
|
};
|
|
1136
1136
|
}
|
|
1137
|
-
}), u =
|
|
1138
|
-
return (y,
|
|
1139
|
-
const
|
|
1137
|
+
}), u = $(), { isTruncated: v } = se.useTruncationDetector(u);
|
|
1138
|
+
return (y, _) => {
|
|
1139
|
+
const w = N("KLabel"), p = N("KBadge"), m = N("KMethodBadge"), k = N("KTooltip");
|
|
1140
1140
|
return f(), x("div", ln, [
|
|
1141
|
-
|
|
1141
|
+
V("div", {
|
|
1142
1142
|
class: "config-card-details-label",
|
|
1143
1143
|
"data-testid": `${e.item.key}-label`
|
|
1144
1144
|
}, [
|
|
1145
1145
|
X(y.$slots, "label", { item: e.item }, () => [
|
|
1146
|
-
|
|
1147
|
-
default:
|
|
1148
|
-
|
|
1146
|
+
j(w, { "tooltip-attributes": { maxWidth: "500px" } }, Ie({
|
|
1147
|
+
default: b(() => [
|
|
1148
|
+
ae(O(e.item.label) + " ", 1)
|
|
1149
1149
|
]),
|
|
1150
1150
|
_: 2
|
|
1151
1151
|
}, [
|
|
1152
1152
|
s.value ? {
|
|
1153
1153
|
name: "tooltip",
|
|
1154
|
-
fn:
|
|
1155
|
-
|
|
1154
|
+
fn: b(() => [
|
|
1155
|
+
V("div", {
|
|
1156
1156
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1157
1157
|
}, [
|
|
1158
1158
|
X(y.$slots, "label-tooltip", {}, () => [
|
|
1159
|
-
|
|
1159
|
+
ae(O(e.item.tooltip), 1)
|
|
1160
1160
|
], !0)
|
|
1161
1161
|
], 8, cn)
|
|
1162
1162
|
]),
|
|
@@ -1165,7 +1165,7 @@ const se = {
|
|
|
1165
1165
|
]), 1024)
|
|
1166
1166
|
], !0)
|
|
1167
1167
|
], 8, sn),
|
|
1168
|
-
|
|
1168
|
+
V("div", {
|
|
1169
1169
|
class: "config-card-details-value",
|
|
1170
1170
|
"data-testid": `${e.item.key}-property-value`
|
|
1171
1171
|
}, [
|
|
@@ -1173,73 +1173,73 @@ const se = {
|
|
|
1173
1173
|
rowValue: e.item.value
|
|
1174
1174
|
}, () => [
|
|
1175
1175
|
o.value ? (f(), x("div", pn, [
|
|
1176
|
-
(f(),
|
|
1177
|
-
default:
|
|
1176
|
+
(f(), q(Fe(d.value.tag), Xa(ei(d.value.attrs)), {
|
|
1177
|
+
default: b(() => [
|
|
1178
1178
|
d.value.additionalComponent === "KBadge" ? (f(), x("div", {
|
|
1179
1179
|
key: 0,
|
|
1180
1180
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1181
1181
|
}, [
|
|
1182
|
-
(f(!0), x(me, null, ye(e.item.value, (
|
|
1183
|
-
key: `${e.item.key}-badge-tag-${
|
|
1182
|
+
(f(!0), x(me, null, ye(e.item.value, (M, h) => (f(), q(p, {
|
|
1183
|
+
key: `${e.item.key}-badge-tag-${h}`,
|
|
1184
1184
|
class: "config-badge",
|
|
1185
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1186
|
-
"truncation-tooltip":
|
|
1185
|
+
"data-testid": `${e.item.key}-badge-tag-${h}`,
|
|
1186
|
+
"truncation-tooltip": M
|
|
1187
1187
|
}, {
|
|
1188
|
-
default:
|
|
1189
|
-
|
|
1188
|
+
default: b(() => [
|
|
1189
|
+
ae(O(M), 1)
|
|
1190
1190
|
]),
|
|
1191
1191
|
_: 2
|
|
1192
1192
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1193
|
-
], 8, fn)) :
|
|
1193
|
+
], 8, fn)) : J("", !0),
|
|
1194
1194
|
d.value.additionalComponent === "CopyUuid" ? (f(), x("div", {
|
|
1195
1195
|
key: 1,
|
|
1196
1196
|
class: "copy-uuid-array",
|
|
1197
1197
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1198
1198
|
}, [
|
|
1199
|
-
(f(!0), x(me, null, ye(e.item.value, (
|
|
1200
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1201
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1202
|
-
uuid:
|
|
1199
|
+
(f(!0), x(me, null, ye(e.item.value, (M, h) => (f(), q(g(la), lt(d.value.childAttrs, {
|
|
1200
|
+
key: `${e.item.key}-copy-uuid-${h}`,
|
|
1201
|
+
"data-testid": `${e.item.key}-copy-uuid-${h}`,
|
|
1202
|
+
uuid: M
|
|
1203
1203
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1204
1204
|
], 8, yn)) : d.value.additionalComponent === "KMethodBadge" ? (f(), x("div", {
|
|
1205
1205
|
key: 2,
|
|
1206
1206
|
class: "method-badge-array",
|
|
1207
1207
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1208
1208
|
}, [
|
|
1209
|
-
(f(!0), x(me, null, ye(e.item.value, (
|
|
1210
|
-
key: `${e.item.key}-badge-method-${
|
|
1209
|
+
(f(!0), x(me, null, ye(e.item.value, (M, h) => (f(), q(m, {
|
|
1210
|
+
key: `${e.item.key}-badge-method-${h}`,
|
|
1211
1211
|
class: "config-badge",
|
|
1212
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1212
|
+
"data-testid": `${e.item.key}-badge-method-${h}`,
|
|
1213
1213
|
"is-rounded": "",
|
|
1214
|
-
label:
|
|
1215
|
-
method: g(ri).includes(
|
|
1214
|
+
label: M,
|
|
1215
|
+
method: g(ri).includes(M.toLowerCase()) ? M.toLowerCase() : "custom"
|
|
1216
1216
|
}, {
|
|
1217
|
-
default:
|
|
1218
|
-
|
|
1217
|
+
default: b(() => [
|
|
1218
|
+
ae(O(M), 1)
|
|
1219
1219
|
]),
|
|
1220
1220
|
_: 2
|
|
1221
1221
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1222
|
-
], 8, mn)) :
|
|
1222
|
+
], 8, mn)) : J("", !0),
|
|
1223
1223
|
d.value.additionalComponent === "JsonCardItem" ? (f(), x("div", {
|
|
1224
1224
|
key: 3,
|
|
1225
1225
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1226
1226
|
}, [
|
|
1227
|
-
(f(!0), x(me, null, ye(e.item.value, (
|
|
1228
|
-
key: `json-array-item-${
|
|
1229
|
-
index:
|
|
1227
|
+
(f(!0), x(me, null, ye(e.item.value, (M, h) => (f(), q(sa, {
|
|
1228
|
+
key: `json-array-item-${h}`,
|
|
1229
|
+
index: h,
|
|
1230
1230
|
"is-array-item": "",
|
|
1231
|
-
item:
|
|
1231
|
+
item: M
|
|
1232
1232
|
}, null, 8, ["index", "item"]))), 128))
|
|
1233
|
-
], 8, gn)) : (f(),
|
|
1233
|
+
], 8, gn)) : (f(), q(k, {
|
|
1234
1234
|
key: 4,
|
|
1235
|
-
label: g(
|
|
1235
|
+
label: g(v) ? e.item.value : ""
|
|
1236
1236
|
}, {
|
|
1237
|
-
default:
|
|
1238
|
-
|
|
1237
|
+
default: b(() => [
|
|
1238
|
+
V("span", {
|
|
1239
1239
|
ref_key: "textContent",
|
|
1240
1240
|
ref: u,
|
|
1241
1241
|
class: xe(["attrs-data-text", { truncated: e.truncated }])
|
|
1242
|
-
},
|
|
1242
|
+
}, O(d.value.text), 3)
|
|
1243
1243
|
]),
|
|
1244
1244
|
_: 1
|
|
1245
1245
|
}, 8, ["label"]))
|
|
@@ -1255,7 +1255,7 @@ const se = {
|
|
|
1255
1255
|
]);
|
|
1256
1256
|
};
|
|
1257
1257
|
}
|
|
1258
|
-
}),
|
|
1258
|
+
}), Ve = /* @__PURE__ */ Ce(vn, [["__scopeId", "data-v-307ab96d"]]);
|
|
1259
1259
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1260
1260
|
function ua(e) {
|
|
1261
1261
|
return typeof e > "u" || e === null;
|
|
@@ -1296,15 +1296,15 @@ function da(e, a) {
|
|
|
1296
1296
|
|
|
1297
1297
|
` + e.mark.snippet), i + " " + t) : i;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function Pe(e, a) {
|
|
1300
1300
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = a, this.message = da(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1301
1301
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1302
|
+
Pe.prototype = Object.create(Error.prototype);
|
|
1303
|
+
Pe.prototype.constructor = Pe;
|
|
1304
|
+
Pe.prototype.toString = function(e) {
|
|
1305
1305
|
return this.name + ": " + da(this, e);
|
|
1306
1306
|
};
|
|
1307
|
-
var fe =
|
|
1307
|
+
var fe = Pe;
|
|
1308
1308
|
function nt(e, a, t, i, n) {
|
|
1309
1309
|
var r = "", o = "", s = Math.floor(n / 2) - 1;
|
|
1310
1310
|
return i - a > s && (r = " ... ", a = i - s + r.length), t - i > s && (o = " ...", t = i + s - o.length), {
|
|
@@ -1346,7 +1346,7 @@ function $n(e, a) {
|
|
|
1346
1346
|
`;
|
|
1347
1347
|
return s.replace(/\n$/, "");
|
|
1348
1348
|
}
|
|
1349
|
-
var Kn = $n,
|
|
1349
|
+
var Kn = $n, Mn = [
|
|
1350
1350
|
"kind",
|
|
1351
1351
|
"multi",
|
|
1352
1352
|
"resolve",
|
|
@@ -1357,7 +1357,7 @@ var Kn = $n, On = [
|
|
|
1357
1357
|
"representName",
|
|
1358
1358
|
"defaultStyle",
|
|
1359
1359
|
"styleAliases"
|
|
1360
|
-
],
|
|
1360
|
+
], On = [
|
|
1361
1361
|
"scalar",
|
|
1362
1362
|
"sequence",
|
|
1363
1363
|
"mapping"
|
|
@@ -1372,13 +1372,13 @@ function En(e) {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
function Fn(e, a) {
|
|
1374
1374
|
if (a = a || {}, Object.keys(a).forEach(function(t) {
|
|
1375
|
-
if (
|
|
1375
|
+
if (Mn.indexOf(t) === -1)
|
|
1376
1376
|
throw new fe('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1377
1377
|
}), this.options = a, this.tag = e, this.kind = a.kind || null, this.resolve = a.resolve || function() {
|
|
1378
1378
|
return !0;
|
|
1379
1379
|
}, this.construct = a.construct || function(t) {
|
|
1380
1380
|
return t;
|
|
1381
|
-
}, this.instanceOf = a.instanceOf || null, this.predicate = a.predicate || null, this.represent = a.represent || null, this.representName = a.representName || null, this.defaultStyle = a.defaultStyle || null, this.multi = a.multi || !1, this.styleAliases = En(a.styleAliases || null),
|
|
1381
|
+
}, this.instanceOf = a.instanceOf || null, this.predicate = a.predicate || null, this.represent = a.represent || null, this.representName = a.representName || null, this.defaultStyle = a.defaultStyle || null, this.multi = a.multi || !1, this.styleAliases = En(a.styleAliases || null), On.indexOf(this.kind) === -1)
|
|
1382
1382
|
throw new fe('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1383
1383
|
}
|
|
1384
1384
|
var ue = Fn;
|
|
@@ -1466,17 +1466,17 @@ function Bn(e) {
|
|
|
1466
1466
|
var a = e.length;
|
|
1467
1467
|
return a === 1 && e === "~" || a === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1469
|
+
function qn() {
|
|
1470
1470
|
return null;
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function Ln(e) {
|
|
1473
1473
|
return e === null;
|
|
1474
1474
|
}
|
|
1475
1475
|
var ha = new ue("tag:yaml.org,2002:null", {
|
|
1476
1476
|
kind: "scalar",
|
|
1477
1477
|
resolve: Bn,
|
|
1478
|
-
construct:
|
|
1479
|
-
predicate:
|
|
1478
|
+
construct: qn,
|
|
1479
|
+
predicate: Ln,
|
|
1480
1480
|
represent: {
|
|
1481
1481
|
canonical: function() {
|
|
1482
1482
|
return "~";
|
|
@@ -1496,13 +1496,13 @@ var ha = new ue("tag:yaml.org,2002:null", {
|
|
|
1496
1496
|
},
|
|
1497
1497
|
defaultStyle: "lowercase"
|
|
1498
1498
|
});
|
|
1499
|
-
function
|
|
1499
|
+
function Vn(e) {
|
|
1500
1500
|
if (e === null)
|
|
1501
1501
|
return !1;
|
|
1502
1502
|
var a = e.length;
|
|
1503
1503
|
return a === 4 && (e === "true" || e === "True" || e === "TRUE") || a === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function Pn(e) {
|
|
1506
1506
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1507
1507
|
}
|
|
1508
1508
|
function Rn(e) {
|
|
@@ -1510,8 +1510,8 @@ function Rn(e) {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
var va = new ue("tag:yaml.org,2002:bool", {
|
|
1512
1512
|
kind: "scalar",
|
|
1513
|
-
resolve:
|
|
1514
|
-
construct:
|
|
1513
|
+
resolve: Vn,
|
|
1514
|
+
construct: Pn,
|
|
1515
1515
|
predicate: Rn,
|
|
1516
1516
|
represent: {
|
|
1517
1517
|
lowercase: function(e) {
|
|
@@ -1532,10 +1532,10 @@ function Un(e) {
|
|
|
1532
1532
|
function Dn(e) {
|
|
1533
1533
|
return 48 <= e && e <= 55;
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function Jn(e) {
|
|
1536
1536
|
return 48 <= e && e <= 57;
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function Hn(e) {
|
|
1539
1539
|
if (e === null)
|
|
1540
1540
|
return !1;
|
|
1541
1541
|
var a = e.length, t = 0, i = !1, n;
|
|
@@ -1576,13 +1576,13 @@ function Jn(e) {
|
|
|
1576
1576
|
return !1;
|
|
1577
1577
|
for (; t < a; t++)
|
|
1578
1578
|
if (n = e[t], n !== "_") {
|
|
1579
|
-
if (!
|
|
1579
|
+
if (!Jn(e.charCodeAt(t)))
|
|
1580
1580
|
return !1;
|
|
1581
1581
|
i = !0;
|
|
1582
1582
|
}
|
|
1583
1583
|
return !(!i || n === "_");
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function zn(e) {
|
|
1586
1586
|
var a = e, t = 1, i;
|
|
1587
1587
|
if (a.indexOf("_") !== -1 && (a = a.replace(/_/g, "")), i = a[0], (i === "-" || i === "+") && (i === "-" && (t = -1), a = a.slice(1), i = a[0]), a === "0")
|
|
1588
1588
|
return 0;
|
|
@@ -1601,8 +1601,8 @@ function Wn(e) {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
var ka = new ue("tag:yaml.org,2002:int", {
|
|
1603
1603
|
kind: "scalar",
|
|
1604
|
-
resolve:
|
|
1605
|
-
construct:
|
|
1604
|
+
resolve: Hn,
|
|
1605
|
+
construct: zn,
|
|
1606
1606
|
predicate: Wn,
|
|
1607
1607
|
represent: {
|
|
1608
1608
|
binary: function(e) {
|
|
@@ -1630,17 +1630,17 @@ var ka = new ue("tag:yaml.org,2002:int", {
|
|
|
1630
1630
|
// 2.5e4, 2.5 and integers
|
|
1631
1631
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1632
1632
|
);
|
|
1633
|
-
function
|
|
1633
|
+
function Zn(e) {
|
|
1634
1634
|
return !(e === null || !Yn.test(e) || // Quick hack to not allow integers end with `_`
|
|
1635
1635
|
// Probably should update regexp & check speed
|
|
1636
1636
|
e[e.length - 1] === "_");
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function Gn(e) {
|
|
1639
1639
|
var a, t;
|
|
1640
1640
|
return a = e.replace(/_/g, "").toLowerCase(), t = a[0] === "-" ? -1 : 1, "+-".indexOf(a[0]) >= 0 && (a = a.slice(1)), a === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : a === ".nan" ? NaN : t * parseFloat(a, 10);
|
|
1641
1641
|
}
|
|
1642
|
-
var
|
|
1643
|
-
function
|
|
1642
|
+
var Qn = /^[-+]?[0-9]+e/;
|
|
1643
|
+
function Xn(e, a) {
|
|
1644
1644
|
var t;
|
|
1645
1645
|
if (isNaN(e))
|
|
1646
1646
|
switch (a) {
|
|
@@ -1671,17 +1671,17 @@ function Qn(e, a) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
else if (oe.isNegativeZero(e))
|
|
1673
1673
|
return "-0.0";
|
|
1674
|
-
return t = e.toString(10),
|
|
1674
|
+
return t = e.toString(10), Qn.test(t) ? t.replace("e", ".e") : t;
|
|
1675
1675
|
}
|
|
1676
1676
|
function er(e) {
|
|
1677
1677
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || oe.isNegativeZero(e));
|
|
1678
1678
|
}
|
|
1679
1679
|
var ba = new ue("tag:yaml.org,2002:float", {
|
|
1680
1680
|
kind: "scalar",
|
|
1681
|
-
resolve:
|
|
1682
|
-
construct:
|
|
1681
|
+
resolve: Zn,
|
|
1682
|
+
construct: Gn,
|
|
1683
1683
|
predicate: er,
|
|
1684
|
-
represent:
|
|
1684
|
+
represent: Xn,
|
|
1685
1685
|
defaultStyle: "lowercase"
|
|
1686
1686
|
}), Ca = ga.extend({
|
|
1687
1687
|
implicit: [
|
|
@@ -1699,7 +1699,7 @@ function tr(e) {
|
|
|
1699
1699
|
return e === null ? !1 : Sa.exec(e) !== null || _a.exec(e) !== null;
|
|
1700
1700
|
}
|
|
1701
1701
|
function ar(e) {
|
|
1702
|
-
var a, t, i, n, r, o, s, c = 0, l = null, d, u,
|
|
1702
|
+
var a, t, i, n, r, o, s, c = 0, l = null, d, u, v;
|
|
1703
1703
|
if (a = Sa.exec(e), a === null && (a = _a.exec(e)), a === null)
|
|
1704
1704
|
throw new Error("Date resolve error");
|
|
1705
1705
|
if (t = +a[1], i = +a[2] - 1, n = +a[3], !a[4])
|
|
@@ -1709,7 +1709,7 @@ function ar(e) {
|
|
|
1709
1709
|
c += "0";
|
|
1710
1710
|
c = +c;
|
|
1711
1711
|
}
|
|
1712
|
-
return a[9] && (d = +a[10], u = +(a[11] || 0), l = (d * 60 + u) * 6e4, a[9] === "-" && (l = -l)),
|
|
1712
|
+
return a[9] && (d = +a[10], u = +(a[11] || 0), l = (d * 60 + u) * 6e4, a[9] === "-" && (l = -l)), v = new Date(Date.UTC(t, i, n, r, o, s, c)), l && v.setTime(v.getTime() - l), v;
|
|
1713
1713
|
}
|
|
1714
1714
|
function ir(e) {
|
|
1715
1715
|
return e.toISOString();
|
|
@@ -1844,7 +1844,7 @@ var $a = new ue("tag:yaml.org,2002:set", {
|
|
|
1844
1844
|
ja,
|
|
1845
1845
|
$a
|
|
1846
1846
|
]
|
|
1847
|
-
}), Te = Object.prototype.hasOwnProperty, Ye = 1, Ka = 2,
|
|
1847
|
+
}), Te = Object.prototype.hasOwnProperty, Ye = 1, Ka = 2, Ma = 3, Ze = 4, ot = 1, kr = 2, Ft = 3, br = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Cr = /[\x85\u2028\u2029]/, wr = /[,\[\]\{\}]/, Oa = /^(?:!|!!|![a-z\-]+!)$/i, Ea = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1848
1848
|
function Nt(e) {
|
|
1849
1849
|
return Object.prototype.toString.call(e);
|
|
1850
1850
|
}
|
|
@@ -1857,7 +1857,7 @@ function $e(e) {
|
|
|
1857
1857
|
function ge(e) {
|
|
1858
1858
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1860
|
+
function Oe(e) {
|
|
1861
1861
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1862
1862
|
}
|
|
1863
1863
|
function Sr(e) {
|
|
@@ -1900,17 +1900,17 @@ function Ba(e, a) {
|
|
|
1900
1900
|
function T(e, a) {
|
|
1901
1901
|
throw Ba(e, a);
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1903
|
+
function Ge(e, a) {
|
|
1904
1904
|
e.onWarning && e.onWarning.call(null, Ba(e, a));
|
|
1905
1905
|
}
|
|
1906
|
-
var
|
|
1906
|
+
var qt = {
|
|
1907
1907
|
YAML: function(e, a, t) {
|
|
1908
1908
|
var i, n, r;
|
|
1909
|
-
e.version !== null && T(e, "duplication of %YAML directive"), t.length !== 1 && T(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), i === null && T(e, "ill-formed argument of the YAML directive"), n = parseInt(i[1], 10), r = parseInt(i[2], 10), n !== 1 && T(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = r < 2, r !== 1 && r !== 2 &&
|
|
1909
|
+
e.version !== null && T(e, "duplication of %YAML directive"), t.length !== 1 && T(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), i === null && T(e, "ill-formed argument of the YAML directive"), n = parseInt(i[1], 10), r = parseInt(i[2], 10), n !== 1 && T(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = r < 2, r !== 1 && r !== 2 && Ge(e, "unsupported YAML version of the document");
|
|
1910
1910
|
},
|
|
1911
1911
|
TAG: function(e, a, t) {
|
|
1912
1912
|
var i, n;
|
|
1913
|
-
t.length !== 2 && T(e, "TAG directive accepts exactly two arguments"), i = t[0], n = t[1],
|
|
1913
|
+
t.length !== 2 && T(e, "TAG directive accepts exactly two arguments"), i = t[0], n = t[1], Oa.test(i) || T(e, "ill-formed tag handle (first argument) of the TAG directive"), Te.call(e.tagMap, i) && T(e, 'there is a previously declared suffix for "' + i + '" tag handle'), Ea.test(n) || T(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1914
1914
|
try {
|
|
1915
1915
|
n = decodeURIComponent(n);
|
|
1916
1916
|
} catch {
|
|
@@ -1930,7 +1930,7 @@ function Ae(e, a, t, i) {
|
|
|
1930
1930
|
e.result += s;
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1933
|
+
function Lt(e, a, t, i) {
|
|
1934
1934
|
var n, r, o, s;
|
|
1935
1935
|
for (oe.isObject(t) || T(e, "cannot merge mappings; the provided source object is unacceptable"), n = Object.keys(t), o = 0, s = n.length; o < s; o += 1)
|
|
1936
1936
|
r = n[o], Te.call(a, r) || (a[r] = t[r], i[r] = !0);
|
|
@@ -1943,9 +1943,9 @@ function Ee(e, a, t, i, n, r, o, s, c) {
|
|
|
1943
1943
|
if (typeof n == "object" && Nt(n) === "[object Object]" && (n = "[object Object]"), n = String(n), a === null && (a = {}), i === "tag:yaml.org,2002:merge")
|
|
1944
1944
|
if (Array.isArray(r))
|
|
1945
1945
|
for (l = 0, d = r.length; l < d; l += 1)
|
|
1946
|
-
|
|
1946
|
+
Lt(e, a, r[l], t);
|
|
1947
1947
|
else
|
|
1948
|
-
|
|
1948
|
+
Lt(e, a, r, t);
|
|
1949
1949
|
else
|
|
1950
1950
|
!e.json && !Te.call(t, n) && Te.call(a, n) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = c || e.position, T(e, "duplicated mapping key")), n === "__proto__" ? Object.defineProperty(a, n, {
|
|
1951
1951
|
configurable: !0,
|
|
@@ -1973,7 +1973,7 @@ function ne(e, a, t) {
|
|
|
1973
1973
|
else
|
|
1974
1974
|
break;
|
|
1975
1975
|
}
|
|
1976
|
-
return t !== -1 && i !== 0 && e.lineIndent < t &&
|
|
1976
|
+
return t !== -1 && i !== 0 && e.lineIndent < t && Ge(e, "deficient indentation"), i;
|
|
1977
1977
|
}
|
|
1978
1978
|
function at(e) {
|
|
1979
1979
|
var a = e.position, t;
|
|
@@ -1984,18 +1984,18 @@ function Ct(e, a) {
|
|
|
1984
1984
|
`, a - 1));
|
|
1985
1985
|
}
|
|
1986
1986
|
function Tr(e, a, t) {
|
|
1987
|
-
var i, n, r, o, s, c, l, d, u = e.kind,
|
|
1988
|
-
if (y = e.input.charCodeAt(e.position), ge(y) ||
|
|
1987
|
+
var i, n, r, o, s, c, l, d, u = e.kind, v = e.result, y;
|
|
1988
|
+
if (y = e.input.charCodeAt(e.position), ge(y) || Oe(y) || y === 35 || y === 38 || y === 42 || y === 33 || y === 124 || y === 62 || y === 39 || y === 34 || y === 37 || y === 64 || y === 96 || (y === 63 || y === 45) && (n = e.input.charCodeAt(e.position + 1), ge(n) || t && Oe(n)))
|
|
1989
1989
|
return !1;
|
|
1990
1990
|
for (e.kind = "scalar", e.result = "", r = o = e.position, s = !1; y !== 0; ) {
|
|
1991
1991
|
if (y === 58) {
|
|
1992
|
-
if (n = e.input.charCodeAt(e.position + 1), ge(n) || t &&
|
|
1992
|
+
if (n = e.input.charCodeAt(e.position + 1), ge(n) || t && Oe(n))
|
|
1993
1993
|
break;
|
|
1994
1994
|
} else if (y === 35) {
|
|
1995
1995
|
if (i = e.input.charCodeAt(e.position - 1), ge(i))
|
|
1996
1996
|
break;
|
|
1997
1997
|
} else {
|
|
1998
|
-
if (e.position === e.lineStart && at(e) || t &&
|
|
1998
|
+
if (e.position === e.lineStart && at(e) || t && Oe(y))
|
|
1999
1999
|
break;
|
|
2000
2000
|
if (we(y))
|
|
2001
2001
|
if (c = e.line, l = e.lineStart, d = e.lineIndent, ne(e, !1, -1), e.lineIndent >= a) {
|
|
@@ -2008,7 +2008,7 @@ function Tr(e, a, t) {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
s && (Ae(e, r, o, !1), Ct(e, e.line - c), r = o = e.position, s = !1), $e(y) || (o = e.position + 1), y = e.input.charCodeAt(++e.position);
|
|
2010
2010
|
}
|
|
2011
|
-
return Ae(e, r, o, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
2011
|
+
return Ae(e, r, o, !1), e.result ? !0 : (e.kind = u, e.result = v, !1);
|
|
2012
2012
|
}
|
|
2013
2013
|
function jr(e, a) {
|
|
2014
2014
|
var t, i, n;
|
|
@@ -2049,21 +2049,21 @@ function $r(e, a) {
|
|
|
2049
2049
|
T(e, "unexpected end of the stream within a double quoted scalar");
|
|
2050
2050
|
}
|
|
2051
2051
|
function Kr(e, a) {
|
|
2052
|
-
var t = !0, i, n, r, o = e.tag, s, c = e.anchor, l, d, u,
|
|
2053
|
-
if (
|
|
2052
|
+
var t = !0, i, n, r, o = e.tag, s, c = e.anchor, l, d, u, v, y, _ = /* @__PURE__ */ Object.create(null), w, p, m, k;
|
|
2053
|
+
if (k = e.input.charCodeAt(e.position), k === 91)
|
|
2054
2054
|
d = 93, y = !1, s = [];
|
|
2055
|
-
else if (
|
|
2055
|
+
else if (k === 123)
|
|
2056
2056
|
d = 125, y = !0, s = {};
|
|
2057
2057
|
else
|
|
2058
2058
|
return !1;
|
|
2059
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
2060
|
-
if (ne(e, !0, a),
|
|
2059
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), k = e.input.charCodeAt(++e.position); k !== 0; ) {
|
|
2060
|
+
if (ne(e, !0, a), k = e.input.charCodeAt(e.position), k === d)
|
|
2061
2061
|
return e.position++, e.tag = o, e.anchor = c, e.kind = y ? "mapping" : "sequence", e.result = s, !0;
|
|
2062
|
-
t ?
|
|
2062
|
+
t ? k === 44 && T(e, "expected the node content, but found ','") : T(e, "missed comma between flow collection entries"), p = w = m = null, u = v = !1, k === 63 && (l = e.input.charCodeAt(e.position + 1), ge(l) && (u = v = !0, e.position++, ne(e, !0, a))), i = e.line, n = e.lineStart, r = e.position, Ne(e, a, Ye, !1, !0), p = e.tag, w = e.result, ne(e, !0, a), k = e.input.charCodeAt(e.position), (v || e.line === i) && k === 58 && (u = !0, k = e.input.charCodeAt(++e.position), ne(e, !0, a), Ne(e, a, Ye, !1, !0), m = e.result), y ? Ee(e, s, _, p, w, m, i, n, r) : u ? s.push(Ee(e, null, _, p, w, m, i, n, r)) : s.push(w), ne(e, !0, a), k = e.input.charCodeAt(e.position), k === 44 ? (t = !0, k = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2063
2063
|
}
|
|
2064
2064
|
T(e, "unexpected end of the stream within a flow collection");
|
|
2065
2065
|
}
|
|
2066
|
-
function
|
|
2066
|
+
function Mr(e, a) {
|
|
2067
2067
|
var t, i, n = ot, r = !1, o = !1, s = a, c = 0, l = !1, d, u;
|
|
2068
2068
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
2069
2069
|
i = !1;
|
|
@@ -2110,7 +2110,7 @@ function Or(e, a) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
return !0;
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function Vt(e, a) {
|
|
2114
2114
|
var t, i = e.tag, n = e.anchor, r = [], o, s = !1, c;
|
|
2115
2115
|
if (e.firstTabInLine !== -1)
|
|
2116
2116
|
return !1;
|
|
@@ -2119,28 +2119,28 @@ function Pt(e, a) {
|
|
|
2119
2119
|
r.push(null), c = e.input.charCodeAt(e.position);
|
|
2120
2120
|
continue;
|
|
2121
2121
|
}
|
|
2122
|
-
if (t = e.line, Ne(e, a,
|
|
2122
|
+
if (t = e.line, Ne(e, a, Ma, !1, !0), r.push(e.result), ne(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > a) && c !== 0)
|
|
2123
2123
|
T(e, "bad indentation of a sequence entry");
|
|
2124
2124
|
else if (e.lineIndent < a)
|
|
2125
2125
|
break;
|
|
2126
2126
|
}
|
|
2127
2127
|
return s ? (e.tag = i, e.anchor = n, e.kind = "sequence", e.result = r, !0) : !1;
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2130
|
-
var i, n, r, o, s, c, l = e.tag, d = e.anchor, u = {},
|
|
2129
|
+
function Or(e, a, t) {
|
|
2130
|
+
var i, n, r, o, s, c, l = e.tag, d = e.anchor, u = {}, v = /* @__PURE__ */ Object.create(null), y = null, _ = null, w = null, p = !1, m = !1, k;
|
|
2131
2131
|
if (e.firstTabInLine !== -1)
|
|
2132
2132
|
return !1;
|
|
2133
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
2134
|
-
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), r = e.line, (
|
|
2135
|
-
|
|
2133
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), k = e.input.charCodeAt(e.position); k !== 0; ) {
|
|
2134
|
+
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), r = e.line, (k === 63 || k === 58) && ge(i))
|
|
2135
|
+
k === 63 ? (p && (Ee(e, u, v, y, _, null, o, s, c), y = _ = w = null), m = !0, p = !0, n = !0) : p ? (p = !1, n = !0) : T(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, k = i;
|
|
2136
2136
|
else {
|
|
2137
2137
|
if (o = e.line, s = e.lineStart, c = e.position, !Ne(e, t, Ka, !1, !0))
|
|
2138
2138
|
break;
|
|
2139
2139
|
if (e.line === r) {
|
|
2140
|
-
for (
|
|
2141
|
-
|
|
2142
|
-
if (
|
|
2143
|
-
|
|
2140
|
+
for (k = e.input.charCodeAt(e.position); $e(k); )
|
|
2141
|
+
k = e.input.charCodeAt(++e.position);
|
|
2142
|
+
if (k === 58)
|
|
2143
|
+
k = e.input.charCodeAt(++e.position), ge(k) || T(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ee(e, u, v, y, _, null, o, s, c), y = _ = w = null), m = !0, p = !1, n = !1, y = e.tag, _ = e.result;
|
|
2144
2144
|
else if (m)
|
|
2145
2145
|
T(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2146
2146
|
else
|
|
@@ -2150,12 +2150,12 @@ function Mr(e, a, t) {
|
|
|
2150
2150
|
else
|
|
2151
2151
|
return e.tag = l, e.anchor = d, !0;
|
|
2152
2152
|
}
|
|
2153
|
-
if ((e.line === r || e.lineIndent > a) && (p && (o = e.line, s = e.lineStart, c = e.position), Ne(e, a,
|
|
2153
|
+
if ((e.line === r || e.lineIndent > a) && (p && (o = e.line, s = e.lineStart, c = e.position), Ne(e, a, Ze, !0, n) && (p ? _ = e.result : w = e.result), p || (Ee(e, u, v, y, _, w, o, s, c), y = _ = w = null), ne(e, !0, -1), k = e.input.charCodeAt(e.position)), (e.line === r || e.lineIndent > a) && k !== 0)
|
|
2154
2154
|
T(e, "bad indentation of a mapping entry");
|
|
2155
2155
|
else if (e.lineIndent < a)
|
|
2156
2156
|
break;
|
|
2157
2157
|
}
|
|
2158
|
-
return p && Ee(e, u,
|
|
2158
|
+
return p && Ee(e, u, v, y, _, null, o, s, c), m && (e.tag = l, e.anchor = d, e.kind = "mapping", e.result = u), m;
|
|
2159
2159
|
}
|
|
2160
2160
|
function Er(e) {
|
|
2161
2161
|
var a, t = !1, i = !1, n, r, o;
|
|
@@ -2168,7 +2168,7 @@ function Er(e) {
|
|
|
2168
2168
|
e.position < e.length ? (r = e.input.slice(a, e.position), o = e.input.charCodeAt(++e.position)) : T(e, "unexpected end of the stream within a verbatim tag");
|
|
2169
2169
|
} else {
|
|
2170
2170
|
for (; o !== 0 && !ge(o); )
|
|
2171
|
-
o === 33 && (i ? T(e, "tag suffix cannot contain exclamation marks") : (n = e.input.slice(a - 1, e.position + 1),
|
|
2171
|
+
o === 33 && (i ? T(e, "tag suffix cannot contain exclamation marks") : (n = e.input.slice(a - 1, e.position + 1), Oa.test(n) || T(e, "named tag handle cannot contain such characters"), i = !0, a = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2172
2172
|
r = e.input.slice(a, e.position), wr.test(r) && T(e, "tag suffix cannot contain flow indicator characters");
|
|
2173
2173
|
}
|
|
2174
2174
|
r && !Ea.test(r) && T(e, "tag name cannot contain such characters: " + r);
|
|
@@ -2183,7 +2183,7 @@ function Fr(e) {
|
|
|
2183
2183
|
var a, t;
|
|
2184
2184
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2185
2185
|
return !1;
|
|
2186
|
-
for (e.anchor !== null && T(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), a = e.position; t !== 0 && !ge(t) && !
|
|
2186
|
+
for (e.anchor !== null && T(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), a = e.position; t !== 0 && !ge(t) && !Oe(t); )
|
|
2187
2187
|
t = e.input.charCodeAt(++e.position);
|
|
2188
2188
|
return e.position === a && T(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(a, e.position), !0;
|
|
2189
2189
|
}
|
|
@@ -2191,33 +2191,33 @@ function Nr(e) {
|
|
|
2191
2191
|
var a, t, i;
|
|
2192
2192
|
if (i = e.input.charCodeAt(e.position), i !== 42)
|
|
2193
2193
|
return !1;
|
|
2194
|
-
for (i = e.input.charCodeAt(++e.position), a = e.position; i !== 0 && !ge(i) && !
|
|
2194
|
+
for (i = e.input.charCodeAt(++e.position), a = e.position; i !== 0 && !ge(i) && !Oe(i); )
|
|
2195
2195
|
i = e.input.charCodeAt(++e.position);
|
|
2196
2196
|
return e.position === a && T(e, "name of an alias node must contain at least one character"), t = e.input.slice(a, e.position), Te.call(e.anchorMap, t) || T(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ne(e, !0, -1), !0;
|
|
2197
2197
|
}
|
|
2198
2198
|
function Ne(e, a, t, i, n) {
|
|
2199
|
-
var r, o, s, c = 1, l = !1, d = !1, u,
|
|
2200
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = o = s =
|
|
2199
|
+
var r, o, s, c = 1, l = !1, d = !1, u, v, y, _, w, p;
|
|
2200
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = o = s = Ze === t || Ma === t, i && ne(e, !0, -1) && (l = !0, e.lineIndent > a ? c = 1 : e.lineIndent === a ? c = 0 : e.lineIndent < a && (c = -1)), c === 1)
|
|
2201
2201
|
for (; Er(e) || Fr(e); )
|
|
2202
2202
|
ne(e, !0, -1) ? (l = !0, s = r, e.lineIndent > a ? c = 1 : e.lineIndent === a ? c = 0 : e.lineIndent < a && (c = -1)) : s = !1;
|
|
2203
|
-
if (s && (s = l || n), (c === 1 ||
|
|
2203
|
+
if (s && (s = l || n), (c === 1 || Ze === t) && (Ye === t || Ka === t ? w = a : w = a + 1, p = e.position - e.lineStart, c === 1 ? s && (Vt(e, p) || Or(e, p, w)) || Kr(e, w) ? d = !0 : (o && Mr(e, w) || jr(e, w) || $r(e, w) ? d = !0 : Nr(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && T(e, "alias node should not have any properties")) : Tr(e, w, Ye === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (d = s && Vt(e, p))), e.tag === null)
|
|
2204
2204
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2205
2205
|
else if (e.tag === "?") {
|
|
2206
|
-
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0,
|
|
2207
|
-
if (
|
|
2208
|
-
e.result =
|
|
2206
|
+
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, v = e.implicitTypes.length; u < v; u += 1)
|
|
2207
|
+
if (_ = e.implicitTypes[u], _.resolve(e.result)) {
|
|
2208
|
+
e.result = _.construct(e.result), e.tag = _.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2209
2209
|
break;
|
|
2210
2210
|
}
|
|
2211
2211
|
} else if (e.tag !== "!") {
|
|
2212
2212
|
if (Te.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2213
|
-
|
|
2213
|
+
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2214
2214
|
else
|
|
2215
|
-
for (
|
|
2215
|
+
for (_ = null, y = e.typeMap.multi[e.kind || "fallback"], u = 0, v = y.length; u < v; u += 1)
|
|
2216
2216
|
if (e.tag.slice(0, y[u].tag.length) === y[u].tag) {
|
|
2217
|
-
|
|
2217
|
+
_ = y[u];
|
|
2218
2218
|
break;
|
|
2219
2219
|
}
|
|
2220
|
-
|
|
2220
|
+
_ || T(e, "unknown tag !<" + e.tag + ">"), e.result !== null && _.kind !== e.kind && T(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + _.kind + '", not "' + e.kind + '"'), _.resolve(e.result, e.tag) ? (e.result = _.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : T(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2221
2221
|
}
|
|
2222
2222
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2223
2223
|
}
|
|
@@ -2241,9 +2241,9 @@ function Br(e) {
|
|
|
2241
2241
|
o = e.input.charCodeAt(++e.position);
|
|
2242
2242
|
n.push(e.input.slice(t, e.position));
|
|
2243
2243
|
}
|
|
2244
|
-
o !== 0 && bt(e), Te.call(
|
|
2244
|
+
o !== 0 && bt(e), Te.call(qt, i) ? qt[i](e, i, n) : Ge(e, 'unknown document directive "' + i + '"');
|
|
2245
2245
|
}
|
|
2246
|
-
if (ne(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ne(e, !0, -1)) : r && T(e, "directives end mark is expected"), Ne(e, e.lineIndent - 1,
|
|
2246
|
+
if (ne(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ne(e, !0, -1)) : r && T(e, "directives end mark is expected"), Ne(e, e.lineIndent - 1, Ze, !1, !0), ne(e, !0, -1), e.checkLineBreaks && Cr.test(e.input.slice(a, e.position)) && Ge(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && at(e)) {
|
|
2247
2247
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ne(e, !0, -1));
|
|
2248
2248
|
return;
|
|
2249
2249
|
}
|
|
@@ -2252,7 +2252,7 @@ function Br(e) {
|
|
|
2252
2252
|
else
|
|
2253
2253
|
return;
|
|
2254
2254
|
}
|
|
2255
|
-
function
|
|
2255
|
+
function qa(e, a) {
|
|
2256
2256
|
e = String(e), a = a || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2257
2257
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2258
2258
|
var t = new xr(e, a), i = e.indexOf("\0");
|
|
@@ -2262,26 +2262,26 @@ function La(e, a) {
|
|
|
2262
2262
|
Br(t);
|
|
2263
2263
|
return t.documents;
|
|
2264
2264
|
}
|
|
2265
|
-
function
|
|
2265
|
+
function qr(e, a, t) {
|
|
2266
2266
|
a !== null && typeof a == "object" && typeof t > "u" && (t = a, a = null);
|
|
2267
|
-
var i =
|
|
2267
|
+
var i = qa(e, t);
|
|
2268
2268
|
if (typeof a != "function")
|
|
2269
2269
|
return i;
|
|
2270
2270
|
for (var n = 0, r = i.length; n < r; n += 1)
|
|
2271
2271
|
a(i[n]);
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2274
|
-
var t =
|
|
2273
|
+
function Lr(e, a) {
|
|
2274
|
+
var t = qa(e, a);
|
|
2275
2275
|
if (t.length !== 0) {
|
|
2276
2276
|
if (t.length === 1)
|
|
2277
2277
|
return t[0];
|
|
2278
2278
|
throw new fe("expected a single document in the stream, but found more");
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
-
var
|
|
2282
|
-
loadAll:
|
|
2283
|
-
load:
|
|
2284
|
-
},
|
|
2281
|
+
var Vr = qr, Pr = Lr, La = {
|
|
2282
|
+
loadAll: Vr,
|
|
2283
|
+
load: Pr
|
|
2284
|
+
}, Va = Object.prototype.toString, Pa = Object.prototype.hasOwnProperty, wt = 65279, Rr = 9, Re = 10, Ur = 13, Dr = 32, Jr = 33, Hr = 34, ct = 35, zr = 37, Wr = 38, Yr = 39, Zr = 42, Ra = 44, Gr = 45, Qe = 58, Qr = 61, Xr = 62, eo = 63, to = 64, Ua = 91, Da = 93, ao = 96, Ja = 123, io = 124, Ha = 125, de = {};
|
|
2285
2285
|
de[0] = "\\0";
|
|
2286
2286
|
de[7] = "\\a";
|
|
2287
2287
|
de[8] = "\\b";
|
|
@@ -2320,7 +2320,7 @@ function oo(e, a) {
|
|
|
2320
2320
|
if (a === null)
|
|
2321
2321
|
return {};
|
|
2322
2322
|
for (t = {}, i = Object.keys(a), n = 0, r = i.length; n < r; n += 1)
|
|
2323
|
-
o = i[n], s = String(a[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c &&
|
|
2323
|
+
o = i[n], s = String(a[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && Pa.call(c.styleAliases, s) && (s = c.styleAliases[s]), t[o] = s;
|
|
2324
2324
|
return t;
|
|
2325
2325
|
}
|
|
2326
2326
|
function lo(e) {
|
|
@@ -2339,7 +2339,7 @@ var so = 1, Ue = 2;
|
|
|
2339
2339
|
function co(e) {
|
|
2340
2340
|
this.schema = e.schema || kt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = oe.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = oo(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 === '"' ? Ue : so, 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;
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2342
|
+
function Pt(e, a) {
|
|
2343
2343
|
for (var t = oe.repeat(" ", a), i = 0, n = -1, r = "", o, s = e.length; i < s; )
|
|
2344
2344
|
n = e.indexOf(`
|
|
2345
2345
|
`, i), n === -1 ? (o = e.slice(i), i = s) : (o = e.slice(i, n + 1), i = n + 1), o.length && o !== `
|
|
@@ -2357,7 +2357,7 @@ function uo(e, a) {
|
|
|
2357
2357
|
return !0;
|
|
2358
2358
|
return !1;
|
|
2359
2359
|
}
|
|
2360
|
-
function
|
|
2360
|
+
function Xe(e) {
|
|
2361
2361
|
return e === Dr || e === Rr;
|
|
2362
2362
|
}
|
|
2363
2363
|
function De(e) {
|
|
@@ -2367,50 +2367,50 @@ function Rt(e) {
|
|
|
2367
2367
|
return De(e) && e !== wt && e !== Ur && e !== Re;
|
|
2368
2368
|
}
|
|
2369
2369
|
function Ut(e, a, t) {
|
|
2370
|
-
var i = Rt(e), n = i && !
|
|
2370
|
+
var i = Rt(e), n = i && !Xe(e);
|
|
2371
2371
|
return (
|
|
2372
2372
|
// ns-plain-safe
|
|
2373
2373
|
(t ? (
|
|
2374
2374
|
// c = flow-in
|
|
2375
2375
|
i
|
|
2376
|
-
) : i && e !== Ra && e !== Ua && e !== Da && e !==
|
|
2376
|
+
) : i && e !== Ra && e !== Ua && e !== Da && e !== Ja && e !== Ha) && e !== ct && !(a === Qe && !n) || Rt(a) && !Xe(a) && e === ct || a === Qe && n
|
|
2377
2377
|
);
|
|
2378
2378
|
}
|
|
2379
2379
|
function po(e) {
|
|
2380
|
-
return De(e) && e !== wt && !
|
|
2380
|
+
return De(e) && e !== wt && !Xe(e) && e !== Gr && e !== eo && e !== Qe && e !== Ra && e !== Ua && e !== Da && e !== Ja && e !== Ha && e !== ct && e !== Wr && e !== Zr && e !== Jr && e !== io && e !== Qr && e !== Xr && e !== Yr && e !== Hr && e !== zr && e !== to && e !== ao;
|
|
2381
2381
|
}
|
|
2382
2382
|
function fo(e) {
|
|
2383
|
-
return !
|
|
2383
|
+
return !Xe(e) && e !== Qe;
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2385
|
+
function Le(e, a) {
|
|
2386
2386
|
var t = e.charCodeAt(a), i;
|
|
2387
2387
|
return t >= 55296 && t <= 56319 && a + 1 < e.length && (i = e.charCodeAt(a + 1), i >= 56320 && i <= 57343) ? (t - 55296) * 1024 + i - 56320 + 65536 : t;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function za(e) {
|
|
2390
2390
|
var a = /^\n* /;
|
|
2391
2391
|
return a.test(e);
|
|
2392
2392
|
}
|
|
2393
|
-
var Wa = 1, dt = 2, Ya = 3,
|
|
2393
|
+
var Wa = 1, dt = 2, Ya = 3, Za = 4, Me = 5;
|
|
2394
2394
|
function yo(e, a, t, i, n, r, o, s) {
|
|
2395
|
-
var c, l = 0, d = null, u = !1,
|
|
2395
|
+
var c, l = 0, d = null, u = !1, v = !1, y = i !== -1, _ = -1, w = po(Le(e, 0)) && fo(Le(e, e.length - 1));
|
|
2396
2396
|
if (a || o)
|
|
2397
2397
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2398
|
-
if (l =
|
|
2399
|
-
return
|
|
2400
|
-
|
|
2398
|
+
if (l = Le(e, c), !De(l))
|
|
2399
|
+
return Me;
|
|
2400
|
+
w = w && Ut(l, d, s), d = l;
|
|
2401
2401
|
}
|
|
2402
2402
|
else {
|
|
2403
2403
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2404
|
-
if (l =
|
|
2405
|
-
u = !0, y && (
|
|
2406
|
-
c -
|
|
2404
|
+
if (l = Le(e, c), l === Re)
|
|
2405
|
+
u = !0, y && (v = v || // Foldable line = too long, and not more-indented.
|
|
2406
|
+
c - _ - 1 > i && e[_ + 1] !== " ", _ = c);
|
|
2407
2407
|
else if (!De(l))
|
|
2408
|
-
return
|
|
2409
|
-
|
|
2408
|
+
return Me;
|
|
2409
|
+
w = w && Ut(l, d, s), d = l;
|
|
2410
2410
|
}
|
|
2411
|
-
|
|
2411
|
+
v = v || y && c - _ - 1 > i && e[_ + 1] !== " ";
|
|
2412
2412
|
}
|
|
2413
|
-
return !u && !
|
|
2413
|
+
return !u && !v ? w && !o && !n(e) ? Wa : r === Ue ? Me : dt : t > 9 && za(e) ? Me : o ? r === Ue ? Me : dt : v ? Za : Ya;
|
|
2414
2414
|
}
|
|
2415
2415
|
function mo(e, a, t, i, n) {
|
|
2416
2416
|
e.dump = function() {
|
|
@@ -2437,10 +2437,10 @@ function mo(e, a, t, i, n) {
|
|
|
2437
2437
|
case dt:
|
|
2438
2438
|
return "'" + a.replace(/'/g, "''") + "'";
|
|
2439
2439
|
case Ya:
|
|
2440
|
-
return "|" + Dt(a, e.indent) +
|
|
2441
|
-
case
|
|
2442
|
-
return ">" + Dt(a, e.indent) +
|
|
2443
|
-
case
|
|
2440
|
+
return "|" + Dt(a, e.indent) + Jt(Pt(a, r));
|
|
2441
|
+
case Za:
|
|
2442
|
+
return ">" + Dt(a, e.indent) + Jt(Pt(go(a, o), r));
|
|
2443
|
+
case Me:
|
|
2444
2444
|
return '"' + ho(a) + '"';
|
|
2445
2445
|
default:
|
|
2446
2446
|
throw new fe("impossible error: invalid scalar style");
|
|
@@ -2448,14 +2448,14 @@ function mo(e, a, t, i, n) {
|
|
|
2448
2448
|
}();
|
|
2449
2449
|
}
|
|
2450
2450
|
function Dt(e, a) {
|
|
2451
|
-
var t =
|
|
2451
|
+
var t = za(e) ? String(a) : "", i = e[e.length - 1] === `
|
|
2452
2452
|
`, n = i && (e[e.length - 2] === `
|
|
2453
2453
|
` || e === `
|
|
2454
2454
|
`), r = n ? "+" : i ? "" : "-";
|
|
2455
2455
|
return t + r + `
|
|
2456
2456
|
`;
|
|
2457
2457
|
}
|
|
2458
|
-
function
|
|
2458
|
+
function Jt(e) {
|
|
2459
2459
|
return e[e.length - 1] === `
|
|
2460
2460
|
` ? e.slice(0, -1) : e;
|
|
2461
2461
|
}
|
|
@@ -2463,16 +2463,16 @@ function go(e, a) {
|
|
|
2463
2463
|
for (var t = /(\n+)([^\n]*)/g, i = function() {
|
|
2464
2464
|
var l = e.indexOf(`
|
|
2465
2465
|
`);
|
|
2466
|
-
return l = l !== -1 ? l : e.length, t.lastIndex = l,
|
|
2466
|
+
return l = l !== -1 ? l : e.length, t.lastIndex = l, Ht(e.slice(0, l), a);
|
|
2467
2467
|
}(), n = e[0] === `
|
|
2468
2468
|
` || e[0] === " ", r, o; o = t.exec(e); ) {
|
|
2469
2469
|
var s = o[1], c = o[2];
|
|
2470
2470
|
r = c[0] === " ", i += s + (!n && !r && c !== "" ? `
|
|
2471
|
-
` : "") +
|
|
2471
|
+
` : "") + Ht(c, a), n = r;
|
|
2472
2472
|
}
|
|
2473
2473
|
return i;
|
|
2474
2474
|
}
|
|
2475
|
-
function
|
|
2475
|
+
function Ht(e, a) {
|
|
2476
2476
|
if (e === "" || e[0] === " ")
|
|
2477
2477
|
return e;
|
|
2478
2478
|
for (var t = / [^ ]/g, i, n = 0, r, o = 0, s = 0, c = ""; i = t.exec(e); )
|
|
@@ -2484,7 +2484,7 @@ function Jt(e, a) {
|
|
|
2484
2484
|
}
|
|
2485
2485
|
function ho(e) {
|
|
2486
2486
|
for (var a = "", t = 0, i, n = 0; n < e.length; t >= 65536 ? n += 2 : n++)
|
|
2487
|
-
t =
|
|
2487
|
+
t = Le(e, n), i = de[t], !i && De(t) ? (a += e[n], t >= 65536 && (a += e[n + 1])) : a += i || lo(t);
|
|
2488
2488
|
return a;
|
|
2489
2489
|
}
|
|
2490
2490
|
function vo(e, a, t) {
|
|
@@ -2493,7 +2493,7 @@ function vo(e, a, t) {
|
|
|
2493
2493
|
s = t[r], e.replacer && (s = e.replacer.call(t, String(r), s)), (Se(e, a, s, !1, !1) || typeof s > "u" && Se(e, a, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
|
|
2494
2494
|
e.tag = n, e.dump = "[" + i + "]";
|
|
2495
2495
|
}
|
|
2496
|
-
function
|
|
2496
|
+
function zt(e, a, t, i) {
|
|
2497
2497
|
var n = "", r = e.tag, o, s, c;
|
|
2498
2498
|
for (o = 0, s = t.length; o < s; o += 1)
|
|
2499
2499
|
c = t[o], e.replacer && (c = e.replacer.call(t, String(o), c)), (Se(e, a + 1, c, !0, !0, !1, !0) || typeof c > "u" && Se(e, a + 1, null, !0, !0, !1, !0)) && ((!i || n !== "") && (n += ut(e, a)), e.dump && Re === e.dump.charCodeAt(0) ? n += "-" : n += "- ", n += e.dump);
|
|
@@ -2506,7 +2506,7 @@ function ko(e, a, t) {
|
|
|
2506
2506
|
e.tag = n, e.dump = "{" + i + "}";
|
|
2507
2507
|
}
|
|
2508
2508
|
function bo(e, a, t, i) {
|
|
2509
|
-
var n = "", r = e.tag, o = Object.keys(t), s, c, l, d, u,
|
|
2509
|
+
var n = "", r = e.tag, o = Object.keys(t), s, c, l, d, u, v;
|
|
2510
2510
|
if (e.sortKeys === !0)
|
|
2511
2511
|
o.sort();
|
|
2512
2512
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2514,7 +2514,7 @@ function bo(e, a, t, i) {
|
|
|
2514
2514
|
else if (e.sortKeys)
|
|
2515
2515
|
throw new fe("sortKeys must be a boolean or a function");
|
|
2516
2516
|
for (s = 0, c = o.length; s < c; s += 1)
|
|
2517
|
-
|
|
2517
|
+
v = "", (!i || n !== "") && (v += ut(e, a)), l = o[s], d = t[l], e.replacer && (d = e.replacer.call(t, l, d)), Se(e, a + 1, l, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Re === e.dump.charCodeAt(0) ? v += "?" : v += "? "), v += e.dump, u && (v += ut(e, a)), Se(e, a + 1, d, !0, u) && (e.dump && Re === e.dump.charCodeAt(0) ? v += ":" : v += ": ", v += e.dump, n += v));
|
|
2518
2518
|
e.tag = r, e.dump = n || "{}";
|
|
2519
2519
|
}
|
|
2520
2520
|
function Wt(e, a, t) {
|
|
@@ -2522,9 +2522,9 @@ function Wt(e, a, t) {
|
|
|
2522
2522
|
for (n = t ? e.explicitTypes : e.implicitTypes, r = 0, o = n.length; r < o; r += 1)
|
|
2523
2523
|
if (s = n[r], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof a == "object" && a instanceof s.instanceOf) && (!s.predicate || s.predicate(a))) {
|
|
2524
2524
|
if (t ? s.multi && s.representName ? e.tag = s.representName(a) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2525
|
-
if (c = e.styleMap[s.tag] || s.defaultStyle,
|
|
2525
|
+
if (c = e.styleMap[s.tag] || s.defaultStyle, Va.call(s.represent) === "[object Function]")
|
|
2526
2526
|
i = s.represent(a, c);
|
|
2527
|
-
else if (
|
|
2527
|
+
else if (Pa.call(s.represent, c))
|
|
2528
2528
|
i = s.represent[c](a, c);
|
|
2529
2529
|
else
|
|
2530
2530
|
throw new fe("!<" + s.tag + '> tag resolver accepts not "' + c + '" style');
|
|
@@ -2536,16 +2536,16 @@ function Wt(e, a, t) {
|
|
|
2536
2536
|
}
|
|
2537
2537
|
function Se(e, a, t, i, n, r, o) {
|
|
2538
2538
|
e.tag = null, e.dump = t, Wt(e, t, !1) || Wt(e, t, !0);
|
|
2539
|
-
var s =
|
|
2539
|
+
var s = Va.call(e.dump), c = i, l;
|
|
2540
2540
|
i && (i = e.flowLevel < 0 || e.flowLevel > a);
|
|
2541
|
-
var d = s === "[object Object]" || s === "[object Array]", u,
|
|
2542
|
-
if (d && (u = e.duplicates.indexOf(t),
|
|
2541
|
+
var d = s === "[object Object]" || s === "[object Array]", u, v;
|
|
2542
|
+
if (d && (u = e.duplicates.indexOf(t), v = u !== -1), (e.tag !== null && e.tag !== "?" || v || e.indent !== 2 && a > 0) && (n = !1), v && e.usedDuplicates[u])
|
|
2543
2543
|
e.dump = "*ref_" + u;
|
|
2544
2544
|
else {
|
|
2545
|
-
if (d &&
|
|
2546
|
-
i && Object.keys(e.dump).length !== 0 ? (bo(e, a, e.dump, n),
|
|
2545
|
+
if (d && v && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2546
|
+
i && Object.keys(e.dump).length !== 0 ? (bo(e, a, e.dump, n), v && (e.dump = "&ref_" + u + e.dump)) : (ko(e, a, e.dump), v && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2547
2547
|
else if (s === "[object Array]")
|
|
2548
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !o && a > 0 ?
|
|
2548
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !o && a > 0 ? zt(e, a - 1, e.dump, n) : zt(e, a, e.dump, n), v && (e.dump = "&ref_" + u + e.dump)) : (vo(e, a, e.dump), v && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2549
2549
|
else if (s === "[object String]")
|
|
2550
2550
|
e.tag !== "?" && mo(e, e.dump, a, r, c);
|
|
2551
2551
|
else {
|
|
@@ -2593,7 +2593,7 @@ function St(e, a) {
|
|
|
2593
2593
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + a + " instead, which is now safe by default.");
|
|
2594
2594
|
};
|
|
2595
2595
|
}
|
|
2596
|
-
var Io = ue, Ao = pa, xo = ga, To = Ca, jo = wa, $o = kt, Ko =
|
|
2596
|
+
var Io = ue, Ao = pa, xo = ga, To = Ca, jo = wa, $o = kt, Ko = La.load, Mo = La.loadAll, Oo = _o.dump, Eo = fe, Fo = {
|
|
2597
2597
|
binary: xa,
|
|
2598
2598
|
float: ba,
|
|
2599
2599
|
map: ma,
|
|
@@ -2607,7 +2607,7 @@ var Io = ue, Ao = pa, xo = ga, To = Ca, jo = wa, $o = kt, Ko = qa.load, Oo = qa.
|
|
|
2607
2607
|
omap: Ta,
|
|
2608
2608
|
seq: ya,
|
|
2609
2609
|
str: fa
|
|
2610
|
-
}, No = St("safeLoad", "load"), Bo = St("safeLoadAll", "loadAll"),
|
|
2610
|
+
}, No = St("safeLoad", "load"), Bo = St("safeLoadAll", "loadAll"), qo = St("safeDump", "dump"), Lo = {
|
|
2611
2611
|
Type: Io,
|
|
2612
2612
|
Schema: Ao,
|
|
2613
2613
|
FAILSAFE_SCHEMA: xo,
|
|
@@ -2615,18 +2615,18 @@ var Io = ue, Ao = pa, xo = ga, To = Ca, jo = wa, $o = kt, Ko = qa.load, Oo = qa.
|
|
|
2615
2615
|
CORE_SCHEMA: jo,
|
|
2616
2616
|
DEFAULT_SCHEMA: $o,
|
|
2617
2617
|
load: Ko,
|
|
2618
|
-
loadAll:
|
|
2619
|
-
dump:
|
|
2618
|
+
loadAll: Mo,
|
|
2619
|
+
dump: Oo,
|
|
2620
2620
|
YAMLException: Eo,
|
|
2621
2621
|
types: Fo,
|
|
2622
2622
|
safeLoad: No,
|
|
2623
2623
|
safeLoadAll: Bo,
|
|
2624
|
-
safeDump:
|
|
2624
|
+
safeDump: qo
|
|
2625
2625
|
};
|
|
2626
|
-
const
|
|
2626
|
+
const Vo = {
|
|
2627
2627
|
key: 0,
|
|
2628
2628
|
class: "config-card-display-form"
|
|
2629
|
-
},
|
|
2629
|
+
}, Po = ["data-testid"], Ro = {
|
|
2630
2630
|
key: 0,
|
|
2631
2631
|
class: "config-card-prop-section-title"
|
|
2632
2632
|
}, Uo = {
|
|
@@ -2635,7 +2635,7 @@ const Po = {
|
|
|
2635
2635
|
}, Do = {
|
|
2636
2636
|
key: 2,
|
|
2637
2637
|
class: "config-card-display-yaml"
|
|
2638
|
-
},
|
|
2638
|
+
}, Jo = /* @__PURE__ */ re({
|
|
2639
2639
|
__name: "ConfigCardDisplay",
|
|
2640
2640
|
props: {
|
|
2641
2641
|
propertyCollections: {
|
|
@@ -2661,75 +2661,75 @@ const Po = {
|
|
|
2661
2661
|
}
|
|
2662
2662
|
},
|
|
2663
2663
|
setup(e) {
|
|
2664
|
-
const a = e, t = et(), { i18n: { t: i } } = se.useI18n(), n = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), r =
|
|
2664
|
+
const a = e, t = et(), { i18n: { t: i } } = se.useI18n(), n = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), r = $(""), o = $("");
|
|
2665
2665
|
return ke(() => a.format, (s) => {
|
|
2666
|
-
s === "json" ? r.value = JSON.stringify(a.record, null, 2) : s === "yaml" && (o.value =
|
|
2666
|
+
s === "json" ? r.value = JSON.stringify(a.record, null, 2) : s === "yaml" && (o.value = Lo.dump(a.record));
|
|
2667
2667
|
}, { immediate: !0 }), (s, c) => {
|
|
2668
2668
|
const l = N("KCodeBlock");
|
|
2669
2669
|
return f(), x(me, null, [
|
|
2670
|
-
e.format === "structured" ? (f(), x("div",
|
|
2670
|
+
e.format === "structured" ? (f(), x("div", Vo, [
|
|
2671
2671
|
(f(!0), x(me, null, ye(e.propListTypes, (d) => (f(), x("div", {
|
|
2672
2672
|
key: `config-card-details-${d}-props`,
|
|
2673
2673
|
class: xe(`config-card-details-${d}-props`),
|
|
2674
2674
|
"data-testid": `config-card-details-${d}-props`
|
|
2675
2675
|
}, [
|
|
2676
|
-
d !== "basic" ? (f(), x("div", Ro,
|
|
2677
|
-
(f(!0), x(me, null, ye(e.propertyCollections[d], (u) => (f(),
|
|
2676
|
+
d !== "basic" ? (f(), x("div", Ro, O(d === "advanced" ? g(i)("baseConfigCard.sections.advanced") : g(i)("baseConfigCard.sections.plugin")), 1)) : J("", !0),
|
|
2677
|
+
(f(!0), x(me, null, ye(e.propertyCollections[d], (u) => (f(), q(Ve, {
|
|
2678
2678
|
key: u.key,
|
|
2679
2679
|
item: u
|
|
2680
2680
|
}, Ie({
|
|
2681
|
-
label:
|
|
2681
|
+
label: b(() => [
|
|
2682
2682
|
X(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2683
2683
|
]),
|
|
2684
|
-
[u.key]:
|
|
2684
|
+
[u.key]: b(({ rowValue: v }) => [
|
|
2685
2685
|
X(s.$slots, u.key, {
|
|
2686
2686
|
row: u,
|
|
2687
|
-
rowValue:
|
|
2687
|
+
rowValue: v
|
|
2688
2688
|
}, void 0, !0)
|
|
2689
2689
|
]),
|
|
2690
2690
|
_: 2
|
|
2691
2691
|
}, [
|
|
2692
2692
|
n(u) ? {
|
|
2693
2693
|
name: "label-tooltip",
|
|
2694
|
-
fn:
|
|
2694
|
+
fn: b(() => [
|
|
2695
2695
|
X(s.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2696
2696
|
]),
|
|
2697
2697
|
key: "0"
|
|
2698
2698
|
} : void 0
|
|
2699
2699
|
]), 1032, ["item"]))), 128))
|
|
2700
|
-
], 10,
|
|
2701
|
-
])) :
|
|
2700
|
+
], 10, Po))), 128))
|
|
2701
|
+
])) : J("", !0),
|
|
2702
2702
|
e.format === "json" ? (f(), x("div", Uo, [
|
|
2703
|
-
|
|
2703
|
+
j(l, {
|
|
2704
2704
|
id: "config-card-codeblock",
|
|
2705
2705
|
code: r.value,
|
|
2706
2706
|
language: "json",
|
|
2707
2707
|
theme: "dark"
|
|
2708
2708
|
}, null, 8, ["code"])
|
|
2709
|
-
])) :
|
|
2709
|
+
])) : J("", !0),
|
|
2710
2710
|
e.format === "yaml" ? (f(), x("div", Do, [
|
|
2711
|
-
|
|
2711
|
+
j(l, {
|
|
2712
2712
|
id: "config-card-codeblock",
|
|
2713
2713
|
code: o.value,
|
|
2714
2714
|
language: "yaml",
|
|
2715
2715
|
theme: "dark"
|
|
2716
2716
|
}, null, 8, ["code"])
|
|
2717
|
-
])) :
|
|
2717
|
+
])) : J("", !0)
|
|
2718
2718
|
], 64);
|
|
2719
2719
|
};
|
|
2720
2720
|
}
|
|
2721
|
-
}),
|
|
2721
|
+
}), Ho = /* @__PURE__ */ Ce(Jo, [["__scopeId", "data-v-6c45e9e4"]]), Yt = "24px", zo = (e, a) => {
|
|
2722
2722
|
const t = e.__vccOpts || e;
|
|
2723
2723
|
for (const [i, n] of a)
|
|
2724
2724
|
t[i] = n;
|
|
2725
2725
|
return t;
|
|
2726
|
-
}, Wo = (e) => (
|
|
2726
|
+
}, Wo = (e) => (Xt("data-v-dd88a2bb"), e = e(), ea(), e), Yo = ["aria-hidden"], Zo = {
|
|
2727
2727
|
key: 0,
|
|
2728
2728
|
"data-testid": "kui-icon-svg-title"
|
|
2729
|
-
},
|
|
2729
|
+
}, Go = /* @__PURE__ */ Wo(() => /* @__PURE__ */ V("path", {
|
|
2730
2730
|
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",
|
|
2731
2731
|
fill: "currentColor"
|
|
2732
|
-
}, null, -1)),
|
|
2732
|
+
}, null, -1)), Qo = /* @__PURE__ */ re({
|
|
2733
2733
|
__name: "BookIcon",
|
|
2734
2734
|
props: {
|
|
2735
2735
|
/** The accessibility text provided to screen readers */
|
|
@@ -2781,7 +2781,7 @@ const Po = {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
},
|
|
2783
2783
|
setup(e) {
|
|
2784
|
-
const a = e, t =
|
|
2784
|
+
const a = e, t = I(() => {
|
|
2785
2785
|
if (typeof a.size == "number" && a.size > 0)
|
|
2786
2786
|
return `${a.size}px`;
|
|
2787
2787
|
if (typeof a.size == "string") {
|
|
@@ -2790,7 +2790,7 @@ const Po = {
|
|
|
2790
2790
|
return `${r}px`;
|
|
2791
2791
|
}
|
|
2792
2792
|
return Yt;
|
|
2793
|
-
}), i =
|
|
2793
|
+
}), i = I(() => ({
|
|
2794
2794
|
boxSizing: "border-box",
|
|
2795
2795
|
color: a.color,
|
|
2796
2796
|
display: a.display,
|
|
@@ -2798,13 +2798,13 @@ const Po = {
|
|
|
2798
2798
|
lineHeight: "0",
|
|
2799
2799
|
width: t.value
|
|
2800
2800
|
}));
|
|
2801
|
-
return (n, r) => (f(),
|
|
2801
|
+
return (n, r) => (f(), q(Fe(e.as), {
|
|
2802
2802
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2803
2803
|
class: "kui-icon book-icon",
|
|
2804
2804
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2805
|
-
style:
|
|
2805
|
+
style: Qt(i.value)
|
|
2806
2806
|
}, {
|
|
2807
|
-
default:
|
|
2807
|
+
default: b(() => [
|
|
2808
2808
|
(f(), x("svg", {
|
|
2809
2809
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2810
2810
|
"data-testid": "kui-icon-svg-book-icon",
|
|
@@ -2815,14 +2815,14 @@ const Po = {
|
|
|
2815
2815
|
width: "100%",
|
|
2816
2816
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2817
2817
|
}, [
|
|
2818
|
-
e.title ? (f(), x("title",
|
|
2819
|
-
|
|
2818
|
+
e.title ? (f(), x("title", Zo, O(e.title), 1)) : J("", !0),
|
|
2819
|
+
Go
|
|
2820
2820
|
], 8, Yo))
|
|
2821
2821
|
]),
|
|
2822
2822
|
_: 1
|
|
2823
2823
|
}, 8, ["aria-hidden", "style"]));
|
|
2824
2824
|
}
|
|
2825
|
-
}),
|
|
2825
|
+
}), Xo = /* @__PURE__ */ zo(Qo, [["__scopeId", "data-v-dd88a2bb"]]), el = { "data-testid": "config-card-title" }, tl = { class: "config-card-actions" }, al = ["href"], il = {
|
|
2826
2826
|
key: 2,
|
|
2827
2827
|
class: "config-card-details-section"
|
|
2828
2828
|
}, nl = {
|
|
@@ -2922,9 +2922,9 @@ const Po = {
|
|
|
2922
2922
|
label: "YAML",
|
|
2923
2923
|
value: "yaml"
|
|
2924
2924
|
}
|
|
2925
|
-
], d =
|
|
2926
|
-
d.value =
|
|
2927
|
-
},
|
|
2925
|
+
], d = $("structured"), u = (S) => {
|
|
2926
|
+
d.value = S == null ? void 0 : S.value;
|
|
2927
|
+
}, v = {
|
|
2928
2928
|
id: {
|
|
2929
2929
|
type: G.ID,
|
|
2930
2930
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
@@ -2958,212 +2958,212 @@ const Po = {
|
|
|
2958
2958
|
// the last property displayed
|
|
2959
2959
|
section: pe.Basic
|
|
2960
2960
|
}
|
|
2961
|
-
}, y =
|
|
2962
|
-
var
|
|
2961
|
+
}, y = $(!1), _ = $(!1), w = $(""), p = $(), m = I(() => {
|
|
2962
|
+
var S, B, F;
|
|
2963
2963
|
if (!p.value)
|
|
2964
2964
|
return [];
|
|
2965
|
-
const
|
|
2966
|
-
for (const
|
|
2967
|
-
const
|
|
2968
|
-
let ie =
|
|
2969
|
-
(
|
|
2965
|
+
const K = [], R = Object.keys(p.value).length;
|
|
2966
|
+
for (const U in p.value) {
|
|
2967
|
+
const Q = (B = (S = i.configSchema) == null ? void 0 : S[U]) == null ? void 0 : B.order, ee = (F = v[U]) == null ? void 0 : F.order;
|
|
2968
|
+
let ie = R;
|
|
2969
|
+
(ee || ee === 0) && (ie = ee === -1 ? R + 1 : ee), Q && (ie = Q === -1 ? R + 1 : Q), K.push([U, ie]);
|
|
2970
2970
|
}
|
|
2971
|
-
return
|
|
2972
|
-
return
|
|
2973
|
-
}),
|
|
2974
|
-
var
|
|
2975
|
-
const ie =
|
|
2971
|
+
return K.sort(function(U, Q) {
|
|
2972
|
+
return U[1] - Q[1];
|
|
2973
|
+
}), K.map((U) => {
|
|
2974
|
+
var Q, ee;
|
|
2975
|
+
const ie = U[0], te = (Q = p.value) == null ? void 0 : Q[ie], Y = ((ee = i.configSchema) == null ? void 0 : ee[ie]) || {}, ce = v[ie];
|
|
2976
2976
|
return {
|
|
2977
2977
|
key: ie,
|
|
2978
|
-
value:
|
|
2979
|
-
hidden:
|
|
2980
|
-
type:
|
|
2981
|
-
label:
|
|
2982
|
-
tooltip:
|
|
2983
|
-
section:
|
|
2978
|
+
value: te,
|
|
2979
|
+
hidden: Y.hidden || !1,
|
|
2980
|
+
type: Y.type ?? ((ce == null ? void 0 : ce.type) || G.Text),
|
|
2981
|
+
label: Y.label ?? ((ce == null ? void 0 : ce.label) || s(ie)),
|
|
2982
|
+
tooltip: Y.tooltip ?? ((ce == null ? void 0 : ce.tooltip) || void 0),
|
|
2983
|
+
section: Y.section ?? ((ce == null ? void 0 : ce.section) || pe.Advanced)
|
|
2984
2984
|
};
|
|
2985
|
-
}).filter((
|
|
2986
|
-
}),
|
|
2987
|
-
var
|
|
2985
|
+
}).filter((U) => !U.hidden && U.key !== i.pluginConfigKey);
|
|
2986
|
+
}), k = I(() => {
|
|
2987
|
+
var S, B;
|
|
2988
2988
|
if (!p.value || !i.pluginConfigKey)
|
|
2989
2989
|
return [];
|
|
2990
|
-
const
|
|
2991
|
-
for (const
|
|
2992
|
-
const
|
|
2993
|
-
let ie =
|
|
2994
|
-
|
|
2990
|
+
const F = p.value[i.pluginConfigKey] || {}, K = Object.keys(F).length, R = [];
|
|
2991
|
+
for (const U in F) {
|
|
2992
|
+
const Q = (B = (S = i.pluginConfigSchema) == null ? void 0 : S[U]) == null ? void 0 : B.order, ee = F[U];
|
|
2993
|
+
let ie = ee != null && ee !== "" ? K - 1 : K;
|
|
2994
|
+
Q && (ie = Q === -1 ? K + 1 : Q), R.push([U, ie]);
|
|
2995
2995
|
}
|
|
2996
|
-
return
|
|
2997
|
-
return
|
|
2998
|
-
}),
|
|
2999
|
-
var
|
|
3000
|
-
const
|
|
2996
|
+
return R.sort(function(U, Q) {
|
|
2997
|
+
return U[1] - Q[1];
|
|
2998
|
+
}), R.map((U) => {
|
|
2999
|
+
var Q;
|
|
3000
|
+
const ee = U[0], ie = F[ee], te = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[ee]) || {};
|
|
3001
3001
|
return {
|
|
3002
|
-
key:
|
|
3002
|
+
key: ee,
|
|
3003
3003
|
value: ie,
|
|
3004
|
-
hidden:
|
|
3005
|
-
type:
|
|
3006
|
-
label:
|
|
3007
|
-
tooltip:
|
|
3004
|
+
hidden: te.hidden || !1,
|
|
3005
|
+
type: te.type ?? G.Text,
|
|
3006
|
+
label: te.label ?? s(ee),
|
|
3007
|
+
tooltip: te.tooltip ?? void 0,
|
|
3008
3008
|
section: pe.Plugin
|
|
3009
3009
|
};
|
|
3010
|
-
}).filter((
|
|
3011
|
-
}),
|
|
3012
|
-
var
|
|
3010
|
+
}).filter((U) => !U.hidden);
|
|
3011
|
+
}), M = I(() => {
|
|
3012
|
+
var S, B, F, K;
|
|
3013
3013
|
return {
|
|
3014
|
-
basic: (
|
|
3015
|
-
advanced: (B = m.value) == null ? void 0 : B.filter((
|
|
3016
|
-
plugin: (
|
|
3014
|
+
basic: (S = m.value) == null ? void 0 : S.filter((R) => R.section === pe.Basic),
|
|
3015
|
+
advanced: (B = m.value) == null ? void 0 : B.filter((R) => R.section === pe.Advanced),
|
|
3016
|
+
plugin: (K = k.value) == null ? void 0 : K.concat((F = m.value) == null ? void 0 : F.filter((R) => R.section === pe.Plugin))
|
|
3017
3017
|
};
|
|
3018
|
-
}),
|
|
3019
|
-
const
|
|
3020
|
-
return
|
|
3021
|
-
}),
|
|
3022
|
-
var
|
|
3023
|
-
let
|
|
3024
|
-
return i.config.app === "konnect" ?
|
|
3025
|
-
}),
|
|
3026
|
-
p.value &&
|
|
3018
|
+
}), h = I(() => {
|
|
3019
|
+
const S = [];
|
|
3020
|
+
return M.value.basic.length && S.push("basic"), M.value.advanced.length && S.push("advanced"), M.value.plugin.length && S.push("plugin"), S;
|
|
3021
|
+
}), P = (S) => !!(S.tooltip || n[`${S.key}-label-tooltip`]), L = I(() => {
|
|
3022
|
+
var S, B;
|
|
3023
|
+
let F = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3024
|
+
return i.config.app === "konnect" ? F = F.replace(/{controlPlaneId}/gi, ((S = i.config) == null ? void 0 : S.controlPlaneId) || "") : i.config.app === "kongManager" && (F = F.replace(/\/{workspace}/gi, (B = i.config) != null && B.workspace ? `/${i.config.workspace}` : "")), F = F.replace(/{id}/gi, i.config.entityId), F;
|
|
3025
|
+
}), z = (S) => {
|
|
3026
|
+
p.value && S(JSON.stringify(p.value)) ? a("copy:success", p.value) : a("copy:error");
|
|
3027
3027
|
};
|
|
3028
|
-
return ke(y, (
|
|
3029
|
-
a("loading",
|
|
3028
|
+
return ke(y, (S) => {
|
|
3029
|
+
a("loading", S);
|
|
3030
3030
|
}, { immediate: !0 }), tt(async () => {
|
|
3031
|
-
|
|
3031
|
+
_.value = !1, y.value = !0;
|
|
3032
3032
|
try {
|
|
3033
|
-
const { data:
|
|
3033
|
+
const { data: S } = await c.get(L.value);
|
|
3034
3034
|
if (i.dataKey)
|
|
3035
|
-
if (typeof
|
|
3036
|
-
p.value = { ...
|
|
3035
|
+
if (typeof S[i.dataKey] < "u")
|
|
3036
|
+
p.value = { ...S[i.dataKey] };
|
|
3037
3037
|
else
|
|
3038
3038
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3039
3039
|
else
|
|
3040
|
-
p.value = { ...
|
|
3040
|
+
p.value = { ...S };
|
|
3041
3041
|
Object.keys(i.configSchema).filter((B) => i.configSchema[B].forceShow).forEach((B) => {
|
|
3042
3042
|
p.value && typeof p.value[B] > "u" && (p.value[B] = null);
|
|
3043
|
-
}), a("fetch:success",
|
|
3044
|
-
} catch (
|
|
3045
|
-
const B = o(
|
|
3046
|
-
|
|
3043
|
+
}), a("fetch:success", S);
|
|
3044
|
+
} catch (S) {
|
|
3045
|
+
const B = o(S);
|
|
3046
|
+
w.value = B.startsWith("code") ? r("baseConfigCard.errors.load") : B, _.value = !0, a("fetch:error", S);
|
|
3047
3047
|
} finally {
|
|
3048
3048
|
y.value = !1;
|
|
3049
3049
|
}
|
|
3050
|
-
}), (
|
|
3051
|
-
const
|
|
3052
|
-
return f(),
|
|
3053
|
-
actions:
|
|
3054
|
-
|
|
3055
|
-
X(
|
|
3056
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
3050
|
+
}), (S, B) => {
|
|
3051
|
+
const F = N("KLabel"), K = N("KSelect"), R = N("KButton"), U = N("KClipboardProvider"), Q = N("KSkeleton"), ee = N("KEmptyState"), ie = N("KCard");
|
|
3052
|
+
return f(), q(ie, { class: "kong-ui-entity-base-config-card" }, Ie({
|
|
3053
|
+
actions: b(() => [
|
|
3054
|
+
V("div", tl, [
|
|
3055
|
+
X(S.$slots, "actions", {}, void 0, !0),
|
|
3056
|
+
e.config.jsonYamlEnabled ? (f(), q(F, {
|
|
3057
3057
|
key: 0,
|
|
3058
3058
|
class: "config-format-select-label",
|
|
3059
3059
|
"data-testid": "config-format-select-label"
|
|
3060
3060
|
}, {
|
|
3061
|
-
default:
|
|
3062
|
-
|
|
3061
|
+
default: b(() => [
|
|
3062
|
+
ae(O(e.label), 1)
|
|
3063
3063
|
]),
|
|
3064
3064
|
_: 1
|
|
3065
|
-
})) :
|
|
3066
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
3065
|
+
})) : J("", !0),
|
|
3066
|
+
e.config.jsonYamlEnabled ? (f(), q(K, {
|
|
3067
3067
|
key: 1,
|
|
3068
3068
|
appearance: "select",
|
|
3069
3069
|
"data-testid": "select-config-format",
|
|
3070
3070
|
items: l,
|
|
3071
3071
|
onChange: u
|
|
3072
|
-
})) :
|
|
3073
|
-
i.config.jsonYamlEnabled && e.configCardDoc ? (f(),
|
|
3072
|
+
})) : J("", !0),
|
|
3073
|
+
i.config.jsonYamlEnabled && e.configCardDoc ? (f(), q(R, {
|
|
3074
3074
|
key: 2,
|
|
3075
3075
|
appearance: "tertiary",
|
|
3076
3076
|
class: "book-icon",
|
|
3077
3077
|
"data-testid": "book-icon"
|
|
3078
3078
|
}, {
|
|
3079
|
-
default:
|
|
3080
|
-
|
|
3079
|
+
default: b(() => [
|
|
3080
|
+
V("a", {
|
|
3081
3081
|
href: e.configCardDoc,
|
|
3082
3082
|
rel: "noopener",
|
|
3083
3083
|
target: "_blank"
|
|
3084
3084
|
}, [
|
|
3085
|
-
|
|
3085
|
+
j(g(Xo), { size: g(on) }, null, 8, ["size"])
|
|
3086
3086
|
], 8, al)
|
|
3087
3087
|
]),
|
|
3088
3088
|
_: 1
|
|
3089
|
-
})) :
|
|
3090
|
-
e.config.jsonYamlEnabled ?
|
|
3091
|
-
default:
|
|
3092
|
-
!y.value && !
|
|
3089
|
+
})) : J("", !0),
|
|
3090
|
+
e.config.jsonYamlEnabled ? J("", !0) : (f(), q(U, { key: 3 }, {
|
|
3091
|
+
default: b(({ copyToClipboard: te }) => [
|
|
3092
|
+
!y.value && !_.value ? (f(), q(R, {
|
|
3093
3093
|
key: 0,
|
|
3094
3094
|
appearance: "tertiary",
|
|
3095
3095
|
"data-testid": "json-copy-button",
|
|
3096
|
-
onClick: (
|
|
3096
|
+
onClick: (Y) => z(te)
|
|
3097
3097
|
}, {
|
|
3098
|
-
default:
|
|
3099
|
-
|
|
3098
|
+
default: b(() => [
|
|
3099
|
+
ae(O(g(r)("baseConfigCard.actions.copy")), 1)
|
|
3100
3100
|
]),
|
|
3101
3101
|
_: 2
|
|
3102
|
-
}, 1032, ["onClick"])) :
|
|
3102
|
+
}, 1032, ["onClick"])) : J("", !0)
|
|
3103
3103
|
]),
|
|
3104
3104
|
_: 1
|
|
3105
3105
|
}))
|
|
3106
3106
|
])
|
|
3107
3107
|
]),
|
|
3108
|
-
body:
|
|
3109
|
-
y.value ? (f(),
|
|
3108
|
+
body: b(() => [
|
|
3109
|
+
y.value ? (f(), q(Q, {
|
|
3110
3110
|
key: 0,
|
|
3111
3111
|
"data-testid": "config-card-loader",
|
|
3112
3112
|
"table-columns": 2,
|
|
3113
3113
|
type: "table"
|
|
3114
|
-
})) :
|
|
3114
|
+
})) : _.value ? (f(), q(ee, {
|
|
3115
3115
|
key: 1,
|
|
3116
3116
|
"data-testid": "config-card-fetch-error",
|
|
3117
3117
|
"is-error": ""
|
|
3118
3118
|
}, {
|
|
3119
|
-
message:
|
|
3120
|
-
|
|
3119
|
+
message: b(() => [
|
|
3120
|
+
V("h3", null, O(w.value), 1)
|
|
3121
3121
|
]),
|
|
3122
3122
|
_: 1
|
|
3123
|
-
})) :
|
|
3123
|
+
})) : J("", !0),
|
|
3124
3124
|
e.config.jsonYamlEnabled ? (f(), x("div", il, [
|
|
3125
|
-
|
|
3125
|
+
j(Ho, {
|
|
3126
3126
|
format: d.value,
|
|
3127
|
-
"prop-list-types":
|
|
3128
|
-
"property-collections":
|
|
3127
|
+
"prop-list-types": h.value,
|
|
3128
|
+
"property-collections": M.value,
|
|
3129
3129
|
record: p.value
|
|
3130
3130
|
}, Ie({ _: 2 }, [
|
|
3131
|
-
ye(Object.keys(
|
|
3132
|
-
name:
|
|
3133
|
-
fn:
|
|
3134
|
-
X(
|
|
3135
|
-
row:
|
|
3131
|
+
ye(Object.keys(S.$slots), (te) => ({
|
|
3132
|
+
name: te,
|
|
3133
|
+
fn: b(({ row: Y, rowValue: ce }) => [
|
|
3134
|
+
X(S.$slots, te, {
|
|
3135
|
+
row: Y,
|
|
3136
3136
|
rowValue: ce
|
|
3137
3137
|
}, void 0, !0)
|
|
3138
3138
|
])
|
|
3139
3139
|
}))
|
|
3140
3140
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3141
3141
|
])) : (f(), x("div", nl, [
|
|
3142
|
-
(f(!0), x(me, null, ye(
|
|
3143
|
-
key: `config-card-details-${
|
|
3144
|
-
class: xe(`config-card-details-${
|
|
3145
|
-
"data-testid": `config-card-details-${
|
|
3142
|
+
(f(!0), x(me, null, ye(h.value, (te) => (f(), x("div", {
|
|
3143
|
+
key: `config-card-details-${te}-props`,
|
|
3144
|
+
class: xe(`config-card-details-${te}-props`),
|
|
3145
|
+
"data-testid": `config-card-details-${te}-props`
|
|
3146
3146
|
}, [
|
|
3147
|
-
|
|
3148
|
-
(f(!0), x(me, null, ye(
|
|
3149
|
-
key:
|
|
3150
|
-
item:
|
|
3147
|
+
te !== "basic" ? (f(), x("div", ol, O(te === "advanced" ? g(r)("baseConfigCard.sections.advanced") : g(r)("baseConfigCard.sections.plugin")), 1)) : J("", !0),
|
|
3148
|
+
(f(!0), x(me, null, ye(M.value[te], (Y) => (f(), q(Ve, {
|
|
3149
|
+
key: Y.key,
|
|
3150
|
+
item: Y
|
|
3151
3151
|
}, Ie({
|
|
3152
|
-
label:
|
|
3153
|
-
X(
|
|
3152
|
+
label: b(() => [
|
|
3153
|
+
X(S.$slots, `${Y.key}-label`, { row: Y }, void 0, !0)
|
|
3154
3154
|
]),
|
|
3155
|
-
[
|
|
3156
|
-
X(
|
|
3157
|
-
row:
|
|
3155
|
+
[Y.key]: b(({ rowValue: ce }) => [
|
|
3156
|
+
X(S.$slots, Y.key, {
|
|
3157
|
+
row: Y,
|
|
3158
3158
|
rowValue: ce
|
|
3159
3159
|
}, void 0, !0)
|
|
3160
3160
|
]),
|
|
3161
3161
|
_: 2
|
|
3162
3162
|
}, [
|
|
3163
|
-
|
|
3163
|
+
P(Y) ? {
|
|
3164
3164
|
name: "label-tooltip",
|
|
3165
|
-
fn:
|
|
3166
|
-
X(
|
|
3165
|
+
fn: b(() => [
|
|
3166
|
+
X(S.$slots, `${Y.key}-label-tooltip`, { row: Y }, void 0, !0)
|
|
3167
3167
|
]),
|
|
3168
3168
|
key: "0"
|
|
3169
3169
|
} : void 0
|
|
@@ -3175,10 +3175,10 @@ const Po = {
|
|
|
3175
3175
|
}, [
|
|
3176
3176
|
e.hideTitle ? void 0 : {
|
|
3177
3177
|
name: "title",
|
|
3178
|
-
fn:
|
|
3179
|
-
|
|
3180
|
-
X(
|
|
3181
|
-
|
|
3178
|
+
fn: b(() => [
|
|
3179
|
+
V("div", el, [
|
|
3180
|
+
X(S.$slots, "title", {}, () => [
|
|
3181
|
+
ae(O(g(r)("baseConfigCard.title")), 1)
|
|
3182
3182
|
], !0)
|
|
3183
3183
|
])
|
|
3184
3184
|
]),
|
|
@@ -3242,17 +3242,17 @@ const Po = {
|
|
|
3242
3242
|
var t;
|
|
3243
3243
|
const i = e, n = ft(), { i18n: { t: r } } = se.useI18n(), { getMessageFromError: o } = se.useErrors(), { axiosInstance: s } = se.useAxios({
|
|
3244
3244
|
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
3245
|
-
}), c =
|
|
3245
|
+
}), c = $(!1), l = $(!1), d = $(""), u = I(() => i.canSubmit === !1 || i.isReadonly), v = I(() => {
|
|
3246
3246
|
var p, m;
|
|
3247
3247
|
if (!i.editId)
|
|
3248
3248
|
return "";
|
|
3249
|
-
let
|
|
3250
|
-
return i.config.app === "konnect" ?
|
|
3249
|
+
let k = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3250
|
+
return i.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((p = i.config) == null ? void 0 : p.controlPlaneId) || "") : i.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (m = i.config) != null && m.workspace ? `/${i.config.workspace}` : "")), k = k.replace(/{id}/gi, i.editId), k;
|
|
3251
3251
|
}), y = () => {
|
|
3252
|
-
i.config.cancelRoute ? n.push(i.config.cancelRoute) :
|
|
3253
|
-
},
|
|
3252
|
+
i.config.cancelRoute ? n.push(i.config.cancelRoute) : _();
|
|
3253
|
+
}, _ = () => {
|
|
3254
3254
|
a("cancel");
|
|
3255
|
-
},
|
|
3255
|
+
}, w = () => {
|
|
3256
3256
|
u.value || a("submit");
|
|
3257
3257
|
};
|
|
3258
3258
|
return ke(() => c.value, (p) => {
|
|
@@ -3261,7 +3261,7 @@ const Po = {
|
|
|
3261
3261
|
if (i.editId)
|
|
3262
3262
|
try {
|
|
3263
3263
|
l.value = !1, c.value = !0;
|
|
3264
|
-
const { data: p } = await s.get(
|
|
3264
|
+
const { data: p } = await s.get(v.value);
|
|
3265
3265
|
a("fetch:success", p);
|
|
3266
3266
|
} catch (p) {
|
|
3267
3267
|
const m = o(p);
|
|
@@ -3270,57 +3270,57 @@ const Po = {
|
|
|
3270
3270
|
c.value = !1;
|
|
3271
3271
|
}
|
|
3272
3272
|
}), (p, m) => {
|
|
3273
|
-
const
|
|
3274
|
-
return f(), L
|
|
3275
|
-
body:
|
|
3276
|
-
c.value ? (f(),
|
|
3273
|
+
const k = N("KSkeleton"), M = N("KEmptyState"), h = N("KAlert"), P = N("KButton"), L = N("KCard");
|
|
3274
|
+
return f(), q(L, { class: "kong-ui-entity-base-form" }, {
|
|
3275
|
+
body: b(() => [
|
|
3276
|
+
c.value ? (f(), q(k, {
|
|
3277
3277
|
key: 0,
|
|
3278
3278
|
type: "form"
|
|
3279
|
-
})) : l.value ? (f(),
|
|
3279
|
+
})) : l.value ? (f(), q(M, {
|
|
3280
3280
|
key: 1,
|
|
3281
3281
|
"cta-text": g(r)("baseForm.actions.back"),
|
|
3282
3282
|
"data-testid": "form-fetch-error",
|
|
3283
3283
|
"handle-click": y,
|
|
3284
3284
|
"is-error": !0
|
|
3285
3285
|
}, {
|
|
3286
|
-
message:
|
|
3287
|
-
|
|
3286
|
+
message: b(() => [
|
|
3287
|
+
V("h3", null, O(d.value), 1)
|
|
3288
3288
|
]),
|
|
3289
3289
|
_: 1
|
|
3290
3290
|
}, 8, ["cta-text"])) : (f(), x("form", {
|
|
3291
3291
|
key: 2,
|
|
3292
3292
|
"data-testid": "form-content",
|
|
3293
|
-
onReset: We(
|
|
3294
|
-
onSubmit: We(
|
|
3293
|
+
onReset: We(_, ["prevent"]),
|
|
3294
|
+
onSubmit: We(w, ["prevent"])
|
|
3295
3295
|
}, [
|
|
3296
3296
|
X(p.$slots, "default", {}, void 0, !0),
|
|
3297
|
-
e.errorMessage ? (f(),
|
|
3297
|
+
e.errorMessage ? (f(), q(h, {
|
|
3298
3298
|
key: 0,
|
|
3299
3299
|
"alert-message": e.errorMessage,
|
|
3300
3300
|
appearance: "danger",
|
|
3301
3301
|
"data-testid": "form-error"
|
|
3302
|
-
}, null, 8, ["alert-message"])) :
|
|
3303
|
-
|
|
3302
|
+
}, null, 8, ["alert-message"])) : J("", !0),
|
|
3303
|
+
V("div", ul, [
|
|
3304
3304
|
X(p.$slots, "form-actions", {}, () => [
|
|
3305
|
-
|
|
3305
|
+
j(P, {
|
|
3306
3306
|
appearance: "secondary",
|
|
3307
3307
|
"data-testid": "form-cancel",
|
|
3308
3308
|
disabled: e.isReadonly,
|
|
3309
3309
|
type: "reset"
|
|
3310
3310
|
}, {
|
|
3311
|
-
default:
|
|
3312
|
-
|
|
3311
|
+
default: b(() => [
|
|
3312
|
+
ae(O(g(r)("baseForm.actions.cancel")), 1)
|
|
3313
3313
|
]),
|
|
3314
3314
|
_: 1
|
|
3315
3315
|
}, 8, ["disabled"]),
|
|
3316
|
-
|
|
3316
|
+
j(P, {
|
|
3317
3317
|
appearance: "primary",
|
|
3318
3318
|
"data-testid": "form-submit",
|
|
3319
3319
|
disabled: u.value,
|
|
3320
3320
|
type: "submit"
|
|
3321
3321
|
}, {
|
|
3322
|
-
default:
|
|
3323
|
-
|
|
3322
|
+
default: b(() => [
|
|
3323
|
+
ae(O(g(r)("baseForm.actions.save")), 1)
|
|
3324
3324
|
]),
|
|
3325
3325
|
_: 1
|
|
3326
3326
|
}, 8, ["disabled"])
|
|
@@ -3348,43 +3348,43 @@ const Po = {
|
|
|
3348
3348
|
}
|
|
3349
3349
|
},
|
|
3350
3350
|
setup(e) {
|
|
3351
|
-
const a = e, t =
|
|
3352
|
-
var
|
|
3353
|
-
return ((
|
|
3354
|
-
}), i =
|
|
3355
|
-
var
|
|
3356
|
-
return ((
|
|
3357
|
-
}), n =
|
|
3358
|
-
var
|
|
3359
|
-
const m = (
|
|
3351
|
+
const a = e, t = I(() => {
|
|
3352
|
+
var w;
|
|
3353
|
+
return ((w = a.rowEl) == null ? void 0 : w.querySelector(`[data-testid="${a.keyName}"]`)) || null;
|
|
3354
|
+
}), i = I(() => {
|
|
3355
|
+
var w;
|
|
3356
|
+
return ((w = t.value) == null ? void 0 : w.querySelector('[data-testid="first-col"]')) || null;
|
|
3357
|
+
}), n = I(() => {
|
|
3358
|
+
var w, p;
|
|
3359
|
+
const m = (w = a.rowEl) == null ? void 0 : w.querySelectorAll("td");
|
|
3360
3360
|
return m ? ((p = m[0]) == null ? void 0 : p.getAttribute("data-testid")) === a.keyName : !1;
|
|
3361
3361
|
});
|
|
3362
3362
|
let r;
|
|
3363
3363
|
const o = () => {
|
|
3364
3364
|
r && (r.disconnect(), r = void 0);
|
|
3365
3365
|
}, s = () => {
|
|
3366
|
-
var
|
|
3367
|
-
l.value = ((
|
|
3368
|
-
}, c =
|
|
3369
|
-
|
|
3370
|
-
(
|
|
3366
|
+
var w, p, m;
|
|
3367
|
+
l.value = ((w = i.value) == null ? void 0 : w.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((m = c.value) == null ? void 0 : m.innerText) || "";
|
|
3368
|
+
}, c = $({}), l = $(0), d = $(0), u = $(""), v = I(() => [i.value, t.value]), y = ke(
|
|
3369
|
+
v,
|
|
3370
|
+
(w) => {
|
|
3371
3371
|
if (n.value && (o(), "ResizeObserver" in window && window)) {
|
|
3372
3372
|
r = new ResizeObserver((p) => {
|
|
3373
3373
|
window.requestAnimationFrame(() => {
|
|
3374
3374
|
!Array.isArray(p) || !p.length || s();
|
|
3375
3375
|
});
|
|
3376
3376
|
});
|
|
3377
|
-
for (const p of
|
|
3377
|
+
for (const p of w)
|
|
3378
3378
|
p && r.observe(p);
|
|
3379
3379
|
}
|
|
3380
3380
|
},
|
|
3381
3381
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3382
|
-
),
|
|
3382
|
+
), _ = I(() => n.value ? l.value > d.value : !1);
|
|
3383
3383
|
return ti(() => {
|
|
3384
3384
|
s();
|
|
3385
3385
|
}), ai(() => {
|
|
3386
3386
|
y();
|
|
3387
|
-
}), (
|
|
3387
|
+
}), (w, p) => {
|
|
3388
3388
|
const m = N("KTooltip");
|
|
3389
3389
|
return f(), x("span", {
|
|
3390
3390
|
ref_key: "contentRef",
|
|
@@ -3392,17 +3392,17 @@ const Po = {
|
|
|
3392
3392
|
class: "content-wrapper"
|
|
3393
3393
|
}, [
|
|
3394
3394
|
n.value ? (f(), x("span", fl, [
|
|
3395
|
-
|
|
3396
|
-
label:
|
|
3395
|
+
j(m, {
|
|
3396
|
+
label: _.value ? u.value : "",
|
|
3397
3397
|
"max-width": "300",
|
|
3398
3398
|
placement: "bottomStart"
|
|
3399
3399
|
}, {
|
|
3400
|
-
default:
|
|
3401
|
-
X(
|
|
3400
|
+
default: b(() => [
|
|
3401
|
+
X(w.$slots, "default", {}, void 0, !0)
|
|
3402
3402
|
]),
|
|
3403
3403
|
_: 3
|
|
3404
3404
|
}, 8, ["label"])
|
|
3405
|
-
])) : X(
|
|
3405
|
+
])) : X(w.$slots, "default", { key: 1 }, void 0, !0)
|
|
3406
3406
|
], 512);
|
|
3407
3407
|
};
|
|
3408
3408
|
}
|
|
@@ -3468,9 +3468,10 @@ const Po = {
|
|
|
3468
3468
|
},
|
|
3469
3469
|
// error message to show in the error state
|
|
3470
3470
|
// this prop being set (or empty) determines if the KTable is in an error state
|
|
3471
|
+
// please use `TableErrorMessage` since `string` is only for backwards compatibility
|
|
3471
3472
|
errorMessage: {
|
|
3472
|
-
type: String,
|
|
3473
|
-
default:
|
|
3473
|
+
type: [String, Object],
|
|
3474
|
+
default: null
|
|
3474
3475
|
},
|
|
3475
3476
|
disablePaginationPageJump: {
|
|
3476
3477
|
type: Boolean,
|
|
@@ -3518,65 +3519,76 @@ const Po = {
|
|
|
3518
3519
|
},
|
|
3519
3520
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3520
3521
|
setup(e, { emit: a }) {
|
|
3521
|
-
const t = e, { i18n: { t: i } } = se.useI18n(), n =
|
|
3522
|
-
|
|
3523
|
-
return
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3522
|
+
const t = e, { i18n: { t: i } } = se.useI18n(), n = I(() => {
|
|
3523
|
+
var h, P;
|
|
3524
|
+
return typeof t.errorMessage == "string" ? {
|
|
3525
|
+
hasError: !!t.errorMessage,
|
|
3526
|
+
title: t.errorMessage,
|
|
3527
|
+
message: void 0
|
|
3528
|
+
} : {
|
|
3529
|
+
hasError: !!t.errorMessage,
|
|
3530
|
+
title: (h = t.errorMessage) == null ? void 0 : h.title,
|
|
3531
|
+
message: (P = t.errorMessage) == null ? void 0 : P.message
|
|
3532
|
+
};
|
|
3533
|
+
}), r = I(() => t.cacheIdentifier || t.preferencesStorageKey), o = (h) => h.hasData || !!t.query, s = I(() => {
|
|
3534
|
+
const h = [];
|
|
3535
|
+
return Object.keys(t.tableHeaders).forEach((P) => {
|
|
3536
|
+
const L = t.tableHeaders[P];
|
|
3537
|
+
h.push({
|
|
3538
|
+
label: L.label ?? P,
|
|
3539
|
+
key: P,
|
|
3540
|
+
sortable: L.sortable ?? !1
|
|
3529
3541
|
});
|
|
3530
|
-
}), t.enableEntityActions &&
|
|
3542
|
+
}), t.enableEntityActions && h.push({
|
|
3531
3543
|
key: "actions",
|
|
3532
3544
|
hideLabel: !0
|
|
3533
|
-
}),
|
|
3534
|
-
}),
|
|
3535
|
-
"data-rowid":
|
|
3536
|
-
"data-testid":
|
|
3537
|
-
...t.rowAttributes(
|
|
3538
|
-
}),
|
|
3539
|
-
var
|
|
3540
|
-
return (
|
|
3541
|
-
},
|
|
3542
|
-
const
|
|
3543
|
-
"data-testid":
|
|
3544
|
-
...t.cellAttributes(
|
|
3545
|
+
}), h;
|
|
3546
|
+
}), c = (h) => ({
|
|
3547
|
+
"data-rowid": h.id,
|
|
3548
|
+
"data-testid": h.name,
|
|
3549
|
+
...t.rowAttributes(h)
|
|
3550
|
+
}), l = $({}), d = (h) => {
|
|
3551
|
+
var P;
|
|
3552
|
+
return (P = l.value) == null ? void 0 : P.$el.querySelector(`[data-rowid="${h.id}"]`);
|
|
3553
|
+
}, u = (h) => {
|
|
3554
|
+
const P = {
|
|
3555
|
+
"data-testid": h.headerKey,
|
|
3556
|
+
...t.cellAttributes(h)
|
|
3545
3557
|
};
|
|
3546
|
-
return
|
|
3558
|
+
return h.colIndex === 0 && (P.style = {
|
|
3547
3559
|
maxWidth: "250px",
|
|
3548
3560
|
overflowX: "hidden",
|
|
3549
3561
|
textOverflow: "ellipsis"
|
|
3550
|
-
}),
|
|
3551
|
-
},
|
|
3552
|
-
a("empty-state-cta-clicked"),
|
|
3553
|
-
},
|
|
3562
|
+
}), P;
|
|
3563
|
+
}, v = () => {
|
|
3564
|
+
a("empty-state-cta-clicked"), y();
|
|
3565
|
+
}, y = () => {
|
|
3554
3566
|
a("clear-search-input");
|
|
3555
|
-
},
|
|
3556
|
-
a("click:row",
|
|
3557
|
-
}),
|
|
3558
|
-
a("sort",
|
|
3559
|
-
}, { setTablePreferences:
|
|
3560
|
-
const
|
|
3567
|
+
}, _ = I(() => t.disableRowClick ? void 0 : (h, P) => {
|
|
3568
|
+
a("click:row", P);
|
|
3569
|
+
}), w = (h) => {
|
|
3570
|
+
a("sort", h);
|
|
3571
|
+
}, { setTablePreferences: p, getTablePreferences: m } = di(), k = I(() => {
|
|
3572
|
+
const h = m(t.preferencesStorageKey);
|
|
3561
3573
|
return {
|
|
3562
3574
|
...t.initialFetcherParams,
|
|
3563
|
-
...
|
|
3575
|
+
...h
|
|
3564
3576
|
};
|
|
3565
|
-
}),
|
|
3566
|
-
t.preferencesStorageKey &&
|
|
3577
|
+
}), M = (h) => {
|
|
3578
|
+
t.preferencesStorageKey && p(t.preferencesStorageKey, h);
|
|
3567
3579
|
};
|
|
3568
|
-
return (
|
|
3569
|
-
const
|
|
3570
|
-
return f(),
|
|
3580
|
+
return (h, P) => {
|
|
3581
|
+
const L = N("KIcon"), z = N("KButton"), S = N("KDropdown"), B = N("KTable"), F = N("KCard");
|
|
3582
|
+
return f(), q(F, {
|
|
3571
3583
|
class: "kong-ui-entity-base-table",
|
|
3572
3584
|
title: e.title
|
|
3573
3585
|
}, {
|
|
3574
|
-
body:
|
|
3575
|
-
|
|
3586
|
+
body: b(() => [
|
|
3587
|
+
j(B, {
|
|
3576
3588
|
ref_key: "tableRefs",
|
|
3577
|
-
ref:
|
|
3578
|
-
"cache-identifier":
|
|
3579
|
-
"cell-attrs":
|
|
3589
|
+
ref: l,
|
|
3590
|
+
"cache-identifier": r.value,
|
|
3591
|
+
"cell-attrs": u,
|
|
3580
3592
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3581
3593
|
"disable-sorting": e.disableSorting,
|
|
3582
3594
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3587,56 +3599,57 @@ const Po = {
|
|
|
3587
3599
|
"empty-state-message": e.query ? g(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3588
3600
|
"empty-state-title": e.query ? g(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3589
3601
|
"enable-client-sort": e.enableClientSort,
|
|
3590
|
-
"error-state-
|
|
3602
|
+
"error-state-message": n.value.message,
|
|
3603
|
+
"error-state-title": n.value.title,
|
|
3591
3604
|
fetcher: e.fetcher,
|
|
3592
3605
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3593
|
-
"has-error":
|
|
3594
|
-
headers:
|
|
3606
|
+
"has-error": n.value.hasError,
|
|
3607
|
+
headers: s.value,
|
|
3595
3608
|
"hide-pagination-when-optional": "",
|
|
3596
|
-
"initial-fetcher-params":
|
|
3609
|
+
"initial-fetcher-params": k.value,
|
|
3597
3610
|
"is-loading": e.isLoading,
|
|
3598
3611
|
"pagination-type": e.paginationType,
|
|
3599
|
-
"row-attrs":
|
|
3612
|
+
"row-attrs": c,
|
|
3600
3613
|
"search-input": e.query,
|
|
3601
|
-
onKtableEmptyStateCtaClicked:
|
|
3602
|
-
"onRow:click":
|
|
3603
|
-
onSort:
|
|
3604
|
-
"onUpdate:tablePreferences":
|
|
3614
|
+
onKtableEmptyStateCtaClicked: v,
|
|
3615
|
+
"onRow:click": _.value,
|
|
3616
|
+
onSort: P[0] || (P[0] = (K) => w(K)),
|
|
3617
|
+
"onUpdate:tablePreferences": M
|
|
3605
3618
|
}, Ie({
|
|
3606
|
-
toolbar:
|
|
3607
|
-
|
|
3608
|
-
X(
|
|
3609
|
-
|
|
3610
|
-
X(
|
|
3611
|
-
])) :
|
|
3619
|
+
toolbar: b(({ state: K }) => [
|
|
3620
|
+
He(V("div", gl, [
|
|
3621
|
+
X(h.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3622
|
+
h.$slots["toolbar-button"] ? (f(), x("div", hl, [
|
|
3623
|
+
X(h.$slots, "toolbar-button", {}, void 0, !0)
|
|
3624
|
+
])) : J("", !0)
|
|
3612
3625
|
], 512), [
|
|
3613
|
-
[
|
|
3626
|
+
[ze, o(K)]
|
|
3614
3627
|
])
|
|
3615
3628
|
]),
|
|
3616
|
-
actions:
|
|
3617
|
-
|
|
3629
|
+
actions: b(({ row: K, rowKey: R, rowValue: U }) => [
|
|
3630
|
+
V("div", {
|
|
3618
3631
|
class: "actions-container",
|
|
3619
|
-
"data-testid":
|
|
3632
|
+
"data-testid": K.name
|
|
3620
3633
|
}, [
|
|
3621
|
-
|
|
3634
|
+
j(S, {
|
|
3622
3635
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3623
3636
|
width: e.dropdownMenuWidth
|
|
3624
3637
|
}, {
|
|
3625
|
-
items:
|
|
3626
|
-
X(
|
|
3627
|
-
row:
|
|
3628
|
-
rowKey:
|
|
3629
|
-
rowValue:
|
|
3638
|
+
items: b(() => [
|
|
3639
|
+
X(h.$slots, "actions", {
|
|
3640
|
+
row: K,
|
|
3641
|
+
rowKey: R,
|
|
3642
|
+
rowValue: U
|
|
3630
3643
|
}, void 0, !0)
|
|
3631
3644
|
]),
|
|
3632
|
-
default:
|
|
3633
|
-
|
|
3645
|
+
default: b(() => [
|
|
3646
|
+
j(z, {
|
|
3634
3647
|
class: "actions-trigger",
|
|
3635
3648
|
"data-testid": "overflow-actions-button",
|
|
3636
3649
|
size: "small"
|
|
3637
3650
|
}, {
|
|
3638
|
-
icon:
|
|
3639
|
-
|
|
3651
|
+
icon: b(() => [
|
|
3652
|
+
j(L, {
|
|
3640
3653
|
color: g(nn),
|
|
3641
3654
|
icon: "more",
|
|
3642
3655
|
size: "16"
|
|
@@ -3651,33 +3664,33 @@ const Po = {
|
|
|
3651
3664
|
]),
|
|
3652
3665
|
_: 2
|
|
3653
3666
|
}, [
|
|
3654
|
-
ye(e.tableHeaders, (
|
|
3655
|
-
name:
|
|
3656
|
-
fn:
|
|
3657
|
-
|
|
3658
|
-
"key-name": String(
|
|
3659
|
-
"row-el":
|
|
3667
|
+
ye(e.tableHeaders, (K, R) => ({
|
|
3668
|
+
name: R,
|
|
3669
|
+
fn: b(({ row: U, rowKey: Q, rowValue: ee }) => [
|
|
3670
|
+
j(ml, {
|
|
3671
|
+
"key-name": String(R),
|
|
3672
|
+
"row-el": d(U)
|
|
3660
3673
|
}, {
|
|
3661
|
-
default:
|
|
3662
|
-
X(
|
|
3663
|
-
row:
|
|
3664
|
-
rowKey:
|
|
3665
|
-
rowValue:
|
|
3674
|
+
default: b(() => [
|
|
3675
|
+
X(h.$slots, R, {
|
|
3676
|
+
row: U,
|
|
3677
|
+
rowKey: Q,
|
|
3678
|
+
rowValue: ee
|
|
3666
3679
|
}, () => [
|
|
3667
|
-
|
|
3680
|
+
ae(O(ee), 1)
|
|
3668
3681
|
], !0)
|
|
3669
3682
|
]),
|
|
3670
3683
|
_: 2
|
|
3671
3684
|
}, 1032, ["key-name", "row-el"])
|
|
3672
3685
|
])
|
|
3673
3686
|
}))
|
|
3674
|
-
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3687
|
+
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3675
3688
|
]),
|
|
3676
3689
|
_: 3
|
|
3677
3690
|
}, 8, ["title"]);
|
|
3678
3691
|
};
|
|
3679
3692
|
}
|
|
3680
|
-
}), bl = /* @__PURE__ */ Ce(kl, [["__scopeId", "data-v-
|
|
3693
|
+
}), bl = /* @__PURE__ */ Ce(kl, [["__scopeId", "data-v-499a771c"]]), Cl = {
|
|
3681
3694
|
key: 0,
|
|
3682
3695
|
class: "kong-ui-entity-delete-error"
|
|
3683
3696
|
}, wl = {
|
|
@@ -3722,14 +3735,14 @@ const Po = {
|
|
|
3722
3735
|
},
|
|
3723
3736
|
emits: ["cancel", "proceed"],
|
|
3724
3737
|
setup(e, { emit: a }) {
|
|
3725
|
-
const t = e, { i18nT: i } = se.useI18n(), n =
|
|
3738
|
+
const t = e, { i18nT: i } = se.useI18n(), n = I(() => t.needConfirm ? t.entityName : ""), r = () => {
|
|
3726
3739
|
a("cancel");
|
|
3727
3740
|
}, o = () => {
|
|
3728
3741
|
a("proceed");
|
|
3729
3742
|
};
|
|
3730
3743
|
return (s, c) => {
|
|
3731
3744
|
const l = N("KAlert"), d = N("KPrompt");
|
|
3732
|
-
return f(),
|
|
3745
|
+
return f(), q(d, {
|
|
3733
3746
|
"action-button-text": "Yes, delete",
|
|
3734
3747
|
"action-pending": e.actionPending,
|
|
3735
3748
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3740,38 +3753,38 @@ const Po = {
|
|
|
3740
3753
|
onCanceled: r,
|
|
3741
3754
|
onProceed: o
|
|
3742
3755
|
}, {
|
|
3743
|
-
"body-content":
|
|
3756
|
+
"body-content": b(() => [
|
|
3744
3757
|
e.error ? (f(), x("div", Cl, [
|
|
3745
|
-
|
|
3746
|
-
alertMessage:
|
|
3747
|
-
|
|
3758
|
+
j(l, { appearance: "danger" }, {
|
|
3759
|
+
alertMessage: b(() => [
|
|
3760
|
+
ae(O(e.error), 1)
|
|
3748
3761
|
]),
|
|
3749
3762
|
_: 1
|
|
3750
3763
|
})
|
|
3751
|
-
])) :
|
|
3752
|
-
|
|
3764
|
+
])) : J("", !0),
|
|
3765
|
+
j(g(i), {
|
|
3753
3766
|
class: "message",
|
|
3754
3767
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3755
3768
|
tag: "p"
|
|
3756
3769
|
}, Ie({
|
|
3757
|
-
entityType:
|
|
3758
|
-
|
|
3770
|
+
entityType: b(() => [
|
|
3771
|
+
ae(O(t.entityType), 1)
|
|
3759
3772
|
]),
|
|
3760
3773
|
_: 2
|
|
3761
3774
|
}, [
|
|
3762
3775
|
t.entityName ? {
|
|
3763
3776
|
name: "entityName",
|
|
3764
|
-
fn:
|
|
3765
|
-
|
|
3777
|
+
fn: b(() => [
|
|
3778
|
+
V("strong", null, O(t.entityName), 1)
|
|
3766
3779
|
]),
|
|
3767
3780
|
key: "0"
|
|
3768
3781
|
} : void 0
|
|
3769
3782
|
]), 1032, ["keypath"]),
|
|
3770
3783
|
t.description || s.$slots.description ? (f(), x("div", wl, [
|
|
3771
3784
|
X(s.$slots, "description", {}, () => [
|
|
3772
|
-
|
|
3785
|
+
V("p", null, O(t.description), 1)
|
|
3773
3786
|
], !0)
|
|
3774
|
-
])) :
|
|
3787
|
+
])) : J("", !0)
|
|
3775
3788
|
]),
|
|
3776
3789
|
_: 3
|
|
3777
3790
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
@@ -3791,7 +3804,7 @@ const Po = {
|
|
|
3791
3804
|
width: "20",
|
|
3792
3805
|
x: "0",
|
|
3793
3806
|
y: "0"
|
|
3794
|
-
}, xl = ["fill"], Tl = { mask: "url(#mask0_180_20349)" }, jl = ["fill"],
|
|
3807
|
+
}, xl = ["fill"], Tl = { mask: "url(#mask0_180_20349)" }, jl = ["fill"], Zt = /* @__PURE__ */ re({
|
|
3795
3808
|
__name: "IconFilter",
|
|
3796
3809
|
props: {
|
|
3797
3810
|
color: {
|
|
@@ -3801,15 +3814,15 @@ const Po = {
|
|
|
3801
3814
|
},
|
|
3802
3815
|
setup(e) {
|
|
3803
3816
|
return (a, t) => (f(), x("svg", Il, [
|
|
3804
|
-
|
|
3805
|
-
|
|
3817
|
+
V("mask", Al, [
|
|
3818
|
+
V("rect", {
|
|
3806
3819
|
fill: e.color,
|
|
3807
3820
|
height: "20",
|
|
3808
3821
|
width: "20"
|
|
3809
3822
|
}, null, 8, xl)
|
|
3810
3823
|
]),
|
|
3811
|
-
|
|
3812
|
-
|
|
3824
|
+
V("g", Tl, [
|
|
3825
|
+
V("path", {
|
|
3813
3826
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3814
3827
|
fill: e.color
|
|
3815
3828
|
}, null, 8, jl)
|
|
@@ -3819,7 +3832,7 @@ const Po = {
|
|
|
3819
3832
|
}), $l = {
|
|
3820
3833
|
key: 1,
|
|
3821
3834
|
class: "kong-ui-entity-filter"
|
|
3822
|
-
}, Kl = { class: "menu-item-title" },
|
|
3835
|
+
}, Kl = { class: "menu-item-title" }, Ml = { class: "menu-item-indicator" }, Ol = { class: "menu-item-body" }, El = ["for"], Fl = { class: "menu-item-buttons" }, Nl = { class: "filter-clear-button-container" }, Bl = /* @__PURE__ */ re({
|
|
3823
3836
|
__name: "EntityFilter",
|
|
3824
3837
|
props: {
|
|
3825
3838
|
// filter config, either exact match or fuzzy match
|
|
@@ -3839,12 +3852,12 @@ const Po = {
|
|
|
3839
3852
|
},
|
|
3840
3853
|
emits: ["update:modelValue"],
|
|
3841
3854
|
setup(e, { emit: a }) {
|
|
3842
|
-
const t = e, { i18n: { t: i } } = se.useI18n(), n =
|
|
3855
|
+
const t = e, { i18n: { t: i } } = se.useI18n(), n = $(!1), r = $({}), o = I(() => {
|
|
3843
3856
|
const p = [];
|
|
3844
|
-
return new URLSearchParams(t.modelValue).forEach((m,
|
|
3845
|
-
m !== "" && p.push(
|
|
3857
|
+
return new URLSearchParams(t.modelValue).forEach((m, k) => {
|
|
3858
|
+
m !== "" && p.push(k);
|
|
3846
3859
|
}), p;
|
|
3847
|
-
}), s =
|
|
3860
|
+
}), s = I(() => {
|
|
3848
3861
|
const p = t.config.fields;
|
|
3849
3862
|
return Object.keys(p).filter((m) => p[m].searchable).map((m) => ({
|
|
3850
3863
|
label: p[m].label || m,
|
|
@@ -3852,8 +3865,8 @@ const Po = {
|
|
|
3852
3865
|
}));
|
|
3853
3866
|
});
|
|
3854
3867
|
ke(() => t.modelValue, (p) => {
|
|
3855
|
-
r.value = {}, new URLSearchParams(p).forEach((m,
|
|
3856
|
-
r.value[
|
|
3868
|
+
r.value = {}, new URLSearchParams(p).forEach((m, k) => {
|
|
3869
|
+
r.value[k] = m;
|
|
3857
3870
|
});
|
|
3858
3871
|
});
|
|
3859
3872
|
const c = () => {
|
|
@@ -3861,28 +3874,28 @@ const Po = {
|
|
|
3861
3874
|
}, l = (p) => {
|
|
3862
3875
|
a("update:modelValue", p);
|
|
3863
3876
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3864
|
-
var m,
|
|
3865
|
-
return (((
|
|
3866
|
-
value:
|
|
3867
|
-
label:
|
|
3877
|
+
var m, k;
|
|
3878
|
+
return (((k = (m = t.config.schema) == null ? void 0 : m[p]) == null ? void 0 : k.values) ?? []).map((M) => ({
|
|
3879
|
+
value: M,
|
|
3880
|
+
label: M
|
|
3868
3881
|
}));
|
|
3869
|
-
},
|
|
3870
|
-
var m,
|
|
3871
|
-
return ((
|
|
3882
|
+
}, v = (p) => {
|
|
3883
|
+
var m, k;
|
|
3884
|
+
return ((k = (m = t.config.schema) == null ? void 0 : m[p]) == null ? void 0 : k.type) ?? "text";
|
|
3872
3885
|
}, y = (p) => {
|
|
3873
3886
|
r.value = {
|
|
3874
3887
|
...r.value,
|
|
3875
3888
|
[p]: ""
|
|
3876
|
-
},
|
|
3877
|
-
},
|
|
3878
|
-
r.value = {},
|
|
3879
|
-
},
|
|
3880
|
-
const m = Object.keys(r.value).reduce((
|
|
3889
|
+
}, w();
|
|
3890
|
+
}, _ = () => {
|
|
3891
|
+
r.value = {}, w(!0);
|
|
3892
|
+
}, w = (p = !1) => {
|
|
3893
|
+
const m = Object.keys(r.value).reduce((k, M) => (r.value[M] && (k[M] = `${r.value[M]}`), k), {});
|
|
3881
3894
|
p && (n.value = !1), a("update:modelValue", new URLSearchParams(m).toString());
|
|
3882
3895
|
};
|
|
3883
3896
|
return (p, m) => {
|
|
3884
|
-
const
|
|
3885
|
-
return e.config.isExactMatch ? (f(),
|
|
3897
|
+
const k = N("KInput"), M = N("KButton"), h = N("KSelect"), P = N("KMenuItem"), L = N("KMenu");
|
|
3898
|
+
return e.config.isExactMatch ? (f(), q(k, {
|
|
3886
3899
|
key: 0,
|
|
3887
3900
|
autocomplete: "off",
|
|
3888
3901
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3891,90 +3904,90 @@ const Po = {
|
|
|
3891
3904
|
placeholder: e.config.placeholder,
|
|
3892
3905
|
"onUpdate:modelValue": l
|
|
3893
3906
|
}, {
|
|
3894
|
-
before:
|
|
3895
|
-
|
|
3907
|
+
before: b(() => [
|
|
3908
|
+
j(Zt)
|
|
3896
3909
|
]),
|
|
3897
3910
|
_: 1
|
|
3898
3911
|
}, 8, ["model-value", "placeholder"])) : (f(), x("div", $l, [
|
|
3899
|
-
|
|
3912
|
+
j(M, {
|
|
3900
3913
|
appearance: "tertiary",
|
|
3901
3914
|
"data-testid": "filter-button",
|
|
3902
3915
|
onClick: c
|
|
3903
3916
|
}, {
|
|
3904
|
-
default:
|
|
3905
|
-
|
|
3906
|
-
|
|
3917
|
+
default: b(() => [
|
|
3918
|
+
j(Zt),
|
|
3919
|
+
ae(" " + O(g(i)("filter.filterButtonText")) + " " + O(o.value.length > 0 ? `(${o.value.length})` : ""), 1)
|
|
3907
3920
|
]),
|
|
3908
3921
|
_: 1
|
|
3909
3922
|
}),
|
|
3910
|
-
|
|
3923
|
+
He(V("div", {
|
|
3911
3924
|
class: "kong-ui-entity-filter-backdrop",
|
|
3912
3925
|
onClick: c
|
|
3913
3926
|
}, null, 512), [
|
|
3914
|
-
[
|
|
3927
|
+
[ze, n.value]
|
|
3915
3928
|
]),
|
|
3916
|
-
|
|
3917
|
-
body:
|
|
3918
|
-
(f(!0), x(me, null, ye(s.value, (
|
|
3919
|
-
key:
|
|
3920
|
-
"data-testid":
|
|
3929
|
+
He(j(L, { class: "kong-ui-entity-filter-menu" }, {
|
|
3930
|
+
body: b(() => [
|
|
3931
|
+
(f(!0), x(me, null, ye(s.value, (z, S) => (f(), q(P, {
|
|
3932
|
+
key: z.value,
|
|
3933
|
+
"data-testid": z.value,
|
|
3921
3934
|
expandable: "",
|
|
3922
|
-
"last-menu-item":
|
|
3935
|
+
"last-menu-item": S === s.value.length - 1
|
|
3923
3936
|
}, {
|
|
3924
|
-
itemTitle:
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
[
|
|
3937
|
+
itemTitle: b(() => [
|
|
3938
|
+
V("span", Kl, [
|
|
3939
|
+
ae(O(z.label) + " ", 1),
|
|
3940
|
+
He(V("span", Ml, null, 512), [
|
|
3941
|
+
[ze, o.value.includes(z.value)]
|
|
3929
3942
|
])
|
|
3930
3943
|
])
|
|
3931
3944
|
]),
|
|
3932
|
-
itemBody:
|
|
3933
|
-
var B,
|
|
3945
|
+
itemBody: b(() => {
|
|
3946
|
+
var B, F;
|
|
3934
3947
|
return [
|
|
3935
|
-
|
|
3936
|
-
|
|
3948
|
+
V("div", Ol, [
|
|
3949
|
+
V("label", {
|
|
3937
3950
|
class: "menu-item-label",
|
|
3938
|
-
for: d(
|
|
3939
|
-
},
|
|
3940
|
-
((
|
|
3951
|
+
for: d(z.value)
|
|
3952
|
+
}, O(g(i)("filter.fieldLabel")), 9, El),
|
|
3953
|
+
((F = (B = e.config.schema) == null ? void 0 : B[z.value]) == null ? void 0 : F.type) === "select" ? (f(), q(h, {
|
|
3941
3954
|
key: 0,
|
|
3942
|
-
id: d(
|
|
3943
|
-
modelValue: r.value[
|
|
3944
|
-
"onUpdate:modelValue": (
|
|
3955
|
+
id: d(z.value),
|
|
3956
|
+
modelValue: r.value[z.value],
|
|
3957
|
+
"onUpdate:modelValue": (K) => r.value[z.value] = K,
|
|
3945
3958
|
appearance: "select",
|
|
3946
|
-
items: u(
|
|
3959
|
+
items: u(z.value),
|
|
3947
3960
|
placeholder: g(i)("filter.selectPlaceholder")
|
|
3948
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(),
|
|
3961
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(), q(k, {
|
|
3949
3962
|
key: 1,
|
|
3950
|
-
id: d(
|
|
3951
|
-
modelValue: r.value[
|
|
3952
|
-
"onUpdate:modelValue": (
|
|
3963
|
+
id: d(z.value),
|
|
3964
|
+
modelValue: r.value[z.value],
|
|
3965
|
+
"onUpdate:modelValue": (K) => r.value[z.value] = K,
|
|
3953
3966
|
autocomplete: "off",
|
|
3954
3967
|
placeholder: g(i)("filter.inputPlaceholder"),
|
|
3955
|
-
type:
|
|
3968
|
+
type: v(z.value)
|
|
3956
3969
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3957
3970
|
]),
|
|
3958
|
-
|
|
3959
|
-
|
|
3971
|
+
V("div", Fl, [
|
|
3972
|
+
j(M, {
|
|
3960
3973
|
appearance: "tertiary",
|
|
3961
3974
|
"data-testid": "apply-filter",
|
|
3962
3975
|
size: "small",
|
|
3963
|
-
onClick: m[0] || (m[0] = (
|
|
3976
|
+
onClick: m[0] || (m[0] = (K) => w(!0))
|
|
3964
3977
|
}, {
|
|
3965
|
-
default:
|
|
3966
|
-
|
|
3978
|
+
default: b(() => [
|
|
3979
|
+
ae(O(g(i)("filter.applyButtonText")), 1)
|
|
3967
3980
|
]),
|
|
3968
3981
|
_: 1
|
|
3969
3982
|
}),
|
|
3970
|
-
|
|
3983
|
+
j(M, {
|
|
3971
3984
|
appearance: "tertiary",
|
|
3972
3985
|
"data-testid": "clear-filter",
|
|
3973
3986
|
size: "small",
|
|
3974
|
-
onClick: (
|
|
3987
|
+
onClick: (K) => y(z.value)
|
|
3975
3988
|
}, {
|
|
3976
|
-
default:
|
|
3977
|
-
|
|
3989
|
+
default: b(() => [
|
|
3990
|
+
ae(O(g(i)("filter.clearButtonText")), 1)
|
|
3978
3991
|
]),
|
|
3979
3992
|
_: 2
|
|
3980
3993
|
}, 1032, ["onClick"])
|
|
@@ -3984,14 +3997,14 @@ const Po = {
|
|
|
3984
3997
|
_: 2
|
|
3985
3998
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3986
3999
|
]),
|
|
3987
|
-
actionButton:
|
|
3988
|
-
|
|
3989
|
-
|
|
4000
|
+
actionButton: b(() => [
|
|
4001
|
+
V("div", Nl, [
|
|
4002
|
+
j(M, {
|
|
3990
4003
|
size: "small",
|
|
3991
|
-
onClick:
|
|
4004
|
+
onClick: _
|
|
3992
4005
|
}, {
|
|
3993
|
-
default:
|
|
3994
|
-
|
|
4006
|
+
default: b(() => [
|
|
4007
|
+
ae(O(g(i)("filter.clearAllButtonText")), 1)
|
|
3995
4008
|
]),
|
|
3996
4009
|
_: 1
|
|
3997
4010
|
})
|
|
@@ -3999,12 +4012,12 @@ const Po = {
|
|
|
3999
4012
|
]),
|
|
4000
4013
|
_: 1
|
|
4001
4014
|
}, 512), [
|
|
4002
|
-
[
|
|
4015
|
+
[ze, n.value]
|
|
4003
4016
|
])
|
|
4004
4017
|
]));
|
|
4005
4018
|
};
|
|
4006
4019
|
}
|
|
4007
|
-
}),
|
|
4020
|
+
}), ql = /* @__PURE__ */ Ce(Bl, [["__scopeId", "data-v-4ea260f0"]]), Je = /* @__PURE__ */ re({
|
|
4008
4021
|
__name: "PermissionsWrapper",
|
|
4009
4022
|
props: {
|
|
4010
4023
|
/**
|
|
@@ -4026,18 +4039,18 @@ const Po = {
|
|
|
4026
4039
|
}
|
|
4027
4040
|
},
|
|
4028
4041
|
setup(e) {
|
|
4029
|
-
const a = e, t =
|
|
4042
|
+
const a = e, t = $(void 0), i = I(() => t.value === !0 || t.value !== void 0 && a.forceShow === !0);
|
|
4030
4043
|
return ke(() => a.authFunction, async () => {
|
|
4031
4044
|
t.value = await a.authFunction();
|
|
4032
4045
|
}, { immediate: !0 }), (n, r) => i.value ? X(n.$slots, "default", {
|
|
4033
4046
|
key: 0,
|
|
4034
4047
|
isAllowed: t.value
|
|
4035
|
-
}) :
|
|
4048
|
+
}) : J("", !0);
|
|
4036
4049
|
}
|
|
4037
|
-
}),
|
|
4050
|
+
}), Ll = { class: "form-section-wrapper" }, Vl = {
|
|
4038
4051
|
key: 0,
|
|
4039
4052
|
class: "form-section-title"
|
|
4040
|
-
},
|
|
4053
|
+
}, Pl = {
|
|
4041
4054
|
key: 1,
|
|
4042
4055
|
class: "form-section-description"
|
|
4043
4056
|
}, Rl = {
|
|
@@ -4072,29 +4085,29 @@ const Po = {
|
|
|
4072
4085
|
return (t, i) => (f(), x("fieldset", {
|
|
4073
4086
|
class: xe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4074
4087
|
}, [
|
|
4075
|
-
|
|
4076
|
-
e.hideInfoHeader ?
|
|
4088
|
+
V("div", Ll, [
|
|
4089
|
+
e.hideInfoHeader ? J("", !0) : (f(), x("div", {
|
|
4077
4090
|
key: 0,
|
|
4078
4091
|
class: xe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4079
4092
|
}, [
|
|
4080
|
-
e.title ? (f(), x("h4",
|
|
4081
|
-
e.description || g(a).description ? (f(), x("div",
|
|
4093
|
+
e.title ? (f(), x("h4", Vl, O(e.title), 1)) : J("", !0),
|
|
4094
|
+
e.description || g(a).description ? (f(), x("div", Pl, [
|
|
4082
4095
|
X(t.$slots, "description", {}, () => [
|
|
4083
|
-
|
|
4096
|
+
V("p", null, O(e.description), 1)
|
|
4084
4097
|
], !0)
|
|
4085
|
-
])) :
|
|
4098
|
+
])) : J("", !0),
|
|
4086
4099
|
g(a).footer ? (f(), x("div", Rl, [
|
|
4087
4100
|
X(t.$slots, "footer", {}, void 0, !0)
|
|
4088
|
-
])) :
|
|
4101
|
+
])) : J("", !0)
|
|
4089
4102
|
], 2)),
|
|
4090
|
-
|
|
4103
|
+
V("div", Ul, [
|
|
4091
4104
|
X(t.$slots, "default", {}, void 0, !0)
|
|
4092
4105
|
])
|
|
4093
4106
|
])
|
|
4094
4107
|
], 2));
|
|
4095
4108
|
}
|
|
4096
|
-
}),
|
|
4097
|
-
const
|
|
4109
|
+
}), Gt = /* @__PURE__ */ Ce(Dl, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: _t, useDeleteUrlBuilder: Jl, useErrors: Hl, useExternalLinkCreator: fs, useFetchUrlBuilder: ys, useFetcher: zl, useDebouncedFilter: Wl, useStringHelpers: Yl, useHelpers: ms, useGatewayFeatureSupported: gs, useTruncationDetector: hs } = se;
|
|
4110
|
+
const Zl = { class: "kong-ui-entities-keys-list" }, Gl = { key: 1 }, Ql = /* @__PURE__ */ re({
|
|
4098
4111
|
__name: "KeyList",
|
|
4099
4112
|
props: {
|
|
4100
4113
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4138,116 +4151,119 @@ const Gl = { class: "kong-ui-entities-keys-list" }, Zl = { key: 1 }, Xl = /* @__
|
|
|
4138
4151
|
var ce;
|
|
4139
4152
|
const t = e, { i18n: { t: i } } = mt.useI18n(), n = ft(), { axiosInstance: r } = _t({
|
|
4140
4153
|
headers: (ce = t.config) == null ? void 0 : ce.requestHeaders
|
|
4141
|
-
}), o =
|
|
4154
|
+
}), o = $(1), s = I(() => t.config.app !== "kongManager" || !!t.config.disableSorting), c = {
|
|
4142
4155
|
name: { label: i("keys.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4143
4156
|
kid: { label: i("keys.list.table_headers.key_id"), sortable: !0 },
|
|
4144
4157
|
tags: { label: i("keys.list.table_headers.tags") },
|
|
4145
4158
|
id: { label: i("keys.list.table_headers.id"), sortable: !0 }
|
|
4146
|
-
}, l = c, d =
|
|
4147
|
-
var
|
|
4148
|
-
let
|
|
4149
|
-
return t.config.app === "konnect" ?
|
|
4150
|
-
}), u =
|
|
4151
|
-
const
|
|
4152
|
-
if (
|
|
4159
|
+
}, l = c, d = I(() => {
|
|
4160
|
+
var C, A, W, he;
|
|
4161
|
+
let E = `${t.config.apiBaseUrl}${_e.list[t.config.app][t.config.keySetId ? "forKeySet" : "all"]}`;
|
|
4162
|
+
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((C = t.config) == null ? void 0 : C.controlPlaneId) || "").replace(/{keySetId}/gi, ((A = t.config) == null ? void 0 : A.keySetId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (W = t.config) != null && W.workspace ? `/${t.config.workspace}` : "").replace(/{keySetId}/gi, ((he = t.config) == null ? void 0 : he.keySetId) || "")), E;
|
|
4163
|
+
}), u = $(""), v = I(() => {
|
|
4164
|
+
const E = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4165
|
+
if (E)
|
|
4153
4166
|
return {
|
|
4154
|
-
isExactMatch:
|
|
4167
|
+
isExactMatch: E,
|
|
4155
4168
|
placeholder: i("keys.search.placeholder")
|
|
4156
4169
|
};
|
|
4157
|
-
const
|
|
4170
|
+
const C = { name: c.name };
|
|
4158
4171
|
return {
|
|
4159
|
-
isExactMatch:
|
|
4160
|
-
fields:
|
|
4172
|
+
isExactMatch: E,
|
|
4173
|
+
fields: C,
|
|
4161
4174
|
schema: t.config.filterSchema
|
|
4162
4175
|
};
|
|
4163
|
-
}), { fetcher: y, fetcherState:
|
|
4176
|
+
}), { fetcher: y, fetcherState: _ } = zl(t.config, d.value), w = () => {
|
|
4164
4177
|
u.value = "";
|
|
4165
4178
|
}, p = () => {
|
|
4166
4179
|
o.value++;
|
|
4167
|
-
}, m =
|
|
4168
|
-
const
|
|
4169
|
-
if (!
|
|
4170
|
-
|
|
4180
|
+
}, m = $(null), k = (E, C) => {
|
|
4181
|
+
const A = E.id;
|
|
4182
|
+
if (!C(A)) {
|
|
4183
|
+
L(E, "id");
|
|
4171
4184
|
return;
|
|
4172
4185
|
}
|
|
4173
|
-
|
|
4174
|
-
},
|
|
4175
|
-
const
|
|
4176
|
-
if (!
|
|
4186
|
+
P(E, "id");
|
|
4187
|
+
}, M = (E, C) => {
|
|
4188
|
+
const A = JSON.stringify(E);
|
|
4189
|
+
if (!C(A)) {
|
|
4177
4190
|
a("copy:error", {
|
|
4178
|
-
entity:
|
|
4191
|
+
entity: E,
|
|
4179
4192
|
message: i("keys.errors.copy")
|
|
4180
4193
|
});
|
|
4181
4194
|
return;
|
|
4182
4195
|
}
|
|
4183
4196
|
a("copy:success", {
|
|
4184
|
-
entity:
|
|
4197
|
+
entity: E,
|
|
4185
4198
|
message: i("keys.copy.success_brief")
|
|
4186
4199
|
});
|
|
4187
|
-
},
|
|
4188
|
-
const { type:
|
|
4189
|
-
|
|
4190
|
-
},
|
|
4200
|
+
}, h = (E, C, A) => {
|
|
4201
|
+
const { type: W } = E;
|
|
4202
|
+
W === "success" ? P(C, A) : L(C, A);
|
|
4203
|
+
}, P = (E, C) => {
|
|
4191
4204
|
a("copy:success", {
|
|
4192
|
-
entity:
|
|
4193
|
-
field:
|
|
4194
|
-
message: i("keys.copy.success", { val:
|
|
4205
|
+
entity: E,
|
|
4206
|
+
field: C,
|
|
4207
|
+
message: i("keys.copy.success", { val: E[C] })
|
|
4195
4208
|
});
|
|
4196
|
-
},
|
|
4209
|
+
}, L = (E, C) => {
|
|
4197
4210
|
a("copy:error", {
|
|
4198
|
-
entity:
|
|
4199
|
-
field:
|
|
4211
|
+
entity: E,
|
|
4212
|
+
field: C,
|
|
4200
4213
|
message: i("keys.errors.copy")
|
|
4201
4214
|
});
|
|
4202
|
-
},
|
|
4203
|
-
var
|
|
4204
|
-
await ((
|
|
4205
|
-
},
|
|
4215
|
+
}, z = async (E) => {
|
|
4216
|
+
var A;
|
|
4217
|
+
await ((A = t.canRetrieve) == null ? void 0 : A.call(t, E)) && n.push(t.config.getViewRoute(E.id));
|
|
4218
|
+
}, S = (E) => ({
|
|
4206
4219
|
label: i("keys.actions.view"),
|
|
4207
|
-
to: t.config.getViewRoute(
|
|
4208
|
-
}), B = (
|
|
4220
|
+
to: t.config.getViewRoute(E)
|
|
4221
|
+
}), B = (E) => ({
|
|
4209
4222
|
label: i("keys.actions.edit"),
|
|
4210
|
-
to: t.config.getEditRoute(
|
|
4211
|
-
}),
|
|
4212
|
-
|
|
4223
|
+
to: t.config.getEditRoute(E)
|
|
4224
|
+
}), F = $(void 0), K = $(!1), R = $(!1), U = $(""), Q = Jl(t.config, d.value), ee = (E) => {
|
|
4225
|
+
F.value = E, K.value = !0;
|
|
4213
4226
|
}, ie = () => {
|
|
4214
|
-
|
|
4215
|
-
},
|
|
4216
|
-
var
|
|
4217
|
-
if ((
|
|
4218
|
-
|
|
4227
|
+
K.value = !1;
|
|
4228
|
+
}, te = async () => {
|
|
4229
|
+
var E, C, A;
|
|
4230
|
+
if ((E = F.value) != null && E.id) {
|
|
4231
|
+
R.value = !0;
|
|
4219
4232
|
try {
|
|
4220
|
-
await r.delete(
|
|
4221
|
-
} catch (
|
|
4222
|
-
|
|
4233
|
+
await r.delete(Q(F.value.id)), R.value = !1, K.value = !1, o.value++, a("delete:success", F.value);
|
|
4234
|
+
} catch (W) {
|
|
4235
|
+
U.value = ((A = (C = W.response) == null ? void 0 : C.data) == null ? void 0 : A.message) || W.message || i("keys.errors.delete"), a("error", W);
|
|
4223
4236
|
} finally {
|
|
4224
|
-
|
|
4237
|
+
R.value = !1;
|
|
4225
4238
|
}
|
|
4226
4239
|
}
|
|
4227
4240
|
};
|
|
4228
|
-
ke(
|
|
4229
|
-
|
|
4230
|
-
|
|
4241
|
+
ke(_, (E) => {
|
|
4242
|
+
var C, A, W;
|
|
4243
|
+
if (E.status === je.Error) {
|
|
4244
|
+
m.value = {
|
|
4245
|
+
title: i("keys.errors.general")
|
|
4246
|
+
}, (W = (A = (C = E.error) == null ? void 0 : C.response) == null ? void 0 : A.data) != null && W.message && (m.value.message = E.error.response.data.message), a("error", E.error);
|
|
4231
4247
|
return;
|
|
4232
4248
|
}
|
|
4233
|
-
m.value =
|
|
4249
|
+
m.value = null;
|
|
4234
4250
|
});
|
|
4235
|
-
const
|
|
4251
|
+
const Y = $({
|
|
4236
4252
|
ctaPath: t.config.createRoute,
|
|
4237
4253
|
ctaText: void 0,
|
|
4238
4254
|
message: i("keys.list.empty_state.description"),
|
|
4239
4255
|
title: i("keys.title")
|
|
4240
4256
|
});
|
|
4241
4257
|
return tt(async () => {
|
|
4242
|
-
await t.canCreate() && (
|
|
4243
|
-
}), (
|
|
4244
|
-
const
|
|
4245
|
-
return f(), x("div",
|
|
4246
|
-
|
|
4258
|
+
await t.canCreate() && (Y.value.title = i("keys.list.empty_state.title"), Y.value.ctaText = i("keys.actions.create"));
|
|
4259
|
+
}), (E, C) => {
|
|
4260
|
+
const A = N("KButton"), W = N("CopyUuid"), he = N("KBadge"), be = N("KTruncate"), D = N("KDropdownItem"), Be = N("KClipboardProvider");
|
|
4261
|
+
return f(), x("div", Zl, [
|
|
4262
|
+
j(g(bl), {
|
|
4247
4263
|
"cache-identifier": e.cacheIdentifier,
|
|
4248
4264
|
"disable-pagination-page-jump": "",
|
|
4249
4265
|
"disable-sorting": s.value,
|
|
4250
|
-
"empty-state-options":
|
|
4266
|
+
"empty-state-options": Y.value,
|
|
4251
4267
|
"enable-entity-actions": "",
|
|
4252
4268
|
"error-message": m.value,
|
|
4253
4269
|
fetcher: g(y),
|
|
@@ -4256,30 +4272,30 @@ const Gl = { class: "kong-ui-entities-keys-list" }, Zl = { key: 1 }, Xl = /* @__
|
|
|
4256
4272
|
"preferences-storage-key": "kong-ui-entities-keys-list",
|
|
4257
4273
|
query: u.value,
|
|
4258
4274
|
"table-headers": g(l),
|
|
4259
|
-
onClearSearchInput:
|
|
4260
|
-
"onClick:row":
|
|
4275
|
+
onClearSearchInput: w,
|
|
4276
|
+
"onClick:row": C[2] || (C[2] = (Z) => z(Z)),
|
|
4261
4277
|
onSort: p
|
|
4262
4278
|
}, {
|
|
4263
|
-
"toolbar-filter":
|
|
4264
|
-
|
|
4279
|
+
"toolbar-filter": b(() => [
|
|
4280
|
+
j(g(ql), {
|
|
4265
4281
|
modelValue: u.value,
|
|
4266
|
-
"onUpdate:modelValue":
|
|
4267
|
-
config:
|
|
4282
|
+
"onUpdate:modelValue": C[0] || (C[0] = (Z) => u.value = Z),
|
|
4283
|
+
config: v.value
|
|
4268
4284
|
}, null, 8, ["modelValue", "config"])
|
|
4269
4285
|
]),
|
|
4270
|
-
"toolbar-button":
|
|
4271
|
-
|
|
4286
|
+
"toolbar-button": b(() => [
|
|
4287
|
+
j(g(Je), {
|
|
4272
4288
|
"auth-function": () => e.canCreate()
|
|
4273
4289
|
}, {
|
|
4274
|
-
default:
|
|
4275
|
-
|
|
4290
|
+
default: b(() => [
|
|
4291
|
+
j(A, {
|
|
4276
4292
|
appearance: "primary",
|
|
4277
4293
|
"data-testid": "toolbar-add-key",
|
|
4278
4294
|
icon: "plus",
|
|
4279
4295
|
to: e.config.createRoute
|
|
4280
4296
|
}, {
|
|
4281
|
-
default:
|
|
4282
|
-
|
|
4297
|
+
default: b(() => [
|
|
4298
|
+
ae(O(g(i)("keys.list.toolbar_actions.new_key")), 1)
|
|
4283
4299
|
]),
|
|
4284
4300
|
_: 1
|
|
4285
4301
|
}, 8, ["to"])
|
|
@@ -4287,102 +4303,102 @@ const Gl = { class: "kong-ui-entities-keys-list" }, Zl = { key: 1 }, Xl = /* @__
|
|
|
4287
4303
|
_: 1
|
|
4288
4304
|
}, 8, ["auth-function"])
|
|
4289
4305
|
]),
|
|
4290
|
-
name:
|
|
4291
|
-
|
|
4306
|
+
name: b(({ rowValue: Z }) => [
|
|
4307
|
+
V("b", null, O(Z ?? "-"), 1)
|
|
4292
4308
|
]),
|
|
4293
|
-
kid:
|
|
4294
|
-
|
|
4295
|
-
notify: (ve) =>
|
|
4309
|
+
kid: b(({ row: Z, rowValue: le }) => [
|
|
4310
|
+
j(W, {
|
|
4311
|
+
notify: (ve) => h(ve, Z, "kid"),
|
|
4296
4312
|
uuid: le
|
|
4297
4313
|
}, null, 8, ["notify", "uuid"])
|
|
4298
4314
|
]),
|
|
4299
|
-
tags:
|
|
4300
|
-
(
|
|
4301
|
-
default:
|
|
4302
|
-
(f(!0), x(me, null, ye(
|
|
4315
|
+
tags: b(({ rowValue: Z }) => [
|
|
4316
|
+
(Z == null ? void 0 : Z.length) > 0 ? (f(), q(be, { key: 0 }, {
|
|
4317
|
+
default: b(() => [
|
|
4318
|
+
(f(!0), x(me, null, ye(Z, (le) => (f(), q(he, {
|
|
4303
4319
|
key: le,
|
|
4304
|
-
onClick:
|
|
4320
|
+
onClick: C[1] || (C[1] = We(() => {
|
|
4305
4321
|
}, ["stop"]))
|
|
4306
4322
|
}, {
|
|
4307
|
-
default:
|
|
4308
|
-
|
|
4323
|
+
default: b(() => [
|
|
4324
|
+
ae(O(le), 1)
|
|
4309
4325
|
]),
|
|
4310
4326
|
_: 2
|
|
4311
4327
|
}, 1024))), 128))
|
|
4312
4328
|
]),
|
|
4313
4329
|
_: 2
|
|
4314
|
-
}, 1024)) : (f(), x("span",
|
|
4330
|
+
}, 1024)) : (f(), x("span", Gl, "-"))
|
|
4315
4331
|
]),
|
|
4316
|
-
id:
|
|
4317
|
-
|
|
4318
|
-
notify: (ve) =>
|
|
4332
|
+
id: b(({ row: Z, rowValue: le }) => [
|
|
4333
|
+
j(W, {
|
|
4334
|
+
notify: (ve) => h(ve, Z, "id"),
|
|
4319
4335
|
uuid: le
|
|
4320
4336
|
}, null, 8, ["notify", "uuid"])
|
|
4321
4337
|
]),
|
|
4322
|
-
actions:
|
|
4323
|
-
|
|
4324
|
-
default:
|
|
4325
|
-
|
|
4338
|
+
actions: b(({ row: Z }) => [
|
|
4339
|
+
j(Be, null, {
|
|
4340
|
+
default: b(({ copyToClipboard: le }) => [
|
|
4341
|
+
j(D, {
|
|
4326
4342
|
"data-testid": "action-entity-copy-id",
|
|
4327
|
-
onClick: (ve) =>
|
|
4343
|
+
onClick: (ve) => k(Z, le)
|
|
4328
4344
|
}, {
|
|
4329
|
-
default:
|
|
4330
|
-
|
|
4345
|
+
default: b(() => [
|
|
4346
|
+
ae(O(g(i)("keys.actions.copy_id")), 1)
|
|
4331
4347
|
]),
|
|
4332
4348
|
_: 2
|
|
4333
4349
|
}, 1032, ["onClick"])
|
|
4334
4350
|
]),
|
|
4335
4351
|
_: 2
|
|
4336
4352
|
}, 1024),
|
|
4337
|
-
|
|
4338
|
-
default:
|
|
4339
|
-
|
|
4353
|
+
j(Be, null, {
|
|
4354
|
+
default: b(({ copyToClipboard: le }) => [
|
|
4355
|
+
j(D, {
|
|
4340
4356
|
"data-testid": "action-entity-copy-json",
|
|
4341
|
-
onClick: (ve) =>
|
|
4357
|
+
onClick: (ve) => M(Z, le)
|
|
4342
4358
|
}, {
|
|
4343
|
-
default:
|
|
4344
|
-
|
|
4359
|
+
default: b(() => [
|
|
4360
|
+
ae(O(g(i)("keys.actions.copy_json")), 1)
|
|
4345
4361
|
]),
|
|
4346
4362
|
_: 2
|
|
4347
4363
|
}, 1032, ["onClick"])
|
|
4348
4364
|
]),
|
|
4349
4365
|
_: 2
|
|
4350
4366
|
}, 1024),
|
|
4351
|
-
|
|
4352
|
-
"auth-function": () => e.canRetrieve(
|
|
4367
|
+
j(g(Je), {
|
|
4368
|
+
"auth-function": () => e.canRetrieve(Z)
|
|
4353
4369
|
}, {
|
|
4354
|
-
default:
|
|
4355
|
-
|
|
4370
|
+
default: b(() => [
|
|
4371
|
+
j(D, {
|
|
4356
4372
|
"data-testid": "action-entity-view",
|
|
4357
4373
|
"has-divider": "",
|
|
4358
|
-
item:
|
|
4374
|
+
item: S(Z.id)
|
|
4359
4375
|
}, null, 8, ["item"])
|
|
4360
4376
|
]),
|
|
4361
4377
|
_: 2
|
|
4362
4378
|
}, 1032, ["auth-function"]),
|
|
4363
|
-
|
|
4364
|
-
"auth-function": () => e.canEdit(
|
|
4379
|
+
j(g(Je), {
|
|
4380
|
+
"auth-function": () => e.canEdit(Z)
|
|
4365
4381
|
}, {
|
|
4366
|
-
default:
|
|
4367
|
-
|
|
4382
|
+
default: b(() => [
|
|
4383
|
+
j(D, {
|
|
4368
4384
|
"data-testid": "action-entity-edit",
|
|
4369
|
-
item: B(
|
|
4385
|
+
item: B(Z.id)
|
|
4370
4386
|
}, null, 8, ["item"])
|
|
4371
4387
|
]),
|
|
4372
4388
|
_: 2
|
|
4373
4389
|
}, 1032, ["auth-function"]),
|
|
4374
|
-
|
|
4375
|
-
"auth-function": () => e.canDelete(
|
|
4390
|
+
j(g(Je), {
|
|
4391
|
+
"auth-function": () => e.canDelete(Z)
|
|
4376
4392
|
}, {
|
|
4377
|
-
default:
|
|
4378
|
-
|
|
4393
|
+
default: b(() => [
|
|
4394
|
+
j(D, {
|
|
4379
4395
|
danger: "",
|
|
4380
4396
|
"data-testid": "action-entity-delete",
|
|
4381
4397
|
"has-divider": "",
|
|
4382
|
-
onClick: (le) =>
|
|
4398
|
+
onClick: (le) => ee(Z)
|
|
4383
4399
|
}, {
|
|
4384
|
-
default:
|
|
4385
|
-
|
|
4400
|
+
default: b(() => [
|
|
4401
|
+
ae(O(g(i)("keys.actions.delete")), 1)
|
|
4386
4402
|
]),
|
|
4387
4403
|
_: 2
|
|
4388
4404
|
}, 1032, ["onClick"])
|
|
@@ -4392,28 +4408,28 @@ const Gl = { class: "kong-ui-entities-keys-list" }, Zl = { key: 1 }, Xl = /* @__
|
|
|
4392
4408
|
]),
|
|
4393
4409
|
_: 1
|
|
4394
4410
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4395
|
-
|
|
4396
|
-
"action-pending":
|
|
4411
|
+
j(g(_l), {
|
|
4412
|
+
"action-pending": R.value,
|
|
4397
4413
|
description: g(i)("keys.delete.description"),
|
|
4398
|
-
"entity-name":
|
|
4414
|
+
"entity-name": F.value && (F.value.name || F.value.id),
|
|
4399
4415
|
"entity-type": g(aa).Key,
|
|
4400
|
-
error:
|
|
4416
|
+
error: U.value,
|
|
4401
4417
|
"need-confirm": !1,
|
|
4402
4418
|
title: g(i)("keys.delete.title"),
|
|
4403
|
-
visible:
|
|
4419
|
+
visible: K.value,
|
|
4404
4420
|
onCancel: ie,
|
|
4405
|
-
onProceed:
|
|
4421
|
+
onProceed: te
|
|
4406
4422
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
4407
4423
|
]);
|
|
4408
4424
|
};
|
|
4409
4425
|
}
|
|
4410
4426
|
});
|
|
4411
|
-
const
|
|
4427
|
+
const Ga = (e, a) => {
|
|
4412
4428
|
const t = e.__vccOpts || e;
|
|
4413
4429
|
for (const [i, n] of a)
|
|
4414
4430
|
t[i] = n;
|
|
4415
4431
|
return t;
|
|
4416
|
-
}, vs = /* @__PURE__ */
|
|
4432
|
+
}, vs = /* @__PURE__ */ Ga(Ql, [["__scopeId", "data-v-76bcce20"]]), Xl = { class: "kong-ui-entities-keys-form" }, es = { "data-testid": "no-search-results" }, ts = { class: "select-item-label" }, as = { class: "select-item-desc" }, is = {
|
|
4417
4433
|
key: 0,
|
|
4418
4434
|
class: "invalid-key-set-message",
|
|
4419
4435
|
"data-testid": "invalid-key-set-message"
|
|
@@ -4447,10 +4463,10 @@ const Za = (e, a) => {
|
|
|
4447
4463
|
},
|
|
4448
4464
|
emits: ["update", "error", "loading"],
|
|
4449
4465
|
setup(e, { emit: a }) {
|
|
4450
|
-
var
|
|
4451
|
-
const t = e, i = ft(), { i18n: { t: n } } = mt.useI18n(), { getMessageFromError: r } =
|
|
4452
|
-
headers: (
|
|
4453
|
-
}), s =
|
|
4466
|
+
var E;
|
|
4467
|
+
const t = e, i = ft(), { i18n: { t: n } } = mt.useI18n(), { getMessageFromError: r } = Hl(), { axiosInstance: o } = _t({
|
|
4468
|
+
headers: (E = t.config) == null ? void 0 : E.requestHeaders
|
|
4469
|
+
}), s = I(() => t.keySetId ? _e.form[t.config.app].edit.forKeySet.replace(/{keySetId}/gi, t.keySetId) : _e.form[t.config.app].edit.all), c = I(() => t.keyId ? qe.Edit : qe.Create), l = It({
|
|
4454
4470
|
fields: {
|
|
4455
4471
|
name: "",
|
|
4456
4472
|
tags: "",
|
|
@@ -4481,35 +4497,35 @@ const Za = (e, a) => {
|
|
|
4481
4497
|
label: n("keys.form.fields.key_format.options.pem"),
|
|
4482
4498
|
value: "pem"
|
|
4483
4499
|
}
|
|
4484
|
-
],
|
|
4485
|
-
ke(() => t.fixedKeySetId, (
|
|
4486
|
-
c.value ===
|
|
4500
|
+
], v = I(() => l.isReadonly || c.value === qe.Create && !!t.fixedKeySetId), y = I(() => !v.value);
|
|
4501
|
+
ke(() => t.fixedKeySetId, (C) => {
|
|
4502
|
+
c.value === qe.Create && (l.fields.key_set = C);
|
|
4487
4503
|
}, { immediate: !0 });
|
|
4488
|
-
const
|
|
4489
|
-
var
|
|
4490
|
-
l.fields.key_id = (
|
|
4504
|
+
const _ = I(() => JSON.stringify(l.fields) !== JSON.stringify(d) && !!l.fields.key_id && !!l.fields.key_format && (l.fields.key_format === "jwk" && !!l.fields.jwk || l.fields.key_format === "pem" && !!l.fields.private_key && !!l.fields.public_key)), w = (C) => {
|
|
4505
|
+
var A, W, he, be;
|
|
4506
|
+
l.fields.key_id = (C == null ? void 0 : C.kid) || "", l.fields.name = (C == null ? void 0 : C.name) || "", l.fields.tags = ((A = C == null ? void 0 : C.tags) == null ? void 0 : A.join(", ")) || "", l.fields.key_set = ((W = C == null ? void 0 : C.set) == null ? void 0 : W.id) || "", l.fields.key_format = C != null && C.pem ? "pem" : "jwk", l.fields.jwk = (C == null ? void 0 : C.jwk) || "", l.fields.private_key = ((he = C == null ? void 0 : C.pem) == null ? void 0 : he.private_key) || "", l.fields.public_key = ((be = C == null ? void 0 : C.pem) == null ? void 0 : be.public_key) || "", l.fields.key_set && (F.value = !1), Object.assign(d, l.fields);
|
|
4491
4507
|
}, p = () => {
|
|
4492
4508
|
i.push(t.config.cancelRoute);
|
|
4493
|
-
}, m =
|
|
4494
|
-
var
|
|
4495
|
-
let
|
|
4496
|
-
return t.config.app === "konnect" ?
|
|
4497
|
-
}),
|
|
4498
|
-
var
|
|
4509
|
+
}, m = I(() => {
|
|
4510
|
+
var A, W;
|
|
4511
|
+
let C = `${t.config.apiBaseUrl}${_e.form[t.config.app][c.value][t.keySetId ? "forKeySet" : "all"]}`;
|
|
4512
|
+
return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((A = t.config) == null ? void 0 : A.controlPlaneId) || "") : t.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (W = t.config) != null && W.workspace ? `/${t.config.workspace}` : "")), C = C.replace(/{id}/gi, t.keyId).replace(/{keySetId}/gi, t.keySetId || ""), C;
|
|
4513
|
+
}), k = async () => {
|
|
4514
|
+
var C, A, W, he, be, D, Be, Z;
|
|
4499
4515
|
try {
|
|
4500
4516
|
l.isReadonly = !0;
|
|
4501
4517
|
const le = {
|
|
4502
4518
|
kid: l.fields.key_id,
|
|
4503
4519
|
name: l.fields.name || null,
|
|
4504
|
-
tags: ((
|
|
4520
|
+
tags: ((W = (A = (C = l.fields.tags) == null ? void 0 : C.split(",")) == null ? void 0 : A.map((H) => String(H || "").trim())) == null ? void 0 : W.filter((H) => H !== "")) || [],
|
|
4505
4521
|
set: l.fields.key_set ? { id: l.fields.key_set } : null,
|
|
4506
4522
|
jwk: l.fields.key_format === "jwk" ? l.fields.jwk : null,
|
|
4507
4523
|
pem: l.fields.key_format === "pem" ? { private_key: l.fields.private_key, public_key: l.fields.public_key } : null
|
|
4508
4524
|
};
|
|
4509
4525
|
let ve;
|
|
4510
4526
|
if (c.value === "create" ? ve = await o.post(m.value, le) : c.value === "edit" && (ve = ((he = t.config) == null ? void 0 : he.app) === "konnect" ? await o.put(m.value, le) : await o.patch(m.value, le)), ve) {
|
|
4511
|
-
const { data:
|
|
4512
|
-
l.fields.key_id = (
|
|
4527
|
+
const { data: H } = ve;
|
|
4528
|
+
l.fields.key_id = (H == null ? void 0 : H.kid) || "", l.fields.name = (H == null ? void 0 : H.name) || "", l.fields.tags = ((be = H == null ? void 0 : H.tags) == null ? void 0 : be.join(", ")) || "", l.fields.key_set = ((D = H == null ? void 0 : H.set) == null ? void 0 : D.id) || "", l.fields.key_format = H != null && H.pem ? "pem" : "jwk", l.fields.jwk = (H == null ? void 0 : H.jwk) || "", l.fields.private_key = ((Be = H == null ? void 0 : H.pem) == null ? void 0 : Be.private_key) || "", l.fields.public_key = ((Z = H == null ? void 0 : H.pem) == null ? void 0 : Z.public_key) || "", Object.assign(d, l.fields), a("update", ve == null ? void 0 : ve.data);
|
|
4513
4529
|
}
|
|
4514
4530
|
} catch (le) {
|
|
4515
4531
|
l.errorMessage = r(le), a("error", le);
|
|
@@ -4517,65 +4533,65 @@ const Za = (e, a) => {
|
|
|
4517
4533
|
l.isReadonly = !1;
|
|
4518
4534
|
}
|
|
4519
4535
|
}, {
|
|
4520
|
-
debouncedQueryChange:
|
|
4521
|
-
loading:
|
|
4522
|
-
allRecords:
|
|
4523
|
-
error:
|
|
4524
|
-
validationError:
|
|
4525
|
-
loadItems:
|
|
4536
|
+
debouncedQueryChange: M,
|
|
4537
|
+
loading: h,
|
|
4538
|
+
allRecords: P,
|
|
4539
|
+
error: L,
|
|
4540
|
+
validationError: z,
|
|
4541
|
+
loadItems: S,
|
|
4526
4542
|
results: B
|
|
4527
4543
|
} = Wl(t.config, _e.form[t.config.app].keySets, void 0, {
|
|
4528
4544
|
fetchedItemsKey: "data",
|
|
4529
4545
|
searchKeys: ["id", "name"]
|
|
4530
|
-
}),
|
|
4531
|
-
|
|
4532
|
-
},
|
|
4533
|
-
if (
|
|
4546
|
+
}), F = $(!0), K = (C) => {
|
|
4547
|
+
F.value = !C, (!C || C !== l.fields.key_set && C !== d.key_set) && M(C);
|
|
4548
|
+
}, R = I(() => L.value ? n("keys.errors.key_sets.fetch") : ""), U = I(() => z.value ? n("keys.errors.key_sets.invalid") : ""), Q = $(0), ee = I(() => P.value === void 0), ie = I(() => {
|
|
4549
|
+
if (ee.value)
|
|
4534
4550
|
return t.config.app === "konnect" ? n("keys.form.fields.key_set.footer") : void 0;
|
|
4535
|
-
}),
|
|
4536
|
-
name:
|
|
4551
|
+
}), te = $(/* @__PURE__ */ new Set()), Y = I(() => Array.from(te.value).map((A) => ({
|
|
4552
|
+
name: A.name || "",
|
|
4537
4553
|
// can't use name for label or it tries to search => 404
|
|
4538
4554
|
label: "",
|
|
4539
4555
|
// leave it blank so no flicker when used with selected-item-template
|
|
4540
|
-
value:
|
|
4541
|
-
selected: l.fields.key_set ===
|
|
4542
|
-
}))), ce = (
|
|
4543
|
-
|
|
4544
|
-
let
|
|
4545
|
-
for (
|
|
4546
|
-
|
|
4556
|
+
value: A.id,
|
|
4557
|
+
selected: l.fields.key_set === A.id
|
|
4558
|
+
}))), ce = (C) => {
|
|
4559
|
+
te.value.clear();
|
|
4560
|
+
let A;
|
|
4561
|
+
for (A of C)
|
|
4562
|
+
te.value.add(A);
|
|
4547
4563
|
};
|
|
4548
|
-
return ke(B, (
|
|
4549
|
-
ce(
|
|
4550
|
-
}, { immediate: !0, deep: !0 }), ke(
|
|
4551
|
-
|
|
4564
|
+
return ke(B, (C) => {
|
|
4565
|
+
ce(C);
|
|
4566
|
+
}, { immediate: !0, deep: !0 }), ke(Y, () => {
|
|
4567
|
+
Q.value++;
|
|
4552
4568
|
}, { immediate: !0, deep: !0 }), tt(async () => {
|
|
4553
|
-
await
|
|
4554
|
-
}), (
|
|
4555
|
-
const
|
|
4556
|
-
return f(), x("div",
|
|
4557
|
-
|
|
4558
|
-
"can-submit":
|
|
4569
|
+
await S();
|
|
4570
|
+
}), (C, A) => {
|
|
4571
|
+
const W = N("KInput"), he = N("KSelect"), be = N("KTextArea");
|
|
4572
|
+
return f(), x("div", Xl, [
|
|
4573
|
+
j(g(pl), {
|
|
4574
|
+
"can-submit": _.value,
|
|
4559
4575
|
config: e.config,
|
|
4560
4576
|
"edit-id": e.keyId,
|
|
4561
|
-
"error-message": l.errorMessage ||
|
|
4577
|
+
"error-message": l.errorMessage || R.value,
|
|
4562
4578
|
"fetch-url": s.value,
|
|
4563
4579
|
"is-readonly": l.isReadonly,
|
|
4564
4580
|
onCancel: p,
|
|
4565
|
-
"onFetch:error":
|
|
4566
|
-
"onFetch:success":
|
|
4567
|
-
onLoading:
|
|
4568
|
-
onSubmit:
|
|
4581
|
+
"onFetch:error": A[8] || (A[8] = (D) => C.$emit("error", D)),
|
|
4582
|
+
"onFetch:success": w,
|
|
4583
|
+
onLoading: A[9] || (A[9] = (D) => C.$emit("loading", D)),
|
|
4584
|
+
onSubmit: k
|
|
4569
4585
|
}, {
|
|
4570
|
-
default:
|
|
4571
|
-
|
|
4586
|
+
default: b(() => [
|
|
4587
|
+
j(g(Gt), {
|
|
4572
4588
|
description: g(n)("keys.form.sections.general.description"),
|
|
4573
4589
|
title: g(n)("keys.form.sections.general.title")
|
|
4574
4590
|
}, {
|
|
4575
|
-
default:
|
|
4576
|
-
|
|
4591
|
+
default: b(() => [
|
|
4592
|
+
j(W, {
|
|
4577
4593
|
modelValue: l.fields.key_id,
|
|
4578
|
-
"onUpdate:modelValue":
|
|
4594
|
+
"onUpdate:modelValue": A[0] || (A[0] = (D) => l.fields.key_id = D),
|
|
4579
4595
|
modelModifiers: { trim: !0 },
|
|
4580
4596
|
autocomplete: "off",
|
|
4581
4597
|
"data-testid": "key-form-id",
|
|
@@ -4587,9 +4603,9 @@ const Za = (e, a) => {
|
|
|
4587
4603
|
required: "",
|
|
4588
4604
|
type: "text"
|
|
4589
4605
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
4590
|
-
|
|
4606
|
+
j(W, {
|
|
4591
4607
|
modelValue: l.fields.name,
|
|
4592
|
-
"onUpdate:modelValue":
|
|
4608
|
+
"onUpdate:modelValue": A[1] || (A[1] = (D) => l.fields.name = D),
|
|
4593
4609
|
modelModifiers: { trim: !0 },
|
|
4594
4610
|
autocomplete: "off",
|
|
4595
4611
|
"data-testid": "key-form-name",
|
|
@@ -4598,43 +4614,43 @@ const Za = (e, a) => {
|
|
|
4598
4614
|
readonly: l.isReadonly,
|
|
4599
4615
|
type: "text"
|
|
4600
4616
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4601
|
-
|
|
4617
|
+
j(he, {
|
|
4602
4618
|
modelValue: l.fields.key_set,
|
|
4603
|
-
"onUpdate:modelValue":
|
|
4619
|
+
"onUpdate:modelValue": A[2] || (A[2] = (D) => l.fields.key_set = D),
|
|
4604
4620
|
appearance: "select",
|
|
4605
4621
|
autosuggest: "",
|
|
4606
|
-
class: xe({ "k-select-placeholder":
|
|
4622
|
+
class: xe({ "k-select-placeholder": F.value }),
|
|
4607
4623
|
clearable: y.value,
|
|
4608
4624
|
"data-testid": "key-form-key-set",
|
|
4609
4625
|
"dropdown-footer-text": ie.value,
|
|
4610
4626
|
"enable-filtering": "",
|
|
4611
|
-
items:
|
|
4627
|
+
items: Y.value,
|
|
4612
4628
|
label: g(n)("keys.form.fields.key_set.label"),
|
|
4613
|
-
loading: g(
|
|
4629
|
+
loading: g(h),
|
|
4614
4630
|
placeholder: g(n)("keys.form.fields.key_set.placeholder"),
|
|
4615
|
-
readonly:
|
|
4631
|
+
readonly: v.value,
|
|
4616
4632
|
width: "100%",
|
|
4617
|
-
onQueryChange:
|
|
4633
|
+
onQueryChange: K
|
|
4618
4634
|
}, {
|
|
4619
|
-
loading:
|
|
4620
|
-
|
|
4635
|
+
loading: b(() => [
|
|
4636
|
+
V("div", null, O(g(n)("keys.actions.loading")), 1)
|
|
4621
4637
|
]),
|
|
4622
|
-
empty:
|
|
4623
|
-
|
|
4638
|
+
empty: b(() => [
|
|
4639
|
+
V("div", es, O(g(n)("keys.search.no_results")), 1)
|
|
4624
4640
|
]),
|
|
4625
|
-
"selected-item-template":
|
|
4626
|
-
|
|
4641
|
+
"selected-item-template": b(({ item: D }) => [
|
|
4642
|
+
V("div", null, O(D.name), 1)
|
|
4627
4643
|
]),
|
|
4628
|
-
"item-template":
|
|
4629
|
-
|
|
4630
|
-
|
|
4644
|
+
"item-template": b(({ item: D }) => [
|
|
4645
|
+
V("div", ts, O(D.name), 1),
|
|
4646
|
+
V("div", as, O(D.value), 1)
|
|
4631
4647
|
]),
|
|
4632
4648
|
_: 1
|
|
4633
4649
|
}, 8, ["modelValue", "class", "clearable", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"]),
|
|
4634
|
-
|
|
4635
|
-
|
|
4650
|
+
U.value ? (f(), x("p", is, O(U.value), 1)) : J("", !0),
|
|
4651
|
+
j(W, {
|
|
4636
4652
|
modelValue: l.fields.tags,
|
|
4637
|
-
"onUpdate:modelValue":
|
|
4653
|
+
"onUpdate:modelValue": A[3] || (A[3] = (D) => l.fields.tags = D),
|
|
4638
4654
|
modelModifiers: { trim: !0 },
|
|
4639
4655
|
autocomplete: "off",
|
|
4640
4656
|
"data-testid": "key-form-tags",
|
|
@@ -4648,16 +4664,16 @@ const Za = (e, a) => {
|
|
|
4648
4664
|
]),
|
|
4649
4665
|
_: 1
|
|
4650
4666
|
}, 8, ["description", "title"]),
|
|
4651
|
-
|
|
4667
|
+
j(g(Gt), {
|
|
4652
4668
|
description: g(n)("keys.form.sections.keys.description"),
|
|
4653
4669
|
"has-divider": "",
|
|
4654
4670
|
title: g(n)("keys.form.sections.keys.title")
|
|
4655
4671
|
}, {
|
|
4656
|
-
default:
|
|
4657
|
-
|
|
4658
|
-
|
|
4672
|
+
default: b(() => [
|
|
4673
|
+
V("div", ns, [
|
|
4674
|
+
j(he, {
|
|
4659
4675
|
modelValue: l.fields.key_format,
|
|
4660
|
-
"onUpdate:modelValue":
|
|
4676
|
+
"onUpdate:modelValue": A[4] || (A[4] = (D) => l.fields.key_format = D),
|
|
4661
4677
|
appearance: "select",
|
|
4662
4678
|
"data-testid": "key-form-key-format",
|
|
4663
4679
|
items: u,
|
|
@@ -4667,10 +4683,10 @@ const Za = (e, a) => {
|
|
|
4667
4683
|
width: "100%"
|
|
4668
4684
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
4669
4685
|
]),
|
|
4670
|
-
l.fields.key_format === "jwk" ? (f(),
|
|
4686
|
+
l.fields.key_format === "jwk" ? (f(), q(be, {
|
|
4671
4687
|
key: 0,
|
|
4672
4688
|
modelValue: l.fields.jwk,
|
|
4673
|
-
"onUpdate:modelValue":
|
|
4689
|
+
"onUpdate:modelValue": A[5] || (A[5] = (D) => l.fields.jwk = D),
|
|
4674
4690
|
modelModifiers: { trim: !0 },
|
|
4675
4691
|
class: "key-form-textarea",
|
|
4676
4692
|
"data-testid": "key-form-jwk",
|
|
@@ -4679,11 +4695,11 @@ const Za = (e, a) => {
|
|
|
4679
4695
|
placeholder: g(n)("keys.form.fields.jwk.placeholder"),
|
|
4680
4696
|
readonly: l.isReadonly,
|
|
4681
4697
|
required: ""
|
|
4682
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])) :
|
|
4683
|
-
l.fields.key_format === "pem" ? (f(),
|
|
4698
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])) : J("", !0),
|
|
4699
|
+
l.fields.key_format === "pem" ? (f(), q(be, {
|
|
4684
4700
|
key: 1,
|
|
4685
4701
|
modelValue: l.fields.private_key,
|
|
4686
|
-
"onUpdate:modelValue":
|
|
4702
|
+
"onUpdate:modelValue": A[6] || (A[6] = (D) => l.fields.private_key = D),
|
|
4687
4703
|
modelModifiers: { trim: !0 },
|
|
4688
4704
|
class: "key-form-textarea",
|
|
4689
4705
|
"data-testid": "key-form-private-key",
|
|
@@ -4691,11 +4707,11 @@ const Za = (e, a) => {
|
|
|
4691
4707
|
placeholder: g(n)("keys.form.fields.private_key.placeholder"),
|
|
4692
4708
|
readonly: l.isReadonly,
|
|
4693
4709
|
required: ""
|
|
4694
|
-
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) :
|
|
4695
|
-
l.fields.key_format === "pem" ? (f(),
|
|
4710
|
+
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : J("", !0),
|
|
4711
|
+
l.fields.key_format === "pem" ? (f(), q(be, {
|
|
4696
4712
|
key: 2,
|
|
4697
4713
|
modelValue: l.fields.public_key,
|
|
4698
|
-
"onUpdate:modelValue":
|
|
4714
|
+
"onUpdate:modelValue": A[7] || (A[7] = (D) => l.fields.public_key = D),
|
|
4699
4715
|
modelModifiers: { trim: !0 },
|
|
4700
4716
|
class: "key-form-textarea",
|
|
4701
4717
|
"data-testid": "key-form-public-key",
|
|
@@ -4703,7 +4719,7 @@ const Za = (e, a) => {
|
|
|
4703
4719
|
placeholder: g(n)("keys.form.fields.public_key.placeholder"),
|
|
4704
4720
|
readonly: l.isReadonly,
|
|
4705
4721
|
required: ""
|
|
4706
|
-
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) :
|
|
4722
|
+
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : J("", !0)
|
|
4707
4723
|
]),
|
|
4708
4724
|
_: 1
|
|
4709
4725
|
}, 8, ["description", "title"])
|
|
@@ -4714,7 +4730,7 @@ const Za = (e, a) => {
|
|
|
4714
4730
|
};
|
|
4715
4731
|
}
|
|
4716
4732
|
});
|
|
4717
|
-
const ks = /* @__PURE__ */
|
|
4733
|
+
const ks = /* @__PURE__ */ Ga(rs, [["__scopeId", "data-v-99391058"]]), os = { class: "kong-ui-entities-keys-entity-config-card" }, ls = { key: 2 }, bs = /* @__PURE__ */ re({
|
|
4718
4734
|
__name: "KeyConfigCard",
|
|
4719
4735
|
props: {
|
|
4720
4736
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4751,50 +4767,50 @@ const ks = /* @__PURE__ */ Za(rs, [["__scopeId", "data-v-99391058"]]), os = { cl
|
|
|
4751
4767
|
var p;
|
|
4752
4768
|
const t = e, { axiosInstance: i } = _t({
|
|
4753
4769
|
headers: (p = t.config) == null ? void 0 : p.requestHeaders
|
|
4754
|
-
}), { convertKeyToTitle: n } = Yl(), { i18n: { t: r } } = mt.useI18n(), o =
|
|
4770
|
+
}), { convertKeyToTitle: n } = Yl(), { i18n: { t: r } } = mt.useI18n(), o = I(() => t.keySetId ? `${_e.form[t.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, t.keySetId) : _e.form[t.config.app].edit.all), s = I(() => {
|
|
4755
4771
|
var m;
|
|
4756
4772
|
return (m = _e.form[t.config.app]) == null ? void 0 : m.getKeySet;
|
|
4757
|
-
}), c =
|
|
4758
|
-
var
|
|
4759
|
-
c.value = m, d.value = (
|
|
4773
|
+
}), c = $(), l = $({}), d = $(t.keySetId || ""), u = $(""), v = $(!1), y = async (m) => {
|
|
4774
|
+
var k;
|
|
4775
|
+
c.value = m, d.value = (k = m == null ? void 0 : m.set) == null ? void 0 : k.id, a("fetch:success", m), _(m);
|
|
4760
4776
|
};
|
|
4761
4777
|
ke(d, async () => {
|
|
4762
|
-
var
|
|
4778
|
+
var k, M;
|
|
4763
4779
|
if (!d.value)
|
|
4764
4780
|
return;
|
|
4765
4781
|
let m = `${t.config.apiBaseUrl}${s.value}`;
|
|
4766
|
-
t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((
|
|
4782
|
+
t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((k = t.config) == null ? void 0 : k.controlPlaneId) || "").replace(/{keySetId}/gi, d.value || "") : t.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (M = t.config) != null && M.workspace ? `/${t.config.workspace}` : "").replace(/{keySetId}/gi, d.value || ""));
|
|
4767
4783
|
try {
|
|
4768
|
-
|
|
4769
|
-
const { data:
|
|
4770
|
-
u.value = (
|
|
4771
|
-
} catch (
|
|
4772
|
-
a("fetch:error",
|
|
4784
|
+
v.value = !0;
|
|
4785
|
+
const { data: h } = await i.get(m);
|
|
4786
|
+
u.value = (h == null ? void 0 : h.name) || (h == null ? void 0 : h.id);
|
|
4787
|
+
} catch (h) {
|
|
4788
|
+
a("fetch:error", h);
|
|
4773
4789
|
} finally {
|
|
4774
|
-
|
|
4790
|
+
v.value = !1;
|
|
4775
4791
|
}
|
|
4776
4792
|
}, { immediate: !0 });
|
|
4777
|
-
const
|
|
4778
|
-
var
|
|
4793
|
+
const _ = (m) => {
|
|
4794
|
+
var k, M;
|
|
4779
4795
|
try {
|
|
4780
4796
|
if (m.jwk) {
|
|
4781
|
-
const
|
|
4782
|
-
Object.keys(
|
|
4797
|
+
const h = JSON.parse(m.jwk);
|
|
4798
|
+
Object.keys(h).forEach((P) => {
|
|
4783
4799
|
l.value = {
|
|
4784
4800
|
...l.value,
|
|
4785
|
-
[`jwk.${
|
|
4801
|
+
[`jwk.${P}`]: h[P]
|
|
4786
4802
|
};
|
|
4787
4803
|
});
|
|
4788
4804
|
} else
|
|
4789
4805
|
l.value = {
|
|
4790
|
-
"pem.public_key": (
|
|
4791
|
-
"pem.private_key": (
|
|
4806
|
+
"pem.public_key": (k = m == null ? void 0 : m.pem) == null ? void 0 : k.public_key,
|
|
4807
|
+
"pem.private_key": (M = m == null ? void 0 : m.pem) == null ? void 0 : M.private_key
|
|
4792
4808
|
};
|
|
4793
|
-
} catch (
|
|
4794
|
-
a("fetch:error",
|
|
4809
|
+
} catch (h) {
|
|
4810
|
+
a("fetch:error", h);
|
|
4795
4811
|
}
|
|
4796
4812
|
return l;
|
|
4797
|
-
},
|
|
4813
|
+
}, w = $({
|
|
4798
4814
|
id: {},
|
|
4799
4815
|
name: {
|
|
4800
4816
|
tooltip: r("keys.form.fields.name.tooltip")
|
|
@@ -4826,63 +4842,63 @@ const ks = /* @__PURE__ */ Za(rs, [["__scopeId", "data-v-99391058"]]), os = { cl
|
|
|
4826
4842
|
type: G.Json
|
|
4827
4843
|
}
|
|
4828
4844
|
});
|
|
4829
|
-
return (m,
|
|
4830
|
-
var
|
|
4831
|
-
const
|
|
4845
|
+
return (m, k) => {
|
|
4846
|
+
var h, P;
|
|
4847
|
+
const M = N("KSkeleton");
|
|
4832
4848
|
return f(), x("div", os, [
|
|
4833
|
-
|
|
4849
|
+
j(g(sl), {
|
|
4834
4850
|
config: e.config,
|
|
4835
4851
|
"config-card-doc": e.configCardDoc,
|
|
4836
|
-
"config-schema":
|
|
4852
|
+
"config-schema": w.value,
|
|
4837
4853
|
"fetch-url": o.value,
|
|
4838
4854
|
"hide-title": e.hideTitle,
|
|
4839
|
-
"onCopy:success":
|
|
4840
|
-
"onFetch:error":
|
|
4855
|
+
"onCopy:success": k[0] || (k[0] = (L) => m.$emit("copy:success", L)),
|
|
4856
|
+
"onFetch:error": k[1] || (k[1] = (L) => m.$emit("fetch:error", L)),
|
|
4841
4857
|
"onFetch:success": y,
|
|
4842
|
-
onLoading:
|
|
4858
|
+
onLoading: k[2] || (k[2] = (L) => m.$emit("loading", L))
|
|
4843
4859
|
}, Ie({
|
|
4844
|
-
set:
|
|
4845
|
-
|
|
4860
|
+
set: b(({ row: L }) => [
|
|
4861
|
+
v.value ? (f(), q(M, {
|
|
4846
4862
|
key: 0,
|
|
4847
4863
|
"data-testid": "key-set-name-loader",
|
|
4848
4864
|
type: "spinner"
|
|
4849
|
-
})) :
|
|
4865
|
+
})) : L.value && L.value.id === d.value && u.value ? (f(), q(g(ca), {
|
|
4850
4866
|
key: 1,
|
|
4851
4867
|
item: {
|
|
4852
|
-
key:
|
|
4868
|
+
key: L.value.id,
|
|
4853
4869
|
value: u.value,
|
|
4854
4870
|
type: g(G).LinkInternal
|
|
4855
4871
|
},
|
|
4856
|
-
onClick: (
|
|
4857
|
-
}, null, 8, ["item", "onClick"])) : (f(), x("div", ls,
|
|
4872
|
+
onClick: (z) => m.$emit("navigation-click", L.value.id, "key-sets")
|
|
4873
|
+
}, null, 8, ["item", "onClick"])) : (f(), x("div", ls, O("–")))
|
|
4858
4874
|
]),
|
|
4859
4875
|
_: 2
|
|
4860
4876
|
}, [
|
|
4861
|
-
(
|
|
4877
|
+
(h = c.value) != null && h.jwk ? {
|
|
4862
4878
|
name: "jwk",
|
|
4863
|
-
fn:
|
|
4864
|
-
(f(!0), x(me, null, ye(Object.keys(l.value), (
|
|
4865
|
-
key:
|
|
4866
|
-
"data-testid": `${
|
|
4879
|
+
fn: b(() => [
|
|
4880
|
+
(f(!0), x(me, null, ye(Object.keys(l.value), (L) => (f(), q(g(Ve), {
|
|
4881
|
+
key: L,
|
|
4882
|
+
"data-testid": `${L}`,
|
|
4867
4883
|
item: {
|
|
4868
|
-
key:
|
|
4869
|
-
label: g(n)(
|
|
4870
|
-
value: l.value[
|
|
4884
|
+
key: L,
|
|
4885
|
+
label: g(n)(L),
|
|
4886
|
+
value: l.value[L]
|
|
4871
4887
|
}
|
|
4872
4888
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
4873
4889
|
]),
|
|
4874
4890
|
key: "0"
|
|
4875
4891
|
} : void 0,
|
|
4876
|
-
(
|
|
4892
|
+
(P = c.value) != null && P.pem ? {
|
|
4877
4893
|
name: "pem",
|
|
4878
|
-
fn:
|
|
4879
|
-
(f(!0), x(me, null, ye(Object.keys(l.value), (
|
|
4880
|
-
key:
|
|
4881
|
-
"data-testid": `${
|
|
4894
|
+
fn: b(() => [
|
|
4895
|
+
(f(!0), x(me, null, ye(Object.keys(l.value), (L) => (f(), q(g(Ve), {
|
|
4896
|
+
key: L,
|
|
4897
|
+
"data-testid": `${L}`,
|
|
4882
4898
|
item: {
|
|
4883
|
-
key:
|
|
4884
|
-
label: g(n)(
|
|
4885
|
-
value: l.value[
|
|
4899
|
+
key: L,
|
|
4900
|
+
label: g(n)(L),
|
|
4901
|
+
value: l.value[L]
|
|
4886
4902
|
}
|
|
4887
4903
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
4888
4904
|
]),
|