@kong-ui-public/entities-shared 3.33.2-pr.2665.3c8048eae.0 → 3.33.2-pr.2665.bc08bad0f.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
|
|
1
|
+
import { inject as Dt, ref as N, computed as $, unref as T, toValue as ye, watch as be, toRef as Jn, provide as Pt, defineComponent as z, createBlock as j, openBlock as m, resolveDynamicComponent as De, 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 P, createVNode as K, createTextVNode as U, useCssVars as Ut, useId as Gn, useSlots as Pe, renderSlot as D, 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";
|
|
@@ -30,7 +30,7 @@ function mi() {
|
|
|
30
30
|
return {
|
|
31
31
|
getAxiosInstance: (e = {}) => {
|
|
32
32
|
try {
|
|
33
|
-
const t =
|
|
33
|
+
const t = Dt("get-axios-instance", void 0);
|
|
34
34
|
return typeof t == "function" ? t(e) : pt.create({
|
|
35
35
|
withCredentials: !0,
|
|
36
36
|
timeout: 3e4,
|
|
@@ -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;
|
|
@@ -564,13 +564,13 @@ const zt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
564
564
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
565
565
|
if (kt.indexOf(e) === -1)
|
|
566
566
|
throw new Error(`Invalid operator, expected one of ${kt.join("|")}`);
|
|
567
|
-
},
|
|
568
|
-
function
|
|
567
|
+
}, Di = (e) => typeof e == "string" && /^[v\d]/.test(e) && zt.test(e);
|
|
568
|
+
function Pi(e) {
|
|
569
569
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
570
570
|
if (!t)
|
|
571
571
|
return !0;
|
|
572
572
|
const { edition: i, version: r } = t;
|
|
573
|
-
if (!
|
|
573
|
+
if (!Di(r))
|
|
574
574
|
return console.error("Invalid version"), !1;
|
|
575
575
|
const o = n[i];
|
|
576
576
|
if (!o)
|
|
@@ -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
|
}), {
|
|
@@ -593,15 +593,15 @@ function qi() {
|
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
595
|
const ze = Symbol("schema"), Hi = (e) => {
|
|
596
|
-
|
|
596
|
+
Pt(ze, e);
|
|
597
597
|
}, Vi = (e) => {
|
|
598
598
|
var r, o;
|
|
599
|
-
const t =
|
|
600
|
-
return
|
|
599
|
+
const t = Dt(ze, void 0), n = (o = (r = t == null ? void 0 : t.value) == null ? void 0 : r.fields) == null ? void 0 : o.find((a) => Object.keys(a)[0] === e), i = Jn(n == null ? void 0 : n[e]);
|
|
600
|
+
return Pt(ze, i), i;
|
|
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
|
});
|
|
@@ -626,7 +626,7 @@ const W = {
|
|
|
626
626
|
useHelpers: Wt,
|
|
627
627
|
useStringHelpers: Ri,
|
|
628
628
|
useI18n: qe,
|
|
629
|
-
useGatewayFeatureSupported:
|
|
629
|
+
useGatewayFeatureSupported: Pi,
|
|
630
630
|
useTruncationDetector: Ui,
|
|
631
631
|
useValidators: qi,
|
|
632
632
|
useSchemaProvider: Hi,
|
|
@@ -659,13 +659,13 @@ const W = {
|
|
|
659
659
|
var l;
|
|
660
660
|
return t.isArrayItem ? (l = o.value) != null && l.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
661
661
|
});
|
|
662
|
-
return (l, c) => (m(), j(
|
|
662
|
+
return (l, c) => (m(), j(De(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: {
|
|
@@ -695,15 +695,15 @@ const W = {
|
|
|
695
695
|
setup(e) {
|
|
696
696
|
const { i18n: { t } } = W.useI18n();
|
|
697
697
|
return (n, i) => {
|
|
698
|
-
const r =
|
|
698
|
+
const r = P("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
|
})
|
|
@@ -721,12 +721,12 @@ const W = {
|
|
|
721
721
|
setup(e) {
|
|
722
722
|
const { i18n: { t } } = W.useI18n();
|
|
723
723
|
return (n, i) => {
|
|
724
|
-
const r =
|
|
724
|
+
const r = P("KBadge");
|
|
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"]);
|
|
@@ -761,7 +761,7 @@ const W = {
|
|
|
761
761
|
v847b138c: u.value && c.value ? "100%" : n.slim ? "50%" : "25%",
|
|
762
762
|
v847687d6: u.value && c.value ? "100%" : n.slim ? "50%" : "75%"
|
|
763
763
|
}));
|
|
764
|
-
const n = e, i = t, r = Gn(), o =
|
|
764
|
+
const n = e, i = t, r = Gn(), o = Pe(), { i18n: { t: a, formatIsoDate: s, formatUnixTimeStamp: l } } = W.useI18n(), c = $(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), d = $(() => !!(n.item.tooltip || o["label-tooltip"])), u = $(() => n.item.type === V.Json || n.item.type === V.JsonArray), p = $(() => n.item.type === V.JsonArray), g = W.useSubSchema(n.item.key), y = $(() => {
|
|
765
765
|
var Y;
|
|
766
766
|
return n.item.type ? n.item.type : (Y = g == null ? void 0 : g.value) != null && Y.encrypted ? V.Redacted : void 0;
|
|
767
767
|
}), x = $(() => {
|
|
@@ -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 =
|
|
900
|
+
const w = P("KTooltip"), _ = P("KLabel"), O = P("KBadge"), f = P("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
|
-
|
|
907
|
-
|
|
908
|
-
default:
|
|
909
|
-
|
|
906
|
+
D(Y.$slots, "label", { item: e.item }, () => [
|
|
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
|
-
|
|
931
|
-
|
|
930
|
+
D(Y.$slots, "label-tooltip", {}, () => [
|
|
931
|
+
U(L(e.item.tooltip), 1)
|
|
932
932
|
], !0)
|
|
933
933
|
], 8, lr)
|
|
934
934
|
]),
|
|
@@ -937,16 +937,16 @@ 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
|
}, [
|
|
944
|
-
|
|
944
|
+
D(Y.$slots, e.item.key, {
|
|
945
945
|
rowValue: e.item.value
|
|
946
946
|
}, () => [
|
|
947
947
|
c.value ? (m(), S("div", ur, [
|
|
948
|
-
(m(), j(
|
|
949
|
-
default:
|
|
948
|
+
(m(), j(De(x.value.tag), zn(Qn(x.value.attrs)), {
|
|
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
|
]),
|
|
@@ -1066,25 +1066,25 @@ const W = {
|
|
|
1066
1066
|
return r.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? r[r.length - 1] : r[r.length - 2]).length;
|
|
1067
1067
|
});
|
|
1068
1068
|
return (r, o) => {
|
|
1069
|
-
const a =
|
|
1069
|
+
const a = P("KBadge"), s = P("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
|
}
|
|
@@ -1335,12 +1335,12 @@ var cn = new ne("tag:yaml.org,2002:null", {
|
|
|
1335
1335
|
},
|
|
1336
1336
|
defaultStyle: "lowercase"
|
|
1337
1337
|
});
|
|
1338
|
-
function
|
|
1338
|
+
function Dr(e) {
|
|
1339
1339
|
if (e === null) return !1;
|
|
1340
1340
|
var t = e.length;
|
|
1341
1341
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function Pr(e) {
|
|
1344
1344
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1345
1345
|
}
|
|
1346
1346
|
function Ur(e) {
|
|
@@ -1348,8 +1348,8 @@ function Ur(e) {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
var un = new ne("tag:yaml.org,2002:bool", {
|
|
1350
1350
|
kind: "scalar",
|
|
1351
|
-
resolve:
|
|
1352
|
-
construct:
|
|
1351
|
+
resolve: Dr,
|
|
1352
|
+
construct: Pr,
|
|
1353
1353
|
predicate: Ur,
|
|
1354
1354
|
represent: {
|
|
1355
1355
|
lowercase: function(e) {
|
|
@@ -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;
|
|
@@ -2085,9 +2085,9 @@ function ja(e, t) {
|
|
|
2085
2085
|
throw new oe("expected a single document in the stream, but found more");
|
|
2086
2086
|
}
|
|
2087
2087
|
}
|
|
2088
|
-
var
|
|
2089
|
-
loadAll:
|
|
2090
|
-
load:
|
|
2088
|
+
var Da = Ma, Pa = ja, On = {
|
|
2089
|
+
loadAll: Da,
|
|
2090
|
+
load: Pa
|
|
2091
2091
|
}, Ln = Object.prototype.toString, Bn = Object.prototype.hasOwnProperty, ct = 65279, Ua = 9, Fe = 10, qa = 13, Ha = 32, Va = 33, Ya = 34, Ze = 35, Wa = 37, Ja = 38, Ga = 39, za = 42, Rn = 44, Qa = 45, Me = 58, Za = 61, Xa = 62, eo = 63, to = 64, Kn = 91, Nn = 93, no = 96, Mn = 123, io = 124, jn = 125, re = {};
|
|
2092
2092
|
re[0] = "\\0";
|
|
2093
2093
|
re[7] = "\\a";
|
|
@@ -2192,11 +2192,11 @@ function Te(e, t) {
|
|
|
2192
2192
|
var n = e.charCodeAt(t), i;
|
|
2193
2193
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (i = e.charCodeAt(t + 1), i >= 56320 && i <= 57343) ? (n - 55296) * 1024 + i - 56320 + 65536 : n;
|
|
2194
2194
|
}
|
|
2195
|
-
function
|
|
2195
|
+
function Dn(e) {
|
|
2196
2196
|
var t = /^\n* /;
|
|
2197
2197
|
return t.test(e);
|
|
2198
2198
|
}
|
|
2199
|
-
var
|
|
2199
|
+
var Pn = 1, et = 2, Un = 3, qn = 4, Ae = 5;
|
|
2200
2200
|
function mo(e, t, n, i, r, o, a, s) {
|
|
2201
2201
|
var l, c = 0, d = null, u = !1, p = !1, g = i !== -1, y = -1, x = fo(Te(e, 0)) && po(Te(e, e.length - 1));
|
|
2202
2202
|
if (t || a)
|
|
@@ -2216,7 +2216,7 @@ function mo(e, t, n, i, r, o, a, s) {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
p = p || g && l - y - 1 > i && e[y + 1] !== " ";
|
|
2218
2218
|
}
|
|
2219
|
-
return !u && !p ? x && !a && !r(e) ?
|
|
2219
|
+
return !u && !p ? x && !a && !r(e) ? Pn : o === Oe ? Ae : et : n > 9 && Dn(e) ? Ae : a ? o === Oe ? Ae : et : p ? qn : Un;
|
|
2220
2220
|
}
|
|
2221
2221
|
function yo(e, t, n, i, r) {
|
|
2222
2222
|
e.dump = function() {
|
|
@@ -2238,7 +2238,7 @@ function yo(e, t, n, i, r) {
|
|
|
2238
2238
|
e.forceQuotes && !i,
|
|
2239
2239
|
r
|
|
2240
2240
|
)) {
|
|
2241
|
-
case
|
|
2241
|
+
case Pn:
|
|
2242
2242
|
return t;
|
|
2243
2243
|
case et:
|
|
2244
2244
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
@@ -2254,7 +2254,7 @@ function yo(e, t, n, i, r) {
|
|
|
2254
2254
|
}();
|
|
2255
2255
|
}
|
|
2256
2256
|
function Lt(e, t) {
|
|
2257
|
-
var n =
|
|
2257
|
+
var n = Dn(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
2258
2258
|
`, r = i && (e[e.length - 2] === `
|
|
2259
2259
|
` || e === `
|
|
2260
2260
|
`), o = r ? "+" : i ? "" : "-";
|
|
@@ -2444,7 +2444,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2444
2444
|
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Hn.dump(i).trim();
|
|
2445
2445
|
});
|
|
2446
2446
|
return (i, r) => {
|
|
2447
|
-
const o =
|
|
2447
|
+
const o = P("KCodeBlock");
|
|
2448
2448
|
return m(), S("div", jo, [
|
|
2449
2449
|
t.entityRecord ? (m(), j(o, {
|
|
2450
2450
|
key: 0,
|
|
@@ -2452,11 +2452,11 @@ 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
|
}
|
|
2459
|
-
}),
|
|
2459
|
+
}), Do = { class: "terraform-config config-card-code-block" }, ie = " ", Yn = /* @__PURE__ */ z({
|
|
2460
2460
|
__name: "TerraformCodeBlock",
|
|
2461
2461
|
props: {
|
|
2462
2462
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -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
|
|
@@ -2551,19 +2551,19 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2551
2551
|
`, d;
|
|
2552
2552
|
});
|
|
2553
2553
|
return (l, c) => {
|
|
2554
|
-
const d =
|
|
2555
|
-
return m(), S("div",
|
|
2554
|
+
const d = P("KCodeBlock");
|
|
2555
|
+
return m(), S("div", Do, [
|
|
2556
2556
|
t.entityRecord ? (m(), j(d, {
|
|
2557
2557
|
key: 0,
|
|
2558
2558
|
id: "terraform-codeblock",
|
|
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
|
}
|
|
2566
|
-
}),
|
|
2566
|
+
}), Po = { class: "deck-config config-card-code-block" }, Wn = /* @__PURE__ */ z({
|
|
2567
2567
|
__name: "DeckCodeBlock",
|
|
2568
2568
|
props: {
|
|
2569
2569
|
entityRecord: {},
|
|
@@ -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 =
|
|
2600
|
-
return m(), S("div",
|
|
2601
|
-
|
|
2598
|
+
const s = P("KBadge"), l = P("KCodeBlock");
|
|
2599
|
+
return m(), S("div", Po, [
|
|
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
|
}
|
|
@@ -2671,7 +2693,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2671
2693
|
}
|
|
2672
2694
|
},
|
|
2673
2695
|
setup(e) {
|
|
2674
|
-
const t = e, n =
|
|
2696
|
+
const t = e, n = Pe(), { i18n: { t: i } } = W.useI18n(), r = (s) => !!(s.tooltip || n[`${s.key}-label-tooltip`]), o = $(() => {
|
|
2675
2697
|
if (!t.record)
|
|
2676
2698
|
return t.record;
|
|
2677
2699
|
let s = t.record;
|
|
@@ -2686,17 +2708,17 @@ 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)) :
|
|
2690
|
-
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) =>
|
|
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),
|
|
2712
|
+
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) => D(s.$slots, `config-card-item-${d.key}`, {
|
|
2691
2713
|
key: d.key,
|
|
2692
2714
|
item: d
|
|
2693
2715
|
}, () => [
|
|
2694
|
-
|
|
2695
|
-
label:
|
|
2696
|
-
|
|
2716
|
+
K(Xt, { item: d }, Se({
|
|
2717
|
+
label: k(() => [
|
|
2718
|
+
D(s.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2697
2719
|
]),
|
|
2698
|
-
[d.key]:
|
|
2699
|
-
|
|
2720
|
+
[d.key]: k(({ rowValue: u }) => [
|
|
2721
|
+
D(s.$slots, d.key, {
|
|
2700
2722
|
row: d,
|
|
2701
2723
|
rowValue: u
|
|
2702
2724
|
}, void 0, !0)
|
|
@@ -2705,39 +2727,39 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2705
2727
|
}, [
|
|
2706
2728
|
r(d) ? {
|
|
2707
2729
|
name: "label-tooltip",
|
|
2708
|
-
fn:
|
|
2709
|
-
|
|
2730
|
+
fn: k(() => [
|
|
2731
|
+
D(s.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2710
2732
|
]),
|
|
2711
2733
|
key: "0"
|
|
2712
2734
|
} : void 0
|
|
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 =
|
|
3080
|
+
const b = P("KLabel"), H = P("KSelect"), J = P("KButton"), I = P("KSkeleton"), R = P("KEmptyState"), G = P("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
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3085
|
+
actions: k(() => [
|
|
3086
|
+
B("div", Jo, [
|
|
3087
|
+
D(f.$slots, "actions", {}, void 0, !0),
|
|
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
|
-
|
|
3151
|
+
ce(Object.keys(f.$slots), (q) => ({
|
|
3152
|
+
name: q,
|
|
3153
|
+
fn: k((Q) => [
|
|
3154
|
+
D(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
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3164
|
+
fn: k(() => [
|
|
3165
|
+
B("span", Wo, [
|
|
3166
|
+
D(f.$slots, "title", {}, () => [
|
|
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,
|
|
3325
|
-
const O =
|
|
3326
|
-
return m(), j(
|
|
3327
|
-
default:
|
|
3346
|
+
}), (w, _) => {
|
|
3347
|
+
const O = P("KSkeleton"), f = P("KEmptyState"), v = P("KAlert"), b = P("KButton"), H = P("KTabs"), J = P("KSlideout");
|
|
3348
|
+
return m(), j(De(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
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", {
|
|
@@ -3346,54 +3368,54 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3346
3368
|
onReset: Be(C, ["prevent"]),
|
|
3347
3369
|
onSubmit: Be(E, ["prevent"])
|
|
3348
3370
|
}, [
|
|
3349
|
-
|
|
3371
|
+
D(w.$slots, "default", {}, void 0, !0),
|
|
3350
3372
|
e.errorMessage ? (m(), j(v, {
|
|
3351
3373
|
key: 0,
|
|
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
|
-
|
|
3366
|
-
|
|
3387
|
+
D(w.$slots, "form-actions", {}, () => [
|
|
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,44 +3423,44 @@ 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, {
|
|
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
|
|
@@ -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,8 +3534,8 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3512
3534
|
l();
|
|
3513
3535
|
}), Zn(() => {
|
|
3514
3536
|
y();
|
|
3515
|
-
}), (h,
|
|
3516
|
-
const C =
|
|
3537
|
+
}), (h, A) => {
|
|
3538
|
+
const C = P("KTooltip");
|
|
3517
3539
|
return m(), S("span", {
|
|
3518
3540
|
ref_key: "contentRef",
|
|
3519
3541
|
ref: c,
|
|
@@ -3523,17 +3545,17 @@ 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:
|
|
3532
|
-
|
|
3553
|
+
default: k(() => [
|
|
3554
|
+
D(h.$slots, "default", {}, void 0, !0)
|
|
3533
3555
|
]),
|
|
3534
3556
|
_: 3
|
|
3535
3557
|
}, 8, ["text"])
|
|
3536
|
-
], 8, el)) :
|
|
3558
|
+
], 8, el)) : D(h.$slots, "default", { key: 1 }, void 0, !0)
|
|
3537
3559
|
], 512);
|
|
3538
3560
|
};
|
|
3539
3561
|
}
|
|
@@ -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);
|
|
@@ -3756,14 +3778,14 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3756
3778
|
...n.paginationAttributes
|
|
3757
3779
|
}));
|
|
3758
3780
|
return (f, v) => {
|
|
3759
|
-
const b =
|
|
3781
|
+
const b = P("KTableData"), H = P("KCard");
|
|
3760
3782
|
return m(), j(H, {
|
|
3761
3783
|
class: "kong-ui-entity-base-table",
|
|
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
|
-
|
|
3804
|
-
|
|
3824
|
+
toolbar: k(() => [
|
|
3825
|
+
B("div", il, [
|
|
3826
|
+
D(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3805
3827
|
f.$slots["toolbar-button"] ? (m(), S("div", rl, [
|
|
3806
|
-
|
|
3807
|
-
])) :
|
|
3828
|
+
D(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3829
|
+
])) : M("", !0)
|
|
3808
3830
|
])
|
|
3809
3831
|
]),
|
|
3810
|
-
"action-items":
|
|
3811
|
-
|
|
3832
|
+
"action-items": k(({ row: J }) => [
|
|
3833
|
+
D(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:
|
|
3818
|
-
|
|
3839
|
+
fn: k(() => [
|
|
3840
|
+
D(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:
|
|
3831
|
-
|
|
3832
|
-
row:
|
|
3852
|
+
default: k(() => [
|
|
3853
|
+
D(f.$slots, I, {
|
|
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(
|
|
3852
|
-
|
|
3853
|
-
])) :
|
|
3873
|
+
f.$slots["outside-actions"] && T(A) ? (m(), S("div", al, [
|
|
3874
|
+
D(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3875
|
+
])) : M("", !0)
|
|
3854
3876
|
]),
|
|
3855
3877
|
_: 3
|
|
3856
3878
|
}, 8, ["title", "title-tag"]);
|
|
@@ -3907,7 +3929,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3907
3929
|
r("proceed");
|
|
3908
3930
|
};
|
|
3909
3931
|
return (l, c) => {
|
|
3910
|
-
const d =
|
|
3932
|
+
const d = P("KAlert"), u = P("KPrompt");
|
|
3911
3933
|
return m(), j(u, {
|
|
3912
3934
|
"action-button-appearance": "danger",
|
|
3913
3935
|
"action-button-disabled": e.actionPending,
|
|
@@ -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
|
-
|
|
3951
|
-
|
|
3972
|
+
D(l.$slots, "description", {}, () => [
|
|
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,18 +4083,18 @@ 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,
|
|
4075
|
-
const O =
|
|
4096
|
+
return (w, _) => {
|
|
4097
|
+
const O = P("KInput"), f = P("KButton"), v = P("KSelect");
|
|
4076
4098
|
return e.config.isExactMatch ? (m(), j(O, {
|
|
4077
4099
|
key: 0,
|
|
4078
4100
|
autocomplete: "off",
|
|
@@ -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")
|
|
@@ -4259,9 +4281,9 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4259
4281
|
}
|
|
4260
4282
|
};
|
|
4261
4283
|
return (u, p) => {
|
|
4262
|
-
const g =
|
|
4284
|
+
const g = P("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
|
-
}, { immediate: !0 }), (r, o) => i.value ?
|
|
4339
|
+
}, { immediate: !0 }), (r, o) => i.value ? D(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)
|
|
@@ -4381,38 +4403,38 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4381
4403
|
}
|
|
4382
4404
|
},
|
|
4383
4405
|
setup(e) {
|
|
4384
|
-
const t =
|
|
4406
|
+
const t = Pe(), n = El();
|
|
4385
4407
|
return (i, r) => (m(), S("div", {
|
|
4386
4408
|
"aria-labelledby": e.title ? T(n) : void 0,
|
|
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
|
}, [
|
|
4395
|
-
e.title ? (m(), j(
|
|
4417
|
+
e.title ? (m(), j(De(e.titleTag), {
|
|
4396
4418
|
key: 0,
|
|
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
|
-
|
|
4407
|
-
|
|
4428
|
+
D(i.$slots, "description", {}, () => [
|
|
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
|
-
|
|
4412
|
-
])) :
|
|
4433
|
+
D(i.$slots, "footer", {}, void 0, !0)
|
|
4434
|
+
])) : M("", !0)
|
|
4413
4435
|
], 2)),
|
|
4414
|
-
|
|
4415
|
-
|
|
4436
|
+
B("div", Bl, [
|
|
4437
|
+
D(i.$slots, "default", {}, void 0, !0)
|
|
4416
4438
|
])
|
|
4417
4439
|
])
|
|
4418
4440
|
], 10, Il));
|
|
@@ -4420,7 +4442,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4420
4442
|
}), _s = /* @__PURE__ */ se(Rl, [["__scopeId", "data-v-b1f74200"]]), Kl = { class: "ff-form-section" }, Nl = { class: "header" }, Ml = {
|
|
4421
4443
|
key: 0,
|
|
4422
4444
|
class: "step"
|
|
4423
|
-
}, jl = { class: "header-content" },
|
|
4445
|
+
}, jl = { class: "header-content" }, Dl = { class: "header-title" }, Pl = {
|
|
4424
4446
|
key: 0,
|
|
4425
4447
|
class: "header-description"
|
|
4426
4448
|
}, Ul = {
|
|
@@ -4434,28 +4456,28 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4434
4456
|
description: { default: "" }
|
|
4435
4457
|
},
|
|
4436
4458
|
setup(e) {
|
|
4437
|
-
const t =
|
|
4459
|
+
const t = Pe();
|
|
4438
4460
|
return (n, i) => (m(), S("div", Kl, [
|
|
4439
|
-
|
|
4440
|
-
e.step != null ? (m(), S("div", Ml, L(e.step), 1)) :
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
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", Dl, [
|
|
4465
|
+
D(n.$slots, "title", {}, () => [
|
|
4466
|
+
U(L(e.title), 1)
|
|
4445
4467
|
], !0)
|
|
4446
4468
|
]),
|
|
4447
|
-
e.description || t.description ? (m(), S("div",
|
|
4448
|
-
|
|
4449
|
-
|
|
4469
|
+
e.description || t.description ? (m(), S("div", Pl, [
|
|
4470
|
+
D(n.$slots, "description", {}, () => [
|
|
4471
|
+
U(L(e.description), 1)
|
|
4450
4472
|
], !0)
|
|
4451
|
-
])) :
|
|
4473
|
+
])) : M("", !0)
|
|
4452
4474
|
]),
|
|
4453
4475
|
t.extra ? (m(), S("div", Ul, [
|
|
4454
|
-
|
|
4455
|
-
])) :
|
|
4476
|
+
D(n.$slots, "extra", {}, void 0, !0)
|
|
4477
|
+
])) : M("", !0)
|
|
4456
4478
|
]),
|
|
4457
|
-
|
|
4458
|
-
|
|
4479
|
+
B("div", ql, [
|
|
4480
|
+
D(n.$slots, "default", {}, void 0, !0)
|
|
4459
4481
|
])
|
|
4460
4482
|
]));
|
|
4461
4483
|
}
|
|
@@ -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 = $(() => {
|
|
@@ -4501,7 +4523,7 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4501
4523
|
}, 1800));
|
|
4502
4524
|
};
|
|
4503
4525
|
return (u, p) => {
|
|
4504
|
-
const g =
|
|
4526
|
+
const g = P("KTooltip"), y = P("KExternalLink"), x = P("KClipboardProvider");
|
|
4505
4527
|
return m(), S("div", Vl, [
|
|
4506
4528
|
s.value ? (m(), S("div", Yl, L(c.value), 1)) : l.value ? l.value ? (m(), j(y, {
|
|
4507
4529
|
key: 2,
|
|
@@ -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,46 +4646,46 @@ 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
|
-
const l =
|
|
4654
|
+
const l = P("KCard");
|
|
4633
4655
|
return m(), S("div", zl, [
|
|
4634
|
-
|
|
4656
|
+
B("div", Ql, [
|
|
4635
4657
|
a.$slots.image ? (m(), S("div", Zl, [
|
|
4636
|
-
|
|
4637
|
-
])) :
|
|
4658
|
+
D(a.$slots, "image", {}, void 0, !0)
|
|
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
|
-
|
|
4643
|
-
|
|
4664
|
+
D(a.$slots, "title", {}, () => [
|
|
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
|
-
|
|
4649
|
-
|
|
4670
|
+
D(a.$slots, "default", {}, () => [
|
|
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] =
|
|
4656
|
-
|
|
4657
|
-
|
|
4675
|
+
B("p", null, [
|
|
4676
|
+
B("b", null, L(T(n)("emptyState.pricingTitle")), 1),
|
|
4677
|
+
s[2] || (s[2] = U()),
|
|
4678
|
+
D(a.$slots, "pricing", {}, () => [
|
|
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
|
-
|
|
4664
|
-
])) :
|
|
4685
|
+
D(a.$slots, "message", {}, void 0, !0)
|
|
4686
|
+
])) : M("", !0),
|
|
4665
4687
|
r.value || e.learnMore || a.$slots.actions ? (m(), S("div", is, [
|
|
4666
|
-
|
|
4688
|
+
D(a.$slots, "actions", {}, () => [
|
|
4667
4689
|
r.value ? (m(), j(T(mt), {
|
|
4668
4690
|
key: 0,
|
|
4669
4691
|
appearance: "primary",
|
|
@@ -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
|
-
|
|
4703
|
-
])) :
|
|
4704
|
-
|
|
4724
|
+
D(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
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
|
-
|
|
4716
|
-
])) :
|
|
4737
|
+
D(a.$slots, "bottom", {}, void 0, !0)
|
|
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))
|
|
@@ -4763,7 +4785,7 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4763
4785
|
})) : (m(), S("span", us, "-"));
|
|
4764
4786
|
};
|
|
4765
4787
|
}
|
|
4766
|
-
}), { useAxios: Es, useDeleteUrlBuilder: Is, useErrors: Fs, useExternalLinkCreator: Os, useFetchUrlBuilder: Ls, useFetcher: Bs, useFetcherCacheKey: Rs, useDebouncedFilter: Ks, useStringHelpers: Ns, useHelpers: Ms, useGatewayFeatureSupported: js, useTruncationDetector:
|
|
4788
|
+
}), { useAxios: Es, useDeleteUrlBuilder: Is, useErrors: Fs, useExternalLinkCreator: Os, useFetchUrlBuilder: Ls, useFetcher: Bs, useFetcherCacheKey: Rs, useDebouncedFilter: Ks, useStringHelpers: Ns, useHelpers: Ms, useGatewayFeatureSupported: js, useTruncationDetector: Ds, useValidators: Ps, useSchemaProvider: Us, useTableState: qs } = W;
|
|
4767
4789
|
export {
|
|
4768
4790
|
yt as Appearances,
|
|
4769
4791
|
Yo as ConfigCardDisplay,
|
|
@@ -4807,6 +4829,6 @@ export {
|
|
|
4807
4829
|
Us as useSchemaProvider,
|
|
4808
4830
|
Ns as useStringHelpers,
|
|
4809
4831
|
qs as useTableState,
|
|
4810
|
-
|
|
4811
|
-
|
|
4832
|
+
Ds as useTruncationDetector,
|
|
4833
|
+
Ps as useValidators
|
|
4812
4834
|
};
|