@kong-ui-public/entities-keys 2.3.19 → 2.3.20
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 +251 -248
- package/dist/entities-keys.umd.js +1 -1
- package/package.json +4 -4
package/dist/entities-keys.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ie, ref as M, computed as A, watch as ke, renderSlot as ee, createCommentVNode as H, unref as
|
|
1
|
+
import { defineComponent as ie, ref as M, computed as A, watch as ke, renderSlot as ee, createCommentVNode as H, unref as g, resolveComponent as q, openBlock as p, createElementBlock as j, createVNode as O, withCtx as h, createTextVNode as G, toDisplayString as E, useCssVars as en, useSlots as et, createElementVNode as U, createSlots as _e, createBlock as N, resolveDynamicComponent as Oe, normalizeProps as ra, guardReactiveProps as oa, Fragment as ge, renderList as me, mergeProps as lt, normalizeClass as Ae, onBeforeMount as tt, withModifiers as Ye, withDirectives as Ue, vShow as Re, inject as tn, onMounted as la, onUnmounted as sa, normalizeStyle as nn, pushScopeId as an, popScopeId as rn, reactive as At } from "vue";
|
|
2
2
|
import { useRouter as ft } from "vue-router";
|
|
3
3
|
import { createI18n as yt, i18nTComponent as on } from "@kong-ui-public/i18n";
|
|
4
4
|
import xt from "axios";
|
|
@@ -411,14 +411,14 @@ function xa(e, t, n, a = {
|
|
|
411
411
|
headers: e.requestHeaders
|
|
412
412
|
}), { i18n: { t: o } } = ht(), { debounce: r } = ya(), l = r(async (C) => {
|
|
413
413
|
await T(C);
|
|
414
|
-
}, 200), s = M(!1), u = M(""), c = M(""), d = M([]), v = M([]),
|
|
414
|
+
}, 200), s = M(!1), u = M(""), c = M(""), d = M([]), v = M([]), m = M(void 0), _ = g(t);
|
|
415
415
|
let k = `${e.apiBaseUrl}${_}`;
|
|
416
416
|
e.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
417
417
|
const { isValidUuid: x } = sn(), b = async () => {
|
|
418
418
|
try {
|
|
419
419
|
s.value = !0;
|
|
420
420
|
const { data: C } = await i.get(`${k}?size=${n}`);
|
|
421
|
-
C != null && C.next || (
|
|
421
|
+
C != null && C.next || (m.value = a.fetchedItemsKey in C ? C[a.fetchedItemsKey] : []), v.value = a.fetchedItemsKey in C ? C[a.fetchedItemsKey] : [], d.value = v.value;
|
|
422
422
|
} catch {
|
|
423
423
|
d.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
424
424
|
} finally {
|
|
@@ -427,7 +427,7 @@ function xa(e, t, n, a = {
|
|
|
427
427
|
}, f = M(""), T = async (C) => {
|
|
428
428
|
var w, F, L;
|
|
429
429
|
if (f.value !== C)
|
|
430
|
-
if (f.value = C || "",
|
|
430
|
+
if (f.value = C || "", m.value === void 0)
|
|
431
431
|
try {
|
|
432
432
|
if (s.value = !0, u.value = "", c.value = "", e.app === "konnect") {
|
|
433
433
|
let R = k + "";
|
|
@@ -460,7 +460,7 @@ function xa(e, t, n, a = {
|
|
|
460
460
|
s.value = !1;
|
|
461
461
|
}
|
|
462
462
|
else
|
|
463
|
-
s.value = !0, c.value = "", C ? (d.value = (L =
|
|
463
|
+
s.value = !0, c.value = "", C ? (d.value = (L = m.value) == null ? void 0 : L.filter((R) => {
|
|
464
464
|
var I;
|
|
465
465
|
let V = !1;
|
|
466
466
|
for (const K of a.searchKeys) {
|
|
@@ -468,20 +468,20 @@ function xa(e, t, n, a = {
|
|
|
468
468
|
B != null && B.includes(C.toLowerCase()) && (V = !0);
|
|
469
469
|
}
|
|
470
470
|
return V;
|
|
471
|
-
}), (!d.value || !d.value.length) && (c.value = o("debouncedFilter.errors.invalid"))) : d.value =
|
|
471
|
+
}), (!d.value || !d.value.length) && (c.value = o("debouncedFilter.errors.invalid"))) : d.value = m.value, s.value = !1;
|
|
472
472
|
};
|
|
473
473
|
return {
|
|
474
474
|
loading: s,
|
|
475
475
|
error: u,
|
|
476
476
|
validationError: c,
|
|
477
477
|
results: d,
|
|
478
|
-
allRecords:
|
|
478
|
+
allRecords: m,
|
|
479
479
|
loadItems: b,
|
|
480
480
|
debouncedQueryChange: l
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
function ja(e, t) {
|
|
484
|
-
const n =
|
|
484
|
+
const n = g(t), a = A(
|
|
485
485
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
486
486
|
);
|
|
487
487
|
return a.value.search = "", (i) => `${a.value.href}/${i}`;
|
|
@@ -528,7 +528,7 @@ function Oa(e) {
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
function cn(e, t) {
|
|
531
|
-
const n = M(
|
|
531
|
+
const n = M(g(e)), a = M(g(t)), i = A(
|
|
532
532
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
533
533
|
), o = A(
|
|
534
534
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
@@ -536,17 +536,17 @@ function cn(e, t) {
|
|
|
536
536
|
return (r) => {
|
|
537
537
|
const { page: l, pageSize: s, offset: u, sortColumnKey: c, sortColumnOrder: d, query: v } = r;
|
|
538
538
|
try {
|
|
539
|
-
let
|
|
540
|
-
return i.value && v ? (
|
|
541
|
-
|
|
542
|
-
}), c &&
|
|
543
|
-
} catch (
|
|
544
|
-
return console.error("RouteList(fetcher)",
|
|
539
|
+
let m = new URL(o.value.href);
|
|
540
|
+
return i.value && v ? (m.search = "", m = n.value.app === "konnect" ? new URL(`${m.href}?filter[name][contains]=${v}`) : new URL(`${m.href}/${v}/`)) : (i.value || new URLSearchParams(v).forEach((_, k) => {
|
|
541
|
+
m.searchParams.append(k, _);
|
|
542
|
+
}), c && m.searchParams.append("sort_by", c), d === "desc" && m.searchParams.append("sort_desc", "1"), m.searchParams.append("size", String(s))), u && l !== 1 && m.searchParams.append("offset", String(u)), m.href;
|
|
543
|
+
} catch (m) {
|
|
544
|
+
return console.error("RouteList(fetcher)", m), a.value;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
function $a(e, t, n = "data") {
|
|
549
|
-
const a =
|
|
549
|
+
const a = g(t), { axiosInstance: i } = gt({
|
|
550
550
|
headers: e.requestHeaders
|
|
551
551
|
}), o = cn(e, a), r = M({
|
|
552
552
|
status: je.Idle
|
|
@@ -681,7 +681,7 @@ const ce = {
|
|
|
681
681
|
}, Ra = "Copy to clipboard", Va = {
|
|
682
682
|
message: Ua,
|
|
683
683
|
iconTitle: Ra
|
|
684
|
-
},
|
|
684
|
+
}, Pa = "kong-ui-copy-uuid-notify", Et = "24px", Da = (e, t) => {
|
|
685
685
|
const n = e.__vccOpts || e;
|
|
686
686
|
for (const [a, i] of t)
|
|
687
687
|
n[a] = i;
|
|
@@ -785,7 +785,7 @@ const ce = {
|
|
|
785
785
|
_: 1
|
|
786
786
|
}, 8, ["aria-hidden", "style"]));
|
|
787
787
|
}
|
|
788
|
-
}), Za = /* @__PURE__ */
|
|
788
|
+
}), Za = /* @__PURE__ */ Da(Wa, [["__scopeId", "data-v-13f41aa3"]]), Ga = "16px", Qa = { class: "kong-ui-copy-uuid" }, Xa = ["onClick"], Ft = 15, ei = /* @__PURE__ */ ie({
|
|
789
789
|
__name: "CopyUuid",
|
|
790
790
|
props: {
|
|
791
791
|
uuid: {
|
|
@@ -829,7 +829,7 @@ const ce = {
|
|
|
829
829
|
},
|
|
830
830
|
emits: ["success", "error"],
|
|
831
831
|
setup(e, { emit: t }) {
|
|
832
|
-
const { t: n } = yt("en-us", Va), a = e, i = t, o = a.notify || tn(
|
|
832
|
+
const { t: n } = yt("en-us", Va), a = e, i = t, o = a.notify || tn(Pa, () => {
|
|
833
833
|
}), r = A(() => a.idTooltip ? {
|
|
834
834
|
label: a.idTooltip,
|
|
835
835
|
positionFixed: !0,
|
|
@@ -842,15 +842,15 @@ const ce = {
|
|
|
842
842
|
maxWidth: "500px",
|
|
843
843
|
placement: "bottomStart"
|
|
844
844
|
} : {}), c = A(() => {
|
|
845
|
-
var
|
|
846
|
-
return a.format === "redacted" ? "*****" : a.format === "deleted" ? `*${(
|
|
847
|
-
}), d = (
|
|
848
|
-
s.value =
|
|
845
|
+
var m;
|
|
846
|
+
return a.format === "redacted" ? "*****" : a.format === "deleted" ? `*${(m = a.uuid) == null ? void 0 : m.substring(0, 5)}` : a.uuid;
|
|
847
|
+
}), d = (m) => {
|
|
848
|
+
s.value = m, setTimeout(() => {
|
|
849
849
|
s.value = a.tooltip;
|
|
850
850
|
}, 1800);
|
|
851
|
-
}, v = (
|
|
851
|
+
}, v = (m) => {
|
|
852
852
|
var _, k;
|
|
853
|
-
if (!
|
|
853
|
+
if (!m(a.uuid)) {
|
|
854
854
|
typeof o == "function" && o({
|
|
855
855
|
type: "error",
|
|
856
856
|
message: n("message.fail")
|
|
@@ -863,7 +863,7 @@ const ce = {
|
|
|
863
863
|
message: `${b}${n("message.success.content")}`
|
|
864
864
|
}), l.value ? d(a.successTooltip) : i("success", a.uuid);
|
|
865
865
|
};
|
|
866
|
-
return (
|
|
866
|
+
return (m, _) => {
|
|
867
867
|
const k = q("KClipboardProvider");
|
|
868
868
|
return p(), j("div", Qa, [
|
|
869
869
|
e.format !== "hidden" ? (p(), N(Oe(e.idTooltip ? "KTooltip" : "div"), lt({ key: 0 }, r.value, { "data-testid": "copy-id" }), {
|
|
@@ -888,12 +888,12 @@ const ce = {
|
|
|
888
888
|
tabindex: "0",
|
|
889
889
|
onClick: Ye((b) => v(x), ["stop"])
|
|
890
890
|
}, [
|
|
891
|
-
O(
|
|
891
|
+
O(g(Za), {
|
|
892
892
|
class: "uuid-icon",
|
|
893
893
|
color: e.iconColor,
|
|
894
894
|
decorative: !!e.tooltip,
|
|
895
|
-
size:
|
|
896
|
-
title:
|
|
895
|
+
size: g(Ga),
|
|
896
|
+
title: g(n)("iconTitle")
|
|
897
897
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
898
898
|
], 8, Xa)
|
|
899
899
|
]),
|
|
@@ -948,7 +948,7 @@ const ce = {
|
|
|
948
948
|
key: `${i.value}-property-${d}`,
|
|
949
949
|
item: {
|
|
950
950
|
key: c,
|
|
951
|
-
label:
|
|
951
|
+
label: g(a)(c),
|
|
952
952
|
value: r.value[c]
|
|
953
953
|
}
|
|
954
954
|
}, null, 8, ["item"]))), 128))
|
|
@@ -981,7 +981,7 @@ const ce = {
|
|
|
981
981
|
onClick: a[0] || (a[0] = (o) => n.$emit("navigation-click", e.item))
|
|
982
982
|
}, {
|
|
983
983
|
default: h(() => [
|
|
984
|
-
G(E(e.item.value ||
|
|
984
|
+
G(E(e.item.value || g(t)("baseConfigCard.commonFields.link")), 1)
|
|
985
985
|
]),
|
|
986
986
|
_: 1
|
|
987
987
|
})
|
|
@@ -1004,7 +1004,7 @@ const ce = {
|
|
|
1004
1004
|
appearance: e.status ? "success" : "neutral"
|
|
1005
1005
|
}, {
|
|
1006
1006
|
default: h(() => [
|
|
1007
|
-
G(E(e.status ?
|
|
1007
|
+
G(E(e.status ? g(t)("baseConfigCard.statusBadge.enabledLabel") : g(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
1008
1008
|
]),
|
|
1009
1009
|
_: 1
|
|
1010
1010
|
}, 8, ["appearance"]);
|
|
@@ -1034,7 +1034,7 @@ const ce = {
|
|
|
1034
1034
|
emits: ["navigation-click"],
|
|
1035
1035
|
setup(e, { emit: t }) {
|
|
1036
1036
|
en((_) => ({
|
|
1037
|
-
"5ae2770e": c.value ? "none" : `solid ${
|
|
1037
|
+
"5ae2770e": c.value ? "none" : `solid ${g(ci)} ${g(li)}`,
|
|
1038
1038
|
"4db3977e": u.value && l.value ? "block" : "flex",
|
|
1039
1039
|
"1a7c5e02": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
1040
1040
|
"1a77d24c": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
@@ -1165,7 +1165,7 @@ const ce = {
|
|
|
1165
1165
|
text: n.item.value
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
|
-
}), v = M(), { isTruncated:
|
|
1168
|
+
}), v = M(), { isTruncated: m } = ce.useTruncationDetector(v);
|
|
1169
1169
|
return (_, k) => {
|
|
1170
1170
|
const x = q("KLabel"), b = q("KBadge"), f = q("KTooltip");
|
|
1171
1171
|
return p(), j("div", di, [
|
|
@@ -1228,7 +1228,7 @@ const ce = {
|
|
|
1228
1228
|
class: "copy-uuid-array",
|
|
1229
1229
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1230
1230
|
}, [
|
|
1231
|
-
(p(!0), j(ge, null, me(e.item.value, (T, C) => (p(), N(
|
|
1231
|
+
(p(!0), j(ge, null, me(e.item.value, (T, C) => (p(), N(g(pn), lt(d.value.childAttrs, {
|
|
1232
1232
|
key: `${e.item.key}-copy-uuid-${C}`,
|
|
1233
1233
|
"data-testid": `${e.item.key}-copy-uuid-${C}`,
|
|
1234
1234
|
uuid: T
|
|
@@ -1240,7 +1240,7 @@ const ce = {
|
|
|
1240
1240
|
}, [
|
|
1241
1241
|
(p(!0), j(ge, null, me(e.item.value, (T, C) => (p(), N(b, {
|
|
1242
1242
|
key: `${e.item.key}-badge-method-${C}`,
|
|
1243
|
-
appearance: Object.values(
|
|
1243
|
+
appearance: Object.values(g(ca)).includes(T.toLowerCase()) ? T.toLowerCase() : "custom",
|
|
1244
1244
|
class: "config-badge",
|
|
1245
1245
|
"data-testid": `${e.item.key}-badge-method-${C}`
|
|
1246
1246
|
}, {
|
|
@@ -1262,7 +1262,7 @@ const ce = {
|
|
|
1262
1262
|
}, null, 8, ["index", "item"]))), 128))
|
|
1263
1263
|
], 8, bi)) : (p(), N(f, {
|
|
1264
1264
|
key: 4,
|
|
1265
|
-
text: m
|
|
1265
|
+
text: g(m) ? e.item.value : ""
|
|
1266
1266
|
}, {
|
|
1267
1267
|
default: h(() => [
|
|
1268
1268
|
U("span", {
|
|
@@ -1399,15 +1399,15 @@ function hn(e, t) {
|
|
|
1399
1399
|
|
|
1400
1400
|
` + e.mark.snippet), a + " " + n) : a;
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function Pe(e, t) {
|
|
1403
1403
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = hn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1404
1404
|
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1405
|
+
Pe.prototype = Object.create(Error.prototype);
|
|
1406
|
+
Pe.prototype.constructor = Pe;
|
|
1407
|
+
Pe.prototype.toString = function(e) {
|
|
1408
1408
|
return this.name + ": " + hn(this, e);
|
|
1409
1409
|
};
|
|
1410
|
-
var ye =
|
|
1410
|
+
var ye = Pe;
|
|
1411
1411
|
function it(e, t, n, a, i) {
|
|
1412
1412
|
var o = "", r = "", l = Math.floor(i / 2) - 1;
|
|
1413
1413
|
return a - t > l && (o = " ... ", t = a - l + o.length), n - a > l && (r = " ...", n = a + l - r.length), {
|
|
@@ -1563,13 +1563,13 @@ var vn = st, kn = new de("tag:yaml.org,2002:str", {
|
|
|
1563
1563
|
Cn
|
|
1564
1564
|
]
|
|
1565
1565
|
});
|
|
1566
|
-
function
|
|
1566
|
+
function Pi(e) {
|
|
1567
1567
|
if (e === null)
|
|
1568
1568
|
return !0;
|
|
1569
1569
|
var t = e.length;
|
|
1570
1570
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function Di() {
|
|
1573
1573
|
return null;
|
|
1574
1574
|
}
|
|
1575
1575
|
function Ji(e) {
|
|
@@ -1577,8 +1577,8 @@ function Ji(e) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
var Sn = new de("tag:yaml.org,2002:null", {
|
|
1579
1579
|
kind: "scalar",
|
|
1580
|
-
resolve:
|
|
1581
|
-
construct:
|
|
1580
|
+
resolve: Pi,
|
|
1581
|
+
construct: Di,
|
|
1582
1582
|
predicate: Ji,
|
|
1583
1583
|
represent: {
|
|
1584
1584
|
canonical: function() {
|
|
@@ -1989,7 +1989,7 @@ for (var $e = 0; $e < 256; $e++)
|
|
|
1989
1989
|
function Mr(e, t) {
|
|
1990
1990
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || kt, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1991
1991
|
}
|
|
1992
|
-
function
|
|
1992
|
+
function Pn(e, t) {
|
|
1993
1993
|
var n = {
|
|
1994
1994
|
name: e.filename,
|
|
1995
1995
|
buffer: e.input.slice(0, -1),
|
|
@@ -2001,10 +2001,10 @@ function Dn(e, t) {
|
|
|
2001
2001
|
return n.snippet = qi(n), new ye(t, n);
|
|
2002
2002
|
}
|
|
2003
2003
|
function $(e, t) {
|
|
2004
|
-
throw
|
|
2004
|
+
throw Pn(e, t);
|
|
2005
2005
|
}
|
|
2006
2006
|
function Ge(e, t) {
|
|
2007
|
-
e.onWarning && e.onWarning.call(null,
|
|
2007
|
+
e.onWarning && e.onWarning.call(null, Pn(e, t));
|
|
2008
2008
|
}
|
|
2009
2009
|
var Ut = {
|
|
2010
2010
|
YAML: function(e, t, n) {
|
|
@@ -2087,29 +2087,29 @@ function Ct(e, t) {
|
|
|
2087
2087
|
`, t - 1));
|
|
2088
2088
|
}
|
|
2089
2089
|
function Er(e, t, n) {
|
|
2090
|
-
var a, i, o, r, l, s, u, c, d = e.kind, v = e.result,
|
|
2091
|
-
if (
|
|
2090
|
+
var a, i, o, r, l, s, u, c, d = e.kind, v = e.result, m;
|
|
2091
|
+
if (m = e.input.charCodeAt(e.position), he(m) || Me(m) || m === 35 || m === 38 || m === 42 || m === 33 || m === 124 || m === 62 || m === 39 || m === 34 || m === 37 || m === 64 || m === 96 || (m === 63 || m === 45) && (i = e.input.charCodeAt(e.position + 1), he(i) || n && Me(i)))
|
|
2092
2092
|
return !1;
|
|
2093
|
-
for (e.kind = "scalar", e.result = "", o = r = e.position, l = !1;
|
|
2094
|
-
if (
|
|
2093
|
+
for (e.kind = "scalar", e.result = "", o = r = e.position, l = !1; m !== 0; ) {
|
|
2094
|
+
if (m === 58) {
|
|
2095
2095
|
if (i = e.input.charCodeAt(e.position + 1), he(i) || n && Me(i))
|
|
2096
2096
|
break;
|
|
2097
|
-
} else if (
|
|
2097
|
+
} else if (m === 35) {
|
|
2098
2098
|
if (a = e.input.charCodeAt(e.position - 1), he(a))
|
|
2099
2099
|
break;
|
|
2100
2100
|
} else {
|
|
2101
|
-
if (e.position === e.lineStart && nt(e) || n && Me(
|
|
2101
|
+
if (e.position === e.lineStart && nt(e) || n && Me(m))
|
|
2102
2102
|
break;
|
|
2103
|
-
if (Ce(
|
|
2103
|
+
if (Ce(m))
|
|
2104
2104
|
if (s = e.line, u = e.lineStart, c = e.lineIndent, oe(e, !1, -1), e.lineIndent >= t) {
|
|
2105
|
-
l = !0,
|
|
2105
|
+
l = !0, m = e.input.charCodeAt(e.position);
|
|
2106
2106
|
continue;
|
|
2107
2107
|
} else {
|
|
2108
2108
|
e.position = r, e.line = s, e.lineStart = u, e.lineIndent = c;
|
|
2109
2109
|
break;
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
|
-
l && (Ie(e, o, r, !1), Ct(e, e.line - s), o = r = e.position, l = !1), Te(
|
|
2112
|
+
l && (Ie(e, o, r, !1), Ct(e, e.line - s), o = r = e.position, l = !1), Te(m) || (r = e.position + 1), m = e.input.charCodeAt(++e.position);
|
|
2113
2113
|
}
|
|
2114
2114
|
return Ie(e, o, r, !1), e.result ? !0 : (e.kind = d, e.result = v, !1);
|
|
2115
2115
|
}
|
|
@@ -2152,17 +2152,17 @@ function Nr(e, t) {
|
|
|
2152
2152
|
$(e, "unexpected end of the stream within a double quoted scalar");
|
|
2153
2153
|
}
|
|
2154
2154
|
function qr(e, t) {
|
|
2155
|
-
var n = !0, a, i, o, r = e.tag, l, s = e.anchor, u, c, d, v,
|
|
2155
|
+
var n = !0, a, i, o, r = e.tag, l, s = e.anchor, u, c, d, v, m, _ = /* @__PURE__ */ Object.create(null), k, x, b, f;
|
|
2156
2156
|
if (f = e.input.charCodeAt(e.position), f === 91)
|
|
2157
|
-
c = 93,
|
|
2157
|
+
c = 93, m = !1, l = [];
|
|
2158
2158
|
else if (f === 123)
|
|
2159
|
-
c = 125,
|
|
2159
|
+
c = 125, m = !0, l = {};
|
|
2160
2160
|
else
|
|
2161
2161
|
return !1;
|
|
2162
2162
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), f = e.input.charCodeAt(++e.position); f !== 0; ) {
|
|
2163
2163
|
if (oe(e, !0, t), f = e.input.charCodeAt(e.position), f === c)
|
|
2164
|
-
return e.position++, e.tag = r, e.anchor = s, e.kind =
|
|
2165
|
-
n ? f === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), x = k = b = null, d = v = !1, f === 63 && (u = e.input.charCodeAt(e.position + 1), he(u) && (d = v = !0, e.position++, oe(e, !0, t))), a = e.line, i = e.lineStart, o = e.position, Fe(e, t, We, !1, !0), x = e.tag, k = e.result, oe(e, !0, t), f = e.input.charCodeAt(e.position), (v || e.line === a) && f === 58 && (d = !0, f = e.input.charCodeAt(++e.position), oe(e, !0, t), Fe(e, t, We, !1, !0), b = e.result),
|
|
2164
|
+
return e.position++, e.tag = r, e.anchor = s, e.kind = m ? "mapping" : "sequence", e.result = l, !0;
|
|
2165
|
+
n ? f === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), x = k = b = null, d = v = !1, f === 63 && (u = e.input.charCodeAt(e.position + 1), he(u) && (d = v = !0, e.position++, oe(e, !0, t))), a = e.line, i = e.lineStart, o = e.position, Fe(e, t, We, !1, !0), x = e.tag, k = e.result, oe(e, !0, t), f = e.input.charCodeAt(e.position), (v || e.line === a) && f === 58 && (d = !0, f = e.input.charCodeAt(++e.position), oe(e, !0, t), Fe(e, t, We, !1, !0), b = e.result), m ? Ee(e, l, _, x, k, b, a, i, o) : d ? l.push(Ee(e, null, _, x, k, b, a, i, o)) : l.push(k), oe(e, !0, t), f = e.input.charCodeAt(e.position), f === 44 ? (n = !0, f = e.input.charCodeAt(++e.position)) : n = !1;
|
|
2166
2166
|
}
|
|
2167
2167
|
$(e, "unexpected end of the stream within a flow collection");
|
|
2168
2168
|
}
|
|
@@ -2230,12 +2230,12 @@ function Vt(e, t) {
|
|
|
2230
2230
|
return l ? (e.tag = a, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2231
2231
|
}
|
|
2232
2232
|
function Lr(e, t, n) {
|
|
2233
|
-
var a, i, o, r, l, s, u = e.tag, c = e.anchor, d = {}, v = /* @__PURE__ */ Object.create(null),
|
|
2233
|
+
var a, i, o, r, l, s, u = e.tag, c = e.anchor, d = {}, v = /* @__PURE__ */ Object.create(null), m = null, _ = null, k = null, x = !1, b = !1, f;
|
|
2234
2234
|
if (e.firstTabInLine !== -1)
|
|
2235
2235
|
return !1;
|
|
2236
2236
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), f = e.input.charCodeAt(e.position); f !== 0; ) {
|
|
2237
2237
|
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), o = e.line, (f === 63 || f === 58) && he(a))
|
|
2238
|
-
f === 63 ? (x && (Ee(e, d, v,
|
|
2238
|
+
f === 63 ? (x && (Ee(e, d, v, m, _, null, r, l, s), m = _ = k = null), b = !0, x = !0, i = !0) : x ? (x = !1, i = !0) : $(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, f = a;
|
|
2239
2239
|
else {
|
|
2240
2240
|
if (r = e.line, l = e.lineStart, s = e.position, !Fe(e, n, qn, !1, !0))
|
|
2241
2241
|
break;
|
|
@@ -2243,7 +2243,7 @@ function Lr(e, t, n) {
|
|
|
2243
2243
|
for (f = e.input.charCodeAt(e.position); Te(f); )
|
|
2244
2244
|
f = e.input.charCodeAt(++e.position);
|
|
2245
2245
|
if (f === 58)
|
|
2246
|
-
f = e.input.charCodeAt(++e.position), he(f) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ee(e, d, v,
|
|
2246
|
+
f = e.input.charCodeAt(++e.position), he(f) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ee(e, d, v, m, _, null, r, l, s), m = _ = k = null), b = !0, x = !1, i = !1, m = e.tag, _ = e.result;
|
|
2247
2247
|
else if (b)
|
|
2248
2248
|
$(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2249
2249
|
else
|
|
@@ -2253,12 +2253,12 @@ function Lr(e, t, n) {
|
|
|
2253
2253
|
else
|
|
2254
2254
|
return e.tag = u, e.anchor = c, !0;
|
|
2255
2255
|
}
|
|
2256
|
-
if ((e.line === o || e.lineIndent > t) && (x && (r = e.line, l = e.lineStart, s = e.position), Fe(e, t, Ze, !0, i) && (x ? _ = e.result : k = e.result), x || (Ee(e, d, v,
|
|
2256
|
+
if ((e.line === o || e.lineIndent > t) && (x && (r = e.line, l = e.lineStart, s = e.position), Fe(e, t, Ze, !0, i) && (x ? _ = e.result : k = e.result), x || (Ee(e, d, v, m, _, k, r, l, s), m = _ = k = null), oe(e, !0, -1), f = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && f !== 0)
|
|
2257
2257
|
$(e, "bad indentation of a mapping entry");
|
|
2258
2258
|
else if (e.lineIndent < t)
|
|
2259
2259
|
break;
|
|
2260
2260
|
}
|
|
2261
|
-
return x && Ee(e, d, v,
|
|
2261
|
+
return x && Ee(e, d, v, m, _, null, r, l, s), b && (e.tag = u, e.anchor = c, e.kind = "mapping", e.result = d), b;
|
|
2262
2262
|
}
|
|
2263
2263
|
function Ur(e) {
|
|
2264
2264
|
var t, n = !1, a = !1, i, o, r;
|
|
@@ -2299,7 +2299,7 @@ function Vr(e) {
|
|
|
2299
2299
|
return e.position === t && $(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), xe.call(e.anchorMap, n) || $(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], oe(e, !0, -1), !0;
|
|
2300
2300
|
}
|
|
2301
2301
|
function Fe(e, t, n, a, i) {
|
|
2302
|
-
var o, r, l, s = 1, u = !1, c = !1, d, v,
|
|
2302
|
+
var o, r, l, s = 1, u = !1, c = !1, d, v, m, _, k, x;
|
|
2303
2303
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = r = l = Ze === n || Bn === n, a && oe(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2304
2304
|
for (; Ur(e) || Rr(e); )
|
|
2305
2305
|
oe(e, !0, -1) ? (u = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
@@ -2315,16 +2315,16 @@ function Fe(e, t, n, a, i) {
|
|
|
2315
2315
|
if (xe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2316
2316
|
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2317
2317
|
else
|
|
2318
|
-
for (_ = null,
|
|
2319
|
-
if (e.tag.slice(0,
|
|
2320
|
-
_ =
|
|
2318
|
+
for (_ = null, m = e.typeMap.multi[e.kind || "fallback"], d = 0, v = m.length; d < v; d += 1)
|
|
2319
|
+
if (e.tag.slice(0, m[d].tag.length) === m[d].tag) {
|
|
2320
|
+
_ = m[d];
|
|
2321
2321
|
break;
|
|
2322
2322
|
}
|
|
2323
2323
|
_ || $(e, "unknown tag !<" + e.tag + ">"), e.result !== null && _.kind !== e.kind && $(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)) : $(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2324
2324
|
}
|
|
2325
2325
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || c;
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2327
|
+
function Pr(e) {
|
|
2328
2328
|
var t = e.position, n, a, i, o = !1, r;
|
|
2329
2329
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (r = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), r = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || r !== 37)); ) {
|
|
2330
2330
|
for (o = !0, r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r); )
|
|
@@ -2355,36 +2355,36 @@ function Dr(e) {
|
|
|
2355
2355
|
else
|
|
2356
2356
|
return;
|
|
2357
2357
|
}
|
|
2358
|
-
function
|
|
2358
|
+
function Dn(e, t) {
|
|
2359
2359
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2360
2360
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2361
2361
|
var n = new Mr(e, t), a = e.indexOf("\0");
|
|
2362
2362
|
for (a !== -1 && (n.position = a, $(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2363
2363
|
n.lineIndent += 1, n.position += 1;
|
|
2364
2364
|
for (; n.position < n.length - 1; )
|
|
2365
|
-
|
|
2365
|
+
Pr(n);
|
|
2366
2366
|
return n.documents;
|
|
2367
2367
|
}
|
|
2368
|
-
function
|
|
2368
|
+
function Dr(e, t, n) {
|
|
2369
2369
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2370
|
-
var a =
|
|
2370
|
+
var a = Dn(e, n);
|
|
2371
2371
|
if (typeof t != "function")
|
|
2372
2372
|
return a;
|
|
2373
2373
|
for (var i = 0, o = a.length; i < o; i += 1)
|
|
2374
2374
|
t(a[i]);
|
|
2375
2375
|
}
|
|
2376
2376
|
function Jr(e, t) {
|
|
2377
|
-
var n =
|
|
2377
|
+
var n = Dn(e, t);
|
|
2378
2378
|
if (n.length !== 0) {
|
|
2379
2379
|
if (n.length === 1)
|
|
2380
2380
|
return n[0];
|
|
2381
2381
|
throw new ye("expected a single document in the stream, but found more");
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
2384
|
-
var Hr =
|
|
2384
|
+
var Hr = Dr, zr = Jr, Jn = {
|
|
2385
2385
|
loadAll: Hr,
|
|
2386
2386
|
load: zr
|
|
2387
|
-
}, Hn = Object.prototype.toString, zn = Object.prototype.hasOwnProperty, wt = 65279, Yr = 9,
|
|
2387
|
+
}, Hn = Object.prototype.toString, zn = Object.prototype.hasOwnProperty, wt = 65279, Yr = 9, De = 10, Wr = 13, Zr = 32, Gr = 33, Qr = 34, ct = 35, Xr = 37, eo = 38, to = 39, no = 42, Yn = 44, ao = 45, Qe = 58, io = 61, ro = 62, oo = 63, lo = 64, Wn = 91, Zn = 93, so = 96, Gn = 123, co = 124, Qn = 125, pe = {};
|
|
2388
2388
|
pe[0] = "\\0";
|
|
2389
2389
|
pe[7] = "\\a";
|
|
2390
2390
|
pe[8] = "\\b";
|
|
@@ -2442,7 +2442,7 @@ var mo = 1, Je = 2;
|
|
|
2442
2442
|
function go(e) {
|
|
2443
2443
|
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 = le.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = fo(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 === '"' ? Je : mo, 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;
|
|
2444
2444
|
}
|
|
2445
|
-
function
|
|
2445
|
+
function Pt(e, t) {
|
|
2446
2446
|
for (var n = le.repeat(" ", t), a = 0, i = -1, o = "", r, l = e.length; a < l; )
|
|
2447
2447
|
i = e.indexOf(`
|
|
2448
2448
|
`, a), i === -1 ? (r = e.slice(a), a = l) : (r = e.slice(a, i + 1), a = i + 1), r.length && r !== `
|
|
@@ -2466,17 +2466,17 @@ function Xe(e) {
|
|
|
2466
2466
|
function He(e) {
|
|
2467
2467
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== wt || 65536 <= e && e <= 1114111;
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2470
|
-
return He(e) && e !== wt && e !== Wr && e !==
|
|
2469
|
+
function Dt(e) {
|
|
2470
|
+
return He(e) && e !== wt && e !== Wr && e !== De;
|
|
2471
2471
|
}
|
|
2472
2472
|
function Jt(e, t, n) {
|
|
2473
|
-
var a =
|
|
2473
|
+
var a = Dt(e), i = a && !Xe(e);
|
|
2474
2474
|
return (
|
|
2475
2475
|
// ns-plain-safe
|
|
2476
2476
|
(n ? (
|
|
2477
2477
|
// c = flow-in
|
|
2478
2478
|
a
|
|
2479
|
-
) : a && e !== Yn && e !== Wn && e !== Zn && e !== Gn && e !== Qn) && e !== ct && !(t === Qe && !i) ||
|
|
2479
|
+
) : a && e !== Yn && e !== Wn && e !== Zn && e !== Gn && e !== Qn) && e !== ct && !(t === Qe && !i) || Dt(t) && !Xe(t) && e === ct || t === Qe && i
|
|
2480
2480
|
);
|
|
2481
2481
|
}
|
|
2482
2482
|
function vo(e) {
|
|
@@ -2495,7 +2495,7 @@ function Xn(e) {
|
|
|
2495
2495
|
}
|
|
2496
2496
|
var ea = 1, dt = 2, ta = 3, na = 4, Ke = 5;
|
|
2497
2497
|
function bo(e, t, n, a, i, o, r, l) {
|
|
2498
|
-
var s, u = 0, c = null, d = !1, v = !1,
|
|
2498
|
+
var s, u = 0, c = null, d = !1, v = !1, m = a !== -1, _ = -1, k = vo(Le(e, 0)) && ko(Le(e, e.length - 1));
|
|
2499
2499
|
if (t || r)
|
|
2500
2500
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2501
2501
|
if (u = Le(e, s), !He(u))
|
|
@@ -2504,14 +2504,14 @@ function bo(e, t, n, a, i, o, r, l) {
|
|
|
2504
2504
|
}
|
|
2505
2505
|
else {
|
|
2506
2506
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2507
|
-
if (u = Le(e, s), u ===
|
|
2508
|
-
d = !0,
|
|
2507
|
+
if (u = Le(e, s), u === De)
|
|
2508
|
+
d = !0, m && (v = v || // Foldable line = too long, and not more-indented.
|
|
2509
2509
|
s - _ - 1 > a && e[_ + 1] !== " ", _ = s);
|
|
2510
2510
|
else if (!He(u))
|
|
2511
2511
|
return Ke;
|
|
2512
2512
|
k = k && Jt(u, c, l), c = u;
|
|
2513
2513
|
}
|
|
2514
|
-
v = v ||
|
|
2514
|
+
v = v || m && s - _ - 1 > a && e[_ + 1] !== " ";
|
|
2515
2515
|
}
|
|
2516
2516
|
return !d && !v ? k && !r && !i(e) ? ea : o === Je ? Ke : dt : n > 9 && Xn(e) ? Ke : r ? o === Je ? Ke : dt : v ? na : ta;
|
|
2517
2517
|
}
|
|
@@ -2540,9 +2540,9 @@ function Co(e, t, n, a, i) {
|
|
|
2540
2540
|
case dt:
|
|
2541
2541
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2542
2542
|
case ta:
|
|
2543
|
-
return "|" + Ht(t, e.indent) + zt(
|
|
2543
|
+
return "|" + Ht(t, e.indent) + zt(Pt(t, o));
|
|
2544
2544
|
case na:
|
|
2545
|
-
return ">" + Ht(t, e.indent) + zt(
|
|
2545
|
+
return ">" + Ht(t, e.indent) + zt(Pt(wo(t, r), o));
|
|
2546
2546
|
case Ke:
|
|
2547
2547
|
return '"' + So(t) + '"';
|
|
2548
2548
|
default:
|
|
@@ -2599,7 +2599,7 @@ function _o(e, t, n) {
|
|
|
2599
2599
|
function Wt(e, t, n, a) {
|
|
2600
2600
|
var i = "", o = e.tag, r, l, s;
|
|
2601
2601
|
for (r = 0, l = n.length; r < l; r += 1)
|
|
2602
|
-
s = n[r], e.replacer && (s = e.replacer.call(n, String(r), s)), (we(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && we(e, t + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += ut(e, t)), e.dump &&
|
|
2602
|
+
s = n[r], e.replacer && (s = e.replacer.call(n, String(r), s)), (we(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && we(e, t + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += ut(e, t)), e.dump && De === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2603
2603
|
e.tag = o, e.dump = i || "[]";
|
|
2604
2604
|
}
|
|
2605
2605
|
function Io(e, t, n) {
|
|
@@ -2617,7 +2617,7 @@ function Ao(e, t, n, a) {
|
|
|
2617
2617
|
else if (e.sortKeys)
|
|
2618
2618
|
throw new ye("sortKeys must be a boolean or a function");
|
|
2619
2619
|
for (l = 0, s = r.length; l < s; l += 1)
|
|
2620
|
-
v = "", (!a || i !== "") && (v += ut(e, t)), u = r[l], c = n[u], e.replacer && (c = e.replacer.call(n, u, c)), we(e, t + 1, u, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump &&
|
|
2620
|
+
v = "", (!a || i !== "") && (v += ut(e, t)), u = r[l], c = n[u], e.replacer && (c = e.replacer.call(n, u, c)), we(e, t + 1, u, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && De === e.dump.charCodeAt(0) ? v += "?" : v += "? "), v += e.dump, d && (v += ut(e, t)), we(e, t + 1, c, !0, d) && (e.dump && De === e.dump.charCodeAt(0) ? v += ":" : v += ": ", v += e.dump, i += v));
|
|
2621
2621
|
e.tag = o, e.dump = i || "{}";
|
|
2622
2622
|
}
|
|
2623
2623
|
function Zt(e, t, n) {
|
|
@@ -2710,7 +2710,7 @@ var $o = de, Ko = vn, Mo = wn, Eo = xn, Fo = jn, No = kt, qo = Jn.load, Bo = Jn.
|
|
|
2710
2710
|
omap: En,
|
|
2711
2711
|
seq: bn,
|
|
2712
2712
|
str: kn
|
|
2713
|
-
}, Vo = St("safeLoad", "load"),
|
|
2713
|
+
}, Vo = St("safeLoad", "load"), Po = St("safeLoadAll", "loadAll"), Do = St("safeDump", "dump"), Jo = {
|
|
2714
2714
|
Type: $o,
|
|
2715
2715
|
Schema: Ko,
|
|
2716
2716
|
FAILSAFE_SCHEMA: Mo,
|
|
@@ -2723,8 +2723,8 @@ var $o = de, Ko = vn, Mo = wn, Eo = xn, Fo = jn, No = kt, qo = Jn.load, Bo = Jn.
|
|
|
2723
2723
|
YAMLException: Uo,
|
|
2724
2724
|
types: Ro,
|
|
2725
2725
|
safeLoad: Vo,
|
|
2726
|
-
safeLoadAll:
|
|
2727
|
-
safeDump:
|
|
2726
|
+
safeLoadAll: Po,
|
|
2727
|
+
safeDump: Do
|
|
2728
2728
|
};
|
|
2729
2729
|
const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
2730
2730
|
__name: "YamlCodeBlock",
|
|
@@ -2736,14 +2736,17 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
2736
2736
|
}
|
|
2737
2737
|
},
|
|
2738
2738
|
setup(e) {
|
|
2739
|
-
const t = e, n = A(() =>
|
|
2739
|
+
const t = e, n = A(() => {
|
|
2740
|
+
const a = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2741
|
+
return Object.keys(a).length === 0 && a.constructor === Object ? "" : Jo.dump(a).trim();
|
|
2742
|
+
});
|
|
2740
2743
|
return (a, i) => {
|
|
2741
2744
|
const o = q("KCodeBlock");
|
|
2742
2745
|
return p(), j("div", Ho, [
|
|
2743
2746
|
t.yamlRecord ? (p(), N(o, {
|
|
2744
2747
|
key: 0,
|
|
2745
2748
|
id: "yaml-codeblock",
|
|
2746
|
-
code:
|
|
2749
|
+
code: n.value,
|
|
2747
2750
|
language: "yaml",
|
|
2748
2751
|
theme: "dark"
|
|
2749
2752
|
}, null, 8, ["code"])) : H("", !0)
|
|
@@ -2808,7 +2811,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
2808
2811
|
class: Ae(`config-card-details-${s}-props`),
|
|
2809
2812
|
"data-testid": `config-card-details-${s}-props`
|
|
2810
2813
|
}, [
|
|
2811
|
-
s !== "basic" ? (p(), j("div", Wo, E(s === "advanced" ?
|
|
2814
|
+
s !== "basic" ? (p(), j("div", Wo, E(s === "advanced" ? g(a)("baseConfigCard.sections.advanced") : g(a)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2812
2815
|
(p(!0), j(ge, null, me(e.propertyCollections[s], (u) => (p(), N(Ve, {
|
|
2813
2816
|
key: u.key,
|
|
2814
2817
|
item: u
|
|
@@ -3053,7 +3056,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3053
3056
|
}
|
|
3054
3057
|
], d = M("structured"), v = (I) => {
|
|
3055
3058
|
d.value = I == null ? void 0 : I.value;
|
|
3056
|
-
},
|
|
3059
|
+
}, m = {
|
|
3057
3060
|
id: {
|
|
3058
3061
|
type: Z.ID,
|
|
3059
3062
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
@@ -3093,7 +3096,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3093
3096
|
return [];
|
|
3094
3097
|
const B = [], J = Object.keys(b.value).length;
|
|
3095
3098
|
for (const z in b.value) {
|
|
3096
|
-
const Q = (V = (I = i.configSchema) == null ? void 0 : I[z]) == null ? void 0 : V.order, te = (K =
|
|
3099
|
+
const Q = (V = (I = i.configSchema) == null ? void 0 : I[z]) == null ? void 0 : V.order, te = (K = m[z]) == null ? void 0 : K.order;
|
|
3097
3100
|
let re = J;
|
|
3098
3101
|
(te || te === 0) && (re = te === -1 ? J + 1 : te), Q && (re = Q === -1 ? J + 1 : Q), B.push([z, re]);
|
|
3099
3102
|
}
|
|
@@ -3101,7 +3104,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3101
3104
|
return z[1] - Q[1];
|
|
3102
3105
|
}), B.map((z) => {
|
|
3103
3106
|
var Q, te;
|
|
3104
|
-
const re = z[0], ne = (Q = b.value) == null ? void 0 : Q[re], X = ((te = i.configSchema) == null ? void 0 : te[re]) || {}, se =
|
|
3107
|
+
const re = z[0], ne = (Q = b.value) == null ? void 0 : Q[re], X = ((te = i.configSchema) == null ? void 0 : te[re]) || {}, se = m[re];
|
|
3105
3108
|
return {
|
|
3106
3109
|
key: re,
|
|
3107
3110
|
value: ne,
|
|
@@ -3210,7 +3213,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3210
3213
|
rel: "noopener",
|
|
3211
3214
|
target: "_blank"
|
|
3212
3215
|
}, [
|
|
3213
|
-
O(
|
|
3216
|
+
O(g(il), { size: g(ui) }, null, 8, ["size"])
|
|
3214
3217
|
], 8, ll)
|
|
3215
3218
|
]),
|
|
3216
3219
|
_: 1
|
|
@@ -3224,7 +3227,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3224
3227
|
onClick: (X) => R(ne)
|
|
3225
3228
|
}, {
|
|
3226
3229
|
default: h(() => [
|
|
3227
|
-
G(E(
|
|
3230
|
+
G(E(g(r)("baseConfigCard.actions.copy")), 1)
|
|
3228
3231
|
]),
|
|
3229
3232
|
_: 2
|
|
3230
3233
|
}, 1032, ["onClick"])) : H("", !0)
|
|
@@ -3274,7 +3277,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3274
3277
|
class: Ae(`config-card-details-${ne}-props`),
|
|
3275
3278
|
"data-testid": `config-card-details-${ne}-props`
|
|
3276
3279
|
}, [
|
|
3277
|
-
ne !== "basic" ? (p(), j("div", dl, E(ne === "advanced" ?
|
|
3280
|
+
ne !== "basic" ? (p(), j("div", dl, E(ne === "advanced" ? g(r)("baseConfigCard.sections.advanced") : g(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3278
3281
|
(p(!0), j(ge, null, me(C.value[ne], (X) => (p(), N(Ve, {
|
|
3279
3282
|
key: X.key,
|
|
3280
3283
|
item: X
|
|
@@ -3308,7 +3311,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3308
3311
|
fn: h(() => [
|
|
3309
3312
|
U("div", rl, [
|
|
3310
3313
|
ee(I.$slots, "title", {}, () => [
|
|
3311
|
-
G(E(
|
|
3314
|
+
G(E(g(r)("baseConfigCard.title")), 1)
|
|
3312
3315
|
], !0)
|
|
3313
3316
|
])
|
|
3314
3317
|
]),
|
|
@@ -3377,12 +3380,12 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3377
3380
|
var n;
|
|
3378
3381
|
const a = t, i = e, o = ft(), { i18n: { t: r } } = ce.useI18n(), { getMessageFromError: l } = ce.useErrors(), { axiosInstance: s } = ce.useAxios({
|
|
3379
3382
|
headers: (n = i.config) == null ? void 0 : n.requestHeaders
|
|
3380
|
-
}), u = M(!1), c = M(!1), d = M(""), v = A(() => i.canSubmit === !1 || i.isReadonly),
|
|
3383
|
+
}), u = M(!1), c = M(!1), d = M(""), v = A(() => i.canSubmit === !1 || i.isReadonly), m = M(!1), _ = A(() => {
|
|
3381
3384
|
var C, w;
|
|
3382
3385
|
let F = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3383
3386
|
return i.config.app === "konnect" ? F = F.replace(/{controlPlaneId}/gi, ((C = i.config) == null ? void 0 : C.controlPlaneId) || "") : i.config.app === "kongManager" && (F = F.replace(/\/{workspace}/gi, (w = i.config) != null && w.workspace ? `/${i.config.workspace}` : "")), i.editId ? (F = F.replace(/{id}/gi, i.editId), F) : (F = F.replace(/\/{id}/gi, ""), F);
|
|
3384
3387
|
}), k = () => {
|
|
3385
|
-
|
|
3388
|
+
m.value = !m.value;
|
|
3386
3389
|
}, x = () => {
|
|
3387
3390
|
i.config.cancelRoute ? o.push(i.config.cancelRoute) : b();
|
|
3388
3391
|
}, b = () => {
|
|
@@ -3422,7 +3425,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3422
3425
|
type: "form"
|
|
3423
3426
|
})) : c.value ? (p(), N(L, {
|
|
3424
3427
|
key: 1,
|
|
3425
|
-
"cta-text":
|
|
3428
|
+
"cta-text": g(r)("baseForm.actions.back"),
|
|
3426
3429
|
"data-testid": "form-fetch-error",
|
|
3427
3430
|
"handle-click": x,
|
|
3428
3431
|
"is-error": !0
|
|
@@ -3453,7 +3456,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3453
3456
|
onClick: w[0] || (w[0] = (J) => k())
|
|
3454
3457
|
}, {
|
|
3455
3458
|
default: h(() => [
|
|
3456
|
-
G(E(
|
|
3459
|
+
G(E(g(r)("baseForm.actions.viewConfiguration")), 1)
|
|
3457
3460
|
]),
|
|
3458
3461
|
_: 1
|
|
3459
3462
|
})
|
|
@@ -3465,7 +3468,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3465
3468
|
type: "reset"
|
|
3466
3469
|
}, {
|
|
3467
3470
|
default: h(() => [
|
|
3468
|
-
G(E(
|
|
3471
|
+
G(E(g(r)("baseForm.actions.cancel")), 1)
|
|
3469
3472
|
]),
|
|
3470
3473
|
_: 1
|
|
3471
3474
|
}, 8, ["disabled"]),
|
|
@@ -3476,7 +3479,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3476
3479
|
type: "submit"
|
|
3477
3480
|
}, {
|
|
3478
3481
|
default: h(() => [
|
|
3479
|
-
G(E(
|
|
3482
|
+
G(E(g(r)("baseForm.actions.save")), 1)
|
|
3480
3483
|
]),
|
|
3481
3484
|
_: 1
|
|
3482
3485
|
}, 8, ["disabled"])
|
|
@@ -3487,13 +3490,13 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3487
3490
|
"close-button-alignment": "end",
|
|
3488
3491
|
"data-testid": "form-view-configuration-slideout",
|
|
3489
3492
|
"has-overlay": !1,
|
|
3490
|
-
"is-visible":
|
|
3493
|
+
"is-visible": m.value,
|
|
3491
3494
|
"prevent-close-on-blur": "",
|
|
3492
|
-
title:
|
|
3495
|
+
title: g(r)("baseForm.configuration.title"),
|
|
3493
3496
|
onClose: w[1] || (w[1] = (J) => k())
|
|
3494
3497
|
}, {
|
|
3495
3498
|
default: h(() => [
|
|
3496
|
-
U("div", null, E(
|
|
3499
|
+
U("div", null, E(g(r)("baseForm.configuration.message")), 1),
|
|
3497
3500
|
O(V, {
|
|
3498
3501
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3499
3502
|
tabs: T.value
|
|
@@ -3554,7 +3557,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3554
3557
|
}, l = () => {
|
|
3555
3558
|
var k, x, b;
|
|
3556
3559
|
u.value = ((k = a.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, c.value = ((x = n.value) == null ? void 0 : x.clientWidth) || 0, d.value = ((b = s.value) == null ? void 0 : b.innerText) || "";
|
|
3557
|
-
}, s = M({}), u = M(0), c = M(0), d = M(""), v = A(() => [a.value, n.value]),
|
|
3560
|
+
}, s = M({}), u = M(0), c = M(0), d = M(""), v = A(() => [a.value, n.value]), m = ke(
|
|
3558
3561
|
v,
|
|
3559
3562
|
(k) => {
|
|
3560
3563
|
if (i.value && (r(), "ResizeObserver" in window && window)) {
|
|
@@ -3572,7 +3575,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3572
3575
|
return la(() => {
|
|
3573
3576
|
l();
|
|
3574
3577
|
}), sa(() => {
|
|
3575
|
-
|
|
3578
|
+
m();
|
|
3576
3579
|
}), (k, x) => {
|
|
3577
3580
|
const b = q("KTooltip");
|
|
3578
3581
|
return p(), j("span", {
|
|
@@ -3749,7 +3752,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3749
3752
|
overflowX: "hidden",
|
|
3750
3753
|
textOverflow: "ellipsis"
|
|
3751
3754
|
}), F;
|
|
3752
|
-
},
|
|
3755
|
+
}, m = () => {
|
|
3753
3756
|
a("empty-state-cta-clicked"), _();
|
|
3754
3757
|
}, _ = () => {
|
|
3755
3758
|
a("clear-search-input");
|
|
@@ -3781,12 +3784,12 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3781
3784
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3782
3785
|
"disable-sorting": e.disableSorting,
|
|
3783
3786
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3784
|
-
"empty-state-action-message": e.query ?
|
|
3787
|
+
"empty-state-action-message": e.query ? g(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3785
3788
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3786
3789
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3787
3790
|
"empty-state-icon-size": "96",
|
|
3788
|
-
"empty-state-message": e.query ?
|
|
3789
|
-
"empty-state-title": e.query ?
|
|
3791
|
+
"empty-state-message": e.query ? g(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3792
|
+
"empty-state-title": e.query ? g(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3790
3793
|
"enable-client-sort": e.enableClientSort,
|
|
3791
3794
|
"error-state-message": o.value.message,
|
|
3792
3795
|
"error-state-title": o.value.title,
|
|
@@ -3800,7 +3803,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3800
3803
|
"pagination-type": e.paginationType,
|
|
3801
3804
|
"row-attrs": u,
|
|
3802
3805
|
"search-input": e.query,
|
|
3803
|
-
onKtableEmptyStateCtaClicked:
|
|
3806
|
+
onKtableEmptyStateCtaClicked: m,
|
|
3804
3807
|
"onRow:click": k.value,
|
|
3805
3808
|
onSort: F[0] || (F[0] = (B) => x(B)),
|
|
3806
3809
|
"onUpdate:tablePreferences": C
|
|
@@ -3839,7 +3842,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3839
3842
|
}, {
|
|
3840
3843
|
icon: h(() => [
|
|
3841
3844
|
O(L, {
|
|
3842
|
-
color:
|
|
3845
|
+
color: g(si),
|
|
3843
3846
|
icon: "more",
|
|
3844
3847
|
size: "16"
|
|
3845
3848
|
}, null, 8, ["color"])
|
|
@@ -3951,7 +3954,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
3951
3954
|
_: 1
|
|
3952
3955
|
})
|
|
3953
3956
|
])) : H("", !0),
|
|
3954
|
-
O(
|
|
3957
|
+
O(g(n), {
|
|
3955
3958
|
class: "message",
|
|
3956
3959
|
keypath: a.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3957
3960
|
tag: "p"
|
|
@@ -4068,7 +4071,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4068
4071
|
value: C,
|
|
4069
4072
|
label: C
|
|
4070
4073
|
}));
|
|
4071
|
-
},
|
|
4074
|
+
}, m = (b) => {
|
|
4072
4075
|
var f, T;
|
|
4073
4076
|
return ((T = (f = a.config.schema) == null ? void 0 : f[b]) == null ? void 0 : T.type) ?? "text";
|
|
4074
4077
|
}, _ = (b) => {
|
|
@@ -4105,7 +4108,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4105
4108
|
}, {
|
|
4106
4109
|
default: h(() => [
|
|
4107
4110
|
O(Qt),
|
|
4108
|
-
G(" " + E(
|
|
4111
|
+
G(" " + E(g(n)("filter.filterButtonText")) + " " + E(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4109
4112
|
]),
|
|
4110
4113
|
_: 1
|
|
4111
4114
|
}),
|
|
@@ -4138,22 +4141,22 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4138
4141
|
U("label", {
|
|
4139
4142
|
class: "menu-item-label",
|
|
4140
4143
|
for: d(R.value)
|
|
4141
|
-
}, E(
|
|
4144
|
+
}, E(g(n)("filter.fieldLabel")), 9, Ll),
|
|
4142
4145
|
((K = (V = e.config.schema) == null ? void 0 : V[R.value]) == null ? void 0 : K.type) === "select" ? (p(), N(w, {
|
|
4143
4146
|
key: 0,
|
|
4144
4147
|
id: d(R.value),
|
|
4145
4148
|
modelValue: r.value[R.value],
|
|
4146
4149
|
"onUpdate:modelValue": (B) => r.value[R.value] = B,
|
|
4147
4150
|
items: v(R.value),
|
|
4148
|
-
placeholder:
|
|
4151
|
+
placeholder: g(n)("filter.selectPlaceholder")
|
|
4149
4152
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (p(), N(T, {
|
|
4150
4153
|
key: 1,
|
|
4151
4154
|
id: d(R.value),
|
|
4152
4155
|
modelValue: r.value[R.value],
|
|
4153
4156
|
"onUpdate:modelValue": (B) => r.value[R.value] = B,
|
|
4154
4157
|
autocomplete: "off",
|
|
4155
|
-
placeholder:
|
|
4156
|
-
type:
|
|
4158
|
+
placeholder: g(n)("filter.inputPlaceholder"),
|
|
4159
|
+
type: m(R.value)
|
|
4157
4160
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4158
4161
|
]),
|
|
4159
4162
|
U("div", Ul, [
|
|
@@ -4164,7 +4167,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4164
4167
|
onClick: f[0] || (f[0] = (B) => x(!0))
|
|
4165
4168
|
}, {
|
|
4166
4169
|
default: h(() => [
|
|
4167
|
-
G(E(
|
|
4170
|
+
G(E(g(n)("filter.applyButtonText")), 1)
|
|
4168
4171
|
]),
|
|
4169
4172
|
_: 1
|
|
4170
4173
|
}),
|
|
@@ -4175,7 +4178,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4175
4178
|
onClick: (B) => _(R.value)
|
|
4176
4179
|
}, {
|
|
4177
4180
|
default: h(() => [
|
|
4178
|
-
G(E(
|
|
4181
|
+
G(E(g(n)("filter.clearButtonText")), 1)
|
|
4179
4182
|
]),
|
|
4180
4183
|
_: 2
|
|
4181
4184
|
}, 1032, ["onClick"])
|
|
@@ -4193,7 +4196,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4193
4196
|
onClick: k
|
|
4194
4197
|
}, {
|
|
4195
4198
|
default: h(() => [
|
|
4196
|
-
G(E(
|
|
4199
|
+
G(E(g(n)("filter.clearAllButtonText")), 1)
|
|
4197
4200
|
]),
|
|
4198
4201
|
_: 1
|
|
4199
4202
|
})
|
|
@@ -4206,7 +4209,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4206
4209
|
]));
|
|
4207
4210
|
};
|
|
4208
4211
|
}
|
|
4209
|
-
}),
|
|
4212
|
+
}), Pl = /* @__PURE__ */ be(Vl, [["__scopeId", "data-v-e9512e8f"]]), ze = /* @__PURE__ */ ie({
|
|
4210
4213
|
__name: "PermissionsWrapper",
|
|
4211
4214
|
props: {
|
|
4212
4215
|
/**
|
|
@@ -4236,7 +4239,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4236
4239
|
isAllowed: n.value
|
|
4237
4240
|
}) : H("", !0);
|
|
4238
4241
|
}
|
|
4239
|
-
}),
|
|
4242
|
+
}), Dl = { class: "form-section-wrapper" }, Jl = {
|
|
4240
4243
|
key: 0,
|
|
4241
4244
|
class: "form-section-title"
|
|
4242
4245
|
}, Hl = {
|
|
@@ -4274,18 +4277,18 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4274
4277
|
return (n, a) => (p(), j("fieldset", {
|
|
4275
4278
|
class: Ae(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4276
4279
|
}, [
|
|
4277
|
-
U("div",
|
|
4280
|
+
U("div", Dl, [
|
|
4278
4281
|
e.hideInfoHeader ? H("", !0) : (p(), j("div", {
|
|
4279
4282
|
key: 0,
|
|
4280
4283
|
class: Ae(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4281
4284
|
}, [
|
|
4282
4285
|
e.title ? (p(), j("h4", Jl, E(e.title), 1)) : H("", !0),
|
|
4283
|
-
e.description ||
|
|
4286
|
+
e.description || g(t).description ? (p(), j("div", Hl, [
|
|
4284
4287
|
ee(n.$slots, "description", {}, () => [
|
|
4285
4288
|
U("p", null, E(e.description), 1)
|
|
4286
4289
|
], !0)
|
|
4287
4290
|
])) : H("", !0),
|
|
4288
|
-
|
|
4291
|
+
g(t).footer ? (p(), j("div", zl, [
|
|
4289
4292
|
ee(n.$slots, "footer", {}, void 0, !0)
|
|
4290
4293
|
])) : H("", !0)
|
|
4291
4294
|
], 2)),
|
|
@@ -4350,10 +4353,10 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4350
4353
|
tags: { label: i("keys.list.table_headers.tags") },
|
|
4351
4354
|
id: { label: i("keys.list.table_headers.id"), sortable: !0 }
|
|
4352
4355
|
}, c = u, d = A(() => {
|
|
4353
|
-
var S,
|
|
4356
|
+
var S, D, W, ue;
|
|
4354
4357
|
let y = `${a.config.apiBaseUrl}${Se.list[a.config.app][a.config.keySetId ? "forKeySet" : "all"]}`;
|
|
4355
|
-
return a.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((S = a.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{keySetId}/gi, ((
|
|
4356
|
-
}), v = M(""),
|
|
4358
|
+
return a.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((S = a.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{keySetId}/gi, ((D = a.config) == null ? void 0 : D.keySetId) || "") : a.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (W = a.config) != null && W.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, ((ue = a.config) == null ? void 0 : ue.keySetId) || "")), y;
|
|
4359
|
+
}), v = M(""), m = A(() => {
|
|
4357
4360
|
const y = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4358
4361
|
if (y)
|
|
4359
4362
|
return {
|
|
@@ -4371,15 +4374,15 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4371
4374
|
}, b = () => {
|
|
4372
4375
|
l.value++;
|
|
4373
4376
|
}, f = M(null), T = (y, S) => {
|
|
4374
|
-
const
|
|
4375
|
-
if (!S(
|
|
4377
|
+
const D = y.id;
|
|
4378
|
+
if (!S(D)) {
|
|
4376
4379
|
L(y, "id");
|
|
4377
4380
|
return;
|
|
4378
4381
|
}
|
|
4379
4382
|
F(y, "id");
|
|
4380
4383
|
}, C = (y, S) => {
|
|
4381
|
-
const
|
|
4382
|
-
if (!S(
|
|
4384
|
+
const D = JSON.stringify(y);
|
|
4385
|
+
if (!S(D)) {
|
|
4383
4386
|
n("copy:error", {
|
|
4384
4387
|
entity: y,
|
|
4385
4388
|
message: i("keys.errors.copy")
|
|
@@ -4390,9 +4393,9 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4390
4393
|
entity: y,
|
|
4391
4394
|
message: i("keys.copy.success_brief")
|
|
4392
4395
|
});
|
|
4393
|
-
}, w = (y, S,
|
|
4396
|
+
}, w = (y, S, D) => {
|
|
4394
4397
|
const { type: W } = y;
|
|
4395
|
-
W === "success" ? F(S,
|
|
4398
|
+
W === "success" ? F(S, D) : L(S, D);
|
|
4396
4399
|
}, F = (y, S) => {
|
|
4397
4400
|
n("copy:success", {
|
|
4398
4401
|
entity: y,
|
|
@@ -4406,8 +4409,8 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4406
4409
|
message: i("keys.errors.copy")
|
|
4407
4410
|
});
|
|
4408
4411
|
}, R = async (y) => {
|
|
4409
|
-
var
|
|
4410
|
-
await ((
|
|
4412
|
+
var D;
|
|
4413
|
+
await ((D = a.canRetrieve) == null ? void 0 : D.call(a, y)) && o.push(a.config.getViewRoute(y.id));
|
|
4411
4414
|
}, I = (y) => ({
|
|
4412
4415
|
label: i("keys.actions.view"),
|
|
4413
4416
|
to: a.config.getViewRoute(y)
|
|
@@ -4419,24 +4422,24 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4419
4422
|
}, re = () => {
|
|
4420
4423
|
B.value = !1;
|
|
4421
4424
|
}, ne = async () => {
|
|
4422
|
-
var y, S,
|
|
4425
|
+
var y, S, D;
|
|
4423
4426
|
if ((y = K.value) != null && y.id) {
|
|
4424
4427
|
J.value = !0;
|
|
4425
4428
|
try {
|
|
4426
4429
|
await r.delete(Q(K.value.id)), J.value = !1, B.value = !1, l.value++, n("delete:success", K.value);
|
|
4427
4430
|
} catch (W) {
|
|
4428
|
-
z.value = ((
|
|
4431
|
+
z.value = ((D = (S = W.response) == null ? void 0 : S.data) == null ? void 0 : D.message) || W.message || i("keys.errors.delete"), n("error", W);
|
|
4429
4432
|
} finally {
|
|
4430
4433
|
J.value = !1;
|
|
4431
4434
|
}
|
|
4432
4435
|
}
|
|
4433
4436
|
}, X = M(!0);
|
|
4434
4437
|
ke(k, (y) => {
|
|
4435
|
-
var S,
|
|
4438
|
+
var S, D, W, ue;
|
|
4436
4439
|
if (Array.isArray((S = y == null ? void 0 : y.response) == null ? void 0 : S.data) && (X.value = y.response.data.length > 0), y.status === je.Error) {
|
|
4437
4440
|
f.value = {
|
|
4438
4441
|
title: i("keys.errors.general")
|
|
4439
|
-
}, (ue = (W = (
|
|
4442
|
+
}, (ue = (W = (D = y.error) == null ? void 0 : D.response) == null ? void 0 : W.data) != null && ue.message && (f.value.message = y.error.response.data.message), n("error", y.error);
|
|
4440
4443
|
return;
|
|
4441
4444
|
}
|
|
4442
4445
|
f.value = null;
|
|
@@ -4450,31 +4453,31 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4450
4453
|
return tt(async () => {
|
|
4451
4454
|
await a.canCreate() && (se.value.title = i("keys.list.empty_state.title"), se.value.ctaText = i("keys.actions.create"));
|
|
4452
4455
|
}), (y, S) => {
|
|
4453
|
-
const
|
|
4456
|
+
const D = q("KButton"), W = q("CopyUuid"), ue = q("KBadge"), P = q("KTruncate"), Y = q("KDropdownItem"), It = q("KClipboardProvider");
|
|
4454
4457
|
return p(), j("div", ts, [
|
|
4455
|
-
O(
|
|
4458
|
+
O(g(Il), {
|
|
4456
4459
|
"cache-identifier": e.cacheIdentifier,
|
|
4457
4460
|
"disable-pagination-page-jump": "",
|
|
4458
4461
|
"disable-sorting": s.value,
|
|
4459
4462
|
"empty-state-options": se.value,
|
|
4460
4463
|
"enable-entity-actions": "",
|
|
4461
4464
|
"error-message": f.value,
|
|
4462
|
-
fetcher:
|
|
4465
|
+
fetcher: g(_),
|
|
4463
4466
|
"fetcher-cache-key": l.value,
|
|
4464
4467
|
"pagination-type": "offset",
|
|
4465
4468
|
"preferences-storage-key": "kong-ui-entities-keys-list",
|
|
4466
4469
|
query: v.value,
|
|
4467
|
-
"table-headers":
|
|
4470
|
+
"table-headers": g(c),
|
|
4468
4471
|
"use-action-outside": e.useActionOutside,
|
|
4469
4472
|
onClearSearchInput: x,
|
|
4470
4473
|
"onClick:row": S[2] || (S[2] = (ae) => R(ae)),
|
|
4471
4474
|
onSort: b
|
|
4472
4475
|
}, {
|
|
4473
4476
|
"toolbar-filter": h(() => [
|
|
4474
|
-
O(
|
|
4477
|
+
O(g(Pl), {
|
|
4475
4478
|
modelValue: v.value,
|
|
4476
4479
|
"onUpdate:modelValue": S[0] || (S[0] = (ae) => v.value = ae),
|
|
4477
|
-
config:
|
|
4480
|
+
config: m.value
|
|
4478
4481
|
}, null, 8, ["modelValue", "config"])
|
|
4479
4482
|
]),
|
|
4480
4483
|
"toolbar-button": h(() => [
|
|
@@ -4482,18 +4485,18 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4482
4485
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4483
4486
|
}, {
|
|
4484
4487
|
default: h(() => [
|
|
4485
|
-
O(
|
|
4488
|
+
O(g(ze), {
|
|
4486
4489
|
"auth-function": () => e.canCreate()
|
|
4487
4490
|
}, {
|
|
4488
4491
|
default: h(() => [
|
|
4489
|
-
Ue(O(
|
|
4492
|
+
Ue(O(D, {
|
|
4490
4493
|
appearance: "primary",
|
|
4491
4494
|
"data-testid": "toolbar-add-key",
|
|
4492
4495
|
icon: "plus",
|
|
4493
4496
|
to: e.config.createRoute
|
|
4494
4497
|
}, {
|
|
4495
4498
|
default: h(() => [
|
|
4496
|
-
G(E(
|
|
4499
|
+
G(E(g(i)("keys.list.toolbar_actions.new_key")), 1)
|
|
4497
4500
|
]),
|
|
4498
4501
|
_: 1
|
|
4499
4502
|
}, 8, ["to"]), [
|
|
@@ -4516,7 +4519,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4516
4519
|
}, null, 8, ["notify", "uuid"])
|
|
4517
4520
|
]),
|
|
4518
4521
|
tags: h(({ rowValue: ae }) => [
|
|
4519
|
-
(ae == null ? void 0 : ae.length) > 0 ? (p(), N(
|
|
4522
|
+
(ae == null ? void 0 : ae.length) > 0 ? (p(), N(P, { key: 0 }, {
|
|
4520
4523
|
default: h(() => [
|
|
4521
4524
|
(p(!0), j(ge, null, me(ae, (ve) => (p(), N(ue, {
|
|
4522
4525
|
key: ve,
|
|
@@ -4546,7 +4549,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4546
4549
|
onClick: (qe) => T(ae, ve)
|
|
4547
4550
|
}, {
|
|
4548
4551
|
default: h(() => [
|
|
4549
|
-
G(E(
|
|
4552
|
+
G(E(g(i)("keys.actions.copy_id")), 1)
|
|
4550
4553
|
]),
|
|
4551
4554
|
_: 2
|
|
4552
4555
|
}, 1032, ["onClick"])
|
|
@@ -4560,14 +4563,14 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4560
4563
|
onClick: (qe) => C(ae, ve)
|
|
4561
4564
|
}, {
|
|
4562
4565
|
default: h(() => [
|
|
4563
|
-
G(E(
|
|
4566
|
+
G(E(g(i)("keys.actions.copy_json")), 1)
|
|
4564
4567
|
]),
|
|
4565
4568
|
_: 2
|
|
4566
4569
|
}, 1032, ["onClick"])
|
|
4567
4570
|
]),
|
|
4568
4571
|
_: 2
|
|
4569
4572
|
}, 1024),
|
|
4570
|
-
O(
|
|
4573
|
+
O(g(ze), {
|
|
4571
4574
|
"auth-function": () => e.canRetrieve(ae)
|
|
4572
4575
|
}, {
|
|
4573
4576
|
default: h(() => [
|
|
@@ -4579,7 +4582,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4579
4582
|
]),
|
|
4580
4583
|
_: 2
|
|
4581
4584
|
}, 1032, ["auth-function"]),
|
|
4582
|
-
O(
|
|
4585
|
+
O(g(ze), {
|
|
4583
4586
|
"auth-function": () => e.canEdit(ae)
|
|
4584
4587
|
}, {
|
|
4585
4588
|
default: h(() => [
|
|
@@ -4590,7 +4593,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4590
4593
|
]),
|
|
4591
4594
|
_: 2
|
|
4592
4595
|
}, 1032, ["auth-function"]),
|
|
4593
|
-
O(
|
|
4596
|
+
O(g(ze), {
|
|
4594
4597
|
"auth-function": () => e.canDelete(ae)
|
|
4595
4598
|
}, {
|
|
4596
4599
|
default: h(() => [
|
|
@@ -4601,7 +4604,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4601
4604
|
onClick: (ve) => te(ae)
|
|
4602
4605
|
}, {
|
|
4603
4606
|
default: h(() => [
|
|
4604
|
-
G(E(
|
|
4607
|
+
G(E(g(i)("keys.actions.delete")), 1)
|
|
4605
4608
|
]),
|
|
4606
4609
|
_: 2
|
|
4607
4610
|
}, 1032, ["onClick"])
|
|
@@ -4611,14 +4614,14 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4611
4614
|
]),
|
|
4612
4615
|
_: 1
|
|
4613
4616
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4614
|
-
O(
|
|
4617
|
+
O(g(Tl), {
|
|
4615
4618
|
"action-pending": J.value,
|
|
4616
|
-
description:
|
|
4619
|
+
description: g(i)("keys.delete.description"),
|
|
4617
4620
|
"entity-name": K.value && (K.value.name || K.value.id),
|
|
4618
|
-
"entity-type":
|
|
4621
|
+
"entity-type": g(ln).Key,
|
|
4619
4622
|
error: z.value,
|
|
4620
4623
|
"need-confirm": !1,
|
|
4621
|
-
title:
|
|
4624
|
+
title: g(i)("keys.delete.title"),
|
|
4622
4625
|
visible: B.value,
|
|
4623
4626
|
onCancel: re,
|
|
4624
4627
|
onProceed: ne
|
|
@@ -4699,40 +4702,40 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4699
4702
|
label: o("keys.form.fields.key_format.options.pem"),
|
|
4700
4703
|
value: "pem"
|
|
4701
4704
|
}
|
|
4702
|
-
],
|
|
4705
|
+
], m = A(() => c.isReadonly || u.value === Be.Create && !!a.fixedKeySetId), _ = A(() => !m.value);
|
|
4703
4706
|
ke(() => a.fixedKeySetId, (y) => {
|
|
4704
4707
|
u.value === Be.Create && (c.fields.key_set = y);
|
|
4705
4708
|
}, { immediate: !0 });
|
|
4706
4709
|
const k = A(() => JSON.stringify(c.fields) !== JSON.stringify(d) && !!c.fields.key_id && !!c.fields.key_format && (c.fields.key_format === "jwk" && !!c.fields.jwk || c.fields.key_format === "pem" && !!c.fields.private_key && !!c.fields.public_key)), x = (y) => {
|
|
4707
|
-
var S,
|
|
4708
|
-
c.fields.key_id = (y == null ? void 0 : y.kid) || "", c.fields.name = (y == null ? void 0 : y.name) || "", c.fields.tags = ((S = y == null ? void 0 : y.tags) == null ? void 0 : S.join(", ")) || "", c.fields.key_set = ((
|
|
4710
|
+
var S, D, W, ue;
|
|
4711
|
+
c.fields.key_id = (y == null ? void 0 : y.kid) || "", c.fields.name = (y == null ? void 0 : y.name) || "", c.fields.tags = ((S = y == null ? void 0 : y.tags) == null ? void 0 : S.join(", ")) || "", c.fields.key_set = ((D = y == null ? void 0 : y.set) == null ? void 0 : D.id) || "", c.fields.key_format = y != null && y.pem ? "pem" : "jwk", c.fields.jwk = (y == null ? void 0 : y.jwk) || "", c.fields.private_key = ((W = y == null ? void 0 : y.pem) == null ? void 0 : W.private_key) || "", c.fields.public_key = ((ue = y == null ? void 0 : y.pem) == null ? void 0 : ue.public_key) || "", Object.assign(d, c.fields);
|
|
4709
4712
|
}, b = () => {
|
|
4710
4713
|
i.push(a.config.cancelRoute);
|
|
4711
4714
|
}, f = A(() => {
|
|
4712
|
-
var S,
|
|
4715
|
+
var S, D;
|
|
4713
4716
|
let y = `${a.config.apiBaseUrl}${Se.form[a.config.app][u.value][a.keySetId ? "forKeySet" : "all"]}`;
|
|
4714
|
-
return a.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((S = a.config) == null ? void 0 : S.controlPlaneId) || "") : a.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (
|
|
4717
|
+
return a.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((S = a.config) == null ? void 0 : S.controlPlaneId) || "") : a.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (D = a.config) != null && D.workspace ? `/${a.config.workspace}` : "")), y = y.replace(/{id}/gi, a.keyId).replace(/{keySetId}/gi, a.keySetId || ""), y;
|
|
4715
4718
|
}), T = A(() => {
|
|
4716
|
-
var y, S,
|
|
4719
|
+
var y, S, D;
|
|
4717
4720
|
return {
|
|
4718
4721
|
kid: c.fields.key_id,
|
|
4719
4722
|
name: c.fields.name || null,
|
|
4720
|
-
tags: ((
|
|
4723
|
+
tags: ((D = (S = (y = c.fields.tags) == null ? void 0 : y.split(",")) == null ? void 0 : S.map((W) => String(W || "").trim())) == null ? void 0 : D.filter((W) => W !== "")) || [],
|
|
4721
4724
|
set: c.fields.key_set ? { id: c.fields.key_set } : null,
|
|
4722
4725
|
jwk: c.fields.key_format === "jwk" ? c.fields.jwk : null,
|
|
4723
4726
|
pem: c.fields.key_format === "pem" ? { private_key: c.fields.private_key, public_key: c.fields.public_key } : null
|
|
4724
4727
|
};
|
|
4725
4728
|
}), C = async () => {
|
|
4726
|
-
var y, S,
|
|
4729
|
+
var y, S, D, W, ue;
|
|
4727
4730
|
try {
|
|
4728
4731
|
c.isReadonly = !0;
|
|
4729
|
-
let
|
|
4730
|
-
if (u.value === "create" ?
|
|
4731
|
-
const { data: Y } =
|
|
4732
|
-
c.fields.key_id = (Y == null ? void 0 : Y.kid) || "", c.fields.name = (Y == null ? void 0 : Y.name) || "", c.fields.tags = ((S = Y == null ? void 0 : Y.tags) == null ? void 0 : S.join(", ")) || "", c.fields.key_set = ((
|
|
4732
|
+
let P;
|
|
4733
|
+
if (u.value === "create" ? P = await l.post(f.value, T.value) : u.value === "edit" && (P = ((y = a.config) == null ? void 0 : y.app) === "konnect" ? await l.put(f.value, T.value) : await l.patch(f.value, T.value)), P) {
|
|
4734
|
+
const { data: Y } = P;
|
|
4735
|
+
c.fields.key_id = (Y == null ? void 0 : Y.kid) || "", c.fields.name = (Y == null ? void 0 : Y.name) || "", c.fields.tags = ((S = Y == null ? void 0 : Y.tags) == null ? void 0 : S.join(", ")) || "", c.fields.key_set = ((D = Y == null ? void 0 : Y.set) == null ? void 0 : D.id) || "", c.fields.key_format = Y != null && Y.pem ? "pem" : "jwk", c.fields.jwk = (Y == null ? void 0 : Y.jwk) || "", c.fields.private_key = ((W = Y == null ? void 0 : Y.pem) == null ? void 0 : W.private_key) || "", c.fields.public_key = ((ue = Y == null ? void 0 : Y.pem) == null ? void 0 : ue.public_key) || "", Object.assign(d, c.fields), n("update", P == null ? void 0 : P.data);
|
|
4733
4736
|
}
|
|
4734
|
-
} catch (
|
|
4735
|
-
c.errorMessage = r(
|
|
4737
|
+
} catch (P) {
|
|
4738
|
+
c.errorMessage = r(P), n("error", P);
|
|
4736
4739
|
} finally {
|
|
4737
4740
|
c.isReadonly = !1;
|
|
4738
4741
|
}
|
|
@@ -4772,9 +4775,9 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4772
4775
|
}, { immediate: !0, deep: !0 }), tt(async () => {
|
|
4773
4776
|
await V();
|
|
4774
4777
|
}), (y, S) => {
|
|
4775
|
-
const
|
|
4778
|
+
const D = q("KInput"), W = q("KSelect"), ue = q("KTextArea");
|
|
4776
4779
|
return p(), j("div", is, [
|
|
4777
|
-
O(
|
|
4780
|
+
O(g(hl), {
|
|
4778
4781
|
"can-submit": k.value,
|
|
4779
4782
|
config: e.config,
|
|
4780
4783
|
"edit-id": e.keyId,
|
|
@@ -4783,105 +4786,105 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4783
4786
|
"form-fields": T.value,
|
|
4784
4787
|
"is-readonly": c.isReadonly,
|
|
4785
4788
|
onCancel: b,
|
|
4786
|
-
"onFetch:error": S[8] || (S[8] = (
|
|
4789
|
+
"onFetch:error": S[8] || (S[8] = (P) => y.$emit("error", P)),
|
|
4787
4790
|
"onFetch:success": x,
|
|
4788
|
-
onLoading: S[9] || (S[9] = (
|
|
4791
|
+
onLoading: S[9] || (S[9] = (P) => y.$emit("loading", P)),
|
|
4789
4792
|
onSubmit: C
|
|
4790
4793
|
}, {
|
|
4791
4794
|
default: h(() => [
|
|
4792
|
-
O(
|
|
4793
|
-
description:
|
|
4794
|
-
title:
|
|
4795
|
+
O(g(Xt), {
|
|
4796
|
+
description: g(o)("keys.form.sections.general.description"),
|
|
4797
|
+
title: g(o)("keys.form.sections.general.title")
|
|
4795
4798
|
}, {
|
|
4796
4799
|
default: h(() => [
|
|
4797
|
-
O(
|
|
4800
|
+
O(D, {
|
|
4798
4801
|
modelValue: c.fields.key_id,
|
|
4799
|
-
"onUpdate:modelValue": S[0] || (S[0] = (
|
|
4802
|
+
"onUpdate:modelValue": S[0] || (S[0] = (P) => c.fields.key_id = P),
|
|
4800
4803
|
modelModifiers: { trim: !0 },
|
|
4801
4804
|
autocomplete: "off",
|
|
4802
4805
|
"data-testid": "key-form-id",
|
|
4803
|
-
help:
|
|
4804
|
-
label:
|
|
4805
|
-
"label-attributes": { info:
|
|
4806
|
-
placeholder:
|
|
4806
|
+
help: g(o)("keys.form.fields.id.help"),
|
|
4807
|
+
label: g(o)("keys.form.fields.id.label"),
|
|
4808
|
+
"label-attributes": { info: g(o)("keys.form.fields.id.tooltip") },
|
|
4809
|
+
placeholder: g(o)("keys.form.fields.id.placeholder"),
|
|
4807
4810
|
readonly: c.isReadonly,
|
|
4808
4811
|
required: "",
|
|
4809
4812
|
type: "text"
|
|
4810
4813
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
4811
|
-
O(
|
|
4814
|
+
O(D, {
|
|
4812
4815
|
modelValue: c.fields.name,
|
|
4813
|
-
"onUpdate:modelValue": S[1] || (S[1] = (
|
|
4816
|
+
"onUpdate:modelValue": S[1] || (S[1] = (P) => c.fields.name = P),
|
|
4814
4817
|
modelModifiers: { trim: !0 },
|
|
4815
4818
|
autocomplete: "off",
|
|
4816
4819
|
"data-testid": "key-form-name",
|
|
4817
|
-
label:
|
|
4818
|
-
placeholder:
|
|
4820
|
+
label: g(o)("keys.form.fields.name.label"),
|
|
4821
|
+
placeholder: g(o)("keys.form.fields.name.placeholder"),
|
|
4819
4822
|
readonly: c.isReadonly,
|
|
4820
4823
|
type: "text"
|
|
4821
4824
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4822
4825
|
O(W, {
|
|
4823
4826
|
modelValue: c.fields.key_set,
|
|
4824
|
-
"onUpdate:modelValue": S[2] || (S[2] = (
|
|
4827
|
+
"onUpdate:modelValue": S[2] || (S[2] = (P) => c.fields.key_set = P),
|
|
4825
4828
|
clearable: _.value,
|
|
4826
4829
|
"data-testid": "key-form-key-set",
|
|
4827
4830
|
"dropdown-footer-text": re.value,
|
|
4828
4831
|
"enable-filtering": "",
|
|
4829
4832
|
"filter-function": () => !0,
|
|
4830
4833
|
items: X.value,
|
|
4831
|
-
label:
|
|
4832
|
-
loading:
|
|
4833
|
-
placeholder:
|
|
4834
|
-
readonly:
|
|
4834
|
+
label: g(o)("keys.form.fields.key_set.label"),
|
|
4835
|
+
loading: g(F),
|
|
4836
|
+
placeholder: g(o)("keys.form.fields.key_set.placeholder"),
|
|
4837
|
+
readonly: m.value,
|
|
4835
4838
|
width: "100%",
|
|
4836
4839
|
onQueryChange: B
|
|
4837
4840
|
}, {
|
|
4838
4841
|
loading: h(() => [
|
|
4839
|
-
U("div", null, E(
|
|
4842
|
+
U("div", null, E(g(o)("keys.actions.loading")), 1)
|
|
4840
4843
|
]),
|
|
4841
4844
|
empty: h(() => [
|
|
4842
|
-
U("div", rs, E(
|
|
4845
|
+
U("div", rs, E(g(o)("keys.search.no_results")), 1)
|
|
4843
4846
|
]),
|
|
4844
|
-
"selected-item-template": h(({ item:
|
|
4845
|
-
U("div", null, E(
|
|
4847
|
+
"selected-item-template": h(({ item: P }) => [
|
|
4848
|
+
U("div", null, E(P.name), 1)
|
|
4846
4849
|
]),
|
|
4847
|
-
"item-template": h(({ item:
|
|
4850
|
+
"item-template": h(({ item: P }) => [
|
|
4848
4851
|
U("div", os, [
|
|
4849
|
-
U("div", ls, E(
|
|
4850
|
-
U("div", ss, E(
|
|
4852
|
+
U("div", ls, E(P.name), 1),
|
|
4853
|
+
U("div", ss, E(P.value), 1)
|
|
4851
4854
|
])
|
|
4852
4855
|
]),
|
|
4853
4856
|
_: 1
|
|
4854
4857
|
}, 8, ["modelValue", "clearable", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"]),
|
|
4855
4858
|
z.value ? (p(), j("p", cs, E(z.value), 1)) : H("", !0),
|
|
4856
|
-
O(
|
|
4859
|
+
O(D, {
|
|
4857
4860
|
modelValue: c.fields.tags,
|
|
4858
|
-
"onUpdate:modelValue": S[3] || (S[3] = (
|
|
4861
|
+
"onUpdate:modelValue": S[3] || (S[3] = (P) => c.fields.tags = P),
|
|
4859
4862
|
modelModifiers: { trim: !0 },
|
|
4860
4863
|
autocomplete: "off",
|
|
4861
4864
|
"data-testid": "key-form-tags",
|
|
4862
|
-
help:
|
|
4863
|
-
label:
|
|
4864
|
-
"label-attributes": { info:
|
|
4865
|
-
placeholder:
|
|
4865
|
+
help: g(o)("keys.form.fields.tags.help"),
|
|
4866
|
+
label: g(o)("keys.form.fields.tags.label"),
|
|
4867
|
+
"label-attributes": { info: g(o)("keys.form.fields.tags.tooltip") },
|
|
4868
|
+
placeholder: g(o)("keys.form.fields.tags.placeholder"),
|
|
4866
4869
|
readonly: c.isReadonly,
|
|
4867
4870
|
type: "text"
|
|
4868
4871
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
4869
4872
|
]),
|
|
4870
4873
|
_: 1
|
|
4871
4874
|
}, 8, ["description", "title"]),
|
|
4872
|
-
O(
|
|
4873
|
-
description:
|
|
4875
|
+
O(g(Xt), {
|
|
4876
|
+
description: g(o)("keys.form.sections.keys.description"),
|
|
4874
4877
|
"has-divider": "",
|
|
4875
|
-
title:
|
|
4878
|
+
title: g(o)("keys.form.sections.keys.title")
|
|
4876
4879
|
}, {
|
|
4877
4880
|
default: h(() => [
|
|
4878
4881
|
U("div", us, [
|
|
4879
4882
|
O(W, {
|
|
4880
4883
|
modelValue: c.fields.key_format,
|
|
4881
|
-
"onUpdate:modelValue": S[4] || (S[4] = (
|
|
4884
|
+
"onUpdate:modelValue": S[4] || (S[4] = (P) => c.fields.key_format = P),
|
|
4882
4885
|
"data-testid": "key-form-key-format",
|
|
4883
4886
|
items: v,
|
|
4884
|
-
label:
|
|
4887
|
+
label: g(o)("keys.form.fields.key_format.label"),
|
|
4885
4888
|
readonly: c.isReadonly,
|
|
4886
4889
|
required: "",
|
|
4887
4890
|
width: "100%"
|
|
@@ -4890,37 +4893,37 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4890
4893
|
c.fields.key_format === "jwk" ? (p(), N(ue, {
|
|
4891
4894
|
key: 0,
|
|
4892
4895
|
modelValue: c.fields.jwk,
|
|
4893
|
-
"onUpdate:modelValue": S[5] || (S[5] = (
|
|
4896
|
+
"onUpdate:modelValue": S[5] || (S[5] = (P) => c.fields.jwk = P),
|
|
4894
4897
|
modelModifiers: { trim: !0 },
|
|
4895
4898
|
class: "key-form-textarea",
|
|
4896
4899
|
"data-testid": "key-form-jwk",
|
|
4897
|
-
label:
|
|
4898
|
-
"label-attributes": { info:
|
|
4899
|
-
placeholder:
|
|
4900
|
+
label: g(o)("keys.form.fields.jwk.label"),
|
|
4901
|
+
"label-attributes": { info: g(o)("keys.form.fields.jwk.tooltip") },
|
|
4902
|
+
placeholder: g(o)("keys.form.fields.jwk.placeholder"),
|
|
4900
4903
|
readonly: c.isReadonly,
|
|
4901
4904
|
required: ""
|
|
4902
4905
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])) : H("", !0),
|
|
4903
4906
|
c.fields.key_format === "pem" ? (p(), N(ue, {
|
|
4904
4907
|
key: 1,
|
|
4905
4908
|
modelValue: c.fields.private_key,
|
|
4906
|
-
"onUpdate:modelValue": S[6] || (S[6] = (
|
|
4909
|
+
"onUpdate:modelValue": S[6] || (S[6] = (P) => c.fields.private_key = P),
|
|
4907
4910
|
modelModifiers: { trim: !0 },
|
|
4908
4911
|
class: "key-form-textarea",
|
|
4909
4912
|
"data-testid": "key-form-private-key",
|
|
4910
|
-
label:
|
|
4911
|
-
placeholder:
|
|
4913
|
+
label: g(o)("keys.form.fields.private_key.label"),
|
|
4914
|
+
placeholder: g(o)("keys.form.fields.private_key.placeholder"),
|
|
4912
4915
|
readonly: c.isReadonly,
|
|
4913
4916
|
required: ""
|
|
4914
4917
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : H("", !0),
|
|
4915
4918
|
c.fields.key_format === "pem" ? (p(), N(ue, {
|
|
4916
4919
|
key: 2,
|
|
4917
4920
|
modelValue: c.fields.public_key,
|
|
4918
|
-
"onUpdate:modelValue": S[7] || (S[7] = (
|
|
4921
|
+
"onUpdate:modelValue": S[7] || (S[7] = (P) => c.fields.public_key = P),
|
|
4919
4922
|
modelModifiers: { trim: !0 },
|
|
4920
4923
|
class: "key-form-textarea",
|
|
4921
4924
|
"data-testid": "key-form-public-key",
|
|
4922
|
-
label:
|
|
4923
|
-
placeholder:
|
|
4925
|
+
label: g(o)("keys.form.fields.public_key.label"),
|
|
4926
|
+
placeholder: g(o)("keys.form.fields.public_key.placeholder"),
|
|
4924
4927
|
readonly: c.isReadonly,
|
|
4925
4928
|
required: ""
|
|
4926
4929
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : H("", !0)
|
|
@@ -4973,7 +4976,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4973
4976
|
}), { convertKeyToTitle: o } = es(), { i18n: { t: r } } = mt.useI18n(), l = A(() => a.keySetId ? `${Se.form[a.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, a.keySetId) : Se.form[a.config.app].edit.all), s = A(() => {
|
|
4974
4977
|
var f;
|
|
4975
4978
|
return (f = Se.form[a.config.app]) == null ? void 0 : f.getKeySet;
|
|
4976
|
-
}), u = M(), c = M({}), d = M(a.keySetId || ""), v = M(""),
|
|
4979
|
+
}), u = M(), c = M({}), d = M(a.keySetId || ""), v = M(""), m = M(!1), _ = async (f) => {
|
|
4977
4980
|
var T;
|
|
4978
4981
|
u.value = f, d.value = (T = f == null ? void 0 : f.set) == null ? void 0 : T.id, n("fetch:success", f), k(f);
|
|
4979
4982
|
};
|
|
@@ -4984,13 +4987,13 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
4984
4987
|
let f = `${a.config.apiBaseUrl}${s.value}`;
|
|
4985
4988
|
a.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((T = a.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{keySetId}/gi, d.value || "") : a.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (C = a.config) != null && C.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, d.value || ""));
|
|
4986
4989
|
try {
|
|
4987
|
-
|
|
4990
|
+
m.value = !0;
|
|
4988
4991
|
const { data: w } = await i.get(f);
|
|
4989
4992
|
v.value = (w == null ? void 0 : w.name) || (w == null ? void 0 : w.id);
|
|
4990
4993
|
} catch (w) {
|
|
4991
4994
|
n("fetch:error", w);
|
|
4992
4995
|
} finally {
|
|
4993
|
-
|
|
4996
|
+
m.value = !1;
|
|
4994
4997
|
}
|
|
4995
4998
|
}, { immediate: !0 });
|
|
4996
4999
|
const k = (f) => {
|
|
@@ -5049,7 +5052,7 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
5049
5052
|
var w, F;
|
|
5050
5053
|
const C = q("KSkeleton");
|
|
5051
5054
|
return p(), j("div", ps, [
|
|
5052
|
-
O(
|
|
5055
|
+
O(g(fl), {
|
|
5053
5056
|
config: e.config,
|
|
5054
5057
|
"config-card-doc": e.configCardDoc,
|
|
5055
5058
|
"config-schema": x.value,
|
|
@@ -5061,16 +5064,16 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
5061
5064
|
onLoading: T[2] || (T[2] = (L) => f.$emit("loading", L))
|
|
5062
5065
|
}, _e({
|
|
5063
5066
|
set: h(({ row: L }) => [
|
|
5064
|
-
|
|
5067
|
+
m.value ? (p(), N(C, {
|
|
5065
5068
|
key: 0,
|
|
5066
5069
|
"data-testid": "key-set-name-loader",
|
|
5067
5070
|
type: "spinner"
|
|
5068
|
-
})) : L.value && L.value.id === d.value && v.value ? (p(), N(
|
|
5071
|
+
})) : L.value && L.value.id === d.value && v.value ? (p(), N(g(yn), {
|
|
5069
5072
|
key: 1,
|
|
5070
5073
|
item: {
|
|
5071
5074
|
key: L.value.id,
|
|
5072
5075
|
value: v.value,
|
|
5073
|
-
type:
|
|
5076
|
+
type: g(Z).LinkInternal
|
|
5074
5077
|
},
|
|
5075
5078
|
onClick: (R) => f.$emit("navigation-click", L.value.id, "key-sets")
|
|
5076
5079
|
}, null, 8, ["item", "onClick"])) : (p(), j("div", fs, E("–")))
|
|
@@ -5080,12 +5083,12 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
5080
5083
|
(w = u.value) != null && w.jwk ? {
|
|
5081
5084
|
name: "jwk",
|
|
5082
5085
|
fn: h(() => [
|
|
5083
|
-
(p(!0), j(ge, null, me(Object.keys(c.value), (L) => (p(), N(
|
|
5086
|
+
(p(!0), j(ge, null, me(Object.keys(c.value), (L) => (p(), N(g(Ve), {
|
|
5084
5087
|
key: L,
|
|
5085
5088
|
"data-testid": `${L}`,
|
|
5086
5089
|
item: {
|
|
5087
5090
|
key: L,
|
|
5088
|
-
label:
|
|
5091
|
+
label: g(o)(L),
|
|
5089
5092
|
value: c.value[L]
|
|
5090
5093
|
}
|
|
5091
5094
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
@@ -5095,12 +5098,12 @@ const Ho = { class: "yaml-config" }, aa = /* @__PURE__ */ ie({
|
|
|
5095
5098
|
(F = u.value) != null && F.pem ? {
|
|
5096
5099
|
name: "pem",
|
|
5097
5100
|
fn: h(() => [
|
|
5098
|
-
(p(!0), j(ge, null, me(Object.keys(c.value), (L) => (p(), N(
|
|
5101
|
+
(p(!0), j(ge, null, me(Object.keys(c.value), (L) => (p(), N(g(Ve), {
|
|
5099
5102
|
key: L,
|
|
5100
5103
|
"data-testid": `${L}`,
|
|
5101
5104
|
item: {
|
|
5102
5105
|
key: L,
|
|
5103
|
-
label:
|
|
5106
|
+
label: g(o)(L),
|
|
5104
5107
|
value: c.value[L]
|
|
5105
5108
|
}
|
|
5106
5109
|
}, null, 8, ["data-testid", "item"]))), 128))
|