@kong-ui-public/entities-keys 2.2.3 → 2.2.4
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 +98 -98
- package/dist/entities-keys.umd.js +2 -2
- package/dist/style.css +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
|
|
1
|
+
import { defineComponent as ie, ref as M, computed as A, watch as ke, renderSlot as ee, createCommentVNode as J, unref as m, resolveComponent as q, openBlock as p, createElementBlock as j, createVNode as T, withCtx as h, createTextVNode as G, toDisplayString as E, useCssVars as Xt, useSlots as nt, createElementVNode as U, createSlots as Ae, createBlock as N, resolveDynamicComponent as $e, normalizeProps as aa, guardReactiveProps as ia, Fragment as he, renderList as ge, mergeProps as ct, normalizeClass as we, onBeforeMount as at, withModifiers as We, withDirectives as Ve, vShow as Re, reactive as Ze, onMounted as ra, onUnmounted as oa, inject as la, normalizeStyle as en, pushScopeId as tn, popScopeId as nn } from "vue";
|
|
2
2
|
import { useRouter as mt } from "vue-router";
|
|
3
3
|
import { createI18n as gt, i18nTComponent as an } from "@kong-ui-public/i18n";
|
|
4
4
|
import sa from "axios";
|
|
@@ -390,7 +390,7 @@ function Aa(e, n, t, a = {
|
|
|
390
390
|
headers: e.requestHeaders
|
|
391
391
|
}), { i18n: { t: o } } = kt(), { debounce: r } = fa(), l = r(async (C) => {
|
|
392
392
|
await $(C);
|
|
393
|
-
}, 200), s =
|
|
393
|
+
}, 200), s = M(!1), u = M(""), c = M(""), d = M([]), v = M([]), g = M(void 0), S = m(n);
|
|
394
394
|
let k = `${e.apiBaseUrl}${S}`;
|
|
395
395
|
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}` : ""));
|
|
396
396
|
const { isValidUuid: x } = on(), b = async () => {
|
|
@@ -403,7 +403,7 @@ function Aa(e, n, t, a = {
|
|
|
403
403
|
} finally {
|
|
404
404
|
s.value = !1;
|
|
405
405
|
}
|
|
406
|
-
}, f =
|
|
406
|
+
}, f = M(""), $ = async (C) => {
|
|
407
407
|
var w, F, L;
|
|
408
408
|
if (f.value !== C)
|
|
409
409
|
if (f.value = C || "", g.value === void 0)
|
|
@@ -416,18 +416,18 @@ function Aa(e, n, t, a = {
|
|
|
416
416
|
} else if (C) {
|
|
417
417
|
const V = [];
|
|
418
418
|
x(C) && a.searchKeys.includes("id") ? V.push((async () => {
|
|
419
|
-
const { data:
|
|
420
|
-
return [
|
|
419
|
+
const { data: K } = await i.get(`${k}/${C}`);
|
|
420
|
+
return [K[a.fetchedItemsKey] ?? K];
|
|
421
421
|
})()) : V.push(
|
|
422
|
-
...a.searchKeys.filter((
|
|
423
|
-
const { data: B } = await i.get(`${k}?${
|
|
422
|
+
...a.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
423
|
+
const { data: B } = await i.get(`${k}?${K}=${C}`);
|
|
424
424
|
return B[a.fetchedItemsKey];
|
|
425
425
|
})
|
|
426
426
|
);
|
|
427
427
|
const _ = await Promise.all(V), R = /* @__PURE__ */ new Set();
|
|
428
|
-
d.value = [], (w = _ == null ? void 0 : _.forEach) == null || w.call(_, (
|
|
428
|
+
d.value = [], (w = _ == null ? void 0 : _.forEach) == null || w.call(_, (K) => {
|
|
429
429
|
var B;
|
|
430
|
-
(B =
|
|
430
|
+
(B = K == null ? void 0 : K.forEach) == null || B.call(K, (D) => {
|
|
431
431
|
R.has(D.id) || (R.add(D.id), d.value.push(D));
|
|
432
432
|
});
|
|
433
433
|
});
|
|
@@ -442,8 +442,8 @@ function Aa(e, n, t, a = {
|
|
|
442
442
|
s.value = !0, c.value = "", C ? (d.value = (L = g.value) == null ? void 0 : L.filter((V) => {
|
|
443
443
|
var _;
|
|
444
444
|
let R = !1;
|
|
445
|
-
for (const
|
|
446
|
-
const B = typeof V[
|
|
445
|
+
for (const K of a.searchKeys) {
|
|
446
|
+
const B = typeof V[K] == "string" ? (_ = V[K]) == null ? void 0 : _.toLowerCase() : V[K];
|
|
447
447
|
B != null && B.includes(C.toLowerCase()) && (R = !0);
|
|
448
448
|
}
|
|
449
449
|
return R;
|
|
@@ -507,7 +507,7 @@ function Ta(e) {
|
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
function ln(e, n) {
|
|
510
|
-
const t =
|
|
510
|
+
const t = M(m(e)), a = M(m(n)), i = A(
|
|
511
511
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
512
512
|
), o = A(
|
|
513
513
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
@@ -527,7 +527,7 @@ function ln(e, n) {
|
|
|
527
527
|
function Oa(e, n, t = "data") {
|
|
528
528
|
const a = m(n), { axiosInstance: i } = vt({
|
|
529
529
|
headers: e.requestHeaders
|
|
530
|
-
}), o = ln(e, a), r =
|
|
530
|
+
}), o = ln(e, a), r = M({
|
|
531
531
|
status: Te.Idle
|
|
532
532
|
});
|
|
533
533
|
return { fetcher: async (l) => {
|
|
@@ -585,14 +585,14 @@ const sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
585
585
|
}, jt = (e) => e === "*" || e === "x" || e === "X", Tt = (e) => {
|
|
586
586
|
const n = parseInt(e, 10);
|
|
587
587
|
return isNaN(n) ? e : n;
|
|
588
|
-
},
|
|
588
|
+
}, Ka = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Ma = (e, n) => {
|
|
589
589
|
if (jt(e) || jt(n))
|
|
590
590
|
return 0;
|
|
591
|
-
const [t, a] =
|
|
591
|
+
const [t, a] = Ka(Tt(e), Tt(n));
|
|
592
592
|
return t > a ? 1 : t < a ? -1 : 0;
|
|
593
593
|
}, Ot = (e, n) => {
|
|
594
594
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
595
|
-
const a =
|
|
595
|
+
const a = Ma(e[t] || "0", n[t] || "0");
|
|
596
596
|
if (a !== 0)
|
|
597
597
|
return a;
|
|
598
598
|
}
|
|
@@ -611,11 +611,11 @@ const sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
611
611
|
"<=": [-1, 0],
|
|
612
612
|
"<": [-1],
|
|
613
613
|
"!=": [-1, 1]
|
|
614
|
-
},
|
|
614
|
+
}, Kt = Object.keys(cn), Fa = (e) => {
|
|
615
615
|
if (typeof e != "string")
|
|
616
616
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
617
|
-
if (
|
|
618
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
617
|
+
if (Kt.indexOf(e) === -1)
|
|
618
|
+
throw new Error(`Invalid operator, expected one of ${Kt.join("|")}`);
|
|
619
619
|
}, Na = (e) => typeof e == "string" && /^[v\d]/.test(e) && sn.test(e);
|
|
620
620
|
function qa(e) {
|
|
621
621
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
@@ -631,7 +631,7 @@ function qa(e) {
|
|
|
631
631
|
return !(r && $t(i, r, "<") || l && $t(i, l, ">"));
|
|
632
632
|
}
|
|
633
633
|
function Ba(e) {
|
|
634
|
-
const n =
|
|
634
|
+
const n = M(0), t = M(0), a = M(!1);
|
|
635
635
|
return ke(e, (i) => {
|
|
636
636
|
i && !a.value && (n.value = i.offsetWidth, t.value = i.scrollWidth, a.value = !0);
|
|
637
637
|
}), {
|
|
@@ -660,7 +660,7 @@ const ue = {
|
|
|
660
660
|
}, Ua = "Copy to clipboard", Va = {
|
|
661
661
|
message: La,
|
|
662
662
|
iconTitle: Ua
|
|
663
|
-
}, Ra = "kong-ui-copy-uuid-notify",
|
|
663
|
+
}, Ra = "kong-ui-copy-uuid-notify", Mt = "24px", Da = (e, n) => {
|
|
664
664
|
const t = e.__vccOpts || e;
|
|
665
665
|
for (const [a, i] of n)
|
|
666
666
|
t[a] = i;
|
|
@@ -702,7 +702,7 @@ const ue = {
|
|
|
702
702
|
size: {
|
|
703
703
|
type: [Number, String],
|
|
704
704
|
required: !1,
|
|
705
|
-
default:
|
|
705
|
+
default: Mt,
|
|
706
706
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
707
707
|
validator: (e) => {
|
|
708
708
|
if (typeof e == "number" && e > 0)
|
|
@@ -731,7 +731,7 @@ const ue = {
|
|
|
731
731
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
732
732
|
return `${o}px`;
|
|
733
733
|
}
|
|
734
|
-
return
|
|
734
|
+
return Mt;
|
|
735
735
|
}), a = A(() => ({
|
|
736
736
|
boxSizing: "border-box",
|
|
737
737
|
color: n.color,
|
|
@@ -815,7 +815,7 @@ const ue = {
|
|
|
815
815
|
placement: "bottomStart"
|
|
816
816
|
} : {
|
|
817
817
|
title: a.uuid
|
|
818
|
-
}), l = A(() => !!(a.tooltip && a.successTooltip)), s =
|
|
818
|
+
}), l = A(() => !!(a.tooltip && a.successTooltip)), s = M(a.tooltip), u = A(() => a.tooltip ? {
|
|
819
819
|
label: s.value,
|
|
820
820
|
positionFixed: !0,
|
|
821
821
|
maxWidth: "500px",
|
|
@@ -1144,7 +1144,7 @@ const ue = {
|
|
|
1144
1144
|
text: t.item.value
|
|
1145
1145
|
};
|
|
1146
1146
|
}
|
|
1147
|
-
}), v =
|
|
1147
|
+
}), v = M(), { isTruncated: g } = ue.useTruncationDetector(v);
|
|
1148
1148
|
return (S, k) => {
|
|
1149
1149
|
const x = q("KLabel"), b = q("KBadge"), f = q("KTooltip");
|
|
1150
1150
|
return p(), j("div", ui, [
|
|
@@ -1296,7 +1296,7 @@ const ue = {
|
|
|
1296
1296
|
},
|
|
1297
1297
|
setup(e) {
|
|
1298
1298
|
Xt((i) => ({
|
|
1299
|
-
|
|
1299
|
+
50594668: `${a.value}ch`
|
|
1300
1300
|
}));
|
|
1301
1301
|
const n = e, t = Ze(n.jsonRecord), a = A(() => {
|
|
1302
1302
|
var i;
|
|
@@ -1309,7 +1309,7 @@ const ue = {
|
|
|
1309
1309
|
var r;
|
|
1310
1310
|
const l = q("KBadge"), s = q("KCodeBlock");
|
|
1311
1311
|
return p(), j("div", wi, [
|
|
1312
|
-
n.fetcherUrl && (r = n.config) != null && r.
|
|
1312
|
+
n.fetcherUrl && (r = n.config) != null && r.jsonYamlFormsEnabled ? (p(), j("div", Si, [
|
|
1313
1313
|
T(l, {
|
|
1314
1314
|
appearance: n.requestMethod
|
|
1315
1315
|
}, {
|
|
@@ -1364,12 +1364,12 @@ function xi(e, n) {
|
|
|
1364
1364
|
function ji(e) {
|
|
1365
1365
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1366
1366
|
}
|
|
1367
|
-
var Ti = yn, Oi = _i, $i = Ii,
|
|
1367
|
+
var Ti = yn, Oi = _i, $i = Ii, Ki = xi, Mi = ji, Ei = Ai, se = {
|
|
1368
1368
|
isNothing: Ti,
|
|
1369
1369
|
isObject: Oi,
|
|
1370
1370
|
toArray: $i,
|
|
1371
|
-
repeat:
|
|
1372
|
-
isNegativeZero:
|
|
1371
|
+
repeat: Ki,
|
|
1372
|
+
isNegativeZero: Mi,
|
|
1373
1373
|
extend: Ei
|
|
1374
1374
|
};
|
|
1375
1375
|
function mn(e, n) {
|
|
@@ -1870,7 +1870,7 @@ function gr(e) {
|
|
|
1870
1870
|
function hr(e) {
|
|
1871
1871
|
return e !== null ? e : [];
|
|
1872
1872
|
}
|
|
1873
|
-
var
|
|
1873
|
+
var Kn = new pe("tag:yaml.org,2002:omap", {
|
|
1874
1874
|
kind: "sequence",
|
|
1875
1875
|
resolve: gr,
|
|
1876
1876
|
construct: hr
|
|
@@ -1894,7 +1894,7 @@ function br(e) {
|
|
|
1894
1894
|
a = r[n], i = Object.keys(a), o[n] = [i[0], a[i[0]]];
|
|
1895
1895
|
return o;
|
|
1896
1896
|
}
|
|
1897
|
-
var
|
|
1897
|
+
var Mn = new pe("tag:yaml.org,2002:pairs", {
|
|
1898
1898
|
kind: "sequence",
|
|
1899
1899
|
resolve: kr,
|
|
1900
1900
|
construct: br
|
|
@@ -1922,8 +1922,8 @@ var En = new pe("tag:yaml.org,2002:set", {
|
|
|
1922
1922
|
],
|
|
1923
1923
|
explicit: [
|
|
1924
1924
|
$n,
|
|
1925
|
-
Mn,
|
|
1926
1925
|
Kn,
|
|
1926
|
+
Mn,
|
|
1927
1927
|
En
|
|
1928
1928
|
]
|
|
1929
1929
|
}), je = Object.prototype.hasOwnProperty, Ge = 1, Fn = 2, Nn = 3, Qe = 4, st = 1, _r = 2, Nt = 3, Ir = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ar = /[\x85\u2028\u2029]/, xr = /[,\[\]\{\}]/, qn = /^(?:!|!!|![a-z\-]+!)$/i, Bn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
@@ -1963,9 +1963,9 @@ function $r(e) {
|
|
|
1963
1963
|
);
|
|
1964
1964
|
}
|
|
1965
1965
|
var Ln = new Array(256), Un = new Array(256);
|
|
1966
|
-
for (var
|
|
1967
|
-
Ln[
|
|
1968
|
-
function
|
|
1966
|
+
for (var Ke = 0; Ke < 256; Ke++)
|
|
1967
|
+
Ln[Ke] = Bt(Ke) ? 1 : 0, Un[Ke] = Bt(Ke);
|
|
1968
|
+
function Kr(e, n) {
|
|
1969
1969
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || Ct, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.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 = [];
|
|
1970
1970
|
}
|
|
1971
1971
|
function Vn(e, n) {
|
|
@@ -2065,7 +2065,7 @@ function St(e, n) {
|
|
|
2065
2065
|
n === 1 ? e.result += " " : n > 1 && (e.result += se.repeat(`
|
|
2066
2066
|
`, n - 1));
|
|
2067
2067
|
}
|
|
2068
|
-
function
|
|
2068
|
+
function Mr(e, n, t) {
|
|
2069
2069
|
var a, i, o, r, l, s, u, c, d = e.kind, v = e.result, g;
|
|
2070
2070
|
if (g = e.input.charCodeAt(e.position), ve(g) || Ee(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (i = e.input.charCodeAt(e.position + 1), ve(i) || t && Ee(i)))
|
|
2071
2071
|
return !1;
|
|
@@ -2282,7 +2282,7 @@ function Ne(e, n, t, a, i) {
|
|
|
2282
2282
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = r = l = Qe === t || Nn === t, a && oe(e, !0, -1) && (u = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
|
|
2283
2283
|
for (; Lr(e) || Ur(e); )
|
|
2284
2284
|
oe(e, !0, -1) ? (u = !0, l = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
|
|
2285
|
-
if (l && (l = u || i), (s === 1 || Qe === t) && (Ge === t || Fn === t ? k = n : k = n + 1, x = e.position - e.lineStart, s === 1 ? l && (Vt(e, x) || Br(e, x, k)) || Nr(e, k) ? c = !0 : (r && qr(e, k) || Er(e, k) || Fr(e, k) ? c = !0 : Vr(e) ? (c = !0, (e.tag !== null || e.anchor !== null) && O(e, "alias node should not have any properties")) :
|
|
2285
|
+
if (l && (l = u || i), (s === 1 || Qe === t) && (Ge === t || Fn === t ? k = n : k = n + 1, x = e.position - e.lineStart, s === 1 ? l && (Vt(e, x) || Br(e, x, k)) || Nr(e, k) ? c = !0 : (r && qr(e, k) || Er(e, k) || Fr(e, k) ? c = !0 : Vr(e) ? (c = !0, (e.tag !== null || e.anchor !== null) && O(e, "alias node should not have any properties")) : Mr(e, k, Ge === t) && (c = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (c = l && Vt(e, x))), e.tag === null)
|
|
2286
2286
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2287
2287
|
else if (e.tag === "?") {
|
|
2288
2288
|
for (e.result !== null && e.kind !== "scalar" && O(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), d = 0, v = e.implicitTypes.length; d < v; d += 1)
|
|
@@ -2337,7 +2337,7 @@ function Rr(e) {
|
|
|
2337
2337
|
function Rn(e, n) {
|
|
2338
2338
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2339
2339
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2340
|
-
var t = new
|
|
2340
|
+
var t = new Kr(e, n), a = e.indexOf("\0");
|
|
2341
2341
|
for (a !== -1 && (t.position = a, O(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2342
2342
|
t.lineIndent += 1, t.position += 1;
|
|
2343
2343
|
for (; t.position < t.length - 1; )
|
|
@@ -2472,13 +2472,13 @@ function Gn(e) {
|
|
|
2472
2472
|
var n = /^\n* /;
|
|
2473
2473
|
return n.test(e);
|
|
2474
2474
|
}
|
|
2475
|
-
var Qn = 1, ft = 2, Xn = 3, ea = 4,
|
|
2475
|
+
var Qn = 1, ft = 2, Xn = 3, ea = 4, Me = 5;
|
|
2476
2476
|
function ko(e, n, t, a, i, o, r, l) {
|
|
2477
2477
|
var s, u = 0, c = null, d = !1, v = !1, g = a !== -1, S = -1, k = ho(Ue(e, 0)) && vo(Ue(e, e.length - 1));
|
|
2478
2478
|
if (n || r)
|
|
2479
2479
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2480
2480
|
if (u = Ue(e, s), !He(u))
|
|
2481
|
-
return
|
|
2481
|
+
return Me;
|
|
2482
2482
|
k = k && Pt(u, c, l), c = u;
|
|
2483
2483
|
}
|
|
2484
2484
|
else {
|
|
@@ -2487,12 +2487,12 @@ function ko(e, n, t, a, i, o, r, l) {
|
|
|
2487
2487
|
d = !0, g && (v = v || // Foldable line = too long, and not more-indented.
|
|
2488
2488
|
s - S - 1 > a && e[S + 1] !== " ", S = s);
|
|
2489
2489
|
else if (!He(u))
|
|
2490
|
-
return
|
|
2490
|
+
return Me;
|
|
2491
2491
|
k = k && Pt(u, c, l), c = u;
|
|
2492
2492
|
}
|
|
2493
2493
|
v = v || g && s - S - 1 > a && e[S + 1] !== " ";
|
|
2494
2494
|
}
|
|
2495
|
-
return !d && !v ? k && !r && !i(e) ? Qn : o === ze ?
|
|
2495
|
+
return !d && !v ? k && !r && !i(e) ? Qn : o === ze ? Me : ft : t > 9 && Gn(e) ? Me : r ? o === ze ? Me : ft : v ? ea : Xn;
|
|
2496
2496
|
}
|
|
2497
2497
|
function bo(e, n, t, a, i) {
|
|
2498
2498
|
e.dump = function() {
|
|
@@ -2522,7 +2522,7 @@ function bo(e, n, t, a, i) {
|
|
|
2522
2522
|
return "|" + Jt(n, e.indent) + zt(Rt(n, o));
|
|
2523
2523
|
case ea:
|
|
2524
2524
|
return ">" + Jt(n, e.indent) + zt(Rt(Co(n, r), o));
|
|
2525
|
-
case
|
|
2525
|
+
case Me:
|
|
2526
2526
|
return '"' + wo(n) + '"';
|
|
2527
2527
|
default:
|
|
2528
2528
|
throw new me("impossible error: invalid scalar style");
|
|
@@ -2675,25 +2675,25 @@ function It(e, n) {
|
|
|
2675
2675
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2676
2676
|
};
|
|
2677
2677
|
}
|
|
2678
|
-
var Oo = pe, $o = gn,
|
|
2678
|
+
var Oo = pe, $o = gn, Ko = bn, Mo = In, Eo = An, Fo = Ct, No = Dn.load, qo = Dn.loadAll, Bo = To.dump, Lo = me, Uo = {
|
|
2679
2679
|
binary: $n,
|
|
2680
2680
|
float: _n,
|
|
2681
2681
|
map: kn,
|
|
2682
2682
|
null: Cn,
|
|
2683
|
-
pairs:
|
|
2683
|
+
pairs: Mn,
|
|
2684
2684
|
set: En,
|
|
2685
2685
|
timestamp: Tn,
|
|
2686
2686
|
bool: wn,
|
|
2687
2687
|
int: Sn,
|
|
2688
2688
|
merge: On,
|
|
2689
|
-
omap:
|
|
2689
|
+
omap: Kn,
|
|
2690
2690
|
seq: vn,
|
|
2691
2691
|
str: hn
|
|
2692
2692
|
}, Vo = It("safeLoad", "load"), Ro = It("safeLoadAll", "loadAll"), Do = It("safeDump", "dump"), Po = {
|
|
2693
2693
|
Type: Oo,
|
|
2694
2694
|
Schema: $o,
|
|
2695
|
-
FAILSAFE_SCHEMA:
|
|
2696
|
-
JSON_SCHEMA:
|
|
2695
|
+
FAILSAFE_SCHEMA: Ko,
|
|
2696
|
+
JSON_SCHEMA: Mo,
|
|
2697
2697
|
CORE_SCHEMA: Eo,
|
|
2698
2698
|
DEFAULT_SCHEMA: Fo,
|
|
2699
2699
|
load: No,
|
|
@@ -3030,7 +3030,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3030
3030
|
label: "YAML",
|
|
3031
3031
|
value: "yaml"
|
|
3032
3032
|
}
|
|
3033
|
-
], d =
|
|
3033
|
+
], d = M("structured"), v = (_) => {
|
|
3034
3034
|
d.value = _ == null ? void 0 : _.value;
|
|
3035
3035
|
}, g = {
|
|
3036
3036
|
id: {
|
|
@@ -3066,13 +3066,13 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3066
3066
|
// the last property displayed
|
|
3067
3067
|
section: ye.Basic
|
|
3068
3068
|
}
|
|
3069
|
-
}, S =
|
|
3070
|
-
var _, R,
|
|
3069
|
+
}, S = M(!1), k = M(!1), x = M(""), b = M({}), f = A(() => {
|
|
3070
|
+
var _, R, K;
|
|
3071
3071
|
if (!b.value)
|
|
3072
3072
|
return [];
|
|
3073
3073
|
const B = [], D = Object.keys(b.value).length;
|
|
3074
3074
|
for (const z in b.value) {
|
|
3075
|
-
const Q = (R = (_ = i.configSchema) == null ? void 0 : _[z]) == null ? void 0 : R.order, te = (
|
|
3075
|
+
const Q = (R = (_ = i.configSchema) == null ? void 0 : _[z]) == null ? void 0 : R.order, te = (K = g[z]) == null ? void 0 : K.order;
|
|
3076
3076
|
let re = D;
|
|
3077
3077
|
(te || te === 0) && (re = te === -1 ? D + 1 : te), Q && (re = Q === -1 ? D + 1 : Q), B.push([z, re]);
|
|
3078
3078
|
}
|
|
@@ -3095,9 +3095,9 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3095
3095
|
var _, R;
|
|
3096
3096
|
if (!b.value || !i.pluginConfigKey)
|
|
3097
3097
|
return [];
|
|
3098
|
-
const
|
|
3099
|
-
for (const z in
|
|
3100
|
-
const Q = (R = (_ = i.pluginConfigSchema) == null ? void 0 : _[z]) == null ? void 0 : R.order, te =
|
|
3098
|
+
const K = b.value[i.pluginConfigKey] || {}, B = Object.keys(K).length, D = [];
|
|
3099
|
+
for (const z in K) {
|
|
3100
|
+
const Q = (R = (_ = i.pluginConfigSchema) == null ? void 0 : _[z]) == null ? void 0 : R.order, te = K[z];
|
|
3101
3101
|
let re = te != null && te !== "" ? B - 1 : B;
|
|
3102
3102
|
Q && (re = Q === -1 ? B + 1 : Q), D.push([z, re]);
|
|
3103
3103
|
}
|
|
@@ -3105,7 +3105,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3105
3105
|
return z[1] - Q[1];
|
|
3106
3106
|
}), D.map((z) => {
|
|
3107
3107
|
var Q;
|
|
3108
|
-
const te = z[0], re =
|
|
3108
|
+
const te = z[0], re = K[te], ne = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[te]) || {};
|
|
3109
3109
|
return {
|
|
3110
3110
|
key: te,
|
|
3111
3111
|
value: re,
|
|
@@ -3117,19 +3117,19 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3117
3117
|
};
|
|
3118
3118
|
}).filter((z) => !z.hidden);
|
|
3119
3119
|
}), C = A(() => {
|
|
3120
|
-
var _, R,
|
|
3120
|
+
var _, R, K, B;
|
|
3121
3121
|
return {
|
|
3122
3122
|
basic: (_ = f.value) == null ? void 0 : _.filter((D) => D.section === ye.Basic),
|
|
3123
3123
|
advanced: (R = f.value) == null ? void 0 : R.filter((D) => D.section === ye.Advanced),
|
|
3124
|
-
plugin: (B = $.value) == null ? void 0 : B.concat((
|
|
3124
|
+
plugin: (B = $.value) == null ? void 0 : B.concat((K = f.value) == null ? void 0 : K.filter((D) => D.section === ye.Plugin))
|
|
3125
3125
|
};
|
|
3126
3126
|
}), w = A(() => {
|
|
3127
3127
|
const _ = [];
|
|
3128
3128
|
return C.value.basic.length && _.push("basic"), C.value.advanced.length && _.push("advanced"), C.value.plugin.length && _.push("plugin"), _;
|
|
3129
3129
|
}), F = (_) => !!(_.tooltip || o[`${_.key}-label-tooltip`]), L = A(() => {
|
|
3130
3130
|
var _, R;
|
|
3131
|
-
let
|
|
3132
|
-
return i.config.app === "konnect" ?
|
|
3131
|
+
let K = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3132
|
+
return i.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((_ = i.config) == null ? void 0 : _.controlPlaneId) || "") : i.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (R = i.config) != null && R.workspace ? `/${i.config.workspace}` : "")), K = K.replace(/{id}/gi, i.config.entityId), K;
|
|
3133
3133
|
}), V = (_) => {
|
|
3134
3134
|
b.value && _(JSON.stringify(b.value)) ? a("copy:success", b.value) : a("copy:error");
|
|
3135
3135
|
};
|
|
@@ -3156,12 +3156,12 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3156
3156
|
S.value = !1;
|
|
3157
3157
|
}
|
|
3158
3158
|
}), (_, R) => {
|
|
3159
|
-
const
|
|
3159
|
+
const K = q("KLabel"), B = q("KSelect"), D = q("KButton"), z = q("KClipboardProvider"), Q = q("KSkeleton"), te = q("KEmptyState"), re = q("KCard");
|
|
3160
3160
|
return p(), N(re, { class: "kong-ui-entity-base-config-card" }, Ae({
|
|
3161
3161
|
actions: h(() => [
|
|
3162
3162
|
U("div", rl, [
|
|
3163
3163
|
ee(_.$slots, "actions", {}, void 0, !0),
|
|
3164
|
-
e.config.jsonYamlEnabled ? (p(), N(
|
|
3164
|
+
e.config.jsonYamlEnabled ? (p(), N(K, {
|
|
3165
3165
|
key: 0,
|
|
3166
3166
|
class: "config-format-select-label",
|
|
3167
3167
|
"data-testid": "config-format-select-label"
|
|
@@ -3357,7 +3357,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3357
3357
|
var t;
|
|
3358
3358
|
const a = n, i = e, o = mt(), { i18n: { t: r } } = ue.useI18n(), { getMessageFromError: l } = ue.useErrors(), { axiosInstance: s } = ue.useAxios({
|
|
3359
3359
|
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
3360
|
-
}), u =
|
|
3360
|
+
}), u = M(!1), c = M(!1), d = M(""), v = A(() => i.canSubmit === !1 || i.isReadonly), g = M(!1), S = A(() => {
|
|
3361
3361
|
var C, w;
|
|
3362
3362
|
let F = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3363
3363
|
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);
|
|
@@ -3369,7 +3369,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3369
3369
|
a("cancel");
|
|
3370
3370
|
}, f = () => {
|
|
3371
3371
|
v.value || a("submit");
|
|
3372
|
-
}, $ =
|
|
3372
|
+
}, $ = M([
|
|
3373
3373
|
{
|
|
3374
3374
|
title: r("baseForm.configuration.yaml"),
|
|
3375
3375
|
hash: "#yaml"
|
|
@@ -3394,7 +3394,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3394
3394
|
u.value = !1;
|
|
3395
3395
|
}
|
|
3396
3396
|
}), (C, w) => {
|
|
3397
|
-
const F = q("KSkeleton"), L = q("KEmptyState"), V = q("KAlert"), _ = q("KButton"), R = q("KTabs"),
|
|
3397
|
+
const F = q("KSkeleton"), L = q("KEmptyState"), V = q("KAlert"), _ = q("KButton"), R = q("KTabs"), K = q("KSlideout"), B = q("KCard");
|
|
3398
3398
|
return p(), N(B, { class: "kong-ui-entity-base-form" }, {
|
|
3399
3399
|
default: h(() => [
|
|
3400
3400
|
u.value ? (p(), N(F, {
|
|
@@ -3426,7 +3426,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3426
3426
|
}, null, 8, ["alert-message"])) : J("", !0),
|
|
3427
3427
|
U("div", fl, [
|
|
3428
3428
|
ee(C.$slots, "form-actions", {}, () => [
|
|
3429
|
-
e.config.
|
|
3429
|
+
e.config.jsonYamlFormsEnabled ? (p(), j("div", yl, [
|
|
3430
3430
|
T(_, {
|
|
3431
3431
|
appearance: "tertiary",
|
|
3432
3432
|
"data-testid": "form-view-configuration",
|
|
@@ -3463,7 +3463,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3463
3463
|
], !0)
|
|
3464
3464
|
])
|
|
3465
3465
|
], 32)),
|
|
3466
|
-
T(
|
|
3466
|
+
T(K, {
|
|
3467
3467
|
"close-button-alignment": "end",
|
|
3468
3468
|
"data-testid": "form-view-configuration-slideout",
|
|
3469
3469
|
"has-overlay": !1,
|
|
@@ -3501,7 +3501,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3501
3501
|
});
|
|
3502
3502
|
};
|
|
3503
3503
|
}
|
|
3504
|
-
}), gl = /* @__PURE__ */ be(ml, [["__scopeId", "data-v-
|
|
3504
|
+
}), gl = /* @__PURE__ */ be(ml, [["__scopeId", "data-v-4ef70725"]]), hl = {
|
|
3505
3505
|
key: 0,
|
|
3506
3506
|
"data-testid": "first-col"
|
|
3507
3507
|
}, vl = /* @__PURE__ */ ie({
|
|
@@ -3534,7 +3534,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3534
3534
|
}, l = () => {
|
|
3535
3535
|
var k, x, b;
|
|
3536
3536
|
u.value = ((k = a.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, c.value = ((x = t.value) == null ? void 0 : x.clientWidth) || 0, d.value = ((b = s.value) == null ? void 0 : b.innerText) || "";
|
|
3537
|
-
}, s =
|
|
3537
|
+
}, s = M({}), u = M(0), c = M(0), d = M(""), v = A(() => [a.value, t.value]), g = ke(
|
|
3538
3538
|
v,
|
|
3539
3539
|
(k) => {
|
|
3540
3540
|
if (i.value && (r(), "ResizeObserver" in window && window)) {
|
|
@@ -3716,7 +3716,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3716
3716
|
"data-rowid": w.id,
|
|
3717
3717
|
"data-testid": w.name,
|
|
3718
3718
|
...t.rowAttributes(w)
|
|
3719
|
-
}), c =
|
|
3719
|
+
}), c = M({}), d = (w) => {
|
|
3720
3720
|
var F;
|
|
3721
3721
|
return (F = c.value) == null ? void 0 : F.$el.querySelector(`[data-rowid="${w.id}"]`);
|
|
3722
3722
|
}, v = (w) => {
|
|
@@ -3747,8 +3747,8 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3747
3747
|
t.preferencesStorageKey && b(t.preferencesStorageKey, w);
|
|
3748
3748
|
};
|
|
3749
3749
|
return (w, F) => {
|
|
3750
|
-
const L = q("KIcon"), V = q("KButton"), _ = q("KDropdown"), R = q("KTable"),
|
|
3751
|
-
return p(), N(
|
|
3750
|
+
const L = q("KIcon"), V = q("KButton"), _ = q("KDropdown"), R = q("KTable"), K = q("KCard");
|
|
3751
|
+
return p(), N(K, {
|
|
3752
3752
|
class: "kong-ui-entity-base-table",
|
|
3753
3753
|
title: e.title
|
|
3754
3754
|
}, {
|
|
@@ -3973,7 +3973,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3973
3973
|
width: "20",
|
|
3974
3974
|
x: "0",
|
|
3975
3975
|
y: "0"
|
|
3976
|
-
}, $l = ["fill"],
|
|
3976
|
+
}, $l = ["fill"], Kl = { mask: "url(#mask0_180_20349)" }, Ml = ["fill"], Gt = /* @__PURE__ */ ie({
|
|
3977
3977
|
__name: "IconFilter",
|
|
3978
3978
|
props: {
|
|
3979
3979
|
color: {
|
|
@@ -3990,11 +3990,11 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
3990
3990
|
width: "20"
|
|
3991
3991
|
}, null, 8, $l)
|
|
3992
3992
|
]),
|
|
3993
|
-
U("g",
|
|
3993
|
+
U("g", Kl, [
|
|
3994
3994
|
U("path", {
|
|
3995
3995
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3996
3996
|
fill: e.color
|
|
3997
|
-
}, null, 8,
|
|
3997
|
+
}, null, 8, Ml)
|
|
3998
3998
|
])
|
|
3999
3999
|
]));
|
|
4000
4000
|
}
|
|
@@ -4021,7 +4021,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4021
4021
|
},
|
|
4022
4022
|
emits: ["update:modelValue"],
|
|
4023
4023
|
setup(e, { emit: n }) {
|
|
4024
|
-
const { i18n: { t } } = ue.useI18n(), a = e, i = n, o =
|
|
4024
|
+
const { i18n: { t } } = ue.useI18n(), a = e, i = n, o = M(!1), r = M({}), l = A(() => {
|
|
4025
4025
|
const b = [];
|
|
4026
4026
|
return new URLSearchParams(a.modelValue).forEach((f, $) => {
|
|
4027
4027
|
f !== "" && b.push($);
|
|
@@ -4112,14 +4112,14 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4112
4112
|
])
|
|
4113
4113
|
]),
|
|
4114
4114
|
itemBody: h(() => {
|
|
4115
|
-
var R,
|
|
4115
|
+
var R, K;
|
|
4116
4116
|
return [
|
|
4117
4117
|
U("div", ql, [
|
|
4118
4118
|
U("label", {
|
|
4119
4119
|
class: "menu-item-label",
|
|
4120
4120
|
for: d(V.value)
|
|
4121
4121
|
}, E(m(t)("filter.fieldLabel")), 9, Bl),
|
|
4122
|
-
((
|
|
4122
|
+
((K = (R = e.config.schema) == null ? void 0 : R[V.value]) == null ? void 0 : K.type) === "select" ? (p(), N(w, {
|
|
4123
4123
|
key: 0,
|
|
4124
4124
|
id: d(V.value),
|
|
4125
4125
|
modelValue: r.value[V.value],
|
|
@@ -4209,7 +4209,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4209
4209
|
}
|
|
4210
4210
|
},
|
|
4211
4211
|
setup(e) {
|
|
4212
|
-
const n = e, t =
|
|
4212
|
+
const n = e, t = M(void 0), a = A(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4213
4213
|
return ke(() => n.authFunction, async () => {
|
|
4214
4214
|
t.value = await n.authFunction();
|
|
4215
4215
|
}, { immediate: !0 }), (i, o) => a.value ? ee(i.$slots, "default", {
|
|
@@ -4325,7 +4325,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4325
4325
|
var qe;
|
|
4326
4326
|
const t = n, a = e, { i18n: { t: i } } = ht.useI18n(), o = mt(), { axiosInstance: r } = At({
|
|
4327
4327
|
headers: (qe = a.config) == null ? void 0 : qe.requestHeaders
|
|
4328
|
-
}), l =
|
|
4328
|
+
}), l = M(1), s = A(() => a.config.app !== "kongManager" || !!a.config.disableSorting), u = {
|
|
4329
4329
|
name: { label: i("keys.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4330
4330
|
kid: { label: i("keys.list.table_headers.key_id"), sortable: !0 },
|
|
4331
4331
|
tags: { label: i("keys.list.table_headers.tags") },
|
|
@@ -4334,7 +4334,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4334
4334
|
var I, H, ae, de;
|
|
4335
4335
|
let y = `${a.config.apiBaseUrl}${Ie.list[a.config.app][a.config.keySetId ? "forKeySet" : "all"]}`;
|
|
4336
4336
|
return a.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((I = a.config) == null ? void 0 : I.controlPlaneId) || "").replace(/{keySetId}/gi, ((H = a.config) == null ? void 0 : H.keySetId) || "") : a.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (ae = a.config) != null && ae.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, ((de = a.config) == null ? void 0 : de.keySetId) || "")), y;
|
|
4337
|
-
}), v =
|
|
4337
|
+
}), v = M(""), g = A(() => {
|
|
4338
4338
|
const y = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4339
4339
|
if (y)
|
|
4340
4340
|
return {
|
|
@@ -4351,7 +4351,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4351
4351
|
v.value = "";
|
|
4352
4352
|
}, b = () => {
|
|
4353
4353
|
l.value++;
|
|
4354
|
-
}, f =
|
|
4354
|
+
}, f = M(null), $ = (y, I) => {
|
|
4355
4355
|
const H = y.id;
|
|
4356
4356
|
if (!I(H)) {
|
|
4357
4357
|
L(y, "id");
|
|
@@ -4395,23 +4395,23 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4395
4395
|
}), R = (y) => ({
|
|
4396
4396
|
label: i("keys.actions.edit"),
|
|
4397
4397
|
to: a.config.getEditRoute(y)
|
|
4398
|
-
}),
|
|
4399
|
-
|
|
4398
|
+
}), K = M(void 0), B = M(!1), D = M(!1), z = M(""), Q = Wl(a.config, d.value), te = (y) => {
|
|
4399
|
+
K.value = y, B.value = !0;
|
|
4400
4400
|
}, re = () => {
|
|
4401
4401
|
B.value = !1;
|
|
4402
4402
|
}, ne = async () => {
|
|
4403
4403
|
var y, I, H;
|
|
4404
|
-
if ((y =
|
|
4404
|
+
if ((y = K.value) != null && y.id) {
|
|
4405
4405
|
D.value = !0;
|
|
4406
4406
|
try {
|
|
4407
|
-
await r.delete(Q(
|
|
4407
|
+
await r.delete(Q(K.value.id)), D.value = !1, B.value = !1, l.value++, t("delete:success", K.value);
|
|
4408
4408
|
} catch (ae) {
|
|
4409
4409
|
z.value = ((H = (I = ae.response) == null ? void 0 : I.data) == null ? void 0 : H.message) || ae.message || i("keys.errors.delete"), t("error", ae);
|
|
4410
4410
|
} finally {
|
|
4411
4411
|
D.value = !1;
|
|
4412
4412
|
}
|
|
4413
4413
|
}
|
|
4414
|
-
}, X =
|
|
4414
|
+
}, X = M(!0);
|
|
4415
4415
|
ke(k, (y) => {
|
|
4416
4416
|
var I, H, ae, de;
|
|
4417
4417
|
if (Array.isArray((I = y == null ? void 0 : y.response) == null ? void 0 : I.data) && (X.value = y.response.data.length > 0), y.status === Te.Error) {
|
|
@@ -4422,7 +4422,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4422
4422
|
}
|
|
4423
4423
|
f.value = null;
|
|
4424
4424
|
});
|
|
4425
|
-
const ce =
|
|
4425
|
+
const ce = M({
|
|
4426
4426
|
ctaPath: a.config.createRoute,
|
|
4427
4427
|
ctaText: void 0,
|
|
4428
4428
|
message: i("keys.list.empty_state.description"),
|
|
@@ -4595,7 +4595,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4595
4595
|
T(m(jl), {
|
|
4596
4596
|
"action-pending": D.value,
|
|
4597
4597
|
description: m(i)("keys.delete.description"),
|
|
4598
|
-
"entity-name":
|
|
4598
|
+
"entity-name": K.value && (K.value.name || K.value.id),
|
|
4599
4599
|
"entity-type": m(rn).Key,
|
|
4600
4600
|
error: z.value,
|
|
4601
4601
|
"need-confirm": !1,
|
|
@@ -4686,7 +4686,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4686
4686
|
}, { immediate: !0 });
|
|
4687
4687
|
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) => {
|
|
4688
4688
|
var I, H, ae, de;
|
|
4689
|
-
c.fields.key_id = (y == null ? void 0 : y.kid) || "", c.fields.name = (y == null ? void 0 : y.name) || "", c.fields.tags = ((I = y == null ? void 0 : y.tags) == null ? void 0 : I.join(", ")) || "", c.fields.key_set = ((H = y == null ? void 0 : y.set) == null ? void 0 : H.id) || "", c.fields.key_format = y != null && y.pem ? "pem" : "jwk", c.fields.jwk = (y == null ? void 0 : y.jwk) || "", c.fields.private_key = ((ae = y == null ? void 0 : y.pem) == null ? void 0 : ae.private_key) || "", c.fields.public_key = ((de = y == null ? void 0 : y.pem) == null ? void 0 : de.public_key) || "", c.fields.key_set && (
|
|
4689
|
+
c.fields.key_id = (y == null ? void 0 : y.kid) || "", c.fields.name = (y == null ? void 0 : y.name) || "", c.fields.tags = ((I = y == null ? void 0 : y.tags) == null ? void 0 : I.join(", ")) || "", c.fields.key_set = ((H = y == null ? void 0 : y.set) == null ? void 0 : H.id) || "", c.fields.key_format = y != null && y.pem ? "pem" : "jwk", c.fields.jwk = (y == null ? void 0 : y.jwk) || "", c.fields.private_key = ((ae = y == null ? void 0 : y.pem) == null ? void 0 : ae.private_key) || "", c.fields.public_key = ((de = y == null ? void 0 : y.pem) == null ? void 0 : de.public_key) || "", c.fields.key_set && (K.value = !1), Object.assign(d, c.fields);
|
|
4690
4690
|
}, b = () => {
|
|
4691
4691
|
i.push(a.config.cancelRoute);
|
|
4692
4692
|
}, f = A(() => {
|
|
@@ -4726,12 +4726,12 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4726
4726
|
} = Ql(a.config, Ie.form[a.config.app].keySets, void 0, {
|
|
4727
4727
|
fetchedItemsKey: "data",
|
|
4728
4728
|
searchKeys: ["id", "name"]
|
|
4729
|
-
}),
|
|
4730
|
-
|
|
4731
|
-
}, D = A(() => L.value ? o("keys.errors.key_sets.fetch") : ""), z = A(() => V.value ? o("keys.errors.key_sets.invalid") : ""), Q =
|
|
4729
|
+
}), K = M(!0), B = (y) => {
|
|
4730
|
+
K.value = !y, (!y || y !== c.fields.key_set && y !== d.key_set) && C(y);
|
|
4731
|
+
}, D = A(() => L.value ? o("keys.errors.key_sets.fetch") : ""), z = A(() => V.value ? o("keys.errors.key_sets.invalid") : ""), Q = M(0), te = A(() => F.value === void 0), re = A(() => {
|
|
4732
4732
|
if (te.value)
|
|
4733
4733
|
return a.config.app === "konnect" ? o("keys.form.fields.key_set.footer") : void 0;
|
|
4734
|
-
}), ne =
|
|
4734
|
+
}), ne = M(/* @__PURE__ */ new Set()), X = A(() => Array.from(ne.value).map((I) => ({
|
|
4735
4735
|
name: I.name || "",
|
|
4736
4736
|
// can't use name for label or it tries to search => 404
|
|
4737
4737
|
label: "",
|
|
@@ -4803,7 +4803,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4803
4803
|
"onUpdate:modelValue": I[2] || (I[2] = (W) => c.fields.key_set = W),
|
|
4804
4804
|
appearance: "select",
|
|
4805
4805
|
autosuggest: "",
|
|
4806
|
-
class: we({ "k-select-placeholder":
|
|
4806
|
+
class: we({ "k-select-placeholder": K.value }),
|
|
4807
4807
|
clearable: S.value,
|
|
4808
4808
|
"data-testid": "key-form-key-set",
|
|
4809
4809
|
"dropdown-footer-text": re.value,
|
|
@@ -4953,7 +4953,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4953
4953
|
}), { convertKeyToTitle: o } = Xl(), { i18n: { t: r } } = ht.useI18n(), l = A(() => a.keySetId ? `${Ie.form[a.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, a.keySetId) : Ie.form[a.config.app].edit.all), s = A(() => {
|
|
4954
4954
|
var f;
|
|
4955
4955
|
return (f = Ie.form[a.config.app]) == null ? void 0 : f.getKeySet;
|
|
4956
|
-
}), u =
|
|
4956
|
+
}), u = M(), c = M({}), d = M(a.keySetId || ""), v = M(""), g = M(!1), S = async (f) => {
|
|
4957
4957
|
var $;
|
|
4958
4958
|
u.value = f, d.value = ($ = f == null ? void 0 : f.set) == null ? void 0 : $.id, t("fetch:success", f), k(f);
|
|
4959
4959
|
};
|
|
@@ -4993,7 +4993,7 @@ const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
|
4993
4993
|
t("fetch:error", w);
|
|
4994
4994
|
}
|
|
4995
4995
|
return c;
|
|
4996
|
-
}, x =
|
|
4996
|
+
}, x = M({
|
|
4997
4997
|
id: {},
|
|
4998
4998
|
name: {
|
|
4999
4999
|
tooltip: r("keys.form.fields.name.tooltip")
|