@kong-ui-public/entities-shared 3.33.2-pr.2665.3c8048eae.0 → 3.33.2-pr.2665.525593492.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as Pt, ref as
|
|
1
|
+
import { inject as Pt, ref as N, computed as $, unref as T, toValue as ye, watch as be, toRef as Jn, provide as Dt, defineComponent as z, createBlock as j, openBlock as m, resolveDynamicComponent as Pe, normalizeClass as fe, withCtx as k, createElementBlock as S, createCommentVNode as M, createElementVNode as B, toDisplayString as L, Fragment as ue, renderList as ce, resolveComponent as D, createVNode as K, createTextVNode as U, useCssVars as Ut, useId as Gn, useSlots as De, renderSlot as P, createSlots as Se, normalizeProps as zn, guardReactiveProps as Qn, mergeProps as qt, onMounted as nt, onBeforeMount as it, withModifiers as Be, Teleport as Ht, onUnmounted as Zn, withDirectives as xe, vShow as Ce, withKeys as Xn, warn as ei } from "vue";
|
|
2
2
|
import pt from "axios";
|
|
3
3
|
import { createI18n as ti, i18nTComponent as ni } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as ii, KButton as mt, KTruncate as ri, KBadge as ai } from "@kong/kongponents";
|
|
@@ -278,7 +278,7 @@ function Ii(e, t, n, i = {
|
|
|
278
278
|
n || (n = "1000");
|
|
279
279
|
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = qe(), { debounce: a } = yi(), s = a(async (E) => {
|
|
280
280
|
await C(E);
|
|
281
|
-
}, 200), l =
|
|
281
|
+
}, 200), l = N(!1), c = N(""), d = N(""), u = N([]), p = N([]), g = N(void 0), y = $(() => {
|
|
282
282
|
const E = `${e.apiBaseUrl}${T(t)}`;
|
|
283
283
|
return e.app === "konnect" ? E.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? E.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : E;
|
|
284
284
|
}), { isValidUuid: x } = Wt(), h = async () => {
|
|
@@ -291,30 +291,30 @@ function Ii(e, t, n, i = {
|
|
|
291
291
|
} finally {
|
|
292
292
|
l.value = !1;
|
|
293
293
|
}
|
|
294
|
-
},
|
|
294
|
+
}, A = N(""), C = async (E) => {
|
|
295
295
|
var Y, X, w;
|
|
296
|
-
if (
|
|
297
|
-
if (
|
|
296
|
+
if (A.value !== E) {
|
|
297
|
+
if (A.value = E ?? "", !E) {
|
|
298
298
|
u.value = p.value;
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
if (g.value === void 0)
|
|
302
302
|
try {
|
|
303
303
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
304
|
-
const
|
|
304
|
+
const _ = `${y.value}/${E}`, { data: O } = await r.get(`${_}?size=${n}`);
|
|
305
305
|
i.fetchedItemsKey in O ? u.value = O[i.fetchedItemsKey] : O != null && O[i.exactMatchKey ?? "id"] ? u.value = [O] : u.value = [];
|
|
306
306
|
} else {
|
|
307
|
-
const
|
|
308
|
-
x(E) && i.searchKeys.includes("id") ?
|
|
307
|
+
const _ = [];
|
|
308
|
+
x(E) && i.searchKeys.includes("id") ? _.push((async () => {
|
|
309
309
|
const { data: v } = await r.get(`${y.value}/${E}`);
|
|
310
310
|
return [v[i.fetchedItemsKey] ?? v];
|
|
311
|
-
})()) :
|
|
311
|
+
})()) : _.push(
|
|
312
312
|
...i.searchKeys.filter((v) => v !== "id").map(async (v) => {
|
|
313
313
|
const { data: b } = await r.get(`${y.value}?${v}=${E}`);
|
|
314
314
|
return b[i.fetchedItemsKey];
|
|
315
315
|
})
|
|
316
316
|
);
|
|
317
|
-
const O = await Promise.all(
|
|
317
|
+
const O = await Promise.all(_), f = /* @__PURE__ */ new Set();
|
|
318
318
|
u.value = [], (Y = O == null ? void 0 : O.forEach) == null || Y.call(O, (v) => {
|
|
319
319
|
var b;
|
|
320
320
|
(b = v == null ? void 0 : v.forEach) == null || b.call(v, (H) => {
|
|
@@ -322,17 +322,17 @@ function Ii(e, t, n, i = {
|
|
|
322
322
|
});
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
|
-
} catch (
|
|
326
|
-
((X =
|
|
325
|
+
} catch (_) {
|
|
326
|
+
((X = _ == null ? void 0 : _.response) == null ? void 0 : X.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
327
327
|
} finally {
|
|
328
328
|
l.value = !1;
|
|
329
329
|
}
|
|
330
330
|
else
|
|
331
|
-
l.value = !0, d.value = "", u.value = (w = g.value) == null ? void 0 : w.filter((
|
|
331
|
+
l.value = !0, d.value = "", u.value = (w = g.value) == null ? void 0 : w.filter((_) => {
|
|
332
332
|
var f;
|
|
333
333
|
let O = !1;
|
|
334
334
|
for (const v of i.searchKeys) {
|
|
335
|
-
const b = typeof
|
|
335
|
+
const b = typeof _[v] == "string" ? (f = _[v]) == null ? void 0 : f.toLowerCase() : _[v];
|
|
336
336
|
b != null && b.includes(E.toLowerCase()) && (O = !0);
|
|
337
337
|
}
|
|
338
338
|
return O;
|
|
@@ -460,7 +460,7 @@ function Jt(e, t) {
|
|
|
460
460
|
}
|
|
461
461
|
const gt = /* @__PURE__ */ new Map();
|
|
462
462
|
function Bi(e, t, n) {
|
|
463
|
-
const i =
|
|
463
|
+
const i = N(!0), r = ye(e), { axiosInstance: o } = rt(r.axiosRequestConfig), a = Jt(e, t), s = N({
|
|
464
464
|
status: me.Idle
|
|
465
465
|
}), l = async (u) => {
|
|
466
466
|
var g;
|
|
@@ -472,9 +472,9 @@ function Bi(e, t, n) {
|
|
|
472
472
|
const x = await o.get(y);
|
|
473
473
|
if (x.status >= 400)
|
|
474
474
|
throw x;
|
|
475
|
-
const h = x.data,
|
|
475
|
+
const h = x.data, A = p && p.replace(/[^\w-_]/gi, "");
|
|
476
476
|
let C;
|
|
477
|
-
h[
|
|
477
|
+
h[A] ? C = Array.isArray(h[A]) ? h[A] : [h[A]] : Array.isArray(h) ? C = h : C = Object.keys(h).length ? [h] : [];
|
|
478
478
|
const E = {
|
|
479
479
|
data: C,
|
|
480
480
|
total: C.length,
|
|
@@ -512,9 +512,9 @@ function Bi(e, t, n) {
|
|
|
512
512
|
function Gt(e) {
|
|
513
513
|
if (e) {
|
|
514
514
|
let t = gt.get(e);
|
|
515
|
-
return t || (t =
|
|
515
|
+
return t || (t = N(1), gt.set(e, t)), t;
|
|
516
516
|
}
|
|
517
|
-
return
|
|
517
|
+
return N(1);
|
|
518
518
|
}
|
|
519
519
|
function Ri() {
|
|
520
520
|
const e = (i, r = "_") => i ? i.split(r).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
@@ -579,7 +579,7 @@ function Di(e) {
|
|
|
579
579
|
return !(a && Ct(r, a, "<") || s && Ct(r, s, ">"));
|
|
580
580
|
}
|
|
581
581
|
function Ui(e) {
|
|
582
|
-
const t =
|
|
582
|
+
const t = N(0), n = N(0), i = N(!1);
|
|
583
583
|
return be(e, (o) => {
|
|
584
584
|
o && !i.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, i.value = !0);
|
|
585
585
|
}), {
|
|
@@ -601,7 +601,7 @@ const ze = Symbol("schema"), Hi = (e) => {
|
|
|
601
601
|
};
|
|
602
602
|
function Yi(e) {
|
|
603
603
|
let t = "";
|
|
604
|
-
const n =
|
|
604
|
+
const n = N(!1), i = N(null), r = $(() => {
|
|
605
605
|
let a;
|
|
606
606
|
return n.value ? a = !0 : i.value ? a = i.value.hasData || e && ye(e) : a = !1, !a;
|
|
607
607
|
});
|
|
@@ -662,10 +662,10 @@ const W = {
|
|
|
662
662
|
return (l, c) => (m(), j(Pe(e.isArrayItem ? "fieldset" : "div"), {
|
|
663
663
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
664
664
|
}, {
|
|
665
|
-
default:
|
|
665
|
+
default: k(() => [
|
|
666
666
|
e.isArrayItem ? (m(), S("legend", Wi, [
|
|
667
|
-
|
|
668
|
-
])) :
|
|
667
|
+
B("b", null, L(s.value), 1)
|
|
668
|
+
])) : M("", !0),
|
|
669
669
|
(m(!0), S(ue, null, ce(Object.keys(a.value), (d, u) => (m(), j(Xt, {
|
|
670
670
|
key: `${r.value}-property-${u}`,
|
|
671
671
|
item: {
|
|
@@ -697,13 +697,13 @@ const W = {
|
|
|
697
697
|
return (n, i) => {
|
|
698
698
|
const r = D("KButton");
|
|
699
699
|
return m(), S("div", null, [
|
|
700
|
-
|
|
700
|
+
K(r, {
|
|
701
701
|
appearance: "tertiary",
|
|
702
702
|
class: "navigation-button",
|
|
703
703
|
onClick: i[0] || (i[0] = (o) => n.$emit("navigation-click", e.item))
|
|
704
704
|
}, {
|
|
705
|
-
default:
|
|
706
|
-
|
|
705
|
+
default: k(() => [
|
|
706
|
+
U(L(e.item.value || T(t)("baseConfigCard.commonFields.link")), 1)
|
|
707
707
|
]),
|
|
708
708
|
_: 1
|
|
709
709
|
})
|
|
@@ -725,8 +725,8 @@ const W = {
|
|
|
725
725
|
return m(), j(r, {
|
|
726
726
|
appearance: e.status ? "success" : "neutral"
|
|
727
727
|
}, {
|
|
728
|
-
default:
|
|
729
|
-
|
|
728
|
+
default: k(() => [
|
|
729
|
+
U(L(e.status ? T(t)("baseConfigCard.statusBadge.enabledLabel") : T(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
730
730
|
]),
|
|
731
731
|
_: 1
|
|
732
732
|
}, 8, ["appearance"]);
|
|
@@ -895,22 +895,22 @@ const W = {
|
|
|
895
895
|
text: n.item.value
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
|
-
}), h =
|
|
898
|
+
}), h = N(), A = N(), { isTruncated: C } = W.useTruncationDetector(h), { isTruncated: E } = W.useTruncationDetector(A);
|
|
899
899
|
return (Y, X) => {
|
|
900
|
-
const w = D("KTooltip"),
|
|
900
|
+
const w = D("KTooltip"), _ = D("KLabel"), O = D("KBadge"), f = D("KCopy");
|
|
901
901
|
return m(), S("div", ar, [
|
|
902
|
-
|
|
902
|
+
B("div", {
|
|
903
903
|
class: "config-card-details-label",
|
|
904
904
|
"data-testid": `${e.item.key}-label`
|
|
905
905
|
}, [
|
|
906
906
|
P(Y.$slots, "label", { item: e.item }, () => [
|
|
907
|
-
|
|
908
|
-
default:
|
|
909
|
-
|
|
907
|
+
K(_, { "tooltip-attributes": { maxWidth: "500px" } }, Se({
|
|
908
|
+
default: k(() => [
|
|
909
|
+
K(w, {
|
|
910
910
|
text: T(C) ? e.item.label : ""
|
|
911
911
|
}, {
|
|
912
|
-
default:
|
|
913
|
-
|
|
912
|
+
default: k(() => [
|
|
913
|
+
B("span", {
|
|
914
914
|
ref_key: "labelContent",
|
|
915
915
|
ref: h,
|
|
916
916
|
class: "label-content"
|
|
@@ -923,12 +923,12 @@ const W = {
|
|
|
923
923
|
}, [
|
|
924
924
|
d.value ? {
|
|
925
925
|
name: "tooltip",
|
|
926
|
-
fn:
|
|
927
|
-
|
|
926
|
+
fn: k(() => [
|
|
927
|
+
B("div", {
|
|
928
928
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
929
929
|
}, [
|
|
930
930
|
P(Y.$slots, "label-tooltip", {}, () => [
|
|
931
|
-
|
|
931
|
+
U(L(e.item.tooltip), 1)
|
|
932
932
|
], !0)
|
|
933
933
|
], 8, lr)
|
|
934
934
|
]),
|
|
@@ -937,7 +937,7 @@ const W = {
|
|
|
937
937
|
]), 1024)
|
|
938
938
|
], !0)
|
|
939
939
|
], 8, or),
|
|
940
|
-
|
|
940
|
+
B("div", {
|
|
941
941
|
class: "config-card-details-value",
|
|
942
942
|
"data-testid": `${e.item.key}-property-value`
|
|
943
943
|
}, [
|
|
@@ -946,7 +946,7 @@ const W = {
|
|
|
946
946
|
}, () => [
|
|
947
947
|
c.value ? (m(), S("div", ur, [
|
|
948
948
|
(m(), j(Pe(x.value.tag), zn(Qn(x.value.attrs)), {
|
|
949
|
-
default:
|
|
949
|
+
default: k(() => [
|
|
950
950
|
x.value.additionalComponent === "KBadge" ? (m(), S("div", {
|
|
951
951
|
key: 0,
|
|
952
952
|
"data-testid": `${e.item.key}-badge-tags`
|
|
@@ -958,8 +958,8 @@ const W = {
|
|
|
958
958
|
tooltip: v,
|
|
959
959
|
"truncation-tooltip": ""
|
|
960
960
|
}, {
|
|
961
|
-
default:
|
|
962
|
-
|
|
961
|
+
default: k(() => [
|
|
962
|
+
U(L(v), 1)
|
|
963
963
|
]),
|
|
964
964
|
_: 2
|
|
965
965
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
@@ -984,8 +984,8 @@ const W = {
|
|
|
984
984
|
class: "config-badge",
|
|
985
985
|
"data-testid": `${e.item.key}-badge-method-${b}`
|
|
986
986
|
}, {
|
|
987
|
-
default:
|
|
988
|
-
|
|
987
|
+
default: k(() => [
|
|
988
|
+
U(L(v), 1)
|
|
989
989
|
]),
|
|
990
990
|
_: 2
|
|
991
991
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
@@ -1003,10 +1003,10 @@ const W = {
|
|
|
1003
1003
|
key: 4,
|
|
1004
1004
|
text: T(E) ? e.item.value : ""
|
|
1005
1005
|
}, {
|
|
1006
|
-
default:
|
|
1007
|
-
|
|
1006
|
+
default: k(() => [
|
|
1007
|
+
B("span", {
|
|
1008
1008
|
ref_key: "textContent",
|
|
1009
|
-
ref:
|
|
1009
|
+
ref: A,
|
|
1010
1010
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1011
1011
|
}, L(x.value.text), 3)
|
|
1012
1012
|
]),
|
|
@@ -1069,22 +1069,22 @@ const W = {
|
|
|
1069
1069
|
const a = D("KBadge"), s = D("KCodeBlock");
|
|
1070
1070
|
return m(), S("div", hr, [
|
|
1071
1071
|
t.fetcherUrl ? (m(), S("div", vr, [
|
|
1072
|
-
|
|
1072
|
+
K(a, {
|
|
1073
1073
|
appearance: t.requestMethod
|
|
1074
1074
|
}, {
|
|
1075
|
-
default:
|
|
1076
|
-
|
|
1075
|
+
default: k(() => [
|
|
1076
|
+
U(L(t.requestMethod), 1)
|
|
1077
1077
|
]),
|
|
1078
1078
|
_: 1
|
|
1079
1079
|
}, 8, ["appearance"]),
|
|
1080
|
-
|
|
1080
|
+
K(s, {
|
|
1081
1081
|
id: "json-endpoint-codeblock",
|
|
1082
1082
|
code: t.fetcherUrl,
|
|
1083
1083
|
language: "json",
|
|
1084
1084
|
"single-line": "",
|
|
1085
1085
|
theme: "dark"
|
|
1086
1086
|
}, null, 8, ["code"])
|
|
1087
|
-
])) :
|
|
1087
|
+
])) : M("", !0),
|
|
1088
1088
|
t.entityRecord ? (m(), j(s, {
|
|
1089
1089
|
key: 1,
|
|
1090
1090
|
id: "json-codeblock",
|
|
@@ -1092,7 +1092,7 @@ const W = {
|
|
|
1092
1092
|
code: JSON.stringify(n.value, null, 2),
|
|
1093
1093
|
language: "json",
|
|
1094
1094
|
theme: "dark"
|
|
1095
|
-
}, null, 8, ["class", "code"])) :
|
|
1095
|
+
}, null, 8, ["class", "code"])) : M("", !0)
|
|
1096
1096
|
]);
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
@@ -1862,7 +1862,7 @@ function Ia(e, t) {
|
|
|
1862
1862
|
F(e, "unexpected end of the stream within a double quoted scalar");
|
|
1863
1863
|
}
|
|
1864
1864
|
function Fa(e, t) {
|
|
1865
|
-
var n = !0, i, r, o, a = e.tag, s, l = e.anchor, c, d, u, p, g, y = /* @__PURE__ */ Object.create(null), x, h,
|
|
1865
|
+
var n = !0, i, r, o, a = e.tag, s, l = e.anchor, c, d, u, p, g, y = /* @__PURE__ */ Object.create(null), x, h, A, C;
|
|
1866
1866
|
if (C = e.input.charCodeAt(e.position), C === 91)
|
|
1867
1867
|
d = 93, g = !1, s = [];
|
|
1868
1868
|
else if (C === 123)
|
|
@@ -1872,7 +1872,7 @@ function Fa(e, t) {
|
|
|
1872
1872
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), C = e.input.charCodeAt(++e.position); C !== 0; ) {
|
|
1873
1873
|
if (Z(e, !0, t), C = e.input.charCodeAt(e.position), C === d)
|
|
1874
1874
|
return e.position++, e.tag = a, e.anchor = l, e.kind = g ? "mapping" : "sequence", e.result = s, !0;
|
|
1875
|
-
n ? C === 44 && F(e, "expected the node content, but found ','") : F(e, "missed comma between flow collection entries"), h = x =
|
|
1875
|
+
n ? C === 44 && F(e, "expected the node content, but found ','") : F(e, "missed comma between flow collection entries"), h = x = A = null, u = p = !1, C === 63 && (c = e.input.charCodeAt(e.position + 1), le(c) && (u = p = !0, e.position++, Z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, $e(e, t, Re, !1, !0), h = e.tag, x = e.result, Z(e, !0, t), C = e.input.charCodeAt(e.position), (p || e.line === i) && C === 58 && (u = !0, C = e.input.charCodeAt(++e.position), Z(e, !0, t), $e(e, t, Re, !1, !0), A = e.result), g ? we(e, s, y, h, x, A, i, r, o) : u ? s.push(we(e, null, y, h, x, A, i, r, o)) : s.push(x), Z(e, !0, t), C = e.input.charCodeAt(e.position), C === 44 ? (n = !0, C = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1876
1876
|
}
|
|
1877
1877
|
F(e, "unexpected end of the stream within a flow collection");
|
|
1878
1878
|
}
|
|
@@ -1939,11 +1939,11 @@ function Et(e, t) {
|
|
|
1939
1939
|
return s ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1940
1940
|
}
|
|
1941
1941
|
function La(e, t, n) {
|
|
1942
|
-
var i, r, o, a, s, l, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), g = null, y = null, x = null, h = !1,
|
|
1942
|
+
var i, r, o, a, s, l, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), g = null, y = null, x = null, h = !1, A = !1, C;
|
|
1943
1943
|
if (e.firstTabInLine !== -1) return !1;
|
|
1944
1944
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), C = e.input.charCodeAt(e.position); C !== 0; ) {
|
|
1945
1945
|
if (!h && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (C === 63 || C === 58) && le(i))
|
|
1946
|
-
C === 63 ? (h && (we(e, u, p, g, y, null, a, s, l), g = y = x = null),
|
|
1946
|
+
C === 63 ? (h && (we(e, u, p, g, y, null, a, s, l), g = y = x = null), A = !0, h = !0, r = !0) : h ? (h = !1, r = !0) : F(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, C = i;
|
|
1947
1947
|
else {
|
|
1948
1948
|
if (a = e.line, s = e.lineStart, l = e.position, !$e(e, n, An, !1, !0))
|
|
1949
1949
|
break;
|
|
@@ -1951,12 +1951,12 @@ function La(e, t, n) {
|
|
|
1951
1951
|
for (C = e.input.charCodeAt(e.position); ve(C); )
|
|
1952
1952
|
C = e.input.charCodeAt(++e.position);
|
|
1953
1953
|
if (C === 58)
|
|
1954
|
-
C = e.input.charCodeAt(++e.position), le(C) || F(e, "a whitespace character is expected after the key-value separator within a block mapping"), h && (we(e, u, p, g, y, null, a, s, l), g = y = x = null),
|
|
1955
|
-
else if (
|
|
1954
|
+
C = e.input.charCodeAt(++e.position), le(C) || F(e, "a whitespace character is expected after the key-value separator within a block mapping"), h && (we(e, u, p, g, y, null, a, s, l), g = y = x = null), A = !0, h = !1, r = !1, g = e.tag, y = e.result;
|
|
1955
|
+
else if (A)
|
|
1956
1956
|
F(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1957
1957
|
else
|
|
1958
1958
|
return e.tag = c, e.anchor = d, !0;
|
|
1959
|
-
} else if (
|
|
1959
|
+
} else if (A)
|
|
1960
1960
|
F(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1961
1961
|
else
|
|
1962
1962
|
return e.tag = c, e.anchor = d, !0;
|
|
@@ -1966,7 +1966,7 @@ function La(e, t, n) {
|
|
|
1966
1966
|
else if (e.lineIndent < t)
|
|
1967
1967
|
break;
|
|
1968
1968
|
}
|
|
1969
|
-
return h && we(e, u, p, g, y, null, a, s, l),
|
|
1969
|
+
return h && we(e, u, p, g, y, null, a, s, l), A && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), A;
|
|
1970
1970
|
}
|
|
1971
1971
|
function Ba(e) {
|
|
1972
1972
|
var t, n = !1, i = !1, r, o, a;
|
|
@@ -2452,7 +2452,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2452
2452
|
code: n.value,
|
|
2453
2453
|
language: "yaml",
|
|
2454
2454
|
theme: "dark"
|
|
2455
|
-
}, null, 8, ["code"])) :
|
|
2455
|
+
}, null, 8, ["code"])) : M("", !0)
|
|
2456
2456
|
]);
|
|
2457
2457
|
};
|
|
2458
2458
|
}
|
|
@@ -2525,13 +2525,13 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2525
2525
|
Array.isArray(u) ? c += o(u, d) : typeof u == "object" ? c += r(u, d) : c += i(u, d);
|
|
2526
2526
|
return c;
|
|
2527
2527
|
}, s = $(() => {
|
|
2528
|
-
var p, g, y, x, h,
|
|
2528
|
+
var p, g, y, x, h, A, C;
|
|
2529
2529
|
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, E]) => E != null)), c = t.entityRecord.config ? Object.fromEntries(Object.entries((p = t.entityRecord) == null ? void 0 : p.config).filter(([, E]) => E != null)) : void 0;
|
|
2530
2530
|
if (c && (l.config = c), Object.keys(l).length === 0)
|
|
2531
2531
|
return "";
|
|
2532
2532
|
delete l.id;
|
|
2533
2533
|
let d = "", u = "";
|
|
2534
|
-
if ((g = l.service) != null && g.id ? (u = "service", delete l.service) : (y = l.route) != null && y.id ? (u = "route", delete l.route) : (x = l.consumer) != null && x.id ? (u = "consumer", delete l.consumer) : (h = l.consumer_group) != null && h.id ? (u = "consumer_group", delete l.consumer_group) : (
|
|
2534
|
+
if ((g = l.service) != null && g.id ? (u = "service", delete l.service) : (y = l.route) != null && y.id ? (u = "route", delete l.route) : (x = l.consumer) != null && x.id ? (u = "consumer", delete l.consumer) : (h = l.consumer_group) != null && h.id ? (u = "consumer_group", delete l.consumer_group) : (A = l.certificate) != null && A.id ? (u = "certificate", delete l.certificate) : (C = l.set) != null && C.id && (u = "set", delete l.set), n.value) {
|
|
2535
2535
|
const E = t.subEntityType ? `${t.entityType}_${t.subEntityType}` : t.entityType;
|
|
2536
2536
|
d += `resource "konnect_event_gateway_${E}" "my_eventgateway${E.replaceAll("_", "")}" {
|
|
2537
2537
|
`, d += `${ie}provider = konnect-beta
|
|
@@ -2559,7 +2559,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2559
2559
|
code: s.value,
|
|
2560
2560
|
language: "terraform",
|
|
2561
2561
|
theme: "dark"
|
|
2562
|
-
}, null, 8, ["code"])) :
|
|
2562
|
+
}, null, 8, ["code"])) : M("", !0)
|
|
2563
2563
|
]);
|
|
2564
2564
|
};
|
|
2565
2565
|
}
|
|
@@ -2587,24 +2587,45 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2587
2587
|
...n.value,
|
|
2588
2588
|
[t.entityType + "s"]: [o]
|
|
2589
2589
|
};
|
|
2590
|
-
return Hn.dump(a);
|
|
2590
|
+
return Hn.dump(a, { quotingType: '"' }).trim();
|
|
2591
2591
|
}), r = $(() => {
|
|
2592
|
-
let o = "deck
|
|
2593
|
-
return t.geoServerUrl && (o += ` --konnect-addr ${t.geoServerUrl}`), `echo
|
|
2594
|
-
'${
|
|
2595
|
-
' | ${o}
|
|
2596
|
-
`;
|
|
2592
|
+
let o = "deck gateway apply -";
|
|
2593
|
+
return t.geoServerUrl && (o += ` --konnect-addr ${t.geoServerUrl}`), `echo '${i.value}
|
|
2594
|
+
' | ${o}`;
|
|
2597
2595
|
});
|
|
2598
2596
|
return (o, a) => {
|
|
2599
|
-
const s = D("KCodeBlock");
|
|
2597
|
+
const s = D("KBadge"), l = D("KCodeBlock");
|
|
2600
2598
|
return m(), S("div", Do, [
|
|
2601
|
-
|
|
2599
|
+
B("p", null, [
|
|
2600
|
+
a[1] || (a[1] = U(" The ", -1)),
|
|
2601
|
+
K(s, null, {
|
|
2602
|
+
default: k(() => [...a[0] || (a[0] = [
|
|
2603
|
+
U("DECK_KONNECT_TOKEN", -1)
|
|
2604
|
+
])]),
|
|
2605
|
+
_: 1
|
|
2606
|
+
}),
|
|
2607
|
+
a[2] || (a[2] = U(" environment variable must be added first. See ", -1)),
|
|
2608
|
+
a[3] || (a[3] = B("a", {
|
|
2609
|
+
href: "https://developer.konghq.com/deck/get-started/",
|
|
2610
|
+
target: "_blank"
|
|
2611
|
+
}, "the documentation", -1)),
|
|
2612
|
+
a[4] || (a[4] = U(" for details. ", -1))
|
|
2613
|
+
]),
|
|
2614
|
+
K(l, {
|
|
2615
|
+
id: "deck-env-codeblock",
|
|
2616
|
+
code: "export DECK_KONNECT_TOKEN=<your_konnect_PAT>",
|
|
2617
|
+
language: "shell",
|
|
2618
|
+
"single-line": "",
|
|
2619
|
+
style: { "margin-bottom": "28px" },
|
|
2620
|
+
theme: "dark"
|
|
2621
|
+
}),
|
|
2622
|
+
t.entityRecord ? (m(), j(l, {
|
|
2602
2623
|
key: 0,
|
|
2603
2624
|
id: "deck-codeblock",
|
|
2604
2625
|
code: r.value,
|
|
2605
2626
|
language: "shell",
|
|
2606
2627
|
theme: "dark"
|
|
2607
|
-
}, null, 8, ["code"])) :
|
|
2628
|
+
}, null, 8, ["code"])) : M("", !0)
|
|
2608
2629
|
]);
|
|
2609
2630
|
};
|
|
2610
2631
|
}
|
|
@@ -2686,16 +2707,16 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2686
2707
|
class: fe(`config-card-details-${c}-props`),
|
|
2687
2708
|
"data-testid": `config-card-details-${c}-props`
|
|
2688
2709
|
}, [
|
|
2689
|
-
c !== "basic" ? (m(), S("div", Ho, L(c === "advanced" ? T(i)("baseConfigCard.sections.advanced") : c === "plugin" ? T(i)("baseConfigCard.sections.plugin") : T(i)("baseConfigCard.sections.policy")), 1)) :
|
|
2710
|
+
c !== "basic" ? (m(), S("div", Ho, L(c === "advanced" ? T(i)("baseConfigCard.sections.advanced") : c === "plugin" ? T(i)("baseConfigCard.sections.plugin") : T(i)("baseConfigCard.sections.policy")), 1)) : M("", !0),
|
|
2690
2711
|
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) => P(s.$slots, `config-card-item-${d.key}`, {
|
|
2691
2712
|
key: d.key,
|
|
2692
2713
|
item: d
|
|
2693
2714
|
}, () => [
|
|
2694
|
-
|
|
2695
|
-
label:
|
|
2715
|
+
K(Xt, { item: d }, Se({
|
|
2716
|
+
label: k(() => [
|
|
2696
2717
|
P(s.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2697
2718
|
]),
|
|
2698
|
-
[d.key]:
|
|
2719
|
+
[d.key]: k(({ rowValue: u }) => [
|
|
2699
2720
|
P(s.$slots, d.key, {
|
|
2700
2721
|
row: d,
|
|
2701
2722
|
rowValue: u
|
|
@@ -2705,7 +2726,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2705
2726
|
}, [
|
|
2706
2727
|
r(d) ? {
|
|
2707
2728
|
name: "label-tooltip",
|
|
2708
|
-
fn:
|
|
2729
|
+
fn: k(() => [
|
|
2709
2730
|
P(s.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2710
2731
|
]),
|
|
2711
2732
|
key: "0"
|
|
@@ -2713,31 +2734,31 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2713
2734
|
]), 1032, ["item"])
|
|
2714
2735
|
], !0)), 128))
|
|
2715
2736
|
], 10, qo))), 128))
|
|
2716
|
-
])) :
|
|
2737
|
+
])) : M("", !0),
|
|
2717
2738
|
e.format === "json" && o.value ? (m(), j(en, {
|
|
2718
2739
|
key: 1,
|
|
2719
2740
|
config: t.config,
|
|
2720
2741
|
"entity-record": o.value,
|
|
2721
2742
|
"fetcher-url": a.value,
|
|
2722
2743
|
"request-method": "get"
|
|
2723
|
-
}, null, 8, ["config", "entity-record", "fetcher-url"])) :
|
|
2744
|
+
}, null, 8, ["config", "entity-record", "fetcher-url"])) : M("", !0),
|
|
2724
2745
|
e.format === "yaml" && o.value ? (m(), j(Vn, {
|
|
2725
2746
|
key: 2,
|
|
2726
2747
|
"entity-record": o.value
|
|
2727
|
-
}, null, 8, ["entity-record"])) :
|
|
2748
|
+
}, null, 8, ["entity-record"])) : M("", !0),
|
|
2728
2749
|
e.format === "terraform" && o.value ? (m(), j(Yn, {
|
|
2729
2750
|
key: 3,
|
|
2730
2751
|
"entity-record": o.value,
|
|
2731
2752
|
"entity-type": t.entityType,
|
|
2732
2753
|
"sub-entity-type": t.subEntityType
|
|
2733
|
-
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) :
|
|
2754
|
+
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) : M("", !0),
|
|
2734
2755
|
e.format === "deck" && o.value ? (m(), j(Wn, {
|
|
2735
2756
|
key: 4,
|
|
2736
2757
|
"control-plane-name": t.config.app === "konnect" ? t.config.controlPlaneName : void 0,
|
|
2737
2758
|
"entity-record": o.value,
|
|
2738
2759
|
"entity-type": t.entityType,
|
|
2739
2760
|
"geo-server-url": t.config.app === "konnect" ? t.config.geoServerUrl : void 0
|
|
2740
|
-
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-server-url"])) :
|
|
2761
|
+
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-server-url"])) : M("", !0)
|
|
2741
2762
|
], 64));
|
|
2742
2763
|
}
|
|
2743
2764
|
}), Yo = /* @__PURE__ */ se(Vo, [["__scopeId", "data-v-2104198c"]]), Wo = {
|
|
@@ -2887,7 +2908,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2887
2908
|
label: r("baseForm.configuration.terraform"),
|
|
2888
2909
|
value: "terraform"
|
|
2889
2910
|
});
|
|
2890
|
-
const c = l[0].value, d =
|
|
2911
|
+
const c = l[0].value, d = N(c), u = (f) => {
|
|
2891
2912
|
d.value = f == null ? void 0 : f.value, n("configFormatChange", d.value);
|
|
2892
2913
|
}, p = (f, v) => {
|
|
2893
2914
|
localStorage.setItem(f, v);
|
|
@@ -2941,94 +2962,94 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2941
2962
|
// the last property displayed
|
|
2942
2963
|
section: ae.Basic
|
|
2943
2964
|
}
|
|
2944
|
-
}, y =
|
|
2965
|
+
}, y = N(!1), x = N(!1), h = N(""), A = N({}), C = $(() => {
|
|
2945
2966
|
var b, H, J;
|
|
2946
|
-
if (!
|
|
2967
|
+
if (!A.value)
|
|
2947
2968
|
return [];
|
|
2948
|
-
const f = [], v = Object.keys(
|
|
2949
|
-
for (const I in
|
|
2969
|
+
const f = [], v = Object.keys(A.value).length;
|
|
2970
|
+
for (const I in A.value) {
|
|
2950
2971
|
if (I === "__ui_data") continue;
|
|
2951
|
-
const
|
|
2952
|
-
let
|
|
2953
|
-
(G || G === 0) && (
|
|
2972
|
+
const R = (H = (b = i.configSchema) == null ? void 0 : b[I]) == null ? void 0 : H.order, G = (J = g[I]) == null ? void 0 : J.order;
|
|
2973
|
+
let q = v;
|
|
2974
|
+
(G || G === 0) && (q = G === -1 ? v + 1 : G), R && (q = R === -1 ? v + 1 : R), f.push([I, q]);
|
|
2954
2975
|
}
|
|
2955
|
-
return f.sort(function(I,
|
|
2956
|
-
return I[1] -
|
|
2976
|
+
return f.sort(function(I, R) {
|
|
2977
|
+
return I[1] - R[1];
|
|
2957
2978
|
}), f.map((I) => {
|
|
2958
2979
|
var dt, ft;
|
|
2959
|
-
const
|
|
2980
|
+
const R = I[0], G = (dt = A.value) == null ? void 0 : dt[R], q = ((ft = i.configSchema) == null ? void 0 : ft[R]) || {}, Q = g[R];
|
|
2960
2981
|
return {
|
|
2961
|
-
key:
|
|
2982
|
+
key: R,
|
|
2962
2983
|
value: G,
|
|
2963
|
-
hidden:
|
|
2964
|
-
type:
|
|
2965
|
-
label:
|
|
2966
|
-
tooltip:
|
|
2967
|
-
section:
|
|
2984
|
+
hidden: q.hidden || !1,
|
|
2985
|
+
type: q.type ?? ((Q == null ? void 0 : Q.type) || V.Text),
|
|
2986
|
+
label: q.label ?? ((Q == null ? void 0 : Q.label) || a(R)),
|
|
2987
|
+
tooltip: q.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
2988
|
+
section: q.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2968
2989
|
};
|
|
2969
2990
|
}).filter((I) => !I.hidden && I.key !== i.pluginConfigKey);
|
|
2970
2991
|
}), E = $(() => {
|
|
2971
2992
|
var H, J;
|
|
2972
|
-
if (!
|
|
2993
|
+
if (!A.value || !i.pluginConfigKey)
|
|
2973
2994
|
return [];
|
|
2974
|
-
const f =
|
|
2995
|
+
const f = A.value[i.pluginConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2975
2996
|
for (const I in f) {
|
|
2976
|
-
const
|
|
2977
|
-
let
|
|
2978
|
-
|
|
2997
|
+
const R = (J = (H = i.pluginConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2998
|
+
let q = G != null && G !== "" ? v - 1 : v;
|
|
2999
|
+
R && (q = R === -1 ? v + 1 : R), b.push([I, q]);
|
|
2979
3000
|
}
|
|
2980
|
-
return b.sort(function(I,
|
|
2981
|
-
return I[1] -
|
|
3001
|
+
return b.sort(function(I, R) {
|
|
3002
|
+
return I[1] - R[1];
|
|
2982
3003
|
}), b.map((I) => {
|
|
2983
3004
|
var Q;
|
|
2984
|
-
const
|
|
3005
|
+
const R = I[0], G = f[R], q = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[R]) || {};
|
|
2985
3006
|
return {
|
|
2986
|
-
key:
|
|
3007
|
+
key: R,
|
|
2987
3008
|
value: G,
|
|
2988
|
-
hidden:
|
|
2989
|
-
type:
|
|
2990
|
-
label:
|
|
2991
|
-
tooltip:
|
|
3009
|
+
hidden: q.hidden || !1,
|
|
3010
|
+
type: q.type ?? V.Text,
|
|
3011
|
+
label: q.label ?? a(R),
|
|
3012
|
+
tooltip: q.tooltip ?? void 0,
|
|
2992
3013
|
section: ae.Plugin
|
|
2993
3014
|
};
|
|
2994
3015
|
}).filter((I) => !I.hidden);
|
|
2995
3016
|
}), Y = $(() => {
|
|
2996
3017
|
var H, J;
|
|
2997
|
-
if (!
|
|
3018
|
+
if (!A.value || !i.policyConfigKey)
|
|
2998
3019
|
return [];
|
|
2999
|
-
const f =
|
|
3020
|
+
const f = A.value[i.policyConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
3000
3021
|
for (const I in f) {
|
|
3001
|
-
const
|
|
3002
|
-
let
|
|
3003
|
-
|
|
3022
|
+
const R = (J = (H = i.policyConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
3023
|
+
let q = G != null && G !== "" ? v - 1 : v;
|
|
3024
|
+
R && (q = R === -1 ? v + 1 : R), b.push([I, q]);
|
|
3004
3025
|
}
|
|
3005
|
-
return b.sort(function(I,
|
|
3006
|
-
return I[1] -
|
|
3026
|
+
return b.sort(function(I, R) {
|
|
3027
|
+
return I[1] - R[1];
|
|
3007
3028
|
}), b.map((I) => {
|
|
3008
3029
|
var Q;
|
|
3009
|
-
const
|
|
3030
|
+
const R = I[0], G = f[R], q = ((Q = i.policyConfigSchema) == null ? void 0 : Q[R]) || {};
|
|
3010
3031
|
return {
|
|
3011
|
-
key:
|
|
3032
|
+
key: R,
|
|
3012
3033
|
value: G,
|
|
3013
|
-
hidden:
|
|
3014
|
-
type:
|
|
3015
|
-
label:
|
|
3016
|
-
tooltip:
|
|
3034
|
+
hidden: q.hidden || !1,
|
|
3035
|
+
type: q.type ?? V.Text,
|
|
3036
|
+
label: q.label ?? a(R),
|
|
3037
|
+
tooltip: q.tooltip ?? void 0,
|
|
3017
3038
|
section: ae.Policy
|
|
3018
3039
|
};
|
|
3019
3040
|
}).filter((I) => !I.hidden);
|
|
3020
3041
|
}), X = $(() => {
|
|
3021
3042
|
var f, v, b, H, J, I;
|
|
3022
3043
|
return {
|
|
3023
|
-
basic: (f = C.value) == null ? void 0 : f.filter((
|
|
3024
|
-
advanced: (v = C.value) == null ? void 0 : v.filter((
|
|
3025
|
-
plugin: (H = E.value) == null ? void 0 : H.concat((b = C.value) == null ? void 0 : b.filter((
|
|
3026
|
-
policy: (I = Y.value) == null ? void 0 : I.concat((J = C.value) == null ? void 0 : J.filter((
|
|
3044
|
+
basic: (f = C.value) == null ? void 0 : f.filter((R) => R.section === ae.Basic),
|
|
3045
|
+
advanced: (v = C.value) == null ? void 0 : v.filter((R) => R.section === ae.Advanced),
|
|
3046
|
+
plugin: (H = E.value) == null ? void 0 : H.concat((b = C.value) == null ? void 0 : b.filter((R) => R.section === ae.Plugin)),
|
|
3047
|
+
policy: (I = Y.value) == null ? void 0 : I.concat((J = C.value) == null ? void 0 : J.filter((R) => R.section === ae.Policy))
|
|
3027
3048
|
};
|
|
3028
3049
|
}), w = $(() => {
|
|
3029
3050
|
const f = [];
|
|
3030
3051
|
return X.value.basic.length && f.push("basic"), X.value.advanced.length && f.push("advanced"), X.value.plugin.length && f.push("plugin"), X.value.policy.length && f.push("policy"), f;
|
|
3031
|
-
}),
|
|
3052
|
+
}), _ = $(() => {
|
|
3032
3053
|
var v, b;
|
|
3033
3054
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3034
3055
|
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = i.config) == null ? void 0 : v.controlPlaneId) || "") : i.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (b = i.config) != null && b.workspace ? `/${i.config.workspace}` : "")), f = f.replace(/{id}/gi, i.config.entityId), f;
|
|
@@ -3038,15 +3059,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3038
3059
|
}, { immediate: !0 }), it(async () => {
|
|
3039
3060
|
x.value = !1, y.value = !0;
|
|
3040
3061
|
try {
|
|
3041
|
-
const { data: f } = await s.get(
|
|
3062
|
+
const { data: f } = await s.get(_.value);
|
|
3042
3063
|
if (i.dataKey)
|
|
3043
3064
|
if (typeof f[i.dataKey] < "u")
|
|
3044
|
-
|
|
3065
|
+
A.value = { ...f[i.dataKey] };
|
|
3045
3066
|
else
|
|
3046
3067
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3047
|
-
else i.recordResolver ?
|
|
3068
|
+
else i.recordResolver ? A.value = { ...i.recordResolver(f) } : A.value = { ...f };
|
|
3048
3069
|
Object.keys(i.configSchema).filter((b) => i.configSchema[b].forceShow).forEach((b) => {
|
|
3049
|
-
|
|
3070
|
+
A.value && typeof A.value[b] > "u" && (A.value[b] = null);
|
|
3050
3071
|
}), n("fetch:success", f);
|
|
3051
3072
|
} catch (f) {
|
|
3052
3073
|
const v = o(f);
|
|
@@ -3055,26 +3076,26 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3055
3076
|
y.value = !1;
|
|
3056
3077
|
}
|
|
3057
3078
|
}), (f, v) => {
|
|
3058
|
-
const b = D("KLabel"), H = D("KSelect"), J = D("KButton"), I = D("KSkeleton"),
|
|
3079
|
+
const b = D("KLabel"), H = D("KSelect"), J = D("KButton"), I = D("KSkeleton"), R = D("KEmptyState"), G = D("KCard");
|
|
3059
3080
|
return m(), j(G, {
|
|
3060
3081
|
class: "kong-ui-entity-base-config-card",
|
|
3061
3082
|
"title-tag": e.titleTag
|
|
3062
3083
|
}, Se({
|
|
3063
|
-
actions:
|
|
3064
|
-
|
|
3084
|
+
actions: k(() => [
|
|
3085
|
+
B("div", Jo, [
|
|
3065
3086
|
P(f.$slots, "actions", {}, void 0, !0),
|
|
3066
|
-
|
|
3087
|
+
K(b, {
|
|
3067
3088
|
class: "config-format-select-label",
|
|
3068
3089
|
"data-testid": "config-format-select-label"
|
|
3069
3090
|
}, {
|
|
3070
|
-
default:
|
|
3071
|
-
|
|
3091
|
+
default: k(() => [
|
|
3092
|
+
U(L(e.label), 1)
|
|
3072
3093
|
]),
|
|
3073
3094
|
_: 1
|
|
3074
3095
|
}),
|
|
3075
|
-
|
|
3096
|
+
K(H, {
|
|
3076
3097
|
modelValue: d.value,
|
|
3077
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
3098
|
+
"onUpdate:modelValue": v[0] || (v[0] = (q) => d.value = q),
|
|
3078
3099
|
"data-testid": "select-config-format",
|
|
3079
3100
|
items: l,
|
|
3080
3101
|
onChange: u
|
|
@@ -3085,51 +3106,51 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3085
3106
|
class: "book-icon",
|
|
3086
3107
|
"data-testid": "book-icon"
|
|
3087
3108
|
}, {
|
|
3088
|
-
default:
|
|
3089
|
-
|
|
3109
|
+
default: k(() => [
|
|
3110
|
+
B("a", {
|
|
3090
3111
|
href: e.configCardDoc,
|
|
3091
3112
|
rel: "noopener",
|
|
3092
3113
|
target: "_blank"
|
|
3093
3114
|
}, [
|
|
3094
|
-
|
|
3115
|
+
K(T(Vt), { size: T(rr) }, null, 8, ["size"])
|
|
3095
3116
|
], 8, Go)
|
|
3096
3117
|
]),
|
|
3097
3118
|
_: 1
|
|
3098
|
-
})) :
|
|
3119
|
+
})) : M("", !0)
|
|
3099
3120
|
])
|
|
3100
3121
|
]),
|
|
3101
|
-
default:
|
|
3122
|
+
default: k(() => [
|
|
3102
3123
|
y.value ? (m(), j(I, {
|
|
3103
3124
|
key: 0,
|
|
3104
3125
|
"data-testid": "config-card-loader",
|
|
3105
3126
|
"table-columns": 2,
|
|
3106
3127
|
type: "table"
|
|
3107
|
-
})) : x.value ? (m(), j(
|
|
3128
|
+
})) : x.value ? (m(), j(R, {
|
|
3108
3129
|
key: 1,
|
|
3109
3130
|
"data-testid": "config-card-fetch-error",
|
|
3110
3131
|
"icon-variant": "error"
|
|
3111
3132
|
}, {
|
|
3112
|
-
default:
|
|
3113
|
-
|
|
3133
|
+
default: k(() => [
|
|
3134
|
+
B("h3", null, L(h.value), 1)
|
|
3114
3135
|
]),
|
|
3115
3136
|
_: 1
|
|
3116
|
-
})) :
|
|
3117
|
-
|
|
3118
|
-
|
|
3137
|
+
})) : M("", !0),
|
|
3138
|
+
B("div", zo, [
|
|
3139
|
+
K(Yo, {
|
|
3119
3140
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
3120
3141
|
config: e.config,
|
|
3121
3142
|
"entity-type": e.entityType,
|
|
3122
|
-
"fetcher-url":
|
|
3143
|
+
"fetcher-url": _.value,
|
|
3123
3144
|
format: d.value,
|
|
3124
3145
|
"prop-list-types": w.value,
|
|
3125
3146
|
"property-collections": X.value,
|
|
3126
|
-
record:
|
|
3147
|
+
record: A.value,
|
|
3127
3148
|
"sub-entity-type": e.subEntityType
|
|
3128
3149
|
}, Se({ _: 2 }, [
|
|
3129
|
-
ce(Object.keys(f.$slots), (
|
|
3130
|
-
name:
|
|
3131
|
-
fn:
|
|
3132
|
-
P(f.$slots,
|
|
3150
|
+
ce(Object.keys(f.$slots), (q) => ({
|
|
3151
|
+
name: q,
|
|
3152
|
+
fn: k((Q) => [
|
|
3153
|
+
P(f.$slots, q, qt({ record: A.value }, Q), void 0, !0)
|
|
3133
3154
|
])
|
|
3134
3155
|
}))
|
|
3135
3156
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
@@ -3139,10 +3160,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3139
3160
|
}, [
|
|
3140
3161
|
e.hideTitle ? void 0 : {
|
|
3141
3162
|
name: "title",
|
|
3142
|
-
fn:
|
|
3143
|
-
|
|
3163
|
+
fn: k(() => [
|
|
3164
|
+
B("span", Wo, [
|
|
3144
3165
|
P(f.$slots, "title", {}, () => [
|
|
3145
|
-
|
|
3166
|
+
U(L(T(r)("baseConfigCard.title")), 1)
|
|
3146
3167
|
], !0)
|
|
3147
3168
|
])
|
|
3148
3169
|
]),
|
|
@@ -3275,19 +3296,19 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3275
3296
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3276
3297
|
setup(e, { expose: t, emit: n }) {
|
|
3277
3298
|
var X;
|
|
3278
|
-
const i = n, r = e, o = ci(), { i18n: { t: a } } = W.useI18n(), { getMessageFromError: s } = W.useErrors(), { axiosInstance: l } = W.useAxios((X = r.config) == null ? void 0 : X.axiosRequestConfig), c =
|
|
3279
|
-
var
|
|
3299
|
+
const i = n, r = e, o = ci(), { i18n: { t: a } } = W.useI18n(), { getMessageFromError: s } = W.useErrors(), { axiosInstance: l } = W.useAxios((X = r.config) == null ? void 0 : X.axiosRequestConfig), c = N(!1), d = $(() => !!r.editId), u = N(!1), p = N(""), g = $(() => r.canSubmit === !1 || r.isReadonly), y = N(!1), x = $(() => {
|
|
3300
|
+
var _, O;
|
|
3280
3301
|
let w = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3281
|
-
return r.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((
|
|
3302
|
+
return r.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((_ = r.config) == null ? void 0 : _.controlPlaneId) || "") : r.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (O = r.config) != null && O.workspace ? `/${r.config.workspace}` : "")), r.editId ? (w = w.replace(/{id}/gi, r.editId), w) : (w = w.replace(/\/{id}/gi, ""), w);
|
|
3282
3303
|
}), h = () => {
|
|
3283
3304
|
y.value = !y.value;
|
|
3284
|
-
},
|
|
3305
|
+
}, A = () => {
|
|
3285
3306
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : C();
|
|
3286
3307
|
}, C = () => {
|
|
3287
3308
|
i("cancel");
|
|
3288
3309
|
}, E = () => {
|
|
3289
3310
|
g.value || i("submit");
|
|
3290
|
-
}, Y =
|
|
3311
|
+
}, Y = N([
|
|
3291
3312
|
{
|
|
3292
3313
|
title: a("baseForm.configuration.json"),
|
|
3293
3314
|
hash: "#json"
|
|
@@ -3312,8 +3333,8 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3312
3333
|
const { data: w } = await l.get(x.value);
|
|
3313
3334
|
i("fetch:success", w);
|
|
3314
3335
|
} catch (w) {
|
|
3315
|
-
const
|
|
3316
|
-
p.value =
|
|
3336
|
+
const _ = s(w);
|
|
3337
|
+
p.value = _.startsWith("code") ? a("baseForm.errors.edit") : _, u.value = !0, i("fetch:error", w);
|
|
3317
3338
|
} finally {
|
|
3318
3339
|
c.value = !1;
|
|
3319
3340
|
}
|
|
@@ -3321,10 +3342,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3321
3342
|
viewConfig: h,
|
|
3322
3343
|
formCancel: C,
|
|
3323
3344
|
formSubmit: E
|
|
3324
|
-
}), (w,
|
|
3345
|
+
}), (w, _) => {
|
|
3325
3346
|
const O = D("KSkeleton"), f = D("KEmptyState"), v = D("KAlert"), b = D("KButton"), H = D("KTabs"), J = D("KSlideout");
|
|
3326
3347
|
return m(), j(Pe(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3327
|
-
default:
|
|
3348
|
+
default: k(() => [
|
|
3328
3349
|
c.value ? (m(), j(O, {
|
|
3329
3350
|
key: 0,
|
|
3330
3351
|
type: "form"
|
|
@@ -3333,10 +3354,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3333
3354
|
"action-button-text": T(a)("baseForm.actions.back"),
|
|
3334
3355
|
"data-testid": "form-fetch-error",
|
|
3335
3356
|
"icon-variant": "error",
|
|
3336
|
-
onClickAction:
|
|
3357
|
+
onClickAction: A
|
|
3337
3358
|
}, {
|
|
3338
|
-
default:
|
|
3339
|
-
|
|
3359
|
+
default: k(() => [
|
|
3360
|
+
B("h3", null, L(p.value), 1)
|
|
3340
3361
|
]),
|
|
3341
3362
|
_: 1
|
|
3342
3363
|
}, 8, ["action-button-text"])) : (m(), S("form", {
|
|
@@ -3352,48 +3373,48 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3352
3373
|
appearance: "danger",
|
|
3353
3374
|
"data-testid": "form-error",
|
|
3354
3375
|
message: e.errorMessage
|
|
3355
|
-
}, null, 8, ["message"])) :
|
|
3356
|
-
e.hideActions ?
|
|
3376
|
+
}, null, 8, ["message"])) : M("", !0),
|
|
3377
|
+
e.hideActions ? M("", !0) : (m(), j(Ht, {
|
|
3357
3378
|
key: 1,
|
|
3358
3379
|
disabled: !e.actionTeleportTarget,
|
|
3359
3380
|
to: e.actionTeleportTarget
|
|
3360
3381
|
}, [
|
|
3361
|
-
|
|
3382
|
+
B("div", {
|
|
3362
3383
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3363
3384
|
"data-testid": "form-actions"
|
|
3364
3385
|
}, [
|
|
3365
3386
|
P(w.$slots, "form-actions", {}, () => [
|
|
3366
|
-
|
|
3387
|
+
K(b, {
|
|
3367
3388
|
appearance: "tertiary",
|
|
3368
3389
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3369
|
-
onClick:
|
|
3390
|
+
onClick: _[0] || (_[0] = (I) => h())
|
|
3370
3391
|
}, {
|
|
3371
|
-
default:
|
|
3372
|
-
|
|
3392
|
+
default: k(() => [
|
|
3393
|
+
U(L(T(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3373
3394
|
]),
|
|
3374
3395
|
_: 1
|
|
3375
3396
|
}, 8, ["data-testid"]),
|
|
3376
|
-
|
|
3397
|
+
K(b, {
|
|
3377
3398
|
appearance: "secondary",
|
|
3378
3399
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3379
3400
|
disabled: e.isReadonly,
|
|
3380
3401
|
type: "reset",
|
|
3381
|
-
onClick:
|
|
3402
|
+
onClick: _[1] || (_[1] = (I) => !!e.actionTeleportTarget && C())
|
|
3382
3403
|
}, {
|
|
3383
|
-
default:
|
|
3384
|
-
|
|
3404
|
+
default: k(() => [
|
|
3405
|
+
U(L(e.cancelButtonText ?? T(a)("baseForm.actions.cancel")), 1)
|
|
3385
3406
|
]),
|
|
3386
3407
|
_: 1
|
|
3387
3408
|
}, 8, ["data-testid", "disabled"]),
|
|
3388
|
-
|
|
3409
|
+
K(b, {
|
|
3389
3410
|
appearance: "primary",
|
|
3390
3411
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3391
3412
|
disabled: g.value,
|
|
3392
3413
|
type: "submit",
|
|
3393
|
-
onClick:
|
|
3414
|
+
onClick: _[2] || (_[2] = (I) => !!e.actionTeleportTarget && E())
|
|
3394
3415
|
}, {
|
|
3395
|
-
default:
|
|
3396
|
-
|
|
3416
|
+
default: k(() => [
|
|
3417
|
+
U(L(e.saveButtonText ?? T(a)("baseForm.actions.save")), 1)
|
|
3397
3418
|
]),
|
|
3398
3419
|
_: 1
|
|
3399
3420
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -3401,48 +3422,49 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3401
3422
|
], 2)
|
|
3402
3423
|
], 8, ["disabled", "to"]))
|
|
3403
3424
|
], 40, Zo)),
|
|
3404
|
-
|
|
3425
|
+
K(J, {
|
|
3405
3426
|
"close-on-blur": !1,
|
|
3406
3427
|
"data-testid": "form-view-configuration-slideout",
|
|
3407
3428
|
"has-overlay": !1,
|
|
3408
3429
|
"offset-top": e.slidoutTopOffset,
|
|
3409
3430
|
title: T(a)("baseForm.configuration.title"),
|
|
3410
3431
|
visible: y.value,
|
|
3411
|
-
onClose:
|
|
3432
|
+
onClose: _[4] || (_[4] = (I) => h())
|
|
3412
3433
|
}, {
|
|
3413
|
-
default:
|
|
3414
|
-
|
|
3415
|
-
|
|
3434
|
+
default: k(() => [
|
|
3435
|
+
B("div", null, L(T(a)("baseForm.configuration.message")), 1),
|
|
3436
|
+
K(H, {
|
|
3416
3437
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3417
3438
|
tabs: Y.value,
|
|
3418
|
-
onChange:
|
|
3439
|
+
onChange: _[3] || (_[3] = (I) => i("codeBlockTabChange", I.replace("#", "")))
|
|
3419
3440
|
}, {
|
|
3420
|
-
json:
|
|
3421
|
-
|
|
3441
|
+
json: k(() => [
|
|
3442
|
+
K(en, {
|
|
3422
3443
|
config: e.config,
|
|
3423
3444
|
"entity-record": r.formFields,
|
|
3424
3445
|
"fetcher-url": x.value,
|
|
3425
3446
|
"request-method": r.editId ? "put" : "post"
|
|
3426
3447
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3427
3448
|
]),
|
|
3428
|
-
yaml:
|
|
3429
|
-
|
|
3449
|
+
yaml: k(() => [
|
|
3450
|
+
K(Vn, {
|
|
3430
3451
|
"entity-record": r.formFields
|
|
3431
3452
|
}, null, 8, ["entity-record"])
|
|
3432
3453
|
]),
|
|
3433
|
-
terraform:
|
|
3434
|
-
|
|
3454
|
+
terraform: k(() => [
|
|
3455
|
+
K(Yn, {
|
|
3435
3456
|
"entity-record": r.formFields,
|
|
3436
3457
|
"entity-type": e.entityType,
|
|
3437
3458
|
"sub-entity-type": e.subEntityType
|
|
3438
3459
|
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])
|
|
3439
3460
|
]),
|
|
3440
|
-
deck:
|
|
3441
|
-
|
|
3461
|
+
deck: k(() => [
|
|
3462
|
+
K(Wn, {
|
|
3463
|
+
"control-plane-name": e.config.app === "konnect" ? e.config.controlPlaneName : void 0,
|
|
3442
3464
|
"entity-record": r.formFields,
|
|
3443
3465
|
"entity-type": e.entityType,
|
|
3444
3466
|
"geo-server-url": e.config.app === "konnect" ? e.config.geoServerUrl : void 0
|
|
3445
|
-
}, null, 8, ["entity-record", "entity-type", "geo-server-url"])
|
|
3467
|
+
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-server-url"])
|
|
3446
3468
|
]),
|
|
3447
3469
|
_: 1
|
|
3448
3470
|
}, 8, ["tabs"])
|
|
@@ -3454,7 +3476,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3454
3476
|
});
|
|
3455
3477
|
};
|
|
3456
3478
|
}
|
|
3457
|
-
}), vs = /* @__PURE__ */ se(Xo, [["__scopeId", "data-v-
|
|
3479
|
+
}), vs = /* @__PURE__ */ se(Xo, [["__scopeId", "data-v-b55da9e5"]]), el = ["data-truncate"], tl = /* @__PURE__ */ z({
|
|
3458
3480
|
__name: "EntityBaseTableCell",
|
|
3459
3481
|
props: {
|
|
3460
3482
|
keyName: {
|
|
@@ -3478,32 +3500,32 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3478
3500
|
var h;
|
|
3479
3501
|
return ((h = n.value) == null ? void 0 : h.querySelector('[data-truncate="true"]')) || null;
|
|
3480
3502
|
}), r = $(() => {
|
|
3481
|
-
var
|
|
3482
|
-
const h = (
|
|
3503
|
+
var A, C;
|
|
3504
|
+
const h = (A = t.rowEl) == null ? void 0 : A.querySelectorAll("td");
|
|
3483
3505
|
return h ? ((C = h[0]) == null ? void 0 : C.getAttribute("data-testid")) === t.keyName : !0;
|
|
3484
3506
|
}), o = $(() => r.value || t.tooltip);
|
|
3485
3507
|
let a;
|
|
3486
3508
|
const s = () => {
|
|
3487
3509
|
a && (a.disconnect(), a = void 0);
|
|
3488
3510
|
}, l = () => {
|
|
3489
|
-
var
|
|
3490
|
-
let h = ((
|
|
3511
|
+
var A, C, E;
|
|
3512
|
+
let h = ((A = n.value) == null ? void 0 : A.clientWidth) || 0;
|
|
3491
3513
|
if (n.value && "getComputedStyle" in window) {
|
|
3492
3514
|
const Y = window.getComputedStyle(n.value);
|
|
3493
3515
|
h -= (parseFloat(Y.paddingLeft) || 0) + (parseFloat(Y.paddingRight) || 0);
|
|
3494
3516
|
}
|
|
3495
3517
|
d.value = ((C = i.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, u.value = h, p.value = ((E = c.value) == null ? void 0 : E.innerText) || "";
|
|
3496
|
-
}, c =
|
|
3518
|
+
}, c = N({}), d = N(0), u = N(0), p = N(""), g = $(() => [i.value, n.value]), y = be(
|
|
3497
3519
|
g,
|
|
3498
3520
|
(h) => {
|
|
3499
3521
|
if (o.value && (s(), "ResizeObserver" in window && window)) {
|
|
3500
|
-
a = new ResizeObserver((
|
|
3522
|
+
a = new ResizeObserver((A) => {
|
|
3501
3523
|
window.requestAnimationFrame(() => {
|
|
3502
|
-
!Array.isArray(
|
|
3524
|
+
!Array.isArray(A) || !A.length || l();
|
|
3503
3525
|
});
|
|
3504
3526
|
});
|
|
3505
|
-
for (const
|
|
3506
|
-
|
|
3527
|
+
for (const A of h)
|
|
3528
|
+
A && a.observe(A);
|
|
3507
3529
|
}
|
|
3508
3530
|
},
|
|
3509
3531
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
@@ -3512,7 +3534,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3512
3534
|
l();
|
|
3513
3535
|
}), Zn(() => {
|
|
3514
3536
|
y();
|
|
3515
|
-
}), (h,
|
|
3537
|
+
}), (h, A) => {
|
|
3516
3538
|
const C = D("KTooltip");
|
|
3517
3539
|
return m(), S("span", {
|
|
3518
3540
|
ref_key: "contentRef",
|
|
@@ -3523,12 +3545,12 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3523
3545
|
key: 0,
|
|
3524
3546
|
"data-truncate": o.value || void 0
|
|
3525
3547
|
}, [
|
|
3526
|
-
|
|
3548
|
+
K(C, {
|
|
3527
3549
|
"max-width": "300",
|
|
3528
3550
|
placement: "bottom-start",
|
|
3529
3551
|
text: x.value ? p.value : ""
|
|
3530
3552
|
}, {
|
|
3531
|
-
default:
|
|
3553
|
+
default: k(() => [
|
|
3532
3554
|
P(h.$slots, "default", {}, void 0, !0)
|
|
3533
3555
|
]),
|
|
3534
3556
|
_: 3
|
|
@@ -3717,7 +3739,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3717
3739
|
"data-rowid": f.id,
|
|
3718
3740
|
"data-testid": f.name,
|
|
3719
3741
|
...n.rowAttributes(f)
|
|
3720
|
-
}), c =
|
|
3742
|
+
}), c = N({}), d = (f) => {
|
|
3721
3743
|
var v;
|
|
3722
3744
|
return (v = c.value) == null ? void 0 : v.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3723
3745
|
}, u = (f) => {
|
|
@@ -3740,13 +3762,13 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3740
3762
|
i("click:row", v);
|
|
3741
3763
|
}), h = (f) => {
|
|
3742
3764
|
i("sort", f);
|
|
3743
|
-
}, { hideTableToolbar:
|
|
3765
|
+
}, { hideTableToolbar: A, handleStateChange: C } = W.useTableState(() => n.query), { setTablePreferences: E, getTablePreferences: Y } = hi(), X = N(Y(a.value, n.defaultTablePreferences)), w = $(() => {
|
|
3744
3766
|
const f = Y(a.value);
|
|
3745
3767
|
return {
|
|
3746
3768
|
...n.initialFetcherParams,
|
|
3747
3769
|
...f
|
|
3748
3770
|
};
|
|
3749
|
-
}),
|
|
3771
|
+
}), _ = (f) => {
|
|
3750
3772
|
X.value = f, s.value.forEach((v) => {
|
|
3751
3773
|
!("hidable" in v) || !X.value.columnVisibility || v.hidable === !1 && (X.value.columnVisibility[v.key] = !0);
|
|
3752
3774
|
}), a.value && E(a.value, f);
|
|
@@ -3762,8 +3784,8 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3762
3784
|
title: e.title,
|
|
3763
3785
|
"title-tag": e.titleTag
|
|
3764
3786
|
}, {
|
|
3765
|
-
default:
|
|
3766
|
-
|
|
3787
|
+
default: k(() => [
|
|
3788
|
+
K(b, {
|
|
3767
3789
|
ref_key: "tableRefs",
|
|
3768
3790
|
ref: c,
|
|
3769
3791
|
"cache-identifier": a.value,
|
|
@@ -3782,7 +3804,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3782
3804
|
headers: s.value,
|
|
3783
3805
|
"hide-pagination": e.hidePagination,
|
|
3784
3806
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3785
|
-
"hide-toolbar": e.hideToolbar ?? T(
|
|
3807
|
+
"hide-toolbar": e.hideToolbar ?? T(A),
|
|
3786
3808
|
"initial-fetcher-params": w.value,
|
|
3787
3809
|
loading: e.isLoading,
|
|
3788
3810
|
"pagination-attributes": O.value,
|
|
@@ -3797,43 +3819,43 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3797
3819
|
"onRow:click": x.value,
|
|
3798
3820
|
onSort: v[0] || (v[0] = (J) => h(J)),
|
|
3799
3821
|
onState: p,
|
|
3800
|
-
"onUpdate:tablePreferences":
|
|
3822
|
+
"onUpdate:tablePreferences": _
|
|
3801
3823
|
}, Se({
|
|
3802
|
-
toolbar:
|
|
3803
|
-
|
|
3824
|
+
toolbar: k(() => [
|
|
3825
|
+
B("div", il, [
|
|
3804
3826
|
P(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3805
3827
|
f.$slots["toolbar-button"] ? (m(), S("div", rl, [
|
|
3806
3828
|
P(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3807
|
-
])) :
|
|
3829
|
+
])) : M("", !0)
|
|
3808
3830
|
])
|
|
3809
3831
|
]),
|
|
3810
|
-
"action-items":
|
|
3832
|
+
"action-items": k(({ row: J }) => [
|
|
3811
3833
|
P(f.$slots, "actions", { row: J }, void 0, !0)
|
|
3812
3834
|
]),
|
|
3813
3835
|
_: 2
|
|
3814
3836
|
}, [
|
|
3815
3837
|
f.$slots["empty-state"] ? {
|
|
3816
3838
|
name: "empty-state",
|
|
3817
|
-
fn:
|
|
3839
|
+
fn: k(() => [
|
|
3818
3840
|
P(f.$slots, "empty-state", {}, void 0, !0)
|
|
3819
3841
|
]),
|
|
3820
3842
|
key: "0"
|
|
3821
3843
|
} : void 0,
|
|
3822
3844
|
ce(e.tableHeaders, (J, I) => ({
|
|
3823
3845
|
name: I,
|
|
3824
|
-
fn:
|
|
3825
|
-
|
|
3846
|
+
fn: k(({ row: R, rowValue: G }) => [
|
|
3847
|
+
K(nl, {
|
|
3826
3848
|
"key-name": String(I),
|
|
3827
|
-
"row-el": d(
|
|
3849
|
+
"row-el": d(R),
|
|
3828
3850
|
tooltip: J.tooltip
|
|
3829
3851
|
}, {
|
|
3830
|
-
default:
|
|
3852
|
+
default: k(() => [
|
|
3831
3853
|
P(f.$slots, I, {
|
|
3832
|
-
row:
|
|
3854
|
+
row: R,
|
|
3833
3855
|
rowKey: e.rowKey,
|
|
3834
3856
|
rowValue: G
|
|
3835
3857
|
}, () => [
|
|
3836
|
-
|
|
3858
|
+
U(L(G), 1)
|
|
3837
3859
|
], !0)
|
|
3838
3860
|
]),
|
|
3839
3861
|
_: 2
|
|
@@ -3842,15 +3864,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3842
3864
|
})),
|
|
3843
3865
|
e.query ? void 0 : {
|
|
3844
3866
|
name: "empty-state-action-icon",
|
|
3845
|
-
fn:
|
|
3846
|
-
|
|
3867
|
+
fn: k(() => [
|
|
3868
|
+
K(T(Yt))
|
|
3847
3869
|
]),
|
|
3848
3870
|
key: "1"
|
|
3849
3871
|
}
|
|
3850
3872
|
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-pagination-when-optional", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"]),
|
|
3851
|
-
f.$slots["outside-actions"] && T(
|
|
3873
|
+
f.$slots["outside-actions"] && T(A) ? (m(), S("div", al, [
|
|
3852
3874
|
P(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3853
|
-
])) :
|
|
3875
|
+
])) : M("", !0)
|
|
3854
3876
|
]),
|
|
3855
3877
|
_: 3
|
|
3856
3878
|
}, 8, ["title", "title-tag"]);
|
|
@@ -3919,38 +3941,38 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3919
3941
|
onCancel: a,
|
|
3920
3942
|
onProceed: s
|
|
3921
3943
|
}, {
|
|
3922
|
-
default:
|
|
3944
|
+
default: k(() => [
|
|
3923
3945
|
e.error ? (m(), S("div", ll, [
|
|
3924
|
-
|
|
3925
|
-
default:
|
|
3926
|
-
|
|
3946
|
+
K(d, { appearance: "danger" }, {
|
|
3947
|
+
default: k(() => [
|
|
3948
|
+
U(L(e.error), 1)
|
|
3927
3949
|
]),
|
|
3928
3950
|
_: 1
|
|
3929
3951
|
})
|
|
3930
|
-
])) :
|
|
3931
|
-
|
|
3952
|
+
])) : M("", !0),
|
|
3953
|
+
K(T(n), {
|
|
3932
3954
|
class: "message",
|
|
3933
3955
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3934
3956
|
tag: "p"
|
|
3935
3957
|
}, Se({
|
|
3936
|
-
entityType:
|
|
3937
|
-
|
|
3958
|
+
entityType: k(() => [
|
|
3959
|
+
U(L(i.entityType), 1)
|
|
3938
3960
|
]),
|
|
3939
3961
|
_: 2
|
|
3940
3962
|
}, [
|
|
3941
3963
|
i.entityName ? {
|
|
3942
3964
|
name: "entityName",
|
|
3943
|
-
fn:
|
|
3944
|
-
|
|
3965
|
+
fn: k(() => [
|
|
3966
|
+
B("strong", null, L(i.entityName), 1)
|
|
3945
3967
|
]),
|
|
3946
3968
|
key: "0"
|
|
3947
3969
|
} : void 0
|
|
3948
3970
|
]), 1032, ["keypath"]),
|
|
3949
3971
|
i.description || l.$slots.description ? (m(), S("div", sl, [
|
|
3950
3972
|
P(l.$slots, "description", {}, () => [
|
|
3951
|
-
|
|
3973
|
+
B("p", null, L(i.description), 1)
|
|
3952
3974
|
], !0)
|
|
3953
|
-
])) :
|
|
3975
|
+
])) : M("", !0)
|
|
3954
3976
|
]),
|
|
3955
3977
|
_: 3
|
|
3956
3978
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
@@ -3980,15 +4002,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3980
4002
|
},
|
|
3981
4003
|
setup(e) {
|
|
3982
4004
|
return (t, n) => (m(), S("svg", ul, [
|
|
3983
|
-
|
|
3984
|
-
|
|
4005
|
+
B("mask", dl, [
|
|
4006
|
+
B("rect", {
|
|
3985
4007
|
fill: e.color,
|
|
3986
4008
|
height: "20",
|
|
3987
4009
|
width: "20"
|
|
3988
4010
|
}, null, 8, fl)
|
|
3989
4011
|
]),
|
|
3990
|
-
|
|
3991
|
-
|
|
4012
|
+
B("g", pl, [
|
|
4013
|
+
B("path", {
|
|
3992
4014
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3993
4015
|
fill: e.color
|
|
3994
4016
|
}, null, 8, ml)
|
|
@@ -4018,25 +4040,25 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4018
4040
|
},
|
|
4019
4041
|
emits: ["update:modelValue"],
|
|
4020
4042
|
setup(e, { emit: t }) {
|
|
4021
|
-
const { i18n: { t: n } } = W.useI18n(), i = e, r = t, o =
|
|
4043
|
+
const { i18n: { t: n } } = W.useI18n(), i = e, r = t, o = N(!1), a = N({}), s = N(/* @__PURE__ */ new Set()), l = $(() => {
|
|
4022
4044
|
const w = [];
|
|
4023
|
-
return new URLSearchParams(i.modelValue).forEach((
|
|
4024
|
-
|
|
4045
|
+
return new URLSearchParams(i.modelValue).forEach((_, O) => {
|
|
4046
|
+
_ !== "" && w.push(O);
|
|
4025
4047
|
}), w;
|
|
4026
4048
|
}), c = $(() => {
|
|
4027
4049
|
const w = i.config.fields;
|
|
4028
|
-
return Object.keys(w).filter((
|
|
4050
|
+
return Object.keys(w).filter((_) => {
|
|
4029
4051
|
var O;
|
|
4030
|
-
return (O = w == null ? void 0 : w[
|
|
4031
|
-
}).map((
|
|
4032
|
-
label: w[
|
|
4033
|
-
value:
|
|
4052
|
+
return (O = w == null ? void 0 : w[_]) == null ? void 0 : O.searchable;
|
|
4053
|
+
}).map((_) => ({
|
|
4054
|
+
label: w[_].label || _,
|
|
4055
|
+
value: _,
|
|
4034
4056
|
expanded: !1
|
|
4035
4057
|
}));
|
|
4036
4058
|
});
|
|
4037
4059
|
be(() => i.modelValue, (w) => {
|
|
4038
|
-
a.value = {}, new URLSearchParams(w).forEach((
|
|
4039
|
-
a.value[O] =
|
|
4060
|
+
a.value = {}, new URLSearchParams(w).forEach((_, O) => {
|
|
4061
|
+
a.value[O] = _;
|
|
4040
4062
|
});
|
|
4041
4063
|
});
|
|
4042
4064
|
const d = () => {
|
|
@@ -4048,12 +4070,12 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4048
4070
|
}, g = () => {
|
|
4049
4071
|
p("");
|
|
4050
4072
|
}, y = (w) => `filter-${w}`, x = (w) => {
|
|
4051
|
-
var
|
|
4052
|
-
return (((O = (
|
|
4073
|
+
var _, O;
|
|
4074
|
+
return (((O = (_ = i.config.schema) == null ? void 0 : _[w]) == null ? void 0 : O.values) ?? []).map((f) => typeof f == "string" ? { value: f, label: f } : f);
|
|
4053
4075
|
}, h = (w) => {
|
|
4054
|
-
var
|
|
4055
|
-
return ((O = (
|
|
4056
|
-
},
|
|
4076
|
+
var _, O;
|
|
4077
|
+
return ((O = (_ = i.config.schema) == null ? void 0 : _[w]) == null ? void 0 : O.type) ?? "text";
|
|
4078
|
+
}, A = (w) => {
|
|
4057
4079
|
a.value = {
|
|
4058
4080
|
...a.value,
|
|
4059
4081
|
[w]: ""
|
|
@@ -4061,17 +4083,17 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4061
4083
|
}, C = () => {
|
|
4062
4084
|
a.value = {}, E(!0);
|
|
4063
4085
|
}, E = (w = !1) => {
|
|
4064
|
-
const
|
|
4065
|
-
w && (o.value = !1), r("update:modelValue", new URLSearchParams(
|
|
4086
|
+
const _ = Object.keys(a.value).reduce((O, f) => (a.value[f] && (O[f] = `${a.value[f]}`), O), {});
|
|
4087
|
+
w && (o.value = !1), r("update:modelValue", new URLSearchParams(_).toString());
|
|
4066
4088
|
}, Y = (w) => {
|
|
4067
|
-
var
|
|
4068
|
-
return !!((O = (
|
|
4069
|
-
}, X = (w,
|
|
4089
|
+
var _, O;
|
|
4090
|
+
return !!((O = (_ = i.config.schema) == null ? void 0 : _[w]) != null && O.filterFunction);
|
|
4091
|
+
}, X = (w, _) => {
|
|
4070
4092
|
var f;
|
|
4071
4093
|
const O = (f = i.config.schema) == null ? void 0 : f[w];
|
|
4072
|
-
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(
|
|
4094
|
+
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(_);
|
|
4073
4095
|
};
|
|
4074
|
-
return (w,
|
|
4096
|
+
return (w, _) => {
|
|
4075
4097
|
const O = D("KInput"), f = D("KButton"), v = D("KSelect");
|
|
4076
4098
|
return e.config.isExactMatch ? (m(), j(O, {
|
|
4077
4099
|
key: 0,
|
|
@@ -4082,11 +4104,11 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4082
4104
|
placeholder: e.config.placeholder,
|
|
4083
4105
|
"onUpdate:modelValue": p
|
|
4084
4106
|
}, {
|
|
4085
|
-
before:
|
|
4086
|
-
|
|
4107
|
+
before: k(() => [
|
|
4108
|
+
K(Mt)
|
|
4087
4109
|
]),
|
|
4088
|
-
after:
|
|
4089
|
-
xe(
|
|
4110
|
+
after: k(() => [
|
|
4111
|
+
xe(K(T(oi), {
|
|
4090
4112
|
class: "kong-ui-entity-filter-clear",
|
|
4091
4113
|
role: "button",
|
|
4092
4114
|
tabindex: "0",
|
|
@@ -4097,24 +4119,24 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4097
4119
|
]),
|
|
4098
4120
|
_: 1
|
|
4099
4121
|
}, 8, ["model-value", "placeholder"])) : (m(), S("div", yl, [
|
|
4100
|
-
|
|
4122
|
+
K(f, {
|
|
4101
4123
|
appearance: "tertiary",
|
|
4102
4124
|
"data-testid": "filter-button",
|
|
4103
4125
|
onClick: d
|
|
4104
4126
|
}, {
|
|
4105
|
-
default:
|
|
4106
|
-
|
|
4107
|
-
|
|
4127
|
+
default: k(() => [
|
|
4128
|
+
K(Mt),
|
|
4129
|
+
U(" " + L(T(n)("filter.filterButtonText")) + " " + L(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4108
4130
|
]),
|
|
4109
4131
|
_: 1
|
|
4110
4132
|
}),
|
|
4111
|
-
xe(
|
|
4133
|
+
xe(B("div", {
|
|
4112
4134
|
class: "kong-ui-entity-filter-backdrop",
|
|
4113
4135
|
onClick: d
|
|
4114
4136
|
}, null, 512), [
|
|
4115
4137
|
[Ce, o.value]
|
|
4116
4138
|
]),
|
|
4117
|
-
xe(
|
|
4139
|
+
xe(B("div", gl, [
|
|
4118
4140
|
(m(!0), S(ue, null, ce(c.value, (b) => {
|
|
4119
4141
|
var H, J;
|
|
4120
4142
|
return m(), S("div", {
|
|
@@ -4122,24 +4144,24 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4122
4144
|
class: "kong-ui-entity-filter-menu-item",
|
|
4123
4145
|
"data-testid": b.value
|
|
4124
4146
|
}, [
|
|
4125
|
-
|
|
4147
|
+
B("span", {
|
|
4126
4148
|
class: fe(["menu-item-title", { expanded: s.value.has(b.value) }]),
|
|
4127
4149
|
role: "button",
|
|
4128
4150
|
tabindex: "0",
|
|
4129
4151
|
onClick: (I) => u(b.value),
|
|
4130
4152
|
onKeydown: Xn((I) => u(b.value), ["enter"])
|
|
4131
4153
|
}, [
|
|
4132
|
-
|
|
4133
|
-
xe(
|
|
4154
|
+
U(L(b.label) + " ", 1),
|
|
4155
|
+
xe(B("span", bl, null, 512), [
|
|
4134
4156
|
[Ce, l.value.includes(b.value)]
|
|
4135
4157
|
]),
|
|
4136
|
-
|
|
4158
|
+
K(T(li), {
|
|
4137
4159
|
class: fe(["menu-item-expand-icon", { expanded: s.value.has(b.value) }]),
|
|
4138
4160
|
color: T(er)
|
|
4139
4161
|
}, null, 8, ["class", "color"])
|
|
4140
4162
|
], 42, vl),
|
|
4141
|
-
xe(
|
|
4142
|
-
|
|
4163
|
+
xe(B("div", xl, [
|
|
4164
|
+
B("label", {
|
|
4143
4165
|
class: "menu-item-label",
|
|
4144
4166
|
for: y(b.value)
|
|
4145
4167
|
}, L(T(n)("filter.fieldLabel")), 9, Cl),
|
|
@@ -4164,26 +4186,26 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4164
4186
|
], 512), [
|
|
4165
4187
|
[Ce, s.value.has(b.value)]
|
|
4166
4188
|
]),
|
|
4167
|
-
xe(
|
|
4168
|
-
|
|
4189
|
+
xe(B("div", kl, [
|
|
4190
|
+
K(f, {
|
|
4169
4191
|
appearance: "tertiary",
|
|
4170
4192
|
"data-testid": "apply-filter",
|
|
4171
4193
|
size: "small",
|
|
4172
|
-
onClick:
|
|
4194
|
+
onClick: _[0] || (_[0] = (I) => E(!0))
|
|
4173
4195
|
}, {
|
|
4174
|
-
default:
|
|
4175
|
-
|
|
4196
|
+
default: k(() => [
|
|
4197
|
+
U(L(T(n)("filter.applyButtonText")), 1)
|
|
4176
4198
|
]),
|
|
4177
4199
|
_: 1
|
|
4178
4200
|
}),
|
|
4179
|
-
|
|
4201
|
+
K(f, {
|
|
4180
4202
|
appearance: "tertiary",
|
|
4181
4203
|
"data-testid": "clear-filter",
|
|
4182
4204
|
size: "small",
|
|
4183
|
-
onClick: (I) =>
|
|
4205
|
+
onClick: (I) => A(b.value)
|
|
4184
4206
|
}, {
|
|
4185
|
-
default:
|
|
4186
|
-
|
|
4207
|
+
default: k(() => [
|
|
4208
|
+
U(L(T(n)("filter.clearButtonText")), 1)
|
|
4187
4209
|
]),
|
|
4188
4210
|
_: 1
|
|
4189
4211
|
}, 8, ["onClick"])
|
|
@@ -4192,14 +4214,14 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4192
4214
|
])
|
|
4193
4215
|
], 8, hl);
|
|
4194
4216
|
}), 128)),
|
|
4195
|
-
|
|
4196
|
-
|
|
4217
|
+
B("div", Al, [
|
|
4218
|
+
K(f, {
|
|
4197
4219
|
appearance: "tertiary",
|
|
4198
4220
|
size: "small",
|
|
4199
4221
|
onClick: C
|
|
4200
4222
|
}, {
|
|
4201
|
-
default:
|
|
4202
|
-
|
|
4223
|
+
default: k(() => [
|
|
4224
|
+
U(L(T(n)("filter.clearAllButtonText")), 1)
|
|
4203
4225
|
]),
|
|
4204
4226
|
_: 1
|
|
4205
4227
|
})
|
|
@@ -4242,7 +4264,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4242
4264
|
},
|
|
4243
4265
|
emits: ["cancel", "proceed"],
|
|
4244
4266
|
setup(e, { emit: t }) {
|
|
4245
|
-
const { i18n: { t: n }, i18nT: i } = W.useI18n(), r = e, o = t, a =
|
|
4267
|
+
const { i18n: { t: n }, i18nT: i } = W.useI18n(), r = e, o = t, a = N(!1), s = $(
|
|
4246
4268
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4247
4269
|
), l = $(
|
|
4248
4270
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
@@ -4261,7 +4283,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4261
4283
|
return (u, p) => {
|
|
4262
4284
|
const g = D("KPrompt");
|
|
4263
4285
|
return m(), j(Ht, { to: "body" }, [
|
|
4264
|
-
|
|
4286
|
+
K(g, {
|
|
4265
4287
|
"action-button-disabled": a.value,
|
|
4266
4288
|
"action-button-text": l.value,
|
|
4267
4289
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4270,16 +4292,16 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4270
4292
|
onCancel: c,
|
|
4271
4293
|
onProceed: d
|
|
4272
4294
|
}, {
|
|
4273
|
-
default:
|
|
4274
|
-
|
|
4295
|
+
default: k(() => [
|
|
4296
|
+
K(T(i), {
|
|
4275
4297
|
keypath: `toggleModal.${r.action}.message`,
|
|
4276
4298
|
scope: "global"
|
|
4277
4299
|
}, {
|
|
4278
|
-
entityType:
|
|
4279
|
-
|
|
4300
|
+
entityType: k(() => [
|
|
4301
|
+
U(L(e.entityType), 1)
|
|
4280
4302
|
]),
|
|
4281
|
-
entityName:
|
|
4282
|
-
|
|
4303
|
+
entityName: k(() => [
|
|
4304
|
+
B("strong", null, L(e.entityName), 1)
|
|
4283
4305
|
]),
|
|
4284
4306
|
_: 1
|
|
4285
4307
|
}, 8, ["keypath"])
|
|
@@ -4311,13 +4333,13 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4311
4333
|
}
|
|
4312
4334
|
},
|
|
4313
4335
|
setup(e) {
|
|
4314
|
-
const t = e, n =
|
|
4336
|
+
const t = e, n = N(void 0), i = $(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4315
4337
|
return be(() => t.authFunction, async () => {
|
|
4316
4338
|
n.value = await t.authFunction();
|
|
4317
4339
|
}, { immediate: !0 }), (r, o) => i.value ? P(r.$slots, "default", {
|
|
4318
4340
|
key: 0,
|
|
4319
4341
|
isAllowed: n.value
|
|
4320
|
-
}) :
|
|
4342
|
+
}) : M("", !0);
|
|
4321
4343
|
}
|
|
4322
4344
|
}), te = [];
|
|
4323
4345
|
for (let e = 0; e < 256; ++e)
|
|
@@ -4387,8 +4409,8 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4387
4409
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4388
4410
|
role: "group"
|
|
4389
4411
|
}, [
|
|
4390
|
-
|
|
4391
|
-
e.hideInfoHeader ?
|
|
4412
|
+
B("div", Fl, [
|
|
4413
|
+
e.hideInfoHeader ? M("", !0) : (m(), S("div", {
|
|
4392
4414
|
key: 0,
|
|
4393
4415
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4394
4416
|
}, [
|
|
@@ -4397,21 +4419,21 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4397
4419
|
id: T(n),
|
|
4398
4420
|
class: "form-section-title"
|
|
4399
4421
|
}, {
|
|
4400
|
-
default:
|
|
4401
|
-
|
|
4422
|
+
default: k(() => [
|
|
4423
|
+
U(L(e.title), 1)
|
|
4402
4424
|
]),
|
|
4403
4425
|
_: 1
|
|
4404
|
-
}, 8, ["id"])) :
|
|
4426
|
+
}, 8, ["id"])) : M("", !0),
|
|
4405
4427
|
e.description || T(t).description ? (m(), S("div", Ol, [
|
|
4406
4428
|
P(i.$slots, "description", {}, () => [
|
|
4407
|
-
|
|
4429
|
+
B("p", null, L(e.description), 1)
|
|
4408
4430
|
], !0)
|
|
4409
|
-
])) :
|
|
4431
|
+
])) : M("", !0),
|
|
4410
4432
|
T(t).footer ? (m(), S("div", Ll, [
|
|
4411
4433
|
P(i.$slots, "footer", {}, void 0, !0)
|
|
4412
|
-
])) :
|
|
4434
|
+
])) : M("", !0)
|
|
4413
4435
|
], 2)),
|
|
4414
|
-
|
|
4436
|
+
B("div", Bl, [
|
|
4415
4437
|
P(i.$slots, "default", {}, void 0, !0)
|
|
4416
4438
|
])
|
|
4417
4439
|
])
|
|
@@ -4436,25 +4458,25 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4436
4458
|
setup(e) {
|
|
4437
4459
|
const t = De();
|
|
4438
4460
|
return (n, i) => (m(), S("div", Kl, [
|
|
4439
|
-
|
|
4440
|
-
e.step != null ? (m(), S("div", Ml, L(e.step), 1)) :
|
|
4441
|
-
|
|
4442
|
-
|
|
4461
|
+
B("header", Nl, [
|
|
4462
|
+
e.step != null ? (m(), S("div", Ml, L(e.step), 1)) : M("", !0),
|
|
4463
|
+
B("div", jl, [
|
|
4464
|
+
B("h2", Pl, [
|
|
4443
4465
|
P(n.$slots, "title", {}, () => [
|
|
4444
|
-
|
|
4466
|
+
U(L(e.title), 1)
|
|
4445
4467
|
], !0)
|
|
4446
4468
|
]),
|
|
4447
4469
|
e.description || t.description ? (m(), S("div", Dl, [
|
|
4448
4470
|
P(n.$slots, "description", {}, () => [
|
|
4449
|
-
|
|
4471
|
+
U(L(e.description), 1)
|
|
4450
4472
|
], !0)
|
|
4451
|
-
])) :
|
|
4473
|
+
])) : M("", !0)
|
|
4452
4474
|
]),
|
|
4453
4475
|
t.extra ? (m(), S("div", Ul, [
|
|
4454
4476
|
P(n.$slots, "extra", {}, void 0, !0)
|
|
4455
|
-
])) :
|
|
4477
|
+
])) : M("", !0)
|
|
4456
4478
|
]),
|
|
4457
|
-
|
|
4479
|
+
B("div", ql, [
|
|
4458
4480
|
P(n.$slots, "default", {}, void 0, !0)
|
|
4459
4481
|
])
|
|
4460
4482
|
]));
|
|
@@ -4489,7 +4511,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4489
4511
|
}
|
|
4490
4512
|
},
|
|
4491
4513
|
setup(e) {
|
|
4492
|
-
const t = e, n =
|
|
4514
|
+
const t = e, n = N(), { isTruncated: i } = W.useTruncationDetector(n), { i18n: { t: r } } = W.useI18n(), o = r("global.actions.copyId"), a = N(o), s = $(() => t.entityLinkData.deleted ?? !1), l = $(() => {
|
|
4493
4515
|
var u;
|
|
4494
4516
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4495
4517
|
}), c = $(() => {
|
|
@@ -4510,12 +4532,12 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4510
4532
|
href: e.externalLink,
|
|
4511
4533
|
target: e.newWindow ? "_blank" : "_self"
|
|
4512
4534
|
}, {
|
|
4513
|
-
default:
|
|
4514
|
-
|
|
4535
|
+
default: k(() => [
|
|
4536
|
+
K(g, {
|
|
4515
4537
|
text: T(i) && e.entityLinkData.label || ""
|
|
4516
4538
|
}, {
|
|
4517
|
-
default:
|
|
4518
|
-
|
|
4539
|
+
default: k(() => [
|
|
4540
|
+
B("span", {
|
|
4519
4541
|
ref_key: "textContent",
|
|
4520
4542
|
ref: n,
|
|
4521
4543
|
class: "entity-link-label"
|
|
@@ -4525,7 +4547,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4525
4547
|
}, 8, ["text"])
|
|
4526
4548
|
]),
|
|
4527
4549
|
_: 1
|
|
4528
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4550
|
+
}, 8, ["hide-icon", "href", "target"])) : M("", !0) : (m(), S("div", Wl, L(" – "))),
|
|
4529
4551
|
l.value && e.allowCopy ? (m(), j(g, {
|
|
4530
4552
|
key: a.value,
|
|
4531
4553
|
class: "copy-uuid-tooltip",
|
|
@@ -4533,14 +4555,14 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4533
4555
|
placement: "bottom-end",
|
|
4534
4556
|
text: a.value
|
|
4535
4557
|
}, {
|
|
4536
|
-
default:
|
|
4537
|
-
|
|
4538
|
-
default:
|
|
4539
|
-
|
|
4558
|
+
default: k(() => [
|
|
4559
|
+
K(x, null, {
|
|
4560
|
+
default: k(({ copyToClipboard: h }) => [
|
|
4561
|
+
B("span", {
|
|
4540
4562
|
class: "entity-link-copy-id",
|
|
4541
|
-
onClick: Be((
|
|
4563
|
+
onClick: Be((A) => d(h), ["stop"])
|
|
4542
4564
|
}, [
|
|
4543
|
-
|
|
4565
|
+
K(T(si), {
|
|
4544
4566
|
class: "copy-icon",
|
|
4545
4567
|
color: T(tr),
|
|
4546
4568
|
"data-testid": "copy-id",
|
|
@@ -4552,7 +4574,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4552
4574
|
})
|
|
4553
4575
|
]),
|
|
4554
4576
|
_: 1
|
|
4555
|
-
}, 8, ["text"])) :
|
|
4577
|
+
}, 8, ["text"])) : M("", !0)
|
|
4556
4578
|
]);
|
|
4557
4579
|
};
|
|
4558
4580
|
}
|
|
@@ -4624,44 +4646,44 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4624
4646
|
},
|
|
4625
4647
|
emits: ["click:create", "click:learn-more"],
|
|
4626
4648
|
setup(e) {
|
|
4627
|
-
const t = e, { i18n: { t: n } } = W.useI18n(), i =
|
|
4649
|
+
const t = e, { i18n: { t: n } } = W.useI18n(), i = N(!1), r = $(() => i.value && !!t.actionButtonText), o = $(() => yt.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4628
4650
|
return it(async () => {
|
|
4629
4651
|
i.value = await t.canCreate();
|
|
4630
4652
|
}), nt(() => ei(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4631
4653
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) => {
|
|
4632
4654
|
const l = D("KCard");
|
|
4633
4655
|
return m(), S("div", zl, [
|
|
4634
|
-
|
|
4656
|
+
B("div", Ql, [
|
|
4635
4657
|
a.$slots.image ? (m(), S("div", Zl, [
|
|
4636
4658
|
P(a.$slots, "image", {}, void 0, !0)
|
|
4637
|
-
])) :
|
|
4659
|
+
])) : M("", !0),
|
|
4638
4660
|
e.title || a.$slots.title ? (m(), S("div", Xl, [
|
|
4639
|
-
|
|
4661
|
+
B("h1", {
|
|
4640
4662
|
class: fe(o.value)
|
|
4641
4663
|
}, [
|
|
4642
4664
|
P(a.$slots, "title", {}, () => [
|
|
4643
|
-
|
|
4665
|
+
U(L(e.title), 1)
|
|
4644
4666
|
], !0)
|
|
4645
4667
|
], 2)
|
|
4646
|
-
])) :
|
|
4668
|
+
])) : M("", !0),
|
|
4647
4669
|
e.description || a.$slots.default ? (m(), S("div", es, [
|
|
4648
4670
|
P(a.$slots, "default", {}, () => [
|
|
4649
|
-
|
|
4671
|
+
B("p", null, L(e.description), 1)
|
|
4650
4672
|
], !0)
|
|
4651
|
-
])) :
|
|
4673
|
+
])) : M("", !0),
|
|
4652
4674
|
e.pricing || a.$slots.pricing ? (m(), S("div", ts, [
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
s[2] || (s[2] =
|
|
4675
|
+
B("p", null, [
|
|
4676
|
+
B("b", null, L(T(n)("emptyState.pricingTitle")), 1),
|
|
4677
|
+
s[2] || (s[2] = U()),
|
|
4656
4678
|
P(a.$slots, "pricing", {}, () => [
|
|
4657
|
-
|
|
4679
|
+
U(L(e.pricing), 1)
|
|
4658
4680
|
], !0)
|
|
4659
4681
|
])
|
|
4660
|
-
])) :
|
|
4682
|
+
])) : M("", !0)
|
|
4661
4683
|
]),
|
|
4662
4684
|
a.$slots.message ? (m(), S("div", ns, [
|
|
4663
4685
|
P(a.$slots, "message", {}, void 0, !0)
|
|
4664
|
-
])) :
|
|
4686
|
+
])) : M("", !0),
|
|
4665
4687
|
r.value || e.learnMore || a.$slots.actions ? (m(), S("div", is, [
|
|
4666
4688
|
P(a.$slots, "actions", {}, () => [
|
|
4667
4689
|
r.value ? (m(), j(T(mt), {
|
|
@@ -4671,12 +4693,12 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4671
4693
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4672
4694
|
onClick: s[0] || (s[0] = (c) => a.$emit("click:create"))
|
|
4673
4695
|
}, {
|
|
4674
|
-
default:
|
|
4675
|
-
|
|
4676
|
-
|
|
4696
|
+
default: k(() => [
|
|
4697
|
+
K(T(Yt)),
|
|
4698
|
+
U(" " + L(e.actionButtonText), 1)
|
|
4677
4699
|
]),
|
|
4678
4700
|
_: 1
|
|
4679
|
-
}, 8, ["size"])) :
|
|
4701
|
+
}, 8, ["size"])) : M("", !0),
|
|
4680
4702
|
e.learnMore ? (m(), j(T(mt), {
|
|
4681
4703
|
key: 1,
|
|
4682
4704
|
appearance: "secondary",
|
|
@@ -4684,36 +4706,36 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4684
4706
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4685
4707
|
onClick: s[1] || (s[1] = (c) => a.$emit("click:learn-more"))
|
|
4686
4708
|
}, {
|
|
4687
|
-
default:
|
|
4688
|
-
|
|
4689
|
-
|
|
4709
|
+
default: k(() => [
|
|
4710
|
+
K(T(Vt), { decorative: "" }),
|
|
4711
|
+
U(" " + L(T(n)("emptyState.learnMore")), 1)
|
|
4690
4712
|
]),
|
|
4691
4713
|
_: 1
|
|
4692
|
-
}, 8, ["size"])) :
|
|
4714
|
+
}, 8, ["size"])) : M("", !0)
|
|
4693
4715
|
], !0)
|
|
4694
|
-
])) :
|
|
4716
|
+
])) : M("", !0),
|
|
4695
4717
|
e.features.length ? (m(), S("div", rs, [
|
|
4696
4718
|
(m(!0), S(ue, null, ce(e.features, (c, d) => (m(), j(l, {
|
|
4697
4719
|
key: c,
|
|
4698
4720
|
class: "entity-empty-state-card"
|
|
4699
4721
|
}, {
|
|
4700
|
-
title:
|
|
4722
|
+
title: k(() => [
|
|
4701
4723
|
a.$slots[`feature-${d}-icon`] ? (m(), S("div", as, [
|
|
4702
4724
|
P(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4703
|
-
])) :
|
|
4704
|
-
|
|
4725
|
+
])) : M("", !0),
|
|
4726
|
+
B("div", os, L(c.title), 1)
|
|
4705
4727
|
]),
|
|
4706
|
-
default:
|
|
4707
|
-
|
|
4728
|
+
default: k(() => [
|
|
4729
|
+
B("div", {
|
|
4708
4730
|
title: c.description
|
|
4709
4731
|
}, L(c.description), 9, ls)
|
|
4710
4732
|
]),
|
|
4711
4733
|
_: 2
|
|
4712
4734
|
}, 1024))), 128))
|
|
4713
|
-
])) :
|
|
4735
|
+
])) : M("", !0),
|
|
4714
4736
|
a.$slots.bottom ? (m(), S("div", ss, [
|
|
4715
4737
|
P(a.$slots, "bottom", {}, void 0, !0)
|
|
4716
|
-
])) :
|
|
4738
|
+
])) : M("", !0)
|
|
4717
4739
|
]);
|
|
4718
4740
|
};
|
|
4719
4741
|
}
|
|
@@ -4746,15 +4768,15 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4746
4768
|
return (i, r) => {
|
|
4747
4769
|
var o;
|
|
4748
4770
|
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (m(), j(T(ri), { key: 0 }, {
|
|
4749
|
-
default:
|
|
4771
|
+
default: k(() => [
|
|
4750
4772
|
(m(!0), S(ue, null, ce(n.value, (a) => (m(), j(T(ai), {
|
|
4751
4773
|
key: a,
|
|
4752
4774
|
"max-width": e.tagMaxWidth,
|
|
4753
4775
|
onClick: r[0] || (r[0] = Be(() => {
|
|
4754
4776
|
}, ["stop"]))
|
|
4755
4777
|
}, {
|
|
4756
|
-
default:
|
|
4757
|
-
|
|
4778
|
+
default: k(() => [
|
|
4779
|
+
U(L(a), 1)
|
|
4758
4780
|
]),
|
|
4759
4781
|
_: 2
|
|
4760
4782
|
}, 1032, ["max-width"]))), 128))
|