@kong-ui-public/entities-shared 3.33.2-pr.2665.3c8048eae.0 → 3.33.2-pr.2665.c4241e722.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
|
}
|
|
@@ -2592,19 +2592,41 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2592
2592
|
let o = "deck gatway apply -";
|
|
2593
2593
|
return t.geoServerUrl && (o += ` --konnect-addr ${t.geoServerUrl}`), `echo
|
|
2594
2594
|
'${i.value}
|
|
2595
|
-
' | ${o}
|
|
2596
|
-
`;
|
|
2595
|
+
' | ${o}`;
|
|
2597
2596
|
});
|
|
2598
2597
|
return (o, a) => {
|
|
2599
|
-
const s = D("KCodeBlock");
|
|
2598
|
+
const s = D("KBadge"), l = D("KCodeBlock");
|
|
2600
2599
|
return m(), S("div", Do, [
|
|
2601
|
-
|
|
2600
|
+
B("p", null, [
|
|
2601
|
+
a[1] || (a[1] = U(" The ", -1)),
|
|
2602
|
+
K(s, null, {
|
|
2603
|
+
default: k(() => [...a[0] || (a[0] = [
|
|
2604
|
+
U("DECK_KONNECT_TOKEN", -1)
|
|
2605
|
+
])]),
|
|
2606
|
+
_: 1
|
|
2607
|
+
}),
|
|
2608
|
+
a[2] || (a[2] = U(" environment variable must be added first. See ", -1)),
|
|
2609
|
+
a[3] || (a[3] = B("a", {
|
|
2610
|
+
href: "https://developer.konghq.com/deck/get-started/",
|
|
2611
|
+
target: "_blank"
|
|
2612
|
+
}, "the documentation", -1)),
|
|
2613
|
+
a[4] || (a[4] = U(" for details. ", -1))
|
|
2614
|
+
]),
|
|
2615
|
+
K(l, {
|
|
2616
|
+
id: "deck-env-codeblock",
|
|
2617
|
+
code: "export DECK_KONNECT_TOKEN=<your_konnect_PAT>",
|
|
2618
|
+
language: "shell",
|
|
2619
|
+
"single-line": "",
|
|
2620
|
+
style: { "margin-bottom": "28px" },
|
|
2621
|
+
theme: "dark"
|
|
2622
|
+
}),
|
|
2623
|
+
t.entityRecord ? (m(), j(l, {
|
|
2602
2624
|
key: 0,
|
|
2603
2625
|
id: "deck-codeblock",
|
|
2604
2626
|
code: r.value,
|
|
2605
2627
|
language: "shell",
|
|
2606
2628
|
theme: "dark"
|
|
2607
|
-
}, null, 8, ["code"])) :
|
|
2629
|
+
}, null, 8, ["code"])) : M("", !0)
|
|
2608
2630
|
]);
|
|
2609
2631
|
};
|
|
2610
2632
|
}
|
|
@@ -2686,16 +2708,16 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2686
2708
|
class: fe(`config-card-details-${c}-props`),
|
|
2687
2709
|
"data-testid": `config-card-details-${c}-props`
|
|
2688
2710
|
}, [
|
|
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)) :
|
|
2711
|
+
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
2712
|
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) => P(s.$slots, `config-card-item-${d.key}`, {
|
|
2691
2713
|
key: d.key,
|
|
2692
2714
|
item: d
|
|
2693
2715
|
}, () => [
|
|
2694
|
-
|
|
2695
|
-
label:
|
|
2716
|
+
K(Xt, { item: d }, Se({
|
|
2717
|
+
label: k(() => [
|
|
2696
2718
|
P(s.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2697
2719
|
]),
|
|
2698
|
-
[d.key]:
|
|
2720
|
+
[d.key]: k(({ rowValue: u }) => [
|
|
2699
2721
|
P(s.$slots, d.key, {
|
|
2700
2722
|
row: d,
|
|
2701
2723
|
rowValue: u
|
|
@@ -2705,7 +2727,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2705
2727
|
}, [
|
|
2706
2728
|
r(d) ? {
|
|
2707
2729
|
name: "label-tooltip",
|
|
2708
|
-
fn:
|
|
2730
|
+
fn: k(() => [
|
|
2709
2731
|
P(s.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2710
2732
|
]),
|
|
2711
2733
|
key: "0"
|
|
@@ -2713,31 +2735,31 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2713
2735
|
]), 1032, ["item"])
|
|
2714
2736
|
], !0)), 128))
|
|
2715
2737
|
], 10, qo))), 128))
|
|
2716
|
-
])) :
|
|
2738
|
+
])) : M("", !0),
|
|
2717
2739
|
e.format === "json" && o.value ? (m(), j(en, {
|
|
2718
2740
|
key: 1,
|
|
2719
2741
|
config: t.config,
|
|
2720
2742
|
"entity-record": o.value,
|
|
2721
2743
|
"fetcher-url": a.value,
|
|
2722
2744
|
"request-method": "get"
|
|
2723
|
-
}, null, 8, ["config", "entity-record", "fetcher-url"])) :
|
|
2745
|
+
}, null, 8, ["config", "entity-record", "fetcher-url"])) : M("", !0),
|
|
2724
2746
|
e.format === "yaml" && o.value ? (m(), j(Vn, {
|
|
2725
2747
|
key: 2,
|
|
2726
2748
|
"entity-record": o.value
|
|
2727
|
-
}, null, 8, ["entity-record"])) :
|
|
2749
|
+
}, null, 8, ["entity-record"])) : M("", !0),
|
|
2728
2750
|
e.format === "terraform" && o.value ? (m(), j(Yn, {
|
|
2729
2751
|
key: 3,
|
|
2730
2752
|
"entity-record": o.value,
|
|
2731
2753
|
"entity-type": t.entityType,
|
|
2732
2754
|
"sub-entity-type": t.subEntityType
|
|
2733
|
-
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) :
|
|
2755
|
+
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) : M("", !0),
|
|
2734
2756
|
e.format === "deck" && o.value ? (m(), j(Wn, {
|
|
2735
2757
|
key: 4,
|
|
2736
2758
|
"control-plane-name": t.config.app === "konnect" ? t.config.controlPlaneName : void 0,
|
|
2737
2759
|
"entity-record": o.value,
|
|
2738
2760
|
"entity-type": t.entityType,
|
|
2739
2761
|
"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"])) :
|
|
2762
|
+
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-server-url"])) : M("", !0)
|
|
2741
2763
|
], 64));
|
|
2742
2764
|
}
|
|
2743
2765
|
}), Yo = /* @__PURE__ */ se(Vo, [["__scopeId", "data-v-2104198c"]]), Wo = {
|
|
@@ -2887,7 +2909,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2887
2909
|
label: r("baseForm.configuration.terraform"),
|
|
2888
2910
|
value: "terraform"
|
|
2889
2911
|
});
|
|
2890
|
-
const c = l[0].value, d =
|
|
2912
|
+
const c = l[0].value, d = N(c), u = (f) => {
|
|
2891
2913
|
d.value = f == null ? void 0 : f.value, n("configFormatChange", d.value);
|
|
2892
2914
|
}, p = (f, v) => {
|
|
2893
2915
|
localStorage.setItem(f, v);
|
|
@@ -2941,94 +2963,94 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2941
2963
|
// the last property displayed
|
|
2942
2964
|
section: ae.Basic
|
|
2943
2965
|
}
|
|
2944
|
-
}, y =
|
|
2966
|
+
}, y = N(!1), x = N(!1), h = N(""), A = N({}), C = $(() => {
|
|
2945
2967
|
var b, H, J;
|
|
2946
|
-
if (!
|
|
2968
|
+
if (!A.value)
|
|
2947
2969
|
return [];
|
|
2948
|
-
const f = [], v = Object.keys(
|
|
2949
|
-
for (const I in
|
|
2970
|
+
const f = [], v = Object.keys(A.value).length;
|
|
2971
|
+
for (const I in A.value) {
|
|
2950
2972
|
if (I === "__ui_data") continue;
|
|
2951
|
-
const
|
|
2952
|
-
let
|
|
2953
|
-
(G || G === 0) && (
|
|
2973
|
+
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;
|
|
2974
|
+
let q = v;
|
|
2975
|
+
(G || G === 0) && (q = G === -1 ? v + 1 : G), R && (q = R === -1 ? v + 1 : R), f.push([I, q]);
|
|
2954
2976
|
}
|
|
2955
|
-
return f.sort(function(I,
|
|
2956
|
-
return I[1] -
|
|
2977
|
+
return f.sort(function(I, R) {
|
|
2978
|
+
return I[1] - R[1];
|
|
2957
2979
|
}), f.map((I) => {
|
|
2958
2980
|
var dt, ft;
|
|
2959
|
-
const
|
|
2981
|
+
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
2982
|
return {
|
|
2961
|
-
key:
|
|
2983
|
+
key: R,
|
|
2962
2984
|
value: G,
|
|
2963
|
-
hidden:
|
|
2964
|
-
type:
|
|
2965
|
-
label:
|
|
2966
|
-
tooltip:
|
|
2967
|
-
section:
|
|
2985
|
+
hidden: q.hidden || !1,
|
|
2986
|
+
type: q.type ?? ((Q == null ? void 0 : Q.type) || V.Text),
|
|
2987
|
+
label: q.label ?? ((Q == null ? void 0 : Q.label) || a(R)),
|
|
2988
|
+
tooltip: q.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
2989
|
+
section: q.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2968
2990
|
};
|
|
2969
2991
|
}).filter((I) => !I.hidden && I.key !== i.pluginConfigKey);
|
|
2970
2992
|
}), E = $(() => {
|
|
2971
2993
|
var H, J;
|
|
2972
|
-
if (!
|
|
2994
|
+
if (!A.value || !i.pluginConfigKey)
|
|
2973
2995
|
return [];
|
|
2974
|
-
const f =
|
|
2996
|
+
const f = A.value[i.pluginConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2975
2997
|
for (const I in f) {
|
|
2976
|
-
const
|
|
2977
|
-
let
|
|
2978
|
-
|
|
2998
|
+
const R = (J = (H = i.pluginConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2999
|
+
let q = G != null && G !== "" ? v - 1 : v;
|
|
3000
|
+
R && (q = R === -1 ? v + 1 : R), b.push([I, q]);
|
|
2979
3001
|
}
|
|
2980
|
-
return b.sort(function(I,
|
|
2981
|
-
return I[1] -
|
|
3002
|
+
return b.sort(function(I, R) {
|
|
3003
|
+
return I[1] - R[1];
|
|
2982
3004
|
}), b.map((I) => {
|
|
2983
3005
|
var Q;
|
|
2984
|
-
const
|
|
3006
|
+
const R = I[0], G = f[R], q = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[R]) || {};
|
|
2985
3007
|
return {
|
|
2986
|
-
key:
|
|
3008
|
+
key: R,
|
|
2987
3009
|
value: G,
|
|
2988
|
-
hidden:
|
|
2989
|
-
type:
|
|
2990
|
-
label:
|
|
2991
|
-
tooltip:
|
|
3010
|
+
hidden: q.hidden || !1,
|
|
3011
|
+
type: q.type ?? V.Text,
|
|
3012
|
+
label: q.label ?? a(R),
|
|
3013
|
+
tooltip: q.tooltip ?? void 0,
|
|
2992
3014
|
section: ae.Plugin
|
|
2993
3015
|
};
|
|
2994
3016
|
}).filter((I) => !I.hidden);
|
|
2995
3017
|
}), Y = $(() => {
|
|
2996
3018
|
var H, J;
|
|
2997
|
-
if (!
|
|
3019
|
+
if (!A.value || !i.policyConfigKey)
|
|
2998
3020
|
return [];
|
|
2999
|
-
const f =
|
|
3021
|
+
const f = A.value[i.policyConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
3000
3022
|
for (const I in f) {
|
|
3001
|
-
const
|
|
3002
|
-
let
|
|
3003
|
-
|
|
3023
|
+
const R = (J = (H = i.policyConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
3024
|
+
let q = G != null && G !== "" ? v - 1 : v;
|
|
3025
|
+
R && (q = R === -1 ? v + 1 : R), b.push([I, q]);
|
|
3004
3026
|
}
|
|
3005
|
-
return b.sort(function(I,
|
|
3006
|
-
return I[1] -
|
|
3027
|
+
return b.sort(function(I, R) {
|
|
3028
|
+
return I[1] - R[1];
|
|
3007
3029
|
}), b.map((I) => {
|
|
3008
3030
|
var Q;
|
|
3009
|
-
const
|
|
3031
|
+
const R = I[0], G = f[R], q = ((Q = i.policyConfigSchema) == null ? void 0 : Q[R]) || {};
|
|
3010
3032
|
return {
|
|
3011
|
-
key:
|
|
3033
|
+
key: R,
|
|
3012
3034
|
value: G,
|
|
3013
|
-
hidden:
|
|
3014
|
-
type:
|
|
3015
|
-
label:
|
|
3016
|
-
tooltip:
|
|
3035
|
+
hidden: q.hidden || !1,
|
|
3036
|
+
type: q.type ?? V.Text,
|
|
3037
|
+
label: q.label ?? a(R),
|
|
3038
|
+
tooltip: q.tooltip ?? void 0,
|
|
3017
3039
|
section: ae.Policy
|
|
3018
3040
|
};
|
|
3019
3041
|
}).filter((I) => !I.hidden);
|
|
3020
3042
|
}), X = $(() => {
|
|
3021
3043
|
var f, v, b, H, J, I;
|
|
3022
3044
|
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((
|
|
3045
|
+
basic: (f = C.value) == null ? void 0 : f.filter((R) => R.section === ae.Basic),
|
|
3046
|
+
advanced: (v = C.value) == null ? void 0 : v.filter((R) => R.section === ae.Advanced),
|
|
3047
|
+
plugin: (H = E.value) == null ? void 0 : H.concat((b = C.value) == null ? void 0 : b.filter((R) => R.section === ae.Plugin)),
|
|
3048
|
+
policy: (I = Y.value) == null ? void 0 : I.concat((J = C.value) == null ? void 0 : J.filter((R) => R.section === ae.Policy))
|
|
3027
3049
|
};
|
|
3028
3050
|
}), w = $(() => {
|
|
3029
3051
|
const f = [];
|
|
3030
3052
|
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
|
-
}),
|
|
3053
|
+
}), _ = $(() => {
|
|
3032
3054
|
var v, b;
|
|
3033
3055
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3034
3056
|
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 +3060,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3038
3060
|
}, { immediate: !0 }), it(async () => {
|
|
3039
3061
|
x.value = !1, y.value = !0;
|
|
3040
3062
|
try {
|
|
3041
|
-
const { data: f } = await s.get(
|
|
3063
|
+
const { data: f } = await s.get(_.value);
|
|
3042
3064
|
if (i.dataKey)
|
|
3043
3065
|
if (typeof f[i.dataKey] < "u")
|
|
3044
|
-
|
|
3066
|
+
A.value = { ...f[i.dataKey] };
|
|
3045
3067
|
else
|
|
3046
3068
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3047
|
-
else i.recordResolver ?
|
|
3069
|
+
else i.recordResolver ? A.value = { ...i.recordResolver(f) } : A.value = { ...f };
|
|
3048
3070
|
Object.keys(i.configSchema).filter((b) => i.configSchema[b].forceShow).forEach((b) => {
|
|
3049
|
-
|
|
3071
|
+
A.value && typeof A.value[b] > "u" && (A.value[b] = null);
|
|
3050
3072
|
}), n("fetch:success", f);
|
|
3051
3073
|
} catch (f) {
|
|
3052
3074
|
const v = o(f);
|
|
@@ -3055,26 +3077,26 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3055
3077
|
y.value = !1;
|
|
3056
3078
|
}
|
|
3057
3079
|
}), (f, v) => {
|
|
3058
|
-
const b = D("KLabel"), H = D("KSelect"), J = D("KButton"), I = D("KSkeleton"),
|
|
3080
|
+
const b = D("KLabel"), H = D("KSelect"), J = D("KButton"), I = D("KSkeleton"), R = D("KEmptyState"), G = D("KCard");
|
|
3059
3081
|
return m(), j(G, {
|
|
3060
3082
|
class: "kong-ui-entity-base-config-card",
|
|
3061
3083
|
"title-tag": e.titleTag
|
|
3062
3084
|
}, Se({
|
|
3063
|
-
actions:
|
|
3064
|
-
|
|
3085
|
+
actions: k(() => [
|
|
3086
|
+
B("div", Jo, [
|
|
3065
3087
|
P(f.$slots, "actions", {}, void 0, !0),
|
|
3066
|
-
|
|
3088
|
+
K(b, {
|
|
3067
3089
|
class: "config-format-select-label",
|
|
3068
3090
|
"data-testid": "config-format-select-label"
|
|
3069
3091
|
}, {
|
|
3070
|
-
default:
|
|
3071
|
-
|
|
3092
|
+
default: k(() => [
|
|
3093
|
+
U(L(e.label), 1)
|
|
3072
3094
|
]),
|
|
3073
3095
|
_: 1
|
|
3074
3096
|
}),
|
|
3075
|
-
|
|
3097
|
+
K(H, {
|
|
3076
3098
|
modelValue: d.value,
|
|
3077
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
3099
|
+
"onUpdate:modelValue": v[0] || (v[0] = (q) => d.value = q),
|
|
3078
3100
|
"data-testid": "select-config-format",
|
|
3079
3101
|
items: l,
|
|
3080
3102
|
onChange: u
|
|
@@ -3085,51 +3107,51 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3085
3107
|
class: "book-icon",
|
|
3086
3108
|
"data-testid": "book-icon"
|
|
3087
3109
|
}, {
|
|
3088
|
-
default:
|
|
3089
|
-
|
|
3110
|
+
default: k(() => [
|
|
3111
|
+
B("a", {
|
|
3090
3112
|
href: e.configCardDoc,
|
|
3091
3113
|
rel: "noopener",
|
|
3092
3114
|
target: "_blank"
|
|
3093
3115
|
}, [
|
|
3094
|
-
|
|
3116
|
+
K(T(Vt), { size: T(rr) }, null, 8, ["size"])
|
|
3095
3117
|
], 8, Go)
|
|
3096
3118
|
]),
|
|
3097
3119
|
_: 1
|
|
3098
|
-
})) :
|
|
3120
|
+
})) : M("", !0)
|
|
3099
3121
|
])
|
|
3100
3122
|
]),
|
|
3101
|
-
default:
|
|
3123
|
+
default: k(() => [
|
|
3102
3124
|
y.value ? (m(), j(I, {
|
|
3103
3125
|
key: 0,
|
|
3104
3126
|
"data-testid": "config-card-loader",
|
|
3105
3127
|
"table-columns": 2,
|
|
3106
3128
|
type: "table"
|
|
3107
|
-
})) : x.value ? (m(), j(
|
|
3129
|
+
})) : x.value ? (m(), j(R, {
|
|
3108
3130
|
key: 1,
|
|
3109
3131
|
"data-testid": "config-card-fetch-error",
|
|
3110
3132
|
"icon-variant": "error"
|
|
3111
3133
|
}, {
|
|
3112
|
-
default:
|
|
3113
|
-
|
|
3134
|
+
default: k(() => [
|
|
3135
|
+
B("h3", null, L(h.value), 1)
|
|
3114
3136
|
]),
|
|
3115
3137
|
_: 1
|
|
3116
|
-
})) :
|
|
3117
|
-
|
|
3118
|
-
|
|
3138
|
+
})) : M("", !0),
|
|
3139
|
+
B("div", zo, [
|
|
3140
|
+
K(Yo, {
|
|
3119
3141
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
3120
3142
|
config: e.config,
|
|
3121
3143
|
"entity-type": e.entityType,
|
|
3122
|
-
"fetcher-url":
|
|
3144
|
+
"fetcher-url": _.value,
|
|
3123
3145
|
format: d.value,
|
|
3124
3146
|
"prop-list-types": w.value,
|
|
3125
3147
|
"property-collections": X.value,
|
|
3126
|
-
record:
|
|
3148
|
+
record: A.value,
|
|
3127
3149
|
"sub-entity-type": e.subEntityType
|
|
3128
3150
|
}, Se({ _: 2 }, [
|
|
3129
|
-
ce(Object.keys(f.$slots), (
|
|
3130
|
-
name:
|
|
3131
|
-
fn:
|
|
3132
|
-
P(f.$slots,
|
|
3151
|
+
ce(Object.keys(f.$slots), (q) => ({
|
|
3152
|
+
name: q,
|
|
3153
|
+
fn: k((Q) => [
|
|
3154
|
+
P(f.$slots, q, qt({ record: A.value }, Q), void 0, !0)
|
|
3133
3155
|
])
|
|
3134
3156
|
}))
|
|
3135
3157
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
@@ -3139,10 +3161,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3139
3161
|
}, [
|
|
3140
3162
|
e.hideTitle ? void 0 : {
|
|
3141
3163
|
name: "title",
|
|
3142
|
-
fn:
|
|
3143
|
-
|
|
3164
|
+
fn: k(() => [
|
|
3165
|
+
B("span", Wo, [
|
|
3144
3166
|
P(f.$slots, "title", {}, () => [
|
|
3145
|
-
|
|
3167
|
+
U(L(T(r)("baseConfigCard.title")), 1)
|
|
3146
3168
|
], !0)
|
|
3147
3169
|
])
|
|
3148
3170
|
]),
|
|
@@ -3275,19 +3297,19 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3275
3297
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3276
3298
|
setup(e, { expose: t, emit: n }) {
|
|
3277
3299
|
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
|
|
3300
|
+
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 = $(() => {
|
|
3301
|
+
var _, O;
|
|
3280
3302
|
let w = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3281
|
-
return r.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((
|
|
3303
|
+
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
3304
|
}), h = () => {
|
|
3283
3305
|
y.value = !y.value;
|
|
3284
|
-
},
|
|
3306
|
+
}, A = () => {
|
|
3285
3307
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : C();
|
|
3286
3308
|
}, C = () => {
|
|
3287
3309
|
i("cancel");
|
|
3288
3310
|
}, E = () => {
|
|
3289
3311
|
g.value || i("submit");
|
|
3290
|
-
}, Y =
|
|
3312
|
+
}, Y = N([
|
|
3291
3313
|
{
|
|
3292
3314
|
title: a("baseForm.configuration.json"),
|
|
3293
3315
|
hash: "#json"
|
|
@@ -3312,8 +3334,8 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3312
3334
|
const { data: w } = await l.get(x.value);
|
|
3313
3335
|
i("fetch:success", w);
|
|
3314
3336
|
} catch (w) {
|
|
3315
|
-
const
|
|
3316
|
-
p.value =
|
|
3337
|
+
const _ = s(w);
|
|
3338
|
+
p.value = _.startsWith("code") ? a("baseForm.errors.edit") : _, u.value = !0, i("fetch:error", w);
|
|
3317
3339
|
} finally {
|
|
3318
3340
|
c.value = !1;
|
|
3319
3341
|
}
|
|
@@ -3321,10 +3343,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3321
3343
|
viewConfig: h,
|
|
3322
3344
|
formCancel: C,
|
|
3323
3345
|
formSubmit: E
|
|
3324
|
-
}), (w,
|
|
3346
|
+
}), (w, _) => {
|
|
3325
3347
|
const O = D("KSkeleton"), f = D("KEmptyState"), v = D("KAlert"), b = D("KButton"), H = D("KTabs"), J = D("KSlideout");
|
|
3326
3348
|
return m(), j(Pe(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3327
|
-
default:
|
|
3349
|
+
default: k(() => [
|
|
3328
3350
|
c.value ? (m(), j(O, {
|
|
3329
3351
|
key: 0,
|
|
3330
3352
|
type: "form"
|
|
@@ -3333,10 +3355,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3333
3355
|
"action-button-text": T(a)("baseForm.actions.back"),
|
|
3334
3356
|
"data-testid": "form-fetch-error",
|
|
3335
3357
|
"icon-variant": "error",
|
|
3336
|
-
onClickAction:
|
|
3358
|
+
onClickAction: A
|
|
3337
3359
|
}, {
|
|
3338
|
-
default:
|
|
3339
|
-
|
|
3360
|
+
default: k(() => [
|
|
3361
|
+
B("h3", null, L(p.value), 1)
|
|
3340
3362
|
]),
|
|
3341
3363
|
_: 1
|
|
3342
3364
|
}, 8, ["action-button-text"])) : (m(), S("form", {
|
|
@@ -3352,48 +3374,48 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3352
3374
|
appearance: "danger",
|
|
3353
3375
|
"data-testid": "form-error",
|
|
3354
3376
|
message: e.errorMessage
|
|
3355
|
-
}, null, 8, ["message"])) :
|
|
3356
|
-
e.hideActions ?
|
|
3377
|
+
}, null, 8, ["message"])) : M("", !0),
|
|
3378
|
+
e.hideActions ? M("", !0) : (m(), j(Ht, {
|
|
3357
3379
|
key: 1,
|
|
3358
3380
|
disabled: !e.actionTeleportTarget,
|
|
3359
3381
|
to: e.actionTeleportTarget
|
|
3360
3382
|
}, [
|
|
3361
|
-
|
|
3383
|
+
B("div", {
|
|
3362
3384
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3363
3385
|
"data-testid": "form-actions"
|
|
3364
3386
|
}, [
|
|
3365
3387
|
P(w.$slots, "form-actions", {}, () => [
|
|
3366
|
-
|
|
3388
|
+
K(b, {
|
|
3367
3389
|
appearance: "tertiary",
|
|
3368
3390
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3369
|
-
onClick:
|
|
3391
|
+
onClick: _[0] || (_[0] = (I) => h())
|
|
3370
3392
|
}, {
|
|
3371
|
-
default:
|
|
3372
|
-
|
|
3393
|
+
default: k(() => [
|
|
3394
|
+
U(L(T(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3373
3395
|
]),
|
|
3374
3396
|
_: 1
|
|
3375
3397
|
}, 8, ["data-testid"]),
|
|
3376
|
-
|
|
3398
|
+
K(b, {
|
|
3377
3399
|
appearance: "secondary",
|
|
3378
3400
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3379
3401
|
disabled: e.isReadonly,
|
|
3380
3402
|
type: "reset",
|
|
3381
|
-
onClick:
|
|
3403
|
+
onClick: _[1] || (_[1] = (I) => !!e.actionTeleportTarget && C())
|
|
3382
3404
|
}, {
|
|
3383
|
-
default:
|
|
3384
|
-
|
|
3405
|
+
default: k(() => [
|
|
3406
|
+
U(L(e.cancelButtonText ?? T(a)("baseForm.actions.cancel")), 1)
|
|
3385
3407
|
]),
|
|
3386
3408
|
_: 1
|
|
3387
3409
|
}, 8, ["data-testid", "disabled"]),
|
|
3388
|
-
|
|
3410
|
+
K(b, {
|
|
3389
3411
|
appearance: "primary",
|
|
3390
3412
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3391
3413
|
disabled: g.value,
|
|
3392
3414
|
type: "submit",
|
|
3393
|
-
onClick:
|
|
3415
|
+
onClick: _[2] || (_[2] = (I) => !!e.actionTeleportTarget && E())
|
|
3394
3416
|
}, {
|
|
3395
|
-
default:
|
|
3396
|
-
|
|
3417
|
+
default: k(() => [
|
|
3418
|
+
U(L(e.saveButtonText ?? T(a)("baseForm.actions.save")), 1)
|
|
3397
3419
|
]),
|
|
3398
3420
|
_: 1
|
|
3399
3421
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -3401,48 +3423,49 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3401
3423
|
], 2)
|
|
3402
3424
|
], 8, ["disabled", "to"]))
|
|
3403
3425
|
], 40, Zo)),
|
|
3404
|
-
|
|
3426
|
+
K(J, {
|
|
3405
3427
|
"close-on-blur": !1,
|
|
3406
3428
|
"data-testid": "form-view-configuration-slideout",
|
|
3407
3429
|
"has-overlay": !1,
|
|
3408
3430
|
"offset-top": e.slidoutTopOffset,
|
|
3409
3431
|
title: T(a)("baseForm.configuration.title"),
|
|
3410
3432
|
visible: y.value,
|
|
3411
|
-
onClose:
|
|
3433
|
+
onClose: _[4] || (_[4] = (I) => h())
|
|
3412
3434
|
}, {
|
|
3413
|
-
default:
|
|
3414
|
-
|
|
3415
|
-
|
|
3435
|
+
default: k(() => [
|
|
3436
|
+
B("div", null, L(T(a)("baseForm.configuration.message")), 1),
|
|
3437
|
+
K(H, {
|
|
3416
3438
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3417
3439
|
tabs: Y.value,
|
|
3418
|
-
onChange:
|
|
3440
|
+
onChange: _[3] || (_[3] = (I) => i("codeBlockTabChange", I.replace("#", "")))
|
|
3419
3441
|
}, {
|
|
3420
|
-
json:
|
|
3421
|
-
|
|
3442
|
+
json: k(() => [
|
|
3443
|
+
K(en, {
|
|
3422
3444
|
config: e.config,
|
|
3423
3445
|
"entity-record": r.formFields,
|
|
3424
3446
|
"fetcher-url": x.value,
|
|
3425
3447
|
"request-method": r.editId ? "put" : "post"
|
|
3426
3448
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3427
3449
|
]),
|
|
3428
|
-
yaml:
|
|
3429
|
-
|
|
3450
|
+
yaml: k(() => [
|
|
3451
|
+
K(Vn, {
|
|
3430
3452
|
"entity-record": r.formFields
|
|
3431
3453
|
}, null, 8, ["entity-record"])
|
|
3432
3454
|
]),
|
|
3433
|
-
terraform:
|
|
3434
|
-
|
|
3455
|
+
terraform: k(() => [
|
|
3456
|
+
K(Yn, {
|
|
3435
3457
|
"entity-record": r.formFields,
|
|
3436
3458
|
"entity-type": e.entityType,
|
|
3437
3459
|
"sub-entity-type": e.subEntityType
|
|
3438
3460
|
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])
|
|
3439
3461
|
]),
|
|
3440
|
-
deck:
|
|
3441
|
-
|
|
3462
|
+
deck: k(() => [
|
|
3463
|
+
K(Wn, {
|
|
3464
|
+
"control-plane-name": e.config.app === "konnect" ? e.config.controlPlaneName : void 0,
|
|
3442
3465
|
"entity-record": r.formFields,
|
|
3443
3466
|
"entity-type": e.entityType,
|
|
3444
3467
|
"geo-server-url": e.config.app === "konnect" ? e.config.geoServerUrl : void 0
|
|
3445
|
-
}, null, 8, ["entity-record", "entity-type", "geo-server-url"])
|
|
3468
|
+
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-server-url"])
|
|
3446
3469
|
]),
|
|
3447
3470
|
_: 1
|
|
3448
3471
|
}, 8, ["tabs"])
|
|
@@ -3454,7 +3477,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3454
3477
|
});
|
|
3455
3478
|
};
|
|
3456
3479
|
}
|
|
3457
|
-
}), vs = /* @__PURE__ */ se(Xo, [["__scopeId", "data-v-
|
|
3480
|
+
}), vs = /* @__PURE__ */ se(Xo, [["__scopeId", "data-v-b55da9e5"]]), el = ["data-truncate"], tl = /* @__PURE__ */ z({
|
|
3458
3481
|
__name: "EntityBaseTableCell",
|
|
3459
3482
|
props: {
|
|
3460
3483
|
keyName: {
|
|
@@ -3478,32 +3501,32 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3478
3501
|
var h;
|
|
3479
3502
|
return ((h = n.value) == null ? void 0 : h.querySelector('[data-truncate="true"]')) || null;
|
|
3480
3503
|
}), r = $(() => {
|
|
3481
|
-
var
|
|
3482
|
-
const h = (
|
|
3504
|
+
var A, C;
|
|
3505
|
+
const h = (A = t.rowEl) == null ? void 0 : A.querySelectorAll("td");
|
|
3483
3506
|
return h ? ((C = h[0]) == null ? void 0 : C.getAttribute("data-testid")) === t.keyName : !0;
|
|
3484
3507
|
}), o = $(() => r.value || t.tooltip);
|
|
3485
3508
|
let a;
|
|
3486
3509
|
const s = () => {
|
|
3487
3510
|
a && (a.disconnect(), a = void 0);
|
|
3488
3511
|
}, l = () => {
|
|
3489
|
-
var
|
|
3490
|
-
let h = ((
|
|
3512
|
+
var A, C, E;
|
|
3513
|
+
let h = ((A = n.value) == null ? void 0 : A.clientWidth) || 0;
|
|
3491
3514
|
if (n.value && "getComputedStyle" in window) {
|
|
3492
3515
|
const Y = window.getComputedStyle(n.value);
|
|
3493
3516
|
h -= (parseFloat(Y.paddingLeft) || 0) + (parseFloat(Y.paddingRight) || 0);
|
|
3494
3517
|
}
|
|
3495
3518
|
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 =
|
|
3519
|
+
}, c = N({}), d = N(0), u = N(0), p = N(""), g = $(() => [i.value, n.value]), y = be(
|
|
3497
3520
|
g,
|
|
3498
3521
|
(h) => {
|
|
3499
3522
|
if (o.value && (s(), "ResizeObserver" in window && window)) {
|
|
3500
|
-
a = new ResizeObserver((
|
|
3523
|
+
a = new ResizeObserver((A) => {
|
|
3501
3524
|
window.requestAnimationFrame(() => {
|
|
3502
|
-
!Array.isArray(
|
|
3525
|
+
!Array.isArray(A) || !A.length || l();
|
|
3503
3526
|
});
|
|
3504
3527
|
});
|
|
3505
|
-
for (const
|
|
3506
|
-
|
|
3528
|
+
for (const A of h)
|
|
3529
|
+
A && a.observe(A);
|
|
3507
3530
|
}
|
|
3508
3531
|
},
|
|
3509
3532
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
@@ -3512,7 +3535,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3512
3535
|
l();
|
|
3513
3536
|
}), Zn(() => {
|
|
3514
3537
|
y();
|
|
3515
|
-
}), (h,
|
|
3538
|
+
}), (h, A) => {
|
|
3516
3539
|
const C = D("KTooltip");
|
|
3517
3540
|
return m(), S("span", {
|
|
3518
3541
|
ref_key: "contentRef",
|
|
@@ -3523,12 +3546,12 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3523
3546
|
key: 0,
|
|
3524
3547
|
"data-truncate": o.value || void 0
|
|
3525
3548
|
}, [
|
|
3526
|
-
|
|
3549
|
+
K(C, {
|
|
3527
3550
|
"max-width": "300",
|
|
3528
3551
|
placement: "bottom-start",
|
|
3529
3552
|
text: x.value ? p.value : ""
|
|
3530
3553
|
}, {
|
|
3531
|
-
default:
|
|
3554
|
+
default: k(() => [
|
|
3532
3555
|
P(h.$slots, "default", {}, void 0, !0)
|
|
3533
3556
|
]),
|
|
3534
3557
|
_: 3
|
|
@@ -3717,7 +3740,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3717
3740
|
"data-rowid": f.id,
|
|
3718
3741
|
"data-testid": f.name,
|
|
3719
3742
|
...n.rowAttributes(f)
|
|
3720
|
-
}), c =
|
|
3743
|
+
}), c = N({}), d = (f) => {
|
|
3721
3744
|
var v;
|
|
3722
3745
|
return (v = c.value) == null ? void 0 : v.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3723
3746
|
}, u = (f) => {
|
|
@@ -3740,13 +3763,13 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3740
3763
|
i("click:row", v);
|
|
3741
3764
|
}), h = (f) => {
|
|
3742
3765
|
i("sort", f);
|
|
3743
|
-
}, { hideTableToolbar:
|
|
3766
|
+
}, { hideTableToolbar: A, handleStateChange: C } = W.useTableState(() => n.query), { setTablePreferences: E, getTablePreferences: Y } = hi(), X = N(Y(a.value, n.defaultTablePreferences)), w = $(() => {
|
|
3744
3767
|
const f = Y(a.value);
|
|
3745
3768
|
return {
|
|
3746
3769
|
...n.initialFetcherParams,
|
|
3747
3770
|
...f
|
|
3748
3771
|
};
|
|
3749
|
-
}),
|
|
3772
|
+
}), _ = (f) => {
|
|
3750
3773
|
X.value = f, s.value.forEach((v) => {
|
|
3751
3774
|
!("hidable" in v) || !X.value.columnVisibility || v.hidable === !1 && (X.value.columnVisibility[v.key] = !0);
|
|
3752
3775
|
}), a.value && E(a.value, f);
|
|
@@ -3762,8 +3785,8 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3762
3785
|
title: e.title,
|
|
3763
3786
|
"title-tag": e.titleTag
|
|
3764
3787
|
}, {
|
|
3765
|
-
default:
|
|
3766
|
-
|
|
3788
|
+
default: k(() => [
|
|
3789
|
+
K(b, {
|
|
3767
3790
|
ref_key: "tableRefs",
|
|
3768
3791
|
ref: c,
|
|
3769
3792
|
"cache-identifier": a.value,
|
|
@@ -3782,7 +3805,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3782
3805
|
headers: s.value,
|
|
3783
3806
|
"hide-pagination": e.hidePagination,
|
|
3784
3807
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3785
|
-
"hide-toolbar": e.hideToolbar ?? T(
|
|
3808
|
+
"hide-toolbar": e.hideToolbar ?? T(A),
|
|
3786
3809
|
"initial-fetcher-params": w.value,
|
|
3787
3810
|
loading: e.isLoading,
|
|
3788
3811
|
"pagination-attributes": O.value,
|
|
@@ -3797,43 +3820,43 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3797
3820
|
"onRow:click": x.value,
|
|
3798
3821
|
onSort: v[0] || (v[0] = (J) => h(J)),
|
|
3799
3822
|
onState: p,
|
|
3800
|
-
"onUpdate:tablePreferences":
|
|
3823
|
+
"onUpdate:tablePreferences": _
|
|
3801
3824
|
}, Se({
|
|
3802
|
-
toolbar:
|
|
3803
|
-
|
|
3825
|
+
toolbar: k(() => [
|
|
3826
|
+
B("div", il, [
|
|
3804
3827
|
P(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3805
3828
|
f.$slots["toolbar-button"] ? (m(), S("div", rl, [
|
|
3806
3829
|
P(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3807
|
-
])) :
|
|
3830
|
+
])) : M("", !0)
|
|
3808
3831
|
])
|
|
3809
3832
|
]),
|
|
3810
|
-
"action-items":
|
|
3833
|
+
"action-items": k(({ row: J }) => [
|
|
3811
3834
|
P(f.$slots, "actions", { row: J }, void 0, !0)
|
|
3812
3835
|
]),
|
|
3813
3836
|
_: 2
|
|
3814
3837
|
}, [
|
|
3815
3838
|
f.$slots["empty-state"] ? {
|
|
3816
3839
|
name: "empty-state",
|
|
3817
|
-
fn:
|
|
3840
|
+
fn: k(() => [
|
|
3818
3841
|
P(f.$slots, "empty-state", {}, void 0, !0)
|
|
3819
3842
|
]),
|
|
3820
3843
|
key: "0"
|
|
3821
3844
|
} : void 0,
|
|
3822
3845
|
ce(e.tableHeaders, (J, I) => ({
|
|
3823
3846
|
name: I,
|
|
3824
|
-
fn:
|
|
3825
|
-
|
|
3847
|
+
fn: k(({ row: R, rowValue: G }) => [
|
|
3848
|
+
K(nl, {
|
|
3826
3849
|
"key-name": String(I),
|
|
3827
|
-
"row-el": d(
|
|
3850
|
+
"row-el": d(R),
|
|
3828
3851
|
tooltip: J.tooltip
|
|
3829
3852
|
}, {
|
|
3830
|
-
default:
|
|
3853
|
+
default: k(() => [
|
|
3831
3854
|
P(f.$slots, I, {
|
|
3832
|
-
row:
|
|
3855
|
+
row: R,
|
|
3833
3856
|
rowKey: e.rowKey,
|
|
3834
3857
|
rowValue: G
|
|
3835
3858
|
}, () => [
|
|
3836
|
-
|
|
3859
|
+
U(L(G), 1)
|
|
3837
3860
|
], !0)
|
|
3838
3861
|
]),
|
|
3839
3862
|
_: 2
|
|
@@ -3842,15 +3865,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3842
3865
|
})),
|
|
3843
3866
|
e.query ? void 0 : {
|
|
3844
3867
|
name: "empty-state-action-icon",
|
|
3845
|
-
fn:
|
|
3846
|
-
|
|
3868
|
+
fn: k(() => [
|
|
3869
|
+
K(T(Yt))
|
|
3847
3870
|
]),
|
|
3848
3871
|
key: "1"
|
|
3849
3872
|
}
|
|
3850
3873
|
]), 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(
|
|
3874
|
+
f.$slots["outside-actions"] && T(A) ? (m(), S("div", al, [
|
|
3852
3875
|
P(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3853
|
-
])) :
|
|
3876
|
+
])) : M("", !0)
|
|
3854
3877
|
]),
|
|
3855
3878
|
_: 3
|
|
3856
3879
|
}, 8, ["title", "title-tag"]);
|
|
@@ -3919,38 +3942,38 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3919
3942
|
onCancel: a,
|
|
3920
3943
|
onProceed: s
|
|
3921
3944
|
}, {
|
|
3922
|
-
default:
|
|
3945
|
+
default: k(() => [
|
|
3923
3946
|
e.error ? (m(), S("div", ll, [
|
|
3924
|
-
|
|
3925
|
-
default:
|
|
3926
|
-
|
|
3947
|
+
K(d, { appearance: "danger" }, {
|
|
3948
|
+
default: k(() => [
|
|
3949
|
+
U(L(e.error), 1)
|
|
3927
3950
|
]),
|
|
3928
3951
|
_: 1
|
|
3929
3952
|
})
|
|
3930
|
-
])) :
|
|
3931
|
-
|
|
3953
|
+
])) : M("", !0),
|
|
3954
|
+
K(T(n), {
|
|
3932
3955
|
class: "message",
|
|
3933
3956
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3934
3957
|
tag: "p"
|
|
3935
3958
|
}, Se({
|
|
3936
|
-
entityType:
|
|
3937
|
-
|
|
3959
|
+
entityType: k(() => [
|
|
3960
|
+
U(L(i.entityType), 1)
|
|
3938
3961
|
]),
|
|
3939
3962
|
_: 2
|
|
3940
3963
|
}, [
|
|
3941
3964
|
i.entityName ? {
|
|
3942
3965
|
name: "entityName",
|
|
3943
|
-
fn:
|
|
3944
|
-
|
|
3966
|
+
fn: k(() => [
|
|
3967
|
+
B("strong", null, L(i.entityName), 1)
|
|
3945
3968
|
]),
|
|
3946
3969
|
key: "0"
|
|
3947
3970
|
} : void 0
|
|
3948
3971
|
]), 1032, ["keypath"]),
|
|
3949
3972
|
i.description || l.$slots.description ? (m(), S("div", sl, [
|
|
3950
3973
|
P(l.$slots, "description", {}, () => [
|
|
3951
|
-
|
|
3974
|
+
B("p", null, L(i.description), 1)
|
|
3952
3975
|
], !0)
|
|
3953
|
-
])) :
|
|
3976
|
+
])) : M("", !0)
|
|
3954
3977
|
]),
|
|
3955
3978
|
_: 3
|
|
3956
3979
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
@@ -3980,15 +4003,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3980
4003
|
},
|
|
3981
4004
|
setup(e) {
|
|
3982
4005
|
return (t, n) => (m(), S("svg", ul, [
|
|
3983
|
-
|
|
3984
|
-
|
|
4006
|
+
B("mask", dl, [
|
|
4007
|
+
B("rect", {
|
|
3985
4008
|
fill: e.color,
|
|
3986
4009
|
height: "20",
|
|
3987
4010
|
width: "20"
|
|
3988
4011
|
}, null, 8, fl)
|
|
3989
4012
|
]),
|
|
3990
|
-
|
|
3991
|
-
|
|
4013
|
+
B("g", pl, [
|
|
4014
|
+
B("path", {
|
|
3992
4015
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3993
4016
|
fill: e.color
|
|
3994
4017
|
}, null, 8, ml)
|
|
@@ -4018,25 +4041,25 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4018
4041
|
},
|
|
4019
4042
|
emits: ["update:modelValue"],
|
|
4020
4043
|
setup(e, { emit: t }) {
|
|
4021
|
-
const { i18n: { t: n } } = W.useI18n(), i = e, r = t, o =
|
|
4044
|
+
const { i18n: { t: n } } = W.useI18n(), i = e, r = t, o = N(!1), a = N({}), s = N(/* @__PURE__ */ new Set()), l = $(() => {
|
|
4022
4045
|
const w = [];
|
|
4023
|
-
return new URLSearchParams(i.modelValue).forEach((
|
|
4024
|
-
|
|
4046
|
+
return new URLSearchParams(i.modelValue).forEach((_, O) => {
|
|
4047
|
+
_ !== "" && w.push(O);
|
|
4025
4048
|
}), w;
|
|
4026
4049
|
}), c = $(() => {
|
|
4027
4050
|
const w = i.config.fields;
|
|
4028
|
-
return Object.keys(w).filter((
|
|
4051
|
+
return Object.keys(w).filter((_) => {
|
|
4029
4052
|
var O;
|
|
4030
|
-
return (O = w == null ? void 0 : w[
|
|
4031
|
-
}).map((
|
|
4032
|
-
label: w[
|
|
4033
|
-
value:
|
|
4053
|
+
return (O = w == null ? void 0 : w[_]) == null ? void 0 : O.searchable;
|
|
4054
|
+
}).map((_) => ({
|
|
4055
|
+
label: w[_].label || _,
|
|
4056
|
+
value: _,
|
|
4034
4057
|
expanded: !1
|
|
4035
4058
|
}));
|
|
4036
4059
|
});
|
|
4037
4060
|
be(() => i.modelValue, (w) => {
|
|
4038
|
-
a.value = {}, new URLSearchParams(w).forEach((
|
|
4039
|
-
a.value[O] =
|
|
4061
|
+
a.value = {}, new URLSearchParams(w).forEach((_, O) => {
|
|
4062
|
+
a.value[O] = _;
|
|
4040
4063
|
});
|
|
4041
4064
|
});
|
|
4042
4065
|
const d = () => {
|
|
@@ -4048,12 +4071,12 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4048
4071
|
}, g = () => {
|
|
4049
4072
|
p("");
|
|
4050
4073
|
}, y = (w) => `filter-${w}`, x = (w) => {
|
|
4051
|
-
var
|
|
4052
|
-
return (((O = (
|
|
4074
|
+
var _, O;
|
|
4075
|
+
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
4076
|
}, h = (w) => {
|
|
4054
|
-
var
|
|
4055
|
-
return ((O = (
|
|
4056
|
-
},
|
|
4077
|
+
var _, O;
|
|
4078
|
+
return ((O = (_ = i.config.schema) == null ? void 0 : _[w]) == null ? void 0 : O.type) ?? "text";
|
|
4079
|
+
}, A = (w) => {
|
|
4057
4080
|
a.value = {
|
|
4058
4081
|
...a.value,
|
|
4059
4082
|
[w]: ""
|
|
@@ -4061,17 +4084,17 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4061
4084
|
}, C = () => {
|
|
4062
4085
|
a.value = {}, E(!0);
|
|
4063
4086
|
}, E = (w = !1) => {
|
|
4064
|
-
const
|
|
4065
|
-
w && (o.value = !1), r("update:modelValue", new URLSearchParams(
|
|
4087
|
+
const _ = Object.keys(a.value).reduce((O, f) => (a.value[f] && (O[f] = `${a.value[f]}`), O), {});
|
|
4088
|
+
w && (o.value = !1), r("update:modelValue", new URLSearchParams(_).toString());
|
|
4066
4089
|
}, Y = (w) => {
|
|
4067
|
-
var
|
|
4068
|
-
return !!((O = (
|
|
4069
|
-
}, X = (w,
|
|
4090
|
+
var _, O;
|
|
4091
|
+
return !!((O = (_ = i.config.schema) == null ? void 0 : _[w]) != null && O.filterFunction);
|
|
4092
|
+
}, X = (w, _) => {
|
|
4070
4093
|
var f;
|
|
4071
4094
|
const O = (f = i.config.schema) == null ? void 0 : f[w];
|
|
4072
|
-
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(
|
|
4095
|
+
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(_);
|
|
4073
4096
|
};
|
|
4074
|
-
return (w,
|
|
4097
|
+
return (w, _) => {
|
|
4075
4098
|
const O = D("KInput"), f = D("KButton"), v = D("KSelect");
|
|
4076
4099
|
return e.config.isExactMatch ? (m(), j(O, {
|
|
4077
4100
|
key: 0,
|
|
@@ -4082,11 +4105,11 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4082
4105
|
placeholder: e.config.placeholder,
|
|
4083
4106
|
"onUpdate:modelValue": p
|
|
4084
4107
|
}, {
|
|
4085
|
-
before:
|
|
4086
|
-
|
|
4108
|
+
before: k(() => [
|
|
4109
|
+
K(Mt)
|
|
4087
4110
|
]),
|
|
4088
|
-
after:
|
|
4089
|
-
xe(
|
|
4111
|
+
after: k(() => [
|
|
4112
|
+
xe(K(T(oi), {
|
|
4090
4113
|
class: "kong-ui-entity-filter-clear",
|
|
4091
4114
|
role: "button",
|
|
4092
4115
|
tabindex: "0",
|
|
@@ -4097,24 +4120,24 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4097
4120
|
]),
|
|
4098
4121
|
_: 1
|
|
4099
4122
|
}, 8, ["model-value", "placeholder"])) : (m(), S("div", yl, [
|
|
4100
|
-
|
|
4123
|
+
K(f, {
|
|
4101
4124
|
appearance: "tertiary",
|
|
4102
4125
|
"data-testid": "filter-button",
|
|
4103
4126
|
onClick: d
|
|
4104
4127
|
}, {
|
|
4105
|
-
default:
|
|
4106
|
-
|
|
4107
|
-
|
|
4128
|
+
default: k(() => [
|
|
4129
|
+
K(Mt),
|
|
4130
|
+
U(" " + L(T(n)("filter.filterButtonText")) + " " + L(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4108
4131
|
]),
|
|
4109
4132
|
_: 1
|
|
4110
4133
|
}),
|
|
4111
|
-
xe(
|
|
4134
|
+
xe(B("div", {
|
|
4112
4135
|
class: "kong-ui-entity-filter-backdrop",
|
|
4113
4136
|
onClick: d
|
|
4114
4137
|
}, null, 512), [
|
|
4115
4138
|
[Ce, o.value]
|
|
4116
4139
|
]),
|
|
4117
|
-
xe(
|
|
4140
|
+
xe(B("div", gl, [
|
|
4118
4141
|
(m(!0), S(ue, null, ce(c.value, (b) => {
|
|
4119
4142
|
var H, J;
|
|
4120
4143
|
return m(), S("div", {
|
|
@@ -4122,24 +4145,24 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4122
4145
|
class: "kong-ui-entity-filter-menu-item",
|
|
4123
4146
|
"data-testid": b.value
|
|
4124
4147
|
}, [
|
|
4125
|
-
|
|
4148
|
+
B("span", {
|
|
4126
4149
|
class: fe(["menu-item-title", { expanded: s.value.has(b.value) }]),
|
|
4127
4150
|
role: "button",
|
|
4128
4151
|
tabindex: "0",
|
|
4129
4152
|
onClick: (I) => u(b.value),
|
|
4130
4153
|
onKeydown: Xn((I) => u(b.value), ["enter"])
|
|
4131
4154
|
}, [
|
|
4132
|
-
|
|
4133
|
-
xe(
|
|
4155
|
+
U(L(b.label) + " ", 1),
|
|
4156
|
+
xe(B("span", bl, null, 512), [
|
|
4134
4157
|
[Ce, l.value.includes(b.value)]
|
|
4135
4158
|
]),
|
|
4136
|
-
|
|
4159
|
+
K(T(li), {
|
|
4137
4160
|
class: fe(["menu-item-expand-icon", { expanded: s.value.has(b.value) }]),
|
|
4138
4161
|
color: T(er)
|
|
4139
4162
|
}, null, 8, ["class", "color"])
|
|
4140
4163
|
], 42, vl),
|
|
4141
|
-
xe(
|
|
4142
|
-
|
|
4164
|
+
xe(B("div", xl, [
|
|
4165
|
+
B("label", {
|
|
4143
4166
|
class: "menu-item-label",
|
|
4144
4167
|
for: y(b.value)
|
|
4145
4168
|
}, L(T(n)("filter.fieldLabel")), 9, Cl),
|
|
@@ -4164,26 +4187,26 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4164
4187
|
], 512), [
|
|
4165
4188
|
[Ce, s.value.has(b.value)]
|
|
4166
4189
|
]),
|
|
4167
|
-
xe(
|
|
4168
|
-
|
|
4190
|
+
xe(B("div", kl, [
|
|
4191
|
+
K(f, {
|
|
4169
4192
|
appearance: "tertiary",
|
|
4170
4193
|
"data-testid": "apply-filter",
|
|
4171
4194
|
size: "small",
|
|
4172
|
-
onClick:
|
|
4195
|
+
onClick: _[0] || (_[0] = (I) => E(!0))
|
|
4173
4196
|
}, {
|
|
4174
|
-
default:
|
|
4175
|
-
|
|
4197
|
+
default: k(() => [
|
|
4198
|
+
U(L(T(n)("filter.applyButtonText")), 1)
|
|
4176
4199
|
]),
|
|
4177
4200
|
_: 1
|
|
4178
4201
|
}),
|
|
4179
|
-
|
|
4202
|
+
K(f, {
|
|
4180
4203
|
appearance: "tertiary",
|
|
4181
4204
|
"data-testid": "clear-filter",
|
|
4182
4205
|
size: "small",
|
|
4183
|
-
onClick: (I) =>
|
|
4206
|
+
onClick: (I) => A(b.value)
|
|
4184
4207
|
}, {
|
|
4185
|
-
default:
|
|
4186
|
-
|
|
4208
|
+
default: k(() => [
|
|
4209
|
+
U(L(T(n)("filter.clearButtonText")), 1)
|
|
4187
4210
|
]),
|
|
4188
4211
|
_: 1
|
|
4189
4212
|
}, 8, ["onClick"])
|
|
@@ -4192,14 +4215,14 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4192
4215
|
])
|
|
4193
4216
|
], 8, hl);
|
|
4194
4217
|
}), 128)),
|
|
4195
|
-
|
|
4196
|
-
|
|
4218
|
+
B("div", Al, [
|
|
4219
|
+
K(f, {
|
|
4197
4220
|
appearance: "tertiary",
|
|
4198
4221
|
size: "small",
|
|
4199
4222
|
onClick: C
|
|
4200
4223
|
}, {
|
|
4201
|
-
default:
|
|
4202
|
-
|
|
4224
|
+
default: k(() => [
|
|
4225
|
+
U(L(T(n)("filter.clearAllButtonText")), 1)
|
|
4203
4226
|
]),
|
|
4204
4227
|
_: 1
|
|
4205
4228
|
})
|
|
@@ -4242,7 +4265,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4242
4265
|
},
|
|
4243
4266
|
emits: ["cancel", "proceed"],
|
|
4244
4267
|
setup(e, { emit: t }) {
|
|
4245
|
-
const { i18n: { t: n }, i18nT: i } = W.useI18n(), r = e, o = t, a =
|
|
4268
|
+
const { i18n: { t: n }, i18nT: i } = W.useI18n(), r = e, o = t, a = N(!1), s = $(
|
|
4246
4269
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4247
4270
|
), l = $(
|
|
4248
4271
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
@@ -4261,7 +4284,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4261
4284
|
return (u, p) => {
|
|
4262
4285
|
const g = D("KPrompt");
|
|
4263
4286
|
return m(), j(Ht, { to: "body" }, [
|
|
4264
|
-
|
|
4287
|
+
K(g, {
|
|
4265
4288
|
"action-button-disabled": a.value,
|
|
4266
4289
|
"action-button-text": l.value,
|
|
4267
4290
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4270,16 +4293,16 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4270
4293
|
onCancel: c,
|
|
4271
4294
|
onProceed: d
|
|
4272
4295
|
}, {
|
|
4273
|
-
default:
|
|
4274
|
-
|
|
4296
|
+
default: k(() => [
|
|
4297
|
+
K(T(i), {
|
|
4275
4298
|
keypath: `toggleModal.${r.action}.message`,
|
|
4276
4299
|
scope: "global"
|
|
4277
4300
|
}, {
|
|
4278
|
-
entityType:
|
|
4279
|
-
|
|
4301
|
+
entityType: k(() => [
|
|
4302
|
+
U(L(e.entityType), 1)
|
|
4280
4303
|
]),
|
|
4281
|
-
entityName:
|
|
4282
|
-
|
|
4304
|
+
entityName: k(() => [
|
|
4305
|
+
B("strong", null, L(e.entityName), 1)
|
|
4283
4306
|
]),
|
|
4284
4307
|
_: 1
|
|
4285
4308
|
}, 8, ["keypath"])
|
|
@@ -4311,13 +4334,13 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4311
4334
|
}
|
|
4312
4335
|
},
|
|
4313
4336
|
setup(e) {
|
|
4314
|
-
const t = e, n =
|
|
4337
|
+
const t = e, n = N(void 0), i = $(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4315
4338
|
return be(() => t.authFunction, async () => {
|
|
4316
4339
|
n.value = await t.authFunction();
|
|
4317
4340
|
}, { immediate: !0 }), (r, o) => i.value ? P(r.$slots, "default", {
|
|
4318
4341
|
key: 0,
|
|
4319
4342
|
isAllowed: n.value
|
|
4320
|
-
}) :
|
|
4343
|
+
}) : M("", !0);
|
|
4321
4344
|
}
|
|
4322
4345
|
}), te = [];
|
|
4323
4346
|
for (let e = 0; e < 256; ++e)
|
|
@@ -4387,8 +4410,8 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4387
4410
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4388
4411
|
role: "group"
|
|
4389
4412
|
}, [
|
|
4390
|
-
|
|
4391
|
-
e.hideInfoHeader ?
|
|
4413
|
+
B("div", Fl, [
|
|
4414
|
+
e.hideInfoHeader ? M("", !0) : (m(), S("div", {
|
|
4392
4415
|
key: 0,
|
|
4393
4416
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4394
4417
|
}, [
|
|
@@ -4397,21 +4420,21 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4397
4420
|
id: T(n),
|
|
4398
4421
|
class: "form-section-title"
|
|
4399
4422
|
}, {
|
|
4400
|
-
default:
|
|
4401
|
-
|
|
4423
|
+
default: k(() => [
|
|
4424
|
+
U(L(e.title), 1)
|
|
4402
4425
|
]),
|
|
4403
4426
|
_: 1
|
|
4404
|
-
}, 8, ["id"])) :
|
|
4427
|
+
}, 8, ["id"])) : M("", !0),
|
|
4405
4428
|
e.description || T(t).description ? (m(), S("div", Ol, [
|
|
4406
4429
|
P(i.$slots, "description", {}, () => [
|
|
4407
|
-
|
|
4430
|
+
B("p", null, L(e.description), 1)
|
|
4408
4431
|
], !0)
|
|
4409
|
-
])) :
|
|
4432
|
+
])) : M("", !0),
|
|
4410
4433
|
T(t).footer ? (m(), S("div", Ll, [
|
|
4411
4434
|
P(i.$slots, "footer", {}, void 0, !0)
|
|
4412
|
-
])) :
|
|
4435
|
+
])) : M("", !0)
|
|
4413
4436
|
], 2)),
|
|
4414
|
-
|
|
4437
|
+
B("div", Bl, [
|
|
4415
4438
|
P(i.$slots, "default", {}, void 0, !0)
|
|
4416
4439
|
])
|
|
4417
4440
|
])
|
|
@@ -4436,25 +4459,25 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4436
4459
|
setup(e) {
|
|
4437
4460
|
const t = De();
|
|
4438
4461
|
return (n, i) => (m(), S("div", Kl, [
|
|
4439
|
-
|
|
4440
|
-
e.step != null ? (m(), S("div", Ml, L(e.step), 1)) :
|
|
4441
|
-
|
|
4442
|
-
|
|
4462
|
+
B("header", Nl, [
|
|
4463
|
+
e.step != null ? (m(), S("div", Ml, L(e.step), 1)) : M("", !0),
|
|
4464
|
+
B("div", jl, [
|
|
4465
|
+
B("h2", Pl, [
|
|
4443
4466
|
P(n.$slots, "title", {}, () => [
|
|
4444
|
-
|
|
4467
|
+
U(L(e.title), 1)
|
|
4445
4468
|
], !0)
|
|
4446
4469
|
]),
|
|
4447
4470
|
e.description || t.description ? (m(), S("div", Dl, [
|
|
4448
4471
|
P(n.$slots, "description", {}, () => [
|
|
4449
|
-
|
|
4472
|
+
U(L(e.description), 1)
|
|
4450
4473
|
], !0)
|
|
4451
|
-
])) :
|
|
4474
|
+
])) : M("", !0)
|
|
4452
4475
|
]),
|
|
4453
4476
|
t.extra ? (m(), S("div", Ul, [
|
|
4454
4477
|
P(n.$slots, "extra", {}, void 0, !0)
|
|
4455
|
-
])) :
|
|
4478
|
+
])) : M("", !0)
|
|
4456
4479
|
]),
|
|
4457
|
-
|
|
4480
|
+
B("div", ql, [
|
|
4458
4481
|
P(n.$slots, "default", {}, void 0, !0)
|
|
4459
4482
|
])
|
|
4460
4483
|
]));
|
|
@@ -4489,7 +4512,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4489
4512
|
}
|
|
4490
4513
|
},
|
|
4491
4514
|
setup(e) {
|
|
4492
|
-
const t = e, n =
|
|
4515
|
+
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
4516
|
var u;
|
|
4494
4517
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4495
4518
|
}), c = $(() => {
|
|
@@ -4510,12 +4533,12 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4510
4533
|
href: e.externalLink,
|
|
4511
4534
|
target: e.newWindow ? "_blank" : "_self"
|
|
4512
4535
|
}, {
|
|
4513
|
-
default:
|
|
4514
|
-
|
|
4536
|
+
default: k(() => [
|
|
4537
|
+
K(g, {
|
|
4515
4538
|
text: T(i) && e.entityLinkData.label || ""
|
|
4516
4539
|
}, {
|
|
4517
|
-
default:
|
|
4518
|
-
|
|
4540
|
+
default: k(() => [
|
|
4541
|
+
B("span", {
|
|
4519
4542
|
ref_key: "textContent",
|
|
4520
4543
|
ref: n,
|
|
4521
4544
|
class: "entity-link-label"
|
|
@@ -4525,7 +4548,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4525
4548
|
}, 8, ["text"])
|
|
4526
4549
|
]),
|
|
4527
4550
|
_: 1
|
|
4528
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4551
|
+
}, 8, ["hide-icon", "href", "target"])) : M("", !0) : (m(), S("div", Wl, L(" – "))),
|
|
4529
4552
|
l.value && e.allowCopy ? (m(), j(g, {
|
|
4530
4553
|
key: a.value,
|
|
4531
4554
|
class: "copy-uuid-tooltip",
|
|
@@ -4533,14 +4556,14 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4533
4556
|
placement: "bottom-end",
|
|
4534
4557
|
text: a.value
|
|
4535
4558
|
}, {
|
|
4536
|
-
default:
|
|
4537
|
-
|
|
4538
|
-
default:
|
|
4539
|
-
|
|
4559
|
+
default: k(() => [
|
|
4560
|
+
K(x, null, {
|
|
4561
|
+
default: k(({ copyToClipboard: h }) => [
|
|
4562
|
+
B("span", {
|
|
4540
4563
|
class: "entity-link-copy-id",
|
|
4541
|
-
onClick: Be((
|
|
4564
|
+
onClick: Be((A) => d(h), ["stop"])
|
|
4542
4565
|
}, [
|
|
4543
|
-
|
|
4566
|
+
K(T(si), {
|
|
4544
4567
|
class: "copy-icon",
|
|
4545
4568
|
color: T(tr),
|
|
4546
4569
|
"data-testid": "copy-id",
|
|
@@ -4552,7 +4575,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4552
4575
|
})
|
|
4553
4576
|
]),
|
|
4554
4577
|
_: 1
|
|
4555
|
-
}, 8, ["text"])) :
|
|
4578
|
+
}, 8, ["text"])) : M("", !0)
|
|
4556
4579
|
]);
|
|
4557
4580
|
};
|
|
4558
4581
|
}
|
|
@@ -4624,44 +4647,44 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4624
4647
|
},
|
|
4625
4648
|
emits: ["click:create", "click:learn-more"],
|
|
4626
4649
|
setup(e) {
|
|
4627
|
-
const t = e, { i18n: { t: n } } = W.useI18n(), i =
|
|
4650
|
+
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
4651
|
return it(async () => {
|
|
4629
4652
|
i.value = await t.canCreate();
|
|
4630
4653
|
}), nt(() => ei(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4631
4654
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) => {
|
|
4632
4655
|
const l = D("KCard");
|
|
4633
4656
|
return m(), S("div", zl, [
|
|
4634
|
-
|
|
4657
|
+
B("div", Ql, [
|
|
4635
4658
|
a.$slots.image ? (m(), S("div", Zl, [
|
|
4636
4659
|
P(a.$slots, "image", {}, void 0, !0)
|
|
4637
|
-
])) :
|
|
4660
|
+
])) : M("", !0),
|
|
4638
4661
|
e.title || a.$slots.title ? (m(), S("div", Xl, [
|
|
4639
|
-
|
|
4662
|
+
B("h1", {
|
|
4640
4663
|
class: fe(o.value)
|
|
4641
4664
|
}, [
|
|
4642
4665
|
P(a.$slots, "title", {}, () => [
|
|
4643
|
-
|
|
4666
|
+
U(L(e.title), 1)
|
|
4644
4667
|
], !0)
|
|
4645
4668
|
], 2)
|
|
4646
|
-
])) :
|
|
4669
|
+
])) : M("", !0),
|
|
4647
4670
|
e.description || a.$slots.default ? (m(), S("div", es, [
|
|
4648
4671
|
P(a.$slots, "default", {}, () => [
|
|
4649
|
-
|
|
4672
|
+
B("p", null, L(e.description), 1)
|
|
4650
4673
|
], !0)
|
|
4651
|
-
])) :
|
|
4674
|
+
])) : M("", !0),
|
|
4652
4675
|
e.pricing || a.$slots.pricing ? (m(), S("div", ts, [
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
s[2] || (s[2] =
|
|
4676
|
+
B("p", null, [
|
|
4677
|
+
B("b", null, L(T(n)("emptyState.pricingTitle")), 1),
|
|
4678
|
+
s[2] || (s[2] = U()),
|
|
4656
4679
|
P(a.$slots, "pricing", {}, () => [
|
|
4657
|
-
|
|
4680
|
+
U(L(e.pricing), 1)
|
|
4658
4681
|
], !0)
|
|
4659
4682
|
])
|
|
4660
|
-
])) :
|
|
4683
|
+
])) : M("", !0)
|
|
4661
4684
|
]),
|
|
4662
4685
|
a.$slots.message ? (m(), S("div", ns, [
|
|
4663
4686
|
P(a.$slots, "message", {}, void 0, !0)
|
|
4664
|
-
])) :
|
|
4687
|
+
])) : M("", !0),
|
|
4665
4688
|
r.value || e.learnMore || a.$slots.actions ? (m(), S("div", is, [
|
|
4666
4689
|
P(a.$slots, "actions", {}, () => [
|
|
4667
4690
|
r.value ? (m(), j(T(mt), {
|
|
@@ -4671,12 +4694,12 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4671
4694
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4672
4695
|
onClick: s[0] || (s[0] = (c) => a.$emit("click:create"))
|
|
4673
4696
|
}, {
|
|
4674
|
-
default:
|
|
4675
|
-
|
|
4676
|
-
|
|
4697
|
+
default: k(() => [
|
|
4698
|
+
K(T(Yt)),
|
|
4699
|
+
U(" " + L(e.actionButtonText), 1)
|
|
4677
4700
|
]),
|
|
4678
4701
|
_: 1
|
|
4679
|
-
}, 8, ["size"])) :
|
|
4702
|
+
}, 8, ["size"])) : M("", !0),
|
|
4680
4703
|
e.learnMore ? (m(), j(T(mt), {
|
|
4681
4704
|
key: 1,
|
|
4682
4705
|
appearance: "secondary",
|
|
@@ -4684,36 +4707,36 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4684
4707
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4685
4708
|
onClick: s[1] || (s[1] = (c) => a.$emit("click:learn-more"))
|
|
4686
4709
|
}, {
|
|
4687
|
-
default:
|
|
4688
|
-
|
|
4689
|
-
|
|
4710
|
+
default: k(() => [
|
|
4711
|
+
K(T(Vt), { decorative: "" }),
|
|
4712
|
+
U(" " + L(T(n)("emptyState.learnMore")), 1)
|
|
4690
4713
|
]),
|
|
4691
4714
|
_: 1
|
|
4692
|
-
}, 8, ["size"])) :
|
|
4715
|
+
}, 8, ["size"])) : M("", !0)
|
|
4693
4716
|
], !0)
|
|
4694
|
-
])) :
|
|
4717
|
+
])) : M("", !0),
|
|
4695
4718
|
e.features.length ? (m(), S("div", rs, [
|
|
4696
4719
|
(m(!0), S(ue, null, ce(e.features, (c, d) => (m(), j(l, {
|
|
4697
4720
|
key: c,
|
|
4698
4721
|
class: "entity-empty-state-card"
|
|
4699
4722
|
}, {
|
|
4700
|
-
title:
|
|
4723
|
+
title: k(() => [
|
|
4701
4724
|
a.$slots[`feature-${d}-icon`] ? (m(), S("div", as, [
|
|
4702
4725
|
P(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4703
|
-
])) :
|
|
4704
|
-
|
|
4726
|
+
])) : M("", !0),
|
|
4727
|
+
B("div", os, L(c.title), 1)
|
|
4705
4728
|
]),
|
|
4706
|
-
default:
|
|
4707
|
-
|
|
4729
|
+
default: k(() => [
|
|
4730
|
+
B("div", {
|
|
4708
4731
|
title: c.description
|
|
4709
4732
|
}, L(c.description), 9, ls)
|
|
4710
4733
|
]),
|
|
4711
4734
|
_: 2
|
|
4712
4735
|
}, 1024))), 128))
|
|
4713
|
-
])) :
|
|
4736
|
+
])) : M("", !0),
|
|
4714
4737
|
a.$slots.bottom ? (m(), S("div", ss, [
|
|
4715
4738
|
P(a.$slots, "bottom", {}, void 0, !0)
|
|
4716
|
-
])) :
|
|
4739
|
+
])) : M("", !0)
|
|
4717
4740
|
]);
|
|
4718
4741
|
};
|
|
4719
4742
|
}
|
|
@@ -4746,15 +4769,15 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4746
4769
|
return (i, r) => {
|
|
4747
4770
|
var o;
|
|
4748
4771
|
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (m(), j(T(ri), { key: 0 }, {
|
|
4749
|
-
default:
|
|
4772
|
+
default: k(() => [
|
|
4750
4773
|
(m(!0), S(ue, null, ce(n.value, (a) => (m(), j(T(ai), {
|
|
4751
4774
|
key: a,
|
|
4752
4775
|
"max-width": e.tagMaxWidth,
|
|
4753
4776
|
onClick: r[0] || (r[0] = Be(() => {
|
|
4754
4777
|
}, ["stop"]))
|
|
4755
4778
|
}, {
|
|
4756
|
-
default:
|
|
4757
|
-
|
|
4779
|
+
default: k(() => [
|
|
4780
|
+
U(L(a), 1)
|
|
4758
4781
|
]),
|
|
4759
4782
|
_: 2
|
|
4760
4783
|
}, 1032, ["max-width"]))), 128))
|